|
|
@ -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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|