|
|
|
@ -7,40 +7,40 @@
|
|
|
|
|
<view class="title">{{ $t('message.shelves') }}</view>
|
|
|
|
|
<view class="right"></view>
|
|
|
|
|
</view>
|
|
|
|
|
<u-form class="form" ref="form" :model="form" label-width="180rpx">
|
|
|
|
|
<u-form class="form" ref="form" label-width="180rpx">
|
|
|
|
|
<!-- 单号 -->
|
|
|
|
|
<view class="single">
|
|
|
|
|
<view class="single-left">
|
|
|
|
|
<view>{{ $t('message.InventoryOrderNo') }}:</view>
|
|
|
|
|
<u-search :placeholder="$t('message.InventoryPleaseScan')" v-model="userDefined4" @search="query" :show-action="false"></u-search>
|
|
|
|
|
<u-search :placeholder="$t('message.InventoryPleaseScan')" v-model="orderNo" @search="query" :show-action="false"></u-search>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="single-right">
|
|
|
|
|
<u-button type="primary" @click="query">{{ $t('message.Query') }}</u-button>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 上架单号 -->
|
|
|
|
|
<u-form-item :label="$t('message.shelvesCode')">
|
|
|
|
|
<jPicker sureColor="#ff0000" @bindpicker="selectItem" showKey="value" valKey="value" :val="remove.value" :options="model.WlList" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 物料编码 -->
|
|
|
|
|
<u-form-item :label="$t('message.matcode')">
|
|
|
|
|
<u-input :disabled="true" v-model="histroyItem.materialDesc" placeholder="" style="overflow: hidden" />
|
|
|
|
|
<jPicker sureColor="#ff0000" @bindpicker="selectProductCode" showKey="value" valKey="value" :val="productCodeList.value" :options="model.productCodeList" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 物料编码 -->
|
|
|
|
|
<!-- <u-form-item :label="$t('message.matcode')">
|
|
|
|
|
<u-input :disabled="true" v-model="histroyItem.materialDesc" placeholder="" style="overflow: hidden" />
|
|
|
|
|
</u-form-item> -->
|
|
|
|
|
<!-- 物料描述 -->
|
|
|
|
|
<u-form-item :label="$t('message.po_MaterielDes')">
|
|
|
|
|
<u-input :disabled="true" v-model="histroyItem.materialDesc" placeholder="" style="overflow: hidden" />
|
|
|
|
|
<u-input :disabled="true" v-model="histroyItem.productDescZh" placeholder="" style="overflow: hidden" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 行项目 -->
|
|
|
|
|
<u-form-item :label="$t('message.Line')">
|
|
|
|
|
<u-input :disabled="true" v-model="histroyItem.materialDesc" placeholder="" style="overflow: hidden" />
|
|
|
|
|
<u-input :disabled="true" v-model="histroyItem.orderItem" placeholder="" style="overflow: hidden" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 计划数量 -->
|
|
|
|
|
<u-form-item :label="$t('message.plan')">
|
|
|
|
|
<u-input :disabled="true" v-model="histroyItem.proNum" placeholder="" />
|
|
|
|
|
<u-input :disabled="true" v-model="histroyItem.qty" placeholder="" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 已上架数量 -->
|
|
|
|
|
<u-form-item :label="$t('message.QuantityShelves')">
|
|
|
|
|
<u-input :disabled="true" v-model="histroyItem.proNum" placeholder="" />
|
|
|
|
|
<u-input :disabled="true" v-model="histroyItem.actualQty" placeholder="" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 库位 -->
|
|
|
|
|
<u-form-item :label="$t('message.CommissionedLocation')">
|
|
|
|
@ -48,14 +48,14 @@
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 条码 -->
|
|
|
|
|
<u-form-item :required="true" :label="$t('message.product_barCode')" prop="productCode">
|
|
|
|
|
<u-search :placeholder="$t('message.po_PleaseInput')" v-model.trim="form.productCode" @search="query" :show-action="false"></u-search>
|
|
|
|
|
<u-search :placeholder="$t('message.po_PleaseInput')" v-model.trim="barcode" @search="onSubmit" :show-action="false"></u-search>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</u-form>
|
|
|
|
|
<view class="bottom-bar">
|
|
|
|
|
<u-row class="button-bar">
|
|
|
|
|
<!-- 确定 -->
|
|
|
|
|
<u-col :span="6">
|
|
|
|
|
<u-button type="primary" @click="onSubmit">{{ $t('message.workArea_Confirm') }}</u-button>
|
|
|
|
|
<u-button type="primary">{{ $t('message.workArea_Confirm') }}</u-button>
|
|
|
|
|
</u-col>
|
|
|
|
|
<!-- 返回 -->
|
|
|
|
|
<u-col :span="6">
|
|
|
|
@ -66,101 +66,79 @@
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts">
|
|
|
|
|
import { Component, Ref } from 'vue-property-decorator';
|
|
|
|
|
import { Component } from 'vue-property-decorator';
|
|
|
|
|
import { BasePage } from '@/components/base/page';
|
|
|
|
|
import jPicker from '@/components/J-Picker/jPicker.vue';
|
|
|
|
|
import { VForm, VFormRules } from 'vue/types/form';
|
|
|
|
|
import model from './model';
|
|
|
|
|
import { session } from '@/store/modules/session';
|
|
|
|
|
interface OptionType {
|
|
|
|
|
label: string;
|
|
|
|
|
value: string;
|
|
|
|
|
}
|
|
|
|
|
@Component({
|
|
|
|
|
components: {
|
|
|
|
|
jPicker,
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
export default class productCheckReceipt extends BasePage {
|
|
|
|
|
//表单引用
|
|
|
|
|
@Ref('form') readonly $form!: VForm;
|
|
|
|
|
model = model;
|
|
|
|
|
form = {
|
|
|
|
|
aimWl: {} as OptionType,
|
|
|
|
|
productCode: '',
|
|
|
|
|
};
|
|
|
|
|
remove: any = {};
|
|
|
|
|
allNum = 0;
|
|
|
|
|
userDefined4: any = '';
|
|
|
|
|
histroyItem: any = {};
|
|
|
|
|
aimWlSelect = false;
|
|
|
|
|
cboPlaceSelect = false;
|
|
|
|
|
rules: VFormRules<any> = {
|
|
|
|
|
documentNo: [{ required: true, message: this.$t('message.Warehouse_Tip1') as string }],
|
|
|
|
|
aimWl: [{ required: true, message: this.$t('message.Warehouse_Tip3') as string }],
|
|
|
|
|
cboPlace: [{ required: true, message: this.$t('message.Warehouse_Tip4') as string }],
|
|
|
|
|
};
|
|
|
|
|
value = '';
|
|
|
|
|
show = false;
|
|
|
|
|
selectItem(e: any) {
|
|
|
|
|
this.remove = e.pickerName;
|
|
|
|
|
}
|
|
|
|
|
//页面初始化
|
|
|
|
|
async onReady() {
|
|
|
|
|
await this.model.queryLocation();
|
|
|
|
|
this.remove = this.model.WlList[0];
|
|
|
|
|
}
|
|
|
|
|
//点击生成随机移库码
|
|
|
|
|
async query() {
|
|
|
|
|
await this.model.getCpMoveBatchNo({
|
|
|
|
|
loginName: session.loginName,
|
|
|
|
|
});
|
|
|
|
|
this.userDefined4 = model.userDefined;
|
|
|
|
|
selectItem(e: any) {
|
|
|
|
|
this.remove = e.pickerName;
|
|
|
|
|
}
|
|
|
|
|
//移库确认
|
|
|
|
|
onSubmit() {
|
|
|
|
|
this.$form.validate(async (valid: boolean) => {
|
|
|
|
|
if (!valid) return;
|
|
|
|
|
if (this.userDefined4 == ' ' || this.userDefined4.length == 0) {
|
|
|
|
|
this.customToast(this.$t('message.LibraryCode') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (!this.form.productCode) {
|
|
|
|
|
this.customToast(this.$t('message.Warehouse_Tip5') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (!this.form.aimWl.value) {
|
|
|
|
|
this.customToast(this.$t('message.Warehouse_Tip3') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.form.aimWl.value == model.orderInInfo.locCode) {
|
|
|
|
|
this.customToast(this.$t('message.TargetLocation') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
const orderlist = [
|
|
|
|
|
{
|
|
|
|
|
...this.model.orderInInfo,
|
|
|
|
|
originWl: this.model.orderInInfo.locCode,
|
|
|
|
|
barCode: this.model.orderInInfo.barcode,
|
|
|
|
|
aimWl: this.form.aimWl.value,
|
|
|
|
|
type: '2',
|
|
|
|
|
orderType: '5',
|
|
|
|
|
keepBy: session.loginName as string,
|
|
|
|
|
factoryCode: session.factoryCode as string,
|
|
|
|
|
userDefined4: this.userDefined4,
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
await this.model.onTakeoutConfirm(orderlist);
|
|
|
|
|
if (model.code == '1') {
|
|
|
|
|
this.customToast(this.$t('message.Warehouse_Tip9') as string);
|
|
|
|
|
// this.form.productCode = '';
|
|
|
|
|
this.model.empty();
|
|
|
|
|
// this.query()
|
|
|
|
|
this.form.productCode = '';
|
|
|
|
|
this.allNum = 0;
|
|
|
|
|
orderNo: any = '';
|
|
|
|
|
productCodeList: any = {};
|
|
|
|
|
async query() {
|
|
|
|
|
if (this.orderNo == '' || this.orderNo.length == 0) {
|
|
|
|
|
this.customToast(this.$t('message.Commission_tips1') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
await this.model.queryOrderNo(this.orderNo);
|
|
|
|
|
this.productCodeList = this.model.productCodeList[0];
|
|
|
|
|
this.histroyItem = this.model.orderNoItemList[0];
|
|
|
|
|
}
|
|
|
|
|
histroyItem: any = {};
|
|
|
|
|
selectProductCode(e: any) {
|
|
|
|
|
this.model.orderNoItemList.forEach((item: any) => {
|
|
|
|
|
if (item.productCode == e.pickerName.value) {
|
|
|
|
|
this.histroyItem = item;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
barcode: any = '';
|
|
|
|
|
async onSubmit() {
|
|
|
|
|
if (this.orderNo == '' || this.orderNo.length == 0) {
|
|
|
|
|
this.customToast(this.$t('message.Commission_tips1') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.histroyItem == {} || !this.histroyItem.productCode) {
|
|
|
|
|
this.customToast(this.$t('message.AppendMateriel5') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.barcode == '' || this.barcode.length == 0) {
|
|
|
|
|
this.customToast(this.$t('message.barcode') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let params = {
|
|
|
|
|
loginName: session.loginName,
|
|
|
|
|
factoryCode: session.factoryCode,
|
|
|
|
|
orderNo: this.orderNo,
|
|
|
|
|
orderItem: this.histroyItem.orderItem,
|
|
|
|
|
productCode: this.histroyItem.productCode,
|
|
|
|
|
productDescZh: this.histroyItem.productDescZh,
|
|
|
|
|
orderType: this.histroyItem.orderType,
|
|
|
|
|
barcode: this.barcode,
|
|
|
|
|
locCode: this.remove.value,
|
|
|
|
|
};
|
|
|
|
|
await this.model.OnSubmit(params);
|
|
|
|
|
if (this.model.SubmitCode == '1') {
|
|
|
|
|
this.customToast(this.$t('message.Warehouse_Tip9') as string);
|
|
|
|
|
this.barcode = '';
|
|
|
|
|
this.histroyItem = {};
|
|
|
|
|
this.productCodeList = {};
|
|
|
|
|
await this.query();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|