feat 商户端开发, 基础架构搭建

This commit is contained in:
DaxPay
2024-08-27 20:19:46 +08:00
parent ef77744116
commit 700f5c4345
70 changed files with 612 additions and 115 deletions

View File

@@ -0,0 +1,14 @@
/**
* 终端类型
*/
export enum DaxPayClientEnum {
/**
* 运营端
*/
ADMIN = 'dax-pay-admin',
/**
* 商户端
*/
MERCHANT = 'dax-pay-merchant',
}

View File

@@ -1,6 +1,7 @@
import type { GlobEnvConfig } from '#/config'
import pkg from '../../package.json'
import { API_ADDRESS } from '@/enums/cacheEnum'
import { DaxPayClientEnum } from "@/enums/daxpay/daxpayClientEnum";
export function getCommonStoragePrefix() {
const { VITE_GLOB_APP_TITLE } = getAppEnvConfig()
@@ -51,16 +52,6 @@ export function getAppEnvConfig() {
}
}
/**
* @description: Development mode
*/
export const devMode = 'development'
/**
* @description: Production mode
*/
export const prodMode = 'production'
/**
* @description: Get environment variables
* @returns:
@@ -87,3 +78,10 @@ export function isDevMode(): boolean {
export function isProdMode(): boolean {
return import.meta.env.PROD
}
/**
* 是否为运营端
*/
export function isAdmin() {
return import.meta.env.VITE_GLOB_APP_CLIENT === DaxPayClientEnum.ADMIN
}

View File

