|
@@ -51,7 +51,8 @@
|
|
|
:placeholder="$t('huifuMch.beginDatePlaceholder')" @click="showBeginDateLicense = true"
|
|
|
:rules="[{ required: true, message: $t('huifuMch.beginDatePlaceholder') }]" />
|
|
|
<van-field v-if="licenseValidityType == 0" v-model="endDateLicense" readonly name="endDateLicense"
|
|
|
- :label="$t('huifuMch.endDate')" :placeholder="$t('huifuMch.endDatePlaceholder')" @click="showEndDateLicense = true"
|
|
|
+ :label="$t('huifuMch.endDate')" :placeholder="$t('huifuMch.endDatePlaceholder')"
|
|
|
+ @click="showEndDateLicense = true"
|
|
|
:rules="[{ required: true, message: $t('huifuMch.endDatePlaceholder') }]" />
|
|
|
</div>
|
|
|
<div class="huifuBox">
|
|
@@ -100,8 +101,8 @@
|
|
|
<van-field v-if="cardType == 0" v-model="openLicenceNo" name="openLicenceNo"
|
|
|
:label="$t('huifuMch.openLicenceNo')" :placeholder="$t('huifuMch.openLicenceNoPlaceholder')"
|
|
|
:rules="[{ required: true, message: $t('huifuMch.openLicenceNoPlaceholder') }]" />
|
|
|
- <van-field v-if="cardType == '1'" v-model="bankAddress" is-link readonly name="bankAddress" :label="$t('huifuMch.huifuBankAddress')"
|
|
|
- :placeholder="$t('huifuMch.huifuBankAddressPlaceholder')"
|
|
|
+ <van-field v-if="cardType == '1'" v-model="bankAddress" is-link readonly name="bankAddress"
|
|
|
+ :label="$t('huifuMch.huifuBankAddress')" :placeholder="$t('huifuMch.huifuBankAddressPlaceholder')"
|
|
|
:rules="[{ required: true, message: $t('huifuMch.huifuBankAddressPlaceholder') }]"
|
|
|
@click="showBankAddress = true" />
|
|
|
<van-field v-model="certNo" name="certNo" :label="$t('huifuMch.huifuCertNo')"
|
|
@@ -169,17 +170,17 @@
|
|
|
<div class="upLoad flex-col" v-if="showStatus == '0'">
|
|
|
<van-cell title="身份证" size="large" icon="contact" />
|
|
|
<div class="uploader-container">
|
|
|
- <van-uploader v-model="certBackPic" accept=".jpg,.jpeg,.png" :preview-size="[320, 180]"
|
|
|
+ <van-uploader v-model="certFrontPic" accept=".jpg,.png" :preview-size="[320, 180]"
|
|
|
style="display: block; padding: 0.5em 1em;" :max-size="2 * 1024 * 1024" @oversize="onOversize"
|
|
|
- :after-read="upCertBackPic" upload-text="点击上传身份证正面照片" capture="camera" image-fit="contain" :max-count="1" />
|
|
|
- <van-uploader v-model="certFrontPic" accept=".jpg,.jpeg,.png" :preview-size="[320, 180]"
|
|
|
+ :after-read="upCertFrontPic" upload-text="点击上传身份证正面照片" capture="camera" image-fit="contain" :max-count="1" />
|
|
|
+ <van-uploader v-model="certBackPic" accept=".jpg,.png" :preview-size="[320, 180]"
|
|
|
style="display: block; padding: 0.5em 1em;" :max-size="2 * 1024 * 1024" @oversize="onOversize"
|
|
|
- :after-read="upCertFrontPic" upload-text="点击上传身份证背面照片" capture="camera" image-fit="contain" :max-count="1" />
|
|
|
+ :after-read="upCertBackPic" upload-text="点击上传身份证背面照片" capture="camera" image-fit="contain" :max-count="1" />
|
|
|
</div>
|
|
|
<div v-if="type == '1'">
|
|
|
<van-cell title="营业执照" size="large" icon="contact" />
|
|
|
<div class="uploader-container">
|
|
|
- <van-uploader v-model="licensePic" accept=".jpg,.jpeg,.png" :preview-size="[320, 180]"
|
|
|
+ <van-uploader v-model="licensePic" accept=".jpg,.png" :preview-size="[320, 180]"
|
|
|
style="display: block; padding: 0.5em 1em;" :max-size="2 * 1024 * 1024" @oversize="onOversize"
|
|
|
:after-read="upLicensePic" upload-text="点击上传营业执照" capture="camera" image-fit="contain" :max-count="1" />
|
|
|
</div>
|
|
@@ -187,7 +188,7 @@
|
|
|
<div v-if="cardType == '1'">
|
|
|
<van-cell title="结算卡" size="large" icon="debit-pay" />
|
|
|
<div class="uploader-container">
|
|
|
- <van-uploader v-model="cardFrontPic" accept=".jpg,.jpeg,.png" :preview-size="[320, 180]"
|
|
|
+ <van-uploader v-model="cardFrontPic" accept=".jpg,.png" :preview-size="[320, 180]"
|
|
|
style="display: block; padding: 0.5em 1em;" :max-size="2 * 1024 * 1024" @oversize="onOversize"
|
|
|
:after-read="upCardFrontPic" upload-text="点击上传结算卡正面照片" capture="camera" image-fit="contain" :max-count="1" />
|
|
|
</div>
|
|
@@ -195,7 +196,7 @@
|
|
|
<div v-if="cardType == '0'">
|
|
|
<van-cell title="开户许可证" size="large" icon="debit-pay" />
|
|
|
<div class="uploader-container">
|
|
|
- <van-uploader v-model="regAcctPic" accept=".jpg,.jpeg,.png" :preview-size="[320, 180]"
|
|
|
+ <van-uploader v-model="regAcctPic" accept=".jpg,.png" :preview-size="[320, 180]"
|
|
|
style="display: block; padding: 0.5em 1em;" :max-size="2 * 1024 * 1024" @oversize="onOversize"
|
|
|
:after-read="upRegAcctPic" upload-text="点击上传开户许可证照片" capture="camera" image-fit="contain" :max-count="1" />
|
|
|
</div>
|
|
@@ -214,8 +215,7 @@
|
|
|
<span class="custom-title">审核状态: </span>
|
|
|
<span v-if="showStatus == '1' || showStatus == '4'" class="custom-title" style="color: #FFA500;">审核中</span>
|
|
|
<span v-if="showStatus == '2'" class="custom-title" style="color: #00FF00;">审核通过</span>
|
|
|
- <span v-if="showStatus == '3'" class="custom-title" style="color: #FF0000;">审核失败</span>
|
|
|
- <!-- <div :style=statusColor value="审核中"></div> -->
|
|
|
+ <span v-if="showStatus == '3'" class="custom-title" style="color: #FF0000;">审核未通过</span>
|
|
|
</template>
|
|
|
</van-cell>
|
|
|
<div class="parent-container" v-if="huifuMchCheck.type == '0'">
|
|
@@ -243,12 +243,14 @@
|
|
|
<span>{{ $t('huifuMch.huifuContactEmail') }}:{{ huifuMchCheck.email }}</span>
|
|
|
<span>{{ $t('huifuMch.huifuBusinessAddress') }}:{{ huifuMchCheck.detailAddr }}</span>
|
|
|
<span>{{ $t('huifuMch.huifuServicePhone') }}:{{ huifuMchCheck.servicePhone }}</span>
|
|
|
- <span>{{ $t('huifuMch.cardType') }}:{{ huifuMchCheck.cardType == '1'? $t('huifuMch.personalAccount'):$t('huifuMch.corporateAccount') }}</span>
|
|
|
+ <span>{{ $t('huifuMch.cardType') }}:{{ huifuMchCheck.cardType == '1' ?
|
|
|
+ $t('huifuMch.personalAccount') : $t('huifuMch.corporateAccount') }}</span>
|
|
|
<span>{{ $t('huifuMch.huifuCardName') }}:{{ huifuMchCheck.cardName }}</span>
|
|
|
<span>{{ $t('huifuMch.huifuCardNo') }}:{{ huifuMchCheck.cardNo }}</span>
|
|
|
<span v-if="huifuMchCheck.cardType == '1'">{{ $t('huifuMch.huifuMp') }}:{{ huifuMchCheck.mp }}</span>
|
|
|
<span>{{ $t('huifuMch.huifuCertNo') }}:{{ huifuMchCheck.certNo }}</span>
|
|
|
- <span v-if="huifuMchCheck.cardType == '0'">{{ $t('huifuMch.openLicenceNo') }}:{{ huifuMchCheck.openLicenceNo }}</span>
|
|
|
+ <span v-if="huifuMchCheck.cardType == '0'">{{ $t('huifuMch.openLicenceNo') }}:{{ huifuMchCheck.openLicenceNo
|
|
|
+ }}</span>
|
|
|
<span v-if="huifuMchCheck.cardType == '0'">{{ $t('huifuMch.branchCode') }}:{{ huifuMchCheck.branchCode }}</span>
|
|
|
</div>
|
|
|
<van-row v-if="showStatus == '2' || showStatus == '3'" justify="space-around" style="padding: 3em;">
|
|
@@ -256,6 +258,11 @@
|
|
|
$t('huifuMch.update') }}
|
|
|
</van-button>
|
|
|
</van-row>
|
|
|
+ <van-row v-if="showStatus == '2' || showStatus == '3'" justify="space-around" style="padding: 1em;">
|
|
|
+ <van-button span="5" round type="primary" style="padding: 0 3em" native-type="sumbit" @click="upload">{{
|
|
|
+ $t('huifuMch.uploadPage') }}
|
|
|
+ </van-button>
|
|
|
+ </van-row>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -290,7 +297,7 @@ export default {
|
|
|
const beginDateLicense = ref(''); // 营业执照有效开始日期
|
|
|
const showBeginDateLicense = ref(false);
|
|
|
const endDateLicense = ref(''); // 营业执照有效截止日期
|
|
|
- const showEndDateLicense= ref(false);
|
|
|
+ const showEndDateLicense = ref(false);
|
|
|
const beginDate = ref(''); // 有效期开始日期
|
|
|
const showBeginDate = ref(false);
|
|
|
const endDate = ref(''); // 有效期截日期
|
|
@@ -338,24 +345,44 @@ export default {
|
|
|
certEndDate: '', // 有效期截止日期
|
|
|
});
|
|
|
// 上传身份证正面
|
|
|
- const upCertBackPic = async (file) => {
|
|
|
+ const upCertFrontPic = async (file) => {
|
|
|
file.status = 'uploading';
|
|
|
file.message = '上传中...';
|
|
|
- // 此时可以自行将文件上传至服务器
|
|
|
- // const fileObject = new File([file.content], file.file.name, { type: file.file.type });
|
|
|
const formData = new FormData();
|
|
|
formData.append('file', file.file, file.file.name);
|
|
|
formData.append('adminId', user.id);
|
|
|
- formData.append('fileType', "F03");
|
|
|
- console.log(formData.get("file"));
|
|
|
+ formData.append('fileType', "F40");
|
|
|
+ // console.log(formData.get("file"));
|
|
|
+ if (addParams.type === '1') {
|
|
|
+ formData.append('fileType', "F02");
|
|
|
+ }
|
|
|
try {
|
|
|
- const { data } = await uploadPic(formData);
|
|
|
- if (data.code == "00000") {
|
|
|
- console.log(data);
|
|
|
- file.status = 'done';
|
|
|
+ const { data } = await uploadPic(formData, {
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'multipart/form-data',
|
|
|
+ },
|
|
|
+ });
|
|
|
+ if (addParams.type === '1') {
|
|
|
+ const { data1 } = await uploadPic(formData, {
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'multipart/form-data',
|
|
|
+ },
|
|
|
+ });
|
|
|
+ if (data.code == "00000" && data1.code == "00000") {
|
|
|
+ console.log(data);
|
|
|
+ file.status = 'done';
|
|
|
+ } else {
|
|
|
+ file.status = 'failed';
|
|
|
+ file.message = '上传失败';
|
|
|
+ }
|
|
|
} else {
|
|
|
- file.status = 'failed';
|
|
|
- file.message = '上传失败';
|
|
|
+ if (data.code == "00000") {
|
|
|
+ console.log(data);
|
|
|
+ file.status = 'done';
|
|
|
+ } else {
|
|
|
+ file.status = 'failed';
|
|
|
+ file.message = '上传失败';
|
|
|
+ }
|
|
|
}
|
|
|
} catch {
|
|
|
file.status = 'failed';
|
|
@@ -363,7 +390,7 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
// 上传身份证背面
|
|
|
- const upCardFrontPic = async (file) => {
|
|
|
+ const upCertBackPic = async (file) => {
|
|
|
file.status = 'uploading';
|
|
|
file.message = '上传中...';
|
|
|
// 此时可以自行将文件上传至服务器
|
|
@@ -371,16 +398,38 @@ export default {
|
|
|
const formData = new FormData();
|
|
|
formData.append('file', file.file, file.file.name);
|
|
|
formData.append('adminId', user.id);
|
|
|
- formData.append('fileType', "F13");
|
|
|
+ formData.append('fileType', "F41");
|
|
|
+ if (addParams.type == '1') {
|
|
|
+ formData.append('fileType', "F03");
|
|
|
+ }
|
|
|
console.log(formData.get("file"));
|
|
|
try {
|
|
|
- const { data } = await uploadPic(formData);
|
|
|
- if (data.code == "00000") {
|
|
|
- console.log(data);
|
|
|
- file.status = 'done';
|
|
|
+ const { data } = await uploadPic(formData, {
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'multipart/form-data',
|
|
|
+ },
|
|
|
+ });
|
|
|
+ if (addParams.type == '1') {
|
|
|
+ const { data1 } = await uploadPic(formData, {
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'multipart/form-data',
|
|
|
+ },
|
|
|
+ });
|
|
|
+ if (data.code == "00000" && data1.code == "00000") {
|
|
|
+ console.log(data1);
|
|
|
+ file.status = 'done';
|
|
|
+ } else {
|
|
|
+ file.status = 'failed';
|
|
|
+ file.message = '上传失败';
|
|
|
+ }
|
|
|
} else {
|
|
|
- file.status = 'failed';
|
|
|
- file.message = '上传失败';
|
|
|
+ if (data.code == "00000") {
|
|
|
+ console.log(data);
|
|
|
+ file.status = 'done';
|
|
|
+ } else {
|
|
|
+ file.status = 'failed';
|
|
|
+ file.message = '上传失败';
|
|
|
+ }
|
|
|
}
|
|
|
} catch {
|
|
|
file.status = 'failed';
|
|
@@ -388,18 +437,18 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
// 上传结算卡正面
|
|
|
- const upCertFrontPic = async (file) => {
|
|
|
+ const upCardFrontPic = async (file) => {
|
|
|
file.status = 'uploading';
|
|
|
file.message = '上传中...';
|
|
|
// 此时可以自行将文件上传至服务器
|
|
|
- const fileObject = new File([file.content], file.file.name, { type: file.file.type });
|
|
|
const formData = new FormData();
|
|
|
- formData.append('file', fileObject);
|
|
|
+ formData.append('file', file.file, file.file.name);
|
|
|
formData.append('adminId', user.id);
|
|
|
- formData.append('fileType', "F02");
|
|
|
+ formData.append('fileType', "F13");
|
|
|
console.log(formData.get("file"));
|
|
|
try {
|
|
|
- const { data } = await uploadPic(formData);
|
|
|
+ const { data } = await uploadPic(formData, 'multipart/form-data'
|
|
|
+ );
|
|
|
if (data.code == "00000") {
|
|
|
console.log(data);
|
|
|
file.status = 'done';
|
|
@@ -417,14 +466,17 @@ export default {
|
|
|
file.status = 'uploading';
|
|
|
file.message = '上传中...';
|
|
|
// 此时可以自行将文件上传至服务器
|
|
|
- const fileObject = new File([file.content], file.file.name, { type: file.file.type });
|
|
|
const formData = new FormData();
|
|
|
- formData.append('file', fileObject);
|
|
|
+ formData.append('file', file.file, file.file.name);
|
|
|
formData.append('adminId', user.id);
|
|
|
formData.append('fileType', "F07");
|
|
|
console.log(formData.get("file"));
|
|
|
try {
|
|
|
- const { data } = await uploadPic(formData);
|
|
|
+ const { data } = await uploadPic(formData, {
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'multipart/form-data',
|
|
|
+ },
|
|
|
+ });
|
|
|
if (data.code == "00000") {
|
|
|
console.log(data);
|
|
|
file.status = 'done';
|
|
@@ -442,14 +494,20 @@ export default {
|
|
|
file.status = 'uploading';
|
|
|
file.message = '上传中...';
|
|
|
// 此时可以自行将文件上传至服务器
|
|
|
- const fileObject = new File([file.content], file.file.name, { type: file.file.type });
|
|
|
+ // const fileObject = new File([file.content], file.file.name, { type: file.file.type });
|
|
|
+ // const formData = new FormData();
|
|
|
+ // formData.append('file', fileObject);
|
|
|
const formData = new FormData();
|
|
|
- formData.append('file', fileObject);
|
|
|
+ formData.append('file', file.file, file.file.name);
|
|
|
formData.append('adminId', user.id);
|
|
|
formData.append('fileType', "F08");
|
|
|
console.log(formData.get("file"));
|
|
|
try {
|
|
|
- const { data } = await uploadPic(formData);
|
|
|
+ const { data } = await uploadPic(formData, {
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'multipart/form-data',
|
|
|
+ },
|
|
|
+ });
|
|
|
if (data.code == "00000") {
|
|
|
console.log(data);
|
|
|
file.status = 'done';
|
|
@@ -543,8 +601,8 @@ export default {
|
|
|
} else if (certFrontPic.value == null) {
|
|
|
Toast("请上传身份证背面照片");
|
|
|
return;
|
|
|
- }
|
|
|
- if(addParams.cardType == '1') {
|
|
|
+ }
|
|
|
+ if (addParams.cardType == '1') {
|
|
|
if (cardFrontPic.value == null) {
|
|
|
Toast("请上传结算卡正面照片");
|
|
|
return;
|
|
@@ -575,6 +633,11 @@ export default {
|
|
|
const updateHuifu = async () => {
|
|
|
router.push("/huifuMchEdit");
|
|
|
}
|
|
|
+ // 跳转到上传图片页面
|
|
|
+ const upload = async () => {
|
|
|
+ router.push("/upload");
|
|
|
+ }
|
|
|
+
|
|
|
// 提交审核表单
|
|
|
const onSubmit = async () => {
|
|
|
console.log('onSubmit', addParams);
|
|
@@ -640,7 +703,8 @@ export default {
|
|
|
cardFrontPic,
|
|
|
submitCheck,
|
|
|
onOversize,
|
|
|
- updateHuifu
|
|
|
+ updateHuifu,
|
|
|
+ upload,
|
|
|
};
|
|
|
},
|
|
|
};
|