fix(产品标准): 修改企标号问题

This commit is contained in:
zyn
2024-01-29 10:58:13 +08:00
parent 3e059ee6bb
commit f998a1b66c
@@ -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') {