From 52e8d90221c4c945f101f413fea66f5e9f494658 Mon Sep 17 00:00:00 2001 From: hou <1601990943@qq.com> Date: Mon, 13 Dec 2021 13:16:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=20=E9=80=80=E8=B4=A7=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E5=B7=A5=E4=BD=9C=E5=8C=BA=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= 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 | 2 ++ src/pages/login/area/index.vue | 2 +- src/pages/raw/commission/entrant/index.vue | 3 +-- src/pages/raw/commission/goOut/index.vue | 3 +-- src/pages/raw/handover/aggregating/ByOrder.vue | 3 +-- src/pages/raw/handover/feeding/Location.vue | 3 +-- src/pages/raw/handover/picking/ByOrder.vue | 3 +-- src/pages/raw/handover/picking/BySummary.vue | 3 +-- src/pages/raw/handover/picking/idetailed.vue | 3 +-- src/pages/raw/handover/picking/total.vue | 3 +-- src/pages/raw/handover/returning/index.vue | 3 +-- src/pages/raw/ingoods/dnReceipt/ImportDN.vue | 3 +-- src/pages/raw/ingoods/dnReceipt/dnReceiving.vue | 3 +-- src/pages/raw/ingoods/dnReceipt/idetailed.vue | 3 +-- .../raw/ingoods/dnReturnGoods/Local-details.vue | 1 - src/pages/raw/ingoods/dnReturnGoods/Location.vue | 15 ++++++++++++++- src/pages/raw/ingoods/dnReturnGoods/model.ts | 7 +++---- src/pages/raw/ingoods/poReceipt/idetailed.vue | 3 +-- src/pages/raw/ingoods/poReceipt/poReceiving.vue | 3 +-- .../raw/warehouse/rowInventory/idetailed.vue | 3 +-- 21 files changed, 36 insertions(+), 37 deletions(-) diff --git a/src/i18n/lang/cn.ts b/src/i18n/lang/cn.ts index 16693f1..a4b465b 100644 --- a/src/i18n/lang/cn.ts +++ b/src/i18n/lang/cn.ts @@ -191,6 +191,7 @@ export default { return_Tip3: "数量不能为空", return_Tip4: "退料数量不能大于总数", quantitys: "不能大于应退货数量", + actual: "实际退货数量不等于应退货数量", //库内主菜单 Warehouse: "成品库内", diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index aca0db1..9c748c3 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -192,6 +192,8 @@ export default { return_Tip3: "Qty cannot be empty", return_Tip4: "Return Qty cannot be greater than total Qty", quantitys: "Cannot be greater than the quantity to be returned", + actual: + "The actual returned quantity is not equal to the quantity to be returned", //库内主菜单 Warehouse: "FG WH", diff --git a/src/pages/login/area/index.vue b/src/pages/login/area/index.vue index d640c2e..f4aa153 100644 --- a/src/pages/login/area/index.vue +++ b/src/pages/login/area/index.vue @@ -90,7 +90,7 @@ export default class AreaPage extends BasePage { headers = headers; async onOk() { - const selection = area.areas.find((a: any) => a.checked); + const selection: any = area.areas.find((a: any) => a.checked); if (selection === undefined) { uni.showToast({ icon: "none", diff --git a/src/pages/raw/commission/entrant/index.vue b/src/pages/raw/commission/entrant/index.vue index c45702a..7ba96e2 100644 --- a/src/pages/raw/commission/entrant/index.vue +++ b/src/pages/raw/commission/entrant/index.vue @@ -187,13 +187,12 @@ export default class dnReceiptDom extends BasePage { let means: any = JSON.parse( localStorage.getItem("__GWMS_APP_STATE_DATA__") as any ); - let user: any = session.user; let sendSpot = JSON.parse(localStorage.getItem("sendSpot") as any); let content = { loginName: means.session.user.loginName, sendSpot: sendSpot, factoryCode: means.session.user.factoryCode, - workArea: user.list[0].workareaCode, + workArea: session.workareaCode, }; let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content); res.forEach((item: any) => { diff --git a/src/pages/raw/commission/goOut/index.vue b/src/pages/raw/commission/goOut/index.vue index 78b7748..2c6dc83 100644 --- a/src/pages/raw/commission/goOut/index.vue +++ b/src/pages/raw/commission/goOut/index.vue @@ -187,13 +187,12 @@ export default class dnReceiptDom extends BasePage { let means: any = JSON.parse( localStorage.getItem("__GWMS_APP_STATE_DATA__") as any ); - let user: any = session.user; let sendSpot = JSON.parse(localStorage.getItem("sendSpot") as any); let content = { loginName: means.session.user.loginName, sendSpot: sendSpot, factoryCode: means.session.user.factoryCode, - workArea: user.list[0].workareaCode, + workArea: session.workareaCode, }; let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content); res.forEach((item: any) => { diff --git a/src/pages/raw/handover/aggregating/ByOrder.vue b/src/pages/raw/handover/aggregating/ByOrder.vue index e6fe523..7d32312 100644 --- a/src/pages/raw/handover/aggregating/ByOrder.vue +++ b/src/pages/raw/handover/aggregating/ByOrder.vue @@ -265,13 +265,12 @@ export default class RawReceiptDetail extends BasePage { let means: any = JSON.parse( localStorage.getItem("__GWMS_APP_STATE_DATA__") as any ); - let user: any = session.user; let sendSpot = JSON.parse(localStorage.getItem("sendSpot") as any); let content = { loginName: means.session.user.loginName, sendSpot: sendSpot, factoryCode: means.session.user.factoryCode, - workArea: user.list[0].workareaCode, + workArea: session.workareaCode, }; let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content); res.forEach((item: any) => { diff --git a/src/pages/raw/handover/feeding/Location.vue b/src/pages/raw/handover/feeding/Location.vue index ee1d338..7b69e6e 100644 --- a/src/pages/raw/handover/feeding/Location.vue +++ b/src/pages/raw/handover/feeding/Location.vue @@ -311,13 +311,12 @@ export default class RawReceiptDetail extends BasePage { let means: any = JSON.parse( localStorage.getItem("__GWMS_APP_STATE_DATA__") as any ); - let user: any = session.user; let sendSpot = JSON.parse(localStorage.getItem("sendSpot") as any); let content = { loginName: means.session.user.loginName, sendSpot: sendSpot, factoryCode: means.session.user.factoryCode, - workArea: user.list[0].workareaCode, + workArea: session.workareaCode, }; let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content); res.forEach((item: any) => { diff --git a/src/pages/raw/handover/picking/ByOrder.vue b/src/pages/raw/handover/picking/ByOrder.vue index f0a0f05..a29ea8d 100644 --- a/src/pages/raw/handover/picking/ByOrder.vue +++ b/src/pages/raw/handover/picking/ByOrder.vue @@ -300,13 +300,12 @@ export default class RawReceiptDetail extends BasePage { let means: any = JSON.parse( localStorage.getItem("__GWMS_APP_STATE_DATA__") as any ); - let user: any = session.user; let sendSpot = JSON.parse(localStorage.getItem("sendSpot") as any); let content = { loginName: means.session.user.loginName, sendSpot: sendSpot, factoryCode: means.session.user.factoryCode, - workArea: user.list[0].workareaCode, + workArea: session.workareaCode, }; let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content); res.forEach((item: any) => { diff --git a/src/pages/raw/handover/picking/BySummary.vue b/src/pages/raw/handover/picking/BySummary.vue index d58694a..6479e64 100644 --- a/src/pages/raw/handover/picking/BySummary.vue +++ b/src/pages/raw/handover/picking/BySummary.vue @@ -305,13 +305,12 @@ export default class RawReceiptDetail extends BasePage { let means: any = JSON.parse( localStorage.getItem("__GWMS_APP_STATE_DATA__") as any ); - let user: any = session.user; let sendSpot = JSON.parse(localStorage.getItem("sendSpot") as any); let content = { loginName: means.session.user.loginName, sendSpot: sendSpot, factoryCode: means.session.user.factoryCode, - workArea: user.list[0].workareaCode, + workArea: session.workareaCode, }; let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content); res.forEach((item: any) => { diff --git a/src/pages/raw/handover/picking/idetailed.vue b/src/pages/raw/handover/picking/idetailed.vue index 965e692..5c32ed5 100644 --- a/src/pages/raw/handover/picking/idetailed.vue +++ b/src/pages/raw/handover/picking/idetailed.vue @@ -120,13 +120,12 @@ export default class RawReceiptDetail extends BasePage { let means: any = JSON.parse( localStorage.getItem("__GWMS_APP_STATE_DATA__") as any ); - let user: any = session.user; let sendSpot = JSON.parse(localStorage.getItem("sendSpot") as any); let content = { loginName: means.session.user.loginName, sendSpot: sendSpot, factoryCode: means.session.user.factoryCode, - workArea: user.list[0].workareaCode, + workArea: session.workareaCode, }; let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content); res.forEach((item: any) => { diff --git a/src/pages/raw/handover/picking/total.vue b/src/pages/raw/handover/picking/total.vue index ef6a32e..bbc9287 100644 --- a/src/pages/raw/handover/picking/total.vue +++ b/src/pages/raw/handover/picking/total.vue @@ -120,13 +120,12 @@ export default class RawReceiptDetail extends BasePage { let means: any = JSON.parse( localStorage.getItem("__GWMS_APP_STATE_DATA__") as any ); - let user: any = session.user; let sendSpot = JSON.parse(localStorage.getItem("sendSpot") as any); let content = { loginName: means.session.user.loginName, sendSpot: sendSpot, factoryCode: means.session.user.factoryCode, - workArea: user.list[0].workareaCode, + workArea: session.workareaCode, }; let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content); res.forEach((item: any) => { diff --git a/src/pages/raw/handover/returning/index.vue b/src/pages/raw/handover/returning/index.vue index 3cb3524..7f2768c 100644 --- a/src/pages/raw/handover/returning/index.vue +++ b/src/pages/raw/handover/returning/index.vue @@ -250,7 +250,6 @@ export default class returningDom extends BasePage { let means: any = JSON.parse( localStorage.getItem("__GWMS_APP_STATE_DATA__") as any ); - let user: any = session.user; let sendSpot = JSON.parse(localStorage.getItem("sendSpot") as any); this.form.prdOrder = JSON.parse(sessionStorage.getItem("labelCode") as any); sessionStorage.removeItem("labelCode"); @@ -258,7 +257,7 @@ export default class returningDom extends BasePage { loginName: means.session.user.loginName, sendSpot: sendSpot, factoryCode: means.session.user.factoryCode, - workArea: user.list[0].workareaCode, + workArea: session.workareaCode, }; let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content); res.forEach((item: any) => { diff --git a/src/pages/raw/ingoods/dnReceipt/ImportDN.vue b/src/pages/raw/ingoods/dnReceipt/ImportDN.vue index 86a057e..7f4bf15 100644 --- a/src/pages/raw/ingoods/dnReceipt/ImportDN.vue +++ b/src/pages/raw/ingoods/dnReceipt/ImportDN.vue @@ -210,13 +210,12 @@ export default class dnReceiptDom extends BasePage { let means: any = JSON.parse( localStorage.getItem("__GWMS_APP_STATE_DATA__") as any ); - let user: any = session.user; let sendSpot = JSON.parse(localStorage.getItem("sendSpot") as any); let content = { loginName: means.session.user.loginName, sendSpot: sendSpot, factoryCode: means.session.user.factoryCode, - workArea: user.list[0].workareaCode, + workArea: session.workareaCode, }; let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content); res.forEach((item: any) => { diff --git a/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue b/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue index 9737131..7f3d12b 100644 --- a/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue +++ b/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue @@ -210,13 +210,12 @@ export default class dnReceiptDom extends BasePage { let means: any = JSON.parse( localStorage.getItem("__GWMS_APP_STATE_DATA__") as any ); - let user: any = session.user; let sendSpot = JSON.parse(localStorage.getItem("sendSpot") as any); let content = { loginName: means.session.user.loginName, sendSpot: sendSpot, factoryCode: means.session.user.factoryCode, - workArea: user.list[0].workareaCode, + workArea: session.workareaCode, }; let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content); res.forEach((item: any) => { diff --git a/src/pages/raw/ingoods/dnReceipt/idetailed.vue b/src/pages/raw/ingoods/dnReceipt/idetailed.vue index ab6ad3b..0a8000e 100644 --- a/src/pages/raw/ingoods/dnReceipt/idetailed.vue +++ b/src/pages/raw/ingoods/dnReceipt/idetailed.vue @@ -121,13 +121,12 @@ export default class RawReceiptDetail extends BasePage { let means: any = JSON.parse( localStorage.getItem("__GWMS_APP_STATE_DATA__") as any ); - let user: any = session.user; let sendSpot = JSON.parse(localStorage.getItem("sendSpot") as any); let content = { loginName: means.session.user.loginName, sendSpot: sendSpot, factoryCode: means.session.user.factoryCode, - workArea: user.list[0].workareaCode, + workArea: session.workareaCode, }; let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content); res.forEach((item: any) => { diff --git a/src/pages/raw/ingoods/dnReturnGoods/Local-details.vue b/src/pages/raw/ingoods/dnReturnGoods/Local-details.vue index 0a604a7..222b0d7 100644 --- a/src/pages/raw/ingoods/dnReturnGoods/Local-details.vue +++ b/src/pages/raw/ingoods/dnReturnGoods/Local-details.vue @@ -62,7 +62,6 @@ export default class RawReceiptDetail extends BasePage { factoryCode: session.factoryCode, }; await this.model.querydetaildlist(content); - console.log(model.detailedList); } go() { this.toPage(this.page.raw.ingoods.dnReturnGoods.location); diff --git a/src/pages/raw/ingoods/dnReturnGoods/Location.vue b/src/pages/raw/ingoods/dnReturnGoods/Location.vue index 3122079..1dac32b 100644 --- a/src/pages/raw/ingoods/dnReturnGoods/Location.vue +++ b/src/pages/raw/ingoods/dnReturnGoods/Location.vue @@ -185,7 +185,7 @@ export default class RawReceiptDetail extends BasePage { let content = { loginName: means.session.user.loginName, factoryCode: means.session.user.factoryCode, - workArea: user.list[0].workareaCode, + workArea: session.workareaCode, }; let res: any = await this.model.queryByFactory(content); res.forEach((item: any) => { @@ -202,6 +202,8 @@ export default class RawReceiptDetail extends BasePage { } //表格单选触发事件 handleRow({ data }: any) { + this.LocationList = []; + this.qty = ""; this.some = data[0].lineData; } //添加触发事件 @@ -270,6 +272,17 @@ export default class RawReceiptDetail extends BasePage { * 提交 */ async onSubmit() { + let num: number = 0; + this.some.list.forEach((item: any) => { + num += parseFloat(item.nowAmount); + }); + if (num != parseFloat(this.some.poAmount)) { + uni.showToast({ + icon: "none", + title: this.$t("message.actual") as any, + }); + return; + } await this.model.submit({ poNo: this.some.poNo, loginName: session.loginName, diff --git a/src/pages/raw/ingoods/dnReturnGoods/model.ts b/src/pages/raw/ingoods/dnReturnGoods/model.ts index 489b9ce..0ef5d95 100644 --- a/src/pages/raw/ingoods/dnReturnGoods/model.ts +++ b/src/pages/raw/ingoods/dnReturnGoods/model.ts @@ -233,16 +233,15 @@ export class ReceiptModule extends VuexModule { @Action({ commit: "updateCheckedOrderInInfoListKw" }) async submit(content: any) { let res = await http.post( - "/material/outsourcing/into/materialComplete", + "/wmspda/material/poReturn/materialComplete", content ); return res; } - @Action({ commit: "updateCheckedOrderInInfoListKw" }) + @MutationAction async querydetaildlist(content: any) { - let res = await http.post("/material/outsourcing/into/info", content); + let res = await http.post("/wmspda/material/poReturn/info", content); let detailedList = res.data; - console.log(res); return { detailedList }; } } diff --git a/src/pages/raw/ingoods/poReceipt/idetailed.vue b/src/pages/raw/ingoods/poReceipt/idetailed.vue index dd0ce6c..c783673 100644 --- a/src/pages/raw/ingoods/poReceipt/idetailed.vue +++ b/src/pages/raw/ingoods/poReceipt/idetailed.vue @@ -121,13 +121,12 @@ export default class RawReceiptDetail extends BasePage { let means: any = JSON.parse( localStorage.getItem("__GWMS_APP_STATE_DATA__") as any ); - let user: any = session.user; let sendSpot = JSON.parse(localStorage.getItem("sendSpot") as any); let content = { loginName: means.session.user.loginName, sendSpot: sendSpot, factoryCode: means.session.user.factoryCode, - workArea: user.list[0].workareaCode, + workArea: session.workareaCode, }; let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content); res.forEach((item: any) => { diff --git a/src/pages/raw/ingoods/poReceipt/poReceiving.vue b/src/pages/raw/ingoods/poReceipt/poReceiving.vue index 5b132ec..b0a6b0c 100644 --- a/src/pages/raw/ingoods/poReceipt/poReceiving.vue +++ b/src/pages/raw/ingoods/poReceipt/poReceiving.vue @@ -177,13 +177,12 @@ export default class dnReceiptDom extends BasePage { let means: any = JSON.parse( localStorage.getItem("__GWMS_APP_STATE_DATA__") as any ); - let user: any = session.user; let sendSpot = JSON.parse(localStorage.getItem("sendSpot") as any); let content = { loginName: means.session.user.loginName, sendSpot: sendSpot, factoryCode: means.session.user.factoryCode, - workArea: user.list[0].workareaCode, + workArea: session.workareaCode, }; let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content); res.forEach((item: any) => { diff --git a/src/pages/raw/warehouse/rowInventory/idetailed.vue b/src/pages/raw/warehouse/rowInventory/idetailed.vue index 62e1411..c2fbc6d 100644 --- a/src/pages/raw/warehouse/rowInventory/idetailed.vue +++ b/src/pages/raw/warehouse/rowInventory/idetailed.vue @@ -121,13 +121,12 @@ export default class RawReceiptDetail extends BasePage { let means: any = JSON.parse( localStorage.getItem("__GWMS_APP_STATE_DATA__") as any ); - let user: any = session.user; let sendSpot = JSON.parse(localStorage.getItem("sendSpot") as any); let content = { loginName: means.session.user.loginName, sendSpot: sendSpot, factoryCode: means.session.user.factoryCode, - workArea: user.list[0].workareaCode, + workArea: session.workareaCode, }; let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content); res.forEach((item: any) => {