Commit 4226821c authored by qinj's avatar qinj

附件bug修复

parent 2ad90cb8
......@@ -8,6 +8,7 @@
:model="formData"
status-icon
ref="formData"
v-loading="btnloading"
:rules="supplierBaseRules"
label-position="right">
<el-row class="border-bottom">
......@@ -264,6 +265,7 @@
class="padding-bottom">
<el-form-item label="营业执照:"
prop="file"
:show-message='false'
label-width="100px"
class="filter-icon-none">
<el-upload :on-change="handleChange"
......@@ -357,9 +359,9 @@ export default {
cityOptions: [],
disOptions: [],
supplierBaseRules: {
extSocialUnifiedCreditCode_SDK: [{ required: true, message: '请输入统一社会信用代码', trigger: 'blur' }],
extRegisteredCapital_SDK: [{ required: true, message: '请输入注册资本(万元)', trigger: 'blur' }],
extCorporateName_SDK: [{ required: true, message: '请输入法人', trigger: 'blur' }],
extSocialUnifiedCreditCode_SDK: [{ required: true, message: '请输入统一社会信用代码' }],
extRegisteredCapital_SDK: [{ required: true, message: '请输入注册资本(万元)' }],
extCorporateName_SDK: [{ required: true, message: '请输入法人' }],
extProvince_SDK: [{ required: true, message: '请选择省份' }],
extCity_SDK: [{ required: true, message: '请选择市' }],
extDistrict_SDK: [{ required: true, message: '请选择区' }],
......@@ -399,11 +401,11 @@ export default {
getList() {
this.page.searchKey = this.formInline.Name
this.$request(Qcc.searchUrl, this.page).then((resp) => {
if(resp.results.Result){
if (resp.results.Result) {
this.tableData = resp.results.Result
this.page = resp.results.Paging
this.TotalRecords = resp.results.Paging.TotalRecords
}else{
} else {
this.$message.warning('无相关公司!')
}
......@@ -460,17 +462,12 @@ export default {
})
},
handleApprove() {
this.$refs.formData.validate((valid) => {
if (valid) {
// this.aOptions.forEach(el=>{
// this.formData.ExtProvinceName_SDK=el[this.formData.extProvince_SDK]
// })
// this.bOptions.forEach(el=>{
// this.formData.extCityName_SDK=el[this.formData.extCity_SDK]
// })
// this.cOptions.forEach(el=>{
// this.formData.extDistrictName_SDK=el[this.formData.extDistrict_SDK]
// })
if (this.formData.file == null || this.formData.file == '' || this.formData.file == []) {
return this.$message.warning('请上传附件')
}
this.formData.extCustomerType_SDK = 111
this.btnloading = true
this.$request(Customer.searchUrl, this.paramsToFormData(this.formData)).then((resp) => {
......@@ -486,7 +483,7 @@ export default {
})
} else {
this.btnloading = false
this.$message.warning('请输入必填信息!')
this.$message.warning('请上传附件,输入必填信息!')
}
});
......@@ -525,7 +522,7 @@ export default {
},
handleChange(file, fileList) {
this.formData.file = file.raw
this.supplierBaseRules.file=[]
this.supplierBaseRules.file = []
},
handleRemoveFile(res, file) {
this.supplierBaseRules.file = [{ required: true, message: '请上传附件', trigger: ['blur', 'change'] }]
......
......@@ -168,8 +168,12 @@ export default {
},
handleAdd() {
this.dialogTitle = '创建附件'
this.formData = {}
// this.formData = {}
this.fileList = []
console.log('dddd',this.$refs.eleTable)
if(this.$refs.eleTable.tableData.length>=1){
return this.$message.warning('只能上传一个附件,请删除后再上传!')
}
this.dialogFormVisible = true
},
handleEdit(row, index) {
......@@ -209,6 +213,7 @@ export default {
this.$route.query.objectID || this.tableConfig.initialParams.objectID
console.log(businessObjectID)
formData.append('businessObjectID', businessObjectID)
// formData.append('typeCode',this.typeCode)
formData.delete('objectID')
this.loading = true
this.$request(file.createUrl, formData).then(() => {
......@@ -236,6 +241,10 @@ export default {
}
},
handleSelectionChange(selection) {
if (selection.length > 1) {
const del_row = selection.shift()
this.$refs.eleTable.toggleRowSelection(del_row, false)
}
this.current = selection.length > 0 ? selection[0] : null
},
handleDelete() {
......
......@@ -171,7 +171,7 @@
</template>
</ele-form-section>
<div class="table-contain">
<PersonalInFo :addBtnStart='false' :dedeleBtnStart="false" :type-code="typeCode"/>
<PersonalInFo :addBtnStart='!formData.ExtProcessNode_SDK==1' :isShowEditBtn='formData.ExtProcessNode_SDK==1' :dedeleBtnStart="!formData.ExtProcessNode_SDK==1" :type-code="typeCode"/>
</div>
<div class="table-contain">
<div class="form-container">审批意见</div>
......@@ -417,6 +417,7 @@ export default {
],
tableData: [],
tableData2: [],
isShowEditBtn:false,
btnloading: false,
aOptions: [],
bOptions: [],
......
......@@ -364,6 +364,7 @@
class="padding-bottom">
<el-form-item label="营业执照:"
prop="file"
:show-message='false'
label-width="100px"
class="filter-icon-none">
<el-upload ref="uploadExcel"
......@@ -616,15 +617,9 @@ export default {
handleApprove() {
this.$refs.formData.validate((valid) => {
if (valid) {
// this.aOptions.forEach(el=>{
// this.formData.ExtProvinceName_SDK=el[this.formData.extProvince_SDK]
// })
// this.bOptions.forEach(el=>{
// this.formData.extCityName_SDK=el[this.formData.extCity_SDK]
// })
// this.cOptions.forEach(el=>{
// this.formData.extDistrictName_SDK=el[this.formData.extDistrict_SDK]
// })
if (this.formData.file == null || this.formData.file == '' || this.formData.file == []) {
return this.$message.warning('请上传附件')
}
this.formData.extCustomerType_SDK = 101
const ExtProductGroup_KUT = this.formData.extProductGroup_KUT.toString()
const ExtProductGroup_SDK = this.formData.extProductGroup_SDK.toString()
......@@ -649,7 +644,7 @@ export default {
})
} else {
this.btnloading = false
this.$message.warning('请输入必填信息!')
this.$message.warning('请上传附件,输入必填信息!')
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment