update
This commit is contained in:
@@ -15,6 +15,22 @@ const system = {
|
||||
method: Method.GET,
|
||||
});
|
||||
},
|
||||
getRange: async () => {
|
||||
return new Promise((resolve) => {
|
||||
resolve({
|
||||
data: [
|
||||
{
|
||||
id: 1,
|
||||
name: '≥'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '<'
|
||||
}
|
||||
]
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export default system;
|
||||
|
||||
@@ -28,6 +28,7 @@ const {config, title, buttonCol, formBottom} = defineProps({
|
||||
const from = defineModel('from');
|
||||
|
||||
const reset = () => {
|
||||
console.log(from.value)
|
||||
Object.keys(from.value).forEach(key => {
|
||||
from.value[key] = null;
|
||||
});
|
||||
@@ -69,6 +70,7 @@ const reset = () => {
|
||||
|
||||
<template v-if="item.type === FROM_TYPE.DATETIME">
|
||||
<a-range-picker
|
||||
v-model:model-value="from[item.key]"
|
||||
class="w-full"
|
||||
@change="(v) => {
|
||||
from[item.start] = v[0];
|
||||
|
||||
@@ -135,7 +135,7 @@ const FilterConfig = [
|
||||
}),
|
||||
},
|
||||
{
|
||||
key: 'wd',
|
||||
key: 'rangeTime',
|
||||
type: 'datetime',
|
||||
label: '动账日期',
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ const FilterConfig = [
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'datetime',
|
||||
key: 'rangeTime',
|
||||
start: 'start_time',
|
||||
end: 'end_time',
|
||||
type: 'datetime',
|
||||
|
||||
@@ -70,22 +70,9 @@ const FilterConfig = [
|
||||
label: '标签',
|
||||
placeholder: '请选择标签',
|
||||
span: 6,
|
||||
api: async () => ({
|
||||
data: [
|
||||
{
|
||||
name: '选项一',
|
||||
id: 1,
|
||||
},
|
||||
{
|
||||
name: '选项二',
|
||||
id: 2,
|
||||
},
|
||||
{
|
||||
name: '选项三',
|
||||
id: 3,
|
||||
},
|
||||
]
|
||||
}),
|
||||
api: async () => {
|
||||
return await Api.admin.getStatusAttr();
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'wd',
|
||||
@@ -94,7 +81,7 @@ const FilterConfig = [
|
||||
placeholder: '请输入商家ID',
|
||||
},
|
||||
{
|
||||
key: 'wd',
|
||||
key: 'rangeTime',
|
||||
type: 'datetime',
|
||||
label: '创建日期',
|
||||
}
|
||||
@@ -106,7 +93,7 @@ const rowSelection = reactive({
|
||||
onlyCurrent: false,
|
||||
});
|
||||
const po = reactive({
|
||||
wd: null,
|
||||
rangeTime: null,
|
||||
});
|
||||
const vo = reactive({
|
||||
page: '',
|
||||
|
||||
@@ -101,7 +101,7 @@ const FilterConfig = [
|
||||
span: 6,
|
||||
},
|
||||
{
|
||||
key: 'wd',
|
||||
key: 'rangeTime',
|
||||
start: 'start_time',
|
||||
end: 'end_time',
|
||||
type: 'datetime',
|
||||
@@ -115,7 +115,9 @@ const rowSelection = reactive({
|
||||
showCheckedAll: true,
|
||||
onlyCurrent: false,
|
||||
});
|
||||
const po = reactive({});
|
||||
const po = reactive({
|
||||
pass: 0
|
||||
});
|
||||
const vo = reactive({
|
||||
page: '',
|
||||
rows: [],
|
||||
|
||||
@@ -119,7 +119,9 @@ const FilterConfig = [
|
||||
span: 6,
|
||||
},
|
||||
{
|
||||
key: 'wd',
|
||||
key: 'rangeTime',
|
||||
start: 'start_time',
|
||||
end: 'end_time',
|
||||
type: 'datetime',
|
||||
label: '领取时间',
|
||||
span: 6,
|
||||
@@ -127,7 +129,8 @@ const FilterConfig = [
|
||||
];
|
||||
|
||||
const po = reactive({
|
||||
wd: null,
|
||||
pass: 1,
|
||||
dcl: 1,
|
||||
});
|
||||
const vo = reactive({
|
||||
page: '',
|
||||
@@ -136,7 +139,7 @@ const vo = reactive({
|
||||
});
|
||||
const {loading, pagination, initFetchData} = useTableQuery({
|
||||
parameter: po,
|
||||
api: Api.system.getData,
|
||||
api: Api.admin.getExchangeLog,
|
||||
callback: (data) => {
|
||||
Object.assign(vo, data);
|
||||
}
|
||||
@@ -150,22 +153,22 @@ const {loading, pagination, initFetchData} = useTableQuery({
|
||||
v-model:from="po"
|
||||
:config="FilterConfig">
|
||||
<template v-slot:deduct>
|
||||
<XSelect :api="Api.system.getSelect"></XSelect>
|
||||
<XSelect :api="Api.system.getRange"></XSelect>
|
||||
<a-input-number placeholder="请输入比例" class="ml-[20px]">
|
||||
<template #suffix>%</template>
|
||||
</a-input-number>
|
||||
</template>
|
||||
<template v-slot:hands>
|
||||
<XSelect :api="Api.system.getSelect"></XSelect>
|
||||
<XSelect :api="Api.system.getRange"></XSelect>
|
||||
<a-input-number placeholder="请输入金额" class="ml-[20px]">
|
||||
</a-input-number>
|
||||
</template>
|
||||
</Filter>
|
||||
|
||||
<a-tabs type="rounded">
|
||||
<a-tab-pane title="待处理" key="1">
|
||||
<a-tabs type="rounded" v-model:active-key="po.dcl">
|
||||
<a-tab-pane title="待处理" :key="1">
|
||||
</a-tab-pane>
|
||||
<a-tab-pane title="已处理" key="2">
|
||||
<a-tab-pane title="已处理" :key="2">
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user