|
|
|
@ -37,6 +37,10 @@
|
|
|
|
|
<view class="list-item"> 产品名称: </view>
|
|
|
|
|
<view> {{ orderNoItemList && orderNoItemList.productName }} </view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="row-list">
|
|
|
|
|
<view class="list-item"> 批次号: </view>
|
|
|
|
|
<view> {{ orderNoItemList && orderNoItemList.batchNumber }} </view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="row-list">
|
|
|
|
|
<view class="row-list-item">
|
|
|
|
|
<view class="list-item"> 订单数量: </view>
|
|
|
|
@ -49,8 +53,16 @@
|
|
|
|
|
</view>
|
|
|
|
|
<view class="row-list">
|
|
|
|
|
<view class="list-item">入库数量: </view>
|
|
|
|
|
<view> {{ orderNoItemList && orderNoItemList.putQuantity }} </view>
|
|
|
|
|
<u-input :border="border" v-model="number1" placeholder="" type="number" />
|
|
|
|
|
<!-- <view> {{ orderNoItemList && orderNoItemList.putQuantity }} </view> -->
|
|
|
|
|
</view>
|
|
|
|
|
<view class="row-list">
|
|
|
|
|
<view class="list-item">出库仓库: </view>
|
|
|
|
|
<jPicker style="width: 80%" sureColor="#ff0000" @bindpicker="warehouseChange" showKey="value" valKey="value" :val="cimWl.value" :options="warehouselist" />
|
|
|
|
|
</view>
|
|
|
|
|
<!-- <u-form-item label="出库仓库">
|
|
|
|
|
<jPicker sureColor="#ff0000" @bindpicker="warehouseChange" showKey="value" valKey="value" :val="cimWl.value" :options="warehouselist" />
|
|
|
|
|
</u-form-item> -->
|
|
|
|
|
</view>
|
|
|
|
|
</u-form>
|
|
|
|
|
<u-form class="form4" style="">
|
|
|
|
@ -60,16 +72,16 @@
|
|
|
|
|
</u-form>
|
|
|
|
|
</view>
|
|
|
|
|
<view style="height: 14rpx"></view>
|
|
|
|
|
<view class="scroll">
|
|
|
|
|
<view style="margin-top: 180rpx" class="scroll">
|
|
|
|
|
<view v-for="item in list" :key="item.id">
|
|
|
|
|
<u-form style="margin-top: 10rpx" class="form2">
|
|
|
|
|
<view class="list">
|
|
|
|
|
<view class="rowleft">
|
|
|
|
|
<view class="row-list">
|
|
|
|
|
<view class="row-list-item">
|
|
|
|
|
<!-- <view class="row-list-item">
|
|
|
|
|
<view class="list-item"> 批次号: </view>
|
|
|
|
|
<view>{{ item.batchNumber }} </view>
|
|
|
|
|
</view>
|
|
|
|
|
</view> -->
|
|
|
|
|
<view class="row-list-item">
|
|
|
|
|
<view class="list-item"> 箱数: </view>
|
|
|
|
|
<view>{{ item.number }} </view>
|
|
|
|
@ -88,7 +100,7 @@
|
|
|
|
|
</view>
|
|
|
|
|
<view class="rowright">
|
|
|
|
|
<view class="righttitle">
|
|
|
|
|
<view @click.stop="onPassdelet(item)" class="boder-icon-rigth"> 删除 </view>
|
|
|
|
|
<view @click.stop="onPassdelet(item, index)" class="boder-icon-rigth"> 删除 </view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
@ -141,6 +153,11 @@ import { Component } from 'vue-property-decorator';
|
|
|
|
|
import { BasePage } from '@/components/base/page';
|
|
|
|
|
import jPicker from '@/components/J-Picker/jPicker.vue';
|
|
|
|
|
import model from './model';
|
|
|
|
|
import { session } from '@/store/modules/session';
|
|
|
|
|
interface OptionType {
|
|
|
|
|
label: string;
|
|
|
|
|
value: string;
|
|
|
|
|
}
|
|
|
|
|
//import { session } from '@/store/modules/session';
|
|
|
|
|
@Component({
|
|
|
|
|
components: {
|
|
|
|
@ -157,6 +174,11 @@ export default class OfflineStorage extends BasePage {
|
|
|
|
|
itemdetail: any = '';
|
|
|
|
|
showmodal = false;
|
|
|
|
|
content: any = '';
|
|
|
|
|
number1: number;
|
|
|
|
|
border = true;
|
|
|
|
|
delindex = -1;
|
|
|
|
|
cimWl = {} as OptionType;
|
|
|
|
|
warehouselist = [];
|
|
|
|
|
// remove: any = {};
|
|
|
|
|
// async onReady() {
|
|
|
|
|
// await this.model.queryLocation();
|
|
|
|
@ -169,10 +191,21 @@ export default class OfflineStorage extends BasePage {
|
|
|
|
|
histroyItem: any = {};
|
|
|
|
|
barcode: any = '';
|
|
|
|
|
productCodeList: any = {};
|
|
|
|
|
async onReady() {
|
|
|
|
|
await this.model.getwarehouselist();
|
|
|
|
|
this.warehouselist = model.warehouselist;
|
|
|
|
|
const cimWl = this.warehouselist.find((item) => item.value === '0004');
|
|
|
|
|
if (cimWl) {
|
|
|
|
|
this.cimWl = cimWl;
|
|
|
|
|
} else {
|
|
|
|
|
this.cimWl = this.warehouselist[0];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//列表删除按钮
|
|
|
|
|
async onPassdelet(item) {
|
|
|
|
|
async onPassdelet(item, index) {
|
|
|
|
|
console.log('1234567', item);
|
|
|
|
|
this.itemdetail = item;
|
|
|
|
|
this.delindex = index;
|
|
|
|
|
this.showmodal = true;
|
|
|
|
|
this.content = '是否删除?';
|
|
|
|
|
// let params = {
|
|
|
|
@ -182,20 +215,25 @@ export default class OfflineStorage extends BasePage {
|
|
|
|
|
async confirm() {
|
|
|
|
|
this.itemdetail.orderNo = this.orderNo;
|
|
|
|
|
console.log(this.itemdetail, this.orderNo);
|
|
|
|
|
await this.model.deleteTray(this.itemdetail);
|
|
|
|
|
if (this.model.SubmitCode == '200') {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '删除成功',
|
|
|
|
|
type: 'success',
|
|
|
|
|
});
|
|
|
|
|
this.getlist();
|
|
|
|
|
} else {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '删除失败',
|
|
|
|
|
type: 'error',
|
|
|
|
|
});
|
|
|
|
|
this.getlist();
|
|
|
|
|
}
|
|
|
|
|
this.list.splice(this.delindex, 1);
|
|
|
|
|
// await this.model.deleteTray(this.itemdetail);
|
|
|
|
|
// if (this.model.SubmitCode == '200') {
|
|
|
|
|
// (this.$refs.uToast as any).show({
|
|
|
|
|
// title: '删除成功',
|
|
|
|
|
// type: 'success',
|
|
|
|
|
// });
|
|
|
|
|
// this.getlist();
|
|
|
|
|
// } else {
|
|
|
|
|
// (this.$refs.uToast as any).show({
|
|
|
|
|
// title: '删除失败',
|
|
|
|
|
// type: 'error',
|
|
|
|
|
// });
|
|
|
|
|
// this.getlist();
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
//选择出库仓库
|
|
|
|
|
warehouseChange(e: any) {
|
|
|
|
|
this.cimWl = e.pickerName;
|
|
|
|
|
}
|
|
|
|
|
//取消按钮
|
|
|
|
|
nopoup() {
|
|
|
|
@ -214,10 +252,11 @@ export default class OfflineStorage extends BasePage {
|
|
|
|
|
await this.model.queryOrderNo(this.orderNo);
|
|
|
|
|
if (model.orderNoItemList) {
|
|
|
|
|
this.orderNoItemList = model.orderNoItemList;
|
|
|
|
|
this.number1 = this.orderNoItemList.attr3;
|
|
|
|
|
} else {
|
|
|
|
|
this.orderNoItemList = {};
|
|
|
|
|
}
|
|
|
|
|
this.getlist();
|
|
|
|
|
//this.getlist();
|
|
|
|
|
}
|
|
|
|
|
//入库确认按钮
|
|
|
|
|
async onSubmit() {
|
|
|
|
@ -240,27 +279,44 @@ export default class OfflineStorage extends BasePage {
|
|
|
|
|
this.list.forEach((item) => {
|
|
|
|
|
insertTarynumber = insertTarynumber + parseInt(item.number);
|
|
|
|
|
});
|
|
|
|
|
console.log(insertTarynumber, model.orderNoItemList.putQuantity, insertTarynumber == model.orderNoItemList.putQuantity);
|
|
|
|
|
if (insertTarynumber == model.orderNoItemList.putQuantity) {
|
|
|
|
|
await this.model.handPut(this.list);
|
|
|
|
|
//console.log(insertTarynumber, model.orderNoItemList.putQuantity, insertTarynumber == model.orderNoItemList.putQuantity);
|
|
|
|
|
if (insertTarynumber <= this.number1) {
|
|
|
|
|
let params = {
|
|
|
|
|
workOrder: this.orderNoItemList.workOrder,
|
|
|
|
|
factoryCode: session.FactoryCode,
|
|
|
|
|
whCode: this.cimWl.value, //――仓库编号
|
|
|
|
|
productName: this.orderNoItemList.productName,
|
|
|
|
|
productCode: this.orderNoItemList.productCode,
|
|
|
|
|
planQuantity: this.orderNoItemList.planQuantity,
|
|
|
|
|
putQuantity: this.number1,
|
|
|
|
|
batchNumber: this.orderNoItemList.batchNumbe, //――批次
|
|
|
|
|
createBy: session.loginName,
|
|
|
|
|
unitOfMeasure: this.orderNoItemList.unitOfMeasure,
|
|
|
|
|
productOrder: this.orderNoItemList.productOrder, //――单位
|
|
|
|
|
wmsProductPut: this.list,
|
|
|
|
|
};
|
|
|
|
|
//console.log('参数',params);
|
|
|
|
|
await this.model.handPut(params);
|
|
|
|
|
if (this.model.SubmitCode == '200') {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '成功',
|
|
|
|
|
type: 'success',
|
|
|
|
|
});
|
|
|
|
|
this.show = false;
|
|
|
|
|
this.getlist();
|
|
|
|
|
this.list = [];
|
|
|
|
|
this.query();
|
|
|
|
|
//this.getlist();
|
|
|
|
|
} else {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '失败',
|
|
|
|
|
type: 'error',
|
|
|
|
|
});
|
|
|
|
|
this.show = false;
|
|
|
|
|
this.getlist();
|
|
|
|
|
//this.getlist();
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '入库数量不等于订单数量,请正确入库',
|
|
|
|
|
title: '实际入库总数量不能超过入库数量,请正确入库',
|
|
|
|
|
// url: '/pages/user/index'
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
@ -288,10 +344,10 @@ export default class OfflineStorage extends BasePage {
|
|
|
|
|
this.list.forEach((item) => {
|
|
|
|
|
insertTarynumber = insertTarynumber + parseInt(item.number);
|
|
|
|
|
});
|
|
|
|
|
let ordernumber = model.orderNoItemList.putQuantity;
|
|
|
|
|
let ordernumber = this.number1 || 0;
|
|
|
|
|
if (insertTarynumber >= ordernumber) {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '入库数量大于订单数量,请先删除再入库',
|
|
|
|
|
title: '实际入库数量不能大于入库数量,请先删除再入库',
|
|
|
|
|
// url: '/pages/user/index'
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
@ -311,23 +367,29 @@ export default class OfflineStorage extends BasePage {
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
await this.model.insertTary(this.form5);
|
|
|
|
|
if (this.model.SubmitCode == '200') {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '成功',
|
|
|
|
|
type: 'success',
|
|
|
|
|
});
|
|
|
|
|
this.show = false;
|
|
|
|
|
this.getlist();
|
|
|
|
|
} else {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '失败',
|
|
|
|
|
type: 'error',
|
|
|
|
|
});
|
|
|
|
|
this.show = false;
|
|
|
|
|
this.getlist();
|
|
|
|
|
}
|
|
|
|
|
this.list.push({
|
|
|
|
|
number: this.form5.number,
|
|
|
|
|
wlCode: this.form5.wlCode,
|
|
|
|
|
sn: this.form5.sn,
|
|
|
|
|
//batchNumber: this.orderNoItemList.batchNumber,
|
|
|
|
|
});
|
|
|
|
|
this.show = false;
|
|
|
|
|
// await this.model.insertTary(this.form5);
|
|
|
|
|
// if (this.model.SubmitCode == '200') {
|
|
|
|
|
// (this.$refs.uToast as any).show({
|
|
|
|
|
// title: '成功',
|
|
|
|
|
// type: 'success',
|
|
|
|
|
// });
|
|
|
|
|
// this.show = false;
|
|
|
|
|
// this.getlist();
|
|
|
|
|
// } else {
|
|
|
|
|
// (this.$refs.uToast as any).show({
|
|
|
|
|
// title: '失败',
|
|
|
|
|
// type: 'error',
|
|
|
|
|
// });
|
|
|
|
|
// this.show = false;
|
|
|
|
|
// this.getlist();
|
|
|
|
|
// }
|
|
|
|
|
// //入库后的查询下面列表的接口
|
|
|
|
|
// await this.model.queryOrderNo(this.form5);
|
|
|
|
|
// this.list = model.orderNoItemList;
|
|
|
|
|