|
@@ -1,5 +1,21 @@
|
|
<template>
|
|
<template>
|
|
- <div class="registration-query flex flex-col h-full">
|
|
|
|
|
|
+ <div class="flex flex-col h-full">
|
|
|
|
+ <div class="page-action">
|
|
|
|
+ <t-space size="small">
|
|
|
|
+ <t-button theme="primary" @click="handleAdd">
|
|
|
|
+ <template #icon><svg-icon name="add-circle" color="#fff" /></template
|
|
|
|
+ >新增客户
|
|
|
|
+ </t-button>
|
|
|
|
+ <upload-button
|
|
|
|
+ upload-url="/api/sys/custom/import"
|
|
|
|
+ :button-props="{
|
|
|
|
+ content: '批量导入',
|
|
|
|
+ variant: 'outline',
|
|
|
|
+ theme: 'default',
|
|
|
|
+ }"
|
|
|
|
+ ></upload-button>
|
|
|
|
+ </t-space>
|
|
|
|
+ </div>
|
|
<SearchForm :fields="fields" :params="params">
|
|
<SearchForm :fields="fields" :params="params">
|
|
<template #manager="{ item, params }">
|
|
<template #manager="{ item, params }">
|
|
<select-type-user v-model="params[item.prop]" type="ACCOUNT_MANAGER">
|
|
<select-type-user v-model="params[item.prop]" type="ACCOUNT_MANAGER">
|
|
@@ -11,15 +27,6 @@
|
|
</template>
|
|
</template>
|
|
</SearchForm>
|
|
</SearchForm>
|
|
<div class="flex-1 page-wrap">
|
|
<div class="flex-1 page-wrap">
|
|
- <t-space size="small">
|
|
|
|
- <t-button theme="success" @click="handleAdd">新增</t-button>
|
|
|
|
- <upload-button
|
|
|
|
- upload-url="/api/sys/custom/import"
|
|
|
|
- :button-props="{
|
|
|
|
- content: '批量导入',
|
|
|
|
- }"
|
|
|
|
- ></upload-button>
|
|
|
|
- </t-space>
|
|
|
|
<t-table
|
|
<t-table
|
|
size="small"
|
|
size="small"
|
|
row-key="id"
|
|
row-key="id"
|
|
@@ -141,26 +148,29 @@ const params = reactive({
|
|
});
|
|
});
|
|
|
|
|
|
const columns = [
|
|
const columns = [
|
|
- { colKey: 'id', title: '客户ID', width: 180 },
|
|
|
|
- { colKey: 'name', title: '客户名称' },
|
|
|
|
|
|
+ { colKey: 'id', title: '客户ID', width: 200 },
|
|
|
|
+ { colKey: 'name', title: '客户名称', width: 120 },
|
|
{ colKey: 'type', title: '客户类型', cell: 'type', width: 100 },
|
|
{ colKey: 'type', title: '客户类型', cell: 'type', width: 100 },
|
|
{ colKey: 'province', title: '省份', width: 100 },
|
|
{ colKey: 'province', title: '省份', width: 100 },
|
|
{ colKey: 'city', title: '城市', width: 100 },
|
|
{ colKey: 'city', title: '城市', width: 100 },
|
|
{ colKey: 'area', title: '县区', width: 100 },
|
|
{ colKey: 'area', title: '县区', width: 100 },
|
|
{ colKey: 'address', title: '地址', minWidth: 160 },
|
|
{ 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: 'managerName', title: '客户经理', width: 120 },
|
|
|
|
+ { colKey: 'level', title: '服务档位名称', width: 120 },
|
|
|
|
+ {
|
|
|
|
+ colKey: 'roleList',
|
|
|
|
+ title: '项目角色配置',
|
|
|
|
+ cell: 'role-list',
|
|
|
|
+ minWidth: 200,
|
|
|
|
+ },
|
|
|
|
+ { colKey: 'peoperDay', title: '标准人天', width: 100 },
|
|
|
|
+ { colKey: 'createName', title: '创建人', width: 120 },
|
|
{ colKey: 'createTime', title: '创建时间', width: 180, cell: 'create-time' },
|
|
{ colKey: 'createTime', title: '创建时间', width: 180, cell: 'create-time' },
|
|
{
|
|
{
|
|
title: '管理',
|
|
title: '管理',
|
|
colKey: 'operate',
|
|
colKey: 'operate',
|
|
fixed: 'right',
|
|
fixed: 'right',
|
|
width: 120,
|
|
width: 120,
|
|
- align: 'center',
|
|
|
|
- cell: 'operate',
|
|
|
|
},
|
|
},
|
|
];
|
|
];
|
|
const {
|
|
const {
|
|
@@ -176,15 +186,14 @@ const handleAdd = () => {
|
|
curRow.value = null;
|
|
curRow.value = null;
|
|
showEditCustomerDialog.value = true;
|
|
showEditCustomerDialog.value = true;
|
|
};
|
|
};
|
|
-const handleImport = () => {
|
|
|
|
- console.log('import');
|
|
|
|
-};
|
|
|
|
|
|
+
|
|
const handleDelete = (row) => {
|
|
const handleDelete = (row) => {
|
|
const confirmDia = DialogPlugin({
|
|
const confirmDia = DialogPlugin({
|
|
header: '操作提示',
|
|
header: '操作提示',
|
|
body: `确定要删除当前记录吗`,
|
|
body: `确定要删除当前记录吗`,
|
|
confirmBtn: '确定',
|
|
confirmBtn: '确定',
|
|
cancelBtn: '取消',
|
|
cancelBtn: '取消',
|
|
|
|
+ theme: 'warning',
|
|
onConfirm: async () => {
|
|
onConfirm: async () => {
|
|
confirmDia.hide();
|
|
confirmDia.hide();
|
|
const res = await customerDeleteApi(row.id).catch(() => {});
|
|
const res = await customerDeleteApi(row.id).catch(() => {});
|