@@ -1,6 +1,6 @@
import { defHttp } from '@/utils/http/axios'
import { Result } from '#/axios'
import { MchEntity } from "#/web";
import { MchEntity } from '#/web'
import { unref } from 'vue'
/**

View File

@@ -198,7 +198,7 @@
import { BasicDrawer } from '@/components/Drawer'
import { Icon } from '@/components/Icon'
import BasicTitle from '@/components/Basic/src/BasicTitle.vue'
import { ChannelConfig } from '@/views/daxpay/admin/merchant/channel/ChannelConfig.api'
import { ChannelConfig } from '@/views/daxpay/common/merchant/channel/ChannelConfig.api'
const { handleCancel, diffForm, labelCol, wrapperCol, confirmLoading, visible, showable } =
useFormEdit()

View File

@@ -205,11 +205,11 @@
import { getConfig, saveOrUpdate, WechatPayConfig } from './WechatPayConfig.api'
import { FormInstance, Rule } from 'ant-design-vue/lib/form'
import { BasicDrawer } from '@/components/Drawer'
import Icon from '@/components/Icon/Icon.vue'
import Icon from '../../../../../../components/Icon/Icon.vue'
import { useUpload } from '@/hooks/bootx/useUpload'
import { useMessage } from '@/hooks/web/useMessage'
import BasicTitle from '@/components/Basic/src/BasicTitle.vue'
import { ChannelConfig } from '@/views/daxpay/admin/merchant/channel/ChannelConfig.api'
import { ChannelConfig } from '@/views/daxpay/common/merchant/channel/ChannelConfig.api'
const { handleCancel, diffForm, labelCol, wrapperCol, confirmLoading, visible, showable } =
useFormEdit()

View File

@@ -11,7 +11,13 @@
<div class="m-3 p-3 bg-white">
<vxe-toolbar ref="xToolbar" custom :refresh="{ queryMethod: queryPage }" />
<div class="h-65vh">
<vxe-table height="auto" row-id="id" ref="xTable" :data="pagination.records" :loading="loading">
<vxe-table
height="auto"
row-id="id"
ref="xTable"
:data="pagination.records"
:loading="loading"
>
<vxe-column type="seq" width="60" />
<vxe-column field="code" title="编码" />
<vxe-column field="name" title="名称" />

View File

@@ -1,7 +1,7 @@
import { defHttp } from '@/utils/http/axios'
import { PageResult, Result } from '#/axios'
import { BaseEntity } from '#/web'
import {LabeledValue} from "ant-design-vue/lib/select";
import { LabeledValue } from 'ant-design-vue/lib/select'
/**
*

View File

@@ -98,8 +98,8 @@
import { useDict } from '@/hooks/bootx/useDict'
import { merchantDropdown } from '@/views/daxpay/admin/merchant/info/Merchant.api'
import { LabeledValue } from 'ant-design-vue/lib/select'
import ChannelConfigList from '@/views/daxpay/admin/merchant/channel/ChannelConfigList.vue'
import MerchantNotifyConfigList from '../notify/MerchantNotifyConfigList.vue'
import ChannelConfigList from '@/views/daxpay/common/merchant/channel/ChannelConfigList.vue'
import MerchantNotifyConfigList from '@/views/daxpay/common/merchant/notify/MerchantNotifyConfigList.vue'
import Icon from '@/components/Icon/Icon.vue'
// 使hooks

View File

@@ -6,8 +6,8 @@
import { useMessage } from '@/hooks/web/useMessage'
import { PaymentEnum } from '@/enums/daxpay/PaymentEnum'
import { ChannelConfig } from './ChannelConfig.api'
import AlipayConfigEdit from '@/views/daxpay/admin/channel/alipay/config/AlipayConfigEdit.vue'
import WechatPayConfigEdit from '@/views/daxpay/admin/channel/wechat/config/WechatPayConfigEdit.vue'
import AlipayConfigEdit from '@/views/daxpay/common/channel/alipay/config/AlipayConfigEdit.vue'
import WechatPayConfigEdit from '@/views/daxpay/common/channel/wechat/config/WechatPayConfigEdit.vue'
import { ref } from 'vue'
const { createMessage } = useMessage()

View File

@@ -58,7 +58,7 @@
import alipay from '@/assets/daxpay/alipay.svg'
import wechat from '@/assets/daxpay/wechat.svg'
import unionPay from '@/assets/daxpay/unionPay.svg'
import ChannelConfigEdit from '@/views/daxpay/admin/merchant/channel/ChannelConfigEdit.vue'
import ChannelConfigEdit from '@/views/daxpay/common/merchant/channel/ChannelConfigEdit.vue'
const confirmLoading = ref(false)
const channelConfigs = ref<ChannelConfig[]>([])

View File

@@ -26,7 +26,7 @@
</a-link>
</template>
</vxe-column>
<vxe-column field="noticeType" title="交易类型" :min-width="120" align="center">
<vxe-column field="tradeType" title="交易类型" :min-width="120" align="center">
<template #default="{ row }">
<a-tag>{{ dictConvert('trade_type', row.tradeType) }}</a-tag>
</template>
@@ -48,6 +48,8 @@
/>
<vxe-column field="latestTime" title="最后发送时间" sortable :min-width="170" />
<vxe-column field="createTime" title="创建时间" sortable :min-width="170" />
<vxe-column field="mchNo" title="商户号" :min-width="150" />
<vxe-column field="appId" title="应用号" :min-width="150" />
<vxe-column fixed="right" width="180" :showOverflow="false" title="操作">
<template #default="{ row }">
<a-link @click="show(row)">查看</a-link>
@@ -75,7 +77,7 @@
</template>
<script lang="ts" setup>
import { computed, onMounted, ref } from 'vue'
import { computed, onMounted, ref, watch } from 'vue'
import { CallbackTask, page, send } from './CallbackTask.api'
import useTablePage from '@/hooks/bootx/useTablePage'
import BQuery from '@/components/Bootx/Query/BQuery.vue'
@@ -86,9 +88,11 @@
import ALink from '@/components/Link/Link.vue'
import { LabeledValue } from 'ant-design-vue/lib/select'
import CallbackTaskInfo from './CallbackTaskInfo.vue'
import PayOrderInfo from '@/views/daxpay/admin/order/pay/PayOrderInfo.vue'
import TransferOrderInfo from '@/views/daxpay/admin/order/transfer/TransferOrderInfo.vue'
import PayOrderInfo from '@/views/daxpay/common/order/pay/PayOrderInfo.vue'
import TransferOrderInfo from '@/views/daxpay/common/order/transfer/TransferOrderInfo.vue'
import CallbackRecordList from './CallbackRecordList.vue'
import { merchantDropdown } from '@/views/daxpay/admin/merchant/info/Merchant.api'
import { mchAppDropdown } from '@/views/daxpay/common/merchant/app/MchApp.api'
// 使hooks
const {
@@ -104,22 +108,38 @@
} = useTablePage(queryPage)
const { createMessage, createConfirm } = useMessage()
const { dictConvert, dictDropDown } = useDict()
let noticeTypeList = ref<LabeledValue[]>([])
let tradeTypeList = ref<LabeledValue[]>([])
//
const fields = computed(() => {
return [
{ field: 'tradeNo', type: STRING, name: '平台交易号', placeholder: '请输入完整平台交易号' },
{
field: 'noticeType',
field: 'tradeType',
type: LIST,
name: '消息类型',
placeholder: '请选择消息类型',
selectList: noticeTypeList.value,
name: '通知类型',
placeholder: '请选择通知类型',
selectList: tradeTypeList.value,
},
{
field: 'mchNo',
type: LIST,
name: '商户号',
placeholder: '请选择商户号',
selectList: mchNoOptions.value,
},
{
field: 'appId',
type: LIST,
name: '应用号',
placeholder: '请先选择商户后选择应用号',
selectList: mchAppOptions.value,
},
] as QueryField[]
})
const mchNoOptions = ref<LabeledValue[]>([])
const mchAppOptions = ref<LabeledValue[]>([])
const noticeRecordList = ref<any>()
const noticeTaskInfo = ref<any>()
const payOrderInfo = ref<any>()
@@ -130,20 +150,39 @@
onMounted(() => {
vxeBind()
init()
initData()
queryPage()
})
function vxeBind() {
xTable.value?.connect(xToolbar.value as VxeToolbarInstance)
}
watch(
() => model.queryParam?.mchNo,
(value) => changeMch(value),
)
/**
* 初始化
*/
async function init() {
noticeTypeList.value = await dictDropDown('ClientNoticeType')
async function initData() {
merchantDropdown().then(({ data }) => {
mchNoOptions.value = data
})
tradeTypeList.value = await dictDropDown('trade_type')
}
/**
* 商户变动后更新应用列表
*/
function changeMch(mchNo) {
if (mchNo) {
mchAppDropdown(mchNo).then(({ data }) => {
mchAppOptions.value = data
})
} else {
mchAppOptions.value = []
model.queryParam.appId = undefined
}
}
/**
* 分页查询
*/

View File

@@ -44,6 +44,8 @@
<vxe-column field="delayCount" title="延迟重试次数" sortable :min-width="150" />
<vxe-column field="latestTime" title="最后发送时间" sortable :min-width="170" />
<vxe-column field="createTime" title="创建时间" sortable :min-width="170" />
<vxe-column field="mchNo" title="商户号" :min-width="150" />
<vxe-column field="appId" title="应用号" :min-width="150" />
<vxe-column fixed="right" width="180" :showOverflow="false" title="操作">
<template #default="{ row }">
<a-link @click="show(row)">查看</a-link>
@@ -73,7 +75,7 @@
</template>
<script lang="ts" setup>
import { computed, onMounted, ref } from 'vue'
import { computed, onMounted, ref, watch } from 'vue'
import { NotifyTask, page, send } from './NotifyTask.api'
import useTablePage from '@/hooks/bootx/useTablePage'
import BQuery from '@/components/Bootx/Query/BQuery.vue'
@@ -84,11 +86,13 @@
import ALink from '@/components/Link/Link.vue'
import { LabeledValue } from 'ant-design-vue/lib/select'
import NotifyTaskInfo from './NotifyTaskInfo.vue'
import PayOrderInfo from '@/views/daxpay/admin/order/pay/PayOrderInfo.vue'
import TransferOrderInfo from '@/views/daxpay/admin/order/transfer/TransferOrderInfo.vue'
import PayOrderInfo from '@/views/daxpay/common/order/pay/PayOrderInfo.vue'
import TransferOrderInfo from '@/views/daxpay/common/order/transfer/TransferOrderInfo.vue'
import NotifyRecordList from './NotifyRecordList.vue'
import { NotifyContentTypeEnum } from '@/enums/daxpay/PaymentEnum'
import RefundOrderInfo from '@/views/daxpay/admin/order/refund/RefundOrderInfo.vue'
import RefundOrderInfo from '@/views/daxpay/common/order/refund/RefundOrderInfo.vue'
import { merchantDropdown } from '@/views/daxpay/admin/merchant/info/Merchant.api'
import { mchAppDropdown } from '@/views/daxpay/common/merchant/app/MchApp.api'
// 使hooks
const {
@@ -109,17 +113,33 @@
//
const fields = computed(() => {
return [
{ field: 'tradeNo', type: STRING, name: '平台交易号', placeholder: '请输入完整平台交易号' },
{ field: 'tradeNo', type: STRING, name: '平台交易号', placeholder: '请输入平台交易号' },
{
field: 'noticeType',
type: LIST,
name: '消息类型',
placeholder: '请选择消息类型',
name: '通知类型',
placeholder: '请选择通知类型',
selectList: noticeTypeList.value,
},
{
field: 'mchNo',
type: LIST,
name: '商户号',
placeholder: '请选择商户号',
selectList: mchNoOptions.value,
},
{
field: 'appId',
type: LIST,
name: '应用号',
placeholder: '请先选择商户后选择应用号',
selectList: mchAppOptions.value,
},
] as QueryField[]
})
const mchNoOptions = ref<LabeledValue[]>([])
const mchAppOptions = ref<LabeledValue[]>([])
const notifyRecordList = ref<any>()
const notifyTaskInfo = ref<any>()
const payOrderInfo = ref<any>()
@@ -130,20 +150,39 @@
onMounted(() => {
vxeBind()
init()
initData()
queryPage()
})
function vxeBind() {
xTable.value?.connect(xToolbar.value as VxeToolbarInstance)
}
watch(
() => model.queryParam?.mchNo,
(value) => changeMch(value),
)
/**
* 初始化
*/
async function init() {
noticeTypeList.value = await dictDropDown('ClientNoticeType')
async function initData() {
merchantDropdown().then(({ data }) => {
mchNoOptions.value = data
})
noticeTypeList.value = await dictDropDown('notify_content_type')
}
/**
* 商户变动后更新应用列表
*/
function changeMch(mchNo) {
if (mchNo) {
mchAppDropdown(mchNo).then(({ data }) => {
mchAppOptions.value = data
})
} else {
mchAppOptions.value = []
model.queryParam.appId = undefined
}
}
/**
* 分页查询
*/

View File

@@ -73,7 +73,7 @@
</vxe-column>
<vxe-column field="createTime" title="创建时间" sortable :min-width="230" />
<vxe-column field="mchNo" title="商户号" :min-width="150" />
<vxe-column field="appId" title="商户号" :min-width="150" />
<vxe-column field="appId" title="应用号" :min-width="150" />
<vxe-column fixed="right" width="120" :showOverflow="false" title="操作">
<template #default="{ row }">
<a-link @click="show(row)">查看</a-link>
@@ -136,7 +136,7 @@
</template>
<script lang="ts" setup>
import { computed, onMounted, ref } from 'vue'
import { computed, onMounted, ref, watch } from 'vue'
import {
allocationByOrderNo,
close,
@@ -162,6 +162,8 @@
PayRefundStatusEnum,
PayStatusEnum,
} from '@/enums/daxpay/TradeStatusEnum'
import { merchantDropdown } from '@/views/daxpay/admin/merchant/info/Merchant.api'
import { mchAppDropdown } from '@/views/daxpay/common/merchant/app/MchApp.api'
// 使hooks
const {
@@ -178,6 +180,8 @@
const { createMessage, createConfirm } = useMessage()
const { dictConvert, dictDropDown } = useDict()
const mchNoOptions = ref<LabeledValue[]>([])
const mchAppOptions = ref<LabeledValue[]>([])
const channelList = ref<LabeledValue[]>([])
const methodList = ref<LabeledValue[]>([])
const payStatusList = ref<LabeledValue[]>([])
@@ -215,8 +219,20 @@
selectList: payRefundStatusList.value,
},
{ field: 'allocStatus', name: '支付状态', type: LIST, selectList: payAllocStatusList.value },
{ field: 'mchNo', type: STRING, name: '商户号', placeholder: '请输入商户号' },
{ field: 'appId', type: STRING, name: '应用号', placeholder: '请输入应用号' },
{
field: 'mchNo',
type: LIST,
name: '商户号',
placeholder: '请选择商户号',
selectList: mchNoOptions.value,
},
{
field: 'appId',
type: LIST,
name: '应用号',
placeholder: '请先选择商户后选择应用号',
selectList: mchAppOptions.value,
},
] as QueryField[]
})
@@ -226,6 +242,12 @@
const refundModel = ref<any>()
const totalAmount = ref<number>(0.0)
// getter
watch(
() => model.queryParam?.mchNo,
(value) => changeMch(value),
)
onMounted(() => {
initData()
vxeBind()
@@ -239,12 +261,30 @@
* 初始化数据
*/
async function initData() {
merchantDropdown().then(({ data }) => {
mchNoOptions.value = data
})
channelList.value = await dictDropDown('channel')
methodList.value = await dictDropDown('pay_method')
payStatusList.value = await dictDropDown('pay_status')
payRefundStatusList.value = await dictDropDown('pay_refund_status')
payAllocStatusList.value = await dictDropDown('pay_alloc_status')
}
/**
* 商户变动后更新应用列表
*/
function changeMch(mchNo) {
if (mchNo) {
mchAppDropdown(mchNo).then(({ data }) => {
mchAppOptions.value = data
})
} else {
mchAppOptions.value = []
model.queryParam.appId = undefined
}
}
/**
* 分页查询
*/

View File

@@ -62,7 +62,7 @@
<vxe-column field="createTime" title="创建时间" sortable :min-width="230" />
<vxe-column field="mchNo" title="商户号" :min-width="150" />
<vxe-column field="appId" title="商户号" :min-width="150" />
<vxe-column field="appId" title="应用号" :min-width="150" />
<vxe-column fixed="right" width="120" :showOverflow="false" title="操作">
<template #default="{ row }">
<a-link @click="show(row)">查看</a-link>
@@ -109,7 +109,7 @@
</template>
<script lang="ts" setup>
import { computed, onMounted, ref } from 'vue'
import { computed, onMounted, ref, watch } from 'vue'
import {
closeRefund,
getTotalAmount,
@@ -130,6 +130,8 @@
import ALink from '@/components/Link/Link.vue'
import { RefundStatusEnum } from '@/enums/daxpay/TradeStatusEnum'
import { Icon } from '@/components/Icon'
import { merchantDropdown } from '@/views/daxpay/admin/merchant/info/Merchant.api'
import { mchAppDropdown } from '@/views/daxpay/common/merchant/app/MchApp.api'
// 使hooks
const {
@@ -146,6 +148,8 @@
const { createMessage, createConfirm } = useMessage()
const { dictConvert, dictDropDown } = useDict()
const mchNoOptions = ref<LabeledValue[]>([])
const mchAppOptions = ref<LabeledValue[]>([])
const channelList = ref<LabeledValue[]>([])
const refundStatusList = ref<LabeledValue[]>([])
const totalAmount = ref<number>(0.0)
@@ -178,8 +182,20 @@
selectList: refundStatusList.value,
},
{ field: 'channel', name: '支付通道', type: LIST, selectList: channelList.value },
{ field: 'mchNo', type: STRING, name: '商户号', placeholder: '请输入商户号' },
{ field: 'appId', type: STRING, name: '应用号', placeholder: '请输入应用号' },
{
field: 'mchNo',
type: LIST,
name: '商户号',
placeholder: '请选择商户号',
selectList: mchNoOptions.value,
},
{
field: 'appId',
type: LIST,
name: '应用号',
placeholder: '请先选择商户后选择应用号',
selectList: mchAppOptions.value,
},
] as QueryField[]
})
@@ -187,6 +203,10 @@
const xToolbar = ref<VxeToolbarInstance>()
const refundOrderInfo = ref<any>()
const payOrderInfo = ref<any>()
watch(
() => model.queryParam?.mchNo,
(value) => changeMch(value),
)
onMounted(() => {
initData()
@@ -201,10 +221,27 @@
* 初始化数据
*/
async function initData() {
merchantDropdown().then(({ data }) => {
mchNoOptions.value = data
})
refundStatusList.value = await dictDropDown('RefundStatus')
channelList.value = await dictDropDown('channel')
}
/**
* 商户变动后更新应用列表
*/
function changeMch(mchNo) {
if (mchNo) {
mchAppDropdown(mchNo).then(({ data }) => {
mchAppOptions.value = data
})
} else {
mchAppOptions.value = []
model.queryParam.appId = undefined
}
}
/**
* 分页查询
*/

View File

@@ -57,7 +57,7 @@
<vxe-column field="createTime" title="创建时间" sortable :min-width="170" />
<vxe-column field="mchNo" title="商户号" :min-width="150" />
<vxe-column field="appId" title="商户号" :min-width="150" />
<vxe-column field="appId" title="应用号" :min-width="150" />
<vxe-column fixed="right" :width="120" :showOverflow="false" title="操作">
<template #default="{ row }">
<a-link @click="show(row)">查看</a-link>
@@ -107,7 +107,7 @@
</template>
<script lang="ts" setup>
import { computed, onMounted, ref } from 'vue'
import { computed, onMounted, ref, watch } from 'vue'
import {
closeTransfer,
getTotalAmount,
@@ -127,6 +127,8 @@
import ALink from '/@/components/Link/Link.vue'
import { TransferStatusEnum } from '@/enums/daxpay/TradeStatusEnum'
import { Icon } from '@/components/Icon'
import { merchantDropdown } from '@/views/daxpay/admin/merchant/info/Merchant.api'
import { mchAppDropdown } from '@/views/daxpay/common/merchant/app/MchApp.api'
// 使hooks
const {
@@ -143,6 +145,8 @@
const { createMessage, createConfirm } = useMessage()
const { dictConvert, dictDropDown } = useDict()
const mchNoOptions = ref<LabeledValue[]>([])
const mchAppOptions = ref<LabeledValue[]>([])
let channelList = ref<LabeledValue[]>([])
let transferStatusList = ref<LabeledValue[]>([])
let totalAmount = ref<number>(0.0)
@@ -163,8 +167,20 @@
selectList: transferStatusList.value,
},
{ field: 'channel', name: '转账通道', type: LIST, selectList: channelList.value },
{ field: 'mchNo', type: STRING, name: '商户号', placeholder: '请输入商户号' },
{ field: 'appId', type: STRING, name: '应用号', placeholder: '请输入应用号' },
{
field: 'mchNo',
type: LIST,
name: '商户号',
placeholder: '请选择商户号',
selectList: mchNoOptions.value,
},
{
field: 'appId',
type: LIST,
name: '应用号',
placeholder: '请先选择商户后选择应用号',
selectList: mchAppOptions.value,
},
] as QueryField[]
})
@@ -172,6 +188,11 @@
const xToolbar = ref<VxeToolbarInstance>()
const transferOrderInfo = ref<any>()
watch(
() => model.queryParam?.mchNo,
(value) => changeMch(value),
)
onMounted(() => {
initData()
vxeBind()
@@ -185,10 +206,26 @@
* 初始化数据
*/
async function initData() {
merchantDropdown().then(({ data }) => {
mchNoOptions.value = data
})
transferStatusList.value = await dictDropDown('transfer_status')
channelList.value = await dictDropDown('channel')
}
/**
* 商户变动后更新应用列表
*/
function changeMch(mchNo) {
if (mchNo) {
mchAppDropdown(mchNo).then(({ data }) => {
mchAppOptions.value = data
})
} else {
mchAppOptions.value = []
model.queryParam.appId = undefined
}
}
/**
* 分页查询
*/

View File

@@ -27,8 +27,7 @@
<a-descriptions-item label="交易号(平台)" :span="1">
{{ discrepancy.tradeNo }}
</a-descriptions-item>
<a-descriptions-item label="" :span="1">
</a-descriptions-item>
<a-descriptions-item label="" :span="1" />
<a-descriptions-item label="通道交易号(平台)" :span="1">
{{ discrepancy.outTradeNo }}
</a-descriptions-item>

View File

@@ -110,7 +110,7 @@
</template>
<script setup lang="ts">
import { computed, nextTick, onMounted, ref } from 'vue'
import { computed, nextTick, onMounted, ref, watch } from 'vue'
import { page } from './ReconcileDiscrepancy.api'
import useTablePage from '@/hooks/bootx/useTablePage'
import { VxeTable, VxeTableInstance, VxeToolbarInstance } from 'vxe-table'
@@ -121,9 +121,11 @@
import { TradeTypeEnum } from '@/enums/daxpay/PaymentEnum'
import ReconcileDiscrepancyInfo from './ReconcileDiscrepancyInfo.vue'
import ReconcileStatementInfo from '../statement/ReconcileStatementInfo.vue'
import PayOrderInfo from '@/views/daxpay/admin/order/pay/PayOrderInfo.vue'
import RefundOrderInfo from '@/views/daxpay/admin/order/refund/RefundOrderInfo.vue'
import TransferOrderInfo from '@/views/daxpay/admin/order/transfer/TransferOrderInfo.vue'
import PayOrderInfo from '@/views/daxpay/common/order/pay/PayOrderInfo.vue'
import RefundOrderInfo from '@/views/daxpay/common/order/refund/RefundOrderInfo.vue'
import TransferOrderInfo from '@/views/daxpay/common/order/transfer/TransferOrderInfo.vue'
import { merchantDropdown } from '@/views/daxpay/admin/merchant/info/Merchant.api'
import { mchAppDropdown } from '@/views/daxpay/common/merchant/app/MchApp.api'
// 使hooks
const {
@@ -139,6 +141,8 @@
} = useTablePage(queryPage)
const { dictDropDown, dictConvert } = useDict()
const mchNoOptions = ref<LabeledValue[]>([])
const mchAppOptions = ref<LabeledValue[]>([])
let channelList = ref<LabeledValue[]>([])
let discrepancyTypeList = ref<LabeledValue[]>([])
let tradeStatusList = ref<LabeledValue[]>([])
@@ -209,6 +213,20 @@
placeholder: '请选择交易状态(通道)',
selectList: tradeStatusList.value,
},
{
field: 'mchNo',
type: LIST,
name: '商户号',
placeholder: '请选择商户号',
selectList: mchNoOptions.value,
},
{
field: 'appId',
type: LIST,
name: '应用号',
placeholder: '请先选择商户后选择应用号',
selectList: mchAppOptions.value,
},
] as QueryField[]
})
@@ -228,16 +246,36 @@
initData()
init()
})
watch(
() => model.queryParam?.mchNo,
(value) => changeMch(value),
)
/**
* 初始化基础数据
*/
async function initData() {
merchantDropdown().then(({ data }) => {
mchNoOptions.value = data
})
discrepancyTypeList.value = await dictDropDown('reconcile_discrepancy_type')
channelList.value = await dictDropDown('channel')
tradeStatusList.value = await dictDropDown('trade_status')
tradeTypeList.value = await dictDropDown('trade_type')
}
/**
* 商户变动后更新应用列表
*/
function changeMch(mchNo) {
if (mchNo) {
mchAppDropdown(mchNo).then(({ data }) => {
mchAppOptions.value = data
})
} else {
mchAppOptions.value = []
model.queryParam.appId = undefined
}
}
/**
* 入口
*/

