生产领料功能调整

master
guoshuang 10 months ago
parent ebc5c2be2f
commit d0a94b1b03

@ -142,7 +142,7 @@ export default class LoginPage extends BasePage {
// console.log('Version////', this.Version); // console.log('Version////', this.Version);
} }
///****************** ///******************
version = '0.0.103'; // version = '0.0.104'; //
//version = '0.0.14'; // //version = '0.0.14'; //
//*************** false true **************** //*************** false true ****************
//isTest = true; //isTest = true;

@ -24,31 +24,28 @@
<!-- <u-input :border="true" v-model="histroyItem.productDescZh" placeholder="" style="overflow: hidden" /> --> <!-- <u-input :border="true" v-model="histroyItem.productDescZh" placeholder="" style="overflow: hidden" /> -->
<jPicker sureColor="#ff0000" @bindpicker="bookTypeChange" showKey="value" valKey="value" :val="aimWl.value" :options="materilist" /> <jPicker sureColor="#ff0000" @bindpicker="bookTypeChange" showKey="value" valKey="value" :val="aimWl.value" :options="materilist" />
</u-form-item> </u-form-item>
<u-form-item label="批次"> <u-form-item label="标志卡">
<!-- <u-input :border="true" v-model="histroyItem.productDescZh" placeholder="" style="overflow: hidden" /> --> <u-search placeholder="请扫描" v-model="Idcard" @search="querybyidcard" :show-action="false"></u-search>
<jPicker sureColor="#ff0000" @bindpicker="userDefined1Change" showKey="value" valKey="value" :val="bimWl.value" :options="userDefined1list" />
</u-form-item> </u-form-item>
<!-- 机台 -->
<u-form-item label="出库仓库">
<!-- <u-input :border="true" v-model="histroyItem.productDescZh" placeholder="" style="overflow: hidden" /> -->
<jPicker sureColor="#ff0000" @bindpicker="warehouseChange" showKey="label" valKey="value" :val="cimWl.value" :options="warehouselist" />
</u-form-item>
<!-- <u-form-item label="出库仓库"> 成品库 </u-form-item> -->
</u-form> </u-form>
<u-form style="margin-top: 1rpx" class="form3"> <u-form v-show="Object.keys(TraysList).length != 0" :style="{ marginTop: '1rpx', backgroundColor: TraysList.planNumber <= outNumber ? '#4eea9b59' : '#ffffff' }" class="form3">
<view class="list"> <view class="list">
<view class="row-list"> <view class="row-list">
<view style="width: 18%" class="list-item"> 物料编码: </view> <view style="width: 25%" class="list-item"> 领料单: </view>
<view style="width: 80%"> {{ TraysList && TraysList.produceCode }} </view>
</view>
<view class="row-list">
<view style="width: 25%" class="list-item"> 物料编码: </view>
<view style="width: 80%"> {{ TraysList && TraysList.materialCode }} </view> <view style="width: 80%"> {{ TraysList && TraysList.materialCode }} </view>
</view> </view>
<view class="row-list"> <view class="row-list">
<view style="width: 18%" class="list-item"> 物料名称: </view> <view style="width: 25%" class="list-item"> 物料名称: </view>
<view style="width: 80%"> {{ TraysList && TraysList.materialDesc }} </view> <view style="width: 80%"> {{ TraysList && TraysList.materialDesc }} </view>
</view> </view>
<view class="row-list"> <view class="row-list">
<view class="row-list-item1"> <view class="row-list-item1">
<view class="list-item"> 应出/已出: </view> <view class="list-item"> 应出/已出: </view>
<view> {{ TraysList && TraysList.planNumber }}/{{ TraysList && TraysList.outNumber }} </view> <view> {{ TraysList && TraysList.planNumber }}/{{ outNumber }} </view>
</view> </view>
<view class="row-list-item2"> <view class="row-list-item2">
<view class="list-item"> 单位: </view> <view class="list-item"> 单位: </view>
@ -57,41 +54,46 @@
</view> </view>
</view> </view>
</u-form> </u-form>
<u-form class="form4">
<u-search placeholder="请扫描托盘" @search="addlist" v-model="boxnumber" :show-action="false"></u-search>
<!-- <u-input style="border: 0.5rpx solid #8d8989; border-radius: 10rpx" v-model="boxnumber" @click="clickscan"></u-input> -->
</u-form>
</view> </view>
<!-- <view style="height: 14rpx"></view> --> <!-- <view style="height: 14rpx"></view> -->
<view class="scroll"> <view class="scroll">
<view v-for="(item, index) 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 style="width: 30%" class="list-item"> 标志卡: </view>
<view class="list-item"> 托盘号: </view> <view> {{ item.wlCode }} </view>
<view> {{ item.sn }} </view>
</view>
<view class="row-list-item">
<view class="list-item"> 出库数量: </view>
<view> {{ item.amount }} </view>
</view>
<!-- <view class="row-list-item">
<view class="list-item"> 批次号: </view>
<view> {{ item.barcode }} </view>
</view> -->
</view> </view>
<view class="row-list"> <view class="row-list">
<!-- <view class="row-list-item"> --> <view style="width: 30%" class="list-item"> 物料编码: </view>
<view class="list-item"> 库位码: </view> <view> {{ item.materialCode }} </view>
<view> {{ item.wlCode }} </view>
<!-- </view> -->
</view> </view>
</view> <view class="row-list">
<view class="rowright"> <view style="width: 30%" class="list-item"> 物料名称: </view>
<view class="righttitle"> <view> {{ item.materialDesc }} </view>
<view @click.stop="ondelete(item, index)" class="boder-icon-rigth"> 删除 </view> </view>
<view class="row-list">
<view class="row-list-item">
<view class="list-item"> 仓库: </view>
<view> {{ item.whCode }} </view>
</view>
<view class="row-list-item">
<view class="list-item"> 库区: </view>
<view> {{ item.waCode }} </view>
</view>
</view>
<view class="row-list">
<view style="width: 30%" class="list-item"> 托盘号: </view>
<view> {{ item.sn }} </view>
</view>
<view class="row-list">
<view style="width: 30%" class="list-item"> 批次: </view>
<view> {{ item.userDefined2 }} </view>
</view>
<view class="row-list">
<view class="list-item"> 数量: </view>
<u-input border placeholder="" @blur="confirmNumber" v-model="item.amount" />
</view> </view>
</view> </view>
</view> </view>
@ -139,16 +141,8 @@ export default class ProductionREQ extends BasePage {
materilist = []; materilist = [];
userDefined1list = []; userDefined1list = [];
warehouselist = []; warehouselist = [];
TraysList = { Idcard: any = '';
outNumber: 0, TraysList: any = {};
planNumber: 0,
id: '',
produceCode: '',
materialCode: '',
materialDesc: '',
userDefined1: '',
unit: '',
};
// remove: any = {}; // remove: any = {};
// async onReady() { // async onReady() {
// await this.model.queryLocation(); // await this.model.queryLocation();
@ -162,59 +156,29 @@ export default class ProductionREQ extends BasePage {
orderNoItemList: any = []; orderNoItemList: any = [];
showProduceCodeList: any = []; showProduceCodeList: any = [];
itemdetail: any = ''; itemdetail: any = '';
outnumber: any = 0; outNumber: any = 0;
realityaddNumber = 0;
async onReady() { async onReady() {
await this.model.getwarehouselist(); // await this.model.getwarehouselist();
this.warehouselist = model.warehouselist; // this.warehouselist = model.warehouselist;
const cimWl = this.warehouselist.find((item) => item.value === 'WH02'); // const cimWl = this.warehouselist.find((item) => item.value === 'WH02');
if (cimWl) { // if (cimWl) {
this.cimWl = cimWl; // this.cimWl = cimWl;
} else { // } else {
this.cimWl = this.warehouselist[0]; // this.cimWl = this.warehouselist[0];
} // }
} }
bookTypeChange(e: any) { bookTypeChange(e: any) {
this.aimWl = e.pickerName; this.aimWl = e.pickerName;
this.list = []; this.list = [];
this.queryinformation(); this.TraysList = e.pickerName;
this.realityaddNumber = e.pickerName.outNumber;
this.outNumber = e.pickerName.outNumber;
//this.queryinformation();
//this.getlist(); //this.getlist();
} }
userDefined1Change(e: any) {
this.bimWl = e.pickerName;
this.list = [];
this.getlist();
}
//
warehouseChange(e: any) {
this.cimWl = e.pickerName;
this.list = [];
}
//
async ondelete(item, index) {
console.log('1234567', item);
console.log('index', index);
this.list.splice(index, 1);
this.TraysList.outNumber -= item.amount;
//this.itemdetail = item;
// this.showmodal = true;
// this.content = '?';
//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();
// }
}
// //
async query() { async query() {
if (this.orderNo == '' || this.orderNo.length == 0) { if (this.orderNo == '' || this.orderNo.length == 0) {
@ -235,32 +199,48 @@ export default class ProductionREQ extends BasePage {
// }); // });
this.materilist = model.orderNoItemList; this.materilist = model.orderNoItemList;
this.aimWl = this.materilist[0]; this.aimWl = this.materilist[0];
this.queryinformation(); this.TraysList = this.materilist[0];
//console.log('this.TraysList',this.TraysList);
this.realityaddNumber = this.materilist[0].outNumber;
this.outNumber = this.materilist[0].outNumber;
//this.queryinformation();
//this.getlist(); //this.getlist();
} else { } else {
this.materilist = []; this.materilist = [];
} }
} }
//
async queryinformation() { async querybyidcard() {
if (this.orderNo == '' || this.orderNo.length == 0) { if (this.list.length) {
(this.$refs.uToast as any).show({ let ischongfu = this.list.some((item) => item.wlCode == this.Idcard);
title: '请输入领料单号', if (ischongfu) {
// url: '/pages/user/index' (this.$refs.uToast as any).show({
}); title: '请勿重复扫描标志卡',
return; });
this.Idcard = '';
return;
}
} }
let item: any = {}; let item = {
item.produceCode = this.orderNo; factoryCode: session.FactoryCode,
item.materialCode = this.aimWl.value; wlCode: this.Idcard,
await this.model.queryinformation(item); };
if (model.information) { await this.model.getByidcard(item);
this.userDefined1list = model.information; if (model.getidcardcode == '200') {
this.bimWl = this.userDefined1list[0]; let alreadyList = model.byidcardobj;
} else { alreadyList.handlematerialCode = alreadyList.materialCode.slice(alreadyList.materialCode.search(/[1-9]/));
this.userDefined1list = []; this.list.push(alreadyList);
this.confirmNumber();
this.Idcard = '';
} }
this.getlist(); }
confirmNumber() {
let addNumber = 0;
this.list.forEach((item) => {
addNumber += parseFloat(item.amount ? item.amount : '0');
});
this.outNumber = this.realityaddNumber + addNumber;
} }
async getlist() { async getlist() {
if (this.orderNo == '' || this.orderNo.length == 0) { if (this.orderNo == '' || this.orderNo.length == 0) {
@ -299,39 +279,7 @@ export default class ProductionREQ extends BasePage {
// } // }
console.log(model.TraysList); console.log(model.TraysList);
} }
async addlist() {
if (this.boxnumber == '') {
(this.$refs.uToast as any).show({
title: '请扫描托盘号',
// url: '/pages/user/index'
});
return;
}
// this.listboxnumber
const isDuplicate = this.list.some((item) => item.sn === this.boxnumber);
if (isDuplicate) {
(this.$refs.uToast as any).show({
title: '请勿重复扫描托盘',
// url: '/pages/user/index'
});
return;
}
await this.model.selloutconntray(this.boxnumber);
if (this.model.SubmitCode == '200') {
(this.$refs.uToast as any).show({
title: '成功',
type: 'success',
});
this.list.push(model.selloutconntraydata);
this.TraysList.outNumber += model.selloutconntraydata.amount;
} else {
(this.$refs.uToast as any).show({
title: '失败',
type: 'error',
});
}
}
async onSubmit() { async onSubmit() {
if (this.orderNo == '' || this.orderNo.length == 0) { if (this.orderNo == '' || this.orderNo.length == 0) {
(this.$refs.uToast as any).show({ (this.$refs.uToast as any).show({
@ -343,26 +291,20 @@ export default class ProductionREQ extends BasePage {
if (this.list.length == 0 || this.list == '') { if (this.list.length == 0 || this.list == '') {
(this.$refs.uToast as any).show({ (this.$refs.uToast as any).show({
title: '请先扫码箱码', title: '请先扫描标志卡',
// url: '/pages/user/index' // url: '/pages/user/index'
}); });
return; return;
} }
let params = []; let params = [];
this.list.map((item) => { this.list.map((item) => {
params.push({ item.produceCode = this.TraysList.produceCode;
id: this.TraysList.id, item.id = this.TraysList.id;
produceCode: this.TraysList.produceCode, item.createBy = session.loginName;
materialCode: this.TraysList.materialCode, item.factoryCode = session.FactoryCode;
materialDesc: this.TraysList.materialDesc, params.push(item);
userDefined1: this.TraysList.userDefined1,
locCode: this.cimWl.value,
planNumber: item.amount,
sn: item.sn,
factoryCode: session.FactoryCode,
});
}); });
console.log('list', params); //console.log('list', params);
await this.model.out(params); await this.model.out(params);
if (this.model.SubmitCode == '200') { if (this.model.SubmitCode == '200') {
(this.$refs.uToast as any).show({ (this.$refs.uToast as any).show({
@ -380,24 +322,25 @@ export default class ProductionREQ extends BasePage {
} }
} }
mepty() { mepty() {
this.orderNo = ''; //this.orderNo = '';
this.list = []; this.list = [];
this.aimWl = {} as OptionType; this.aimWl = {} as OptionType;
this.bimWl = {} as OptionType; this.query();
this.materilist = []; // this.bimWl = {} as OptionType;
this.userDefined1list = []; // this.materilist = [];
//this.model.mepty(); // this.userDefined1list = [];
this.boxnumber = ''; // //this.model.mepty();
this.TraysList = { // this.boxnumber = '';
outNumber: 0, // this.TraysList = {
planNumber: 0, // outNumber: 0,
id: '', // planNumber: 0,
produceCode: '', // id: '',
materialCode: '', // produceCode: '',
materialDesc: '', // materialCode: '',
userDefined1: '', // materialDesc: '',
unit: '', // userDefined1: '',
}; // unit: '',
// };
} }
} }
</script> </script>
@ -446,12 +389,12 @@ body {
} }
} }
.fiexdcontent { // .fiexdcontent {
position: fixed; // position: fixed;
width: 92%; // width: 92%;
box-shadow: 0 0 14px 0 rgb(128 128 128 / 46%); // box-shadow: 0 0 14px 0 rgb(128 128 128 / 46%);
z-index: 100; // z-index: 100;
} // }
.form { .form {
background-color: #fff; background-color: #fff;
padding: 15rpx; padding: 15rpx;
@ -508,7 +451,7 @@ body {
background-color: #fff; background-color: #fff;
padding: 20rpx 20rpx 20rpx; padding: 20rpx 20rpx 20rpx;
border-radius: 10rpx; border-radius: 10rpx;
height: 210rpx; height: 280rpx;
overflow: scroll; overflow: scroll;
//box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2); //box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
//color: #8d8989; //color: #8d8989;
@ -572,11 +515,12 @@ body {
.scroll { .scroll {
// margin-top: 2rpx; // margin-top: 2rpx;
height: 680rpx; height: 680rpx;
position: absolute; overflow: scroll;
width: 92%; // position: absolute;
top: 740rpx; // width: 92%;
/* bottom: 40px; */ // top: 740rpx;
overflow: auto; // /* bottom: 40px; */
// overflow: auto;
// background-color: #f2f2f2; // background-color: #f2f2f2;
.form2 { .form2 {
background-color: #fff; background-color: #fff;
@ -585,10 +529,10 @@ body {
box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2); box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
color: #8d8989; color: #8d8989;
.list { .list {
display: flex; // display: flex;
flex-direction: row; // flex-direction: row;
.rowleft { .rowleft {
width: 80%; // width: 80%;
.row-list { .row-list {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@ -602,7 +546,7 @@ body {
.list-item { .list-item {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
flex: 1; //flex: 1;
} }
} }
} }

@ -13,11 +13,11 @@ export class ProductionREQ extends VuexModule {
orderNoItemList: any = []; orderNoItemList: any = [];
@MutationAction @MutationAction
async ProductionMaterialRequisition(orderNo: any) { async ProductionMaterialRequisition(orderNo: any) {
const result: any = await http.post(url.lanjuwms.raw.ProductionREQ.ProductionMaterialRequisition, { const result: any = await http.post(url.lanjuwms.raw.ProductionREQ.ProductionMaterialRequisitionSC, {
// headers: { // headers: {
// poolName: session.PoolName, // poolName: session.PoolName,
// }, // },
produceCode: orderNo, userDefined4: orderNo,
factoryCode: session.FactoryCode, factoryCode: session.FactoryCode,
}); });
// http.defaults.headers.common['Accept-Language'] = session.PoolName; // http.defaults.headers.common['Accept-Language'] = session.PoolName;
@ -73,7 +73,7 @@ export class ProductionREQ extends VuexModule {
} }
@MutationAction @MutationAction
async out(params: any) { async out(params: any) {
const result: any = await http.post(url.lanjuwms.raw.ProductionREQ.out, params); const result: any = await http.post(url.lanjuwms.raw.ProductionREQ.NewConMaterialOutSC, params);
const SubmitCode = result.code; const SubmitCode = result.code;
return { SubmitCode }; return { SubmitCode };
} }
@ -90,6 +90,17 @@ export class ProductionREQ extends VuexModule {
})); }));
return { warehouselist }; return { warehouselist };
} }
///扫描标志卡
getidcardcode: any = '';
byidcardobj: any = {};
@MutationAction
async getByidcard(data: any) {
const result: any = await http.post(url.lanjuwms.raw.ReceivePO.SweepMaterialCardSC, data);
const getidcardcode = result.code;
const byidcardobj = result.data;
return { getidcardcode, byidcardobj };
}
} }
export default getModule(ProductionREQ); export default getModule(ProductionREQ);

@ -116,6 +116,7 @@ export const url = {
addOrderCard: qianzhuione + '/wms/WmsToWCSmission/addOrderCard', addOrderCard: qianzhuione + '/wms/WmsToWCSmission/addOrderCard',
selectOrderCard: qianzhuione + '/wms/WmsToWCSmission/selectOrderCard', selectOrderCard: qianzhuione + '/wms/WmsToWCSmission/selectOrderCard',
listTableCK: qianzhuione + '/wms/WmsToWCSmission/listTableCK', listTableCK: qianzhuione + '/wms/WmsToWCSmission/listTableCK',
SweepMaterialCardSC: qianzhuione + '/wms/WmsToWCSmission/SweepMaterialCardSC',
}, },
ReceiveSRM: { ReceiveSRM: {
// 手持 --包材采购单采购收货查询 // 手持 --包材采购单采购收货查询
@ -153,6 +154,8 @@ export const url = {
warehouselist: qianzhuione + '/wms/order/listCK', warehouselist: qianzhuione + '/wms/order/listCK',
ProductionMaterialRequisitionsn: qianzhuione + '/wms/WmsToWCSmission/ProductionMaterialRequisitionsn', ProductionMaterialRequisitionsn: qianzhuione + '/wms/WmsToWCSmission/ProductionMaterialRequisitionsn',
out: qianzhuione + '/wms/WmsToWCSmission/ProductionMaterialRequisitionAdd', out: qianzhuione + '/wms/WmsToWCSmission/ProductionMaterialRequisitionAdd',
ProductionMaterialRequisitionSC: qianzhuione + '/wms/WmsToWCSmission/ProductionMaterialRequisitionSC',
NewConMaterialOutSC: qianzhuione + '/wms/WmsToWCSmission/NewConMaterialOutSC',
}, },
TrayStatusUpdate: { TrayStatusUpdate: {
out: qianzhuione + '/wms/order/TraystatusUpdate', out: qianzhuione + '/wms/order/TraystatusUpdate',

Loading…
Cancel
Save