Handy_Cao 1 год назад
Родитель
Сommit
db6a4b26c7

+ 1 - 1
public/config/appconfig.json

@@ -3,7 +3,7 @@
   "appName": "多元世纪",
   "version": "1.0.5",
   "versionCode": "10005",
-  "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",

+ 19 - 1
public/config/router.json

@@ -663,6 +663,24 @@
             {
                 "authType": 1,
                 "sort": 2,
+                "title": "入金代扣签约",
+                "code": "account_holdsign",
+                "url": "address",
+                "urlType": 1,
+                "component": "views/account/holdsign/index.vue"
+            },
+            {
+                "authType": 1,
+                "sort": 3,
+                "title": "入金代扣申请",
+                "code": "account_holddeposit",
+                "url": "address",
+                "urlType": 1,
+                "component": "views/account/holddeposit/index.vue"
+            },
+            {
+                "authType": 1,
+                "sort": 4,
                 "title": "收货地址管理",
                 "code": "account_address",
                 "url": "address",
@@ -671,7 +689,7 @@
             },
             {
                 "authType": 1,
-                "sort": 3,
+                "sort": 5,
                 "title": "发票信息管理",
                 "code": "account_receipt",
                 "url": "receipt",

+ 137 - 0
src/packages/pc/views/account/holddeposit/components/deposit/index.vue

@@ -0,0 +1,137 @@
+<!-- 账户管理-入金代扣申请-入金代扣申请 -->
+<template>
+    <app-drawer title="入金" :width="550" v-model:show="show" :loading="loading">
+        <el-form ref="formRef" v-if="cusBank.caninamount === 1" class="el-form--vertical" label-width="120px"
+            :model="formData" :rules="formRules">
+            <el-form-item prop="Amount" label="入金金额">
+                <el-input-number placeholder="请输入" :max="9999999999" :precision="2" v-model="formData.Amount"
+                    :rules="formRules.Amount" />
+            </el-form-item>
+            <el-form-item label="凭证" prop="filePath">
+                <app-upload :file-types="['image']" type-message="请选择正确的图片类型" @change="onUploadChange" />
+            </el-form-item>
+            <template v-for="(item, index) in configs" :key="index">
+                <el-form-item :label="item.fieldname" :prop="item.fieldcode"
+                    v-if="item.usabletype === 1 || item.usabletype === userStore.userInfo?.userinfotype">
+                    <el-input :name="item.fieldcode" placeholder="请输入" v-model="item.value" />
+                </el-form-item>
+            </template>
+            <el-form-item label="入金时间:">
+                <span>{{ start }} - {{ end }}</span>
+            </el-form-item>
+        </el-form>
+        <fieldset style="border: 1px solid #162534;padding: 20px;" v-if="cusBank.caninamount === 1">
+            <legend>提示</legend>
+            <span style="color: #ccc; font-size: 13px;" v-html="msg" />
+        </fieldset>
+        <span v-if="cusBank.caninamount === 0" v-html="msg" />
+        <template #footer>
+            <el-button type="info" @click="onCancel">取消</el-button>
+            <el-button v-if="cusBank.caninamount === 1" type="primary" @click="doDepositWarning">提交</el-button>
+        </template>
+    </app-drawer>
+</template>
+
+<script lang="ts" setup>
+import { ref, PropType } from 'vue'
+import { ElMessage, FormInstance, FormRules, ElMessageBox } from 'element-plus'
+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: {
+        type: Object as PropType<Model.TaAccountsRsp>,
+        required: true
+    }
+})
+
+const { formData, onSubmit, loading } = useDoDeposit(props.selectedRow.userid)
+const { configs, cusBank, end } = useDoCusBankExtendConfigs(2)
+const show = ref(true)
+const formRef = ref<FormInstance>()
+const userStore = useUserStore()
+const certificate_photo_url = ref('')
+const { getSystemParamValue } = useUserStore()
+const msg = getSystemParamValue('302') ?? '系统错误'
+const start = getSystemParamValue('012') ?? ''
+const limitMsg = getSystemParamValue('1002') ?? '系统错误'
+
+const formRules: FormRules = {
+    Amount: [{ required: true, message: '请输入入金金额' }],
+}
+
+const onUploadChange = (file: { filePath: string }) => {
+    certificate_photo_url.value = file.filePath
+}
+
+const onCancel = () => {
+    show.value = false
+}
+
+const doDepositWarning = () => {
+    if (cusBank.value.cusbankid === 'jdjs') {
+        formRef.value?.validate((valid) => {
+            if (valid) {
+                const now = moment(new Date().toISOString()).format('HH:mm')
+                if (now > start && now < end.value) {
+                    ElMessageBox.confirm(
+                    '是否已在银行端进行入金转账?',
+                    '提示',
+                    { confirmButtonText: '确认', cancelButtonText: '取消', })
+                    .then(() => {
+                        formSubmit()
+                    }).catch(() => {
+                        onCancel()
+                    })
+                } else {
+                    ElMessageBox.confirm(limitMsg, '提示', { confirmButtonText: '我知道了', showCancelButton: false })
+                } 
+            } 
+        })
+    } else {
+        formSubmit()
+    }
+}
+
+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)
+
+                let isComplete = false // 请求是否结束
+                const complete = () => {
+                    isComplete = true
+                    loading.value = false
+                    ElMessage.success('提交成功,请稍后确认结果')
+                    onCancel()
+                }
+
+                const t = setTimeout(() => complete(), 2000)
+
+                onSubmit().then(() => {
+                    complete()
+                }).catch((err) => {
+                    if(!isComplete){
+                        ElMessage.error('提交失败:' + err)
+                    }
+                }).finally(() => {
+                    window.clearTimeout(t)
+                })
+            } else {
+                ElMessage.error('未签约')
+            }
+        }
+    })
+}
+</script>

