From 53b7cfd8589201ec728c68a08b4ea07d94e66258 Mon Sep 17 00:00:00 2001 From: qinxianzhangyao <11053546+qinxianzhangyao@user.noreply.gitee.com> Date: 星期一, 08 七月 2024 17:16:48 +0800 Subject: [PATCH] qxtj --- src/views/hosp/order/index.vue | 293 ++++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 253 insertions(+), 40 deletions(-) diff --git a/src/views/hosp/order/index.vue b/src/views/hosp/order/index.vue index 4635080..cf5ca05 100644 --- a/src/views/hosp/order/index.vue +++ b/src/views/hosp/order/index.vue @@ -116,6 +116,16 @@ >琛ュ綍椤圭洰</el-button > </el-col> + <el-col :span="1.5"> + <el-button + type="primary" + size="mini" + @click="revokeProject" + :disabled="single" + v-hasPermi="['hosp:order:export']" + >鎾ら攢琛ュ綍</el-button + > + </el-col> <el-col :span="1.5"> <el-button @@ -792,7 +802,7 @@ </el-dialog> <!-- 娣诲姞鎴栦慨鏀逛綋妫�璁板綍瀵硅瘽妗� --> - <el-dialog :title="title" :visible.sync="open" width="950px" append-to-body> + <el-dialog :title="title" :visible.sync="open" width="950px" append-to-body > <el-tabs v-model="activeName1" type="card"> <!-- <el-tab-pane label="璁㈠崟娴佹按" name="first"> <el-table :data="numberList" style="width: 100%"> @@ -829,38 +839,156 @@ </el-table-column> </el-table> </el-tab-pane> --> - <el-tab-pane label="椤圭洰姹囨��" name="second"> - <el-table :data="huizongList" style="width: 100%" max-height="280"> - <el-table-column align="center" prop="newID" label="搴忓彿" width="50"> </el-table-column> + <el-tab-pane label="椤圭洰姹囨��" name="second" style="height: 400px;"> + <el-table :data="huizongList" style="width: 100%" max-height="200"> + <el-table-column + align="center" + prop="newID" + label="搴忓彿" + width="50" + > + </el-table-column> <el-table-column align="center" prop="parent_pro_name" label="椤圭洰"> </el-table-column> - <el-table-column align="center" prop="ks" label="绉戝"> </el-table-column> - <el-table-column align="center" prop="price" label="璐圭敤鍚堣"> </el-table-column> + <el-table-column align="center" prop="ks" label="绉戝"> + </el-table-column> + <el-table-column align="center" prop="price" label="璐圭敤鍚堣"> + </el-table-column> </el-table> - <el-table :data="bill" style="width: 100%;margin-top: 10px;"> + <h3>浠樻璇︽儏</h3> + <el-table :data="bill" style="width: 100%; margin-top: 10px"> <el-table-column align="center" prop="copeWith" label="搴斾粯"> </el-table-column> <el-table-column align="center" prop="discount" label="鎶樻墸"> </el-table-column> - <el-table-column align="center" prop="paidIn" label="瀹炰粯" > + <el-table-column align="center" prop="paidIn" label="瀹炰粯"> </el-table-column> </el-table> </el-tab-pane> - <el-tab-pane label="鏄庣粏椤圭洰" name="third"> - <el-table :data="infoList" style="width: 100%" max-height ="300" :span-method="objectSpanMethod1"> - <el-table-column align="center" prop="newID" label="搴忓彿" width="50"> </el-table-column> + <el-tab-pane label="鏄庣粏椤圭洰" name="third" style="height: 350px;"> + <el-table + :data="infoList" + style="width: 100%" + max-height="330" + :span-method="objectSpanMethod1" + > + <el-table-column + align="center" + prop="newID" + label="搴忓彿" + width="50" + > + </el-table-column> <el-table-column align="center" prop="parent_pro_name" label="鐖堕」"> </el-table-column> - <el-table-column align="center" prop="pro_name" label="瀛愰」"> </el-table-column> - <el-table-column align="center" prop="danjia" label="鍗曚环"> </el-table-column> - <el-table-column align="center" prop="num" label="鏁伴噺"> </el-table-column> - <el-table-column align="center" prop="zongjia" label="鎬讳环"> </el-table-column> - <el-table-column align="center" prop="time" label="寮�鍗曟椂闂�" width="180"> </el-table-column> + <el-table-column align="center" prop="pro_name" label="瀛愰」"> + </el-table-column> + <el-table-column align="center" prop="danjia" label="鍗曚环"> + </el-table-column> + <el-table-column align="center" prop="num" label="鏁伴噺"> + </el-table-column> + <el-table-column align="center" prop="zongjia" label="鎬讳环"> + </el-table-column> + <el-table-column + align="center" + prop="time" + label="寮�鍗曟椂闂�" + width="180" + > + </el-table-column> </el-table> </el-tab-pane> </el-tabs> <div slot="footer" class="dialog-footer"> <el-button @click="cancel">鍙� 娑�</el-button> + </div> + </el-dialog> + + <el-dialog + :title="title1" + :visible.sync="Projectssopen" + width="1100px" + style="height: 860px" + append-to-body + > + <el-row type="flex" class="row-bg" justify="space-around"> + <el-col :span="13"> + <div + style="text-align: center; margin-bottom: 10px; margin-top: 10px" + > + 琛ュ綍鍒楄〃 + </div> + + <div class="tab3"> + <el-table :data="DataLists" border style="width: 100%" height="400" @selection-change="handleProjectssChange" > + <el-table-column type="selection" width="40" align="center" /> + <el-table-column + type="index" + label="搴忓彿" + align="center" + width="49px" + > + </el-table-column> + <el-table-column + prop="blje" + label="琛ュ綍閲戦" + align="center" + width="74px" + > + </el-table-column> + <el-table-column + prop="bldh" + label="琛ュ綍鍗曞彿" + align="center" + width="155px" + > + </el-table-column> + <el-table-column + prop="blsj" + label="琛ュ綍鏃堕棿" + align="center" + width="156px" + > + </el-table-column> + <el-table-column + prop="blrmc" + label="琛ュ綍浜�" + align="center" + width="96px" + > + </el-table-column> + + </el-table> + </div> + </el-col> + + <el-col :span="10"> + <div class="grid-content bg-purple"> + <div + style="text-align: center; margin-bottom: 10px; margin-top: 10px" + > + 琛ュ綍椤圭洰 + </div> + <el-table + :data="DataListss" + border + style="width: 100%" + height="400" + :span-method="objectSpanMethod2" + > + <el-table-column prop="propinName" label="妫�鏌ラ」鐩�"> + </el-table-column> + <el-table-column prop="proPrice" label="鍘熶环" width="56px"> + </el-table-column> + <el-table-column prop="proName" label="鏄庣粏椤圭洰" width="260px"> + </el-table-column> + </el-table> + </div> + </el-col> + </el-row> + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="submitForm">鎾� 閿�</el-button> + <!-- <el-button @click="cancel">鍙� 娑�</el-button> --> </div> </el-dialog> </div> @@ -875,6 +1003,7 @@ getNewDateList, revokeTjOrderByTjNum, getTransitionInfo, + getBlproByTjh,revokeBlProByBldhAndTjh } from "@/api/hosp/order"; import moment from "moment"; import { getwater } from "@/api/hosp/customer"; @@ -894,11 +1023,15 @@ data() { return { huizongList: [], + DataLists:[], infoList: [], + bldhs:[], activeName1: "second", filterText: "", orderIds: "", tjnumbers: "", + Projectssopen: false, + title1: "", cusIds: "", userIds: "", cusIdcard: "", @@ -916,8 +1049,9 @@ src: "", url: "", flag: true, - bill: null, + bill: [], Treedata: [], + DataListss:[], checkedkey: [], checkedListkey: [], defaultProps: { @@ -1039,9 +1173,9 @@ filterNode(value, data) { if (!value) return true; // return data.proName.indexOf(value) !== -1; - if(data.proName.indexOf(value) !== -1){ + if (data.proName.indexOf(value) !== -1) { return data.proName.indexOf(value) !== -1; - }else{ + } else { return data.proEngName.indexOf(value) !== -1; } }, @@ -1298,7 +1432,17 @@ getNumber(tjNumber).then((response) => { // this.form = response.data; this.numberList = response.data.charging; - this.bill = response.data.water; + this.bill =[] + var copeWith = 0; + var paidIn = 0; + var discount = "" + response.data.water.forEach(item => { + copeWith += item.copeWith; + paidIn+= item.copeWith; + discount= item.discount + }) + this.bill.push({copeWith:copeWith,paidIn:paidIn,discount:discount}); + this.title = "璁㈠崟娴佹按"; }); getTransitionInfo(tjNumber).then((res) => { @@ -1325,7 +1469,18 @@ getNumber(tjNumber).then((response) => { // this.form = response.data; this.numberList = response.data.charging; - this.bill = response.data.water; + this.bill =[] + var copeWith = 0; + var paidIn = 0; + var discount = "" + response.data.water.forEach(item => { + copeWith += item.copeWith; + paidIn+= item.copeWith; + discount= item.discount + }) + this.bill.push({copeWith:copeWith,paidIn:paidIn,discount:discount}); + + console.log(this.bill) this.title = "璁㈠崟娴佹按"; }); getTransitionInfo(tjNumber).then((res) => { @@ -1403,6 +1558,20 @@ } }); this.loading = false; + }); + }, + revokeProject() { + getBlproByTjh(this.tjnumbers).then((res) => { + if (res.data) { + this.DataLists = res.data + this.Projectssopen = true; + this.title1 = "鎾ら攢琛ュ綍"; + } else { + this.$message({ + type: "warning ", + message: "璇ュ鎴锋病鏈夎ˉ褰曢」鐩�", + }); + } }); }, // 琛ュ綍椤圭洰 @@ -1555,6 +1724,27 @@ } }, + objectSpanMethod2({ row, column, rowIndex, columnIndex }) { + // console.log(row, column, rowIndex, columnIndex); + let fields = ["propinName"]; + let cellValue = row[column.property]; + if (cellValue && fields.includes(column.property)) { + let prevRow = this.DataListss[rowIndex - 1]; + let nextRow = this.DataListss[rowIndex + 1]; + if (prevRow && prevRow[column.property] === cellValue) { + return { rowspan: 0, colspan: 0 }; + } else { + let countRowspan = 1; + while (nextRow && nextRow[column.property] === cellValue) { + nextRow = this.DataListss[++countRowspan + rowIndex]; + } + if (countRowspan > 1) { + return { rowspan: countRowspan, colspan: 1 }; + } + } + } + }, + // 鏀惰垂鎸夐挳 submitPrice() { this.proIds = []; @@ -1638,26 +1828,49 @@ }); }, + handleProjectssChange(selection){ + this.DataListss =[] + this.bldhs = selection.map((item) => item.bldh); + selection.forEach(item => { + item.projectList.forEach(item1 => { + item1.children.forEach(item2 => { + this.DataListss.push(item2) + if(this.DataListss.length != 0){ + this.DataListss.forEach(item => { + if(item.proParentId ==item1.proId ) + item.propinName= item1.proName + }) + } + }) + }) + + }) + }, + /** 鎻愪氦鎸夐挳 */ - // submitForm() { - // this.$refs["form"].validate(valid => { - // if (valid) { - // if (this.form.orderId != null) { - // updateOrder(this.form).then(response => { - // this.$modal.msgSuccess("淇敼鎴愬姛"); - // this.open = false; - // this.getList(); - // }); - // } else { - // addOrder(this.form).then(response => { - // this.$modal.msgSuccess("鏂板鎴愬姛"); - // this.open = false; - // this.getList(); - // }); - // } - // } - // }); - // }, + submitForm() { + this.$confirm(" 鏄惁鎾ら攢璇ヨˉ褰曢」鐩�?", "鎻愮ず", { + confirmButtonText: "鏄�", + cancelButtonText: "鍚�", + type: "warning", + }) + .then(() => { + let data = { + tjh: this.tjnumbers, + bldhs:this.bldhs + } + revokeBlProByBldhAndTjh(data).then(res => { + this.Projectssopen =false + }) + }) + .catch(() => { + this.$message({ + type: "info", + message: "宸插彇娑堟挙閿�", + }); + this.Projectssopen =false + }); + }, /** 瀵煎嚭鎸夐挳鎿嶄綔 */ handleExport() { -- Gitblit v1.8.0