11
WXL
2024-03-14 1c08c6dcbe0f81bd8cff8a363e0d6f5c996474be
src/views/project/donorcharge/donorchargedetail/index.vue
@@ -147,8 +147,8 @@
              <template slot-scope="scope">
                <el-input
                  v-model="scope.row.caseno"
                  :disabled="true"
                  placeholder="系统编号"
                  :disabled="true"
                />
              </template>
            </el-table-column>
@@ -161,8 +161,8 @@
              <template slot-scope="scope">
                <el-input
                  v-model="scope.row.amount"
                  :disabled="true"
                  placeholder="实收金额"
                  :disabled="true"
                />
              </template>
            </el-table-column>
@@ -195,24 +195,24 @@
              <template slot-scope="scope">
                <el-input
                  v-model="scope.row.organcharge"
                  :disabled="true"
                  placeholder="标准费用"
                  :disabled="true"
                />
              </template>
            </el-table-column>
            <el-table-column
              prop="hospitalname"
              prop="hospitalno"
              align="center"
              label="接收医院"
              width="280"
            >
              <template slot-scope="scope">
                <org-selecter
                  :disabled="true"
                  v-model="scope.row.hospitalno"
                  ref="tranHosSelect"
                  :org-type="'4'"
                  v-model="scope.row.hospitalno"
                  style="width: 100%"
                  :disabled="true"
                />
              </template>
            </el-table-column>
@@ -309,7 +309,6 @@
    return {
      activeName: 1, //文件类型
      // 部门树选项
      //票据文件
      pdftitle: "",
      pdfimg: "",
@@ -352,8 +351,6 @@
      donorchargeorgans: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询费用表参数
      queryParams: {
        pageNum: 1,
@@ -370,7 +367,6 @@
        pageSize: 10,
        donorchargeid: null
      },
      // 当前用户信息
      userprofile: {},
      // 表单参数
@@ -388,7 +384,7 @@
          { required: true, message: "请输入所属业务组", trigger: "blur" }
        ]
      },
      gxinzt: false,
      baselist: [],
      donorList: [],
      organchargelist: [],
@@ -419,7 +415,6 @@
      headers: {
        Authorization: "Bearer " + getToken()
      },
      jurisdiction: false,
      //保存按钮控制
@@ -437,7 +432,6 @@
      this.defaultperson = response.data;
      this.standardlevel = response.data.standardlevel;
    });
    //获取参数
    this.getroute();
  },
@@ -531,8 +525,6 @@
      this.operationType = this.$route.query.operation;
      this.curId = this.$route.query.id;
      this.curCase = this.$route.query.data;
      this.gxinzt = this.$route.query.gxinzt;
      console.log(this.curCase);
      console.log("this.$route.query", this.$route.query);
      if (this.operationType == "add") {
@@ -572,7 +564,6 @@
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "新增捐献案例器官费用表";
      if (this.curCase) {
@@ -585,13 +576,46 @@
        this.form.age = this.curCase.age;
        this.form.donationcategory = this.curCase.donationcategory;
        this.organParams.infoid = this.curCase.id;
        listDonorchargeorgan(this.organParams).then(res => {
          console.log("listDonorchargeorgan", res);
          this.donorchargeorgans = res.rows;
          if (this.donorchargeorgans.length > 0) {
          } else {
            this.addRow(0);
        //获取完成登记的器官表
        if (this.curCase.id > 0) {
        } else {
          this.curCase.id = 0;
        }
        let searchParam = {
          infoid: this.curCase.id
        };
        listDonatecomporgan(searchParam).then(res => {
          if (res.code == 200) {
            // 查询器官费用表
            let tempParam = {
              organcode: null,
              organname: null,
              charge: null
            };
            listOrgancharge(tempParam).then(res1 => {
              if (res1.code == 200) {
                this.organchargelist = res1.rows;
              }
              //插入器官表
              res.rows.forEach(item => {
                //获取费用金额
                this.organchargelist.map(rescharge => {
                  if (rescharge.organcode == item.organno) {
                    this.donorchargeorgans.push({
                      organno: item.organno,
                      caseno: item.caseno,
                      organname: item.organname,
                      organcharge: rescharge.charge,
                      infoid: item.infoid,
                      hospitalname: item.hospitalname,
                      hospitalno: item.hospitalno,
                      organtime: item.transplanttime,
                      chargestate: "0"
                    });
                  }
                });
              });
            });
          }
        });
      }
@@ -600,14 +624,13 @@
    /** 修改按钮操作 */
    handleUpdate() {
      this.reset();
      this.open = true;
      this.title = "修改捐献案例器官费用表";
      getDonorcharge(this.curId).then(response => {
        this.form = response.data;
        console.log("getDonorcharge", response);
        //器官费用信息
        this.organParams.infoid = this.form.infoid;
        this.organParams.donorchargeid = this.curId;
        console.log("this.organParams", this.organParams);
        listDonorchargeorgan(this.organParams).then(res => {
          console.log("listDonorchargeorgan", res);
@@ -617,9 +640,6 @@
          } else {
            this.addRow(0);
          }
          if ((this.gxinzt = true)) {
            this.submitForm();
          }
        });
      });
    },
@@ -627,15 +647,13 @@
    /** 修改查看操作 */
    handleDetail() {
      this.reset();
      this.open = true;
      getDonorcharge(this.curId).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "查看捐献案例器官费用表";
        //器官费用信息
        this.organParams.infoid = this.form.infoid;
        this.organParams.donorchargeid = this.curId;
        listDonorchargeorgan(this.organParams).then(res => {
          this.donorchargeorgans = res.rows;
          if (this.donorchargeorgans.length > 0) {
@@ -678,13 +696,13 @@
            for (let k = 0; k < this.donorchargeorgans.length; k++) {
              this.donorchargeorgans[k].donorchargeID = this.form.id;
            }
            updateDonorcharge(this.form).then(res1 => {
              if (res1.code == 200) {
                saveDonorchargeorgan(this.donorchargeorgans).then(res2 => {
                  if (res2.code == 200) {
                    this.$modal.msgSuccess("保存成功!");
                    this.open = false;
        this.$router.go(-1);
                  }
                });
              }
@@ -700,7 +718,8 @@
                saveDonorchargeorgan(this.donorchargeorgans).then(res2 => {
                  if (res2.code == 200) {
                    this.$modal.msgSuccess("保存成功!");
                    this.open = false;
        this.$router.go(-1);
                  }
                });
              }