+ 94 - 0
src/packages/pc/views/account/holddeposit/index.vue

@@ -0,0 +1,94 @@
+<!-- 账户管理-入金代扣申请流水 -->
+<template>
+    <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading" :row-key="rowKey"
+        :expand-row-keys="expandKeys" @row-click="rowClick">
+        <template #headerLeft>
+            <app-filter :options="filterOptons">
+                <template #after>
+                    <el-date-picker type="daterange" effect="dark" start-placeholder="开始日期" end-placeholder="结束日期" value-format="YYYYMMDD"
+                        v-model="filterDate" />
+                </template>
+            </app-filter>
+        </template>
+        <template #headerRight>
+            <el-button v-if="signStatus=== SignStatus.Signed" type="primary" size="small" 
+                       @click="openComponent('deposit')">入金代扣申请</el-button>
+        </template>
+    </app-table>
+    <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)" @closed="closeComponent"
+        v-if="componentId" />
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, defineAsyncComponent } from 'vue'
+import { useDataFilter } from '@/hooks/datatable'
+import { useComponent } from '@/hooks/component'
+import { useComposeTable } from '@pc/components/base/table'
+import { useRequest } from '@/hooks/request'
+import { queryGtwithholddepositapply, queryGetGtwithholdsigninfo } from '@/services/api/bank'
+import { SignStatus } from '@/constants/bank'
+import AppTable from '@pc/components/base/table/index.vue'
+import AppFilter from '@pc/components/base/table-filter/index.vue'
+
+const componentMap = new Map<string, unknown>([
+    ['deposit', defineAsyncComponent(() => import('./components/deposit/index.vue'))],
+])
+
+const { filterOptons, getQueryParams } = useDataFilter<Model.GTWithHoldDepositApplyReq>()
+const filterDate = shallowRef<string[]>([])
+
+filterOptons.buttonList = [
+    { lable: '重置', className: 'el-button--info', onClick: () => onSearch(true) },
+    { lable: '查询', className: 'el-button--info', onClick: () => onSearch() }
+]
+
+filterOptons.selectList = [
+    {
+        key: 'billresult',
+        selectedValue: undefined,
+        options: [
+            { label: '扣费成功', value: 0 },
+            { label: '扣费失败', value: 1 },
+        ]
+    }
+]
+
+const signStatus = shallowRef(SignStatus.Unsigned)
+const { rowKey, expandKeys, rowClick, selectedRow } = useComposeTable<Model.GTWithHoldDepositApplyRsp>({ rowKey: 'billingsnum' })
+const { loading, dataList, run } = useRequest(queryGtwithholddepositapply)
+
+/// 查询已经入金代扣申请签约
+useRequest(queryGetGtwithholdsigninfo, {
+    onSuccess: (res) => {
+        /// 签约状态
+        if (res.data.length != 0) {
+            signStatus.value = res.data[0].accountsignstatus
+        }
+    }
+})
+
+const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
+    run()
+})
+
+const tableColumns = shallowRef<Model.TableColumn[]>([
+    { prop: 'billamount', label: '入金代扣金额' },
+    { prop: 'dgjfhm', label: '扣费账号' },
+    { prop: 'billingsnum', label: '流水号' },
+    { prop: 'trantime', label: '申请时间' },
+    { prop: 'message', label: '备注' },
+    { prop: 'billresult', label: '状态' }
+])
+
+const onSearch = (clear = false) => {
+    if (clear) {
+        filterDate.value = []
+    }
+    getQueryParams((qs) => {
+        qs.begindate = filterDate.value[0]
+        qs.enddate = filterDate.value[1]
+        run(qs)
+    }, clear)
+}
+
+</script>

