telephone-clients 3.0.113 → 3.0.114
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.
- package/package.json +1 -1
- package/src/filiale/tongchuan/pc/WorkorderCheckDistributePlan.vue +406 -406
- package/src/filiale/yangchunboneng/android/AppInstallationMaterial.vue +1068 -0
- package/src/filiale/yangchunboneng/android/FaultAll.vue +852 -0
- package/src/filiale/yangchunboneng/android/MaterIialOne.vue +123 -0
- package/src/filiale/yangchunboneng/android/chargesList.vue +161 -0
- package/src/filiale/yangchunboneng/pc/RepairsWork.vue +875 -875
- package/src/filiale/yangchunboneng/pc/WorkList.vue +758 -0
- package/src/filiale/yangchunboneng/pc/WorkListAllNew.vue +744 -0
- package/src/filiale/yangchunboneng/telephone.js +17 -15
- package/src/filiale/yangchunboneng/telephoneAndroid.js +17 -13
- package/src/main.js +22 -22
|
@@ -1,406 +1,406 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="flex">
|
|
3
|
-
<section>
|
|
4
|
-
<div class="basic-main row" style="height: 100%">
|
|
5
|
-
<criteria-paged :model="model" v-ref:paged>
|
|
6
|
-
<criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
|
|
7
|
-
<div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
|
|
8
|
-
<div class="row">
|
|
9
|
-
<div class="col-sm-4" style="width: 20%">
|
|
10
|
-
<label class="font_normal_body"> 公 司 </label>
|
|
11
|
-
<right-tree :userid.sync='$parent.$parent.userid' style="width: 60%;"
|
|
12
|
-
:source.sync='$parent.$parent.source' @re-res="$parent.$parent.getRes"></right-tree>
|
|
13
|
-
</div>
|
|
14
|
-
<div class="col-sm-4" style="width: 20%">
|
|
15
|
-
<label class="font_normal_body">用户编号</label>
|
|
16
|
-
<input type="text" class="input_search" v-model="model.f_userinfo_code" style="width:60%;"
|
|
17
|
-
placeholder="用户编号" condition="tswo.f_userinfo_code = '{}'"/>
|
|
18
|
-
</div>
|
|
19
|
-
<div class="col-sm-4" style="width: 20%">
|
|
20
|
-
<label class="font_normal_body">用户名称</label>
|
|
21
|
-
<input type="text" class="input_search" v-model="model.f_user_name" style="width:60%;"
|
|
22
|
-
placeholder="用户名称" condition="tswo.f_user_name = '%{}%'"/>
|
|
23
|
-
</div>
|
|
24
|
-
<div class="col-sm-4" style="width: 20%">
|
|
25
|
-
<label class="font_normal_body">详细地址</label>
|
|
26
|
-
<input type="text" class="input_search" v-model="model.f_address" style="width:60%;"
|
|
27
|
-
placeholder="详细地址" condition="tswo.f_address like '%{}%'"/>
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
<div class="row">
|
|
31
|
-
<div class="col-sm-4" style="width: 20%">
|
|
32
|
-
<label class="font_normal_body">用户类型</label>
|
|
33
|
-
<v-select
|
|
34
|
-
placeholder='用户类型'
|
|
35
|
-
class="select select_list"
|
|
36
|
-
style="width: 60%"
|
|
37
|
-
:value.sync="model.f_user_type"
|
|
38
|
-
:value-single="true"
|
|
39
|
-
:options='$parent.$parent.f_user_types'
|
|
40
|
-
v-model="model.f_user_type"
|
|
41
|
-
condition="f_user_type = '{}'"
|
|
42
|
-
close-on-select clear-button></v-select>
|
|
43
|
-
</div>
|
|
44
|
-
<div class="col-sm-4" style="width: 20%">
|
|
45
|
-
<label class="font_normal_body">工单来源</label>
|
|
46
|
-
<v-select
|
|
47
|
-
placeholder='工单来源'
|
|
48
|
-
class="select select_list"
|
|
49
|
-
style="width: 60%"
|
|
50
|
-
:value.sync="model.source"
|
|
51
|
-
:value-single="true"
|
|
52
|
-
:options='$parent.$parent.sources'
|
|
53
|
-
v-model="model.source"
|
|
54
|
-
close-on-select clear-button></v-select>
|
|
55
|
-
</div>
|
|
56
|
-
<div class="col-sm-4" style="width: 20%">
|
|
57
|
-
<label class="font_normal_body">创建时间</label>
|
|
58
|
-
<datepicker
|
|
59
|
-
:value.sync="model.f_created_date"
|
|
60
|
-
placeholder='创建时间'
|
|
61
|
-
style="width: 60%"
|
|
62
|
-
:disabled-days-of-week="[]"
|
|
63
|
-
condition="tswo.f_created_date = '{}'"
|
|
64
|
-
:show-rest-button="reset"
|
|
65
|
-
v-model="model.f_created_date">
|
|
66
|
-
</datepicker>
|
|
67
|
-
</div>
|
|
68
|
-
<div class="row">
|
|
69
|
-
<div class="span" style="float: right;width: 20%;">
|
|
70
|
-
<button class="button_spacing button_search" @click="$parent.$parent.distributeds()">批量派发</button>
|
|
71
|
-
<button type="button" name="button" class="button_search" @click="search">查询</button>
|
|
72
|
-
<button type="button" name="button" style="background-color: #5ac0d9;border-radius: 4px;"
|
|
73
|
-
class="button_spacing button_search" @click="$parent.$parent.clearmsg()">清空
|
|
74
|
-
</button>
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
</div>
|
|
79
|
-
</criteria>
|
|
80
|
-
<data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid @dblclick="">
|
|
81
|
-
<template partial='head'>
|
|
82
|
-
<tr>
|
|
83
|
-
<th >
|
|
84
|
-
<input type="checkbox" @click.stop="$parent.$parent.$parent.isAll()"
|
|
85
|
-
v-model="$parent.$parent.$parent.checkeds">
|
|
86
|
-
</th>
|
|
87
|
-
<th>
|
|
88
|
-
<nobr>用户编号</nobr>
|
|
89
|
-
</th>
|
|
90
|
-
<th>
|
|
91
|
-
<nobr>工单编号</nobr>
|
|
92
|
-
</th>
|
|
93
|
-
<th>
|
|
94
|
-
<nobr>用户名称</nobr>
|
|
95
|
-
</th>
|
|
96
|
-
<th>
|
|
97
|
-
<nobr>用户类型</nobr>
|
|
98
|
-
</th>
|
|
99
|
-
<th>
|
|
100
|
-
<nobr>用户地址</nobr>
|
|
101
|
-
</th>
|
|
102
|
-
<th>
|
|
103
|
-
<nobr>计划创建时间</nobr>
|
|
104
|
-
</th>
|
|
105
|
-
<th>
|
|
106
|
-
<nobr>计划创建人</nobr>
|
|
107
|
-
</th>
|
|
108
|
-
<th>
|
|
109
|
-
<nobr>来源</nobr>
|
|
110
|
-
</th>
|
|
111
|
-
<th>
|
|
112
|
-
<nobr>公司名称</nobr>
|
|
113
|
-
</th>
|
|
114
|
-
<th>
|
|
115
|
-
<nobr>备注</nobr>
|
|
116
|
-
</th>
|
|
117
|
-
<th>
|
|
118
|
-
<nobr>操作</nobr>
|
|
119
|
-
</th>
|
|
120
|
-
</tr>
|
|
121
|
-
</template>
|
|
122
|
-
<template partial='body'>
|
|
123
|
-
<tr>
|
|
124
|
-
<td style="text-align:center" >
|
|
125
|
-
<input type="checkbox" :value="row" v-model="$parent.$parent.$parent.thisUserinfos" onClick="event.cancelBubble = true">
|
|
126
|
-
</td>
|
|
127
|
-
<td style="text-align:center">
|
|
128
|
-
<nobr>{{ row.f_userinfo_id }}</nobr>
|
|
129
|
-
</td>
|
|
130
|
-
<td style="text-align:center">
|
|
131
|
-
<nobr>{{ row.f_service_id }}</nobr>
|
|
132
|
-
</td>
|
|
133
|
-
<td style="text-align:center">
|
|
134
|
-
<nobr>{{ row.f_user_name }}</nobr>
|
|
135
|
-
</td>
|
|
136
|
-
<td style="text-align:center">
|
|
137
|
-
<nobr>{{ row.f_user_type }}</nobr>
|
|
138
|
-
</td>
|
|
139
|
-
<td style="text-align:center">
|
|
140
|
-
<nobr>{{ row.f_address }}</nobr>
|
|
141
|
-
</td>
|
|
142
|
-
<td style="text-align:center">
|
|
143
|
-
<nobr>{{ row.f_created_date }}</nobr>
|
|
144
|
-
</td>
|
|
145
|
-
<td style="text-align:center">
|
|
146
|
-
<nobr>{{ row.f_operator }}</nobr>
|
|
147
|
-
</td>
|
|
148
|
-
<td style="text-align:center">
|
|
149
|
-
<nobr>{{ row.f_operator == '微信公众号' ? '微信公众号' : '客服' }}</nobr>
|
|
150
|
-
</td>
|
|
151
|
-
<td style="text-align:center">
|
|
152
|
-
<nobr>{{ row.f_filiale }}</nobr>
|
|
153
|
-
</td>
|
|
154
|
-
<td style="text-align:center">
|
|
155
|
-
<nobr>{{ row.f_remarks}}</nobr>
|
|
156
|
-
</td>
|
|
157
|
-
<td style="text-align: center">
|
|
158
|
-
<button-link type="button" class="btn btn-link" @click="$parent.$parent.$parent.distributed(row)">
|
|
159
|
-
派发
|
|
160
|
-
</button-link>
|
|
161
|
-
<button-link type="button" class="btn btn-link" class="button_spacing button_search-2"
|
|
162
|
-
@click.stop="$parent.$parent.$parent.deletesafechecklist(row)">删除
|
|
163
|
-
</button-link>
|
|
164
|
-
</td>
|
|
165
|
-
</tr>
|
|
166
|
-
</template>
|
|
167
|
-
</data-grid>
|
|
168
|
-
</criteria-paged>
|
|
169
|
-
</div>
|
|
170
|
-
</section>
|
|
171
|
-
</div>
|
|
172
|
-
<!--预约安检单派发 -->
|
|
173
|
-
<modal :show.sync=showVisit v-ref:modal backdrop="false">
|
|
174
|
-
<header slot="modal-header" class="modal-header">
|
|
175
|
-
<h4 class="modal-title">预约安检单派发</h4>
|
|
176
|
-
</header>
|
|
177
|
-
<article slot="modal-body" class="modal-body">
|
|
178
|
-
<div class="row">
|
|
179
|
-
<div class="col-sm-6 form-group form-fix-width">
|
|
180
|
-
<label class="font_normal_body" style="width: 30%">安 检 员</label>
|
|
181
|
-
<v-select :value-single="true" :value.sync="checker"
|
|
182
|
-
:options='repairers' placeholder='请选择安检员'
|
|
183
|
-
close-on-select style="width: 60%" v-ref:name></v-select>
|
|
184
|
-
<textarea placeholder="备注" v-show="false"></textarea>
|
|
185
|
-
</div>
|
|
186
|
-
</div>
|
|
187
|
-
</article>
|
|
188
|
-
<footer slot="modal-footer" class="modal-footer">
|
|
189
|
-
<button v-show="true" type="button" class="btn btn-default" @click='closeedit'>取消</button>
|
|
190
|
-
<button v-show="true" type="button" class="btn btn-success" v-on:click='save'>派发</button>
|
|
191
|
-
</footer>
|
|
192
|
-
</modal>
|
|
193
|
-
</template>
|
|
194
|
-
<script>
|
|
195
|
-
import {PagedList, HttpResetClass} from 'vue-client'
|
|
196
|
-
|
|
197
|
-
export default {
|
|
198
|
-
title: '工单安检预约单派发',
|
|
199
|
-
data () {
|
|
200
|
-
let model = new PagedList('rs/sql/WorkorderCheckDistributePlanNew', 20, {
|
|
201
|
-
f_filiale_id: 'this.f_filiale_id'
|
|
202
|
-
})
|
|
203
|
-
model.f_filiale_id = `('${this.$login.f.orgid}')`
|
|
204
|
-
return {
|
|
205
|
-
f_filiale_id: `('${this.$login.f.orgid}')`, // 分公司id
|
|
206
|
-
model: model,
|
|
207
|
-
checked: true,
|
|
208
|
-
showVisit: false,
|
|
209
|
-
checkeds: false,
|
|
210
|
-
sources:[{label: '全部', value: ''}, {label: '微信公众号', value: '微信公众号'}, {label: '客服', value: '客服'}],
|
|
211
|
-
thisUserinfos: [],
|
|
212
|
-
checker: {},
|
|
213
|
-
userid: this.$login.f.id,
|
|
214
|
-
source: 'tool.getFullTree(this.getRights().where(row.getType() != $zone$).where(row.getType() == $organization$))',
|
|
215
|
-
f_issueds: [{label: '全部', value: ''}, {label: '是', value: '是'}, {label: '否', value: '否'}],
|
|
216
|
-
f_user_types: [{label: '全部', value: ''}, {label: '民用', value: '民用'}, {label: '非民用', value: '非民用'}],
|
|
217
|
-
repairers: [],
|
|
218
|
-
type: 'one', // one 或者 two
|
|
219
|
-
rowdate:null,
|
|
220
|
-
itemRowData: null // 选择单个派发的数据
|
|
221
|
-
}
|
|
222
|
-
},
|
|
223
|
-
methods: {
|
|
224
|
-
deletesafechecklist (val) {
|
|
225
|
-
this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
|
|
226
|
-
if (res === 'confirm') {
|
|
227
|
-
let rowdate ={
|
|
228
|
-
rowda:val,
|
|
229
|
-
userename:this.$login.f.ename,
|
|
230
|
-
username: this.$login.f.name,
|
|
231
|
-
serviceacitivity: [{
|
|
232
|
-
f_service_acitivity_type: '撤销'
|
|
233
|
-
}]
|
|
234
|
-
}
|
|
235
|
-
this.$resetpost('rs/logic/deleteworkorederUser', rowdate,{resolveMsg: '删除成功!!!', rejectMsg: '删除失败~~~'}).then((res) => {
|
|
236
|
-
this.$refs.paged.$refs.cri.search()
|
|
237
|
-
})
|
|
238
|
-
}
|
|
239
|
-
})
|
|
240
|
-
},
|
|
241
|
-
isAll () {
|
|
242
|
-
if (this.checkeds) {
|
|
243
|
-
this.thisUserinfos = []
|
|
244
|
-
} else {
|
|
245
|
-
this.$refs.paged.$refs.grid.model.rows.forEach((item) => {
|
|
246
|
-
if (this.thisUserinfos.indexOf(item) === -1) {
|
|
247
|
-
this.thisUserinfos.push(item)
|
|
248
|
-
}
|
|
249
|
-
})
|
|
250
|
-
}
|
|
251
|
-
},
|
|
252
|
-
clearmsg () {
|
|
253
|
-
this.$refs.paged.$refs.cri.model={}
|
|
254
|
-
},
|
|
255
|
-
save () {
|
|
256
|
-
// 验证是否选择安检员
|
|
257
|
-
if (!this.checker) {
|
|
258
|
-
this.$showMessage('请选择安检员!!!')
|
|
259
|
-
}
|
|
260
|
-
if (this.type === 'one') {
|
|
261
|
-
// 如果选择了安检员则进行安检派发
|
|
262
|
-
let data = {
|
|
263
|
-
username: this.$login.f.name,
|
|
264
|
-
userid: this.$login.f.id,
|
|
265
|
-
checkid: this.checker.id,
|
|
266
|
-
checkname: this.checker.name,
|
|
267
|
-
userename:this.$login.f.ename,
|
|
268
|
-
itemdata: this.itemRowData,
|
|
269
|
-
// 一次派单
|
|
270
|
-
serviceacitivity: [{
|
|
271
|
-
f_service_acitivity_type: '预约单'
|
|
272
|
-
}]
|
|
273
|
-
}
|
|
274
|
-
// 派发业务逻辑
|
|
275
|
-
let rest = new HttpResetClass()
|
|
276
|
-
rest.load('post','rs/logic/WorkorderOneCheckNew',data,
|
|
277
|
-
{resolveMsg: '派发成功!!!', rejectMsg: '派发失败~~~'})
|
|
278
|
-
.then((res) => {
|
|
279
|
-
this.$refs.paged.$refs.cri.search()
|
|
280
|
-
this.showVisit = false
|
|
281
|
-
this.checkeds = false
|
|
282
|
-
})
|
|
283
|
-
} else if (this.type === 'two') {
|
|
284
|
-
let rest = new HttpResetClass()
|
|
285
|
-
let data = {
|
|
286
|
-
itemdata: this.thisUserinfos,
|
|
287
|
-
username: this.$login.f.name,
|
|
288
|
-
userid: this.$login.f.id,
|
|
289
|
-
userename:this.$login.f.ename,
|
|
290
|
-
checkid: this.checker.id,
|
|
291
|
-
checkname: this.checker.name,
|
|
292
|
-
// 一次派单
|
|
293
|
-
serviceacitivity: [{
|
|
294
|
-
f_service_acitivity_type: '派单'
|
|
295
|
-
}]
|
|
296
|
-
}
|
|
297
|
-
//批量派发
|
|
298
|
-
rest.load('post','rs/logic/BatchDistributedPlan',data,
|
|
299
|
-
{resolveMsg:null})
|
|
300
|
-
.then((res) => {
|
|
301
|
-
//tag
|
|
302
|
-
this.$showMessage( `派发成功${res.data.success_count}条,失败${res.data.error_count}条`)
|
|
303
|
-
this.showVisit = false
|
|
304
|
-
this.checkeds = false
|
|
305
|
-
this.$refs.paged.$refs.cri.search()
|
|
306
|
-
})
|
|
307
|
-
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
},
|
|
311
|
-
closeedit () {
|
|
312
|
-
this.showVisit = false
|
|
313
|
-
},
|
|
314
|
-
distributed (row) {
|
|
315
|
-
let data = {
|
|
316
|
-
items: '*',
|
|
317
|
-
tablename: 't_check_paper',
|
|
318
|
-
condition: `f_userinfoid = '${row.f_userinfo_id}'`,
|
|
319
|
-
orderitem: 'f_offsite_time desc'
|
|
320
|
-
}
|
|
321
|
-
new HttpResetClass().load('POST', `rs/sql/tel_singleTable_OrderBy`, {data: data}, {
|
|
322
|
-
resolveMsg: null,
|
|
323
|
-
rejectMsg: null
|
|
324
|
-
}).then(response=>{
|
|
325
|
-
if (response.data.length > 0 && response.data[0].f_entry_status == '到访不遇'){
|
|
326
|
-
this.checker = {id: response.data[0].f_checker_id, name: response.data[0].f_checker_name}
|
|
327
|
-
}
|
|
328
|
-
this.itemRowData = row
|
|
329
|
-
this.type = 'one'
|
|
330
|
-
this.showVisit = true
|
|
331
|
-
}).catch(error=>{
|
|
332
|
-
this.itemRowData = row
|
|
333
|
-
this.type = 'one'
|
|
334
|
-
this.showVisit = true
|
|
335
|
-
})
|
|
336
|
-
},
|
|
337
|
-
distributeds () {
|
|
338
|
-
if (this.thisUserinfos.length <= 0) {
|
|
339
|
-
return this.$showMessage('请选择需要下发的用户,至少选择一条用户~~~')
|
|
340
|
-
}
|
|
341
|
-
this.type = 'two'
|
|
342
|
-
this.showVisit = true
|
|
343
|
-
},
|
|
344
|
-
// 获取安检员
|
|
345
|
-
getEmps () {
|
|
346
|
-
let val = {source: 'tool.getChildrenOfResName($安检员$)', userid: `${this.$login.f.id}`}
|
|
347
|
-
let http = new HttpResetClass()
|
|
348
|
-
http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
|
|
349
|
-
let result = res.data.filter(res => res.orgid === this.$login.f.orgid)
|
|
350
|
-
//tag
|
|
351
|
-
result.forEach((item) => {
|
|
352
|
-
this.repairers.push({label: item.name, value: {id: item.id, name: item.name}})
|
|
353
|
-
//tag
|
|
354
|
-
})
|
|
355
|
-
})
|
|
356
|
-
},
|
|
357
|
-
getRes (obj) {
|
|
358
|
-
this.f_filiale_id = this.$login.convertToIn(obj.resids)
|
|
359
|
-
},
|
|
360
|
-
selfSearch (args) {
|
|
361
|
-
this.model.f_filiale_id = this.f_filiale_id // 只有选择了下面的条件才会变化
|
|
362
|
-
if (this.f_created_date) {
|
|
363
|
-
args.condition += ` and f_created_date >= ${this.f_created_date}`
|
|
364
|
-
}
|
|
365
|
-
if (args.model.source && args.model.source == '微信公众号'){
|
|
366
|
-
args.condition += ` and ( tswo.f_operator = '微信公众号' ) `
|
|
367
|
-
}else if (args.model.source && args.model.source != '微信公众号'){
|
|
368
|
-
args.condition += ` and ( tap.userid = '${this.$login.f.name}') `
|
|
369
|
-
}else {
|
|
370
|
-
args.condition += ` and ( tap.userid = '${this.$login.f.name}' or tswo.f_operator = '微信公众号') `
|
|
371
|
-
}
|
|
372
|
-
args.condition = ' and ' + args.condition
|
|
373
|
-
return this.model.search(args.condition, args.model)
|
|
374
|
-
}
|
|
375
|
-
},
|
|
376
|
-
computed: {},
|
|
377
|
-
watch: {
|
|
378
|
-
'thisUserinfos': function () {
|
|
379
|
-
if (this.thisUserinfos.length !== this.$refs.paged.$refs.grid.model.rows.length) {
|
|
380
|
-
this.checkeds = false
|
|
381
|
-
} else {
|
|
382
|
-
this.checked = true
|
|
383
|
-
}
|
|
384
|
-
},
|
|
385
|
-
'checkeds': function () {
|
|
386
|
-
if (!this.checkeds) {
|
|
387
|
-
this.thisUserinfos = []
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
},
|
|
391
|
-
ready () {
|
|
392
|
-
//tag)
|
|
393
|
-
// this.$refs.paged.$refs.cri.search()
|
|
394
|
-
this.getEmps()
|
|
395
|
-
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
}
|
|
399
|
-
</script>
|
|
400
|
-
|
|
401
|
-
<style scoped>
|
|
402
|
-
input[type = 'checkbox'] {
|
|
403
|
-
width: 20px;
|
|
404
|
-
height: 20px;
|
|
405
|
-
}
|
|
406
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex">
|
|
3
|
+
<section>
|
|
4
|
+
<div class="basic-main row" style="height: 100%">
|
|
5
|
+
<criteria-paged :model="model" v-ref:paged>
|
|
6
|
+
<criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
|
|
7
|
+
<div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
|
|
8
|
+
<div class="row">
|
|
9
|
+
<div class="col-sm-4" style="width: 20%">
|
|
10
|
+
<label class="font_normal_body"> 公 司 </label>
|
|
11
|
+
<right-tree :userid.sync='$parent.$parent.userid' style="width: 60%;"
|
|
12
|
+
:source.sync='$parent.$parent.source' @re-res="$parent.$parent.getRes"></right-tree>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="col-sm-4" style="width: 20%">
|
|
15
|
+
<label class="font_normal_body">用户编号</label>
|
|
16
|
+
<input type="text" class="input_search" v-model="model.f_userinfo_code" style="width:60%;"
|
|
17
|
+
placeholder="用户编号" condition="tswo.f_userinfo_code = '{}'"/>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="col-sm-4" style="width: 20%">
|
|
20
|
+
<label class="font_normal_body">用户名称</label>
|
|
21
|
+
<input type="text" class="input_search" v-model="model.f_user_name" style="width:60%;"
|
|
22
|
+
placeholder="用户名称" condition="tswo.f_user_name = '%{}%'"/>
|
|
23
|
+
</div>
|
|
24
|
+
<div class="col-sm-4" style="width: 20%">
|
|
25
|
+
<label class="font_normal_body">详细地址</label>
|
|
26
|
+
<input type="text" class="input_search" v-model="model.f_address" style="width:60%;"
|
|
27
|
+
placeholder="详细地址" condition="tswo.f_address like '%{}%'"/>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="row">
|
|
31
|
+
<div class="col-sm-4" style="width: 20%">
|
|
32
|
+
<label class="font_normal_body">用户类型</label>
|
|
33
|
+
<v-select
|
|
34
|
+
placeholder='用户类型'
|
|
35
|
+
class="select select_list"
|
|
36
|
+
style="width: 60%"
|
|
37
|
+
:value.sync="model.f_user_type"
|
|
38
|
+
:value-single="true"
|
|
39
|
+
:options='$parent.$parent.f_user_types'
|
|
40
|
+
v-model="model.f_user_type"
|
|
41
|
+
condition="f_user_type = '{}'"
|
|
42
|
+
close-on-select clear-button></v-select>
|
|
43
|
+
</div>
|
|
44
|
+
<div class="col-sm-4" style="width: 20%">
|
|
45
|
+
<label class="font_normal_body">工单来源</label>
|
|
46
|
+
<v-select
|
|
47
|
+
placeholder='工单来源'
|
|
48
|
+
class="select select_list"
|
|
49
|
+
style="width: 60%"
|
|
50
|
+
:value.sync="model.source"
|
|
51
|
+
:value-single="true"
|
|
52
|
+
:options='$parent.$parent.sources'
|
|
53
|
+
v-model="model.source"
|
|
54
|
+
close-on-select clear-button></v-select>
|
|
55
|
+
</div>
|
|
56
|
+
<div class="col-sm-4" style="width: 20%">
|
|
57
|
+
<label class="font_normal_body">创建时间</label>
|
|
58
|
+
<datepicker
|
|
59
|
+
:value.sync="model.f_created_date"
|
|
60
|
+
placeholder='创建时间'
|
|
61
|
+
style="width: 60%"
|
|
62
|
+
:disabled-days-of-week="[]"
|
|
63
|
+
condition="tswo.f_created_date = '{}'"
|
|
64
|
+
:show-rest-button="reset"
|
|
65
|
+
v-model="model.f_created_date">
|
|
66
|
+
</datepicker>
|
|
67
|
+
</div>
|
|
68
|
+
<div class="row">
|
|
69
|
+
<div class="span" style="float: right;width: 20%;">
|
|
70
|
+
<button class="button_spacing button_search" @click="$parent.$parent.distributeds()">批量派发</button>
|
|
71
|
+
<button type="button" name="button" class="button_search" @click="search">查询</button>
|
|
72
|
+
<button type="button" name="button" style="background-color: #5ac0d9;border-radius: 4px;"
|
|
73
|
+
class="button_spacing button_search" @click="$parent.$parent.clearmsg()">清空
|
|
74
|
+
</button>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</criteria>
|
|
80
|
+
<data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid @dblclick="">
|
|
81
|
+
<template partial='head'>
|
|
82
|
+
<tr>
|
|
83
|
+
<th >
|
|
84
|
+
<input type="checkbox" @click.stop="$parent.$parent.$parent.isAll()"
|
|
85
|
+
v-model="$parent.$parent.$parent.checkeds">
|
|
86
|
+
</th>
|
|
87
|
+
<th>
|
|
88
|
+
<nobr>用户编号</nobr>
|
|
89
|
+
</th>
|
|
90
|
+
<th>
|
|
91
|
+
<nobr>工单编号</nobr>
|
|
92
|
+
</th>
|
|
93
|
+
<th>
|
|
94
|
+
<nobr>用户名称</nobr>
|
|
95
|
+
</th>
|
|
96
|
+
<th>
|
|
97
|
+
<nobr>用户类型</nobr>
|
|
98
|
+
</th>
|
|
99
|
+
<th>
|
|
100
|
+
<nobr>用户地址</nobr>
|
|
101
|
+
</th>
|
|
102
|
+
<th>
|
|
103
|
+
<nobr>计划创建时间</nobr>
|
|
104
|
+
</th>
|
|
105
|
+
<th>
|
|
106
|
+
<nobr>计划创建人</nobr>
|
|
107
|
+
</th>
|
|
108
|
+
<th>
|
|
109
|
+
<nobr>来源</nobr>
|
|
110
|
+
</th>
|
|
111
|
+
<th>
|
|
112
|
+
<nobr>公司名称</nobr>
|
|
113
|
+
</th>
|
|
114
|
+
<th>
|
|
115
|
+
<nobr>备注</nobr>
|
|
116
|
+
</th>
|
|
117
|
+
<th>
|
|
118
|
+
<nobr>操作</nobr>
|
|
119
|
+
</th>
|
|
120
|
+
</tr>
|
|
121
|
+
</template>
|
|
122
|
+
<template partial='body'>
|
|
123
|
+
<tr>
|
|
124
|
+
<td style="text-align:center" >
|
|
125
|
+
<input type="checkbox" :value="row" v-model="$parent.$parent.$parent.thisUserinfos" onClick="event.cancelBubble = true">
|
|
126
|
+
</td>
|
|
127
|
+
<td style="text-align:center">
|
|
128
|
+
<nobr>{{ row.f_userinfo_id }}</nobr>
|
|
129
|
+
</td>
|
|
130
|
+
<td style="text-align:center">
|
|
131
|
+
<nobr>{{ row.f_service_id }}</nobr>
|
|
132
|
+
</td>
|
|
133
|
+
<td style="text-align:center">
|
|
134
|
+
<nobr>{{ row.f_user_name }}</nobr>
|
|
135
|
+
</td>
|
|
136
|
+
<td style="text-align:center">
|
|
137
|
+
<nobr>{{ row.f_user_type }}</nobr>
|
|
138
|
+
</td>
|
|
139
|
+
<td style="text-align:center">
|
|
140
|
+
<nobr>{{ row.f_address }}</nobr>
|
|
141
|
+
</td>
|
|
142
|
+
<td style="text-align:center">
|
|
143
|
+
<nobr>{{ row.f_created_date }}</nobr>
|
|
144
|
+
</td>
|
|
145
|
+
<td style="text-align:center">
|
|
146
|
+
<nobr>{{ row.f_operator }}</nobr>
|
|
147
|
+
</td>
|
|
148
|
+
<td style="text-align:center">
|
|
149
|
+
<nobr>{{ row.f_operator == '微信公众号' ? '微信公众号' : '客服' }}</nobr>
|
|
150
|
+
</td>
|
|
151
|
+
<td style="text-align:center">
|
|
152
|
+
<nobr>{{ row.f_filiale }}</nobr>
|
|
153
|
+
</td>
|
|
154
|
+
<td style="text-align:center">
|
|
155
|
+
<nobr>{{ row.f_remarks}}</nobr>
|
|
156
|
+
</td>
|
|
157
|
+
<td style="text-align: center">
|
|
158
|
+
<button-link type="button" class="btn btn-link" @click="$parent.$parent.$parent.distributed(row)">
|
|
159
|
+
派发
|
|
160
|
+
</button-link>
|
|
161
|
+
<button-link type="button" class="btn btn-link" class="button_spacing button_search-2"
|
|
162
|
+
@click.stop="$parent.$parent.$parent.deletesafechecklist(row)">删除
|
|
163
|
+
</button-link>
|
|
164
|
+
</td>
|
|
165
|
+
</tr>
|
|
166
|
+
</template>
|
|
167
|
+
</data-grid>
|
|
168
|
+
</criteria-paged>
|
|
169
|
+
</div>
|
|
170
|
+
</section>
|
|
171
|
+
</div>
|
|
172
|
+
<!--预约安检单派发 -->
|
|
173
|
+
<modal :show.sync=showVisit v-ref:modal backdrop="false">
|
|
174
|
+
<header slot="modal-header" class="modal-header">
|
|
175
|
+
<h4 class="modal-title">预约安检单派发</h4>
|
|
176
|
+
</header>
|
|
177
|
+
<article slot="modal-body" class="modal-body">
|
|
178
|
+
<div class="row">
|
|
179
|
+
<div class="col-sm-6 form-group form-fix-width">
|
|
180
|
+
<label class="font_normal_body" style="width: 30%">安 检 员</label>
|
|
181
|
+
<v-select :value-single="true" :value.sync="checker"
|
|
182
|
+
:options='repairers' placeholder='请选择安检员'
|
|
183
|
+
close-on-select style="width: 60%" v-ref:name></v-select>
|
|
184
|
+
<textarea placeholder="备注" v-show="false"></textarea>
|
|
185
|
+
</div>
|
|
186
|
+
</div>
|
|
187
|
+
</article>
|
|
188
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
189
|
+
<button v-show="true" type="button" class="btn btn-default" @click='closeedit'>取消</button>
|
|
190
|
+
<button v-show="true" type="button" class="btn btn-success" v-on:click='save'>派发</button>
|
|
191
|
+
</footer>
|
|
192
|
+
</modal>
|
|
193
|
+
</template>
|
|
194
|
+
<script>
|
|
195
|
+
import {PagedList, HttpResetClass} from 'vue-client'
|
|
196
|
+
|
|
197
|
+
export default {
|
|
198
|
+
title: '工单安检预约单派发',
|
|
199
|
+
data () {
|
|
200
|
+
let model = new PagedList('rs/sql/WorkorderCheckDistributePlanNew', 20, {
|
|
201
|
+
f_filiale_id: 'this.f_filiale_id'
|
|
202
|
+
})
|
|
203
|
+
model.f_filiale_id = `('${this.$login.f.orgid}')`
|
|
204
|
+
return {
|
|
205
|
+
f_filiale_id: `('${this.$login.f.orgid}')`, // 分公司id
|
|
206
|
+
model: model,
|
|
207
|
+
checked: true,
|
|
208
|
+
showVisit: false,
|
|
209
|
+
checkeds: false,
|
|
210
|
+
sources:[{label: '全部', value: ''}, {label: '微信公众号', value: '微信公众号'}, {label: '客服', value: '客服'}],
|
|
211
|
+
thisUserinfos: [],
|
|
212
|
+
checker: {},
|
|
213
|
+
userid: this.$login.f.id,
|
|
214
|
+
source: 'tool.getFullTree(this.getRights().where(row.getType() != $zone$).where(row.getType() == $organization$))',
|
|
215
|
+
f_issueds: [{label: '全部', value: ''}, {label: '是', value: '是'}, {label: '否', value: '否'}],
|
|
216
|
+
f_user_types: [{label: '全部', value: ''}, {label: '民用', value: '民用'}, {label: '非民用', value: '非民用'}],
|
|
217
|
+
repairers: [],
|
|
218
|
+
type: 'one', // one 或者 two
|
|
219
|
+
rowdate:null,
|
|
220
|
+
itemRowData: null // 选择单个派发的数据
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
methods: {
|
|
224
|
+
deletesafechecklist (val) {
|
|
225
|
+
this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
|
|
226
|
+
if (res === 'confirm') {
|
|
227
|
+
let rowdate ={
|
|
228
|
+
rowda:val,
|
|
229
|
+
userename:this.$login.f.ename,
|
|
230
|
+
username: this.$login.f.name,
|
|
231
|
+
serviceacitivity: [{
|
|
232
|
+
f_service_acitivity_type: '撤销'
|
|
233
|
+
}]
|
|
234
|
+
}
|
|
235
|
+
this.$resetpost('rs/logic/deleteworkorederUser', rowdate,{resolveMsg: '删除成功!!!', rejectMsg: '删除失败~~~'}).then((res) => {
|
|
236
|
+
this.$refs.paged.$refs.cri.search()
|
|
237
|
+
})
|
|
238
|
+
}
|
|
239
|
+
})
|
|
240
|
+
},
|
|
241
|
+
isAll () {
|
|
242
|
+
if (this.checkeds) {
|
|
243
|
+
this.thisUserinfos = []
|
|
244
|
+
} else {
|
|
245
|
+
this.$refs.paged.$refs.grid.model.rows.forEach((item) => {
|
|
246
|
+
if (this.thisUserinfos.indexOf(item) === -1) {
|
|
247
|
+
this.thisUserinfos.push(item)
|
|
248
|
+
}
|
|
249
|
+
})
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
clearmsg () {
|
|
253
|
+
this.$refs.paged.$refs.cri.model={}
|
|
254
|
+
},
|
|
255
|
+
save () {
|
|
256
|
+
// 验证是否选择安检员
|
|
257
|
+
if (!this.checker) {
|
|
258
|
+
this.$showMessage('请选择安检员!!!')
|
|
259
|
+
}
|
|
260
|
+
if (this.type === 'one') {
|
|
261
|
+
// 如果选择了安检员则进行安检派发
|
|
262
|
+
let data = {
|
|
263
|
+
username: this.$login.f.name,
|
|
264
|
+
userid: this.$login.f.id,
|
|
265
|
+
checkid: this.checker.id,
|
|
266
|
+
checkname: this.checker.name,
|
|
267
|
+
userename:this.$login.f.ename,
|
|
268
|
+
itemdata: this.itemRowData,
|
|
269
|
+
// 一次派单
|
|
270
|
+
serviceacitivity: [{
|
|
271
|
+
f_service_acitivity_type: '预约单'
|
|
272
|
+
}]
|
|
273
|
+
}
|
|
274
|
+
// 派发业务逻辑
|
|
275
|
+
let rest = new HttpResetClass()
|
|
276
|
+
rest.load('post','rs/logic/WorkorderOneCheckNew',data,
|
|
277
|
+
{resolveMsg: '派发成功!!!', rejectMsg: '派发失败~~~'})
|
|
278
|
+
.then((res) => {
|
|
279
|
+
this.$refs.paged.$refs.cri.search()
|
|
280
|
+
this.showVisit = false
|
|
281
|
+
this.checkeds = false
|
|
282
|
+
})
|
|
283
|
+
} else if (this.type === 'two') {
|
|
284
|
+
let rest = new HttpResetClass()
|
|
285
|
+
let data = {
|
|
286
|
+
itemdata: this.thisUserinfos,
|
|
287
|
+
username: this.$login.f.name,
|
|
288
|
+
userid: this.$login.f.id,
|
|
289
|
+
userename:this.$login.f.ename,
|
|
290
|
+
checkid: this.checker.id,
|
|
291
|
+
checkname: this.checker.name,
|
|
292
|
+
// 一次派单
|
|
293
|
+
serviceacitivity: [{
|
|
294
|
+
f_service_acitivity_type: '派单'
|
|
295
|
+
}]
|
|
296
|
+
}
|
|
297
|
+
//批量派发
|
|
298
|
+
rest.load('post','rs/logic/BatchDistributedPlan',data,
|
|
299
|
+
{resolveMsg:null})
|
|
300
|
+
.then((res) => {
|
|
301
|
+
//tag
|
|
302
|
+
this.$showMessage( `派发成功${res.data.success_count}条,失败${res.data.error_count}条`)
|
|
303
|
+
this.showVisit = false
|
|
304
|
+
this.checkeds = false
|
|
305
|
+
this.$refs.paged.$refs.cri.search()
|
|
306
|
+
})
|
|
307
|
+
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
},
|
|
311
|
+
closeedit () {
|
|
312
|
+
this.showVisit = false
|
|
313
|
+
},
|
|
314
|
+
distributed (row) {
|
|
315
|
+
let data = {
|
|
316
|
+
items: '*',
|
|
317
|
+
tablename: 't_check_paper',
|
|
318
|
+
condition: `f_userinfoid = '${row.f_userinfo_id}'`,
|
|
319
|
+
orderitem: 'f_offsite_time desc'
|
|
320
|
+
}
|
|
321
|
+
new HttpResetClass().load('POST', `rs/sql/tel_singleTable_OrderBy`, {data: data}, {
|
|
322
|
+
resolveMsg: null,
|
|
323
|
+
rejectMsg: null
|
|
324
|
+
}).then(response=>{
|
|
325
|
+
if (response.data.length > 0 && response.data[0].f_entry_status == '到访不遇'){
|
|
326
|
+
this.checker = {id: response.data[0].f_checker_id, name: response.data[0].f_checker_name}
|
|
327
|
+
}
|
|
328
|
+
this.itemRowData = row
|
|
329
|
+
this.type = 'one'
|
|
330
|
+
this.showVisit = true
|
|
331
|
+
}).catch(error=>{
|
|
332
|
+
this.itemRowData = row
|
|
333
|
+
this.type = 'one'
|
|
334
|
+
this.showVisit = true
|
|
335
|
+
})
|
|
336
|
+
},
|
|
337
|
+
distributeds () {
|
|
338
|
+
if (this.thisUserinfos.length <= 0) {
|
|
339
|
+
return this.$showMessage('请选择需要下发的用户,至少选择一条用户~~~')
|
|
340
|
+
}
|
|
341
|
+
this.type = 'two'
|
|
342
|
+
this.showVisit = true
|
|
343
|
+
},
|
|
344
|
+
// 获取安检员
|
|
345
|
+
getEmps () {
|
|
346
|
+
let val = {source: 'tool.getChildrenOfResName($安检员$)', userid: `${this.$login.f.id}`}
|
|
347
|
+
let http = new HttpResetClass()
|
|
348
|
+
http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
|
|
349
|
+
let result = res.data.filter(res => res.orgid === this.$login.f.orgid)
|
|
350
|
+
//tag
|
|
351
|
+
result.forEach((item) => {
|
|
352
|
+
this.repairers.push({label: item.name, value: {id: item.id, name: item.name}})
|
|
353
|
+
//tag
|
|
354
|
+
})
|
|
355
|
+
})
|
|
356
|
+
},
|
|
357
|
+
getRes (obj) {
|
|
358
|
+
this.f_filiale_id = this.$login.convertToIn(obj.resids)
|
|
359
|
+
},
|
|
360
|
+
selfSearch (args) {
|
|
361
|
+
this.model.f_filiale_id = this.f_filiale_id // 只有选择了下面的条件才会变化
|
|
362
|
+
if (this.f_created_date) {
|
|
363
|
+
args.condition += ` and f_created_date >= ${this.f_created_date}`
|
|
364
|
+
}
|
|
365
|
+
if (args.model.source && args.model.source == '微信公众号'){
|
|
366
|
+
args.condition += ` and ( tswo.f_operator = '微信公众号' ) `
|
|
367
|
+
}else if (args.model.source && args.model.source != '微信公众号'){
|
|
368
|
+
args.condition += ` and ( tap.userid = '${this.$login.f.name}') `
|
|
369
|
+
}else {
|
|
370
|
+
args.condition += ` and ( tap.userid = '${this.$login.f.name}' or tswo.f_operator = '微信公众号') `
|
|
371
|
+
}
|
|
372
|
+
args.condition = ' and ' + args.condition
|
|
373
|
+
return this.model.search(args.condition, args.model)
|
|
374
|
+
}
|
|
375
|
+
},
|
|
376
|
+
computed: {},
|
|
377
|
+
watch: {
|
|
378
|
+
'thisUserinfos': function () {
|
|
379
|
+
if (this.thisUserinfos.length !== this.$refs.paged.$refs.grid.model.rows.length) {
|
|
380
|
+
this.checkeds = false
|
|
381
|
+
} else {
|
|
382
|
+
this.checked = true
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
'checkeds': function () {
|
|
386
|
+
if (!this.checkeds) {
|
|
387
|
+
this.thisUserinfos = []
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
ready () {
|
|
392
|
+
//tag)
|
|
393
|
+
// this.$refs.paged.$refs.cri.search()
|
|
394
|
+
this.getEmps()
|
|
395
|
+
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
}
|
|
399
|
+
</script>
|
|
400
|
+
|
|
401
|
+
<style scoped>
|
|
402
|
+
input[type = 'checkbox'] {
|
|
403
|
+
width: 20px;
|
|
404
|
+
height: 20px;
|
|
405
|
+
}
|
|
406
|
+
</style>
|