|
|
@ -13,43 +13,51 @@
|
|
|
|
<u-form class="form" ref="form" :model="form" label-width="180rpx">
|
|
|
|
<u-form class="form" ref="form" :model="form" label-width="180rpx">
|
|
|
|
<u-form-item
|
|
|
|
<u-form-item
|
|
|
|
:required="true"
|
|
|
|
:required="true"
|
|
|
|
:label="this.$t('message.InventoryOrderNo')"
|
|
|
|
:label="$t('message.InventoryOrderNo')"
|
|
|
|
prop="documentNo"
|
|
|
|
prop="pddNo"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<u-search
|
|
|
|
<u-search
|
|
|
|
:placeholder="this.$t('message.InventoryPleaseScan')"
|
|
|
|
:placeholder="$t('message.InventoryPleaseScan')"
|
|
|
|
v-model="form.documentNo"
|
|
|
|
v-model="form.pddNo"
|
|
|
|
@search="model.queryOrderInInfo"
|
|
|
|
|
|
|
|
|
|
|
|
@search="model.rawMaterialInventoryCheckRaw"
|
|
|
|
:show-action="false"
|
|
|
|
:show-action="false"
|
|
|
|
></u-search>
|
|
|
|
></u-search>
|
|
|
|
</u-form-item>
|
|
|
|
</u-form-item>
|
|
|
|
<u-form-item :label="this.$t('message.InventoryMaterielNo')">
|
|
|
|
<u-form-item :label="$t('message.InventoryMaterielNo')" prop="productCode">
|
|
|
|
|
|
|
|
<u-search
|
|
|
|
|
|
|
|
:placeholder="$t('message.po_PleaseInput')"
|
|
|
|
|
|
|
|
v-model="form.productCode"
|
|
|
|
|
|
|
|
@search="checkRawProductCode"
|
|
|
|
|
|
|
|
:show-action="false"
|
|
|
|
|
|
|
|
></u-search>
|
|
|
|
|
|
|
|
</u-form-item>
|
|
|
|
|
|
|
|
<u-form-item :label="$t('message.InventoryMateriel')" prop="productDescZh">
|
|
|
|
<u-input
|
|
|
|
<u-input
|
|
|
|
v-model="model.orderInInfo.carNo"
|
|
|
|
v-model="form.productDescZh"
|
|
|
|
:placeholder="this.$t('message.po_PleaseInput')"
|
|
|
|
:placeholder="$t('message.po_PleaseInput')"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</u-form-item>
|
|
|
|
</u-form-item>
|
|
|
|
<u-form-item :label="this.$t('message.InventoryMateriel')">
|
|
|
|
<u-form-item :label="$t('message.InventoryTotalNumber')" prop="spQty">
|
|
|
|
<u-input
|
|
|
|
<u-input
|
|
|
|
v-model="model.orderInInfo.bookingTime"
|
|
|
|
v-model="form.spQty"
|
|
|
|
:placeholder="this.$t('message.po_PleaseInput')"
|
|
|
|
:placeholder="$t('message.po_PleaseInput')"
|
|
|
|
/>
|
|
|
|
|
|
|
|
</u-form-item>
|
|
|
|
|
|
|
|
<u-form-item :label="this.$t('message.InventoryTotalNumber')">
|
|
|
|
|
|
|
|
<u-input
|
|
|
|
|
|
|
|
v-model="model.orderInInfo.supplyCode"
|
|
|
|
|
|
|
|
:placeholder="this.$t('message.po_PleaseInput')"
|
|
|
|
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</u-form-item>
|
|
|
|
</u-form-item>
|
|
|
|
</u-form>
|
|
|
|
</u-form>
|
|
|
|
<view class="bottom-bar">
|
|
|
|
<view class="bottom-bar">
|
|
|
|
<u-row class="button-bar">
|
|
|
|
<u-row class="button-bar">
|
|
|
|
<u-col :span="6">
|
|
|
|
<u-col :span="4">
|
|
|
|
<u-button type="primary" @click="onSubmit">{{
|
|
|
|
<u-button type="primary" @click="checkRawCreateInfo">{{
|
|
|
|
$t("message.workArea_Confirm")
|
|
|
|
$t("message.workArea_Confirm")
|
|
|
|
}}</u-button>
|
|
|
|
}}</u-button>
|
|
|
|
</u-col>
|
|
|
|
</u-col>
|
|
|
|
<u-col :span="6">
|
|
|
|
<u-col :span="4">
|
|
|
|
|
|
|
|
<u-button type="primary" @click="checkRawOrderComplete">{{
|
|
|
|
|
|
|
|
$t("message.InventoryFinish")
|
|
|
|
|
|
|
|
}}</u-button>
|
|
|
|
|
|
|
|
</u-col>
|
|
|
|
|
|
|
|
<u-col :span="4">
|
|
|
|
<u-button type="error" @click="back">{{
|
|
|
|
<u-button type="error" @click="back">{{
|
|
|
|
$t("message.po_Return")
|
|
|
|
$t("message.po_Return")
|
|
|
|
}}</u-button>
|
|
|
|
}}</u-button>
|
|
|
@ -65,13 +73,13 @@ import { BasePage } from "@/components/base/page";
|
|
|
|
import { VForm, VFormRules } from "vue/types/form";
|
|
|
|
import { VForm, VFormRules } from "vue/types/form";
|
|
|
|
import model from "./model";
|
|
|
|
import model from "./model";
|
|
|
|
|
|
|
|
|
|
|
|
interface OptionType {
|
|
|
|
// interface OptionType {
|
|
|
|
label: string;
|
|
|
|
// label: string;
|
|
|
|
value: string;
|
|
|
|
// value: string;
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
@Component
|
|
|
|
@Component
|
|
|
|
export default class dnReceiptDom extends BasePage {
|
|
|
|
export default class rawMaterialInventory extends BasePage {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 表单引用
|
|
|
|
* 表单引用
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -84,17 +92,26 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
index() {
|
|
|
|
index() {
|
|
|
|
this.toPage(this.page.raw.index);
|
|
|
|
this.toPage(this.page.raw.index);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
status = false;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 表单数据
|
|
|
|
* 表单数据
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
form = {
|
|
|
|
form = {
|
|
|
|
documentNo: null,
|
|
|
|
// 盘点单号
|
|
|
|
cboPlace: {} as OptionType,
|
|
|
|
pddNo: null,
|
|
|
|
|
|
|
|
// 物料号
|
|
|
|
|
|
|
|
productCode: null,
|
|
|
|
|
|
|
|
productDescZh: null,
|
|
|
|
|
|
|
|
// 盘点数量
|
|
|
|
|
|
|
|
spQty: null,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// cboPlace: {} as OptionType,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
cboPlaceSelect = false;
|
|
|
|
cboPlaceSelect = false;
|
|
|
|
|
|
|
|
|
|
|
|
rules: VFormRules<any> = {
|
|
|
|
rules: VFormRules<any> = {
|
|
|
|
documentNo: [
|
|
|
|
pddNo: [
|
|
|
|
{ required: true, message: this.$t("message.dn_PleaseScan") as string },
|
|
|
|
{ required: true, message: this.$t("message.dn_PleaseScan") as string },
|
|
|
|
],
|
|
|
|
],
|
|
|
|
// cboPlace: [{ required: true, message: this.$t('message.Warehouse_Tip10') as string }],
|
|
|
|
// cboPlace: [{ required: true, message: this.$t('message.Warehouse_Tip10') as string }],
|
|
|
@ -103,6 +120,27 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
value = "";
|
|
|
|
value = "";
|
|
|
|
show = false;
|
|
|
|
show = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 扫描物料号检查
|
|
|
|
|
|
|
|
async checkRawProductCode(productCode:string){
|
|
|
|
|
|
|
|
let result = await model.checkRawProductCode({
|
|
|
|
|
|
|
|
productCode,pddNo:this.form.pddNo
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
console.log('result:::',result)
|
|
|
|
|
|
|
|
this.status = result.isState
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
checkRawCreateInfo(){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(this.status){
|
|
|
|
|
|
|
|
model.checkRawProductComplete(this.form)
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
model.checkRawCreateInfo(this.form)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
async checkRawOrderComplete(){
|
|
|
|
|
|
|
|
await model.checkRawOrderComplete(this.form.pddNo)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
|
|
|
|
// 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
|
|
|
|
onReady() {
|
|
|
|
onReady() {
|
|
|
|
this.$form.setRules(this.rules);
|
|
|
|
this.$form.setRules(this.rules);
|
|
|
@ -118,22 +156,24 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
back() {
|
|
|
|
back() {
|
|
|
|
uni.navigateBack({ delta: 1 });
|
|
|
|
uni.navigateBack({ delta: 1 });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
onSubmit() {
|
|
|
|
async onSubmit() {
|
|
|
|
this.$form.validate((valid: boolean) => {
|
|
|
|
this.$form.validate((valid: boolean) => {
|
|
|
|
if (!valid) return;
|
|
|
|
if (!valid) return;
|
|
|
|
// if (!this.model.hasDnInfo) {
|
|
|
|
if (!this.model.hasDnInfo) {
|
|
|
|
// uni.showToast({
|
|
|
|
uni.showToast({
|
|
|
|
// icon: 'none',
|
|
|
|
icon: 'none',
|
|
|
|
// title: this.$t('message.dn_PleaseScan') as string,
|
|
|
|
title: this.$t('message.dn_PleaseScan') as string,
|
|
|
|
// });
|
|
|
|
|
|
|
|
// return;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
sessionStorage.setItem(
|
|
|
|
|
|
|
|
"dnNo",
|
|
|
|
|
|
|
|
JSON.stringify(this.form.documentNo) as any
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
this.toPage(this.page.raw.ingoods.dnReceipt.detail);
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// sessionStorage.setItem(
|
|
|
|
|
|
|
|
// "dnNo",
|
|
|
|
|
|
|
|
// JSON.stringify(this.form.pddNo) as any
|
|
|
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// this.toPage(this.page.raw.ingoods.dnReceipt.detail);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
await this.model.submitOrderInEnter();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|