|
@@ -6,16 +6,14 @@
|
|
|
allow-collapse
|
|
allow-collapse
|
|
|
:right-style="{ overflow: 'hidden' }"
|
|
:right-style="{ overflow: 'hidden' }"
|
|
|
>
|
|
>
|
|
|
- <div class="ele-border-lighter sys-organization-list">
|
|
|
|
|
- <el-tree
|
|
|
|
|
- :data="treeList"
|
|
|
|
|
- :props="defaultProps"
|
|
|
|
|
- ref="treeRef"
|
|
|
|
|
- default-expand-all
|
|
|
|
|
- :highlight-current="true"
|
|
|
|
|
- node-key="id"
|
|
|
|
|
- @node-click="handleNodeClick"
|
|
|
|
|
- ></el-tree>
|
|
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <div class="ele-border-lighter sys-organization-list">
|
|
|
|
|
+ <AssetTree
|
|
|
|
|
+ @handleNodeClick="handleNodeClick"
|
|
|
|
|
+ id="17"
|
|
|
|
|
+ ref="treeList"
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<template v-slot:content>
|
|
<template v-slot:content>
|
|
@@ -27,7 +25,10 @@
|
|
|
ref="table"
|
|
ref="table"
|
|
|
:columns="columns"
|
|
:columns="columns"
|
|
|
:datasource="datasource"
|
|
:datasource="datasource"
|
|
|
- cache-key="systemRoleTable"
|
|
|
|
|
|
|
+ height="calc(100vh - 300px)"
|
|
|
|
|
+ full-height="calc(100vh - 116px)"
|
|
|
|
|
+ tool-class="ele-toolbar-form"
|
|
|
|
|
+ cache-key="eomContactPageTable"
|
|
|
>
|
|
>
|
|
|
<!-- 表头工具栏 -->
|
|
<!-- 表头工具栏 -->
|
|
|
<template v-slot:toolbar>
|
|
<template v-slot:toolbar>
|
|
@@ -60,6 +61,25 @@
|
|
|
>
|
|
>
|
|
|
修改
|
|
修改
|
|
|
</el-link>
|
|
</el-link>
|
|
|
|
|
+ <el-link
|
|
|
|
|
+ v-if="row.status===0"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ :underline="false"
|
|
|
|
|
+ icon="el-icon-check"
|
|
|
|
|
+ @click="openEdit('编辑客户',row)"
|
|
|
|
|
+ >
|
|
|
|
|
+ 启用
|
|
|
|
|
+ </el-link>
|
|
|
|
|
+ <el-link
|
|
|
|
|
+ v-if="row.status===1"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ :underline="false"
|
|
|
|
|
+ icon="el-icon-close"
|
|
|
|
|
+ @click="openEdit('编辑客户',row)"
|
|
|
|
|
+ >
|
|
|
|
|
+ 禁用
|
|
|
|
|
+ </el-link>
|
|
|
|
|
+
|
|
|
<el-popconfirm
|
|
<el-popconfirm
|
|
|
class="ele-action"
|
|
class="ele-action"
|
|
|
title="确定要删除此客户信息吗?"
|
|
title="确定要删除此客户信息吗?"
|
|
@@ -81,83 +101,118 @@
|
|
|
</template>
|
|
</template>
|
|
|
</ele-split-layout>
|
|
</ele-split-layout>
|
|
|
</el-card>
|
|
</el-card>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
<AddContactDialog ref="addContactDialogRef" :categoryTreeList="treeList" @done="reload"></AddContactDialog>
|
|
<AddContactDialog ref="addContactDialogRef" :categoryTreeList="treeList" @done="reload"></AddContactDialog>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
- import ContactSearch from './components/contactSearch.vue';
|
|
|
|
|
- import AddContactDialog from './components/addContactDialog.vue';
|
|
|
|
|
- import {
|
|
|
|
|
- contactPage,
|
|
|
|
|
- contactDelete,
|
|
|
|
|
- contactTypeTree
|
|
|
|
|
- } from '@/api/saleManage/contact';
|
|
|
|
|
- import dictMixins from '@/mixins/dictMixins';
|
|
|
|
|
|
|
+import ContactSearch from './components/contactSearch.vue';
|
|
|
|
|
+import AddContactDialog from './components/addContactDialog.vue';
|
|
|
|
|
+import AssetTree from '@/components/AssetTree';
|
|
|
|
|
+import {contactDelete, contactPage, contactTypeTree} from '@/api/saleManage/contact';
|
|
|
|
|
+import dictMixins from '@/mixins/dictMixins';
|
|
|
|
|
|
|
|
- export default {
|
|
|
|
|
|
|
+export default {
|
|
|
mixins: [dictMixins],
|
|
mixins: [dictMixins],
|
|
|
components: {
|
|
components: {
|
|
|
ContactSearch,
|
|
ContactSearch,
|
|
|
- AddContactDialog
|
|
|
|
|
|
|
+ AddContactDialog,
|
|
|
|
|
+ AssetTree
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
// 加载状态
|
|
// 加载状态
|
|
|
loading: false,
|
|
loading: false,
|
|
|
columns: [
|
|
columns: [
|
|
|
|
|
+ {
|
|
|
|
|
+ columnKey: 'index',
|
|
|
|
|
+ label: '序号',
|
|
|
|
|
+ type: 'index',
|
|
|
|
|
+ width: 55,
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ fixed: 'left'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'code',
|
|
|
|
|
+ label: '客户编码',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 140
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
prop: 'name',
|
|
prop: 'name',
|
|
|
label: '客户名称',
|
|
label: '客户名称',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
|
|
|
|
+ minWidth: 150
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'serialNo',
|
|
|
|
|
+ label: '客户代码',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 140
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'simpleName',
|
|
|
|
|
- label: '客户简称',
|
|
|
|
|
|
|
+ prop: 'phone',
|
|
|
|
|
+ label: '客户电话',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
|
|
|
|
+ minWidth: 120
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
prop: 'addressName',
|
|
prop: 'addressName',
|
|
|
- label: '地址名称',
|
|
|
|
|
|
|
+ label: '单位地址',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
|
|
|
|
+ minWidth: 120,
|
|
|
|
|
+ formatter: (_row, _column, cellValue) => {
|
|
|
|
|
+ let addr = '' + _row.addressName ? _row.addressName.replaceAll(',', '') : '';
|
|
|
|
|
+ addr += _row.address ? _row.address : '';
|
|
|
|
|
+ return addr;
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'unifiedSocialCreditCode',
|
|
|
|
|
- label: '统一社会信用代码',
|
|
|
|
|
|
|
+ prop: 'linkName',
|
|
|
|
|
+ label: '联系人',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
|
|
|
|
+ minWidth: 120
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'linkPhone',
|
|
|
|
|
+ label: '联系人电话',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ minWidth: 120
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
prop: 'status',
|
|
prop: 'status',
|
|
|
label: '状态',
|
|
label: '状态',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
- minWidth: 110,
|
|
|
|
|
|
|
+ minWidth: 100,
|
|
|
formatter: (_row, _column, cellValue) => {
|
|
formatter: (_row, _column, cellValue) => {
|
|
|
- return this.getDictValue('客户状态', _row.status);
|
|
|
|
|
|
|
+ return _row.status === 1 ? '正常' : '停用';
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'createUserName',
|
|
|
|
|
|
|
+ prop: 'createUsername',
|
|
|
label: '创建人',
|
|
label: '创建人',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
|
|
|
|
+ minWidth: 100
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
prop: 'createTime',
|
|
prop: 'createTime',
|
|
|
label: '创建时间',
|
|
label: '创建时间',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
- minWidth: 110,
|
|
|
|
|
|
|
+ minWidth: 160,
|
|
|
formatter: (_row, _column, cellValue) => {
|
|
formatter: (_row, _column, cellValue) => {
|
|
|
return this.$util.toDateString(cellValue);
|
|
return this.$util.toDateString(cellValue);
|
|
|
}
|
|
}
|
|
@@ -165,11 +220,12 @@
|
|
|
{
|
|
{
|
|
|
columnKey: 'action',
|
|
columnKey: 'action',
|
|
|
label: '操作',
|
|
label: '操作',
|
|
|
- width: 150,
|
|
|
|
|
|
|
+ width: 200,
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
resizable: false,
|
|
resizable: false,
|
|
|
slot: 'action',
|
|
slot: 'action',
|
|
|
- showOverflowTooltip: true
|
|
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ fixed: 'right',
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|
|
|
current: {},
|
|
current: {},
|
|
@@ -223,36 +279,8 @@
|
|
|
},
|
|
},
|
|
|
handleNodeClick(data, node) {
|
|
handleNodeClick(data, node) {
|
|
|
this.curNodeData = data;
|
|
this.curNodeData = data;
|
|
|
- /*this.pathList = this.findParent([], data, this.treeList);
|
|
|
|
|
- this.rootTreeId = null;
|
|
|
|
|
- if (this.pathList.length == 0) {
|
|
|
|
|
- this.rootTreeId = data.id;
|
|
|
|
|
- } else {
|
|
|
|
|
- this.rootTreeId =
|
|
|
|
|
- this.pathList[this.pathList.length - 1] &&
|
|
|
|
|
- this.pathList[this.pathList.length - 1].id;
|
|
|
|
|
- }*/
|
|
|
|
|
this.reload({ categoryId: data.id });
|
|
this.reload({ categoryId: data.id });
|
|
|
},
|
|
},
|
|
|
- // parents:用于返回的数组,childNode:要查询的节点,treeList:json树形数据
|
|
|
|
|
- /*findParent(parents, childNode, treeList) {
|
|
|
|
|
- for (let i = 0; i < treeList.length; i++) {
|
|
|
|
|
- // 父节点查询条件
|
|
|
|
|
- if (treeList[i].id === childNode.parentId) {
|
|
|
|
|
- // 如果找到结果,保存当前节点
|
|
|
|
|
- parents.push(treeList[i]);
|
|
|
|
|
- // 用当前节点再去原数据查找当前节点的父节点
|
|
|
|
|
- this.findParent(parents, treeList[i], this.treeList);
|
|
|
|
|
- break;
|
|
|
|
|
- } else {
|
|
|
|
|
- if (treeList[i].children instanceof Array) {
|
|
|
|
|
- // 没找到,遍历该节点的子节点
|
|
|
|
|
- this.findParent(parents, childNode, treeList[i].children);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- return parents;
|
|
|
|
|
- },*/
|
|
|
|
|
/* 刷新表格 */
|
|
/* 刷新表格 */
|
|
|
reload(where) {
|
|
reload(where) {
|
|
|
this.$refs.table.reload({ page: 1, where });
|
|
this.$refs.table.reload({ page: 1, where });
|
|
@@ -274,4 +302,18 @@
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
-<style lang="scss" scoped></style>
|
|
|
|
|
|
|
+<style lang="scss" scoped>
|
|
|
|
|
+.sys-organization-list {
|
|
|
|
|
+ height: calc(100vh - 264px);
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ border-width: 1px;
|
|
|
|
|
+ border-style: solid;
|
|
|
|
|
+ overflow: auto;
|
|
|
|
|
+}
|
|
|
|
|
+.sys-organization-list :deep(.el-tree-node__content) {
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ & > .el-tree-node__expand-icon {
|
|
|
|
|
+ margin-left: 10px;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+</style>
|