From 9babd49ac15718ce1cae25f0953b6f0a8d481d54 Mon Sep 17 00:00:00 2001 From: guoshuang Date: Thu, 6 Jan 2022 18:05:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=90=E5=93=81=E5=87=BA=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/lang/cn.ts | 1 + src/i18n/lang/en.ts | 1 + .../outbound/stoOutbound/DN-delivergoods.vue | 120 ++++++++++++------ .../product/outbound/stoOutbound/config.ts | 5 + .../product/outbound/stoOutbound/detail.vue | 2 +- .../product/outbound/stoOutbound/model.ts | 18 ++- src/pages/raw/commission/entrant/index.vue | 20 ++- src/pages/raw/commission/goOut/index.vue | 20 ++- src/utils/url.ts | 4 +- 9 files changed, 136 insertions(+), 55 deletions(-) diff --git a/src/i18n/lang/cn.ts b/src/i18n/lang/cn.ts index d26df54..f8e052e 100644 --- a/src/i18n/lang/cn.ts +++ b/src/i18n/lang/cn.ts @@ -102,6 +102,7 @@ export default { dn_Tip2: '实际退货数量不能大于需求数量', dn_Tip3: '实际收货数量小于需求数量', Line: '行项目', + po_Deliver: '出库', //交接菜单页 Handover: '交接', Picking: '拣配', diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index a9b85e4..50467df 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -305,6 +305,7 @@ export default { Line: 'rowItem', screen: 'screen', time: 'Please select the time first', + po_Deliver: 'deliver', //成品入库主菜单 product_item1: 'FG inward', product_item2: 'Transfer vehicle offline', diff --git a/src/pages/product/outbound/stoOutbound/DN-delivergoods.vue b/src/pages/product/outbound/stoOutbound/DN-delivergoods.vue index 4dfc198..0dc84d8 100644 --- a/src/pages/product/outbound/stoOutbound/DN-delivergoods.vue +++ b/src/pages/product/outbound/stoOutbound/DN-delivergoods.vue @@ -33,7 +33,7 @@ - + @@ -42,25 +42,28 @@ + - + - + - - {{ $t('message.detailed') }} + + + {{ $t('message.detailed') }} - + + + + {{ $t('message.po_Deliver') }} @@ -141,20 +144,33 @@ export default class stoOutboundDom extends BasePage { this.$form.setRules(this.rules); model.queryReturningTypeList(); } - onCheck(e: any) { - console.log('e.data', e.data); - this.selectMaterielList = []; - e.data.forEach((line: any) => { - const { lineData: item } = line; - this.selectMaterielList.push(item); - }); - } + //去掉页面表格,没有了onCheck方法 + // onCheck(e: any) { + // console.log('e.data', e.data); + // this.selectMaterielList = []; + // e.data.forEach((line: any) => { + // const { lineData: item } = line; + // this.selectMaterielList.push(item); + // }); + // } back() { this.form.barCode = ''; this.model.orderInInfo.stoAmount = 0; this.selectMaterielList = []; uni.navigateBack({ delta: 1 }); - this.$table.onEmpty(); + //this.$table.onEmpty(); + } + //查询单号详细页面 + async detailed() { + if (!this.form.orderNo) { + uni.showToast({ + icon: 'none', + title: this.$t('message.Commission_tips1') as any, + }); + return; + } + await this.model.queryDetailed(this.form.orderNo); + this.toPage(this.page.product.outbound.stoOutboundDetail); } async query() { if (!this.form.orderNo) { @@ -220,7 +236,7 @@ export default class stoOutboundDom extends BasePage { /** * 条码回车 */ - + //扫码也要改,扫码 onSubmit() { this.$form.validate(async (valid: boolean) => { // if (this.form.productCode.slice(0, 9) != this.form.barCode.slice(0, 9)) { @@ -265,6 +281,7 @@ export default class stoOutboundDom extends BasePage { // // this.materialList.push(res); // this.form.scanAmount = res.scanAmount; // } + //guoshuang 注掉 if (this.materialList.length == 0) { await this.materialList.push(res); this.form.scanAmount += 1; @@ -308,26 +325,46 @@ export default class stoOutboundDom extends BasePage { // } else { this.$form.validate(async (valid: boolean) => { if (!valid) return; - let selctlist: any = []; - this.selectMaterielList.forEach((item: any, index: any) => { - // item.originWl = item.locCode; - selctlist[index] = { - barCode: item.barcode, - keepBy: session.loginName, - loginName: session.loginName, - order3: this.form.orderNo, - orderType: 4, - type: 0, - productCode: item.productCode, - productDescZh: item.productDescZh, - orderItem: this.form.rowItem, - originWl: item.locCode, - dockCode: item.dockCode, - dockName: item.dockName, - whCode: item.whCode, - regionCode: item.regionCode, - }; - }); + if (parseInt(this.form.orderAmount) <= this.form.scanAmount) { + uni.showToast({ + icon: 'none', + title: this.$t('message.product_Tip6') as string, + }); + return; + } + //let selctlist: any = []; + //selectMaterielList 是选中表格数据列表 + // this.selectMaterielList.forEach((item: any, index: any) => { + // // item.originWl = item.locCode; + // selctlist[index] = { + // barCode: item.barcode, + // keepBy: session.loginName, + // loginName: session.loginName, + // //单号 + // order3: this.form.orderNo, + // orderType: 4, + // type: 0, + // productCode: item.productCode, + // productDescZh: item.productDescZh, + // orderItem: this.form.rowItem, + // originWl: item.locCode, + // dockCode: item.dockCode, + // dockName: item.dockName, + // whCode: item.whCode, + // regionCode: item.regionCode, + // }; + // }); + const selctlist = { + barcode: this.form.barCode, + loginName: session.loginName, + factoryCode: session.factoryCode, + keepBy: session.loginName, + order3: this.form.orderNo, + orderItem: this.form.rowItem, + type: 0, + orderType: 4, + productCode: this.form.productCode, + }; await this.model.confirmMove(selctlist); // this.$form.resetFields(); // // this.form.barCode = ''; @@ -336,10 +373,11 @@ export default class stoOutboundDom extends BasePage { if (this.model.code == '1') { this.materialList = []; // this.model.materielList = []; - this.$table.onCheckAllTap(); + //this.$table.onCheckAllTap(); uni.showToast({ icon: 'success', title: 'success' }); } }); + this.form.orderNo = ''; this.form.barCode = ''; this.form.productCode = ''; model.orderInInfo.stoAmount = 0; diff --git a/src/pages/product/outbound/stoOutbound/config.ts b/src/pages/product/outbound/stoOutbound/config.ts index 9f6bfc3..fba8638 100644 --- a/src/pages/product/outbound/stoOutbound/config.ts +++ b/src/pages/product/outbound/stoOutbound/config.ts @@ -18,4 +18,9 @@ export const headers = [ key: "productDescZh", width: 300, }, + { + label: vm.$t("message.Line"), + key: "order2", + width: 300, + }, ]; diff --git a/src/pages/product/outbound/stoOutbound/detail.vue b/src/pages/product/outbound/stoOutbound/detail.vue index a6fad62..f1b6367 100644 --- a/src/pages/product/outbound/stoOutbound/detail.vue +++ b/src/pages/product/outbound/stoOutbound/detail.vue @@ -4,7 +4,7 @@ - {{ $t('message.product_StoListDetails') }} + {{ $t('message.CommissionedGoOutDetails') }} diff --git a/src/pages/product/outbound/stoOutbound/model.ts b/src/pages/product/outbound/stoOutbound/model.ts index 3135c3e..281bb76 100644 --- a/src/pages/product/outbound/stoOutbound/model.ts +++ b/src/pages/product/outbound/stoOutbound/model.ts @@ -162,7 +162,7 @@ export class ReturningModule extends VuexModule { * @param orderNo */ @MutationAction - async confirmMove(list: any[]) { + async confirmMove(list: any) { const { code, data } = await http.post(url.outbound.stoOutbound.Bookkeeping, list); console.log('res数据', data, code); // if (code == '1') { @@ -173,6 +173,22 @@ export class ReturningModule extends VuexModule { const materielList: any = []; return { code, materielList }; } + /** + * 查询详细 + * @param orderNo + */ + @MutationAction + async queryDetailed(order1: string) { + const { code, data } = await http.post(url.outbound.stoOutbound.getDetailByorderNo, { + order1, + loginName: session.loginName, + factoryCode: session.factoryCode, + }); + console.log('res数据', data, code); + const materielList = data; + console.log(">>>>>>>",materielList); + return { code, materielList }; + } } export default getModule(ReturningModule); diff --git a/src/pages/raw/commission/entrant/index.vue b/src/pages/raw/commission/entrant/index.vue index 458391f..cf440b9 100644 --- a/src/pages/raw/commission/entrant/index.vue +++ b/src/pages/raw/commission/entrant/index.vue @@ -39,11 +39,13 @@ @bindpicker="materialChoice" showKey="value" valKey="value" - :val="wlCode" + :val="every.materialCode" class="search" :options="materialList" /> + + {{ $t("message.CommissionedMaterielDesc") @@ -184,7 +186,7 @@ export default class dnReceiptDom extends BasePage { //所选择的库位 wlCode: any = ""; //页面初始化 - async onReady() { + async onLoad() { //页面初始化 获取可选库位 let means: any = JSON.parse( localStorage.getItem("__GWMS_APP_STATE_DATA__") as any @@ -197,7 +199,7 @@ export default class dnReceiptDom extends BasePage { workArea: session.workareaCode, }; let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content); - console.log("res res",res[0]); + console.log("res res",res); // 库位列表是undefined 委外入库、委外出库都是同样的问题 //guoshuang 修改 库位列表undefiend res.forEach((item: any) => { @@ -227,6 +229,7 @@ export default class dnReceiptDom extends BasePage { pickerName.value = item.materialCode; this.materialList.push(pickerName); }); + this.every = this.material[0]; } //选择物料后触发的回调事件 本次数量:receiptAmount 需求数量:requestAmount materialChoice(e: any) { @@ -391,7 +394,7 @@ export default class dnReceiptDom extends BasePage { height: 100rpx; display: flex; .material-left { - width: 50%; + width: 100%; height: 100%; display: flex; view { @@ -399,8 +402,13 @@ export default class dnReceiptDom extends BasePage { line-height: 100rpx; } } + } + .material { + width: 100%; + height: 100rpx; + display: flex; .material-right { - width: 50%; + width: 100%; height: 100%; display: flex; .material-right-title { @@ -409,7 +417,7 @@ export default class dnReceiptDom extends BasePage { line-height: 100rpx; } .material-right-code { - width: 190rpx; + width: 80%; height: 100%; // line-height: 100rpx; } diff --git a/src/pages/raw/commission/goOut/index.vue b/src/pages/raw/commission/goOut/index.vue index 7ded4c2..483ea21 100644 --- a/src/pages/raw/commission/goOut/index.vue +++ b/src/pages/raw/commission/goOut/index.vue @@ -39,11 +39,13 @@ @bindpicker="materialChoice" showKey="value" valKey="value" - :val="wlCode" + :val="every.materialCode" class="search" :options="materialList" /> + + {{ $t("message.CommissionedMaterielDesc") @@ -90,7 +92,7 @@ @bindpicker="LocationChoice" showKey="value" valKey="value" - :val="wlCode" + :val="wlCode.value" class="search" :options="Location" /> @@ -197,6 +199,7 @@ export default class dnReceiptDom extends BasePage { workArea: session.workareaCode, }; let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content); + console.log("////res",res); //库位为undefined,打印的res信息格式为[[],[]],且里面两个arry相同 //guoshuang 修改 库位列表undefined res.forEach((item: any) => { @@ -225,6 +228,8 @@ export default class dnReceiptDom extends BasePage { pickerName.value = item.materialCode; this.materialList.push(pickerName); }); + this.every = this.material[0]; + console.log("materialList????", this.materialList); } //选择物料后触发的回调事件 本次数量:receiptAmount 需求数量:requestAmount materialChoice(e: any) { @@ -390,7 +395,7 @@ export default class dnReceiptDom extends BasePage { height: 100rpx; display: flex; .material-left { - width: 50%; + width: 100%; height: 100%; display: flex; view { @@ -398,8 +403,13 @@ export default class dnReceiptDom extends BasePage { line-height: 100rpx; } } + } + .material { + width: 100%; + height: 100rpx; + display: flex; .material-right { - width: 50%; + width: 100%; height: 100%; display: flex; .material-right-title { @@ -408,7 +418,7 @@ export default class dnReceiptDom extends BasePage { line-height: 100rpx; } .material-right-code { - width: 190rpx; + width: 80%; height: 100%; // line-height: 100rpx; } diff --git a/src/utils/url.ts b/src/utils/url.ts index eac86cf..ebeeebc 100644 --- a/src/utils/url.ts +++ b/src/utils/url.ts @@ -123,13 +123,15 @@ export const url = { info: '/wmspda/material/orderout/queryStoPlan', findProdInfoByDN: '/wmspda/fg/findProdInfoByDN', yuetaiType: '/wmspda/fg/queryDocksUnderWareHouse', - Bookkeeping: '/wmspda/fg/confirmMove', + Bookkeeping: '/wmspda/fg/scanBarcodeDN', + // Bookkeeping: '/wmspda/fg/confirmMove', checkScan: '/wmspda/fg/getMaterialByCode', getMaterialByCode: '/wmspda/fg/getMaterialByCode', queryOrder: '/wmspda/material/outsourcing/into/queryOrder', submit: '/wmspda/material/outsourcing/into/materialComplete', materialComplete: '/wmspda/material/outsourcing/materialComplete', outsourcingQueryOrder: '/wmspda/material/outsourcing/queryOrder', + getDetailByorderNo: '/wmspda/fg/queryListInfoByDnNo', }, }, inbound: {