telephone-clients 4.0.0-1-42 → 4.0.0-1-43

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,336 +1,339 @@
1
- <template>
2
- <div class="" v-if="!(row || modifyOrder)">
3
- <div>
4
- <criteria-paged :model="model" v-ref:paged :simple="true">
5
- <criteria partial='criteria' v-ref:criteria @condition-changed='$parent.search'>
6
- <div novalidate class="form-inline" partial>
7
- <div class="row">
8
- <div class="col-sm-3">
9
- <right-tree-safe @re-res="$parent.$parent.getRes" width="80%"></right-tree-safe>
10
- </div>
11
- <div class="col-sm-3">
12
- <v-select :value.sync="model.defname"
13
- v-model="model.defname"
14
- :value-single="true"
15
- :width="'80%'"
16
- :options='$parent.$parent.defname' placeholder='工单状态'
17
- condition="sa.defname = '{}'"
18
- close-on-select style="width: 80%;"></v-select>
19
- </div>
20
- <div class="col-sm-3">
21
- <input type="text" class="form-control" v-model="model.f_service_id" placeholder='工单编号'
22
- condition="tswo.f_service_id like '%{}%'"
23
- :size="model.f_service_id ? model.f_service_id.length : 6" style="width: 80%;">
24
- </div>
25
- <div class="col-sm-3">
26
- <datepicker placeholder="起始报修时间"
27
- :value.sync="model.f_created_date"
28
- v-model="model.f_created_date"
29
- :format="'yyyy-MM-dd 00:00:00'"
30
- condition="tswo.f_created_date > '{}'"
31
- style="width: 80%;"></datepicker>
32
- </div>
33
- </div>
34
-
35
- <div class="row">
36
- <div class="col-sm-3">
37
- <datepicker placeholder="终止报修时间"
38
- :value.sync="model.f_created_enddate"
39
- v-model="model.f_created_enddate"
40
- :format="'yyyy-MM-dd 23:59:59'"
41
- condition="tswo.f_created_date < '{}'"
42
- style="width: 80%;"></datepicker>
43
- </div>
44
- <div class="col-sm-3">
45
- <input type="text" class="form-control" v-model="model.f_userinfo_code" placeholder='用户编号'
46
- condition="tswo.f_userinfo_code = '{}'"
47
- :size="model.f_userinfo_code ? model.f_userinfo_id.length : 6" style="width: 80%;">
48
- </div>
49
- <div class="col-sm-3">
50
- <input type="text" class="form-control" v-model="model.f_user_name" placeholder='客户姓名'
51
- condition="tswo.f_user_name like '%{}%'"
52
- :size="model.f_user_name ? model.f_user_name.length : 6" style="width: 80%;">
53
- </div>
54
- <div class="col-sm-3">
55
- <input type="text" class="form-control" v-model="model.f_phone" placeholder='来电电话'
56
- condition="tswo.f_phone like '%{}%'"
57
- :size="model.f_phone ? model.f_phone.length : 6" style="width: 80%;">
58
- </div>
59
- </div>
60
- <div class="row">
61
- <div class="col-sm-3">
62
- <input type="text" class="form-control" v-model="model.f_contact_phone" placeholder='联系电话'
63
- condition="tswo.f_contact_phone = '{}'"
64
- :size="model.f_contact_phone ? model.f_contact_phone.length : 6" style="width: 80%;">
65
- </div>
66
- <div class="col-sm-3">
67
- <input type="text" class="form-control" v-model="model.f_address" placeholder='地址'
68
- condition="tswo.f_address like '%{}%'"
69
- :size="model.f_address ? model.f_address.length : 4" style="width: 80%;">
70
- </div>
71
- <div class="col-sm-3">
72
- <input type="text" class="form-control" v-model="model.f_attendant" placeholder='话务员'
73
- condition="tswo.f_attendant like '%{}%'"
74
- :size="model.f_attendant ? model.f_attendant.length : 6" style="width: 80%;">
75
- </div>
76
- <div class="col-sm-3">
77
- <input type="text" class="form-control" v-model="model.f_order_man" placeholder='接单员'
78
- condition="tswo.f_order_man like '%{}%'"
79
- :size="model.f_attendant ? model.f_order_man.length : 6" style="width: 80%;">
80
- </div>
81
- <div class="col-sm-3">
82
- <v-select :value.sync="model.f_workorder_type" :value-single="true" v-model="model.f_workorder_type"
83
- :options='$parent.$parent.serviceorders' placeholder='工单类型'
84
- condition="tswo.f_workorder_type = '{}'" :width="'80%'" style="width: 80%;"
85
- close-on-select>
86
- </v-select>
87
- </div>
88
- <div class="col-sm-3">
89
- <v-select :value.sync="model.f_repairtype" :value-single="true" v-model="model.f_repairtype"
90
- :options='$parent.$parent.repairtypes' placeholder='报修类型'
91
- condition="tswo.f_repairtype = '{}'" :width="'80%'" style="width: 80%;"
92
- close-on-select>
93
- </v-select>
94
- </div>
95
- <div class="col-sm-3">
96
- <button type="button" name="button" class="button_spacing button_search" @click="search(),$dispatch('search')" style="float: right">查询</button>
97
- <button class="button_search button_spacing" style="background-color: #5ac0d9;margin-right: 9px;float: right"
98
- @click="$parent.$parent.clearmsg()">清空
99
- </button>
100
- </div>
101
- </div>
102
- </div>
103
- </criteria>
104
-
105
- <data-grid partial='list' v-ref:grid :model="model" class="list_area table_sy" style="height: 100%">
106
- <template partial='head'>
107
- <tr>
108
- <th><nobr>工单编号</nobr></th>
109
- <th><nobr>操作</nobr></th>
110
- <th><nobr>用户编号</nobr></th>
111
- <th><nobr>工单状态</nobr></th>
112
- <th><nobr>报修类型</nobr></th>
113
- <th><nobr>客户信息</nobr></th>
114
- <th><nobr>报修时间</nobr></th>
115
- <th><nobr>受理人</nobr></th>
116
- <th><nobr>接单员</nobr></th>
117
- </tr>
118
- </template>
119
- <template partial='body' >
120
- <td><nobr>
121
- <a class="btn btn-link" @click.stop="$parent.$parent.$parent.$emit('do', 'check', row)" style="min-width: 30px;">{{row.f_service_id}}</a>
122
- </nobr></td>
123
- <td style="white-space: nowrap;">
124
- <div v-show="$parent.$parent.$parent.canRecall(row)">
125
- <button type="button" class="btn btn-link" @click.stop="$parent.$parent.$parent.recall(row)" style="min-width: 30px;">撤回</button>
126
- </div>
127
- <div v-show="$parent.$parent.$parent.canResend(row)">
128
- <button type="button" class="btn btn-link"
129
- @click.stop="$parent.$parent.$parent.$emit('do', '结案',row)" style="min-width: 30px;">结案</button>
130
- </div>
131
- <div v-show="$parent.$parent.$parent.canResend(row) && row.f_workorder_type ==='报修单'">
132
- <button type="button" class="btn btn-link"
133
- @click.stop="$parent.$parent.$parent.$emit('do', 'resend', row)" style="min-width: 30px;">重派</button>
134
- </div>
135
- <div v-show="$parent.$parent.$parent.canResend(row) && row.f_workorder_type ==='置换通气单'">
136
- <button type="button" class="btn btn-link"
137
- @click.stop="$parent.$parent.$parent.$emit('do', 'resendzhihuan', row)" style="min-width: 30px;">重派</button>
138
- </div>
139
- <div v-show="$parent.$parent.$parent.canResend(row) && row.f_workorder_type ==='安装单'">
140
- <button type="button" class="btn btn-link"
141
- @click.stop="$parent.$parent.$parent.$emit('do', 'resendinstall', row)" style="min-width: 30px;">重派</button>
142
- </div>
143
- <div v-show="$parent.$parent.$parent.canRemindChange(row) && row.f_workorder_type == '报修单' && row.f_state!='完成' ">
144
- <button type="button" class="btn btn-link" @click.stop="$parent.$parent.$parent.$emit('do', 'remind', row)" style="min-width: 30px;">催单</button>
145
- <button type="button" class="btn btn-link" @click.stop="$parent.$parent.$parent.$emit('do', 'modify', row)" v-show="row.f_source != '安检'" style="min-width: 30px;">修改</button>
146
- </div>
147
- <div v-show="$parent.$parent.$parent.canRemindChange(row) && row.f_workorder_type == '置换通气单' && row.f_state!='完成' ">
148
- <button type="button" class="btn btn-link" @click.stop="$parent.$parent.$parent.$emit('do', 'remind', row)" style="min-width: 30px;">催单</button>
149
- <button type="button" class="btn btn-link" @click.stop="$parent.$parent.$parent.$emit('do', 'modifyzhihuan', row)" style="min-width: 30px;">修改</button>
150
- </div>
151
- <div v-show="$parent.$parent.$parent.canRemindChange(row) && row.f_workorder_type == '安装单' && row.f_state!='完成' ">
152
- <button type="button" class="btn btn-link" @click.stop="$parent.$parent.$parent.$emit('do', 'remind', row)" style="min-width: 30px;">催单</button>
153
- <button type="button" class="btn btn-link" @click.stop="$parent.$parent.$parent.$emit('do', 'modifyinstall', row)" style="min-width: 30px;">修改</button>
154
- </div>
155
- </td>
156
- <td :style="row.f_overdue_show == '已逾期'?'color:#FF5744':row.defname == '话务员派单'? 'color:#FF9900':''"><nobr>{{row.f_userinfo_code}}</nobr></td>
157
- <td :style="row.f_overdue_show == '已逾期'?'color:#FF5744':row.defname == '话务员派单'? 'color:#FF9900':''"><nobr>{{row.defname}}</nobr></td>
158
- <td :style="row.f_overdue_show == '已逾期'?'color:#FF5744':row.defname == '话务员派单'? 'color:#FF9900':''"><nobr>{{row.f_repairtype}}</nobr></td>
159
- <td :style="row.f_overdue_show == '已逾期'?'color:#FF5744':row.defname == '话务员派单'? 'color:#FF9900':''"><nobr>{{row.f_user_name}}&nbsp;&nbsp;&nbsp;{{row.f_contact_phone}}&nbsp;&nbsp;&nbsp;{{row.f_address}}</nobr></td>
160
- <td :style="row.f_overdue_show == '已逾期'?'color:#FF5744':row.defname == '话务员派单'? 'color:#FF9900':''"><nobr>{{row.f_created_date}}</nobr></td>
161
- <td :style="row.f_overdue_show == '已逾期'?'color:#FF5744':row.defname == '话务员派单'? 'color:#FF9900':''"><nobr>{{row.f_attendant}}</nobr></td>
162
- <td :style="row.f_overdue_show == '已逾期'?'color:#FF5744':row.defname == '话务员派单'? 'color:#FF9900':''"><nobr>{{row.f_order_man}}</nobr></td>
163
- </template>
164
- </data-grid>
165
- </criteria-paged>
166
- </div>
167
- </div>
168
- </template>
169
-
170
- <script>
171
- import { PagedList, HttpResetClass } from 'vue-client'
172
- import * as Util from '../Util'
173
- import AppData from '../../stores/AppData'
174
- import Vue from 'vue'
175
- export default {
176
- title: '工单中心',
177
- data () {
178
- return {
179
- model: new PagedList('af-telephone/rs/sql/serviceDetails', 20),
180
- row: null,
181
- modifyOrder: null,
182
- resobjprop: {res: this.$login.f.orgs, resids: this.$login.f.orgid},
183
- filialeIds: ''
184
- // defname: [{label: '全部', value: ''}, ...this.$appdata.getParam('工单状态')]
185
- }
186
- },
187
- props: {
188
- callObj: {
189
- type: Object
190
- },
191
- loginUser: {
192
- type: Object
193
- },
194
- refurbish:{
195
- type:Number
196
- },
197
- meading:{
198
- type: String,
199
- default: '转站点'
200
- }
201
- },
202
- ready () {
203
- },
204
- methods: {
205
- clearmsg(){
206
- this.$refs.paged.$refs.criteria.model={}
207
- },
208
- getRes(obj){
209
- this.filialeIds = this.$login.convertToIn(obj.resids);
210
- console.log('this.filialeIds=', this.filialeIds)
211
- this.selfSearch()
212
- },
213
- // search () {
214
- // let condition = this.$refs.paged.$refs.criteria.condition || '1 = 1'
215
- // if (this.filialeIds){
216
- // condition += `and f_filiale_id in ${this.filialeIds}`
217
- // }
218
- // return this.model.search(condition)
219
- // },
220
- selfSearch () {
221
- // 取消编辑状态
222
- let condition = '1=1'
223
- if (this.filialeIds) {
224
- condition += ` and tswo.f_filiale_id in ${this.filialeIds}`
225
- } else {
226
- condition += ` and tswo.f_filiale_id = '${this.$login.f.orgid}'`
227
- }
228
- return this.model.search(condition)
229
- },
230
- search (args) {
231
- if (this.filialeIds){
232
- args.condition += `and tswo.f_filiale_id in ${this.filialeIds}`
233
- }
234
- return this.model.search(args.condition, args.model)
235
- },
236
- searchUserWork (user) {
237
- this.$refs.paged.$refs.criteria.model.f_userinfo_id = user.f_userinfo_id
238
- this.selfSearch()
239
- },
240
- cannelRow () {
241
- this.row = null
242
- },
243
- recall (row) {
244
- // 调取工单撤回操作
245
- let data = {model: row,loginUser:this.loginUser}
246
- this.$showMessage('撤回'+row.f_service_id+'工单', ['confirm', 'cancel']).then((res) => {
247
- if (res === 'confirm') {
248
- this.$resetpost('af-telephone/rs/logic/TelWorkeCancle', data).then(() => {
249
- // 刷新界面
250
- this.selfSearch()
251
- })
252
- }
253
- })
254
- },
255
- // 是否可以撤回
256
- canRecall(row) {
257
- // 首先工单上一步为 话务员派单,才可撤回
258
- if(row.f_handlingtype === '转站点' ) {
259
- if (row.defname == '站点接单') {
260
- return true
261
- }
262
- }
263
- if(row.f_handlingtype === '转维修员')
264
- if (row.defname.indexOf('接单') != -1) {
265
- return true
266
- }
267
- return false
268
- },
269
- // 是否可以重派及结案: 只有工单状态为 话务员派单的时候,才能重派或者结案
270
- canResend(row) {
271
- if (row.defname === '话务员派单') {
272
- return true
273
- }
274
- return false
275
- },
276
- // 是否可以修改、催单 完成后是不能催单或者修改的
277
- canRemindChange(row) {
278
- if (row.defname.indexOf('完成') != -1){
279
- return false
280
- }
281
- if(row.defname === '话务员派单'){
282
- return false
283
- }
284
- return true
285
- },
286
- // 工单重派
287
- resend (row) {
288
- this.$emit('resend', row)
289
- },
290
- // 工单修改
291
- modiOrder (row) {
292
- this.$emit('modify', row)
293
- },
294
- serviceDeleteOrder(row) {
295
- this.$emit('serviceDelete', row)
296
- // 调取工单撤回操作
297
- // let data = {model: row, loginUser: {name:this.$login.f.name, ename: this.$login.f.ename}}
298
- // this.$showMessage(logic+row.f_service_id+'工单', ['confirm', 'cancel']).then((res) => {
299
- // if (res === 'confirm') {
300
- // this.$resetpost(`${this.$androidUtil.getProxyUrl()}/af-telephone/rs/logic/${logic}`, data).then(() => {
301
- // // 刷新界面
302
- // this.search()
303
- // })
304
- // }
305
- // })
306
- },
307
- // 查看工单
308
- check (row) {
309
- this.$emit('check', row)
310
- },
311
- // 催单
312
- selectedRow (row) {
313
- this.$emit('remind', row)
314
- },
315
- modified () {
316
- this.modifyOrder = null
317
- }
318
- },
319
- watch:{
320
- 'refurbish'(){
321
- this.selfSearch()
322
- }
323
- },
324
- computed: {
325
- defname () {
326
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('工单状态')]
327
- },
328
- serviceorders () {
329
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('工单类型')]
330
- },
331
- repairtypes () {
332
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('报修类型')]
333
- }
334
- }
335
- }
336
- </script>
1
+ <template>
2
+ <div class="" v-if="!(row || modifyOrder)">
3
+ <div>
4
+ <criteria-paged :model="model" v-ref:paged :simple="true">
5
+ <criteria partial='criteria' v-ref:criteria @condition-changed='$parent.search'>
6
+ <div novalidate class="form-inline" partial>
7
+ <div class="row">
8
+ <div class="col-sm-3">
9
+ <right-tree-safe @re-res="$parent.$parent.getRes" width="80%"></right-tree-safe>
10
+ </div>
11
+ <div class="col-sm-3">
12
+ <v-select :value.sync="model.defname"
13
+ v-model="model.defname"
14
+ :value-single="true"
15
+ :width="'80%'"
16
+ :options='$parent.$parent.defname' placeholder='工单状态'
17
+ condition="sa.defname = '{}'"
18
+ close-on-select style="width: 80%;"></v-select>
19
+ </div>
20
+ <div class="col-sm-3">
21
+ <input type="text" class="form-control" v-model="model.f_service_id" placeholder='工单编号'
22
+ condition="tswo.f_service_id like '%{}%'"
23
+ :size="model.f_service_id ? model.f_service_id.length : 6" style="width: 80%;">
24
+ </div>
25
+ <div class="col-sm-3">
26
+ <datepicker placeholder="起始报修时间"
27
+ :value.sync="model.f_created_date"
28
+ v-model="model.f_created_date"
29
+ :format="'yyyy-MM-dd 00:00:00'"
30
+ condition="tswo.f_created_date > '{}'"
31
+ style="width: 80%;"></datepicker>
32
+ </div>
33
+ </div>
34
+
35
+ <div class="row">
36
+ <div class="col-sm-3">
37
+ <datepicker placeholder="终止报修时间"
38
+ :value.sync="model.f_created_enddate"
39
+ v-model="model.f_created_enddate"
40
+ :format="'yyyy-MM-dd 23:59:59'"
41
+ condition="tswo.f_created_date < '{}'"
42
+ style="width: 80%;"></datepicker>
43
+ </div>
44
+ <div class="col-sm-3">
45
+ <input type="text" class="form-control" v-model="model.f_userinfo_code" placeholder='用户编号'
46
+ condition="tswo.f_userinfo_code = '{}'"
47
+ :size="model.f_userinfo_code ? model.f_userinfo_id.length : 6" style="width: 80%;">
48
+ </div>
49
+ <div class="col-sm-3">
50
+ <input type="text" class="form-control" v-model="model.f_user_name" placeholder='客户姓名'
51
+ condition="tswo.f_user_name like '%{}%'"
52
+ :size="model.f_user_name ? model.f_user_name.length : 6" style="width: 80%;">
53
+ </div>
54
+ <div class="col-sm-3">
55
+ <input type="text" class="form-control" v-model="model.f_phone" placeholder='来电电话'
56
+ condition="tswo.f_phone like '%{}%'"
57
+ :size="model.f_phone ? model.f_phone.length : 6" style="width: 80%;">
58
+ </div>
59
+ </div>
60
+ <div class="row">
61
+ <div class="col-sm-3">
62
+ <input type="text" class="form-control" v-model="model.f_contact_phone" placeholder='联系电话'
63
+ condition="tswo.f_contact_phone = '{}'"
64
+ :size="model.f_contact_phone ? model.f_contact_phone.length : 6" style="width: 80%;">
65
+ </div>
66
+ <div class="col-sm-3">
67
+ <input type="text" class="form-control" v-model="model.f_address" placeholder='地址'
68
+ condition="tswo.f_address like '%{}%'"
69
+ :size="model.f_address ? model.f_address.length : 4" style="width: 80%;">
70
+ </div>
71
+ <div class="col-sm-3">
72
+ <input type="text" class="form-control" v-model="model.f_attendant" placeholder='话务员'
73
+ condition="tswo.f_attendant like '%{}%'"
74
+ :size="model.f_attendant ? model.f_attendant.length : 6" style="width: 80%;">
75
+ </div>
76
+ <div class="col-sm-3">
77
+ <input type="text" class="form-control" v-model="model.f_order_man" placeholder='接单员'
78
+ condition="tswo.f_order_man like '%{}%'"
79
+ :size="model.f_attendant ? model.f_order_man.length : 6" style="width: 80%;">
80
+ </div>
81
+ <div class="col-sm-3">
82
+ <v-select :value.sync="model.f_workorder_type" :value-single="true" v-model="model.f_workorder_type"
83
+ :options='$parent.$parent.serviceorders' placeholder='工单类型'
84
+ condition="tswo.f_workorder_type = '{}'" :width="'80%'" style="width: 80%;"
85
+ close-on-select>
86
+ </v-select>
87
+ </div>
88
+ <div class="col-sm-3">
89
+ <v-select :value.sync="model.f_repairtype" :value-single="true" v-model="model.f_repairtype"
90
+ :options='$parent.$parent.repairtypes' placeholder='报修类型'
91
+ condition="tswo.f_repairtype = '{}'" :width="'80%'" style="width: 80%;"
92
+ close-on-select>
93
+ </v-select>
94
+ </div>
95
+ <div class="col-sm-3">
96
+ <button type="button" name="button" class="button_spacing button_search" @click="search(),$dispatch('search')" style="float: right">查询</button>
97
+ <button class="button_search button_spacing" style="background-color: #5ac0d9;margin-right: 9px;float: right"
98
+ @click="$parent.$parent.clearmsg()">清空
99
+ </button>
100
+ </div>
101
+ </div>
102
+ </div>
103
+ </criteria>
104
+
105
+ <data-grid partial='list' v-ref:grid :model="model" class="list_area table_sy" style="height: 100%">
106
+ <template partial='head'>
107
+ <tr>
108
+ <th><nobr>工单编号</nobr></th>
109
+ <th><nobr>操作</nobr></th>
110
+ <th><nobr>用户编号</nobr></th>
111
+ <th><nobr>工单状态</nobr></th>
112
+ <th><nobr>报修类型</nobr></th>
113
+ <th><nobr>客户信息</nobr></th>
114
+ <th><nobr>报修时间</nobr></th>
115
+ <th><nobr>受理人</nobr></th>
116
+ <th><nobr>接单员</nobr></th>
117
+ </tr>
118
+ </template>
119
+ <template partial='body' >
120
+ <td><nobr>
121
+ <a class="btn btn-link" @click.stop="$parent.$parent.$parent.$emit('do', 'check', row)" style="min-width: 30px;">{{row.f_service_id}}</a>
122
+ </nobr></td>
123
+ <td style="white-space: nowrap;">
124
+ <div v-show="$parent.$parent.$parent.canRecall(row)">
125
+ <button type="button" class="btn btn-link" @click.stop="$parent.$parent.$parent.recall(row)" style="min-width: 30px;">撤回</button>
126
+ </div>
127
+ <div v-show="$parent.$parent.$parent.canResend(row)">
128
+ <button type="button" class="btn btn-link"
129
+ @click.stop="$parent.$parent.$parent.$emit('do', '结案',row)" style="min-width: 30px;">结案</button>
130
+ </div>
131
+ <div v-show="$parent.$parent.$parent.canResend(row) && row.f_workorder_type ==='报修单'">
132
+ <button type="button" class="btn btn-link"
133
+ @click.stop="$parent.$parent.$parent.$emit('do', 'resend', row)" style="min-width: 30px;">重派</button>
134
+ </div>
135
+ <div v-show="$parent.$parent.$parent.canResend(row) && row.f_workorder_type ==='置换通气单'">
136
+ <button type="button" class="btn btn-link"
137
+ @click.stop="$parent.$parent.$parent.$emit('do', 'resendzhihuan', row)" style="min-width: 30px;">重派</button>
138
+ </div>
139
+ <div v-show="$parent.$parent.$parent.canResend(row) && row.f_workorder_type ==='安装单'">
140
+ <button type="button" class="btn btn-link"
141
+ @click.stop="$parent.$parent.$parent.$emit('do', 'resendinstall', row)" style="min-width: 30px;">重派</button>
142
+ </div>
143
+ <div v-show="$parent.$parent.$parent.canRemindChange(row) && row.f_workorder_type == '报修单' && row.f_state!='完成' ">
144
+ <button type="button" class="btn btn-link" @click.stop="$parent.$parent.$parent.$emit('do', 'remind', row)" style="min-width: 30px;">催单</button>
145
+ <button type="button" class="btn btn-link" @click.stop="$parent.$parent.$parent.$emit('do', 'modify', row)" v-show="row.f_source != '安检'" style="min-width: 30px;">修改</button>
146
+ </div>
147
+ <div v-show="$parent.$parent.$parent.canRemindChange(row) && row.f_workorder_type == '置换通气单' && row.f_state!='完成' ">
148
+ <button type="button" class="btn btn-link" @click.stop="$parent.$parent.$parent.$emit('do', 'remind', row)" style="min-width: 30px;">催单</button>
149
+ <button type="button" class="btn btn-link" @click.stop="$parent.$parent.$parent.$emit('do', 'modifyzhihuan', row)" style="min-width: 30px;">修改</button>
150
+ </div>
151
+ <div v-show="$parent.$parent.$parent.canRemindChange(row) && row.f_workorder_type == '安装单' && row.f_state!='完成' ">
152
+ <button type="button" class="btn btn-link" @click.stop="$parent.$parent.$parent.$emit('do', 'remind', row)" style="min-width: 30px;">催单</button>
153
+ <button type="button" class="btn btn-link" @click.stop="$parent.$parent.$parent.$emit('do', 'modifyinstall', row)" style="min-width: 30px;">修改</button>
154
+ </div>
155
+ </td>
156
+ <td :style="row.f_overdue_show == '已逾期'?'color:#FF5744':row.defname == '话务员派单'? 'color:#FF9900':''"><nobr>{{row.f_userinfo_code}}</nobr></td>
157
+ <td :style="row.f_overdue_show == '已逾期'?'color:#FF5744':row.defname == '话务员派单'? 'color:#FF9900':''"><nobr>{{row.defname}}</nobr></td>
158
+ <td :style="row.f_overdue_show == '已逾期'?'color:#FF5744':row.defname == '话务员派单'? 'color:#FF9900':''"><nobr>{{row.f_repairtype}}</nobr></td>
159
+ <td :style="row.f_overdue_show == '已逾期'?'color:#FF5744':row.defname == '话务员派单'? 'color:#FF9900':''"><nobr>{{row.f_user_name}}&nbsp;&nbsp;&nbsp;{{row.f_contact_phone}}&nbsp;&nbsp;&nbsp;{{row.f_address}}</nobr></td>
160
+ <td :style="row.f_overdue_show == '已逾期'?'color:#FF5744':row.defname == '话务员派单'? 'color:#FF9900':''"><nobr>{{row.f_created_date}}</nobr></td>
161
+ <td :style="row.f_overdue_show == '已逾期'?'color:#FF5744':row.defname == '话务员派单'? 'color:#FF9900':''"><nobr>{{row.f_attendant}}</nobr></td>
162
+ <td :style="row.f_overdue_show == '已逾期'?'color:#FF5744':row.defname == '话务员派单'? 'color:#FF9900':''"><nobr>{{row.f_order_man}}</nobr></td>
163
+ </template>
164
+ </data-grid>
165
+ </criteria-paged>
166
+ </div>
167
+ </div>
168
+ </template>
169
+
170
+ <script>
171
+ import { PagedList, HttpResetClass } from 'vue-client'
172
+ import * as Util from '../Util'
173
+ import AppData from '../../stores/AppData'
174
+ import Vue from 'vue'
175
+ export default {
176
+ title: '工单中心',
177
+ data () {
178
+ return {
179
+ model: new PagedList('af-telephone/rs/sql/serviceDetails', 20),
180
+ row: null,
181
+ modifyOrder: null,
182
+ resobjprop: {res: this.$login.f.orgs, resids: this.$login.f.orgid},
183
+ filialeIds: ''
184
+ // defname: [{label: '全部', value: ''}, ...this.$appdata.getParam('工单状态')]
185
+ }
186
+ },
187
+ props: {
188
+ callObj: {
189
+ type: Object
190
+ },
191
+ loginUser: {
192
+ type: Object
193
+ },
194
+ refurbish:{
195
+ type:Number
196
+ },
197
+ meading:{
198
+ type: String,
199
+ default: '转站点'
200
+ }
201
+ },
202
+ ready () {
203
+ },
204
+ methods: {
205
+ clearmsg(){
206
+ this.$refs.paged.$refs.criteria.model={}
207
+ },
208
+ getRes(obj){
209
+ this.filialeIds = this.$login.convertToIn(obj.resids);
210
+ console.log('this.filialeIds=', this.filialeIds)
211
+ this.selfSearch()
212
+ },
213
+ // search () {
214
+ // let condition = this.$refs.paged.$refs.criteria.condition || '1 = 1'
215
+ // if (this.filialeIds){
216
+ // condition += `and f_filiale_id in ${this.filialeIds}`
217
+ // }
218
+ // return this.model.search(condition)
219
+ // },
220
+ selfSearch () {
221
+ // 取消编辑状态
222
+ let condition = '1=1'
223
+ if (this.filialeIds) {
224
+ condition += ` and tswo.f_filiale_id in ${this.filialeIds}`
225
+ } else {
226
+ condition += ` and tswo.f_filiale_id = '${this.$login.f.orgid}'`
227
+ }
228
+ return this.model.search(condition)
229
+ },
230
+ search (args) {
231
+ if (this.filialeIds){
232
+ args.condition += `and tswo.f_filiale_id in ${this.filialeIds}`
233
+ }
234
+ return this.model.search(args.condition, args.model)
235
+ },
236
+ searchUserWork (user) {
237
+ this.$refs.paged.$refs.criteria.model.f_userinfo_id = user.f_userinfo_id
238
+ this.selfSearch()
239
+ },
240
+ cannelRow () {
241
+ this.row = null
242
+ },
243
+ recall (row) {
244
+ // 调取工单撤回操作
245
+ let data = {model: row,loginUser:this.loginUser}
246
+ this.$showMessage('撤回'+row.f_service_id+'工单', ['confirm', 'cancel']).then((res) => {
247
+ if (res === 'confirm') {
248
+ this.$resetpost('af-telephone/rs/logic/TelWorkeCancle', data).then(() => {
249
+ // 刷新界面
250
+ this.selfSearch()
251
+ })
252
+ }
253
+ })
254
+ },
255
+ // 是否可以撤回
256
+ canRecall(row) {
257
+ // 首先工单上一步为 话务员派单,才可撤回
258
+ if(row.f_handlingtype === '转站点' ) {
259
+ if (row.defname == '站点接单') {
260
+ return true
261
+ }
262
+ }
263
+ if(row.f_handlingtype === '转维修员')
264
+ if (row.defname.indexOf('接单') != -1) {
265
+ return true
266
+ }
267
+ return false
268
+ },
269
+ // 是否可以重派及结案: 只有工单状态为 话务员派单的时候,才能重派或者结案
270
+ canResend(row) {
271
+ if (row.defname === '话务员派单') {
272
+ return true
273
+ }
274
+ return false
275
+ },
276
+ // 是否可以修改、催单 完成后是不能催单或者修改的
277
+ canRemindChange(row) {
278
+ if (row.defname.indexOf('完成') != -1){
279
+ return false
280
+ }
281
+ if(row.defname === '话务员派单'){
282
+ return false
283
+ }
284
+ return true
285
+ },
286
+ // 工单重派
287
+ resend (row) {
288
+ this.$emit('resend', row)
289
+ },
290
+ // 工单修改
291
+ modiOrder (row) {
292
+ this.$emit('modify', row)
293
+ },
294
+ serviceDeleteOrder(row) {
295
+ this.$emit('serviceDelete', row)
296
+ // 调取工单撤回操作
297
+ // let data = {model: row, loginUser: {name:this.$login.f.name, ename: this.$login.f.ename}}
298
+ // this.$showMessage(logic+row.f_service_id+'工单', ['confirm', 'cancel']).then((res) => {
299
+ // if (res === 'confirm') {
300
+ // this.$resetpost(`${this.$androidUtil.getProxyUrl()}/af-telephone/rs/logic/${logic}`, data).then(() => {
301
+ // // 刷新界面
302
+ // this.search()
303
+ // })
304
+ // }
305
+ // })
306
+ },
307
+ // 查看工单
308
+ check (row) {
309
+ this.$emit('check', row)
310
+ },
311
+ // 催单
312
+ selectedRow (row) {
313
+ this.$emit('remind', row)
314
+ },
315
+ modified () {
316
+ this.modifyOrder = null
317
+ }
318
+ },
319
+ watch:{
320
+ 'refurbish'(){
321
+ this.selfSearch()
322
+ },
323
+ 'callObj.callNum'() {
324
+ this.$refs.paged.$refs.criteria.model.f_phone = this.callObj.callNum
325
+ }
326
+ },
327
+ computed: {
328
+ defname () {
329
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('工单状态')]
330
+ },
331
+ serviceorders () {
332
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('工单类型')]
333
+ },
334
+ repairtypes () {
335
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('报修类型')]
336
+ }
337
+ }
338
+ }
339
+ </script>