|
|
@ -73,7 +73,7 @@
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view style="height: 14rpx"></view>
|
|
|
|
<view style="height: 14rpx"></view>
|
|
|
|
<view style="margin-top: 180rpx" class="scroll">
|
|
|
|
<view style="margin-top: 180rpx" class="scroll">
|
|
|
|
<view v-for="item in list" :key="item.id">
|
|
|
|
<view v-for="(item, index) in list" :key="item.id" @dblclick="onFormDoubleClick(item, index)">
|
|
|
|
<u-form style="margin-top: 10rpx" class="form2">
|
|
|
|
<u-form style="margin-top: 10rpx" class="form2">
|
|
|
|
<view class="list">
|
|
|
|
<view class="list">
|
|
|
|
<view class="rowleft">
|
|
|
|
<view class="rowleft">
|
|
|
@ -130,10 +130,10 @@
|
|
|
|
<view class="pouptitle">入库库位:</view>
|
|
|
|
<view class="pouptitle">入库库位:</view>
|
|
|
|
<u-input class="poupcontent" :clearable="false" v-model="form5.wlCode" placeholder="" style="overflow: hidden" />
|
|
|
|
<u-input class="poupcontent" :clearable="false" v-model="form5.wlCode" placeholder="" style="overflow: hidden" />
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="poupitem">
|
|
|
|
<!-- <view class="poupitem">
|
|
|
|
<view class="pouptitle">箱数:</view>
|
|
|
|
<view class="pouptitle">箱数:</view>
|
|
|
|
<u-input class="poupcontent" :clearable="false" v-model="form5.number" placeholder="" style="overflow: hidden" />
|
|
|
|
<u-input class="poupcontent" :clearable="false" v-model="form5.number" placeholder="" style="overflow: hidden" />
|
|
|
|
</view>
|
|
|
|
</view> -->
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="poupbutton">
|
|
|
|
<view class="poupbutton">
|
|
|
|
<!-- 确定 -->
|
|
|
|
<!-- 确定 -->
|
|
|
@ -154,6 +154,7 @@ import { BasePage } from '@/components/base/page';
|
|
|
|
import jPicker from '@/components/J-Picker/jPicker.vue';
|
|
|
|
import jPicker from '@/components/J-Picker/jPicker.vue';
|
|
|
|
import model from './model';
|
|
|
|
import model from './model';
|
|
|
|
import { session } from '@/store/modules/session';
|
|
|
|
import { session } from '@/store/modules/session';
|
|
|
|
|
|
|
|
import { usedata } from '@/store/use/data';
|
|
|
|
interface OptionType {
|
|
|
|
interface OptionType {
|
|
|
|
label: string;
|
|
|
|
label: string;
|
|
|
|
value: string;
|
|
|
|
value: string;
|
|
|
@ -174,7 +175,7 @@ export default class OfflineStorage extends BasePage {
|
|
|
|
itemdetail: any = '';
|
|
|
|
itemdetail: any = '';
|
|
|
|
showmodal = false;
|
|
|
|
showmodal = false;
|
|
|
|
content: any = '';
|
|
|
|
content: any = '';
|
|
|
|
number1: number;
|
|
|
|
number1: any = '';
|
|
|
|
border = true;
|
|
|
|
border = true;
|
|
|
|
delindex = -1;
|
|
|
|
delindex = -1;
|
|
|
|
cimWl = {} as OptionType;
|
|
|
|
cimWl = {} as OptionType;
|
|
|
@ -191,6 +192,9 @@ export default class OfflineStorage extends BasePage {
|
|
|
|
histroyItem: any = {};
|
|
|
|
histroyItem: any = {};
|
|
|
|
barcode: any = '';
|
|
|
|
barcode: any = '';
|
|
|
|
productCodeList: any = {};
|
|
|
|
productCodeList: any = {};
|
|
|
|
|
|
|
|
biaojiindex = '';
|
|
|
|
|
|
|
|
biaojisn = '';
|
|
|
|
|
|
|
|
number = '';
|
|
|
|
async onReady() {
|
|
|
|
async onReady() {
|
|
|
|
await this.model.getwarehouselist();
|
|
|
|
await this.model.getwarehouselist();
|
|
|
|
this.warehouselist = model.warehouselist;
|
|
|
|
this.warehouselist = model.warehouselist;
|
|
|
@ -201,6 +205,29 @@ export default class OfflineStorage extends BasePage {
|
|
|
|
this.cimWl = this.warehouselist[0];
|
|
|
|
this.cimWl = this.warehouselist[0];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 在页面A中
|
|
|
|
|
|
|
|
onUnload() {
|
|
|
|
|
|
|
|
// 清空缓存数据
|
|
|
|
|
|
|
|
usedata.cacheData(null);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
async onShow() {
|
|
|
|
|
|
|
|
const cacheData = usedata.OfflineStoragedata;
|
|
|
|
|
|
|
|
console.log('cacheData执行了', cacheData);
|
|
|
|
|
|
|
|
if (cacheData) {
|
|
|
|
|
|
|
|
console.log('cacheData执行了', cacheData);
|
|
|
|
|
|
|
|
this.orderNo = cacheData?.orderNo;
|
|
|
|
|
|
|
|
this.list = cacheData?.list;
|
|
|
|
|
|
|
|
this.cimWl.value = cacheData?.kuwei;
|
|
|
|
|
|
|
|
this.biaojiindex = cacheData?.index;
|
|
|
|
|
|
|
|
this.biaojisn = cacheData?.sn;
|
|
|
|
|
|
|
|
this.number = cacheData?.number;
|
|
|
|
|
|
|
|
await this.query();
|
|
|
|
|
|
|
|
await this.model.selectSnCorrelationBarcode(this.biaojisn);
|
|
|
|
|
|
|
|
if (model.selectcode) {
|
|
|
|
|
|
|
|
this.list[this.biaojiindex].number = model.selectdata.length;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
//列表删除按钮
|
|
|
|
//列表删除按钮
|
|
|
|
async onPassdelet(item, index) {
|
|
|
|
async onPassdelet(item, index) {
|
|
|
|
console.log('1234567', item);
|
|
|
|
console.log('1234567', item);
|
|
|
@ -216,20 +243,6 @@ export default class OfflineStorage extends BasePage {
|
|
|
|
this.itemdetail.orderNo = this.orderNo;
|
|
|
|
this.itemdetail.orderNo = this.orderNo;
|
|
|
|
console.log(this.itemdetail, this.orderNo);
|
|
|
|
console.log(this.itemdetail, this.orderNo);
|
|
|
|
this.list.splice(this.delindex, 1);
|
|
|
|
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) {
|
|
|
|
warehouseChange(e: any) {
|
|
|
@ -252,11 +265,10 @@ export default class OfflineStorage extends BasePage {
|
|
|
|
await this.model.queryOrderNo(this.orderNo);
|
|
|
|
await this.model.queryOrderNo(this.orderNo);
|
|
|
|
if (model.orderNoItemList) {
|
|
|
|
if (model.orderNoItemList) {
|
|
|
|
this.orderNoItemList = model.orderNoItemList;
|
|
|
|
this.orderNoItemList = model.orderNoItemList;
|
|
|
|
this.number1 = this.orderNoItemList.attr3;
|
|
|
|
this.number1 = this.number ? this.number : this.orderNoItemList.attr3;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.orderNoItemList = {};
|
|
|
|
this.orderNoItemList = {};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//this.getlist();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//入库确认按钮
|
|
|
|
//入库确认按钮
|
|
|
|
async onSubmit() {
|
|
|
|
async onSubmit() {
|
|
|
@ -280,7 +292,7 @@ export default class OfflineStorage extends BasePage {
|
|
|
|
insertTarynumber = insertTarynumber + parseInt(item.number);
|
|
|
|
insertTarynumber = insertTarynumber + parseInt(item.number);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
//console.log(insertTarynumber, model.orderNoItemList.putQuantity, insertTarynumber == model.orderNoItemList.putQuantity);
|
|
|
|
//console.log(insertTarynumber, model.orderNoItemList.putQuantity, insertTarynumber == model.orderNoItemList.putQuantity);
|
|
|
|
if (insertTarynumber <= this.number1) {
|
|
|
|
if (insertTarynumber <= parseFloat(this.number1)) {
|
|
|
|
let params = {
|
|
|
|
let params = {
|
|
|
|
workOrder: this.orderNoItemList.workOrder,
|
|
|
|
workOrder: this.orderNoItemList.workOrder,
|
|
|
|
factoryCode: session.FactoryCode,
|
|
|
|
factoryCode: session.FactoryCode,
|
|
|
@ -289,7 +301,7 @@ export default class OfflineStorage extends BasePage {
|
|
|
|
productCode: this.orderNoItemList.productCode,
|
|
|
|
productCode: this.orderNoItemList.productCode,
|
|
|
|
planQuantity: this.orderNoItemList.planQuantity,
|
|
|
|
planQuantity: this.orderNoItemList.planQuantity,
|
|
|
|
putQuantity: this.number1,
|
|
|
|
putQuantity: this.number1,
|
|
|
|
batchNumber: this.orderNoItemList.batchNumbe, //――批次
|
|
|
|
batchNumber: this.orderNoItemList.batchNumber, //――批次
|
|
|
|
createBy: session.loginName,
|
|
|
|
createBy: session.loginName,
|
|
|
|
unitOfMeasure: this.orderNoItemList.unitOfMeasure,
|
|
|
|
unitOfMeasure: this.orderNoItemList.unitOfMeasure,
|
|
|
|
productOrder: this.orderNoItemList.productOrder, //――单位
|
|
|
|
productOrder: this.orderNoItemList.productOrder, //――单位
|
|
|
@ -305,14 +317,12 @@ export default class OfflineStorage extends BasePage {
|
|
|
|
this.show = false;
|
|
|
|
this.show = false;
|
|
|
|
this.list = [];
|
|
|
|
this.list = [];
|
|
|
|
this.query();
|
|
|
|
this.query();
|
|
|
|
//this.getlist();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
title: '失败',
|
|
|
|
title: '失败',
|
|
|
|
type: 'error',
|
|
|
|
type: 'error',
|
|
|
|
});
|
|
|
|
});
|
|
|
|
this.show = false;
|
|
|
|
this.show = false;
|
|
|
|
//this.getlist();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
@ -321,15 +331,7 @@ export default class OfflineStorage extends BasePage {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
async getlist() {
|
|
|
|
|
|
|
|
await (this.model as any).list(this.orderNo);
|
|
|
|
|
|
|
|
if (model.productCodeList.length > 0) {
|
|
|
|
|
|
|
|
this.list = model.productCodeList;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.list = [];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
console.log(model.productCodeList);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
async rukubutn() {
|
|
|
|
async rukubutn() {
|
|
|
|
this.form5 = {};
|
|
|
|
this.form5 = {};
|
|
|
|
if (this.orderNo == '' || this.orderNo.length == 0) {
|
|
|
|
if (this.orderNo == '' || this.orderNo.length == 0) {
|
|
|
@ -344,7 +346,7 @@ export default class OfflineStorage extends BasePage {
|
|
|
|
this.list.forEach((item) => {
|
|
|
|
this.list.forEach((item) => {
|
|
|
|
insertTarynumber = insertTarynumber + parseInt(item.number);
|
|
|
|
insertTarynumber = insertTarynumber + parseInt(item.number);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
let ordernumber = this.number1 || 0;
|
|
|
|
let ordernumber = parseFloat(this.number1) || 0;
|
|
|
|
if (insertTarynumber >= ordernumber) {
|
|
|
|
if (insertTarynumber >= ordernumber) {
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
title: '实际入库数量不能大于入库数量,请先删除再入库',
|
|
|
|
title: '实际入库数量不能大于入库数量,请先删除再入库',
|
|
|
@ -360,39 +362,38 @@ export default class OfflineStorage extends BasePage {
|
|
|
|
//弹窗入库按钮
|
|
|
|
//弹窗入库按钮
|
|
|
|
async onOk() {
|
|
|
|
async onOk() {
|
|
|
|
console.log(this.form5);
|
|
|
|
console.log(this.form5);
|
|
|
|
if (this.form5.sn == '' || this.form5.wlCode == '' || this.form5.number == '') {
|
|
|
|
if (this.form5.sn == '' || this.form5.wlCode == '') {
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
title: '不能为空',
|
|
|
|
title: '不能为空',
|
|
|
|
// url: '/pages/user/index'
|
|
|
|
// url: '/pages/user/index'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.list.push({
|
|
|
|
// this.list.push({
|
|
|
|
number: this.form5.number,
|
|
|
|
// number: 0,
|
|
|
|
wlCode: this.form5.wlCode,
|
|
|
|
// wlCode: this.form5.wlCode,
|
|
|
|
sn: this.form5.sn,
|
|
|
|
// sn: this.form5.sn,
|
|
|
|
//batchNumber: this.orderNoItemList.batchNumber,
|
|
|
|
// //batchNumber: this.orderNoItemList.batchNumber,
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
// this.show = false;
|
|
|
|
|
|
|
|
await this.model.selectSnCorrelationBarcode(this.form5.sn);
|
|
|
|
|
|
|
|
if (model.selectcode) {
|
|
|
|
|
|
|
|
this.list.push({
|
|
|
|
|
|
|
|
number: model.selectdata.length || 0,
|
|
|
|
|
|
|
|
wlCode: this.form5.wlCode,
|
|
|
|
|
|
|
|
sn: this.form5.sn,
|
|
|
|
|
|
|
|
//batchNumber: this.orderNoItemList.batchNumber,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
this.show = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
async onFormDoubleClick(item, index) {
|
|
|
|
|
|
|
|
console.log('双击', item);
|
|
|
|
|
|
|
|
//await this.model.OnSubmit(item.id);
|
|
|
|
|
|
|
|
usedata.cacheData({ orderNo: this.orderNo, number: this.number1, kuwei: this.cimWl.value, list: this.list, index: index, sn: item.sn });
|
|
|
|
|
|
|
|
this.uni.navigateTo({
|
|
|
|
|
|
|
|
url: this.page.wms.OfflineStoragedetail + '?sn=' + item.sn,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
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;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|