From 8a7dded6413d99bd5b505eadecd0b824690696fd Mon Sep 17 00:00:00 2001 From: wwl <xchao828@163.com> Date: 星期二, 31 十二月 2024 17:56:36 +0800 Subject: [PATCH] 1 --- src/views/system/tijian/index.vue | 159 ++++++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 127 insertions(+), 32 deletions(-) diff --git a/src/views/system/tijian/index.vue b/src/views/system/tijian/index.vue index 2b6af1b..9d0231d 100644 --- a/src/views/system/tijian/index.vue +++ b/src/views/system/tijian/index.vue @@ -135,11 +135,11 @@ }, ]" > - <!-- style="display: inline-block; border-bottom: 2px solid blue" - @click="openname" --> + <span slot="label" - + style="display: inline-block; border-bottom: 2px solid blue" + @click="openname" > 濮撳悕 </span> @@ -1101,12 +1101,12 @@ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - margin-left: 46px + margin-left: 46px; font-size: 16px; margin-right: 20px; " > - {{ this.tableData1[0].pacName || "" }} 宸查�夐」鐩潯鏁帮細<span + <span v-if="this.tableData1[0]">{{ this.tableData1[0].pacName || "" }}</span> 宸查�夐」鐩潯鏁帮細<span style="font-weight: 700; color: red; margin-right: 5px" >{{ this.tableData1.length || 0 }}</span >鏉� @@ -1504,7 +1504,7 @@ </span> </el-dialog> <Packages ref="aaa" @add="handleChanges" /> - <selectName ref="bbb" /> + <selectName ref="bbb" @add="handleChangesName"/> </div> </template> @@ -1520,6 +1520,7 @@ } from "@/api/hosp/customer"; import { getPrintSetUp } from "@/api/system/examcharge"; import { + tuantiSelect, deptTreeSelect, projectGetList, getOrder, @@ -1528,6 +1529,7 @@ getCusIdcard, getPackageListName, getaddtTransition, + tuantiqueren, getTransitionList, getByTeamNo, delTbBycusCardIdAndProId, @@ -1834,8 +1836,10 @@ methods: { openname() { + this.$refs.bbb.open = true; - this.$refs.bbb.title = "123"; + this.$refs.bbb.title = "鎼滅储濮撳悕"; + this.$refs.bbb.getList(); }, getCompanyList() { this.loading = true; @@ -2362,13 +2366,7 @@ this.responseList = response.data; this.$modal.msgSuccess("鏂板鎴愬姛"); - // let cusSex = this.form.cusSex; - // //鍏ㄩ儴濂楅 - // deptTreeSelect(cusSex).then((response) => { - // this.newpacName = response.rows; - // this.loading = false; - // }); - // this.handleQuery(); + _this.tcShow = true; _this.tcShows = true; _this.isDisabled = true; @@ -2859,7 +2857,19 @@ // this.form.cusName = param1[0].pacName; // this.form.cusPhone = param1[0].pacRemark; }, - + handleChangesName(params){ + this.form.cusName = params[0].xm + this.form.cusPhone = params[0].sjh + if (params[0].xb == '鐢�') { + this.form.cusSex = 0 + } + if (params[0].xb == '濂�') { + this.form.cusSex = 1 + } + if (params[0].xb == '鏈煡') { + this.form.cusSex = 2 + } + }, // selected(row, index) { // if (this.formPacId !== null) { // if (row.pacId == this.formPacId) { @@ -2914,16 +2924,27 @@ handle() { this.loading = true; this.name = this.queryParam.pacName; + let param = { + sex: this.form.cusSex, + dwId: this.form.dictCompId + } if (this.name) { getPackageListName(this.name).then((response) => { this.newpacName = response.data; this.loading = false; }); } else { - deptTreeSelect().then((response) => { + if(this.form.tjType == 1) { + tuantiSelect(param).then((response) => { + this.newpacName = response.data; + this.loading = false; + }) + } else{ + deptTreeSelect().then((response) => { this.newpacName = response.rows; this.loading = false; }); + } } }, @@ -3010,13 +3031,51 @@ }, Package() { - this.taocan = true; + this.activeNames = "first"; let cusSex = this.form.cusSex; this.datekey = Date.now(); //鍏ㄩ儴濂楅 - this.loading = true; - deptTreeSelect(cusSex).then((response) => { + + let param = { + sex: cusSex, + dwId: this.form.dictCompId || '' + } + if(this.form.tjType == 1) { + if(!this.form.dictCompId) { + this.$message({ + type: "warning", + message: "璇峰厛缁存姢鍗曚綅锛�", + }); + + } else { + this.taocan = true; + this.loading = true; + tuantiSelect(param).then((res) => { + this.newpacName = res.data; + try { + if (this.tableData1.length >= 1) { + this.newpacName.forEach((item3) => { + this.tableData1.forEach((item4) => { + item4.list.forEach((item6) => { + if (item6.pacName === item3.pacName) { + this.$nextTick(() => { + this.$refs.tb.toggleRowSelection(item3, true); + }); + throw Error(); + } + }); + }); + }); + } + } catch (error) {} + this.loading = false; + }) + } + } else { + this.taocan = true; + this.loading = true; + deptTreeSelect(cusSex).then((response) => { this.newpacName = response.rows; try { if (this.tableData1.length >= 1) { @@ -3036,7 +3095,9 @@ } catch (error) {} this.loading = false; }); - // this.getData(); + } + + }, // 鐐瑰嚮澶氶�夋鑾峰彇閫変腑鏁版嵁 @@ -3432,7 +3493,8 @@ pacId: _this.pacId, proIds: this.proIds, }; - getaddtTransition(data).then((response) => { + if (this.form.tjType == 1){ + tuantiqueren(data).then((response) => { if (response.code == 200) { let cusId = this.form.cusIdcard; this.proIds = []; @@ -3472,21 +3534,54 @@ console.log(澶辫触浜�); } }); + } else { + getaddtTransition(data).then((response) => { + if (response.code == 200) { + let cusId = this.form.cusIdcard; + this.proIds = []; + getTransitionList(cusId).then((response) => { + this.tableData1 = response.data; + this.TotalPrice1 = 0; + if (this.tableData1) { + this.tableData1.forEach((item) => { + this.TotalPrice1 += item.nowPrice; + if (item.tjCategory != null) { + this.tjCategory = item.tjCategory; + } + if (item.pacName == "鍗曢」") { + item.list.forEach((item9) => { + this.treeList.push(item9.proId); + }); + } + this.pacName = item.pacName; + }); + + const r = /^\+?[0-9][0-9]*$/; //姝f暣鏁帮紙鍙互0鎵撳ご锛� + let TotalPrice = this.TotalPrice1 * (this.discount / 10); + if (r.test(TotalPrice)) { + this.TotalPrice = TotalPrice + ".00"; + } else { + this.TotalPrice = TotalPrice; + } + this.list1 = false; + this.list3 = true; + this.list2 = false; + } else { + this.list1 = true; + this.TotalPrice = "0.00"; + } + }); + } else { + console.log(澶辫触浜�); + } + }); + } + + this.taocan = false; this.defaultKeys = []; this.DataLists = []; }, - // changeCategoryKeys(val) { - // this.proIds = []; - // this.proIds = val; - // if (this.DataList.length != 0) { - // this.DataList.forEach((item) => { - // this.proIds.push(item.proId); - // }); - // } else { - // this.proIds = []; - // } - // }, submitCheckinfee() { let _this = this; if (_this.tjCategory !== "") { -- Gitblit v1.8.0