+ 48 - 0
src/packages/pc/views/account/holdsign/components/cancel/index.vue

@@ -0,0 +1,48 @@
+<!-- 账户管理-入金代扣签约-解约 -->
+<template>
+    <app-drawer title="提示" v-model:show="show" :loading="loading" :refresh="refresh">
+        <div class="g-text-message">确认要解约吗?</div>
+        <template #footer>
+            <el-button type="info" @click="onCancel(false)">取消</el-button>
+            <el-button type="primary" @click="onCancelSumit()">提交</el-button>
+        </template>
+    </app-drawer>
+</template>
+
+<script lang="ts" setup>
+import { ref, PropType } from 'vue'
+import { ElMessage } from 'element-plus'
+import { useDoCancelBankSign } from '@/business/bank'
+import AppDrawer from '@pc/components/base/drawer/index.vue'
+
+const props = defineProps({
+    selectedRow: {
+        type: Object as PropType<Model.BankAccountSignRsp>,
+        required: true
+    }
+})
+
+const { cancelSubmit, loading, formData } = useDoCancelBankSign()
+
+const show = ref(true)
+const refresh = ref(false)
+
+const onCancel = (isRefresh = false) => {
+    show.value = false
+    refresh.value = isRefresh
+}
+
+const onCancelSumit = () => {
+    const { cusbankid, currency, accountcode } = props.selectedRow
+    formData.Currency = currency
+    formData.CusBankID = cusbankid
+    formData.AccountCode = accountcode
+    /// 提交
+    cancelSubmit().then(() => {
+        ElMessage.success('解约提交成功,请稍后确认结果')
+        onCancel(true)
+    }).catch((err) => {
+        ElMessage.error(err)
+    })
+}
+</script>

+ 269 - 0
src/packages/pc/views/account/holdsign/components/sign/index.vue

