Handy_Cao 1 năm trước cách đây
mục cha
commit
62d105dd5f

+ 111 - 0
public/proto/mtp.proto

@@ -1184,6 +1184,18 @@ message ListingOrderChangeNtf {
 		optional uint64 TradeQty = 5; // uint64 成交数量
 		optional uint64 CancelQty = 6; // uint64 撤销数量
 }
+// 更新用户交易权限通知
+message UpdateUserTradeRightNtf {
+	optional MessageHead Header = 1; // 消息头
+		optional NotifyHead NtfHeader = 2; // NotifyHead 公共消息头
+		optional string NotifyTime = 3; // string 通知发送时间
+}
+// 更新签退时间通知
+message UpdateCheckoutTimeNtf {
+	optional MessageHead Header = 1; // 消息头
+		optional NotifyHead NtfHeader = 2; // NotifyHead 公共消息头
+		optional string NotifyTime = 3; // string 通知发送时间
+}
 // 交易委托请求
 message OrderReq {
 	optional MessageHead Header = 1;
@@ -2720,6 +2732,21 @@ message HolderTransferRefuseRsp {
 		optional uint64 ApplyID = 4; // 申请ID,必填
 		optional string ClientSerialNo = 5; // 客户端流水号
 }
+// 交收服务商支付卖方交收货款接口请求
+message DeliveryProviderPaySellAmountReq {
+	optional MessageHead Header = 1;
+		optional uint64 DeliveryOrderID = 2; // 交收委托ID,必填
+		optional string Remark = 3; // 审核备注
+		optional string ClientSerialNo = 4; // 客户端流水号
+}
+// 交收服务商支付卖方交收货款接口响应
+message DeliveryProviderPaySellAmountRsp {
+	optional MessageHead Header = 1; // 消息头
+	optional int32 RetCode = 2; // 返回码
+	optional string RetDesc = 3; // 描述信息
+		optional uint64 DeliveryOrderID = 4; // 交收委托ID,必填
+		optional string ClientSerialNo = 5; // 客户端流水号
+}
 // 账户操作子指令
 message SubCommand {
 		optional uint32 CommandCode = 1; // 子指令操作码
@@ -14775,6 +14802,90 @@ message GoodsQuotePriceQueryRsp {
 		optional string Last = 5; // 行情现价
 		optional string LastTime = 6; // 行情时间
 }
+// 云缴费获取代扣签约短信验证码请求
+message YJF_GetWithholdSignInSMSVCodeReq {
+	optional MessageHead Header = 1;
+		required uint64 AccountID = 2; // 资金账号ID
+		required uint32 UserID = 3; // 用户ID
+		required uint64 LoginID = 4; // 登录账号ID
+		required string Yckfxe = 5; // 一次扣费限额-无限额度0.00,
+		required string Xysxrq = 6; // 协议生效日期-yyyy-mm-dd
+		required string Xydqrq = 7; // 协议到期日期-yyyy-mm-dd
+		required string Kksjdw = 8; // 扣款时间单位-枚举:gt_kksjdw
+		required string Kksjbc = 9; // 扣款时间步长-数字2位,
+		required string Kkzqnkfxe = 10; // 扣款周期内扣费限额-无限额度0.00,16+2(小数位固定)
+		required string Kkzqnxzbs = 11; // 扣款周期内限制笔数-无限额默认填0,
+		required string Lxdh = 12; // 联系电话
+		optional string Addr = 13; // 地址
+		optional string Remark = 14; // 备注
+		required string ClientSerialNo = 15; // 客户端流水号-全局唯一码
+}
+// 云缴费获取代扣签约短信验证码响应
+message YJF_GetWithholdSignInSMSVCodeRsp {
+	optional MessageHead Header = 1; // 消息头
+	optional int32 RetCode = 2; // 返回码
+	optional string RetDesc = 3; // 描述信息
+		required uint64 AccountID = 4; // 资金账号ID
+		required uint32 UserID = 5; // 用户ID
+		required uint64 LoginID = 6; // 登录账号ID
+		required string ClientSerialNo = 7; // 客户端流水号-请求的流水号
+}
+// 云缴费代扣签约请求
+message YJF_WithholdSignInSMSReq {
+	optional MessageHead Header = 1;
+		required uint64 AccountID = 2; // 资金账号ID
+		required uint32 UserID = 3; // 用户ID
+		required uint64 LoginID = 4; // 登录账号ID
+		required string ClientSerialNo = 5; // 客户端流水号-申请短信验证码时的流水号
+		required string VCode = 6; // 短信验证码
+}
+// 云缴费代扣签约响应
+message YJF_WithholdSignInSMSRsp {
+	optional MessageHead Header = 1; // 消息头
+	optional int32 RetCode = 2; // 返回码
+	optional string RetDesc = 3; // 描述信息
+		required uint64 AccountID = 4; // 资金账号ID
+		required uint32 UserID = 5; // 用户ID
+		required uint64 LoginID = 6; // 登录账号ID
+		required string ClientSerialNo = 7; // 客户端流水号-请求的流水号
+}
+// 云缴费代扣解约请求
+message YJF_WithholdSignOutReq {
+	optional MessageHead Header = 1;
+		required uint64 AccountID = 2; // 资金账号ID
+		required uint32 UserID = 3; // 用户ID
+		required uint64 LoginID = 4; // 登录账号ID
+		required string ClientSerialNo = 5; // 客户端流水号-全局唯一码
+}
+// 云缴费代扣解约响应
+message YJF_WithholdSignOutRsp {
+	optional MessageHead Header = 1; // 消息头
+	optional int32 RetCode = 2; // 返回码
+	optional string RetDesc = 3; // 描述信息
+		required uint64 AccountID = 4; // 资金账号ID
+		required uint32 UserID = 5; // 用户ID
+		required uint64 LoginID = 6; // 登录账号ID
+		required string ClientSerialNo = 7; // 客户端流水号-请求的流水号
+}
+// 云缴费代扣入金申请请求
+message YJF_WithholdInApplyReq {
+	optional MessageHead Header = 1;
+		required uint64 AccountID = 2; // 资金账号ID
+		required uint32 UserID = 3; // 用户ID
+		required uint64 LoginID = 4; // 登录账号ID
+		required string BillAmount = 5; // 代扣金额-固定两位小数,整数16位,小数2位
+		required string ClientSerialNo = 6; // 客户端流水号-全局唯一码
+}
+// 云缴费代扣入金申请响应
+message YJF_WithholdInApplyRsp {
+	optional MessageHead Header = 1; // 消息头
+	optional int32 RetCode = 2; // 返回码
+	optional string RetDesc = 3; // 描述信息
+		required uint64 AccountID = 4; // 资金账号ID
+		required uint32 UserID = 5; // 用户ID
+		required uint64 LoginID = 6; // 登录账号ID
+		required string ClientSerialNo = 7; // 客户端流水号-请求的流水号
+}
 // 金宝宝返利通知
 message jbbtBackPDNtf {
 	optional MessageHead Header = 1; // 消息头

+ 138 - 22
src/business/bank/index.ts

@@ -9,11 +9,16 @@ import {
     t2bBankCancelSign,
     accountFundInfoReq,
     queryBankCusBankExtendConfigs,
-    t2bSMSVerificationCode
+    t2bSMSVerificationCode,
+    YJF_GetWithholdSignInSMSVCode,
+    YJF_WithholdInApply,
+    YJF_WithholdSignInSMS,
+    YJF_WithholdSignOut
 } from '@/services/api/bank'
 import { SignStatus } from '@/constants/bank'
 import { decryptAES } from '@/services/websocket/package/crypto'
 import moment from "moment"
+import { v4 } from 'uuid'
 
 const accountStore = useAccountStore()
 const loginStore = useLoginStore()
@@ -280,27 +285,6 @@ export function useAccountFundInfo() {
     }
 }
 
-/// 账户资金信息请求
-export function useBankAccouuntSign() {
-    /// 数据
-    const fund = shallowRef<Partial<Proto.AccountFundInfoRsp>>({})
-
-    /// 账户资金信息
-    accountFundInfoReq({
-        data: {
-            QueryBitMask: 2,
-            OrderId: new Date().getTime(),
-            AccountId: accountStore.currentAccountId,
-        }
-    }).then((res) => {
-        fund.value = res
-    })
-
-    return {
-        fund
-    }
-}
-
 /// 查询托管银行扩展配置信息
 export function useDoCusBankExtendConfigs(extendbiztype?: number) {
     /// 托管银行拓展信息
@@ -397,3 +381,135 @@ export function useT2bSMSVerificationCode() {
         smsVerificationCode
     }
 }
+
+/// 云缴费代扣解约请求
+export function useDoYJF_WithholdSignOut() {
+    /// 获取UserId
+    const loading = shallowRef(false)
+    /// 表单信息
+    const formData = reactive<Partial<Proto.YJF_WithholdSignOutReq>>({
+        AccountID: accountStore.currentAccountId,
+        UserID: useStore.userInfo.userid,
+        LoginID: loginStore.loginId,
+        ClientSerialNo: v4()
+    })
+
+    const onSubmit = async () => {
+        loading.value = true
+        /// 发起请求
+        return YJF_WithholdSignOut({
+            data: {
+                ...formData,
+            }
+        }).finally(() => {
+            loading.value = false
+        })
+    }
+
+    return {
+        loading,
+        onSubmit,
+        formData
+    }
+}
+
+/// 云缴费代扣入金申请
+export function useDoYJF_WithholdInApply() {
+    /// 获取UserId
+    const loading = shallowRef(false)
+    /// 表单信息
+    const formData = reactive<Partial<Proto.YJF_WithholdInApplyReq>>({
+        AccountID: accountStore.currentAccountId,
+        UserID: useStore.userInfo.userid,
+        LoginID: loginStore.loginId,
+        ClientSerialNo: v4()
+    })
+
+    const onSubmit = async () => {
+        loading.value = true
+        /// 发起请求
+        return YJF_WithholdInApply({
+            data: {
+                ...formData,
+            }
+        }).finally(() => {
+            loading.value = false
+        })
+    }
+
+    return {
+        loading,
+        onSubmit,
+        formData
+    }
+}
+
+/// 云缴费代扣签约申请
+export function useDoYJF_WithholdSignInSMS() {
+    /// 获取UserId
+    const loading = shallowRef(false)
+    /// 表单信息
+    const formData = reactive<Partial<Proto.YJF_WithholdSignInSMSReq>>({
+        AccountID: accountStore.currentAccountId,
+        UserID: useStore.userInfo.userid,
+        LoginID: loginStore.loginId,
+        ClientSerialNo: v4()
+    })
+
+    const onSubmit = async () => {
+        loading.value = true
+        /// 发起请求
+        return YJF_WithholdSignInSMS({
+            data: {
+                ...formData,
+            }
+        }).finally(() => {
+            loading.value = false
+        })
+    }
+
+    return {
+        loading,
+        onSubmit,
+        formData
+    }
+}
+
+/// 云缴费获取代扣签约短信验证码
+export function useDoYJFGetWithholdSignInSMSVCode() {
+    /// 获取UserId
+    const loading = shallowRef(false)
+    /// 判断是否有签约信息
+    const bankaccountno = shallowRef('')
+    /// 表单信息
+    const formData = reactive<Partial<Proto.YJF_GetWithholdSignInSMSVCodeReq>>({
+        AccountID: accountStore.currentAccountId,
+        UserID: useStore.userInfo.userid,
+        LoginID: loginStore.loginId,
+        ClientSerialNo: v4()
+    })
+
+    /// 判断是否有签约信息
+    queryBankAccountSign().then((res) => {
+        bankaccountno.value = res.data.filter(obj => { return ![SignStatus.Rescinded].includes(obj.signstatus) })[0].bankaccountno
+    })
+
+    const onSubmit = async () => {
+        loading.value = true
+        /// 发起请求
+        return YJF_GetWithholdSignInSMSVCode({
+            data: {
+                ...formData,
+            }
+        }).finally(() => {
+            loading.value = false
+        })
+    }
+
+    return {
+        loading,
+        onSubmit,
+        formData,
+        bankaccountno
+    }
+}

+ 18 - 1
src/constants/bank.ts

@@ -46,4 +46,21 @@ export function getAccountBusinessCodeList() {
 export function getAccountBusinessCodeName(value: number) {
     const enums = getAccountBusinessCodeList()
     return getEnumTypeName(enums, value)
-}
+}
+
+/**
+ * 获取扣款单位类型列表
+ * @returns 
+ */
+export function getGt_kksjdwList() {
+    return getEnumTypeList('gt_kksjdw')
+}
+
+/**
+ * 获取扣款单位类型名称
+ * @returns 
+ */
+export function getGt_kksjdwName(value: number) {
+    const enums = getGt_kksjdwList()
+    return getEnumTypeName(enums, value)
+}

+ 9 - 0
src/constants/funcode.ts

@@ -136,4 +136,13 @@ export enum FunCode {
     HolderTransferApplyRsp = 196752, // 持仓过户申请接口响应
     HolderTransferConfirmReq = 196753, // 持仓过户确认接口请求
     HolderTransferConfirmRsp = 196754, // 持仓过户确认接口响应
+
+	YJF_GetWithholdSignInSMSVCodeReq = 2621451,  /// 云缴费获取代扣签约短信验证码请求(0, 40, 11)
+	YJF_GetWithholdSignInSMSVCodeRsp = 2621452,  /// 云缴费获取代扣签约短信验证码响应(0, 40, 12)
+	YJF_WithholdSignInSMSReq = 2621453,          /// 云缴费代扣签约请求(0, 40, 13)
+	YJF_WithholdSignInSMSRsp = 2621454,          /// 云缴费代扣签约响应(0, 40, 14)
+	YJF_WithholdSignOutReq = 2621455,            /// 云缴费代扣解约请求(0, 40, 15)
+	YJF_WithholdSignOutRsp = 2621456,            /// 云缴费代扣解约响应(0, 40, 16)
+	YJF_WithholdInApplyReq = 2621457,            /// 云缴费代扣入金申请请求(0, 40, 17)
+	YJF_WithholdInApplyRsp = 2621458,            /// 云缴费代扣入金申请响应(0, 40, 18)
 } 

+ 4 - 15
src/packages/pc/views/account/holdsign/components/cancel/index.vue

@@ -10,19 +10,12 @@
 </template>
 
 <script lang="ts" setup>
-import { ref, PropType } from 'vue'
+import { ref } from 'vue'
 import { ElMessage } from 'element-plus'
-import { useDoCancelBankSign } from '@/business/bank'
+import { useDoYJF_WithholdSignOut } 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 { onSubmit, loading } = useDoYJF_WithholdSignOut()
 
 const show = ref(true)
 const refresh = ref(false)
@@ -33,12 +26,8 @@ const onCancel = (isRefresh = false) => {
 }
 
 const onCancelSumit = () => {
-    const { cusbankid, currency, accountcode } = props.selectedRow
-    formData.Currency = currency
-    formData.CusBankID = cusbankid
-    formData.AccountCode = accountcode
     /// 提交
-    cancelSubmit().then(() => {
+    onSubmit().then(() => {
         ElMessage.success('解约提交成功,请稍后确认结果')
         onCancel(true)
     }).catch((err) => {

+ 93 - 228
src/packages/pc/views/account/holdsign/components/sign/index.vue

@@ -1,267 +1,132 @@
 <!-- 账户管理-入金代扣签约-代扣签约申请 -->
 <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>
+    <app-drawer title='代扣签约申请' :width="960" v-model:show="show" :loading="loading" :refresh="refresh">
+        <el-form ref="formRef" class="el-form--horizontal" label-width="160px" :model="formData" :rules="formRules">
+            <el-form-item label="扣费账号" prop="bankaccountno">
+                <el-input name="bankaccountno" readonly v-model="bankaccountno" />
             </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 label="一次扣费限额" prop="Yckfxe">
+                <el-input type="number" name="Yckfxe" placeholder="请输入一次扣费限额" :maxlength="30"
+                    v-model="formData.Yckfxe" :rules="formRules.Yckfxe" />
             </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 label="协议生效期" prop="Xysxrq">
+                <el-date-picker effect="dark" v-model="formData.Xysxrq" type="date" placeholder="请选择协议生效期" 
+                    :default-value="new Date()" value-format="YYYY-MM-DD" :editable="false" :clearable="false" 
+                    @visible-change="visibleChange" @calendar-change="calendarChange" :rules="formRules.Xysxrq"/>
             </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 label="协议到期日" prop="Xydqrq">
+                <el-date-picker effect="dark" v-model="formData.Xydqrq" type="date" placeholder="请选择协议到期日期" 
+                :default-value="new Date()" value-format="YYYY-MM-DD" :editable="false" :clearable="false" 
+                @visible-change="visibleChange" @calendar-change="calendarChange" :rules="formRules.Xydqrq" />
+            </el-form-item>
+            <el-form-item label="扣款单位" prop="Kksjdw">
+                <el-select effect="dark" v-model="formData.Kksjdw" :rules="formRules.Kksjdw" >
+                    <el-option :label="item.label" :value="item.value" v-for="(item, index) in getGt_kksjdwList()" :key="index" />
+                </el-select>
+            </el-form-item>
+            <el-form-item label="扣款时间步长" prop="Kksjbc">
+                <el-input type="number" name="Kksjbc" placeholder="请输入扣费周期内扣款限额" v-model="formData.Kksjbc" :rules="formRules.Kksjbc" />
+            </el-form-item> 
+            <el-form-item label="扣费周期内扣款限额" prop="Kkzqnkfxe">
+                <el-input type="number" name="Kkzqnkfxe" placeholder="请输入扣费周期内扣款限额" v-model="formData.Kkzqnkfxe" :rules="formRules.Kkzqnkfxe" />
+            </el-form-item> 
+            <el-form-item label="扣费周期内限制笔数" prop="Kkzqnxzbs">
+                <el-input type="number" name="Kkzqnxzbs" placeholder="请输入扣费周期内限制笔数" v-model="formData.Kkzqnxzbs" :rules="formRules.Kkzqnxzbs" />
+            </el-form-item> 
+            <el-form-item class="el-form-item--row" label="手机号码" prop="Lxdh">
+                <el-input type="number" name="Lxdh" maxlength="50" placeholder="请输入手机号码" v-model="formData.Lxdh" :rules="formRules.Lxdh" />
+            </el-form-item> 
+            <el-form-item class="el-form-item--row" label="地址" prop="Addr">
+                <el-input name="Addr" v-model="formData.Addr" placeholder="请输入联系地址" />
+            </el-form-item>
+            <el-form-item class="el-form-item--row" label="备注" prop="Remark">
+                <el-input name="Remark" type="textarea" placeholder="请输入备注" :rows="3" v-model="formData.Remark" />
             </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>
+            <el-button type="primary" @click="formSubmit">下一步</el-button>
         </template>
     </app-drawer>
 </template>
 
 <script lang="ts" setup>
-import { ref, computed } from 'vue'
+import { ref } from 'vue'
 import { ElMessage, FormInstance, FormRules } from 'element-plus'
+import { getGt_kksjdwList } from "@/constants/bank";
+import { useDoYJFGetWithholdSignInSMSVCode } from '@/business/bank'
 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 { useDateRange } from '@/hooks/date-picker'
 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 { formData, onSubmit, loading, bankaccountno } = useDoYJFGetWithholdSignInSMSVCode()
+const { visibleChange, calendarChange } = useDateRange()
 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
+const formRules: FormRules = {
+    Yckfxe: [{
+        message: '请输入一次扣费限额',
+        validator: () => {
+            return !!formData.Yckfxe
         }
-    })
-    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))
-                }
+    }],
+    Xysxrq: [{
+        message: '请选择协议生效期',
+        validator: () => {
+            return !!formData.Xysxrq
+        }
+    }],
+    Xydqrq: [{
+        message: '请请选择协议到期日',
+        validator: () => {
+            return !!formData.Xydqrq
+        }
+    }],
+    Kksjdw: [{
+        message: '请选择扣款单位',
+        validator: () => {
+            return !!formData.Yckfxe
+        }
+    }],
+    Kkzqnkfxe: [{
+        message: '请输入扣费周期内扣款限额',
+        validator: () => {
+            return !!formData.Kkzqnkfxe
+        }
+    }],
+    Kkzqnxzbs: [{
+        message: '请输入扣费周期内限制笔数',
+        validator: () => {
+            return !!formData.Kkzqnxzbs
+        }
+    }],
+    Lxdh: [{
+        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('未签约')
-                    }
-                }
+            onSubmit().then(() => {
+                ElMessage.success('验证码发送成功')
+            }).catch((err) => {
+                ElMessage.error('验证码发送失败:' + err)
             })
         }
     })

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

