diff --git a/src/i18n/lang/cn.ts b/src/i18n/lang/cn.ts index 668dc72..4b97aef 100644 --- a/src/i18n/lang/cn.ts +++ b/src/i18n/lang/cn.ts @@ -258,6 +258,7 @@ export default { InventoryPleaseScan: '请扫描单号', InventoryNumber: '盘点单号', InventoryFinish: '完成', + closure: '关闭', // 委外-入库 CommissionEntrant: '委外入库', @@ -290,6 +291,8 @@ export default { Commission_tips5: '请确保所选物料已分配库位', Commission_tips6: '请先选择一个物料', Commission_tips7: '请选择正确的库位', + Commission_tips8: '请确认是否关闭', + Commission_tips9: '数量已达上线,请勿扫描', endtime: '请选择结束时间', end: '结束时间', starttime: '请选择开始时间', diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index 448ba16..a684f9f 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -248,6 +248,7 @@ export default { ModelScanned: 'Model scanned', selectCode: 'Please select code first', DocumentNumber: 'Document number', + closure: 'Close', // 委外-入库 CommissionEntrant: 'Subcontracting receipt', @@ -287,6 +288,8 @@ export default { Commission_tips5: 'Please ensure that the selected material has been assigned a location', Commission_tips6: 'Please select a material first', Commission_tips7: 'Please select the correct location', + Commission_tips8: 'Please confirm whether to close', + Commission_tips9: 'The quantity has reached the online level, please do not scan', endtime: 'Please select an end time', end: 'End time', starttime: 'Please select an start time', diff --git a/src/pages/product/warehouse/wholeCollect/index.vue b/src/pages/product/warehouse/wholeCollect/index.vue index dbc2022..2f73619 100644 --- a/src/pages/product/warehouse/wholeCollect/index.vue +++ b/src/pages/product/warehouse/wholeCollect/index.vue @@ -49,13 +49,16 @@ - + {{ $t('message.detailed') }} - + {{ $t('message.InventoryFinish') }} - + + {{ $t('message.closure') }} + + {{ $t('message.po_Return') }} @@ -138,6 +141,10 @@ export default class ProductCheckReceipt extends BasePage { this.customToast(this.$t('message.barcode') as string); return; } + if (this.Some.actualQty > this.Some.qty) { + this.customToast(this.$t('message.barcode') as string); + return; + } let params = { factoryCode: session.factoryCode, loginName: session.loginName, @@ -178,7 +185,53 @@ export default class ProductCheckReceipt extends BasePage { this.wl = {}; // this.form.order3 = ''; this.form.barcode = ''; - this.query() + this.query(); + } + //关闭 + async closure() { + if (!this.form.order3) { + this.customToast(this.$t('message.Commission_tips1') as string); + return; + } + if (this.Some.actualQty == this.Some.qty) { + //this.customToast(this.$t('message.Commission_tips8') as string); + uni.showModal({ + content: this.$t('message.Commission_tips8') as string, + confirmText: this.$t('message.workArea_Confirm') as string, + cancelText: this.$t('message.Cancel') as string, + success: function (res) { + if (res.confirm) { + this.model.close(this.form.order3); + if (this.model.code == '1') { + uni.showToast({ + icon: 'success', + title: this.$t('message.success') as string, + }); + this.Some = {}; + this.Some.fileNo = ' '; + this.wl = {}; + this.form.order3 = ''; + this.form.barcode = ''; + } + } else if (res.cancel) { + return; + } + }, + }); + return; + } + await this.model.close(this.form.order3); + if (this.model.code == '1') { + uni.showToast({ + icon: 'success', + title: this.$t('message.success') as string, + }); + this.Some = {}; + this.Some.fileNo = ' '; + this.wl = {}; + this.form.order3 = ''; + this.form.barcode = ''; + } } //查询明细 async bill() { diff --git a/src/pages/product/warehouse/wholeCollect/model.ts b/src/pages/product/warehouse/wholeCollect/model.ts index 8c20349..9b365b6 100644 --- a/src/pages/product/warehouse/wholeCollect/model.ts +++ b/src/pages/product/warehouse/wholeCollect/model.ts @@ -168,6 +168,21 @@ export class wholeCollect extends VuexModule { const materielList = data; return { materielList, code }; } + /** + * 关单 + * 查询DN单号 + * @param dnNo + */ + @MutationAction + async close(proMoveCode: any) { + const { code } = await http.post(url.warehouse.rowTransfer.close, { + factoryCode: session.factoryCode as string, + loginName: session.loginName as string, + proMoveCode, + }); + //const materielList = data; + return { code }; + } } export default getModule(wholeCollect); diff --git a/src/pages/product/warehouse/wholeScrap/index.vue b/src/pages/product/warehouse/wholeScrap/index.vue index 8b9388c..3ad359e 100644 --- a/src/pages/product/warehouse/wholeScrap/index.vue +++ b/src/pages/product/warehouse/wholeScrap/index.vue @@ -58,13 +58,16 @@ - + {{ $t('message.detailed') }} - + {{ $t('message.InventoryFinish') }} - + + {{ $t('message.closure') }} + + {{ $t('message.po_Return') }} @@ -121,6 +124,10 @@ export default class productCheckReceipt extends BasePage { this.customToast(this.$t('message.barcode') as string); return; } + if (this.Some.actualQty > this.Some.qty) { + this.customToast(this.$t('message.barcode') as string); + return; + } let params = { factoryCode: session.factoryCode, loginName: session.loginName, @@ -130,9 +137,13 @@ export default class productCheckReceipt extends BasePage { }; await this.model.getProductCode(params); if (this.model.code == '1') { - this.customToast(this.$t('message.product_Tip8') as string); + //this.customToast(this.$t('message.product_Tip8') as string); + uni.showToast({ + icon: 'success', + title: this.$t('message.product_Tip8') as string, + }); // this.Some.actualQty += 1; - this.onSubmit() + this.onSubmit(); } } // 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕 @@ -200,7 +211,53 @@ export default class productCheckReceipt extends BasePage { this.wl = {}; // this.form.order3 = ''; this.form.barcode = ''; - this.query() + this.query(); + } + } + //关闭 + async closure() { + if (!this.form.order3) { + this.customToast(this.$t('message.Commission_tips1') as string); + return; + } + if (this.Some.actualQty == this.Some.qty) { + //this.customToast(this.$t('message.Commission_tips8') as string); + uni.showModal({ + content: this.$t('message.Commission_tips8') as string, + confirmText: this.$t('message.workArea_Confirm') as string, + cancelText: this.$t('message.Cancel') as string, + success: function (res) { + if (res.confirm) { + this.model.close(this.form.order3); + if (this.model.code == '1') { + uni.showToast({ + icon: 'success', + title: this.$t('message.success') as string, + }); + this.Some = {}; + this.Some.fileNo = ' '; + this.wl = {}; + this.form.order3 = ''; + this.form.barcode = ''; + } + } else if (res.cancel) { + return; + } + }, + }); + return; + } + await this.model.close(this.form.order3); + if (this.model.code == '1') { + uni.showToast({ + icon: 'success', + title: this.$t('message.success') as string, + }); + this.Some = {}; + this.Some.fileNo = ' '; + this.wl = {}; + this.form.order3 = ''; + this.form.barcode = ''; } } //查询明细 @@ -221,7 +278,7 @@ export default class productCheckReceipt extends BasePage { background-size: 100% 600rpx; padding: 118rpx 30rpx 162rpx; min-height: 100%; - .top{ + .top { width: 100%; height: 20px; position: fixed; diff --git a/src/pages/product/warehouse/wholeScrap/model.ts b/src/pages/product/warehouse/wholeScrap/model.ts index c328221..cae819b 100644 --- a/src/pages/product/warehouse/wholeScrap/model.ts +++ b/src/pages/product/warehouse/wholeScrap/model.ts @@ -117,6 +117,21 @@ export class wholeScrap extends VuexModule { const materielList = data; return { materielList, code }; } + /** + * 关单 + * 查询DN单号 + * @param dnNo + */ + @MutationAction + async close(proMoveCode: any) { + const { code } = await http.post(url.warehouse.rowTransfer.close, { + factoryCode: session.factoryCode as string, + loginName: session.loginName as string, + proMoveCode, + }); + //const materielList = data; + return { code }; + } @MutationAction async queryScrapList(param: any) { diff --git a/src/utils/url.ts b/src/utils/url.ts index 7ff1abb..13bf66c 100644 --- a/src/utils/url.ts +++ b/src/utils/url.ts @@ -198,6 +198,7 @@ export const url = { getCode: '/wmspda/fg/getCpMoveBatchNo', //查询明细 queryListByMoveCode: '/wmspda/fg/queryListByMoveCode', + close: '/wmspda/fg/closeHandOrder', }, rowScrap: { list: '/wmspda/fg/listByOrder',