Merge branch 'fix_20240123_UAT' into 'master'
Fix 20240123 uat See merge request laws-foton-slrs/foton-laws-system-front!153
This commit is contained in:
@@ -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('请至少选择一条数据进行添加')
|
||||
}
|
||||
|
||||
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user