safecheck-client 3.0.34-50 → 3.0.34-52
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/src/components/android/AreaSelect.vue +208 -0
- package/src/components/android/BuildingSelect.vue +217 -0
- package/src/components/android/CheckPlanSelect.vue +248 -704
- package/src/components/android/PaperFeedback.vue +33 -0
- package/src/components/android/QRCode/QRCodeBinding.vue +294 -294
- package/src/components/rongcheng/AddPlanItem.vue +319 -319
- package/src/components/rongcheng/AspiratedPaperFeedbackm.vue +1045 -1045
- package/src/components/rongcheng/AspiratedPaperMessage.vue +1378 -1378
- package/src/components/rongcheng/AspiratedUserInfo.vue +399 -399
- package/src/components/rongcheng/CheckSearchUser.vue +932 -932
- package/src/components/rongcheng/PaperListNPSQ.vue +455 -455
- package/src/components/rongcheng/PaperListSQ.vue +444 -444
- package/src/components/rongcheng/PaperStatem.vue +419 -419
- package/src/components/rongcheng/PhoneDevicesInfo.vue +248 -248
- package/src/components/rongcheng/PhoneUpUserinfo.vue +1328 -1328
- package/src/components/rongcheng/SafecheckOrderV.vue +2533 -2533
- package/src/components/rongcheng/SafecheckOrderVCli.vue +2641 -2641
- package/src/filiale/siyang/pc/CheckPlanAreaList.vue +512 -512
- package/src/filiale/siyang/pc/HiddenSituation.vue +167 -167
- package/src/filiale/siyang/pc/checkPlanList.vue +367 -367
- package/src/filiale/siyang/pc.js +21 -21
- package/src/main.js +33 -33
- package/src/rongcheng.js +316 -316
- package/src/safecheck-android.js +303 -301
@@ -1,704 +1,248 @@
|
|
1
|
-
<style scoped>
|
2
|
-
.bg {
|
3
|
-
background-color: blue;
|
4
|
-
height: 1px;
|
5
|
-
border: 0;
|
6
|
-
}
|
7
|
-
.app-row {
|
8
|
-
background-color: white;
|
9
|
-
padding: 10px 10px 0 10px;
|
10
|
-
border-bottom: 1px solid rgba(235, 235, 235, 0.5);
|
11
|
-
}
|
12
|
-
.search_input {
|
13
|
-
border: 0;
|
14
|
-
outline: none;
|
15
|
-
}
|
16
|
-
.font{
|
17
|
-
font: 15px PingFang-SC-Medium;
|
18
|
-
color: #666666;
|
19
|
-
}
|
20
|
-
.input-font{
|
21
|
-
font: 15px PingFang-SC-Medium;
|
22
|
-
color: #333333;
|
23
|
-
}
|
24
|
-
.btn-font{
|
25
|
-
font:600 16px PingFang-SC-Bold;
|
26
|
-
color: #499EDF;
|
27
|
-
}
|
28
|
-
.btn-color{
|
29
|
-
background-color: #FFFFFF;
|
30
|
-
border-radius: 10px ;
|
31
|
-
border: 1px solid #499EDF;
|
32
|
-
}
|
33
|
-
.app-text {
|
34
|
-
font-size: 12px;
|
35
|
-
}
|
36
|
-
.panel-self{
|
37
|
-
border-radius: 10px;
|
38
|
-
border:1px solid #499EDF;
|
39
|
-
background-color: #F8F8F8;
|
40
|
-
}
|
41
|
-
.yybtn-color{
|
42
|
-
background-color:#499edf;
|
43
|
-
border-radius: 4px ;
|
44
|
-
border: 1px solid #499EDF;
|
45
|
-
color: #FFFFFF;
|
46
|
-
font: 14px PingFang-SC-Bold;
|
47
|
-
}
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
border:
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
<div class="row app-row">
|
91
|
-
<div class="col-xs-4">
|
92
|
-
<img src="../../assets/安检状态.png" style="width: 20px;margin-bottom: 5px" alt="">
|
93
|
-
<label for="f_plan_name" class="font text-left"
|
94
|
-
</div>
|
95
|
-
<v-select
|
96
|
-
id="f_plan_name"
|
97
|
-
:value.sync="model.
|
98
|
-
class="input-font"
|
99
|
-
:options='$parent.$parent.
|
100
|
-
placeholder='
|
101
|
-
:width="'60%'"
|
102
|
-
v-model="model.
|
103
|
-
condition="
|
104
|
-
close-on-select clear-button>
|
105
|
-
</v-select>
|
106
|
-
</div>
|
107
|
-
<div class="row app-row">
|
108
|
-
<div class="col-xs-4">
|
109
|
-
<img src="../../assets/安检状态.png" style="width: 20px;margin-bottom: 5px" alt="">
|
110
|
-
<label for="f_plan_name" class="font text-left"
|
111
|
-
</div>
|
112
|
-
<
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
</
|
165
|
-
<
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
ready(){
|
250
|
-
this.getAllArea()
|
251
|
-
this.getAllPlanName()
|
252
|
-
this.selfSearch()
|
253
|
-
let gen = select(this)
|
254
|
-
co(gen)
|
255
|
-
},
|
256
|
-
mounted(){
|
257
|
-
//tag
|
258
|
-
if (window.history && window.history.pushState) {
|
259
|
-
history.pushState(null, null, document.URL);
|
260
|
-
window.addEventListener('popstate', this.fun, false);//false阻止默认事件
|
261
|
-
}
|
262
|
-
},
|
263
|
-
destroyed(){
|
264
|
-
//tag
|
265
|
-
window.removeEventListener('popstate', this.fun, false);//false阻止默认事件
|
266
|
-
},
|
267
|
-
methods: {
|
268
|
-
scan(){
|
269
|
-
HostApp.__this__=this,
|
270
|
-
HostApp.scanCode({callback:"javascript:HostApp.__this__.getCode();"})
|
271
|
-
},
|
272
|
-
getCode(){
|
273
|
-
const datapa = HostApp.getCode().data;
|
274
|
-
//tag
|
275
|
-
this.$refs.paged.$refs.cri.model.f_meter_no = datapa
|
276
|
-
|
277
|
-
},
|
278
|
-
fun () {
|
279
|
-
//tag
|
280
|
-
//tag
|
281
|
-
},
|
282
|
-
iscancel(){
|
283
|
-
this.showModal2=false
|
284
|
-
this.showModal3=false
|
285
|
-
this.planoption=[]
|
286
|
-
},
|
287
|
-
timeSet(val){
|
288
|
-
return val
|
289
|
-
},
|
290
|
-
async isok(){
|
291
|
-
if(this.planoption.length==0){
|
292
|
-
this.$showMessage("请选择计划")
|
293
|
-
return false
|
294
|
-
}
|
295
|
-
for (let i = 0; i <this.planoption.length ; i++) {
|
296
|
-
if (this.planoption[i]["selected"]==true){
|
297
|
-
this.planid=this.planoption[i].value
|
298
|
-
break
|
299
|
-
}
|
300
|
-
}
|
301
|
-
if(this.planid==''){
|
302
|
-
this.$showMessage("请选择计划")
|
303
|
-
return false
|
304
|
-
}
|
305
|
-
await this.okput()
|
306
|
-
},
|
307
|
-
async manyisok(){
|
308
|
-
if(this.planoption.length==0){
|
309
|
-
this.$showMessage("请选择计划")
|
310
|
-
return false
|
311
|
-
}
|
312
|
-
for (let i = 0; i <this.planoption.length ; i++) {
|
313
|
-
if (this.planoption[i]["selected"]==true){
|
314
|
-
this.planid=this.planoption[i].value
|
315
|
-
break
|
316
|
-
}
|
317
|
-
}
|
318
|
-
if(this.planid==''){
|
319
|
-
this.$showMessage("请选择计划")
|
320
|
-
return false
|
321
|
-
}
|
322
|
-
await this.manyokput()
|
323
|
-
},
|
324
|
-
changenull(){
|
325
|
-
this.showModal2=false
|
326
|
-
this.showModal3=false
|
327
|
-
this.planoption=[]
|
328
|
-
this.plan=''
|
329
|
-
this.check=''
|
330
|
-
},
|
331
|
-
async okput(){
|
332
|
-
let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/UpCheckPlanItem`, {data:{
|
333
|
-
condition:`i.id='`+this.needid+`'`,
|
334
|
-
f_plan_id:this.planid,
|
335
|
-
switchCheckAll:false,
|
336
|
-
checkAll:false,
|
337
|
-
f_operator:Vue.user.name
|
338
|
-
}
|
339
|
-
})
|
340
|
-
this.$showMessage("上传成功,请等待审核")
|
341
|
-
await this.changenull()
|
342
|
-
await this.getNewOrder()
|
343
|
-
},
|
344
|
-
async manyokput(){
|
345
|
-
let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/UpCheckPlanItem`, {data:{
|
346
|
-
columnName:"i.id",
|
347
|
-
condition:"1=1",
|
348
|
-
f_plan_id:this.planid,
|
349
|
-
switchCheckAll:true,
|
350
|
-
param:this.planparam,
|
351
|
-
checkAll:false,
|
352
|
-
f_operator:Vue.user.name
|
353
|
-
}
|
354
|
-
})
|
355
|
-
await this.changenull()
|
356
|
-
await this.getNewOrder()
|
357
|
-
},
|
358
|
-
async plansearch(){
|
359
|
-
this.planoption=[]
|
360
|
-
let condition= ` f_plan_year=${new Date().getFullYear()}`
|
361
|
-
if(this.check){
|
362
|
-
condition += ` and f_checker_id= '${this.check}'`
|
363
|
-
}
|
364
|
-
if(this.plan){
|
365
|
-
condition += ` and f_plan_name like '%${this.plan}%'`
|
366
|
-
}
|
367
|
-
let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/预约计划下发`, {data:{
|
368
|
-
condition:condition,
|
369
|
-
f_filialeids:this.f_filialeids,
|
370
|
-
groupitem:'',
|
371
|
-
orderitem:'id'
|
372
|
-
}})
|
373
|
-
let resoult=res.data
|
374
|
-
for (let i = 0; i < resoult.length; i++) {
|
375
|
-
this.planoption.push({label: resoult[i].f_plan_name,selected:false, value: resoult[i].id})
|
376
|
-
}
|
377
|
-
},
|
378
|
-
|
379
|
-
select(row, idx) {
|
380
|
-
this.$set('planoption[' + idx + '].selected', true)
|
381
|
-
for (let i = 0; i <this.planoption.length ; i++) {
|
382
|
-
if (i!=idx){
|
383
|
-
this.planoption[i]["selected"]=false
|
384
|
-
}
|
385
|
-
}
|
386
|
-
},
|
387
|
-
planclose(){
|
388
|
-
this.showModal2=false
|
389
|
-
this.showModal3=false
|
390
|
-
},
|
391
|
-
queryplan(val){
|
392
|
-
this.needid=val
|
393
|
-
this.showModal2 = true
|
394
|
-
},
|
395
|
-
queryplanmany(){
|
396
|
-
|
397
|
-
this.showModal3 = true
|
398
|
-
},
|
399
|
-
reload(){
|
400
|
-
// this.getAllArea()
|
401
|
-
// this.getAllPlanName()
|
402
|
-
this.selfSearch()
|
403
|
-
},
|
404
|
-
cancelReserve (idx, id) {
|
405
|
-
if(Vue.android){
|
406
|
-
let res = this.$androidUtil.bzLogic('BookingCheck', {dt: '', id: id})
|
407
|
-
this.$set('model.rows[' + idx + '].f_prearranged_date', null)
|
408
|
-
if (res.code == 200) {
|
409
|
-
this.$showMessage("取消预约成功")
|
410
|
-
}
|
411
|
-
}else {
|
412
|
-
this.$androidUtil.bzLogic('PCbookingCheck', {dt: '', id: id}).then((repanse) => {
|
413
|
-
this.$set('model.rows[' + idx + '].f_prearranged_date', null)
|
414
|
-
if (repanse.data.code == 200) {
|
415
|
-
alert("取消预约成功!")
|
416
|
-
}
|
417
|
-
})
|
418
|
-
}},
|
419
|
-
genuineReserve () {
|
420
|
-
if(Vue.android){
|
421
|
-
if (!this.f_preset_dt) {
|
422
|
-
this.$showMessage('请选择一个日期')
|
423
|
-
return
|
424
|
-
}
|
425
|
-
let pdt = this.f_preset_dt.replace('T', ' ')
|
426
|
-
let respanse = this.$androidUtil.bzLogic('BookingCheck', {id: this.model.rows[this.param].id, dt: pdt})
|
427
|
-
this.$set('model.rows[' + this.param + '].f_prearranged_date', pdt)
|
428
|
-
if(respanse.code == 200) {
|
429
|
-
this.$showMessage("预约成功!")
|
430
|
-
}
|
431
|
-
this.showModal = false
|
432
|
-
}else {
|
433
|
-
if (!this.f_preset_dt) {
|
434
|
-
alert('请选择一个日期')
|
435
|
-
return
|
436
|
-
}
|
437
|
-
let pdt = this.f_preset_dt.replace('T', ' ')
|
438
|
-
this.$androidUtil.bzLogic('PCbookingCheck', {id: this.model.rows[this.param].id, dt: pdt}).then((res) => {
|
439
|
-
this.$set('model.rows[' + this.param + '].f_prearranged_date', pdt)
|
440
|
-
if(res.data.code == 200) {
|
441
|
-
alert("预约成功!")
|
442
|
-
}
|
443
|
-
this.showModal = false
|
444
|
-
})
|
445
|
-
}
|
446
|
-
},
|
447
|
-
inspect(row) {
|
448
|
-
var _this = this
|
449
|
-
let http = new HttpResetClass()
|
450
|
-
http.load('POST',`${this.$androidUtil.getProxyUrl()}/rs/sql/tel_singleTable_OrderBy`, {data: {
|
451
|
-
items: 'id',
|
452
|
-
tablename: 't_check_plan_item',
|
453
|
-
condition: `id = '${row.id}'`,
|
454
|
-
orderitem: ' id '
|
455
|
-
}}, {resolveMsg: null, rejectMsg: null}).then((getcheckplan) => {
|
456
|
-
console.log('getcheckplan=', JSON.stringify(getcheckplan))
|
457
|
-
this.getcheckplandata = getcheckplan.data[0]
|
458
|
-
if(this.getcheckplandata){
|
459
|
-
if (row.f_upload_state == '未传' || (row.f_upload_state == '已传' && row.f_state == '未检' && row.f_no_checkplan != '无计划安检' ) ) {
|
460
|
-
_this.$resetpost(`${_this.$androidUtil.getProxyUrl()}/rs/sql/查询计划项表信息`, {data: {f_userid: row.f_userinfoid}},{resolveMsg: null,rejectMsg: null}).then((response) => {
|
461
|
-
row['f_plan_meters'] = response.data
|
462
|
-
var pardate = {
|
463
|
-
_this:_this,
|
464
|
-
title:'安全检查',
|
465
|
-
safe:true
|
466
|
-
}
|
467
|
-
_this.$dispatch('gotoson',pardate)
|
468
|
-
//tag
|
469
|
-
_this.$goto('safecheck-order-v', {f_plan_id: row.f_plan_id, item: row, role: 'inspect',parentPage:'CurrentCreate'}, 'self', _this.reload)
|
470
|
-
}).catch ((msg)=>{
|
471
|
-
this.$showMessage("网络异常,请检查网络后再试!")
|
472
|
-
})
|
473
|
-
}else{
|
474
|
-
this.$showMessage("该安检单已被上传!")
|
475
|
-
}
|
476
|
-
}else {
|
477
|
-
this.$showMessage("该用户安检单已被移除,请联系管理员确认!")
|
478
|
-
}
|
479
|
-
})
|
480
|
-
},
|
481
|
-
reserve (idx) {
|
482
|
-
this.param = idx
|
483
|
-
this.showModal = true
|
484
|
-
},
|
485
|
-
search(args) {
|
486
|
-
this.model.rows = []
|
487
|
-
this.model.search(args.condition, args.model)
|
488
|
-
},
|
489
|
-
selfSearch () {
|
490
|
-
this.getPlanCount()
|
491
|
-
let condition = ""
|
492
|
-
if (Array.isArray(this.$refs.paged.$refs.cri.model.f_residential_area) && this.$refs.paged.$refs.cri.model.f_residential_area.length >0){
|
493
|
-
condition += " and ti.f_residential_area = '"+this.$refs.paged.$refs.cri.model.f_residential_area[0]+"'"
|
494
|
-
}else if(this.$refs.paged.$refs.cri.model.f_residential_area instanceof String && this.$refs.paged.$refs.cri.model.f_residential_area){
|
495
|
-
condition += " and ti.f_residential_area = '"+this.$refs.paged.$refs.cri.model.f_residential_area+"'"
|
496
|
-
}
|
497
|
-
if(this.$refs.paged.$refs.cri.model.f_building)
|
498
|
-
condition += ` and ti.f_building = '${this.$refs.paged.$refs.cri.model.f_building}'`
|
499
|
-
if(this.$refs.paged.$refs.cri.model.f_unit)
|
500
|
-
condition += ` and ti.f_unit = '${this.$refs.paged.$refs.cri.model.f_unit}'`
|
501
|
-
if (this.planName){
|
502
|
-
condition += " and f_plan_name like '%"+this.planName +"%'"
|
503
|
-
}else {
|
504
|
-
if(this.$refs.paged.$refs.cri.model.f_plan_name)
|
505
|
-
condition += " and f_plan_name like '%"+this.$refs.paged.$refs.cri.model.f_plan_name +"%'"
|
506
|
-
}
|
507
|
-
// if(this.$refs.paged.$refs.cri.model.f_plan_year)
|
508
|
-
// condition += " and f_plan_year = '"+this.$refs.paged.$refs.cri.model.f_plan_year +"'"
|
509
|
-
// if(this.$refs.paged.$refs.cri.model.f_plan_month)
|
510
|
-
// condition += " and f_plan_month = '"+this.$refs.paged.$refs.cri.model.f_plan_month +"'"
|
511
|
-
if(this.$refs.paged.$refs.cri.model.f_userinfo_code)
|
512
|
-
condition += " and ti.f_userinfo_code like '%"+this.$refs.paged.$refs.cri.model.f_userinfo_code+"%'"
|
513
|
-
if(this.$refs.paged.$refs.cri.model.f_keyword)
|
514
|
-
condition += " and ti.f_address like '%"+this.$refs.paged.$refs.cri.model.f_keyword+"%'"
|
515
|
-
if(this.$refs.paged.$refs.cri.model.f_user_name)
|
516
|
-
condition += " and ti.f_user_name like '%"+this.$refs.paged.$refs.cri.model.f_user_name+"%'"
|
517
|
-
if(this.$refs.paged.$refs.cri.model.f_state[0])
|
518
|
-
condition += " and ti.f_state='"+this.$refs.paged.$refs.cri.model.f_state[0]+"'"
|
519
|
-
// if(this.$refs.paged.$refs.cri.model.f_last_state[0])
|
520
|
-
// condition += " and ti.f_last_check_state='"+this.$refs.paged.$refs.cri.model.f_last_state[0]+"'"
|
521
|
-
if(this.$refs.paged.$refs.cri.model.f_user_type[0])
|
522
|
-
condition += " and ti.f_user_type='"+this.$refs.paged.$refs.cri.model.f_user_type[0]+"'"
|
523
|
-
if(this.$refs.paged.$refs.cri.model.f_meter_no)
|
524
|
-
condition += " and tm.f_meter_no like '%"+this.$refs.paged.$refs.cri.model.f_meter_no+"%'"
|
525
|
-
// if(this.$refs.paged.$refs.cri.model.f_flow_direction[0])
|
526
|
-
// condition += " and tm.f_flow_direction = '"+this.$refs.paged.$refs.cri.model.f_flow_direction[0]+"'"
|
527
|
-
if(this.$refs.paged.$refs.cri.model.f_user_phone){
|
528
|
-
condition += `and ti.f_user_phone like '%${this.$refs.paged.$refs.cri.model.f_user_phone}%'`
|
529
|
-
}
|
530
|
-
if(this.$refs.paged.$refs.cri.model.f_enter_number)
|
531
|
-
condition += " and ti.f_enter_number like '%"+this.$refs.paged.$refs.cri.model.f_enter_number+"%'"
|
532
|
-
if(this.$refs.paged.$refs.cri.model.f_check_version)
|
533
|
-
condition += " and ti.f_check_version <= "+this.$refs.paged.$refs.cri.model.f_check_version
|
534
|
-
//tag
|
535
|
-
this.model.search("((f_complete = '' or f_complete = null or f_complete = '未完成') or (f_state = '未检')) and ti.f_no_checkplan = '有计划安检'" + condition)
|
536
|
-
},
|
537
|
-
getNewOrder(){
|
538
|
-
HostApp.__this__ = this
|
539
|
-
HostApp.logicWithHint({
|
540
|
-
// logic别名,key必须为logic
|
541
|
-
'logic': 'SafeCheckServiceTimeOut',
|
542
|
-
// 回调执行方法名,key必须为callback
|
543
|
-
'callback': 'javascript:HostApp.__this__.getNewOrderCallBack()',
|
544
|
-
// logic执行需要的业务参数
|
545
|
-
'data': {params: ''},
|
546
|
-
// 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
|
547
|
-
// 执行回调方法传入key为backresult
|
548
|
-
// 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
|
549
|
-
'backresult': 1
|
550
|
-
})
|
551
|
-
HostApp.logicWithHint({
|
552
|
-
// logic别名,key必须为logic
|
553
|
-
'logic': 'FreshPlanItem',
|
554
|
-
// 回调执行方法名,key必须为callback
|
555
|
-
'callback': 'javascript:HostApp.__this__.getNewOrderCallBack()',
|
556
|
-
// logic执行需要的业务参数
|
557
|
-
'data': {params: ''},
|
558
|
-
// 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
|
559
|
-
// 执行回调方法传入key为backresult
|
560
|
-
// 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
|
561
|
-
'backresult': 1
|
562
|
-
})
|
563
|
-
},
|
564
|
-
getNewOrderCallBack() {
|
565
|
-
this.selfSearch()
|
566
|
-
this.getAllArea()
|
567
|
-
this.getAllPlanName()
|
568
|
-
},
|
569
|
-
hidden() {
|
570
|
-
this.criteriaShow = !this.criteriaShow
|
571
|
-
},
|
572
|
-
getAllArea(){
|
573
|
-
this.residentialAreaOptions = []
|
574
|
-
this.buildOptions = []
|
575
|
-
this.unitOptions = []
|
576
|
-
this.$refs.paged.$refs.cri.model.f_residential_area = ''
|
577
|
-
this.$refs.paged.$refs.cri.model.f_building = ''
|
578
|
-
this.$refs.paged.$refs.cri.model.f_unit = ''
|
579
|
-
let criteria = {
|
580
|
-
items: 'f_residential_area',
|
581
|
-
tablename: 't_check_plan_item',
|
582
|
-
condition: `f_residential_area IS NOT NULL AND f_residential_area != '' AND f_state <> '已检'`,
|
583
|
-
groupitem: 'f_residential_area'
|
584
|
-
}
|
585
|
-
let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
|
586
|
-
//tag)
|
587
|
-
if(result.code == 200){
|
588
|
-
result.data.rows.forEach(item => this.residentialAreaOptions.push({label:item.f_residential_area,value:item.f_residential_area}))
|
589
|
-
}
|
590
|
-
//tag)
|
591
|
-
},
|
592
|
-
getbuilds(f_residential_area){
|
593
|
-
//tag)
|
594
|
-
this.buildOptions = []
|
595
|
-
this.unitOptions = []
|
596
|
-
this.$refs.paged.$refs.cri.model.f_building = ''
|
597
|
-
this.$refs.paged.$refs.cri.model.f_unit = ''
|
598
|
-
if(!f_residential_area){
|
599
|
-
return
|
600
|
-
}
|
601
|
-
let criteria = {
|
602
|
-
items: 'f_building',
|
603
|
-
tablename: 't_check_plan_item',
|
604
|
-
condition: `f_building IS NOT NULL AND f_building != '' AND f_state <> '已检' AND f_residential_area = '${f_residential_area}'`,
|
605
|
-
groupitem: 'f_building order by f_building+0'
|
606
|
-
}
|
607
|
-
let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
|
608
|
-
if(result.code == 200){
|
609
|
-
result.data.rows.forEach(item => this.buildOptions.push({label:item.f_building,value:item.f_building}))
|
610
|
-
}
|
611
|
-
this.buildOptions.sort((a,b)=>{
|
612
|
-
return Number(a.label)- Number(b.label)
|
613
|
-
})
|
614
|
-
//tag)
|
615
|
-
},
|
616
|
-
getUnits(f_building){
|
617
|
-
f_building = f_building[0]
|
618
|
-
//tag)
|
619
|
-
this.unitOptions = []
|
620
|
-
this.$refs.paged.$refs.cri.model.f_unit = ''
|
621
|
-
if(!f_building){
|
622
|
-
return
|
623
|
-
}
|
624
|
-
let criteria = {
|
625
|
-
items: 'f_unit',
|
626
|
-
tablename: 't_check_plan_item',
|
627
|
-
condition: `f_unit IS NOT NULL AND f_unit != '' AND f_state <> '已检' AND f_residential_area = '${this.$refs.paged.$refs.cri.model.f_residential_area}' AND f_building = '${f_building}'`,
|
628
|
-
groupitem: 'f_unit'
|
629
|
-
}
|
630
|
-
let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
|
631
|
-
if(result.code == 200){
|
632
|
-
result.data.rows.forEach(item => this.unitOptions.push({label:item.f_unit,value:item.f_unit}))
|
633
|
-
}
|
634
|
-
this.unitOptions.sort((a,b)=>{
|
635
|
-
return Number(a.label)- Number(b.label)
|
636
|
-
})
|
637
|
-
},
|
638
|
-
getPlanCount(){
|
639
|
-
this.upcomingCount = 0
|
640
|
-
this.tempSaveCount = 0
|
641
|
-
this.doneCount = 0
|
642
|
-
this.allPlanCount = 0
|
643
|
-
let criteria = {
|
644
|
-
items: 'count(id) count',
|
645
|
-
tablename: 't_check_plan_item',
|
646
|
-
condition: `f_state = '未检'`,
|
647
|
-
groupitem: 'f_state'
|
648
|
-
}
|
649
|
-
let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
|
650
|
-
if(result.code && result.code == 200){
|
651
|
-
if(result.data.rows[0] && !isNaN(result.data.rows[0].count)) {
|
652
|
-
this.upcomingCount = result.data.rows[0].count
|
653
|
-
}
|
654
|
-
}
|
655
|
-
criteria = {
|
656
|
-
items: 'count(id) count',
|
657
|
-
tablename: 't_check_plan_item',
|
658
|
-
condition: `(f_complete = '' or f_complete is null or f_complete = '未完成') AND f_state = '已检'`,
|
659
|
-
groupitem: 'f_state'
|
660
|
-
}
|
661
|
-
result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
|
662
|
-
if(result.code && result.code == 200){
|
663
|
-
if(result.data.rows[0] && !isNaN(result.data.rows[0].count)){
|
664
|
-
this.tempSaveCount = result.data.rows[0].count
|
665
|
-
}
|
666
|
-
}
|
667
|
-
criteria = {
|
668
|
-
items: 'count(id) count',
|
669
|
-
tablename: 't_check_plan_item',
|
670
|
-
condition: `f_complete = '已完成' AND f_state = '已检'`,
|
671
|
-
groupitem: 'f_state'
|
672
|
-
}
|
673
|
-
result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
|
674
|
-
if(result.code && result.code == 200){
|
675
|
-
if(result.data.rows[0] && !isNaN(result.data.rows[0].count)){
|
676
|
-
this.doneCount = result.data.rows[0].count
|
677
|
-
}
|
678
|
-
}
|
679
|
-
this.allPlanCount = this.upcomingCount + this.tempSaveCount + this.doneCount
|
680
|
-
|
681
|
-
//tag
|
682
|
-
//tag
|
683
|
-
//tag
|
684
|
-
//tag
|
685
|
-
},
|
686
|
-
getAllPlanName(){
|
687
|
-
this.planNameOptions = []
|
688
|
-
this.$refs.paged.$refs.cri.model.f_plan_name = ''
|
689
|
-
let criteria = {
|
690
|
-
items: 'f_plan_name',
|
691
|
-
tablename: 't_check_plan',
|
692
|
-
condition: `f_plan_name IS NOT NULL AND f_plan_name != ''`,
|
693
|
-
groupitem: 'f_plan_name'
|
694
|
-
}
|
695
|
-
let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
|
696
|
-
//tag)
|
697
|
-
if(result.code == 200){
|
698
|
-
result.data.rows.forEach(item => this.planNameOptions.push({label:item.f_plan_name,value:item.f_plan_name}))
|
699
|
-
}
|
700
|
-
//tag)
|
701
|
-
},
|
702
|
-
}
|
703
|
-
}
|
704
|
-
</script>
|
1
|
+
<style scoped>
|
2
|
+
.bg {
|
3
|
+
background-color: blue;
|
4
|
+
height: 1px;
|
5
|
+
border: 0;
|
6
|
+
}
|
7
|
+
.app-row {
|
8
|
+
background-color: white;
|
9
|
+
padding: 10px 10px 0 10px;
|
10
|
+
border-bottom: 1px solid rgba(235, 235, 235, 0.5);
|
11
|
+
}
|
12
|
+
.search_input {
|
13
|
+
border: 0;
|
14
|
+
outline: none;
|
15
|
+
}
|
16
|
+
.font{
|
17
|
+
font: 15px PingFang-SC-Medium;
|
18
|
+
color: #666666;
|
19
|
+
}
|
20
|
+
.input-font{
|
21
|
+
font: 15px PingFang-SC-Medium;
|
22
|
+
color: #333333;
|
23
|
+
}
|
24
|
+
.btn-font{
|
25
|
+
font:600 16px PingFang-SC-Bold;
|
26
|
+
color: #499EDF;
|
27
|
+
}
|
28
|
+
.btn-color{
|
29
|
+
background-color: #FFFFFF;
|
30
|
+
border-radius: 10px ;
|
31
|
+
border: 1px solid #499EDF;
|
32
|
+
}
|
33
|
+
.app-text {
|
34
|
+
font-size: 12px;
|
35
|
+
}
|
36
|
+
.panel-self{
|
37
|
+
border-radius: 10px;
|
38
|
+
border:1px solid #499EDF;
|
39
|
+
background-color: #F8F8F8;
|
40
|
+
}
|
41
|
+
.yybtn-color{
|
42
|
+
background-color:#499edf;
|
43
|
+
border-radius: 4px ;
|
44
|
+
border: 1px solid #499EDF;
|
45
|
+
color: #FFFFFF;
|
46
|
+
font: 14px PingFang-SC-Bold;
|
47
|
+
}
|
48
|
+
table {
|
49
|
+
text-align: center;
|
50
|
+
white-space: nowrap;
|
51
|
+
font-size: 12px;
|
52
|
+
width: 50%;
|
53
|
+
border-collapse: collapse;
|
54
|
+
margin: 20px 0;
|
55
|
+
margin: auto;
|
56
|
+
}
|
57
|
+
th, td {
|
58
|
+
padding: 12px;
|
59
|
+
border-bottom: 1px solid #ddd;
|
60
|
+
}
|
61
|
+
th {
|
62
|
+
background-color: #f2f2f2;
|
63
|
+
}
|
64
|
+
tr:hover {background-color: #f5f5f5;}
|
65
|
+
.qxbtn-color{
|
66
|
+
background-color: #FFFFFF;
|
67
|
+
border-radius: 4px ;
|
68
|
+
color: #499edf;
|
69
|
+
font: 14px PingFang-SC-Bold;
|
70
|
+
border: 1px solid #499EDF;
|
71
|
+
}
|
72
|
+
|
73
|
+
.button_shrink_top {width: 35px; height: 35px; background-size:100%;background-image: url("../../../static/newStyle/stretch_top.png")}
|
74
|
+
.button_shrink_bottom {width: 35px; height: 35px; background-size:100%;background-image: url("../../../static/newStyle/stretch_bottom.png")}
|
75
|
+
.button_shrink_left {width: 35px; height: 35px; background-size:100%;background-image: url("../../../static/newStyle/stretch_left.png")}
|
76
|
+
.button_shrink_right {width: 35px; height: 35px; background-size:100%;background-image: url("../../../static/newStyle/stretch_right.png")}
|
77
|
+
</style>
|
78
|
+
<style>
|
79
|
+
.clear-select-with .dropdown-menu{
|
80
|
+
left: 0px !important;
|
81
|
+
width: 200% !important;
|
82
|
+
}
|
83
|
+
</style>
|
84
|
+
<template>
|
85
|
+
<div style="height: auto;width: 100%">
|
86
|
+
<criteria-paged :model="model" v-ref:paged :pager="false">
|
87
|
+
<criteria partial='criteria' @condition-changed='$parent.search' v-ref:cri>
|
88
|
+
<div partial>
|
89
|
+
<form>
|
90
|
+
<div class="row app-row">
|
91
|
+
<div class="col-xs-4">
|
92
|
+
<img src="../../assets/安检状态.png" style="width: 20px;margin-bottom: 5px" alt="">
|
93
|
+
<label for="f_plan_name" class="font text-left">计划名称:</label>
|
94
|
+
</div>
|
95
|
+
<v-select
|
96
|
+
id="f_plan_name"
|
97
|
+
:value.sync="model.f_plan_name"
|
98
|
+
class="input-font"
|
99
|
+
:options='$parent.$parent.planNameOptions'
|
100
|
+
placeholder='计划名称'
|
101
|
+
:width="'60%'"
|
102
|
+
v-model="model.f_plan_name"
|
103
|
+
condition="f_plan_name = '{}'"
|
104
|
+
close-on-select clear-button>
|
105
|
+
</v-select>
|
106
|
+
</div>
|
107
|
+
<div class="row app-row">
|
108
|
+
<div class="col-xs-4">
|
109
|
+
<img src="../../assets/安检状态.png" style="width: 20px;margin-bottom: 5px" alt="">
|
110
|
+
<label for="f_plan_name" class="font text-left">计划类型:</label>
|
111
|
+
</div>
|
112
|
+
<v-select
|
113
|
+
id="f_plan_name"
|
114
|
+
:value.sync="model.f_safecheck_type"
|
115
|
+
class="input-font"
|
116
|
+
:options='$parent.$parent.safecheckTypes'
|
117
|
+
placeholder='计划类型'
|
118
|
+
:width="'60%'"
|
119
|
+
v-model="model.f_safecheck_type"
|
120
|
+
condition="f_safecheck_type = '{}'"
|
121
|
+
close-on-select clear-button>
|
122
|
+
</v-select>
|
123
|
+
</div>
|
124
|
+
<div class="row app-row">
|
125
|
+
<div class="col-xs-4">
|
126
|
+
<img src="../../assets/安检状态.png" style="width: 20px;margin-bottom: 5px" alt="">
|
127
|
+
<label for="f_plan_name" class="font text-left">计划时间:</label>
|
128
|
+
</div>
|
129
|
+
<datepicker id="f_start_date" style="width: 30%;"
|
130
|
+
:value.sync="model.f_start_date"
|
131
|
+
:disabled-days-of-Week="[]"
|
132
|
+
v-model="model.f_start_date"
|
133
|
+
class="input-font"
|
134
|
+
:format="'yyyy-MM-dd 00:00:00'" condition="f_issue_time >= '{}'"
|
135
|
+
>
|
136
|
+
</datepicker>-
|
137
|
+
<datepicker id="f_end_date" style="width: 30%;"
|
138
|
+
:value.sync="model.f_end_date"
|
139
|
+
:disabled-days-of-Week="[]"
|
140
|
+
v-model="model.f_end_date"
|
141
|
+
class="input-font"
|
142
|
+
:format="'yyyy-MM-dd 23:59:00'" condition="f_issue_time <= '{}'"
|
143
|
+
>
|
144
|
+
</datepicker>
|
145
|
+
</div>
|
146
|
+
<div class="row text-center" style="margin-top: 20px;">
|
147
|
+
<button type="button" class="btn btn-lg btn-font btn-color" style="width: 25%;" @click="search">查询</button>
|
148
|
+
<img @click="$parent.$parent.getNewOrder" src="../../assets/shuaxindaiban1.png" style="float: right;margin-right: 3%;width: 40px;padding: 5px; float:right">
|
149
|
+
</div>
|
150
|
+
<div class="col-sm-12">
|
151
|
+
</div>
|
152
|
+
<div style="height:30px;"></div>
|
153
|
+
</form>
|
154
|
+
</div>
|
155
|
+
</criteria>
|
156
|
+
<list :model="model" partial='list'>
|
157
|
+
<div partial>
|
158
|
+
<div class="auto app-text" style="margin-top: 5px;">
|
159
|
+
<div class="panel" style="padding: 10px 10px 5px 10px;">
|
160
|
+
<div class="panel-body panel-self" @click="$parent.$parent.$parent.gotoAreaSelect(row)">
|
161
|
+
<div class="col-xs-12">
|
162
|
+
<p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>计划名称:</b></p>
|
163
|
+
<p class="panel-title col-xs-5 text-left input-font" style="width: 74%">{{ row.f_plan_name }}</p>
|
164
|
+
</div>
|
165
|
+
<div class="col-xs-12">
|
166
|
+
<p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>计划发型:</b></p>
|
167
|
+
<p class="panel-title col-xs-7 text-left input-font" style="width: 79%">{{ row.f_safecheck_type }}</p>
|
168
|
+
</div>
|
169
|
+
<div class="col-xs-12">
|
170
|
+
<p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>计划时间:</b></p>
|
171
|
+
<p class="panel-title col-xs-7 text-left input-font" style="width: 79%">{{ row.f_issue_time }}</p>
|
172
|
+
</div>
|
173
|
+
<div class="col-xs-12">
|
174
|
+
<table>
|
175
|
+
<tr>
|
176
|
+
<td style="color: #00A3F0">{{row.jihuazongshu}}</td>
|
177
|
+
<td style="color: #3CC51F">{{row.yijian}}</td>
|
178
|
+
<td style="color: coral">{{row.weijian}}</td>
|
179
|
+
<td style="color: red">{{row.daofangbuyu}}</td>
|
180
|
+
</tr>
|
181
|
+
<tr>
|
182
|
+
<th>计划总户数</th>
|
183
|
+
<th>已检户数</th>
|
184
|
+
<th>未检户数</th>
|
185
|
+
<th>到访不遇户数</th>
|
186
|
+
</tr>
|
187
|
+
</table>
|
188
|
+
</div>
|
189
|
+
</div>
|
190
|
+
</div>
|
191
|
+
</div>
|
192
|
+
</div>
|
193
|
+
</list>
|
194
|
+
</criteria-paged>
|
195
|
+
</div>
|
196
|
+
</template>
|
197
|
+
<script>
|
198
|
+
import LocalPagedList from '../../plugins/LocalPagedList'
|
199
|
+
export default {
|
200
|
+
title: '安检待办',
|
201
|
+
props: ['planName'],
|
202
|
+
data() {
|
203
|
+
return {
|
204
|
+
planNameOptions:[{label: '请选择', value: ''},],
|
205
|
+
safecheckTypes:[{label: '请选择', value: ''},{label: '年度安检', value: '年度安检'},{label: '抽检', value: '抽检'}],
|
206
|
+
model:new LocalPagedList('androidGetuserinfo',20,{condition:'this.condition'}),
|
207
|
+
}
|
208
|
+
},
|
209
|
+
ready(){
|
210
|
+
this.getAllPlanName()
|
211
|
+
},
|
212
|
+
methods: {
|
213
|
+
gotoAreaSelect(row){
|
214
|
+
var pardate = {
|
215
|
+
_this:this,
|
216
|
+
title:'待办工作',
|
217
|
+
safe:false
|
218
|
+
}
|
219
|
+
this.$dispatch('gotoson',pardate)
|
220
|
+
this.$goto('area-select', {row: row}, 'self')
|
221
|
+
},
|
222
|
+
search(args){
|
223
|
+
let condition = '1=1'
|
224
|
+
this.model.rows = []
|
225
|
+
let criteria = {
|
226
|
+
items: `tcp.f_plan_name,tcp.f_issue_time,tcp.f_safecheck_type,COUNT(tcp.id) as jihuazongshu,sum( CASE WHEN tcpi.f_state = '未检' THEN 1 ELSE 0 END ) as weijian,sum( CASE WHEN tcpi.f_state = '已检' THEN 1 ELSE 0 END ) as yijian,sum( CASE WHEN tcpi.f_last_check_state = '到访不遇' THEN 1 ELSE 0 END ) as daofangbuyu`,
|
227
|
+
tablename: 't_check_plan tcp LEFT JOIN t_check_plan_item tcpi ON tcp.id = tcpi.f_plan_id',
|
228
|
+
condition: args.condition || condition,
|
229
|
+
groupitem: 'tcp.f_plan_name,tcp.f_issue_time,tcp.f_safecheck_type'
|
230
|
+
}
|
231
|
+
let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
|
232
|
+
this.model.rows = result.data.rows
|
233
|
+
},
|
234
|
+
getAllPlanName(){
|
235
|
+
let criteria = {
|
236
|
+
items: 'f_plan_name',
|
237
|
+
tablename: 't_check_plan',
|
238
|
+
condition: `f_plan_name IS NOT NULL AND f_plan_name != ''`,
|
239
|
+
groupitem: 'f_plan_name'
|
240
|
+
}
|
241
|
+
let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
|
242
|
+
if(result.code == 200){
|
243
|
+
result.data.rows.forEach(item => this.planNameOptions.push({label:item.f_plan_name,value:item.f_plan_name}))
|
244
|
+
}
|
245
|
+
},
|
246
|
+
}
|
247
|
+
}
|
248
|
+
</script>
|