|
|
@@ -7,36 +7,44 @@
|
|
|
<Form ref="formRef" class="g-form__container" @submit="formSubmit">
|
|
|
<CellGroup inset>
|
|
|
<Field readonly name="bankaccountno" label="扣费账号" v-model="bankaccountno" />
|
|
|
- <Field type="number" name="Yckfxe" label="一次扣费限额" maxlength="30" v-model.trim="Yckfxe"
|
|
|
- placeholder="请输入银行卡账号" :rules="formRules.Yckfxe" />
|
|
|
<Field name="Xysxrq" readonly label="协议生效期" maxlength="30" v-model.trim="formData.Xysxrq"
|
|
|
placeholder="请选择协议生效期" :rules="formRules.Xysxrq" is-link @click="showCalendar = true"/>
|
|
|
<Field name="Xydqrq" readonly label="协议到期日" maxlength="30" v-model.trim="formData.Xydqrq"
|
|
|
placeholder="请选择协议到期日" :rules="formRules.Xydqrq" is-link @click="showCalendar = true" />
|
|
|
+ <Field type="number" name="Lxdh" label="手机号码" maxlength="30" v-model.trim="formData.Lxdh"
|
|
|
+ placeholder="请输入手机号码" :rules="formRules.Lxdh" />
|
|
|
+ <!-- <Field name="Yckfxe" label="一次扣费限额" placeholder="请输入一次扣费限额" :rules="formRules.Yckfxe" >
|
|
|
+ <template #input>
|
|
|
+ <Stepper v-model="Yckfxe" theme="round" button-size="22" :min="0.0" :step="0.01" />
|
|
|
+ </template>
|
|
|
+ </Field>
|
|
|
+ <Field name="Kkzqnkfxe" label="扣费周期内扣款限额" placeholder="请输入扣费周期内扣款限额" :rules="formRules.Kkzqnkfxe" >
|
|
|
+ <template #input>
|
|
|
+ <Stepper v-model="Kkzqnkfxe" theme="round" button-size="22" :min="0.0" :step="0.01" />
|
|
|
+ </template>
|
|
|
+ </Field>
|
|
|
+ <Field name="Kkzqnxzbs" placeholder="请输入扣费周期内限制笔数" :rules="formRules.Kkzqnxzbs" label="扣费周期内限制笔数">
|
|
|
+ <template #input>
|
|
|
+ <Stepper v-model="Kkzqnxzbs" theme="round" button-size="22" :min="0" :max="99" :step="1" integer />
|
|
|
+ </template>
|
|
|
+ </Field> -->
|
|
|
<Field name="Kksjdw" label="扣款单位" maxlength="30" :rules="formRules.Kksjdw" is-link>
|
|
|
<template #input>
|
|
|
<app-select v-model="Kksjdw" placeholder="请选择扣款单位" :options="getGt_kksjdwList()" />
|
|
|
</template>
|
|
|
</Field>
|
|
|
- <Field type="number" name="Kkzqnkfxe" label="扣费周期内扣款限额" maxlength="30" v-model.trim="Kkzqnkfxe"
|
|
|
- placeholder="请输入扣费周期内扣款限额" :rules="formRules.Kkzqnkfxe" />
|
|
|
- <Field type="number" name="Kkzqnxzbs" label="扣费周期内限制笔数" maxlength="30" v-model.trim="formData.Kkzqnxzbs"
|
|
|
- placeholder="请输入扣费周期内限制笔数" :rules="formRules.Kkzqnxzbs" />
|
|
|
- <Field type="number" name="Lxdh" label="手机号码" maxlength="30" v-model.trim="formData.Lxdh"
|
|
|
- placeholder="请输入手机号码" :rules="formRules.Lxdh" />
|
|
|
<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>
|
|
|
</Form>
|
|
|
<template #footer>
|
|
|
<div class="g-form__footer inset">
|
|
|
- <Button type="danger" round block @click="formRef?.submit()">提交</Button>
|
|
|
+ <Button type="danger" round block @click="formRef?.submit()">发送验证码</Button>
|
|
|
</div>
|
|
|
</template>
|
|
|
<component ref="componentRef" :is="componentMap.get(componentId)"
|
|
|
@closed="closeComponent" v-if="componentId" />
|
|
|
- <Calendar v-model:show="showCalendar" type="range" :max-date="moment().add(5, 'years').toDate()"
|
|
|
- :min-date="new Date()" @confirm="onConfirm" />
|
|
|
+ <Calendar v-model:show="showCalendar" type="range" :max-date="moment().add(5, 'years').toDate()" :min-date="new Date()" @confirm="onConfirm" />
|
|
|
</app-view>
|
|
|
</app-modal>
|
|
|
</template>
|
|
|
@@ -51,7 +59,6 @@ import { validateRules } from '@/constants/regex'
|
|
|
import { formatDate } from '@/filters'
|
|
|
import { useComponent } from '@/hooks/component'
|
|
|
import moment from 'moment'
|
|
|
-import { formatDecimal } from '@/filters'
|
|
|
import AppModal from '@/components/base/modal/index.vue'
|
|
|
import AppSelect from '@mobile/components/base/select/index.vue'
|
|
|
|
|
|
@@ -64,8 +71,9 @@ const { formData, onSubmit, bankaccountno } = useDoYJFGetWithholdSignInSMSVCode(
|
|
|
// 日期范围
|
|
|
const dateRange = ref<string[]>([])
|
|
|
const Kksjdw = ref('')
|
|
|
-const Kkzqnkfxe = ref('0.00')
|
|
|
-const Yckfxe = ref('0.00')
|
|
|
+// const Kkzqnkfxe = ref(0.00)
|
|
|
+// const Yckfxe = ref(0.00)
|
|
|
+// const Kkzqnxzbs = ref(0)
|
|
|
|
|
|
const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
|
|
|
closed(true)
|
|
|
@@ -77,12 +85,12 @@ const componentMap = new Map<string, unknown>([
|
|
|
|
|
|
// 表单验证规则
|
|
|
const formRules: { [key in keyof Proto.YJF_GetWithholdSignInSMSVCodeReq]?: FieldRule[] } = {
|
|
|
- Yckfxe: [{
|
|
|
- message: '请输入一次扣费限额',
|
|
|
- validator: () => {
|
|
|
- return !!Yckfxe.value
|
|
|
- }
|
|
|
- }],
|
|
|
+ // Yckfxe: [{
|
|
|
+ // message: '请输入一次扣费限额',
|
|
|
+ // validator: () => {
|
|
|
+ // return !!Yckfxe.value
|
|
|
+ // }
|
|
|
+ // }],
|
|
|
Xysxrq: [{
|
|
|
message: '请选择协议生效期',
|
|
|
validator: () => {
|
|
|
@@ -101,18 +109,18 @@ const formRules: { [key in keyof Proto.YJF_GetWithholdSignInSMSVCodeReq]?: Field
|
|
|
return !!Kksjdw.value
|
|
|
}
|
|
|
}],
|
|
|
- Kkzqnkfxe: [{
|
|
|
- message: '请输入扣费周期内扣款限额',
|
|
|
- validator: () => {
|
|
|
- return !!Kkzqnkfxe.value
|
|
|
- }
|
|
|
- }],
|
|
|
- Kkzqnxzbs: [{
|
|
|
- message: '请输入扣费周期内限制笔数',
|
|
|
- validator: () => {
|
|
|
- return !!formData.Kkzqnxzbs
|
|
|
- }
|
|
|
- }],
|
|
|
+ // Kkzqnkfxe: [{
|
|
|
+ // message: '请输入扣费周期内扣款限额',
|
|
|
+ // validator: () => {
|
|
|
+ // return !!Kkzqnkfxe.value
|
|
|
+ // }
|
|
|
+ // }],
|
|
|
+ // Kkzqnxzbs: [{
|
|
|
+ // message: '请输入扣费周期内限制笔数',
|
|
|
+ // validator: () => {
|
|
|
+ // return !!Kkzqnxzbs.value
|
|
|
+ // }
|
|
|
+ // }],
|
|
|
Lxdh: [{
|
|
|
required: true,
|
|
|
message: '请输入手机号码',
|
|
|
@@ -128,7 +136,7 @@ const formRules: { [key in keyof Proto.YJF_GetWithholdSignInSMSVCodeReq]?: Field
|
|
|
// 选择日期
|
|
|
const onConfirm = ([start, end]: Date[]) => {
|
|
|
showCalendar.value = false
|
|
|
- dateRange.value = [formatDate(start.toISOString(), 'YYYYMMDD'), formatDate(end.toISOString(), 'YYYYMMDD')]
|
|
|
+ dateRange.value = [formatDate(start.toISOString(), 'YYYY-MM-DD'), formatDate(end.toISOString(), 'YYYY-MM-DD')]
|
|
|
const [startDate, endDate] = dateRange.value
|
|
|
formData.Xysxrq = startDate
|
|
|
formData.Xydqrq = endDate
|
|
|
@@ -137,16 +145,15 @@ const onConfirm = ([start, end]: Date[]) => {
|
|
|
// 获取验证码
|
|
|
const formSubmit = () => {
|
|
|
dialog({
|
|
|
- message: '确认解约?',
|
|
|
+ message: '确认要申请代扣签约吗?',
|
|
|
showCancelButton: true
|
|
|
}).then(() => {
|
|
|
formRef.value?.validate('Lxdh').then(() => {
|
|
|
fullloading((hideLoading) => {
|
|
|
+
|
|
|
/// 数据单独处理
|
|
|
- formData.Kksjbc = '99'
|
|
|
formData.Kksjdw = Kksjdw.value.toString()
|
|
|
- formData.Yckfxe = formatDecimal(Yckfxe.value)
|
|
|
- formData.Kkzqnkfxe = formatDecimal(Kkzqnkfxe.value)
|
|
|
+
|
|
|
onSubmit().then(() => {
|
|
|
hideLoading()
|
|
|
openComponent('SMSCode')
|