11
WXL
2023-08-28 151122a373835c93ef1418c7db0985c0660acf7e
src/views/project/fund/applyDetail/index.vue
@@ -232,7 +232,6 @@
                  placeholder="服务说明"
                  clearable
                  allow-create
                  filterable
                  @change="verifyFeeRemark(scope.row)"
                >
                  <el-option
@@ -450,7 +449,11 @@
                  type="text"
                  size="mini"
                  @click="addRow(scope.$index)"
                  v-if="operationType == 'add' || operationType == 'update'"
                  v-if="
                    operationType == 'add' ||
                      operationType == 'update' ||
                      operationType == 'check'
                  "
                  >新增</el-button
                >
                <el-button
@@ -459,7 +462,11 @@
                  "
                  type="text"
                  size="small"
                  v-if="operationType == 'add' || operationType == 'update'"
                  v-if="
                    operationType == 'add' ||
                      operationType == 'update' ||
                      operationType == 'check'
                  "
                >
                  删除
                </el-button>
@@ -611,7 +618,11 @@
        <el-button
          type="primary"
          @click="submitForm"
          v-if="operationType == 'add' || operationType == 'update'"
          v-if="
            operationType == 'add' ||
              operationType == 'update' ||
              operationType == 'check'
          "
          >提交保存</el-button
        >
        <el-button
@@ -874,7 +885,7 @@
        <div v-if="this.previewpdf" class="pdfimgmin">
          <!-- <img :src="pdfimg" /> -->
          <el-image
            style="width: 100px; height: 100px"
            style="width: 95%; height: 90%"
            :src="pdfimg"
            :preview-src-list="pdfimgsrcList"
          >
@@ -1562,7 +1573,7 @@
          //   this.form.annexfiles = list.map(item => item.url).join(",");
          // }
          //处理明细
          //处理明细
          for (let i = 0; i < this.rbDetails.length; i++) {
            let tempDetail = this.rbDetails[i];
            //获取服务项目明细
@@ -1580,9 +1591,15 @@
              item => tempDetail.applytype == item.value
            );
            if (applytypeIndex > -1) {
              tempDetail.applytypename = this.rowfeeItemTypes[applytypeIndex].label;
              tempDetail.subjecttype = this.rowfeeItemTypes[applytypeIndex].subjecttype;
              tempDetail.subjecttypename = this.rowfeeItemTypes[applytypeIndex].subjecttypename;
              tempDetail.applytypename = this.rowfeeItemTypes[
                applytypeIndex
              ].label;
              tempDetail.subjecttype = this.rowfeeItemTypes[
                applytypeIndex
              ].subjecttype;
              tempDetail.subjecttypename = this.rowfeeItemTypes[
                applytypeIndex
              ].subjecttypename;
            }
            this.rbDetails[i] = tempDetail;
            /*
@@ -1623,28 +1640,45 @@
              });
            }
            */
          }
          //计算当前行报销内容费用合计,税前金额(amount)、扣税金额(taxamount)、税后金额(taxedamount)
          if (this.businessType == '2') {
          //计算当前行报销内容费用合计,税前金额(amount)、扣税金额(taxamount)、税后金额(taxedamount)
          if (this.businessType == "2") {
            for (let j = 0; j < this.rbDetails.length; j++) {
              let tempDetail = this.rbDetails[j];
              if (isNaN(parseFloat(tempDetail.amount)) || parseFloat(tempDetail.amount) == 0) {
                this.$modal.msgWarning("服务项目表中,第" + (j + 1).toString() + "行的金额为输入,请先输入金额后再提交保存!");
              if (
                isNaN(parseFloat(tempDetail.amount)) ||
                parseFloat(tempDetail.amount) == 0
              ) {
                this.$modal.msgWarning(
                  "服务项目表中,第" +
                    (j + 1).toString() +
                    "行的金额未输入,请先输入金额后再提交保存!"
                );
                return;
              }
            }
          } else if (this.businessType == '3' || this.businessType == '4') {
          } else if (this.businessType == "3" || this.businessType == "4") {
            for (let j = 0; j < this.rbDetails.length; j++) {
              let tempDetail = this.rbDetails[j];
              if (isNaN(parseFloat(tempDetail.amount)) || parseFloat(tempDetail.amount) == 0) {
                this.$modal.msgWarning("服务项目表中,第" + (j + 1).toString() + "行的金额为输入,请先输入金额后再提交保存!");
              if (
                isNaN(parseFloat(tempDetail.amount)) ||
                parseFloat(tempDetail.amount) == 0
              ) {
                this.$modal.msgWarning(
                  "服务项目表中,第" +
                    (j + 1).toString() +
                    "行的金额未输入,请先输入金额后再提交保存!"
                );
                return;
              }
              if (isNaN(parseFloat(tempDetail.amount)) || parseFloat(tempDetail.amount) == 0) {
                tempDetail.taxedamount = tempDetail.amount
              if (
                isNaN(parseFloat(tempDetail.taxamount)) ||
                parseFloat(tempDetail.taxamount) == 0
              ) {
                tempDetail.taxedamount = tempDetail.amount;
              } else {
                tempDetail.taxedamount = tempDetail.amount + tempDetail.taxamount
                tempDetail.taxedamount =
                  tempDetail.amount + tempDetail.taxamount;
              }
            }
          }
@@ -1701,8 +1735,8 @@
          //关闭窗口
          this.loading = false;
          // this.getfundList();
          this.$store.dispatch('tagsView/delView', this.$route)
          // this.getfundList();
          this.$store.dispatch("tagsView/delView", this.$route);
          this.$router.go(-1);
        }
      });
@@ -1924,7 +1958,7 @@
      });
    },
    //校验收费项目是否重复
    //校验收费项目
    verifyFeeItem(row) {
      row.itemlist.map(res => {
        if (row.itemid === res.id) {
@@ -1932,14 +1966,18 @@
          row.itemcode = res.itemCode;
        }
      });
      var repeatNum = 0;
      this.rbDetails.map(res => {
        if (res.applytype === row.applytype && res.itemid == row.itemid) {
          repeatNum++;
      //判断收费项目是否重复
      if (this.businessType == "1") {
        var repeatNum = 0;
        this.rbDetails.map(res => {
          if (res.applytype === row.applytype && res.itemid == row.itemid) {
            repeatNum++;
          }
        });
        if (repeatNum > 1) {
          this.$modal.msgWarning("您已经提交过该服务项目了");
        }
      });
      if (repeatNum > 1) {
        this.$modal.msgWarning("您已经提交过该服务项目了");
      }
      //获取费用项目的详细信息
@@ -2333,6 +2371,9 @@
      this.pdfVisible = true;
      if (this.rbDetails[index].annexfilesList) {
        this.fileListto = this.rbDetails[index].annexfilesList;
        this.pdfimg = this.fileListto[0].url;
        this.pdfimgsrcList = [];
        this.pdfimgsrcList.push(this.pdfimg);
      } else {
        this.fileListto = [];
        this.pdfimg = "";