From 8359350799c6605c696ee34add28c21943ebf26a Mon Sep 17 00:00:00 2001 From: zyn Date: Wed, 5 Apr 2023 17:02:38 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=8A=80=E6=9C=AF=E6=A0=87=E5=87=86=20?= =?UTF-8?q?=E4=BC=81=E4=B8=9A=E6=A0=87=E5=87=86=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qbrk/common/formEditListFb.vue | 2 +- .../pages/creatProcess/qbrk/step13.vue | 28 ++++++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/qbrk/common/formEditListFb.vue b/src/pages/processCenter/pages/creatProcess/qbrk/common/formEditListFb.vue index d9dc3d6b3..7d5720683 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk/common/formEditListFb.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk/common/formEditListFb.vue @@ -7,7 +7,7 @@ - + { + const obj = res.data + let standSn = obj.newStandSn + this.form.standSn = standSn + this.form.standNumber = standSn + this.form.standNum = standSn + }, e => { + }) + this.form.standYear = this.regDate(year) + this.standSort = this.form.standSort + this.standCode = this.form.standCode this.formKey++ } else { this.$http.get('lawss/sarBussionessStand/getStandInfoByReviseStatus',{reviseStatus:'buss1_'+this.form.reviseStatus,standSort:this.form.standSort,taskId: this.taskIds}, { @@ -2848,6 +2872,8 @@ }else { this.form.standCode = this.form.standSort + ' ' + standSn + ( this.form.standYear === '' ? '' : '-' + this.form.standYear ) } + this.standSort = this.form.standSort + this.standCode = this.form.standCode this.formKey++ }, e => { }) From fa85c4a03a98142b9c9034418252d29992fad202 Mon Sep 17 00:00:00 2001 From: zyn Date: Wed, 5 Apr 2023 18:07:59 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=8A=80=E6=9C=AF=E6=A0=87=E5=87=86?= =?UTF-8?q?=E4=B8=BB=E8=B5=B7=E8=8D=89=E4=BA=BA=E5=9F=B9=E8=AE=AD=E9=99=84?= =?UTF-8?q?=E4=BB=B6id=E4=B8=BA=E7=A9=BA=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/creatProcess/qbrk/step12.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/qbrk/step12.vue b/src/pages/processCenter/pages/creatProcess/qbrk/step12.vue index ac5662d05..cc5833b90 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk/step12.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk/step12.vue @@ -2395,31 +2395,31 @@ //拼接文件名和id 提交到流程Activity // this.form.FBGBUSS=this.FBGBUSSFileList.map(item => item.id).join(",") // 修复将文件删除为一个后提交不显示的bug - this.form.FBGBUSS=this.FBGBUSSFileList.map(item => item.id ? item.id : item.response.data.id).join(",") + this.form.FBGBUSS=this.FBGBUSSFileList.map(item => item.id !== undefined ? item.id : item.response.data.id).join(",") this.form.FBGBUSSName=this.FBGBUSSFileList.map(item => item.name).join(",") // this.form.BZSMBUSS=this.BZSMBUSSFileList.map(item => item.id).join(",") - this.form.BZSMBUSS=this.BZSMBUSSFileList.map(item => item.id ? item.id : item.response.data.id).join(",") + this.form.BZSMBUSS=this.BZSMBUSSFileList.map(item => item.id !== undefined ? item.id : item.response.data.id).join(",") this.form.BZSMBUSSName=this.BZSMBUSSFileList.map(item => item.name).join(",") // this.form.LSBBBUSS=this.LSBBBUSSFileList.map(item => item.id).join(",") - this.form.LSBBBUSS=this.LSBBBUSSFileList.map(item => item.id ? item.id : item.response.data.id).join(",") + this.form.LSBBBUSS=this.LSBBBUSSFileList.map(item => item.id !== undefined ? item.id : item.response.data.id).join(",") this.form.LSBBBUSSName=this.LSBBBUSSFileList.map(item => item.name).join(",") // this.form.QTWJBUSS=this.QTWJBUSSFileList.map(item => item.id).join(",") - this.form.QTWJBUSS=this.QTWJBUSSFileList.map(item => item.id ? item.id : item.response.data.id).join(",") + this.form.QTWJBUSS=this.QTWJBUSSFileList.map(item => item.id !== undefined ? item.id : item.response.data.id).join(",") this.form.QTWJBUSSName=this.QTWJBUSSFileList.map(item => item.name).join(",") // this.form.GLWJBUSS=this.GLWJBUSSFileList.map(item => item.id).join(",") - this.form.GLWJBUSS=this.GLWJBUSSFileList.map(item => item.id ? item.id : item.response.data.id).join(",") + this.form.GLWJBUSS=this.GLWJBUSSFileList.map(item => item.id !== undefined ? item.id : item.response.data.id).join(",") this.form.GLWJBUSSName=this.GLWJBUSSFileList.map(item => item.name).join(",") // this.form.summaryFile=this.summaryFileList.map(item => item.id).join(",") - this.form.summaryFile=this.summaryFileList.map(item => item.id ? item.id : item.response.data.id).join(",") + this.form.summaryFile=this.summaryFileList.map(item => item.id !== undefined ? item.id : item.response.data.id).join(",") this.form.summaryFileName=this.summaryFileList.map(item => item.name).join(",") // this.form.madelSub=this.madelSubList.map(item => item.id).join(",") - this.form.madelSub=this.madelSubList.map(item => item.id ? item.id : item.response.data.id).join(",") + this.form.madelSub=this.madelSubList.map(item => item.id !== undefined ? item.id : item.response.data.id).join(",") this.form.madelSubName=this.madelSubList.map(item => item.name).join(",") }, From bb57bd74d99a0d0877d09a69da6d5c01853fc5b1 Mon Sep 17 00:00:00 2001 From: zyn Date: Wed, 5 Apr 2023 23:41:49 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=8A=80=E6=9C=AF=E6=A0=87=E5=87=86-?= =?UTF-8?q?=E5=8F=91=E5=B8=83-=E4=BC=81=E4=B8=9A=E6=A0=87=E5=87=86?= =?UTF-8?q?=E5=8F=B7=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qbrk/common/formEditListFb.vue | 4 +- .../pages/creatProcess/qbrk/step13.vue | 206 ++++++++++++++---- 2 files changed, 168 insertions(+), 42 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/qbrk/common/formEditListFb.vue b/src/pages/processCenter/pages/creatProcess/qbrk/common/formEditListFb.vue index 7d5720683..11352d498 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk/common/formEditListFb.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk/common/formEditListFb.vue @@ -18,12 +18,14 @@ - + diff --git a/src/pages/processCenter/pages/creatProcess/qbrk/step13.vue b/src/pages/processCenter/pages/creatProcess/qbrk/step13.vue index 581d19de8..0acd7b641 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk/step13.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk/step13.vue @@ -1121,8 +1121,10 @@ data: [], // 标准列表数据 ListForm: {}, // 新增数据 maxStandnSn:"", // 最大順序號 - standSort:"", - standCode:"" + standSort:"", + standCode:"", + reviseStatus:"", + standNum:"" } }, watch:{ @@ -1172,18 +1174,68 @@ }, methods: { reveseStatusChange(val){ - if(val === '1'){ - this.form.standNum = this.maxStandnSn - }else{ - this.form.standNum = this.form.standSn - } - if(val === '3'){ - this.form.standSort = this.standSort + if(this.form.reviseStatus === '1'){ + this.$http.get('lawss/sarBussionessStand/getStandInfoByReviseStatus',{reviseStatus:'buss1_'+this.form.reviseStatus,standSort:this.form.standSort,taskId: this.taskIds}, { + _this: this + }, res => { + const obj = res.data + let standSn = obj.newStandSn + 1 + this.form.standSn = standSn + this.form.standNumber = standSn + this.form.standNum = standSn + }, e => { + }) + + // this.form.standYear = this.standYear.slice(0,4) + let year = new Date().getFullYear() + if(this.standYear !== year){ + // if(this.standYear.slice(0,4) == this.form.standYear){ + // this.form.standYear = year + ' X' + // }else{ + this.form.standYear = year + // } + }else{ + if(this.standYear.slice(0,4) == this.form.standYear){ + this.form.standYear = this.standYear + ' X' + }else{ + this.form.standYear = this.standYear + } + } + + }else if(this.form.reviseStatus === '2'){ + this.form.standNum = this.standNum === undefined ? '' : this.standNum + + let year = new Date().getFullYear() + if(this.standYear.slice(0,4) != year){ + if((this.form.standYear+'').slice(0,4) === year){ + this.form.standYear = year + ' X' + }else{ + this.form.standYear = year + } + }else{ + if(this.standYear.slice(0,4) == (this.form.standYear + '').slice(0,4)){ + this.form.standYear = this.standYear + ' X' + }else{ + this.form.standYear = this.standYear + } + } + + + }else if(this.form.reviseStatus === '3'){ + // this.form.standSort = this.standSort this.form.standCode = this.standCode + this.form.standNum = this.standNum + if(this.standYear.slice(0,4) == this.form.standYear){ + this.form.standYear = this.standYear + ' X' + }else{ + this.form.standYear = this.standYear + } + this.form.standSort = this.standSort } }, standSortChange(val){ - this.form.standCode = val + ' ' + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear ) + this.reveseStatusChange(); + // this.form.standCode = val + ' ' + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear ) }, checkedRoleTransfer (data) { this.isSubmit = true @@ -2820,49 +2872,119 @@ getStandInfoByReviseStatus() { let date = new Date(); let year = date.getFullYear(); + this.reviseStatus = this.form.reviseStatus if(this.form.reviseStatus === '2'){ - this.form.standSn = this.form.standNum - this.form.standNumber = this.form.standNum - this.form.standYear = this.regDate(year) - // 此处因企标编号中带有空格所以此处不再补充添加空格,如果企标编码中没有空格则补充空格 但是产品标准除外 - let judgeFn = new RegExp(/\s+/g); - if(judgeFn.test(this.form.standSort)){ - this.form.standCode = this.form.standSort + '' + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear ) - }else if(this.form.standSort === 'Q/QCBFC'){ - this.form.standCode = this.form.standSort + '' + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear ) - }else { - this.form.standCode = this.form.standSort + ' ' + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear ) - } - this.standCode = this.form.standCode - this.standSort = this.form.standSort - this.formKey++ - } else if(this.form.reviseStatus === '3'){ + + // 截取企标号中的日期 + // 'Q-F 101-2023 X' + // --- + if(this.form.standCode == ''){ + this.form.standCode = this.form.DTQBBHBUSS + // this.form.standCode = 'Q/FT A033-2023' + } + let index1 = this.form.standCode.lastIndexOf('-') // 7 + this.standYear = this.form.standCode.slice(index1 + 1) // 2023 x + if(this.standYear.indexOf(' ')>0){ + const _index = this.standYear.indexOf(' ') + this.standYear = this.standYear.slice(0,_index) + }else if(this.standYear.indexOf(' X')>0){ + const _index = this.standYear.indexOf(' X') // 4 + this.standYear = this.standYear.slice(0,_index) // 2023 + } + + let noYearStand = this.form.standCode.slice(0, index1) // 'Q-F 101' + let index2 = noYearStand.lastIndexOf(' ') // 3 + this.standNum = noYearStand.slice(index2 + 1) // '101' + + this.standSort = noYearStand.slice(0, index2) // 'Q-F' + + this.form.standSort = this.standSort + this.form.standNum = this.standNum + // --- + + this.form.standSn = this.form.standNum + this.form.standNumber = this.form.standNum + // this.form.standYear = this.regDate(year) + + this.form.standYear = year + if(this.form.standYear == this.standYear){ + this.form.standYear = this.form.standYear + ' X' + } + + // 此处因企标编号中带有空格所以此处不再补充添加空格,如果企标编码中没有空格则补充空格 但是产品标准除外 + let judgeFn = new RegExp(/\s+/g); + console.log(judgeFn.test(this.form.standSort)) + if(judgeFn.test(this.form.standSort)){ + this.form.standCode = this.form.standSort + '' + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear ) + }else if(this.form.standSort === 'Q/QCBFC'){ + this.form.standCode = this.form.standSort + '' + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear ) + }else { + this.form.standCode = this.form.standSort + ' ' + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear ) + } + + + this.standCode = this.form.standCode + // this.standSort = this.form.standSort + this.formKey++ + + + } else if (this.form.reviseStatus === '3'){ this.form.standCode = this.form.standCode - this.$http.get('lawss/sarBussionessStand/getStandInfoByReviseStatus',{reviseStatus:'buss1_'+this.form.reviseStatus,standSort:this.form.standSort,taskId: this.taskIds}, { - _this: this - }, res => { - const obj = res.data - let standSn = obj.newStandSn - this.form.standSn = standSn - this.form.standNumber = standSn - this.form.standNum = standSn - }, e => { - }) - this.form.standYear = this.regDate(year) - this.standSort = this.form.standSort this.standCode = this.form.standCode - this.formKey++ + // --- + let index1 = this.form.standCode.lastIndexOf('-') // 7 + this.standYear = this.form.standCode.slice(index1 + 1) // 2023 x + if(this.standYear.indexOf(' ')>0){ + const _index = this.standYear.indexOf(' ') + this.standYear = this.standYear.slice(0,_index) + }else if(this.standYear.indexOf(' X')>0){ + const _index = this.standYear.indexOf(' X') // 4 + this.standYear = this.standYear.slice(0,_index) // 2023 + } + console.log(this.standYear) + + let noYearStand = this.form.standCode.slice(0, index1) // 'Q-F 101' + let index2 = noYearStand.lastIndexOf(' ') // 3 + this.standNum = noYearStand.slice(index2 + 1) // '101' + + this.standSort = noYearStand.slice(0, index2) // 'Q-F' + + this.form.standSort = this.standSort + this.form.standNum = this.standNum + // --- + + this.form.standYear = year + // if(this.form.standYear == this.standYear){ + // this.form.standYear = this.form.standYear + ' X' + // } + + // this.$http.get('lawss/sarBussionessStand/getStandInfoByReviseStatus',{reviseStatus:'buss1_'+this.form.reviseStatus,standSort:this.form.standSort,taskId: this.taskIds}, { + // _this: this + // }, res => { + // const obj = res.data + // let standSn = obj.newStandSn + // this.form.standSn = standSn + // this.form.standNumber = standSn + // this.form.standNum = standSn + // }, e => { + // }) + // this.form.standYear = this.regDate(year) + // this.standSort = this.form.standSort + // this.standCode = this.form.standCode + // this.formKey++ } else { + this.form.standYear = year + this.$http.get('lawss/sarBussionessStand/getStandInfoByReviseStatus',{reviseStatus:'buss1_'+this.form.reviseStatus,standSort:this.form.standSort,taskId: this.taskIds}, { _this: this }, res => { const obj = res.data - let standSn = obj.newStandSn + let standSn = obj.newStandSn + 1 this.form.standSn = standSn this.form.standNumber = standSn this.form.standNum = standSn - this.form.standYear = this.regDate(year) // 待带入立项标准 + // this.form.standYear = this.regDate(year) // 待带入立项标准 //此处因企标编号中带有空格所以此处不再补充添加空格,如果企标编码中没有空格则补充空格 但是产品标准除外 let judgeFn = new RegExp(/\s+/g); if(judgeFn.test(this.form.standSort)){ @@ -2874,6 +2996,8 @@ } this.standSort = this.form.standSort this.standCode = this.form.standCode + + this.formKey++ }, e => { })