safecheck-client 3.0.34-51 → 3.0.34-53

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,367 +1,367 @@
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_list select"
82
- placeholder='请选择' style="width: 60%"
83
- v-model='model.f_check_state'
84
- :value.sync="model.f_check_state"
85
- :options='$parent.$parent.checkResults'
86
- condition="i.f_last_check_state in {} "
87
- :multiple="true"
88
- ></v-select>
89
- </div>
90
- <div class="form-group col-sm-4" >
91
- <label class="font_normal_body">安检起始:</label>
92
- <datepicker
93
- placeholder='请选择'
94
- style="width:60%"
95
- :disabled-days-of-week="[]"
96
- :format="'yyyy-MM-dd'"
97
- :show-rest-button="reset"
98
- :value.sync="model.f_startfile_time"
99
- v-model="model.f_startfile_time"
100
- condition="i.f_last_check_date >='{} 00:00:00'">
101
- </datepicker>
102
- </div>
103
- <div class="form-group col-sm-4" >
104
- <label class="font_normal_body">安检截止:</label>
105
- <datepicker
106
- placeholder='请选择'
107
- :disabled-days-of-week="[]"
108
- style="width:60%"
109
- :format="'yyyy-MM-dd'"
110
- :show-rest-button="reset"
111
- :value.sync="model.f_endfile_time"
112
- v-model="model.f_endfile_time"
113
- condition="i.f_last_check_date <='{} 00:00:00'">
114
- </datepicker>
115
- </div>
116
- </div>
117
- </div>
118
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
119
- <button class="button_search" style="margin-right: 15px" @click="search()">查询</button>
120
- <button class="button_search" @click="$parent.$parent.cancel">取消</button>
121
- </div>
122
- </modal>
123
- </div>
124
- </div>
125
- </criteria>
126
- <data-grid :model="model" partial='list' class="table_sy">
127
-
128
- <template partial='head'>
129
- <tr>
130
- <th><nobr><input type="checkbox" onClick="event.cancelBubble = true" :checked="$parent.$parent.$parent.checkAll" @change="$parent.$parent.$parent.setCheckAll()"/> 全选</nobr></th>
131
- <th><nobr>用户编号</nobr></th>
132
- <th><nobr>用户名称</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
- </tr>
139
- </template>
140
- <template partial='body'>
141
- <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>
142
- <td style="text-align: center"><nobr>{{row.f_userinfo_code}}</nobr></td>
143
- <td style="text-align: center"><nobr>{{row.f_user_name}}</nobr></td>
144
- <td style="text-align: center"><nobr>{{row.f_user_phone}}</nobr></td>
145
- <td style="text-align: center"><nobr>{{row.f_user_type}}</nobr></td>
146
- <td style="text-align: center"><nobr>{{row.f_residential_area}}</nobr></td>
147
- <td style="text-align: center"><nobr>{{row.f_state==='已检'?row.f_last_check_state:'未检'}}</nobr></td>
148
- <td style="text-align: center"><nobr>{{row.f_address}}</nobr></td>
149
- </template>
150
- </data-grid>
151
- </criteria-paged>
152
- <modal :show.sync="showPlanModal" v-ref:modalp>
153
- <div slot="modal-header" class="modal-header">
154
- <h4 class="modal-title">
155
- 计划内用户调整
156
- </h4>
157
- </div>
158
- <div slot="modal-body" class="modal-body">
159
- <plan-chooser :f.sync="userlogin.orgid" v-ref:chooser></plan-chooser>
160
- </div>
161
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
162
- <button class="button_search" style="margin-right: 15px" @click="dragtoOtherPlanIteem">确认</button>
163
- <button class="button_search" @click="cancel">取消</button>
164
- </div>
165
- </modal>
166
- </div>
167
- </template>
168
-
169
- <script>
170
- import {HttpResetClass, PagedList} from "vue-client";
171
- import Vue from "vue";
172
-
173
- export default {
174
- name: "PlanManage",
175
- title: '计划管理',
176
- data() {
177
- return {
178
- model:new PagedList('/rs/sql/planItem', 100, {}),
179
- isdelete:this.$login.r ? this.$login.r.includes("安检计划删除"):false,
180
- a:'1',
181
- opt:[{label:"测试",value:"测试"}],
182
- showCondtion:false,
183
- checkAll:false,
184
- checkes:[],
185
- checkResults:[{label:'到访不遇',value:'到访不遇'},{label:'拒检',value:'拒检'},{label:'入户',value:'入户'}],
186
- checkState:[{label:'全部',value:''},{label:'未检',value:'未检'},{label:'已检',value:'已检'}],
187
- showPlanModal:false,
188
- exportExcelField: {
189
- 'f_userinfo_code':'用户编号',
190
- 'f_user_name':'用户名称',
191
- 'f_user_type':'用户类型',
192
- 'f_residential_area':'小区名称',
193
- 'f_state':'安检状态',
194
- 'f_address':'地址',
195
- 'f_user_phone':'用户电话',
196
- 'f_newfile_date':'建档日期'
197
- }
198
- }
199
- },
200
- props:["selectplan","userlogin"],
201
- ready(){
202
-
203
- },
204
- computed:{
205
- exportParameter(){
206
- // excel 导出条件拼接
207
- return {
208
- condition: this.$refs.paged.model.condition,
209
- groupName: this.groupNameForSql
210
- }
211
- }
212
- },
213
- methods:{
214
- clear(){
215
- this.model.f_plan_id = '';
216
- this.model.f_userinfo_code = '';
217
- this.model.f_user_name = '';
218
- this.model.f_address='';
219
-
220
- },
221
- //将某个计划下的一项拖到另一个计划
222
- async dragtoOtherPlanIteem() {
223
- //tag)
224
-
225
- if (!this.$refs.modalp.$children[0].selectedRow.id) {
226
- this.$showMessage("请选择需要调整到那个计划中!")
227
- return
228
- }
229
- this.$parent.isSend=true
230
- try{
231
- let res=await new HttpResetClass().load("POST", "/rs/logic/UpCheckPlanItem", {
232
- data:{
233
- f_operator:this.userlogin.name,
234
- f_plan_id:this.$refs.modalp.$children[0].selectedRow.id,
235
- condition:this.model.condition,
236
- switchCheckAll:true,
237
- checkAll:this.checkAll,
238
- param:this.checkes,
239
- columnName: "i.id"
240
- }
241
- }, {resolveMsg: null, rejectMsg: null})
242
- this.$parent.isSend=false
243
- if(res.data.code==200){
244
- this.$showMessage("更换安检计划成功!")
245
- this.$parent.refreshPlan()
246
- }else{
247
- this.$showMessage("更换安检计划失败!")
248
- }
249
- }catch (e) {
250
- this.$parent.isSend=false
251
- this.$showMessage("更换安检计划失败!")
252
- }
253
- },
254
- showplanModal(){
255
- if(!this.selectplan || !this.selectplan.id){
256
- this.$showMessage("请先打开一个计划再进行操作")
257
- return
258
- }
259
- if(!this.checkAll && this.checkes.length==0){
260
- this.$showMessage("请先在计划中勾选你要调整的用户!")
261
- return
262
- }
263
- this.showPlanModal=true
264
- },
265
- showUserCondition(){
266
- this.showCondtion=true
267
- },
268
- isChecked(v) {
269
- // 如果全选,不在的按选中算,否则,在的按选中算
270
- if (this.checkAll) {
271
- return this.checkes.indexOf(v) == -1
272
- } else {
273
- return this.checkes.indexOf(v) != -1
274
- }
275
- },
276
- setCheckAll() {
277
- this.checkAll=this.checkAll?false:true;
278
- // 全选改变后,清空选中数据
279
- this.checkes = []
280
- },
281
- setCheckes(id) {
282
- let index=this.checkes.indexOf(id)
283
- if(index<0){
284
- this.checkes.push(id)
285
- }else{
286
- this.checkes.splice(index,1)
287
- }
288
- },
289
- cancel(){
290
- this.showCondtion=false
291
- this.showPlanModal=false
292
- },
293
- selfSearch (args) {
294
- if(!this.selectplan.id){
295
- this.$showMessage("请先选择一个计划!")
296
- return
297
- }
298
- this.cancel()
299
- this.checkes=[]
300
- this.checkAll=false
301
- args.condition+= ` and i.f_state!= '作废'`
302
- this.model.search(args.condition, args.model, args.condValue)
303
- },
304
- checkStateChange(val){
305
- if(val=='未检'){
306
- this.checkResults=[]
307
- this.$refs.paged.$refs.criteria.model.f_check_state=''
308
- }else{
309
- this.checkResults=[{label:'到访不遇',value:'到访不遇'},{label:'拒检',value:'拒检'},{label:'入户',value:'入户'}]
310
- }
311
- },
312
- //修改计划项状态为作废
313
- async delPlanItem() {
314
- if(!this.selectplan || !this.selectplan.id){
315
- this.$showMessage("请先打开一个计划再进行操作")
316
- return
317
- }
318
- if(!this.checkAll && this.checkes.length==0){
319
- this.$showMessage("请先在计划中勾选你要作废的用户!")
320
- return
321
- }
322
- this.$showMessage("此操作无法撤回,确定要执行作废安检单操作吗?",['confirm','cancel']).then((button)=>{
323
- if(button=='confirm'){
324
- let resu=new HttpResetClass().load("POST", "/rs/logic/UpCheckPlanItemState", {
325
- data: {
326
- f_operator:this.userlogin.name,
327
- condition:this.model.condition,
328
- switchCheckAll:true,
329
- checkAll:this.checkAll,
330
- param:this.checkes,
331
- columnName: "i.id"
332
- }
333
- }, {resolveMsg: null, rejectMsg: null}).then((resu)=>{
334
-
335
- //tag)
336
- if(resu.data.code==200){
337
- this.$showMessage("移除安检单成功! 成功移除:"+resu.data.res.up+"条"+(resu.data.res.noup>0?"有"+resu.data.res.noup+"条已经不是 ‘未检’ 状态!":""))
338
- //this.checkes=[]
339
- //this.checkAll=false
340
- this.$parent.refresh()
341
- }else{
342
- this.$showMessage("取消安检计划失败!")
343
- }
344
- })
345
- }
346
- })
347
- }
348
- },
349
- watch:{
350
- 'selectplan.id' (){
351
- //tag
352
- if(this.selectplan.id){
353
- this.$refs.paged.$refs.criteria.model.f_plan_id=this.selectplan.id
354
- this.$refs.paged.$refs.criteria.search()
355
- }
356
- }
357
- }
358
- }
359
- </script>
360
-
361
- <style scoped>
362
- .safe_p{
363
- white-space: nowrap;
364
- overflow: hidden;
365
- text-overflow: ellipsis;
366
- }
367
- </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_list select"
82
+ placeholder='请选择' style="width: 60%"
83
+ v-model='model.f_check_state'
84
+ :value.sync="model.f_check_state"
85
+ :options='$parent.$parent.checkResults'
86
+ condition="i.f_last_check_state in {} "
87
+ :multiple="true"
88
+ ></v-select>
89
+ </div>
90
+ <div class="form-group col-sm-4" >
91
+ <label class="font_normal_body">安检起始:</label>
92
+ <datepicker
93
+ placeholder='请选择'
94
+ style="width:60%"
95
+ :disabled-days-of-week="[]"
96
+ :format="'yyyy-MM-dd'"
97
+ :show-rest-button="reset"
98
+ :value.sync="model.f_startfile_time"
99
+ v-model="model.f_startfile_time"
100
+ condition="i.f_last_check_date >='{} 00:00:00'">
101
+ </datepicker>
102
+ </div>
103
+ <div class="form-group col-sm-4" >
104
+ <label class="font_normal_body">安检截止:</label>
105
+ <datepicker
106
+ placeholder='请选择'
107
+ :disabled-days-of-week="[]"
108
+ style="width:60%"
109
+ :format="'yyyy-MM-dd'"
110
+ :show-rest-button="reset"
111
+ :value.sync="model.f_endfile_time"
112
+ v-model="model.f_endfile_time"
113
+ condition="i.f_last_check_date <='{} 00:00:00'">
114
+ </datepicker>
115
+ </div>
116
+ </div>
117
+ </div>
118
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
119
+ <button class="button_search" style="margin-right: 15px" @click="search()">查询</button>
120
+ <button class="button_search" @click="$parent.$parent.cancel">取消</button>
121
+ </div>
122
+ </modal>
123
+ </div>
124
+ </div>
125
+ </criteria>
126
+ <data-grid :model="model" partial='list' class="table_sy">
127
+
128
+ <template partial='head'>
129
+ <tr>
130
+ <th><nobr><input type="checkbox" onClick="event.cancelBubble = true" :checked="$parent.$parent.$parent.checkAll" @change="$parent.$parent.$parent.setCheckAll()"/> 全选</nobr></th>
131
+ <th><nobr>用户编号</nobr></th>
132
+ <th><nobr>用户名称</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
+ </tr>
139
+ </template>
140
+ <template partial='body'>
141
+ <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>
142
+ <td style="text-align: center"><nobr>{{row.f_userinfo_code}}</nobr></td>
143
+ <td style="text-align: center"><nobr>{{row.f_user_name}}</nobr></td>
144
+ <td style="text-align: center"><nobr>{{row.f_user_phone}}</nobr></td>
145
+ <td style="text-align: center"><nobr>{{row.f_user_type}}</nobr></td>
146
+ <td style="text-align: center"><nobr>{{row.f_residential_area}}</nobr></td>
147
+ <td style="text-align: center"><nobr>{{row.f_state==='已检'?row.f_last_check_state:'未检'}}</nobr></td>
148
+ <td style="text-align: center"><nobr>{{row.f_address}}</nobr></td>
149
+ </template>
150
+ </data-grid>
151
+ </criteria-paged>
152
+ <modal :show.sync="showPlanModal" v-ref:modalp>
153
+ <div slot="modal-header" class="modal-header">
154
+ <h4 class="modal-title">
155
+ 计划内用户调整
156
+ </h4>
157
+ </div>
158
+ <div slot="modal-body" class="modal-body">
159
+ <plan-chooser :f.sync="userlogin.orgid" v-ref:chooser></plan-chooser>
160
+ </div>
161
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
162
+ <button class="button_search" style="margin-right: 15px" @click="dragtoOtherPlanIteem">确认</button>
163
+ <button class="button_search" @click="cancel">取消</button>
164
+ </div>
165
+ </modal>
166
+ </div>
167
+ </template>
168
+
169
+ <script>
170
+ import {HttpResetClass, PagedList} from "vue-client";
171
+ import Vue from "vue";
172
+
173
+ export default {
174
+ name: "PlanManage",
175
+ title: '计划管理',
176
+ data() {
177
+ return {
178
+ model:new PagedList('/rs/sql/planItem', 100, {}),
179
+ isdelete:this.$login.r ? this.$login.r.includes("安检计划删除"):false,
180
+ a:'1',
181
+ opt:[{label:"测试",value:"测试"}],
182
+ showCondtion:false,
183
+ checkAll:false,
184
+ checkes:[],
185
+ checkResults:[{label:'到访不遇',value:'到访不遇'},{label:'拒检',value:'拒检'},{label:'入户',value:'入户'}],
186
+ checkState:[{label:'全部',value:''},{label:'未检',value:'未检'},{label:'已检',value:'已检'}],
187
+ showPlanModal:false,
188
+ exportExcelField: {
189
+ 'f_userinfo_code':'用户编号',
190
+ 'f_user_name':'用户名称',
191
+ 'f_user_type':'用户类型',
192
+ 'f_residential_area':'小区名称',
193
+ 'f_state':'安检状态',
194
+ 'f_address':'地址',
195
+ 'f_user_phone':'用户电话',
196
+ 'f_newfile_date':'建档日期'
197
+ }
198
+ }
199
+ },
200
+ props:["selectplan","userlogin"],
201
+ ready(){
202
+
203
+ },
204
+ computed:{
205
+ exportParameter(){
206
+ // excel 导出条件拼接
207
+ return {
208
+ condition: this.$refs.paged.model.condition,
209
+ groupName: this.groupNameForSql
210
+ }
211
+ }
212
+ },
213
+ methods:{
214
+ clear(){
215
+ this.model.f_plan_id = '';
216
+ this.model.f_userinfo_code = '';
217
+ this.model.f_user_name = '';
218
+ this.model.f_address='';
219
+
220
+ },
221
+ //将某个计划下的一项拖到另一个计划
222
+ async dragtoOtherPlanIteem() {
223
+ //tag)
224
+
225
+ if (!this.$refs.modalp.$children[0].selectedRow.id) {
226
+ this.$showMessage("请选择需要调整到那个计划中!")
227
+ return
228
+ }
229
+ this.$parent.isSend=true
230
+ try{
231
+ let res=await new HttpResetClass().load("POST", "/rs/logic/UpCheckPlanItem", {
232
+ data:{
233
+ f_operator:this.userlogin.name,
234
+ f_plan_id:this.$refs.modalp.$children[0].selectedRow.id,
235
+ condition:this.model.condition,
236
+ switchCheckAll:true,
237
+ checkAll:this.checkAll,
238
+ param:this.checkes,
239
+ columnName: "i.id"
240
+ }
241
+ }, {resolveMsg: null, rejectMsg: null})
242
+ this.$parent.isSend=false
243
+ if(res.data.code==200){
244
+ this.$showMessage("更换安检计划成功!")
245
+ this.$parent.refreshPlan()
246
+ }else{
247
+ this.$showMessage("更换安检计划失败!")
248
+ }
249
+ }catch (e) {
250
+ this.$parent.isSend=false
251
+ this.$showMessage("更换安检计划失败!")
252
+ }
253
+ },
254
+ showplanModal(){
255
+ if(!this.selectplan || !this.selectplan.id){
256
+ this.$showMessage("请先打开一个计划再进行操作")
257
+ return
258
+ }
259
+ if(!this.checkAll && this.checkes.length==0){
260
+ this.$showMessage("请先在计划中勾选你要调整的用户!")
261
+ return
262
+ }
263
+ this.showPlanModal=true
264
+ },
265
+ showUserCondition(){
266
+ this.showCondtion=true
267
+ },
268
+ isChecked(v) {
269
+ // 如果全选,不在的按选中算,否则,在的按选中算
270
+ if (this.checkAll) {
271
+ return this.checkes.indexOf(v) == -1
272
+ } else {
273
+ return this.checkes.indexOf(v) != -1
274
+ }
275
+ },
276
+ setCheckAll() {
277
+ this.checkAll=this.checkAll?false:true;
278
+ // 全选改变后,清空选中数据
279
+ this.checkes = []
280
+ },
281
+ setCheckes(id) {
282
+ let index=this.checkes.indexOf(id)
283
+ if(index<0){
284
+ this.checkes.push(id)
285
+ }else{
286
+ this.checkes.splice(index,1)
287
+ }
288
+ },
289
+ cancel(){
290
+ this.showCondtion=false
291
+ this.showPlanModal=false
292
+ },
293
+ selfSearch (args) {
294
+ if(!this.selectplan.id){
295
+ this.$showMessage("请先选择一个计划!")
296
+ return
297
+ }
298
+ this.cancel()
299
+ this.checkes=[]
300
+ this.checkAll=false
301
+ args.condition+= ` and i.f_state!= '作废'`
302
+ this.model.search(args.condition, args.model, args.condValue)
303
+ },
304
+ checkStateChange(val){
305
+ if(val=='未检'){
306
+ this.checkResults=[]
307
+ this.$refs.paged.$refs.criteria.model.f_check_state=''
308
+ }else{
309
+ this.checkResults=[{label:'到访不遇',value:'到访不遇'},{label:'拒检',value:'拒检'},{label:'入户',value:'入户'}]
310
+ }
311
+ },
312
+ //修改计划项状态为作废
313
+ async delPlanItem() {
314
+ if(!this.selectplan || !this.selectplan.id){
315
+ this.$showMessage("请先打开一个计划再进行操作")
316
+ return
317
+ }
318
+ if(!this.checkAll && this.checkes.length==0){
319
+ this.$showMessage("请先在计划中勾选你要作废的用户!")
320
+ return
321
+ }
322
+ this.$showMessage("此操作无法撤回,确定要执行作废安检单操作吗?",['confirm','cancel']).then((button)=>{
323
+ if(button=='confirm'){
324
+ let resu=new HttpResetClass().load("POST", "/rs/logic/UpCheckPlanItemState", {
325
+ data: {
326
+ f_operator:this.userlogin.name,
327
+ condition:this.model.condition,
328
+ switchCheckAll:true,
329
+ checkAll:this.checkAll,
330
+ param:this.checkes,
331
+ columnName: "i.id"
332
+ }
333
+ }, {resolveMsg: null, rejectMsg: null}).then((resu)=>{
334
+
335
+ //tag)
336
+ if(resu.data.code==200){
337
+ this.$showMessage("移除安检单成功! 成功移除:"+resu.data.res.up+"条"+(resu.data.res.noup>0?"有"+resu.data.res.noup+"条已经不是 ‘未检’ 状态!":""))
338
+ //this.checkes=[]
339
+ //this.checkAll=false
340
+ this.$parent.refresh()
341
+ }else{
342
+ this.$showMessage("取消安检计划失败!")
343
+ }
344
+ })
345
+ }
346
+ })
347
+ }
348
+ },
349
+ watch:{
350
+ 'selectplan.id' (){
351
+ //tag
352
+ if(this.selectplan.id){
353
+ this.$refs.paged.$refs.criteria.model.f_plan_id=this.selectplan.id
354
+ this.$refs.paged.$refs.criteria.search()
355
+ }
356
+ }
357
+ }
358
+ }
359
+ </script>
360
+
361
+ <style scoped>
362
+ .safe_p{
363
+ white-space: nowrap;
364
+ overflow: hidden;
365
+ text-overflow: ellipsis;
366
+ }
367
+ </style>