WXL
2 天以前 c8e9849cb5f24848df0174c13bfbbff37bb08a5a
src/views/project/donatefinish/index.vue
@@ -50,13 +50,13 @@
        <el-col :span="6">
          <el-form-item label="捐献进度" prop="recordstate">
            <el-select
              v-model="queryParams.recordstate"
              v-model="queryParams.workflow"
              placeholder="请选择记录状态"
              clearable
              size="small"
            >
              <el-option
                v-for="dict in dict.type.sys_DonationStatus"
                v-for="dict in dict.type.sys_caseNode"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
@@ -126,7 +126,7 @@
          </el-form-item>
        </el-col>
      </el-row> -->
    </el-form>
@@ -155,7 +155,21 @@
          />
        </template>
      </el-table-column>
      <el-table-column label="年龄" align="center" prop="age" width="100" />
      <el-table-column label="年龄" align="center" prop="age" width="100">
        <template slot-scope="scope">
          {{
            `${
              scope.row.age && scope.row.age !== 0
                ? `${scope.row.age}${scope.row.ageunit}`
                : ""
            } ${
              scope.row.age2 && scope.row.age2 !== 0
                ? `${scope.row.age2}${scope.row.ageunit2}`
                : ""
            }`.trim()
          }}
        </template>
      </el-table-column>
      <el-table-column
        label="医疗机构"
        align="center"
@@ -179,12 +193,20 @@
        width="100"
      />
      <el-table-column label="捐献进度" align="center" prop="recordstate">
      <el-table-column
        label="捐献进度"
        align="center"
        prop="workflow"
        width="120"
      >
        <template slot-scope="scope">
          <dict-tag
            :options="dict.type.sys_DonationStatus"
            :value="scope.row.recordstate"
          />
          <div v-if="!scope.row.terminationCase">
            <dict-tag
              :options="dict.type.sys_caseNode"
              :value="scope.row.workflow"
            />
          </div>
          <div v-else>任务终止</div>
        </template>
      </el-table-column>
@@ -200,7 +222,7 @@
            size="mini"
            type="text"
            icon="el-icon-refrigerator"
            @click="updatedonorno(scope.row)"
            @click="updatecaseNo(scope.row)"
            >更新编号</el-button
          > -->
          <el-button
@@ -262,10 +284,10 @@
      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
        <el-row>
          <el-col :span="8">
            <el-form-item label="捐献编号" prop="donorno">
            <el-form-item label="捐献编号" prop="caseNo">
              <el-input
                disabled
                v-model="curCase.donorno"
                v-model="curCase.caseNo"
                placeholder="请输入捐献者编号"
              />
            </el-form-item>
@@ -481,7 +503,7 @@
            <annex-upload
              ref="finishannex"
              :infoid="curCase.id"
              :donorno="curCase.donorno"
              :caseNo="curCase.caseNo"
              :flowname="flowname"
              :annexno="annexno"
            />
