11
WXL
2023-10-31 be42af700f901f496db68d97ab46e2c1d4bef85a
src/views/project/fund/applyDetail/index.vue
@@ -448,7 +448,13 @@
              v-if="form.applytype == '1' || form.applytype == '2'"
            >
              <template slot-scope="scope">
                <el-input v-model="scope.row.idcardno" placeholder="身份证号" />
                <el-form-item :error="scope.row.error" label-width="0">
                  <el-input
                    v-model.number="scope.row.idcardno"
                    @input="tableParValueChange(scope.row)"
                    placeholder="身份证号"
                  />
                </el-form-item>
              </template>
            </el-table-column>
            <el-table-column
@@ -753,7 +759,7 @@
      style="text-align: center"
      v-loading="loading"
    >
      <el-form ref="funddetailForm" :model="funddetailForm">
      <el-form ref="funddetailForm" :rules="funddrules" :model="funddetailForm">
        <el-row v-if="businessType != 4 && businessType != 3">
          <el-col
            :span="24"
@@ -1446,6 +1452,14 @@
  ],
  data() {
    var validatePass = (rule, value, callback) => {
      const regex = /^[1-9]\d{5}(19|20)\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}([0-9]|X)$/;
      if (regex.test(value)) {
        callback();
      } else {
        callback(new Error("身份证号码格式错误"));
      }
    };
    //这里存放数据
    return {
      // 遮罩层
@@ -1557,6 +1571,18 @@
        ],
        deptmentname: [
          { required: true, message: "请输入所属业务组", trigger: "blur" }
        ]
      },
      funddrules: {
        expertidcardno: [{ validator: validatePass, trigger: "blur" }],
        expertdepositbank: [
          { required: true, message: "请输入开户银行", trigger: "change" }
        ],
        expertbankcardno: [
          { required: true, message: "请输入银行卡号", trigger: "change" }
        ],
        expertunitno: [
          { required: true, message: "请选择单位名称", trigger: "change" }
        ]
      },
@@ -2294,7 +2320,6 @@
      }
        this.Savenow();
        console.log("保存并审批");
    },
    // 取消按钮
@@ -3378,13 +3403,7 @@
    //专家/医疗机构/费用报销机构选择
    ConfirmDetailDialog() {
      // if (this.businessType == 4) {
      //   if (this.experthear == "expert") {
      //     this.funddetailForm.beneficiaryname = this.unitforname;
      //   } else {
      //     this.funddetailForm.beneficiaryname = this.Personnelforname;
      //   }
      // }
      this.$refs["funddetailForm"].validate(valid => {
      let tempIndex = this.funddetailForm.index;
      let tempExpertName = this.funddetailForm.beneficiaryname;
      let tempUnitname = this.funddetailForm.unitname;
@@ -3482,7 +3501,9 @@
              item => singleDetail.unitno == item.organizationid
            );
            if (unitIndex > -1) {
              singleDetail.unitname = this.unitList[unitIndex].organizationname;
                singleDetail.unitname = this.unitList[
                  unitIndex
                ].organizationname;
            } else {
              singleDetail.unitname = singleDetail.unitno;
            }
@@ -3499,7 +3520,9 @@
              singleDetail.depositbank = this.feeUnitList[
                unitIndex
              ].depositbank;
              singleDetail.bankcardno = this.feeUnitList[unitIndex].bankcardno;
                singleDetail.bankcardno = this.feeUnitList[
                  unitIndex
                ].bankcardno;
            } else {
              singleDetail.unitname = singleDetail.unitno;
            }
@@ -3517,6 +3540,24 @@
      }
      this.rbDetails[tempIndex] = singleDetail;
      this.showSelectionDialog = false;
      });
    },
    tableParValueChange(row, tto) {
      const regex = /^[1-9]\d{5}(19|20)\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}([0-9]|X)$/;
      if (tto) {
        if (regex.test(funddetailForm.expertidcardno)) {
          row.error = "";
        } else {
          row.error = "身份证号码格式错误";
        }
        return;
      }
      console.log(11);
      if (regex.test(row.idcardno)) {
        row.error = "";
      } else {
        row.error = "身份证号码格式错误";
      }
    }
  },