11
WXL
2023-11-05 24112d26079c0010f0baff217d9ddcd9dfb595b4
src/views/project/relativesconfirmation/index.vue
@@ -172,14 +172,7 @@
        fixed="right"
      >
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handletermination(scope.row)"
            v-hasPermi="['project:donatebaseinfo:edit']"
            >终止</el-button
          >
          <el-button
            size="mini"
            type="text"
@@ -1161,7 +1154,7 @@
    this.getTimeList();
    this.getList();
  },
  mounted() {
  mounted() {
    this.LoadReportList();
    // if(this.tempRecordState != undefined && this.tempRecordState != null){
@@ -1580,90 +1573,97 @@
    },
    /** 家属确认操作 */
    handleAdd(row) {
      console.log("ppppppp", row);
      this.showSaveBtn = false;
      this.flowname = "家属确认登记";
      this.annexno = "";
      //查询是否存在确认登记记录
      let searchparam = {
        infoid: row.id,
      };
      this.loading = true;
      this.curCase = {
        id: row.id,
        recordstate: null,
        donorno: row.donorno,
      };
      console.log("32323232323", searchparam);
      listRelativesconfirmation(searchparam).then((response) => {
        console.log("wdadwadawdawd", response);
        this.loading = false;
        if (response.code == 200) {
          if (response.rows.length == 0) {
            this.form.infoid = row.id;
            this.form.donorno = row.donorno;
            this.form.doname = row.name;
            this.form.dosex = row.sex;
            this.form.dobirthday = row.birthday;
            this.form.donationality = row.nationality;
            this.form.doeducation = row.education;
            this.form.dooccupation = row.occupation;
            this.form.donation = row.nation;
            this.form.doidcardtype = row.idcardtype;
            this.form.doidcardno = row.idcardno;
            this.form.donativeplace = row.nativeplace;
            this.open = true;
            this.title = "新增人体器官捐献亲属确认登记表";
            this.$nextTick(function () {
              this.$refs.confirmannex.getAnnexList();
            });
          } else if (response.rows.length == 1) {
            this.form = response.rows[0];
            console.log("2222222", this.form);
            console.log("编辑家属确认form", this.form);
            this.form.donorno = row.donorno;
            this.form.doname = row.name;
            this.form.dosex = row.sex;
            // 出生日期
            this.form.dobirthday = row.birthday;
            // 民族
            this.form.donationality = row.nationality;
            // 学历
            this.form.doeducation = row.education;
            // 职业
            this.form.dooccupation = row.occupation;
            this.form.donation = row.nation;
            this.form.doidcardtype = row.idcardtype;
            this.form.doidcardno = row.idcardno;
            this.form.donativeplace = row.nativeplace;
            // this.form.donativeplace =
            //   row.residenceProvinceName +
            //   row.residenceCityName +
            //   row.residenceTownName;
            this.defultAddresss.sheng = this.form.residenceprovincename;
            this.defultAddresss.shi = this.form.residencecityname;
            this.defultAddresss.qu = this.form.residencetownname;
            console.log("9999999", this.form.organdecision);
            if (this.form.kinship) {
              this.form.kinship = this.form.kinship.split(",");
            }
            if (this.form.organdecision) {
              this.form.organdecision = this.form.organdecision.split(",");
            }
            this.open = true;
            this.title = "修改人体器官捐献亲属确认登记表";
            this.$nextTick(function () {
              this.$refs.confirmannex.getAnnexList();
            });
          } else {
            this.$modal.msgError(
              "查询是否存在确认登记记录失败" +
                JSON.stringify(JSON.stringify(response))
            );
          }
      this.$router.push({
        path: "/organ/donationdetails/",
        query: {
          id: row.id,
          organType: "edit",
        }
      });
      this.reset();
      // console.log("ppppppp", row);
      // this.showSaveBtn = false;
      // this.flowname = "家属确认登记";
      // this.annexno = "";
      // //查询是否存在确认登记记录
      // let searchparam = {
      //   infoid: row.id,
      // };
      // this.loading = true;
      // this.curCase = {
      //   id: row.id,
      //   recordstate: null,
      //   donorno: row.donorno,
      // };
      // console.log("32323232323", searchparam);
      // listRelativesconfirmation(searchparam).then((response) => {
      //   console.log("wdadwadawdawd", response);
      //   this.loading = false;
      //   if (response.code == 200) {
      //     if (response.rows.length == 0) {
      //       this.form.infoid = row.id;
      //       this.form.donorno = row.donorno;
      //       this.form.doname = row.name;
      //       this.form.dosex = row.sex;
      //       this.form.dobirthday = row.birthday;
      //       this.form.donationality = row.nationality;
      //       this.form.doeducation = row.education;
      //       this.form.dooccupation = row.occupation;
      //       this.form.donation = row.nation;
      //       this.form.doidcardtype = row.idcardtype;
      //       this.form.doidcardno = row.idcardno;
      //       this.form.donativeplace = row.nativeplace;
      //       this.open = true;
      //       this.title = "新增人体器官捐献亲属确认登记表";
      //       this.$nextTick(function () {
      //         this.$refs.confirmannex.getAnnexList();
      //       });
      //     } else if (response.rows.length == 1) {
      //       this.form = response.rows[0];
      //       console.log("2222222", this.form);
      //       console.log("编辑家属确认form", this.form);
      //       this.form.donorno = row.donorno;
      //       this.form.doname = row.name;
      //       this.form.dosex = row.sex;
      //       // 出生日期
      //       this.form.dobirthday = row.birthday;
      //       // 民族
      //       this.form.donationality = row.nationality;
      //       // 学历
      //       this.form.doeducation = row.education;
      //       // 职业
      //       this.form.dooccupation = row.occupation;
      //       this.form.donation = row.nation;
      //       this.form.doidcardtype = row.idcardtype;
      //       this.form.doidcardno = row.idcardno;
      //       this.form.donativeplace = row.nativeplace;
      //       // this.form.donativeplace =
      //       //   row.residenceProvinceName +
      //       //   row.residenceCityName +
      //       //   row.residenceTownName;
      //       this.defultAddresss.sheng = this.form.residenceprovincename;
      //       this.defultAddresss.shi = this.form.residencecityname;
      //       this.defultAddresss.qu = this.form.residencetownname;
      //       console.log("9999999", this.form.organdecision);
      //       if (this.form.kinship) {
      //         this.form.kinship = this.form.kinship.split(",");
      //       }
      //       if (this.form.organdecision) {
      //         this.form.organdecision = this.form.organdecision.split(",");
      //       }
      //       this.open = true;
      //       this.title = "修改人体器官捐献亲属确认登记表";
      //       this.$nextTick(function () {
      //         this.$refs.confirmannex.getAnnexList();
      //       });
      //     } else {
      //       this.$modal.msgError(
      //         "查询是否存在确认登记记录失败" +
      //           JSON.stringify(JSON.stringify(response))
      //       );
      //     }
      //   }
      // });
      // this.reset();
    },
    /** 提交按钮 */
    submitForm() {