|
|
@@ -16,6 +16,11 @@
|
|
|
<Field name="Addr" label="联系地址" type="textarea" autosize maxlength="128" v-model.trim="formData.Addr" placeholder="请输入联系地址"/>
|
|
|
<Field name="Remark" type="textarea" autosize label="备注" maxlength="128" v-model.trim="formData.Remark" placeholder="备注"/>
|
|
|
</CellGroup>
|
|
|
+ <CellGroup inset>
|
|
|
+ <div class="tips_time">
|
|
|
+ <span class="tips">操作时间:交易日 {{ start }} - {{ end }}</span>
|
|
|
+ </div>
|
|
|
+ </CellGroup>
|
|
|
</Form>
|
|
|
<template #footer>
|
|
|
<div class="g-form__footer inset">
|
|
|
@@ -32,10 +37,11 @@
|
|
|
import { shallowRef, ref, defineAsyncComponent } from 'vue'
|
|
|
import { CellGroup, Field, Button, showFailToast, FormInstance, Form, FieldRule, Calendar } from 'vant'
|
|
|
import { fullloading, dialog } from '@/utils/vant'
|
|
|
-import { useDoYJFGetWithholdSignInSMSVCode } from '@/business/bank'
|
|
|
+import { useDoYJFGetWithholdSignInSMSVCode, useDoCusBankExtendConfigs } from '@/business/bank'
|
|
|
import { validateRules } from '@/constants/regex'
|
|
|
import { formatDate } from '@/filters'
|
|
|
import { useComponent } from '@/hooks/component'
|
|
|
+import { useUserStore } from '@/stores'
|
|
|
import moment from 'moment'
|
|
|
import AppModal from '@/components/base/modal/index.vue'
|
|
|
|
|
|
@@ -48,6 +54,12 @@ const { formData, onSubmit, bankaccountno } = useDoYJFGetWithholdSignInSMSVCode(
|
|
|
// 日期范围
|
|
|
const dateRange = ref<string[]>([])
|
|
|
|
|
|
+const { getSystemParamValue } = useUserStore()
|
|
|
+/// 入金时间范围
|
|
|
+const start = getSystemParamValue('012') ?? ''
|
|
|
+/// 不为空 入金取 318 出金取 319
|
|
|
+const { end } = useDoCusBankExtendConfigs(2)
|
|
|
+
|
|
|
const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
|
|
|
closed(true)
|
|
|
})
|
|
|
@@ -93,21 +105,33 @@ const onConfirm = ([start, end]: Date[]) => {
|
|
|
|
|
|
// 获取验证码
|
|
|
const formSubmit = () => {
|
|
|
- dialog({
|
|
|
- message: '确认要申请代扣签约吗?',
|
|
|
- showCancelButton: true
|
|
|
- }).then(() => {
|
|
|
- formRef.value?.validate('Lxdh').then(() => {
|
|
|
- fullloading((hideLoading) => {
|
|
|
- onSubmit().then(() => {
|
|
|
- hideLoading()
|
|
|
- openComponent('SMSCode')
|
|
|
- }).catch((err) => {
|
|
|
- showFailToast(err)
|
|
|
+ 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
|
|
|
+ }).then(() => {
|
|
|
+ formRef.value?.validate('Lxdh').then(() => {
|
|
|
+ fullloading((hideLoading) => {
|
|
|
+ onSubmit().then(() => {
|
|
|
+ hideLoading()
|
|
|
+ openComponent('SMSCode')
|
|
|
+ }).catch((err) => {
|
|
|
+ showFailToast(err)
|
|
|
+ })
|
|
|
})
|
|
|
})
|
|
|
})
|
|
|
- })
|
|
|
+ } else {
|
|
|
+ dialog({
|
|
|
+ title: '提示',
|
|
|
+ message: '代扣签约不在时间范围内',
|
|
|
+ confirmButtonText: '我知道了'
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// 关闭弹窗
|
|
|
@@ -120,4 +144,8 @@ const closed = (isRefresh = false) => {
|
|
|
defineExpose({
|
|
|
closed,
|
|
|
})
|
|
|
-</script>
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less">
|
|
|
+@import './index.less';
|
|
|
+</style>
|