|
|
@@ -102,13 +102,9 @@
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
<a-form-item label="营业执照">
|
|
|
- <div class="upload">
|
|
|
- <a-upload action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
|
|
|
- :transform-file="transformFile">
|
|
|
- <a-button class="uploadBtn">上传</a-button>
|
|
|
- </a-upload>
|
|
|
- <div class="look">查看附件</div>
|
|
|
- </div>
|
|
|
+ <UploadImg :visible="visible"
|
|
|
+ :imgList="attachmentImgList"
|
|
|
+ @upload="attachmentUpload" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
@@ -170,13 +166,9 @@
|
|
|
<a-col :span="12">
|
|
|
<a-form-item label="身份证正面照"
|
|
|
name="cardbackphotourl">
|
|
|
- <div class="upload">
|
|
|
- <a-upload action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
|
|
|
- :transform-file="transformFile">
|
|
|
- <a-button class="uploadBtn">上传</a-button>
|
|
|
- </a-upload>
|
|
|
- <div class="look">查看附件</div>
|
|
|
- </div>
|
|
|
+ <UploadImg :visible="visible"
|
|
|
+ :imgList="cardfrontImgList"
|
|
|
+ @upload="cardfrontUpload" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
@@ -191,13 +183,9 @@
|
|
|
<a-col :span="24">
|
|
|
<a-form-item label="身份证反面照"
|
|
|
name="cardfrontphotourl">
|
|
|
- <div class="upload">
|
|
|
- <a-upload action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
|
|
|
- :transform-file="transformFile">
|
|
|
- <a-button class="uploadBtn">上传</a-button>
|
|
|
- </a-upload>
|
|
|
- <div class="look">查看附件</div>
|
|
|
- </div>
|
|
|
+ <UploadImg :visible="visible"
|
|
|
+ :imgList="cardbackImgList"
|
|
|
+ @upload="cardbackUpload" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
@@ -288,10 +276,12 @@ import { QueryModifyUserInfoApply } from '@/services/go/ermcp/customInfo';
|
|
|
import { mergeTwoObj } from '@/utils/objHandle';
|
|
|
import { validateAction } from '@/common/setup/form';
|
|
|
import { delAddress } from '@/services/socket/address';
|
|
|
+import UploadImg from '@/common/components/uploadImg/index.vue';
|
|
|
+import { getUploadImg } from '@/common/setup/upload';
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'modify-custom',
|
|
|
- components: {},
|
|
|
+ components: { UploadImg },
|
|
|
props: {
|
|
|
selectedRow: {
|
|
|
default: initFormState,
|
|
|
@@ -307,6 +297,12 @@ export default defineComponent({
|
|
|
const { formRef, formState, rules } = handleForm();
|
|
|
// 地址
|
|
|
const { cityList, districtList, provinceList, getCityList, getDistrictList } = getAddress();
|
|
|
+ // 营业执照
|
|
|
+ const { uploadImgAction: attachmentUpload, uploadImgList: attachmentImgList, handleImg: attachmentHandle } = getUploadImg();
|
|
|
+ // 背面证件照地址
|
|
|
+ const { uploadImgAction: cardbackUpload, uploadImgList: cardbackImgList, handleImg: cardbackHandle } = getUploadImg();
|
|
|
+ // 正面证件照地址
|
|
|
+ const { uploadImgAction: cardfrontUpload, uploadImgList: cardfrontImgList, handleImg: cardfrontHandle } = getUploadImg();
|
|
|
|
|
|
function isPersonal(): boolean {
|
|
|
return formState.userinfotype === '1';
|
|
|
@@ -319,14 +315,26 @@ export default defineComponent({
|
|
|
userid.value = props.selectedRow.userid;
|
|
|
countryid.value = props.selectedRow.countryid;
|
|
|
mergeTwoObj(formState, props.selectedRow);
|
|
|
- if(isPersonal()) {
|
|
|
- formState.username = props.selectedRow.customername
|
|
|
+ if (isPersonal()) {
|
|
|
+ formState.username = props.selectedRow.customername;
|
|
|
}
|
|
|
- const { provinceid, cityid, address, mobile } = props.selectedRow;
|
|
|
- formState.cardaddress = address
|
|
|
- formState.mobilephone = mobile
|
|
|
+ const { provinceid, cityid, address, mobile, attachment1, cardfrontphotourl, cardbackphotourl } = props.selectedRow;
|
|
|
+ formState.cardaddress = address;
|
|
|
+ formState.mobilephone = mobile;
|
|
|
provinceid ? getCityList(provinceid) : (formState.provinceid = undefined);
|
|
|
cityid ? getDistrictList(cityid) : ((formState.cityid = undefined), (formState.districtid = undefined));
|
|
|
+ if (attachment1) {
|
|
|
+ // 营业执照
|
|
|
+ attachmentImgList.value = attachmentHandle(attachment1);
|
|
|
+ }
|
|
|
+ if (cardbackphotourl) {
|
|
|
+ // 背面证件照地址
|
|
|
+ cardbackImgList.value = cardbackHandle(cardbackphotourl);
|
|
|
+ }
|
|
|
+ if (cardbackphotourl) {
|
|
|
+ // 正面证件照地址
|
|
|
+ cardfrontImgList.value = cardfrontHandle(cardbackphotourl);
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
function submit(OperateType: 1 | 2) {
|
|
|
@@ -376,6 +384,12 @@ export default defineComponent({
|
|
|
provinceList,
|
|
|
getCityList,
|
|
|
getDistrictList,
|
|
|
+ attachmentUpload,
|
|
|
+ attachmentImgList,
|
|
|
+ cardbackUpload,
|
|
|
+ cardbackImgList,
|
|
|
+ cardfrontUpload,
|
|
|
+ cardfrontImgList,
|
|
|
};
|
|
|
},
|
|
|
});
|