|
|
@@ -8,31 +8,28 @@
|
|
|
<a-button preIcon="ant-design:plus-outlined" @click="onExportXls">导出</a-button>
|
|
|
</template>
|
|
|
<template #bodyCell="{ column, record }">
|
|
|
- <span v-if="column.key === 'serviceCredential'" class="cursorstyle" @click="onGetVoucher(record)">
|
|
|
+ <span v-if="column.key === 'serviceCredential'" class="cursorstyle"
|
|
|
+ @click="onGetVoucher(record)">
|
|
|
服务凭证
|
|
|
</span>
|
|
|
</template>
|
|
|
<!--操作栏-->
|
|
|
<template #action="{ record }">
|
|
|
- <TableAction :actions="getTableAction(record)" />
|
|
|
+ <TableAction :actions="getTableAction(record)"/>
|
|
|
</template>
|
|
|
</BasicTable>
|
|
|
- <a-modal v-model:open="benefitDetailsShow" title="权益明细" width="700px" :footer="null"
|
|
|
- :bodyStyle="{ padding: '16px' }">
|
|
|
-
|
|
|
- </a-modal>
|
|
|
</div>
|
|
|
</template>
|
|
|
<!-- 行为区域 -->
|
|
|
<script lang="ts" name="basic-table-demo" setup>
|
|
|
-import { ActionItem, BasicColumn, BasicTable, TableAction } from '/@/components/Table';
|
|
|
-import { useListPage } from '/@/hooks/system/useListPage';
|
|
|
-import { FormSchema } from '/@/components/Table';
|
|
|
-import { reactive, ref } from 'vue';
|
|
|
+import {ActionItem, BasicColumn, BasicTable, TableAction} from '/@/components/Table';
|
|
|
+import {useListPage} from '/@/hooks/system/useListPage';
|
|
|
+import {FormSchema} from '/@/components/Table';
|
|
|
+import {reactive, ref} from 'vue';
|
|
|
import * as usageRecordsAPI from '/@/api/channel/usageRecords';
|
|
|
-import { message, Modal } from 'ant-design-vue';
|
|
|
-import { useRouter, useRoute } from 'vue-router';
|
|
|
-import { createImgPreview } from '/@/components/Preview/index';
|
|
|
+import {message, Modal} from 'ant-design-vue';
|
|
|
+import {useRouter, useRoute} from 'vue-router';
|
|
|
+import {createImgPreview} from '/@/components/Preview/index';
|
|
|
|
|
|
//表单配置
|
|
|
const router = useRouter();
|
|
|
@@ -85,9 +82,14 @@ const columns: BasicColumn[] = [
|
|
|
key: 'serviceCredential',
|
|
|
},
|
|
|
{
|
|
|
- title: '接收人保单号',
|
|
|
- dataIndex: 'policyNumber',
|
|
|
- key: 'policyNumber',
|
|
|
+ title: '接收人交强保单号',
|
|
|
+ dataIndex: 'ciPolicyNumber',
|
|
|
+ key: 'ciPolicyNumber',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '接收人商业保单号',
|
|
|
+ dataIndex: 'biPolicyNumber',
|
|
|
+ key: 'biPolicyNumber',
|
|
|
},
|
|
|
{
|
|
|
title: '客户',
|
|
|
@@ -121,7 +123,7 @@ const searchFormSchema: FormSchema[] = [
|
|
|
},
|
|
|
{
|
|
|
label: '核销商户',
|
|
|
- field: 'pricingName',
|
|
|
+ field: 'merchantName',
|
|
|
component: 'Input',
|
|
|
colProps: {
|
|
|
span: 7,
|
|
|
@@ -129,7 +131,7 @@ const searchFormSchema: FormSchema[] = [
|
|
|
},
|
|
|
{
|
|
|
label: '权益名称',
|
|
|
- field: 'status',
|
|
|
+ field: 'rightsName',
|
|
|
component: 'Input',
|
|
|
colProps: {
|
|
|
span: 7,
|
|
|
@@ -137,7 +139,7 @@ const searchFormSchema: FormSchema[] = [
|
|
|
},
|
|
|
{
|
|
|
label: '发放渠道',
|
|
|
- field: 'status',
|
|
|
+ field: 'channelName',
|
|
|
component: 'Input',
|
|
|
colProps: {
|
|
|
span: 7,
|
|
|
@@ -145,23 +147,31 @@ const searchFormSchema: FormSchema[] = [
|
|
|
},
|
|
|
{
|
|
|
label: '订单状态',
|
|
|
- field: 'dateRangeSelect',
|
|
|
+ field: 'orderStatus',
|
|
|
component: 'Select',
|
|
|
colProps: {
|
|
|
span: 7,
|
|
|
},
|
|
|
componentProps: {
|
|
|
options: [
|
|
|
- { label: "全部", value: null },
|
|
|
- { label: "启用", value: 1 },
|
|
|
- { label: "禁用", value: 0 },
|
|
|
+ {label: "全部", value: null},
|
|
|
+ {label: "启用", value: 1},
|
|
|
+ {label: "禁用", value: 0},
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- label: '接收人保单号',
|
|
|
- field: 'status',
|
|
|
+ label: '接收人交强保单号',
|
|
|
+ field: 'ciPolicyNumber',
|
|
|
+ component: 'Input',
|
|
|
+ colProps: {
|
|
|
+ span: 7,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '接收人商业保单号',
|
|
|
+ field: 'biPolicyNumber',
|
|
|
component: 'Input',
|
|
|
colProps: {
|
|
|
span: 7,
|
|
|
@@ -170,7 +180,7 @@ const searchFormSchema: FormSchema[] = [
|
|
|
|
|
|
{
|
|
|
label: '下单时间',
|
|
|
- field: 'dateRangeSelect',
|
|
|
+ field: 'orderDate',
|
|
|
component: 'RangeDate',
|
|
|
colProps: {
|
|
|
span: 7,
|
|
|
@@ -181,7 +191,7 @@ const searchFormSchema: FormSchema[] = [
|
|
|
},
|
|
|
{
|
|
|
label: '完成时间',
|
|
|
- field: 'dateRangeSelect',
|
|
|
+ field: 'completionDate',
|
|
|
component: 'RangeDate',
|
|
|
colProps: {
|
|
|
span: 7,
|
|
|
@@ -194,7 +204,7 @@ const searchFormSchema: FormSchema[] = [
|
|
|
/** useListPage 是整个框架的核心用于表格渲染,里边封装了很多公共方法;
|
|
|
* 平台通过此封装,简化了代码,支持自定义扩展*/
|
|
|
// 通过hook useListPage渲染表格(设置dataSource、columns、actionColumn等参数)
|
|
|
-const { tableContext,onExportXls } = useListPage({
|
|
|
+const {tableContext, onExportXls} = useListPage({
|
|
|
designScope: 'basic-table-demo',
|
|
|
tableProps: {
|
|
|
title: '用户列表',
|
|
|
@@ -204,6 +214,11 @@ const { tableContext,onExportXls } = useListPage({
|
|
|
formConfig: {
|
|
|
schemas: searchFormSchema,
|
|
|
showAdvancedButton: false,
|
|
|
+ // 将表单内时间区域的值映射成 2个字段, 分别是 joinTime_begin 和 joinTime_end
|
|
|
+ fieldMapToTime: [
|
|
|
+ ['orderDate', ['startTime', 'endTime'], 'YYYY-MM-DD'],
|
|
|
+ ['completionDate', ['completionStartTime', 'completionEndTime'], 'YYYY-MM-DD']
|
|
|
+ ],
|
|
|
},
|
|
|
api: usageRecordsAPI.getUsageRecordList,
|
|
|
size: 'small',
|
|
|
@@ -211,15 +226,18 @@ const { tableContext,onExportXls } = useListPage({
|
|
|
width: 200,
|
|
|
fixed: 'right'
|
|
|
},
|
|
|
+
|
|
|
},
|
|
|
exportConfig: {
|
|
|
name: '使用记录导出',
|
|
|
url: '/channel/usage/record/exportXls',
|
|
|
method: 'get'
|
|
|
},
|
|
|
+
|
|
|
});
|
|
|
// BasicTable绑定注册
|
|
|
-const [registerTable, { getForm, reload }] = tableContext;
|
|
|
+const [registerTable, {getForm, reload}] = tableContext;
|
|
|
+
|
|
|
/**
|
|
|
* 操作栏
|
|
|
*/
|
|
|
@@ -234,11 +252,17 @@ function getTableAction(record: ActionItem): ActionItem[] {
|
|
|
},
|
|
|
];
|
|
|
}
|
|
|
+
|
|
|
// 查看服务凭证
|
|
|
const onGetVoucher = (record: ActionItem) => {
|
|
|
usageRecordsAPI.getUsageRecordVoucher(record.orderNo).then((res) => {
|
|
|
if (res.success) {
|
|
|
- createImgPreview({ imageList: [res.result], defaultWidth: 700, rememberState: true,maskClosable: true });
|
|
|
+ createImgPreview({
|
|
|
+ imageList: [res.result],
|
|
|
+ defaultWidth: 700,
|
|
|
+ rememberState: true,
|
|
|
+ maskClosable: true
|
|
|
+ });
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
@@ -259,6 +283,7 @@ const details = (record: ActionItem) => {
|
|
|
::v-deep(.ant-col) {
|
|
|
width: auto;
|
|
|
}
|
|
|
+
|
|
|
.cursorstyle {
|
|
|
font-size: 14px;
|
|
|
color: #018FFB;
|