From f998a1b66c9640516fe8478b2f66e919b6f10789 Mon Sep 17 00:00:00 2001 From: zyn Date: Mon, 29 Jan 2024 10:58:13 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BA=A7=E5=93=81=E6=A0=87=E5=87=86):=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BC=81=E6=A0=87=E5=8F=B7=E9=97=AE=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') {