From f998a1b66c9640516fe8478b2f66e919b6f10789 Mon Sep 17 00:00:00 2001 From: zyn Date: Mon, 29 Jan 2024 10:58:13 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(=E4=BA=A7=E5=93=81=E6=A0=87=E5=87=86):?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E4=BC=81=E6=A0=87=E5=8F=B7=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qbrk-product/bussLibraryProduct.vue | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/src/pages/processCenter/pages/creatProcess/qbrk-product/bussLibraryProduct.vue b/src/pages/processCenter/pages/creatProcess/qbrk-product/bussLibraryProduct.vue index a37dae01d..044811b72 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk-product/bussLibraryProduct.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk-product/bussLibraryProduct.vue @@ -620,6 +620,26 @@ export default { if (this.form.standStatus === '2') { this.form.standYear = year.toString() + // 制定切修订 -> 顺序号和企标号是空的 + if (!this.form.DTQBBHBUSS || this.form.DTQBBHBUSS === '') { + this.setInitValue('old', this.form.standSort, '', this.form.standYear, '') + } else { + const standCode = this.form.standCode = this.form.DTQBBHBUSS + this.$http._getData('/lawss/sarBussionessStand/queryBussinessStandByStandCode', { standCode }).then(res => { + if (res.ok) { + this.form.standSort = res.data.standSort || res.data.standSortShow + + const oldYear = this.form.standCode.slice(this.form.standCode.lastIndexOf('-') + 1) // 2022 2022 X + const oldStandYear = oldYear.slice(0, 4) + const oldStandNum = this.form.standCode.slice(0, this.form.standCode.lastIndexOf('-')).replace(this.form.standSort, '') + + this.setInitValue('old', this.form.standSort, oldStandNum, oldStandYear, this.form.standCode) + + this.getStandCode(oldStandNum, oldStandYear, oldYear) + } + }) + } + /* if (this.form.standCode && this.form.standCode !== '') { const oldYear = this.form.standCode.slice(this.form.standCode.lastIndexOf('-') + 1) // 2022 2022 X const oldStandYear = oldYear.slice(0, 4) @@ -649,6 +669,7 @@ export default { }) } } + */ } if (this.form.standStatus === '3') { @@ -751,6 +772,30 @@ export default { if (this.form.standStatus === '2') { this.form.standYear = year.toString() + if (this.form.DTQBBHBUSS && this.form.DTQBBHBUSS !== '') { + // 企业标准号空 代替企标编号非空 + const standCode = this.form.standCode = this.form.DTQBBHBUSS + this.$http._getData('/lawss/sarBussionessStand/queryBussinessStandByStandCode', { standCode }).then(res => { + if (res.ok) { + this.form.standSort = res.data.standSort || res.data.standSortShow + + const oldYear = this.form.standCode.slice(this.form.standCode.lastIndexOf('-') + 1) // 2022 2022 X + const oldStandYear = oldYear.slice(0, 4) + const oldStandNum = this.form.standCode.slice(0, this.form.standCode.lastIndexOf('-')).replace(this.form.standSort, '') + + this.setInitValue('init', this.form.standSort, oldStandNum, oldStandYear, this.form.standCode) + this.old = JSON.parse(JSON.stringify(this.init)) + + this.getStandCode(oldStandNum, oldStandYear, oldYear) + } + }) + return + } + // 企业标准号空 代替企标编号空 + this.setInitValue('init', this.form.standSort, '', '', '') + this.old = JSON.parse(JSON.stringify(this.init)) + return + /* if (!this.form.standCode || this.form.standCode === '') { if (this.form.DTQBBHBUSS && this.form.DTQBBHBUSS !== '') { // 企业标准号空 代替企标编号非空 @@ -785,6 +830,7 @@ export default { this.old = JSON.parse(JSON.stringify(this.init)) this.getStandCode(oldStandNum, oldStandYear, oldYear) + */ } if (this.form.standStatus === '3') { From aa0029f001709b4ed926081a03737e7b4bd29884 Mon Sep 17 00:00:00 2001 From: zyn Date: Mon, 29 Jan 2024 14:37:34 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix(=E6=A0=87=E5=87=86=E5=90=88=E8=A7=84?= =?UTF-8?q?=E8=AF=84=E4=BC=B0=E6=B5=81=E7=A8=8B):=20=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/creatProcess/bzpg/step1.vue | 26 +++++++------------ 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/bzpg/step1.vue b/src/pages/processCenter/pages/creatProcess/bzpg/step1.vue index 6456d330a..9959f36e2 100644 --- a/src/pages/processCenter/pages/creatProcess/bzpg/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/bzpg/step1.vue @@ -1049,29 +1049,21 @@ export default { // 确认添加事件 okProject () { if(this.projectList.length) { - const proData = [] + this.projectList.forEach(i => { + i.name = i.projectGroup + '-' + i.managementHostName + '-' + i.developmentHostName + }) if(this.dataList.length) { - this.dataList.forEach(item => { - if(!proData.length) { - proData.push(item.projectGroup) - }else if(!proData.includes(item.projectGroup)) { - proData.push(item.projectGroup) - } - }) - this.projectList.forEach(items => { - if(!proData.includes(items.projectGroup)) { - this.dataList.push(items) - }else{ - this.subFlag++ - } - }) - if(this.subFlag > 0) { + if (this.dataList.some(data => this.projectList.some(project => project.name === data.name))) { this.$message.warning('请勿重复添加数据') + return + } else { + this.dataList = [ ...this.dataList, ...this.projectList ] } }else{ - this.dataList = this.projectList + this.dataList = [ ...this.projectList ] } this.ProjectModel = false; + console.log(this.dataList === this.projectList) }else{ this.$message.warning('请至少选择一条数据进行添加') }