cosmoim-852 fix 新增俄罗斯拣配

master
guoshuang 3 years ago
parent e553ee10fb
commit e5d7f6b191

@ -202,6 +202,7 @@ export default {
Pi_tip17: '请选择一条DN单',
Pi_tip18: '请选中要移库的数据',
Pi_tip19: '只能选择一条修改数量',
Pi_tip20: '本次添加数量超过最大可添加数量',
//汇总交接
Summary_Query: '汇总查询',
Summary_Contain: '包含',
@ -473,6 +474,7 @@ export default {
AppendMateriel3: '不能大于需求数量,请重新输入',
AppendMateriel4: '请选择正确的库位',
AppendMateriel5: '请先选择一个物料',
AppendMateriel6: '请先选择一条数据',
demandQuantity: '总数量大于需求数量',
//俄罗斯海外PO
ImportPO: 'PO海外收货',

@ -42,6 +42,7 @@ export default {
Pi_tip17: 'Please select a dn list',
Pi_tip18: 'Please select the data to be moved',
Pi_tip19: 'Only one item can be selected to modify the quantity',
Pi_tip20: 'The number of additions this time exceeds the maximum number of additions.',
//版本更新
updatePrompt: 'Update tips',
Tip1: 'please update!',
@ -478,6 +479,7 @@ export default {
AppendMateriel3: 'Cannot be greater than the required quantity, please re-enter',
AppendMateriel4: 'Please select the correct location',
AppendMateriel5: 'Please select a material first',
AppendMateriel6: 'Please select a piece of data first',
demandQuantity: 'The total quantity is greater than the demand quantity',
//俄罗斯海外PO
ImportPO: 'Import PO Receive',

@ -2,7 +2,7 @@
<view class="page-picking-order">
<view class="header">
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack({})" />
</view>
<view class="title">{{ $t('message.Pi_ByOrderPicking') }}</view>
<view class="right"> </view>
@ -29,7 +29,7 @@
</view>
<view class="single-left">
<view>{{ $t('message.Container') }}</view>
<u-search :placeholder="$t('message.PleaseScan')" v-model="form.XXXXX" :show-action="false"></u-search>
<u-search :placeholder="$t('message.PleaseScan')" v-model="Barcode" @search="searchBarcode" :show-action="false"></u-search>
</view>
<view class="library-right">
<view class="library-right-title">{{ $t('message.CommissionedThisNumber') }}:</view>
@ -54,7 +54,7 @@
<u-tr class="u-tr" v-for="(item, index) in LocationList" :key="index">
<u-td class="u-td">{{ item.wlCode }}</u-td>
<u-td class="u-td">{{ item.qty }}</u-td>
<u-td class="u-td">{{ item.xxxx }}</u-td>
<u-td class="u-td">{{ item.barcode }}</u-td>
<u-td class="u-td">
<!-- <div class="u-td" @click="deleteItem(index)">
{{ $t('message.product_Delete') }}
@ -127,6 +127,8 @@ export default class RawReceiptDetail extends BasePage {
Location: any = [];
someIndex = 0;
some: any = {};
Container: any = {};
Barcode: any = '';
qty: any = '';
/**
* 表单数据
@ -178,27 +180,60 @@ export default class RawReceiptDetail extends BasePage {
this.model.proOrderResultList[this.someIndex].currentAmount = 0;
this.LocationList = [];
this.qty = '';
this.form.xxxx = '';
this.Barcode = '';
//
await this.model.queryItemLoc({
workArea: session.workareaCode,
loginName: session.loginName,
sendSpot: null,
materialCode: this.some.materialCode,
factoryCode: session.factoryCode,
});
this.Location = [];
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];
// await this.model.queryItemLoc({
// workArea: session.workareaCode,
// loginName: session.loginName,
// sendSpot: null,
// materialCode: this.some.materialCode,
// factoryCode: session.factoryCode,
// });
// this.Location = [];
// 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];
// }
}
async searchBarcode() {
if (this.Barcode == '') {
this.customToast(this.$t('message.barcode') as string);
return;
}
if (!this.some) {
this.customToast(this.$t('message.AppendMateriel6') as string);
return;
}
await this.model.searchBarcode({ factoryCode: session.factoryCode, loginName: session.loginName, barcode: this.Barcode, productCode: this.some.materialCode });
this.Container = this.model.ContainerCode;
let arr = {
label: this.Container.locCode,
value: this.Container.locCode + '(' + this.Container.sendSpot + ')',
sendSpot: this.Container.sendSpot,
};
this.Location.push(arr);
this.wlCode = this.Location[0];
//let num = 0;
// if (this.LocationList.length != 0) {
// this.LocationList.forEach((item: any) => {
// if (item.barcode == this.Container.barcode) {
// num += parseFloat(item.qty);
// }
// });
// }
// if (this.Container.cpRef4 == null) {
// this.qty = parseFloat(this.Container.qty) - num;
// } else {
// this.qty = parseFloat(this.Container.qty) - parseFloat(this.Container.cpRef4) - num;
// }
}
Add() {
if (this.qty == '' || this.wlCode == '') {
@ -214,29 +249,31 @@ export default class RawReceiptDetail extends BasePage {
return;
}
let isTrue = true;
let allqty = 0;
if (this.LocationList.length != 0) {
this.LocationList.forEach((item: any) => {
if (this.wlCode.sendSpot != item.Code || this.wlCode.label === item.wlCode) {
this.customToast(this.$t('message.Commission_tips7') as any);
return (isTrue = false);
}
allqty += parseFloat(item.qty);
});
if (allqty + parseFloat(this.qty) > parseFloat(this.Container.qty) - parseFloat(this.Container.cpRef4)) {
this.customToast(this.$t('message.Pi_tip20') as any);
return (isTrue = false);
}
} else {
if (parseFloat(this.qty) > parseFloat(this.Container.qty) - parseFloat(this.Container.cpRef4)) {
this.customToast(this.$t('message.Pi_tip20') as any);
return (isTrue = false);
}
}
if (isTrue == true) {
if (parseFloat(this.qty) + parseFloat(this.some.totalMoAmount) > parseFloat(this.some.amount)) {
uni.showModal({
title: 'Tip',
content: this.$t('message.Pi_tip11') as string,
confirmText: this.$t('message.workArea_Confirm') as string,
cancelText: this.$t('message.Cancel') as string,
showCancel: true,
success: (res) => {
if (res.confirm) {
let arr = {
wlCode: this.wlCode.label,
qty: this.qty,
Code: this.wlCode.sendSpot,
xxxx: this.form.xxxx,
barcode: this.Barcode,
};
this.LocationList.push(arr);
let objString = JSON.stringify(this.some);
@ -244,34 +281,59 @@ export default class RawReceiptDetail extends BasePage {
TEM.wlList = null;
TEM.wlCode = this.wlCode.label;
TEM.qty = this.qty;
TEM.xxxx = this.form.xxxx;
//add
this.model.proOrderResultList[this.someIndex].wlList.push(TEM);
this.model.proOrderResultList[this.someIndex].currentAmount += parseFloat(this.qty);
TEM.barcode = this.Barcode;
this.model.aggregateList[this.someIndex].wlList.push(TEM);
this.model.aggregateList[this.someIndex].currentAmount += parseFloat(this.qty);
this.qty = '';
this.form.xxxx = '';
}
},
});
} else {
let arr = {
wlCode: this.wlCode.label,
qty: this.qty,
Code: this.wlCode.sendSpot,
xxxx: this.form.xxxx,
};
this.LocationList.push(arr);
let objString = JSON.stringify(this.some);
let TEM = JSON.parse(objString);
TEM.wlList = null;
TEM.wlCode = this.wlCode.label;
TEM.qty = this.qty;
TEM.xxxx = this.form.xxxx;
this.model.proOrderResultList[this.someIndex].wlList.push(TEM);
this.model.proOrderResultList[this.someIndex].currentAmount += parseFloat(this.qty);
this.qty = '';
this.form.xxxx = '';
}
// if (parseFloat(this.qty) + parseFloat(this.some.totalMoAmount) > parseFloat(this.some.amount)) {
// uni.showModal({
// title: 'Tip',
// content: this.$t('message.Pi_tip11') as string,
// confirmText: this.$t('message.workArea_Confirm') as string,
// cancelText: this.$t('message.Cancel') as string,
// showCancel: true,
// success: (res) => {
// if (res.confirm) {
// let arr = {
// wlCode: this.wlCode.label,
// qty: this.qty,
// Code: this.wlCode.sendSpot,
// xxxx: this.form.xxxx,
// };
// this.LocationList.push(arr);
// let objString = JSON.stringify(this.some);
// let TEM = JSON.parse(objString);
// TEM.wlList = null;
// TEM.wlCode = this.wlCode.label;
// TEM.qty = this.qty;
// TEM.xxxx = this.form.xxxx;
// //add
// this.model.proOrderResultList[this.someIndex].wlList.push(TEM);
// this.model.proOrderResultList[this.someIndex].currentAmount += parseFloat(this.qty);
// this.qty = '';
// this.form.xxxx = '';
// }
// },
// });
// } else {
// let arr = {
// wlCode: this.wlCode.label,
// qty: this.qty,
// Code: this.wlCode.sendSpot,
// xxxx: this.form.xxxx,
// };
// this.LocationList.push(arr);
// let objString = JSON.stringify(this.some);
// let TEM = JSON.parse(objString);
// TEM.wlList = null;
// TEM.wlCode = this.wlCode.label;
// TEM.qty = this.qty;
// TEM.xxxx = this.form.xxxx;
// this.model.proOrderResultList[this.someIndex].wlList.push(TEM);
// this.model.proOrderResultList[this.someIndex].currentAmount += parseFloat(this.qty);
// this.qty = '';
// this.form.xxxx = '';
// }
}
}
deleteItem(index: any) {
@ -317,7 +379,7 @@ export default class RawReceiptDetail extends BasePage {
this.customToast(this.$t('message.Warehouse_Tip6') as any);
return;
}
await this.model.saveProOrderResultUpload(dataList);
await this.model.saveProOrderResultUploadRussia(dataList);
if (this.model.code == '1') {
uni.showToast({
//icon: 'success',
@ -477,7 +539,7 @@ export default class RawReceiptDetail extends BasePage {
.library {
width: 100%;
height: 200rpx;
height: 300rpx;
// display: flex;
display: block;
@ -496,9 +558,10 @@ export default class RawReceiptDetail extends BasePage {
width: 100%;
height: 100rpx;
display: flex;
padding-left: 18px;
view {
width: 110rpx;
width: 210rpx;
height: 100rpx;
line-height: 100rpx;
}

@ -56,7 +56,7 @@
<u-tr class="u-tr" v-for="(item, index) in LocationList" :key="index">
<u-td class="u-td">{{ item.wlCode }}</u-td>
<u-td class="u-td">{{ item.qty }}</u-td>
<u-td class="u-td">{{ item.xxxx }}</u-td>
<u-td class="u-td">{{ item.barcode }}</u-td>
<u-td class="u-td">
<u-button type="error" size="small" style="font-size: 20px" @click="deleteItem(index)">{{ $t('message.product_Delete') }}</u-button>
</u-td>
@ -169,7 +169,7 @@ export default class RawReceiptDetail extends BasePage {
this.some = data[0].lineData;
this.model.aggregateList[this.someIndex].wlList = [];
this.model.aggregateList[this.someIndex].currentAmount = 0;
//add
//add
this.LocationList = [];
this.qty = '';
this.Barcode = '';
@ -199,11 +199,12 @@ export default class RawReceiptDetail extends BasePage {
this.customToast(this.$t('message.barcode') as string);
return;
}
// if (this.materialList.length == 0) {
// this.customToast(this.$t('message.AppendMateriel5') as string);
// return;
// }
await this.model.searchBarcode(this.Barcode);
if (!this.some) {
this.customToast(this.$t('message.AppendMateriel6') as string);
return;
}
//
await this.model.searchBarcode({ factoryCode: session.factoryCode, loginName: session.loginName, barcode: this.Barcode, productCode: this.some.materialCode });
this.Container = this.model.ContainerCode;
let arr = {
label: this.Container.locCode,
@ -240,15 +241,44 @@ export default class RawReceiptDetail extends BasePage {
return;
}
let isTrue = true;
let allqty = 0;
//12
if (this.LocationList.length != 0) {
this.LocationList.forEach((item: any) => {
if (this.wlCode.sendSpot != item.Code) {
this.customToast(this.$t('message.Commission_tips7') as any);
return (isTrue = false);
}
allqty += parseFloat(item.qty);
});
if (allqty + parseFloat(this.qty) > parseFloat(this.Container.qty) - parseFloat(this.Container.cpRef4)) {
this.customToast(this.$t('message.Pi_tip20') as any);
return (isTrue = false);
}
} else {
if (parseFloat(this.qty) > parseFloat(this.Container.qty) - parseFloat(this.Container.cpRef4)) {
this.customToast(this.$t('message.Pi_tip20') as any);
return (isTrue = false);
}
}
if (isTrue == true) {
// let arr = {
// wlCode: this.wlCode.label,
// qty: this.qty,
// Code: this.wlCode.sendSpot,
// barcode: this.Barcode,
// };
// this.LocationList.push(arr);
// let objString = JSON.stringify(this.some);
// let TEM = JSON.parse(objString);
// TEM.wlList = null;
// TEM.wlCode = this.wlCode.label;
// TEM.qty = this.qty;
// TEM.barcode = this.Barcode;
// this.model.aggregateList[this.someIndex].wlList.push(TEM);
// this.model.aggregateList[this.someIndex].currentAmount += parseFloat(this.qty);
// this.qty = '';
// this.Barcode = '';
if (parseFloat(this.qty) + parseFloat(this.some.totalMoAmount) > parseFloat(this.some.amount)) {
uni.showModal({
title: 'Tip',
@ -341,7 +371,7 @@ export default class RawReceiptDetail extends BasePage {
dataList,
includeOrderOutIdList,
};
await this.model.saveAggregateUpload(params);
await this.model.saveAggregateUploadRussia(params);
if (this.model.code == '1') {
uni.showToast({
duration: 2000,
@ -500,7 +530,7 @@ export default class RawReceiptDetail extends BasePage {
.library {
width: 100%;
height: 200rpx;
height: 300rpx;
// display: flex;
display: block;
@ -519,9 +549,10 @@ export default class RawReceiptDetail extends BasePage {
width: 100%;
height: 100rpx;
display: flex;
padding-left: 18px;
view {
width: 110rpx;
width: 210rpx;
height: 100rpx;
line-height: 100rpx;
}

@ -327,12 +327,8 @@ export class PickingModule extends VuexModule {
}
//俄罗斯汇总拣配扫描容器码
@MutationAction
async searchBarcode(barcode: any) {
const res: any = await http.post(url.auth.query.barcode, {
factoryCode: session.factoryCode,
loginName: session.loginName,
barcode,
});
async searchBarcode(params: any) {
const res: any = await http.post(url.auth.query.barcode, params);
const ContainerCode = res.data;
return { ContainerCode };
}
@ -341,8 +337,8 @@ export class PickingModule extends VuexModule {
*/
// @Action({ commit: 'clearState' })
@MutationAction
async saveAggregateUpload(params: any) {
const res: any = await http.post(url.sortscan.save.aggregate, params);
async saveAggregateUploadRussia(params: any) {
const res: any = await http.post(url.sortscan.save.aggregateRussia, params);
console.log('res', res);
const code = res.code;
return { code };
@ -353,8 +349,8 @@ export class PickingModule extends VuexModule {
*/
// @Action({ commit: 'clearState' })
@MutationAction
async saveProOrderResultUpload(dataList: any[]) {
const res: any = await http.post(url.sortscan.save.order, dataList);
async saveProOrderResultUploadRussia(dataList: any[]) {
const res: any = await http.post(url.sortscan.save.orderRussia, dataList);
const code = res.code;
console.log('code', code);
return { code };

@ -177,8 +177,10 @@ export const url = {
aggregateList: '/wmspda/sortscan/query/aggregate/list',
},
save: {
aggregateRussia: 'wmspda/sortscan/save/aggregate/russia',
aggregate: '/wmspda/sortscan/save/aggregate',
order: '/wmspda/sortscan/save/order',
orderRussia: 'wmspda/sortscan/save/order/russia',
queryWlByMat: '/wmspda/sortscan/queryWlByMat',
queryWlByMatBL: '/wmspda/sortscan/queryWlByMatBL',
},

Loading…
Cancel
Save