|
|
@ -286,11 +286,36 @@ |
|
|
|
</el-form-item> |
|
|
|
<br/> |
|
|
|
|
|
|
|
<el-form-item label="合同附件" prop="fileList" label-width="140px"> |
|
|
|
<el-form-item label="合同照片" prop="fileList" label-width="140px"> |
|
|
|
<template> |
|
|
|
<upload-image :defaultFileList="dataForm.fileList" :limit="6" @change="onChangeFileList"></upload-image> |
|
|
|
</template> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="合同附件" label-width="140px"> |
|
|
|
<template> |
|
|
|
<el-upload |
|
|
|
class="upload-demo" |
|
|
|
multiple |
|
|
|
:action="uploadUrl" |
|
|
|
:data="{ customerId: customerId }" |
|
|
|
:limit="limit" |
|
|
|
:headers="$getElUploadHeaders()" |
|
|
|
:on-success="(res, file) => handleFlieSuccess(res, file)" |
|
|
|
:on-error="(res, file) => handleFlieError(res, file)" |
|
|
|
:on-remove="(res) => handleFlieRemove(res)" |
|
|
|
:on-exceed="(res) => handleFlieExceed(res)" |
|
|
|
:before-upload="(file) => beforeFlieUpload(file)" |
|
|
|
:on-preview="handlePreview" |
|
|
|
:file-list="dataForm.docList"> |
|
|
|
<el-button size="small" type="primary">点击上传</el-button> |
|
|
|
<div slot="tip" class="el-upload__tip">只能上传合同文件</div> |
|
|
|
</el-upload> |
|
|
|
</template> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-form> |
|
|
|
<template slot="footer"> |
|
|
|
<div class="resi-btns"> |
|
|
@ -355,7 +380,8 @@ export default { |
|
|
|
idCardImgList: [], |
|
|
|
unit: '' |
|
|
|
}], |
|
|
|
fileList: [] |
|
|
|
fileList: [], |
|
|
|
docList: [] |
|
|
|
}, |
|
|
|
zzmmOptions: [ |
|
|
|
{ name: '党员', value: '党员' }, |
|
|
@ -391,7 +417,10 @@ export default { |
|
|
|
buildingOptions: [], |
|
|
|
unitOptions: [], |
|
|
|
houseOptions: [], |
|
|
|
agencyOptions: [] |
|
|
|
agencyOptions: [], |
|
|
|
uploadUrl: `${window.SITE_CONFIG['apiURL']}/oss/file/uploadqrcodeV2`, |
|
|
|
customerId: localStorage.getItem("customerId"), |
|
|
|
limit: 3 |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
@ -537,6 +566,7 @@ export default { |
|
|
|
unit: '' |
|
|
|
}], |
|
|
|
fileList: [], |
|
|
|
docList: [], |
|
|
|
agencyImgList: [] |
|
|
|
} |
|
|
|
}, |
|
|
@ -866,6 +896,43 @@ export default { |
|
|
|
this.editModeGetList() |
|
|
|
}).catch(() => {}) |
|
|
|
}, |
|
|
|
handleFlieSuccess(res, file) { |
|
|
|
if (res.code === 0 && res.msg === "success") { |
|
|
|
let ob = { |
|
|
|
fileType: '0', |
|
|
|
fileUrl: file.response.data.url, |
|
|
|
name: file.response.data.fileName |
|
|
|
} |
|
|
|
this.dataForm.docList.push(ob) |
|
|
|
} else { |
|
|
|
this.$message.error(res.msg) |
|
|
|
} |
|
|
|
}, |
|
|
|
handleFlieError(res, file) { |
|
|
|
console.log(res) |
|
|
|
}, |
|
|
|
handleFlieRemove(res) { |
|
|
|
// console.log(JSON.stringify(res)) |
|
|
|
const delFile = res.fileUrl |
|
|
|
this.dataForm.docList.forEach((item, key) => { |
|
|
|
if (delFile == item.fileUrl) { |
|
|
|
this.dataForm.docList.splice(key, 1) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
handleFlieExceed(res) { |
|
|
|
this.$message({ |
|
|
|
type: "warning", |
|
|
|
message: `文件数量最多不超过${this.limit}个`, |
|
|
|
}) |
|
|
|
}, |
|
|
|
beforeFlieUpload(file) { |
|
|
|
console.log(file) |
|
|
|
}, |
|
|
|
handlePreview(file) { |
|
|
|
window.open(file.fileUrl) |
|
|
|
// console.log(JSON.stringify(file)); |
|
|
|
}, |
|
|
|
// 表单提交 |
|
|
|
dataFormSubmitHandle: debounce(function () { |
|
|
|
this.$refs['dataForm'].validate((valid) => { |
|
|
@ -932,7 +999,9 @@ export default { |
|
|
|
} |
|
|
|
</style> |
|
|
|
<style lang="scss" scoped> |
|
|
|
|
|
|
|
::v-deep .el-upload-list__item.is-success.focusing .el-icon-close-tip { |
|
|
|
display: none !important; |
|
|
|
} |
|
|
|
.div_btn { |
|
|
|
display: flex; |
|
|
|
justify-content: flex-end; |
|
|
|