|
|
@@ -42,13 +42,12 @@
|
|
|
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="资质文件">
|
|
|
- <el-upload action="" ref="refuploadattach"
|
|
|
- :http-request="uploadrequest" class="attach-uploader" >
|
|
|
+ <el-upload action=""
|
|
|
+ :manufacturerlist="manufacturerList"
|
|
|
+ ref="refuploadattach"
|
|
|
+ :http-request="uploadrequest"
|
|
|
+ class="attach-uploader">
|
|
|
<i class="el-icon-plus attach-uploader-icon"></i>
|
|
|
- <div slot="tip" class="el-upload__tip" v-if="ManufacturerForm.NeedFileType !=yasuoname">请上传图片(大小为512KB-5MB),可上传多张图片
|
|
|
- </div>
|
|
|
- <div slot="tip" class="el-upload__tip" v-if="ManufacturerForm.NeedFileType ==yasuoname">请上传压缩文件
|
|
|
- </div>
|
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -72,10 +71,13 @@
|
|
|
export default {
|
|
|
name: 'ManufacturerList',
|
|
|
props: {
|
|
|
-
|
|
|
canadd: {
|
|
|
type: Boolean,
|
|
|
default: false
|
|
|
+ },
|
|
|
+ visible: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
|
@@ -87,10 +89,8 @@
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
- visible: false,
|
|
|
- yasuoname: '',
|
|
|
+ // visible: false,
|
|
|
SupplierCertId: '0',
|
|
|
- status: '0',
|
|
|
manufacturerList: [],
|
|
|
manufacturer:[],
|
|
|
Title: '',
|
|
|
@@ -110,12 +110,11 @@
|
|
|
message: '请输入代理商名称',
|
|
|
trigger: 'change'
|
|
|
}]
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+
|
|
|
getvalue (certId ) {
|
|
|
this.SupplierCertId = certId
|
|
|
this.initData()
|
|
|
@@ -140,6 +139,10 @@
|
|
|
savedata () {
|
|
|
this.$refs['refPerformance'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
+ if (!this.ManufacturerForm.FileUrl) {
|
|
|
+ this.$message.error('有附件未成功上传!不能保存数据')
|
|
|
+ return false;
|
|
|
+ }
|
|
|
if (!this.ManufacturerForm.Id) {
|
|
|
this.addManufacturer()
|
|
|
} else {
|
|
|
@@ -238,11 +241,6 @@
|
|
|
option.action = `http://${res.data.publicUrl}/${res.data.fid}`
|
|
|
}
|
|
|
_this.ManufacturerForm.FileUrl = res.data.publicUrl + '/' + res.data.fid
|
|
|
- /*_this.waituploads.push({
|
|
|
- uid: option.file.uid,
|
|
|
- url: res.data.publicUrl,
|
|
|
- fid: res.data.fid
|
|
|
- })*/
|
|
|
uploadajax(option)
|
|
|
} else {
|
|
|
_this.$message({
|
|
|
@@ -251,28 +249,11 @@
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
- .catch(function (error) {
|
|
|
- debugger
|
|
|
- _this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: '未上传成功!请重新上传!'
|
|
|
- })
|
|
|
- })
|
|
|
}
|
|
|
},
|
|
|
|
|
|
-
|
|
|
- getDictOptions () {
|
|
|
- api.getDictList(this.$axios).then(res => {
|
|
|
- this.yasuoname = res.data.items['YaSuoName']
|
|
|
- }).catch(err => {
|
|
|
- console.error(err)
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
showDialog () {
|
|
|
this.Title = '代理制造商'
|
|
|
- console.log(this.SupplierCertId,222222)
|
|
|
this.ManufacturerForm.SupplierCertId=this.SupplierCertId
|
|
|
this.ManufacturerForm.Id = 0
|
|
|
this.ManufacturerForm.AgentName=''
|
|
|
@@ -287,9 +268,7 @@
|
|
|
this.ManufacturerForm.Remark = val.Remark
|
|
|
this.visible = true
|
|
|
},
|
|
|
- seachdata () {
|
|
|
- this.initData()
|
|
|
- },
|
|
|
+
|
|
|
handleSizeChange (value) {
|
|
|
this.size = value
|
|
|
this.currentPage = 1
|
|
|
@@ -299,19 +278,6 @@
|
|
|
this.currentPage = value
|
|
|
this.initData()
|
|
|
},
|
|
|
-
|
|
|
- jstimehandle (val) {
|
|
|
- if (val === '') {
|
|
|
- return '----'
|
|
|
- } else if (val === '0001-01-01T08:00:00+08:00') {
|
|
|
- return '----'
|
|
|
- } else if (val === '5000-01-01T23:59:59+08:00') {
|
|
|
- return '永久'
|
|
|
- } else {
|
|
|
- val = val.replace('T', ' ')
|
|
|
- return val.substring(0, 10)
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
</script>
|