cosmoim-852 fix DN收货功能调整

master
hou 3 years ago
parent e832ea8ba3
commit a20ab6fd51

@ -482,6 +482,7 @@ export default {
POPlan: 'PO计划', POPlan: 'PO计划',
WPMInformation: 'WPM信息', WPMInformation: 'WPM信息',
Container: '容器码', Container: '容器码',
ContainerCode: '容器码',
returner: '退料人必须等于登录人', returner: '退料人必须等于登录人',
Inbound: '备件入库', Inbound: '备件入库',
InboundDetail: '入库明细', InboundDetail: '入库明细',
@ -510,6 +511,7 @@ export default {
source: '源容器', source: '源容器',
barcodeSource: '请扫描源容器条码', barcodeSource: '请扫描源容器条码',
ContainerBarcode: '容器条码', ContainerBarcode: '容器条码',
scan: '扫描',
LocalReceiving: '本地DN收货', LocalReceiving: '本地DN收货',
OverseasShipping: '海外DN收货', OverseasShipping: '海外DN收货',
OverseasPO: '海外PO收货', OverseasPO: '海外PO收货',

@ -489,7 +489,8 @@ export default {
WPMtotal: 'container', WPMtotal: 'container',
POPlan: 'PO-Plan', POPlan: 'PO-Plan',
WPMInformation: 'WPM-Information', WPMInformation: 'WPM-Information',
Container: 'Container Code', Container: 'Code',
ContainerCode: 'Barcode',
returner: 'The returner must be equal to the login', returner: 'The returner must be equal to the login',
Inbound: 'Spare Inbound', Inbound: 'Spare Inbound',
InboundDetail: 'Inbound Detail', InboundDetail: 'Inbound Detail',
@ -518,6 +519,7 @@ export default {
source: 'Source', source: 'Source',
barcodeSource: 'Scan the barcode of the source container', barcodeSource: 'Scan the barcode of the source container',
ContainerBarcode: 'Container barcode', ContainerBarcode: 'Container barcode',
scan: 'scan',
//ss //ss
LocalReceiving: 'DN Receive', LocalReceiving: 'DN Receive',
OverseasShipping: 'Import DN', OverseasShipping: 'Import DN',

@ -417,5 +417,8 @@ export default {
SemiFinished_SO: 'SO полуфабриката', SemiFinished_SO: 'SO полуфабриката',
SemiFinishedOffline: 'Полуфабрикаты от линии', SemiFinishedOffline: 'Полуфабрикаты от линии',
create: 'Создание дополнительного материалов', create: 'Создание дополнительного материалов',
ContainerCode: 'ярд',
Container: 'ярд',
scan: 'сканирован',
}, },
}; };

@ -27,7 +27,7 @@ export const headers = [
}, },
{ {
label: vm.$t('message.Container'), label: vm.$t('message.Container'),
key: 'palletCode', //容器码 key: 'sn', //容器码
width: 700, width: 700,
}, },
// { // {

