diff --git a/src/views/baseapi/dict/DictList.vue b/src/views/baseapi/dict/DictList.vue index fc602eb2d..9a43645ab 100644 --- a/src/views/baseapi/dict/DictList.vue +++ b/src/views/baseapi/dict/DictList.vue @@ -21,7 +21,7 @@
- + - - - @@ -34,14 +26,6 @@ placeholder="请输入网关H5端地址" /> - - - () - const form = ref({ - mobileEmbedded: false, - pcEmbedded: false, - }) + const form = ref({}) const edit = ref(false) const rules = {} as Record diff --git a/src/views/daxpay/common/allocation/group/AllocationGroup.api.ts b/src/views/daxpay/common/allocation/group/AllocationGroup.api.ts index 4ee79d08b..e8b49e2f4 100644 --- a/src/views/daxpay/common/allocation/group/AllocationGroup.api.ts +++ b/src/views/daxpay/common/allocation/group/AllocationGroup.api.ts @@ -1,12 +1,12 @@ import { defHttp } from '@/utils/http/axios' import { PageResult, Result } from '#/axios' -import { BaseEntity } from '#/web' +import { BaseEntity, MchEntity } from "#/web"; /** * 分页查询 */ export function page(params) { - return defHttp.get>>({ + return defHttp.get>>({ url: '/allocation/group/page', params, }) @@ -16,7 +16,7 @@ export function page(params) { * 查询详情 */ export function get(id) { - return defHttp.get>({ + return defHttp.get>({ url: '/allocation/group/findById', params: { id }, }) @@ -26,7 +26,7 @@ export function get(id) { * 查询分账接收方信息 */ export function getReceivers(groupId) { - return defHttp.get>({ + return defHttp.get>({ url: '/allocation/group/findReceiversByGroups', params: { groupId }, }) @@ -35,8 +35,8 @@ export function getReceivers(groupId) { /** * 创建 */ -export function add(data: AllocationGroup) { - return defHttp.post>({ +export function add(data: AllocGroup) { + return defHttp.post>({ url: '/allocation/group/create', data, }) @@ -45,8 +45,8 @@ export function add(data: AllocationGroup) { /** * 修改 */ -export function update(data: AllocationGroup) { - return defHttp.post>({ +export function update(data: AllocGroup) { + return defHttp.post>({ url: '/allocation/group/update', data, }) @@ -105,10 +105,10 @@ export function updateRate(receiverId, rate: number) { /** * 编码是否存在 */ -export function existsByNo(receiverNo) { +export function existsByNo(groupNo, appId) { return defHttp.get>({ url: '/allocation/group/existsByGroupNo', - params: { receiverNo }, + params: { groupNo, appId }, }) } @@ -135,7 +135,7 @@ export function cancelDefaultGroup(id) { /** * 分账组 */ -export interface AllocationGroup extends BaseEntity { +export interface AllocGroup extends MchEntity { /** * 分账组编号 */ @@ -152,6 +152,10 @@ export interface AllocationGroup extends BaseEntity { * 总分账比例 */ totalRate?: number + /** + * 是否为默认分账组 + */ + defaultGroup?: boolean /** * 分账组描述 */ @@ -161,15 +165,11 @@ export interface AllocationGroup extends BaseEntity { /** * 分账组接收方信息 */ -export interface AllocationGroupReceiver extends BaseEntity { +export interface AllocGroupReceiver extends BaseEntity { /** * 分账接收方ID */ receiverId?: string - /** - * 默认分账组 - */ - defaultGroup?: boolean /** * 分账比例 */ diff --git a/src/views/daxpay/common/allocation/group/AllocationGroupConfig.vue b/src/views/daxpay/common/allocation/group/AllocationGroupConfig.vue index d47c81865..56976f57c 100644 --- a/src/views/daxpay/common/allocation/group/AllocationGroupConfig.vue +++ b/src/views/daxpay/common/allocation/group/AllocationGroupConfig.vue @@ -1,34 +1,48 @@ - + diff --git a/src/views/daxpay/common/allocation/group/AllocationGroupSelect.vue b/src/views/daxpay/common/allocation/group/AllocationGroupSelect.vue index 4dffbe6c5..39f4a4769 100644 --- a/src/views/daxpay/common/allocation/group/AllocationGroupSelect.vue +++ b/src/views/daxpay/common/allocation/group/AllocationGroupSelect.vue @@ -10,28 +10,39 @@ > - + ([]) - let currentChannel = ref('') - let queryParam = ref({}) - let relationTypeList = ref([]) + const visible = ref(false) + const selectIds = ref([]) + const currentChannel = ref('') + const currentAppId = ref('') + const relationTypeList = ref([]) const xTable = ref() const fields = computed(() => { return [ { field: 'receiverNo', type: STRING, name: '接收方编号', placeholder: '请输入接收方编号' }, - { field: 'relationType', type: LIST, name: '分账关系', placeholder: '请选择分账关系', selectList: relationTypeList }, + { + field: 'relationType', + type: LIST, + name: '分账关系', + placeholder: '请选择分账关系', + selectList: relationTypeList.value, + }, ] as QueryField[] }) const checkboxConfig = { @@ -87,12 +105,13 @@ * @param receiverIds 已经选中的用户id集合 * @param channel 通道 */ - async function init(receiverIds, channel) { - visible = true - selectIds = receiverIds - currentChannel = channel - relationTypeList = await dictDropDown('AllocationRelationType') - queryPage() + async function init(receiverIds, channel, appId) { + visible.value = true + selectIds.value = receiverIds + currentChannel.value = channel + currentAppId.value = appId + relationTypeList.value = await dictDropDown('alloc_relation_type') + queryPage().then() } /** * 查询 @@ -100,9 +119,10 @@ function queryPage() { loading.value = true page({ - ...queryParam, + ...model.queryParam, ...pages, - channel: currentChannel, + appId: currentAppId.value, + channel: currentChannel.value, }).then(({ data }) => { pageQueryResHandel(data) }) @@ -116,9 +136,9 @@ */ function checkboxCallback() { // 非本页选中的 - const reserveUsers = xTable.getCheckboxReserveRecords() + const reserveUsers = xTable.value.getCheckboxReserveRecords() // 本页选中的 - const checkObjs = xTable.getCheckboxRecords() + const checkObjs = xTable.value.getCheckboxRecords() const objs = reserveUsers.concat(checkObjs) const ids = objs.map((res) => res.id) if (!ids.length) { @@ -127,28 +147,21 @@ } emits('ok', ids) - visible = false + visible.value = false } /** * 关闭 */ function handleCancel() { - visible = false + visible.value = false } /** * 禁止选中的行 复选 */ function banCheckbox({ row }) { - return !selectIds.includes(row.id) + return !selectIds.value.includes(row.id) } defineExpose({ init }) - diff --git a/src/views/daxpay/common/allocation/receiver/AllocationReceiverEdit.vue b/src/views/daxpay/common/allocation/receiver/AllocationReceiverEdit.vue index f071de4ad..a2823dcbc 100644 --- a/src/views/daxpay/common/allocation/receiver/AllocationReceiverEdit.vue +++ b/src/views/daxpay/common/allocation/receiver/AllocationReceiverEdit.vue @@ -62,7 +62,7 @@ placeholder="请选择分账关系类型" /> - + @@ -128,7 +128,7 @@ receiverType: [{ required: true, message: '请选择分账接收方类型' }], receiverAccount: [{ required: true, message: '请输入接收方账号' }], relationType: [{ required: true, message: '请选择分账关系类型' }], - relationName: [{ required: form.value.relationType === 'CUSTOM', message: '请输入类型关系名称' }], + relationName: [{ required: form.value.relationType === 'custom', message: '请输入类型关系名称' }], } as Record }) @@ -150,7 +150,7 @@ */ async function initData() { findChannels().then(({ data }) => (payChannelList.value = data)) - relationTypeList.value = await dictDropDown('AllocRelationType') + relationTypeList.value = await dictDropDown('alloc_relation_type') } /** @@ -164,7 +164,9 @@ rawForm.value = { ...form.value } }) confirmLoading.value = false - findReceiverTypeByChannel(form.value.channel).then(({ data }) => (receiverTypeList.value = data)) + findReceiverTypeByChannel(form.value.channel).then( + ({ data }) => (receiverTypeList.value = data), + ) } else { confirmLoading.value = false } diff --git a/src/views/daxpay/common/allocation/receiver/AllocationReceiverList.vue b/src/views/daxpay/common/allocation/receiver/AllocationReceiverList.vue index 64319ca16..30e261b3e 100644 --- a/src/views/daxpay/common/allocation/receiver/AllocationReceiverList.vue +++ b/src/views/daxpay/common/allocation/receiver/AllocationReceiverList.vue @@ -3,24 +3,32 @@ showFooter v-bind="$attrs" width="70%" - title="收银配置" + title="接收方配置" :mask-closable="true" :open="visible" @close="visible = false" >
- +
{{ row.receiverNo }} - + - + - + @@ -72,8 +80,8 @@ diff --git a/src/views/daxpay/common/constant/api/ApiConstList.vue b/src/views/daxpay/common/constant/api/ApiConstList.vue index cdadab1a5..45de7382d 100644 --- a/src/views/daxpay/common/constant/api/ApiConstList.vue +++ b/src/views/daxpay/common/constant/api/ApiConstList.vue @@ -13,7 +13,7 @@
- + @@ -120,8 +120,8 @@ import Icon from '@/components/Icon/Icon.vue' import ChannelCashierConfigList from '@/views/daxpay/common/merchant/cashier/ChannelCashierConfigList.vue' import ChannelCashierQrCode from '@/views/daxpay/common/merchant/cashier/ChannelCashierQrCode.vue' - import AllocationReceiverList from "@/views/daxpay/common/allocation/receiver/AllocationReceiverList.vue"; - // import AllocationGroupList from "@/views/daxpay/common/allocation/group/AllocationGroupList.vue" + import AllocationReceiverList from '@/views/daxpay/common/allocation/receiver/AllocationReceiverList.vue' + import AllocationGroupList from '@/views/daxpay/common/allocation/group/AllocationGroupList.vue' // 使用hooks const { diff --git a/src/views/daxpay/common/notice/callback/CallbackRecordList.vue b/src/views/daxpay/common/notice/callback/CallbackRecordList.vue index 5a1dafd11..68990a871 100644 --- a/src/views/daxpay/common/notice/callback/CallbackRecordList.vue +++ b/src/views/daxpay/common/notice/callback/CallbackRecordList.vue @@ -10,7 +10,7 @@