11
WXL
2023-09-07 cc7c660a4d4bcdbdf1514e5ddb3e663899f096d4
src/views/project/travelexpenseapply/travelexpensedetail/index.vue
@@ -208,6 +208,16 @@
          </el-col>
          </el-row>
          -->
        <el-row v-if="jurisdiction">
          <!-- <el-alert title="当前为查看状态,不支持修改存储。" type="warning">
          </el-alert> -->
          <el-alert
            title="当前为查看状态,不支持修改存储。"
            type="warning"
            show-icon
          >
          </el-alert>
        </el-row>
        <el-row style="margin-top: 25px; margin-bottom: 5px">
          <el-col :span="20">报销明细</el-col>
        </el-row>
@@ -413,7 +423,12 @@
                </el-select>
              </template>
            </el-table-column>
            <el-table-column prop="days" label="天数" width="65" align="center">
            <el-table-column
              prop="days"
              label="天数"
              width="100"
              align="center"
            >
              <template slot-scope="scope">
                <el-input
                  v-model="scope.row.days"
@@ -937,7 +952,6 @@
              :show-file-list="false"
              multiple
              drag
              :limit="20"
              :headers="headers"
              :on-success="
                (response, file, fileList) =>
@@ -946,7 +960,6 @@
              :on-preview="downFile"
              :disabled="operationType == 'detail'"
              :on-error="handleUploadError"
              :on-exceed="handleExceed"
              :on-remove="remove"
              accept="image/*,.pdf"
            >
@@ -967,6 +980,7 @@
              :data="fileListto"
              @row-click="downFile"
              style="width: 100%"
              height="400"
            >
              <el-table-column
                prop="name"
@@ -990,13 +1004,13 @@
                  <el-button
                    type="primary"
                    size="mini"
                    @click.native.prevent="deletedowfile(scope.row)"
                    @click.native.prevent.stop="deletedowfile(scope.row)"
                    >删除</el-button
                  >
                  <el-button
                    type="primary"
                    size="mini"
                    @click.native.prevent="moveupdowfile(scope.row)"
                    @click.native.prevent.stop="moveupdowfile(scope.row)"
                    >上移</el-button
                  >
                </template>
@@ -1230,6 +1244,7 @@
        flowconclusion: null,
        fundid: null
      },
      jurisdiction: false,
      //保存按钮控制
      idisabled: false
@@ -1326,7 +1341,7 @@
      //获取票据信息位置
      if (response.code == 200) {
        this.form.filename = file.raw.name;
        this.previewpdf = true;
        this.$modal.msgSuccess(response.msg);
        this.fileListto.push({
          name: file.name,
@@ -1335,11 +1350,8 @@
        this.pdfimgsrcList.push(
          this.Networkheader + "/prod-api" + response.fileName
        );
        this.pdfimg = this.Networkheader + "/prod-api" + response.fileName;
        // this.fileListto.push({
        //   name: file.name,
        //   url: response.url
        // });
        this.rbDetails[this.atpresent].annexfilesList = this.fileListto;
      } else {
        console.log(response.msg);
@@ -1351,6 +1363,7 @@
      this.pdfVisible = true;
      console.log(this.rbDetails[index]);
      if (this.rbDetails[index].annexfilesList) {
        this.previewpdf = true;
        this.fileListto = this.rbDetails[index].annexfilesList;
        console.log(this.fileListto);
        this.pdfimg = this.Networkheader + "/prod-api" + this.fileListto[0].url;
@@ -1380,12 +1393,11 @@
        this.previewpdf = true;
        if (item.url) {
          this.pdfimg = this.Networkheader + "/prod-api" + item.url;
          // this.pdfimgsrcList = [];
          // if (!this.pdfimgsrcList.includes(this.pdfimg)) {
          // this.pdfimgsrcList.push(this.pdfimg);
          if (!this.pdfimgsrcList.includes(this.pdfimg)) {
            this.pdfimgsrcList.push(this.pdfimg);
            console.log("加入");
          }
          //   console.log("加入");
          // }
          console.log(this.pdfimg, "pdfimg");
          console.log(this.pdfimgsrcList, "imglist");
        } else {
@@ -1404,9 +1416,16 @@
    deletedowfile(row) {
      console.log(this.fileListto);
      console.log(row);
      const indexlist = this.getIndexInArray(
        this.pdfimgsrcList,
        this.Networkheader + "/prod-api" + row.url
      );
      console.log(indexlist);
      this.pdfimgsrcList.splice(indexlist, 1);
      const index = this.getIndexInArray(this.fileListto, row);
      this.fileList = this.fileListto.splice(index, 1);
      this.fileListto.splice(index, 1);
      console.log(index);
      console.log(this.pdfimgsrcList);
    },
    // 点击上移
    moveupdowfile(row) {
@@ -1892,6 +1911,7 @@
    handleDetail(ids) {
      this.operationType = "detail";
      this.title = "报销申请详情";
      this.jurisdiction = true;
      this.reset();
      this.open = true;
@@ -2534,7 +2554,7 @@
      if (!isNaN(parseFloat(row.otherfeeamount))) {
        totalFee += parseFloat(row.otherfeeamount);
      }
      row.total = totalFee;
      row.total = totalFee.toFixed(2);
      /*
      if (!isNaN(parseFloat(this.rbDetails[rowIndex].trafficexpense))) {
@@ -2756,7 +2776,7 @@
              return prev;
            }
          }, 0);
          sums[index] += "";
          sums[index] = sums[index].toFixed(2); // 保留2位小数,解决小数合计列;
        } else {
          sums[index] = "";
        }
@@ -2841,4 +2861,8 @@
  line-height: 36px;
  text-align: center;
}
::v-deep .el-alert__title {
  font-size: 20px;
  line-height: 20px;
}
</style>