li.shaoyi 1 rok temu
rodzic
commit
19a5bd32cc

+ 1 - 1
oem/mobile52/config/appconfig.json

@@ -1,6 +1,6 @@
 {
   "appId": "cn.muchinfo.ddgl",
-  "appName": "订单管理系统",
+  "appName": "演示版",
   "version": "1.0.0",
   "versionCode": "100000",
   "apiUrl": "http://103.40.249.126:8280/cfg?key=ddgl_demo",

+ 1 - 1
public/config/appconfig.json

@@ -4,7 +4,7 @@
   "appTitle": "多元世纪交易中心",
   "version": "1.0.8",
   "versionCode": "10008",
-  "apiUrl": "http://192.168.31.204:8080/cfg?key=test_204",
+  "apiUrl": "http://192.168.31.205:8080/cfg?key=test_205",
   "tradeChannel": "ws",
   "modules": [
     "register",

+ 36 - 30
src/packages/gstj/views/holdbank/holddeposit/components/apply/Index.vue

@@ -13,10 +13,11 @@
                     </Field>
                     <Field name="BillAmount" :rules="formRules.BillAmount" label="入金金额">
                         <template #input>
-                            <Stepper v-model="billAmount" theme="round" :min="0.00" :max="500000" :decimal-length="2" :auto-fixed="false" button-size="22" />
+                            <Stepper v-model="billAmount" theme="round" :min="0.00" :max="500000" :decimal-length="2"
+                                :auto-fixed="false" button-size="22" />
                         </template>
                     </Field>
-<!-- 
+                    <!-- 
                     <Field readonly label="金额大写">
                         <template #input>
                             <span>{{ numberToChinese(formatDecimal(billAmount)) }}</span>
@@ -29,20 +30,21 @@
                 </div>
             </Form>
             <template #footer>
-            <div class="g-form__footer inset">
-                <Button round block type="danger" @click="formRef?.submit()">确定</Button>
-            </div>
-        </template>
+                <div class="g-form__footer inset">
+                    <Button round block type="danger" @click="formRef?.submit()">确定</Button>
+                </div>
+            </template>
         </app-view>
-    </app-modal>           
+    </app-modal>
 </template>
 
 <script lang="ts" setup>
 import { shallowRef, ref } from 'vue'
 import { Form, Field, CellGroup, Button, FieldRule, FormInstance, Stepper } from 'vant'
-import { useDoYJF_WithholdInApply, useDoCusBankExtendConfigs } from '@/business/bank'
-import { formatDecimal } from '@/filters'
 import { fullloading, dialog } from '@/utils/vant'
+import { formatDecimal } from '@/filters'
+import { useDoYJF_WithholdInApply, useDoCusBankExtendConfigs } from '@/business/bank'
+import { getServerTime } from '@/services/api/common'
 import { useUserStore } from '@/stores'
 import AppModal from '@/components/base/modal/index.vue'
 import moment from 'moment'
@@ -50,7 +52,7 @@ import moment from 'moment'
 const { formData, onSubmit, bankaccountno } = useDoYJF_WithholdInApply()
 const showModal = shallowRef(true)
 // 是否刷新父组件数据
-const refresh = shallowRef(false) 
+const refresh = shallowRef(false)
 const formRef = shallowRef<FormInstance>()
 /// 备注
 const Remark = ref('')
@@ -88,29 +90,33 @@ const formRules: { [key: string]: FieldRule[] } = {
 }
 
 const formSubmit = () => {
-    const now = moment().format('HH:mm')
-    const n = moment(now, 'HH:mm')
-    const s = moment(start, 'HH:mm')
-    const e = moment(end.value, 'HH:mm')
-    if (n.isAfter(s) && n.isBefore(e)) {
-        fullloading((hideLoading) => {
-            formData.BillAmount = formatDecimal(billAmount.value)
-            onSubmit().then(() => {
+    fullloading((hideLoading) => {
+        getServerTime().then((res) => {
+            const n = moment(res.data, 'HH:mm')
+            const s = moment(start, 'HH:mm')
+            const e = moment(end.value, 'HH:mm')
+            if (n.isSameOrBefore(s) && n.isBefore(e)) {
+                formData.BillAmount = formatDecimal(billAmount.value)
+                onSubmit().then(() => {
+                    hideLoading()
+                    dialog('提交成功,请稍后确认结果。').then(() => {
+                        closed(true)
+                    })
+                }).catch((err) => {
+                    hideLoading(err, 'fail')
+                })
+            } else {
                 hideLoading()
-                dialog('提交成功,请稍后确认结果。').then(() => {
-                    closed(true)
+                dialog({
+                    title: '提示',
+                    message: '入金代扣操作不在时间范围内',
+                    confirmButtonText: '我知道了'
                 })
-            }).catch((err) => {
-                hideLoading(err, 'fail')
-            })
-        })
-    } else {
-        dialog({
-            title: '提示',
-            message: '入金代扣操作不在时间范围内',
-            confirmButtonText: '我知道了'
+            }
+        }).catch(() => {
+            hideLoading('获取服务器时间失败', 'fail')
         })
-    }
+    })
 }
 </script>
 

+ 31 - 26
src/packages/mobile/views/bank/wallet/components/deposit/Index.vue

@@ -39,7 +39,9 @@
             </div>
             <CellGroup inset v-if="msg_324">
                 <Cell title="提示">
-                    <template #label><p v-html="msg_324" /></template>
+                    <template #label>
+                        <p v-html="msg_324" />
+                    </template>
                 </Cell>
             </CellGroup>
         </Form>
@@ -54,9 +56,10 @@
 <script lang="ts" setup>
 import { shallowRef, ref } from 'vue'
 import { Form, Field, Cell, CellGroup, Button, FieldRule, FormInstance, showToast, showFailToast } from 'vant'
-import { useDoDeposit, useDoCusBankExtendConfigs } from '@/business/bank'
 import { fullloading, dialog } from '@/utils/vant'
 import { useNavigation } from '@mobile/router/navigation'
+import { useDoDeposit, useDoCusBankExtendConfigs } from '@/business/bank'
+import { getServerTime } from '@/services/api/common'
 import { useUserStore } from '@/stores'
 import AppUploader from '@mobile/components/base/uploader/index.vue'
 import moment from 'moment'
@@ -98,30 +101,32 @@ const onUploadSuccess = (filePath: string) => {
 
 /// 提示信息
 const doDepositWarning = () => {
-    if (cusBank.value.cusbankid === 'jdjs') {
-        const now = moment().format('HH:mm')
-        const n = moment(now, 'HH:mm')
-        const s = moment(start, 'HH:mm')
-        const e = moment(end.value, 'HH:mm')
-        if (n.isAfter(s) && n.isBefore(e)) {
-            dialog({ message: '是否已在银行端进行入金转账?', showCancelButton: true, confirmButtonText: '确认', cancelButtonText: '取消', }).then(() => {
-                /// 提交
-                formSubmit()
-            }).catch(() => {
-                /// 返回上一层
-                router.back()
-            })
-        } else {
-            dialog({
-                title: '提示',
-                message: '入金不在时间范围内',
-                confirmButtonText: '我知道了'
-            })
-        }
-    } else {
-        /// 提交
-        formSubmit()
-    }
+    fullloading((hideLoading) => {
+        getServerTime().then((res) => {
+            const n = moment(res.data, 'HH:mm')
+            const s = moment(start, 'HH:mm')
+            const e = moment(end.value, 'HH:mm')
+            if (n.isSameOrAfter(s) && n.isBefore(e)) {
+                dialog({ message: '是否已在银行端进行入金转账?', showCancelButton: true, confirmButtonText: '确认', cancelButtonText: '取消', }).then(() => {
+                    /// 提交
+                    formSubmit()
+                }).catch(() => {
+                    /// 返回上一层
+                    router.back()
+                })
+            } else {
+                dialog({
+                    title: '提示',
+                    message: '入金不在时间范围内',
+                    confirmButtonText: '我知道了'
+                })
+            }
+        }).catch(() => {
+            hideLoading('获取服务器时间失败', 'fail')
+        }).finally(() => {
+            hideLoading()
+        })
+    })
 }
 
 const onCopy = (status: boolean) => {

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

@@ -58,10 +58,11 @@
 </template>
 
 <script lang="ts" setup>
-import { useDoWithdraw, useAccountFundInfo, useDoCusBankExtendConfigs } from '@/business/bank';
-import { Form, Field, Cell, CellGroup, FormInstance, Button, FieldRule } from 'vant'
 import { shallowRef } from 'vue'
+import { Form, Field, Cell, CellGroup, FormInstance, Button, FieldRule } from 'vant'
 import { fullloading, dialog, } from '@/utils/vant'
+import { useDoWithdraw, useAccountFundInfo, useDoCusBankExtendConfigs } from '@/business/bank'
+import { getServerTime } from '@/services/api/common'
 import { useNavigation } from '@mobile/router/navigation'
 import { useUserStore } from '@/stores'
 import moment from 'moment'
@@ -97,26 +98,28 @@ const formRules: { [key: string]: FieldRule[] } = {
 
 /// 提示信息
 const doWithDrawWarning = () => {
-    if (cusBank.value.cusbankid === 'jdjs') {
-        const now = moment().format('HH:mm')
-        const n = moment(now, 'HH:mm')
-        const s = moment(start, 'HH:mm')
-        const e = moment(end.value, 'HH:mm')
-        // 出金时间必须在开始和结束时间之间
-        if (n.isAfter(s) && n.isBefore(e)) {
-            /// 提交
-            formSubmit()
-        } else {
-            dialog({
-                title: '提示',
-                message: '出金不在时间范围内',
-                confirmButtonText: '我知道了'
-            })
-        }
-    } else {
-        /// 提交
-        formSubmit()
-    }
+    fullloading((hideLoading) => {
+        getServerTime().then((res) => {
+            const n = moment(res.data, 'HH:mm')
+            const s = moment(start, 'HH:mm')
+            const e = moment(end.value, 'HH:mm')
+            // 出金时间必须在开始和结束时间之间
+            if (n.isSameOrAfter(s) && n.isBefore(e)) {
+                /// 提交
+                formSubmit()
+            } else {
+                dialog({
+                    title: '提示',
+                    message: '出金不在时间范围内',
+                    confirmButtonText: '我知道了'
+                })
+            }
+        }).catch(() => {
+            hideLoading('获取服务器时间失败', 'fail')
+        }).finally(() => {
+            hideLoading()
+        })
+    })
 }
 
 const formSubmit = () => {

+ 45 - 46
src/packages/pc/views/footer/capital/summary/deposit/index.vue

@@ -58,6 +58,7 @@
 import { ref, PropType } from 'vue'
 import { ElMessage, FormInstance, FormRules, ElMessageBox } from 'element-plus'
 import { useDoDeposit, useDoCusBankExtendConfigs } from '@/business/bank'
+import { getServerTime } from '@/services/api/common'
 import { useUserStore } from '@/stores'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
 import AppUpload from '@pc/components/base/upload/index.vue'
@@ -106,14 +107,14 @@ const onCopy = (status: boolean) => {
 }
 
 const doDepositWarning = () => {
-    if (cusBank.value.cusbankid === 'jdjs') {
-        formRef.value?.validate((valid) => {
-            if (valid) {
-                const now = moment().format('HH:mm')
-                const n = moment(now, 'HH:mm')
+    formRef.value?.validate((valid) => {
+        if (valid) {
+            loading.value = true
+            getServerTime().then((res) => {
+                const n = moment(res.data, 'HH:mm')
                 const s = moment(start, 'HH:mm')
                 const e = moment(end.value, 'HH:mm')
-                if (n.isAfter(s) && n.isBefore(e)) {
+                if (n.isSameOrAfter(s) && n.isBefore(e)) {
                     ElMessageBox.confirm(
                         '是否已在银行端进行入金转账?',
                         '提示',
@@ -126,53 +127,51 @@ const doDepositWarning = () => {
                 } else {
                     ElMessageBox.confirm('入金不在时间范围内', '提示', { confirmButtonText: '我知道了', showCancelButton: false })
                 }
-            }
-        })
-    } else {
-        formSubmit()
-    }
+            }).catch(() => {
+                ElMessage.error('获取服务器时间失败')
+            }).finally(() => {
+                loading.value = false
+            })
+        }
+    })
 }
 
 const formSubmit = () => {
-    formRef.value?.validate((valid) => {
-        if (valid) {
-            if (formData.CusBankID) {
-                const obj: { [key: string]: unknown } = Object.create({})
-                configs.value.forEach((e) => {
-                    if (e.value) {
-                        obj[e.fieldcode] = e.value
-                    }
-                })
-                obj['certificate_photo_url'] = certificate_photo_url.value
-                formData.extendInfo = JSON.stringify(obj)
+    if (formData.CusBankID) {
+        const obj: { [key: string]: unknown } = Object.create({})
+        configs.value.forEach((e) => {
+            if (e.value) {
+                obj[e.fieldcode] = e.value
+            }
+        })
+        obj['certificate_photo_url'] = certificate_photo_url.value
+        formData.extendInfo = JSON.stringify(obj)
 
-                let isComplete = false // 请求是否结束
-                const complete = () => {
-                    isComplete = true
-                    ElMessage.success('提交成功,请稍后确认结果')
-                    onCancel()
-                }
+        let isComplete = false // 请求是否结束
+        const complete = () => {
+            isComplete = true
+            ElMessage.success('提交成功,请稍后确认结果')
+            onCancel()
+        }
 
-                // 请求等待可能会超过30秒导致请求超时,所以2秒内没回应直接提示成功
-                const t = setTimeout(() => complete(), 2000)
+        // 请求等待可能会超过30秒导致请求超时,所以2秒内没回应直接提示成功
+        const t = setTimeout(() => complete(), 2000)
 
-                onSubmit().then(() => {
-                    if (!isComplete) {
-                        complete()
-                    }
-                }).catch((err) => {
-                    if (!isComplete) {
-                        formData.Amount = undefined
-                        ElMessage.error('提交失败:' + err)
-                    }
-                }).finally(() => {
-                    window.clearTimeout(t)
-                })
-            } else {
-                ElMessage.error('未签约')
+        onSubmit().then(() => {
+            if (!isComplete) {
+                complete()
             }
-        }
-    })
+        }).catch((err) => {
+            if (!isComplete) {
+                formData.Amount = undefined
+                ElMessage.error('提交失败:' + err)
+            }
+        }).finally(() => {
+            window.clearTimeout(t)
+        })
+    } else {
+        ElMessage.error('未签约')
+    }
 }
 </script>
 

+ 47 - 48
src/packages/pc/views/footer/capital/summary/withdraw/index.vue

@@ -47,6 +47,7 @@
 import { ref } from 'vue'
 import { ElMessage, FormInstance, FormRules, ElMessageBox } from 'element-plus'
 import { useDoWithdraw, useAccountFundInfo, useDoCusBankExtendConfigs } from '@/business/bank'
+import { getServerTime } from '@/services/api/common'
 import { useAccountStore, useUserStore } from '@/stores'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
 import moment from 'moment'
@@ -85,68 +86,66 @@ const onCancel = () => {
 }
 
 const doWithDrawWarning = () => {
-    if (cusBank.value.cusbankid === 'jdjs') {
-        formRef.value?.validate((valid) => {
-            if (valid) {
-                const now = moment().format('HH:mm')
-                const n = moment(now, 'HH:mm')
+    formRef.value?.validate((valid) => {
+        if (valid) {
+            loading.value = true
+            getServerTime().then((res) => {
+                const n = moment(res.data, 'HH:mm')
                 const s = moment(start, 'HH:mm')
                 const e = moment(end.value, 'HH:mm')
                 // 出金时间必须在开始和结束时间之间
-                if (n.isAfter(s) && n.isBefore(e)) {
+                if (n.isSameOrAfter(s) && n.isBefore(e)) {
                     /// 提交
                     formSubmit()
                 } else {
                     ElMessageBox.confirm('出金不在时间范围内', '提示', { confirmButtonText: '我知道了', showCancelButton: false })
                 }
-            }
-        })
-    } else {
-        formSubmit()
-    }
+            }).catch(() => {
+                ElMessage.error('获取服务器时间失败')
+            }).finally(() => {
+                loading.value = false
+            })
+        }
+    })
 }
 
 const formSubmit = () => {
-    formRef.value?.validate((valid) => {
-        if (valid) {
-            const obj: { [key: string]: unknown } = Object.create({})
-            configs.value.forEach((e) => {
-                if (e.value) {
-                    obj[e.fieldcode] = e.value
-                }
-                if (e.fieldcode === 'bank_branch_name') {
-                    formData.BranchBankName = e.value
-                }
-            })
-            formData.extendInfo = JSON.stringify(obj)
-            if (formData.CusBankID) {
-                let isComplete = false // 请求是否结束
-                const complete = () => {
-                    isComplete = true
-                    ElMessage.success('提交成功,请稍后确认结果')
-                    onCancel()
-                }
+    const obj: { [key: string]: unknown } = Object.create({})
+    configs.value.forEach((e) => {
+        if (e.value) {
+            obj[e.fieldcode] = e.value
+        }
+        if (e.fieldcode === 'bank_branch_name') {
+            formData.BranchBankName = e.value
+        }
+    })
+    formData.extendInfo = JSON.stringify(obj)
+    if (formData.CusBankID) {
+        let isComplete = false // 请求是否结束
+        const complete = () => {
+            isComplete = true
+            ElMessage.success('提交成功,请稍后确认结果')
+            onCancel()
+        }
 
-                // 请求等待可能会超过30秒导致请求超时,所以2秒内没回应直接提示成功
-                const t = setTimeout(() => complete(), 2000)
+        // 请求等待可能会超过30秒导致请求超时,所以2秒内没回应直接提示成功
+        const t = setTimeout(() => complete(), 2000)
 
-                onSubmit().then(() => {
-                    if (!isComplete) {
-                        complete()
-                    }
-                }).catch((err) => {
-                    if (!isComplete) {
-                        formData.Amount = undefined
-                        ElMessage.error('提交失败:' + err)
-                    }
-                }).finally(() => {
-                    window.clearTimeout(t)
-                })
-            } else {
-                ElMessage.error('未签约')
+        onSubmit().then(() => {
+            if (!isComplete) {
+                complete()
             }
-        }
-    })
+        }).catch((err) => {
+            if (!isComplete) {
+                formData.Amount = undefined
+                ElMessage.error('提交失败:' + err)
+            }
+        }).finally(() => {
+            window.clearTimeout(t)
+        })
+    } else {
+        ElMessage.error('未签约')
+    }
 }
 </script>
 

+ 16 - 0
src/packages/sbyj/views/home/main/index.less

@@ -1,6 +1,22 @@
 @import '@mobile/assets/themes/base/mixin.less';
 
 .home-main {
+    &__title {
+        display: flex;
+        flex-direction: column;
+        align-items: center;
+
+        span {
+            &:first-child {
+                font-size: 16px;
+            }
+
+            &:last-child {
+                font-size: 14px;
+            }
+        }
+    }
+
     &__banner {
         position: relative;
         overflow: hidden;

+ 6 - 1
src/packages/sbyj/views/home/main/index.vue

@@ -1,7 +1,12 @@
 <template>
   <app-view class="home-main">
     <template #header>
-      <app-navbar :title="globalStore.getSystemInfo('appName')" :show-back-button="false" />
+      <app-navbar :show-back-button="false">
+        <div class="home-main__title">
+          <span>{{ globalStore.getSystemInfo('appName') }}</span>
+          <span>订单管理系统</span>
+        </div>
+      </app-navbar>
     </template>
     <div class="home-main__banner">
       <Banner :data-list="topBanners" />

+ 1 - 1
src/stores/modules/global.ts

@@ -42,7 +42,7 @@ export const useGlobalStore = defineStore(() => {
         }
     })
 
-    // 获取时间戳
+    // 获取当前服务器时间戳
     const getTimestamp = () => {
         const ts = new Date().getTime()
         return ts - state.dateDiff