From a9bbcfd46af5e48099a5d14ffe2d0e891d5187e0 Mon Sep 17 00:00:00 2001 From: chenhc <2369838784@qq.com> Date: Fri, 16 Aug 2024 14:21:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A1=B5=E9=9D=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/collect/DealOrder.vue | 56 +++++++++++++----- src/views/collect/DealOrderBlank.vue | 86 ++++++++++++++++++---------- 2 files changed, 97 insertions(+), 45 deletions(-) diff --git a/src/views/collect/DealOrder.vue b/src/views/collect/DealOrder.vue index 39a8759b..b34b6534 100644 --- a/src/views/collect/DealOrder.vue +++ b/src/views/collect/DealOrder.vue @@ -87,6 +87,7 @@ style="width: 90%" :disabled="corpOrderIdDisabled" filterable + @change="workPlaceCodeChange" > - - - + + + {{ item.name }} + {{ item.code }} @@ -234,6 +235,7 @@ import PannelOrderBiz from "./PannelOrderBiz"; import {listPage} from "@/api/basic/sysWorkplaceManage"; import {enterCodeWeb} from "@/api/inout/order"; import {draftOrder, finishOrder, tagCode} from "@/api/collect/splitCreateOrder"; +import {selectCorpList} from "@/api/basic/basicUnitMaintain"; import {delDrugLevel} from "@/api/basic/product/drugUdiinfos"; export default { @@ -243,6 +245,7 @@ export default { name: "prescribeTagCodeDeal", data() { return { + fromInvOptions: [], //界面配置相关 //患者处方 loading: false, @@ -262,14 +265,18 @@ export default { list: [], total: 0, defaultSort: {prop: 'createTime', order: 'desc'}, - + formDataVisible:{ + operationType: null, + unitTittle: "往来单位", + corpType: 1, + }, curWorkPlaces: [], erpList: [], formData: { tagStatus: -1, invCode: null, workPlaceCode: null, - erpId: null, + fromCorp: null, }, selectPrescriptionVisible: false, corpOrderIdDisabled: false, @@ -300,6 +307,22 @@ export default { addOrder, errOrder, selectPrescribeDialog, prescribeCodePanel, PannelOrderBiz }, methods: { + findFromInvList(val) { + let cQuery = { + corpType:this.formDataVisible.corpType, + }; + selectCorpList(cQuery) + .then((response) => { + this.fromInvOptions = response.data || []; + }) + .catch(() => { + }); + }, + workPlaceCodeChange(value){ + this.curWorkPlaces.forEach(item => {if(item.workplaceId == value){ this.formDataVisible = item + } }) + return + }, handleClick(blankName) { // let url = window.location.origin+`#/tagCodeBlank?workplaceId=`+ this.stationList[index].workplaceId let url = window.location.origin + `#/` + blankName + `?workplaceId=` + this.workplaceId @@ -329,9 +352,10 @@ export default { } listPage(query).then((res) => { this.curWorkPlaces = res.data.list || []; - if (this.curWorkPlaces.length == 1) { + if (this.curWorkPlaces.length == 1 && this.formData.workPlaceCode == null) { this.formData.workPlaceCode = this.curWorkPlaces[0].workplaceId; } + this.workPlaceCodeChange(this.formData.workPlaceCode); }) }, //界面配置相关------------ @@ -537,9 +561,11 @@ export default { if (this.$route.query.workplaceId != null) { this.isLinkDisabled = true this.corpOrderIdDisabled = true - this.formData.workplaceCode = Number(this.$route.query.workplaceId); + this.formData.workPlaceCode = Number(this.$route.query.workplaceId); } + this.findCurWorkPlaces(); + this.findFromInvList(""); } diff --git a/src/views/collect/DealOrderBlank.vue b/src/views/collect/DealOrderBlank.vue index 7f8e246d..b34b6534 100644 --- a/src/views/collect/DealOrderBlank.vue +++ b/src/views/collect/DealOrderBlank.vue @@ -3,7 +3,7 @@ - +
- - - + + + {{ item.name }} + {{ item.code }} @@ -170,7 +171,7 @@ - + - + - + - + { + this.fromInvOptions = response.data || []; + }) + .catch(() => { + }); + }, + workPlaceCodeChange(value){ + this.curWorkPlaces.forEach(item => {if(item.workplaceId == value){ this.formDataVisible = item + } }) + return + }, handleClick(blankName) { // let url = window.location.origin+`#/tagCodeBlank?workplaceId=`+ this.stationList[index].workplaceId let url = window.location.origin + `#/` + blankName + `?workplaceId=` + this.workplaceId @@ -328,9 +352,10 @@ export default { } listPage(query).then((res) => { this.curWorkPlaces = res.data.list || []; - if (this.curWorkPlaces.length == 1 ) { + if (this.curWorkPlaces.length == 1 && this.formData.workPlaceCode == null) { this.formData.workPlaceCode = this.curWorkPlaces[0].workplaceId; } + this.workPlaceCodeChange(this.formData.workPlaceCode); }) }, //界面配置相关------------ @@ -432,13 +457,16 @@ export default { return; } let tagQuery = { - prescribeNum: this.formData.billNo, + billNo: this.formData.billNo, code: this.filterQuery.code.trim(), }; tagCode(tagQuery).then(res => { this.loading = false if (res.code == 20000) { this.formData.tagStatus = 2; + this.formData = res.data; + } else { + this.$message.error(res.message) } }).catch(() => { this.loading = false @@ -446,7 +474,6 @@ export default { }, saveDraftOrder() { - this.$confirm('此操作将挂起当前正在处理单据,是否继续?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', @@ -462,8 +489,6 @@ export default { }) }).catch(() => { }); - - }, finishOrder() { @@ -501,7 +526,7 @@ export default { }, printCodeResult(data, isSuccess) { - const resultParts = ["扫码解析结果:" + data.code]; + const resultParts = ["追溯码:" + data.code + "\r\n"]; if (data.udi) { resultParts.push("层级标识: " + data.udi); @@ -533,13 +558,14 @@ export default { this.fromList = re.data.fromList; }); this.formData.invCode = this.$store.getters.locInvCode; - this.findCurWorkPlaces(); - if (this.$route.query.workplaceId != null){ + if (this.$route.query.workplaceId != null) { this.isLinkDisabled = true this.corpOrderIdDisabled = true - this.formData.workplaceCode = Number(this.$route.query.workplaceId); + this.formData.workPlaceCode = Number(this.$route.query.workplaceId); } + this.findCurWorkPlaces(); + this.findFromInvList(""); }