From 4c05fba940ba7e01a484a4230a96402bf2cafd4d Mon Sep 17 00:00:00 2001
From: hou <1601990943@qq.com>
Date: Tue, 15 Feb 2022 18:04:32 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8B=A3=E9=85=8D=E6=8E=A8=E8=8D=90=E5=BA=93?=
=?UTF-8?q?=E4=BD=8D=20=20=20=20=E5=8F=91=E8=B4=A7=E9=80=80=E6=89=AB?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD?=
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 | 119 ++++++++----------
.../product/outbound/stoOutbound/model.ts | 6 +-
src/pages/raw/handover/picking/ByOrder.vue | 12 +-
src/pages/raw/handover/picking/BySummary.vue | 12 +-
src/pages/raw/handover/picking/model.ts | 14 ++-
src/utils/request.ts | 2 +
src/utils/url.ts | 1 +
9 files changed, 82 insertions(+), 86 deletions(-)
diff --git a/src/i18n/lang/cn.ts b/src/i18n/lang/cn.ts
index 4b97aef..a607d46 100644
--- a/src/i18n/lang/cn.ts
+++ b/src/i18n/lang/cn.ts
@@ -21,6 +21,7 @@ export default {
request_Tip9: '服务不可用',
request_Tip10: '网关超时',
request_Tip11: 'HTTP版本不受支持',
+ sweep:'是否退扫',
success: '操作成功',
error: '操作失败',
operation: '操作',
diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts
index 7dff6b7..3562e1a 100644
--- a/src/i18n/lang/en.ts
+++ b/src/i18n/lang/en.ts
@@ -40,6 +40,7 @@ export default {
Tip2: 'Update succeeded. Are you sure to restart?',
//服务器设置
ServerSetting: 'Server Setting',
+ sweep:'Whether to back sweep',
PleaseInputIPAddress: 'Please input IP address',
PleaseInputPortNumber: 'Please input port No',
Save: 'Save',
diff --git a/src/pages/product/outbound/stoOutbound/DN-delivergoods.vue b/src/pages/product/outbound/stoOutbound/DN-delivergoods.vue
index f3e5140..aba35dc 100644
--- a/src/pages/product/outbound/stoOutbound/DN-delivergoods.vue
+++ b/src/pages/product/outbound/stoOutbound/DN-delivergoods.vue
@@ -27,7 +27,7 @@
-
+
@@ -185,7 +185,8 @@ export default class stoOutboundDom extends BasePage {
return;
}
await this.model.findProdInfoByDN(this.form.orderNo);
- if (model.DNcode == '1') {
+ console.log('model.DNcode',this.model.DNcode)
+ if (this.model.DNcode == '1') {
uni.showToast({
icon: 'success',
title: this.$t('message.successful') as any,
@@ -200,19 +201,9 @@ export default class stoOutboundDom extends BasePage {
}
//选择成品编码
materialConfirm(v: any) {
- console.log('v[0].value', v[0]);
- // this.form.productCode = v[0].value;
- // this.model.materielList.forEach((item: any) => {
- // if (v[0].value == item.stoItem) {
- // this.form.productCode = item.materialCode;
- // this.form.productDescZh = item.materialDesc;
- // this.form.orderAmount = item.orderAmount;
- // this.form.scanAmount = item.scanAmount;
- // return;
- // }
- // });
+ console.log('v[0].value', v);
this.model.materielList.forEach((item: any) => {
- if (v[0].rowItem == item.rowItem) {
+ if (v[0].value == item.materialCode) {
console.log('item', item);
this.form.productCode = item.materialCode;
this.form.productDescZh = item.materialDesc;
@@ -328,37 +319,16 @@ export default class stoOutboundDom extends BasePage {
// }
Posting() {}
onOk() {
- // if (this.selectMaterielList.length == 0) {
- // uni.showToast({ icon: 'none', title: this.$t('message.product_Tip2') as string });
- // } else {
this.$form.validate(async (valid: boolean) => {
if (!valid) return;
if (parseInt(this.form.orderAmount) <= this.form.scanAmount) {
this.customToast(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,
- // };
- // });
+ if(this.form.barCode == ''){
+ this.customToast(this.$t('message.barcode') as string);
+ return
+ }
const selctlist = {
barcode: this.form.barCode,
loginName: session.loginName,
@@ -370,41 +340,52 @@ export default class stoOutboundDom extends BasePage {
orderType: 4,
productCode: this.form.productCode,
};
- await this.model.confirmMove(selctlist);
- // this.$form.resetFields();
- // // this.form.barCode = '';
- // this.selectMaterielList = [];
- console.log('aaaaaaa', this.model);
- if (this.model.code == '1') {
+ await this.model.confirmMove(selctlist).then(async () =>{
+ if (this.model.code == '1') {
this.materialList = [];
- // this.model.materielList = [];
- //this.$table.onCheckAllTap();
uni.showToast({ icon: 'success', title: 'success' });
- }
- if(this.model.code == '2'){
- let params = {
- barcode: this.form.barCode,
- loginName: session.loginName,
- keepBy: session.loginName,
- factoryCode: session.factoryCode,
- order3: this.form.orderNo,
+ this.form.barCode = '';
+ this.form.productCode = '';
+ model.orderInInfo.stoAmount = 0;
+ this.form.scanAmount = 0;
+ this.form.orderAmount = '';
+ this.form.productDescZh = '';
+ this.selectMaterielList = [];
+ this.form.rowItem = '';
+ this.query();
}
- await this.model.delCode(params)
+ if(this.model.code == '2'){
+ uni.showModal({
+ content:this.$t('message.sweep') as any,
+ cancelText:this.$t('message.Cancel') as any,
+ confirmText:this.$t('message.workArea_Confirm') as any,
+ success:async (res) =>{
+ if(res.confirm){
+ let params = {
+ barcode: this.form.barCode,
+ loginName: session.loginName,
+ keepBy: session.loginName,
+ factoryCode: session.factoryCode,
+ order3: this.form.orderNo,
+ }
+ await this.model.delCode(params)
+ this.form.barCode = '';
+ this.form.productCode = '';
+ model.orderInInfo.stoAmount = 0;
+ this.form.scanAmount = 0;
+ this.form.orderAmount = '';
+ this.form.productDescZh = '';
+ this.selectMaterielList = [];
+ this.form.rowItem = '';
+ this.query();
+ } else if(res.cancel){
+ this.form.barCode = '';
+ }
+ }
+ })
}
+ });
});
- // this.form.orderNo = '';
- this.form.barCode = '';
- this.form.productCode = '';
- model.orderInInfo.stoAmount = 0;
- // this.form.orderNo = null;
- this.form.scanAmount = 0;
- this.form.orderAmount = '';
- this.form.productDescZh = '';
- this.selectMaterielList = [];
- this.form.rowItem = '';
- //this.$table.onEmpty();
- //debugger;
- this.query();
}
// }
}
diff --git a/src/pages/product/outbound/stoOutbound/model.ts b/src/pages/product/outbound/stoOutbound/model.ts
index 2ce4b78..e0a113f 100644
--- a/src/pages/product/outbound/stoOutbound/model.ts
+++ b/src/pages/product/outbound/stoOutbound/model.ts
@@ -86,7 +86,6 @@ export class ReturningModule extends VuexModule {
}
/**
* 查询订单号
- * @param nxOutCode
*/
@MutationAction
async findProdInfoByDN(nxOutCode: string) {
@@ -171,8 +170,9 @@ export class ReturningModule extends VuexModule {
*/
@MutationAction
async confirmMove(list: any) {
- const { code, data } = await http.post(url.outbound.stoOutbound.Bookkeeping, list);
- console.log('res数据', data, code);
+ const res:any = await http.post(url.outbound.stoOutbound.Bookkeeping, list);
+ console.log('res数据', res);
+ const code = res.code
// if (code == '1') {
// uni.showToast({ icon: 'success', title: msg });
// } else {
diff --git a/src/pages/raw/handover/picking/ByOrder.vue b/src/pages/raw/handover/picking/ByOrder.vue
index 3a6dd5c..78dd2e3 100644
--- a/src/pages/raw/handover/picking/ByOrder.vue
+++ b/src/pages/raw/handover/picking/ByOrder.vue
@@ -151,7 +151,7 @@ export default class RawReceiptDetail extends BasePage {
console.log('e>>>>>>>>>>>>>>>>>>>>>>>>', e);
this.wlCode = e.pickerName;
}
- handleRow({ data }: any) {
+ async handleRow({ data }: any) {
console.log('data[0]', data[0]);
if (!this.model.proOrderResultList[data[0].index].sendSpot) {
uni.showModal({
@@ -170,6 +170,16 @@ export default class RawReceiptDetail extends BasePage {
this.model.proOrderResultList[this.someIndex].currentAmount = 0;
this.LocationList = [];
this.qty = '';
+ await this.model.queryItemLoc({
+ workArea:session.workareaCode,
+ loginName:session.loginName,
+ sendSpot:null,
+ materialCode:this.some.materialCode,
+ factoryCode:session.factoryCode
+ })
+ this.Location = [];
+ this.Location = this.model.LocList
+ console.log('this.Location',this.Location)
}
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 234f137..dd84f57 100644
--- a/src/pages/raw/handover/picking/BySummary.vue
+++ b/src/pages/raw/handover/picking/BySummary.vue
@@ -159,23 +159,15 @@ export default class RawReceiptDetail extends BasePage {
this.model.aggregateList[this.someIndex].currentAmount = 0;
this.LocationList = [];
this.qty = '';
- this.model.LocList.length = 0
await this.model.queryItemLoc({
workArea:session.workareaCode,
loginName:session.loginName,
sendSpot:null,
materialCode:this.some.materialCode,
- factoryCode:this.some.factoryCode
+ factoryCode:session.factoryCode
})
this.Location = [];
- this.model.LocList.forEach((item:any) =>{
- let arr:any = {
- label:item.locationCode,
- value:item.locationCode + '(' + item.sendSpot + ')' + '(' + item.amount + ')',
- sendSpot:item.sendSpot
- }
- this.Location.push(arr)
- })
+ this.Location = this.model.LocList
console.log('this.Location',this.Location)
}
//添加库位和数量到数据和表格中
diff --git a/src/pages/raw/handover/picking/model.ts b/src/pages/raw/handover/picking/model.ts
index 6aeb17f..2f0ac6a 100644
--- a/src/pages/raw/handover/picking/model.ts
+++ b/src/pages/raw/handover/picking/model.ts
@@ -337,9 +337,17 @@ export class PickingModule extends VuexModule {
}
@MutationAction
async queryItemLoc(params:any = {}) {
- const res: any = await http.post(url.sortscan.save.order, params);
- const LocList = res.data
- console.log('list',LocList)
+ const res: any = await http.post(url.sortscan.save.queryWlByMat, params);
+ const LocList = []
+ res.forEach((item:any) =>{
+ let arr:any = {
+ label:item.locationCode,
+ value:item.locationCode + '(' + item.sendSpot + ')' + '(' + item.amount + ')'
+ }
+ LocList.push(arr)
+ })
+ console.log('res',res)
+ console.log('LocList',LocList)
return { LocList };
}
/**
diff --git a/src/utils/request.ts b/src/utils/request.ts
index 41a7d3c..4ed5603 100644
--- a/src/utils/request.ts
+++ b/src/utils/request.ts
@@ -77,6 +77,8 @@ http.interceptors.response.use(
case '1':
// code === '1' 代表没有错误
return dataAxios;
+ case '2':
+ return dataAxios;
case 401:
// [ 示例 ] 其它和后台约定的 code
store.dispatch('session/logout');
diff --git a/src/utils/url.ts b/src/utils/url.ts
index 2856df3..834614e 100644
--- a/src/utils/url.ts
+++ b/src/utils/url.ts
@@ -164,6 +164,7 @@ export const url = {
save: {
aggregate: '/wmspda/sortscan/save/aggregate',
order: '/wmspda/sortscan/save/order',
+ queryWlByMat:'/wmspda/sortscan/queryWlByMat',
},
unlock: {
list: '/wmspda/sortscan/unlock/list',