From e6ffeb623852d87fba9e1b8359c0b8b6da79f1df Mon Sep 17 00:00:00 2001 From: guoshuang Date: Wed, 11 Sep 2024 21:36:55 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E9=A2=86=E6=96=99=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E4=BB=A5=E5=8F=8A=E5=8C=85=E6=9D=90=E6=94=B6=E8=8E=B7?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/login/login/index.vue | 2 +- src/pages/wms/Raw/ProductionREQ/index.vue | 209 +++++++++------------- src/pages/wms/Raw/ReceivePO/index.vue | 144 ++------------- src/pages/wms/Raw/ReceiveSRM/index.vue | 15 +- 4 files changed, 115 insertions(+), 255 deletions(-) diff --git a/src/pages/login/login/index.vue b/src/pages/login/login/index.vue index 15f31c3..2fd68e2 100644 --- a/src/pages/login/login/index.vue +++ b/src/pages/login/login/index.vue @@ -142,7 +142,7 @@ export default class LoginPage extends BasePage { // console.log('Version////', this.Version); } ///********版本号修改区域********** - version = '0.0.104'; //正式版本号 + version = '0.0.105'; //正式版本号 //version = '0.0.14'; //测试版本号 //***************标志修改区域:是否是测试标志: false 正式版本; true 测试版本**************** //isTest = true; diff --git a/src/pages/wms/Raw/ProductionREQ/index.vue b/src/pages/wms/Raw/ProductionREQ/index.vue index c549160..a4d740e 100644 --- a/src/pages/wms/Raw/ProductionREQ/index.vue +++ b/src/pages/wms/Raw/ProductionREQ/index.vue @@ -10,46 +10,45 @@ - + - - - - - + --> + + + + - + 领料单: - {{ TraysList && TraysList.produceCode }} + {{ item.userDefined4 }} 物料编码: - {{ TraysList && TraysList.materialCode }} + {{ item.handlematerialCode }} 物料名称: - {{ TraysList && TraysList.materialDesc }} + {{ item.materialDesc }} 应出/已出: - {{ TraysList && TraysList.planNumber }}/{{ outNumber }} + {{ item.planNumber }}/{{ item.outNumber }} 单位: - {{ TraysList && TraysList.unit }} + {{ item.unit }} @@ -57,7 +56,7 @@ - + @@ -67,7 +66,7 @@ 物料编码: - {{ item.materialCode }} + {{ item.handlematerialCode }} 物料名称: @@ -93,7 +92,10 @@ 数量: - + + + + 删除 @@ -168,17 +170,6 @@ export default class ProductionREQ extends BasePage { // this.cimWl = this.warehouselist[0]; // } } - bookTypeChange(e: any) { - this.aimWl = e.pickerName; - this.list = []; - this.TraysList = e.pickerName; - this.realityaddNumber = e.pickerName.outNumber; - this.outNumber = e.pickerName.outNumber; - - //this.queryinformation(); - //this.getlist(); - } - //查询货单关联采购单信息 async query() { if (this.orderNo == '' || this.orderNo.length == 0) { @@ -191,20 +182,11 @@ export default class ProductionREQ extends BasePage { await this.model.ProductionMaterialRequisition(this.orderNo); if (model.orderNoItemList) { this.materilist = []; - // let a: any = {}; - // model.orderNoItemList.forEach((item) => { - // a.label = item.productName; - // a.value = item.productCode; - // this.materilist.push(a); - // }); this.materilist = model.orderNoItemList; - this.aimWl = this.materilist[0]; - 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.materilist.forEach((item) => { + item.returnoutNumber = item.outNumber; + item.handlematerialCode = item.materialCode.slice(item.materialCode.search(/[1-9]/)); + }); } else { this.materilist = []; } @@ -229,55 +211,28 @@ export default class ProductionREQ extends BasePage { if (model.getidcardcode == '200') { let alreadyList = model.byidcardobj; alreadyList.handlematerialCode = alreadyList.materialCode.slice(alreadyList.materialCode.search(/[1-9]/)); + this.materilist.forEach((item) => { + if (item.materialCode == alreadyList.materialCode) { + item.outNumber += alreadyList.amount; + } + }); + //alreadyList.handlematerialCode = alreadyList.materialCode.slice(alreadyList.materialCode.search(/[1-9]/)); this.list.push(alreadyList); - this.confirmNumber(); this.Idcard = ''; } } - confirmNumber() { - let addNumber = 0; + confirmNumber(changeobj) { + let addnumber = 0; this.list.forEach((item) => { - addNumber += parseFloat(item.amount ? item.amount : '0'); + if (item.materialCode == changeobj.materialCode) { + addnumber += parseFloat(changeobj.amount); + } + }); + this.materilist.forEach((item) => { + if (item.materialCode == changeobj.materialCode) { + item.outNumber = addnumber; + } }); - - this.outNumber = this.realityaddNumber + addNumber; - } - async getlist() { - if (this.orderNo == '' || this.orderNo.length == 0) { - (this.$refs.uToast as any).show({ - title: '请输入领料单号', - // url: '/pages/user/index' - }); - return; - } - if (this.aimWl.value == '') { - (this.$refs.uToast as any).show({ - title: '请选择一个物料', - // url: '/pages/user/index' - }); - return; - } - if (this.bimWl.value == '') { - (this.$refs.uToast as any).show({ - title: '请选择一个批次', - // url: '/pages/user/index' - }); - return; - } - let item: any = {}; - item.produceCode = this.orderNo; - item.materialCode = this.aimWl.value; - item.userDefined1 = this.bimWl.value; - await (this.model as any).showTrays(item); - this.TraysList = model.TraysList; - // if (model.TraysList.length > 0) { - // this.list = model.TraysList; - // this.outnumber = model.TraysList.length; - // } else { - // this.list = []; - // this.outnumber = 0; - // } - console.log(model.TraysList); } async onSubmit() { @@ -298,49 +253,43 @@ export default class ProductionREQ extends BasePage { } let params = []; this.list.map((item) => { - item.produceCode = this.TraysList.produceCode; - item.id = this.TraysList.id; item.createBy = session.loginName; item.factoryCode = session.FactoryCode; params.push(item); }); - //console.log('list', params); - await this.model.out(params); - if (this.model.SubmitCode == '200') { - (this.$refs.uToast as any).show({ - title: '成功', - type: 'success', - }); - this.mepty(); - //this.getlist(); - } else { - (this.$refs.uToast as any).show({ - title: '失败', - type: 'error', - }); - //this.getlist(); - } + console.log('list', params); + // await this.model.out(params); + // if (this.model.SubmitCode == '200') { + // (this.$refs.uToast as any).show({ + // title: '成功', + // type: 'success', + // }); + // this.mepty(); + // //this.getlist(); + // } else { + // (this.$refs.uToast as any).show({ + // title: '失败', + // type: 'error', + // }); + // //this.getlist(); + // } } mepty() { - //this.orderNo = ''; this.list = []; - this.aimWl = {} as OptionType; + this.materilist = []; this.query(); - // this.bimWl = {} as OptionType; - // this.materilist = []; - // this.userDefined1list = []; - // //this.model.mepty(); - // this.boxnumber = ''; - // this.TraysList = { - // outNumber: 0, - // planNumber: 0, - // id: '', - // produceCode: '', - // materialCode: '', - // materialDesc: '', - // userDefined1: '', - // unit: '', - // }; + } + delet(deletobj, index) { + this.list.splice(index, 1); + this.materilist.forEach((item) => { + if (item.materialCode == deletobj.materialCode) { + item.outNumber -= deletobj.amount; + } + }); + (this.$refs.uToast as any).show({ + title: '删除成功', + type: 'success', + }); } } @@ -451,8 +400,9 @@ body { background-color: #fff; padding: 20rpx 20rpx 20rpx; border-radius: 10rpx; - height: 280rpx; + height: 240rpx; overflow: scroll; + margin-bottom: 6rpx; //box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2); //color: #8d8989; // .list { @@ -514,8 +464,8 @@ body { .scroll { // margin-top: 2rpx; - height: 680rpx; - overflow: scroll; + // height: 680rpx; + // overflow: scroll; // position: absolute; // width: 92%; // top: 740rpx; @@ -549,6 +499,19 @@ body { //flex: 1; } } + .righttitle { + display: flex; + justify-content: flex-end; + + .boder-icon-rigth { + border: 1rpx solid #fa3534; + width: 130rpx; + text-align: center; + background: #fa3534; + color: #ffffff; + margin-top: 10px; + } + } } .rowright { width: 20%; diff --git a/src/pages/wms/Raw/ReceivePO/index.vue b/src/pages/wms/Raw/ReceivePO/index.vue index 2eedfaa..c8d3ef7 100644 --- a/src/pages/wms/Raw/ReceivePO/index.vue +++ b/src/pages/wms/Raw/ReceivePO/index.vue @@ -80,7 +80,7 @@ - + @@ -115,9 +115,9 @@ 实际收货: - + + 删除 + @@ -281,84 +281,7 @@ export default class receivePO extends BasePage { this.nooperationNumber = 0; this.czNumber = ''; } - //点击收货按钮,录入批次(或系统自动生成)、数量、托盘码进行收货。 - // async onOk() { - // console.log(this.form3); - // // if (this.form3.userDefined6 == '' || this.form3.userDefined6 == undefined) { - // // (this.$refs.uToast as any).show({ - // // title: '标志码不能为空', - // // type: 'default', - // // }); - // // return; - // // } - // if (this.form3.planNumber == '' || this.form3.planNumber == undefined) { - // (this.$refs.uToast as any).show({ - // title: '数量不能为空', - // type: 'default', - // }); - // return; - // } - // if (this.form3.sn == '' && this.selectway == true) { - // (this.$refs.uToast as any).show({ - // title: '托盘号不能为空', - // type: 'default', - // }); - // return; - // } - // if (this.productCodeTypeList.value == '' || this.productCodeTypeList.value == undefined) { - // (this.$refs.uToast as any).show({ - // title: '请选择仓库', - // type: 'default', - // }); - // return; - // } - // if (this.waCodeTypeList.value == '' || this.waCodeTypeList.value == undefined) { - // (this.$refs.uToast as any).show({ - // title: '请选择库区', - // type: 'default', - // }); - // return; - // } - // if (this.receiptNoCode == '' || this.receiptNoCode == undefined) { - // (this.$refs.uToast as any).show({ - // title: '请先生成收货单号', - // type: 'default', - // }); - // return; - // } - // console.log('1234567'); - // let query = this.clickitem; - // // query.applyList = this.Sparepartlist; - // query.workStatus = this.form3.workStatus; - // if (this.selectway == true) { - // query.sn = this.form3.sn; - // } else { - // query.sn = dayjs().format('YYYYMMDDHHmmss'); - // } - // query.planNumber = this.form3.planNumber; - // query.whCode = this.productCodeTypeList.warehouseCode; - // query.waCode = this.waCodeTypeList.value; - // query.factoryCode = session.FactoryCode; - // query.userDefined6 = this.form3.userDefined6; - // query.receiptNoCode = this.receiptNoCode; - // query.poLine = this.clickitem.userDefined3; - // await this.model.PurchaseOrderdeliPda(query); - // console.log(this.model.SubmitCode); - // if (this.model.SubmitCode.code == 200) { - // (this.$refs.uToast as any).show({ - // title: '成功', - // type: 'default', - // }); - // this.show = false; - // this.query(); - // // this.ProcureOrderAlready(); - // } else { - // (this.$refs.uToast as any).show({ - // title: '失败', - // type: this.model.SubmitCode.msg, - // }); - // } - // } + async onFormDoubleClick(item) { console.log('双击', item); //await this.model.OnSubmit(item.id); @@ -401,48 +324,14 @@ export default class receivePO extends BasePage { this.aimWl = this.materilist[0]; this.list.push(this.materilist[0]); this.procureCode = this.list[0].procureCode; + this.realityaddNumber = this.list[0].realityNumber; } else { this.aimWl = {} as OptionType; } //this.ProcureOrderAlready(); //this.list = model.orderNoItemList; } - // async querydelivery() { - // console.log(session); - // if (this.userDefined5 == '' || this.userDefined5.length == 0) { - // (this.$refs.uToast as any).show({ - // title: '请输入送货单号', - // type: 'default', - // }); - // return; - // } - // this.aimWl = {} as OptionType; - // let query = { - // userDefined5: this.userDefined5, - // procureCode: this.procureCode, - // materialCode: this.aimWl.value ? this.aimWl.value : '', - // //this.materialCode, - // factoryCode: session.FactoryCode, - // }; - // await this.model.PurchaseOrderPda(query); - // let materilist = model.orderNoItemList; - // this.materilist = materilist.map((item) => { - // let newmaterialCode = item.materialCode.slice(item.materialCode.search(/[1-9]/)); - // return { - // ...item, - // handlematerialCode: newmaterialCode, - // }; - // }); - // this.list = []; - // if (this.materilist.length) { - // this.aimWl = this.materilist[0]; - // this.list.push(this.materilist[0]); - // } else { - // this.aimWl = {} as OptionType; - // } - // this.ProcureOrderAlready(); - // //this.list = model.orderNoItemList; - // } + //提单按钮 async tidan() { if (this.procureCode == '' || this.procureCode.length == 0) { @@ -575,20 +464,19 @@ export default class receivePO extends BasePage { this.list = []; this.list.push(e.pickerName); this.procureCode = this.list[0].procureCode; + this.realityaddNumber = this.list[0].realityNumber; // //this.queryinformation(); //this.getlist(); } - // bookTypeChangeway(e) { - // //this.showshow = true; - // this.bimWl.value = e.pickerName.value; - // console.log(e); - // // if (e.pickerName.value == '0') { - // // this.selectway = false; - // // } else { - // // this.selectway = true; - // // } - // } + delet(item, index) { + this.receivedlist.splice(index, 1); + this.list[0].realityNumber -= item.planNumber; + (this.$refs.uToast as any).show({ + title: '删除成功', + type: 'success', + }); + } }