|
5 | 5 | <ContentWrap>
|
6 | 6 | <!-- 搜索工作栏 -->
|
7 | 7 | <el-form
|
8 |
| - class="-mb-15px" |
9 |
| - :model="queryParams" |
10 | 8 | ref="queryFormRef"
|
11 | 9 | :inline="true"
|
| 10 | + :model="queryParams" |
| 11 | + class="-mb-15px" |
12 | 12 | label-width="68px"
|
13 | 13 | >
|
14 | 14 | <el-form-item label="商机名称" prop="name">
|
15 | 15 | <el-input
|
16 | 16 | v-model="queryParams.name"
|
17 |
| - placeholder="请输入商机名称" |
| 17 | + class="!w-240px" |
18 | 18 | clearable
|
| 19 | + placeholder="请输入商机名称" |
19 | 20 | @keyup.enter="handleQuery"
|
20 |
| - class="!w-240px" |
21 | 21 | />
|
22 | 22 | </el-form-item>
|
23 | 23 | <el-form-item>
|
24 |
| - <el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button> |
25 |
| - <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button> |
26 |
| - <el-button type="primary" @click="openForm('create')" v-hasPermi="['crm:business:create']"> |
27 |
| - <Icon icon="ep:plus" class="mr-5px" /> 新增 |
| 24 | + <el-button @click="handleQuery"> |
| 25 | + <Icon class="mr-5px" icon="ep:search" /> |
| 26 | + 搜索 |
| 27 | + </el-button> |
| 28 | + <el-button @click="resetQuery"> |
| 29 | + <Icon class="mr-5px" icon="ep:refresh" /> |
| 30 | + 重置 |
| 31 | + </el-button> |
| 32 | + <el-button v-hasPermi="['crm:business:create']" type="primary" @click="openForm('create')"> |
| 33 | + <Icon class="mr-5px" icon="ep:plus" /> |
| 34 | + 新增 |
28 | 35 | </el-button>
|
29 | 36 | <el-button
|
30 |
| - type="success" |
| 37 | + v-hasPermi="['crm:business:export']" |
| 38 | + :loading="exportLoading" |
31 | 39 | plain
|
| 40 | + type="success" |
32 | 41 | @click="handleExport"
|
33 |
| - :loading="exportLoading" |
34 |
| - v-hasPermi="['crm:business:export']" |
35 | 42 | >
|
36 |
| - <Icon icon="ep:download" class="mr-5px" /> 导出 |
| 43 | + <Icon class="mr-5px" icon="ep:download" /> |
| 44 | + 导出 |
37 | 45 | </el-button>
|
38 | 46 | </el-form-item>
|
39 | 47 | </el-form>
|
|
46 | 54 | <el-tab-pane label="我参与的" name="2" />
|
47 | 55 | <el-tab-pane label="下属负责的" name="3" />
|
48 | 56 | </el-tabs>
|
49 |
| - <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true"> |
50 |
| - <el-table-column align="center" label="商机名称" fixed="left" prop="name" width="160"> |
| 57 | + <el-table v-loading="loading" :data="list" :show-overflow-tooltip="true" :stripe="true"> |
| 58 | + <el-table-column align="center" fixed="left" label="商机名称" prop="name" width="160"> |
51 | 59 | <template #default="scope">
|
52 | 60 | <el-link :underline="false" type="primary" @click="openDetail(scope.row.id)">
|
53 | 61 | {{ scope.row.name }}
|
|
66 | 74 | </template>
|
67 | 75 | </el-table-column>
|
68 | 76 | <el-table-column
|
69 |
| - label="商机金额(元)" |
| 77 | + :formatter="erpPriceTableColumnFormatter" |
70 | 78 | align="center"
|
| 79 | + label="商机金额(元)" |
71 | 80 | prop="totalPrice"
|
72 | 81 | width="140"
|
73 |
| - :formatter="erpPriceTableColumnFormatter" |
74 | 82 | />
|
75 | 83 | <el-table-column
|
76 |
| - label="预计成交日期" |
| 84 | + :formatter="dateFormatter" |
77 | 85 | align="center"
|
| 86 | + label="预计成交日期" |
78 | 87 | prop="dealTime"
|
79 |
| - :formatter="dateFormatter" |
80 | 88 | width="180px"
|
81 | 89 | />
|
82 | 90 | <el-table-column align="center" label="备注" prop="remark" width="200" />
|
|
97 | 105 | width="180px"
|
98 | 106 | />
|
99 | 107 | <el-table-column
|
100 |
| - label="更新时间" |
| 108 | + :formatter="dateFormatter" |
101 | 109 | align="center"
|
| 110 | + label="更新时间" |
102 | 111 | prop="updateTime"
|
103 |
| - :formatter="dateFormatter" |
104 | 112 | width="180px"
|
105 | 113 | />
|
106 | 114 | <el-table-column
|
107 |
| - label="创建时间" |
| 115 | + :formatter="dateFormatter" |
108 | 116 | align="center"
|
| 117 | + label="创建时间" |
109 | 118 | prop="createTime"
|
110 |
| - :formatter="dateFormatter" |
111 | 119 | width="180px"
|
112 | 120 | />
|
113 | 121 | <el-table-column align="center" label="创建人" prop="creatorName" width="100px" />
|
114 | 122 | <el-table-column
|
115 |
| - label="商机状态组" |
116 | 123 | align="center"
|
117 |
| - prop="statusTypeName" |
118 | 124 | fixed="right"
|
| 125 | + label="商机状态组" |
| 126 | + prop="statusTypeName" |
119 | 127 | width="140"
|
120 | 128 | />
|
121 | 129 | <el-table-column
|
122 |
| - label="商机阶段" |
123 | 130 | align="center"
|
124 |
| - prop="statusName" |
125 | 131 | fixed="right"
|
| 132 | + label="商机阶段" |
| 133 | + prop="statusName" |
126 | 134 | width="120"
|
127 | 135 | />
|
128 |
| - <el-table-column label="操作" align="center" fixed="right" width="130px"> |
| 136 | + <el-table-column align="center" fixed="right" label="操作" width="130px"> |
129 | 137 | <template #default="scope">
|
130 | 138 | <el-button
|
| 139 | + v-hasPermi="['crm:business:update']" |
131 | 140 | link
|
132 | 141 | type="primary"
|
133 | 142 | @click="openForm('update', scope.row.id)"
|
134 |
| - v-hasPermi="['crm:business:update']" |
135 | 143 | >
|
136 | 144 | 编辑
|
137 | 145 | </el-button>
|
138 | 146 | <el-button
|
| 147 | + v-hasPermi="['crm:business:delete']" |
139 | 148 | link
|
140 | 149 | type="danger"
|
141 | 150 | @click="handleDelete(scope.row.id)"
|
142 |
| - v-hasPermi="['crm:business:delete']" |
143 | 151 | >
|
144 | 152 | 删除
|
145 | 153 | </el-button>
|
|
148 | 156 | </el-table>
|
149 | 157 | <!-- 分页 -->
|
150 | 158 | <Pagination
|
151 |
| - :total="total" |
152 |
| - v-model:page="queryParams.pageNo" |
153 | 159 | v-model:limit="queryParams.pageSize"
|
| 160 | + v-model:page="queryParams.pageNo" |
| 161 | + :total="total" |
154 | 162 | @pagination="getList"
|
155 | 163 | />
|
156 | 164 | </ContentWrap>
|
|
159 | 167 | <BusinessForm ref="formRef" @success="getList" />
|
160 | 168 | </template>
|
161 | 169 |
|
162 |
| -<script setup lang="ts"> |
| 170 | +<script lang="ts" setup> |
163 | 171 | import { dateFormatter } from '@/utils/formatTime'
|
164 | 172 | import download from '@/utils/download'
|
165 | 173 | import * as BusinessApi from '@/api/crm/business'
|
@@ -216,7 +224,7 @@ const handleTabClick = (tab: TabsPaneContext) => {
|
216 | 224 | }
|
217 | 225 |
|
218 | 226 | /** 打开客户详情 */
|
219 |
| -const { currentRoute, push } = useRouter() |
| 227 | +const { push } = useRouter() |
220 | 228 | const openDetail = (id: number) => {
|
221 | 229 | push({ name: 'CrmBusinessDetail', params: { id } })
|
222 | 230 | }
|
|
0 commit comments