代替企标编号可多选

This commit is contained in:
zyn
2023-04-10 15:19:10 +08:00
parent efc7ae7011
commit 1655eb02ff
@@ -2699,12 +2699,13 @@
message: '标准最多选择20项',
type: 'warning'
})
} else if (this.form.reviseStatus === '2' && this.selectedListRep.length + textArr.length > 1) {
return this.$message({
message: '标准最多选择1项',
type: 'warning'
})
}
// else if (this.form.reviseStatus === '2' && this.selectedListRep.length + textArr.length > 1) {
// return this.$message({
// message: '标准最多选择1项',
// type: 'warning'
// })
// }
this.selectedListRep.map((item) => {
let texts = ''
if (item.standCode !== null && item.standCode !== '') {
@@ -2744,8 +2745,17 @@
// 修订 时 手动查找代替企标编号 发布稿放到历史版本
if(this.replaceLawType === 'DTQBBHBUSS' && this.form.reviseStatus === '2' && this.selectedListRep.length){
const id = this.selectedListRep[0].id
this.selectByIdAtt(id).then(res =>{
let ids = this.selectedListRep.reduce((init,item,index,arr)=>{
let result
if(index === arr.length - 1){
result = init + item.id
}else{
result = init + item.id + ','
}
return result
},'')
// const id = this.selectedListRep[0].id
this.selectByIdAtt(ids).then(res =>{
if (res && res.data && res.data.fbgbuss !== '') {
this.form.LSBBBUSSName = res.data.fbgbussNmae
this.form.LSBBBUSS = res.data.fbgbuss