LAPTOP-R6EHHS26\86155 2 years ago
commit fbd93ee32c

@ -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;

@ -15,10 +15,12 @@ export class OfflineStorage extends VuexModule {
orderNoItemList: any = [];
@MutationAction
async queryOrderNo(orderNo: any) {
const result: any = await http.get(url.lanjuwms.product.OfflineStorage.queryinformation + orderNo, {
headers: {
poolName: session.PoolName,
},
const result: any = await http.post(url.lanjuwms.product.OfflineStorage.queryinformation, {
workOrder: orderNo,
factoryCode: session.FactoryCode,
// headers: {
// poolName: session.PoolName,
// },
});
// http.defaults.headers.common['Accept-Language'] = session.PoolName;
const orderNoItemList = result.data;
@ -47,10 +49,23 @@ export class OfflineStorage extends VuexModule {
}
@MutationAction
async handPut(params: any) {
const result: any = await http.post(url.lanjuwms.product.OfflineStorage.handPut, params);
const result: any = await http.post(url.lanjuwms.product.OfflineStorage.WmsProductPutByWorkOrderConfirm, params);
const SubmitCode = result.code;
return { SubmitCode };
}
warehouselist: any = [];
@MutationAction
async getwarehouselist() {
const result = await http.post(url.lanjuwms.raw.ProductionREQ.warehouselist, {
factoryCode: session.FactoryCode,
});
const warehouselist = result.data.map((element: any) => ({
label: element.warehouseName,
value: element.warehouseCode,
...element,
}));
return { warehouselist };
}
}
export default getModule(OfflineStorage);

@ -41,11 +41,12 @@ export const url = {
product: {
// 下线入库
OfflineStorage: {
queryinformation: qianzhuione + '/wms/put/s/',
queryinformation: qianzhuione + '/wms/WmsToWCSmission/WmsProductPutByWorkOrderquery',
insertTary: qianzhuione + '/wms/tray/insertTary',
deleteTray: qianzhuione + '/wms/tray/deleteTray',
handPut: qianzhuione + '/wms/tray/wms/handPut',
list: qianzhuione + '/wms/tray/listTary',
WmsProductPutByWorkOrderConfirm: qianzhuione + '/wms/WmsToWCSmission/WmsProductPutByWorkOrderConfirm',
},
// 销售出库/sellout/showProduceCode/ /sellout/s/订单号/产品编码

Loading…
Cancel
Save