|
|
|
@ -19,14 +19,21 @@
|
|
|
|
|
<u-form-item :label="$t('message.Total_scanned')" prop="spQty">
|
|
|
|
|
<u-input v-model="allNum" placeholder=" " :disabled="true" type="number" />
|
|
|
|
|
</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-input v-model="productItem.locCode" placeholder=" " :disabled="true" type="text" />
|
|
|
|
|
</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-input v-model="productItem.productCode" placeholder=" " :disabled="true" type="text" />
|
|
|
|
|
</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-input v-model="productItem.productDescZh" placeholder=" " :disabled="true" type="text" />
|
|
|
|
@ -79,6 +86,8 @@ export default class rawMaterialInventory extends BasePage {
|
|
|
|
|
allNum = 0;
|
|
|
|
|
originWlSelect = false;
|
|
|
|
|
wl: any = {};
|
|
|
|
|
barcode: any = '';
|
|
|
|
|
scanreturndata: any = {};
|
|
|
|
|
// 页面初始化
|
|
|
|
|
onReady() {
|
|
|
|
|
this.empty();
|
|
|
|
@ -92,6 +101,8 @@ export default class rawMaterialInventory extends BasePage {
|
|
|
|
|
this.spQty = '';
|
|
|
|
|
this.productItem = {};
|
|
|
|
|
this.allNum = 0;
|
|
|
|
|
this.scanreturndata = {};
|
|
|
|
|
this.barcode = '';
|
|
|
|
|
}
|
|
|
|
|
//单号查询
|
|
|
|
|
async rawMaterialInventoryCheckRaw() {
|
|
|
|
@ -108,18 +119,18 @@ export default class rawMaterialInventory extends BasePage {
|
|
|
|
|
this.model.InventoryList.forEach((item: any) => {
|
|
|
|
|
this.allNum += parseFloat(item.spQty);
|
|
|
|
|
});
|
|
|
|
|
this.productItem = this.model.InventoryList[0];
|
|
|
|
|
this.wl = this.model.InventoryItemList[0];
|
|
|
|
|
// this.productItem = this.model.InventoryList[0];
|
|
|
|
|
// this.wl = this.model.InventoryItemList[0];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//选择其中一条物料
|
|
|
|
|
onchange(e: any) {
|
|
|
|
|
this.model.InventoryList.forEach((item: any) => {
|
|
|
|
|
if (item.productCode == e.pickerName.label) {
|
|
|
|
|
this.productItem = item;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
// onchange(e: any) {
|
|
|
|
|
// this.model.InventoryList.forEach((item: any) => {
|
|
|
|
|
// if (item.productCode == e.pickerName.label) {
|
|
|
|
|
// this.productItem = item;
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
//点击确定
|
|
|
|
|
async checkRawCreateInfo() {
|
|
|
|
|
if (!this.spQty) {
|
|
|
|
@ -136,15 +147,24 @@ export default class rawMaterialInventory extends BasePage {
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (!this.barcode) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.barcode') as any,
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let params = {
|
|
|
|
|
factoryCode: this.session.factoryCode,
|
|
|
|
|
loginName: this.session.loginName,
|
|
|
|
|
pddNo: this.pddNo,
|
|
|
|
|
pddItem: this.productItem.pddItem,
|
|
|
|
|
productCode: this.productItem.productCode,
|
|
|
|
|
productDescZh: this.productItem.productDescZh,
|
|
|
|
|
locCode: this.productItem.locCode,
|
|
|
|
|
barcode: this.barcode,
|
|
|
|
|
spQty: this.spQty,
|
|
|
|
|
};
|
|
|
|
|
await model.checkRawProductComplete(params);
|
|
|
|
|
await model.barcodeConfirm(params);
|
|
|
|
|
if (this.model.code == '1') {
|
|
|
|
|
this.empty();
|
|
|
|
|
await this.rawMaterialInventoryCheckRaw();
|
|
|
|
@ -163,6 +183,39 @@ export default class rawMaterialInventory extends BasePage {
|
|
|
|
|
back() {
|
|
|
|
|
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>
|
|
|
|
|
|
|
|
|
|