Ver código fonte

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP20_WEB_GLOBAL

li.shaoyi 2 anos atrás
pai
commit
27380574eb

+ 7 - 2
src/business/bank/index.ts

@@ -295,12 +295,16 @@ export function useBankAccouuntSign() {
 
 /// 查询托管银行扩展配置信息
 export function useDoCusBankExtendConfigs(extendbiztype?: number) {
-    /// 托管银行信息
+    /// 托管银行拓展信息
     const configs = ref<(Model.BankCusBankExtendConfigRsp &{value:string})[]>([])
+    /// 托管银行信息
+    const cusBank = shallowRef<Partial<Model.CusBankSignBankRsp>>({})
     /// 查询签约银行信息
     queryCusBankSignBank().then((res) => {
         if (res.data.length) {
             const data = res.data[0]
+            cusBank.value = data
+            /// 查询配置信息
             queryBankCusBankExtendConfigs({
                 data: {
                     cusbankid: data?.cusbankid,
@@ -317,7 +321,8 @@ export function useDoCusBankExtendConfigs(extendbiztype?: number) {
         }
     })
 
-    return { configs }
+    return { configs,
+             cusBank }
 }
 
 /// 查询托管银行信息

+ 1 - 1
src/packages/mobile/views/ballot/list/Index.vue

@@ -8,7 +8,7 @@
             </app-navbar>
         </template>
         <Banner :data-list="bannerList" @click="onBannerClick" v-if="bannerList.length" />
-        <Divider>正在抢购</Divider>
+        <Divider v-if="startList.length != 0">正在抢购</Divider>
         <template v-if="isWaterfall">
             <Waterfall class="g-goods-waterfall" :data-list="startList">
                 <template #default="{ item }">

+ 24 - 5
src/packages/mobile/views/bank/wallet/components/deposit/Index.vue

@@ -1,6 +1,6 @@
 <template>
     <app-view class="g-form bank-wallet-deposit">
-        <Form ref="formRef" v-if="cusBank.caninamount === 1" class="g-form__container" @submit="formSubmit">
+        <Form ref="formRef" v-if="cusBank.caninamount === 1" class="g-form__container" @submit="doDepositWarning">
             <CellGroup inset>
                 <Field type="number" v-model="formData.Amount" label="充值金额" placeholder="请填写充值金额"
                     :rules="formRules.Amount" />
@@ -72,7 +72,7 @@
 <script lang="ts" setup>
 import { shallowRef, ref } from 'vue'
 import { Form, Field, CellGroup, Button, FieldRule, FormInstance, showFailToast, showSuccessToast } from 'vant'
-import { useDoDeposit, useDoCusBankExtendConfigs, useQueryCusBankSignBank } from '@/business/bank'
+import { useDoDeposit, useDoCusBankExtendConfigs } from '@/business/bank'
 import { fullloading, dialog } from '@/utils/vant'
 import { useNavigation } from '@mobile/router/navigation'
 import { useUserStore } from '@/stores'
@@ -85,11 +85,9 @@ const { getSystemParamValue } = useUserStore()
 const start = getSystemParamValue('012')
 const end = getSystemParamValue('013')
 const msg = getSystemParamValue('302')
-const { configs } = useDoCusBankExtendConfigs(2)
+const { configs, cusBank } = useDoCusBankExtendConfigs(2)
 const certificate_photo_url = ref('')
 const userStore = useUserStore()
-/// 查询托管银行信息
-const { cusBank } = useQueryCusBankSignBank()
 
 // 表单验证规则
 const formRules: { [key in keyof Proto.t2bBankDepositReq | 'filePath']?: FieldRule[] } = {
@@ -117,6 +115,27 @@ const onUploadSuccess = (filePath: string) => {
     certificate_photo_url.value = filePath
 }
 
+/// 提示信息
+const doDepositWarning = () => {
+    if (cusBank.value.cusbankid === 'jdjs') {
+        dialog({
+            message: '是否已在银行端进行入金转账?',
+            showCancelButton: true,
+            confirmButtonText: '确认',
+            cancelButtonText: '取消',
+          }).then(() => {
+            /// 提交
+            formSubmit()
+          }).catch(() => {
+            /// 返回上一层
+            router.back()
+          })
+    } else {
+        /// 提交
+        formSubmit()
+    }
+}
+
 const formSubmit = () => {
     fullloading((hideLoading) => {
         const obj: { [key: string]: unknown } = Object.create({})

+ 2 - 4
src/packages/mobile/views/bank/wallet/components/withdraw/Index.vue

@@ -45,7 +45,7 @@
 </template>
 
 <script lang="ts" setup>
-import { useDoWithdraw, useAccountFundInfo, useDoCusBankExtendConfigs, useQueryCusBankSignBank } from '@/business/bank';
+import { useDoWithdraw, useAccountFundInfo, useDoCusBankExtendConfigs } from '@/business/bank';
 import { Form, Field, CellGroup, FormInstance, Button, FieldRule } from 'vant'
 import { shallowRef } from 'vue'
 import { fullloading, dialog } from '@/utils/vant'
@@ -53,7 +53,7 @@ import { useNavigation } from '@mobile/router/navigation'
 import { useUserStore } from '@/stores'
 
 const { formData, onSubmit, sign } = useDoWithdraw()
-const { configs } = useDoCusBankExtendConfigs(3)
+const { configs, cusBank } = useDoCusBankExtendConfigs(3)
 /// 资金账户信息
 const { fund } = useAccountFundInfo()
 const { router } = useNavigation()
@@ -63,8 +63,6 @@ const start = getSystemParamValue('012')
 const end = getSystemParamValue('013')
 const msg = getSystemParamValue('302')
 const userStore = useUserStore()
-/// 查询托管银行信息
-const { cusBank } = useQueryCusBankSignBank()
 
 // 表单验证规则
 const formRules: { [key in keyof Proto.t2bBankWithdrawReq]?: FieldRule[] } = {

+ 2 - 3
src/packages/pc/components/layouts/header/components/cancel/index.vue

@@ -37,9 +37,8 @@ const onCancel = (isRefresh = false) => {
 
 const onSubmit = () => {
     formSubmit().then(() => {
-        ElMessage.success('提交成功,请等待审核。').then.then(() => {
-            close(true)
-        })
+        ElMessage.success('提交成功,请等待审核。')
+        onCancel(true)
     }).catch((err) => {
         ElMessage.error('提交失败:' + err)
     })

+ 1 - 1
src/packages/pc/components/layouts/header/index.vue

@@ -38,7 +38,7 @@
 
 <script lang="ts" setup>
 import { ref, onMounted, computed, defineAsyncComponent } from 'vue'
-import { SwitchButton, Unlock, Delete, Avatar } from '@element-plus/icons-vue'
+import { SwitchButton, Unlock, Avatar } from '@element-plus/icons-vue'
 import { getFileUrl, diffDays } from '@/filters'
 import { useComponent } from '@/hooks/component'
 import { useUserStore, useGlobalStore, useNoticeStore } from '@/stores'

+ 24 - 6
src/packages/pc/views/footer/capital/summary/deposit/index.vue

@@ -19,15 +19,15 @@
         <span v-if="cusBank.caninamount === 0">{{ msg }}</span>
         <template #footer>
             <el-button type="info" @click="onCancel(false)">取消</el-button>
-            <el-button type="primary" @click="formSubmit">提交</el-button>
+            <el-button type="primary" @click="doDepositWarning">提交</el-button>
         </template>
     </app-drawer>
 </template>
 
 <script lang="ts" setup>
 import { ref, PropType } from 'vue'
-import { ElMessage, FormInstance, FormRules } from 'element-plus'
-import { useDoDeposit, useDoCusBankExtendConfigs, useQueryCusBankSignBank } from '@/business/bank'
+import { ElMessage, FormInstance, FormRules, ElMessageBox } from 'element-plus'
+import { useDoDeposit, useDoCusBankExtendConfigs } from '@/business/bank'
 import { useUserStore } from '@/stores'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
 import AppUpload from '@pc/components/base/upload/index.vue'
@@ -40,14 +40,12 @@ const props = defineProps({
 })
 
 const { formData, onSubmit, loading } = useDoDeposit(props.selectedRow.userid)
-const { configs } = useDoCusBankExtendConfigs(2)
+const { configs, cusBank } = useDoCusBankExtendConfigs(2)
 const show = ref(true)
 const refresh = ref(false)
 const formRef = ref<FormInstance>()
 const userStore = useUserStore()
 const certificate_photo_url = ref('')
-/// 查询托管银行信息
-const { cusBank } = useQueryCusBankSignBank()
 const { getSystemParamValue } = useUserStore()
 const msg = getSystemParamValue('302')
 
@@ -64,6 +62,26 @@ const onCancel = (isRefresh = false) => {
     refresh.value = isRefresh
 }
 
+const doDepositWarning = () => {
+    if (cusBank.value.cusbankid === 'jdjs') {
+        formRef.value?.validate((valid) => {
+            if (valid) {
+                ElMessageBox.confirm(
+                '是否已在银行端进行入金转账?', 
+                '提示', 
+                { confirmButtonText: '确认', cancelButtonText: '取消',})
+                .then(() => {
+                    formSubmit()
+                }).catch(() => { 
+                    onCancel(false)  
+                })
+            }
+        })
+    } else {
+        formSubmit()
+    }
+}
+
 const formSubmit = () => {
     formRef.value?.validate((valid) => {
         if (valid) {

+ 2 - 4
src/packages/pc/views/footer/capital/summary/withdraw/index.vue

@@ -32,7 +32,7 @@
 <script lang="ts" setup>
 import { ref } from 'vue'
 import { ElMessage, FormInstance, FormRules } from 'element-plus'
-import { useDoWithdraw, useAccountFundInfo, useDoCusBankExtendConfigs, useQueryCusBankSignBank } from '@/business/bank'
+import { useDoWithdraw, useAccountFundInfo, useDoCusBankExtendConfigs } from '@/business/bank'
 import { useAccountStore, useUserStore } from '@/stores'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
 
@@ -42,11 +42,9 @@ const formRef = ref<FormInstance>()
 const show = ref(true)
 const refresh = ref(false)
 const userStore = useUserStore()
-const { configs } = useDoCusBankExtendConfigs(3)
+const { configs, cusBank } = useDoCusBankExtendConfigs(3)
 /// 资金账户信息
 const { fund } = useAccountFundInfo()
-/// 查询托管银行信息
-const { cusBank } = useQueryCusBankSignBank()
 const { getSystemParamValue } = useUserStore()
 const msg = getSystemParamValue('302')