safecheck-client 3.0.39-73 → 3.0.39-74
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 +31 -26
- package/src/components/android/rejectInspecCheck.vue +322 -322
- package/src/components/pc/RoleSelector.vue +172 -172
- package/src/components/rongcheng/AddPlanItem.vue +344 -344
- package/src/components/rongcheng/CheckCurrentCreate.vue +1081 -1081
- package/src/components/rongcheng/PaperDefectMain.vue +828 -828
- package/src/filiale/BFshiye/android/AndroidDefectDeal.vue +652 -652
- package/src/filiale/BFshiye/pc/DefectListNew.vue +637 -637
- package/src/filiale/BFshiye/pc/NewCheckpaper.vue +1962 -1962
- package/src/filiale/BFshiye/pc/checkUserList.vue +772 -772
- package/src/filiale/BFshiye/pc.js +17 -17
- package/src/filiale/baiyin/android/SafecheckUserInfo.vue +775 -775
- package/src/filiale/baiyin/android.js +12 -12
- package/src/filiale/dexin/pc/PaperList.vue +840 -840
- package/src/filiale/qingjian/android/PhoneUpUserinfo.vue +1357 -1357
- package/src/filiale/qingjian/android/SafecheckUserInfo.vue +823 -823
- package/src/filiale/qingjian/pc/NewCheckpaper.vue +1919 -1919
- package/src/filiale/rongchuang/android/PhoneUpUserinfo.vue +1262 -1262
- package/src/filiale/rongchuang/pc/checkPlanList.vue +398 -398
- package/src/filiale/rongchuang/pc.js +18 -18
- package/src/filiale/siyang/android/PhoneInsurancePurchaseDetail.vue +532 -532
- package/src/filiale/tongchuan/android/PhoneUpUserinfo.vue +1340 -1340
- package/src/filiale/wensu/android/SafecheckOrderV.vue +2444 -2444
- package/src/filiale/wensu/android/SafecheckUserInfo.vue +712 -712
- package/src/filiale/wensu/pc/CheckSearchUser.vue +1251 -1251
- package/src/filiale/yangchunboneng/android/CurrentCreate.vue +1191 -1191
- package/src/filiale/yangchunboneng/android/SafecheckUserInfo.vue +913 -913
- package/src/filiale/yangchunboneng/android.js +21 -21
- package/src/filiale/yangchunboneng/pc/CheckBookList.vue +353 -353
- package/src/filiale/yangchunboneng/pc/CheckSearchUser.vue +1197 -1197
- package/src/filiale/yangchunboneng/pc/HiddenSituation.vue +171 -171
- package/src/filiale/yangchunboneng/pc/PaperDefectMain.vue +1112 -1112
- package/src/filiale/yangchunboneng/pc/PaperList.vue +757 -757
- package/src/filiale/yangchunboneng/pc/SelectCheckPlan.vue +331 -331
- package/src/filiale/yangchunboneng/pc.js +29 -29
- package/src/main.js +1 -1
- package/src/rongcheng.js +319 -319
- package/src/safecheck-android.js +316 -316
- package/yarn-error.log +0 -140
|
@@ -1,398 +1,398 @@
|
|
|
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="$parent.$parent.f_state"
|
|
29
|
-
v-model="$parent.$parent.f_state"
|
|
30
|
-
:options='$parent.$parent.checkState'
|
|
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()" v-show="$parent.$parent.isdelete">移出计划</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 class="form-group col-sm-4" >
|
|
119
|
-
<label class="font_normal_body">小区名称:</label>
|
|
120
|
-
<v-select
|
|
121
|
-
class="select select_list"
|
|
122
|
-
:value.sync="model.f_residential_area"
|
|
123
|
-
v-model="model.f_residential_area"
|
|
124
|
-
:options='$parent.$parent.area'
|
|
125
|
-
placeholder='请选择'
|
|
126
|
-
condition="i.f_residential_area='{}'"
|
|
127
|
-
close-on-select
|
|
128
|
-
value-single
|
|
129
|
-
>
|
|
130
|
-
</v-select>
|
|
131
|
-
</div>
|
|
132
|
-
</div>
|
|
133
|
-
</div>
|
|
134
|
-
<div slot="modal-footer" class="modal-footer" style="text-align: center">
|
|
135
|
-
<button class="button_search" style="margin-right: 15px" @click="search()">查询</button>
|
|
136
|
-
<button class="button_search" @click="$parent.$parent.cancel">取消</button>
|
|
137
|
-
</div>
|
|
138
|
-
</modal>
|
|
139
|
-
</div>
|
|
140
|
-
</div>
|
|
141
|
-
</criteria>
|
|
142
|
-
<data-grid :model="model" partial='list' class="table_sy">
|
|
143
|
-
|
|
144
|
-
<template partial='head'>
|
|
145
|
-
<tr>
|
|
146
|
-
<th><nobr><input type="checkbox" onClick="event.cancelBubble = true" :checked="$parent.$parent.$parent.checkAll" @change="$parent.$parent.$parent.setCheckAll()"/> 全选</nobr></th>
|
|
147
|
-
<th><nobr>用户编号</nobr></th>
|
|
148
|
-
<th><nobr>用户名称</nobr></th>
|
|
149
|
-
<th><nobr>用户电话</nobr></th>
|
|
150
|
-
<th><nobr>用户类型</nobr></th>
|
|
151
|
-
<th><nobr>小区名称</nobr></th>
|
|
152
|
-
<th><nobr>安检状态</nobr></th>
|
|
153
|
-
<th><nobr>地址</nobr></th>
|
|
154
|
-
</tr>
|
|
155
|
-
</template>
|
|
156
|
-
<template partial='body'>
|
|
157
|
-
<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>
|
|
158
|
-
<td style="text-align: center"><nobr>{{row.f_userinfo_code}}</nobr></td>
|
|
159
|
-
<td style="text-align: center"><nobr>{{row.f_user_name}}</nobr></td>
|
|
160
|
-
<td style="text-align: center"><nobr>{{row.f_user_phone}}</nobr></td>
|
|
161
|
-
<td style="text-align: center"><nobr>{{row.f_user_type}}</nobr></td>
|
|
162
|
-
<td style="text-align: center"><nobr>{{row.f_residential_area}}</nobr></td>
|
|
163
|
-
<td style="text-align: center"><nobr>{{row.f_state==='已检'?row.f_last_check_state:'未检'}}</nobr></td>
|
|
164
|
-
<td style="text-align: center"><nobr>{{row.f_address}}</nobr></td>
|
|
165
|
-
</template>
|
|
166
|
-
</data-grid>
|
|
167
|
-
</criteria-paged>
|
|
168
|
-
<modal :show.sync="showPlanModal" v-ref:modalp>
|
|
169
|
-
<div slot="modal-header" class="modal-header">
|
|
170
|
-
<h4 class="modal-title">
|
|
171
|
-
计划内用户调整
|
|
172
|
-
</h4>
|
|
173
|
-
</div>
|
|
174
|
-
<div slot="modal-body" class="modal-body">
|
|
175
|
-
<plan-chooser :f.sync="userlogin.orgid" v-ref:chooser></plan-chooser>
|
|
176
|
-
</div>
|
|
177
|
-
<div slot="modal-footer" class="modal-footer" style="text-align: center">
|
|
178
|
-
<button class="button_search" style="margin-right: 15px" @click="dragtoOtherPlanIteem">确认</button>
|
|
179
|
-
<button class="button_search" @click="cancel">取消</button>
|
|
180
|
-
</div>
|
|
181
|
-
</modal>
|
|
182
|
-
</div>
|
|
183
|
-
</template>
|
|
184
|
-
|
|
185
|
-
<script>
|
|
186
|
-
import {HttpResetClass, PagedList} from "vue-client";
|
|
187
|
-
import Vue from "vue";
|
|
188
|
-
|
|
189
|
-
export default {
|
|
190
|
-
name: "PlanManage",
|
|
191
|
-
title: '计划管理',
|
|
192
|
-
data() {
|
|
193
|
-
return {
|
|
194
|
-
model:new PagedList('/rs/sql/planItem', 100, {}),
|
|
195
|
-
isdelete:this.$login.r ? this.$login.r.includes("安检计划删除"):false,
|
|
196
|
-
a:'1',
|
|
197
|
-
opt:[{label:"测试",value:"测试"}],
|
|
198
|
-
showCondtion:false,
|
|
199
|
-
checkAll:false,
|
|
200
|
-
checkes:[],
|
|
201
|
-
checkResults:[{label:'到访不遇',value:'到访不遇'},{label:'拒检',value:'拒检'},{label:'入户',value:'入户'}],
|
|
202
|
-
checkState:[{label:'全部',value:''},{label:'未检',value:'未检'},{label:'已检',value:'已检'}],
|
|
203
|
-
showPlanModal:false,
|
|
204
|
-
exportExcelField: {
|
|
205
|
-
'f_userinfo_code':'用户编号',
|
|
206
|
-
'f_user_name':'用户名称',
|
|
207
|
-
'f_user_type':'用户类型',
|
|
208
|
-
'f_residential_area':'小区名称',
|
|
209
|
-
'f_state':'安检状态',
|
|
210
|
-
'f_address':'地址',
|
|
211
|
-
'f_user_phone':'用户电话',
|
|
212
|
-
'f_newfile_date':'建档日期'
|
|
213
|
-
},
|
|
214
|
-
area:[]
|
|
215
|
-
}
|
|
216
|
-
},
|
|
217
|
-
props:["selectplan","userlogin"],
|
|
218
|
-
ready(){
|
|
219
|
-
this.getarea()
|
|
220
|
-
},
|
|
221
|
-
computed:{
|
|
222
|
-
exportParameter(){
|
|
223
|
-
// excel 导出条件拼接
|
|
224
|
-
return {
|
|
225
|
-
condition: this.$refs.paged.model.condition,
|
|
226
|
-
groupName: this.groupNameForSql
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
},
|
|
230
|
-
methods:{
|
|
231
|
-
async getarea() {
|
|
232
|
-
this.area = []
|
|
233
|
-
let res = await new HttpResetClass().load("POST", `/rs/sql/safe_singleTable_OrderBy`, {
|
|
234
|
-
data: {
|
|
235
|
-
items: "*",
|
|
236
|
-
tablename: "t_area",
|
|
237
|
-
orderitem: "id",
|
|
238
|
-
condition: `f_orgid = '${this.$login.f.orgid}'`
|
|
239
|
-
}
|
|
240
|
-
}, {resolveMsg: null, rejectMsg: null})
|
|
241
|
-
res.data.forEach((result) => {
|
|
242
|
-
this.area.push({label: result.f_residential_area, value: result.f_residential_area})
|
|
243
|
-
})
|
|
244
|
-
},
|
|
245
|
-
clear(){
|
|
246
|
-
this.model.f_plan_id = '';
|
|
247
|
-
this.model.f_userinfo_code = '';
|
|
248
|
-
this.model.f_user_name = '';
|
|
249
|
-
this.model.f_address='';
|
|
250
|
-
|
|
251
|
-
},
|
|
252
|
-
//将某个计划下的一项拖到另一个计划
|
|
253
|
-
async dragtoOtherPlanIteem() {
|
|
254
|
-
//tag)
|
|
255
|
-
|
|
256
|
-
if (!this.$refs.modalp.$children[0].selectedRow.id) {
|
|
257
|
-
this.$showMessage("请选择需要调整到那个计划中!")
|
|
258
|
-
return
|
|
259
|
-
}
|
|
260
|
-
this.$parent.isSend=true
|
|
261
|
-
try{
|
|
262
|
-
let res=await new HttpResetClass().load("POST", "/rs/logic/UpCheckPlanItem", {
|
|
263
|
-
data:{
|
|
264
|
-
f_operator:this.userlogin.name,
|
|
265
|
-
f_plan_id:this.$refs.modalp.$children[0].selectedRow.id,
|
|
266
|
-
condition:this.model.condition,
|
|
267
|
-
switchCheckAll:true,
|
|
268
|
-
checkAll:this.checkAll,
|
|
269
|
-
param:this.checkes,
|
|
270
|
-
columnName: "i.id"
|
|
271
|
-
}
|
|
272
|
-
}, {resolveMsg: null, rejectMsg: null})
|
|
273
|
-
this.$parent.isSend=false
|
|
274
|
-
if(res.data.code==200){
|
|
275
|
-
this.$showMessage("更换安检计划成功!")
|
|
276
|
-
this.$parent.refreshPlan()
|
|
277
|
-
}else{
|
|
278
|
-
this.$showMessage("更换安检计划失败!")
|
|
279
|
-
}
|
|
280
|
-
}catch (e) {
|
|
281
|
-
this.$parent.isSend=false
|
|
282
|
-
this.$showMessage("更换安检计划失败!")
|
|
283
|
-
}
|
|
284
|
-
},
|
|
285
|
-
showplanModal(){
|
|
286
|
-
if(!this.selectplan || !this.selectplan.id){
|
|
287
|
-
this.$showMessage("请先打开一个计划再进行操作")
|
|
288
|
-
return
|
|
289
|
-
}
|
|
290
|
-
if(!this.checkAll && this.checkes.length==0){
|
|
291
|
-
this.$showMessage("请先在计划中勾选你要调整的用户!")
|
|
292
|
-
return
|
|
293
|
-
}
|
|
294
|
-
this.showPlanModal=true
|
|
295
|
-
},
|
|
296
|
-
showUserCondition(){
|
|
297
|
-
this.showCondtion=true
|
|
298
|
-
},
|
|
299
|
-
isChecked(v) {
|
|
300
|
-
// 如果全选,不在的按选中算,否则,在的按选中算
|
|
301
|
-
if (this.checkAll) {
|
|
302
|
-
return this.checkes.indexOf(v) == -1
|
|
303
|
-
} else {
|
|
304
|
-
return this.checkes.indexOf(v) != -1
|
|
305
|
-
}
|
|
306
|
-
},
|
|
307
|
-
setCheckAll() {
|
|
308
|
-
this.checkAll=this.checkAll?false:true;
|
|
309
|
-
// 全选改变后,清空选中数据
|
|
310
|
-
this.checkes = []
|
|
311
|
-
},
|
|
312
|
-
setCheckes(id) {
|
|
313
|
-
let index=this.checkes.indexOf(id)
|
|
314
|
-
if(index<0){
|
|
315
|
-
this.checkes.push(id)
|
|
316
|
-
}else{
|
|
317
|
-
this.checkes.splice(index,1)
|
|
318
|
-
}
|
|
319
|
-
},
|
|
320
|
-
cancel(){
|
|
321
|
-
this.showCondtion=false
|
|
322
|
-
this.showPlanModal=false
|
|
323
|
-
},
|
|
324
|
-
selfSearch (args) {
|
|
325
|
-
if(!this.selectplan.id){
|
|
326
|
-
this.$showMessage("请先选择一个计划!")
|
|
327
|
-
return
|
|
328
|
-
}
|
|
329
|
-
this.cancel()
|
|
330
|
-
this.checkes=[]
|
|
331
|
-
this.checkAll=false
|
|
332
|
-
args.condition+= ` and i.f_state!= '作废'`
|
|
333
|
-
this.model.search(args.condition, args.model, args.condValue)
|
|
334
|
-
},
|
|
335
|
-
checkStateChange(val){
|
|
336
|
-
if(val=='未检'){
|
|
337
|
-
this.checkResults=[]
|
|
338
|
-
this.$refs.paged.$refs.criteria.model.f_check_state=''
|
|
339
|
-
}else{
|
|
340
|
-
this.checkResults=[{label:'到访不遇',value:'到访不遇'},{label:'拒检',value:'拒检'},{label:'入户',value:'入户'}]
|
|
341
|
-
}
|
|
342
|
-
},
|
|
343
|
-
//修改计划项状态为作废
|
|
344
|
-
async delPlanItem() {
|
|
345
|
-
if(!this.selectplan || !this.selectplan.id){
|
|
346
|
-
this.$showMessage("请先打开一个计划再进行操作")
|
|
347
|
-
return
|
|
348
|
-
}
|
|
349
|
-
if(!this.checkAll && this.checkes.length==0){
|
|
350
|
-
this.$showMessage("请先在计划中勾选你要作废的用户!")
|
|
351
|
-
return
|
|
352
|
-
}
|
|
353
|
-
this.$showMessage("此操作无法撤回,确定要执行作废安检单操作吗?",['confirm','cancel']).then((button)=>{
|
|
354
|
-
if(button=='confirm'){
|
|
355
|
-
let resu=new HttpResetClass().load("POST", "/rs/logic/UpCheckPlanItemState", {
|
|
356
|
-
data: {
|
|
357
|
-
f_operator:this.userlogin.name,
|
|
358
|
-
condition:this.model.condition,
|
|
359
|
-
switchCheckAll:true,
|
|
360
|
-
checkAll:this.checkAll,
|
|
361
|
-
param:this.checkes,
|
|
362
|
-
columnName: "i.id"
|
|
363
|
-
}
|
|
364
|
-
}, {resolveMsg: null, rejectMsg: null}).then((resu)=>{
|
|
365
|
-
|
|
366
|
-
//tag)
|
|
367
|
-
if(resu.data.code==200){
|
|
368
|
-
this.$showMessage("移除安检单成功! 成功移除:"+resu.data.res.up+"条"+(resu.data.res.noup>0?"有"+resu.data.res.noup+"条已经不是 ‘未检’ 状态!":""))
|
|
369
|
-
//this.checkes=[]
|
|
370
|
-
//this.checkAll=false
|
|
371
|
-
this.$parent.refresh()
|
|
372
|
-
}else{
|
|
373
|
-
this.$showMessage("取消安检计划失败!")
|
|
374
|
-
}
|
|
375
|
-
})
|
|
376
|
-
}
|
|
377
|
-
})
|
|
378
|
-
}
|
|
379
|
-
},
|
|
380
|
-
watch:{
|
|
381
|
-
'selectplan.id' (){
|
|
382
|
-
//tag
|
|
383
|
-
if(this.selectplan.id){
|
|
384
|
-
this.$refs.paged.$refs.criteria.model.f_plan_id=this.selectplan.id
|
|
385
|
-
this.$refs.paged.$refs.criteria.search()
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
</script>
|
|
391
|
-
|
|
392
|
-
<style scoped>
|
|
393
|
-
.safe_p{
|
|
394
|
-
white-space: nowrap;
|
|
395
|
-
overflow: hidden;
|
|
396
|
-
text-overflow: ellipsis;
|
|
397
|
-
}
|
|
398
|
-
</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="$parent.$parent.f_state"
|
|
29
|
+
v-model="$parent.$parent.f_state"
|
|
30
|
+
:options='$parent.$parent.checkState'
|
|
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()" v-show="$parent.$parent.isdelete">移出计划</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 class="form-group col-sm-4" >
|
|
119
|
+
<label class="font_normal_body">小区名称:</label>
|
|
120
|
+
<v-select
|
|
121
|
+
class="select select_list"
|
|
122
|
+
:value.sync="model.f_residential_area"
|
|
123
|
+
v-model="model.f_residential_area"
|
|
124
|
+
:options='$parent.$parent.area'
|
|
125
|
+
placeholder='请选择'
|
|
126
|
+
condition="i.f_residential_area='{}'"
|
|
127
|
+
close-on-select
|
|
128
|
+
value-single
|
|
129
|
+
>
|
|
130
|
+
</v-select>
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
<div slot="modal-footer" class="modal-footer" style="text-align: center">
|
|
135
|
+
<button class="button_search" style="margin-right: 15px" @click="search()">查询</button>
|
|
136
|
+
<button class="button_search" @click="$parent.$parent.cancel">取消</button>
|
|
137
|
+
</div>
|
|
138
|
+
</modal>
|
|
139
|
+
</div>
|
|
140
|
+
</div>
|
|
141
|
+
</criteria>
|
|
142
|
+
<data-grid :model="model" partial='list' class="table_sy">
|
|
143
|
+
|
|
144
|
+
<template partial='head'>
|
|
145
|
+
<tr>
|
|
146
|
+
<th><nobr><input type="checkbox" onClick="event.cancelBubble = true" :checked="$parent.$parent.$parent.checkAll" @change="$parent.$parent.$parent.setCheckAll()"/> 全选</nobr></th>
|
|
147
|
+
<th><nobr>用户编号</nobr></th>
|
|
148
|
+
<th><nobr>用户名称</nobr></th>
|
|
149
|
+
<th><nobr>用户电话</nobr></th>
|
|
150
|
+
<th><nobr>用户类型</nobr></th>
|
|
151
|
+
<th><nobr>小区名称</nobr></th>
|
|
152
|
+
<th><nobr>安检状态</nobr></th>
|
|
153
|
+
<th><nobr>地址</nobr></th>
|
|
154
|
+
</tr>
|
|
155
|
+
</template>
|
|
156
|
+
<template partial='body'>
|
|
157
|
+
<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>
|
|
158
|
+
<td style="text-align: center"><nobr>{{row.f_userinfo_code}}</nobr></td>
|
|
159
|
+
<td style="text-align: center"><nobr>{{row.f_user_name}}</nobr></td>
|
|
160
|
+
<td style="text-align: center"><nobr>{{row.f_user_phone}}</nobr></td>
|
|
161
|
+
<td style="text-align: center"><nobr>{{row.f_user_type}}</nobr></td>
|
|
162
|
+
<td style="text-align: center"><nobr>{{row.f_residential_area}}</nobr></td>
|
|
163
|
+
<td style="text-align: center"><nobr>{{row.f_state==='已检'?row.f_last_check_state:'未检'}}</nobr></td>
|
|
164
|
+
<td style="text-align: center"><nobr>{{row.f_address}}</nobr></td>
|
|
165
|
+
</template>
|
|
166
|
+
</data-grid>
|
|
167
|
+
</criteria-paged>
|
|
168
|
+
<modal :show.sync="showPlanModal" v-ref:modalp>
|
|
169
|
+
<div slot="modal-header" class="modal-header">
|
|
170
|
+
<h4 class="modal-title">
|
|
171
|
+
计划内用户调整
|
|
172
|
+
</h4>
|
|
173
|
+
</div>
|
|
174
|
+
<div slot="modal-body" class="modal-body">
|
|
175
|
+
<plan-chooser :f.sync="userlogin.orgid" v-ref:chooser></plan-chooser>
|
|
176
|
+
</div>
|
|
177
|
+
<div slot="modal-footer" class="modal-footer" style="text-align: center">
|
|
178
|
+
<button class="button_search" style="margin-right: 15px" @click="dragtoOtherPlanIteem">确认</button>
|
|
179
|
+
<button class="button_search" @click="cancel">取消</button>
|
|
180
|
+
</div>
|
|
181
|
+
</modal>
|
|
182
|
+
</div>
|
|
183
|
+
</template>
|
|
184
|
+
|
|
185
|
+
<script>
|
|
186
|
+
import {HttpResetClass, PagedList} from "vue-client";
|
|
187
|
+
import Vue from "vue";
|
|
188
|
+
|
|
189
|
+
export default {
|
|
190
|
+
name: "PlanManage",
|
|
191
|
+
title: '计划管理',
|
|
192
|
+
data() {
|
|
193
|
+
return {
|
|
194
|
+
model:new PagedList('/rs/sql/planItem', 100, {}),
|
|
195
|
+
isdelete:this.$login.r ? this.$login.r.includes("安检计划删除"):false,
|
|
196
|
+
a:'1',
|
|
197
|
+
opt:[{label:"测试",value:"测试"}],
|
|
198
|
+
showCondtion:false,
|
|
199
|
+
checkAll:false,
|
|
200
|
+
checkes:[],
|
|
201
|
+
checkResults:[{label:'到访不遇',value:'到访不遇'},{label:'拒检',value:'拒检'},{label:'入户',value:'入户'}],
|
|
202
|
+
checkState:[{label:'全部',value:''},{label:'未检',value:'未检'},{label:'已检',value:'已检'}],
|
|
203
|
+
showPlanModal:false,
|
|
204
|
+
exportExcelField: {
|
|
205
|
+
'f_userinfo_code':'用户编号',
|
|
206
|
+
'f_user_name':'用户名称',
|
|
207
|
+
'f_user_type':'用户类型',
|
|
208
|
+
'f_residential_area':'小区名称',
|
|
209
|
+
'f_state':'安检状态',
|
|
210
|
+
'f_address':'地址',
|
|
211
|
+
'f_user_phone':'用户电话',
|
|
212
|
+
'f_newfile_date':'建档日期'
|
|
213
|
+
},
|
|
214
|
+
area:[]
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
props:["selectplan","userlogin"],
|
|
218
|
+
ready(){
|
|
219
|
+
this.getarea()
|
|
220
|
+
},
|
|
221
|
+
computed:{
|
|
222
|
+
exportParameter(){
|
|
223
|
+
// excel 导出条件拼接
|
|
224
|
+
return {
|
|
225
|
+
condition: this.$refs.paged.model.condition,
|
|
226
|
+
groupName: this.groupNameForSql
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
methods:{
|
|
231
|
+
async getarea() {
|
|
232
|
+
this.area = []
|
|
233
|
+
let res = await new HttpResetClass().load("POST", `/rs/sql/safe_singleTable_OrderBy`, {
|
|
234
|
+
data: {
|
|
235
|
+
items: "*",
|
|
236
|
+
tablename: "t_area",
|
|
237
|
+
orderitem: "id",
|
|
238
|
+
condition: `f_orgid = '${this.$login.f.orgid}'`
|
|
239
|
+
}
|
|
240
|
+
}, {resolveMsg: null, rejectMsg: null})
|
|
241
|
+
res.data.forEach((result) => {
|
|
242
|
+
this.area.push({label: result.f_residential_area, value: result.f_residential_area})
|
|
243
|
+
})
|
|
244
|
+
},
|
|
245
|
+
clear(){
|
|
246
|
+
this.model.f_plan_id = '';
|
|
247
|
+
this.model.f_userinfo_code = '';
|
|
248
|
+
this.model.f_user_name = '';
|
|
249
|
+
this.model.f_address='';
|
|
250
|
+
|
|
251
|
+
},
|
|
252
|
+
//将某个计划下的一项拖到另一个计划
|
|
253
|
+
async dragtoOtherPlanIteem() {
|
|
254
|
+
//tag)
|
|
255
|
+
|
|
256
|
+
if (!this.$refs.modalp.$children[0].selectedRow.id) {
|
|
257
|
+
this.$showMessage("请选择需要调整到那个计划中!")
|
|
258
|
+
return
|
|
259
|
+
}
|
|
260
|
+
this.$parent.isSend=true
|
|
261
|
+
try{
|
|
262
|
+
let res=await new HttpResetClass().load("POST", "/rs/logic/UpCheckPlanItem", {
|
|
263
|
+
data:{
|
|
264
|
+
f_operator:this.userlogin.name,
|
|
265
|
+
f_plan_id:this.$refs.modalp.$children[0].selectedRow.id,
|
|
266
|
+
condition:this.model.condition,
|
|
267
|
+
switchCheckAll:true,
|
|
268
|
+
checkAll:this.checkAll,
|
|
269
|
+
param:this.checkes,
|
|
270
|
+
columnName: "i.id"
|
|
271
|
+
}
|
|
272
|
+
}, {resolveMsg: null, rejectMsg: null})
|
|
273
|
+
this.$parent.isSend=false
|
|
274
|
+
if(res.data.code==200){
|
|
275
|
+
this.$showMessage("更换安检计划成功!")
|
|
276
|
+
this.$parent.refreshPlan()
|
|
277
|
+
}else{
|
|
278
|
+
this.$showMessage("更换安检计划失败!")
|
|
279
|
+
}
|
|
280
|
+
}catch (e) {
|
|
281
|
+
this.$parent.isSend=false
|
|
282
|
+
this.$showMessage("更换安检计划失败!")
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
showplanModal(){
|
|
286
|
+
if(!this.selectplan || !this.selectplan.id){
|
|
287
|
+
this.$showMessage("请先打开一个计划再进行操作")
|
|
288
|
+
return
|
|
289
|
+
}
|
|
290
|
+
if(!this.checkAll && this.checkes.length==0){
|
|
291
|
+
this.$showMessage("请先在计划中勾选你要调整的用户!")
|
|
292
|
+
return
|
|
293
|
+
}
|
|
294
|
+
this.showPlanModal=true
|
|
295
|
+
},
|
|
296
|
+
showUserCondition(){
|
|
297
|
+
this.showCondtion=true
|
|
298
|
+
},
|
|
299
|
+
isChecked(v) {
|
|
300
|
+
// 如果全选,不在的按选中算,否则,在的按选中算
|
|
301
|
+
if (this.checkAll) {
|
|
302
|
+
return this.checkes.indexOf(v) == -1
|
|
303
|
+
} else {
|
|
304
|
+
return this.checkes.indexOf(v) != -1
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
setCheckAll() {
|
|
308
|
+
this.checkAll=this.checkAll?false:true;
|
|
309
|
+
// 全选改变后,清空选中数据
|
|
310
|
+
this.checkes = []
|
|
311
|
+
},
|
|
312
|
+
setCheckes(id) {
|
|
313
|
+
let index=this.checkes.indexOf(id)
|
|
314
|
+
if(index<0){
|
|
315
|
+
this.checkes.push(id)
|
|
316
|
+
}else{
|
|
317
|
+
this.checkes.splice(index,1)
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
cancel(){
|
|
321
|
+
this.showCondtion=false
|
|
322
|
+
this.showPlanModal=false
|
|
323
|
+
},
|
|
324
|
+
selfSearch (args) {
|
|
325
|
+
if(!this.selectplan.id){
|
|
326
|
+
this.$showMessage("请先选择一个计划!")
|
|
327
|
+
return
|
|
328
|
+
}
|
|
329
|
+
this.cancel()
|
|
330
|
+
this.checkes=[]
|
|
331
|
+
this.checkAll=false
|
|
332
|
+
args.condition+= ` and i.f_state!= '作废'`
|
|
333
|
+
this.model.search(args.condition, args.model, args.condValue)
|
|
334
|
+
},
|
|
335
|
+
checkStateChange(val){
|
|
336
|
+
if(val=='未检'){
|
|
337
|
+
this.checkResults=[]
|
|
338
|
+
this.$refs.paged.$refs.criteria.model.f_check_state=''
|
|
339
|
+
}else{
|
|
340
|
+
this.checkResults=[{label:'到访不遇',value:'到访不遇'},{label:'拒检',value:'拒检'},{label:'入户',value:'入户'}]
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
//修改计划项状态为作废
|
|
344
|
+
async delPlanItem() {
|
|
345
|
+
if(!this.selectplan || !this.selectplan.id){
|
|
346
|
+
this.$showMessage("请先打开一个计划再进行操作")
|
|
347
|
+
return
|
|
348
|
+
}
|
|
349
|
+
if(!this.checkAll && this.checkes.length==0){
|
|
350
|
+
this.$showMessage("请先在计划中勾选你要作废的用户!")
|
|
351
|
+
return
|
|
352
|
+
}
|
|
353
|
+
this.$showMessage("此操作无法撤回,确定要执行作废安检单操作吗?",['confirm','cancel']).then((button)=>{
|
|
354
|
+
if(button=='confirm'){
|
|
355
|
+
let resu=new HttpResetClass().load("POST", "/rs/logic/UpCheckPlanItemState", {
|
|
356
|
+
data: {
|
|
357
|
+
f_operator:this.userlogin.name,
|
|
358
|
+
condition:this.model.condition,
|
|
359
|
+
switchCheckAll:true,
|
|
360
|
+
checkAll:this.checkAll,
|
|
361
|
+
param:this.checkes,
|
|
362
|
+
columnName: "i.id"
|
|
363
|
+
}
|
|
364
|
+
}, {resolveMsg: null, rejectMsg: null}).then((resu)=>{
|
|
365
|
+
|
|
366
|
+
//tag)
|
|
367
|
+
if(resu.data.code==200){
|
|
368
|
+
this.$showMessage("移除安检单成功! 成功移除:"+resu.data.res.up+"条"+(resu.data.res.noup>0?"有"+resu.data.res.noup+"条已经不是 ‘未检’ 状态!":""))
|
|
369
|
+
//this.checkes=[]
|
|
370
|
+
//this.checkAll=false
|
|
371
|
+
this.$parent.refresh()
|
|
372
|
+
}else{
|
|
373
|
+
this.$showMessage("取消安检计划失败!")
|
|
374
|
+
}
|
|
375
|
+
})
|
|
376
|
+
}
|
|
377
|
+
})
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
watch:{
|
|
381
|
+
'selectplan.id' (){
|
|
382
|
+
//tag
|
|
383
|
+
if(this.selectplan.id){
|
|
384
|
+
this.$refs.paged.$refs.criteria.model.f_plan_id=this.selectplan.id
|
|
385
|
+
this.$refs.paged.$refs.criteria.search()
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
</script>
|
|
391
|
+
|
|
392
|
+
<style scoped>
|
|
393
|
+
.safe_p{
|
|
394
|
+
white-space: nowrap;
|
|
395
|
+
overflow: hidden;
|
|
396
|
+
text-overflow: ellipsis;
|
|
397
|
+
}
|
|
398
|
+
</style>
|