@@ -28,7 +28,7 @@ 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 { queryGetGtwithholdsigninfo, queryBankAccountSign } from '@/services/api/bank'
 import { getSignStatusName, SignStatus } from '@/constants/bank'
 import { ElMessage } from 'element-plus'
 import AppTable from '@pc/components/base/table/index.vue'
@@ -52,7 +52,7 @@ const { loading, dataList, run } = useRequest(queryGetGtwithholdsigninfo, {
 })
 
 /// 查询托管银行信息
-useRequest(queryCusBankSignBank, {
+useRequest(queryBankAccountSign, {
     onSuccess: (res) => {
         /// 签约状态
         if (res.data.length != 0) {

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

@@ -72,6 +72,50 @@ export function t2bBankDeposit(config: RequestConfig<Partial<Proto.t2bBankDeposi
 }
 
 /**
+ * 云缴费代扣入金申请
+ */
+export function YJF_WithholdInApply(config: RequestConfig<Partial<Proto.YJF_WithholdInApplyReq>>) {
+    return http.mqRequest<Proto.YJF_WithholdInApplyRsp>({
+        data: config.data,
+        requestCode: 'YJF_WithholdInApplyReq',
+        responseCode: 'YJF_WithholdInApplyRsp',
+    })
+}
+
+/**
+ * 云缴费代扣解约
+ */
+export function YJF_WithholdSignOut(config: RequestConfig<Partial<Proto.YJF_WithholdSignOutReq>>) {
+    return http.mqRequest<Proto.YJF_WithholdSignOutRsp>({
+        data: config.data,
+        requestCode: 'YJF_WithholdSignOutReq',
+        responseCode: 'YJF_WithholdSignOutRsp',
+    })
+}
+
+/**
+ * 云缴费代扣签约
+ */
+export function YJF_WithholdSignInSMS(config: RequestConfig<Partial<Proto.YJF_WithholdSignInSMSReq>>) {
+    return http.mqRequest<Proto.YJF_WithholdSignInSMSRsp>({
+        data: config.data,
+        requestCode: 'YJF_WithholdSignInSMSReq',
+        responseCode: 'YJF_WithholdSignInSMSRsp',
+    })
+}
+
+/**
+ * 云缴费获取代扣签约短信验证码
+ */
+export function YJF_GetWithholdSignInSMSVCode(config: RequestConfig<Partial<Proto.YJF_GetWithholdSignInSMSVCodeReq>>) {
+    return http.mqRequest<Proto.YJF_GetWithholdSignInSMSVCodeRsp>({
+        data: config.data,
+        requestCode: 'YJF_GetWithholdSignInSMSVCodeReq',
+        responseCode: 'YJF_GetWithholdSignInSMSVCodeRsp',
+    })
+}
+
+/**
  * 查询托管银行
  */
 export function queryCusBankSignBank(config: RequestConfig = {}) {

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

@@ -12,7 +12,7 @@ export interface EnumType {
     disabled?: boolean;
 }
 
-const enumKeys = ['confirmStatus', 'executetype', 'operatetypesearch', 'deliveryPayMode', 'applystatus', 'deliveryStatus', 'operateType', 'WRPresaleStatus', 'clientType', 'stepStatus', 'scoreConfigType', 'GZBSCPayStatus', 'performanceStatus', 'handlestatus', 'performanceType', 'accountBusinessCode', 'certificatetype', 'signstatus', 'thjOrderStatus', 'THJDeliveryMode', 'goodsunit', 'WROutInApplyStatus2', 'THJTransferStatus', 'WRTradeOrderStatus', 'THJMarket', 'THJProfitRoleType', 'appointmentModelOut', 'orderstatus', 'Pricemode2', 'buildtype', 'listingselecttype', 'certypeperson', 'runstatus', 'transferapplystatus'] as const
+const enumKeys = ['confirmStatus', 'executetype', 'operatetypesearch', 'deliveryPayMode', 'applystatus', 'deliveryStatus', 'operateType', 'WRPresaleStatus', 'clientType', 'stepStatus', 'scoreConfigType', 'GZBSCPayStatus', 'gt_kksjdw', 'performanceStatus', 'handlestatus', 'performanceType', 'accountBusinessCode', 'certificatetype', 'signstatus', 'thjOrderStatus', 'THJDeliveryMode', 'goodsunit', 'WROutInApplyStatus2', 'THJTransferStatus', 'WRTradeOrderStatus', 'THJMarket', 'THJProfitRoleType', 'appointmentModelOut', 'orderstatus', 'Pricemode2', 'buildtype', 'listingselecttype', 'certypeperson', 'runstatus', 'transferapplystatus'] as const
 
 const enumMap = new Map<typeof enumKeys[number], ShallowRef<Model.EnumRsp[]>>()
 

+ 93 - 0
src/types/proto/bank.d.ts

@@ -223,5 +223,98 @@ declare global {
             CenterErrCode: string; // 中心返回码
             CenterErrMsg: string; // 中心返回结果说明
         }
+
+        // 云缴费获取代扣签约短信验证码请求
+        interface YJF_GetWithholdSignInSMSVCodeReq {
+            Header?: IMessageHead;  // 消息头
+            AccountID: number; // 资金账号ID
+            UserID: number; // 用户ID
+            LoginID: number; // 登录账号ID
+            Yckfxe: string; // 一次扣费限额-无限额度0.00,
+            Xysxrq: string; // 协议生效日期-yyyy-mm-dd
+            Xydqrq: string; // 协议到期日期-yyyy-mm-dd
+            Kksjdw: string; // 扣款时间单位-枚举:gt_kksjdw
+            Kksjbc: string; // 扣款时间步长-数字2位,
+            Kkzqnkfxe: string; // 扣款周期内扣费限额-无限额度0.00,16+2(小数位固定)
+            Kkzqnxzbs: string; // 扣款周期内限制笔数-无限额默认填0,
+            Lxdh: string; // 联系电话
+            Addr?: string; // 地址
+            Remark?: string; // 备注
+            ClientSerialNo: string; // 客户端流水号-全局唯一码
+        }
+        
+        // 云缴费获取代扣签约短信验证码响应
+        interface YJF_GetWithholdSignInSMSVCodeRsp {
+            Header: IMessageHead; // 消息头
+            RetCode: number; // 返回码
+            RetDesc: string; // 描述信息
+            AccountId: number; // uint64 查询资金账号
+            UserID: number; // 用户ID
+            LoginID: number; // 登录账号ID
+            ClientSerialNo: string; // 客户端流水号-请求的流水号
+        }
+
+        // 云缴费代扣签约请求
+        interface YJF_WithholdSignInSMSReq {
+            Header?: IMessageHead;  // 消息头
+            AccountID: number; // 资金账号ID
+            UserID: number; // 用户ID
+            LoginID: number; // 登录账号ID
+            ClientSerialNo: string; // 客户端流水号-申请短信验证码时的流水号
+            VCode?: string; // 短信验证码
+        }
+
+        // 云缴费代扣签约响应
+        interface YJF_WithholdSignInSMSRsp {
+            Header?: IMessageHead;  // 消息头
+            RetCode: number; // 返回码
+            RetDesc: string; // 描述信息
+            AccountId: number; // uint64 查询资金账号
+            UserID: number; // 用户ID
+            LoginID: number; // 登录账号ID
+            ClientSerialNo: string; // 客户端流水号-请求的流水号
+        }
+
+        // 云缴费代扣解约请求
+        interface YJF_WithholdSignOutReq {
+            Header?: IMessageHead;  // 消息头
+            AccountID: number; // 资金账号ID
+            UserID: number; // 用户ID
+            LoginID: number; // 登录账号ID
+            ClientSerialNo: string; // 客户端流水号-全局唯一码
+        }
+
+        // 云缴费代扣解约响应
+        interface YJF_WithholdSignOutRsp {
+            Header?: IMessageHead;  // 消息头
+            RetCode: number; // 返回码
+            RetDesc: string; // 描述信息
+            AccountId: number; // uint64 查询资金账号
+            UserID: number; // 用户ID
+            LoginID: number; // 登录账号ID
+            ClientSerialNo: string; // 客户端流水号-请求的流水号
+        }
+
+        // 云缴费代扣入金申请请求
+        interface YJF_WithholdInApplyReq {
+            Header?: IMessageHead;  // 消息头
+            AccountID: number; // 资金账号ID
+            UserID: number; // 用户ID
+            LoginID: number; // 登录账号ID
+            BillAmount?: string; // 代扣金额-固定两位小数,整数16位,小数2位
+            ClientSerialNo: string; // 客户端流水号-全局唯一码
+        }
+
+        // 云缴费代扣入金申请响应
+        interface YJF_WithholdInApplyRsp {
+            Header?: IMessageHead;  // 消息头
+            RetCode: number; // 返回码
+            RetDesc: string; // 描述信息
+            AccountId: number; // uint64 查询资金账号
+            UserID: number; // 用户ID
+            LoginID: number; // 登录账号ID
+            ClientSerialNo: string; // 客户端流水号-请求的流水号
+        }
+
     }
 }