소스 검색

fix:“修复汇付商户入驻部分问题”

soobin 1 년 전
부모
커밋
f49df0cbb9

+ 3 - 2
src/assets/language/zh.json

@@ -1,6 +1,6 @@
 {
   "public": {
-    "sysName": "申泽科技",
+    "sysName": "七云科技",
     "requestFailed": "请求失败,点击重新加载",
     "noMore": "没有更多了"
   },
@@ -988,7 +988,8 @@
     "submit": "提交",
     "submittedSuccessfully": "提交成功",
     "submitFailed": "提交失败",
-    "update": "修改"
+    "update": "修改",
+    "uploadPage": "重新上传图片"
   },
   "subLedgerManage": {
     "exportOfShandeLedgerData": "杉德分账数据导出",

+ 7 - 0
src/router/index.js

@@ -181,6 +181,13 @@ const router = createRouter({
       component: () => import("@/views/huifuMch/update"),
       meta: { index: 1 },
     },
+    // 上传图片
+    {
+      path: "/upload",
+      name: "upload",
+      component: () => import("@/views/huifuMch/upload"),
+      meta: { index: 1 },
+    },
     // 提现账号
     {
       path: "/joinpayMch",

+ 5 - 0
src/styles/device/index.less

@@ -577,4 +577,9 @@
 
 .van-dropdown-menu__title {
   color: #2c87c8;
+}
+
+.van-checkbox__icon--checked .van-icon {
+  background-color: #2c87c8;
+  border-color: #2c87c8;
 }

+ 2 - 2
src/utils/config.js

@@ -2,10 +2,10 @@ let baseURL;
 // 开发环境
 if (process.env.NODE_ENV === 'development') {
     // 测试的
-    baseURL = 'http://szwltest.sunzee.com.cn:49002/'
+    // baseURL = 'http://szwltest.sunzee.com.cn:49002/'
     // baseURL = 'https://szwl.sunzee.com.cn/'
     // 正式的
-    // baseURL = 'https://sz.sunzee.com.cn/'
+    baseURL = 'https://sz.sunzee.com.cn/'
     
     // baseURL = 'http://120.25.151.99:49002/'
     // 编译环境

+ 2 - 2
src/views/accountOperation/index.vue

@@ -15,12 +15,12 @@
           <div class="taskTitle">{{ $t('accountOperation.distributionSettings') }}</div>
         </div>
       </div>
-      <div class="taskListRow flex-col" @click="pushPageList('/joinpayMch')">
+      <!-- <div class="taskListRow flex-col" @click="pushPageList('/joinpayMch')">
         <div class="taskIcon withIcon"></div>
         <div class="taskRight">
           <div class="taskTitle">{{ $t('accountOperation.withdrawalAccountNo') }}</div>
         </div>
-      </div>
+      </div> -->
       <!-- <div class="taskListRow flex-col" @click="pushPageList('/shandeMch')">
 	    <div class="taskIcon withIcon"></div>
 	    <div class="taskRight">

+ 2 - 1
src/views/home/index.vue

@@ -97,7 +97,8 @@
         <div class="main25 flex-col" v-for="(item, index) in pushToolList" :key="index" @click="pushToolPage(item.value)">
           <img class="mod7 flex-col" :src="showLogo(item.value)" />
           <div class="TextGroup14 flex-col">
-            <span class="info15" v-html="item.label"></span>
+            <!-- <span class="info15" v-html="item.label"></span> -->
+            <span class="info15">{{ $t(item.label) }}</span>
           </div>
         </div>
       </div>

+ 11 - 1
src/views/huifuMch/index.less

@@ -38,4 +38,14 @@
     margin-bottom: 20px;
   }
 
-}
+}
+
+.van-button--primary {
+  background-color: #2c87c8;
+  border-color: #2c87c8;
+}
+
+// .van-radio__icon--checked .van-icon {
+//   background-color: #2c87c8;
+//   border-color: #2c87c8;
+// }

+ 112 - 48
src/views/huifuMch/index.vue

@@ -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,
     };
   },
 };

