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') {