File was renamed from src/views/custom/customManage/index.vue |
| | |
| | | /> |
| | | <PagerView class="page" /> |
| | | </div> |
| | | <TableCommonView ref="tableListRef" :table-list="tableList"> |
| | | <TableCommonView ref="tableListRef" v-loading="loading" :table-list="tableList"> |
| | | <template slot="tableButton"> |
| | | <el-table-column label="操作" width="150" fixed="right"> |
| | | <template slot-scope="scope"> |
| | |
| | | </template> |
| | | </TableCommonView> |
| | | <!-- 新建/编辑客户管理 --> |
| | | <AddCustomManageDialog v-if="editConfig.visible" :edit-cuntom-manage-config="editConfig" /> |
| | | <AddClientManageDialog v-if="editConfig.visible" :edit-client-manage-config="editConfig" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import AddCustomManageDialog from "@/views/custom/customManage/AddCustomManageDialog" |
| | | import AddClientManageDialog from "@/views/custom/client/AddClientManageDialog" |
| | | import { getClientList } from "@/api/custom/client" |
| | | import { dateFormat } from "@/common/config/index" |
| | | export default { |
| | | name: "CustomManage", |
| | | props: {}, |
| | | components: { |
| | | AddCustomManageDialog |
| | | AddClientManageDialog |
| | | }, |
| | | computed: { |
| | | searchCommonHeight() { |
| | |
| | | data() { |
| | | return { |
| | | tableList: {}, |
| | | loading: false, |
| | | activeName: "first", |
| | | gonghaiValue: "", |
| | | gonghaiOptions: [], |
| | |
| | | }, |
| | | created() { |
| | | this.setTable() |
| | | this.getData() |
| | | }, |
| | | methods: { |
| | | setTable() { |
| | | this.tableList = { |
| | | tableInfomation: [ |
| | | { |
| | | customName: "上海通用机械有限公司", |
| | | saleLeadOwner: "BOSS", |
| | | importantLevel: "C类客户", |
| | | notContactDay: "20", |
| | | contactName: "董奇伟", |
| | | phoneNumber: "15988887777", |
| | | nextFollowDate: "2023-07-26", |
| | | detailAddress: "上海市静安区威海路115号", |
| | | customStatus: "潜在客户" |
| | | } |
| | | ], |
| | | tableInfomation: [], |
| | | tableColumn: [ |
| | | { label: "客户名称", prop: "customName", min: 100 }, // 客户名称 |
| | | { label: "销售负责人", prop: "saleLeadOwner" }, // 销售负责人 |
| | | { label: "客户名称", prop: "name", min: 100 }, // 客户名称 |
| | | { label: "销售负责人", prop: "service_member_id" }, // 销售负责人 |
| | | { label: "重要级别", prop: "importantLevel" }, // 重要级别 |
| | | { label: "下次回访日期", prop: "notContactDay", min: 90 }, // 未联系人天数 |
| | | { label: "手机号码", prop: "nextFollowDate" }, // 下次回访日期 |
| | | { label: "详细地址", prop: "detailAddress", min: 200 }, // 详细地址 |
| | | { label: "客户状态", prop: "customStatus" }, // 客户状态 |
| | | { label: "联系人姓名", prop: "contactName" }, // 联系人姓名 |
| | | { label: "手机", prop: "phoneNumber" } // 手机号码 |
| | | { label: "下次回访日期", prop: "next_visit_time", min: 90 }, // 下次回访日期 |
| | | { label: "手机号码", prop: "phoneNumber" }, // 手机号码 |
| | | { label: "详细地址", prop: "detail_address", min: 200 }, // 详细地址 |
| | | { label: "客户状态", prop: "client_status_id" }, // 客户状态 |
| | | { label: "联系人姓名", prop: "contact_name" }, // 联系人姓名 |
| | | { label: "手机", prop: "phone" } // 手机号码 |
| | | ] |
| | | } |
| | | this.searchOptions = [] |
| | |
| | | this.searchOptions.push({ value: (i + 1).toString(), label: label }) |
| | | } |
| | | }, |
| | | // 请求数据 |
| | | async getData() { |
| | | this.loading = true |
| | | await getClientList() |
| | | .then((res) => { |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | | if (res.data.list && res.data.list.length > 0) { |
| | | const list = res.data.list.map((item) => { |
| | | return { |
| | | name: item.name, |
| | | service_member_id: item.service_member_id, |
| | | importantLevel: "", |
| | | next_visit_time: dateFormat("YYYY-mm-dd HH:MM", item.next_visit_time), |
| | | phoneNumber: "", |
| | | detail_address: item.detail_address, |
| | | client_status_id: item.client_status_id, |
| | | contact_name: "", |
| | | phone: "" |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list || [] |
| | | } else { |
| | | this.tableList.tableInfomation = [] |
| | | } |
| | | } else { |
| | | this.tableList.tableInfomation = [] |
| | | } |
| | | this.loading = false |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err) |
| | | this.tableList.tableInfomation = [] |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | tabsClick(tab, event) { |
| | | console.log(tab, event) |
| | | }, |