View File

@@ -76,7 +76,7 @@
import XEUtils from 'xe-utils'
import { create, ReconcileCreatParam } from './ReconcileStatement.api'
import { merchantDropdown } from '@/views/daxpay/admin/merchant/info/Merchant.api'
import { mchAppDropdown } from '@/views/daxpay/admin/merchant/app/MchApp.api'
import { mchAppDropdown } from '@/views/daxpay/common/merchant/app/MchApp.api'
const {
handleCancel,

View File

@@ -121,7 +121,7 @@
</template>
<script setup lang="ts">
import { computed, nextTick, onMounted, ref } from 'vue'
import { computed, nextTick, onMounted, ref, watch } from 'vue'
import { compare, downAndSave, page } from './ReconcileStatement.api'
import useTablePage from '@/hooks/bootx/useTablePage'
import { VxeTable, VxeTableInstance, VxeToolbarInstance } from 'vxe-table'
@@ -135,6 +135,8 @@
import ReconcileStatementCreate from './ReconcileStatementCreate.vue'
import ReconcileStatementInfo from './ReconcileStatementInfo.vue'
import { useFilePlatform } from '@/hooks/bootx/useFilePlatform'
import { merchantDropdown } from '@/views/daxpay/admin/merchant/info/Merchant.api'
import { mchAppDropdown } from '@/views/daxpay/common/merchant/app/MchApp.api'
// 使hooks
const {
@@ -152,6 +154,8 @@
const { createMessage, createConfirm } = useMessage()
const { getFileUrl } = useFilePlatform()
const mchNoOptions = ref<LabeledValue[]>([])
const mchAppOptions = ref<LabeledValue[]>([])
let channelList = ref<LabeledValue[]>([])
let resultList = ref<LabeledValue[]>([])
@@ -182,8 +186,20 @@
{ label: '未完成', value: false },
],
},
{ field: 'mchNo', type: STRING, name: '商户号', placeholder: '请输入商户号' },
{ field: 'appId', type: STRING, name: '应用号', placeholder: '请输入应用号' },
{
field: 'mchNo',
type: LIST,
name: '商户号',
placeholder: '请选择商户号',
selectList: mchNoOptions.value,
},
{
field: 'appId',
type: LIST,
name: '应用号',
placeholder: '请先选择商户后选择应用号',
selectList: mchAppOptions.value,
},
] as QueryField[]
})
@@ -195,7 +211,10 @@
nextTick(() => {
xTable.value?.connect(xToolbar.value as VxeToolbarInstance)
})
watch(
() => model.queryParam?.mchNo,
(value) => changeMch(value),
)
onMounted(() => {
initData()
init()
@@ -205,9 +224,26 @@
* 初始化基础数据
*/
async function initData() {
merchantDropdown().then(({ data }) => {
mchNoOptions.value = data
})
channelList.value = await dictDropDown('channel')
resultList.value = await dictDropDown('reconcile_result')
}
/**
* 商户变动后更新应用列表
*/
function changeMch(mchNo) {
if (mchNo) {
mchAppDropdown(mchNo).then(({ data }) => {
mchAppOptions.value = data
})
} else {
mchAppOptions.value = []
model.queryParam.appId = undefined
}
}
/**
* 入口
*/

View File

@@ -48,7 +48,7 @@
<vxe-column field="msg" title="提示信息" :min-width="250" />
<vxe-column field="createTime" title="通知时间" sortable :min-width="170" />
<vxe-column field="mchNo" title="商户号" :min-width="150" />
<vxe-column field="appId" title="商户号" :min-width="150" />
<vxe-column field="appId" title="应用号" :min-width="150" />
<vxe-column fixed="right" width="60" :showOverflow="false" title="操作">
<template #default="{ row }">
<span>
@@ -75,7 +75,7 @@
</template>
<script lang="ts" setup>
import { computed, onMounted, ref } from 'vue'
import { computed, onMounted, ref, watch } from 'vue'
import { page, TradeCallbackRecord, cellStyle } from './TradeCallbackRecord.api'
import useTablePage from '@/hooks/bootx/useTablePage'
import { VxeTable, VxeTableInstance, VxeToolbarInstance } from 'vxe-table'
@@ -84,10 +84,12 @@
import { useDict } from '@/hooks/bootx/useDict'
import CallbackRecordInfo from './TradeCallbackRecordInfo.vue'
import { LabeledValue } from 'ant-design-vue/lib/select'
import PayOrderInfo from '@/views/daxpay/admin/order/pay/PayOrderInfo.vue'
import RefundOrderInfo from '@/views/daxpay/admin/order/refund/RefundOrderInfo.vue'
import TransferOrderInfo from '@/views/daxpay/admin/order/transfer/TransferOrderInfo.vue'
import PayOrderInfo from '@/views/daxpay/common/order/pay/PayOrderInfo.vue'
import RefundOrderInfo from '@/views/daxpay/common/order/refund/RefundOrderInfo.vue'
import TransferOrderInfo from '@/views/daxpay/common/order/transfer/TransferOrderInfo.vue'
import { TradeTypeEnum } from '@/enums/daxpay/PaymentEnum'
import { merchantDropdown } from '@/views/daxpay/admin/merchant/info/Merchant.api'
import { mchAppDropdown } from '@/views/daxpay/common/merchant/app/MchApp.api'
// 使hooks
const {
@@ -103,6 +105,8 @@
} = useTablePage(queryPage)
const { dictConvert, dictDropDown } = useDict()
const mchNoOptions = ref<LabeledValue[]>([])
const mchAppOptions = ref<LabeledValue[]>([])
let channelList = ref<LabeledValue[]>([])
let callbackTypeList = ref<LabeledValue[]>([])
let callbackStatusList = ref<LabeledValue[]>([])
@@ -133,8 +137,20 @@
placeholder: '请选择消息处理状态',
selectList: callbackStatusList.value,
},
{ field: 'mchNo', type: STRING, name: '商户号', placeholder: '请输入商户号' },
{ field: 'appId', type: STRING, name: '应用号', placeholder: '请输入应用号' },
{
field: 'mchNo',
type: LIST,
name: '商户号',
placeholder: '请选择商户号',
selectList: mchNoOptions.value,
},
{
field: 'appId',
type: LIST,
name: '应用号',
placeholder: '请先选择商户后选择应用号',
selectList: mchAppOptions.value,
},
] as QueryField[]
})
@@ -144,7 +160,10 @@
const payOrderInfo = ref<any>()
const refundOrderInfo = ref<any>()
const transferOrderInfo = ref<any>()
watch(
() => model.queryParam?.mchNo,
(value) => changeMch(value),
)
onMounted(() => {
initData()
vxeBind()
@@ -158,10 +177,26 @@
* 初始化
*/
async function initData() {
merchantDropdown().then(({ data }) => {
mchNoOptions.value = data
})
channelList.value = await dictDropDown('channel')
callbackTypeList.value = await dictDropDown('trade_type')
callbackStatusList.value = await dictDropDown('callback_status')
}
/**
* 商户变动后更新应用列表
*/
function changeMch(mchNo) {
if (mchNo) {
mchAppDropdown(mchNo).then(({ data }) => {
mchAppOptions.value = data
})
} else {
mchAppOptions.value = []
model.queryParam.appId = undefined
}
}
/**
* 分页查询

View File

@@ -49,7 +49,7 @@
<vxe-column field="clientIp" title="客户端IP" :min-width="120" />
<vxe-column field="createTime" title="创建时间" :min-width="170" />
<vxe-column field="mchNo" title="商户号" :min-width="150" />
<vxe-column field="appId" title="商户号" :min-width="150" />
<vxe-column field="appId" title="应用号" :min-width="150" />
<vxe-column fixed="right" width="60" :showOverflow="false" title="操作">
<template #default="{ row }">
<span>
@@ -74,7 +74,7 @@
</template>
<script lang="ts" setup>
import { computed, onMounted, ref } from 'vue'
import { computed, onMounted, ref, watch } from 'vue'
import { page } from './PayCloseRecord.api'
import useTablePage from '@/hooks/bootx/useTablePage'
import { VxeTable, VxeTableInstance, VxeToolbarInstance } from 'vxe-table'
@@ -83,7 +83,9 @@
import { useDict } from '@/hooks/bootx/useDict'
import { LabeledValue } from 'ant-design-vue/lib/select'
import PayCloseRecordInfo from './PayCloseRecordInfo.vue'
import PayOrderInfo from '@/views/daxpay/admin/order/pay/PayOrderInfo.vue'
import PayOrderInfo from '@/views/daxpay/common/order/pay/PayOrderInfo.vue'
import { merchantDropdown } from '@/views/daxpay/admin/merchant/info/Merchant.api'
import { mchAppDropdown } from '@/views/daxpay/common/merchant/app/MchApp.api'
// 使hooks
const {
@@ -99,6 +101,8 @@
} = useTablePage(queryPage)
const { dictConvert, dictDropDown } = useDict()
const mchNoOptions = ref<LabeledValue[]>([])
const mchAppOptions = ref<LabeledValue[]>([])
let payChannelList = ref<LabeledValue[]>([])
let closeTypeList = ref<LabeledValue[]>([])
@@ -131,8 +135,20 @@
{ label: '失败', value: false },
],
},
{ field: 'mchNo', type: STRING, name: '商户号', placeholder: '请输入商户号' },
{ field: 'appId', type: STRING, name: '应用号', placeholder: '请输入应用号' },
{
field: 'mchNo',
type: LIST,
name: '商户号',
placeholder: '请选择商户号',
selectList: mchNoOptions.value,
},
{
field: 'appId',
type: LIST,
name: '应用号',
placeholder: '请先选择商户后选择应用号',
selectList: mchAppOptions.value,
},
] as QueryField[]
})
@@ -140,9 +156,12 @@
const xToolbar = ref<VxeToolbarInstance>()
const payCloseRecordInfo = ref<any>()
const payOrderInfo = ref<any>()
watch(
() => model.queryParam?.mchNo,
(value) => changeMch(value),
)
onMounted(() => {
init()
initData()
vxeBind()
queryPage()
})
@@ -153,10 +172,26 @@
/**
* 初始化
*/
async function init() {
async function initData() {
merchantDropdown().then(({ data }) => {
mchNoOptions.value = data
})
payChannelList.value = await dictDropDown('channel')
closeTypeList.value = await dictDropDown('close_type')
}
/**
* 商户变动后更新应用列表
*/
function changeMch(mchNo) {
if (mchNo) {
mchAppDropdown(mchNo).then(({ data }) => {
mchAppOptions.value = data
})
} else {
mchAppOptions.value = []
model.queryParam.appId = undefined
}
}
/**
* 分页查询

View File

@@ -57,7 +57,7 @@
<vxe-column field="outTradeNo" title="通道交易号" :min-width="230" />
<vxe-column field="createTime" title="时间" :min-width="170" sortable />
<vxe-column field="mchNo" title="商户号" :min-width="150" />
<vxe-column field="appId" title="商户号" :min-width="150" />
<vxe-column field="appId" title="应用号" :min-width="150" />
<vxe-column fixed="right" :min-width="60" :showOverflow="false" title="操作">
<template #default="{ row }">
<span>
@@ -84,7 +84,7 @@
</template>
<script lang="ts" setup>
import { computed, onMounted, ref } from 'vue'
import { computed, onMounted, ref, watch } from 'vue'
import { amountSummary, page, TradeFlowRecord } from './TradeFlowRecord.api'
import useTablePage from '@/hooks/bootx/useTablePage'
import { VxeTable, VxeTableInstance, VxeToolbarInstance } from 'vxe-table'
@@ -92,12 +92,14 @@
import { LIST, QueryField, STRING } from '@/components/Bootx/Query/Query'
import { useDict } from '@/hooks/bootx/useDict'
import { LabeledValue } from 'ant-design-vue/lib/select'
import PayOrderInfo from '@/views/daxpay/admin/order/pay/PayOrderInfo.vue'
import RefundOrderInfo from '@/views/daxpay/admin/order/refund/RefundOrderInfo.vue'
import TransferOrderInfo from '@/views/daxpay/admin/order/transfer/TransferOrderInfo.vue'
import PayOrderInfo from '@/views/daxpay/common/order/pay/PayOrderInfo.vue'
import RefundOrderInfo from '@/views/daxpay/common/order/refund/RefundOrderInfo.vue'
import TransferOrderInfo from '@/views/daxpay/common/order/transfer/TransferOrderInfo.vue'
import ALink from '@/components/Link/Link.vue'
import TradeFlowRecordInfo from './TradeFlowRecordInfo.vue'
import { TradeTypeEnum } from '@/enums/daxpay/PaymentEnum'
import { merchantDropdown } from '@/views/daxpay/admin/merchant/info/Merchant.api'
import { mchAppDropdown } from '@/views/daxpay/common/merchant/app/MchApp.api'
// 使hooks
const {
@@ -111,6 +113,8 @@
} = useTablePage(queryPage)
const { dictConvert, dictDropDown } = useDict()
const mchNoOptions = ref<LabeledValue[]>([])
const mchAppOptions = ref<LabeledValue[]>([])
const payChannelList = ref<LabeledValue[]>([])
const tradeFlowRecordTypeList = ref<LabeledValue[]>([])
@@ -135,8 +139,20 @@
placeholder: '请选择交易通道',
selectList: payChannelList.value,
},
{ field: 'mchNo', type: STRING, name: '商户号', placeholder: '请输入商户号' },
{ field: 'appId', type: STRING, name: '应用号', placeholder: '请输入应用号' },
{
field: 'mchNo',
type: LIST,
name: '商户号',
placeholder: '请选择商户号',
selectList: mchNoOptions.value,
},
{
field: 'appId',
type: LIST,
name: '应用号',
placeholder: '请先选择商户后选择应用号',
selectList: mchAppOptions.value,
},
] as QueryField[]
})
@@ -153,22 +169,40 @@
})
onMounted(() => {
init()
initData()
vxeBind()
queryPage()
})
function vxeBind() {
xTable.value?.connect(xToolbar.value as VxeToolbarInstance)
}
watch(
() => model.queryParam?.mchNo,
(value) => changeMch(value),
)
/**
* 初始化
*/
async function init() {
async function initData() {
merchantDropdown().then(({ data }) => {
mchNoOptions.value = data
})
tradeFlowRecordTypeList.value = await dictDropDown('trade_type')
payChannelList.value = await dictDropDown('channel')
}
/**
* 商户变动后更新应用列表
*/
function changeMch(mchNo) {
if (mchNo) {
mchAppDropdown(mchNo).then(({ data }) => {
mchAppOptions.value = data
})
} else {
mchAppOptions.value = []
model.queryParam.appId = undefined
}
}
/**
* 分页查询
*/

View File

@@ -42,7 +42,7 @@
<vxe-column field="errorMsg" title="错误消息" :min-width="160" />
<vxe-column field="createTime" title="同步时间" :min-width="170" />
<vxe-column field="mchNo" title="商户号" :min-width="150" />
<vxe-column field="appId" title="商户号" :min-width="150" />
<vxe-column field="appId" title="应用号" :min-width="150" />
<vxe-column fixed="right" :min-width="50" :showOverflow="false" title="操作">
<template #default="{ row }">
<span>
@@ -68,7 +68,7 @@
</template>
<script lang="ts" setup>
import { computed, onMounted, ref } from 'vue'
import { computed, onMounted, ref, watch } from 'vue'
import { page, TradeSyncRecord } from './TradeSyncRecord.api'
import useTablePage from '@/hooks/bootx/useTablePage'
import { VxeTableInstance, VxeToolbarInstance } from 'vxe-table'
@@ -78,10 +78,12 @@
import { TradeTypeEnum } from '@/enums/daxpay/PaymentEnum'
import { LabeledValue } from 'ant-design-vue/lib/select'
import ALink from '/@/components/Link/Link.vue'
import PayOrderInfo from '@/views/daxpay/admin/order/pay/PayOrderInfo.vue'
import PayOrderInfo from '@/views/daxpay/common/order/pay/PayOrderInfo.vue'
import TradeSyncRecordInfo from './TradeSyncRecordInfo.vue'
import RefundOrderInfo from '@/views/daxpay/admin/order/refund/RefundOrderInfo.vue'
import TransferOrderInfo from '@/views/daxpay/admin/order/transfer/TransferOrderInfo.vue'
import RefundOrderInfo from '@/views/daxpay/common/order/refund/RefundOrderInfo.vue'
import TransferOrderInfo from '@/views/daxpay/common/order/transfer/TransferOrderInfo.vue'
import { merchantDropdown } from '@/views/daxpay/admin/merchant/info/Merchant.api'
import { mchAppDropdown } from '@/views/daxpay/common/merchant/app/MchApp.api'
// 使hooks
const {
@@ -95,6 +97,8 @@
} = useTablePage(queryPage)
const { dictConvert, dictDropDown } = useDict()
const mchNoOptions = ref<LabeledValue[]>([])
const mchAppOptions = ref<LabeledValue[]>([])
let syncStatusList = ref<LabeledValue[]>([])
let payChannelList = ref<LabeledValue[]>([])
let syncTypeList = ref<LabeledValue[]>([])
@@ -126,8 +130,20 @@
placeholder: '请选择同步通道',
selectList: payChannelList.value,
},
{ field: 'mchNo', type: STRING, name: '商户号', placeholder: '请输入商户号' },
{ field: 'appId', type: STRING, name: '应用号', placeholder: '请输入应用号' },
{
field: 'mchNo',
type: LIST,
name: '商户号',
placeholder: '请选择商户号',
selectList: mchNoOptions.value,
},
{
field: 'appId',
type: LIST,
name: '应用号',
placeholder: '请先选择商户后选择应用号',
selectList: mchAppOptions.value,
},
] as QueryField[]
})
@@ -139,23 +155,41 @@
const transferOrderInfo = ref<any>()
onMounted(() => {
init()
initData()
vxeBind()
queryPage()
})
function vxeBind() {
xTable.value?.connect(xToolbar.value as VxeToolbarInstance)
}
watch(
() => model.queryParam?.mchNo,
(value) => changeMch(value),
)
/**
* 初始化
*/
async function init() {
async function initData() {
merchantDropdown().then(({ data }) => {
mchNoOptions.value = data
})
syncStatusList.value = await dictDropDown('PaySyncStatus')
payChannelList.value = await dictDropDown('channel')
syncTypeList.value = await dictDropDown('PaymentType')
}
/**
* 商户变动后更新应用列表
*/
function changeMch(mchNo) {
if (mchNo) {
mchAppDropdown(mchNo).then(({ data }) => {
mchAppOptions.value = data
})
} else {
mchAppOptions.value = []
model.queryParam.appId = undefined
}
}
/**
* 分页查询
*/

View File

@@ -0,0 +1,12 @@
import { defHttp } from '@/utils/http/axios'
import { Result } from '#/axios'
import { Merchant } from '@/views/daxpay/admin/merchant/info/Merchant.api'
/**
* 获取商户信息
*/
export const get = () => {
return defHttp.get<Result<Merchant>>({
url: '/merchant/get',
})
}

View File

@@ -0,0 +1,5 @@
<script setup lang="ts"></script>
<template></template>
<style scoped lang="less"></style>

View File

@@ -0,0 +1,43 @@
import { defHttp } from '@/utils/http/axios'
import { PageResult, Result } from '#/axios'
import { UserInfo } from '@/views/iam/user/User.api'
/**
* 用户列表
*/
export function findAll(params) {
return defHttp.get<Result<PageResult<UserInfo[]>>>({
url: '/merchant/user/page',
params,
})
}
/**
* 添加用户
*/
export function add(params) {
return defHttp.post<Result>({
url: '/merchant/user/add',
data: params,
})
}
/**
* 修根用户
*/
export function edit(params) {
return defHttp.post<Result>({
url: '/merchant/user/update',
data: params,
})
}
/**
* 分配角色
*/
export function assignRole(params) {
return defHttp.post<Result>({
url: '/merchant/user/assignRole',
data: params,
})
}

View File

@@ -0,0 +1,5 @@
<script setup lang="ts"></script>
<template></template>
<style scoped lang="less"></style>

View File

@@ -85,7 +85,12 @@
/>
</a-form-item>
<a-form-item label="菜单图标" name="icon">
<icon-picker v-model:value="form.icon" :disabled="showable" />
<icon-picker v-if="!showable" v-model:value="form.icon" :readonly="showable" />
<a-input v-else v-model:value="form.icon" disabled>
<template #addonAfter>
<Icon :icon="form.icon" />
</template>
</a-input>
</a-form-item>
<a-form-item label="排序" name="sortNo">
<a-input-number
@@ -171,6 +176,7 @@
import { IconPicker } from '@/components/Icon'
import { BasicTitle } from '@/components/Basic'
import { BasicDrawer } from '@/components/Drawer'
import Icon from '../../../../components/Icon/Icon.vue'
defineComponent({
name: 'MenuEdit',

View File

@@ -3,7 +3,7 @@
<div class="m-3 p-3 pt-5 bg-white">
<a-form class="page-query">
<a-row :gutter="10">
<a-col :md="4" :sm="24">
<a-col :md="4" :sm="24" v-if="isAdmin()">
<a-form-item label="终端">
<a-select
v-model:value="clientCode"
@@ -78,7 +78,7 @@
import PermPathInfo from './PermPathInfo.vue'
import { Client, findAll } from '@/views/iam/client/Client.api'
import XEUtils from 'xe-utils'
import { getAppEnvConfig } from '@/utils/env'
import { getAppEnvConfig, isAdmin } from '@/utils/env'
const { createMessage, createConfirm } = useMessage()

View File

@@ -38,7 +38,12 @@
</a-tree>
</a-spin>
<template #footer>
<a-select style="min-width: 100px" @change="clientSwitch" v-model:value="clientCode">
<a-select
style="min-width: 100px"
@change="clientSwitch"
v-model:value="clientCode"
v-if="isAdmin()"
>
<a-select-option v-for="o in clients" :key="o.code">{{ o.name }}</a-select-option>
</a-select>
<a-dropdown style="margin-left: 5px" :trigger="['click']" placement="top">
@@ -67,7 +72,7 @@
<script lang="ts" setup>
import { BasicDrawer } from '@/components/Drawer'
import { findAll as findClients, Client } from '@/views/iam/client/Client.api'
import { getAppEnvConfig } from '@/utils/env'
import { getAppEnvConfig, isAdmin } from '@/utils/env'
import { RoleTree } from './Role.api'
import { Tree, treeDataTranslate } from '@/utils/dataUtil'
import XEUtils from 'xe-utils'

View File

@@ -37,7 +37,7 @@
</a-tree>
</a-spin>
<template #footer>
<a-select style="min-width: 100px" @change="clientSwitch" v-model:value="clientCode">
<a-select v-if="isAdmin()" style="min-width: 100px" @change="clientSwitch" v-model:value="clientCode">
<a-select-option v-for="o in clients" :key="o.code">{{ o.name }}</a-select-option>
</a-select>
<a-dropdown style="margin-left: 5px" :trigger="['click']" placement="top">
@@ -66,7 +66,7 @@
<script lang="ts" setup>
import { BasicDrawer } from '@/components/Drawer'
import { findAll as findClients, Client } from '@/views/iam/client/Client.api'
import { getAppEnvConfig } from '@/utils/env'
import { getAppEnvConfig, isAdmin } from "@/utils/env";
import { RoleTree } from './Role.api'
import { Tree, treeDataTranslate } from '@/utils/dataUtil'
import XEUtils from 'xe-utils'

2
types/web.d.ts vendored
View File

@@ -17,7 +17,7 @@ export interface TablePageModel<T = any> {
// 分页参数
pages: PageParam
// 查询参数
queryParam: object
queryParam: any
// 结果
pagination: PageResult<T>
}