11
WXL
2024-03-14 1c08c6dcbe0f81bd8cff8a363e0d6f5c996474be
src/views/project/unitCost/particulars.vue
@@ -32,6 +32,7 @@
                v-model="form.createTime"
                value-format="yyyy-MM-dd HH:mm:ss"
                type="datetime"
                :disabled="true"
                placeholder="选择出生年月"
              >
              </el-date-picker>
@@ -157,6 +158,7 @@
              <template slot-scope="scope">
                <el-input
                  v-model="scope.row.organname"
                  :disabled="true"
                  placeholder="器官名称"
                />
              </template>
@@ -168,20 +170,33 @@
              prop="caseno"
            >
              <template slot-scope="scope">
                <el-input v-model="scope.row.caseno" placeholder="国家编号" />
                <el-input
                  v-model="scope.row.caseno"
                  :disabled="true"
                  placeholder="国家编号"
                />
              </template>
            </el-table-column>
            <el-table-column
              prop="hospitalname"
              prop="hospitalno"
              align="center"
              label="接收医院"
              width="280"
            >
              <template slot-scope="scope">
                <el-input
                <!-- <el-input
                  v-model="scope.row.hospitalname"
                  :disabled="true"
                  placeholder="接收医院"
                />
                /> -->
                <org-selecter
                        ref="tranHosSelect"
                        :org-type="'4'"
                  :disabled="true"
                        v-model="scope.row.hospitalno"
                        style="width: 100%"
                      />
              </template>
            </el-table-column>
            <el-table-column
@@ -191,7 +206,11 @@
              prop="name"
            >
              <template slot-scope="scope">
                <el-input v-model="scope.row.name" placeholder="受体姓氏" />
                <el-input
                  v-model="scope.row.name"
                  :disabled="true"
                  placeholder="受体姓氏"
                />
              </template>
            </el-table-column>
            <el-table-column
@@ -206,6 +225,7 @@
                  size="small"
                  style="width: 100%"
                  v-model="scope.row.receiveTime"
                  :disabled="true"
                  type="date"
                  value-format="yyyy-MM-dd HH:mm:ss"
                  placeholder="接收日期"
@@ -315,7 +335,7 @@
      </div>
      <!-- 添加患者 -->
      <el-dialog
        title="收费器官/组织选择"
        title="选择器官和组织"
        :visible.sync="dialogVisiblepatient"
        width="70%"
        :before-close="handleClosehz"
@@ -331,9 +351,6 @@
                :inline="true"
                label-width="98px"
              >
                <el-form-item label="患者名称:">
                  <el-input v-model="patientqueryParams.donorname"></el-input>
                </el-form-item>
                <el-form-item label="接收医院" prop="status">
                  <el-input
                    v-model="form.hospitalname"
@@ -341,7 +358,7 @@
                    :disabled="true"
                  />
                </el-form-item>
                <el-form-item label="捐献案例" prop="status">
                <el-form-item label="捐献者" prop="status">
                  <el-select
                    v-model="patientqueryParams.donorchargeid"
                    filterable
@@ -387,13 +404,14 @@
                    scope.row.donorname
                  }}</template>
                </el-table-column>
                <el-table-column prop="organno" label="器官编号" width="120">
                </el-table-column>
                <el-table-column
                  prop="organname"
                  label="器官名称"
                  show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column prop="organno" label="器官编号" width="120">
                </el-table-column>
                <el-table-column
                  prop="caseno"
@@ -402,14 +420,14 @@
                >
                </el-table-column>
                <el-table-column
                  prop="hospitalname"
                  label="器官接收医院"
                  show-overflow-tooltip
                >
                </el-table-column
                ><el-table-column
                  prop="name"
                  label="受体姓氏"
                  show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                  prop="hospitalname"
                  label="接收医院"
                  show-overflow-tooltip
                >
                </el-table-column>
@@ -834,9 +852,11 @@
      this.dialogVisiblepatient = true;
      this.patientqueryParams.hospitalno = this.form.hospitalno;
      this.patientqueryParams.paymentid = null;
      this.patientqueryParams.paymentidIsNotNull = false;
      listDonorchargeorgan(this.patientqueryParams).then(res => {
        this.donorchargeList = res.rows;
        this.patienttotal = res.total;
        this.patientqueryParams.paymentidIsNotNull = true;
        console.log(this.donorchargeList);
      });
    },
@@ -932,7 +952,7 @@
    /** 修改按钮操作 */
    handleUpdate() {
      this.reset();
      this.title = "收款申请单编辑";
      this.title = "收款结算申请单编辑";
      listDonorpayment({ id: this.curId }).then(response => {
        this.form = response.rows[0];
@@ -961,33 +981,11 @@
    },
    /** 提交保存按钮 */
    submitForm: debounce(function(data) {
    submitForm() {
      this.chargeSum();
      this.$refs["form"].validate(valid => {
        if (valid) {
          this.$modal.loading("正在提交,请稍候!");
          //校验、费用合计
          let ChargeSum = 0;
          let ChargeamountSum = 0;
          let organname = "";
          try {
            for (let i = 0; i < this.donorchargeorgans.length; i++) {
              organname += this.donorchargeorgans[i].organname + ",";
              if (!isNaN(parseFloat(this.donorchargeorgans[i].organcharge))) {
                ChargeSum += parseFloat(this.donorchargeorgans[i].organcharge);
              }
              if (!isNaN(parseFloat(this.donorchargeorgans[i].amount))) {
                ChargeamountSum += parseFloat(this.donorchargeorgans[i].amount);
              }
            }
            this.form.donateorgan = organname.substring(
              0,
              organname.lastIndexOf(",")
            );
            this.form.chargeamount = ChargeSum.toFixed(2);
            this.form.chargeamounted = ChargeamountSum.toFixed(2);
          } catch {}
          //保存
          if (this.form.id != null) {
@@ -1013,7 +1011,7 @@
          } else {
            addDonorpayment(this.form).then(response => {
              if (response.code == 200) {
                console.log("addDonorcharge", response);
                this.form.id = response.msg;
                //保存前校验数据
                for (let k = 0; k < this.donorchargeorgans.length; k++) {
                  this.donorchargeorgans[k].paymentid = response.msg;
@@ -1034,7 +1032,9 @@
          }
        }
      });
    }, 500),
    },
    //修改总实收后触发
    chargeSumall() {
      if (this.form.receivedamount == this.form.receivableamount) {
        this.donorchargeorgans.forEach(item => {
@@ -1044,7 +1044,7 @@
        this.$modal.msgError("注意实收金额不等于应收金额,请核对数据!");
      }
    },
    //修改总实收后触发
    //修改实收或应收后触发
    chargeSum() {
      let ChargeSum = 0;
      let ChargeamountSum = 0;
@@ -1096,7 +1096,8 @@
        "organtime",
        "remark",
        "name",
        "caseno"
        "caseno",
        "receiveTime"
      ];
      columns.forEach((column, index) => {
        if (index === 0) {