@@ -0,0 +1,269 @@
+<!-- 账户管理-入金代扣签约-代扣签约申请 -->
+<template>
+    <app-drawer :title="bankInfo?.signstatus != undefined ? '修改签约账户' : '添加签约账户'" :width="800" v-model:show="show"
+        :loading="loading" :refresh="refresh">
+        <el-form ref="formRef" class="el-form--horizontal" label-width="120px" :model="formData" :rules="formRules">
+            <el-form-item label="开户银行" prop="OpenBankAccId">
+                <el-select effect="dark" v-model="formData.OpenBankAccId" :readonly="bankaccount != ''">
+                    <el-option :label="item.bankname" :value="item.bankid" v-for="(item, index) in banklist" :key="index" />
+                </el-select>
+            </el-form-item>
+            <el-form-item label="银行卡号" prop="BankAccountNo">
+                <el-input type="number" name="BankAccountNo" :readonly="bankaccount != ''" placeholder="银行卡号" :maxlength="30"
+                    v-model="formData.BankAccountNo" :rules="formRules.BankAccountNo" />
+            </el-form-item>
+            <el-form-item label="名称" prop="AccountName">
+                <el-input name="AccountName" readonly placeholder="银行卡账户名" v-model="formData.AccountName"
+                    :rules="formRules.AccountName" />
+            </el-form-item>
+            <el-form-item label="手机号码" prop="MobilePhone">
+                <el-input name="MobilePhone" :readonly="mobile2 != ''" maxlength="50"
+                    placeholder="请输入手机号码" v-model="formData.MobilePhone" />
+            </el-form-item>
+        </el-form>
+        <el-form ref="extendRef" class="el-form--horizontal" label-width="120px" :model="extendModel" :rules="formRules">
+            <template v-for="(item, index) in configs" :key="index">
+                <template v-if="(item.fieldcode === 'verify_code')">
+                    <el-form-item :label="item.fieldname" :prop="item.fieldcode"
+                        v-if="bankInfo === undefined && showExtendInfo(item)">
+                        <el-input placeholder="请输入" type="number" v-model="item.value" :rules="formRules.vcode">
+                            <template #append>
+                                <el-button size="small" type="primary" :disabled="isCountdown" @click="sendVerifyCode">
+                                    <span v-if="isCountdown">重新发送({{ seconds }})</span>
+                                    <span v-else>获取验证码</span>
+                                </el-button>
+                            </template>
+                        </el-input>
+                    </el-form-item>
+                </template>
+                <template v-else-if="(item.fieldcode === 'bank_branch_name')">
+                    <el-form-item :label="item.fieldname" :prop="item.fieldcode" v-if="showExtendInfo(item)">
+                        <el-select effect="dark" placeholder="请输入" v-model="item.value" value-key="branchnum" :loading="searchLoading"
+                            :remote-method="remoteMethod" filterable remote clearable allow-create @change="onBankChange"
+                            @clear="dataList = []">
+                            <template v-for="(item, index) in dataList" :key="index">
+                                <el-option :label="item.branchname" :value="item" />
+                            </template>
+                        </el-select>
+                    </el-form-item>
+                </template>
+                <template v-else-if="(item.fieldcode === '100')">
+                    <el-form-item :label="item.fieldname" :prop="item.fieldcode" v-if="showExtendInfo(item)">
+                        <el-input maxlength="50" placeholder="请输入" v-model="item.value" />
+                    </el-form-item>
+                </template>
+                <template v-else>
+                    <el-form-item :label="item.fieldname" :prop="item.fieldcode" v-if="showExtendInfo(item)">
+                        <el-input :readonly="item.fieldcode === 'legal_name' && legalpersonname != ''"
+                        type="number" maxlength="50" placeholder="请输入" v-model="item.value" />
+                    </el-form-item>
+                </template>
+            </template>
+        </el-form>
+        <template #footer>
+            <el-button type="info" @click="onCancel(false)">取消</el-button>
+            <el-button type="primary" @click="formSubmit">{{ bankInfo?.signstatus != undefined ? '修改' : '提交' }}</el-button>
+        </template>
+    </app-drawer>
+</template>
+
+<script lang="ts" setup>
+import { ref, computed } from 'vue'
+import { ElMessage, FormInstance, FormRules } from 'element-plus'
+import { validateRules } from '@/constants/regex'
+import { useRequest } from '@/hooks/request'
+import { queryBankBranChnumInfo } from '@/services/api/bank'
+import { useDoBankSign, useDoCusBankExtendConfigs, useT2bSMSVerificationCode } from '@/business/bank'
+import { useUserStore } from '@/stores'
+import service from '@/services'
+import AppDrawer from '@pc/components/base/drawer/index.vue'
+import { shallowRef } from 'vue'
+
+const { formData, onSubmit, banklist, bankInfo, loading } = useDoBankSign()
+const { configs } = useDoCusBankExtendConfigs(1)
+const { smsVerificationCode } = useT2bSMSVerificationCode()
+
+const userStore = useUserStore()
+const show = ref(true)
+const refresh = ref(false)
+const formRef = ref<FormInstance>()
+const extendRef = ref<FormInstance>()
+const seconds = ref(60) //倒计时剩余时间
+const isCountdown = ref(false) // 是否正在倒计时
+/// 短信验证码交易中心信息
+const CenterErrMsg = shallowRef('')
+const { legalpersonname, mobile2, bankaccount, userinfotype } = userStore.userInfo
+
+// 表单数据对象
+const extendModel = computed(() => {
+    const obj = Object.create(null)
+    configs.value.forEach((e) => {
+        if (e.fieldcode) {
+            obj[e.fieldcode] = e.value
+        }
+    })
+    return obj
+})
+
+const formRules = computed(() => {
+    const rules: FormRules = {
+        OpenBankAccId: [{
+            message: '请选择银行信息',
+            validator: () => {
+                return !!formData.OpenBankAccId
+            }
+        }],
+        BankAccountNo: [{
+            required: true,
+            message: '请输入银行卡账号'
+        }],
+        MobilePhone: [{
+            required: true,
+            message: '请输入手机号码',
+            validator: (rule, value, callback) => {
+                if (validateRules.phone.validate(value)) {
+                    callback()
+                } else {
+                    callback(new Error(validateRules.phone.message))
+                }
+            }
+        }],
+        AccountName: [{
+            required: true,
+            message: '请输入行卡账户名',
+        }]
+    }
+    configs.value.forEach((e) => {
+        if (e.fieldcode) {
+            rules[e.fieldcode] = [{
+                required: true,
+                message: '请输入' + e.fieldname,
+            }]
+        }
+    })
+    return rules
+})
+
+const { loading: searchLoading, dataList, runAsync: searchBankBranChnumInfo } = useRequest(queryBankBranChnumInfo, {
+    manual: true,
+    params: {
+        pagesize: 30
+    }
+})
+
+// 远程搜索银行支行
+const remoteMethod = (query: string) => {
+    if (query.length >= 3) {
+        searchBankBranChnumInfo({
+            branchname: query
+        }).then((res) => {
+            dataList.value = res.data
+        })
+    }
+}
+
+// 选择支行时触发
+const onBankChange = (item: Model.BankBranChnumInfoRsp) => {
+    configs.value.forEach((e) => {
+        switch (e.fieldcode) {
+            case 'bank_branch_name':
+                e.value = typeof item === 'string' ? item : item.branchname
+                break
+            case '100':
+                e.value = item.branchnum
+                break
+            case '101':
+                e.value = item.branchprovince
+                break
+            case '102':
+                e.value = item.branchcity
+                break
+        }
+    })
+}
+
+const onCancel = (isRefresh = false) => {
+    show.value = false
+    refresh.value = isRefresh
+}
+
+/// 是否显示拓展信息
+const showExtendInfo = (item: Model.BankCusBankExtendConfigRsp) => {
+    return (item.usabletype === 1) ||
+        (item.usabletype === 2 && userinfotype === 2) ||
+        (item.usabletype === 3 && userinfotype === 1)
+}
+
+// 发送手机验证码
+const sendVerifyCode = () => {
+    formRef.value?.validateField('MobilePhone', (valid) => {
+        if (valid) {
+            service.onReady().then(() => {
+                smsVerificationCode().then((res) => {
+                    if (res.CenterErrMsg != '') {
+                        CenterErrMsg.value = res.CenterErrMsg ?? ''
+                    }
+                    isCountdown.value = true
+                    // 开始倒计时
+                    const countDown = window.setInterval(() => {
+                        seconds.value--
+                        if (seconds.value <= 0) {
+                            clearInterval(countDown)
+                            isCountdown.value = false
+                        }
+                    }, 1000)
+                }).catch(() => {
+                    ElMessage.error('发送失败')
+                })
+            }).catch((err) => {
+                ElMessage.error(err)
+            })
+        }
+    })
+}
+
+const formSubmit = () => {
+    formRef.value?.validate((formValid) => {
+        if (formValid) {
+            extendRef.value?.validate((extendValid) => {
+                if (extendValid) {
+                    if (formData.CusBankID) {
+                        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.OpenBankName = e.value
+                            }
+                            if (e.fieldcode === '100') {
+                                formData.OpenBankNo = e.value
+                            }
+                            if (e.fieldcode === '101') {
+                                formData.BankProvince = e.value
+                            }
+                            if (e.fieldcode === '102') {
+                                formData.BankCity = e.value
+                            }
+                        })
+                        /// 如果需要短信验证码
+                        if (CenterErrMsg.value != '') {
+                            obj['smsSerialNo'] = CenterErrMsg.value
+                        }
+                        formData.extendInfo = JSON.stringify(obj)
+
+                        onSubmit().then(() => {
+                            ElMessage.success(bankInfo.value?.signstatus != undefined ? '签约信息修改成功' : '签约提交成功,请耐心等待审核。')
+                            onCancel(true)
+                        }).catch((err) => {
+                            ElMessage.error('提交失败:' + err)
+                        })
+                    } else {
+                        ElMessage.error('未签约')
+                    }
+                }
+            })
+        }
+    })
+}
+</script>

