From 04167f941728a7a957915d3a4e002b702593e4cf Mon Sep 17 00:00:00 2001 From: anthonywj Date: Fri, 28 Apr 2023 11:43:55 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E9=AA=8C=E6=94=B6=E6=8C=89=E5=8D=95?= =?UTF-8?q?=E9=80=80=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/inout/DialogCreateOrder.vue | 114 +++++++++++++++++++++++--- 1 file changed, 104 insertions(+), 10 deletions(-) diff --git a/src/views/inout/DialogCreateOrder.vue b/src/views/inout/DialogCreateOrder.vue index c071ee84..475fda3b 100644 --- a/src/views/inout/DialogCreateOrder.vue +++ b/src/views/inout/DialogCreateOrder.vue @@ -24,12 +24,10 @@ 立即提交 - 未配货提交 - @@ -211,6 +209,58 @@ + + + + + + + {{ item.name }} + {{ + item.code + }} + + + + + + + + + {{ item.name }} + {{ + item.code + }} + + + + + + + @@ -324,7 +374,7 @@ import { updateCodeBindSup, enterCodeWeb, submitAllocateBiz, } from "../../api/inout/order"; -import {findByFrom, findInvByUser} from "../../api/system/invSubWarehouse"; +import {filterSubAll, findByFrom, findInvByUser} from "../../api/system/invSubWarehouse"; import {parseTime} from "../../utils/coTools"; import {getBasicUnitMaintains} from "../../api/basic/basicUnitMaintain"; import editCodeDialog from "./DialogEditCode"; @@ -335,6 +385,7 @@ import codeDetailPanel from "./PanelCreateOrderCodeDetail"; import bizDetailPanel from "./PanelCreateOrderBizDetail"; import A from "../../plugins/KeyScaner"; import {findByInvUser} from "@/api/basic/busType"; +import {getInvSpaceList} from "@/api/inventory/invSpace"; export default { name: "ioCreateOrder", @@ -371,6 +422,8 @@ export default { fromType: 2, errMsg: null, checkPreInOrders: null, + checkPreInInvCode: null, + checkPreInSpaceCode: null, }, checkPreInArray: [], errView: 0, @@ -388,6 +441,12 @@ export default { curInvOptions: [], busTypeOptions: [], fromInvOptions: [], + + preSpaceShow: false, //是否显示选择预验收界面 + curPreInInvOptions: [], //预验收仓库 + curPreInSpaceOptions: [], //预验收货位 + + curAction: { corpType: 0, genUnit: false, @@ -577,7 +636,8 @@ export default { this.orderFormData.checkPreInOrders = null; this.checkPreInArray = []; this.curAction = this.getActionItem(item); - if ((this.curAction.checkEnable && this.curAction.checkWebNew!=0) || this.viewType == 1) { + debugger + if ((this.curAction.checkEnable && this.curAction.checkWebNew != 0) || this.viewType == 1) { //单据类型需要一次校验 或 单据类型为1,显示业务单据页面 this.bizShow = true; } else this.bizShow = false; @@ -596,8 +656,12 @@ export default { } if (this.curAction.scanPreIn && this.curAction.backPreinType == 1 && this.curAction.preInBack) { this.documentShow = true; + } else if (this.curAction.scanPreIn && this.curAction.backPreinType == 2 && this.curAction.preInBack) { + this.preSpaceShow = true; + this.findPreInInvList(); } else { this.documentShow = false; + this.preSpaceShow = false; } }, @@ -626,6 +690,36 @@ export default { } }, + //切换预验收仓库 + changePreInInv(row) { + this.findPreInSpaceList(row.code); + }, + + //获取预验收仓库 + findPreInInvList() { + let query = { + advanceType: 2, + } + filterSubAll(query) + .then((response) => { + this.curPreInInvOptions = response.data || []; + }) + .catch(() => { + }); + }, + + //获取预验收货位 + findPreInSpaceList(val) { + let query = { + invStorageCode: val, + status: 1, + } + getInvSpaceList(query).then((res) => { + this.curPreInSpaceOptions = res.data.list || []; + }) + }, + + //添加条码 addCode(event) { this.originCode = ""; @@ -643,20 +737,20 @@ export default { this.$message.warning("请选择单据类型!"); return; } - if(this.curAction.corpType === 0 || this.curAction.corpType === 2 || (this.curAction.corpType === 1 && !this.curAction.genUnit)){ - if(this.$isBlank(this.orderFormData.fromCorp)){ + if (this.curAction.corpType === 0 || this.curAction.corpType === 2 || (this.curAction.corpType === 1 && !this.curAction.genUnit)) { + if (this.$isBlank(this.orderFormData.fromCorp)) { this.$message.warning("请选择往来单位!"); return; } } - if(this.curAction.corpType == 3){ - if(this.$isBlank(this.orderFormData.fromInvCode)){ + if (this.curAction.corpType == 3) { + if (this.$isBlank(this.orderFormData.fromInvCode)) { this.$message.warning("请选择往来单位!"); return; } } - if(this.curAction.corpType === 1 && this.curAction.genUnit){ - if(this.$isBlank(this.orderFormData.fromCorp)){ + if (this.curAction.corpType === 1 && this.curAction.genUnit) { + if (this.$isBlank(this.orderFormData.fromCorp)) { this.$message.warning("请选择往来单位!"); return; }