telephone-clients 3.0.104-100 → 3.0.104-102

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,701 +1,701 @@
1
- <template >
2
- <div id="stand-work-list" class="flex bg-white p-10">
3
- <div class="span">
4
- <criteria-paged :model="model" v-ref:paged>
5
- <criteria partial='criteria' v-ref:criteria @condition-changed='$parent.search'>
6
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
- <div class="row">
8
- <!--<div class="col-sm-3 form-group form-input-group" style="width: 20%">
9
- <label class="font_normal_body" style="width: 40%">工单编号</label>
10
- <input type="text" class="input_search" v-model="model.f_service_id" placeholder='工单编号'
11
- condition="f_service_id like '%{}%'"
12
- :size="model.f_service_id ? model.f_service_id.length : 6">
13
- </div>
14
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
15
- <label class="font_normal_body" style="width: 40%">工单类型</label>
16
- <v-select :value.sync="model.f_workorder_type" :value-single="true" v-model="model.f_workorder_type"
17
- :options='$parent.$parent.serviceorders' placeholder='工单类型'
18
- condition="f_workorder_type like '%{}%'"
19
- close-on-select>
20
- </v-select>
21
- </div>-->
22
- <div class="col-sm-3 form-group form-input-group" style="width: 20%;">
23
- <label class="font_normal_body" style="width: 40%">客户姓名</label>
24
- <input type="text" class="input_search" v-model="model.f_user_name" placeholder='客户姓名'
25
- condition="tswo.f_user_name like '%{}%'"
26
- :size="model.f_user_name ? model.f_user_name.length : 6">
27
- </div>
28
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
29
- <label class="font_normal_body" style="width: 40%">客户编号</label>
30
- <input type="text" class="input_search" v-model="model.f_userinfo_code" placeholder='客户编号'
31
- condition="tswo.f_userinfo_code like '%{}%'"
32
- :size="model.f_userinfo_code ? model.f_userinfo_code.length : 6">
33
- </div>
34
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
35
- <label class="font_normal_body" style="width: 40%">地址</label>
36
- <input type="text" class="input_search" v-model="model.f_address" placeholder='地址'
37
- condition="tswo.f_address like '%{}%'"
38
- :size="model.f_address ? model.f_address.length : 4">
39
- </div>
40
- <div class="col-sm-4" style="float: right" >
41
- <div style="float: right; margin-top: 8px" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
42
- <div style="float: right;margin-top: 8px;margin-left: 2%">
43
- <export-excel-tel
44
- :data="$parent.$parent.searchData"
45
- :field="$parent.$parent.excelHeaders"
46
- sqlurl="rs/logic/telephoneExport" sql-name="serviceDetails" template-name='工单详情导出'
47
- :choose-col="true">
48
- </export-excel-tel>
49
- </div>
50
- <button class="button_search button_spacing" style="float: right;margin-top: 8px" @click="search(),$dispatch('search')">查询</button>
51
- </div>
52
- </div>
53
- <div class="row" v-show="$parent.$parent.criteriaShow">
54
-
55
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
56
- <label class="font_normal_body" style="width: 40%">派单时间</label>
57
- <datepicker placeholder="起始派单时间"
58
- :value.sync="model.f_created_date"
59
- v-model="model.f_created_date"
60
- :format="'yyyy-MM-dd 00:00:00'"
61
- condition="tsw.f_date > '{}'"
62
- ></datepicker>
63
- </div>
64
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
65
- <label class="font_normal_body" style="width: 40%">派单时间</label>
66
- <datepicker placeholder="终止派单时间"
67
- :value.sync="model.f_created_enddate"
68
- v-model="model.f_created_enddate"
69
- :format="'yyyy-MM-dd 23:59:59'"
70
- condition="tsw.f_date < '{}'"
71
- ></datepicker>
72
- </div>
73
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
74
- <label class="font_normal_body" style="width: 40%">&nbsp;&nbsp;&nbsp;公司</label>
75
- <right-tree @re-res="$parent.$parent.getRes" :initresid='$parent.$parent.curorgid'>
76
- </right-tree>
77
- </div>
78
-
79
- <!--<div class="col-sm-3 form-group form-input-group" style="width: 20%">
80
- <label class="font_normal_body" style="width: 40%">来电电话</label>
81
- <input type="text" class="input_search" v-model="model.f_phone" placeholder='来电电话'
82
- condition="f_phone like '%{}%'"
83
- :size="model.f_phone ? model.f_phone.length : 6">
84
- </div>
85
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
86
- <label class="font_normal_body" style="width: 40%">联系电话</label>
87
- <input type="text" class="input_search" v-model="model.f_contact_phone" placeholder='联系电话'
88
- condition="f_contact_phone like '%{}%'"
89
- :size="model.f_contact_phone ? model.f_contact_phone.length : 6">
90
- </div>-->
91
- </div>
92
- <div class="row" v-show="$parent.$parent.criteriaShow">
93
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
94
- <label class="font_normal_body" style="width: 40%">工单状态</label>
95
- <v-select :value.sync="model.defname" v-model='model.defname'
96
- :value-single="true"
97
- :options='$parent.$parent.defnames' placeholder='工单状态'
98
- condition="sa.defname = '{}'"
99
- close-on-select></v-select>
100
- </div>
101
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
102
- <label class="font_normal_body" style="width: 40%">隐患级别</label>
103
- <v-select :value.sync="$parent.$parent.defectLeave" v-model='$parent.$parent.defectLeave'
104
- :options='$parent.$parent.defectLeaveList' placeholder='工单状态'
105
- close-on-select></v-select>
106
- </div>
107
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
108
- <label class="font_normal_body" style="width: 40%">隐患类型</label>
109
- <!--<v-select :value.sync="$parent.$parent.defectType" v-model='$parent.$parent.defectType'
110
- :multiple="true"
111
- :options='$parent.$parent.getdefectType' placeholder='工单状态' ></v-select>-->
112
- <v-select
113
- :value.sync="$parent.$parent.defectType"
114
- v-model="$parent.$parent.defectType"
115
- :options='$parent.$parent.getdefectType'
116
- placeholder='隐患类型'
117
- condition="f_street = '{}'"
118
- :multiple="true">
119
- </v-select>
120
- </div>
121
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
122
- <label class="font_normal_body" style="width: 40%">区域</label>
123
- <v-select
124
- :value.sync="model.regionModel"
125
- v-model="model.regionModel"
126
- :options='$parent.$parent.regionChick'
127
- placeholder='请选择区域'
128
- condition="tswo.f_street = '{}'"
129
- close-on-select>
130
- </v-select>
131
- </div>
132
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
133
- <label class="font_normal_body" style="width: 40%">&nbsp;&nbsp;小区域 </label>
134
- <input type="text" class="input_search" v-model="model.smallRegionModel" placeholder='请输入小区域'
135
- condition="tswo.f_small_area like '%{}%'" style="width: 60%;">
136
- </div>
137
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
138
- <label class="font_normal_body" style="width: 40%">用户类型</label>
139
- <v-select
140
- :value.sync="model.customerTypeModel"
141
- v-model="model.customerTypeModel"
142
- :options='$parent.$parent.customerTypeChick'
143
- placeholder='用户类型'
144
- condition="tswo.f_user_type = '{}'"
145
- close-on-select>
146
- </v-select>
147
- </div>
148
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
149
- <label class="font_normal_body" style="width: 40%">离开时间</label>
150
- <datepicker placeholder="离开时间开始"
151
- :value.sync="model.f_date_leave"
152
- v-model="model.f_date_leave"
153
- :format="'yyyy-MM-dd 00:00:00'"
154
- condition="tsw.f_date_leave > '{}'"
155
- ></datepicker>
156
- </div>
157
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
158
- <label class="font_normal_body" style="width: 40%">离开时间</label>
159
- <datepicker placeholder="离开时间结束"
160
- :value.sync="model.f_enddate_leave"
161
- v-model="model.f_enddate_leave"
162
- :format="'yyyy-MM-dd 23:59:59'"
163
- condition="tsw.f_date_leave < '{}'"
164
- ></datepicker>
165
- </div>
166
- </div>
167
-
168
-
169
- <!-- <div class="row" v-show="$parent.$parent.criteriaShow">
170
-
171
- &lt;!&ndash;<div class="col-sm-3 form-group form-input-group" style="width: 20%">
172
- <label class="font_normal_body" style="width: 40%">接单站点</label>
173
- <input type="text" class="input_search" v-model="model.f_outlets" placeholder='接单站点'
174
- condition="f_outlets like '%{}%'"
175
- :size="model.f_outlets ? model.f_outlets.length : 6">
176
- </div>
177
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
178
- <label class="font_normal_body" style="width: 40%">完成时间</label>
179
- <datepicker placeholder="维修完成时间"
180
- :value.sync="model.f_date"
181
- v-model="model.f_date"
182
- :format="'yyyy-MM-dd HH:mm:ss'"
183
- ></datepicker>
184
- </div>
185
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
186
- <label class="font_normal_body" style="width: 40%">完成时间</label>
187
- <datepicker placeholder="维修完成时间"
188
- :value.sync="model.f_enddate"
189
- v-model="model.f_enddate"
190
- :format="'yyyy-MM-dd HH:mm:ss'"
191
- ></datepicker>
192
- </div>
193
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
194
- <label class="font_normal_body" style="width: 40%">话务员</label>
195
- <input type="text" class="input_search" v-model="model.f_attendant" placeholder='话务员'
196
- condition="f_attendant like '%{}%'"
197
- :size="model.f_attendant ? model.f_attendant.length : 6">
198
- </div>
199
- </div>
200
- <div class="row" v-show="$parent.$parent.criteriaShow">
201
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
202
- <label class="font_normal_body" style="width: 40%">接单员</label>
203
- <input type="text" class="input_search" v-model="model.f_order_man" placeholder='接单员'
204
- condition="f_order_man like '%{}%'"
205
- :size="model.f_order_man ? model.f_order_man.length : 6">
206
- </div>
207
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
208
- <label class="font_normal_body" style="width: 40%">工单来源</label>
209
- <v-select :value.sync="model.f_source" v-model='model.f_source'
210
- :value-single="true"
211
- :options='$parent.$parent.sources' placeholder='工单来源'
212
- close-on-select
213
- condition="f_source = '{}'"></v-select>
214
- </div>&ndash;&gt;
215
-
216
- &lt;!&ndash;<div class="col-sm-3 form-group form-input-group" style="width: 20%">
217
- <label class="font_normal_body" style="width: 40%">置换状态</label>
218
- <v-select :value.sync="model.f_status" v-model='model.f_status'
219
- :value-single="true"
220
- :options='$parent.$parent.zhihuans' placeholder='置换状态'
221
- close-on-select
222
- ></v-select>
223
- </div>
224
- <div class="col-sm-3 form-group form-input-group" style="width: 20%">
225
- <label class="font_normal_body" style="width: 40%">地址编号</label>
226
- <input type="text" class="input_search" v-model="model.f_addressid" placeholder='地址id'
227
- condition="f_addressid like '%{}%'"
228
- :size="model.f_addressid ? model.f_addressid.length : 6">
229
- </div>&ndash;&gt;
230
- </div>
231
- -->
232
- </div>
233
- </criteria>
234
-
235
- <data-grid partial='list' v-ref:grid :model="model" class="list_area table_sy">
236
- <template partial='head'>
237
- <tr>
238
- <th><nobr>序号</nobr></th>
239
- <th><nobr>工单类型</nobr></th>
240
- <!--<th><nobr>报修类型</nobr></th>-->
241
- <th><nobr>工单编号</nobr></th>
242
- <th><nobr>派单时间</nobr></th>
243
- <th><nobr>客户信息</nobr></th>
244
- <th><nobr>联系电话</nobr></th>
245
- <th><nobr>工单状态</nobr></th>
246
- <th><nobr>派单人</nobr></th>
247
- <!--<th><nobr>话务员</nobr></th>-->
248
- <th><nobr>接单员</nobr></th>
249
- <th><nobr>上传时间</nobr></th>
250
- <th><nobr>到达时间</nobr></th>
251
- <th><nobr>离开时间</nobr></th>
252
- <th><nobr>故障明细</nobr></th>
253
- <th><nobr>备注</nobr></th>
254
- <!--<th><nobr>管理改造费用</nobr></th>-->
255
- <!--<th><nobr>材料改造费用</nobr></th>-->
256
- <!--<th><nobr>费用</nobr></th>-->
257
- <th><nobr>工单结果</nobr></th>
258
- <!-- <th><nobr>抢修照片</nobr></th>-->
259
-
260
- <th><nobr>操作</nobr></th>
261
- </tr>
262
- </template>
263
- <template partial='body'>
264
- <td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':'',row.f_is_print == 'true'?'background-color:#5ee9e0':''"><nobr>{{$index + 1}}</nobr></td>
265
- <td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':'',row.f_is_print == 'true'?'background-color:#5ee9e0':''"><nobr>{{row.f_workorder_type}}</nobr></td>
266
- <!--<td><nobr>{{row.f_repairtype}}</nobr></td>-->
267
- <td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':'',row.f_is_print == 'true'?'background-color:#5ee9e0':''"><nobr>{{row.f_service_id}}</nobr></td>
268
- <td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':'',row.f_is_print == 'true'?'background-color:#5ee9e0':''"><nobr>{{row.f_created_date}}</nobr></td>
269
- <td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':'',row.f_is_print == 'true'?'background-color:#5ee9e0':''"><nobr>{{row.f_user_name}}&nbsp;&nbsp;&nbsp;{{row.f_address}}&nbsp;&nbsp;&nbsp;{{row.f_contact_name}}</nobr></td>
270
- <td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':'',row.f_is_print == 'true'?'background-color:#5ee9e0':''"><nobr>{{row.f_contact_phone}}</nobr></td>
271
- <td style="text-align: center;" :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red;text-align: center;':'text-align: center;',row.f_is_print == 'true'?'background-color:#5ee9e0':''">
272
- <nobr>{{ row.defname ? row.defname:'完成'}}</nobr>
273
- </td>
274
- <td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':'',row.f_is_print == 'true'?'background-color:#5ee9e0':''"><nobr>{{row.f_single_man}}</nobr></td>
275
- <!--<td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':''"><nobr>{{row.f_attendant}}</nobr></td>-->
276
- <td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':'',row.f_is_print == 'true'?'background-color:#5ee9e0':''"><nobr>{{row.f_order_man}} {{row.f_repairman_phone}}</nobr></td>
277
- <td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':'',row.f_is_print == 'true'?'background-color:#5ee9e0':''"><nobr>{{row.f_date}}</nobr></td>
278
- <td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':'',row.f_is_print == 'true'?'background-color:#5ee9e0':''"><nobr>{{row.f_date_come}}</nobr></td>
279
- <td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':'',row.f_is_print == 'true'?'background-color:#5ee9e0':''"><nobr>{{row.f_date_leave}}</nobr></td>
280
-
281
- <td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':'',row.f_is_print == 'true'?'background-color:#5ee9e0':''"><nobr>{{$parent.$parent.$parent.trouble(row.failure)}}</nobr></td>
282
- <td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':'',row.f_is_print == 'true'?'background-color:#5ee9e0':''"><nobr>{{row.f_remakes}}</nobr></td>
283
-
284
- <!--<td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':''"><nobr>{{row.serviceacitivity[0].f_cost_manage}}</nobr></td>-->
285
- <!--<td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':''"><nobr>{{row.serviceacitivity[0].f_cost_material}}</nobr></td>-->
286
- <!--<td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':''"><nobr>{{row.serviceacitivity[0].f_money}}</nobr></td>-->
287
- <td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':'',row.f_is_print == 'true'?'background-color:#5ee9e0':''"><nobr>{{row.f_result_status}}</nobr></td>
288
- <!-- <td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':''"><nobr><div v-if="row.f_single_path"><button-link type="button" class="btn btn-link" @click="$parent.$parent.$parent.showpicture(row)" >抢修照片-->
289
- <!-- </button-link></div></nobr></td>-->
290
-
291
- <td style="text-align: center;" :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red;text-align: center;':'text-align: center;',row.f_is_print == 'true'?'background-color:#5ee9e0':''">
292
- <!--<div v-show="$parent.$parent.$parent.canRecall(row)">
293
- <button-link type="button" class="btn btn-link" @click="$parent.$parent.$parent.post(row, '工单撤回')">退回</button-link>
294
- </div>-->
295
- <button type="button" class="button_export button_spacing" style="float: right;margin-top: 8px" @click="$parent.$parent.$parent.print(row)" >打印</button>
296
- </td>
297
- </template>
298
- </data-grid>
299
- </criteria-paged>
300
- </div>
301
- <tel-msg v-if="showcheckmsg" :show="showcheckmsg" :data="checkInfo"></tel-msg>
302
- <!--打印-->
303
- <modal :show.sync="printshow" v-ref:modal backdrop="false">
304
- <header slot="modal-header" class="modal-header text-center">
305
- <h4 class="modal-title">打印列选择</h4>
306
- <input type="checkbox" class="" id="f_generations" v-model="all">
307
- <label for="f_generations" class="font-size">全选</label>
308
- </header>
309
- <article slot="modal-body">
310
- <div class="auto col-sm-11 col-md-offset-1" style="margin-top: 10px;">
311
- <div class="col-sm-3" v-for="f in fields">
312
- <input type="checkbox" class="" :id="'water-owe-details-'+$index" v-model="modelval" :value="$key">
313
- <label :for="'water-owe-details-'+$index" class="font-size">{{f}}</label>
314
- </div>
315
- </div>
316
- </article>
317
- <footer slot="modal-footer" class="modal-footer">
318
- <center>
319
- <button v-show="printshow" type="button" class="btn btn-default" @click='close()'>取消</button>
320
- <button v-show="printshow" type="button" class="btn btn-success" @click='print()'>打印</button>
321
- <print-table :model='model' v-show="false" v-ref:print
322
- :top='40' :left='60' :right='40' :bottom='60'
323
- :thead="thead" :tfoot='tfoot' :attach="yangsen"
324
- :fields="modelval">
325
- </print-table>
326
- </center>
327
- </footer>
328
- </modal>
329
- </div>
330
- <modal :show.sync="imgshow" v-ref:modal backdrop="true">
331
- <header slot="modal-header" class="modal-header">
332
- 在线抢修照片
333
- </header>
334
- <article slot="modal-body" class="modal-body">
335
- <div class="from-group">
336
- <img-self :src="imgfilename" width="500" height="500"></img-self>
337
- </div>
338
- </article>
339
- <footer slot="modal-footer" class="modal-footer">
340
- <button type="button" class="btn btn-success" @click='imgclose'>关闭</button>
341
- </footer>
342
- </modal>
343
- </template>
344
-
345
- <script>
346
- import { PagedList } from 'vue-client'
347
- import DelayReply from '../../components/pc/DelayReply'
348
- import defaultPrint from '../../components/pc/config/DefaultPrint'
349
- import { HttpResetClass } from 'vue-client'
350
- export default {
351
- title: '工单列表',
352
- data () {
353
- return {
354
- orgstrs:[{label: '全部', value: ''}],
355
- editflag: null,
356
- selectone: '',
357
- model: new PagedList('rs/sql/serviceDetails', 20),
358
- row: null,
359
- orderMan: '',
360
- curorgid: [this.$login.f.orgid],
361
- msgs: [],
362
- service: Object,
363
- pendingCount: 0,
364
- // 打印
365
- all: false,
366
- modelval: [],
367
- printshow: false,
368
- imgshow:false,
369
- imgfilename:'',
370
- fields: {},
371
- thead: '',
372
- showcheckmsg:false,
373
- checkInfo:{},
374
- tfoot: '',
375
- defectType:[],
376
- defectLeave:'',
377
- defectLeaveList:[{label:'全部',value:''},{label:'一级隐患',value:'一级隐患'},{label:'二级隐患',value:'二级隐患'},{label:'三级隐患',value:'三级隐患'}],
378
- zhihuans:[{label: '全部', value: ''},{label: '正常', value: '正常'},{label: '异常', value: '异常'}],
379
- headData: ["工单类型","工单编号","用户姓名","用户地址","用户电话","报修电话","报修时间","报修原因","维修人","隐患明细"],
380
- bodyData: ["f_workorder_type", "f_service_id","f_user_name","f_address","f_phone","f_contact_phone", "f_date", "f_remarks", "f_order_man","f_defect_content"],
381
- searchData:{
382
- condition: {
383
- condition1: " 1=1 ",
384
- condition2: "",
385
- condition3: "1=1",
386
- condition4: "f_filiale_id in " + this.f_filialeids + ""
387
- }
388
- },
389
- excelHeaders: {
390
- 'f_workorder_type': '工单类型',
391
- 'f_service_id': '工单编号',
392
- 'f_user_name': '用户姓名',
393
- 'f_address': '用户地址',
394
- 'f_contact_phone': '联系电话',
395
- //'f_contact_name': '联系人',
396
- 'f_single_man': '派单人',
397
- 'f_order_man': '接单人',
398
- 'defname': '工单状态',
399
- 'f_date_leave': '完成时间',
400
- 'f_remarks': '备注',
401
- 'f_defect_content': '隐患明细'
402
- },
403
- criteriaShow: false,
404
- regionChick:[{label:'全部',value:''},{label:'市区',value:'市区'},{label:'好运角区',value:'好运角区'}], //区域选择列表
405
- customerTypeChick:[{label:'民用',value:'民用'},{label:'非民用',value:'非民用'}], //用户类型选择列表
406
- regionModel:'', //区域绑定值
407
- smallRegionModel:'',//小区域绑定值
408
- customerTypeModel:'民用' //用户类型绑定值
409
-
410
- }
411
- },
412
- props: {
413
- user: {
414
- type: Object
415
- },
416
- sum:0,
417
- maintenance: [],
418
- // serviceId : [String, Number]
419
- serviceId: '',
420
- // 工单状态 工单位置
421
- defname: {
422
- type: String
423
- },
424
- systemshow:{
425
- type:Boolean,
426
- default:false
427
- }
428
- },
429
- ready () {
430
- this.f_filialeids = `('${this.$login.f.orgid}')`
431
- this.getfengongsi()
432
- // //tag
433
- // //tag
434
- // //tag)
435
- // this.getRes(this.$login.f.orgid)
436
- //this.selfSearch()
437
- },
438
- watch: {
439
- 'all' (val) {
440
- if (val) {
441
- this.modelval = this.bodyData
442
- } else {
443
- this.modelval = defaultPrint.config
444
- this.put()
445
- }
446
- },
447
- 'modelval.length' () {
448
- this.put()
449
- },
450
- 'serviceId' () {
451
- this.selfSearch()
452
- },
453
- 'sum' (val) {
454
- this.selfSearch()
455
- //this.model.search()
456
- }
457
- },
458
- methods: {
459
- showpicture(val){
460
- //tag
461
- //tag)
462
- this.imgshow=true
463
- this.imgfilename='rs/image/file/'+val.f_single_path
464
- },
465
- imgclose(){
466
- this.imgshow=false
467
- },
468
- yccolor(val){
469
- if(val == '异常'){
470
- return 'color:red'
471
- }
472
- return ''
473
- },
474
- // 县域分公司发生改变
475
- orgstrchange(val){
476
- if(val == undefined || val == ''){
477
- return
478
- }
479
- },
480
- // 获取县域分公司内容
481
- getfengongsi(){
482
- let val = {source: 'this.getParentByType($organization$).getSpecialResByType($organization$)', userid: `${this.$login.f.id}`}
483
- let http = new HttpResetClass()
484
- http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
485
- res.data.forEach((item) => {
486
- this.orgstrs.push({label: item.name, value: item.id})
487
- })
488
- //tag
489
- })
490
- },
491
- proc (selectone, type) {
492
- this.editflag = type
493
- this.selectone = selectone
494
- },
495
- /*search(args) {
496
- let data = {}
497
- data.condition1 = this.$refs.paged.$refs.criteria.condition?this.$refs.paged.$refs.criteria.condition: `1=1`
498
- // 获取自定义拼接条件
499
-
500
- if(this.defectType.length>0){
501
- data.condition1 += ` and (`
502
- for(let sqlstr=0;sqlstr<this.defectType.length;sqlstr++){
503
- //tag
504
- //tag
505
- data.condition1 += ` failure like '%${this.defectType[sqlstr]}%'`
506
- if(sqlstr<this.defectType.length-1){
507
- data.condition1 +=' or'
508
- }
509
- }
510
- data.condition1 += ` )`
511
- }else if(this.defectLeave.toString().trim()){
512
- this.$showMessage('请选择隐患类型在进行搜索!')
513
- return
514
- }
515
- // and f_street = ${this.regionModel} and f_small_area like '%${this.smallRegionModel}%' and f_user_type=${this.customerTypeModel}
516
- // 拼接条件区域
517
- let splicingCondition = '';
518
- splicingCondition+=this.regionModel==''?'':' '+`and f_street = '${this.regionModel}'` //区域
519
- splicingCondition+=this.smallRegionModel.trim()==''?'':' '+`+and f_small_area like '%${this.smallRegionModel}%'` //小区域
520
- splicingCondition+=this.customerTypeModel==''?'':' '+`and f_user_type = '${this.customerTypeModel}'`
521
- data.condition1 +=splicingCondition;
522
-
523
- data.condition2 = this.getCondition2()
524
- data.condition3 = this.$refs.paged.$refs.criteria.model.defname ? `processins.activities[ state='开始活动' and defname = '${this.$refs.paged.$refs.criteria.model.defname}'].count(*) > 0`:'1=1'
525
- data.condition4 = `f_filiale_id in ${this.f_filialeids}`
526
- this.searchData.condition = data
527
- this.searchData = Object.assign(this.searchData, args.model)
528
- return this.model.search(data, args.model)
529
- },*/
530
- search (args) {
531
-
532
- if (this.f_filialeids) {
533
- args.condition += ` and f_filiale_id in ${this.f_filialeids}`
534
- } else {
535
- args.condition += ` and f_filiale_id = '${this.$login.f.orgid}'`
536
- }
537
- if(this.defectType.length>0){
538
- args.condition += ` and (`
539
- for(let sqlstr=0;sqlstr<this.defectType.length;sqlstr++){
540
- //tag
541
- //tag
542
- args.condition += ` failure like '%${this.defectType[sqlstr]}%'`
543
- if(sqlstr<this.defectType.length-1){
544
- args.condition +=' or'
545
- }
546
- }
547
- args.condition += ` )`
548
- }else if(this.defectLeave.toString().trim()){
549
- this.$showMessage('请选择隐患类型在进行搜索!')
550
- return
551
- }
552
- this.searchData.condition = args.condition
553
- return this.model.search(args.condition, args.model)
554
- },
555
- selfSearch () {
556
- // 取消编辑状态
557
- this.editflag = null
558
- let data = {}
559
- data.condition1 = `1=1`
560
- data.condition2 = ''
561
- data.condition3 = '1=1'
562
- data.condition4 = `f_filiale_id in ${this.f_filialeids}`
563
- return this.model.search(data)
564
- },
565
- // getCondition2(){
566
- // let String = ''
567
- // let workCt = ''
568
- // if(this.$refs.paged.$refs.criteria.model.f_date){
569
- // workCt = `f_date > '${this.$refs.paged.$refs.criteria.model.f_date}'`
570
- // }
571
- // if(this.$refs.paged.$refs.criteria.model.f_enddate){
572
- // if( workCt == ''){
573
- // workCt = `f_date < '${this.$refs.paged.$refs.criteria.model.f_enddate}'`
574
- // }else{
575
- // workCt += `and f_date < '${this.$refs.paged.$refs.criteria.model.f_enddate}'`
576
- // }
577
- // }
578
- // if(this.$refs.paged.$refs.criteria.model.f_status && this.$refs.paged.$refs.criteria.model.f_status == '异常'){
579
- // workCt += workCt ? " and f_is_abnormal = '异常'" : "f_is_abnormal = '异常'"
580
- // }else if(this.$refs.paged.$refs.criteria.model.f_status && this.$refs.paged.$refs.criteria.model.f_status == '正常') {
581
- // workCt += workCt ? " and f_is_abnormal = null" : "f_is_abnormal = null"
582
- // }
583
- //
584
- // String = workCt ? `[serviceacitivity[t_servicework: ${workCt}].count(*)>0]`:''
585
- // return String
586
- // },
587
- // 发送数据给业务逻辑,并刷新界面
588
- post (row, logic) {
589
- // 调取工单撤回操作
590
- let data = {model: row, loginUser: {name: this.$login.f.name, ename: this.$login.f.ename}}
591
-
592
- this.$showMessage(logic+row.f_service_id+'工单', ['confirm', 'cancel']).then((res) => {
593
- if (res === 'confirm') {
594
- this.$resetpost(`rs/logic/${logic}`, data).then(() => {
595
- // 刷新界面
596
- this.selfSearch()
597
- })
598
- }
599
- })
600
- },
601
- // 是否可以退回
602
- canRecall(row) {
603
- let result =
604
- row.processins.activities[0].defname === '维修完成'
605
- return result
606
- },
607
- trouble(row){
608
- if(!row){
609
- return
610
- }
611
- let data = ''
612
- let failure = JSON.parse(row)
613
- failure.forEach((val)=>{
614
- data+=val.f_failure_type+" "
615
- })
616
- return data
617
- },
618
- // 打印
619
- stamp () {
620
- this.all = false
621
- // 默认选择要打印的列
622
- this.modelval = defaultPrint.config
623
- this.fields = this.getfield
624
- this.printshow = true
625
- this.put()
626
- },
627
- put () {
628
- // 对Modelval进行排序
629
- this.sortModelval()
630
- this.thead = `<tr><th colspan=${this.modelval.length}>工单详情报表</th></tr><tr>`
631
- for (let key of this.modelval) {
632
- this.thead += '<th>' + this.fields[key] + '</th>'
633
- }
634
- this.thead += '</tr>'
635
- },
636
- /*print () {
637
- this.$refs.print.PrintAsFile()
638
- this.printshow = false
639
- },*/
640
- print(row) {
641
- this.checkInfo = row
642
- //tag)
643
- this.showcheckmsg = true
644
- },
645
- close () {
646
- this.printshow = false
647
- this.all = false
648
- },
649
- // 对选择的列进行排序
650
- sortModelval () {
651
- let sortModel = []
652
- Object.keys(this.fields).forEach((key) => {
653
- if (this.modelval.includes(key)) {
654
- sortModel.push(key)
655
- }
656
- })
657
- this.modelval = sortModel
658
- },
659
- hidden(){
660
- this.criteriaShow = !this.criteriaShow
661
- },
662
- getRes(obj){
663
- //tag
664
- //tag)
665
- this.f_filialeids = this.$login.convertToIn(obj.resids);
666
- //tag
667
- }
668
- },
669
- computed: {
670
- searchData() {
671
- return {condition: this.model.condition}
672
- },
673
- getdefectType(){
674
- this.defectType=[]
675
- return [ ... this.$appdata.getParam(this.defectLeave)]
676
- },
677
- defnames () {
678
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('呼叫工单状态')]
679
- },
680
- repairstypes () {
681
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('报修全部类型')]
682
- },
683
- serviceorders () {
684
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('工单类型')]
685
- },
686
- sources () {
687
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('工单来源')]
688
- },
689
- getfield(){
690
- let data = {}
691
- this.bodyData.forEach((value, index)=>{
692
- data[this.bodyData[index]] = this.headData[index]
693
- })
694
- return data
695
- }
696
- },
697
- components: {
698
- 'delay-reply': DelayReply
699
- }
700
- }
701
- </script>
1
+ <template >
2
+ <div id="stand-work-list" class="flex bg-white p-10">
3
+ <div class="span">
4
+ <criteria-paged :model="model" v-ref:paged>
5
+ <criteria partial='criteria' v-ref:criteria @condition-changed='$parent.search'>
6
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
+ <div class="row">
8
+ <!--<div class="col-sm-3 form-group form-input-group" style="width: 20%">
9
+ <label class="font_normal_body" style="width: 40%">工单编号</label>
10
+ <input type="text" class="input_search" v-model="model.f_service_id" placeholder='工单编号'
11
+ condition="f_service_id like '%{}%'"
12
+ :size="model.f_service_id ? model.f_service_id.length : 6">
13
+ </div>
14
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
15
+ <label class="font_normal_body" style="width: 40%">工单类型</label>
16
+ <v-select :value.sync="model.f_workorder_type" :value-single="true" v-model="model.f_workorder_type"
17
+ :options='$parent.$parent.serviceorders' placeholder='工单类型'
18
+ condition="f_workorder_type like '%{}%'"
19
+ close-on-select>
20
+ </v-select>
21
+ </div>-->
22
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%;">
23
+ <label class="font_normal_body" style="width: 40%">客户姓名</label>
24
+ <input type="text" class="input_search" v-model="model.f_user_name" placeholder='客户姓名'
25
+ condition="tswo.f_user_name like '%{}%'"
26
+ :size="model.f_user_name ? model.f_user_name.length : 6">
27
+ </div>
28
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
29
+ <label class="font_normal_body" style="width: 40%">客户编号</label>
30
+ <input type="text" class="input_search" v-model="model.f_userinfo_code" placeholder='客户编号'
31
+ condition="tswo.f_userinfo_code like '%{}%'"
32
+ :size="model.f_userinfo_code ? model.f_userinfo_code.length : 6">
33
+ </div>
34
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
35
+ <label class="font_normal_body" style="width: 40%">地址</label>
36
+ <input type="text" class="input_search" v-model="model.f_address" placeholder='地址'
37
+ condition="tswo.f_address like '%{}%'"
38
+ :size="model.f_address ? model.f_address.length : 4">
39
+ </div>
40
+ <div class="col-sm-4" style="float: right" >
41
+ <div style="float: right; margin-top: 8px" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
42
+ <div style="float: right;margin-top: 8px;margin-left: 2%">
43
+ <export-excel-tel
44
+ :data="$parent.$parent.searchData"
45
+ :field="$parent.$parent.excelHeaders"
46
+ sqlurl="rs/logic/telephoneExport" sql-name="serviceDetails" template-name='工单详情导出'
47
+ :choose-col="true">
48
+ </export-excel-tel>
49
+ </div>
50
+ <button class="button_search button_spacing" style="float: right;margin-top: 8px" @click="search(),$dispatch('search')">查询</button>
51
+ </div>
52
+ </div>
53
+ <div class="row" v-show="$parent.$parent.criteriaShow">
54
+
55
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
56
+ <label class="font_normal_body" style="width: 40%">派单时间</label>
57
+ <datepicker placeholder="起始派单时间"
58
+ :value.sync="model.f_created_date"
59
+ v-model="model.f_created_date"
60
+ :format="'yyyy-MM-dd 00:00:00'"
61
+ condition="tsw.f_date > '{}'"
62
+ ></datepicker>
63
+ </div>
64
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
65
+ <label class="font_normal_body" style="width: 40%">派单时间</label>
66
+ <datepicker placeholder="终止派单时间"
67
+ :value.sync="model.f_created_enddate"
68
+ v-model="model.f_created_enddate"
69
+ :format="'yyyy-MM-dd 23:59:59'"
70
+ condition="tsw.f_date < '{}'"
71
+ ></datepicker>
72
+ </div>
73
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
74
+ <label class="font_normal_body" style="width: 40%">&nbsp;&nbsp;&nbsp;公司</label>
75
+ <right-tree @re-res="$parent.$parent.getRes" :initresid='$parent.$parent.curorgid'>
76
+ </right-tree>
77
+ </div>
78
+
79
+ <!--<div class="col-sm-3 form-group form-input-group" style="width: 20%">
80
+ <label class="font_normal_body" style="width: 40%">来电电话</label>
81
+ <input type="text" class="input_search" v-model="model.f_phone" placeholder='来电电话'
82
+ condition="f_phone like '%{}%'"
83
+ :size="model.f_phone ? model.f_phone.length : 6">
84
+ </div>
85
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
86
+ <label class="font_normal_body" style="width: 40%">联系电话</label>
87
+ <input type="text" class="input_search" v-model="model.f_contact_phone" placeholder='联系电话'
88
+ condition="f_contact_phone like '%{}%'"
89
+ :size="model.f_contact_phone ? model.f_contact_phone.length : 6">
90
+ </div>-->
91
+ </div>
92
+ <div class="row" v-show="$parent.$parent.criteriaShow">
93
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
94
+ <label class="font_normal_body" style="width: 40%">工单状态</label>
95
+ <v-select :value.sync="model.defname" v-model='model.defname'
96
+ :value-single="true"
97
+ :options='$parent.$parent.defnames' placeholder='工单状态'
98
+ condition="sa.defname = '{}'"
99
+ close-on-select></v-select>
100
+ </div>
101
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
102
+ <label class="font_normal_body" style="width: 40%">隐患级别</label>
103
+ <v-select :value.sync="$parent.$parent.defectLeave" v-model='$parent.$parent.defectLeave'
104
+ :options='$parent.$parent.defectLeaveList' placeholder='工单状态'
105
+ close-on-select></v-select>
106
+ </div>
107
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
108
+ <label class="font_normal_body" style="width: 40%">隐患类型</label>
109
+ <!--<v-select :value.sync="$parent.$parent.defectType" v-model='$parent.$parent.defectType'
110
+ :multiple="true"
111
+ :options='$parent.$parent.getdefectType' placeholder='工单状态' ></v-select>-->
112
+ <v-select
113
+ :value.sync="$parent.$parent.defectType"
114
+ v-model="$parent.$parent.defectType"
115
+ :options='$parent.$parent.getdefectType'
116
+ placeholder='隐患类型'
117
+ condition="f_street = '{}'"
118
+ :multiple="true">
119
+ </v-select>
120
+ </div>
121
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
122
+ <label class="font_normal_body" style="width: 40%">区域</label>
123
+ <v-select
124
+ :value.sync="model.regionModel"
125
+ v-model="model.regionModel"
126
+ :options='$parent.$parent.regionChick'
127
+ placeholder='请选择区域'
128
+ condition="tswo.f_street = '{}'"
129
+ close-on-select>
130
+ </v-select>
131
+ </div>
132
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
133
+ <label class="font_normal_body" style="width: 40%">&nbsp;&nbsp;小区域 </label>
134
+ <input type="text" class="input_search" v-model="model.smallRegionModel" placeholder='请输入小区域'
135
+ condition="tswo.f_small_area like '%{}%'" style="width: 60%;">
136
+ </div>
137
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
138
+ <label class="font_normal_body" style="width: 40%">用户类型</label>
139
+ <v-select
140
+ :value.sync="model.customerTypeModel"
141
+ v-model="model.customerTypeModel"
142
+ :options='$parent.$parent.customerTypeChick'
143
+ placeholder='用户类型'
144
+ condition="tswo.f_user_type = '{}'"
145
+ close-on-select>
146
+ </v-select>
147
+ </div>
148
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
149
+ <label class="font_normal_body" style="width: 40%">离开时间</label>
150
+ <datepicker placeholder="离开时间开始"
151
+ :value.sync="model.f_date_leave"
152
+ v-model="model.f_date_leave"
153
+ :format="'yyyy-MM-dd 00:00:00'"
154
+ condition="tsw.f_date > '{}'"
155
+ ></datepicker>
156
+ </div>
157
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
158
+ <label class="font_normal_body" style="width: 40%">离开时间</label>
159
+ <datepicker placeholder="离开时间结束"
160
+ :value.sync="model.f_enddate_leave"
161
+ v-model="model.f_enddate_leave"
162
+ :format="'yyyy-MM-dd 23:59:59'"
163
+ condition="tsw.f_date < '{}'"
164
+ ></datepicker>
165
+ </div>
166
+ </div>
167
+
168
+
169
+ <!-- <div class="row" v-show="$parent.$parent.criteriaShow">
170
+
171
+ &lt;!&ndash;<div class="col-sm-3 form-group form-input-group" style="width: 20%">
172
+ <label class="font_normal_body" style="width: 40%">接单站点</label>
173
+ <input type="text" class="input_search" v-model="model.f_outlets" placeholder='接单站点'
174
+ condition="f_outlets like '%{}%'"
175
+ :size="model.f_outlets ? model.f_outlets.length : 6">
176
+ </div>
177
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
178
+ <label class="font_normal_body" style="width: 40%">完成时间</label>
179
+ <datepicker placeholder="维修完成时间"
180
+ :value.sync="model.f_date"
181
+ v-model="model.f_date"
182
+ :format="'yyyy-MM-dd HH:mm:ss'"
183
+ ></datepicker>
184
+ </div>
185
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
186
+ <label class="font_normal_body" style="width: 40%">完成时间</label>
187
+ <datepicker placeholder="维修完成时间"
188
+ :value.sync="model.f_enddate"
189
+ v-model="model.f_enddate"
190
+ :format="'yyyy-MM-dd HH:mm:ss'"
191
+ ></datepicker>
192
+ </div>
193
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
194
+ <label class="font_normal_body" style="width: 40%">话务员</label>
195
+ <input type="text" class="input_search" v-model="model.f_attendant" placeholder='话务员'
196
+ condition="f_attendant like '%{}%'"
197
+ :size="model.f_attendant ? model.f_attendant.length : 6">
198
+ </div>
199
+ </div>
200
+ <div class="row" v-show="$parent.$parent.criteriaShow">
201
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
202
+ <label class="font_normal_body" style="width: 40%">接单员</label>
203
+ <input type="text" class="input_search" v-model="model.f_order_man" placeholder='接单员'
204
+ condition="f_order_man like '%{}%'"
205
+ :size="model.f_order_man ? model.f_order_man.length : 6">
206
+ </div>
207
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
208
+ <label class="font_normal_body" style="width: 40%">工单来源</label>
209
+ <v-select :value.sync="model.f_source" v-model='model.f_source'
210
+ :value-single="true"
211
+ :options='$parent.$parent.sources' placeholder='工单来源'
212
+ close-on-select
213
+ condition="f_source = '{}'"></v-select>
214
+ </div>&ndash;&gt;
215
+
216
+ &lt;!&ndash;<div class="col-sm-3 form-group form-input-group" style="width: 20%">
217
+ <label class="font_normal_body" style="width: 40%">置换状态</label>
218
+ <v-select :value.sync="model.f_status" v-model='model.f_status'
219
+ :value-single="true"
220
+ :options='$parent.$parent.zhihuans' placeholder='置换状态'
221
+ close-on-select
222
+ ></v-select>
223
+ </div>
224
+ <div class="col-sm-3 form-group form-input-group" style="width: 20%">
225
+ <label class="font_normal_body" style="width: 40%">地址编号</label>
226
+ <input type="text" class="input_search" v-model="model.f_addressid" placeholder='地址id'
227
+ condition="f_addressid like '%{}%'"
228
+ :size="model.f_addressid ? model.f_addressid.length : 6">
229
+ </div>&ndash;&gt;
230
+ </div>
231
+ -->
232
+ </div>
233
+ </criteria>
234
+
235
+ <data-grid partial='list' v-ref:grid :model="model" class="list_area table_sy">
236
+ <template partial='head'>
237
+ <tr>
238
+ <th><nobr>序号</nobr></th>
239
+ <th><nobr>工单类型</nobr></th>
240
+ <!--<th><nobr>报修类型</nobr></th>-->
241
+ <th><nobr>工单编号</nobr></th>
242
+ <th><nobr>派单时间</nobr></th>
243
+ <th><nobr>客户信息</nobr></th>
244
+ <th><nobr>联系电话</nobr></th>
245
+ <th><nobr>工单状态</nobr></th>
246
+ <th><nobr>派单人</nobr></th>
247
+ <!--<th><nobr>话务员</nobr></th>-->
248
+ <th><nobr>接单员</nobr></th>
249
+ <th><nobr>上传时间</nobr></th>
250
+ <th><nobr>到达时间</nobr></th>
251
+ <th><nobr>离开时间</nobr></th>
252
+ <th><nobr>故障明细</nobr></th>
253
+ <th><nobr>备注</nobr></th>
254
+ <!--<th><nobr>管理改造费用</nobr></th>-->
255
+ <!--<th><nobr>材料改造费用</nobr></th>-->
256
+ <!--<th><nobr>费用</nobr></th>-->
257
+ <th><nobr>工单结果</nobr></th>
258
+ <!-- <th><nobr>抢修照片</nobr></th>-->
259
+
260
+ <th><nobr>操作</nobr></th>
261
+ </tr>
262
+ </template>
263
+ <template partial='body'>
264
+ <td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':'',row.f_is_print == 'true'?'background-color:#5ee9e0':''"><nobr>{{$index + 1}}</nobr></td>
265
+ <td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':'',row.f_is_print == 'true'?'background-color:#5ee9e0':''"><nobr>{{row.f_workorder_type}}</nobr></td>
266
+ <!--<td><nobr>{{row.f_repairtype}}</nobr></td>-->
267
+ <td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':'',row.f_is_print == 'true'?'background-color:#5ee9e0':''"><nobr>{{row.f_service_id}}</nobr></td>
268
+ <td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':'',row.f_is_print == 'true'?'background-color:#5ee9e0':''"><nobr>{{row.f_created_date}}</nobr></td>
269
+ <td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':'',row.f_is_print == 'true'?'background-color:#5ee9e0':''"><nobr>{{row.f_user_name}}&nbsp;&nbsp;&nbsp;{{row.f_address}}&nbsp;&nbsp;&nbsp;{{row.f_contact_name}}</nobr></td>
270
+ <td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':'',row.f_is_print == 'true'?'background-color:#5ee9e0':''"><nobr>{{row.f_contact_phone}}</nobr></td>
271
+ <td style="text-align: center;" :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red;text-align: center;':'text-align: center;',row.f_is_print == 'true'?'background-color:#5ee9e0':''">
272
+ <nobr>{{ row.defname ? row.defname:'完成'}}</nobr>
273
+ </td>
274
+ <td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':'',row.f_is_print == 'true'?'background-color:#5ee9e0':''"><nobr>{{row.f_single_man}}</nobr></td>
275
+ <!--<td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':''"><nobr>{{row.f_attendant}}</nobr></td>-->
276
+ <td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':'',row.f_is_print == 'true'?'background-color:#5ee9e0':''"><nobr>{{row.f_order_man}} {{row.f_repairman_phone}}</nobr></td>
277
+ <td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':'',row.f_is_print == 'true'?'background-color:#5ee9e0':''"><nobr>{{row.f_date}}</nobr></td>
278
+ <td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':'',row.f_is_print == 'true'?'background-color:#5ee9e0':''"><nobr>{{row.f_date_come}}</nobr></td>
279
+ <td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':'',row.f_is_print == 'true'?'background-color:#5ee9e0':''"><nobr>{{row.f_date_leave}}</nobr></td>
280
+
281
+ <td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':'',row.f_is_print == 'true'?'background-color:#5ee9e0':''"><nobr>{{$parent.$parent.$parent.trouble(row.failure)}}</nobr></td>
282
+ <td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':'',row.f_is_print == 'true'?'background-color:#5ee9e0':''"><nobr>{{row.f_remakes}}</nobr></td>
283
+
284
+ <!--<td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':''"><nobr>{{row.serviceacitivity[0].f_cost_manage}}</nobr></td>-->
285
+ <!--<td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':''"><nobr>{{row.serviceacitivity[0].f_cost_material}}</nobr></td>-->
286
+ <!--<td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':''"><nobr>{{row.serviceacitivity[0].f_money}}</nobr></td>-->
287
+ <td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':'',row.f_is_print == 'true'?'background-color:#5ee9e0':''"><nobr>{{row.f_result_status}}</nobr></td>
288
+ <!-- <td :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red':''"><nobr><div v-if="row.f_single_path"><button-link type="button" class="btn btn-link" @click="$parent.$parent.$parent.showpicture(row)" >抢修照片-->
289
+ <!-- </button-link></div></nobr></td>-->
290
+
291
+ <td style="text-align: center;" :style="row.serviceacitivity && row.serviceacitivity[0].f_is_abnormal == '异常'?'color:red;text-align: center;':'text-align: center;',row.f_is_print == 'true'?'background-color:#5ee9e0':''">
292
+ <!--<div v-show="$parent.$parent.$parent.canRecall(row)">
293
+ <button-link type="button" class="btn btn-link" @click="$parent.$parent.$parent.post(row, '工单撤回')">退回</button-link>
294
+ </div>-->
295
+ <button type="button" class="button_export button_spacing" style="float: right;margin-top: 8px" @click="$parent.$parent.$parent.print(row)" >打印</button>
296
+ </td>
297
+ </template>
298
+ </data-grid>
299
+ </criteria-paged>
300
+ </div>
301
+ <tel-msg v-if="showcheckmsg" :show="showcheckmsg" :data="checkInfo"></tel-msg>
302
+ <!--打印-->
303
+ <modal :show.sync="printshow" v-ref:modal backdrop="false">
304
+ <header slot="modal-header" class="modal-header text-center">
305
+ <h4 class="modal-title">打印列选择</h4>
306
+ <input type="checkbox" class="" id="f_generations" v-model="all">
307
+ <label for="f_generations" class="font-size">全选</label>
308
+ </header>
309
+ <article slot="modal-body">
310
+ <div class="auto col-sm-11 col-md-offset-1" style="margin-top: 10px;">
311
+ <div class="col-sm-3" v-for="f in fields">
312
+ <input type="checkbox" class="" :id="'water-owe-details-'+$index" v-model="modelval" :value="$key">
313
+ <label :for="'water-owe-details-'+$index" class="font-size">{{f}}</label>
314
+ </div>
315
+ </div>
316
+ </article>
317
+ <footer slot="modal-footer" class="modal-footer">
318
+ <center>
319
+ <button v-show="printshow" type="button" class="btn btn-default" @click='close()'>取消</button>
320
+ <button v-show="printshow" type="button" class="btn btn-success" @click='print()'>打印</button>
321
+ <print-table :model='model' v-show="false" v-ref:print
322
+ :top='40' :left='60' :right='40' :bottom='60'
323
+ :thead="thead" :tfoot='tfoot' :attach="yangsen"
324
+ :fields="modelval">
325
+ </print-table>
326
+ </center>
327
+ </footer>
328
+ </modal>
329
+ </div>
330
+ <modal :show.sync="imgshow" v-ref:modal backdrop="true">
331
+ <header slot="modal-header" class="modal-header">
332
+ 在线抢修照片
333
+ </header>
334
+ <article slot="modal-body" class="modal-body">
335
+ <div class="from-group">
336
+ <img-self :src="imgfilename" width="500" height="500"></img-self>
337
+ </div>
338
+ </article>
339
+ <footer slot="modal-footer" class="modal-footer">
340
+ <button type="button" class="btn btn-success" @click='imgclose'>关闭</button>
341
+ </footer>
342
+ </modal>
343
+ </template>
344
+
345
+ <script>
346
+ import { PagedList } from 'vue-client'
347
+ import DelayReply from '../../components/pc/DelayReply'
348
+ import defaultPrint from '../../components/pc/config/DefaultPrint'
349
+ import { HttpResetClass } from 'vue-client'
350
+ export default {
351
+ title: '工单列表',
352
+ data () {
353
+ return {
354
+ orgstrs:[{label: '全部', value: ''}],
355
+ editflag: null,
356
+ selectone: '',
357
+ model: new PagedList('rs/sql/serviceDetails', 20),
358
+ row: null,
359
+ orderMan: '',
360
+ curorgid: [this.$login.f.orgid],
361
+ msgs: [],
362
+ service: Object,
363
+ pendingCount: 0,
364
+ // 打印
365
+ all: false,
366
+ modelval: [],
367
+ printshow: false,
368
+ imgshow:false,
369
+ imgfilename:'',
370
+ fields: {},
371
+ thead: '',
372
+ showcheckmsg:false,
373
+ checkInfo:{},
374
+ tfoot: '',
375
+ defectType:[],
376
+ defectLeave:'',
377
+ defectLeaveList:[{label:'全部',value:''},{label:'一级隐患',value:'一级隐患'},{label:'二级隐患',value:'二级隐患'},{label:'三级隐患',value:'三级隐患'}],
378
+ zhihuans:[{label: '全部', value: ''},{label: '正常', value: '正常'},{label: '异常', value: '异常'}],
379
+ headData: ["工单类型","工单编号","用户姓名","用户地址","用户电话","报修电话","报修时间","报修原因","维修人","隐患明细"],
380
+ bodyData: ["f_workorder_type", "f_service_id","f_user_name","f_address","f_phone","f_contact_phone", "f_date", "f_remarks", "f_order_man","f_defect_content"],
381
+ searchData:{
382
+ condition: {
383
+ condition1: " 1=1 ",
384
+ condition2: "",
385
+ condition3: "1=1",
386
+ condition4: "f_filiale_id in " + this.f_filialeids + ""
387
+ }
388
+ },
389
+ excelHeaders: {
390
+ 'f_workorder_type': '工单类型',
391
+ 'f_service_id': '工单编号',
392
+ 'f_user_name': '用户姓名',
393
+ 'f_address': '用户地址',
394
+ 'f_contact_phone': '联系电话',
395
+ //'f_contact_name': '联系人',
396
+ 'f_single_man': '派单人',
397
+ 'f_order_man': '接单人',
398
+ 'defname': '工单状态',
399
+ 'f_date_leave': '完成时间',
400
+ 'f_remarks': '备注',
401
+ 'f_defect_content': '隐患明细'
402
+ },
403
+ criteriaShow: false,
404
+ regionChick:[{label:'全部',value:''},{label:'市区',value:'市区'},{label:'好运角区',value:'好运角区'}], //区域选择列表
405
+ customerTypeChick:[{label:'民用',value:'民用'},{label:'非民用',value:'非民用'}], //用户类型选择列表
406
+ regionModel:'', //区域绑定值
407
+ smallRegionModel:'',//小区域绑定值
408
+ customerTypeModel:'民用' //用户类型绑定值
409
+
410
+ }
411
+ },
412
+ props: {
413
+ user: {
414
+ type: Object
415
+ },
416
+ sum:0,
417
+ maintenance: [],
418
+ // serviceId : [String, Number]
419
+ serviceId: '',
420
+ // 工单状态 工单位置
421
+ defname: {
422
+ type: String
423
+ },
424
+ systemshow:{
425
+ type:Boolean,
426
+ default:false
427
+ }
428
+ },
429
+ ready () {
430
+ this.f_filialeids = `('${this.$login.f.orgid}')`
431
+ this.getfengongsi()
432
+ // //tag
433
+ // //tag
434
+ // //tag)
435
+ // this.getRes(this.$login.f.orgid)
436
+ //this.selfSearch()
437
+ },
438
+ watch: {
439
+ 'all' (val) {
440
+ if (val) {
441
+ this.modelval = this.bodyData
442
+ } else {
443
+ this.modelval = defaultPrint.config
444
+ this.put()
445
+ }
446
+ },
447
+ 'modelval.length' () {
448
+ this.put()
449
+ },
450
+ 'serviceId' () {
451
+ this.selfSearch()
452
+ },
453
+ 'sum' (val) {
454
+ this.selfSearch()
455
+ //this.model.search()
456
+ }
457
+ },
458
+ methods: {
459
+ showpicture(val){
460
+ //tag
461
+ //tag)
462
+ this.imgshow=true
463
+ this.imgfilename='rs/image/file/'+val.f_single_path
464
+ },
465
+ imgclose(){
466
+ this.imgshow=false
467
+ },
468
+ yccolor(val){
469
+ if(val == '异常'){
470
+ return 'color:red'
471
+ }
472
+ return ''
473
+ },
474
+ // 县域分公司发生改变
475
+ orgstrchange(val){
476
+ if(val == undefined || val == ''){
477
+ return
478
+ }
479
+ },
480
+ // 获取县域分公司内容
481
+ getfengongsi(){
482
+ let val = {source: 'this.getParentByType($organization$).getSpecialResByType($organization$)', userid: `${this.$login.f.id}`}
483
+ let http = new HttpResetClass()
484
+ http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
485
+ res.data.forEach((item) => {
486
+ this.orgstrs.push({label: item.name, value: item.id})
487
+ })
488
+ //tag
489
+ })
490
+ },
491
+ proc (selectone, type) {
492
+ this.editflag = type
493
+ this.selectone = selectone
494
+ },
495
+ /*search(args) {
496
+ let data = {}
497
+ data.condition1 = this.$refs.paged.$refs.criteria.condition?this.$refs.paged.$refs.criteria.condition: `1=1`
498
+ // 获取自定义拼接条件
499
+
500
+ if(this.defectType.length>0){
501
+ data.condition1 += ` and (`
502
+ for(let sqlstr=0;sqlstr<this.defectType.length;sqlstr++){
503
+ //tag
504
+ //tag
505
+ data.condition1 += ` failure like '%${this.defectType[sqlstr]}%'`
506
+ if(sqlstr<this.defectType.length-1){
507
+ data.condition1 +=' or'
508
+ }
509
+ }
510
+ data.condition1 += ` )`
511
+ }else if(this.defectLeave.toString().trim()){
512
+ this.$showMessage('请选择隐患类型在进行搜索!')
513
+ return
514
+ }
515
+ // and f_street = ${this.regionModel} and f_small_area like '%${this.smallRegionModel}%' and f_user_type=${this.customerTypeModel}
516
+ // 拼接条件区域
517
+ let splicingCondition = '';
518
+ splicingCondition+=this.regionModel==''?'':' '+`and f_street = '${this.regionModel}'` //区域
519
+ splicingCondition+=this.smallRegionModel.trim()==''?'':' '+`+and f_small_area like '%${this.smallRegionModel}%'` //小区域
520
+ splicingCondition+=this.customerTypeModel==''?'':' '+`and f_user_type = '${this.customerTypeModel}'`
521
+ data.condition1 +=splicingCondition;
522
+
523
+ data.condition2 = this.getCondition2()
524
+ data.condition3 = this.$refs.paged.$refs.criteria.model.defname ? `processins.activities[ state='开始活动' and defname = '${this.$refs.paged.$refs.criteria.model.defname}'].count(*) > 0`:'1=1'
525
+ data.condition4 = `f_filiale_id in ${this.f_filialeids}`
526
+ this.searchData.condition = data
527
+ this.searchData = Object.assign(this.searchData, args.model)
528
+ return this.model.search(data, args.model)
529
+ },*/
530
+ search (args) {
531
+
532
+ if (this.f_filialeids) {
533
+ args.condition += ` and f_filiale_id in ${this.f_filialeids}`
534
+ } else {
535
+ args.condition += ` and f_filiale_id = '${this.$login.f.orgid}'`
536
+ }
537
+ if(this.defectType.length>0){
538
+ args.condition += ` and (`
539
+ for(let sqlstr=0;sqlstr<this.defectType.length;sqlstr++){
540
+ //tag
541
+ //tag
542
+ args.condition += ` failure like '%${this.defectType[sqlstr]}%'`
543
+ if(sqlstr<this.defectType.length-1){
544
+ args.condition +=' or'
545
+ }
546
+ }
547
+ args.condition += ` )`
548
+ }else if(this.defectLeave.toString().trim()){
549
+ this.$showMessage('请选择隐患类型在进行搜索!')
550
+ return
551
+ }
552
+ this.searchData.condition = args.condition
553
+ return this.model.search(args.condition, args.model)
554
+ },
555
+ selfSearch () {
556
+ // 取消编辑状态
557
+ this.editflag = null
558
+ let data = {}
559
+ data.condition1 = `1=1`
560
+ data.condition2 = ''
561
+ data.condition3 = '1=1'
562
+ data.condition4 = `f_filiale_id in ${this.f_filialeids}`
563
+ return this.model.search(data)
564
+ },
565
+ // getCondition2(){
566
+ // let String = ''
567
+ // let workCt = ''
568
+ // if(this.$refs.paged.$refs.criteria.model.f_date){
569
+ // workCt = `f_date > '${this.$refs.paged.$refs.criteria.model.f_date}'`
570
+ // }
571
+ // if(this.$refs.paged.$refs.criteria.model.f_enddate){
572
+ // if( workCt == ''){
573
+ // workCt = `f_date < '${this.$refs.paged.$refs.criteria.model.f_enddate}'`
574
+ // }else{
575
+ // workCt += `and f_date < '${this.$refs.paged.$refs.criteria.model.f_enddate}'`
576
+ // }
577
+ // }
578
+ // if(this.$refs.paged.$refs.criteria.model.f_status && this.$refs.paged.$refs.criteria.model.f_status == '异常'){
579
+ // workCt += workCt ? " and f_is_abnormal = '异常'" : "f_is_abnormal = '异常'"
580
+ // }else if(this.$refs.paged.$refs.criteria.model.f_status && this.$refs.paged.$refs.criteria.model.f_status == '正常') {
581
+ // workCt += workCt ? " and f_is_abnormal = null" : "f_is_abnormal = null"
582
+ // }
583
+ //
584
+ // String = workCt ? `[serviceacitivity[t_servicework: ${workCt}].count(*)>0]`:''
585
+ // return String
586
+ // },
587
+ // 发送数据给业务逻辑,并刷新界面
588
+ post (row, logic) {
589
+ // 调取工单撤回操作
590
+ let data = {model: row, loginUser: {name: this.$login.f.name, ename: this.$login.f.ename}}
591
+
592
+ this.$showMessage(logic+row.f_service_id+'工单', ['confirm', 'cancel']).then((res) => {
593
+ if (res === 'confirm') {
594
+ this.$resetpost(`rs/logic/${logic}`, data).then(() => {
595
+ // 刷新界面
596
+ this.selfSearch()
597
+ })
598
+ }
599
+ })
600
+ },
601
+ // 是否可以退回
602
+ canRecall(row) {
603
+ let result =
604
+ row.processins.activities[0].defname === '维修完成'
605
+ return result
606
+ },
607
+ trouble(row){
608
+ if(!row){
609
+ return
610
+ }
611
+ let data = ''
612
+ let failure = JSON.parse(row)
613
+ failure.forEach((val)=>{
614
+ data+=val.f_failure_type+" "
615
+ })
616
+ return data
617
+ },
618
+ // 打印
619
+ stamp () {
620
+ this.all = false
621
+ // 默认选择要打印的列
622
+ this.modelval = defaultPrint.config
623
+ this.fields = this.getfield
624
+ this.printshow = true
625
+ this.put()
626
+ },
627
+ put () {
628
+ // 对Modelval进行排序
629
+ this.sortModelval()
630
+ this.thead = `<tr><th colspan=${this.modelval.length}>工单详情报表</th></tr><tr>`
631
+ for (let key of this.modelval) {
632
+ this.thead += '<th>' + this.fields[key] + '</th>'
633
+ }
634
+ this.thead += '</tr>'
635
+ },
636
+ /*print () {
637
+ this.$refs.print.PrintAsFile()
638
+ this.printshow = false
639
+ },*/
640
+ print(row) {
641
+ this.checkInfo = row
642
+ //tag)
643
+ this.showcheckmsg = true
644
+ },
645
+ close () {
646
+ this.printshow = false
647
+ this.all = false
648
+ },
649
+ // 对选择的列进行排序
650
+ sortModelval () {
651
+ let sortModel = []
652
+ Object.keys(this.fields).forEach((key) => {
653
+ if (this.modelval.includes(key)) {
654
+ sortModel.push(key)
655
+ }
656
+ })
657
+ this.modelval = sortModel
658
+ },
659
+ hidden(){
660
+ this.criteriaShow = !this.criteriaShow
661
+ },
662
+ getRes(obj){
663
+ //tag
664
+ //tag)
665
+ this.f_filialeids = this.$login.convertToIn(obj.resids);
666
+ //tag
667
+ }
668
+ },
669
+ computed: {
670
+ searchData() {
671
+ return {condition: this.model.condition}
672
+ },
673
+ getdefectType(){
674
+ this.defectType=[]
675
+ return [ ... this.$appdata.getParam(this.defectLeave)]
676
+ },
677
+ defnames () {
678
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('呼叫工单状态')]
679
+ },
680
+ repairstypes () {
681
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('报修全部类型')]
682
+ },
683
+ serviceorders () {
684
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('工单类型')]
685
+ },
686
+ sources () {
687
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('工单来源')]
688
+ },
689
+ getfield(){
690
+ let data = {}
691
+ this.bodyData.forEach((value, index)=>{
692
+ data[this.bodyData[index]] = this.headData[index]
693
+ })
694
+ return data
695
+ }
696
+ },
697
+ components: {
698
+ 'delay-reply': DelayReply
699
+ }
700
+ }
701
+ </script>