+ 90 - 0
src/packages/pc/views/account/holdsign/index.vue

@@ -0,0 +1,90 @@
+<!-- 账户管理-入金代扣签约记录 -->
+<template>
+    <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading" :row-key="rowKey"
+        :expand-row-keys="expandKeys" @row-click="rowClick">
+        <template #headerLeft>
+            <el-button type="primary" size="small"
+                v-if="[SignStatus.Unsigned, SignStatus.Signing, SignStatus.Signed].includes(signStatus)"
+                @click="showComponent('sign')">代扣签约申请</el-button>
+        </template>
+        <!-- 状态 -->
+        <template #accountsignstatus="{ value }">
+            {{ getSignStatusName(value) }}
+        </template>
+        <!-- 展开行 -->
+        <template #expand="{ row }">
+            <div class="buttonbar">
+                <el-button v-if="row.signstatus === SignStatus.Signed" type="danger"
+                    size="small" @click="openComponent('cancel')">解约</el-button>
+            </div>
+        </template>
+    </app-table>
+    <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)" @closed="closeComponent"
+        v-if="componentId" />
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, defineAsyncComponent, ref } from 'vue'
+import { useComponent } from '@/hooks/component'
+import { useComposeTable } from '@pc/components/base/table'
+import { useRequest } from '@/hooks/request'
+import { queryGetGtwithholdsigninfo, queryCusBankSignBank } from '@/services/api/bank'
+import { getSignStatusName, SignStatus } from '@/constants/bank'
+import { ElMessage } from 'element-plus'
+import AppTable from '@pc/components/base/table/index.vue'
+
+const componentMap = new Map<string, unknown>([
+    ['cancel', defineAsyncComponent(() => import('./components/cancel/index.vue'))],
+    ['sign', defineAsyncComponent(() => import('./components/sign/index.vue'))],
+])
+const signStatus = shallowRef(SignStatus.Unsigned)
+/// 判断是否能签约
+const canBankSign = ref(false)
+
+const { rowKey, expandKeys, rowClick, selectedRow } = useComposeTable<Model.GTWithHoldSignInfoRsp>({ rowKey: 'accountid' })
+const { loading, dataList, run } = useRequest(queryGetGtwithholdsigninfo, {
+    onSuccess: (res) => {
+        /// 签约状态
+        if (res.data.length != 0) {
+            signStatus.value = res.data[0].accountsignstatus
+        }
+    }
+})
+
+/// 查询托管银行信息
+useRequest(queryCusBankSignBank, {
+    onSuccess: (res) => {
+        /// 签约状态
+        if (res.data.length != 0) {
+            canBankSign.value = res.data[0].signstatus === 4
+        }
+    }
+})
+
+const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
+    run()
+})
+
+const showComponent = ((componentName: string) => {
+    /// 认证请求中 不能操作
+    if (!canBankSign.value) {
+        ElMessage.error('请先进行银行签约')
+        return
+    }
+    openComponent(componentName)
+})
+
+const tableColumns = shallowRef<Model.TableColumn[]>([
+    { prop: 'jfhm', label: ' 用户编号' },
+    { prop: 'accountsignstatus', label: '账户签约状态' },
+    { prop: 'yckfxe', label: '一次扣费限额' },
+    { prop: 'xyqsrq', label: '协议签署日期' },
+    { prop: 'xysxrq', label: '协议生效日期' },
+    { prop: 'xydqrq', label: '协议到期日期' },
+    { prop: 'kksjdw', label: '扣款单位时间' },
+    { prop: 'kksjbc', label: '扣款时间步长' },
+    { prop: 'kkzqnkfxe', label: '扣款周期内扣费限额' },
+    { prop: 'kkzqnxzbs', label: '扣费周期内限制笔数' },
+])
+
+</script>

