|
|
|
@ -4,61 +4,61 @@
|
|
|
|
|
<view class="left">
|
|
|
|
|
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack({})" />
|
|
|
|
|
</view>
|
|
|
|
|
<view class="title">{{ $t('message.SemiProductGetOutOfTheWarehouse') }}</view>
|
|
|
|
|
<view class="title">{{ $t('message.shelves') }}</view>
|
|
|
|
|
<view class="right"></view>
|
|
|
|
|
</view>
|
|
|
|
|
<u-form class="form" ref="form" :model="form" label-width="180rpx">
|
|
|
|
|
<!-- 移库码 -->
|
|
|
|
|
<!-- 单号 -->
|
|
|
|
|
<view class="single">
|
|
|
|
|
<view class="single-left">
|
|
|
|
|
<view>{{ $t('message.Batch') }}</view>
|
|
|
|
|
<u-search :placeholder="$t('message.batch')" class="Transfer" v-model.trim="userDefined4" @search="QueryHistory" :show-action="false"></u-search>
|
|
|
|
|
<view>{{ $t('message.InventoryOrderNo') }}:</view>
|
|
|
|
|
<u-search :placeholder="$t('message.InventoryPleaseScan')" v-model="userDefined4" @search="query" :show-action="false"></u-search>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="single-right">
|
|
|
|
|
<u-button type="primary" style="height: 60rpx; width: 140rpx" @click="generate">{{ $t('message.generate') }}</u-button>
|
|
|
|
|
<u-button type="primary" @click="query">{{ $t('message.Query') }}</u-button>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 总数 -->
|
|
|
|
|
<u-form-item :label="$t('message.Warehouse_TotalNumber')">
|
|
|
|
|
<u-input :disabled="true" v-model="allNum" placeholder="" />
|
|
|
|
|
<!-- 上架单号 -->
|
|
|
|
|
<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.coding')">
|
|
|
|
|
<jPicker sureColor="#ff0000" @bindpicker="selectItem" showKey="value" valKey="value" :val="remove.value" :options="model.removeMaterialList" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 半成品描述 -->
|
|
|
|
|
<u-form-item :label="$t('message.Description')">
|
|
|
|
|
<!-- 物料编码 -->
|
|
|
|
|
<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.product_Number')">
|
|
|
|
|
<!-- 物料描述 -->
|
|
|
|
|
<u-form-item :label="$t('message.po_MaterielDes')">
|
|
|
|
|
<u-input :disabled="true" v-model="histroyItem.materialDesc" 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-form-item>
|
|
|
|
|
<!-- 计划数量 -->
|
|
|
|
|
<u-form-item :label="$t('message.plan')">
|
|
|
|
|
<u-input :disabled="true" v-model="histroyItem.proNum" placeholder="" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 已上架数量 -->
|
|
|
|
|
<u-form-item :label="$t('message.QuantityShelves')">
|
|
|
|
|
<u-input :disabled="true" v-model="histroyItem.proNum" placeholder="" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 库位 -->
|
|
|
|
|
<u-form-item :label="$t('message.CommissionedLocation')">
|
|
|
|
|
<jPicker sureColor="#ff0000" @bindpicker="selectItem" showKey="value" valKey="value" :val="remove.value" :options="model.WlList" />
|
|
|
|
|
</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-form-item>
|
|
|
|
|
<!-- 库位 -->
|
|
|
|
|
<u-form-item :label="$t('message.product_Location')">
|
|
|
|
|
<u-input :disabled="true" v-model="model.orderInInfo.locCode" placeholder="" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 目标库位 -->
|
|
|
|
|
<u-form-item :required="true" :label="$t('message.Warehouse_TargetLocation')" prop="aimWl">
|
|
|
|
|
<jPicker sureColor="#ff0000" @bindpicker="bookTypeChange" showKey="value" valKey="value" :val="form.aimWl.value" :options="model.WlList" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</u-form>
|
|
|
|
|
<view class="bottom-bar">
|
|
|
|
|
<u-row class="button-bar">
|
|
|
|
|
<!-- 移库明细 -->
|
|
|
|
|
<u-col :span="4">
|
|
|
|
|
<u-button type="primary" @click="bill">{{ $t('message.detailed') }}</u-button>
|
|
|
|
|
</u-col>
|
|
|
|
|
<!-- 确定 -->
|
|
|
|
|
<u-col :span="4">
|
|
|
|
|
<u-col :span="6">
|
|
|
|
|
<u-button type="primary" @click="onSubmit">{{ $t('message.workArea_Confirm') }}</u-button>
|
|
|
|
|
</u-col>
|
|
|
|
|
<!-- 返回 -->
|
|
|
|
|
<u-col :span="4">
|
|
|
|
|
<u-col :span="6">
|
|
|
|
|
<u-button type="error" @click="uni.navigateBack({})">{{ $t('message.po_Return') }}</u-button>
|
|
|
|
|
</u-col>
|
|
|
|
|
</u-row>
|
|
|
|
@ -102,93 +102,21 @@ export default class productCheckReceipt extends BasePage {
|
|
|
|
|
};
|
|
|
|
|
value = '';
|
|
|
|
|
show = false;
|
|
|
|
|
//选择目标库位回调函数
|
|
|
|
|
bookTypeChange(e: any) {
|
|
|
|
|
this.form.aimWl = e.pickerName;
|
|
|
|
|
}
|
|
|
|
|
selectItem(e: any) {
|
|
|
|
|
this.remove = e.pickerName;
|
|
|
|
|
this.model.removeList.forEach((item: any) => {
|
|
|
|
|
if (item.materialCode == this.remove.value) {
|
|
|
|
|
this.histroyItem = item;
|
|
|
|
|
console.log('this.histroyItem', this.histroyItem);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
//扫描条码回车
|
|
|
|
|
async query() {
|
|
|
|
|
if (this.form.productCode == ' ' || this.form.productCode.length == 0) {
|
|
|
|
|
this.customToast(this.$t('message.product_unit7') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.userDefined4 == '' || this.userDefined4.length == 0) {
|
|
|
|
|
this.customToast(this.$t('message.Warehouse_Tip') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
await model.getProductCode(this.form.productCode);
|
|
|
|
|
if (this.model.code == '1') {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
//icon: 'success',
|
|
|
|
|
title: this.$t('message.successful') as string,
|
|
|
|
|
duration: 2000,
|
|
|
|
|
image: '/static/icons/icon-51.png',
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//查询已扫物料
|
|
|
|
|
async QueryHistory() {
|
|
|
|
|
if (this.userDefined4 == ' ' || this.userDefined4.length == 0) {
|
|
|
|
|
this.customToast(this.$t('message.barcode') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
this.allNum = 0;
|
|
|
|
|
let params = {
|
|
|
|
|
loginName: session.loginName,
|
|
|
|
|
factoryCode: session.factoryCode,
|
|
|
|
|
proMoveCode: this.userDefined4,
|
|
|
|
|
};
|
|
|
|
|
await this.model.QueryHistory(params);
|
|
|
|
|
this.model.removeList.forEach((item: any) => {
|
|
|
|
|
this.allNum += parseFloat(item.proNum);
|
|
|
|
|
});
|
|
|
|
|
if (this.model.removeMaterialList.length == 0) {
|
|
|
|
|
this.remove = {};
|
|
|
|
|
this.histroyItem.proNum = 0;
|
|
|
|
|
this.histroyItem.materialDesc = '';
|
|
|
|
|
console.log('11111111111111111');
|
|
|
|
|
console.log('this.histroyItem', this.histroyItem);
|
|
|
|
|
} else {
|
|
|
|
|
this.remove = this.model.removeMaterialList[0];
|
|
|
|
|
this.model.removeList.forEach((item: any) => {
|
|
|
|
|
if (item.materialCode == this.remove.value) {
|
|
|
|
|
this.histroyItem = item;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//页面初始化
|
|
|
|
|
async onReady() {
|
|
|
|
|
this.$form.setRules(this.rules);
|
|
|
|
|
this.model.empty();
|
|
|
|
|
await this.model.queryLocation();
|
|
|
|
|
this.form.aimWl = this.model.WlList[0];
|
|
|
|
|
this.remove = this.model.WlList[0];
|
|
|
|
|
}
|
|
|
|
|
//点击生成随机移库码
|
|
|
|
|
async generate() {
|
|
|
|
|
async query() {
|
|
|
|
|
await this.model.getCpMoveBatchNo({
|
|
|
|
|
loginName: session.loginName,
|
|
|
|
|
});
|
|
|
|
|
this.userDefined4 = model.userDefined;
|
|
|
|
|
}
|
|
|
|
|
//移库明细
|
|
|
|
|
async bill() {
|
|
|
|
|
if (this.userDefined4 == ' ' || this.userDefined4.length == 0) {
|
|
|
|
|
this.customToast(this.$t('message.LibraryCode') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
await this.model.querydetaildlist(this.userDefined4);
|
|
|
|
|
this.toPage(this.page.raw.SemiFinished.SemiFinishedRowTcransfer.detail);
|
|
|
|
|
}
|
|
|
|
|
//移库确认
|
|
|
|
|
onSubmit() {
|
|
|
|
|
this.$form.validate(async (valid: boolean) => {
|
|
|
|
@ -230,10 +158,6 @@ export default class productCheckReceipt extends BasePage {
|
|
|
|
|
// this.query()
|
|
|
|
|
this.form.productCode = '';
|
|
|
|
|
this.allNum = 0;
|
|
|
|
|
this.QueryHistory();
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
// this.$forceUpdate();
|
|
|
|
|
// }, 2000);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|