소스 검색

增加1002 1003金登结算 出入金时间限制问题

Handy_Cao 2 년 전
부모
커밋
d96988df66

+ 1 - 1
public/config/appconfig.json

@@ -2,6 +2,6 @@
   "appName": "多元世纪交易中心",
   "version": "1.0.1",
   "versionCode": "100001",
-  "apiUrl": "http://103.40.249.126:18280/cfg?key=mtp_20",
+  "apiUrl": "http://8.130.132.95:8280/cfg?key=mtp_20",
   "shwoRegister": true
 }

+ 15 - 4
src/packages/mobile/views/bank/wallet/components/deposit/Index.vue

@@ -20,7 +20,7 @@
             <span>{{ msg }}</span>
         </div>
         <div class="g-form__time">
-            <label>充值提现时间:{{ start }}-{{ end }}</label>
+            <label>充值提现时间:{{ start }} - {{ end }}</label>
         </div>
         <div class="g-form__bank" v-if="false">
             <table cellspacing="10" cellpadding="0">
@@ -77,13 +77,15 @@ import { fullloading, dialog } from '@/utils/vant'
 import { useNavigation } from '@mobile/router/navigation'
 import { useUserStore } from '@/stores'
 import AppUploader from '@mobile/components/base/uploader/index.vue'
+import moment from 'moment'
 
 const formRef = shallowRef<FormInstance>()
 const { formData, onSubmit } = useDoDeposit()
 const { router } = useNavigation()
 const { getSystemParamValue } = useUserStore()
 const start = getSystemParamValue('012')
-const end = getSystemParamValue('013')
+const limitMsg = getSystemParamValue('1002')
+const end = getSystemParamValue('1003')
 const msg = getSystemParamValue('302')
 const { configs, cusBank } = useDoCusBankExtendConfigs(2)
 const certificate_photo_url = ref('')
@@ -124,8 +126,17 @@ const doDepositWarning = () => {
             confirmButtonText: '确认',
             cancelButtonText: '取消',
         }).then(() => {
-            /// 提交
-            formSubmit()
+            const now = moment(new Date().toDateString())
+            if (now > moment(start) && now < moment(end)) {
+                /// 提交
+                formSubmit()
+            } else {
+                dialog({
+                    title: '提示',
+                    message: limitMsg,
+                    confirmButtonText: '我知道了'
+                })
+            }
         }).catch(() => {
             /// 返回上一层
             router.back()

+ 25 - 3
src/packages/mobile/views/bank/wallet/components/withdraw/Index.vue

@@ -1,6 +1,6 @@
 <template>
     <app-view class="g-form bank-wallet-withdraw">
-        <Form ref="formRef" v-if="cusBank.canoutamount === 1" class="g-form__container" @submit="formSubmit">
+        <Form ref="formRef" v-if="cusBank.canoutamount === 1" class="g-form__container" @submit="doWithDrawWarning">
             <CellGroup inset>
                 <Field class="form-field" type="number" label="提现金额" v-model="formData.Amount" :rules="formRules.Amount">
                     <template #input>
@@ -34,7 +34,7 @@
             <span>{{ msg }}</span>
         </div>
         <div class="g-form__time">
-            <label>充值提现时间:{{ start }}-{{ end }}</label>
+            <label>充值提现时间:{{ start }} - {{ end }}</label>
         </div>
         <template #footer>
             <div class="g-form__footer inset">
@@ -51,6 +51,7 @@ import { shallowRef } from 'vue'
 import { fullloading, dialog, } from '@/utils/vant'
 import { useNavigation } from '@mobile/router/navigation'
 import { useUserStore } from '@/stores'
+import moment from 'moment'
 
 const { formData, onSubmit, sign } = useDoWithdraw()
 const { configs, cusBank } = useDoCusBankExtendConfigs(3)
@@ -60,8 +61,9 @@ const { router } = useNavigation()
 const formRef = shallowRef<FormInstance>()
 const { getSystemParamValue } = useUserStore()
 const start = getSystemParamValue('012')
-const end = getSystemParamValue('013')
 const msg = getSystemParamValue('302')
+const limitMsg = getSystemParamValue('1002')
+const end = getSystemParamValue('1003')
 const userStore = useUserStore()
 
 // 表单验证规则
@@ -78,6 +80,26 @@ const formRules: { [key in keyof Proto.t2bBankWithdrawReq]?: FieldRule[] } = {
     }]
 }
 
