LAPTOP-R6EHHS26\86155 2 years ago
commit fbd93ee32c

@ -37,6 +37,10 @@
<view class="list-item"> 产品名称: </view> <view class="list-item"> 产品名称: </view>
<view> {{ orderNoItemList && orderNoItemList.productName }} </view> <view> {{ orderNoItemList && orderNoItemList.productName }} </view>
</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">
<view class="row-list-item"> <view class="row-list-item">
<view class="list-item"> 订单数量: </view> <view class="list-item"> 订单数量: </view>
@ -49,8 +53,16 @@
</view> </view>
<view class="row-list"> <view class="row-list">
<view class="list-item">入库数量: </view> <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>
<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> </view>
</u-form> </u-form>
<u-form class="form4" style=""> <u-form class="form4" style="">
@ -60,16 +72,16 @@
</u-form> </u-form>
</view> </view>
<view style="height: 14rpx"></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"> <view v-for="item in list" :key="item.id">
<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">
<view class="row-list"> <view class="row-list">
<view class="row-list-item"> <!-- <view class="row-list-item">
<view class="list-item"> 批次号: </view> <view class="list-item"> 批次号: </view>
<view>{{ item.batchNumber }} </view> <view>{{ item.batchNumber }} </view>
</view> </view> -->
<view class="row-list-item"> <view class="row-list-item">
<view class="list-item"> 箱数: </view> <view class="list-item"> 箱数: </view>
<view>{{ item.number }} </view> <view>{{ item.number }} </view>
@ -88,7 +100,7 @@
</view> </view>
<view class="rowright"> <view class="rowright">
<view class="righttitle"> <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> </view>
</view> </view>
@ -141,6 +153,11 @@ import { Component } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page'; 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';
interface OptionType {
label: string;
value: string;
}
//import { session } from '@/store/modules/session'; //import { session } from '@/store/modules/session';
@Component({ @Component({
components: { components: {
@ -157,6 +174,11 @@ export default class OfflineStorage extends BasePage {
itemdetail: any = ''; itemdetail: any = '';
showmodal = false; showmodal = false;
content: any = ''; content: any = '';
number1: number;
border = true;
delindex = -1;
cimWl = {} as OptionType;
warehouselist = [];
// remove: any = {}; // remove: any = {};
// async onReady() { // async onReady() {
// await this.model.queryLocation(); // await this.model.queryLocation();
@ -169,10 +191,21 @@ export default class OfflineStorage extends BasePage {
histroyItem: any = {}; histroyItem: any = {};
barcode: any = ''; barcode: any = '';
productCodeList: 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); console.log('1234567', item);
this.itemdetail = item; this.itemdetail = item;
this.delindex = index;
this.showmodal = true; this.showmodal = true;
this.content = '是否删除?'; this.content = '是否删除?';
// let params = { // let params = {
@ -182,20 +215,25 @@ export default class OfflineStorage extends BasePage {
async confirm() { async confirm() {
this.itemdetail.orderNo = this.orderNo; this.itemdetail.orderNo = this.orderNo;
console.log(this.itemdetail, this.orderNo); console.log(this.itemdetail, this.orderNo);
await this.model.deleteTray(this.itemdetail); this.list.splice(this.delindex, 1);
if (this.model.SubmitCode == '200') { // await this.model.deleteTray(this.itemdetail);
(this.$refs.uToast as any).show({ // if (this.model.SubmitCode == '200') {
title: '删除成功', // (this.$refs.uToast as any).show({
type: 'success', // title: '',
}); // type: 'success',
this.getlist(); // });
} else { // this.getlist();
(this.$refs.uToast as any).show({ // } else {
title: '删除失败', // (this.$refs.uToast as any).show({
type: 'error', // title: '',
}); // type: 'error',
this.getlist(); // });
} // this.getlist();
// }
}
//
warehouseChange(e: any) {
this.cimWl = e.pickerName;
} }
// //
nopoup() { nopoup() {
@ -214,10 +252,11 @@ 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;
} else { } else {
this.orderNoItemList = {}; this.orderNoItemList = {};
} }
this.getlist(); //this.getlist();
} }
// //
async onSubmit() { async onSubmit() {
@ -240,27 +279,44 @@ export default class OfflineStorage extends BasePage {
this.list.forEach((item) => { this.list.forEach((item) => {
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 == model.orderNoItemList.putQuantity) { if (insertTarynumber <= this.number1) {
await this.model.handPut(this.list); 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') { if (this.model.SubmitCode == '200') {
(this.$refs.uToast as any).show({ (this.$refs.uToast as any).show({
title: '成功', title: '成功',
type: 'success', type: 'success',
}); });
this.show = false; this.show = false;
this.getlist(); this.list = [];
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(); //this.getlist();
} }
} else { } else {
(this.$refs.uToast as any).show({ (this.$refs.uToast as any).show({
title: '入库数量不等于订单数量,请正确入库', title: '实际入库总数量不能超过入库数量,请正确入库',
// url: '/pages/user/index' // url: '/pages/user/index'
}); });
} }
@ -288,10 +344,10 @@ 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 = model.orderNoItemList.putQuantity; let ordernumber = this.number1 || 0;
if (insertTarynumber >= ordernumber) { if (insertTarynumber >= ordernumber) {
(this.$refs.uToast as any).show({ (this.$refs.uToast as any).show({
title: '入库数量大于订单数量,请先删除再入库', title: '实际入库数量不能大于入库数量,请先删除再入库',
// url: '/pages/user/index' // url: '/pages/user/index'
}); });
return; return;
@ -311,23 +367,29 @@ export default class OfflineStorage extends BasePage {
}); });
return; return;
} }
this.list.push({
await this.model.insertTary(this.form5); number: this.form5.number,
if (this.model.SubmitCode == '200') { wlCode: this.form5.wlCode,
(this.$refs.uToast as any).show({ sn: this.form5.sn,
title: '成功', //batchNumber: this.orderNoItemList.batchNumber,
type: 'success', });
}); this.show = false;
this.show = false; // await this.model.insertTary(this.form5);
this.getlist(); // if (this.model.SubmitCode == '200') {
} else { // (this.$refs.uToast as any).show({
(this.$refs.uToast as any).show({ // title: '',
title: '失败', // type: 'success',
type: 'error', // });
}); // this.show = false;
this.show = false; // this.getlist();
this.getlist(); // } else {
} // (this.$refs.uToast as any).show({
// title: '',
// type: 'error',
// });
// this.show = false;
// this.getlist();
// }
// // // //
// await this.model.queryOrderNo(this.form5); // await this.model.queryOrderNo(this.form5);
// this.list = model.orderNoItemList; // this.list = model.orderNoItemList;

@ -15,10 +15,12 @@ export class OfflineStorage extends VuexModule {
orderNoItemList: any = []; orderNoItemList: any = [];
@MutationAction @MutationAction
async queryOrderNo(orderNo: any) { async queryOrderNo(orderNo: any) {
const result: any = await http.get(url.lanjuwms.product.OfflineStorage.queryinformation + orderNo, { const result: any = await http.post(url.lanjuwms.product.OfflineStorage.queryinformation, {
headers: { workOrder: orderNo,
poolName: session.PoolName, factoryCode: session.FactoryCode,
}, // headers: {
// poolName: session.PoolName,
// },
}); });
// http.defaults.headers.common['Accept-Language'] = session.PoolName; // http.defaults.headers.common['Accept-Language'] = session.PoolName;
const orderNoItemList = result.data; const orderNoItemList = result.data;
@ -47,10 +49,23 @@ export class OfflineStorage extends VuexModule {
} }
@MutationAction @MutationAction
async handPut(params: any) { 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; const SubmitCode = result.code;
return { SubmitCode }; 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); export default getModule(OfflineStorage);

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

Loading…
Cancel
Save