+ 4 - 1
src/views/huifuMch/update.vue

@@ -126,7 +126,7 @@
           <van-field v-if="certValidityType == 0" v-model="endDate" readonly name="endDate"
             :label="$t('huifuMch.endDate')" :placeholder="$t('huifuMch.endDatePlaceholder')" @click="showEndDate = true"
             :rules="[{ required: true, message: $t('huifuMch.endDatePlaceholder') }]" />
-          <van-field v-model="sms" center clearable :label="$t('huifuMch.sms')"
+          <van-field v-if="status === '2'" v-model="sms" center clearable :label="$t('huifuMch.sms')"
             :placeholder="$t('huifuMch.smsPlaceholder')"
             :rules="[{ required: true, message: $t('huifuMch.smsPlaceholder') }]">
             <template #button>
@@ -214,6 +214,7 @@ export default {
     const endDate = ref(''); // 有效期截日期
     const showEndDate = ref(false);
     const showStatus = ref(null);
+    const status = ref(''); // 审核状态
     const verCodeTime = reactive({
       time: 0
     });
@@ -360,6 +361,7 @@ export default {
       console.log(data.data);
       if (data.data != null) {
         huifuMchCheck.value = data.data;
+        status.value = data.data.status;
         addParams.type = data.data.type;
         addParams.regName = data.data.regName;
         addParams.shortName = data.data.shortName;
@@ -472,6 +474,7 @@ export default {
       onConfirmBeginDate,
       onConfirmEndDate,
 
+      status,
       minDate: new Date(2000, 0, 1),
       maxDate: new Date(2035, 11, 31),
       submitUpdateCheck,

+ 359 - 0
src/views/huifuMch/upload.vue

@@ -0,0 +1,359 @@
+<template>
+    <!-- 备用提现账号 -->
+    <div class="huifuPage flex-col">
+        <s-header :name="$t('huifuMch.standbyWithdrawalAccountNo')" :noback="false"></s-header>
+        <!-- 上传图片 -->
+        <div class="upLoad flex-col">
+            <van-cell title="身份证" size="large" icon="contact" />
+            <div class="uploader-container">
+                <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="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="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,.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>
+            </div>
+            <div v-if="cardType == '1'">
+                <van-cell title="结算卡" size="large" icon="debit-pay" />
+                <div class="uploader-container">
+                    <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>
+            </div>
+            <div v-if="cardType == '0'">
+                <van-cell title="开户许可证" size="large" icon="debit-pay" />
+                <div class="uploader-container">
+                    <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>
+            </div>
+            <!-- <div>
+                <input type="file" ref="fileInput" @change="handleFileChange" accept="image/*" />
+                <button @click="uploadImage">上传图片</button>
+            </div> -->
+            <van-row justify="space-around" style="padding: 3em;">
+                <van-button span="10" round type="primary" style=" padding: 0 5em" native-type="sumbit"
+                    @click="submitCheck">{{
+                        $t('huifuMch.submit') }}
+                </van-button>
+            </van-row>
+        </div>
+    </div>
+</template>
+  
+<script>
+import { onMounted, reactive, toRefs, ref } from "vue";
+import sHeader from "@/components/SimpleHeader";
+import { Toast } from "vant";
+import { getHuifuMchCheck, uploadPic } from "@/service/huifuMch";
+import { getLoginUser } from "@/common/js/utils";
+import { useRouter } from "vue-router";
+import { useI18n } from "vue-i18n";
+
+export default {
+    components: { sHeader },
+    setup() {
+        // 引入语言
+        const { t } = useI18n();
+        const router = useRouter();
+        const user = getLoginUser();
+        const huifuMchCheck = ref(null); // 审核信息
+        const certBackPic = ref();
+        const certFrontPic = ref();
+        const cardFrontPic = ref();
+        const licensePic = ref();
+        const regAcctPic = ref();
+        let addParams = reactive({
+            adminId: user.id, // 当前登录账户的id
+            type: '0', // 类型 String 必填 对公企业:type=0; 个人:type=1
+            regName: '', // 商户名称
+            shortName: '', // 商户简称
+            foundDate: '', // 成立时间
+            licenseCode: '', // 营业执照编号
+            licenseValidityType: "1", // 营业执照有效期类型
+            licenseBeginDate: '', // 营业执照有效开始日期
+            licenseEndDate: '', // 营业执照有效截止日期
+            regProvId: '', // 注册省编码
+            regAreaId: '', // 注册市编码
+            regDistrictId: '', // 注册区编码
+            regDetail: '', // 注册详细地址
+            name: '', // 联系人姓名
+            phone: '', // 联系人手机号码
+            email: '', // 联系人邮箱
+            provId: '', // 省编码
+            areaId: '',  // 省编码
+            districtId: '', // 市编码 
+            detailAddr: '', // 经营地址
+            servicePhone: '', // 客服电话
+            cardName: '', // 卡户名
+            cardType: '1', // 结算账户类型,“0”为对公账户,“1”为个人账户
+            cardNo: '', // 银行卡号
+            branchCode: '', // 联行号
+            openLicenceNo: '', // 基本存款账户编号或核准号
+            cardProvId: '', // 省编码
+            cardAreaId: '', // 省编码
+            mp: '', // 结算手机号
+            certNo: '', // 身份证号
+            certAddress: '', // 身份证地址
+            certValidityType: '1', // 身份证有效期类型
+            certBeginDate: '', // 有效期开始日期
+            certEndDate: '', // 有效期截止日期
+        });
+        // 上传身份证正面
+        const upCertFrontPic = async (file) => {
+            file.status = 'uploading';
+            file.message = '上传中...';
+            const formData = new FormData();
+            formData.append('file', file.file, file.file.name);
+            formData.append('adminId', user.id);
+            formData.append('fileType', "F40");
+            // console.log(formData.get("file"));
+            if (addParams.type === '1') {
+                formData.append('fileType', "F02");
+            }
+            try {
+                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 {
+                    if (data.code == "00000") {
+                        console.log(data);
+                        file.status = 'done';
+                    } else {
+                        file.status = 'failed';
+                        file.message = '上传失败';
+                    }
+                }
+            } catch {
+                file.status = 'failed';
+                file.message = '上传失败';
+            }
+        };
+        // 上传身份证背面
+        const upCertBackPic = 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', "F41");
+            if (addParams.type == '1') {
+                formData.append('fileType', "F03");
+            }
+            console.log(formData.get("file"));
+            try {
+                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 {
+                    if (data.code == "00000") {
+                        console.log(data);
+                        file.status = 'done';
+                    } else {
+                        file.status = 'failed';
+                        file.message = '上传失败';
+                    }
+                }
+            } catch {
+                file.status = 'failed';
+                file.message = '上传失败';
+            }
+        };
+        // 上传结算卡正面
+        const upCardFrontPic = async (file) => {
+            file.status = 'uploading';
+            file.message = '上传中...';
+            // 此时可以自行将文件上传至服务器
+            const formData = new FormData();
+            formData.append('file', file.file, file.file.name);
+            formData.append('adminId', user.id);
+            formData.append('fileType', "F13");
+            console.log(formData.get("file"));
+            try {
+                const { data } = await uploadPic(formData, 'multipart/form-data'
+                );
+                if (data.code == "00000") {
+                    console.log(data);
+                    file.status = 'done';
+                } else {
+                    file.status = 'failed';
+                    file.message = '上传失败';
+                }
+            } catch {
+                file.status = 'failed';
+                file.message = '上传失败';
+            }
+        };
+        // 上传营业执照
+        const upLicensePic = async (file) => {
+            file.status = 'uploading';
+            file.message = '上传中...';
+            // 此时可以自行将文件上传至服务器
+            const formData = new FormData();
+            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, {
+                    headers: {
+                        'Content-Type': 'multipart/form-data',
+                    },
+                });
+                if (data.code == "00000") {
+                    console.log(data);
+                    file.status = 'done';
+                } else {
+                    file.status = 'failed';
+                    file.message = '上传失败';
+                }
+            } catch {
+                file.status = 'failed';
+                file.message = '上传失败';
+            }
+        };
+        // 上传开户许可证
+        const upRegAcctPic = 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);
+            const formData = new FormData();
+            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, {
+                    headers: {
+                        'Content-Type': 'multipart/form-data',
+                    },
+                });
+                if (data.code == "00000") {
+                    console.log(data);
+                    file.status = 'done';
+                } else {
+                    file.status = 'failed';
+                    file.message = '上传失败';
+                }
+            } catch {
+                file.status = 'failed';
+                file.message = '上传失败';
+            }
+        };
+        const onOversize = (file) => {
+            console.log(file);
+            Toast('文件大小不能超过 2MB');
+        };
+        onMounted(async () => {
+            const { data } = await getHuifuMchCheck({ adminId: user.id });
+            console.log(data.data);
+            if (data.data != null) {
+                huifuMchCheck.value = data.data;
+                addParams.type = huifuMchCheck.value.type;
+                addParams.cardType = huifuMchCheck.value.cardType;
+            }
+        });
+        // 提交审核
+        const submitCheck = async () => {
+            if (certBackPic.value == null) {
+                Toast("请上传身份证正面照片");
+                return;
+            } else if (certFrontPic.value == null) {
+                Toast("请上传身份证背面照片");
+                return;
+            }
+            if (addParams.cardType == '1') {
+                if (cardFrontPic.value == null) {
+                    Toast("请上传结算卡正面照片");
+                    return;
+                }
+            } else {
+                if (licensePic.value == null) {
+                    Toast("请上传营业执照照片");
+                    return;
+                }
+                if (regAcctPic.value == null) {
+                    Toast("请上传开户许可证照片");
+                    return;
+                }
+            }
+
+            Toast.success(t('huifuMch.submittedSuccessfully'));
+            setTimeout(() => {
+                router.go(-1);
+            }, 1500);
+        }
+        return {
+            ...toRefs(addParams),
+            licensePic,
+            regAcctPic,
+            certBackPic,
+            certFrontPic,
+            upLicensePic,
+            upRegAcctPic,
+            upCertBackPic,
+            upCertFrontPic,
+            upCardFrontPic,
+            cardFrontPic,
+            submitCheck,
+            onOversize
+        };
+    },
+};
+</script>
+  
+<style lang="less" scoped>
+@import "../../common/style/common.less";
+@import "./index.less";
+</style>
+  