+ 26 - 0
src/services/api/bank/index.ts

@@ -163,4 +163,30 @@ export function queryBankBranChnumInfo(config: RequestConfig<Model.BankBranChnum
         url: '/Bank/QueryBankBranChnumInfo',
         params: config.data,
     })
+}
+
+/**
+ * 获取代扣签约信息表
+ */
+export function queryGetGtwithholdsigninfo(config: RequestConfig<Model.GTWithHoldSignInfoReq> = {}) {
+    return http.commonRequest<Model.GTWithHoldSignInfoRsp[]>({
+        url: '/TaAccount/GetGtwithholdsigninfo',
+        params: {
+            userid: loginStore.userId,
+            ...config.data
+        },
+    })
+}
+
+/**
+ * 查询代扣入金申请表
+ */
+export function queryGtwithholddepositapply(config: RequestConfig<Model.GTWithHoldDepositApplyReq> = {}) {
+    return http.commonRequest<Model.GTWithHoldDepositApplyRsp[]>({
+        url: '/TaAccount/QueryGtwithholddepositapply',
+        params: {
+            userid: loginStore.userId,
+            ...config.data
+        }
+    })
 }

+ 141 - 1
src/types/model/bank.d.ts

@@ -366,7 +366,7 @@ declare namespace Model {
         faceUrl: string
     }
 
