From 8022f7036945b75f82f2dfc43055623f81ed98f6 Mon Sep 17 00:00:00 2001 From: yxh <172933527@qq.com> Date: 星期五, 23 五月 2025 22:42:56 +0800 Subject: [PATCH] yxh --- src/views/project/tallage/computingBill/index.vue | 569 +++++++++++++++++++++++++++++++++++--------------------- 1 files changed, 353 insertions(+), 216 deletions(-) diff --git a/src/views/project/tallage/computingBill/index.vue b/src/views/project/tallage/computingBill/index.vue index 0427c66..50bcbba 100644 --- a/src/views/project/tallage/computingBill/index.vue +++ b/src/views/project/tallage/computingBill/index.vue @@ -8,8 +8,8 @@ <el-form-item label="鐢宠鏃ユ湡" prop="createTime"> <el-date-picker v-model="form.createTime" - value-format="yyyy-MM-dd HH:mm:ss" - type="datetime" + value-format="yyyy-MM-dd " + type="date" :disabled="true" placeholder="閫夋嫨鍑虹敓骞存湀" > @@ -29,7 +29,7 @@ <el-form-item label="绠楃◣鐘舵��" prop="sex"> <el-select v-model="form.istax" placeholder="璇烽�夋嫨鐘舵��"> <el-option - v-for="dict in gatheringlist" + v-for="dict in swgatheringlist" :key="dict.label" :label="dict.label" :value="dict.value" @@ -55,6 +55,7 @@ ><el-form-item label="绋庡墠閲戦" prop="donateno"> <el-input v-model="form.pretaxamount" + :disabled="true" placeholder="璇疯緭鍏ョ◣鍓嶉噾棰�" /> </el-form-item> @@ -63,6 +64,7 @@ ><el-form-item label="鎵g◣閲戦" prop="donateno"> <el-input v-model="form.taxMoney" + :disabled="true" placeholder="璇疯緭鍏ユ墸绋庨噾棰�" /> </el-form-item> @@ -72,6 +74,7 @@ <el-form-item label="绋庡悗閲戦" prop="donationcategory"> <el-input v-model="form.taxedamount" + :disabled="true" placeholder="璇疯緭鍏ユ敹娆捐鍙�" /> </el-form-item> @@ -112,15 +115,23 @@ show-summary > <el-table-column - prop="organno" + prop="index" + align="center" + fixed + label="搴忓彿" + width="120" + > + </el-table-column> + <el-table-column + prop="donorname" align="center" fixed label="妗堜緥鎹愮尞鑰�" - width="90" + width="120" > <template slot-scope="scope"> <el-input - v-model="scope.row.organno" + v-model="scope.row.donorname" placeholder="妗堜緥鎹愮尞鑰�" :disabled="true" /> @@ -131,39 +142,32 @@ label="鐢宠浜�" align="center" width="120" - prop="caseno" + prop="username" > <template slot-scope="scope"> <el-input - v-model="scope.row.caseno" + v-model="scope.row.username" :disabled="true" placeholder="鐢宠浜�" /> </template> </el-table-column> <el-table-column - prop="hospitalno" + prop="deptmentname" align="center" label="鎵�灞炵粍鍒�" width="280" > <template slot-scope="scope"> - <!-- <el-input - v-model="scope.row.hospitalname" - :disabled="true" - placeholder="鎺ユ敹鍖婚櫌" - /> --> - <org-selecter - ref="tranHosSelect" - :org-type="'4'" + <el-input + v-model="scope.row.deptmentname" :disabled="true" - v-model="scope.row.hospitalno" - style="width: 100%" + placeholder="鎺ユ敹鍖婚櫌" /> </template> </el-table-column> <el-table-column - prop="receiveTime" + prop="applyTime" align="center" label="鐢宠鏃ユ湡" width="200" @@ -173,61 +177,46 @@ clearable size="small" style="width: 100%" - v-model="scope.row.receiveTime" + v-model="scope.row.applyTime" :disabled="true" type="date" - value-format="yyyy-MM-dd HH:mm:ss" placeholder="鐢宠鏃ユ湡" + value-format="yyyy-MM-dd" > </el-date-picker> </template> </el-table-column> - <el-table-column - prop="organname" - fixed - align="center" - label="绋庡墠閲戦" - width="120" - > + <el-table-column prop="pretaxcost" align="center" label="绋庡墠閲戦"> <template slot-scope="scope"> <el-input - v-model="scope.row.organname" + v-model="scope.row.pretaxcost" :disabled="true" placeholder="绋庡墠閲戦" /> </template> </el-table-column> - <el-table-column - label="鎵g◣閲戦" - align="center" - width="120" - prop="name" - > + <el-table-column label="鎵g◣閲戦" align="center" prop="taXmoney"> <template slot-scope="scope"> <el-input - v-model="scope.row.name" + v-model="scope.row.taXmoney" :disabled="true" placeholder="鎵g◣閲戦" /> </template> </el-table-column> - <el-table-column - prop="organcharge" - align="center" - label="绋庡悗閲戦" - width="150" - > + <el-table-column prop="taxedcost" align="center" label="绋庡悗閲戦"> <template slot-scope="scope"> <el-input @blur="chargeSum" - v-model="scope.row.organcharge" + :disabled="true" + v-model="scope.row.taxedcost" placeholder="绋庡悗閲戦" /> </template> </el-table-column> <el-table-column - prop="organchargedesc" + prop="remark" width="280" align="center" label="澶囨敞" @@ -236,17 +225,13 @@ <el-input type="textarea" :rows="1" - v-model="scope.row.organchargedesc" + :disabled="true" + v-model="scope.row.remark" placeholder="澶囨敞" /> </template> </el-table-column> - <el-table-column - label="鎿嶄綔" - fixed="right" - width="260" - align="center" - > + <el-table-column label="鎿嶄綔" fixed="right" align="center"> <template slot-scope="scope"> <el-button type="text" @@ -275,6 +260,12 @@ v-if="operationType == 'add' || operationType == 'update'" >淇� 瀛�</el-button > + <el-button + @click="calculateFn" + v-if="operationType == 'add' || operationType == 'update'" + >绠楃◣</el-button + > + <el-button type="info" @click="cancel">鍏抽棴</el-button> </div> <!-- 娣诲姞鎮h�� --> @@ -285,6 +276,24 @@ :before-close="handleClosehz" > <div class="examine-jic"> + <div style="margin: 0 10px 20px 10px;"> + <el-card class="box-card"> + <el-tag + v-for="item in overallCase" + :key="item.id" + closable + @close="handleClose(item)" + > + {{ item.donorname }} + </el-tag> + <div style="margin-top: 20px; text-align: right;"> + 鍏遍�夋嫨<span + style="font-size: 18px; color: #409EFF;margin: 0 10px;" + >{{ overallCase.length }}</span + >鏉℃暟鎹� + </div> + </el-card> + </div> <div class="jic-value"> <el-row :gutter="20"> <!--鐢ㄦ埛鏁版嵁--> @@ -297,19 +306,43 @@ > <el-form-item label="鎹愮尞妗堜緥" prop="status"> <el-select - v-model="patientqueryParams.donorchargeid" + 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="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 + placeholder="璇烽�夋嫨" + > + <el-option + v-for="item in istaxlist" + :key="item.value" + :label="item.label" + :value="item.value" + > + </el-option> + </el-select> + </el-form-item> --> <el-form-item> <el-button @@ -343,39 +376,39 @@ </el-table-column> <el-table-column - prop="organname" + prop="deptmentname" label="鎵�灞炵粍鍒�" show-overflow-tooltip > </el-table-column> - <el-table-column prop="organno" label="鐢宠浜�" width="120"> + <el-table-column prop="username" label="鐢宠浜�" width="120"> </el-table-column> <el-table-column - prop="caseno" + prop="applyTime" label="鐢宠鏃ユ湡" show-overflow-tooltip > </el-table-column> <el-table-column - prop="name" + prop="pretaxcost" label="绋庡墠閲戦" show-overflow-tooltip > </el-table-column> <el-table-column - prop="hospitalname" + prop="taXmoney" label="鎵g◣閲戦" show-overflow-tooltip > </el-table-column> <el-table-column - prop="receiveTime" + prop="taxedcost" label="绋庡悗閲戦" show-overflow-tooltip > </el-table-column> <el-table-column - prop="address" + prop="remark" label="澶囨敞" show-overflow-tooltip > @@ -538,10 +571,12 @@ import { getUserProfile } from "@/api/system/user"; import { getToken } from "@/utils/auth"; import { - addFundTax, - getExpertfeeList, + ExpertfeeListnb, getFundtax, getMaxFundTaxId, + updateFundtax, + addFundtax, + CalculationDetail, listbxiaostatistics } from "@/api/project/tallage"; export default { @@ -551,43 +586,29 @@ Li_area_select, pdf }, - dicts: ["sys_gathering", "sys_0_1"], + dicts: ["Collection_status", "sys_0_1"], name: "Donorchargemanager", data() { return { - activeName: 1, //鏂囦欢绫诲瀷 - tableData: [ - { - date: "2016-05-03", - name: "鐜嬪皬铏�", - address: "涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1518 寮�" - }, - { - date: "2016-05-02", - name: "鐜嬪皬铏�", - address: "涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1518 寮�" - }, - { - date: "2016-05-04", - name: "鐜嬪皬铏�", - address: "涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1518 寮�" - }, - { - date: "2016-05-01", - name: "鐜嬪皬铏�", - address: "涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1518 寮�" - } + swgatheringlist: [ + { label: "宸茬畻绋�", value: 1 }, + { label: "鏈畻绋�", value: 0 } ], gatheringlist: [ - { label: "鏈畻绋�", value: "0" }, - { label: "宸茬畻绋�", value: "1" } + { label: "鏈粯娆�", value: "0" }, + { label: "宸蹭粯娆�", value: "1" } ], + // 褰撳墠椤甸�変腑鏁版嵁 multipleSelection: [], + // 鎬婚�変腑鏁版嵁 + overallCase: [], patientqueryParams: { + paApplyType: 1, + // pacheckno: "047", + // checkstatus: 0, + pfundtaxid: 0, pageNum: 1, - pageSize: 10, - hospitalno: null, - paymentid: null + pageSize: 10 }, dialogVisiblepatient: false, patienttotal: 0, // @@ -595,10 +616,7 @@ pdftitle: "", pdfimg: "", pdfVisible: false, - costtypeobj: { - value: 0, - label: "" - }, + maxTaxId: "", pdfimgsrcList: [], Savereminder: false, //鎻愰啋淇濆瓨寮规 Reminderquantity: 0, //鎻愰啋鏁伴噺 @@ -650,13 +668,19 @@ organParams: { pageNum: 1, pageSize: 10, - paymentid: null + paymentid: null, + istax: 0 }, // 褰撳墠鐢ㄦ埛淇℃伅 userprofile: {}, + decision: false, // 琛ㄥ崟鍙傛暟 - form: {}, + form: { + istax: 0, + isdistribute: "0" + }, + MaxFundTaxId: null, // 鏈�澶d // 鍒楄〃鍙傛暟 table: {}, reimbursementList: [], @@ -687,6 +711,10 @@ baselist: [], donorList: [], + istaxlist: [ + { value: 0, label: "鏈畻绋�" }, + { value: 2, label: "寰呯畻绋�" } + ], organchargelist: [], standardlevel: 0, defaultperson: {}, @@ -695,7 +723,6 @@ // 褰撳墠鍗曟嵁ID curId: 0, - curCase: null, //涓氬姟鎿嶄綔绫诲瀷 operationType: "edit", @@ -722,14 +749,7 @@ created() { console.log(234); - this.Getnetworkheader(); - - //鑾峰彇鐧诲綍鑰呬俊鎭� - getUserProfile().then(response => { - this.userprofile = response.data; - this.defaultperson = response.data; - this.standardlevel = response.data.standardlevel; - }); + this.GetMaxTaxid(); //鑾峰彇鍙傛暟 this.getroute(); @@ -773,69 +793,171 @@ }, handleQuery() {}, resetQuery() { + this.patientqueryParams.pausername = null; this.patientqueryParams.donorname = null; - this.patientqueryParams.donorchargeid = null; this.handleAddpatient(); }, handleUploadError() {}, // 寮规娣诲姞 AddDispatchpatients() { - this.donorchargeorgans = this.donorchargeorgans.concat( - this.multipleSelection - ); + 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); + this.accumulation(); + }); + if (this.form.id) { + this.form.istax = 0; + this.form.taxedtime = ""; + this.$modal.confirm("娣诲姞鎴愬姛锛�,闇�瑕侀噸鏂颁繚瀛樺苟璁$畻鍗曟嵁锛�").then(() => { + this.submitForm(); + }); + } else { + this.$modal.msgSuccess("娣诲姞鎴愬姛锛�"); + } + this.dialogVisiblepatient = false; }, + // 璁$畻涓◣ + calculateFn() { + if (this.form.id >= this.MaxFundTaxId) { + this.$modal.loading("姝e湪鎻愪氦锛岃绋嶅�欙紒"); + this.$modal + .confirm("鍗冲皢杩涜绠楃◣鏄惁宸蹭繚瀛樺叏閮ㄦ暟鎹�?") + .then(res => { + listbxiaostatistics({ + fundTaxId: Number(this.form.id), + addOrupdate: 1 + }).then(res1 => { + if (res1.code == 200) { + this.$modal.msgSuccess("璁$畻鎴愬姛"); + this.$modal.closeLoading(); + this.form.istax = 1; + this.form.taxedtime = this.$moment().format( + "YYYY-MM-DD HH:mm:ss" + ); + this.submitForm(); + } else { + this.$modal.closeLoading(); + this.$modal.msgError(res1.msg); + } + }); + }) + + .catch(() => {}); + } else { + this.$modal.msgError("褰撳墠鍗曟嵁涓嶄负鏈�鏂扮敵璇峰崟"); + } + }, + // 閲戦鍚堣 + accumulation() { + this.form.pretaxamount = this.donorchargeorgans + .reduce((acc, obj) => acc + Number(obj.pretaxcost), 0) + .toFixed(2); + this.form.taxMoney = this.donorchargeorgans + .reduce((acc, obj) => acc + Number(obj.taXmoney), 0) + .toFixed(2); + this.form.taxedamount = this.donorchargeorgans + .reduce((acc, obj) => acc + Number(obj.taxedcost), 0) + .toFixed(2); + }, // 澶氶�夋閫変腑鏁版嵁 - handleSelectionChange(val) { - this.multipleSelection = val; + handleSelectionChange(selection) { + if (this.decision) return; + // 鍒ゆ柇鏄惁鏈夊垹闄� + if (this.multipleSelection.length <= selection.length) { + this.multipleSelection = selection; + } else { + this.multipleSelection.forEach(item => { + if (selection.includes(item)) { + } else { + if (this.multipleSelection.length == 1) { + this.multipleSelection = []; + } else { + this.multipleSelection.splice( + this.multipleSelection.indexOf(item), + 1 + ); + } + if (this.overallCase.length == 1) { + this.overallCase = []; + } else { + this.overallCase.splice(this.overallCase.indexOf(item), 1); + } + } + }); + } + // 璧嬪�肩粰鏁翠綋閫変腑鏁扮粍 + this.multipleSelection.forEach(item => { + if (!this.overallCase.includes(item)) { + this.overallCase.push(item); + } + }); + console.log(this.multipleSelection, "瑙﹀彂閫夋嫨鍚巑ultipleSelection"); + }, + // 鍒囨崲椤靛悗鎭㈠閫変腑 + Restorecheck() { + console.log(this.overallCase, "this.overallCase"); + const allid = this.overallCase.map(item => item.id); + const overlap = this.donorchargeList.filter(value => { + return allid.includes(value.id); + }); + // 淇濇寔ids鍜屽綋鍓嶉〉闈㈢殑鍚屾鎬� + this.multipleSelection = overlap; + console.log(this.multipleSelection, "杩涘叆鍒嗛〉multipleSelection"); + + this.toggleSelection(overlap); + }, + // 鎸傝浇閫夋嫨鐘舵�� + toggleSelection(rows) { + if (rows) { + this.decision = true; + this.$nextTick(() => { + rows.forEach(row => { + this.$refs.multipleTable.toggleRowSelection(row, true); + }); + this.decision = false; + }); + console.log(123); + } else { + this.$refs.multipleTable.clearSelection(); + } + }, + // 閫夋嫨浜哄憳鏍囩鍒犻櫎浜嬩欢 + handleClose(item) { + this.overallCase.splice(this.overallCase.indexOf(item), 1); + if (this.multipleSelection.indexOf(item) == -1) { + } else { + this.multipleSelection.splice(this.multipleSelection.indexOf(item), 1); + this.$refs.multipleTable.toggleRowSelection(item, false); + // this.toggleSelection(this.multipleSelection); + } }, // 鐐瑰嚮鏂板 handleAddpatient(row) { this.dialogVisiblepatient = true; - this.patientqueryParams.hospitalno = this.form.hospitalno; - this.patientqueryParams.paymentid = null; - this.patientqueryParams.paymentidIsNotNull = false; - listDonorchargeorgan(this.patientqueryParams).then(res => { + this.patientqueryParams.fundTaxid = -1; + ExpertfeeListnb(this.patientqueryParams).then(res => { this.donorchargeList = res.rows; this.patienttotal = res.total; - this.patientqueryParams.paymentidIsNotNull = true; - console.log(this.donorchargeList); + this.Restorecheck(); }); }, - // 鑾峰彇璇锋眰澶� - Getnetworkheader() { - let string = window.location.href; - if (string.includes("9091")) { - const index = string.indexOf("9091"); - this.Networkheader = string.slice(0, index + 4); // 鎴彇9091鍙婂叾鍓嶉儴瀛楃 - } else { - const index = string.indexOf("8032"); - this.Networkheader = string.slice(0, index + 4); // 鎴彇8032鍙婂叾鍓嶉儴瀛楃 - } - }, - // 琛ㄥ崟閲嶇疆 - reset() { - this.form = { - id: null, - infoid: null, - donateno: null, - donatetime: null, - name: null, - borthdate: null, - sex: null, - age: null, - donationcategory: null, - donateorgan: null, - chargeamount: null, - chargeamounted: null, - remark: null, - delFlag: null, - createBy: null, - createTime: null, - updateBy: null, - updateTime: null - }; - this.resetForm("form"); + // 鑾峰彇鏈�澶axid + GetMaxTaxid() { + getMaxFundTaxId().then(res => { + this.MaxFundTaxId = Number(res.msg); + }); }, /** 閫氳繃鍙傛暟鑾峰彇涓氬姟绫诲瀷 */ @@ -843,8 +965,6 @@ //閫夋嫨涓氬姟绫诲瀷:1銆佹柊澧烇紱2銆佷慨鏀癸紱3銆佹煡鐪� this.operationType = this.$route.query.operation; this.curId = this.$route.query.id; - this.curCase = this.$route.query.data; - this.patientqueryParams.paymentid = this.curId; console.log("this.$route.query", this.$route.query); if (this.operationType == "add") { @@ -865,11 +985,11 @@ }); }, - /** 閲嶇疆鎸夐挳鎿嶄綔 */ - resetQuery() { - this.resetForm("queryForm"); - this.handleQuery(); - }, + // /** 閲嶇疆鎸夐挳鎿嶄綔 */ + // resetQuery() { + // this.resetForm("queryForm"); + // this.handleQuery(); + // }, // 鍙栨秷鎸夐挳 cancel() { @@ -879,40 +999,44 @@ /** 鏂板鎸夐挳鎿嶄綔 */ handleAdd() { - this.reset(); - this.title = "鏂板鎹愮尞妗堜緥鍣ㄥ畼璐圭敤琛�"; - - if (this.curCase) { - this.form.infoid = this.curCase.id; - this.form.paystatus = "1"; - this.form.hospitalname = this.curCase.organizationname; - this.form.hospitalno = this.curCase.organizationid; - this.form.borthdate = this.curCase.birthday; - } + this.title = "鏂板涓撳璐规眹鎬诲崟"; + //鑾峰彇鐧诲綍鑰呬俊鎭� + getUserProfile().then(res => { + this.form.username = res.data.createBy; + }); }, /** 淇敼鎸夐挳鎿嶄綔 */ handleUpdate() { - this.reset(); - this.title = "鏀舵缁撶畻鐢宠鍗曠紪杈�"; - getFundtax(this.curId ).then(response => { + this.title = "涓撳璐规眹鎬诲崟缂栬緫"; + getFundtax(this.curId).then(response => { this.form = response.data; - + if (this.form.serviceFunds[0]) { + this.donorchargeorgans = this.form.serviceFunds; + this.donorchargeorgans.forEach((item, index) => { + item.taXmoney = item.pretaxcost - item.taxedcost; + item.taXmoney = item.taXmoney.toFixed(2); + item.index = index + 1; + this.accumulation(); + }); + } }); }, /** 鏌ョ湅鎿嶄綔 */ handleDetail() { - this.reset(); - listDonorpayment({ id: this.curId }).then(response => { - this.title = "鏌ョ湅鎹愮尞妗堜緥鍣ㄥ畼璐圭敤琛�"; - this.form = response.rows[0]; - //鍣ㄥ畼璐圭敤淇℃伅 - listDonorchargeorgan(this.patientqueryParams).then(res => { - console.log("listDonorchargeorgan", res); - this.donorchargeorgans = res.rows; - console.log(this.donorchargeorgans, "donorchargeorgans"); - }); + this.title = "鏌ョ湅涓撳璐规眹鎬诲崟"; + getFundtax(this.curId).then(response => { + this.form = response.data; + if (this.form.serviceFunds[0]) { + this.donorchargeorgans = this.form.serviceFunds; + this.donorchargeorgans.forEach((item, index) => { + item.taXmoney = item.pretaxcost - item.taxedcost; + item.taXmoney = item.taXmoney.toFixed(2); + item.index = index + 1; + this.accumulation(); + }); + } }); }, @@ -922,41 +1046,48 @@ this.$refs["form"].validate(valid => { if (valid) { this.$modal.loading("姝e湪鎻愪氦锛岃绋嶅�欙紒"); - //淇濆瓨 + console.log(1); + this.form.serviceFunds = this.donorchargeorgans; + console.log(2); if (this.form.id != null) { - for (let k = 0; k < this.donorchargeorgans.length; k++) { - this.donorchargeorgans[k].paymentid = this.form.id; - } - - editDonorpayment(this.form).then(res1 => { + updateFundtax(this.form).then(res1 => { if (res1.code == 200) { - saveDonorchargeorgan(this.donorchargeorgans).then(res2 => { - if (res2.code == 200) { - this.$modal.msgSuccess("淇濆瓨鎴愬姛锛�"); - } else { - this.$modal.msgError(res2.msg); + console.log(3); + this.$modal.msgSuccess("淇濆瓨鎴愬姛锛�"); + getFundtax(this.form.id).then(response => { + this.form = response.data; + if (this.form.serviceFunds[0]) { + this.donorchargeorgans = this.form.serviceFunds; + this.donorchargeorgans.forEach((item, index) => { + item.taXmoney = item.pretaxcost - item.taxedcost; + item.taXmoney = item.taXmoney.toFixed(2); + item.index = index + 1; + this.accumulation(); + }); } - this.$modal.closeLoading(); }); + this.$modal.closeLoading(); } else { this.$modal.closeLoading(); this.$modal.msgError(res1.msg); } }); } else { - addDonorpayment(this.form).then(response => { + addFundtax(this.form).then(response => { if (response.code == 200) { - this.form.id = response.msg; - //淇濆瓨鍓嶆牎楠屾暟鎹� - for (let k = 0; k < this.donorchargeorgans.length; k++) { - this.donorchargeorgans[k].paymentid = response.msg; - } - saveDonorchargeorgan(this.donorchargeorgans).then(res2 => { - if (res2.code == 200) { - this.$modal.msgSuccess("淇濆瓨鎴愬姛锛�"); - } else { - this.$modal.msgError(res2.msg); + this.$modal.msgSuccess("鏂板鎴愬姛锛�"); + getFundtax(response.data.fundTaxId).then(res => { + this.form = res.data; + if (this.form.serviceFunds[0]) { + this.donorchargeorgans = this.form.serviceFunds; + this.donorchargeorgans.forEach((item, index) => { + item.taXmoney = item.pretaxcost - item.taxedcost; + item.taXmoney = item.taXmoney.toFixed(2); + item.index = index + 1; + + this.accumulation(); + }); } }); this.$modal.closeLoading(); @@ -970,7 +1101,6 @@ }); }, //淇敼鎬诲疄鏀跺悗瑙﹀彂 - chargeSumall() { if (this.form.receivedamount == this.form.receivableamount) { this.donorchargeorgans.forEach(item => { @@ -1002,17 +1132,17 @@ handleDelete(row) { this.$modal - .confirm("鏄惁纭鍒犻櫎璇ユ潯鍣ㄥ畼璐圭敤鏁版嵁椤癸紵") + .confirm("鏄惁纭鍒犻櫎璇ユ潯涓撳璐圭敤鏁版嵁椤癸紵") .then(() => { - let value = row; - value.paymentid = null; - this.delogans.push(value); - - saveDonorchargeorgan(this.delogans).then(res2 => { + CalculationDetail({ id: row.id }).then(res2 => { if (res2.code == 200) { - let index = this.donorchargeorgans.indexOf(row); - this.donorchargeorgans.splice(index, 1); - this.$modal.msgSuccess("鍒犻櫎鎴愬姛锛�"); + this.form.istax = 0; + this.form.taxedtime = ""; + this.$modal + .confirm("鍒犻櫎鎴愬姛,闇�瑕侀噸鏂颁繚瀛樺苟璁$畻鍗曟嵁锛�") + .then(() => { + this.submitForm(); + }); } }); }) @@ -1381,6 +1511,13 @@ color: #000000; cursor: not-allowed; } +::v-deep .el-tag--medium { + height: 28px; + line-height: 26px; + margin-right: 15px; + margin-bottom: 15px; + font-size: 16px; +} ::v-deep .el-input--medium .el-input__inner { height: 36px; -- Gitblit v1.9.3