11
WXL
2023-10-31 be42af700f901f496db68d97ab46e2c1d4bef85a
11
已修改3个文件
135 ■■■■ 文件已修改
src/api/project/donateannex.js 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/project/donationdetails/index.vue 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/project/fund/applyDetail/index.vue 65 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/project/donateannex.js
@@ -8,7 +8,14 @@
    params: query
  })
}
// 修改附件列表
export function Modifydonationattachment(data) {
  return request({
    url: '/project/donateannex/editannexfiles',
    method: 'post',
    data: data
  })
}
// 查询捐献附件列表
export function listDonateannex(query) {
  return request({
@@ -29,7 +36,7 @@
// 新增捐献附件
export function addDonateannex(data) {
  return request({
    url: '/project/donateannex',
    url: '/project/donateannex/add',
    method: 'post',
    data: data
  })
src/views/project/donationdetails/index.vue
@@ -4,7 +4,7 @@
      <div class="postfilx">
        <div class="title">工作进程</div>
        <div style="height: 666px;">
          <el-steps direction="vertical" :active="actives">
          <el-steps direction="vertical" :active="workflow">
            <el-step title="潜在捐献" icon="el-icon-user">
              <template
                slot="description"
@@ -2225,6 +2225,11 @@
<script>
import {
  addDonateannex,
  listDonateannex,
  Modifydonationattachment
} from "@/api/project/donateannex";
import {
  getDonatebaseinfo,
  addDonatebaseinfo,
  updateDonatebaseinfo,
@@ -2310,6 +2315,7 @@
      accomplishform: {},
      tableData: [],
      actives: 0, //进程
      workflow:0,
      loading: false,
      //   保存、终止按钮确认
      showSaveBtn: true,
@@ -2422,6 +2428,12 @@
      witnessrules: {},
      accomplishrules: {},
      //附件列表
      donatelist: [], //附件总组
      potentiallist: [], //潜在附件
      medicinelist: [], //医学附件
      affirmlist: [], //确认附件
      ethiclist: [], //伦理附件
      registerlist: [], //完成附件
      fileList: [],
      fileListto: [],
      invoicefileList: [],
@@ -2452,23 +2464,24 @@
  mounted() {
    // this.id = this.$route.query.id;
    this.Getbasicinformation();
    this.listDonateannex();
  },
  methods: {
    // 获取主表数据
    Getbasicinformation() {
      console.log(this.infoid);
      console.log(this.hintitle);
      // 左侧流程数据
      getDonatebaseinfoflow(this.infoid).then(res => {
        console.log(res.data);
        this.Processdata = res.data;
      });
      // 表单数据
      getDonatebaseinfo(this.infoid).then(response => {
        this.form = response.data;
        this.showTerminationBtn = response.data.terminationCase;
        this.actives = response.data.workflow;
        this.workflow=response.data.workflow;
        response.data.sex = parseInt(response.data.sex);
        this.form.id = response.data.id;
        this.form.diseasetype = this.form.diseasetype.split(",");
@@ -2578,6 +2591,40 @@
        });
      }
    },
    // 获取附件数据并分类二级列
    listDonateannex() {
      let parmi = {};
      parmi.infoid = this.infoid.toString();
      listDonateannex(parmi).then(res => {
        this.donatelist = res.rows;
      });
// 测试数据
      const arr = [
        { type: "type1", name: "saaada" },
        { type: "type2", name: "ssssda" },
        { type: "type3", name: "sdddda" },
        { type: "type4", name: "sdddda" },
        { type: "type5", name: "sdddda" }
      ];
      const groupedArr = arr.reduce((accumulator, currentValue) => {
        const key = currentValue.type;
        if (key == "type1") {
          this.potentiallist.push(currentValue);
        } else if (key == "type2") {
          this.medicinelist.push(currentValue);
        } else if (key == "type3") {
          this.affirmlist.push(currentValue);
        } else if (key == "type4") {
          this.ethiclist.push(currentValue);
        } else if (key == "type5") {
          this.registerlist.push(currentValue);
        }
        return accumulator;
      }, {});
      console.log(this.potentiallist);
      console.log(this.medicinelist);
    },
    /** 保存主表按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
@@ -2880,7 +2927,7 @@
    },
    // 返回上一页
    cancel() {},
    // ------------------------票据
    // ----------------------------------文件
    // 获取请求头
    Getnetworkheader() {
      let string = window.location.href;
@@ -3092,7 +3139,9 @@
        const item = this.invoicefileListto.splice(index, 1)[0]; // 移除指定索引处的元素,并保存到item变量中
        this.invoicefileListto.splice(index - 1, 0, item); // 将item插入到索引位置的前一位
      }
    }
    },
    // 保存
    saveattachment(stype) {}
  }
};
</script>
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 = "身份证号码格式错误";
      }
    }
  },