From 30889bf30e3eab6faac7eaeedf7b8d01bb97ba23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=B3=BD=E8=85=BE?= <1178634255@qq.com> Date: Thu, 20 Jul 2023 15:04:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0=E4=B8=89=E6=9C=9F=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E5=8D=95=E9=85=8D/=E6=8B=A3=E8=B4=A7=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E5=8D=95=E6=97=B6=EF=BC=8C=E4=BC=9A=E5=8F=97?= =?UTF-8?q?=E5=88=B0=E2=80=99=E6=9C=89=E4=B8=89=E6=9C=9F=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E5=8D=95=E9=85=8D/=E6=8B=A3=E8=B4=A7=E2=80=98=E5=8D=95?= =?UTF-8?q?=E6=8D=AE=E7=B1=BB=E5=9E=8B=E7=9A=84=E5=BD=B1=E5=93=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/inout/order.js | 7 +++ src/views/inout/DialogCreateOrder.vue | 48 +++++++++++++++---- src/views/inout/PanelCreateOrderBizDetail.vue | 1 + 3 files changed, 46 insertions(+), 10 deletions(-) diff --git a/src/api/inout/order.js b/src/api/inout/order.js index e92cc7d4..63e2179b 100644 --- a/src/api/inout/order.js +++ b/src/api/inout/order.js @@ -48,6 +48,13 @@ export function submitBiz(query) { data: query }); } +export function delmitBiz(query) { + return axios({ + url: "/warehouse/inout/delmitBiz", + method: "post", + data: query + }); +} export function submitAllocateBiz(query) { return axios({ diff --git a/src/views/inout/DialogCreateOrder.vue b/src/views/inout/DialogCreateOrder.vue index 85b2cfbf..4bba3651 100644 --- a/src/views/inout/DialogCreateOrder.vue +++ b/src/views/inout/DialogCreateOrder.vue @@ -420,6 +420,7 @@ :viewType="viewType" :curBustype="curAction" v-if="isBizDetailAlive" + ref="IoCreateOrderCodeDetail" > @@ -556,7 +557,7 @@ import { submitOrderWeb, saveOrderWeb, updateCodeBindSup, - enterCodeWeb, submitAllocateBiz, rollbackWaitcheck, submitCodeResult, submitCheckResult, + enterCodeWeb, submitAllocateBiz, rollbackWaitcheck, submitCodeResult, submitCheckResult, delmitBiz, } from "../../api/inout/order"; import {filterSubAll, findByFrom, findInvByUser} from "../../api/system/invSubWarehouse"; import {parseTime} from "../../utils/coTools"; @@ -575,6 +576,7 @@ import DialogSelectUnit from "./DialogSelectUnit"; import selectRlDialog from "./DialogSelectRl"; import DialogSelectSpace from "./DialogSelectSpace"; import {isBlank} from "@/utils/strUtil"; +import {getDetailBizs} from "@/api/inout/orderDetailCode"; export default { name: "ioCreateOrder", @@ -619,6 +621,9 @@ export default { preCurSpaceCode: null, //单据 }, + + detailList: [], + total: 0, checkPreInArray: [], errView: 0, //选入相关 @@ -726,6 +731,7 @@ export default { DialogSelectUnit, DialogSelectSpace, selectRlDialog }, methods: { + //获取用户仓库列表 findInvListByUser() { this.curInvOptions = []; @@ -825,7 +831,27 @@ export default { .catch(() => { }); }, + delorderData(){ + //执行清空业务单据详情 + let tQuery = Object.assign( + JSON.parse(JSON.stringify(this.orderFormData)) + ); + tQuery.orderId = this.orderFormData.billNo; + console.log(tQuery.orderId); + delmitBiz(tQuery).then((response) => { + if (response.code === 20000) { + // this.$message.success("成功"); + const codeDetailComponent = this.$refs.IoCreateOrderCodeDetail.getOrderDetails(); + this.closeDialog(); + } else { + // this.$message.error(response.message); + const codeDetailComponent = this.$refs.IoCreateOrderCodeDetail.getOrderDetails(); + } + }); + const codeDetailComponent = this.$refs.IoCreateOrderCodeDetail.getOrderDetails(); + console.log("66:"+codeDetailComponent); + }, //获取往来单位候选列表 findMethod(query) { this.fromOptions = []; @@ -847,7 +873,7 @@ export default { } else if (this.curAction.corpType == 1) { cQuery.corpType = 1; cQuery.outType = 2; - }else if (this.curAction.corpType == 4) { + } else if (this.curAction.corpType == 4) { //供应商信息 cQuery.corpType = 4; } else @@ -861,10 +887,8 @@ export default { this.loading = false; }); }, - //单据类型改变 actionChange(item) { - this.orderFormData.checkPreInOption = null; this.orderFormData.checkPreInOrders = null; this.checkPreInArray = []; @@ -884,6 +908,9 @@ export default { ) { //1.切换往来单位 this.orderFormData.fromCorp = null; + + this.delorderData(); + this.findMethod(); } else if (this.curAction.corpType == 3) { //2. 切换往来仓库 @@ -1139,13 +1166,13 @@ export default { this.$message.error(response.message); this.selectRlTitle = response.message; //判断是出库需要选择供应商的时候把供应商值传过去 - if(tQuery.selectSupId!=null){ - this.codeFormData.selectSupId=tQuery.selectSupId - }else{ - this.codeFormData.selectSupId=false + if (tQuery.selectSupId != null) { + this.codeFormData.selectSupId = tQuery.selectSupId + } else { + this.codeFormData.selectSupId = false } //DI绑定多个产品,请指定对应产品 时候传递关键字做过滤 - this.codeFormData.key ="key"; + this.codeFormData.key = "key"; this.selectRlVisible = true; } else if (response.code == 503) { //该产品绑定多个供应商处理 @@ -1345,6 +1372,7 @@ export default { JSON.parse(JSON.stringify(this.orderFormData)) ); tQuery.orderId = this.orderFormData.billNo; + console.log(tQuery.orderId); if (this.viewType == 2) { //扫码单据立即提交 submitCodes(tQuery).then((response) => { if (response.code === 20000) { @@ -1609,7 +1637,7 @@ export default { //加载选择框候选数据 this.findInvListByUser(); this.initBusType(); - // this.findMethod(this.orderFormData.fromCorp); + // this.findMethod(this.orderFormData.fromCorp); this.findFromInvList(); } else { //新增页面 diff --git a/src/views/inout/PanelCreateOrderBizDetail.vue b/src/views/inout/PanelCreateOrderBizDetail.vue index 207308c8..5c1ff83d 100644 --- a/src/views/inout/PanelCreateOrderBizDetail.vue +++ b/src/views/inout/PanelCreateOrderBizDetail.vue @@ -318,6 +318,7 @@ export default { }); }, + rowChange(val) { this.currentRow = val; if (this.currentRow.batchNo == '')