From 968b64110badbe56047e2fac3b7daf439b683790 Mon Sep 17 00:00:00 2001 From: ruanqi Date: Wed, 10 Apr 2024 10:58:31 +0800 Subject: [PATCH] =?UTF-8?q?0412=20=E6=96=B0=E7=9C=8B=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/user.js | 8 +- .../modules/Abnormal/AbnormalFeedBack.vue | 12 +- src/views/modules/production/bagLabels.vue | 119 +++++- .../modules/production/bagLabels_old.vue | 340 ++++++++++++++++++ 4 files changed, 470 insertions(+), 9 deletions(-) create mode 100644 src/views/modules/production/bagLabels_old.vue diff --git a/src/store/modules/user.js b/src/store/modules/user.js index a2895d6..fe538c3 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -6,10 +6,10 @@ export default { site: 0, languageDefault: '', userDisplay: '', - padSopUrl:'http://192.168.2.172/upload/', - tvSopUrl:'http://192.168.2.172/sopFile/', - // padSopUrl:'http://192.168.1.83:81/upload/', - // tvSopUrl:'http://192.168.1.83:81/upload/', + // padSopUrl:'http://192.168.2.172/upload/', + // tvSopUrl:'http://192.168.2.172/sopFile/', + padSopUrl:'http://192.168.1.83:81/upload/', + tvSopUrl:'http://192.168.1.83:81/upload/', }, mutations: { updateId (state, id) { diff --git a/src/views/modules/Abnormal/AbnormalFeedBack.vue b/src/views/modules/Abnormal/AbnormalFeedBack.vue index 3dd347f..62a998f 100644 --- a/src/views/modules/Abnormal/AbnormalFeedBack.vue +++ b/src/views/modules/Abnormal/AbnormalFeedBack.vue @@ -240,7 +240,10 @@ 工装    - + + + + @@ -328,6 +331,7 @@ "材料": "materialTemporary", "模具": "mouldTemporary", "工装": "workClothesTemporary", + "根本原因分析": "rootCause", "长久处理方式": "treatment", "温度 ": "temperature", "压力 ": "pressure", @@ -503,6 +507,12 @@ }) return false; } + if( this.disableFlag3==false&&(this.abnormalFeedBackData.rootCause==null||this.abnormalFeedBackData.rootCause=='')){ + this.$alert("请填写根本原因分析", '错误', { + confirmButtonText: '确定' + }) + return false; + } saveAbnormalDetail(this.abnormalFeedBackData).then(({data}) => { if (data && data.code === 0) { this.modalFlag=false diff --git a/src/views/modules/production/bagLabels.vue b/src/views/modules/production/bagLabels.vue index 3827591..4321355 100644 --- a/src/views/modules/production/bagLabels.vue +++ b/src/views/modules/production/bagLabels.vue @@ -4,6 +4,9 @@ import { getPackagePrintDataList, getSOScheduleRoutingDataPrint } from "../../../api/production/generateReport"; +import { + getPhotoAddressData +} from '@/api/pad.js' import {printPackageLabelNoPreview} from "../print/print_package_label-NOOREVIEW"; export default { data(){ @@ -16,7 +19,20 @@ export default { flag:false, soScheduleRouting:{ - } + }, + picData:{ + site:'', + partNo:'', + }, + fileTitle:"文件名 ("+0+"/"+0+")", + fileName:'', + num:1, + currentData:'', + photoDatas:[], + uploadImg:[], + showviewer: false, + url: '', + photoUrl:'', } }, mounted() { @@ -71,11 +87,24 @@ export default { } }else { this.$message.warning(data.msg) + this.cleanAll() } }).catch((error)=>{ + this.cleanAll() this.$message.error(error); }) }, + cleanAll(){ + Object.keys( this.soScheduleRouting).forEach(key => { + this.soScheduleRouting[key] = ''; + }); + Object.keys( this.picData).forEach(key => { + this.picData[key] = ''; + }); + this.fileName=null; + this.fileTitle="文件名 ("+0+"/"+0+")"; + this.photoUrl=null; + }, checkIsPacking(){ let params = { site:this.soScheduleRouting.site, @@ -83,8 +112,9 @@ export default { } checkIsPacking(params).then(({data})=>{ if (data && data.code === 0){ - + this.getData(this.soScheduleRouting.site,this.soScheduleRouting.partNo) }else { + this.getData('','') this.soScheduleRouting={}; this.$message.warning(data.msg) this.searchData = { @@ -146,7 +176,63 @@ export default { } params.number = this.number; this.printPackageLabelNoPreview(params) - } + }, + getData(site,partNo){ + this.picData.partNo = partNo; + this.picData.site= site; + this.getPhoto(); + + }, + getPhoto(){ + getPhotoAddressData(this.searchData).then(({data}) => { + this.photoDatas = data.rows; + if(this.photoDatas.length==0){ + this.fileTitle="文件名 ("+0+"/"+0+")"; + this.photoUrl=null; + return false; + } + this.fileName=this.photoDatas[this.num-1].attaFileNameDb; + this.fileTitle="文件名 ("+this.num+"/"+this.photoDatas.length+")"; + this.photoUrl=this.$store.state.user.padSopUrl+this.photoDatas[this.num-1].attaFileNameDb; + // this.photoUrl='http://192.168.1.83:81/upload/'+this.photoDatas[this.num-1].attaFileNameDb; + }) + }, + nextPicture(){ + if(this.photoDatas.length==0){ + this.fileTitle="文件名 ("+0+"/"+0+")"; + this.$alert('该物料没有上传图片!', '错误', { + confirmButtonText: '确定' + }) + return false; + } + if(this.num==this.photoDatas.length){ + this.num=1; + }else{ + this.num=this.num+1; + } + this.fileName=this.photoDatas[this.num-1].attaFileNameDb; + this.fileTitle="文件名 ("+this.num+"/"+this.photoDatas.length+")"; + this.photoUrl=this.$store.state.user.padSopUrl+this.photoDatas[this.num-1].attaFileNameDb; + // this.photoUrl='http://192.168.1.83:81/upload/'+this.photoDatas[this.num-1].attaFileNameDb; + }, + lastPicture(){ + if(this.photoDatas.length==0){ + this.fileTitle="文件名 ("+0+"/"+0+")"; + this.$alert('该物料没有上传图片!', '错误', { + confirmButtonText: '确定' + }) + return false; + } + if(this.num==1){ + this.num=this.photoDatas.length; + }else{ + this.num=this.num-1; + } + this.fileName=this.photoDatas[this.num-1].attaFileNameDb; + this.fileTitle="文件名 ("+this.num+"/"+this.photoDatas.length+")"; + this.photoUrl=this.$store.state.user.padSopUrl+this.photoDatas[this.num-1].attaFileNameDb; + // this.photoUrl='http://192.168.1.83:81/upload/'+this.photoDatas[this.num-1].attaFileNameDb; + }, }, } @@ -168,7 +254,7 @@ export default {
- + @@ -288,6 +374,31 @@ export default { + +
+
产品图片
+ + + + + + + + + + + + + 上一张 + + + 下一张 + + +
+
+ +
{ + if (data && data.code === 0){ + if (data.total === 0){ + this.$message.warning("派工单不存在") + }else if (data.total === 1){ + this.soScheduleRouting = data.rows[0]; + this.checkIsPacking() + }else { + this.soScheduleRouting = data.rows.find((item)=>item.site===this.$store.state.user.site && item.seqNo === this.searchData.seqNo) + this.checkIsPacking() + } + if (data.row){ + this.soScheduleRouting.qtyBag = data.row[0].qtyBag + this.soScheduleRouting.bag = data.row[0].bag + this.soScheduleRouting.qty = data.row[0].qty + this.soScheduleRouting.carton = data.row[0].carton + } + if (data.data){ + this.soScheduleRouting.sScheduledDate2 = data.data.sScheduledDate; + this.soScheduleRouting.operatorName2 = data.data.operatorName; + this.soScheduleRouting.approveQty2 = data.data.qtyApprove; + } + }else { + this.$message.warning(data.msg) + } + }).catch((error)=>{ + this.$message.error(error); + }) + }, + checkIsPacking(){ + let params = { + site:this.soScheduleRouting.site, + workCenterNo:this.soScheduleRouting.sWorkCenterNo, + } + checkIsPacking(params).then(({data})=>{ + if (data && data.code === 0){ + + }else { + this.soScheduleRouting={}; + this.$message.warning(data.msg) + this.searchData = { + seqNo: undefined, + flag: '', + } + } + }).catch((error)=>{ + this.$message.error(error) + this.searchData = { + seqNo: undefined, + flag: '', + } + this.soScheduleRouting={}; + }) + }, + printLabel(){ + if (!this.soScheduleRouting.site){ + this.$message.warning("请先扫描派工单号") + return + } + if (this.soScheduleRouting.qtyBag === null || this.soScheduleRouting.qtyBag === undefined){ + this.$message.warning("未维护每袋数量") + return; + } + let params = { + previousSeqNo:this.soScheduleRouting.previousSeqNo, + site:this.soScheduleRouting.site, + orderNo:this.soScheduleRouting.orderNo + } + if (this.searchData.flag === 'Y'){ + this.flag = true; + return; + } + this.printPackageLabelNoPreview(params) + }, + printPackageLabelNoPreview(params){ + if (!params){ + this.$message.warning("参数为空") + return + } + // 发起请求 + getPackagePrintDataList(params).then(({data})=>{ + if (data && data.code === 0){ + printPackageLabelNoPreview(data.rows); + this.searchData.flag = ''; + }else { + this.$message.warning(data.msg) + } + }).catch((error)=>{ + this.$message.error(error) + }) + }, + printLabelEntity(){ + let params = { + previousSeqNo:this.soScheduleRouting.previousSeqNo, + site:this.soScheduleRouting.site, + orderNo:this.soScheduleRouting.orderNo + } + params.number = this.number; + this.printPackageLabelNoPreview(params) + } + }, +} + + + + +