龚焕茏
2024-07-30 0f851ca9f5fc81fb73dd26248b3cde46851bce25
feat:核算报告导出
5个文件已修改
25 ■■■■■ 已修改文件
src/components/FileUpload/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/ImagePreview/index.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/contract/contract/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/contract/report/index.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/contract/score/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/FileUpload/index.vue
@@ -63,7 +63,7 @@
    // 文件类型, 例如['png', 'jpg', 'jpeg']
    fileType: {
      type: Array,
      default: () => ["doc", "xls", "ppt", "txt", "pdf","png","jpg"],
      default: () => ["docx", "xlsx", "ppt", "txt", "pdf","png","jpg"],
    },
    // 是否显示提示
    isShowTip: {
src/components/ImagePreview/index.vue
@@ -32,7 +32,8 @@
  },
  computed: {
    realSrc() {
      if (!this.src) {
      const imageExtensions = /\.(jpg|jpeg|png|gif|bmp|svg)$/i;
      if (!this.src || !imageExtensions.test(this.src)) {
        return DEFAULT_IMAGE;
      }
      let real_src = this.src.split(",")[0];
src/views/system/contract/contract/index.vue
@@ -115,6 +115,7 @@
                  </el-tooltip>
                </div>
              </span>
              <el-empty v-if="moneyRules.length == 0" :image-size="100" />
            </div>
          </el-collapse-item>
          <el-form-item label="合同附件" prop="attachment" class="top">
src/views/system/contract/report/index.vue
@@ -1,7 +1,7 @@
<template>
  <div class="app-container">
    <el-row style="margin-left: 10px" :gutter="10" class="mb8">
    <!-- <el-row style="margin-left: 10px" :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="warning"
@@ -12,9 +12,9 @@
        >导出所有数据</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
    </el-row> -->
    <el-card class="box-card" v-for="(item) in checkResultList">
    <el-card class="box-card" v-for="item in checkResultList" :key="item.id">
      <div slot="header" class="clearfix">
        <span>{{ item.unitName }}</span>
        <el-button style="float: right; padding: 3px 0" type="text" @click="handleDetail(item)">核算</el-button>
@@ -26,6 +26,7 @@
        <span v-if="item.latestTime" class="time">{{ new Date(item.latestTime).getFullYear() }}年{{ new Date(item.latestTime).getMonth() }}月</span>
        <span v-else class="time">暂无</span>
      </div>
      <el-button size="small" type="primary" round style="float: right;margin-left: 18px;" @click="handleExport(item)" v-hasPermi="['system:calculate:report:export']">导出</el-button>
      <el-button size="small" round style="float: right;margin-bottom: 18px;" @click="handlePublish(item)" v-if="item.status === 'not_publish'" :disabled="!item.canPublish" v-hasPermi="['system:calculate:report:status']">确认发布</el-button>
      <el-button size="small" round style="float: right;margin-bottom: 18px;" @click="handlePublish(item)" v-if="item.status === 'published'" v-hasPermi="['system:calculate:report:status']">取消发布</el-button>
    </el-card>
@@ -41,7 +42,7 @@
    <el-dialog :title="detailTitle" :visible.sync="detailOpen" width="760px" append-to-body>
      <div style="display: flex; flex-direction: row; width: 100%;margin-bottom: 10px; justify-content: center; align-items: center">
        <div style="line-height: 16px">应用规则:</div>
        <div v-for="ruleItem in detail.ruleList" style="display: flex; margin-right: 50px;">
        <div v-for="ruleItem in detail.ruleList" :key="ruleItem.id" style="display: flex; margin-right: 50px;">
          <div style="line-height: 16px;margin-right: 10px;display: flex; align-items: center">{{ ruleItem.scoreCondition }}分</div>
          <div style="line-height: 16px;max-width: 300px;word-wrap:break-word;word-break:normal;color: #2273b9">{{ ruleItem.description }}</div>
        </div>
@@ -287,10 +288,10 @@
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('system/checkResult/export', {
        ...this.queryParams
      }, `checkResult_${new Date().getTime()}.xlsx`)
    handleExport(item) {
      this.download('calculate-report/export', {
        ...{ 'contractId': item.contractId }
      }, `${item.contractName}运维核算.xlsx`)
    },
    /** 合计行 */
    getSummaries(param) {
src/views/system/contract/score/index.vue
@@ -289,7 +289,7 @@
      let item = this.$refs['cascader'].getCheckedNodes()[0].data;
      this.calcObj = item;
      this.form.contractId = item.contractId;
      this.form.ruleName = item.ruleName + "/" + item.label;
      this.form.ruleName = item.ruleName + " / " + item.label;
      this.form.deductCategory = item.deductCategory == '分数乘以数量' ? '扣' + item.calcFraction  + '分*数量 ' : item.deductCategory == '除以数量后乘以分数' ? '扣' + item.calcFraction + '分/' +  item.calcUnit + '小时' : '扣' + item.calcFraction + '分';
      if (item.deductCategory == "扣指定分数") {
        this.needNum = false;