yxh
8 天以前 fb16e99d60035949b870d0bed7f38b452458000a
src/views/project/tallage/computingBill/index.vue
@@ -43,7 +43,7 @@
              <el-date-picker
                v-model="form.taxedtime"
                value-format="yyyy-MM-dd HH:mm:ss"
                type="datetime"
                type="datetime" format="yyyy-MM-dd HH:mm"
                :disabled="true"
                placeholder="选择时间"
              >
@@ -306,19 +306,29 @@
              >
                <el-form-item label="捐献案例" prop="status">
                  <el-select
                    v-model="patientqueryParams.donorno"
                    v-model="patientqueryParams.donorname"
                    filterable
                    allow-create
                    default-first-option
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="item in donorchargeanlList"
                      :key="item.id"
                      :label="item.name"
                      :value="item.id"
                      :value="item.name"
                    >
                    </el-option>
                  </el-select> </el-form-item
                ><el-form-item label="算税状态" prop="status">
                  </el-select>
                </el-form-item>
                <el-form-item label="申请人" prop="name">
                  <el-input
                    v-model="patientqueryParams.pausername"
                    placeholder="请输入申请人姓名"
                    @keyup.enter.native="handleAddpatient"
                  />
                </el-form-item>
                <!-- <el-form-item label="算税状态" prop="status">
                  <el-select
                    v-model="patientqueryParams.istax"
                    filterable
@@ -332,7 +342,7 @@
                    >
                    </el-option>
                  </el-select>
                </el-form-item>
                </el-form-item> -->
                <el-form-item>
                  <el-button
@@ -560,6 +570,7 @@
import Li_area_select from "@/components/Address";
import { getUserProfile } from "@/api/system/user";
import { getToken } from "@/utils/auth";
import { moneySum, moneyRound } from "@/utils/money";
import {
  ExpertfeeListnb,
  getFundtax,
@@ -581,8 +592,8 @@
  data() {
    return {
      swgatheringlist: [
        { label: "未算税", value: 0 },
        { label: "已算税", value: 1 }
        { label: "已算税", value: 1 },
        { label: "未算税", value: 0 }
      ],
      gatheringlist: [
        { label: "未付款", value: "0" },
@@ -594,9 +605,9 @@
      overallCase: [],
      patientqueryParams: {
        paApplyType: 1,
        pacheckno: "047",
        checkstatus: 0,
        istax: 0,
        // pacheckno: "047",
        // checkstatus: 0,
        pfundtaxid: 0,
        pageNum: 1,
        pageSize: 10
      },
@@ -783,18 +794,24 @@
    },
    handleQuery() {},
    resetQuery() {
      this.patientqueryParams.donorno = null;
      this.patientqueryParams.donorchargeid = null;
      this.patientqueryParams.pausername = null;
      this.patientqueryParams.donorname = null;
      this.handleAddpatient();
    },
    handleUploadError() {},
    // 弹框添加
    AddDispatchpatients() {
      this.donorchargeorgans = this.donorchargeorgans.concat(this.overallCase);
      console.log(this.donorchargeorgans, "donorchargeorgans");
      this.donorchargeorgans.forEach(item => {
        CalculationDetail({ id: item.id, fundTaxId: this.form.id });
      let newArr = this.donorchargeorgans.concat(this.overallCase);
      this.donorchargeorgans = newArr.filter((item, index, self) => {
        return !self.slice(index + 1).some(other => other.id === item.id);
      });
      console.log(this.donorchargeorgans, "donorchargeorgans");
      if (this.form.id) {
        this.donorchargeorgans.forEach(item => {
          CalculationDetail({ id: item.id, fundTaxId: this.form.id });
        });
      }
      this.donorchargeorgans.forEach(item => {
        item.taXmoney = item.pretaxcost - item.taxedcost;
        item.taXmoney = item.taXmoney.toFixed(2);
@@ -862,7 +879,6 @@
      if (this.multipleSelection.length <= selection.length) {
        this.multipleSelection = selection;
      } else {
        console.log(11);
        this.multipleSelection.forEach(item => {
          if (selection.includes(item)) {
          } else {
@@ -970,11 +986,11 @@
      });
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // /** 重置按钮操作 */
    // resetQuery() {
    //   this.resetForm("queryForm");
    //   this.handleQuery();
    // },
    // 取消按钮
    cancel() {
@@ -987,7 +1003,7 @@
      this.title = "新增专家费汇总单";
      //获取登录者信息
      getUserProfile().then(res => {
        this.form.username = res.createBy;
        this.form.username = res.data.createBy;
      });
    },
@@ -1095,23 +1111,16 @@
        this.$modal.msgError("注意实收金额不等于应收金额,请核对数据!");
      }
    },
    //修改实收或应收后触发
    //修改实收或应收后触发(金额一律走精确运算)
    chargeSum() {
      let ChargeSum = 0;
      let ChargeamountSum = 0;
      //费用合计
      try {
        for (let i = 0; i < this.donorchargeorgans.length; i++) {
          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.receivableamount = ChargeSum.toFixed(2);
        this.form.receivedamount = ChargeamountSum.toFixed(2);
        this.form.receivableamount = moneyRound(
          moneySum(this.donorchargeorgans, "organcharge")
        ).toFixed(2);
        this.form.receivedamount = moneyRound(
          moneySum(this.donorchargeorgans, "amount")
        ).toFixed(2);
      } catch {}
    },