telephone-clients 3.0.102 → 3.0.103
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/App.vue +56 -52
- package/src/components/MaterialsManage/MaterialsBase.vue +177 -177
- package/src/components/Util/RightTreeSafe.vue +346 -346
- package/src/components/pc/NewRepairPaper.vue +370 -370
- package/src/components/pc/SiteSend.vue +281 -281
- package/src/components/pc/WorkCenterList.vue +292 -292
- package/src/components/pc/WorkListAllNew.vue +700 -700
- package/src/components/temp/ChangemeterInfo.vue +87 -87
- package/src/components/temp/DeviceInfo.vue +82 -82
- package/src/components/workorder/FaultAll.vue +826 -826
- package/src/components/workorder/PhoneStandWork.vue +354 -354
- package/src/components/workorder/RepairOrderV.vue +1446 -1446
- package/src/filiale/furuike/pc/ComplainWork.vue +348 -348
- package/src/filiale/furuike/pc/Seekwork.vue +352 -352
- package/src/filiale/gongyi/android/RepairOrderV.vue +1415 -1415
- package/src/filiale/liaoyuan/android/RepairOrderV.vue +831 -831
- package/src/filiale/qianneng/android/FaultAll.vue +883 -883
- package/src/filiale/qianneng/android/MaterIialOne.vue +123 -123
- package/src/filiale/qianneng/android/RepairOrderV.vue +874 -874
- package/src/filiale/qianneng/android/chargesList.vue +161 -161
- package/src/filiale/qianneng/pc/NewRepairPaper.vue +467 -467
- package/src/filiale/qianneng/pc/RepairsWork.vue +982 -982
- package/src/filiale/qianneng/pc/WorkListAllNew.vue +701 -701
- package/src/filiale/shanxian/pc/WorkList.vue +823 -823
- package/src/filiale/shanxian/telephone.js +12 -12
- package/src/filiale/shexian/android/AddMyTask.vue +347 -0
- package/src/filiale/shexian/android/Outlay.vue +249 -249
- package/src/filiale/shexian/pc/WorkList.vue +740 -0
- package/src/filiale/shexian/telephone.js +18 -17
- package/src/filiale/shexian/telephoneAndroid.js +26 -23
- package/src/filiale/tongchuan/pc/UserWork.vue +805 -805
- package/src/filiale/wenxi/android/RepairOrderV.vue +1419 -1419
- package/src/filiale/wuan/android/RepairOrderV.vue +1384 -1384
- package/src/filiale/zhongsheng/android/RepairOrderV.vue +1430 -1430
- package/src/filiale/zhongsheng/pc/RepairsWork.vue +775 -775
- package/src/filiale/zhongsheng/telephone.js +23 -23
- package/src/main.js +1 -1
- package/yarn-error.log +7872 -0
|
@@ -1,281 +1,281 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="form-horizontal select-overspread container-fluid auto" >
|
|
3
|
-
<work-busy :is-busy="saveing" v-show="saveing"></work-busy>
|
|
4
|
-
<div class="row" v-if="rowlist.length===0">
|
|
5
|
-
<div class="col-sm-5 form-group form-input-group">
|
|
6
|
-
<label class="col-sm-5">工单编号:</label><span>{{ row.f_service_id }}</span>
|
|
7
|
-
</div>
|
|
8
|
-
</div>
|
|
9
|
-
<div class="row" v-if="rowlist.length===0">
|
|
10
|
-
<div class="col-sm-5 form-group form-input-group">
|
|
11
|
-
<label class="col-sm-5">备注信息:</label><span>{{ row.f_remarks }}</span>
|
|
12
|
-
</div>
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
<progress-bar v-if="btnshow" :label="bartext" :color="barcolor" :percentage="barperc"
|
|
16
|
-
:height="barheight"></progress-bar>
|
|
17
|
-
<div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
|
|
18
|
-
<div class="row">
|
|
19
|
-
<div class="col-sm-5 form-group form-input-group">
|
|
20
|
-
<label class="col-sm-5" >接 单 人:</label>
|
|
21
|
-
<v-select :value="row.serviceacitivity[0].f_reciever" :value-single="true"
|
|
22
|
-
:options='repairers' placeholder='选择接单人'
|
|
23
|
-
close-on-select v-on:change="repiarmancg" :max-height="120"></v-select>
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
<div class="row" v-if="rowlist.length===0">
|
|
27
|
-
<div class="col-sm-5 form-group form-input-group">
|
|
28
|
-
<label class="col-sm-5" >指导建议:</label>
|
|
29
|
-
<input type="text" class="form-control" v-model="f_advice" v-if="!show">
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
<button style="float: right;" type="button" name="button" class="button_search button_spacing"
|
|
33
|
-
@click="$emit('cancel')">取消
|
|
34
|
-
</button>
|
|
35
|
-
|
|
36
|
-
<button v-if="rowlist.length===0" style="float: right;" type="button" name="button" class="button_search button_spacing" @click="worksend()">
|
|
37
|
-
下发
|
|
38
|
-
</button>
|
|
39
|
-
<button v-if="!(rowlist.length===0)" style="float: right;" type="button" name="button" class="button_search button_spacing" @click="worksendall()">批量下发</button>
|
|
40
|
-
</div>
|
|
41
|
-
</template>
|
|
42
|
-
<script>
|
|
43
|
-
import {HttpResetClass} from 'vue-client'
|
|
44
|
-
import Vue from 'vue'
|
|
45
|
-
|
|
46
|
-
export default {
|
|
47
|
-
title: '站点工单下发',
|
|
48
|
-
props: {
|
|
49
|
-
// 报修单,不含关联关系
|
|
50
|
-
row: {
|
|
51
|
-
type: Object
|
|
52
|
-
},
|
|
53
|
-
model: {
|
|
54
|
-
type: Object
|
|
55
|
-
},
|
|
56
|
-
rowlist: [],
|
|
57
|
-
source: '',
|
|
58
|
-
search_source: ''
|
|
59
|
-
},
|
|
60
|
-
data () {
|
|
61
|
-
return {
|
|
62
|
-
saveing:false,
|
|
63
|
-
show: false,
|
|
64
|
-
btnshow: false,
|
|
65
|
-
repairers: [],
|
|
66
|
-
f_advice: '',
|
|
67
|
-
bartext: '',
|
|
68
|
-
barperc: 0,
|
|
69
|
-
barheight: 15,
|
|
70
|
-
barcolor: '#7697c4',
|
|
71
|
-
model: {
|
|
72
|
-
type: Object
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
ready () {
|
|
77
|
-
console.log("99969996",this.rowlist)
|
|
78
|
-
this.getEmp()
|
|
79
|
-
this.row.serviceacitivity = [{
|
|
80
|
-
f_service_acitivity_type: '派单'
|
|
81
|
-
}]
|
|
82
|
-
},
|
|
83
|
-
watch: {
|
|
84
|
-
// 报修单发生改变,给报修单设置默认派单对象
|
|
85
|
-
'row' (val) {
|
|
86
|
-
this.row.serviceacitivity = [{
|
|
87
|
-
f_service_acitivity_type: '派单'
|
|
88
|
-
}]
|
|
89
|
-
this.repairers = []
|
|
90
|
-
this.getEmp()
|
|
91
|
-
},
|
|
92
|
-
'rowlist' (val) {
|
|
93
|
-
//tag
|
|
94
|
-
//tag
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
methods: {
|
|
98
|
-
repiarmancg (val) {
|
|
99
|
-
if (val.isTrusted){
|
|
100
|
-
return
|
|
101
|
-
}
|
|
102
|
-
if (val) {
|
|
103
|
-
this.row.serviceacitivity[0].f_reciever = val
|
|
104
|
-
let http1 = new HttpResetClass()
|
|
105
|
-
http1.load('POST', 'rs/sql/tel_singleTable_OrderBy', {
|
|
106
|
-
data: {
|
|
107
|
-
items: 'f_user_telephone',
|
|
108
|
-
tablename: 't_user',
|
|
109
|
-
condition: `name = '${val}'`,
|
|
110
|
-
orderitem: 'id'
|
|
111
|
-
}
|
|
112
|
-
}, {resolveMsg: null, rejectMsg: null}).then((ress) => {
|
|
113
|
-
this.row.f_repairman_phone = ress.data[0].f_user_telephone
|
|
114
|
-
})
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
close () {
|
|
118
|
-
this.show = false
|
|
119
|
-
},
|
|
120
|
-
worksend () {
|
|
121
|
-
if (!this.row.serviceacitivity[0].f_reciever) {
|
|
122
|
-
return this.$showAlert('请选择接单人员', 'warning', 2000)
|
|
123
|
-
}
|
|
124
|
-
let userdata = Object.assign({}, userdata, this.row)
|
|
125
|
-
userdata.f_advice = this.f_advice
|
|
126
|
-
let data = ''
|
|
127
|
-
if (this.source == 'mobile') {
|
|
128
|
-
data = {
|
|
129
|
-
model: userdata,
|
|
130
|
-
loginUser: {name: Vue.user.name, ename: Vue.user.ename}
|
|
131
|
-
// adduser:{userinfo: result, devices: []}
|
|
132
|
-
}
|
|
133
|
-
} else {
|
|
134
|
-
data = {
|
|
135
|
-
model: userdata,
|
|
136
|
-
loginUser: {name: this.$login.f.name, ename: this.$login.f.ename}
|
|
137
|
-
// adduser:{userinfo: result, devices: []}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
data.message = true
|
|
141
|
-
this.saveing = true
|
|
142
|
-
let HttpReset = new HttpResetClass()
|
|
143
|
-
// 将数据发送给业务逻辑
|
|
144
|
-
if (this.source == 'mobile') {
|
|
145
|
-
HttpReset.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/siteSend`, data).then((res) => {
|
|
146
|
-
if (res.data.code == 300) {
|
|
147
|
-
this.saveing = false
|
|
148
|
-
this.$emit('success')
|
|
149
|
-
return this.$showAlert('该单已被派发!', 'warning', 3500)
|
|
150
|
-
} else {
|
|
151
|
-
this.saveing = false
|
|
152
|
-
this.$emit('success')
|
|
153
|
-
return this.$showAlert('派发成功!', 'success', 3500)
|
|
154
|
-
}
|
|
155
|
-
})
|
|
156
|
-
} else {
|
|
157
|
-
HttpReset.load('POST', 'rs/logic/siteSend', data).then((res) => {
|
|
158
|
-
if (res.data.code == 300) {
|
|
159
|
-
this.saveing = false
|
|
160
|
-
this.$emit('success')
|
|
161
|
-
return this.$showAlert('该单已被派发!', 'warning', 3500)
|
|
162
|
-
} else {
|
|
163
|
-
this.saveing = false
|
|
164
|
-
this.$emit('success')
|
|
165
|
-
return this.$showAlert('派发成功!', 'success', 3500)
|
|
166
|
-
}
|
|
167
|
-
})
|
|
168
|
-
}
|
|
169
|
-
},
|
|
170
|
-
//批量下发
|
|
171
|
-
worksendall: async function () {
|
|
172
|
-
if (!this.row.serviceacitivity[0].f_reciever) {
|
|
173
|
-
return this.$showAlert('请选择维修人员', 'warning', 2000)
|
|
174
|
-
}
|
|
175
|
-
if (this.rowlist.length > 0 && this.rowlist.length < 100) {
|
|
176
|
-
this.bartext = '正在批量下发' + this.rowlist.length + '个单子'
|
|
177
|
-
this.btnshow = true
|
|
178
|
-
this.$showAlert('正在批量下发,请稍等!!!!!', 'warning', 2000)
|
|
179
|
-
this.saveing = true
|
|
180
|
-
for (var index in this.rowlist) {
|
|
181
|
-
this.barperc = ((parseInt(index) + 1) * 100) / (parseInt(this.rowlist.length))
|
|
182
|
-
//this.barperc=parseInt((parseInt(index)+1)/this.rowlist.length)*100)
|
|
183
|
-
//tag
|
|
184
|
-
//tag
|
|
185
|
-
// let result = ''
|
|
186
|
-
// if(this.rowlist[index].f_repairtype == '置换通气'){
|
|
187
|
-
// result = this.getUserfile(this.rowlist[index])
|
|
188
|
-
// //tag)
|
|
189
|
-
// }
|
|
190
|
-
this.rowlist[index].serviceacitivity = this.row.serviceacitivity
|
|
191
|
-
let userdata = Object.assign({}, userdata, this.rowlist[index])
|
|
192
|
-
userdata.f_advice = this.f_advice
|
|
193
|
-
let data = {
|
|
194
|
-
model: userdata,
|
|
195
|
-
loginUser: {name: this.$login.f.name, ename: this.$login.f.ename}
|
|
196
|
-
// adduser:{userinfo: result, devices: []}
|
|
197
|
-
}
|
|
198
|
-
let gen = await this.sendmsg(data)
|
|
199
|
-
//tag
|
|
200
|
-
}
|
|
201
|
-
this.saveing = false
|
|
202
|
-
this.btnshow = false
|
|
203
|
-
this.barperc = 0
|
|
204
|
-
this.$showMessage('批量派发' + this.rowlist.length + '个单子成功', ['confirm']).then((res) => {
|
|
205
|
-
if (res === 'confirm') {
|
|
206
|
-
this.$emit('success')
|
|
207
|
-
// this.cleardate()
|
|
208
|
-
}
|
|
209
|
-
})
|
|
210
|
-
//tag
|
|
211
|
-
} else {
|
|
212
|
-
this.saveing = false
|
|
213
|
-
this.$showMessage('批量派发单子个数小于等于100个', ['confirm']).then((res) => {
|
|
214
|
-
if (res === 'confirm') {
|
|
215
|
-
//tag
|
|
216
|
-
}
|
|
217
|
-
})
|
|
218
|
-
}
|
|
219
|
-
},
|
|
220
|
-
sendmsg: async function (data) {
|
|
221
|
-
try {
|
|
222
|
-
let http = new HttpResetClass()
|
|
223
|
-
let resChannel = await http.load('POST', `rs/logic/siteSend`, {data: data}, {resolveMsg: null, rejectMsg: null})
|
|
224
|
-
//tag
|
|
225
|
-
} catch (e) {
|
|
226
|
-
this.$showAlert('派单失败' + data.model.f_service_id)
|
|
227
|
-
}
|
|
228
|
-
},
|
|
229
|
-
getEmp () {
|
|
230
|
-
// 获取接单人数组
|
|
231
|
-
let val = ''
|
|
232
|
-
let http = new HttpResetClass()
|
|
233
|
-
if (this.source == 'mobile') {
|
|
234
|
-
val = {
|
|
235
|
-
// `this.getResourceById($${this.$login.f.orgid}$,$organization$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$).indexOf($维修员$)!=-1)`,
|
|
236
|
-
source: this.search_source?this.search_source:`this.getResourceById($${this.$login.f.depids}$,$department$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$).indexOf($维修员$)!=-1)`,
|
|
237
|
-
userid: `${Vue.user.id}`
|
|
238
|
-
}
|
|
239
|
-
http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/search`, {data: val}, {
|
|
240
|
-
resolveMsg: null,
|
|
241
|
-
rejectMsg: null
|
|
242
|
-
}).then((res) => {
|
|
243
|
-
// let result = res.data.filter(res=>res.depids==Vue.user.depids)
|
|
244
|
-
res.data.forEach((item) => {
|
|
245
|
-
this.repairers.push({label: item.name, value: item.name})
|
|
246
|
-
})
|
|
247
|
-
let temp = []
|
|
248
|
-
this.repairers = this.repairers.filter(item=>{
|
|
249
|
-
if (!temp.includes(item.label)){
|
|
250
|
-
temp.push(item.label)
|
|
251
|
-
return true
|
|
252
|
-
}
|
|
253
|
-
return false
|
|
254
|
-
})
|
|
255
|
-
})
|
|
256
|
-
} else {
|
|
257
|
-
val = {
|
|
258
|
-
source: this.search_source?this.search_source:`this.getResourceById($${this.$login.f.depids}$,$department$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$).indexOf($维修员$)!=-1)`,
|
|
259
|
-
userid: `${this.$login.f.id}`
|
|
260
|
-
}
|
|
261
|
-
http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
|
|
262
|
-
|
|
263
|
-
// let result = res.data.filter(res=>res.depids==this.$login.f.depids)
|
|
264
|
-
res.data.forEach((item) => {
|
|
265
|
-
this.repairers.push({label: item.name, value: item.name})
|
|
266
|
-
})
|
|
267
|
-
let temp = []
|
|
268
|
-
this.repairers = this.repairers.filter(item=>{
|
|
269
|
-
if (!temp.includes(item.label)){
|
|
270
|
-
temp.push(item.label)
|
|
271
|
-
return true
|
|
272
|
-
}
|
|
273
|
-
return false
|
|
274
|
-
})
|
|
275
|
-
})
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="form-horizontal select-overspread container-fluid auto" >
|
|
3
|
+
<work-busy :is-busy="saveing" v-show="saveing"></work-busy>
|
|
4
|
+
<div class="row" v-if="rowlist.length===0">
|
|
5
|
+
<div class="col-sm-5 form-group form-input-group">
|
|
6
|
+
<label class="col-sm-5">工单编号:</label><span>{{ row.f_service_id }}</span>
|
|
7
|
+
</div>
|
|
8
|
+
</div>
|
|
9
|
+
<div class="row" v-if="rowlist.length===0">
|
|
10
|
+
<div class="col-sm-5 form-group form-input-group">
|
|
11
|
+
<label class="col-sm-5">备注信息:</label><span>{{ row.f_remarks }}</span>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
<progress-bar v-if="btnshow" :label="bartext" :color="barcolor" :percentage="barperc"
|
|
16
|
+
:height="barheight"></progress-bar>
|
|
17
|
+
<div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
|
|
18
|
+
<div class="row">
|
|
19
|
+
<div class="col-sm-5 form-group form-input-group">
|
|
20
|
+
<label class="col-sm-5" >接 单 人:</label>
|
|
21
|
+
<v-select :value="row.serviceacitivity[0].f_reciever" :value-single="true"
|
|
22
|
+
:options='repairers' placeholder='选择接单人'
|
|
23
|
+
close-on-select v-on:change="repiarmancg" :max-height="120"></v-select>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
<div class="row" v-if="rowlist.length===0">
|
|
27
|
+
<div class="col-sm-5 form-group form-input-group">
|
|
28
|
+
<label class="col-sm-5" >指导建议:</label>
|
|
29
|
+
<input type="text" class="form-control" v-model="f_advice" v-if="!show">
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
<button style="float: right;" type="button" name="button" class="button_search button_spacing"
|
|
33
|
+
@click="$emit('cancel')">取消
|
|
34
|
+
</button>
|
|
35
|
+
|
|
36
|
+
<button v-if="rowlist.length===0" style="float: right;" type="button" name="button" class="button_search button_spacing" @click="worksend()">
|
|
37
|
+
下发
|
|
38
|
+
</button>
|
|
39
|
+
<button v-if="!(rowlist.length===0)" style="float: right;" type="button" name="button" class="button_search button_spacing" @click="worksendall()">批量下发</button>
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
42
|
+
<script>
|
|
43
|
+
import {HttpResetClass} from 'vue-client'
|
|
44
|
+
import Vue from 'vue'
|
|
45
|
+
|
|
46
|
+
export default {
|
|
47
|
+
title: '站点工单下发',
|
|
48
|
+
props: {
|
|
49
|
+
// 报修单,不含关联关系
|
|
50
|
+
row: {
|
|
51
|
+
type: Object
|
|
52
|
+
},
|
|
53
|
+
model: {
|
|
54
|
+
type: Object
|
|
55
|
+
},
|
|
56
|
+
rowlist: [],
|
|
57
|
+
source: '',
|
|
58
|
+
search_source: ''
|
|
59
|
+
},
|
|
60
|
+
data () {
|
|
61
|
+
return {
|
|
62
|
+
saveing:false,
|
|
63
|
+
show: false,
|
|
64
|
+
btnshow: false,
|
|
65
|
+
repairers: [],
|
|
66
|
+
f_advice: '',
|
|
67
|
+
bartext: '',
|
|
68
|
+
barperc: 0,
|
|
69
|
+
barheight: 15,
|
|
70
|
+
barcolor: '#7697c4',
|
|
71
|
+
model: {
|
|
72
|
+
type: Object
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
ready () {
|
|
77
|
+
console.log("99969996",this.rowlist)
|
|
78
|
+
this.getEmp()
|
|
79
|
+
this.row.serviceacitivity = [{
|
|
80
|
+
f_service_acitivity_type: '派单'
|
|
81
|
+
}]
|
|
82
|
+
},
|
|
83
|
+
watch: {
|
|
84
|
+
// 报修单发生改变,给报修单设置默认派单对象
|
|
85
|
+
'row' (val) {
|
|
86
|
+
this.row.serviceacitivity = [{
|
|
87
|
+
f_service_acitivity_type: '派单'
|
|
88
|
+
}]
|
|
89
|
+
this.repairers = []
|
|
90
|
+
this.getEmp()
|
|
91
|
+
},
|
|
92
|
+
'rowlist' (val) {
|
|
93
|
+
//tag
|
|
94
|
+
//tag
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
methods: {
|
|
98
|
+
repiarmancg (val) {
|
|
99
|
+
if (val.isTrusted){
|
|
100
|
+
return
|
|
101
|
+
}
|
|
102
|
+
if (val) {
|
|
103
|
+
this.row.serviceacitivity[0].f_reciever = val
|
|
104
|
+
let http1 = new HttpResetClass()
|
|
105
|
+
http1.load('POST', 'rs/sql/tel_singleTable_OrderBy', {
|
|
106
|
+
data: {
|
|
107
|
+
items: 'f_user_telephone',
|
|
108
|
+
tablename: 't_user',
|
|
109
|
+
condition: `name = '${val}'`,
|
|
110
|
+
orderitem: 'id'
|
|
111
|
+
}
|
|
112
|
+
}, {resolveMsg: null, rejectMsg: null}).then((ress) => {
|
|
113
|
+
this.row.f_repairman_phone = ress.data[0].f_user_telephone
|
|
114
|
+
})
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
close () {
|
|
118
|
+
this.show = false
|
|
119
|
+
},
|
|
120
|
+
worksend () {
|
|
121
|
+
if (!this.row.serviceacitivity[0].f_reciever) {
|
|
122
|
+
return this.$showAlert('请选择接单人员', 'warning', 2000)
|
|
123
|
+
}
|
|
124
|
+
let userdata = Object.assign({}, userdata, this.row)
|
|
125
|
+
userdata.f_advice = this.f_advice
|
|
126
|
+
let data = ''
|
|
127
|
+
if (this.source == 'mobile') {
|
|
128
|
+
data = {
|
|
129
|
+
model: userdata,
|
|
130
|
+
loginUser: {name: Vue.user.name, ename: Vue.user.ename}
|
|
131
|
+
// adduser:{userinfo: result, devices: []}
|
|
132
|
+
}
|
|
133
|
+
} else {
|
|
134
|
+
data = {
|
|
135
|
+
model: userdata,
|
|
136
|
+
loginUser: {name: this.$login.f.name, ename: this.$login.f.ename}
|
|
137
|
+
// adduser:{userinfo: result, devices: []}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
data.message = true
|
|
141
|
+
this.saveing = true
|
|
142
|
+
let HttpReset = new HttpResetClass()
|
|
143
|
+
// 将数据发送给业务逻辑
|
|
144
|
+
if (this.source == 'mobile') {
|
|
145
|
+
HttpReset.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/siteSend`, data).then((res) => {
|
|
146
|
+
if (res.data.code == 300) {
|
|
147
|
+
this.saveing = false
|
|
148
|
+
this.$emit('success')
|
|
149
|
+
return this.$showAlert('该单已被派发!', 'warning', 3500)
|
|
150
|
+
} else {
|
|
151
|
+
this.saveing = false
|
|
152
|
+
this.$emit('success')
|
|
153
|
+
return this.$showAlert('派发成功!', 'success', 3500)
|
|
154
|
+
}
|
|
155
|
+
})
|
|
156
|
+
} else {
|
|
157
|
+
HttpReset.load('POST', 'rs/logic/siteSend', data).then((res) => {
|
|
158
|
+
if (res.data.code == 300) {
|
|
159
|
+
this.saveing = false
|
|
160
|
+
this.$emit('success')
|
|
161
|
+
return this.$showAlert('该单已被派发!', 'warning', 3500)
|
|
162
|
+
} else {
|
|
163
|
+
this.saveing = false
|
|
164
|
+
this.$emit('success')
|
|
165
|
+
return this.$showAlert('派发成功!', 'success', 3500)
|
|
166
|
+
}
|
|
167
|
+
})
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
//批量下发
|
|
171
|
+
worksendall: async function () {
|
|
172
|
+
if (!this.row.serviceacitivity[0].f_reciever) {
|
|
173
|
+
return this.$showAlert('请选择维修人员', 'warning', 2000)
|
|
174
|
+
}
|
|
175
|
+
if (this.rowlist.length > 0 && this.rowlist.length < 100) {
|
|
176
|
+
this.bartext = '正在批量下发' + this.rowlist.length + '个单子'
|
|
177
|
+
this.btnshow = true
|
|
178
|
+
this.$showAlert('正在批量下发,请稍等!!!!!', 'warning', 2000)
|
|
179
|
+
this.saveing = true
|
|
180
|
+
for (var index in this.rowlist) {
|
|
181
|
+
this.barperc = ((parseInt(index) + 1) * 100) / (parseInt(this.rowlist.length))
|
|
182
|
+
//this.barperc=parseInt((parseInt(index)+1)/this.rowlist.length)*100)
|
|
183
|
+
//tag
|
|
184
|
+
//tag
|
|
185
|
+
// let result = ''
|
|
186
|
+
// if(this.rowlist[index].f_repairtype == '置换通气'){
|
|
187
|
+
// result = this.getUserfile(this.rowlist[index])
|
|
188
|
+
// //tag)
|
|
189
|
+
// }
|
|
190
|
+
this.rowlist[index].serviceacitivity = this.row.serviceacitivity
|
|
191
|
+
let userdata = Object.assign({}, userdata, this.rowlist[index])
|
|
192
|
+
userdata.f_advice = this.f_advice
|
|
193
|
+
let data = {
|
|
194
|
+
model: userdata,
|
|
195
|
+
loginUser: {name: this.$login.f.name, ename: this.$login.f.ename}
|
|
196
|
+
// adduser:{userinfo: result, devices: []}
|
|
197
|
+
}
|
|
198
|
+
let gen = await this.sendmsg(data)
|
|
199
|
+
//tag
|
|
200
|
+
}
|
|
201
|
+
this.saveing = false
|
|
202
|
+
this.btnshow = false
|
|
203
|
+
this.barperc = 0
|
|
204
|
+
this.$showMessage('批量派发' + this.rowlist.length + '个单子成功', ['confirm']).then((res) => {
|
|
205
|
+
if (res === 'confirm') {
|
|
206
|
+
this.$emit('success')
|
|
207
|
+
// this.cleardate()
|
|
208
|
+
}
|
|
209
|
+
})
|
|
210
|
+
//tag
|
|
211
|
+
} else {
|
|
212
|
+
this.saveing = false
|
|
213
|
+
this.$showMessage('批量派发单子个数小于等于100个', ['confirm']).then((res) => {
|
|
214
|
+
if (res === 'confirm') {
|
|
215
|
+
//tag
|
|
216
|
+
}
|
|
217
|
+
})
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
sendmsg: async function (data) {
|
|
221
|
+
try {
|
|
222
|
+
let http = new HttpResetClass()
|
|
223
|
+
let resChannel = await http.load('POST', `rs/logic/siteSend`, {data: data}, {resolveMsg: null, rejectMsg: null})
|
|
224
|
+
//tag
|
|
225
|
+
} catch (e) {
|
|
226
|
+
this.$showAlert('派单失败' + data.model.f_service_id)
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
getEmp () {
|
|
230
|
+
// 获取接单人数组
|
|
231
|
+
let val = ''
|
|
232
|
+
let http = new HttpResetClass()
|
|
233
|
+
if (this.source == 'mobile') {
|
|
234
|
+
val = {
|
|
235
|
+
// `this.getResourceById($${this.$login.f.orgid}$,$organization$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$).indexOf($维修员$)!=-1)`,
|
|
236
|
+
source: this.search_source?this.search_source:`this.getResourceById($${this.$login.f.depids}$,$department$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$).indexOf($维修员$)!=-1)`,
|
|
237
|
+
userid: `${Vue.user.id}`
|
|
238
|
+
}
|
|
239
|
+
http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/search`, {data: val}, {
|
|
240
|
+
resolveMsg: null,
|
|
241
|
+
rejectMsg: null
|
|
242
|
+
}).then((res) => {
|
|
243
|
+
// let result = res.data.filter(res=>res.depids==Vue.user.depids)
|
|
244
|
+
res.data.forEach((item) => {
|
|
245
|
+
this.repairers.push({label: item.name, value: item.name})
|
|
246
|
+
})
|
|
247
|
+
let temp = []
|
|
248
|
+
this.repairers = this.repairers.filter(item=>{
|
|
249
|
+
if (!temp.includes(item.label)){
|
|
250
|
+
temp.push(item.label)
|
|
251
|
+
return true
|
|
252
|
+
}
|
|
253
|
+
return false
|
|
254
|
+
})
|
|
255
|
+
})
|
|
256
|
+
} else {
|
|
257
|
+
val = {
|
|
258
|
+
source: this.search_source?this.search_source:`this.getResourceById($${this.$login.f.depids}$,$department$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$).indexOf($维修员$)!=-1)`,
|
|
259
|
+
userid: `${this.$login.f.id}`
|
|
260
|
+
}
|
|
261
|
+
http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
|
|
262
|
+
|
|
263
|
+
// let result = res.data.filter(res=>res.depids==this.$login.f.depids)
|
|
264
|
+
res.data.forEach((item) => {
|
|
265
|
+
this.repairers.push({label: item.name, value: item.name})
|
|
266
|
+
})
|
|
267
|
+
let temp = []
|
|
268
|
+
this.repairers = this.repairers.filter(item=>{
|
|
269
|
+
if (!temp.includes(item.label)){
|
|
270
|
+
temp.push(item.label)
|
|
271
|
+
return true
|
|
272
|
+
}
|
|
273
|
+
return false
|
|
274
|
+
})
|
|
275
|
+
})
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
</script>
|