From c6b785037442a26b5b45e4bc9834e49c47e3fb09 Mon Sep 17 00:00:00 2001 From: wwl <xchao828@163.com> Date: 星期五, 14 二月 2025 17:23:18 +0800 Subject: [PATCH] 取消自动关闭读卡器 --- src/views/hosp/order/index.vue | 81 +++++++++++++++++++++++++++++++++++----- 1 files changed, 70 insertions(+), 11 deletions(-) diff --git a/src/views/hosp/order/index.vue b/src/views/hosp/order/index.vue index 31be2bf..2056b76 100644 --- a/src/views/hosp/order/index.vue +++ b/src/views/hosp/order/index.vue @@ -243,6 +243,15 @@ >寮哄埗鎾ら攢</el-button > </el-col> + <el-col :span="1.5"> + <el-button + type="primary" + size="mini" + @click="ResumeAppointment" + :disabled="multiple" + >鎭㈠棰勭害</el-button + > + </el-col> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" @@ -612,7 +621,7 @@ :props="defaultProp" show-checkbox node-key="id" - @check="handlepackage" + @check-change="handlepackage" :default-checked-keys="checkedkeys" :filter-node-method="filterpackage" ref="treas" @@ -1180,7 +1189,7 @@ </el-table-column> </el-table> - <h3 style="font-weight: 600">鍚堣锛歿{ marryalls }}鍏�</h3> + <!-- <h3 style="font-weight: 600">鍚堣锛歿{ marryalls }}鍏�</h3> --> </div> </div> @@ -1662,6 +1671,7 @@ getOrderList, getNewDateList, revokeTjOrderByTjNum, + huifuyuyuejilu, getTransitionInfo, getBlproByTjh, revokeBlProByBldhAndTjh, @@ -1782,6 +1792,7 @@ activeNames: "first", // 闈炲涓鐢� multiple: true, + tjNUms:[], // 鏄剧ず鎼滅储鏉′欢 showSearch: true, userId: "", @@ -2132,6 +2143,34 @@ }); }, + ResumeAppointment(){ + this.isLoading = true; + this.$confirm("鎮ㄧ‘璁よ鎭㈠棰勭害锛�", "纭淇℃伅", { + distinguishCancelAndClose: true, + confirmButtonText: "纭", + cancelButtonText: "鍙栨秷", + }) + .then(() => { + huifuyuyuejilu(this.tjNUms).then((res) => { + this.$modal.msgSuccess("鎭㈠鎴愬姛"); + // this.isLoading = false; + this.getList(); + }); + }) + .catch((action) => { + if (action === "cancel") { + this.$message({ + type: "warning", + message: "宸插彇娑�", + }); + } + }) + .finally(() => { + // 涓嶈鎿嶄綔鎴愬姛杩樻槸澶辫触锛岄兘浼氭墽琛� + this.isLoading = false; + }); + }, + handleRevoke() { this.isLoading = true; this.$confirm("鎮ㄧ‘璁よ鎾ら攢锛�", "纭淇℃伅", { @@ -2325,6 +2364,7 @@ // 澶氶�夋閫変腑鏁版嵁 handleSelectionChange(selection) { let tjNUms = selection.map((item) => item.tjNumber); + this.tjNUms = selection.map((item) => item.tjNumber); selection.forEach((item) => { this.orderIds = item.orderId; this.tjnumbers = item.tjNumber; @@ -2497,6 +2537,8 @@ // this.marryalls = 0; // this.Datalists = []; this.checkedkeys = []; + + this.DataList3 = []; getZhList().then((response) => { if (response.data) { this.packageList = response.data; @@ -2505,8 +2547,10 @@ }); } else { // this.TotalPrice1 = 0; - this.checkedkey = []; + this.checkedkeys = []; // this.DataList = []; + this.Datalists = []; + this.DataList3 = []; this.getDataList(); // if (this.marryalls != 0) { // this.TotalPrice1 += this.marryalls; @@ -2515,7 +2559,7 @@ }, handlepackage(data, checked, checkedNodes) { if (checked == true) { - this.$refs.treas.setCheckedKeys([data.id]); + // this.$refs.treas.setCheckedKeys([data.id]); let datas = { zhId: data.id, }; @@ -2541,7 +2585,7 @@ this.DataList3.forEach((item) => { console.log(item.proPrice); this.TotalPrice1 += item.proPrice * item.sl; - this.marryalls += item.proPrice; + this.marryalls += item.proPrice * item.sl; }); // 涓烘瘡涓」鐩坊鍔� propinName @@ -2659,6 +2703,8 @@ this.orderId = row.orderId; this.cusId = row.tjCusIdCard; this.userId = row.userId; + console.log(row, 666); + this.customer = { cusIdcard: row.tjCusIdCard, cusName: row.tjCustomerName, @@ -2807,14 +2853,21 @@ this.checkedObj = checked; if (checked === true) { - this.$refs.tree.setCheckedKeys([data.proId]); + // this.$refs.tree.setCheckedKeys([data.proId]); let proId = data.proId; getProSonDxList(proId).then((res) => { this.TreedataList = res.data.list; + this.TreedataList.forEach((item) => { - item.disabled = true; - this.checkedListkey.push(item.proId); + // item.disabled = true; + // this.checkedListkey.push(item.proId); + if (!this.checkedListkey.includes(item.proId)) { + this.checkedListkey.push(item.proId); + } + this.Datalists.push(item); + this.DataList3.push(item); + this.spliceData(); this.DataList3.forEach((item1) => { this.TotalPrice1 += item1.proPrice * item1.sl; @@ -2837,9 +2890,15 @@ getProSonDxList(proId).then((res) => { this.TreedataList = res.data.list; - // 浠庡凡閫夊垪琛ㄤ腑绉婚櫎璇ラ」鐩殑 ID - this.checkedListkey = this.checkedListkey.filter( - (id) => id !== proId + // 閬嶅巻 TreedataList 骞剁Щ闄ょ浉鍏崇殑瀛愰」 ID + this.TreedataList.forEach((item) => { + this.checkedListkey = this.checkedListkey.filter( + (id) => id !== item.proId + ); + }); + + this.Datalists = this.Datalists.filter( + (item) => item.proParentId !== proId ); // 浠� DataList3 涓Щ闄ょ浉鍏崇殑瀛愰」 -- Gitblit v1.8.0