|
|
@@ -425,6 +425,40 @@
|
|
|
</el-row>
|
|
|
</div>
|
|
|
<el-divider content-position="left">店铺配置信息</el-divider>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="网销报告" prop="reportUrl">
|
|
|
+ <el-upload
|
|
|
+ class="upload-demo"
|
|
|
+ :action="uploadUrl"
|
|
|
+ :on-preview="handlePreview"
|
|
|
+ :on-remove="handleRemove"
|
|
|
+ :before-remove="beforeRemove"
|
|
|
+ multiple
|
|
|
+ :limit="1"
|
|
|
+ :on-exceed="handleExceed"
|
|
|
+ :on-success="(response, file) => handleFileSuccess(response, file, 'reportUrl')"
|
|
|
+ :file-list="reportFileList">
|
|
|
+ <el-button size="small" type="primary">点击上传</el-button>
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="备案" prop="filingUrl">
|
|
|
+ <el-upload
|
|
|
+ class="upload-demo"
|
|
|
+ :action="uploadUrl"
|
|
|
+ :on-preview="handlePreview"
|
|
|
+ :on-remove="handleRemove"
|
|
|
+ :before-remove="beforeRemove"
|
|
|
+ :on-success="(response, file) => handleFileSuccess(response, file, 'filingUrl')"
|
|
|
+ multiple
|
|
|
+ :limit="1"
|
|
|
+ :on-exceed="handleExceed"
|
|
|
+ :file-list="fileList">
|
|
|
+ <el-button size="small" type="primary">点击上传</el-button>
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
<el-form-item label="退货地址" prop="refundAddress">
|
|
|
<el-input v-model="form.refundAddress" placeholder="请输入退货地址"/>
|
|
|
</el-form-item>
|
|
|
@@ -517,6 +551,8 @@ import { getStoreInfo, businessLicenseCheck} from '@/api/hisStore/store'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ reportFileList:[],
|
|
|
+ fileList:[],
|
|
|
previewImageUrl: '', // 添加预览图片URL
|
|
|
imagePreviewVisible: false,// 添加图片预览对话框可见性控制
|
|
|
switchMedicalValue: false,
|
|
|
@@ -983,6 +1019,8 @@ export default {
|
|
|
this.form.otherSpecialQualificationEnd
|
|
|
]);
|
|
|
}
|
|
|
+ this.reportFileList = this.urlToFileList(this.form.reportUrl);
|
|
|
+ this.fileList = this.urlToFileList(this.form.filingUrl);
|
|
|
})
|
|
|
},
|
|
|
//长期有效营业执照选择
|
|
|
@@ -1026,7 +1064,32 @@ export default {
|
|
|
this.isDeleting = false; // 无论操作结果,恢复上传组件可用
|
|
|
this.$forceUpdate(); // 强制刷新确保状态同步
|
|
|
});
|
|
|
- }
|
|
|
+ },
|
|
|
+ handleRemove(file, fileList) {
|
|
|
+ console.log(file, fileList);
|
|
|
+ },
|
|
|
+ handlePreview(file) {
|
|
|
+ console.log(file);
|
|
|
+ },
|
|
|
+ handleExceed(files, fileList) {
|
|
|
+ this.$message.warning(`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
|
|
|
+ },
|
|
|
+ beforeRemove(file, fileList) {
|
|
|
+ return this.$confirm(`确定移除 ${ file.name }?`);
|
|
|
+ },
|
|
|
+ // 将逗号分隔的URL字符串转换为文件对象数组
|
|
|
+ urlToFileList(urlStr) {
|
|
|
+ if (!urlStr) return [];
|
|
|
+ return urlStr.split(',').map(url => {
|
|
|
+ const fileName = url.substring(url.lastIndexOf('/') + 1);
|
|
|
+ return {
|
|
|
+ name: fileName,
|
|
|
+ url: url,
|
|
|
+ uid: Date.now() + Math.random().toString(36).substr(2, 9) // 生成唯一ID
|
|
|
+ };
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
</script>
|