diff --git a/package-lock.json b/package-lock.json index 45773cd..366d2d5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "moment": "^2.29.4", "sortablejs": "^1.15.0", "vue": "^2.6.14", + "vue-contextmenujs": "^1.4.9", "vue-json-excel": "^0.3.0", "vue-meta": "^2.4.0", "vue-print-nb": "^1.7.5", @@ -10780,6 +10781,11 @@ "csstype": "^3.1.0" } }, + "node_modules/vue-contextmenujs": { + "version": "1.4.9", + "resolved": "https://registry.npmmirror.com/vue-contextmenujs/-/vue-contextmenujs-1.4.9.tgz", + "integrity": "sha512-Z3x3VBrwTwz7ow4YhbjMBPl4zz3uiwhyRIffQ/ZJl+A1Vg8B7e9bVOe2FNGqro+Opyhdf84enx4EgZNsCoPWZA==" + }, "node_modules/vue-eslint-parser": { "version": "8.3.0", "resolved": "https://registry.npmmirror.com/vue-eslint-parser/-/vue-eslint-parser-8.3.0.tgz", diff --git a/package.json b/package.json index 24d826c..ef82d45 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "moment": "^2.29.4", "sortablejs": "^1.15.0", "vue": "^2.6.14", + "vue-contextmenujs": "^1.4.9", "vue-json-excel": "^0.3.0", "vue-meta": "^2.4.0", "vue-print-nb": "^1.7.5", diff --git a/public/electron/latest.yml b/public/electron/latest.yml new file mode 100644 index 0000000..39eba35 --- /dev/null +++ b/public/electron/latest.yml @@ -0,0 +1,8 @@ +version: 1.0.6 +files: + - url: example-001 Setup 1.0.6.exe + sha512: PfambE0KJ9BKAPuXEDNGZz6z6Tbz2/BY66SyhvvZa9DJwhKYzQbgo0x/580pMJzyMv/hwYM9eWpdkOiZ71IgQQ== + size: 124064042 +path: example-001 Setup 1.0.6.exe +sha512: PfambE0KJ9BKAPuXEDNGZz6z6Tbz2/BY66SyhvvZa9DJwhKYzQbgo0x/580pMJzyMv/hwYM9eWpdkOiZ71IgQQ== +releaseDate: '2023-07-08T09:33:10.244Z' diff --git a/src/components/patientRegister/LisRequest.vue b/src/components/patientRegister/LisRequest.vue index 68e9afa..220b382 100644 --- a/src/components/patientRegister/LisRequest.vue +++ b/src/components/patientRegister/LisRequest.vue @@ -15,17 +15,21 @@ -
+
确定
+
+ 条码打印 +
关闭
@@ -40,7 +44,7 @@ import { examinationgender } from "@/request/systemapi"; import { dddw, arrayExistObj } from "../../utlis/proFunc"; // import export default { - props: ["id","brushTimes"], + props: ["id", "brushTimes"], data() { return { tableData: [], //组合项目数据 @@ -60,6 +64,7 @@ export default { methods: { parseData(asbItem) { + // "registerAsbitemId": "3a0d2e90-db36-09fe-4210-53fadb4f7d02", // asbitemId": "3a0c5600-ae78-9ed4-e3c1-993ef41d3c51", // "asbitemName": "外科", // "isCharge": "N", @@ -70,6 +75,8 @@ export default { // "lisRequestNo": "T202308220016" if (asbItem.length < 1) return; let lfind = -1; + this.lisRequestNos = []; + asbItem.forEach(e => { if (e.lisRequestNo) { e['operate'] = 'no'; @@ -94,9 +101,8 @@ export default { getAsbItemList(id) { this.tableData = []; - //http://140.143.162.39:9529/api/app/lis-request/register-asbitem-lis-request/3a0d2e90-da68-3746-6775-bf17e5f9b295 - getapi( - `/api/app/lis-request/register-asbitem-lis-request/${id}` + postapi( + `/api/app/lisrequest/getregisterasbitemlisrequest?PatientRegisterId=${id}` ).then((res) => { this.tableData = res.data; this.parseData(this.tableData); @@ -105,35 +111,128 @@ export default { //操作方式 changeOperate(row) { - if(row.operate == 'append'){ - //2期 考虑根据分组ID 过滤 lisRequestNos - }else{ + let lfind = -1 + if (row.operate == 'append') { + if (row.sampleGroupId) { + lfind = arrayExistObj(this.lisRequestNos, 'sampleGroupId', row.sampleGroupId); + if (lfind > -1) { + row.lisRequestNo = this.lisRequestNos[lfind].lisRequestNo; + row.lisRequestId = this.lisRequestNos[lfind].lisRequestId; + } + } + } else { row.lisRequestNo = ''; row.lisRequestId = ''; - } + } }, //确定 submit() { - this.$refs["form"].validate((v) => { - if (v) { - if (!this.id) { - postapi("/api/app/reference-range", this.form).then((res) => { - this.$message.success("新增成功"); - this.getlist(this.itemId, this.ReferenceRangeTypeFlag); - console.log("res", res); - this.id = res.data.id; - }); + let append = [], news = []; + let validMsg = '', lfind = -1; + + this.tableData.forEach(item => { + if (item.operate == 'append') { + if (item.lisRequestId) { + lfind = arrayExistObj(append, 'lisRequestId', item.lisRequestId); + if (lfind = -1) { + append.push( + { + lisRequestId: item.lisRequestId, + registerAsbitemIds: [item.registerAsbitemId], + } + ) + } else { + append[lfind]['registerAsbitemIds'].push(item.registerAsbitemId); + } } else { - putapi(`/api/app/reference-range/${this.id}`, this.form).then( - (res) => { - this.$message.success("修改成功"); - this.getlist(this.itemId, this.ReferenceRangeTypeFlag); - } - ); + validMsg = row.asbitemName + '项目,未选择追加到哪个检验申请单号!' } + } else if (item.operate == 'new') { + news.push(item.registerAsbitemId); } }); + + if (validMsg) { + this.$message.warning(validMsg); + return; + } + + if (append.length > 0) { + postapi('/api/app/lisrequest/appendlisrequestmany', append) + .then(res => { + if (res.code != -1) { + this.$message.success('项目追加到检验申请单成功!'); + this.getAsbItemList(this.id); + } + }); + } + if (news.length > 0) { + postapi('/api/app/lisrequest/addlisrequest', news) + .then(res => { + if (res.code != -1) { + this.$message.success('项目创建检验申请单成功!'); + this.getAsbItemList(this.id); + } + }); + } + }, + + //条码打印 + lisPrint(ReportCode, isPreview) { + + let token = localStorage.getItem('token'); + let user = localStorage.getItem('user'); + let toOutShell = { + ReportCode, token, + Parameters: [ + { Name: 'printer', Value: user }, + { Name: 'hisLog', Value: 'pic/hisLog.jpg' }, + ], + }; + + + if (isPreview) { + //http://140.143.162.39:9529/api/app/printreport/getlisrequestreport?PatientRegisterId=3a0d2e90-da68-3746-6775-bf17e5f9b295 + //this.multipleSelection.forEach((item,index) =>{ + postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${this.id}`) + .then((res) => { + if (res.code != -1) { + toOutShell.ReportTable = { lisRequest: res.data }; + console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell)); + return this.$peisAPI.printPre(JSON.stringify(toOutShell)); + } + }) + .catch(err => { + this.$message.warning(err); + }); + // }); + } else { + + postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${this.id}`) + .then((res) => { + if (res.code != -1) { + toOutShell.ReportTable = { lisRequest: res.data }; + console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell)); + return this.$peisAPI.print(JSON.stringify(toOutShell)); + } + }) + .then(res => { + if (res.toLowerCase() == 'success') { + //更新打印状态 /api/app/lisrequest/updatelisrequestisprint + // { + // "operateType": 0, 操作类型(1.按PatientRegisterId 2.按LisRequestId) + // "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + // "lisRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + // } + return postapi('/api/app/lisrequest/updatelisrequestisprint', { operateType: 1, patientRegisterId: this.id }) + } + }) + .catch(err => { + this.$message.warning(err); + }); + + } }, }, @@ -145,7 +244,7 @@ export default { // this.getAsbItemList(newVal); // } // }, - + "brushTimes"(newVal, oldVal) { if (newVal != oldVal && newVal != "") { this.getAsbItemList(this.id); diff --git a/src/components/patientRegister/PatientRegisterEdit.vue b/src/components/patientRegister/PatientRegisterEdit.vue index d92366f..af72abe 100644 --- a/src/components/patientRegister/PatientRegisterEdit.vue +++ b/src/components/patientRegister/PatientRegisterEdit.vue @@ -397,7 +397,7 @@ - + @@ -423,7 +423,7 @@ export default { data() { return { apiurl: mm.apiurl, - brushTimes:0, + brushTimes: 0, form: { id: "", //id patientId: "00000000-0000-0000-0000-000000000000", //档案号ID 选择了档案就传档案号,未选就传00000-0000... @@ -753,7 +753,7 @@ export default { .then(res => { if (res.toLowerCase() == 'success') { //更新打印次数 - return postapi('api/app/patientregister/updatepatientregisterguideprinttimesmany', [this.form.id]) + return postapi('/api/app/patientregister/updatepatientregisterguideprinttimesmany', [this.form.id]) } }) .then(res => { @@ -776,15 +776,46 @@ export default { }, //检验申请 - lisRequest() { + async lisRequest() { + let isPrintLisRequest = false + let res = null if (this.form.id.length < 1) { this.$message.info("人员信息尚未保存,不可执行此操作!"); return; } - getapi(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`) - .then(res => { - if (res.code != -1) this.$message.info("发送检验申请成功!"); + + try { + res = await postapi(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`); + console.log(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`, res) + } catch (error) { + return; + } + if (res.Code != -1) { + this.$message.info("发送检验申请成功!"); + isPrintLisRequest = true; + } + + //重复申请,重打 + if (res.Code == -1 && res.Message.indexOf('已申请') > -1) { + isPrintLisRequest = true; + } + + if (!isPrintLisRequest) return; + + try { + await this.$confirm("是否打印检验申请单?", "提示", { + confirmButtonText: "是", + cancelButtonText: "否", + type: "info", + showClose: false, + closeOnClickModal: false, + closeOnPressEscape: false, }); + } catch (error) { + return; + } + //打印检验申请单 + this.lisPrint('0003', false); }, //条码打印 @@ -806,9 +837,9 @@ export default { if (isPreview) { - //http://140.143.162.39:9529/api/app/print-report/lis-request-report/3a0c7f6e-3ff1-fef6-c568-6f541aabe87a + //http://140.143.162.39:9529/api/app/printreport/getlisrequestreport?PatientRegisterId=3a0d2e90-da68-3746-6775-bf17e5f9b295 //this.multipleSelection.forEach((item,index) =>{ - getapi(`/api/app/print-report/lis-request-report/${this.form.id}`) + postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${this.form.id}`) .then((res) => { if (res.code != -1) { toOutShell.ReportTable = { lisRequest: res.data }; @@ -822,7 +853,7 @@ export default { // }); } else { - getapi(`/api/app/print-report/lis-request-report/${this.form.id}`) + postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${this.form.id}`) .then((res) => { if (res.code != -1) { toOutShell.ReportTable = { lisRequest: res.data }; @@ -832,22 +863,15 @@ export default { }) .then(res => { if (res.toLowerCase() == 'success') { - //更新打印次数 - return postapi('api/app/patientregister/updatepatientregisterguideprinttimesmany', [this.form.id]) + //更新打印状态 /api/app/lisrequest/updatelisrequestisprint + // { + // "operateType": 0, 操作类型(1.按PatientRegisterId 2.按LisRequestId) + // "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + // "lisRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + // } + return postapi('/api/app/lisrequest/updatelisrequestisprint', { operateType: 1, patientRegisterId: this.form.id }) } - }) - .then(res => { - if (res.code != -1) { - lfind = arrayExistObj(this.patientRegister.prList, 'id', this.form.id) - if (lfind > -1) { - if (this.patientRegister.prList[lfind].guidePrintTimes) { - this.patientRegister.prList[lfind].guidePrintTimes = Number(this.patientRegister.prList[lfind].guidePrintTimes) + 1; - } else { - this.patientRegister.prList[lfind].guidePrintTimes = 1; - } - } - } - }) + }) .catch(err => { this.$message.warning(err); }); @@ -920,4 +944,5 @@ export default { text-align: left; padding-left: 5px; padding-right: 15px; -} +} + diff --git a/src/components/patientRegister/PatientRegisterList.vue b/src/components/patientRegister/PatientRegisterList.vue index 8bb5a14..dc96350 100644 --- a/src/components/patientRegister/PatientRegisterList.vue +++ b/src/components/patientRegister/PatientRegisterList.vue @@ -1,9 +1,8 @@