+/// 提示信息
+const doWithDrawWarning = () => {
+    if (cusBank.value.cusbankid === 'jdjs') {
+        const now = moment(new Date().toDateString())
+        if (now > moment(start) && now < moment(end)) {
+            /// 提交
+            formSubmit()
+        } else {
+            dialog({
+                title: '提示',
+                message: limitMsg,
+                confirmButtonText: '我知道了'
+            })
+        }
+    } else {
+        /// 提交
+        formSubmit()
+    }
+}
+
 const formSubmit = () => {
     const obj: { [key: string]: unknown } = Object.create({})
     configs.value.forEach((e) => {

+ 11 - 3
src/packages/pc/views/footer/capital/summary/deposit/index.vue

@@ -17,7 +17,7 @@
                 </el-form-item>
             </template>
             <el-form-item label="充值提现时间:">
-                <span>{{ start }}-{{ end }}</span>
+                <span>{{ start }} - {{ end }}</span>
             </el-form-item>
         </el-form>
         <span v-if="cusBank.caninamount === 0">{{ msg }}</span>
@@ -35,6 +35,7 @@ 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'
+import moment from 'moment'
 
 const props = defineProps({
     selectedRow: {
@@ -52,7 +53,8 @@ const certificate_photo_url = ref('')
 const { getSystemParamValue } = useUserStore()
 const msg = getSystemParamValue('302')
 const start = getSystemParamValue('012')
-const end = getSystemParamValue('013')
+const limitMsg = getSystemParamValue('1002')
+const end = getSystemParamValue('1003')
 
 const formRules: FormRules = {
     Amount: [{ required: true, message: '请输入充值金额' }],
@@ -75,7 +77,13 @@ const doDepositWarning = () => {
                     '提示',
                     { confirmButtonText: '确认', cancelButtonText: '取消', })
                     .then(() => {
-                        formSubmit()
+                        const now = moment(new Date().toDateString())
+                        if (now > moment(start) && now < moment(end)) {
+                            /// 提交
+                            formSubmit()
+                        } else {
+                            ElMessageBox.confirm(limitMsg, '提示', { confirmButtonText: '我知道了', showCancelButton: false })
+                        }
                     }).catch(() => {
                         onCancel()
                     })

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

@@ -23,23 +23,24 @@
                 <el-input type="textarea" :maxlength="50" :rows="3" v-model="formData.Remark" />
             </el-form-item>
             <el-form-item label="充值提现时间:">
-                <span>{{ start }}-{{ end }}</span>
+                <span>{{ start }} - {{ end }}</span>
             </el-form-item>
         </el-form>
         <span v-if="cusBank.canoutamount === 0">{{ msg }}</span>
         <template #footer>
             <el-button type="info" @click="onCancel">取消</el-button>
-            <el-button type="primary" @click="formSubmit">提交</el-button>
+            <el-button type="primary" @click="doWithDrawWarning">提交</el-button>
         </template>
     </app-drawer>
 </template>
 
 <script lang="ts" setup>
 import { ref } from 'vue'
-import { ElMessage, FormInstance, FormRules } from 'element-plus'
+import { ElMessage, FormInstance, FormRules, ElMessageBox } from 'element-plus'
 import { useDoWithdraw, useAccountFundInfo, useDoCusBankExtendConfigs } from '@/business/bank'
 import { useAccountStore, useUserStore } from '@/stores'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
+import moment from 'moment'
 
 const { loading, formData, onSubmit } = useDoWithdraw()
 const accountStore = useAccountStore()
@@ -52,7 +53,8 @@ const { fund } = useAccountFundInfo()
 const { getSystemParamValue } = useUserStore()
 const msg = getSystemParamValue('302')
 const start = getSystemParamValue('012')
-const end = getSystemParamValue('013')
+const limitMsg = getSystemParamValue('1002')
+const end = getSystemParamValue('1003')
 
 const formRules: FormRules = {
     Amount: [{
@@ -72,6 +74,24 @@ const onCancel = () => {
     show.value = false
 }
 
+const doWithDrawWarning = () => {
+    if (cusBank.value.cusbankid === 'jdjs') {
+        formRef.value?.validate((valid) => {
+            if (valid) {
+                const now = moment(new Date().toDateString())
+                if (now > moment(start) && now < moment(end)) {
+                    /// 提交
+                    formSubmit()
+                } else {
+                    ElMessageBox.confirm(limitMsg, '提示', { confirmButtonText: '我知道了', showCancelButton: false })
+                }
+            }
+        })
+    } else {
+        formSubmit()
+    }
+}
+
 const formSubmit = () => {
     formRef.value?.validate((valid) => {
         if (valid) {