cosmoim-852 fix 功能优化调整

master
hou 3 years ago
parent 2c91bf41ce
commit 77d360fb7a

@ -128,7 +128,7 @@ export default {
ReturnedMaterials: 'Return MAT', ReturnedMaterials: 'Return MAT',
Inventory_query: 'Inventory query', Inventory_query: 'Inventory query',
Pi_PickingQuery: 'Pick up query', Pi_PickingQuery: 'Pick up query',
Pi_OrderNo: 'Order No', Pi_OrderNo: 'Order',
Pi_factory: 'Factory', Pi_factory: 'Factory',
Pi_materielNo: 'MAT code', Pi_materielNo: 'MAT code',
Pi_order: 'Order Query', Pi_order: 'Order Query',

@ -39,7 +39,7 @@ export const headers = [
}, },
{ {
label: vm.$t('message.Container'), label: vm.$t('message.Container'),
key: 'user_defined6', key: 'userDefined6',
width: 400, width: 400,
}, },
]; ];

@ -198,7 +198,7 @@ export default class dnReceiptDom extends BasePage {
}); });
this.every = this.material[0]; this.every = this.material[0];
this.materialIndex = 0; this.materialIndex = 0;
await this.QueryLoc(); // await this.QueryLoc();
} }
// receiptAmount requestAmount // receiptAmount requestAmount
materialChoice(e: any) { materialChoice(e: any) {
@ -207,7 +207,7 @@ export default class dnReceiptDom extends BasePage {
if (item.materialCode == e.pickerName.value) { if (item.materialCode == e.pickerName.value) {
this.every = item; this.every = item;
this.materialIndex = index; this.materialIndex = index;
await this.QueryLoc(); // await this.QueryLoc();
return; return;
} }
}); });
@ -232,8 +232,14 @@ export default class dnReceiptDom extends BasePage {
value: this.Container.locCode + '(' + this.Container.sendSpot + ')', value: this.Container.locCode + '(' + this.Container.sendSpot + ')',
sendSpot: this.Container.sendSpot, sendSpot: this.Container.sendSpot,
}; };
this.Loc = [];
this.Loc.push(arr); this.Loc.push(arr);
this.wlCode = this.Loc[0]; this.wlCode = this.Loc[0];
if (this.Container.cpRef4 == null) {
this.nowAmount = this.Container.qty;
} else {
this.nowAmount = parseFloat(this.Container.qty) - parseFloat(this.Container.cpRef4);
}
} }
// //
Add() { Add() {
@ -241,36 +247,36 @@ export default class dnReceiptDom extends BasePage {
this.customToast(this.$t('message.scanningContainer') as any); this.customToast(this.$t('message.scanningContainer') as any);
return; return;
} }
// if (this.Container.cpRef4 == null) { if (this.Container.cpRef4 == null) {
// if (parseFloat(this.nowAmount) > this.Container.qty) { if (parseFloat(this.nowAmount) > parseFloat(this.Container.qty)) {
// this.customToast(this.$t('message.AppendMateriel3') as any); this.customToast(this.$t('message.AppendMateriel3') as any);
// return; return;
// } }
// } else { } else {
// if (parseFloat(this.nowAmount) > this.Container.qty - parseFloat(this.Container.cpRef4)) { if (parseFloat(this.nowAmount) > parseFloat(this.Container.qty) - parseFloat(this.Container.cpRef4)) {
// this.customToast(this.$t('message.AppendMateriel3') as any); this.customToast(this.$t('message.AppendMateriel3') as any);
// return; return;
// } }
// } }
// let codenum: number = 0; let codenum = 0;
// if (this.list.length != 0) { if (this.list.length != 0) {
// this.list.forEach((item: any) => { this.list.forEach((item: any) => {
// if (item.barCode == this.Container.barcode) { if (item.barCode == this.Container.barcode) {
// num += item.receiptAmount; num += parseFloat(item.nowAmount);
// } }
// }); });
// } }
// if (this.Container.cpRef4 == null) { if (this.Container.cpRef4 == null) {
// if (parseFloat(this.nowAmount) + codenum > this.Container.qty) { if (parseFloat(this.nowAmount) + codenum > this.Container.qty) {
// this.customToast(this.$t('message.AppendMateriel3') as any); this.customToast(this.$t('message.AppendMateriel3') as any);
// return; return;
// } }
// } else { } else {
// if (parseFloat(this.nowAmount) + codenum > this.Container.qty - parseFloat(this.Container.cpRef4)) { if (parseFloat(this.nowAmount) + codenum > this.Container.qty - parseFloat(this.Container.cpRef4)) {
// this.customToast(this.$t('message.AppendMateriel3') as any); this.customToast(this.$t('message.AppendMateriel3') as any);
// return; return;
// } }
// } }
if (!this.every) { if (!this.every) {
this.customToast(this.$t('message.Commission_tips6') as any); this.customToast(this.$t('message.Commission_tips6') as any);
return; return;
@ -317,8 +323,8 @@ export default class dnReceiptDom extends BasePage {
factoryCode: this.session.factoryCode, factoryCode: this.session.factoryCode,
wlCode: this.wlCode.label, wlCode: this.wlCode.label,
nowAmount: this.nowAmount, nowAmount: this.nowAmount,
// barCode: this.Container.barcode, barCode: this.Container.barcode,
barCode: this.Barcode, // barCode: this.Barcode,
}; };
this.list.push(arr); this.list.push(arr);
this.material[this.materialIndex].outAmount += parseFloat(this.list[this.list.length - 1].nowAmount); this.material[this.materialIndex].outAmount += parseFloat(this.list[this.list.length - 1].nowAmount);

@ -323,7 +323,7 @@ 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;
this.receiptAmount = this.Container.requestAmount; this.receiptAmount = parseFloat(this.Container.requestAmount);
} }
// //
Add() { Add() {

@ -286,7 +286,7 @@ export class ReturningModule extends VuexModule {
ContainerCode: any = ''; ContainerCode: any = '';
@MutationAction @MutationAction
async searchBarcode(params: any) { async searchBarcode(params: any) {
const res: any = await http.post(url.auth.query.barcode, { const res: any = await http.post(url.auth.query.queryContainer, {
factoryCode: session.factoryCode, factoryCode: session.factoryCode,
loginName: session.loginName, loginName: session.loginName,
dnNo: params.dnNo, dnNo: params.dnNo,

@ -10,8 +10,8 @@
<u-form class="form" ref="form" :model="form" :error-type="['toast']" label-width="150rpx"> <u-form class="form" ref="form" :model="form" :error-type="['toast']" label-width="150rpx">
<!-- 订单号 --> <!-- 订单号 -->
<u-form-item :required="true" :label="$t('message.Pi_OrderNo')" prop="prdOrder"> <u-form-item :required="true" :label="$t('message.Pi_OrderNo')" prop="prdOrder">
<u-search :placeholder="$t('message.po_PleaseInput')" v-model.trim="form.prdOrder" @search="query" :show-action="false"></u-search> <u-search :placeholder="$t('message.po_PleaseInput')" v-model.trim="form.prdOrder" @search="empty" :show-action="false"></u-search>
<u-button size="mini" style="margin-left: 10rpx" type="primary" @click="query">{{ $t('message.Query') }} </u-button> <u-button size="mini" style="margin-left: 10rpx" type="primary" @click="empty">{{ $t('message.Query') }} </u-button>
</u-form-item> </u-form-item>
<!-- 物料号 --> <!-- 物料号 -->
<u-form-item :required="true" :label="$t('message.Pi_materielNo')" prop="materialCode"> <u-form-item :required="true" :label="$t('message.Pi_materielNo')" prop="materialCode">
@ -178,6 +178,10 @@ export default class returningDom extends BasePage {
// } // }
} }
Add() { Add() {
if (this.qty == '') {
this.customToast(this.$t('message.Summary_PleaseInputNumber') as string);
return;
}
if (parseFloat(this.qty) > parseFloat(this.form.totalAmount)) { if (parseFloat(this.qty) > parseFloat(this.form.totalAmount)) {
this.customToast(this.$t('message.return_Tip4') as string); this.customToast(this.$t('message.return_Tip4') as string);
return; return;
@ -266,6 +270,7 @@ export default class returningDom extends BasePage {
this.wlCode = ''; this.wlCode = '';
this.checkindex = 0; this.checkindex = 0;
this.Location = []; this.Location = [];
this.Barcode = '';
await this.query(); await this.query();
} }
accSubtract(num1: any, num2: any) { accSubtract(num1: any, num2: any) {

@ -315,6 +315,7 @@ export default class RawReceiptDetail extends BasePage {
value: this.Container.locCode + '(' + this.Container.sendSpot + ')', value: this.Container.locCode + '(' + this.Container.sendSpot + ')',
sendSpot: this.Container.sendSpot, sendSpot: this.Container.sendSpot,
}; };
this.Location = [];
this.Location.push(arr); this.Location.push(arr);
this.wlCode = this.Location[0]; this.wlCode = this.Location[0];
let num = 0; let num = 0;
@ -413,7 +414,7 @@ export default class RawReceiptDetail extends BasePage {
let lineData = e.lineData; let lineData = e.lineData;
let i: any; let i: any;
this.model.blDetailList.forEach((item: any, index: any) => { this.model.blDetailList.forEach((item: any, index: any) => {
if (item.materialCode == lineData.materialCode && item.sendSpot == lineData.sendSpot) { if (item.sapSupplyId == lineData.sapSupplyId) {
i = index; i = index;
} }
}); });
@ -430,7 +431,10 @@ export default class RawReceiptDetail extends BasePage {
num += parseFloat(item.qty); num += parseFloat(item.qty);
}); });
this.model.blDetailList[i].fillAmount = num; this.model.blDetailList[i].fillAmount = num;
this.model.blDetailList[i].totalFillAmount -= lineData.qty; console.log('this.model.blDetailList[i].totalFillAmount111', this.model.blDetailList[i].totalFillAmount);
this.model.blDetailList[i].totalFillAmount -= parseFloat(lineData.qty);
console.log('this.model.blDetailList[i].totalFillAmount222', this.model.blDetailList[i].totalFillAmount);
console.log('lineData.qty', lineData.qty);
} else if (res.cancel) { } else if (res.cancel) {
return; return;
} }
@ -445,7 +449,6 @@ export default class RawReceiptDetail extends BasePage {
this.model.blDetailList[this.someIndex].fillAmount = num; this.model.blDetailList[this.someIndex].fillAmount = num;
this.some.fillAmount = num; this.some.fillAmount = num;
this.model.blDetailList[this.someIndex].totalFillAmount += parseFloat(this.qty); this.model.blDetailList[this.someIndex].totalFillAmount += parseFloat(this.qty);
console.log('this.model.blDetailList', this.model.blDetailList);
} }
async bill() { async bill() {
if (this.some == {} || this.some.prdOrder == null) { if (this.some == {} || this.some.prdOrder == null) {

@ -73,7 +73,7 @@
</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>
<u-input v-model="receiptAmount" :placeholder="$t('message.po_PleaseInput')" type="number" :border="border" class="input" /> <u-input v-model="receiptAmount" :disabled="disabled" :placeholder="$t('message.po_PleaseInput')" type="number" :border="border" class="input" />
</view> </view>
</view> </view>
<view class="config"> <view class="config">
@ -113,6 +113,7 @@ import { url } from '@/utils/url';
}) })
export default class dnReceiptDom extends BasePage { export default class dnReceiptDom extends BasePage {
model = model; model = model;
disabled = false;
form: any = { form: any = {
documentNo: '', documentNo: '',
}; };
@ -328,6 +329,8 @@ export default class dnReceiptDom extends BasePage {
console.log('params', params); console.log('params', params);
await this.model.searchBarcode(params); await this.model.searchBarcode(params);
this.Container = this.model.ContainerCode; this.Container = this.model.ContainerCode;
this.receiptAmount = parseFloat(this.Container.requestAmount);
this.disabled = true;
} }
// //
Add() { Add() {

@ -19,7 +19,7 @@
</view> </view>
<view class="library"> <view class="library">
<view class="library-left"> <view class="library-left">
<view>{{ $t('message.CommissionedLocation') }}</view> <view style="width: 50px">{{ $t('message.CommissionedLocation') }}</view>
<jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="LocationChoice" showKey="value" valKey="value" :val="wl.value" class="search" :options="Location" /> <jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="LocationChoice" showKey="value" valKey="value" :val="wl.value" class="search" :options="Location" />
</view> </view>
</view> </view>

Loading…
Cancel
Save