From a9b26184fe34aea40e69bdb52c7e561769df21bf Mon Sep 17 00:00:00 2001 From: hou <1601990943@qq.com> Date: Wed, 16 Mar 2022 17:06:00 +0800 Subject: [PATCH] =?UTF-8?q?dam-7=20feat=20=E4=BF=AE=E5=A4=8D=20=E9=80=80?= =?UTF-8?q?=E6=96=99=E5=BA=93=E4=BD=8D=E9=97=AE=E9=A2=98=20=20=E6=8B=A3?= =?UTF-8?q?=E9=85=8D=E5=A2=9E=E5=8A=A0=E5=B1=95=E7=A4=BA=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/lang/cn.ts | 2 + src/i18n/lang/en.ts | 2 + src/pages/login/login/index.vue | 2 +- src/pages/raw/handover/picking/config.ts | 8 ++++ src/pages/raw/handover/picking/model.ts | 8 +++- src/pages/raw/handover/returning/index.vue | 47 +++++++--------------- 6 files changed, 34 insertions(+), 35 deletions(-) diff --git a/src/i18n/lang/cn.ts b/src/i18n/lang/cn.ts index aa296d6..f902b10 100644 --- a/src/i18n/lang/cn.ts +++ b/src/i18n/lang/cn.ts @@ -148,8 +148,10 @@ export default { finishedProduct: '请先选择成品编码', Pi_InputMrp: '请输入MRP', Pi_InputFactory: '请输入工厂代码', + shortage: '短缺数量', Pi_OrderNoNotSelected: '未选中订单号', Pi_NoDataFound: '未查询到数据', + differences: '差异数量', Pi_NoData: '数据为0!', Pi_QueryResults: '查询结果', Pi_Summary: '汇总', diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index 34b72b9..d924b3c 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -22,6 +22,8 @@ export default { inventory: 'inventory', request_Tip9: 'Service Unavailable', request_Tip10: 'Gateway timeout', + differences: 'differences', + shortage: 'shortage', request_Tip11: 'HTTP version is not supported', Pi_tip12: 'The current handover quantity must be equal to the picked quantity', Inventory_query: 'Inventory query', diff --git a/src/pages/login/login/index.vue b/src/pages/login/login/index.vue index 4a542ff..15ef875 100644 --- a/src/pages/login/login/index.vue +++ b/src/pages/login/login/index.vue @@ -150,7 +150,7 @@ export default class LoginPage extends BasePage { console.log('image', this.image); console.log('Version////', this.Version); } - Version = '1.0.8'; + Version = '1.0.9'; async update() { try { await session.QueryVersion(server.serverAddress); diff --git a/src/pages/raw/handover/picking/config.ts b/src/pages/raw/handover/picking/config.ts index 3bd6345..aeb81c0 100644 --- a/src/pages/raw/handover/picking/config.ts +++ b/src/pages/raw/handover/picking/config.ts @@ -101,6 +101,10 @@ export const summaryHeaders = [ label: vm.$t('message.po_DemandQuantity'), key: 'amount', }, + { + label: vm.$t('message.shortage'), + key: 'differences', + }, { label: vm.$t('message.Pi_CurrentPickingQuantity'), key: 'currentAmount', @@ -156,6 +160,10 @@ export const orderHeaders = [ label: vm.$t('message.po_DemandQuantity'), key: 'amount', }, + { + label: vm.$t('message.shortage'), + key: 'differences', + }, { label: vm.$t('message.Pi_CurrentPickingQuantity'), key: 'currentAmount', diff --git a/src/pages/raw/handover/picking/model.ts b/src/pages/raw/handover/picking/model.ts index ff04851..fc79c44 100644 --- a/src/pages/raw/handover/picking/model.ts +++ b/src/pages/raw/handover/picking/model.ts @@ -274,7 +274,9 @@ export class PickingModule extends VuexModule { @MutationAction async queryProOrderResult(params: any) { const { list: proOrderResultList }: any = await http.post(url.sortscan.query.prdorderList, params); - proOrderResultList.forEach((_: any) => (_.loginName = params.loginName)); + proOrderResultList.forEach((item: any) => { + (item.loginName = params.loginName), (item.differences = parseFloat(item.amount) - parseFloat(item.totalMoAmount)); + }); return { proOrderResultList }; } @@ -292,7 +294,9 @@ export class PickingModule extends VuexModule { // }); vm.customToast(vm.$t('message.Pi_NoDataFound') as any); } - aggregateList.forEach((_: any) => (_.loginName = params.loginName)); + aggregateList.forEach((item: any) => { + (item.loginName = params.loginName), (item.differences = parseFloat(item.amount) - parseFloat(item.totalMoAmount)); + }); return { aggregateList }; } /** diff --git a/src/pages/raw/handover/returning/index.vue b/src/pages/raw/handover/returning/index.vue index fd5c089..7aca7b4 100644 --- a/src/pages/raw/handover/returning/index.vue +++ b/src/pages/raw/handover/returning/index.vue @@ -153,75 +153,58 @@ export default class returningDom extends BasePage { async query() { await this.model.queryOrderInInfo(this.form.prdOrder); this.form.materialCode = this.model.orderInInfo.materialCode; - // this.form.materialCode = this.model.orderInInfo.materialCode; this.form.sendSpot = this.model.orderInInfo.sendSpot; this.form.totalBackAmount = this.model.orderInInfo.totalBackAmount; } LocationChoice(e: any) { - console.log('e>>>>>>>>>>>>>>>>>>>>>>>>', e); this.wlCode = e.pickerName; this.form.wkposCode = e.pickerName.sendSpot; } - // 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕 async onReady() { - this.$form.setRules(this.rules); - // this.model.queryReturningTypeList(); - this.form.sapFactoryCode = await this.model.queryDefaultFactoryCode(); - //页面初始化 获取可选库位 - let means: any = JSON.parse(uni.getStorageSync('__GWMS_APP_STATE_DATA__') as any); - if (JSON.parse(uni.getStorageSync('data') as any)) { - this.data = JSON.parse(uni.getStorageSync('data') as any); - this.form.prdOrder = this.data.label; - this.form.materialCode = this.data.value; - this.form.sendSpot = this.data.sendSpot; - // this.form.amount = this.data.amount; - } - - if (this.form.prdOrder != null) { - model.queryOrderInInfo(this.form.prdOrder); - } - uni.removeStorageSync('data'); let content = { - loginName: means.session.user.loginName, + loginName: session.loginName, sendSpot: null, - factoryCode: means.session.user.factoryCode, + factoryCode: session.user.factoryCode, workArea: session.workareaCode, }; let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content); res.forEach((item: any) => { let pickerName: any = {}; pickerName.label = item.locationCode; - // pickerName.value = item.locationCode + '(' + item.sendSpot + ')'; pickerName.value = item.locationCode; pickerName.sendSpot = item.sendSpot; this.Location.push(pickerName); }); this.wlCode = this.Location[0]; + this.form.sapFactoryCode = await this.model.queryDefaultFactoryCode(); + let locData = uni.getStorageSync('data') as any; + let newlocData = JSON.parse(locData); + if (newlocData != null || newlocData != null || newlocData != undefined) { + this.data = newlocData; + this.form.prdOrder = this.data.label; + this.form.materialCode = this.data.value; + this.form.sendSpot = this.data.sendSpot; + } + if (this.form.prdOrder != null) { + model.queryOrderInInfo(this.form.prdOrder); + } + uni.removeStorageSync('data'); } back() { - // this.form.sendSpot = ''; - // this.form.wkposCode = ''; this.model.orderInInfo.sapFactoryCode = ''; this.operatorName = ''; - // this.form.rfPwd = null; this.model.materielList.length = 0; uni.navigateBack({ delta: 1 }); this.$form.resetFields(); } materialConfirm(v: any) { - console.log('vvvvvv', v); this.form.materialCode = v[0].value; - //this.form.wlName = v[0].label; this.model.materielList.forEach((item: any) => { if (this.form.materialCode == item.label) { - // this.form.amount = item.amount; - console.log('item', item); this.form.sendSpot = item.sendSpot; this.form.totalBackAmount = item.totalBackAmount; - // this.form.wkposCode = item.wkposCode; } }); - console.log('this.form', this.form); } /** * 上传