cosmoim-852 fix 俄罗斯半成品盘点扫码盘点

master
guoshuang 3 years ago
parent 39359fea29
commit a11c8eff4d

@ -171,7 +171,7 @@ export default class LoginPage extends BasePage {
console.log('......', server.serverAddress); console.log('......', server.serverAddress);
if (server.serverAddress.includes('https://eurmom.haier.net')) { if (server.serverAddress.includes('https://eurmom.haier.net')) {
// //
this.Version = '1.1.14'; this.Version = '1.1.15';
} else { } else {
this.Version = '1.0.46'; this.Version = '1.0.46';
} }

@ -19,14 +19,21 @@
<u-form-item :label="$t('message.Total_scanned')" prop="spQty"> <u-form-item :label="$t('message.Total_scanned')" prop="spQty">
<u-input v-model="allNum" placeholder=" " :disabled="true" type="number" /> <u-input v-model="allNum" placeholder=" " :disabled="true" type="number" />
</u-form-item> </u-form-item>
<!-- 条码 -->
<u-form-item :required="true" :label="$t('message.product_barCode')" prop="productCode">
<u-search :placeholder="$t('message.barcode')" v-model.trim="barcode" @search="onSearchBarcode" :show-action="false"></u-search>
</u-form-item>
<!-- 库位 --> <!-- 库位 -->
<u-form-item :label="$t('message.CommissionedLocation')" prop="spQty"> <u-form-item :label="$t('message.CommissionedLocation')" prop="spQty">
<u-input v-model="productItem.locCode" placeholder=" " :disabled="true" type="text" /> <u-input v-model="productItem.locCode" placeholder=" " :disabled="true" type="text" />
</u-form-item> </u-form-item>
<!-- 物料号 --> <!-- 物料号 -->
<u-form-item :label="$t('message.po_MaterielNo')" prop="productDescZh"> <u-form-item :label="$t('message.po_MaterielNo')" prop="productDescZh">
<jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="onchange" showKey="value" valKey="value" :val="wl.value" class="search" :options="model.InventoryItemList" /> <u-input v-model="productItem.productCode" placeholder=" " :disabled="true" type="text" />
</u-form-item> </u-form-item>
<!-- <u-form-item :label="$t('message.po_MaterielNo')" prop="productDescZh">
<jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="onchange" showKey="value" valKey="value" :val="wl.value" class="search" :options="model.InventoryItemList" />
</u-form-item> -->
<!-- 物料名 --> <!-- 物料名 -->
<u-form-item :label="$t('message.InventoryMateriel')" prop="productDescZh"> <u-form-item :label="$t('message.InventoryMateriel')" prop="productDescZh">
<u-input v-model="productItem.productDescZh" placeholder=" " :disabled="true" type="text" /> <u-input v-model="productItem.productDescZh" placeholder=" " :disabled="true" type="text" />
@ -79,6 +86,8 @@ export default class rawMaterialInventory extends BasePage {
allNum = 0; allNum = 0;
originWlSelect = false; originWlSelect = false;
wl: any = {}; wl: any = {};
barcode: any = '';
scanreturndata: any = {};
// //
onReady() { onReady() {
this.empty(); this.empty();
@ -92,6 +101,8 @@ export default class rawMaterialInventory extends BasePage {
this.spQty = ''; this.spQty = '';
this.productItem = {}; this.productItem = {};
this.allNum = 0; this.allNum = 0;
this.scanreturndata = {};
this.barcode = '';
} }
// //
async rawMaterialInventoryCheckRaw() { async rawMaterialInventoryCheckRaw() {
@ -108,18 +119,18 @@ export default class rawMaterialInventory extends BasePage {
this.model.InventoryList.forEach((item: any) => { this.model.InventoryList.forEach((item: any) => {
this.allNum += parseFloat(item.spQty); this.allNum += parseFloat(item.spQty);
}); });
this.productItem = this.model.InventoryList[0]; // this.productItem = this.model.InventoryList[0];
this.wl = this.model.InventoryItemList[0]; // this.wl = this.model.InventoryItemList[0];
} }
} }
// //
onchange(e: any) { // onchange(e: any) {
this.model.InventoryList.forEach((item: any) => { // this.model.InventoryList.forEach((item: any) => {
if (item.productCode == e.pickerName.label) { // if (item.productCode == e.pickerName.label) {
this.productItem = item; // this.productItem = item;
} // }
}); // });
} // }
// //
async checkRawCreateInfo() { async checkRawCreateInfo() {
if (!this.spQty) { if (!this.spQty) {
@ -136,15 +147,24 @@ export default class rawMaterialInventory extends BasePage {
}); });
return; return;
} }
if (!this.barcode) {
uni.showToast({
icon: 'none',
title: this.$t('message.barcode') as any,
});
return;
}
let params = { let params = {
factoryCode: this.session.factoryCode, factoryCode: this.session.factoryCode,
loginName: this.session.loginName, loginName: this.session.loginName,
pddNo: this.pddNo, pddNo: this.pddNo,
pddItem: this.productItem.pddItem,
productCode: this.productItem.productCode, productCode: this.productItem.productCode,
productDescZh: this.productItem.productDescZh, locCode: this.productItem.locCode,
barcode: this.barcode,
spQty: this.spQty, spQty: this.spQty,
}; };
await model.checkRawProductComplete(params); await model.barcodeConfirm(params);
if (this.model.code == '1') { if (this.model.code == '1') {
this.empty(); this.empty();
await this.rawMaterialInventoryCheckRaw(); await this.rawMaterialInventoryCheckRaw();
@ -163,6 +183,39 @@ export default class rawMaterialInventory extends BasePage {
back() { back() {
uni.navigateBack({ delta: 1 }); uni.navigateBack({ delta: 1 });
} }
//
async onSearchBarcode() {
if (this.pddNo == '' || this.pddNo.length == 0) {
this.customToast(this.$t('message.Commission_tips1') as string);
return;
}
if (this.barcode == '' || this.barcode.length == 0) {
this.customToast(this.$t('message.barcode') as string);
return;
}
await this.model.getRawStorageSnNew(this.barcode);
if (this.model.Semifedcode == '1') {
//this.customToast(this.$t('message.Warehouse_Tip9') as string);
// if (JSON.stringify(this.model.InventoryList).indexOf(this.model.Semifedcode) != -1) {
//this.scanreturndata = this.model.scandata;
this.spQty = Number(this.model.scandata.barQty);
this.model.InventoryList.forEach((item: any) => {
if (item.productCode == this.model.scandata.productCode && item.locCode == this.model.scandata.locCode) {
this.productItem = item;
// this.wl = item;
this.productItem.spQty += 1;
}
});
// } else {
// this.customToast(this.$t('message.Nomatch') as string);
// }
// this.barcode = '';
// this.histroyItem = {};
// this.productCodeList = {};
// this.model.empty();
// await this.query();
}
}
} }
</script> </script>

@ -50,6 +50,9 @@ export class ReceiptModule extends VuexModule {
orderInInfoListEx: OrderInInfo[] = []; orderInInfoListEx: OrderInInfo[] = [];
InventoryList: any = []; InventoryList: any = [];
InventoryItemList: any = []; InventoryItemList: any = [];
Semifedcode: any = '';
scandata: any = {};
SubmitCode: any = '';
/** /**
* *
@ -181,6 +184,34 @@ export class ReceiptModule extends VuexModule {
// title: msg, // title: msg,
// }); // });
} }
/**
*
*
* @param barcode
*/
@MutationAction
async getRawStorageSnNew(barcode: string) {
const res: any = await http.post(url.material.rawMaterialInventory.getRawStorageSnNew, {
barcode,
factoryCode: session.factoryCode,
loginName: session.loginName,
});
const Semifedcode = res.code;
const scandata = res.data;
// const InventoryItemList = [];
// InventoryList.forEach((item: any) => {
// const arr = {
// value: item.productCode,
// label: item.productCode,
// };
// InventoryItemList.push(arr);
// });
return { Semifedcode, scandata };
// uni.showToast({
// icon: "none",
// title: msg,
// });
}
/** /**
* *
@ -233,11 +264,11 @@ export class ReceiptModule extends VuexModule {
* @memberof ReceiptModule * @memberof ReceiptModule
*/ */
@MutationAction @MutationAction
async checkRawProductComplete(form: any) { async barcodeConfirm(form: any) {
const res: any = await http.post(url.material.rawMaterialInventory.productComplete, { const res: any = await http.post(url.material.rawMaterialInventory.barcodeConfirm, {
...form, ...form,
factoryCode: session.factoryCode, // factoryCode: session.factoryCode,
loginName: session.loginName, // loginName: session.loginName,
}); });
const code = res.code; const code = res.code;
return { code }; return { code };

@ -103,6 +103,8 @@ export const url = {
productComplete: '/wmspda/product/finished/checkRaw/productComplete', productComplete: '/wmspda/product/finished/checkRaw/productComplete',
// 5.盘点完成 // 5.盘点完成
orderComplete: '/wmspda/product/finished/checkRaw/orderComplete', orderComplete: '/wmspda/product/finished/checkRaw/orderComplete',
getRawStorageSnNew: '/wmspda/material/getRawStorageSnNew',
barcodeConfirm: '/wmspda/product/finished/sfgPd/barcodeConfirm',
}, },
// 委外 commission // 委外 commission
commission: { commission: {

Loading…
Cancel
Save