From b7e9807061998a4b250ceaca7e6320e89cc6767f Mon Sep 17 00:00:00 2001 From: qx <1084500556@qq.com> Date: 星期六, 08 二月 2025 18:09:19 +0800 Subject: [PATCH] qx --- src/views/reservation/reservations/index.vue | 141 +++++++++++++++++++++++++++++++++- src/views/hosp/order/index.vue | 40 ++++++++++ src/views/hosp/restore/index.vue | 6 src/views/reservation/groupcheck/index.vue | 32 ++++--- src/api/hosp/order.js | 10 ++ 5 files changed, 205 insertions(+), 24 deletions(-) diff --git a/src/api/hosp/order.js b/src/api/hosp/order.js index 1aaa744..754de67 100644 --- a/src/api/hosp/order.js +++ b/src/api/hosp/order.js @@ -224,6 +224,16 @@ }) } + +// 浣撴璁板綍椤甸潰鎭㈠棰勭害璁板綍鎺ュ彛 +export function huifuyuyuejilu(data) { + return request({ + url: '/hosp/order/huifuyuyuejilu', + method: 'post', + data: data + }) +} + export function getTjrWnJuanMoBan(tjCategory) { return request({ url: '/hosp/surveyTemplate/getTjrWnJuanMoBan', diff --git a/src/views/hosp/order/index.vue b/src/views/hosp/order/index.vue index 5f122fb..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" @@ -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; diff --git a/src/views/hosp/restore/index.vue b/src/views/hosp/restore/index.vue index 1cd47cf..ea4c434 100644 --- a/src/views/hosp/restore/index.vue +++ b/src/views/hosp/restore/index.vue @@ -443,9 +443,9 @@ cusBrithday: [ { required: true, validator: checkPhoneNum, trigger: "blur" }, ], - cusAddr: [ - { required: true, validator: checkPhoneNum, trigger: "blur" }, - ], + // cusAddr: [ + // { required: true, validator: checkPhoneNum, trigger: "blur" }, + // ], cusPhone: [ { required: true, validator: checkPhoneNum, trigger: "blur" }, ], diff --git a/src/views/reservation/groupcheck/index.vue b/src/views/reservation/groupcheck/index.vue index 8ee5333..c621754 100644 --- a/src/views/reservation/groupcheck/index.vue +++ b/src/views/reservation/groupcheck/index.vue @@ -661,6 +661,7 @@ methods: { handleQuery() { this.loading = true; + this.selectList = []; getCusTomterListByCompId(this.objs).then((res) => { this.userList = res.data; this.loading = false; @@ -773,21 +774,22 @@ addPlOrderAndDetail(data).then((res) => { this.open2 = false; this.$modal.msgSuccess("绛惧埌鎴愬姛"); - let base64 = res.file; - this.base64ToBlob({ - b64data: base64, - contentType: "application/pdf", - }).then((res) => { - this.dialogVisible = true; - // 杞悗鍚庣殑blob瀵硅薄 - console.log("blob", res.preview); - try { - this.url =res.preview; - } catch (error) { - this.url = window.webkitURL.createObjectURL(res.preview); - } - }); - + if (res.file) { + let base64 = res.file; + this.base64ToBlob({ + b64data: base64, + contentType: "application/pdf", + }).then((res) => { + this.dialogVisible = true; + // 杞悗鍚庣殑blob瀵硅薄 + console.log("blob", res.preview); + try { + this.url = res.preview; + } catch (error) { + this.url = window.webkitURL.createObjectURL(res.preview); + } + }); + } this.handleQuery(); this.selectList = []; }); diff --git a/src/views/reservation/reservations/index.vue b/src/views/reservation/reservations/index.vue index 7a21217..8b72ef7 100644 --- a/src/views/reservation/reservations/index.vue +++ b/src/views/reservation/reservations/index.vue @@ -197,6 +197,16 @@ > <!-- v-hasPermi="['reservation:reservation:remove']" --> </el-col> + <el-col :span="1.5"> + <el-button + type="primary" + size="mini" + :disabled="multiple" + @click="Groupsignin" + >鍥綋绛惧埌</el-button + > + <!-- v-hasPermi="['reservation:reservation:remove']" --> + </el-col> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" @@ -1069,7 +1079,7 @@ </div> </el-col> </el-row> - + <el-dialog title="瀵兼鍗曢瑙�" :visible.sync="dialogVisibles" @@ -1087,6 +1097,50 @@ </div> </template> </el-drawer> + + + <el-dialog + title="PDF 棰勮" + :visible.sync="dialogVisible" + :close-on-click-modal="false" + > + <div class="main"> + <iframe + id="printIframe" + :src="url" + frameborder="0" + style="width: 100%; height: 100%" + ></iframe> + </div> + </el-dialog> + + <el-dialog + :title="title" + :visible.sync="open2" + width="800px" + append-to-body + > + <el-form ref="form" :model="forms" label-width="100px" :inline="true"> + <el-form-item label="浣撴绫诲埆"> + <el-select + style="width: 150px" + v-model="forms.tjCategory" + placeholder="璇烽�夋嫨浣撴绫诲埆" + > + <el-option + v-for="dict in dict.type.dict_tjtype" + :key="dict.value" + :label="dict.label" + :value="dict.value" + ></el-option> + </el-select> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer2"> + <el-button type="primary" @click="submitType">纭� 瀹�</el-button> + <el-button @click="cancel">鍙� 娑�</el-button> + </div> + </el-dialog> <div style=" @@ -1799,8 +1853,10 @@ </template> <script> -import { addComp } from "@/api/system/comp"; +import { addComp, + addPlOrderAndDetail } from "@/api/system/comp"; import Big from "big.js"; + import { listReservation, gettjCancel, @@ -1842,7 +1898,6 @@ ], data() { let checkPhoneNum = (rule, value, callback) => { - console.log(value); let patter = new RegExp(/^1\s*[3456789]\s*(\d\s*){9}$/); if (value == "" && value == undefined && !value) { return callback(""); @@ -1876,6 +1931,10 @@ dialogVisibles: false, src: "", url: "", + open2: false, + forms: { + tjCategory:null + }, dialogVisible: false, /** 鐓х浉鏈哄脊绐楁ā鍧�-start */ videoWidth: 200, @@ -1933,6 +1992,7 @@ // 鏄惁鏄剧ず寮瑰嚭灞� pacId: "", + cusIds:[], // 缁撴灉 result: "", proIds: [], @@ -2253,6 +2313,7 @@ // 鍙栨秷鎸夐挳 cancel() { this.open = false; + this.open2 = false; this.reset(); }, @@ -2316,10 +2377,10 @@ }, // 澶氶�夋閫変腑鏁版嵁 handleSelectionChange(selection) { + this.cusIds = selection.map((item) => item.idCard); selection.forEach((item) => { this.fmobj = item; }); - console.log(this.fmobj); this.ids = selection.map((item) => item.id); this.single = selection.length !== 1; this.multiple = !selection.length; @@ -2334,7 +2395,6 @@ /** 淇敼鎸夐挳鎿嶄綔 */ handleUpdate(row) { - console.log(row); this.title = "淇敼浣撴棰勭害"; this.formIn = row; this.form.tjType = this.formIn.tjType; @@ -2405,7 +2465,6 @@ this.TotalPrice1 = 0; this.tableData1.forEach((item) => { this.TotalPrice1 += item.nowPrice; - console.log(this.discount); this.TotalPrice = ( this.TotalPrice1 * (this.discount / 10) @@ -2615,6 +2674,74 @@ this.treedataList = JSON.parse(JSON.stringify(this.dXData)); return; } + }, + + Groupsignin() { + this.open2 = true; + }, + + + submitType() { + // let cusIds = []; + // this.selectList.forEach((item) => { + // cusIds.push(item.idCard); + // }); + let data = { + cusIds: this.cusIds, + tjCategory: this.forms.tjCategory, + }; + addPlOrderAndDetail(data).then((res) => { + this.open2 = false; + this.$modal.msgSuccess("绛惧埌鎴愬姛"); + if (res.file) { + + let base64 = res.file; + this.base64ToBlob({ + b64data: base64, + contentType: "application/pdf", + }).then((res) => { + this.dialogVisible = true; + // 杞悗鍚庣殑blob瀵硅薄 + try { + this.url = res.preview; + } catch (error) { + this.url = window.webkitURL.createObjectURL(res.preview); + } + }); + } + }); + }, + + + base64ToBlob({ b64data = "", contentType = "", sliceSize = 512 } = {}) { + return new Promise((resolve, reject) => { + // 浣跨敤 atob() 鏂规硶灏嗘暟鎹В鐮� + let byteCharacters = atob(b64data); + let byteArrays = []; + for ( + let offset = 0; + offset < byteCharacters.length; + offset += sliceSize + ) { + let slice = byteCharacters.slice(offset, offset + sliceSize); + let byteNumbers = []; + for (let i = 0; i < slice.length; i++) { + byteNumbers.push(slice.charCodeAt(i)); + } + // 8 浣嶆棤绗﹀彿鏁存暟鍊肩殑绫诲瀷鍖栨暟缁勩�傚唴瀹瑰皢鍒濆鍖栦负 0銆� + // 濡傛灉鏃犳硶鍒嗛厤璇锋眰鏁扮洰鐨勫瓧鑺傦紝鍒欏皢寮曞彂寮傚父銆� + byteArrays.push(new Uint8Array(byteNumbers)); + } + let result = new Blob(byteArrays, { + type: contentType, + }); + result = Object.assign(result, { + // jartto: 杩欓噷涓�瀹氳澶勭悊涓�涓� URL.createObjectURL + preview: URL.createObjectURL(result), + // name: `鍥剧墖绀轰緥.png`, + }); + resolve(result); + }); }, // 鐐瑰嚮鑾峰彇姣忎釜鏍戣妭鐐� @@ -3012,6 +3139,8 @@ overflow: hidden; } + + #printIframe::-webkit-scrollbar { width: 6px; } -- Gitblit v1.8.0