Procházet zdrojové kódy

Merge branch 'v20' of http://192.168.31.240:3000/MTP2.0_New/MTP20_WEB_GLOBAL into v20

li.shaoyi před 7 měsíci
rodič
revize
607c96b511

+ 18 - 12
src/packages/tss/views/bank/wallet/components/deposit/Index.vue

@@ -27,6 +27,12 @@
                 </template>
             </CellGroup>
             <CellGroup>
+                <Field v-if="sign.ismix === 1" :label="$t('banksign.bankchannel')" name="channel_code" is-link >
+                    <template #input>
+                        <app-select v-model="channel_code" :options="hybrids"
+                            :optionProps="{ label: 'channel_name', value: 'channel_code' }" @confirm="onHibirdChange" />
+                    </template>
+                </Field>
                 <Cell :title="$t('mine.balance')"
                     :value="currencyFormat(currentAccount.currentbalance, currentAccount.currencyid)" />
                 <Cell :title="$t('banksign.wallet.withdraw.bankaccountname')"
@@ -35,21 +41,14 @@
                     :value="handleNoneValue(sign.bankname)" />
                 <Cell v-if="sign.ismix === 0" :title="$t('banksign.wallet.withdraw.bankaccountno')"
                     :value="handleNoneValue(sign.bankaccountno)" />
-                <Field v-if="sign.ismix === 1" type="number" name="phone_number" :label="$t('banksign.mobilephone')"
-                    maxlength="30" v-model.trim="phone_number"
-                    :placeholder="$t('banksign.Pleaseenteryourmobilephonenumber')" :rules="formRules.phone_number" />
-                <Field v-if="sign.ismix === 1" :label="$t('banksign.bankchannel')" name="channel_code" is-link>
-                    <template #input>
-                        <app-select v-model="channel_code" :options="hybrids"
-                            :optionProps="{ label: 'channel_name', value: 'channel_code' }" @confirm="onHibirdChange" />
-                    </template>
-                </Field>
-                <Field v-if="sign.ismix === 1" :label="$t('banksign.banktype')" name="method_type" is-link>
+                <Field v-if="sign.ismix === 1 && isShow" type="number" name="phone_number" :label="$t('banksign.mobilephone')" maxlength="30" v-model.trim="phone_number" :placeholder="$t('banksign.Pleaseenteryourmobilephonenumber')"
+                    :rules="formRules.phone_number" />
+                <Field v-if="sign.ismix === 1 && isShow" :label="$t('banksign.banktype')" name="method_type" is-link >
                     <template #input>
                         <app-select v-model="method_type" :options="methodTypes" @confirm="onMethodTypeChange" />
                     </template>
                 </Field>
-                <Field v-if="sign.ismix === 1 && channel_banks.length != 0" :label="$t('banksign.bankname1')"
+                <Field v-if="sign.ismix === 1 && isShow && channel_banks.length != 0" :label="$t('banksign.bankname1')" 
                     :placeholder="$t('banksign.Pleaseselectyourbank')" name="bank_code" v-model="hyBankName"
                     @click-input="showSelect = true" :rules="formRules.hyBankName" is-link />
             </CellGroup>
@@ -158,6 +157,11 @@ const onRadioChange = (value: number) => {
     formData.Amount = value
 }
 
+// 不显示
+const isShow = computed(() => {
+    return channel_code.value != 'scb' && channel_code.value != 'mypay'
+})
+
 const methodTypes = computed(() => {
     return method_types.value.map(e => { return { label: e, value: e } })
 })
