|
@@ -2,10 +2,12 @@
|
|
<div class="registration-query flex flex-col h-full">
|
|
<div class="registration-query flex flex-col h-full">
|
|
<SearchForm :fields="fields" :params="params">
|
|
<SearchForm :fields="fields" :params="params">
|
|
<template #manager="{ item, params }">
|
|
<template #manager="{ item, params }">
|
|
- <t-select v-model="params[item.prop]">
|
|
|
|
- <t-option label="label1" :value="1" />
|
|
|
|
- <t-option label="label2" :value="2" />
|
|
|
|
- </t-select>
|
|
|
|
|
|
+ <select-user v-model="params[item.prop]" clearable role-type="manager">
|
|
|
|
+ </select-user>
|
|
|
|
+ </template>
|
|
|
|
+ <template #level="{ item, params }">
|
|
|
|
+ <select-service-level v-model="params[item.prop]" clearable>
|
|
|
|
+ </select-service-level>
|
|
</template>
|
|
</template>
|
|
</SearchForm>
|
|
</SearchForm>
|
|
<div class="flex-1 page-wrap">
|
|
<div class="flex-1 page-wrap">
|
|
@@ -31,7 +33,14 @@
|
|
total: pagination.total,
|
|
total: pagination.total,
|
|
current: pagination.page,
|
|
current: pagination.page,
|
|
}"
|
|
}"
|
|
|
|
+ v-loading="tableLoading"
|
|
>
|
|
>
|
|
|
|
+ <template #type="{ col, row }">
|
|
|
|
+ {{ customerTypeFilter(row[col.colKey]) }}
|
|
|
|
+ </template>
|
|
|
|
+ <template #create-time="{ col, row }">
|
|
|
|
+ {{ timestampFilter(row[col.colKey]) }}
|
|
|
|
+ </template>
|
|
<template #role-list="{ col, row }">
|
|
<template #role-list="{ col, row }">
|
|
{{
|
|
{{
|
|
row[col.colKey]
|
|
row[col.colKey]
|
|
@@ -58,61 +67,11 @@ import EditCustomerDialog from './edit-customer-dialog.vue';
|
|
import { customeryQueryApi, customerDeleteApi } from '@/api/system';
|
|
import { customeryQueryApi, customerDeleteApi } from '@/api/system';
|
|
import { CUSTOMER_TYPE } from '@/config/constants';
|
|
import { CUSTOMER_TYPE } from '@/config/constants';
|
|
import { dictToOptionList } from '@/utils/tool';
|
|
import { dictToOptionList } from '@/utils/tool';
|
|
|
|
+import { customerTypeFilter, timestampFilter } from '@/utils/filter';
|
|
|
|
|
|
const showEditCustomerDialog = ref(false);
|
|
const showEditCustomerDialog = ref(false);
|
|
const curRow = ref(null);
|
|
const curRow = ref(null);
|
|
|
|
|
|
-const columns = [
|
|
|
|
- { colKey: 'id', title: '客户ID' },
|
|
|
|
- { colKey: 'name', title: '客户名称' },
|
|
|
|
- { colKey: 'type', title: '客户类型' },
|
|
|
|
- { colKey: 'province', title: '省份' },
|
|
|
|
- { colKey: 'city', title: '城市' },
|
|
|
|
- { colKey: 'area', title: '县区' },
|
|
|
|
- { colKey: 'address', title: '地址' },
|
|
|
|
- { colKey: 'managerName', title: '客户经理' },
|
|
|
|
- { colKey: 'level', title: '服务档位名称' },
|
|
|
|
- { colKey: 'roleList', title: '项目角色配置', cell: 'role-list', width: 170 },
|
|
|
|
- { colKey: 'peoperDay', title: '标准人天', width: 80 },
|
|
|
|
- { colKey: 'createName', title: '创建人' },
|
|
|
|
- { colKey: 'createTime', title: '创建时间', width: 170 },
|
|
|
|
- {
|
|
|
|
- title: '管理',
|
|
|
|
- colKey: 'operate',
|
|
|
|
- fixed: 'right',
|
|
|
|
- width: 120,
|
|
|
|
- align: 'center',
|
|
|
|
- cell: (h, { row }) => {
|
|
|
|
- return (
|
|
|
|
- <div class="table-operations">
|
|
|
|
- <t-link
|
|
|
|
- theme="primary"
|
|
|
|
- hover="color"
|
|
|
|
- onClick={(e) => {
|
|
|
|
- e.stopPropagation();
|
|
|
|
- handleEdit(row);
|
|
|
|
- }}
|
|
|
|
- >
|
|
|
|
- 修改
|
|
|
|
- </t-link>
|
|
|
|
- <t-link
|
|
|
|
- theme="danger"
|
|
|
|
- hover="color"
|
|
|
|
- onClick={(e) => {
|
|
|
|
- e.stopPropagation();
|
|
|
|
- handleDelete(row);
|
|
|
|
- }}
|
|
|
|
- >
|
|
|
|
- 删除
|
|
|
|
- </t-link>
|
|
|
|
- </div>
|
|
|
|
- );
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
-];
|
|
|
|
-const { pagination, tableData, fetchData, search, onChange } =
|
|
|
|
- useFetchTable(customeryQueryApi);
|
|
|
|
-
|
|
|
|
const fields = ref([
|
|
const fields = ref([
|
|
{
|
|
{
|
|
prop: 'type',
|
|
prop: 'type',
|
|
@@ -129,7 +88,6 @@ const fields = ref([
|
|
type: 'select',
|
|
type: 'select',
|
|
labelWidth: 100,
|
|
labelWidth: 100,
|
|
colSpan: 5,
|
|
colSpan: 5,
|
|
- // options: [{ value: 1, label: '张三' }],
|
|
|
|
},
|
|
},
|
|
{
|
|
{
|
|
prop: 'name',
|
|
prop: 'name',
|
|
@@ -143,12 +101,11 @@ const fields = ref([
|
|
},
|
|
},
|
|
{
|
|
{
|
|
prop: 'levelId',
|
|
prop: 'levelId',
|
|
|
|
+ cell: 'level',
|
|
label: '服务档位',
|
|
label: '服务档位',
|
|
type: 'select',
|
|
type: 'select',
|
|
labelWidth: 100,
|
|
labelWidth: 100,
|
|
colSpan: 5,
|
|
colSpan: 5,
|
|
- // ToDo:异步加载 测试
|
|
|
|
- options: [{ value: 1, label: '一档' }],
|
|
|
|
},
|
|
},
|
|
{
|
|
{
|
|
type: 'buttons',
|
|
type: 'buttons',
|
|
@@ -171,6 +128,63 @@ const params = reactive({
|
|
levelId: '',
|
|
levelId: '',
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+const columns = [
|
|
|
|
+ { colKey: 'id', title: '客户ID', width: 180 },
|
|
|
|
+ { colKey: 'name', title: '客户名称' },
|
|
|
|
+ { colKey: 'type', title: '客户类型', cell: 'type', width: 100 },
|
|
|
|
+ { colKey: 'province', title: '省份', width: 100 },
|
|
|
|
+ { colKey: 'city', title: '城市', width: 100 },
|
|
|
|
+ { colKey: 'area', title: '县区', width: 100 },
|
|
|
|
+ { colKey: 'address', title: '地址', minWidth: 160 },
|
|
|
|
+ { colKey: 'managerName', title: '客户经理' },
|
|
|
|
+ { colKey: 'level', title: '服务档位名称' },
|
|
|
|
+ { colKey: 'roleList', title: '项目角色配置', cell: 'role-list', width: 170 },
|
|
|
|
+ { colKey: 'peoperDay', title: '标准人天', width: 80 },
|
|
|
|
+ { colKey: 'createName', title: '创建人' },
|
|
|
|
+ { colKey: 'createTime', title: '创建时间', width: 170, cell: 'create-time' },
|
|
|
|
+ {
|
|
|
|
+ title: '管理',
|
|
|
|
+ colKey: 'operate',
|
|
|
|
+ fixed: 'right',
|
|
|
|
+ width: 120,
|
|
|
|
+ align: 'center',
|
|
|
|
+ cell: (h, { row }) => {
|
|
|
|
+ return (
|
|
|
|
+ <div class="table-operations">
|
|
|
|
+ <t-link
|
|
|
|
+ theme="primary"
|
|
|
|
+ hover="color"
|
|
|
|
+ onClick={(e) => {
|
|
|
|
+ e.stopPropagation();
|
|
|
|
+ handleEdit(row);
|
|
|
|
+ }}
|
|
|
|
+ >
|
|
|
|
+ 修改
|
|
|
|
+ </t-link>
|
|
|
|
+ <t-link
|
|
|
|
+ theme="danger"
|
|
|
|
+ hover="color"
|
|
|
|
+ onClick={(e) => {
|
|
|
|
+ e.stopPropagation();
|
|
|
|
+ handleDelete(row);
|
|
|
|
+ }}
|
|
|
|
+ >
|
|
|
|
+ 删除
|
|
|
|
+ </t-link>
|
|
|
|
+ </div>
|
|
|
|
+ );
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+];
|
|
|
|
+const {
|
|
|
|
+ loading: tableLoading,
|
|
|
|
+ pagination,
|
|
|
|
+ tableData,
|
|
|
|
+ fetchData,
|
|
|
|
+ search,
|
|
|
|
+ onChange,
|
|
|
|
+} = useFetchTable(customeryQueryApi, { params });
|
|
|
|
+
|
|
const handleAdd = () => {
|
|
const handleAdd = () => {
|
|
curRow.value = null;
|
|
curRow.value = null;
|
|
showEditCustomerDialog.value = true;
|
|
showEditCustomerDialog.value = true;
|