+ 1 - 0
src/views/login.vue

@@ -154,6 +154,7 @@ export default {
         Toast.success(t('login.loginSucess'));
         // 需要刷新页面,否则 axios.js 文件里的 token 不会被重置
         // window.location.href = '/';
+        window.location.href = '/sc/';
         setTimeout(() => {
           router.push("/home");
         }, 200);

+ 19 - 15
src/views/orderCenter/index.vue

@@ -170,7 +170,8 @@
               <div class="outer1 flex-col">
                 <!-- <span class="txt4">这里是设备名称</span> -->
                 <span class="info1">{{ $t('orderCenter.business') }}</span>
-                <span class="txt5">+ {{ refundObject.refundAmount == null ? refundObject.price.toFixed(2) : (refundObject.price - refundObject.refundAmount).toFixed(2) }}</span>
+                <span class="txt5">+ {{ refundObject.refundAmount == null ? refundObject.price.toFixed(2) :
+                  (refundObject.price - refundObject.refundAmount).toFixed(2) }}</span>
               </div>
             </div>
             <div class="layer1 flex-col"></div>
@@ -320,14 +321,12 @@ export default {
     }
     // 点击增加按钮
     const plusRefundGood = (index) => {
-      // console.log(isChecked.value[index])
       if (isChecked.value[index]) {
         totalRefund.value = parseFloat((totalRefund.value + orderDetails.value[index].price).toFixed(2));
       }
     }
     // 点击减少按钮
     const minusRefundGood = (index) => {
-      // console.log(isChecked.value[index])
       if (isChecked.value[index]) {
         totalRefund.value = parseFloat((totalRefund.value - orderDetails.value[index].price).toFixed(2));
       }
@@ -391,7 +390,6 @@ export default {
         Toast(t('orderCenter.refundPlace'));
         return;
       } else {
-        // console.log(cofficentForm);
         Dialog.confirm({
           // title: "提示",
           message: t('orderCenter.refundCheck'),
@@ -437,11 +435,8 @@ export default {
     const { t } = useI18n();
     // 订单商品图片路径处理
     const showSugerPhoto = (row) => {
-      // let imgId = "";
       if (row.orderDetails != null) {
         if (row.orderDetails.length > 0) {
-          // orderDetails.value = row.orderDetails
-          // console.log("orderDetails:", row.orderDetails[0].productNo);
           return require(`../../assets/order/spunSugar/goods/${row.orderDetails[0].productNo}.png`);
         } else {
           if (row.productNo != null) {
@@ -514,7 +509,6 @@ export default {
     let chartType = "day";
     // 获取订单列表数据
     const getList = async () => {
-      console.log("loading",loading.value);
       finished.value = false;
       getStatisticsFun();
       // 因为订单的时间格式不一样
@@ -573,8 +567,6 @@ export default {
         // error.value = true;
         Toast.fail("数据加载失败");
       }
-      console.log("finished", finished.value);
-      console.log("loading",loading.value);
     };
     // 搜索表单点击
     const searchClick = () => {
@@ -646,11 +638,23 @@ export default {
 
     // 跳转订单导出
     const gotoOrderExcel = async () => {
-      // router.push({ path: "/orderExport" });
-      const { headers, data } = await Api_getOnlineExport(searchParams);
-      // console.log('headers', headers)
-      // console.log('data', data)
-      $M_ExportFile(data, headers);
+      // 显示加载框
+      const loadingInstance = Toast.loading({
+        message: '加载中...',
+        forbidClick: true,
+      });
+      try {
+        const { headers, data } = await Api_getOnlineExport(searchParams);
+        // 请求完成后隐藏加载框
+        loadingInstance.clear();
+        $M_ExportFile(data, headers);
+        // 处理返回的数据
+      } catch (error) {
+        // 请求发生错误时隐藏加载框
+        loadingInstance.clear();
+        // 处理错误情况
+        console.error(error);
+      }
     };
     // 订单详情-退款弹窗
     const refundType = ref(false);

+ 2 - 2
src/views/register.vue

@@ -158,7 +158,7 @@ export default {
         // email: email.value,
         phoneOrEmail: phoneOrEmailStr,
         code: code.value,
-        companyType: '0'
+        companyType: '1'
       });
 
       if (data.code === '00000') {
@@ -186,7 +186,7 @@ export default {
       if (data.code === '00000') {
         Toast(data.data);
         console.log('seedVerCodeSuccess');
-        verCodeTime.time = 3 * 60;
+        verCodeTime.time = 2 * 60;
         verCodeTimeInterval();
       } else {
         Toast.fail(data.message);

+ 1 - 1
src/views/user.vue

@@ -133,7 +133,7 @@
           </div>
 
           <!-- Airwallex 钱包 -->
-          <div v-if="isAbroad" class="taskListRow flex-col" @click="pushPageList('/airwallex')">
+          <div v-if="isAbroad && user.companyType != '1'" class="taskListRow flex-col" @click="pushPageList('/airwallex')">
             <div class="taskIcon airwallexIcon"></div>
             <div class="taskRight">
               <div class="taskTitle">{{ $t("user.airwallex") }}</div>