diff --git a/src/views/daxpay/common/channel/adapay/config/AdapayConfigEdit.vue b/src/views/daxpay/common/channel/adapay/config/AdapayConfigEdit.vue index bf6a5b9c..c3230151 100644 --- a/src/views/daxpay/common/channel/adapay/config/AdapayConfigEdit.vue +++ b/src/views/daxpay/common/channel/adapay/config/AdapayConfigEdit.vue @@ -23,7 +23,11 @@ - + + + {{ `${item.label || '-'}(${item.value})` }} + + ([]) // 校验 const rules = computed(() => { return { - adaPayAppId: [{ required: true, message: '请输入汇付AppId' }], + adaPayAppId: [{ required: true, message: '请选择汇付应用号' }], enable: [{ required: true, message: '请选择是否启用' }], sandbox: [{ required: true, message: '请选择是否为沙箱环境' }], apiKey: [{ required: true, message: '请输入汇付交易密钥' }], mchPrivateKey: [{ required: true, message: '请输入汇付商户RSA私钥' }], - // adaPayPublicKey: [{ required: true, message: '请输入汇平台RSA公钥' }], } as Record }) // 事件 @@ -135,11 +141,21 @@ */ function init(config: ChannelConfig) { channelConfig.value = config + initData() resetForm() visible.value = true getInfo() } + /** + * 初始化数据 + */ + function initData() { + findByChannel(channelConfig.value.mchNo, channelConfig.value.channel).then(({ data }) => { + onbMchNoList.value = data + }) + } + /** * 获取信息 */ diff --git a/src/views/daxpay/common/channel/alipay/config/payment/AlipayConfig.api.ts b/src/views/daxpay/common/channel/alipay/config/payment/AlipayConfig.api.ts index 739c6162..f56a58d1 100644 --- a/src/views/daxpay/common/channel/alipay/config/payment/AlipayConfig.api.ts +++ b/src/views/daxpay/common/channel/alipay/config/payment/AlipayConfig.api.ts @@ -42,7 +42,6 @@ export function updateSub(obj: AlipaySubConfig) { }) } - /** * 支付宝配置 */ @@ -80,12 +79,12 @@ export interface AlipayConfig extends MchEntity { } /** - * 子商户服务商配置 + * 支付宝子商户配置 */ export interface AlipaySubConfig extends MchEntity { // 服务商号 isvNo?: string - // 应用授权Token + // 应用授权令牌 appAuthToken?: string // 是否启用 enable: boolean diff --git a/src/views/daxpay/common/channel/alipay/config/payment/AlipayConfigEdit.vue b/src/views/daxpay/common/channel/alipay/config/payment/AlipayConfigEdit.vue index 468564eb..c3391cd9 100644 --- a/src/views/daxpay/common/channel/alipay/config/payment/AlipayConfigEdit.vue +++ b/src/views/daxpay/common/channel/alipay/config/payment/AlipayConfigEdit.vue @@ -22,7 +22,15 @@ - + + + {{ `${item.label || '-'}(${item.value})` }} + + () const channelConfig = ref({}) const isIsv = ref(false) + const onbMchNoList = ref([]) const form = ref({ aliAppId: '', @@ -211,7 +222,7 @@ // 校验 const rules = computed(() => { return { - aliAppId: [{ required: true, message: '请输入AppId' }], + aliAppId: [{ required: true, message: '请选择支付宝商户AppId' }], enable: [{ required: true, message: '请选择是否启用' }], authType: [{ required: true, message: '请选择认证方式' }], appAuthToken: [{ required: isIsv.value, message: '请输入特约商户AppAuthToken' }], @@ -236,18 +247,28 @@ isIsv.value = isv resetForm() visible.value = true + initData() getInfo() } + + /** + * 初始化数据 + */ + function initData() { + findByChannel(channelConfig.value.mchNo, channelConfig.value.channel).then(({ data }) => { + onbMchNoList.value = data + }) + } /** * 获取信息 */ function getInfo() { - getConfig(channelConfig.value.appId).then(({ data }) => { - confirmLoading.value = true - rawForm = { ...data } - form.value = data - confirmLoading.value = false - }) + getConfig(channelConfig.value.appId).then(({ data }) => { + confirmLoading.value = true + rawForm = { ...data } + form.value = data + confirmLoading.value = false + }) } /** * 更新 diff --git a/src/views/daxpay/common/channel/alipay/config/payment/AlipaySubConfigEdit.vue b/src/views/daxpay/common/channel/alipay/config/payment/AlipaySubConfigEdit.vue index 756eea1d..d39aa554 100644 --- a/src/views/daxpay/common/channel/alipay/config/payment/AlipaySubConfigEdit.vue +++ b/src/views/daxpay/common/channel/alipay/config/payment/AlipaySubConfigEdit.vue @@ -21,6 +21,13 @@ + + + - - + + + + {{ `${item.label || '-'}(${item.value})` }} + + () const channelConfig = ref({}) + const onbMchNoList = ref([]) const form = ref({ enable: true, @@ -86,7 +104,7 @@ // 校验 const rules = computed(() => { return { - appAuthToken: [{ required: true, message: '应用授权Token不可为空' }], + appAuthToken: [{ required: true, message: '应用授权令牌不可为空' }], enable: [{ required: true, message: '请选择是否启用' }], } as Record }) @@ -99,9 +117,19 @@ channelConfig.value = config resetForm() visible.value = true + initData() getInfo() } + /** + * 初始化数据 + */ + function initData() { + findByChannel(channelConfig.value.mchNo, channelConfig.value.channel).then(({ data }) => { + onbMchNoList.value = data + }) + } + /** * 获取信息 */ diff --git a/src/views/daxpay/common/channel/dougong/config/payment/DougongSubConfigEdit.vue b/src/views/daxpay/common/channel/dougong/config/payment/DougongSubConfigEdit.vue index 4c21e4f7..040a7134 100644 --- a/src/views/daxpay/common/channel/dougong/config/payment/DougongSubConfigEdit.vue +++ b/src/views/daxpay/common/channel/dougong/config/payment/DougongSubConfigEdit.vue @@ -30,7 +30,11 @@ /> - + + + {{ `${item.label || '-'}(${item.value})` }} + + 微信认证配置 @@ -94,6 +98,8 @@ import { BasicDrawer } from '@/components/Drawer' import { ChannelConfig } from '@/views/daxpay/common/merchant/config/ChannelConfig.api' import { YeePaySubConfig } from '@/views/daxpay/common/channel/yeepay/config/payment/YeePayConfig.api' + import { LabeledValue } from 'ant-design-vue/lib/select' + import { findByChannel } from '@/views/daxpay/common/onboarded/OnbMchInfo.api' const { handleCancel, diffForm, labelCol, wrapperCol, confirmLoading, visible, showable } = useFormEdit() @@ -102,7 +108,7 @@ const formRef = ref() const channelConfig = ref({}) const form = ref({}) - + const onbMchNoList = ref([]) let rawForm: any = {} // 校验 @@ -121,11 +127,21 @@ */ function init(config: ChannelConfig) { channelConfig.value = config + initData() resetForm() visible.value = true getInfo() } + /** + * 初始化数据 + */ + function initData() { + findByChannel(channelConfig.value.mchNo, channelConfig.value.channel).then(({ data }) => { + onbMchNoList.value = data + }) + } + /** * 获取信息 */ diff --git a/src/views/daxpay/common/channel/fuyou/config/payment/FuyouSubConfigEdit.vue b/src/views/daxpay/common/channel/fuyou/config/payment/FuyouSubConfigEdit.vue index 89279c72..4cdd4e99 100644 --- a/src/views/daxpay/common/channel/fuyou/config/payment/FuyouSubConfigEdit.vue +++ b/src/views/daxpay/common/channel/fuyou/config/payment/FuyouSubConfigEdit.vue @@ -30,7 +30,11 @@ /> - + + + {{ `${item.label || '-'}(${item.value})` }} + + @@ -56,10 +60,7 @@ v-model:checked="form.wxChannelAuth" /> - + ({ enable: true, }) + const onbMchNoList = ref([]) const form = ref({ enable: true, termNo: '8888888', @@ -148,9 +152,19 @@ channelConfig.value = config resetForm() visible.value = true + initData() getInfo() } + /** + * 初始化数据 + */ + function initData() { + findByChannel(channelConfig.value.mchNo, channelConfig.value.channel).then(({ data }) => { + onbMchNoList.value = data + }) + } + /** * 获取信息 */ diff --git a/src/views/daxpay/common/channel/hkrt/config/payment/HkrtSubConfigEdit.vue b/src/views/daxpay/common/channel/hkrt/config/payment/HkrtSubConfigEdit.vue index 39b0d331..be7bd24c 100644 --- a/src/views/daxpay/common/channel/hkrt/config/payment/HkrtSubConfigEdit.vue +++ b/src/views/daxpay/common/channel/hkrt/config/payment/HkrtSubConfigEdit.vue @@ -31,7 +31,7 @@ - + {{ `${item.label || '-'}(${item.value})` }} @@ -60,10 +60,7 @@ v-model:checked="form.wxChannelAuth" /> - + { + onbMchNoList.value = data + }) } /** diff --git a/src/views/daxpay/common/channel/lakala/config/payment/LakalaSubConfigEdit.vue b/src/views/daxpay/common/channel/lakala/config/payment/LakalaSubConfigEdit.vue index 4c4b5705..d43b5c58 100644 --- a/src/views/daxpay/common/channel/lakala/config/payment/LakalaSubConfigEdit.vue +++ b/src/views/daxpay/common/channel/lakala/config/payment/LakalaSubConfigEdit.vue @@ -30,7 +30,11 @@ /> - + + + {{ `${item.label || '-'}(${item.value})` }} + + @@ -105,6 +109,8 @@ import { useMessage } from '@/hooks/web/useMessage' import { BasicDrawer } from '@/components/Drawer' import { ChannelConfig } from '@/views/daxpay/common/merchant/config/ChannelConfig.api' + import { LabeledValue } from 'ant-design-vue/lib/select' + import { findByChannel } from '@/views/daxpay/common/onboarded/OnbMchInfo.api' const { handleCancel, diffForm, labelCol, wrapperCol, confirmLoading, visible, showable } = useFormEdit() @@ -114,6 +120,7 @@ const channelConfig = ref({ enable: true, }) + const onbMchNoList = ref([]) const form = ref({ enable: true, readSystem: true, @@ -122,6 +129,7 @@ // 校验 const rules = computed(() => { return { + onbMchNo: [{ required: true, message: '请选择拉卡拉进件商户' }], enable: [{ required: true, message: '请选择是否启用' }], merchantNo: [{ required: true, message: '请输入商户编号' }], termNo: [{ required: true, message: '请输入终端号' }], @@ -136,9 +144,19 @@ channelConfig.value = config resetForm() visible.value = true + initData() getInfo() } + /** + * 初始化数据 + */ + function initData() { + findByChannel(channelConfig.value.mchNo, channelConfig.value.channel).then(({ data }) => { + onbMchNoList.value = data + }) + } + /** * 获取信息 */ diff --git a/src/views/daxpay/common/channel/leshua/config/payment/LeshuaConfig.api.ts b/src/views/daxpay/common/channel/leshua/config/payment/LeshuaConfig.api.ts index 0a74dacf..084fb9d6 100644 --- a/src/views/daxpay/common/channel/leshua/config/payment/LeshuaConfig.api.ts +++ b/src/views/daxpay/common/channel/leshua/config/payment/LeshuaConfig.api.ts @@ -23,7 +23,7 @@ export function update(obj: LeshuaSubConfig) { } /** - * 子商户服务商配置 + * 乐刷支付子商户配置 */ export interface LeshuaSubConfig extends MchEntity { // 服务商号 diff --git a/src/views/daxpay/common/channel/leshua/config/payment/LeshuaSubConfigEdit.vue b/src/views/daxpay/common/channel/leshua/config/payment/LeshuaSubConfigEdit.vue index e24adc71..bf6ef0c2 100644 --- a/src/views/daxpay/common/channel/leshua/config/payment/LeshuaSubConfigEdit.vue +++ b/src/views/daxpay/common/channel/leshua/config/payment/LeshuaSubConfigEdit.vue @@ -38,7 +38,7 @@ :rules="[{ required: true, message: '请选择乐刷进件商户' }]" > - + {{ `${item.label || '-'}(${item.value})` }} @@ -114,6 +114,7 @@ import { BasicDrawer } from '@/components/Drawer' import { ChannelConfig } from '@/views/daxpay/common/merchant/config/ChannelConfig.api' import { LabeledValue } from 'ant-design-vue/lib/select' + import { findByChannel } from '@/views/daxpay/common/onboarded/OnbMchInfo.api' const { handleCancel, diffForm, labelCol, wrapperCol, confirmLoading, visible, showable } = useFormEdit() @@ -144,6 +145,14 @@ getInfo() } + /** + * 初始化数据 + */ + function initData() { + findByChannel(channelConfig.value.mchNo, channelConfig.value.channel).then(({ data }) => { + onbMchNoList.value = data + }) + } /** * 获取信息 diff --git a/src/views/daxpay/common/channel/sand/config/payment/SandSubConfigEdit.vue b/src/views/daxpay/common/channel/sand/config/payment/SandSubConfigEdit.vue index 63531229..efee65bc 100644 --- a/src/views/daxpay/common/channel/sand/config/payment/SandSubConfigEdit.vue +++ b/src/views/daxpay/common/channel/sand/config/payment/SandSubConfigEdit.vue @@ -31,6 +31,11 @@ + + + {{ `${item.label || '-'}(${item.value})` }} + + @@ -56,10 +61,7 @@ v-model:checked="form.wxChannelAuth" /> - + ({ enable: true, }) + const onbMchNoList = ref([]) const form = ref({ enable: true, storeId: '100001', @@ -134,6 +139,7 @@ // 校验 const rules = computed(() => { return { + onbMchNo: [{ required: true, message: '请选择杉德进件商户' }], enable: [{ required: true, message: '请选择是否启用' }], merchantNo: [{ required: true, message: '请输入商户编号' }], storeId: [{ required: true, message: '请输入门店号' }], @@ -148,9 +154,19 @@ channelConfig.value = config resetForm() visible.value = true + initData() getInfo() } + /** + * 初始化数据 + */ + function initData() { + findByChannel(channelConfig.value.mchNo, channelConfig.value.channel).then(({ data }) => { + onbMchNoList.value = data + }) + } + /** * 获取信息 */ diff --git a/src/views/daxpay/common/channel/vbill/config/payment/VbillSubConfigEdit.vue b/src/views/daxpay/common/channel/vbill/config/payment/VbillSubConfigEdit.vue index 912f9223..eba408db 100644 --- a/src/views/daxpay/common/channel/vbill/config/payment/VbillSubConfigEdit.vue +++ b/src/views/daxpay/common/channel/vbill/config/payment/VbillSubConfigEdit.vue @@ -30,7 +30,15 @@ /> - + + + {{ `${item.label || '-'}(${item.value})` }} + + 微信认证配置 () const channelConfig = ref({}) + const onbMchNoList = ref([]) const form = ref({ enable: true, @@ -118,6 +129,7 @@ // 校验 const rules = computed(() => { return { + onbMchNo: [{ required: true, message: '请选择随行付进件商户' }], enable: [{ required: true, message: '请选择是否启用' }], mno: [{ required: true, message: '请输入随行付商户号' }], } as Record @@ -131,9 +143,19 @@ channelConfig.value = config resetForm() visible.value = true + initData() getInfo() } + /** + * 初始化数据 + */ + function initData() { + findByChannel(channelConfig.value.mchNo, channelConfig.value.channel).then(({ data }) => { + onbMchNoList.value = data + }) + } + /** * 获取信息 */ diff --git a/src/views/daxpay/common/channel/wechat/config/payment/WechatPayConfigEdit.vue b/src/views/daxpay/common/channel/wechat/config/payment/WechatPayConfigEdit.vue index 783afe96..c3f45485 100644 --- a/src/views/daxpay/common/channel/wechat/config/payment/WechatPayConfigEdit.vue +++ b/src/views/daxpay/common/channel/wechat/config/payment/WechatPayConfigEdit.vue @@ -22,7 +22,11 @@ - + + + {{ item.label }} + + - - - - - - - - - 服务商用户标识 - 子商户应用用户标识 - - ({}) + const onbMchNoList = ref([]) // 校验 const rules = computed(() => { return { - wxMchId: [{ required: true, message: '请输入商户号' }], + wxMchId: [{ required: true, message: '请选择商户号' }], wxAppId: [{ required: true, message: '请输入应用编号' }], subMchId: [{ required: isIsv.value, message: '请输入子商户号' }], enable: [{ required: true, message: '请选择是否启用' }], @@ -308,8 +295,17 @@ isIsv.value = isv visible.value = true resetForm() + initData() getInfo() } + /** + * 初始化进件商户号列表 + */ + function initData() { + findByChannel(channelConfig.value.mchNo, channelConfig.value.channel).then(({ data }) => { + onbMchNoList.value = data + }) + } /** * 获取信息 */ diff --git a/src/views/daxpay/common/channel/wechat/config/payment/WechatSubConfigEdit.vue b/src/views/daxpay/common/channel/wechat/config/payment/WechatSubConfigEdit.vue index 728a71f1..78111030 100644 --- a/src/views/daxpay/common/channel/wechat/config/payment/WechatSubConfigEdit.vue +++ b/src/views/daxpay/common/channel/wechat/config/payment/WechatSubConfigEdit.vue @@ -29,12 +29,20 @@ v-model:checked="form.enable" /> - - + + placeholder="请选择微信子商户号" + > + + {{ `${item.label || '-'}(${item.value})` }} + + 授权认证配置 @@ -99,11 +107,13 @@ + + diff --git a/src/views/daxpay/common/onboarded/OnbMchInfoList.vue b/src/views/daxpay/common/onboarded/OnbMchInfoList.vue new file mode 100644 index 00000000..05ad0096 --- /dev/null +++ b/src/views/daxpay/common/onboarded/OnbMchInfoList.vue @@ -0,0 +1,181 @@ + + + + +