96009bc9
hexiaodong
hxd
|
1
2
3
|
<template>
<div class="NCC-common-layout">
<div class="NCC-common-layout-center">
|
2ce7c3cb
“wangming”
更新门店目标设定相关功能,新增字段...
|
4
|
<!-- 搜索区域 -->
|
96009bc9
hexiaodong
hxd
|
5
6
|
<el-row class="NCC-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
|
2ce7c3cb
“wangming”
更新门店目标设定相关功能,新增字段...
|
7
8
9
10
11
12
13
14
15
|
<el-col :span="5">
<el-form-item label="门店编码">
<el-input
v-model="query.mdbm"
placeholder="请输入门店编码"
clearable
prefix-icon="el-icon-search"
style="border-radius: 6px;"
/>
|
96009bc9
hexiaodong
hxd
|
16
17
|
</el-form-item>
</el-col>
|
2ce7c3cb
“wangming”
更新门店目标设定相关功能,新增字段...
|
18
19
20
21
22
23
24
25
26
|
<el-col :span="5">
<el-form-item label="门店名称">
<el-input
v-model="query.dm"
placeholder="请输入门店名称"
clearable
prefix-icon="el-icon-search"
style="border-radius: 6px;"
/>
|
96009bc9
hexiaodong
hxd
|
27
28
|
</el-form-item>
</el-col>
|
2ce7c3cb
“wangming”
更新门店目标设定相关功能,新增字段...
|
29
30
31
32
33
34
35
36
37
|
<el-col :span="5">
<el-form-item label="单据门店">
<el-input
v-model="query.djmd"
placeholder="请输入单据门店"
clearable
prefix-icon="el-icon-search"
style="border-radius: 6px;"
/>
|
96009bc9
hexiaodong
hxd
|
38
39
|
</el-form-item>
</el-col>
|
2ce7c3cb
“wangming”
更新门店目标设定相关功能,新增字段...
|
40
41
42
43
44
45
46
47
48
|
<el-col :span="5">
<el-form-item label="城市">
<el-input
v-model="query.cs"
placeholder="请输入城市"
clearable
prefix-icon="el-icon-search"
style="border-radius: 6px;"
/>
|
96009bc9
hexiaodong
hxd
|
49
50
|
</el-form-item>
</el-col>
|
2ce7c3cb
“wangming”
更新门店目标设定相关功能,新增字段...
|
51
|
<el-col :span="4">
|
96009bc9
hexiaodong
hxd
|
52
|
<el-form-item>
|
2ce7c3cb
“wangming”
更新门店目标设定相关功能,新增字段...
|
53
54
55
56
|
<div class="search-buttons" style="height: 32px;">
<el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button>
<el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button>
</div>
|
96009bc9
hexiaodong
hxd
|
57
58
59
60
61
62
|
</el-form-item>
</el-col>
</el-form>
</el-row>
<div class="NCC-common-layout-main NCC-flex-main">
<div class="NCC-common-head">
|
2ce7c3cb
“wangming”
更新门店目标设定相关功能,新增字段...
|
63
64
65
66
67
|
<div class="NCC-common-head-left">
<h3 class="NCC-common-head-title">
<i class="el-icon-target"></i>
门店目标设置
</h3>
|
96009bc9
hexiaodong
hxd
|
68
69
70
71
72
73
74
75
|
</div>
<div class="NCC-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" />
</el-tooltip>
<screenfull isContainer />
</div>
</div>
|
2ce7c3cb
“wangming”
更新门店目标设定相关功能,新增字段...
|
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
<NCC-table
v-loading="listLoading"
:data="list"
>
<el-table-column prop="mdbm" label="门店编码" align="left" width="120" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag size="small" type="primary">{{ scope.row.mdbm }}</el-tag>
</template>
</el-table-column>
<el-table-column prop="dm" label="门店名称" align="left" min-width="150" show-overflow-tooltip>
<template slot-scope="scope">
<span class="store-name">{{ scope.row.dm }}</span>
</template>
</el-table-column>
<el-table-column prop="djmd" label="单据门店" align="left" width="150" show-overflow-tooltip />
<el-table-column prop="cs" label="城市" align="left" width="100" show-overflow-tooltip />
<!-- 目标字段列 -->
<el-table-column label="固定-生命线" align="center" width="120">
<template slot-scope="scope">
<span v-if="scope.row.xsyj" class="target-value">{{ formatMoney(scope.row.xsyj) }}元</span>
<span v-else class="no-data">未设置</span>
</template>
</el-table-column>
<el-table-column label="固定-消耗业绩" align="center" width="120">
<template slot-scope="scope">
<span v-if="scope.row.xhyj" class="target-value">{{ formatMoney(scope.row.xhyj) }}元</span>
<span v-else class="no-data">未设置</span>
</template>
</el-table-column>
<el-table-column label="固定-项目数" align="center" width="100">
<template slot-scope="scope">
<span v-if="scope.row.xms" class="target-value">{{ scope.row.xms }}个</span>
<span v-else class="no-data">-</span>
</template>
</el-table-column>
<el-table-column label="固定-人头" align="center" width="100">
<template slot-scope="scope">
<span v-if="scope.row.rc" class="target-value">{{ scope.row.rc }}次</span>
<span v-else class="no-data">-</span>
</template>
</el-table-column>
<el-table-column label="阶段一人头" align="center" width="100">
<template slot-scope="scope">
<span v-if="scope.row.rt1" class="target-value">{{ scope.row.rt1 }}人</span>
<span v-else class="no-data">-</span>
</template>
</el-table-column>
<el-table-column label="阶段二人头" align="center" width="100">
<template slot-scope="scope">
<span v-if="scope.row.rt2" class="target-value">{{ scope.row.rt2 }}人</span>
<span v-else class="no-data">-</span>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="120" align="center">
<template slot-scope="scope">
<el-button
type="text"
icon="el-icon-edit"
@click="editHandle(scope.row)"
class="action-btn"
>
设置目标
</el-button>
|
96009bc9
hexiaodong
hxd
|
148
149
150
151
152
153
|
</template>
</el-table-column>
</NCC-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" />
</div>
</div>
|
2ce7c3cb
“wangming”
更新门店目标设定相关功能,新增字段...
|
154
155
156
157
158
159
160
|
<!-- 目标设置弹窗 -->
<TargetSettingDialog
:visible.sync="dialogVisible"
:store-data="currentStoreData"
@refresh="initData"
/>
|
96009bc9
hexiaodong
hxd
|
161
162
163
164
|
</div>
</template>
<script>
import request from '@/utils/request'
|
2ce7c3cb
“wangming”
更新门店目标设定相关功能,新增字段...
|
165
166
|
import TargetSettingDialog from './components/TargetSettingDialog.vue'
|
96009bc9
hexiaodong
hxd
|
167
|
export default {
|
2ce7c3cb
“wangming”
更新门店目标设定相关功能,新增字段...
|
168
169
170
|
components: {
TargetSettingDialog
},
|
96009bc9
hexiaodong
hxd
|
171
172
|
data() {
return {
|
96009bc9
hexiaodong
hxd
|
173
|
query: {
|
2ce7c3cb
“wangming”
更新门店目标设定相关功能,新增字段...
|
174
175
176
177
|
mdbm: undefined,
dm: undefined,
djmd: undefined,
cs: undefined
|
96009bc9
hexiaodong
hxd
|
178
179
180
|
},
list: [],
listLoading: true,
|
2ce7c3cb
“wangming”
更新门店目标设定相关功能,新增字段...
|
181
|
total: 0,
|
96009bc9
hexiaodong
hxd
|
182
183
184
185
186
187
|
listQuery: {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "",
},
|
2ce7c3cb
“wangming”
更新门店目标设定相关功能,新增字段...
|
188
189
|
dialogVisible: false,
currentStoreData: {}
|
96009bc9
hexiaodong
hxd
|
190
191
192
193
194
195
196
|
}
},
computed: {},
created() {
this.initData()
},
methods: {
|
2ce7c3cb
“wangming”
更新门店目标设定相关功能,新增字段...
|
197
198
199
200
201
202
203
204
205
206
207
208
209
|
// 格式化金额显示
formatMoney(value) {
if (!value) return '0.00'
return parseFloat(value).toFixed(2)
},
// 编辑处理
editHandle(row) {
this.currentStoreData = { ...row }
this.dialogVisible = true
},
async initData() {
|
96009bc9
hexiaodong
hxd
|
210
211
212
213
214
215
216
217
218
219
220
221
222
|
this.listLoading = true;
let _query = {
...this.listQuery,
...this.query
};
let query = {}
for (let key in _query) {
if (Array.isArray(_query[key])) {
query[key] = _query[key].join()
} else {
query[key] = _query[key]
}
}
|
2ce7c3cb
“wangming”
更新门店目标设定相关功能,新增字段...
|
223
224
225
226
227
228
229
230
|
try {
const res = await request({
url: `/api/Extend/LqMdxx`,
method: 'GET',
data: query
})
|
96009bc9
hexiaodong
hxd
|
231
232
|
this.list = res.data.list
this.total = res.data.pagination.total
|
2ce7c3cb
“wangming”
更新门店目标设定相关功能,新增字段...
|
233
234
235
236
|
} catch (error) {
console.error('加载门店数据失败:', error)
} finally {
|
96009bc9
hexiaodong
hxd
|
237
|
this.listLoading = false
|
96009bc9
hexiaodong
hxd
|
238
|
}
|
96009bc9
hexiaodong
hxd
|
239
|
},
|
2ce7c3cb
“wangming”
更新门店目标设定相关功能,新增字段...
|
240
|
|
96009bc9
hexiaodong
hxd
|
241
242
243
244
245
246
247
248
249
|
search() {
this.listQuery = {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "",
}
this.initData()
},
|
96009bc9
hexiaodong
hxd
|
250
251
252
253
254
255
256
257
258
259
260
261
262
|
reset() {
for (let key in this.query) {
this.query[key] = undefined
}
this.listQuery = {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "",
}
this.initData()
}
}
|
2ce7c3cb
“wangming”
更新门店目标设定相关功能,新增字段...
|
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
|
}
</script>
<style lang="scss" scoped>
// 页面头部样式
.NCC-common-head-left {
display: flex;
align-items: center;
gap: 12px;
}
.NCC-common-head-title {
margin: 0;
font-size: 18px;
font-weight: 600;
color: #303133;
display: flex;
align-items: center;
gap: 8px;
i {
color: #409EFF;
font-size: 20px;
}
}
// 表格样式
.store-name {
font-weight: 500;
color: #303133;
}
.target-value {
font-weight: 500;
color: #67C23A;
}
.no-data {
color: #C0C4CC;
font-style: italic;
}
.action-btn {
padding: 4px 8px;
margin: 0 2px;
&:hover {
background-color: #f5f7fa;
}
}
// 搜索区域样式
.search-buttons {
display: flex;
align-items: center;
gap: 8px;
}
// 响应式设计
@media (max-width: 768px) {
.NCC-common-head {
flex-direction: column;
align-items: flex-start;
gap: 12px;
.NCC-common-head-right {
width: 100%;
justify-content: flex-start;
}
}
.el-col {
margin-bottom: 16px;
}
}
// 表格响应式
@media (max-width: 1200px) {
.NCC-table {
.el-table {
font-size: 12px;
}
}
}
</style>
|