From 048fd0a0fed367d0e2ba9680c363e38850eba332 Mon Sep 17 00:00:00 2001 From: anthonywj Date: Sat, 17 Aug 2024 23:56:12 +0800 Subject: [PATCH] =?UTF-8?q?=E7=95=8C=E9=9D=A2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/collect/collectOrder.js | 15 +- src/views/collect/CollectOrderNew.vue | 71 +++++-- src/views/collect/DealOrder.vue | 8 +- src/views/collect/DealOrderBlank.vue | 68 +++++-- .../prescribe/prescribeOriginPanel.vue | 2 +- .../collect/selectCollectOrderDialog.vue | 181 +++++++++--------- 6 files changed, 225 insertions(+), 120 deletions(-) diff --git a/src/api/collect/collectOrder.js b/src/api/collect/collectOrder.js index cda2cb7b..b9b60f14 100644 --- a/src/api/collect/collectOrder.js +++ b/src/api/collect/collectOrder.js @@ -83,6 +83,19 @@ export function bindWork(query) { }); } +export function importOrder(query) { + return axios({ + url: "/udiwms/collect/order/import", + method: "get", + params: query + }); +} - +export function clearAllOrder(query) { + return axios({ + url: "/udiwms/collect/order/clearAll", + method: "get", + params: query + }); +} diff --git a/src/views/collect/CollectOrderNew.vue b/src/views/collect/CollectOrderNew.vue index 65d0faa3..879ff737 100644 --- a/src/views/collect/CollectOrderNew.vue +++ b/src/views/collect/CollectOrderNew.vue @@ -93,10 +93,14 @@ >查询 - - - - + 下载单据 + + 清除单据 + @@ -242,7 +246,7 @@ import {convertDate} from "@/utils/date"; import {detail} from "@/api/basic/sicker/prescribeApi"; import prescribeDownloadDialog from "@/views/collect/prescribe/prescribeDownloadDialog"; import prescribeOriginPanel from "./PannelOrderBiz"; -import {deleteByOrder, orderPage} from "@/api/collect/collectOrder"; +import {clearAllOrder, deleteByOrder, importOrder, orderPage} from "@/api/collect/collectOrder"; import {filterSubAllOptimize} from "@/api/system/invSubWarehouse"; import {filterWorkOptimize} from "@/api/basic/sysWorkplaceManage"; @@ -273,7 +277,7 @@ export default { showSearch: true, filterQuery: { - tagStatus:"1", // + tagStatus: "1", // billNo: null, page: 1, limit: 10, @@ -339,16 +343,47 @@ export default { this.getList(); }, downloadPrescription() { - this.downloadPrescriptionVisible = true + // this.downloadPrescriptionVisible = true + this.loading = true; + importOrder().then(res => { + this.loading = false + if (res.code == 20000) { + this.$message.success("下载成功!") + this.getList() + } else { + this.$message.error(res.message) + } + } + ).catch(() => { + this.loading = false + }) }, + + clearAllOrder() { + this.loading = true; + clearAllOrder().then(res => { + this.loading = false + if (res.code == 20000) { + this.$message.success("清除成功!") + this.getList() + } else { + this.$message.error(res.message) + } + }).catch(() => { + this.loading = false + }) + } + , closeDialog() { this.downloadPrescriptionVisible = false; this.getList(); - }, + } + , onSubmit() { this.filterQuery.page = 1; this.getList(); - }, + } + , getList() { this.loading = true; @@ -361,22 +396,26 @@ export default { this.list = [] this.total = 0 }) - }, + } + , handleCurrentChange(val) { this.filterQuery.page = val.page; this.getList(); - }, + } + , prescribeClick(_this, row) { _this.curRow = row; _this.refreshCodesPanel(_this); - }, + } + , refreshCodesPanel(_this) { _this.panelALive = false; _this.$nextTick(() => { _this.panelALive = true; }); - }, + } + , deleteDialog(_this, row) { _this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", { @@ -389,7 +428,8 @@ export default { }) .catch(() => { }); - }, + } + , deleteOrders(data) { this.loading = true; this.deleteData.billNo = data; @@ -412,7 +452,8 @@ export default { }) .catch(() => { }); - }, + } + , }, diff --git a/src/views/collect/DealOrder.vue b/src/views/collect/DealOrder.vue index 95d77011..5d304017 100644 --- a/src/views/collect/DealOrder.vue +++ b/src/views/collect/DealOrder.vue @@ -45,19 +45,19 @@ type="primary" :disabled="isSelectOrder" @click.native="selectPrescribe()" - >选入单据 + >选入单据1 单据挂起 + >单据挂起1 处理完成 + >处理完成1 @@ -216,6 +216,7 @@ append-to-body > @@ -521,6 +522,7 @@ export default { //选择单据 selectPrescribe() { + console.log(this.formData.workPlaceCode) this.selectPrescriptionVisible = true; }, diff --git a/src/views/collect/DealOrderBlank.vue b/src/views/collect/DealOrderBlank.vue index 341f0c61..5d304017 100644 --- a/src/views/collect/DealOrderBlank.vue +++ b/src/views/collect/DealOrderBlank.vue @@ -38,26 +38,26 @@ 下一单据 选入单据 + >选入单据1 单据挂起 + >单据挂起1 处理完成 + >处理完成1 @@ -216,6 +216,7 @@ append-to-body > @@ -234,9 +235,10 @@ import prescribeCodePanel from "./PanelOrderTagCode"; 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 {draftOrder, finishOrder, startSplit, tagCode} from "@/api/collect/splitCreateOrder"; import {selectCorpList} from "@/api/basic/basicUnitMaintain"; import {delDrugLevel} from "@/api/basic/product/drugUdiinfos"; +import {getNextOrder} from "@/api/collect/collectOrder"; export default { /** @@ -265,7 +267,7 @@ export default { list: [], total: 0, defaultSort: {prop: 'createTime', order: 'desc'}, - formDataVisible:{ + formDataVisible: { operationType: null, unitTittle: "往来单位", corpType: 1, @@ -309,7 +311,7 @@ export default { methods: { findFromInvList(val) { let cQuery = { - corpType:this.formDataVisible.corpType, + corpType: this.formDataVisible.corpType, }; selectCorpList(cQuery) .then((response) => { @@ -318,10 +320,13 @@ export default { .catch(() => { }); }, - workPlaceCodeChange(value){ - this.curWorkPlaces.forEach(item => {if(item.workplaceId == value){ this.formDataVisible = item - } }) - if (this.formDataVisible.operationType == 1){ + workPlaceCodeChange(value) { + this.curWorkPlaces.forEach(item => { + if (item.workplaceId == value) { + this.formDataVisible = item + } + }) + if (this.formDataVisible.operationType == 1) { this.findFromInvList(""); } return @@ -355,7 +360,7 @@ export default { } listPage(query).then((res) => { this.curWorkPlaces = res.data.list || []; - if (this.curWorkPlaces.length == 1 && this.formData.workPlaceCode == null) { + if (this.curWorkPlaces.length == 1 && this.formData.workPlaceCode == null) { this.formData.workPlaceCode = this.curWorkPlaces[0].workplaceId; } this.workPlaceCodeChange(this.formData.workPlaceCode); @@ -454,12 +459,13 @@ export default { addCode() { if (this.$isBlank(this.filterQuery.code)) { this.filterQuery.code = this.scanCode.trim(); - return; } if (this.$isBlank(this.filterQuery.code) && this.$isBlank(this.scanCode)) { return; } let tagQuery = { + workPlaceCode: this.formData.workPlaceCode, + fromCorp: this.formData.fromCorp, billNo: this.formData.billNo, code: this.filterQuery.code.trim(), }; @@ -468,6 +474,7 @@ export default { if (res.code == 20000) { this.formData.tagStatus = 2; this.formData = res.data; + this.refreshCodesPanel(this); } else { this.$message.error(res.message) } @@ -513,10 +520,27 @@ export default { }, + //选择单据 selectPrescribe() { + console.log(this.formData.workPlaceCode) this.selectPrescriptionVisible = true; }, + //获取下一单据 + nextCollectOrder() { + getNextOrder(this.formData).then(res => { + this.loading = false + if (res.code == 20000) { + this.formData = res.data; + this.dealSplitOrder() + } else { + this.$message.error(res.message) + } + }).catch(() => { + this.loading = false + }) + }, + closeDialog() { this.selectPrescriptionVisible = false; }, @@ -525,9 +549,27 @@ export default { this.selectPrescriptionVisible = false; this.formData = row; this.curRow = row; + this.dealSplitOrder() this.refreshCodesPanel(this); }, + //开始拆零 + dealSplitOrder() { + startSplit(this.formData).then(res => { + this.loading = false + if (res.code == 20000) { + console.log(res.data) + this.refreshCodesPanel(this); + } else { + console.log(res.message) + + } + }).catch(() => { + this.loading = false + }) + }, + + printCodeResult(data, isSuccess) { const resultParts = ["追溯码:" + data.code + "\r\n"]; diff --git a/src/views/collect/prescribe/prescribeOriginPanel.vue b/src/views/collect/prescribe/prescribeOriginPanel.vue index 9feabcdf..b9f8f9d9 100644 --- a/src/views/collect/prescribe/prescribeOriginPanel.vue +++ b/src/views/collect/prescribe/prescribeOriginPanel.vue @@ -220,7 +220,7 @@ export default { }, created() { - getHead("prescribeOriginPanel", "1").then((re) => { + getHead("selectTagPrescribe-1", "1").then((re) => { // 处理返回的数据 this.tableObj1 = re.data; this.tableHeader1 = re.data.tableList; diff --git a/src/views/collect/selectCollectOrderDialog.vue b/src/views/collect/selectCollectOrderDialog.vue index a3a8b1b9..d15cb521 100644 --- a/src/views/collect/selectCollectOrderDialog.vue +++ b/src/views/collect/selectCollectOrderDialog.vue @@ -9,11 +9,11 @@ class="query-form-item" :label="item.columnDesc+`:`" :key="item.id"> @@ -35,19 +35,19 @@ class="query-form-item" :label="item.columnDesc+`:`"> + v-model="filterQuery[item.columnName]" + :placeholder="item.columnDesc" + @change="executeFuc($event,'5',item.checkRules)" + :disabled="executeEval(null,item.disabledFuc,false)" + filterable + remote + :remote-method="(query) => executeFuc(query,'5',item.clickFuc)" + clearable> @@ -55,26 +55,26 @@ class="query-form-item" :label="item.columnDesc+`:`"> @@ -84,9 +84,9 @@ 显示/隐藏搜索栏 重置 + v-if="item.columnType == 'id' && executeEval(row,item.expression,true)" + type="index" :label="item.columnDesc">