|
@@ -174,7 +174,7 @@
|
|
|
v-if="brandData.statementType === 4"
|
|
|
ref="uploadFileRef"
|
|
|
:auth-user-id="addFromData.authUserId"
|
|
|
- :brand-id="brandData.brandId"
|
|
|
+ :brand-id="brandId"
|
|
|
:file-list="fileList3"
|
|
|
@success="fileUploadSuccess"
|
|
|
@error="fileUploadFaild"
|
|
@@ -224,6 +224,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
return {
|
|
|
+ brandId: '', // 上传文件时的品牌id
|
|
|
supplierId: '',
|
|
|
dialogLoading: false,
|
|
|
isLoading: false,
|
|
@@ -493,9 +494,16 @@ export default {
|
|
|
if (selectBrand.authLogo) {
|
|
|
this.fileList1 = [{ name: '文件已上传', url: selectBrand.authLogo }]
|
|
|
}
|
|
|
+ console.log(selectBrand.id)
|
|
|
+ this.brandId = selectBrand.id
|
|
|
},
|
|
|
// 添加品牌对话框开启
|
|
|
handleShowDialog() {
|
|
|
+ try {
|
|
|
+ this.$refs.brandDataRef.clearValidate()
|
|
|
+ } catch (error) {
|
|
|
+ console.log('清空')
|
|
|
+ }
|
|
|
this.showDialog = true
|
|
|
},
|
|
|
// 添加品牌
|
|
@@ -503,16 +511,9 @@ export default {
|
|
|
// 如果声明类型为文件
|
|
|
if (this.brandData.statementType === 4 && (this.brandData.statementFileId === null || this.brandData.statementFileId === '')) {
|
|
|
this.brandData.statementFileId = this.brandData.statementFileId === null ? '' : null
|
|
|
+ console.log(this.brandId)
|
|
|
this.$refs.uploadFileRef.$refs.upload.submit()
|
|
|
- // if (this.brandData.isNew) {
|
|
|
- // this.addFromData.authUserId = -1
|
|
|
- // this.$refs.uploadFileRef.$refs.upload.submit()
|
|
|
- // } else {
|
|
|
- // this.addFromData.authUserId = this.supplierId
|
|
|
- // this.$refs.uploadFileRef.$refs.upload.submit()
|
|
|
- // }
|
|
|
} else {
|
|
|
- // this.addFromData.authUserId = this.supplierId
|
|
|
this.saveBrand()
|
|
|
}
|
|
|
},
|
|
@@ -534,6 +535,7 @@ export default {
|
|
|
this.prevBrandId = -1
|
|
|
console.log('添加:' + this.excludeBrand)
|
|
|
}
|
|
|
+ this.brandData.brandId = ''
|
|
|
this.showDialog = false
|
|
|
}
|
|
|
})
|
|
@@ -559,6 +561,8 @@ export default {
|
|
|
const name = this.brandData.statementFileName || '文件已上传'
|
|
|
this.fileList3 = [{ name: name, url: '' }]
|
|
|
}
|
|
|
+ console.log(this.brandListCody)
|
|
|
+ this.brandId = this.supplierBrands[index].brandId
|
|
|
this.showDialog = true
|
|
|
},
|
|
|
// 删除
|
|
@@ -575,6 +579,8 @@ export default {
|
|
|
this.fileList1 = []
|
|
|
this.fileList2 = []
|
|
|
this.fileList3 = []
|
|
|
+ this.brandData.brandId = ''
|
|
|
+ this.brandData.statementFileId = ''
|
|
|
this.brandData.isNew = true
|
|
|
// 如果部位-1 代表没有保存 则恢复到上一次的排除结果
|
|
|
if (this.prevBrandId !== -1) {
|