产品标准历史版本修改
This commit is contained in:
@@ -2162,6 +2162,29 @@
|
||||
this.XGDFileList=this.assemble(this.form.XGD,this.form.XGDName);
|
||||
this.LSBBBUSSFileList = this.assemble(this.form.FBGBUSS,this.form.FBGBUSSName).concat(this.assemble(this.form.LSBBBUSS,this.form.LSBBBUSSName))
|
||||
}
|
||||
// 发布稿不为空
|
||||
if(this.form.FBGBUSS && this.form.FBGBUSS!==''){
|
||||
// 历史版本不为空
|
||||
if(this.form.LSBBBUSS && this.form.LSBBBUSS !== ''){
|
||||
this.LSBBBUSS = this.form.FBGBUSS + ',' + this.form.LSBBBUSS
|
||||
this.LSBBBUSSName = this.form.FBGBUSSName + ',' + this.form.LSBBBUSSName
|
||||
}else{
|
||||
// 历史版本为空
|
||||
this.LSBBBUSS = this.form.FBGBUSS
|
||||
this.LSBBBUSSName = this.form.FBGBUSSName
|
||||
}
|
||||
}else{
|
||||
// 发布稿为空
|
||||
// 历史版本不为空
|
||||
if(this.form.LSBBBUSS && this.form.LSBBBUSS !== ''){
|
||||
this.LSBBBUSS = this.form.LSBBBUSS
|
||||
this.LSBBBUSSName = this.form.LSBBBUSSName
|
||||
}else{
|
||||
// 都为空
|
||||
this.LSBBBUSS = ''
|
||||
this.LSBBBUSSName = ''
|
||||
}
|
||||
}
|
||||
this.$forceUpdate()
|
||||
}
|
||||
// 遍历对象初始化文件信息
|
||||
@@ -2595,20 +2618,19 @@
|
||||
}
|
||||
// this.$emit('input', textArr.join(','))
|
||||
|
||||
// 修订 时 手动查找代替企标编号 发布稿放到历史版本
|
||||
if(this.replaceLawType === 'DTQBBHBUSS' && this.form.standStatus === '2' && this.selectedListRep.length){
|
||||
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
|
||||
},'')
|
||||
try{
|
||||
// 修订、修改 时 手动查找代替企标编号 发布稿放到历史版本
|
||||
if(this.replaceLawType === 'DTQBBHBUSS' && (this.form.standStatus === '2' || this.form.standStatus === '3') && this.selectedListRep.length > 0){
|
||||
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
|
||||
},'')
|
||||
selectByIdAtt(ids).then(res =>{
|
||||
if (res && res.data && res.data.length && res.data[0].fbgbuss !== '') {
|
||||
if (res && res.data && res.data.fbgbuss !== '') {
|
||||
this.form.LSBBBUSSName = res.data.reduce((init,item,index,arr)=>{
|
||||
if(index === 0){
|
||||
init = item.fbgbussNmae
|
||||
@@ -2625,16 +2647,15 @@
|
||||
}
|
||||
return init
|
||||
},'')
|
||||
}else if(res && res.data && res.data.length === 0){
|
||||
this.form.LSBBBUSS = ''
|
||||
this.form.LSBBBUSSName = ''
|
||||
// 带入的历史版本 与 选择的代替企标编号中的历史版本合并
|
||||
if(this.LSBBBUSS && this.LSBBBUSS !== ''){
|
||||
this.form.LSBBBUSS = this.LSBBBUSS + ',' + this.form.LSBBBUSS
|
||||
this.form.LSBBBUSSName = this.LSBBBUSSName + ',' + this.form.LSBBBUSSName
|
||||
}
|
||||
this.LSBBBUSSFileList = this.assemble(this.form.LSBBBUSS, this.form.LSBBBUSSName);
|
||||
}
|
||||
this.LSBBBUSSFileList = this.assemble(this.form.LSBBBUSS, this.form.LSBBBUSSName);
|
||||
})
|
||||
}catch(e){
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
|
||||
this.$refs.selections.clearSelection()
|
||||
},
|
||||
|
||||
@@ -2851,7 +2851,7 @@
|
||||
return init
|
||||
},'')
|
||||
// 带入的历史版本即选择的代替企标编号中的历史版本合并
|
||||
if(this.LSBBBUSS !== ''){
|
||||
if(this.LSBBBUSS && this.LSBBBUSS !== ''){
|
||||
this.form.LSBBBUSS = this.LSBBBUSS + ',' + this.form.LSBBBUSS
|
||||
this.form.LSBBBUSSName = this.LSBBBUSSName + ',' + this.form.LSBBBUSSName
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user