cosmoim-852 fix 新增俄罗斯拣配

master
guoshuang 3 years ago
parent e553ee10fb
commit e5d7f6b191

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

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

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

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

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

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

Loading…
Cancel
Save