diff --git a/.vscode/settings.json b/.vscode/settings.json index 4beef3a..95d7ab2 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -81,5 +81,14 @@ "redhat.telemetry.enabled": true, "gitlens.advanced.messages": { "suppressGitMissingWarning": true - } + }, + "python.testing.unittestArgs": [ + "-v", + "-s", + "./src", + "-p", + "test*.py" + ], + "python.testing.pytestEnabled": false, + "python.testing.unittestEnabled": true } diff --git a/src/i18n/lang/cn.ts b/src/i18n/lang/cn.ts index ef7338e..a37d3b9 100644 --- a/src/i18n/lang/cn.ts +++ b/src/i18n/lang/cn.ts @@ -100,6 +100,7 @@ export default { po_DemandQuantity: '需求数量', DemandQuantity: '需求', po_ActualQuantity: '实际数量', + selected: '所选物料库存不足', Picked: '已拣数量', po_ReturnGoodsQuantity: '退货数量', po_RemainingQuantity: '剩余数量', @@ -233,6 +234,7 @@ export default { Requisition: '领用单', greater: '不能大于总数', receiveAStation: '接收工位', + target: '目标工位', collecting: '请输入领用单号', MaterialCount: '物料盘点', diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index 25a6287..7f90b47 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -24,7 +24,9 @@ export default { request_Tip11: 'HTTP version is not supported', Pi_tip12: 'The current handover quantity must be equal to the picked quantity', Inventory_query: 'Inventory query', + target: 'The target location', success: 'Success', + selected: 'Insufficient stock of selected material', error: 'Error', successful: 'Query was successful', operation: 'Operation', diff --git a/src/pages/login/login/index.vue b/src/pages/login/login/index.vue index b68837f..7151ea2 100644 --- a/src/pages/login/login/index.vue +++ b/src/pages/login/login/index.vue @@ -193,7 +193,6 @@ export default class LoginPage extends BasePage { } catch (e) { console.log('error', e); } - this.go(); } /////////////////无用代码无用代码 diff --git a/src/pages/raw/handover/picking/ByOrder.vue b/src/pages/raw/handover/picking/ByOrder.vue index 357c667..b13099d 100644 --- a/src/pages/raw/handover/picking/ByOrder.vue +++ b/src/pages/raw/handover/picking/ByOrder.vue @@ -180,9 +180,17 @@ export default class RawReceiptDetail extends BasePage { factoryCode: session.factoryCode, }); this.Location = []; - this.Location = this.model.LocList; - console.log('this.Location', this.Location); - this.wlCode = this.Location[0]; + if (this.model.LocList.length == 0) { + uni.showModal({ + content: this.$t('message.selected') as any, + showCancel: false, + confirmText: this.$t('message.workArea_Confirm') as any, + }); + } else { + this.Location = this.model.LocList; + console.log('this.Location', this.Location); + this.wlCode = this.Location[0]; + } } Add() { if (this.qty == '' || this.wlCode == '') { diff --git a/src/pages/raw/handover/picking/BySummary.vue b/src/pages/raw/handover/picking/BySummary.vue index fa4835e..58fdf1c 100644 --- a/src/pages/raw/handover/picking/BySummary.vue +++ b/src/pages/raw/handover/picking/BySummary.vue @@ -169,9 +169,17 @@ export default class RawReceiptDetail extends BasePage { factoryCode: session.factoryCode, }); this.Location = []; - this.Location = this.model.LocList; - console.log('this.Location', this.Location); - this.wlCode = this.Location[0]; + if (this.model.LocList.length == 0) { + uni.showModal({ + content: this.$t('message.selected') as any, + showCancel: false, + confirmText: this.$t('message.workArea_Confirm') as any, + }); + } else { + this.Location = this.model.LocList; + console.log('this.Location', this.Location); + this.wlCode = this.Location[0]; + } } //添加库位和数量到数据和表格中 Add() { diff --git a/src/pages/raw/handover/picking/config.ts b/src/pages/raw/handover/picking/config.ts index 3253634..358b944 100644 --- a/src/pages/raw/handover/picking/config.ts +++ b/src/pages/raw/handover/picking/config.ts @@ -123,11 +123,11 @@ export const summaryHeaders = [ label: vm.$t('message.Pi_unit'), key: 'unit', }, - // { - // label: '成品型号', - // key: 'prdMaterialDesc', - // width: 300, - // }, + { + label: vm.$t('message.target'), + key: 'sendSpot', + // width: 300, + }, // { // label: '工位', // key: 'sendSpot', @@ -165,7 +165,7 @@ export const orderHeaders = [ key: 'totalHvAmount', }, { - label: vm.$t('message.po_Location'), + label: vm.$t('message.target'), // key: 'currentWkposCode', //key: 'wkposCode', key: 'sendSpot', diff --git a/src/pages/raw/handover/returning/index.vue b/src/pages/raw/handover/returning/index.vue index 8a7ebd1..52d9cca 100644 --- a/src/pages/raw/handover/returning/index.vue +++ b/src/pages/raw/handover/returning/index.vue @@ -150,10 +150,11 @@ export default class returningDom extends BasePage { screen() { this.redirectTo(this.page.raw.handover.returning.filter); } - async query(){ - await this.model.queryOrderInInfo(this.form.prdOrder) + async query() { + await this.model.queryOrderInInfo(this.form.prdOrder); this.form.wlName = this.model.orderInInfo.materialCode; - this.form.sendSpot = this.model.orderInInfo.sendSpot + this.form.sendSpot = this.model.orderInInfo.sendSpot; + this.form.totalBackAmount = this.model.orderInInfo.totalBackAmount; } LocationChoice(e: any) { console.log('e>>>>>>>>>>>>>>>>>>>>>>>>', e); @@ -167,7 +168,6 @@ export default class returningDom extends BasePage { this.form.sapFactoryCode = await this.model.queryDefaultFactoryCode(); //页面初始化 获取可选库位 let means: any = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any); - let sendSpot = JSON.parse(localStorage.getItem('sendSpot') as any); if (JSON.parse(sessionStorage.getItem('data') as any)) { this.data = JSON.parse(sessionStorage.getItem('data') as any); this.form.prdOrder = this.data.label; @@ -208,12 +208,14 @@ export default class returningDom extends BasePage { this.$form.resetFields(); } materialConfirm(v: any) { - console.log('vvvvvv',v) + console.log('vvvvvv', v); this.form.materialCode = v[0].value; this.form.wlName = v[0].label; + console.log('this.model.materielList', this.model.materielList); 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; @@ -236,7 +238,7 @@ export default class returningDom extends BasePage { // (this.form.sendSpot as any) = this.model.orderInInfo.sendSpot; (this.form.sapFactoryCode as any) = this.model.orderInInfo.sapFactoryCode; // delete this.form.wlName; - this.form.wlCode = this.wlCode.label + this.form.wlCode = this.wlCode.label; await this.model.tluSubmit(this.form); // this.$form.resetFields(); this.operatorName = ''; @@ -245,15 +247,15 @@ export default class returningDom extends BasePage { this.model.orderInInfo.sapFactoryCode = ''; // this.model.materielList = []; this.model.materielList.length = 0; - this.empty() + this.empty(); }); } } - async empty(){ - this.form.wlName = '' - this.form.sendSpot = '' - this.form.amount = '' - await this.query() + async empty() { + this.form.wlName = ''; + this.form.sendSpot = ''; + this.form.amount = ''; + await this.query(); } /** * 操作人输入回车 diff --git a/src/pages/raw/handover/returning/model.ts b/src/pages/raw/handover/returning/model.ts index 9bc3951..a131b89 100644 --- a/src/pages/raw/handover/returning/model.ts +++ b/src/pages/raw/handover/returning/model.ts @@ -10,6 +10,7 @@ class OrderInInfo { sapFactoryCode?: any; materialCode?: any; sendSpot?: any; + totalBackAmount?: any; } @Module({ @@ -68,6 +69,7 @@ export class ReturningModule extends VuexModule { amount: item.amount, wkposCode: item.wkposCode, sendSpot: item.sendSpot, + totalBackAmount: item.totalBackAmount, })); console.log('物料列表', data); console.log('物料名列表', materielList); @@ -92,6 +94,7 @@ export class ReturningModule extends VuexModule { amount: item.amount, wkposCode: item.wkposCode, sendSpot: item.sendSpot, + totalBackAmount: item.totalBackAmount, })); //materielList 包含页面table想要展示的字段:sendSpot:接收人;value:物料号;label:订单号 console.log('时间查询物料列表', data);