apply-clients 7.1.36-yuchuan-21 → 7.1.36-yuchuan-22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,602 +1,602 @@
1
- <template>
2
- <!-- 点火派单 -->
3
- <div class="flex-row">
4
- <div class="basic-main">
5
- <criteria-paged :model="model" v-ref:cp>
6
- <criteria
7
- partial="criteria"
8
- @condition-changed="$parent.searchCondition"
9
- v-ref:cri
10
- >
11
- <div
12
- class="form-horizontal select-overspread container-fluid auto"
13
- partial
14
- >
15
- <div class="row">
16
- <div class="form-group col-sm-2">
17
- <label class="font_normal_body"
18
- ><strong>片&emsp;&emsp;区:</strong></label
19
- >
20
- <v-select
21
- v-model="model.f_slice_area"
22
- placeholder="片区"
23
- condition="ui.f_slice_area = '{}'"
24
- :value.sync="model.f_slice_area"
25
- :options="$parent.$parent.sliceareas"
26
- class="select select_list"
27
- :value-single="true"
28
- close-on-select
29
- >
30
- </v-select>
31
- </div>
32
- <div class="form-group col-sm-2">
33
- <label class="font_normal_body"
34
- ><strong>发卡状态:</strong></label
35
- >
36
- <v-select
37
- v-model="model.f_whether_hairpin"
38
- placeholder="发卡状态"
39
- condition="uf.f_whether_hairpin = '{}'"
40
- :value.sync="model.f_whether_hairpin"
41
- :options="$parent.$parent.whether_hairpin"
42
- class="select select_list"
43
- :value-single="true"
44
- close-on-select
45
- >
46
- </v-select>
47
- </div>
48
- <div class="form-group col-sm-2">
49
- <label for="startDate" class="font_normal_body"
50
- ><strong>发卡时间:</strong></label
51
- >
52
- <datepicker
53
- id="startDate"
54
- placeholder="开始日期"
55
- style="width: 60% !important"
56
- v-model="model.startDate"
57
- :value.sync="model.startDate"
58
- :format="'yyyy-MM-dd 00:00:00'"
59
- :show-reset-button="true"
60
- condition="uf.f_open_date >= '{}'"
61
- >
62
- </datepicker>
63
- </div>
64
- <div class="form-group col-sm-2">
65
- <label for="endDate" class="font_normal_body"
66
- ><strong>发卡时间:</strong></label
67
- >
68
- <datepicker
69
- id="endDate"
70
- placeholder="结束日期"
71
- style="width: 60% !important"
72
- v-model="model.endDate"
73
- :value.sync="model.endDate"
74
- :format="'yyyy-MM-dd 23:59:59'"
75
- :show-reset-button="true"
76
- condition="uf.f_open_date <= '{}'"
77
- >
78
- </datepicker>
79
- </div>
80
- <div class="form-group col-sm-3 button-range">
81
- <button
82
- class="button_export button_spacing"
83
- @click="$parent.$parent.openOperatorModal()"
84
- >
85
- 批量派单
86
- </button>
87
- <button
88
- class="button_search button_spacing"
89
- @click="$parent.$parent.search()"
90
- v-el:cx
91
- >
92
- 查询
93
- </button>
94
- <button
95
- class="button_search button_spacing"
96
- @click="$parent.$parent.loadPage()"
97
- >
98
- 返回
99
- </button>
100
- <button
101
- class="button_clear button_spacing"
102
- @click="$parent.$parent.clear()"
103
- >
104
- 清空
105
- </button>
106
- <div
107
- :class="{
108
- button_shrink_top: $parent.$parent.criteriaShow,
109
- button_shrink_bottom: !$parent.$parent.criteriaShow,
110
- }"
111
- @click="
112
- $parent.$parent.criteriaShow = !$parent.$parent.criteriaShow
113
- "
114
- class="button_spacing"
115
- style="float: right"
116
- ></div>
117
- </div>
118
- </div>
119
- <div class="row" v-show="$parent.$parent.criteriaShow">
120
- <div class="form-group col-sm-2">
121
- <label class="font_normal_body"
122
- ><strong>工程编号:</strong></label
123
- >
124
- <input
125
- type="text"
126
- class="input_search"
127
- style="width: 60%"
128
- v-model="model.f_applycode"
129
- v-on:keyup.enter="$parent.$parent.search()"
130
- condition="ui.f_applycode = '{}'"
131
- placeholder="工程编号"
132
- />
133
- </div>
134
- <div class="form-group col-sm-2">
135
- <label class="font_normal_body"
136
- ><strong>用户类型:</strong></label
137
- >
138
- <v-select
139
- v-model="model.f_user_type"
140
- placeholder="用户类型"
141
- condition="uf.f_user_type = '{}'"
142
- :value.sync="model.f_user_type"
143
- :options="$parent.$parent.usertype"
144
- class="select select_list"
145
- :value-single="true"
146
- close-on-select
147
- >
148
- </v-select>
149
- </div>
150
- <div class="form-group col-sm-2">
151
- <label class="font_normal_body"
152
- ><strong>用户编号:</strong></label
153
- >
154
- <input
155
- type="text"
156
- class="input_search"
157
- style="width: 60%"
158
- v-model="model.f_userinfo_id"
159
- v-on:keyup.enter="$parent.$parent.search()"
160
- condition="ui.f_userinfo_id = '{}'"
161
- placeholder="用户编号"
162
- />
163
- </div>
164
- <div class="form-group col-sm-2">
165
- <label class="font_normal_body"
166
- ><strong>用&ensp;户&ensp;名:</strong></label
167
- >
168
- <input
169
- type="text"
170
- class="input_search"
171
- style="width: 60%"
172
- v-model="model.f_user_name"
173
- v-on:keyup.enter="$parent.$parent.search()"
174
- condition="ui.f_user_name = '{}'"
175
- placeholder="用户名"
176
- />
177
- </div>
178
- <div class="form-group col-sm-2">
179
- <label class="font_normal_body"
180
- ><strong>电&emsp;&emsp;话:</strong></label
181
- >
182
- <input
183
- type="text"
184
- class="input_search"
185
- style="width: 60%"
186
- v-model="model.f_user_phone"
187
- v-on:keyup.enter="$parent.$parent.search()"
188
- condition="ui.f_user_phone = '{}'"
189
- placeholder="电话"
190
- />
191
- </div>
192
- <div class="form-group col-sm-2">
193
- <label class="font_normal_body">小&emsp;&emsp;区:</label>
194
- <input type="text" class="input_search" style="width: 60%" v-model="model.f_residential_area"
195
- v-on:keyup.enter="$parent.$parent.search()" condition="ui.f_residential_area = '{}'" placeholder='小区'>
196
- </div>
197
- </div>
198
- </div>
199
- </criteria>
200
- <data-grid
201
- :model="model"
202
- optional
203
- partial="list"
204
- v-ref:grid
205
- style="overflow: auto"
206
- class="list_area table_sy"
207
- >
208
- <template partial="head">
209
- <tr>
210
- <th style="white-space: nowrap">序号</th>
211
- <th style="white-space: nowrap">报建编号</th>
212
- <th style="white-space: nowrap">用户编号</th>
213
- <th style="white-space: nowrap">用户姓名</th>
214
- <th style="white-space: nowrap">联系电话</th>
215
- <th style="white-space: nowrap">用户类型</th>
216
- <th style="white-space: nowrap">地址</th>
217
- <th style="white-space: nowrap">片区</th>
218
- <!-- <th>定位地址</th>-->
219
- <th style="white-space: nowrap">气表分类</th>
220
- <th style="white-space: nowrap">表号</th>
221
- <th style="white-space: nowrap">气表品牌</th>
222
- <th style="white-space: nowrap">气表型号</th>
223
- <th style="white-space: nowrap">发卡状态</th>
224
- <th style="white-space: nowrap">发卡时间</th>
225
- <th style="white-space: nowrap">报建人</th>
226
- <th style="white-space: nowrap">报建联系电话</th>
227
- </tr>
228
- </template>
229
- <template partial="body">
230
- <tr>
231
- <td style="text-align: center">
232
- <nobr
233
- ><font>{{ $index + 1 }}</font></nobr
234
- >
235
- </td>
236
- <td style="text-align: center">
237
- <nobr
238
- ><font>{{ row.f_apply_num }}</font></nobr
239
- >
240
- </td>
241
- <td style="text-align: center">
242
- <nobr
243
- ><font>{{ row.f_userinfo_id }}</font></nobr
244
- >
245
- </td>
246
- <td style="text-align: center">
247
- <nobr
248
- ><font>{{ row.f_user_name }}</font></nobr
249
- >
250
- </td>
251
- <td style="text-align: center">
252
- <nobr
253
- ><font>{{ row.f_user_phone }}</font></nobr
254
- >
255
- </td>
256
- <td style="text-align: center">
257
- <nobr
258
- ><font>{{ row.f_user_type }}</font></nobr
259
- >
260
- </td>
261
- <td style="text-align: center">
262
- <nobr
263
- ><font
264
- >{{ row.f_address }}{{ row.f_address_detail }}</font
265
- ></nobr
266
- >
267
- </td>
268
- <td style="text-align: center">
269
- <nobr
270
- ><font>{{ row.f_area }}</font></nobr
271
- >
272
- </td>
273
- <!-- <td style="text-align: center;">-->
274
- <!-- <nobr><font>-->
275
- <!-- <a @click="$parent.$parent.$parent.openAmap(row)" style="text-decoration: none">-->
276
- <!-- {{row.f_location_address}}-->
277
- <!-- </a>-->
278
- <!-- </font></nobr>-->
279
- <!-- </td>-->
280
- <td style="text-align: center">
281
- <nobr
282
- ><font>{{ row.f_meter_classify }}</font></nobr
283
- >
284
- </td>
285
- <td style="text-align: center">
286
- <nobr
287
- ><font>{{ row.f_meternumber }}</font></nobr
288
- >
289
- </td>
290
- <td style="text-align: center">
291
- <nobr
292
- ><font>{{ row.f_meter_brand }}</font></nobr
293
- >
294
- </td>
295
- <td style="text-align: center">
296
- <nobr
297
- ><font>{{ row.f_meter_style }}</font></nobr
298
- >
299
- </td>
300
- <td style="text-align: center">
301
- <nobr
302
- ><font>{{ row.f_whether_hairpin }}</font></nobr
303
- >
304
- </td>
305
- <td style="text-align: center">
306
- <nobr
307
- ><font>{{ row.f_faka_date }}</font></nobr
308
- >
309
- </td>
310
- <td style="text-align: center">
311
- <nobr
312
- ><font>{{ row.f_contact }}</font></nobr
313
- >
314
- </td>
315
- <td style="text-align: center">
316
- <nobr
317
- ><font>{{ row.f_phone }}</font></nobr
318
- >
319
- </td>
320
- </tr>
321
- </template>
322
- </data-grid>
323
- </criteria-paged>
324
- </div>
325
- </div>
326
-
327
- <modal
328
- v-if="showAmap"
329
- :show.sync="showAmap"
330
- v-ref:amap
331
- :large="true"
332
- :backdrop="false"
333
- title="定位信息"
334
- >
335
- <header slot="modal-header" class="modal-header">
336
- <button type="button" class="close" @click="closeModal">
337
- <span>&times;</span>
338
- </button>
339
- <h4 class="modal-title">定位信息</h4>
340
- </header>
341
- <article
342
- slot="modal-body"
343
- class="modal-body clearfix"
344
- style="height: 500px"
345
- >
346
- <amap-location
347
- :isshowsearch="false"
348
- :mylocationinfo="false"
349
- :isshowmapmodel="false"
350
- :islocation="false"
351
- mapmodel="dragMarker"
352
- :labelmarksarray="labelmarksarray"
353
- ></amap-location>
354
- </article>
355
- <footer slot="modal-footer" class="modal-footer"></footer>
356
- </modal>
357
-
358
- <validator name="v">
359
- <modal
360
- v-if="showOperator"
361
- :show.sync="showOperator"
362
- v-ref:operator
363
- :large="true"
364
- :backdrop="false"
365
- title="批量派单"
366
- >、
367
- <header slot="modal-header" class="modal-header">
368
- <button type="button" class="close" @click="closeModal('details')">
369
- <span>&times;</span>
370
- </button>
371
- <h4 class="modal-title">批量派单</h4>
372
- </header>
373
- <article slot="modal-body" class="modal-body clearfix">
374
- <!-- 基本信息 -->
375
- <div
376
- class="form-group col-sm-12"
377
- :class="[$v.operator.required ? 'has-error' : '']"
378
- >
379
- <label class="col-sm-2 control-label">操作人:</label>
380
- <div class="col-sm-10">
381
- <input
382
- type="text"
383
- v-show="false"
384
- v-model="operator.id"
385
- :value.sync="operator.id"
386
- v-validate:operator="['required']"
387
- />
388
- <input-select
389
- class="select select_list"
390
- :value.sync="operator"
391
- v-model="operator"
392
- :options="operatorList"
393
- ></input-select>
394
- </div>
395
- </div>
396
- <div class="form-group col-sm-12">
397
- <label class="col-sm-2 control-label">是否共享:</label>
398
- <div class="col-sm-10">
399
- <input-select
400
- class="select select_list"
401
- :value.sync="f_shared_dispatch"
402
- v-model="f_shared_dispatch"
403
- :options="sharedOptions"
404
- ></input-select>
405
- </div>
406
- </div>
407
- </article>
408
- <footer slot="modal-footer" class="modal-footer">
409
- <button
410
- type="button"
411
- class="btn btn-primary"
412
- @click="batchDispatch()"
413
- :disabled="!$v.valid"
414
- >
415
- 确定
416
- </button>
417
- </footer>
418
- </modal>
419
- </validator>
420
- </template>
421
-
422
- <script>
423
- import { PagedList } from "vue-client";
424
-
425
- export default {
426
- title: "点火派单",
427
- props: ["showData"],
428
- data() {
429
- return {
430
- model: new PagedList("rs/sql/getWaitIgnitionTask", 20, null),
431
- criteriaShow: false,
432
- source:
433
- "this.getParentByType($organization$).getChildByName($通气组报装$).getChildren()",
434
- operatorList: [],
435
- showOperator: false,
436
- operator: null,
437
- f_shared_dispatch: "否",
438
- sharedOptions: [
439
- { label: "是", value: "是" },
440
- { label: "否", value: "否" },
441
- ],
442
- showAmap: false,
443
- labelmarksarray: [],
444
- sliceareas: [], // 片区
445
- whether_hairpin: [
446
- { label: "全部", value: "" },
447
- { label: "已发卡", value: "已发" },
448
- { label: "未发卡", value: "未发" },
449
- ], //发卡状态
450
- usertype: [
451
- { label: "全部", value: "" },
452
- { label: "民用", value: "民用" },
453
- { label: "非民用", value: "非民用" },
454
- ], //用户类型
455
- };
456
- },
457
- ready() {
458
- this.search();
459
- this.getOperator();
460
- setTimeout(this.getsliceareas, 500);
461
- },
462
- methods: {
463
- loadPage() {
464
- this.$dispatch("loadPage");
465
- },
466
- openAmap(row) {
467
- this.labelmarksarray = [
468
- {
469
- data: {
470
- data: this.selectdata,
471
- label: `<div style="background: #fff;border-radius: 5px;height: 100px;padding: 5px">
472
- <h5>${row.f_user_name}</h5>
473
- <h5>${row.f_user_phone}</h5>
474
- <h5>${row.f_location_address}</h5>
475
- </div>`,
476
- },
477
- position: [row.f_lng, row.f_lat],
478
- isclearmarker: false,
479
- },
480
- ];
481
-
482
- this.showAmap = true;
483
- },
484
- async batchDispatch() {
485
- let selectdata = this.$refs.cp.$refs.grid.getRowData();
486
- if (selectdata.length > 0) {
487
- for (let i = 0; i < selectdata.length; i++) {
488
- if (
489
- selectdata[i].f_whether_hairpin === "未发" &&
490
- (!selectdata[i].f_user_name.includes("原处") ||
491
- !selectdata[i].f_contact.includes("原处"))
492
- ) {
493
- let res = await this.$showMessage(
494
- `第${selectdata.length}条数据未开户,无法派单!`
495
- );
496
- if (res == "confirm") {
497
- return;
498
- }
499
- }
500
- // if(selectdata[i].f_surplus_money > 0 ){
501
- // let res = await this.$showMessage(`第${selectdata.length}条报建费用未结清,无法派单!`)
502
- // if (res == 'confirm') {
503
- // return
504
- // }
505
- // }
506
- }
507
- let data = {
508
- operator: this.$login.f,
509
- f_userinfo_ids: selectdata.map((item) => {
510
- return {
511
- f_apply_num: item.f_apply_num,
512
- f_userinfo_id: item.f_userinfo_id,
513
- };
514
- }),
515
- ignitionOperator: this.operator,
516
- f_shared_dispatch: this.f_shared_dispatch,
517
- };
518
-
519
- let res = await this.$resetpost(
520
- "rs/logic/batchDispatchGas",
521
- { data: data },
522
- { resolveMsg: null, rejectMsg: "批量派单失败!!!" }
523
- );
524
-
525
- this.closeModal("details");
526
- this.search();
527
- } else {
528
- this.$showAlert("至少选择1个工单", "warning", 3000);
529
- }
530
- },
531
- async getsliceareas() {
532
- let res = await this.$resetpost(
533
- "rs/logic/getsliceareas",
534
- { data: null },
535
- { resolveMsg: null, rejectMsg: "获取片区失败!!!" }
536
- );
537
- this.sliceareas = [{ label: "全部", value: "" }, ...res.data];
538
- },
539
- async openOperatorModal() {
540
- let selectdata = this.$refs.cp.$refs.grid.getRowData();
541
- if (selectdata.length > 0) {
542
- let res = await this.$showMessage(
543
- `当前数据条数: ${selectdata.length}, 条数过大时派单时间可能会过长, 是否确认派单?`
544
- );
545
- if (res == "confirm") {
546
- this.showOperator = true;
547
- }
548
- } else {
549
- this.$showAlert("至少选择1个工单", "warning", 3000);
550
- }
551
- },
552
- async getOperator() {
553
- let data = {
554
- source: this.source,
555
- userid: this.$login.f.id,
556
- };
557
-
558
- let res = await this.$resetpost(
559
- "rs/search",
560
- { data: data },
561
- { resolveMsg: null, rejectMsg: "点火人员查询失败!!!" }
562
- );
563
-
564
- this.operatorList = res.data.map((item) => {
565
- return {
566
- label: item.name,
567
- value: item,
568
- };
569
- });
570
- },
571
- searchCondition(args) {
572
- args.condition = args.condition + ` and ir.id is null`;
573
- console.log("this.showDatade", this.showData);
574
- // args.condition = args.condition + ` and ui.f_process_id = '${this.showData.f_process_id}'`
575
- args.condition = args.condition + ` and ui.f_process_id is not null`;
576
- this.model.search(args.condition, args.model);
577
- },
578
- // 查询
579
- search() {
580
- this.$refs.cp.$refs.cri.search();
581
- },
582
- clear() {
583
- Object.keys(this.$refs.cp.$refs.cri.model).forEach((key) => {
584
- this.$refs.cp.$refs.cri.model[key] = null;
585
- });
586
- },
587
- closeModal(type) {
588
- this.showAmap = false;
589
- this.showOperator = false;
590
-
591
- this.labelmarksarray = [];
592
- this.operator = null;
593
-
594
- if (type === "details") {
595
- this.$refs.cp.$refs.grid.selectInit();
596
- }
597
- },
598
- },
599
- };
600
- </script>
601
-
602
- <style scoped></style>
1
+ <template>
2
+ <!-- 点火派单 -->
3
+ <div class="flex-row">
4
+ <div class="basic-main">
5
+ <criteria-paged :model="model" v-ref:cp>
6
+ <criteria
7
+ partial="criteria"
8
+ @condition-changed="$parent.searchCondition"
9
+ v-ref:cri
10
+ >
11
+ <div
12
+ class="form-horizontal select-overspread container-fluid auto"
13
+ partial
14
+ >
15
+ <div class="row">
16
+ <div class="form-group col-sm-2">
17
+ <label class="font_normal_body"
18
+ ><strong>片&emsp;&emsp;区:</strong></label
19
+ >
20
+ <v-select
21
+ v-model="model.f_slice_area"
22
+ placeholder="片区"
23
+ condition="ui.f_slice_area = '{}'"
24
+ :value.sync="model.f_slice_area"
25
+ :options="$parent.$parent.sliceareas"
26
+ class="select select_list"
27
+ :value-single="true"
28
+ close-on-select
29
+ >
30
+ </v-select>
31
+ </div>
32
+ <div class="form-group col-sm-2">
33
+ <label class="font_normal_body"
34
+ ><strong>发卡状态:</strong></label
35
+ >
36
+ <v-select
37
+ v-model="model.f_whether_hairpin"
38
+ placeholder="发卡状态"
39
+ condition="uf.f_whether_hairpin = '{}'"
40
+ :value.sync="model.f_whether_hairpin"
41
+ :options="$parent.$parent.whether_hairpin"
42
+ class="select select_list"
43
+ :value-single="true"
44
+ close-on-select
45
+ >
46
+ </v-select>
47
+ </div>
48
+ <div class="form-group col-sm-2">
49
+ <label for="startDate" class="font_normal_body"
50
+ ><strong>发卡时间:</strong></label
51
+ >
52
+ <datepicker
53
+ id="startDate"
54
+ placeholder="开始日期"
55
+ style="width: 60% !important"
56
+ v-model="model.startDate"
57
+ :value.sync="model.startDate"
58
+ :format="'yyyy-MM-dd 00:00:00'"
59
+ :show-reset-button="true"
60
+ condition="uf.f_open_date >= '{}'"
61
+ >
62
+ </datepicker>
63
+ </div>
64
+ <div class="form-group col-sm-2">
65
+ <label for="endDate" class="font_normal_body"
66
+ ><strong>发卡时间:</strong></label
67
+ >
68
+ <datepicker
69
+ id="endDate"
70
+ placeholder="结束日期"
71
+ style="width: 60% !important"
72
+ v-model="model.endDate"
73
+ :value.sync="model.endDate"
74
+ :format="'yyyy-MM-dd 23:59:59'"
75
+ :show-reset-button="true"
76
+ condition="uf.f_open_date <= '{}'"
77
+ >
78
+ </datepicker>
79
+ </div>
80
+ <div class="form-group col-sm-3 button-range">
81
+ <button
82
+ class="button_export button_spacing"
83
+ @click="$parent.$parent.openOperatorModal()"
84
+ >
85
+ 批量派单
86
+ </button>
87
+ <button
88
+ class="button_search button_spacing"
89
+ @click="$parent.$parent.search()"
90
+ v-el:cx
91
+ >
92
+ 查询
93
+ </button>
94
+ <button
95
+ class="button_search button_spacing"
96
+ @click="$parent.$parent.loadPage()"
97
+ >
98
+ 返回
99
+ </button>
100
+ <button
101
+ class="button_clear button_spacing"
102
+ @click="$parent.$parent.clear()"
103
+ >
104
+ 清空
105
+ </button>
106
+ <div
107
+ :class="{
108
+ button_shrink_top: $parent.$parent.criteriaShow,
109
+ button_shrink_bottom: !$parent.$parent.criteriaShow,
110
+ }"
111
+ @click="
112
+ $parent.$parent.criteriaShow = !$parent.$parent.criteriaShow
113
+ "
114
+ class="button_spacing"
115
+ style="float: right"
116
+ ></div>
117
+ </div>
118
+ </div>
119
+ <div class="row" v-show="$parent.$parent.criteriaShow">
120
+ <div class="form-group col-sm-2">
121
+ <label class="font_normal_body"
122
+ ><strong>工程编号:</strong></label
123
+ >
124
+ <input
125
+ type="text"
126
+ class="input_search"
127
+ style="width: 60%"
128
+ v-model="model.f_applycode"
129
+ v-on:keyup.enter="$parent.$parent.search()"
130
+ condition="ui.f_applycode = '{}'"
131
+ placeholder="工程编号"
132
+ />
133
+ </div>
134
+ <div class="form-group col-sm-2">
135
+ <label class="font_normal_body"
136
+ ><strong>用户类型:</strong></label
137
+ >
138
+ <v-select
139
+ v-model="model.f_user_type"
140
+ placeholder="用户类型"
141
+ condition="uf.f_user_type = '{}'"
142
+ :value.sync="model.f_user_type"
143
+ :options="$parent.$parent.usertype"
144
+ class="select select_list"
145
+ :value-single="true"
146
+ close-on-select
147
+ >
148
+ </v-select>
149
+ </div>
150
+ <div class="form-group col-sm-2">
151
+ <label class="font_normal_body"
152
+ ><strong>用户编号:</strong></label
153
+ >
154
+ <input
155
+ type="text"
156
+ class="input_search"
157
+ style="width: 60%"
158
+ v-model="model.f_userinfo_id"
159
+ v-on:keyup.enter="$parent.$parent.search()"
160
+ condition="ui.f_userinfo_id = '{}'"
161
+ placeholder="用户编号"
162
+ />
163
+ </div>
164
+ <div class="form-group col-sm-2">
165
+ <label class="font_normal_body"
166
+ ><strong>用&ensp;户&ensp;名:</strong></label
167
+ >
168
+ <input
169
+ type="text"
170
+ class="input_search"
171
+ style="width: 60%"
172
+ v-model="model.f_user_name"
173
+ v-on:keyup.enter="$parent.$parent.search()"
174
+ condition="ui.f_user_name = '{}'"
175
+ placeholder="用户名"
176
+ />
177
+ </div>
178
+ <div class="form-group col-sm-2">
179
+ <label class="font_normal_body"
180
+ ><strong>电&emsp;&emsp;话:</strong></label
181
+ >
182
+ <input
183
+ type="text"
184
+ class="input_search"
185
+ style="width: 60%"
186
+ v-model="model.f_user_phone"
187
+ v-on:keyup.enter="$parent.$parent.search()"
188
+ condition="ui.f_user_phone = '{}'"
189
+ placeholder="电话"
190
+ />
191
+ </div>
192
+ <div class="form-group col-sm-2">
193
+ <label class="font_normal_body">小&emsp;&emsp;区:</label>
194
+ <input type="text" class="input_search" style="width: 60%" v-model="model.f_residential_area"
195
+ v-on:keyup.enter="$parent.$parent.search()" condition="ui.f_residential_area = '{}'" placeholder='小区'>
196
+ </div>
197
+ </div>
198
+ </div>
199
+ </criteria>
200
+ <data-grid
201
+ :model="model"
202
+ optional
203
+ partial="list"
204
+ v-ref:grid
205
+ style="overflow: auto"
206
+ class="list_area table_sy"
207
+ >
208
+ <template partial="head">
209
+ <tr>
210
+ <th style="white-space: nowrap">序号</th>
211
+ <th style="white-space: nowrap">报建编号</th>
212
+ <th style="white-space: nowrap">用户编号</th>
213
+ <th style="white-space: nowrap">用户姓名</th>
214
+ <th style="white-space: nowrap">联系电话</th>
215
+ <th style="white-space: nowrap">用户类型</th>
216
+ <th style="white-space: nowrap">地址</th>
217
+ <th style="white-space: nowrap">片区</th>
218
+ <!-- <th>定位地址</th>-->
219
+ <th style="white-space: nowrap">气表分类</th>
220
+ <th style="white-space: nowrap">表号</th>
221
+ <th style="white-space: nowrap">气表品牌</th>
222
+ <th style="white-space: nowrap">气表型号</th>
223
+ <th style="white-space: nowrap">发卡状态</th>
224
+ <th style="white-space: nowrap">发卡时间</th>
225
+ <th style="white-space: nowrap">报建人</th>
226
+ <th style="white-space: nowrap">报建联系电话</th>
227
+ </tr>
228
+ </template>
229
+ <template partial="body">
230
+ <tr>
231
+ <td style="text-align: center">
232
+ <nobr
233
+ ><font>{{ $index + 1 }}</font></nobr
234
+ >
235
+ </td>
236
+ <td style="text-align: center">
237
+ <nobr
238
+ ><font>{{ row.f_apply_num }}</font></nobr
239
+ >
240
+ </td>
241
+ <td style="text-align: center">
242
+ <nobr
243
+ ><font>{{ row.f_userinfo_id }}</font></nobr
244
+ >
245
+ </td>
246
+ <td style="text-align: center">
247
+ <nobr
248
+ ><font>{{ row.f_user_name }}</font></nobr
249
+ >
250
+ </td>
251
+ <td style="text-align: center">
252
+ <nobr
253
+ ><font>{{ row.f_user_phone }}</font></nobr
254
+ >
255
+ </td>
256
+ <td style="text-align: center">
257
+ <nobr
258
+ ><font>{{ row.f_user_type }}</font></nobr
259
+ >
260
+ </td>
261
+ <td style="text-align: center">
262
+ <nobr
263
+ ><font
264
+ >{{ row.f_address }}{{ row.f_address_detail }}</font
265
+ ></nobr
266
+ >
267
+ </td>
268
+ <td style="text-align: center">
269
+ <nobr
270
+ ><font>{{ row.f_area }}</font></nobr
271
+ >
272
+ </td>
273
+ <!-- <td style="text-align: center;">-->
274
+ <!-- <nobr><font>-->
275
+ <!-- <a @click="$parent.$parent.$parent.openAmap(row)" style="text-decoration: none">-->
276
+ <!-- {{row.f_location_address}}-->
277
+ <!-- </a>-->
278
+ <!-- </font></nobr>-->
279
+ <!-- </td>-->
280
+ <td style="text-align: center">
281
+ <nobr
282
+ ><font>{{ row.f_meter_classify }}</font></nobr
283
+ >
284
+ </td>
285
+ <td style="text-align: center">
286
+ <nobr
287
+ ><font>{{ row.f_meternumber }}</font></nobr
288
+ >
289
+ </td>
290
+ <td style="text-align: center">
291
+ <nobr
292
+ ><font>{{ row.f_meter_brand }}</font></nobr
293
+ >
294
+ </td>
295
+ <td style="text-align: center">
296
+ <nobr
297
+ ><font>{{ row.f_meter_style }}</font></nobr
298
+ >
299
+ </td>
300
+ <td style="text-align: center">
301
+ <nobr
302
+ ><font>{{ row.f_whether_hairpin }}</font></nobr
303
+ >
304
+ </td>
305
+ <td style="text-align: center">
306
+ <nobr
307
+ ><font>{{ row.f_faka_date }}</font></nobr
308
+ >
309
+ </td>
310
+ <td style="text-align: center">
311
+ <nobr
312
+ ><font>{{ row.f_contact }}</font></nobr
313
+ >
314
+ </td>
315
+ <td style="text-align: center">
316
+ <nobr
317
+ ><font>{{ row.f_phone }}</font></nobr
318
+ >
319
+ </td>
320
+ </tr>
321
+ </template>
322
+ </data-grid>
323
+ </criteria-paged>
324
+ </div>
325
+ </div>
326
+
327
+ <modal
328
+ v-if="showAmap"
329
+ :show.sync="showAmap"
330
+ v-ref:amap
331
+ :large="true"
332
+ :backdrop="false"
333
+ title="定位信息"
334
+ >
335
+ <header slot="modal-header" class="modal-header">
336
+ <button type="button" class="close" @click="closeModal">
337
+ <span>&times;</span>
338
+ </button>
339
+ <h4 class="modal-title">定位信息</h4>
340
+ </header>
341
+ <article
342
+ slot="modal-body"
343
+ class="modal-body clearfix"
344
+ style="height: 500px"
345
+ >
346
+ <amap-location
347
+ :isshowsearch="false"
348
+ :mylocationinfo="false"
349
+ :isshowmapmodel="false"
350
+ :islocation="false"
351
+ mapmodel="dragMarker"
352
+ :labelmarksarray="labelmarksarray"
353
+ ></amap-location>
354
+ </article>
355
+ <footer slot="modal-footer" class="modal-footer"></footer>
356
+ </modal>
357
+
358
+ <validator name="v">
359
+ <modal
360
+ v-if="showOperator"
361
+ :show.sync="showOperator"
362
+ v-ref:operator
363
+ :large="true"
364
+ :backdrop="false"
365
+ title="批量派单"
366
+ >、
367
+ <header slot="modal-header" class="modal-header">
368
+ <button type="button" class="close" @click="closeModal('details')">
369
+ <span>&times;</span>
370
+ </button>
371
+ <h4 class="modal-title">批量派单</h4>
372
+ </header>
373
+ <article slot="modal-body" class="modal-body clearfix">
374
+ <!-- 基本信息 -->
375
+ <div
376
+ class="form-group col-sm-12"
377
+ :class="[$v.operator.required ? 'has-error' : '']"
378
+ >
379
+ <label class="col-sm-2 control-label">操作人:</label>
380
+ <div class="col-sm-10">
381
+ <input
382
+ type="text"
383
+ v-show="false"
384
+ v-model="operator.id"
385
+ :value.sync="operator.id"
386
+ v-validate:operator="['required']"
387
+ />
388
+ <input-select
389
+ class="select select_list"
390
+ :value.sync="operator"
391
+ v-model="operator"
392
+ :options="operatorList"
393
+ ></input-select>
394
+ </div>
395
+ </div>
396
+ <div class="form-group col-sm-12">
397
+ <label class="col-sm-2 control-label">是否共享:</label>
398
+ <div class="col-sm-10">
399
+ <input-select
400
+ class="select select_list"
401
+ :value.sync="f_shared_dispatch"
402
+ v-model="f_shared_dispatch"
403
+ :options="sharedOptions"
404
+ ></input-select>
405
+ </div>
406
+ </div>
407
+ </article>
408
+ <footer slot="modal-footer" class="modal-footer">
409
+ <button
410
+ type="button"
411
+ class="btn btn-primary"
412
+ @click="batchDispatch()"
413
+ :disabled="!$v.valid"
414
+ >
415
+ 确定
416
+ </button>
417
+ </footer>
418
+ </modal>
419
+ </validator>
420
+ </template>
421
+
422
+ <script>
423
+ import { PagedList } from "vue-client";
424
+
425
+ export default {
426
+ title: "点火派单",
427
+ props: ["showData"],
428
+ data() {
429
+ return {
430
+ model: new PagedList("rs/sql/getWaitIgnitionTask", 20, null),
431
+ criteriaShow: false,
432
+ source:
433
+ "this.getParentByType($organization$).getChildByName($通气组报装$).getChildren()",
434
+ operatorList: [],
435
+ showOperator: false,
436
+ operator: null,
437
+ f_shared_dispatch: "否",
438
+ sharedOptions: [
439
+ { label: "是", value: "是" },
440
+ { label: "否", value: "否" },
441
+ ],
442
+ showAmap: false,
443
+ labelmarksarray: [],
444
+ sliceareas: [], // 片区
445
+ whether_hairpin: [
446
+ { label: "全部", value: "" },
447
+ { label: "已发卡", value: "已发" },
448
+ { label: "未发卡", value: "未发" },
449
+ ], //发卡状态
450
+ usertype: [
451
+ { label: "全部", value: "" },
452
+ { label: "民用", value: "民用" },
453
+ { label: "非民用", value: "非民用" },
454
+ ], //用户类型
455
+ };
456
+ },
457
+ ready() {
458
+ this.search();
459
+ this.getOperator();
460
+ setTimeout(this.getsliceareas, 500);
461
+ },
462
+ methods: {
463
+ loadPage() {
464
+ this.$dispatch("loadPage");
465
+ },
466
+ openAmap(row) {
467
+ this.labelmarksarray = [
468
+ {
469
+ data: {
470
+ data: this.selectdata,
471
+ label: `<div style="background: #fff;border-radius: 5px;height: 100px;padding: 5px">
472
+ <h5>${row.f_user_name}</h5>
473
+ <h5>${row.f_user_phone}</h5>
474
+ <h5>${row.f_location_address}</h5>
475
+ </div>`,
476
+ },
477
+ position: [row.f_lng, row.f_lat],
478
+ isclearmarker: false,
479
+ },
480
+ ];
481
+
482
+ this.showAmap = true;
483
+ },
484
+ async batchDispatch() {
485
+ let selectdata = this.$refs.cp.$refs.grid.getRowData();
486
+ if (selectdata.length > 0) {
487
+ for (let i = 0; i < selectdata.length; i++) {
488
+ if (
489
+ selectdata[i].f_whether_hairpin === "未发" &&
490
+ (!selectdata[i].f_user_name.includes("原处") ||
491
+ !selectdata[i].f_contact.includes("原处"))
492
+ ) {
493
+ let res = await this.$showMessage(
494
+ `第${selectdata.length}条数据未开户,无法派单!`
495
+ );
496
+ if (res == "confirm") {
497
+ return;
498
+ }
499
+ }
500
+ // if(selectdata[i].f_surplus_money > 0 ){
501
+ // let res = await this.$showMessage(`第${selectdata.length}条报建费用未结清,无法派单!`)
502
+ // if (res == 'confirm') {
503
+ // return
504
+ // }
505
+ // }
506
+ }
507
+ let data = {
508
+ operator: this.$login.f,
509
+ f_userinfo_ids: selectdata.map((item) => {
510
+ return {
511
+ f_apply_num: item.f_apply_num,
512
+ f_userinfo_id: item.f_userinfo_id,
513
+ };
514
+ }),
515
+ ignitionOperator: this.operator,
516
+ f_shared_dispatch: this.f_shared_dispatch,
517
+ };
518
+
519
+ let res = await this.$resetpost(
520
+ "rs/logic/batchDispatchGas",
521
+ { data: data },
522
+ { resolveMsg: null, rejectMsg: "批量派单失败!!!" }
523
+ );
524
+
525
+ this.closeModal("details");
526
+ this.search();
527
+ } else {
528
+ this.$showAlert("至少选择1个工单", "warning", 3000);
529
+ }
530
+ },
531
+ async getsliceareas() {
532
+ let res = await this.$resetpost(
533
+ "rs/logic/getsliceareas",
534
+ { data: null },
535
+ { resolveMsg: null, rejectMsg: "获取片区失败!!!" }
536
+ );
537
+ this.sliceareas = [{ label: "全部", value: "" }, ...res.data];
538
+ },
539
+ async openOperatorModal() {
540
+ let selectdata = this.$refs.cp.$refs.grid.getRowData();
541
+ if (selectdata.length > 0) {
542
+ let res = await this.$showMessage(
543
+ `当前数据条数: ${selectdata.length}, 条数过大时派单时间可能会过长, 是否确认派单?`
544
+ );
545
+ if (res == "confirm") {
546
+ this.showOperator = true;
547
+ }
548
+ } else {
549
+ this.$showAlert("至少选择1个工单", "warning", 3000);
550
+ }
551
+ },
552
+ async getOperator() {
553
+ let data = {
554
+ source: this.source,
555
+ userid: this.$login.f.id,
556
+ };
557
+
558
+ let res = await this.$resetpost(
559
+ "rs/search",
560
+ { data: data },
561
+ { resolveMsg: null, rejectMsg: "点火人员查询失败!!!" }
562
+ );
563
+
564
+ this.operatorList = res.data.map((item) => {
565
+ return {
566
+ label: item.name,
567
+ value: item,
568
+ };
569
+ });
570
+ },
571
+ searchCondition(args) {
572
+ args.condition = args.condition + ` and (ir.id is null or ap.f_state=1)`;
573
+ console.log("this.showDatade", this.showData);
574
+ // args.condition = args.condition + ` and ui.f_process_id = '${this.showData.f_process_id}'`
575
+ args.condition = args.condition + ` and ui.f_process_id is not null`;
576
+ this.model.search(args.condition, args.model);
577
+ },
578
+ // 查询
579
+ search() {
580
+ this.$refs.cp.$refs.cri.search();
581
+ },
582
+ clear() {
583
+ Object.keys(this.$refs.cp.$refs.cri.model).forEach((key) => {
584
+ this.$refs.cp.$refs.cri.model[key] = null;
585
+ });
586
+ },
587
+ closeModal(type) {
588
+ this.showAmap = false;
589
+ this.showOperator = false;
590
+
591
+ this.labelmarksarray = [];
592
+ this.operator = null;
593
+
594
+ if (type === "details") {
595
+ this.$refs.cp.$refs.grid.selectInit();
596
+ }
597
+ },
598
+ },
599
+ };
600
+ </script>
601
+
602
+ <style scoped></style>