96009bc9
hexiaodong
hxd
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<template>
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" :visible.sync="visible" class="NCC-dialog NCC-dialog_center" lock-scroll width="600px">
<el-row :gutter="15" class="" >
<el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules">
<el-col :span="24" v-if="false" >
<el-form-item label="主键" prop="id">
<el-input v-model="dataForm.id" placeholder="请输入" clearable :style='{"width":"100%"}' >
</el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="项目编号" prop="xmbh">
<el-input v-model="dataForm.xmbh" placeholder="请输入" clearable :style='{"width":"100%"}' >
</el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="项目名称" prop="xmmc">
<el-input v-model="dataForm.xmmc" placeholder="请输入" clearable :style='{"width":"100%"}' >
</el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="标准价格" prop="bzjg">
|
140ec06a
李宇
```
|
25
|
<el-input type="number" v-model="dataForm.bzjg" placeholder="请输入标准价格" clearable :style='{"width":"100%"}' >
|
96009bc9
hexiaodong
hxd
|
26
27
28
|
</el-input>
</el-form-item>
</el-col>
|
0d5e5446
李宇
```
|
29
|
<!-- <el-col :span="24">
|
d080a458
李宇
拓客活动
|
30
|
<el-form-item label="手工费" prop="sgf">
|
140ec06a
李宇
```
|
31
|
<el-input type="number" v-model="dataForm.sgf" placeholder="请输入手工费" clearable :style='{"width":"100%"}' >
|
d080a458
李宇
拓客活动
|
32
33
|
</el-input>
</el-form-item>
|
0d5e5446
李宇
```
|
34
|
</el-col> -->
|
d080a458
李宇
拓客活动
|
35
|
<el-col :span="24">
|
96009bc9
hexiaodong
hxd
|
36
|
<el-form-item label="时长(分)" prop="xmsc">
|
140ec06a
李宇
```
|
37
|
<el-input type="number" v-model="dataForm.xmsc" placeholder="请输入时长" clearable :style='{"width":"100%"}' >
|
96009bc9
hexiaodong
hxd
|
38
39
40
|
</el-input>
</el-form-item>
</el-col>
|
d080a458
李宇
拓客活动
|
41
|
<!-- <el-col :span="24">
|
96009bc9
hexiaodong
hxd
|
42
43
44
45
|
<el-form-item label="基础服务提成" prop="jcfwtc">
<el-input v-model="dataForm.jcfwtc" placeholder="请输入" clearable :style='{"width":"100%"}' >
</el-input>
</el-form-item>
|
d080a458
李宇
拓客活动
|
46
|
</el-col> -->
|
96009bc9
hexiaodong
hxd
|
47
|
<el-col :span="24">
|
140ec06a
李宇
```
|
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
<el-form-item label="归类" prop="beautyType">
<!-- <el-input v-model="dataForm.beautyType" placeholder="请输入" clearable :style='{"width":"100%"}' >
</el-input> -->
<el-select allow-create filterable v-model="dataForm.beautyType" placeholder="请选择">
<el-option
v-for="item in options8"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
|
96009bc9
hexiaodong
hxd
|
62
|
<el-form-item label="分类1汇总表" prop="fl1">
|
140ec06a
李宇
```
|
63
64
65
66
67
68
69
70
71
72
|
<!-- <el-input v-model="dataForm.fl1" placeholder="请输入" clearable :style='{"width":"100%"}' >
</el-input> -->
<el-select allow-create filterable v-model="dataForm.fl1" placeholder="请选择">
<el-option
v-for="item in options1"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
|
96009bc9
hexiaodong
hxd
|
73
74
75
76
|
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="分类2汇总表" prop="fl2">
|
140ec06a
李宇
```
|
77
78
79
80
81
82
83
84
85
86
|
<!-- <el-input v-model="dataForm.fl2" placeholder="请输入" clearable :style='{"width":"100%"}' >
</el-input> -->
<el-select allow-create filterable v-model="dataForm.fl2" placeholder="请选择">
<el-option
v-for="item in options2"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
|
96009bc9
hexiaodong
hxd
|
87
88
89
90
|
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="分类3工资用" prop="fl3">
|
140ec06a
李宇
```
|
91
92
93
94
95
96
97
98
99
100
|
<!-- <el-input v-model="dataForm.fl3" placeholder="请输入" clearable :style='{"width":"100%"}' >
</el-input> -->
<el-select allow-create filterable v-model="dataForm.fl3" placeholder="请选择">
<el-option
v-for="item in options3"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
|
96009bc9
hexiaodong
hxd
|
101
102
103
104
|
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="分类4品项用" prop="fl4">
|
140ec06a
李宇
```
|
105
106
107
108
109
110
111
112
113
114
|
<!-- <el-input v-model="dataForm.fl4" placeholder="请输入" clearable :style='{"width":"100%"}' >
</el-input> -->
<el-select allow-create filterable v-model="dataForm.fl4" placeholder="请选择">
<el-option
v-for="item in options4"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
|
96009bc9
hexiaodong
hxd
|
115
116
|
</el-form-item>
</el-col>
|
0d5e5446
李宇
```
|
117
|
<!-- <el-col :span="24">
|
96009bc9
hexiaodong
hxd
|
118
119
120
121
122
123
124
125
126
127
|
<el-form-item label="统计类别" prop="tjlb">
<el-input v-model="dataForm.tjlb" placeholder="请输入" clearable :style='{"width":"100%"}' >
</el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="折扣类别" prop="zklb">
<el-input v-model="dataForm.zklb" placeholder="请输入" clearable :style='{"width":"100%"}' >
</el-input>
</el-form-item>
|
0d5e5446
李宇
```
|
128
|
</el-col> -->
|
96009bc9
hexiaodong
hxd
|
129
130
|
<el-col :span="24">
<el-form-item label="分类" prop="fl">
|
140ec06a
李宇
```
|
131
132
133
134
135
136
137
138
139
140
|
<!-- <el-input v-model="dataForm.fl" placeholder="请输入" clearable :style='{"width":"100%"}' >
</el-input> -->
<el-select allow-create filterable v-model="dataForm.fl" placeholder="请选择">
<el-option
v-for="item in options5"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
|
96009bc9
hexiaodong
hxd
|
141
142
143
144
|
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="其它1" prop="qt1">
|
140ec06a
李宇
```
|
145
146
147
148
149
150
151
152
153
154
|
<!-- <el-input v-model="dataForm.qt1" placeholder="请输入" clearable :style='{"width":"100%"}' >
</el-input> -->
<el-select allow-create filterable v-model="dataForm.qt1" placeholder="请选择">
<el-option
v-for="item in options6"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
|
96009bc9
hexiaodong
hxd
|
155
156
157
158
|
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="其它2" prop="qt2">
|
140ec06a
李宇
```
|
159
160
161
162
163
164
165
166
167
168
|
<!-- <el-input v-model="dataForm.qt2" placeholder="请输入" clearable :style='{"width":"100%"}' >
</el-input> -->
<el-select allow-create filterable v-model="dataForm.qt2" placeholder="请选择">
<el-option
v-for="item in options7"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
|
96009bc9
hexiaodong
hxd
|
169
170
|
</el-form-item>
</el-col>
|
5b6e99a5
李宇
```
|
171
172
173
174
175
176
177
178
179
180
181
182
|
<el-col :span="24">
<el-form-item label="是否有效" prop="isEffective">
<el-select v-model="dataForm.isEffective" placeholder="请选择">
<el-option
v-for="item in effectiveOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
|
a500b581
李宇
```
|
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
|
<el-col :span="24">
<el-form-item label="医美手工费" prop="medicalBeautyLaborCost">
<el-input type="number" v-model="dataForm.medicalBeautyLaborCost" placeholder="请输入医美手工费" clearable :style='{"width":"100%"}' >
</el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="科美手工费" prop="techBeautyLaborCost">
<el-input type="number" v-model="dataForm.techBeautyLaborCost" placeholder="请输入科美手工费" clearable :style='{"width":"100%"}' >
</el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="生美手工费" prop="lifeBeautyLaborCost">
<el-input type="number" v-model="dataForm.lifeBeautyLaborCost" placeholder="请输入生美手工费" clearable :style='{"width":"100%"}' >
</el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="健康师手工费" prop="healthCoachLaborCost">
<el-input type="number" v-model="dataForm.healthCoachLaborCost" placeholder="请输入健康师手工费" clearable :style='{"width":"100%"}' >
</el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="是否允许陪同" prop="isAllowAccompanied">
<el-select v-model="dataForm.isAllowAccompanied" placeholder="请选择">
<el-option label="否" :value="0"></el-option>
<el-option label="是" :value="1"></el-option>
</el-select>
</el-form-item>
</el-col>
|
96009bc9
hexiaodong
hxd
|
215
216
217
218
219
220
221
222
223
224
225
226
|
</el-form>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取 消</el-button>
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button>
</span>
</el-dialog>
</template>
<script>
import request from '@/utils/request'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import { previewDataInterface } from '@/api/systemData/dataInterface'
|
140ec06a
李宇
```
|
227
|
import { init } from 'echarts/lib/echarts';
|
96009bc9
hexiaodong
hxd
|
228
229
230
231
232
233
234
235
236
237
|
export default {
components: {},
props: [],
data() {
return {
loading: false,
visible: false,
isDetail: false,
dataForm: {
id:'',
|
d080a458
李宇
拓客活动
|
238
|
sgf:undefined,
|
96009bc9
hexiaodong
hxd
|
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
|
id:undefined,
xmbh:undefined,
xmmc:undefined,
bzjg:undefined,
xmsc:undefined,
jcfwtc:undefined,
fl1:undefined,
fl2:undefined,
fl3:undefined,
fl4:undefined,
tjlb:undefined,
zklb:undefined,
fl:undefined,
qt1:undefined,
qt2:undefined,
|
140ec06a
李宇
```
|
254
|
beautyType:undefined,
|
5b6e99a5
李宇
```
|
255
|
isEffective: 1, // 默认有效
|
a500b581
李宇
```
|
256
257
258
259
260
|
medicalBeautyLaborCost: 0, // 医美手工费
techBeautyLaborCost: 0, // 科美手工费
lifeBeautyLaborCost: 0, // 生美手工费
healthCoachLaborCost: 0, // 健康师手工费
isAllowAccompanied: 0, // 是否允许陪同 0否 1是
|
96009bc9
hexiaodong
hxd
|
261
262
263
|
},
rules: {
},
|
140ec06a
李宇
```
|
264
265
266
267
268
269
270
271
|
options1:[],
options2:[],
options3:[],
options4:[],
options5:[],
options6:[],
options7:[],
options8:[],
|
5b6e99a5
李宇
```
|
272
|
effectiveOptions: [],
|
96009bc9
hexiaodong
hxd
|
273
274
275
276
277
|
}
},
computed: {},
watch: {},
created() {
|
140ec06a
李宇
```
|
278
|
|
96009bc9
hexiaodong
hxd
|
279
280
|
},
mounted() {
|
140ec06a
李宇
```
|
281
|
|
96009bc9
hexiaodong
hxd
|
282
283
|
},
methods: {
|
140ec06a
李宇
```
|
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
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
|
getoptions(){
request({
url: '/api/Extend/lqxmzl/GetDistinctFieldData?fieldName=fl1',
method: 'get',
}).then(res => {
if (res.code == 200 && res.data && res.data.values) {
this.options1 = res.data.values.map(item => ({
label: item,
value: item
}));
}else {
this.options1 = []
}
})
request({
url: '/api/Extend/lqxmzl/GetDistinctFieldData?fieldName=fl2',
method: 'get',
}).then(res => {
if (res.code == 200 && res.data && res.data.values) {
this.options2 = res.data.values.map(item => ({
label: item,
value: item
}));
}else {
this.options2 = []
}
})
request({
url: '/api/Extend/lqxmzl/GetDistinctFieldData?fieldName=fl3',
method: 'get',
}).then(res => {
if (res.code == 200 && res.data && res.data.values) {
this.options3 = res.data.values.map(item => ({
label: item,
value: item
}));
}else {
this.options3 = []
}
})
request({
url: '/api/Extend/lqxmzl/GetDistinctFieldData?fieldName=fl4',
method: 'get',
}).then(res => {
if (res.code == 200 && res.data && res.data.values) {
this.options4 = res.data.values.map(item => ({
label: item,
value: item
}));
}else {
this.options4 = []
}
})
request({
url: '/api/Extend/lqxmzl/GetDistinctFieldData?fieldName=fl',
method: 'get',
}).then(res => {
if (res.code == 200 && res.data && res.data.values) {
this.options5 = res.data.values.map(item => ({
label: item,
value: item
}));
}else {
this.options5 = []
}
})
request({
url: '/api/Extend/lqxmzl/GetDistinctFieldData?fieldName=qt1',
method: 'get',
}).then(res => {
if (res.code == 200 && res.data && res.data.values) {
this.options6 = res.data.values.map(item => ({
label: item,
value: item
}));
}else {
this.options6 = []
}
})
request({
url: '/api/Extend/lqxmzl/GetDistinctFieldData?fieldName=qt2',
method: 'get',
}).then(res => {
if (res.code == 200 && res.data && res.data.values) {
this.options7 = res.data.values.map(item => ({
label: item,
value: item
}));
}else {
this.options7 = []
}
})
request({
url: '/api/Extend/lqxmzl/GetDistinctFieldData?fieldName=beautyType',
method: 'get',
}).then(res => {
if (res.code == 200 && res.data && res.data.values) {
this.options8 = res.data.values.map(item => ({
label: item,
value: item
}));
}else {
this.options8 = []
}
})
|
5b6e99a5
李宇
```
|
389
390
391
392
393
394
395
396
397
398
399
400
401
402
|
// 获取状态枚举数据
request({
url: '/api/Extend/lqkdkdjlb/status-enum',
method: 'get',
}).then(res => {
if (res.code == 200 && res.data) {
this.effectiveOptions = res.data.map(item => ({
label: item.Name,
value: item.Value
}));
} else {
this.effectiveOptions = []
}
})
|
140ec06a
李宇
```
|
403
|
},
|
96009bc9
hexiaodong
hxd
|
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
|
goBack() {
this.$emit('refresh')
},
init(id, isDetail) {
this.dataForm.id = id || 0;
this.visible = true;
this.isDetail = isDetail || false;
this.$nextTick(() => {
this.$refs['elForm'].resetFields();
if (this.dataForm.id) {
request({
url: '/api/Extend/LqXmzl/' + this.dataForm.id,
method: 'get'
}).then(res =>{
this.dataForm = res.data;
|
5b6e99a5
李宇
```
|
419
|
this.dataForm.isEffective = res.data.isEffective?res.data.isEffective:1;
|
a500b581
李宇
```
|
420
421
422
423
424
|
this.dataForm.medicalBeautyLaborCost = res.data.medicalBeautyLaborCost !== undefined ? res.data.medicalBeautyLaborCost : 0;
this.dataForm.techBeautyLaborCost = res.data.techBeautyLaborCost !== undefined ? res.data.techBeautyLaborCost : 0;
this.dataForm.lifeBeautyLaborCost = res.data.lifeBeautyLaborCost !== undefined ? res.data.lifeBeautyLaborCost : 0;
this.dataForm.healthCoachLaborCost = res.data.healthCoachLaborCost !== undefined ? res.data.healthCoachLaborCost : 0;
this.dataForm.isAllowAccompanied = res.data.isAllowAccompanied !== undefined ? res.data.isAllowAccompanied : 0;
|
96009bc9
hexiaodong
hxd
|
425
426
427
|
})
}
})
|
140ec06a
李宇
```
|
428
|
this.getoptions()
|
96009bc9
hexiaodong
hxd
|
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
|
},
dataFormSubmit() {
this.$refs['elForm'].validate((valid) => {
if (valid) {
if (!this.dataForm.id) {
request({
url: `/api/Extend/LqXmzl`,
method: 'post',
data: this.dataForm,
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.visible = false,
this.$emit('refresh', true)
}
})
})
} else {
request({
url: '/api/Extend/LqXmzl/' + this.dataForm.id,
method: 'PUT',
data: this.dataForm
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.visible = false
this.$emit('refresh', true)
}
})
})
}
}
})
},
}
}
</script>
|