@ -55,12 +55,12 @@
<!-- 容器编码 --> <!-- 容器编码 -->
<view class="single"> <view class="single">
<view class="single-left"> <view class="single-left">
<view>{{ $t('message.Container') }}:</view> <view>{{ $t('message.ContainerCode') }}:</view>
<u-search :placeholder="$t('message.PleaseScan')" style="z-index: 10000" v-model="Barcode" @search="searchBarcode" :show-action="false"></u-search> <u-search :placeholder="$t('message.PleaseScan')" style="z-index: 10000" v-model="Barcode" @search="searchBarcode" :show-action="false"></u-search>
</view> </view>
</view> </view>
<view class="add"> <view class="add">
<u-button type="primary" @click="searchBarcode">{{ $t('message.Query') }}</u-button> <u-button type="primary" @click="searchBarcode">{{ $t('message.scan') }}</u-button>
</view> </view>
<!-- 库位 --> <!-- 库位 -->
<view class="library"> <view class="library">
@ -317,22 +317,26 @@ export default class dnReceiptDom extends BasePage {
}; };
await this.model.searchBarcode(params); await this.model.searchBarcode(params);
this.Container = this.model.ContainerCode; this.Container = this.model.ContainerCode;
let num = 0; // let num = 0;
if (this.LocationList.length != 0) { // if (this.LocationList.length != 0) {
this.LocationList.forEach((item: any) => { // this.LocationList.forEach((item: any) => {
if (item.palletCode == this.Container.barcode) { // if (item.palletCode == this.Container.barcode) {
num += parseFloat(item.receiptAmount); // num += parseFloat(item.receiptAmount);
} // }
}); // });
} // }
if (this.Container.cpRef4 == null) { if (this.Container.cpRef4 == null) {
this.receiptAmount = parseFloat(this.Container.qty) - num; this.receiptAmount = parseFloat(this.Container.qty);
} else { } else {
this.receiptAmount = parseFloat(this.Container.qty) - parseFloat(this.Container.cpRef4) - num; this.receiptAmount = parseFloat(this.Container.qty) - parseFloat(this.Container.cpRef4);
} }
} }
// //
Add() { Add() {
if (this.Barcode == '') {
this.customToast(this.$t('message.scanningContainer') as any);
return;
}
const count = parseFloat(this.every.requestAmount); const count = parseFloat(this.every.requestAmount);
if (this.receiptAmount == '' || !this.wl.value) { if (this.receiptAmount == '' || !this.wl.value) {
this.customToast(this.$t('message.Commission_tips2') as any); this.customToast(this.$t('message.Commission_tips2') as any);
@ -346,38 +350,39 @@ export default class dnReceiptDom extends BasePage {
this.customToast(this.$t('message.Commission_tips4') as any); this.customToast(this.$t('message.Commission_tips4') as any);
return; return;
} }
let num = 0; // if (this.Container.cpRef4 == null) {
// if (num + parseFloat(this.receiptAmount) > parseFloat(this.Container.qty)) {
// this.customToast(this.$t('message.dn_Tip') as any);
// return;
// }
// } else {
// if (num + parseFloat(this.receiptAmount) > parseFloat(this.Container.qty) - parseFloat(this.Container.cpRef4)) {
// this.customToast(this.$t('message.dn_Tip') as any);
// return;
// }
// }
let isTrue = true;
// this.DNReceivingList[this.everyIndex].wllist.forEach((item: any) => {
// if (item.materialCode == this.every.materialCode && item.wlCode == this.wl.label) {
// this.customToast(this.$t('message.repeatedly') as any);
// return (isTrue = false);
// }
// });
if (this.LocationList.length != 0) { if (this.LocationList.length != 0) {
this.LocationList.forEach((item: any) => { this.LocationList.forEach((item: any) => {
if (item.palletCode == this.Container.barcode) { if (item.palletCode == this.Container.barcode) {
num += parseFloat(item.receiptAmount);
}
});
}
if (this.Container.cpRef4 == null) {
if (num + parseFloat(this.receiptAmount) > parseFloat(this.Container.qty)) {
this.customToast(this.$t('message.dn_Tip') as any);
return;
}
} else {
if (num + parseFloat(this.receiptAmount) > parseFloat(this.Container.qty) - parseFloat(this.Container.cpRef4)) {
this.customToast(this.$t('message.dn_Tip') as any);
return;
}
}
let isTrue = true;
this.DNReceivingList[this.everyIndex].wllist.forEach((item: any) => {
if (item.materialCode == this.every.materialCode && item.wlCode == this.wl.label) {
this.customToast(this.$t('message.repeatedly') as any); this.customToast(this.$t('message.repeatedly') as any);
return (isTrue = false); return (isTrue = false);
} }
}); });
}
if (isTrue == true) { if (isTrue == true) {
this.LocationList.push({ this.LocationList.push({
...this.every, ...this.every,
receiptAmount: this.receiptAmount, receiptAmount: this.receiptAmount,
wlCode: this.wl.label, wlCode: this.wl.label,
palletCode: this.Container.barcode, // palletCode: this.Container.barcode,
palletCode: this.Barcode,
}); });
this.DNReceivingList[this.everyIndex].wllist.push(this.LocationList[this.LocationList.length - 1]); this.DNReceivingList[this.everyIndex].wllist.push(this.LocationList[this.LocationList.length - 1]);
console.log('3 this.DNReceivingList[externalIndex].wllist', this.DNReceivingList[this.everyIndex].wllist); console.log('3 this.DNReceivingList[externalIndex].wllist', this.DNReceivingList[this.everyIndex].wllist);
@ -447,9 +452,11 @@ export default class dnReceiptDom extends BasePage {
// //
this.receiptAmount = null; this.receiptAmount = null;
this.DNReceivingList = []; this.DNReceivingList = [];
this.Barcode = '';
await this.query(); await this.query();
} }
empty() { empty() {
this.Barcode = '';
this.LocationList = []; this.LocationList = [];
this.Location = []; this.Location = [];
this.poNo = ''; this.poNo = '';
@ -513,7 +520,7 @@ export default class dnReceiptDom extends BasePage {
dnNo: this.form.documentNo, dnNo: this.form.documentNo,
}; };
await this.model.querydetaildlist(content); await this.model.querydetaildlist(content);
this.toPage(this.page.raw.ingoods.dnReceipt.Local); this.toPage(this.page.raw.ingoods.dnReceipt.RUSLocal);
} }
} }
</script> </script>
@ -568,7 +575,7 @@ export default class dnReceiptDom extends BasePage {
display: flex; display: flex;
.single-left { .single-left {
width: 80%; width: 79%;
height: 100%; height: 100%;
display: flex; display: flex;

@ -22,7 +22,7 @@ class OrderInInfo {
namespaced: true, namespaced: true,
dynamic: true, dynamic: true,
store, store,
name: 'raw.ingoods.dnReceipt', name: 'raw.ingoods.RUS-dnReceipt',
}) })
export class ReceiptModule extends VuexModule { export class ReceiptModule extends VuexModule {
// 容器码 // 容器码

@ -144,6 +144,7 @@ export const page = {
importDN: '/pages/raw/ingoods/dnReceipt/ImportDN', importDN: '/pages/raw/ingoods/dnReceipt/ImportDN',
bill: '/pages/raw/ingoods/dnReceipt/bill', bill: '/pages/raw/ingoods/dnReceipt/bill',
Local: '/pages/raw/ingoods/dnReceipt/Local-details', Local: '/pages/raw/ingoods/dnReceipt/Local-details',
RUSLocal: '/pages/raw/ingoods/RUS-dnReceipt/Local-details',
}, },
dnReturnGoods: { dnReturnGoods: {
index: '/pages/raw/ingoods/dnReturnGoods/index', index: '/pages/raw/ingoods/dnReturnGoods/index',

Loading…
Cancel
Save