|
|
@@ -9,6 +9,10 @@
|
|
|
<app-uploader @success="onUploadSuccess" />
|
|
|
</template>
|
|
|
</Field>
|
|
|
+ <template v-for="(item, index) in configs" :key="index">
|
|
|
+ <Field v-if="item.usabletype === 1 || item.usabletype === userStore.userInfo?.userinfotype" :name="item.fieldcode"
|
|
|
+ :label="item.fieldname" v-model="item.value" :placeholder="`请输入${ item.fieldname }`" />
|
|
|
+ </template>
|
|
|
</CellGroup>
|
|
|
</Form>
|
|
|
<div class="g-form__time">
|
|
|
@@ -62,20 +66,23 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { shallowRef } from 'vue'
|
|
|
+import { shallowRef, ref } from 'vue'
|
|
|
import { Form, Field, CellGroup, Button, FieldRule, FormInstance, showFailToast, showSuccessToast } from 'vant'
|
|
|
-import { useDoDeposit } from '@/business/bank'
|
|
|
+import { useDoDeposit, useDoCusBankExtendConfigs } from '@/business/bank'
|
|
|
import { fullloading, dialog } from '@/utils/vant'
|
|
|
import { useNavigation } from '../../../../../router/navigation'
|
|
|
import { useUserStore } from '@/stores'
|
|
|
import AppUploader from '../../../../../components/base/uploader/index.vue'
|
|
|
|
|
|
const formRef = shallowRef<FormInstance>()
|
|
|
-const { formData, onSubmit, extendInfo } = useDoDeposit()
|
|
|
+const { formData, onSubmit } = useDoDeposit()
|
|
|
const { router } = useNavigation()
|
|
|
const { getSystemParamValue } = useUserStore()
|
|
|
const start = getSystemParamValue('012')
|
|
|
const end = getSystemParamValue('013')
|
|
|
+const { configs } = useDoCusBankExtendConfigs(2)
|
|
|
+const certificate_photo_url = ref('')
|
|
|
+const userStore = useUserStore()
|
|
|
|
|
|
// 表单验证规则
|
|
|
const formRules: { [key in keyof Proto.t2bBankDepositReq | 'filePath']?: FieldRule[] } = {
|
|
|
@@ -86,7 +93,7 @@ const formRules: { [key in keyof Proto.t2bBankDepositReq | 'filePath']?: FieldRu
|
|
|
filePath: [{
|
|
|
message: '请上传转账凭证',
|
|
|
validator: () => {
|
|
|
- return !!extendInfo.certificate_photo_url
|
|
|
+ return !!certificate_photo_url.value
|
|
|
}
|
|
|
}]
|
|
|
}
|
|
|
@@ -100,11 +107,19 @@ const onCopy = (status: boolean) => {
|
|
|
}
|
|
|
|
|
|
const onUploadSuccess = (filePath: string) => {
|
|
|
- extendInfo.certificate_photo_url = filePath
|
|
|
+ certificate_photo_url.value = filePath
|
|
|
}
|
|
|
|
|
|
const formSubmit = () => {
|
|
|
fullloading((hideLoading) => {
|
|
|
+ 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.extend_info = JSON.stringify(obj)
|
|
|
onSubmit().then(() => {
|
|
|
hideLoading()
|
|
|
dialog('充值申请提交成功,请等待审核。').then(() => {
|