@@ -528,6 +550,8 @@
import Li_area_select from "@/components/Address";
import OrgSelecter from "@/views/project/components/orgselect";
import AnnexUpload from "@/views/project/components/annexupload";
import { getToken } from "@/utils/auth";
import {
  listDonateorgan,
  addDonateorgan,
@@ -559,7 +583,7 @@
    "sys_Infectious",
    "sys_InfoSources",
    "sys_OtherCases",
    "sys_DonationStatus",
    "sys_caseNode",
    "sys_DiseaseType",
    "sys_SelfWill",
    "sys_FamilyRelation",
@@ -640,6 +664,9 @@
      open: false,
      // 获取组织名称时间范围
      daterangeReporttime: [],
      headers: {
        Authorization: "Bearer " + getToken()
      },
      // 查询参数
      queryParams: {
        pageNum: 1,
@@ -652,7 +679,7 @@
        recordstate: null,
        treatmenthospitalname: null,
        treatmenthospitalno: null,
        donorno: null,
        caseNo: null,
        reportername: null,
        reporttime: null,
        city: null
@@ -675,7 +702,7 @@
        ]
      },
      curCase: {
        donorno: "",
        caseNo: "",
        name: "",
        registerAddresss: "",
        infoid: ""
@@ -692,24 +719,23 @@
    };
  },
  created() {
    // this.getDicts('country').then(res=>{
    //   this.nationality =res.data
    // })
    if (sessionStorage.getItem("donatefinish")) {
      this.queryParams = JSON.parse(sessionStorage.getItem("donatefinish"));
      console.log(this.queryParams, "queryParams");
    }
  },
  activated() {
    this.selecttime = "";
    this.reportervalue = "";
    this.reportlist = [];
    this.queryParams.donorno = "";
    this.queryParams.caseNo = "";
    this.queryParams.recordstate = "";
    this.queryParams.name = "";
    this.queryParams.treatmenthospitalno = "";
    if (this.$route.params.starttime != null && this.$route.params.endtime) {
      this.selecttime = [
        this.$moment(this.$route.params.starttime).format("YYYY-MM-DD"),
        this.$moment(this.$route.params.endtime)
          .add(-1, "month")
          .format("YYYY-MM-DD")
        this.$moment(this.$route.params.endtime).format("YYYY-MM-DD")
      ];
    }
    if (this.$route.params.reporterno != "") {
@@ -830,7 +856,7 @@
      console.log(this.starttime);
      console.log(this.endtime);
    },
    updatedonorno(row) {
    updatecaseNo(row) {
      console.log("row", row);
      updatedonatorno(row.infoid).then(res => {
        console.log("1221212", res);
@@ -945,6 +971,8 @@
    getList() {
      this.loading = true;
      this.queryParams.params = {};
      sessionStorage.removeItem("donatefinish");
      sessionStorage.setItem("donatefinish", JSON.stringify(this.queryParams));
      if (null != this.daterangeReporttime && "" != this.daterangeReporttime) {
        this.queryParams.params[
          "beginReporttime"
@@ -983,7 +1011,7 @@
      this.form = {
        id: null,
        infoid: null,
        donorno: null,
        caseNo: null,
        delFlag: null,
        createBy: null,
        createTime: null,
@@ -1021,7 +1049,7 @@
        // "2"
        recordstate: null,
        treatmenthospitalname: null,
        donorno: null,
        caseNo: null,
        acquisitiontissueno: null,
        reportername: null,
        reporttime: null,
@@ -1064,7 +1092,7 @@
      // this.curCase = {
      //   id: row.id,
      //   recordstate: null,
      //   donorno: row.donorno,
      //   caseNo: row.caseNo,
      // };
      // this.form.coordinateduserido = row.coordinateduserido;
      // this.form.coordinateduseridt = row.coordinateduseridt;
@@ -1123,7 +1151,7 @@
      this.loading = true;
      this.reset();
      this.curCase.registerAddresss = row.registeraddresss;
      this.curCase.donorno = row.donorno;
      this.curCase.caseNo = row.caseNo;
      this.curCase.name = row.name;
      this.curCase.infoid = row.infoid;
      this.open = true;
@@ -1138,7 +1166,7 @@
      let oraganqueryParam = {
        infoid: row.id
        // donorname: this.curCase.name,
        // donorno: this.curCase.donorno,
        // caseNo: this.curCase.caseNo,
        // registeraddress: this.curCase.registeraddresss,
      };
      listDonateorgan(oraganqueryParam).then(response => {
@@ -1174,7 +1202,7 @@
      this.loading = true;
      this.$refs["form"].validate(valid => {
        if (valid) {
          this.form.donorno = this.curCase.donorno;
          this.form.caseNo = this.curCase.caseNo;
          this.form.infoid = this.curCase.id;
          this.form.donateorgan = JSON.stringify(this.form.donateorganList);
          // let forms = delete this.form.donateorganList;