diff --git a/src/api/wallet/wallet-manage.ts b/src/api/wallet/wallet-manage.ts index b5ba012..04a8324 100644 --- a/src/api/wallet/wallet-manage.ts +++ b/src/api/wallet/wallet-manage.ts @@ -47,6 +47,13 @@ export function getObj(id?: string) { }) } +export function getObjDetails(id?: string) { + return request({ + url: "/wallet/wallet-manage/join/" + id, + method: "get", + }) +} + export function delObjs(ids?: Object) { return request({ url: "/wallet/wallet-manage", diff --git a/src/api/wallet/wallet-rule-join.ts b/src/api/wallet/wallet-rule-join.ts index 0be6acf..84c28bf 100644 --- a/src/api/wallet/wallet-rule-join.ts +++ b/src/api/wallet/wallet-rule-join.ts @@ -31,6 +31,14 @@ export function getObj(id?: string) { }) } +export function userConfig(query?: Object) { + return request({ + url: "/wallet/wallet-rule-join/user-config", + method: "get", + params: query, + }) +} + export function getJoinDetail(id?: string) { return request({ url: "/wallet/wallet-rule-join/join-detail/" + id, diff --git a/src/api/wallet/wallet-rule-transaction.ts b/src/api/wallet/wallet-rule-transaction.ts index c31b012..65f57a0 100644 --- a/src/api/wallet/wallet-rule-transaction.ts +++ b/src/api/wallet/wallet-rule-transaction.ts @@ -1,5 +1,13 @@ import request from "/@/utils/request" +export function refund(params?: Object) { + return request({ + url: "/wallet/wallet-rule-transaction/refund", + method: "get", + params, + }) +} + export function fetchList(query?: Object) { return request({ url: "/wallet/wallet-rule-transaction/page", @@ -8,11 +16,15 @@ export function fetchList(query?: Object) { }) } -export function pageJoin(query?: Object) { +export function pageJoin(data: any) { return request({ url: "/wallet/wallet-rule-transaction/page-join", - method: "get", - params: query, + method: "post", + params: { + current: data.current, + size: data.size, + }, + data, }) } @@ -46,3 +58,11 @@ export function putObj(obj?: Object) { data: obj, }) } + +export function transferAccounts(obj?: Object) { + return request({ + url: "/wallet/wallet-rule-transaction/transfer-accounts", + method: "post", + data: obj, + }) +} diff --git a/src/components/Select/SelectMch.vue b/src/components/Select/SelectMch.vue index bed8d9a..ef5f724 100644 --- a/src/components/Select/SelectMch.vue +++ b/src/components/Select/SelectMch.vue @@ -35,11 +35,13 @@ const props = withDefaults( defineProps<{ placeholder?: string apiParams?: any + autoFirst?: boolean disabled?: boolean }>(), { placeholder: "请选择", apiParams: {}, + autoFirst: false, disabled: false, }, ) @@ -75,6 +77,9 @@ async function getOptions() { } const { data } = await mchApi.select(_pa) state.options = data.records ?? [] + if (props.autoFirst && state.options.length != 0) { + state.selectId = state.options[0].id + } } finally { setTimeout(() => (state.loading = false), 500) } @@ -91,4 +96,8 @@ function clear() { state.selectId = null getOptions() } + +onMounted(() => { + props.autoFirst && getOptions() +}) diff --git a/src/components/Select/SelectWalletType.vue b/src/components/Select/SelectWalletType.vue index 7aefdba..5aaa64f 100644 --- a/src/components/Select/SelectWalletType.vue +++ b/src/components/Select/SelectWalletType.vue @@ -3,7 +3,7 @@ style="width: 100%" v-model="state.selectId" :placeholder="props.placeholder" - clearable + :clearable="props.clearable" remote-show-suffix filterable remote @@ -11,6 +11,7 @@ :remote-method="remoteSearch" :loading="state.loading" @visible-change="(e: boolean) => e && getOptions()" + @change="change" >
@@ -30,16 +31,24 @@ import { reactive } from "vue" import { useDict } from "/@/hooks/dict" import { getWalletTypeSimple } from "/@/api/wallet/wallet-type" +const emit = defineEmits(["change"]) + const selectId = defineModel() const props = withDefaults( defineProps<{ placeholder?: string disabled?: boolean + clearable?: boolean + autoFirst?: boolean + apiParams?: any }>(), { placeholder: "请选择", disabled: false, + clearable: true, + autoFirst: false, + apiParams: {}, }, ) @@ -59,6 +68,8 @@ const state = reactive({ watch( selectId, (newVal, oldValue) => { + console.log(newVal, "newVal") + if (newVal == oldValue) return state.selectId = newVal getOptions() @@ -71,10 +82,14 @@ async function getOptions() { state.loading = true const _pa = { ...queryForm, + ...props.apiParams, } const { data } = await getWalletTypeSimple(_pa) state.options = data.records ?? [] - + if (props.autoFirst && state.options.length != 0) { + state.selectId = state.options[0].id + emit("change", state.selectId) + } const { wallet_type } = useDict("wallet_type") state.walletType = wallet_type } finally { @@ -93,4 +108,12 @@ function clear() { state.selectId = null getOptions() } + +function change() { + emit("change", selectId) +} + +onMounted(() => { + props.autoFirst && getOptions() +}) diff --git a/src/components/TreeMultipleSelect/index.vue b/src/components/TreeMultipleSelect/index.vue new file mode 100644 index 0000000..5f73a16 --- /dev/null +++ b/src/components/TreeMultipleSelect/index.vue @@ -0,0 +1,160 @@ + + + + + diff --git a/src/components/TreeSelect/index.vue b/src/components/TreeSelect/index.vue index f48c1e5..263b337 100644 --- a/src/components/TreeSelect/index.vue +++ b/src/components/TreeSelect/index.vue @@ -1,181 +1,181 @@ - - - - - + + + + + diff --git a/src/components/index.ts b/src/components/index.ts index bc6a59f..07d5514 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -25,6 +25,7 @@ import SelectHardGroup from "/@/components/Select/selectHardGroup.vue" import SelectHandlerUser from "/@/components/Select/SelectHandlerUser.vue" import SelectSupplier from "/@/components/Select/SelectSupplier.vue" import SelectMchRule from "/@/components/Select/SelectMchRule.vue" +import TreeMultipleSelect from "/@/components/TreeMultipleSelect/index.vue" // 第三方组件 import ElementPlus from "element-plus" @@ -61,6 +62,7 @@ export default { app.component("SvgIcon", SvgIcon) app.component("PreviewImage", PreviewImage) app.component("DraggableDepTree", DraggableDepTree) + app.component("TreeMultipleSelect", TreeMultipleSelect) app.component("SelectUser", SelectUser) app.component("SelectWalletType", SelectWalletType) diff --git a/src/views/mch/mch-manage/mch-rule-config-form.vue b/src/views/mch/mch-manage/mch-rule-config-form.vue index 46b80ad..576094d 100644 --- a/src/views/mch/mch-manage/mch-rule-config-form.vue +++ b/src/views/mch/mch-manage/mch-rule-config-form.vue @@ -14,7 +14,7 @@ - + diff --git a/src/views/mch/mch-manage/setting.vue b/src/views/mch/mch-manage/setting.vue index ec1b856..a17b223 100644 --- a/src/views/mch/mch-manage/setting.vue +++ b/src/views/mch/mch-manage/setting.vue @@ -1,5 +1,5 @@ + + diff --git a/src/views/wallet/wallet-recharge-apply/form.vue b/src/views/wallet/wallet-recharge-apply/form.vue index 1e1d256..a5086e7 100644 --- a/src/views/wallet/wallet-recharge-apply/form.vue +++ b/src/views/wallet/wallet-recharge-apply/form.vue @@ -16,10 +16,7 @@ - - - - + @@ -61,7 +58,6 @@ const form = reactive({ importTime: "", remark: "", }) -const walletTypeOptions = ref() // 定义校验规则 const dataRules = ref({ @@ -83,10 +79,6 @@ const openDialog = async (id: string) => { form.id = id getwalletRechargeApplyData(id) } - - const res = await getWalletTypeSimple() - walletTypeOptions.value = res.data.records - form.walletTypeId = res.data.records.find((item: any) => item.uniqueCode == "1").id } // 提交 diff --git a/src/views/wallet/wallet-rule-transaction/index.vue b/src/views/wallet/wallet-rule-transaction/index.vue index 1366546..15dfe26 100644 --- a/src/views/wallet/wallet-rule-transaction/index.vue +++ b/src/views/wallet/wallet-rule-transaction/index.vue @@ -12,6 +12,18 @@ :nodeClickable="false" > + + + + + + + + + + + + @@ -46,29 +58,75 @@ > + + + + + - - + + + + + + - - + + + + + + - - - + + + + + + - - -