safecheck-client 4.0.2-31 → 4.0.2-33

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.
@@ -20,14 +20,29 @@
20
20
  >
21
21
  </v-select>
22
22
  </div>
23
- <div class="form-group col-sm-4" v-if="$parent.$parent.f_state=='未入户'" >
23
+ <div class="form-group col-sm-4" >
24
+ <label class="font_normal_body">有无计划</label>
24
25
  <v-select style="width:60% "
25
26
  class="select select_list"
26
- :value.sync="$parent.$parent.f_noruhu"
27
- v-model="$parent.$parent.f_noruhu"
28
- :options='$parent.$parent.noChecks'
29
- placeholder='请选择状态'
30
- :multiple="true"
27
+ :value.sync="$parent.$parent.f_no_checkplan"
28
+ v-model="$parent.$parent.f_no_checkplan"
29
+ :options='$parent.$parent.no_checkplans'
30
+ placeholder='有无计划'
31
+ close-on-select
32
+ value-single
33
+ >
34
+ </v-select>
35
+ </div>
36
+ <div class="form-group col-sm-4" >
37
+ <label class="font_normal_body">入户状态</label>
38
+ <v-select style="width:60% "
39
+ class="select select_list"
40
+ :value.sync="$parent.$parent.f_last_check_state"
41
+ v-model="$parent.$parent.f_last_check_state"
42
+ :options='$parent.$parent.entry_status'
43
+ placeholder='入户状态'
44
+ close-on-select
45
+ value-single
31
46
  >
32
47
  </v-select>
33
48
  </div>
@@ -97,7 +112,9 @@ export default {
97
112
  data () {
98
113
  return {
99
114
  model: new PagedList('api/af-safecheck/sql/planItemNew', 20),
100
- checkState:[{label:'全部',value:''},{label:'入户',value:'入户'},{label:'未入户',value:'未入户'}],
115
+ checkState:[{label:'全部',value:''},{label:'已检',value:'已检'},{label:'未检',value:'未检'}],
116
+ entry_status: this.$appdata.getParam('安检状态')?[{label: '全部', value: ''}, ...this.$appdata.getParam('安检状态')]:[{label: '全部', value: ''}],
117
+ no_checkplans: this.$appdata.getParam('有无计划')?[{label: '全部', value: ''}, ...this.$appdata.getParam('有无计划')]:[{label: '全部', value: ''}],
101
118
  noChecks:[{label:'未检',value:'未检'},{label:'到访不遇',value:'到访不遇'},{label:'拒检',value:'拒检'}],
102
119
  excelHeaders: {
103
120
  //用户编号 用户名称 用户电话 安检次数 用户类型 小区名称 地址 安检日期 安检状态 安检结果
@@ -116,6 +133,8 @@ export default {
116
133
  },
117
134
  area:[{label:'全部',value:''}],
118
135
  f_state:'',
136
+ f_no_checkplan:'',
137
+ f_last_check_state:'',
119
138
  f_noruhu:'',
120
139
  f_residential_area:'',
121
140
  f_building:'',
@@ -163,35 +182,25 @@ export default {
163
182
  if (this.checkend){
164
183
  args.condition += `and f_last_check_date<='${this.checkend}'`
165
184
  }
166
- if( this.f_state){
167
- if(this.f_state=='入户'){
168
- args.condition=args.condition+" and i.f_state='已检' and f_last_check_state='入户'"
169
- }else if(this.f_state=='未入户'){
170
- if(this.f_noruhu && this.f_noruhu.length==1){
171
- args.condition += this.f_noruhu[0]=='未检'?" and i.f_state='未检'":` and i.f_state='已检' and f_last_check_state='${this.f_noruhu[0]}'`
172
- }else if(this.f_noruhu && this.f_noruhu.length==2){
173
- if(this.f_noruhu.indexOf('未检')!=-1){
174
- if(this.f_noruhu.indexOf('到访不遇')!=-1){
175
- args.condition=args.condition+" and (i.f_state='未检' or (i.f_state='已检' and f_last_check_state='到访不遇'))"
176
- }else{
177
- args.condition=args.condition+" and (i.f_state='未检' or (i.f_state='已检' and f_last_check_state='拒检'))"
178
- }
179
- }else{
180
- args.condition=args.condition+" and (i.f_state='已检' and (f_last_check_state='到访不遇' or f_last_check_state='拒检'))"
181
- }
182
- }else{
183
- args.condition=args.condition+" and (i.f_state='未检' or (i.f_state='已检' and (f_last_check_state='到访不遇' or f_last_check_state='拒检')))"
184
- }
185
-
186
- }
187
-
188
- }
189
185
  if (this.f_residential_area){
190
186
  args.condition += ` and i.f_residential_area like'%${this.f_residential_area}%'`
191
187
  }
192
188
  if (this.f_building){
193
189
  args.condition += ` and i.f_building='${this.f_building}'`
194
190
  }
191
+ if (this.f_state){
192
+ args.condition += ` and i.f_state='${this.f_state}'`
193
+ }
194
+ if (this.f_last_check_state){
195
+ args.condition += ` and i.f_last_check_state='${this.f_last_check_state}'`
196
+ }
197
+ if (this.f_no_checkplan){
198
+ if (this.f_no_checkplan == '有计划安检'){
199
+ args.condition += ` and i.f_plan_name != '无计划' `
200
+ }else {
201
+ args.condition += ` and i.f_plan_name = '无计划' `
202
+ }
203
+ }
195
204
  this.model.search(args.condition, args.model)
196
205
  }
197
206
  }