|
@@ -7,10 +7,10 @@ import { Page, useVbenModal } from '@vben/common-ui';
|
|
|
import { MdiDetail, MdiEdit } from '@vben/icons';
|
|
import { MdiDetail, MdiEdit } from '@vben/icons';
|
|
|
|
|
|
|
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
|
|
-// import { getCustomerListApi } from '#/api/customer-manage';
|
|
|
|
|
|
|
+import { getCoupon2ListApi } from '#/api/coupon/coupon2';
|
|
|
import { $t } from '#/locales';
|
|
import { $t } from '#/locales';
|
|
|
|
|
|
|
|
-import CustomerForm from './form.vue';
|
|
|
|
|
|
|
+import Coupon1Form from './form.vue';
|
|
|
|
|
|
|
|
const formOptions: VbenFormProps = {
|
|
const formOptions: VbenFormProps = {
|
|
|
// 默认展开
|
|
// 默认展开
|
|
@@ -22,23 +22,15 @@ const formOptions: VbenFormProps = {
|
|
|
schema: [
|
|
schema: [
|
|
|
{
|
|
{
|
|
|
component: 'Input',
|
|
component: 'Input',
|
|
|
- fieldName: 'usersname',
|
|
|
|
|
- label: '用户名称',
|
|
|
|
|
- componentProps: {
|
|
|
|
|
- placeholder: $t('ui.placeholder.input'),
|
|
|
|
|
- allowClear: true,
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- component: 'Input',
|
|
|
|
|
- fieldName: 'usersphone',
|
|
|
|
|
- label: '用户手机号',
|
|
|
|
|
|
|
+ fieldName: 'couponmc',
|
|
|
|
|
+ label: '优惠券名称',
|
|
|
componentProps: {
|
|
componentProps: {
|
|
|
placeholder: $t('ui.placeholder.input'),
|
|
placeholder: $t('ui.placeholder.input'),
|
|
|
allowClear: true,
|
|
allowClear: true,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
],
|
|
],
|
|
|
|
|
+ wrapperClass: 'grid-cols-1 md:grid-cols-3 lg:grid-cols-5',
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const gridOptions: VxeGridProps<any> = {
|
|
const gridOptions: VxeGridProps<any> = {
|
|
@@ -62,29 +54,27 @@ const gridOptions: VxeGridProps<any> = {
|
|
|
result: 'Data',
|
|
result: 'Data',
|
|
|
total: 'Total',
|
|
total: 'Total',
|
|
|
},
|
|
},
|
|
|
- // ajax: {
|
|
|
|
|
- // query: async ({ page }, formValues) => {
|
|
|
|
|
- // return await getCustomerListApi({
|
|
|
|
|
- // pageindex: page.currentPage,
|
|
|
|
|
- // rows: page.pageSize,
|
|
|
|
|
- // ...formValues,
|
|
|
|
|
- // });
|
|
|
|
|
- // },
|
|
|
|
|
- // },
|
|
|
|
|
|
|
+ ajax: {
|
|
|
|
|
+ query: async ({ page }, formValues) => {
|
|
|
|
|
+ return await getCoupon2ListApi({
|
|
|
|
|
+ pageindex: page.currentPage,
|
|
|
|
|
+ rows: page.pageSize,
|
|
|
|
|
+ ...formValues,
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
columns: [
|
|
columns: [
|
|
|
- { title: '用户名称', field: 'usersname' },
|
|
|
|
|
- { title: '用户性质', field: 'usersnature' },
|
|
|
|
|
- { title: '用户证件号码', field: 'usersidcardnumber' },
|
|
|
|
|
- { title: '用户开户银行名称', field: 'usersbankname' },
|
|
|
|
|
- { title: '用户开户银行账号', field: 'usersbanknumber' },
|
|
|
|
|
- { title: '用户手机号', field: 'usersphone' },
|
|
|
|
|
- { title: '用户邮箱', field: 'usersemail' },
|
|
|
|
|
- { title: '用户地址', field: 'usersaddress' },
|
|
|
|
|
- { title: '用户联系手机号', field: 'userscontactphone' },
|
|
|
|
|
- { title: '用户联系邮箱', field: 'userscontactemail' },
|
|
|
|
|
- { title: '用户联系地址', field: 'userscontactaddress' },
|
|
|
|
|
|
|
+ { title: '优惠券ID', field: 'coupon2sid' },
|
|
|
|
|
+ { title: '优惠券代码', field: 'coupon2code' },
|
|
|
|
|
+ { title: '申请时间', field: 'coupon2adddatetime' },
|
|
|
|
|
+ { title: '审核时间', field: 'coupon2reviewdatetime' },
|
|
|
|
|
+ { title: '申请人ID', field: 'coupon2userid' },
|
|
|
|
|
+ { title: '优惠券状态', field: 'coupon2sype' },
|
|
|
|
|
+ { title: '使用状态', field: 'coupon2isused' },
|
|
|
|
|
+ { title: '可用产品', field: 'coupon2productids' },
|
|
|
|
|
+ { title: '关联主券ID', field: 'coupon2coupon1id' },
|
|
|
{
|
|
{
|
|
|
title: '操作',
|
|
title: '操作',
|
|
|
field: 'action',
|
|
field: 'action',
|
|
@@ -95,35 +85,38 @@ const gridOptions: VxeGridProps<any> = {
|
|
|
],
|
|
],
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-const [Grid] = useVbenVxeGrid({ gridOptions, formOptions });
|
|
|
|
|
|
|
+const [Grid, gridApi] = useVbenVxeGrid({ gridOptions, formOptions });
|
|
|
|
|
|
|
|
const [Modal, modalApi] = useVbenModal({
|
|
const [Modal, modalApi] = useVbenModal({
|
|
|
fullscreenButton: false,
|
|
fullscreenButton: false,
|
|
|
closeOnClickModal: false,
|
|
closeOnClickModal: false,
|
|
|
closeOnPressEscape: false,
|
|
closeOnPressEscape: false,
|
|
|
- connectedComponent: CustomerForm,
|
|
|
|
|
|
|
+ connectedComponent: Coupon1Form,
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
/* 创建 */
|
|
/* 创建 */
|
|
|
function handleCreate() {
|
|
function handleCreate() {
|
|
|
- modalApi.setData({ create: true }).open();
|
|
|
|
|
|
|
+ modalApi.setData({ formType: 'create' }).open();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/* 编辑 */
|
|
/* 编辑 */
|
|
|
function handleEdit(row: any) {
|
|
function handleEdit(row: any) {
|
|
|
- modalApi.setData({ row }).open();
|
|
|
|
|
|
|
+ modalApi.setData({ formType: 'edit', row }).open();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/* 详情 */
|
|
/* 详情 */
|
|
|
function handleDetail(row: any) {
|
|
function handleDetail(row: any) {
|
|
|
- modalApi.setData({ row }).open();
|
|
|
|
|
- // router.push(`/system/users/detail/${row.userName}`);
|
|
|
|
|
|
|
+ modalApi.setData({ formType: 'detail', row }).open();
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+function handleFinish() {
|
|
|
|
|
+ gridApi.reload();
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
<template>
|
|
|
<Page auto-content-height>
|
|
<Page auto-content-height>
|
|
|
- <Grid table-title="商户审核">
|
|
|
|
|
|
|
+ <Grid table-title="优惠券列表">
|
|
|
<template #toolbar-tools>
|
|
<template #toolbar-tools>
|
|
|
<el-button type="primary" @click="handleCreate"> 新增 </el-button>
|
|
<el-button type="primary" @click="handleCreate"> 新增 </el-button>
|
|
|
</template>
|
|
</template>
|
|
@@ -142,6 +135,6 @@ function handleDetail(row: any) {
|
|
|
/>
|
|
/>
|
|
|
</template>
|
|
</template>
|
|
|
</Grid>
|
|
</Grid>
|
|
|
- <Modal />
|
|
|
|
|
|
|
+ <Modal @finish="handleFinish" />
|
|
|
</Page>
|
|
</Page>
|
|
|
</template>
|
|
</template>
|