-    /// 查询托管银行扩展配置信息-回应
+    /// 查询托管银行扩展配置信息-请求
     interface BankCusBankExtendConfigReq {
         /// 扩展业务类型 - 1:签约 2:入金 3:出金 4:签约信息修改
         extendbiztype?: number
@@ -395,4 +395,144 @@ declare namespace Model {
         /// 可用类型 - 1:通用 2:机构专用 3:投资者专用
         usabletype: number
     }
+
+    /// 获取代扣签约信息表-请求
+    interface GTWithHoldSignInfoReq {
+        /// 用户ID
+        userid?: number
+    }
+
+    /// 获取代扣签约信息表-回应
+    interface GTWithHoldSignInfoRsp {
+        /// 资金账户ID
+        accountid: number
+        /// 账户签约状态 - 1:未签约 3:签约中 4:已签约 6:解约中 7:已解约
+        accountsignstatus: number
+        /// 地址
+        addr: string
+        /// 备用字段2(变更\解约)
+        byzd2: string
+        /// 备用字段3(变更\解约)
+        byzd3: string
+        /// 备用字段4(变更\解约)
+        byzd4: string
+        /// 备用字段5(变更\解约)
+        byzd5: string
+        /// 操作人名称(变更\解约)
+        czrmc: string
+        /// 缴费号码(变更\解约)
+        dgjfhm: string
+        /// 缴费名称(变更\解约)
+        dgjfmc: string
+        /// 申请号 - 短信签约
+        dxsqh: string
+        /// 短信验证码 - 短信签约
+        dxyzm: string
+        /// 协议附件名称(变更\解约) - 协议签约
+        filedname: string
+        /// 用户编号(变更\解约)
+        jfhm: string
+        /// 缴费人名称
+        jfrmc: string
+        /// 缴费人证件号码
+        jfrzjhm: string
+        /// 缴费人证件类型
+        jfrzjlx: string
+        /// 缴费项目编号(变更\解约)
+        jfxmbh: string
+        /// 开户行行号
+        khhhh: string
+        /// 客户名称
+        khmc: string
+        /// 扣款时间步长(无限额默认填99)
+        kksjbc: string
+        /// 扣款时间单位(TU00:年,TU01:月,TU002:日)
+        kksjdw: string
+        /// 扣款账号
+        kkzh: string
+        /// 扣款周期内扣费限额(无限额默认填 0)
+        kkzqnkfxe: number
+        /// 扣款周期内限制笔数(无限额默认填 0)
+        kkzqnxzbs: number
+        /// 联系电话
+        lxdh: string
+        /// 签约协议号
+        qyxyh: string
+        /// 签约状态 - 00- 签约成功 01- 签约失败 10- 解约成功 11- 解约失败 20- 变更成功 21- 变更失败
+        qyzt: string
+        /// 备注
+        remark: string
+        /// 入网机构号
+        rwjgh: string
+        /// 更新时间
+        updatetime: string
+        /// 用户ID
+        userid: number
+        /// 协议到期日期(yyyy-mm-dd)
+        xydqrq: string
+        /// 协议导入时间(变更\解约) - 协议签约
+        xydrrq: string
+        /// 协议签署日期(yyyy-mm-dd)
+        xyqsrq: string
+        /// 协议生效日(yyyy-mm-dd)
+        xysxrq: string
+        /// 一次扣费限额
+        yckfxe: number
+        /// 账户类型
+        zhlx: string
+    }
+
+    /// 查询代扣入金申请表-请求
+    interface GTWithHoldDepositApplyReq {
+        /// 用户ID
+        userid?: number
+        /// 开始交易日(yyyymmdd)
+        begindate?: string
+        /// 结束交易日(yyyymmdd)
+        enddate?: string
+        /// 批扣结果 - 0-扣费成功、1-扣费失败
+        billresult?: number
+        /// 页码
+        page?: number
+        /// 每页条数
+        pagesize?: number
+    }
+ 
+    /// 查询代扣入金申请表-回应
+    interface GTWithHoldDepositApplyRsp {
+        /// 资金账户ID
+        accountid: number
+        /// 自增ID(SEQ_GT_WITHHOLDDEPOSITAPPLY)
+        autoid: number
+        /// 账单金额
+        billamount: string
+        /// 收费单位流水号(生成唯一的流水号)
+        billingsnum: string
+        /// 批扣结果 - 0-扣费成功、1-扣费失败
+        billresult: string
+        /// 客户端流水号
+        clientserialno: string
+        /// 状态码 0-解析成功 1-解析失败
+        code: string
+        /// 创建时间
+        createtime: string
+        /// 操作人名称
+        czrmc: string
+        /// 扣费批次号(缴费项目编号_YYYYMMDD_01)
+        deductionbnum: string
+        /// 缴费号码
+        dgjfhm: string
+        /// 缴费项目编号
+        jfxmbh: string
+        /// 状态码描述
+        message: string
+        /// 交易日期(yyyymmdd)
+        trandate: string
+        /// 交易时间(hhmmss)
+        trantime: string
+        /// 更新时间
+        updatetime: string
+        /// 用户ID
+        userid: number
+    }
 }