@@ -259,7 +263,9 @@ const formSubmit = () => {
             const hybrid: { [key: string]: unknown } = Object.create({})
             // 拓展信息
             hybrid['channel_code'] = channel_code.value
-            hybrid['bank_code'] = bank_code.value
+            if (channel_code.value != 'scb') {
+                hybrid['bank_code'] = bank_code.value
+            }
             if (channel_code.value === 'chillpay') {
                 const personinfo: { [key: string]: unknown } = Object.create({})
                 personinfo['phone_number'] = phone_number.value

+ 36 - 26
src/packages/tss/views/bank/wallet/components/withdraw/Index.vue

@@ -23,38 +23,33 @@
                 </template>
             </CellGroup>
             <CellGroup>
-                <Cell v-if="sign.ismix === 0" :title="$t('banksign.wallet.withdraw.bankaccountname')"
-                    :value="handleNoneValue(sign.bankaccountname)" />
-                <Cell v-if="sign.ismix === 0" :title="$t('banksign.wallet.withdraw.bankname')"
-                    :value="handleNoneValue(sign.bankname)" />
-                <Cell v-if="sign.ismix === 0" :title="$t('banksign.wallet.withdraw.bankaccountno')"
-                    :value="handleNoneValue(sign.bankaccountno)" />
-                <Field v-if="sign.ismix === 1" name="bankaccountname"
-                    :label="$t('banksign.wallet.withdraw.bankaccountname')" v-model.trim="sign.bankaccountname"
-                    @click="showReciver = true" is-link readonly />
-                <Field v-if="sign.ismix === 1" type="number" name="phone_number" :label="$t('banksign.mobilephone')"
-                    maxlength="30" v-model.trim="onboard.phone_number"
-                    :placeholder="$t('banksign.Pleaseenteryourmobilephonenumber')" :rules="formRules.phone_number" />
-                <Field v-if="sign.ismix === 1" type="number" name="cert_no" :label="$t('banksign.cardno')"
-                    maxlength="30" v-model.trim="onboard.cert_no"
-                    :placeholder="$t('user.authentication.pleaseenterthecardnum')" :rules="formRules.cert_no" />
-                <Field v-if="sign.ismix === 1" :label="$t('banksign.bankchannel')" name="channel_code" is-link>
+                <Cell v-if="sign.ismix === 0" :title="$t('banksign.wallet.withdraw.bankaccountname')" :value="handleNoneValue(sign.bankaccountname)" />
+                <Cell v-if="sign.ismix === 0" :title="$t('banksign.wallet.withdraw.bankname')" :value="handleNoneValue(sign.bankname)" />
+                <Cell v-if="sign.ismix === 0" :title="$t('banksign.wallet.withdraw.bankaccountno')" :value="handleNoneValue(sign.bankaccountno)" />
+                <Field v-if="sign.ismix === 1" :label="$t('banksign.bankchannel')" name="channel_code" is-link >
                     <template #input>
-                        <app-select v-model="channel_code" :options="hybrids"
-                            :optionProps="{ label: 'channel_name', value: 'channel_code' }" @confirm="onHibirdChange" />
+                        <app-select v-model="channel_code" :options="hybrids" :optionProps="{ label: 'channel_name', value: 'channel_code' }" @confirm="onHibirdChange" />
                     </template>
                 </Field>
-                <Field v-if="sign.ismix === 1" :label="$t('banksign.banktype')" name="method_type" is-link>
+                <Field v-if="sign.ismix === 1" name="bankaccountname" :label="$t('banksign.wallet.withdraw.bankaccountname')" 
+                    v-model.trim="sign.bankaccountname" @click="showReciver = true" is-link readonly />
+                <Field v-if="sign.ismix === 1 && channel_code != 'mypay'" type="number" name="phone_number" :label="$t('banksign.mobilephone')" maxlength="30" v-model.trim="onboard.phone_number" :placeholder="$t('banksign.Pleaseenteryourmobilephonenumber')"
+                    :rules="formRules.phone_number" />
+                <Field v-if="sign.ismix === 1 && channel_code != 'mypay'" type="number" name="cert_no" :label="$t('banksign.cardno')" maxlength="30" v-model.trim="onboard.cert_no" :placeholder="$t('user.authentication.pleaseenterthecardnum')" :rules="formRules.cert_no" />
+                <Field v-if="sign.ismix === 1 && channel_code != 'mypay'" :label="$t('banksign.banktype')" name="method_type" is-link >
                     <template #input>
                         <app-select v-model="method_type" :options="methodTypes" @confirm="onMethodTypeChange" />
                     </template>
                 </Field>
-                <Field v-if="sign.ismix === 1 && channel_banks.length != 0" :label="$t('banksign.bankname1')"
+                <Field v-if="sign.ismix === 1 && channel_code != 'mypay' && channel_banks.length != 0" :label="$t('banksign.bankname1')"
                     :placeholder="$t('banksign.Pleaseselectyourbank')" name="bank_code" v-model="hyBankName"
                     @click-input="showSelect = true" :rules="formRules.hyBankName" is-link />
-                <Field v-if="sign.ismix === 1" type="number" name="bank_account" :label="$t('banksign.bankno')"
-                    maxlength="30" v-model.trim="onboard.bank_account"
-                    :placeholder="$t('banksign.Pleaseenterbankaccountno')" :rules="formRules.bank_account" />
+                <Field v-if="sign.ismix === 1 && channel_code === 'mypay' " name="bank" :label="$t('banksign.bankname1')" maxlength="30" v-model.trim="onboard.bank_name" :placeholder="$t('common.placeholder')"
+                    :rules="formRules.bank_name" />
+                <Field v-if="sign.ismix === 1" type="number" name="bank_account" :label="$t('banksign.bankno')" maxlength="30" v-model.trim="onboard.bank_account" :placeholder="$t('common.placeholder')"
+                        :rules="formRules.bank_account" />
+                <Field v-if="sign.ismix === 1 && channel_code === 'mypay' " name="bankbranch" :label="$t('banksign.branchbankname')" maxlength="30" v-model.trim="onboard.bankbranch" :placeholder="$t('common.placeholder')"
+                        :rules="formRules.bankbranch" />
             </CellGroup>
             <CellGroup v-if="msg_317">
                 <Cell :title="$t('common.tips')">
@@ -210,6 +205,14 @@ const formRules: { [key: string]: FieldRule[] } = {
     hyBankName: [{
         message: t('banksign.Pleaseselectyourbank'),
         required: true
+    }],
+    bankbranch: [{
+        message: t('banksign.Pleaseenterbranchbankname'),
+        required: true
+    }],
+    bank_name: [{
+        message: t('common.pleaseenter'),
+        required: true
     }]
 }
 
@@ -256,13 +259,20 @@ const formSubmit = () => {
 
         const receiver: { [key: string]: unknown } = Object.create({})
         receiver['bank_account'] = onboard.bank_account
-        receiver['cert_no'] = onboard.cert_no
-        receiver['phone_number'] = onboard.phone_number
         receiver['name'] = sign.value.bankaccountname
         receiver['receiver_type'] = onboard.receiver_type
+        // mypay 不需要这些
+        if (channel_code.value != 'mypay') {
+            receiver['cert_no'] = onboard.cert_no
+            receiver['phone_number'] = onboard.phone_number
+        }
+        if (channel_code.value === 'mypay') {
+            receiver['bank_branch'] = onboard.bankbranch
+            receiver['bank'] = onboard.bank_name
+        }
         hybrid['receiver_onboard'] = receiver
-
         obj['hybrid'] = hybrid
+        console.log(hybrid)
     }
 
     fullloading((hideLoading) => {

+ 2 - 0
src/types/model/bank.d.ts

@@ -596,10 +596,12 @@ declare namespace Model {
     }
 
     interface HybridReceiverOnboard {
+        ""
         accountid: string       // 资金账户ID
         bank_account: string    // 银行卡号
         bank_code: string       // 银行代码
         bank_name: string       // 银行名称
+        bankbranch: string      // 银行支行名称
         cert_no: string         // 证件号码
         channel_code: string    // 渠道代码
         name: string            // 名称 / 企业名称