safecheck-client 3.0.33-3 → 3.0.33-6
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 +133 -133
- package/src/App.vue +31 -31
- package/src/filiale/dexin/android/SafecheckDevices.vue +1 -1
- package/src/filiale/dexin/android/WebMeterOpen.vue +1 -1
- package/src/filiale/fugou/pc/CheckBook.vue +301 -301
- package/src/filiale/fugou/pc/CheckBookDetails.vue +161 -161
- package/src/filiale/fugou/pc/CheckBookEntry.vue +66 -66
- package/src/filiale/fugou/pc/CheckBookList.vue +366 -366
- package/src/filiale/fugou/pc/CheckBookSearchArea.vue +560 -560
- package/src/filiale/fugou/pc/CheckBookSearchUser.vue +651 -651
- package/src/filiale/fugou/pc/checkPlanList.vue +371 -371
- package/src/filiale/wensu/pc/DefectPaperNew.vue +1 -1
- package/src/filiale/wensu/pc/PrintMaterialBill.vue +172 -172
- package/src/filiale/wensu/pc/SelectCheckPlan.vue +342 -342
- package/src/filiale/wensu/pc/checkUserList.vue +8 -8
- package/src/filiale/wenxi/android/SafecheckUserInfo.vue +651 -651
- package/src/main.js +33 -33
@@ -1,371 +1,371 @@
|
|
1
|
-
<template>
|
2
|
-
<div>
|
3
|
-
<criteria-paged :model="model" v-ref:paged>
|
4
|
-
<criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:criteria>
|
5
|
-
<div partial>
|
6
|
-
<div class="row">
|
7
|
-
<label class="form-group font_normal_body"><b>计划信息</b></label>
|
8
|
-
<div class="form-group col-sm-1" v-show="false">
|
9
|
-
<!--隐藏条件-->
|
10
|
-
<input type="text" class="input_search" v-model="model.f_plan_id"
|
11
|
-
style="width: 95%" placeholder="计划id" condition=" i.f_plan_id='{}'">
|
12
|
-
</div>
|
13
|
-
<div class="form-group col-sm-1" >
|
14
|
-
<input type="text" class="input_search" v-model="model.f_userinfo_code"
|
15
|
-
style="width: 95%" placeholder="客户编号" condition="i.f_userinfo_code='{}'">
|
16
|
-
</div>
|
17
|
-
<div class="form-group col-sm-1" >
|
18
|
-
<input type="text" class="input_search" v-model="model.f_user_name"
|
19
|
-
style="width: 95%" placeholder="客户名称" condition="i.f_user_name like '%{}%'">
|
20
|
-
</div>
|
21
|
-
<div class="form-group col-sm-1" >
|
22
|
-
<input type="text" class="input_search" v-model="model.f_address"
|
23
|
-
style="width: 95%" placeholder="客户地址" condition="i.f_address like '%{}%'">
|
24
|
-
</div>
|
25
|
-
<div class="form-group col-sm-1" >
|
26
|
-
<v-select :width="'95%'"
|
27
|
-
class="select select_list"
|
28
|
-
:value.sync="model.f_plan_type"
|
29
|
-
v-model="model.f_plan_type"
|
30
|
-
:options='$parent.$parent.planType'
|
31
|
-
placeholder='计划类型'
|
32
|
-
close-on-select
|
33
|
-
value-single
|
34
|
-
>
|
35
|
-
</v-select>
|
36
|
-
</div>
|
37
|
-
<div class="form-group col-sm-3" >
|
38
|
-
<button class="button_new" style="margin-right: 10px" @click="$parent.$parent.showUserCondition()">更多条件</button>
|
39
|
-
<button class="button_search" style="margin-right: 10px" @click="search()">查询</button>
|
40
|
-
<!-- <button class="button_search" style="margin-right: 10px" @click="clear()">清除</button>-->
|
41
|
-
<export-excel-safe :data="$parent.$parent.exportParameter"
|
42
|
-
:field="$parent.$parent.exportExcelField"
|
43
|
-
style="margin-left: 0px"
|
44
|
-
sqlurl="rs/logic/SafeExportExcel" sql-name="planItem"
|
45
|
-
:template-name="$parent.$parent.selectplan.f_plan_name + '安检计划导出'" :choose-col="true">
|
46
|
-
</export-excel-safe>
|
47
|
-
</div>
|
48
|
-
<div class="form-group col-sm-2 safe_p">
|
49
|
-
<label class="font_normal_body" :title="$parent.$parent.selectplan.f_plan_name">{{$parent.$parent.selectplan.f_plan_name?'当前选中 : '+$parent.$parent.selectplan.f_plan_name:''}}</label>
|
50
|
-
</div>
|
51
|
-
<div class="form-group col-sm-2" style="float: right">
|
52
|
-
<button class="button_search" style="margin-right: 10px" @click="$parent.$parent.showplanModal()">计划调整</button>
|
53
|
-
<button class="button_search" style="margin-right: 10px" @click="$parent.$parent.delPlanItem()">移出计划</button>
|
54
|
-
</div>
|
55
|
-
<modal :show.sync="$parent.$parent.showCondtion" v-ref:modal :width="'50%'" :backdrop="false">
|
56
|
-
<div slot="modal-header" class="modal-header">
|
57
|
-
<h4 class="modal-title">
|
58
|
-
计划内用户查询条件
|
59
|
-
</h4>
|
60
|
-
</div>
|
61
|
-
<div slot="modal-body" class="modal-body">
|
62
|
-
<div class="row">
|
63
|
-
<div class="form-group col-sm-4" >
|
64
|
-
<label class="font_normal_body">是否已检:</label>
|
65
|
-
<v-select
|
66
|
-
class="select select_list"
|
67
|
-
:value.sync="model.f_state"
|
68
|
-
v-model="model.f_state"
|
69
|
-
:options='$parent.$parent.checkState'
|
70
|
-
@change="$parent.$parent.checkStateChange(model.f_state)"
|
71
|
-
placeholder='请选择'
|
72
|
-
condition="i.f_state='{}'"
|
73
|
-
close-on-select
|
74
|
-
value-single
|
75
|
-
>
|
76
|
-
</v-select>
|
77
|
-
</div>
|
78
|
-
<div class="form-group col-sm-4" >
|
79
|
-
<label class="font_normal_body">安检结果:</label>
|
80
|
-
<v-select
|
81
|
-
class="select select_list"
|
82
|
-
:value.sync="model.f_check_state"
|
83
|
-
v-model="model.f_check_state"
|
84
|
-
:options='$parent.$parent.checkResults'
|
85
|
-
placeholder='请选择'
|
86
|
-
condition="i.f_last_check_state='{}'"
|
87
|
-
close-on-select
|
88
|
-
value-single
|
89
|
-
>
|
90
|
-
</v-select>
|
91
|
-
</div>
|
92
|
-
<div class="form-group col-sm-4" >
|
93
|
-
<label class="font_normal_body">安检起始:</label>
|
94
|
-
<datepicker
|
95
|
-
placeholder='请选择'
|
96
|
-
style="width:60%"
|
97
|
-
:disabled-days-of-week="[]"
|
98
|
-
:format="'yyyy-MM-dd'"
|
99
|
-
:show-rest-button="reset"
|
100
|
-
:value.sync="model.f_startfile_time"
|
101
|
-
v-model="model.f_startfile_time"
|
102
|
-
condition="i.f_last_check_date >='{} 00:00:00'">
|
103
|
-
</datepicker>
|
104
|
-
</div>
|
105
|
-
<div class="form-group col-sm-4" >
|
106
|
-
<label class="font_normal_body">安检截止:</label>
|
107
|
-
<datepicker
|
108
|
-
placeholder='请选择'
|
109
|
-
:disabled-days-of-week="[]"
|
110
|
-
style="width:60%"
|
111
|
-
:format="'yyyy-MM-dd'"
|
112
|
-
:show-rest-button="reset"
|
113
|
-
:value.sync="model.f_endfile_time"
|
114
|
-
v-model="model.f_endfile_time"
|
115
|
-
condition="i.f_last_check_date <='{} 00:00:00'">
|
116
|
-
</datepicker>
|
117
|
-
</div>
|
118
|
-
</div>
|
119
|
-
</div>
|
120
|
-
<div slot="modal-footer" class="modal-footer" style="text-align: center">
|
121
|
-
<button class="button_search" style="margin-right: 15px" @click="search()">查询</button>
|
122
|
-
<button class="button_search" @click="$parent.$parent.cancel">取消</button>
|
123
|
-
</div>
|
124
|
-
</modal>
|
125
|
-
</div>
|
126
|
-
</div>
|
127
|
-
</criteria>
|
128
|
-
<data-grid :model="model" partial='list' class="table_sy">
|
129
|
-
|
130
|
-
<template partial='head'>
|
131
|
-
<tr>
|
132
|
-
<th><nobr><input type="checkbox" onClick="event.cancelBubble = true" :checked="$parent.$parent.$parent.checkAll" @change="$parent.$parent.$parent.setCheckAll()"/> 全选</nobr></th>
|
133
|
-
<th><nobr>用户编号</nobr></th>
|
134
|
-
<th><nobr>用户名称</nobr></th>
|
135
|
-
<th><nobr>用户电话</nobr></th>
|
136
|
-
<th><nobr>用户类型</nobr></th>
|
137
|
-
<th><nobr>小区名称</nobr></th>
|
138
|
-
<th><nobr>安检状态</nobr></th>
|
139
|
-
<th><nobr>地址</nobr></th>
|
140
|
-
</tr>
|
141
|
-
</template>
|
142
|
-
<template partial='body'>
|
143
|
-
<td style="text-align: center;white-space:nowrap;"><input type="checkbox" onClick="event.cancelBubble = true" :checked="$parent.$parent.$parent.isChecked(row.f_check_item_id)" @change="$parent.$parent.$parent.setCheckes(row.f_check_item_id)" /></td>
|
144
|
-
<td style="text-align: center"><nobr>{{row.f_userinfo_code}}</nobr></td>
|
145
|
-
<td style="text-align: center"><nobr>{{row.f_user_name}}</nobr></td>
|
146
|
-
<td style="text-align: center"><nobr>{{row.f_user_phone}}</nobr></td>
|
147
|
-
<td style="text-align: center"><nobr>{{row.f_user_type}}</nobr></td>
|
148
|
-
<td style="text-align: center"><nobr>{{row.f_residential_area}}</nobr></td>
|
149
|
-
<td style="text-align: center"><nobr>{{row.f_state==='已检'?row.f_last_check_state:'未检'}}</nobr></td>
|
150
|
-
<td style="text-align: center"><nobr>{{row.f_address}}</nobr></td>
|
151
|
-
</template>
|
152
|
-
</data-grid>
|
153
|
-
</criteria-paged>
|
154
|
-
<modal :show.sync="showPlanModal" v-ref:modalp>
|
155
|
-
<div slot="modal-header" class="modal-header">
|
156
|
-
<h4 class="modal-title">
|
157
|
-
计划内用户调整
|
158
|
-
</h4>
|
159
|
-
</div>
|
160
|
-
<div slot="modal-body" class="modal-body">
|
161
|
-
<plan-chooser :f.sync="userlogin.orgid" v-ref:chooser></plan-chooser>
|
162
|
-
</div>
|
163
|
-
<div slot="modal-footer" class="modal-footer" style="text-align: center">
|
164
|
-
<button class="button_search" style="margin-right: 15px" @click="dragtoOtherPlanIteem">确认</button>
|
165
|
-
<button class="button_search" @click="cancel">取消</button>
|
166
|
-
</div>
|
167
|
-
</modal>
|
168
|
-
</div>
|
169
|
-
</template>
|
170
|
-
|
171
|
-
<script>
|
172
|
-
import {HttpResetClass, PagedList} from "vue-client";
|
173
|
-
import Vue from "vue";
|
174
|
-
|
175
|
-
export default {
|
176
|
-
name: "PlanManage",
|
177
|
-
title: '计划管理',
|
178
|
-
data() {
|
179
|
-
return {
|
180
|
-
model:new PagedList('/rs/sql/planItem', 100, {}),
|
181
|
-
a:'1',
|
182
|
-
opt:[{label:"测试",value:"测试"}],
|
183
|
-
showCondtion:false,
|
184
|
-
checkAll:false,
|
185
|
-
checkes:[],
|
186
|
-
checkResults:[{label:'到访不遇',value:'到访不遇'},{label:'拒检',value:'拒检'},{label:'入户',value:'入户'}],
|
187
|
-
checkState:[{label:'全部',value:''},{label:'未检',value:'未检'},{label:'已检',value:'已检'}],
|
188
|
-
showPlanModal:false,
|
189
|
-
exportExcelField: {
|
190
|
-
'f_userinfo_code':'用户编号',
|
191
|
-
'f_user_name':'用户名称',
|
192
|
-
'f_user_type':'用户类型',
|
193
|
-
'f_residential_area':'小区名称',
|
194
|
-
'f_state':'安检状态',
|
195
|
-
'f_address':'地址',
|
196
|
-
'f_user_phone':'用户电话',
|
197
|
-
'f_newfile_date':'建档日期'
|
198
|
-
}
|
199
|
-
}
|
200
|
-
},
|
201
|
-
props:["selectplan","userlogin"],
|
202
|
-
ready(){
|
203
|
-
|
204
|
-
},
|
205
|
-
computed:{
|
206
|
-
exportParameter(){
|
207
|
-
// excel 导出条件拼接
|
208
|
-
return {
|
209
|
-
condition: this.$refs.paged.model.condition,
|
210
|
-
groupName: this.groupNameForSql
|
211
|
-
}
|
212
|
-
},
|
213
|
-
planType(){
|
214
|
-
return this.$appdata.getParam('计划类型')
|
215
|
-
}
|
216
|
-
},
|
217
|
-
methods:{
|
218
|
-
clear(){
|
219
|
-
this.model.f_plan_id = '';
|
220
|
-
this.model.f_userinfo_code = '';
|
221
|
-
this.model.f_user_name = '';
|
222
|
-
this.model.f_address='';
|
223
|
-
|
224
|
-
},
|
225
|
-
//将某个计划下的一项拖到另一个计划
|
226
|
-
async dragtoOtherPlanIteem() {
|
227
|
-
//tag)
|
228
|
-
|
229
|
-
if (!this.$refs.modalp.$children[0].selectedRow.id) {
|
230
|
-
this.$showMessage("请选择需要调整到那个计划中!")
|
231
|
-
return
|
232
|
-
}
|
233
|
-
this.$parent.isSend=true
|
234
|
-
try{
|
235
|
-
let res=await new HttpResetClass().load("POST", "/rs/logic/UpCheckPlanItem", {
|
236
|
-
data:{
|
237
|
-
f_operator:this.userlogin.name,
|
238
|
-
f_plan_id:this.$refs.modalp.$children[0].selectedRow.id,
|
239
|
-
condition:this.model.condition,
|
240
|
-
switchCheckAll:true,
|
241
|
-
checkAll:this.checkAll,
|
242
|
-
param:this.checkes,
|
243
|
-
columnName: "i.id"
|
244
|
-
}
|
245
|
-
}, {resolveMsg: null, rejectMsg: null})
|
246
|
-
this.$parent.isSend=false
|
247
|
-
if(res.data.code==200){
|
248
|
-
this.$showMessage("更换安检计划成功!")
|
249
|
-
this.$parent.refreshPlan()
|
250
|
-
}else{
|
251
|
-
this.$showMessage("更换安检计划失败!")
|
252
|
-
}
|
253
|
-
}catch (e) {
|
254
|
-
this.$parent.isSend=false
|
255
|
-
this.$showMessage("更换安检计划失败!")
|
256
|
-
}
|
257
|
-
},
|
258
|
-
showplanModal(){
|
259
|
-
if(!this.selectplan || !this.selectplan.id){
|
260
|
-
this.$showMessage("请先打开一个计划再进行操作")
|
261
|
-
return
|
262
|
-
}
|
263
|
-
if(!this.checkAll && this.checkes.length==0){
|
264
|
-
this.$showMessage("请先在计划中勾选你要调整的用户!")
|
265
|
-
return
|
266
|
-
}
|
267
|
-
this.showPlanModal=true
|
268
|
-
},
|
269
|
-
showUserCondition(){
|
270
|
-
this.showCondtion=true
|
271
|
-
},
|
272
|
-
isChecked(v) {
|
273
|
-
// 如果全选,不在的按选中算,否则,在的按选中算
|
274
|
-
if (this.checkAll) {
|
275
|
-
return this.checkes.indexOf(v) == -1
|
276
|
-
} else {
|
277
|
-
return this.checkes.indexOf(v) != -1
|
278
|
-
}
|
279
|
-
},
|
280
|
-
setCheckAll() {
|
281
|
-
this.checkAll=this.checkAll?false:true;
|
282
|
-
// 全选改变后,清空选中数据
|
283
|
-
this.checkes = []
|
284
|
-
},
|
285
|
-
setCheckes(id) {
|
286
|
-
let index=this.checkes.indexOf(id)
|
287
|
-
if(index<0){
|
288
|
-
this.checkes.push(id)
|
289
|
-
}else{
|
290
|
-
this.checkes.splice(index,1)
|
291
|
-
}
|
292
|
-
},
|
293
|
-
cancel(){
|
294
|
-
this.showCondtion=false
|
295
|
-
this.showPlanModal=false
|
296
|
-
},
|
297
|
-
selfSearch (args) {
|
298
|
-
if(!this.selectplan.id){
|
299
|
-
this.$showMessage("请先选择一个计划!")
|
300
|
-
return
|
301
|
-
}
|
302
|
-
this.cancel()
|
303
|
-
this.checkes=[]
|
304
|
-
this.checkAll=false
|
305
|
-
args.condition+= ` and i.f_state!= '作废'`
|
306
|
-
this.model.search(args.condition, args.model, args.condValue)
|
307
|
-
},
|
308
|
-
checkStateChange(val){
|
309
|
-
if(val=='未检'){
|
310
|
-
this.checkResults=[]
|
311
|
-
this.$refs.paged.$refs.criteria.model.f_check_state=''
|
312
|
-
}else{
|
313
|
-
this.checkResults=[{label:'到访不遇',value:'到访不遇'},{label:'拒检',value:'拒检'},{label:'入户',value:'入户'}]
|
314
|
-
}
|
315
|
-
},
|
316
|
-
//修改计划项状态为作废
|
317
|
-
async delPlanItem() {
|
318
|
-
if(!this.selectplan || !this.selectplan.id){
|
319
|
-
this.$showMessage("请先打开一个计划再进行操作")
|
320
|
-
return
|
321
|
-
}
|
322
|
-
if(!this.checkAll && this.checkes.length==0){
|
323
|
-
this.$showMessage("请先在计划中勾选你要作废的用户!")
|
324
|
-
return
|
325
|
-
}
|
326
|
-
this.$showMessage("此操作无法撤回,确定要执行作废安检单操作吗?",['confirm','cancel']).then((button)=>{
|
327
|
-
if(button=='confirm'){
|
328
|
-
let resu=new HttpResetClass().load("POST", "/rs/logic/UpCheckPlanItemState", {
|
329
|
-
data: {
|
330
|
-
f_operator:this.userlogin.name,
|
331
|
-
condition:this.model.condition,
|
332
|
-
switchCheckAll:true,
|
333
|
-
checkAll:this.checkAll,
|
334
|
-
param:this.checkes,
|
335
|
-
columnName: "i.id"
|
336
|
-
}
|
337
|
-
}, {resolveMsg: null, rejectMsg: null}).then((resu)=>{
|
338
|
-
|
339
|
-
//tag)
|
340
|
-
if(resu.data.code==200){
|
341
|
-
this.$showMessage("移除安检单成功! 成功移除:"+resu.data.res.up+"条"+(resu.data.res.noup>0?"有"+resu.data.res.noup+"条已经不是 ‘未检’ 状态!":""))
|
342
|
-
//this.checkes=[]
|
343
|
-
//this.checkAll=false
|
344
|
-
this.$parent.refresh()
|
345
|
-
}else{
|
346
|
-
this.$showMessage("取消安检计划失败!")
|
347
|
-
}
|
348
|
-
})
|
349
|
-
}
|
350
|
-
})
|
351
|
-
}
|
352
|
-
},
|
353
|
-
watch:{
|
354
|
-
'selectplan.id' (){
|
355
|
-
//tag
|
356
|
-
if(this.selectplan.id){
|
357
|
-
this.$refs.paged.$refs.criteria.model.f_plan_id=this.selectplan.id
|
358
|
-
this.$refs.paged.$refs.criteria.search()
|
359
|
-
}
|
360
|
-
}
|
361
|
-
}
|
362
|
-
}
|
363
|
-
</script>
|
364
|
-
|
365
|
-
<style scoped>
|
366
|
-
.safe_p{
|
367
|
-
white-space: nowrap;
|
368
|
-
overflow: hidden;
|
369
|
-
text-overflow: ellipsis;
|
370
|
-
}
|
371
|
-
</style>
|
1
|
+
<template>
|
2
|
+
<div>
|
3
|
+
<criteria-paged :model="model" v-ref:paged>
|
4
|
+
<criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:criteria>
|
5
|
+
<div partial>
|
6
|
+
<div class="row">
|
7
|
+
<label class="form-group font_normal_body"><b>计划信息</b></label>
|
8
|
+
<div class="form-group col-sm-1" v-show="false">
|
9
|
+
<!--隐藏条件-->
|
10
|
+
<input type="text" class="input_search" v-model="model.f_plan_id"
|
11
|
+
style="width: 95%" placeholder="计划id" condition=" i.f_plan_id='{}'">
|
12
|
+
</div>
|
13
|
+
<div class="form-group col-sm-1" >
|
14
|
+
<input type="text" class="input_search" v-model="model.f_userinfo_code"
|
15
|
+
style="width: 95%" placeholder="客户编号" condition="i.f_userinfo_code='{}'">
|
16
|
+
</div>
|
17
|
+
<div class="form-group col-sm-1" >
|
18
|
+
<input type="text" class="input_search" v-model="model.f_user_name"
|
19
|
+
style="width: 95%" placeholder="客户名称" condition="i.f_user_name like '%{}%'">
|
20
|
+
</div>
|
21
|
+
<div class="form-group col-sm-1" >
|
22
|
+
<input type="text" class="input_search" v-model="model.f_address"
|
23
|
+
style="width: 95%" placeholder="客户地址" condition="i.f_address like '%{}%'">
|
24
|
+
</div>
|
25
|
+
<div class="form-group col-sm-1" >
|
26
|
+
<v-select :width="'95%'"
|
27
|
+
class="select select_list"
|
28
|
+
:value.sync="model.f_plan_type"
|
29
|
+
v-model="model.f_plan_type"
|
30
|
+
:options='$parent.$parent.planType'
|
31
|
+
placeholder='计划类型'
|
32
|
+
close-on-select
|
33
|
+
value-single
|
34
|
+
>
|
35
|
+
</v-select>
|
36
|
+
</div>
|
37
|
+
<div class="form-group col-sm-3" >
|
38
|
+
<button class="button_new" style="margin-right: 10px" @click="$parent.$parent.showUserCondition()">更多条件</button>
|
39
|
+
<button class="button_search" style="margin-right: 10px" @click="search()">查询</button>
|
40
|
+
<!-- <button class="button_search" style="margin-right: 10px" @click="clear()">清除</button>-->
|
41
|
+
<export-excel-safe :data="$parent.$parent.exportParameter"
|
42
|
+
:field="$parent.$parent.exportExcelField"
|
43
|
+
style="margin-left: 0px"
|
44
|
+
sqlurl="rs/logic/SafeExportExcel" sql-name="planItem"
|
45
|
+
:template-name="$parent.$parent.selectplan.f_plan_name + '安检计划导出'" :choose-col="true">
|
46
|
+
</export-excel-safe>
|
47
|
+
</div>
|
48
|
+
<div class="form-group col-sm-2 safe_p">
|
49
|
+
<label class="font_normal_body" :title="$parent.$parent.selectplan.f_plan_name">{{$parent.$parent.selectplan.f_plan_name?'当前选中 : '+$parent.$parent.selectplan.f_plan_name:''}}</label>
|
50
|
+
</div>
|
51
|
+
<div class="form-group col-sm-2" style="float: right">
|
52
|
+
<button class="button_search" style="margin-right: 10px" @click="$parent.$parent.showplanModal()">计划调整</button>
|
53
|
+
<button class="button_search" style="margin-right: 10px" @click="$parent.$parent.delPlanItem()">移出计划</button>
|
54
|
+
</div>
|
55
|
+
<modal :show.sync="$parent.$parent.showCondtion" v-ref:modal :width="'50%'" :backdrop="false">
|
56
|
+
<div slot="modal-header" class="modal-header">
|
57
|
+
<h4 class="modal-title">
|
58
|
+
计划内用户查询条件
|
59
|
+
</h4>
|
60
|
+
</div>
|
61
|
+
<div slot="modal-body" class="modal-body">
|
62
|
+
<div class="row">
|
63
|
+
<div class="form-group col-sm-4" >
|
64
|
+
<label class="font_normal_body">是否已检:</label>
|
65
|
+
<v-select
|
66
|
+
class="select select_list"
|
67
|
+
:value.sync="model.f_state"
|
68
|
+
v-model="model.f_state"
|
69
|
+
:options='$parent.$parent.checkState'
|
70
|
+
@change="$parent.$parent.checkStateChange(model.f_state)"
|
71
|
+
placeholder='请选择'
|
72
|
+
condition="i.f_state='{}'"
|
73
|
+
close-on-select
|
74
|
+
value-single
|
75
|
+
>
|
76
|
+
</v-select>
|
77
|
+
</div>
|
78
|
+
<div class="form-group col-sm-4" >
|
79
|
+
<label class="font_normal_body">安检结果:</label>
|
80
|
+
<v-select
|
81
|
+
class="select select_list"
|
82
|
+
:value.sync="model.f_check_state"
|
83
|
+
v-model="model.f_check_state"
|
84
|
+
:options='$parent.$parent.checkResults'
|
85
|
+
placeholder='请选择'
|
86
|
+
condition="i.f_last_check_state='{}'"
|
87
|
+
close-on-select
|
88
|
+
value-single
|
89
|
+
>
|
90
|
+
</v-select>
|
91
|
+
</div>
|
92
|
+
<div class="form-group col-sm-4" >
|
93
|
+
<label class="font_normal_body">安检起始:</label>
|
94
|
+
<datepicker
|
95
|
+
placeholder='请选择'
|
96
|
+
style="width:60%"
|
97
|
+
:disabled-days-of-week="[]"
|
98
|
+
:format="'yyyy-MM-dd'"
|
99
|
+
:show-rest-button="reset"
|
100
|
+
:value.sync="model.f_startfile_time"
|
101
|
+
v-model="model.f_startfile_time"
|
102
|
+
condition="i.f_last_check_date >='{} 00:00:00'">
|
103
|
+
</datepicker>
|
104
|
+
</div>
|
105
|
+
<div class="form-group col-sm-4" >
|
106
|
+
<label class="font_normal_body">安检截止:</label>
|
107
|
+
<datepicker
|
108
|
+
placeholder='请选择'
|
109
|
+
:disabled-days-of-week="[]"
|
110
|
+
style="width:60%"
|
111
|
+
:format="'yyyy-MM-dd'"
|
112
|
+
:show-rest-button="reset"
|
113
|
+
:value.sync="model.f_endfile_time"
|
114
|
+
v-model="model.f_endfile_time"
|
115
|
+
condition="i.f_last_check_date <='{} 00:00:00'">
|
116
|
+
</datepicker>
|
117
|
+
</div>
|
118
|
+
</div>
|
119
|
+
</div>
|
120
|
+
<div slot="modal-footer" class="modal-footer" style="text-align: center">
|
121
|
+
<button class="button_search" style="margin-right: 15px" @click="search()">查询</button>
|
122
|
+
<button class="button_search" @click="$parent.$parent.cancel">取消</button>
|
123
|
+
</div>
|
124
|
+
</modal>
|
125
|
+
</div>
|
126
|
+
</div>
|
127
|
+
</criteria>
|
128
|
+
<data-grid :model="model" partial='list' class="table_sy">
|
129
|
+
|
130
|
+
<template partial='head'>
|
131
|
+
<tr>
|
132
|
+
<th><nobr><input type="checkbox" onClick="event.cancelBubble = true" :checked="$parent.$parent.$parent.checkAll" @change="$parent.$parent.$parent.setCheckAll()"/> 全选</nobr></th>
|
133
|
+
<th><nobr>用户编号</nobr></th>
|
134
|
+
<th><nobr>用户名称</nobr></th>
|
135
|
+
<th><nobr>用户电话</nobr></th>
|
136
|
+
<th><nobr>用户类型</nobr></th>
|
137
|
+
<th><nobr>小区名称</nobr></th>
|
138
|
+
<th><nobr>安检状态</nobr></th>
|
139
|
+
<th><nobr>地址</nobr></th>
|
140
|
+
</tr>
|
141
|
+
</template>
|
142
|
+
<template partial='body'>
|
143
|
+
<td style="text-align: center;white-space:nowrap;"><input type="checkbox" onClick="event.cancelBubble = true" :checked="$parent.$parent.$parent.isChecked(row.f_check_item_id)" @change="$parent.$parent.$parent.setCheckes(row.f_check_item_id)" /></td>
|
144
|
+
<td style="text-align: center"><nobr>{{row.f_userinfo_code}}</nobr></td>
|
145
|
+
<td style="text-align: center"><nobr>{{row.f_user_name}}</nobr></td>
|
146
|
+
<td style="text-align: center"><nobr>{{row.f_user_phone}}</nobr></td>
|
147
|
+
<td style="text-align: center"><nobr>{{row.f_user_type}}</nobr></td>
|
148
|
+
<td style="text-align: center"><nobr>{{row.f_residential_area}}</nobr></td>
|
149
|
+
<td style="text-align: center"><nobr>{{row.f_state==='已检'?row.f_last_check_state:'未检'}}</nobr></td>
|
150
|
+
<td style="text-align: center"><nobr>{{row.f_address}}</nobr></td>
|
151
|
+
</template>
|
152
|
+
</data-grid>
|
153
|
+
</criteria-paged>
|
154
|
+
<modal :show.sync="showPlanModal" v-ref:modalp>
|
155
|
+
<div slot="modal-header" class="modal-header">
|
156
|
+
<h4 class="modal-title">
|
157
|
+
计划内用户调整
|
158
|
+
</h4>
|
159
|
+
</div>
|
160
|
+
<div slot="modal-body" class="modal-body">
|
161
|
+
<plan-chooser :f.sync="userlogin.orgid" v-ref:chooser></plan-chooser>
|
162
|
+
</div>
|
163
|
+
<div slot="modal-footer" class="modal-footer" style="text-align: center">
|
164
|
+
<button class="button_search" style="margin-right: 15px" @click="dragtoOtherPlanIteem">确认</button>
|
165
|
+
<button class="button_search" @click="cancel">取消</button>
|
166
|
+
</div>
|
167
|
+
</modal>
|
168
|
+
</div>
|
169
|
+
</template>
|
170
|
+
|
171
|
+
<script>
|
172
|
+
import {HttpResetClass, PagedList} from "vue-client";
|
173
|
+
import Vue from "vue";
|
174
|
+
|
175
|
+
export default {
|
176
|
+
name: "PlanManage",
|
177
|
+
title: '计划管理',
|
178
|
+
data() {
|
179
|
+
return {
|
180
|
+
model:new PagedList('/rs/sql/planItem', 100, {}),
|
181
|
+
a:'1',
|
182
|
+
opt:[{label:"测试",value:"测试"}],
|
183
|
+
showCondtion:false,
|
184
|
+
checkAll:false,
|
185
|
+
checkes:[],
|
186
|
+
checkResults:[{label:'到访不遇',value:'到访不遇'},{label:'拒检',value:'拒检'},{label:'入户',value:'入户'}],
|
187
|
+
checkState:[{label:'全部',value:''},{label:'未检',value:'未检'},{label:'已检',value:'已检'}],
|
188
|
+
showPlanModal:false,
|
189
|
+
exportExcelField: {
|
190
|
+
'f_userinfo_code':'用户编号',
|
191
|
+
'f_user_name':'用户名称',
|
192
|
+
'f_user_type':'用户类型',
|
193
|
+
'f_residential_area':'小区名称',
|
194
|
+
'f_state':'安检状态',
|
195
|
+
'f_address':'地址',
|
196
|
+
'f_user_phone':'用户电话',
|
197
|
+
'f_newfile_date':'建档日期'
|
198
|
+
}
|
199
|
+
}
|
200
|
+
},
|
201
|
+
props:["selectplan","userlogin"],
|
202
|
+
ready(){
|
203
|
+
|
204
|
+
},
|
205
|
+
computed:{
|
206
|
+
exportParameter(){
|
207
|
+
// excel 导出条件拼接
|
208
|
+
return {
|
209
|
+
condition: this.$refs.paged.model.condition,
|
210
|
+
groupName: this.groupNameForSql
|
211
|
+
}
|
212
|
+
},
|
213
|
+
planType(){
|
214
|
+
return this.$appdata.getParam('计划类型')
|
215
|
+
}
|
216
|
+
},
|
217
|
+
methods:{
|
218
|
+
clear(){
|
219
|
+
this.model.f_plan_id = '';
|
220
|
+
this.model.f_userinfo_code = '';
|
221
|
+
this.model.f_user_name = '';
|
222
|
+
this.model.f_address='';
|
223
|
+
|
224
|
+
},
|
225
|
+
//将某个计划下的一项拖到另一个计划
|
226
|
+
async dragtoOtherPlanIteem() {
|
227
|
+
//tag)
|
228
|
+
|
229
|
+
if (!this.$refs.modalp.$children[0].selectedRow.id) {
|
230
|
+
this.$showMessage("请选择需要调整到那个计划中!")
|
231
|
+
return
|
232
|
+
}
|
233
|
+
this.$parent.isSend=true
|
234
|
+
try{
|
235
|
+
let res=await new HttpResetClass().load("POST", "/rs/logic/UpCheckPlanItem", {
|
236
|
+
data:{
|
237
|
+
f_operator:this.userlogin.name,
|
238
|
+
f_plan_id:this.$refs.modalp.$children[0].selectedRow.id,
|
239
|
+
condition:this.model.condition,
|
240
|
+
switchCheckAll:true,
|
241
|
+
checkAll:this.checkAll,
|
242
|
+
param:this.checkes,
|
243
|
+
columnName: "i.id"
|
244
|
+
}
|
245
|
+
}, {resolveMsg: null, rejectMsg: null})
|
246
|
+
this.$parent.isSend=false
|
247
|
+
if(res.data.code==200){
|
248
|
+
this.$showMessage("更换安检计划成功!")
|
249
|
+
this.$parent.refreshPlan()
|
250
|
+
}else{
|
251
|
+
this.$showMessage("更换安检计划失败!")
|
252
|
+
}
|
253
|
+
}catch (e) {
|
254
|
+
this.$parent.isSend=false
|
255
|
+
this.$showMessage("更换安检计划失败!")
|
256
|
+
}
|
257
|
+
},
|
258
|
+
showplanModal(){
|
259
|
+
if(!this.selectplan || !this.selectplan.id){
|
260
|
+
this.$showMessage("请先打开一个计划再进行操作")
|
261
|
+
return
|
262
|
+
}
|
263
|
+
if(!this.checkAll && this.checkes.length==0){
|
264
|
+
this.$showMessage("请先在计划中勾选你要调整的用户!")
|
265
|
+
return
|
266
|
+
}
|
267
|
+
this.showPlanModal=true
|
268
|
+
},
|
269
|
+
showUserCondition(){
|
270
|
+
this.showCondtion=true
|
271
|
+
},
|
272
|
+
isChecked(v) {
|
273
|
+
// 如果全选,不在的按选中算,否则,在的按选中算
|
274
|
+
if (this.checkAll) {
|
275
|
+
return this.checkes.indexOf(v) == -1
|
276
|
+
} else {
|
277
|
+
return this.checkes.indexOf(v) != -1
|
278
|
+
}
|
279
|
+
},
|
280
|
+
setCheckAll() {
|
281
|
+
this.checkAll=this.checkAll?false:true;
|
282
|
+
// 全选改变后,清空选中数据
|
283
|
+
this.checkes = []
|
284
|
+
},
|
285
|
+
setCheckes(id) {
|
286
|
+
let index=this.checkes.indexOf(id)
|
287
|
+
if(index<0){
|
288
|
+
this.checkes.push(id)
|
289
|
+
}else{
|
290
|
+
this.checkes.splice(index,1)
|
291
|
+
}
|
292
|
+
},
|
293
|
+
cancel(){
|
294
|
+
this.showCondtion=false
|
295
|
+
this.showPlanModal=false
|
296
|
+
},
|
297
|
+
selfSearch (args) {
|
298
|
+
if(!this.selectplan.id){
|
299
|
+
this.$showMessage("请先选择一个计划!")
|
300
|
+
return
|
301
|
+
}
|
302
|
+
this.cancel()
|
303
|
+
this.checkes=[]
|
304
|
+
this.checkAll=false
|
305
|
+
args.condition+= ` and i.f_state!= '作废'`
|
306
|
+
this.model.search(args.condition, args.model, args.condValue)
|
307
|
+
},
|
308
|
+
checkStateChange(val){
|
309
|
+
if(val=='未检'){
|
310
|
+
this.checkResults=[]
|
311
|
+
this.$refs.paged.$refs.criteria.model.f_check_state=''
|
312
|
+
}else{
|
313
|
+
this.checkResults=[{label:'到访不遇',value:'到访不遇'},{label:'拒检',value:'拒检'},{label:'入户',value:'入户'}]
|
314
|
+
}
|
315
|
+
},
|
316
|
+
//修改计划项状态为作废
|
317
|
+
async delPlanItem() {
|
318
|
+
if(!this.selectplan || !this.selectplan.id){
|
319
|
+
this.$showMessage("请先打开一个计划再进行操作")
|
320
|
+
return
|
321
|
+
}
|
322
|
+
if(!this.checkAll && this.checkes.length==0){
|
323
|
+
this.$showMessage("请先在计划中勾选你要作废的用户!")
|
324
|
+
return
|
325
|
+
}
|
326
|
+
this.$showMessage("此操作无法撤回,确定要执行作废安检单操作吗?",['confirm','cancel']).then((button)=>{
|
327
|
+
if(button=='confirm'){
|
328
|
+
let resu=new HttpResetClass().load("POST", "/rs/logic/UpCheckPlanItemState", {
|
329
|
+
data: {
|
330
|
+
f_operator:this.userlogin.name,
|
331
|
+
condition:this.model.condition,
|
332
|
+
switchCheckAll:true,
|
333
|
+
checkAll:this.checkAll,
|
334
|
+
param:this.checkes,
|
335
|
+
columnName: "i.id"
|
336
|
+
}
|
337
|
+
}, {resolveMsg: null, rejectMsg: null}).then((resu)=>{
|
338
|
+
|
339
|
+
//tag)
|
340
|
+
if(resu.data.code==200){
|
341
|
+
this.$showMessage("移除安检单成功! 成功移除:"+resu.data.res.up+"条"+(resu.data.res.noup>0?"有"+resu.data.res.noup+"条已经不是 ‘未检’ 状态!":""))
|
342
|
+
//this.checkes=[]
|
343
|
+
//this.checkAll=false
|
344
|
+
this.$parent.refresh()
|
345
|
+
}else{
|
346
|
+
this.$showMessage("取消安检计划失败!")
|
347
|
+
}
|
348
|
+
})
|
349
|
+
}
|
350
|
+
})
|
351
|
+
}
|
352
|
+
},
|
353
|
+
watch:{
|
354
|
+
'selectplan.id' (){
|
355
|
+
//tag
|
356
|
+
if(this.selectplan.id){
|
357
|
+
this.$refs.paged.$refs.criteria.model.f_plan_id=this.selectplan.id
|
358
|
+
this.$refs.paged.$refs.criteria.search()
|
359
|
+
}
|
360
|
+
}
|
361
|
+
}
|
362
|
+
}
|
363
|
+
</script>
|
364
|
+
|
365
|
+
<style scoped>
|
366
|
+
.safe_p{
|
367
|
+
white-space: nowrap;
|
368
|
+
overflow: hidden;
|
369
|
+
text-overflow: ellipsis;
|
370
|
+
}
|
371
|
+
</style>
|