safecheck-client 3.0.34-91 → 3.0.34-92

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,303 +1,303 @@
1
- <template>
2
- <div>
3
- <criteria-paged :model="model" v-ref:paged>
4
- <criteria partial='criteria' class="search_area" @condition-changed='$parent.search' v-ref:cri>
5
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
- <div class="row">
7
- <div :class="{'form-group col-sm-6':$parent.$parent.$parent.showItem,'form-group col-sm-4':!$parent.$parent.$parent.showItem}" style="margin: 0">
8
- <role-selector-safe
9
- role-name="安检员"
10
- role-lable="安&ensp;检&ensp;员"
11
- @re-res="$parent.$parent.getRes"
12
- :value.sync="model.f_checker_id"
13
- v-model="model.f_checker_id">
14
- </role-selector-safe>
15
- </div>
16
- <div :class="{'form-group col-sm-3':$parent.$parent.$parent.showItem,'form-group col-sm-2':!$parent.$parent.$parent.showItem}">
17
- <label class="font_normal_body">计划起始</label>
18
- <datepicker
19
- :value.sync="$parent.$parent.f_check_start"
20
- placeholder='起始月份' style="width:60%"
21
- :disabled-days-of-week="[]"
22
- :format="'yyyy-MM'"
23
- :select-month="true"
24
- :show-rest-button="reset">
25
- </datepicker>
26
- </div>
27
- <div :class="{'form-group col-sm-3':$parent.$parent.$parent.showItem,'form-group col-sm-2':!$parent.$parent.$parent.showItem}">
28
- <label class="font_normal_body">计划截止</label>
29
- <datepicker
30
- :value.sync="$parent.$parent.f_check_end"
31
- placeholder='结束月份' style="width:60%"
32
- :disabled-days-of-week="[]"
33
- :format="'yyyy-MM'"
34
- :select-month="true"
35
- :show-rest-button="reset">
36
- </datepicker>
37
- </div>
38
- <!--<div :class="{'form-group col-sm-3':$parent.$parent.$parent.showItem,'form-group col-sm-2':!$parent.$parent.$parent.showItem}" >
39
- <label class="font_normal_body">安检状态</label>
40
- <v-select :value.sync="model.f_last_check_state" :options='$parent.$parent.checkStates' placeholder='上次安检状态' close-on-select
41
- style="width:60% " class="select select_list" v-model='model.f_last_check_state' condition="i.f_last_check_state = '{}'">
42
- </v-select>
43
- </div>-->
44
- <div :class="{'form-group col-sm-3':$parent.$parent.$parent.showItem,'form-group col-sm-2':!$parent.$parent.$parent.showItem}">
45
- <label class="font_normal_body">安检起始</label>
46
- <datepicker
47
- :value.sync="$parent.$parent.f_start_time"
48
- placeholder='安检起始' style="width:60%"
49
- :show-rest-button="reset">
50
- </datepicker>
51
- </div>
52
- <div :class="{'form-group col-sm-3':$parent.$parent.$parent.showItem,'form-group col-sm-2':!$parent.$parent.$parent.showItem}">
53
- <label class="font_normal_body">安检截止</label>
54
- <datepicker
55
- :value.sync="$parent.$parent.f_end_time"
56
- placeholder='安检截止' style="width:60%"
57
- :show-rest-button="reset">
58
- </datepicker>
59
- </div>
60
- <!--<div :class="{'form-group col-sm-3':$parent.$parent.$parent.showItem,'form-group col-sm-2':!$parent.$parent.$parent.showItem}" v-if="$parent.$parent.criteriaShow">-->
61
- <!--<label class="font_normal_body">安检起始</label>-->
62
- <!--<datepicker-->
63
- <!--:value.sync="$parent.$parent.f_start_time"-->
64
- <!--placeholder='起始时间' style="width:60%"-->
65
- <!--:disabled-days-of-week="[]"-->
66
- <!--:format="'yyyy-MM-dd'"-->
67
- <!--:show-rest-button="reset">-->
68
- <!--</datepicker>-->
69
- <!--</div>-->
70
- <!--<div :class="{'form-group col-sm-3':$parent.$parent.$parent.showItem,'form-group col-sm-2':!$parent.$parent.$parent.showItem}" v-if="$parent.$parent.criteriaShow">-->
71
- <!--<label class="font_normal_body">安检结束</label>-->
72
- <!--<datepicker-->
73
- <!--:value.sync="$parent.$parent.f_end_time"-->
74
- <!--placeholder='结束时间' style="width:60%"-->
75
- <!--:disabled-days-of-week="[]"-->
76
- <!--:format="'yyyy-MM-dd'"-->
77
- <!--:show-rest-button="reset">-->
78
- <!--</datepicker>-->
79
- <!--</div>-->
80
- <div style="width: auto;margin-top:8px;float: right" :class="{'form-group col-sm-3':$parent.$parent.$parent.showItem,'form-group col-sm-2':!$parent.$parent.$parent.showItem}">
81
- <export-excel-safe :data="$parent.$parent.searchData"
82
- :field="$parent.$parent.excelHeaders"
83
- progress="safeGetExportProgress"
84
- sqlurl="rs/logic/SafeExportExcel" sql-name="planCount" template-name='安检计划明细' ></export-excel-safe>
85
- <button type="button" class="button_search button_spacing" @click="search()">查询</button>
86
- <!--<div class="button_spacing"-->
87
- <!--:class="{'button_shrink_top':$parent.criteriaShow,'button_shrink_bottom':!$parent.criteriaShow}"-->
88
- <!--@click="$parent.$parent.hidden()">-->
89
- <!--</div>-->
90
- <div class="button_spacing"
91
- :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
92
- @click="$parent.$parent.hiddenr()"></div>
93
- </div>
94
- </div>
95
- </div>
96
- </criteria>
97
- <data-grid :model="model" partial='list' v-ref:grid class="list_area table_sy">
98
- <template partial='head'>
99
- <tr>
100
- <th>安检员</th>
101
- <th>总入户量</th>
102
- <th>总到访不遇量</th>
103
- <th>总拒检量</th>
104
- <th>安检总量</th>
105
- <th>计划总数</th>
106
- <th>入户</th>
107
- <th>到访不遇</th>
108
- <th>拒检</th>
109
- <th>无计划总数</th>
110
- <th>无计划入户</th>
111
- <th>无计划到访不遇</th>
112
- <th>无计划拒检</th>
113
- </tr>
114
- </template>
115
- <template partial='body'>
116
- <td style="text-align: center">{{row.f_checker}}</td>
117
- <td style="text-align: center">{{row.ruhu_total}}</td>
118
- <td style="text-align: center">{{row.daofang_total}}</td>
119
- <td style="text-align: center">{{row.jujian_total}}</td>
120
- <td style="text-align: center">{{row.total_sum}}</td>
121
- <td style="text-align: center">{{row.plannum}}</td>
122
- <td style="text-align: center">{{row.ruhu}}</td>
123
- <td style="text-align: center">{{row.daofang}}</td>
124
- <td style="text-align: center">{{row.jujian}}</td>
125
- <td style="text-align: center">{{row.no_plan_num}}</td>
126
- <td style="text-align: center">{{row.noruhu}}</td>
127
- <td style="text-align: center">{{row.nodaofang}}</td>
128
- <td style="text-align: center">{{row.nojujian}}</td>
129
- </template>
130
- <template partial="foot">
131
- <td style="text-align: center"><span><b>合计:</b></span></td>
132
- <td style="text-align: center">{{model.sums.ruhu_total}}</td>
133
- <td style="text-align: center">{{model.sums.daofang_total}}</td>
134
- <td style="text-align: center">{{model.sums.jujian_total}}</td>
135
- <td style="text-align: center">{{model.sums.total_sum}}</td>
136
- <td style="text-align: center">{{model.sums.plannum}}</td>
137
- <td style="text-align: center">{{model.sums.ruhu}}</td>
138
- <td style="text-align: center">{{model.sums.daofang}}</td>
139
- <td style="text-align: center">{{model.sums.jujian}}</td>
140
- <td style="text-align: center">{{model.sums.no_plan_num}}</td>
141
- <td style="text-align: center">{{model.sums.noruhu}}</td>
142
- <td style="text-align: center">{{model.sums.nodaofang}}</td>
143
- <td style="text-align: center">{{model.sums.nojujian}}</td>
144
- </template>
145
- </data-grid>
146
- </criteria-paged>
147
- </div>
148
- </template>
149
- <script>
150
- import {PagedList} from 'vue-client'
151
-
152
-
153
- export default {
154
- title: '安检计划查询',
155
- data() {
156
- let options = []
157
- let year = (new Date()).getFullYear()
158
- for (let i = year - 8; i <= year + 1; i++)
159
- options.push({label: i + '', value: i + ''})
160
- let model = new PagedList('rs/sql/planCount', 20, {
161
- f_filialeids: 'this.f_filialeids',
162
- f_start_time: 'this.f_start_time',
163
- condition1:'this.condition1',
164
- condition2:'this.condition2',
165
- condition3:'this.condition3',
166
- f_end_time: 'this.f_end_time'
167
- }, {plannum: '', ruhu: '', jujian: '', daofang: '',no_plan_num:'',noruhu:'',nodaofang:'',nojujian:'',ruhu_total:'',daofang_total:'',jujian_total:'',total_sum:''})
168
- model.f_filialeids = '('+this.$login.f.orgid+')'
169
- return {
170
- excelHeaders:{
171
- 'f_checker': '安检员',
172
- 'plannum': '计划总数',
173
- // 'yrj': '计划中已入户',
174
- // 'wrj': '计划中未入户',
175
- 'ruhu': '入户',
176
- 'jujian': '拒检',
177
- 'daofang': '到访不遇',
178
- 'no_plan_num': '无计划总数',
179
- 'noruhu': '无计划入户',
180
- 'nojujian': '无计划拒检',
181
- 'nodaofang': '无计划到访不遇'
182
- },
183
- searchData:{
184
- condition:"1=1",
185
- f_plan_year:year[0],
186
- f_checker:'',
187
- f_filialeids:'('+this.$login.f.orgid+')',
188
- f_start_time:'',
189
- f_end_time:''
190
- },
191
- checker: this.$login.f,
192
- checkers: [],
193
- checkersname: [],
194
- checkStates: this.$appdata.getParam('安检状态'),
195
- f: this.$login.f,
196
- criteriaShow: false,
197
- model: model,
198
- c_year_list: options,
199
- f_check_start:'',
200
- f_check_end: '',
201
- f_start_time:'',
202
- f_end_time:''
203
- }
204
- },
205
- methods: {
206
- hidden() {
207
- this.criteriaShow = !this.criteriaShow
208
- },
209
- hiddenr() {
210
- this.$parent.showItem = !this.$parent.showItem
211
- },
212
- search(args) {
213
- let tempStr = args.condition
214
- let condition1 =tempStr
215
- let condition2 =tempStr
216
- let condition3 = ' and 1=1 '
217
- if (this.f_check_start) {
218
- condition1 += ` AND f_plan_year >= ${this.f_check_start.substr(0,4)} `
219
- condition1 += ` AND f_plan_month >= ${this.f_check_start.substr(5,2)} `
220
- }
221
- if (this.f_check_end) {
222
- condition1 += ` AND f_plan_year <= ${this.f_check_end.substr(0,4)} `
223
- condition1 += ` AND f_plan_month <= ${this.f_check_end.substr(5,2)} `
224
- }
225
- if(this.f_start_time){
226
- condition2 += ` AND f_offsite_time >= '${this.f_start_time} 00:00:00'`
227
- }
228
- if (this.f_end_time){
229
- condition2 += ` AND f_offsite_time <= '${this.f_end_time} 23:59:59'`
230
- }
231
- if (this.$refs.paged.$refs.cri.model.f_checker_id){
232
- condition3 += ` AND f_checker = '${this.$refs.paged.$refs.cri.model.f_checker_id}' `
233
- condition2 += ` AND f_checker_name = '${this.$refs.paged.$refs.cri.model.f_checker_id}' `
234
- }
235
- this.model.f_start_time=this.f_start_time
236
- this.model.f_end_time=this.f_end_time
237
- this.model.condition1=condition1
238
- this.model.condition2=condition2
239
- this.model.condition3=condition3
240
- this.model.search(args.condition, args.model)
241
- },
242
- getRes(obj){
243
- this.model.f_filialeids = this.$login.convertToIn(obj.resids);
244
- //tag
245
- }
246
- },
247
- ready() {
248
- this.model.id = this.$login.f.id
249
- this.model.f_subcompany = this.$login.f.f_fengongsi
250
- this.model.f_filialeid = this.$login.f.orgid
251
- },
252
-
253
- watch: {
254
- 'model.condition'(val) {
255
- if(val){
256
- this.searchData.condition = val
257
- }
258
- },
259
- 'model.f_checker'(val) {
260
- if(val){
261
- this.searchData.f_checker = val
262
- }
263
- },
264
- 'f_start_time'(val) {
265
- if(val){
266
- this.searchData.f_start_time = val
267
- }
268
- },
269
- 'f_end_time'(val) {
270
- if(val){
271
- this.searchData.f_end_time = val
272
- }
273
- },
274
- 'checker'() {
275
- // //tag
276
- //tag
277
- this.model.chosenOrg = this.checker[0]
278
- },
279
- 'model.rows.length'() {
280
- // 如果查询无结果,将合计置为0
281
- if(this.model.rows.length < 1 &&this. model.sums){
282
- this.model.sums.yrj = 0
283
- this.model.sums.no_plan_num = 0
284
- this.model.sums.wrj = 0
285
- this.model.sums.ruhu = 0
286
- this.model.sums.jujian = 0
287
- this.model.sums.daofang = 0
288
- this.model.sums.ruhu_total=0
289
- this.model.sums.daofang_total=0
290
- this.model.sums.jujian_total=0
291
- this.model.sums.total_sum=0
292
- }
293
- }
294
- },
295
- computed: {
296
- selected() {
297
- // //tag
298
- // this.$parent.showItem=!this.$parent.showItem
299
- return this.$refs.paged.$refs.grid.selected
300
- }
301
- }
302
- }
303
- </script>
1
+ <template>
2
+ <div>
3
+ <criteria-paged :model="model" v-ref:paged>
4
+ <criteria partial='criteria' class="search_area" @condition-changed='$parent.search' v-ref:cri>
5
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
+ <div class="row">
7
+ <div :class="{'form-group col-sm-6':$parent.$parent.$parent.showItem,'form-group col-sm-4':!$parent.$parent.$parent.showItem}" style="margin: 0">
8
+ <role-selector-safe
9
+ role-name="安检员"
10
+ role-lable="安&ensp;检&ensp;员"
11
+ @re-res="$parent.$parent.getRes"
12
+ :value.sync="model.f_checker_id"
13
+ v-model="model.f_checker_id">
14
+ </role-selector-safe>
15
+ </div>
16
+ <div :class="{'form-group col-sm-3':$parent.$parent.$parent.showItem,'form-group col-sm-2':!$parent.$parent.$parent.showItem}">
17
+ <label class="font_normal_body">计划起始</label>
18
+ <datepicker
19
+ :value.sync="$parent.$parent.f_check_start"
20
+ placeholder='起始月份' style="width:60%"
21
+ :disabled-days-of-week="[]"
22
+ :format="'yyyy-MM'"
23
+ :select-month="true"
24
+ :show-rest-button="reset">
25
+ </datepicker>
26
+ </div>
27
+ <div :class="{'form-group col-sm-3':$parent.$parent.$parent.showItem,'form-group col-sm-2':!$parent.$parent.$parent.showItem}">
28
+ <label class="font_normal_body">计划截止</label>
29
+ <datepicker
30
+ :value.sync="$parent.$parent.f_check_end"
31
+ placeholder='结束月份' style="width:60%"
32
+ :disabled-days-of-week="[]"
33
+ :format="'yyyy-MM'"
34
+ :select-month="true"
35
+ :show-rest-button="reset">
36
+ </datepicker>
37
+ </div>
38
+ <!--<div :class="{'form-group col-sm-3':$parent.$parent.$parent.showItem,'form-group col-sm-2':!$parent.$parent.$parent.showItem}" >
39
+ <label class="font_normal_body">安检状态</label>
40
+ <v-select :value.sync="model.f_last_check_state" :options='$parent.$parent.checkStates' placeholder='上次安检状态' close-on-select
41
+ style="width:60% " class="select select_list" v-model='model.f_last_check_state' condition="i.f_last_check_state = '{}'">
42
+ </v-select>
43
+ </div>-->
44
+ <div :class="{'form-group col-sm-3':$parent.$parent.$parent.showItem,'form-group col-sm-2':!$parent.$parent.$parent.showItem}">
45
+ <label class="font_normal_body">安检起始</label>
46
+ <datepicker
47
+ :value.sync="$parent.$parent.f_start_time"
48
+ placeholder='安检起始' style="width:60%"
49
+ :show-rest-button="reset">
50
+ </datepicker>
51
+ </div>
52
+ <div :class="{'form-group col-sm-3':$parent.$parent.$parent.showItem,'form-group col-sm-2':!$parent.$parent.$parent.showItem}">
53
+ <label class="font_normal_body">安检截止</label>
54
+ <datepicker
55
+ :value.sync="$parent.$parent.f_end_time"
56
+ placeholder='安检截止' style="width:60%"
57
+ :show-rest-button="reset">
58
+ </datepicker>
59
+ </div>
60
+ <!--<div :class="{'form-group col-sm-3':$parent.$parent.$parent.showItem,'form-group col-sm-2':!$parent.$parent.$parent.showItem}" v-if="$parent.$parent.criteriaShow">-->
61
+ <!--<label class="font_normal_body">安检起始</label>-->
62
+ <!--<datepicker-->
63
+ <!--:value.sync="$parent.$parent.f_start_time"-->
64
+ <!--placeholder='起始时间' style="width:60%"-->
65
+ <!--:disabled-days-of-week="[]"-->
66
+ <!--:format="'yyyy-MM-dd'"-->
67
+ <!--:show-rest-button="reset">-->
68
+ <!--</datepicker>-->
69
+ <!--</div>-->
70
+ <!--<div :class="{'form-group col-sm-3':$parent.$parent.$parent.showItem,'form-group col-sm-2':!$parent.$parent.$parent.showItem}" v-if="$parent.$parent.criteriaShow">-->
71
+ <!--<label class="font_normal_body">安检结束</label>-->
72
+ <!--<datepicker-->
73
+ <!--:value.sync="$parent.$parent.f_end_time"-->
74
+ <!--placeholder='结束时间' style="width:60%"-->
75
+ <!--:disabled-days-of-week="[]"-->
76
+ <!--:format="'yyyy-MM-dd'"-->
77
+ <!--:show-rest-button="reset">-->
78
+ <!--</datepicker>-->
79
+ <!--</div>-->
80
+ <div style="width: auto;margin-top:8px;float: right" :class="{'form-group col-sm-3':$parent.$parent.$parent.showItem,'form-group col-sm-2':!$parent.$parent.$parent.showItem}">
81
+ <export-excel-safe :data="$parent.$parent.searchData"
82
+ :field="$parent.$parent.excelHeaders"
83
+ progress="safeGetExportProgress"
84
+ sqlurl="rs/logic/SafeExportExcel" sql-name="planCount" template-name='安检计划明细' ></export-excel-safe>
85
+ <button type="button" class="button_search button_spacing" @click="search()">查询</button>
86
+ <!--<div class="button_spacing"-->
87
+ <!--:class="{'button_shrink_top':$parent.criteriaShow,'button_shrink_bottom':!$parent.criteriaShow}"-->
88
+ <!--@click="$parent.$parent.hidden()">-->
89
+ <!--</div>-->
90
+ <div class="button_spacing"
91
+ :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
92
+ @click="$parent.$parent.hiddenr()"></div>
93
+ </div>
94
+ </div>
95
+ </div>
96
+ </criteria>
97
+ <data-grid :model="model" partial='list' v-ref:grid class="list_area table_sy">
98
+ <template partial='head'>
99
+ <tr>
100
+ <th>安检员</th>
101
+ <th>总入户量</th>
102
+ <th>总到访不遇量</th>
103
+ <th>总拒检量</th>
104
+ <th>安检总量</th>
105
+ <th>计划总数</th>
106
+ <th>入户</th>
107
+ <th>到访不遇</th>
108
+ <th>拒检</th>
109
+ <th>无计划总数</th>
110
+ <th>无计划入户</th>
111
+ <th>无计划到访不遇</th>
112
+ <th>无计划拒检</th>
113
+ </tr>
114
+ </template>
115
+ <template partial='body'>
116
+ <td style="text-align: center">{{row.f_checker}}</td>
117
+ <td style="text-align: center">{{row.ruhu_total}}</td>
118
+ <td style="text-align: center">{{row.daofang_total}}</td>
119
+ <td style="text-align: center">{{row.jujian_total}}</td>
120
+ <td style="text-align: center">{{row.total_sum}}</td>
121
+ <td style="text-align: center">{{row.plannum}}</td>
122
+ <td style="text-align: center">{{row.ruhu}}</td>
123
+ <td style="text-align: center">{{row.daofang}}</td>
124
+ <td style="text-align: center">{{row.jujian}}</td>
125
+ <td style="text-align: center">{{row.no_plan_num}}</td>
126
+ <td style="text-align: center">{{row.noruhu}}</td>
127
+ <td style="text-align: center">{{row.nodaofang}}</td>
128
+ <td style="text-align: center">{{row.nojujian}}</td>
129
+ </template>
130
+ <template partial="foot">
131
+ <td style="text-align: center"><span><b>合计:</b></span></td>
132
+ <td style="text-align: center">{{model.sums.ruhu_total}}</td>
133
+ <td style="text-align: center">{{model.sums.daofang_total}}</td>
134
+ <td style="text-align: center">{{model.sums.jujian_total}}</td>
135
+ <td style="text-align: center">{{model.sums.total_sum}}</td>
136
+ <td style="text-align: center">{{model.sums.plannum}}</td>
137
+ <td style="text-align: center">{{model.sums.ruhu}}</td>
138
+ <td style="text-align: center">{{model.sums.daofang}}</td>
139
+ <td style="text-align: center">{{model.sums.jujian}}</td>
140
+ <td style="text-align: center">{{model.sums.no_plan_num}}</td>
141
+ <td style="text-align: center">{{model.sums.noruhu}}</td>
142
+ <td style="text-align: center">{{model.sums.nodaofang}}</td>
143
+ <td style="text-align: center">{{model.sums.nojujian}}</td>
144
+ </template>
145
+ </data-grid>
146
+ </criteria-paged>
147
+ </div>
148
+ </template>
149
+ <script>
150
+ import {PagedList} from 'vue-client'
151
+
152
+
153
+ export default {
154
+ title: '安检计划查询',
155
+ data() {
156
+ let options = []
157
+ let year = (new Date()).getFullYear()
158
+ for (let i = year - 8; i <= year + 1; i++)
159
+ options.push({label: i + '', value: i + ''})
160
+ let model = new PagedList('rs/sql/planCount', 20, {
161
+ f_filialeids: 'this.f_filialeids',
162
+ f_start_time: 'this.f_start_time',
163
+ condition1:'this.condition1',
164
+ condition2:'this.condition2',
165
+ condition3:'this.condition3',
166
+ f_end_time: 'this.f_end_time'
167
+ }, {plannum: '', ruhu: '', jujian: '', daofang: '',no_plan_num:'',noruhu:'',nodaofang:'',nojujian:'',ruhu_total:'',daofang_total:'',jujian_total:'',total_sum:''})
168
+ model.f_filialeids = '('+this.$login.f.orgid+')'
169
+ return {
170
+ excelHeaders:{
171
+ 'f_checker': '安检员',
172
+ 'plannum': '计划总数',
173
+ // 'yrj': '计划中已入户',
174
+ // 'wrj': '计划中未入户',
175
+ 'ruhu': '入户',
176
+ 'jujian': '拒检',
177
+ 'daofang': '到访不遇',
178
+ 'no_plan_num': '无计划总数',
179
+ 'noruhu': '无计划入户',
180
+ 'nojujian': '无计划拒检',
181
+ 'nodaofang': '无计划到访不遇'
182
+ },
183
+ searchData:{
184
+ condition:"1=1",
185
+ f_plan_year:year[0],
186
+ f_checker:'',
187
+ f_filialeids:'('+this.$login.f.orgid+')',
188
+ f_start_time:'',
189
+ f_end_time:''
190
+ },
191
+ checker: this.$login.f,
192
+ checkers: [],
193
+ checkersname: [],
194
+ checkStates: this.$appdata.getParam('安检状态'),
195
+ f: this.$login.f,
196
+ criteriaShow: false,
197
+ model: model,
198
+ c_year_list: options,
199
+ f_check_start:'',
200
+ f_check_end: '',
201
+ f_start_time:'',
202
+ f_end_time:''
203
+ }
204
+ },
205
+ methods: {
206
+ hidden() {
207
+ this.criteriaShow = !this.criteriaShow
208
+ },
209
+ hiddenr() {
210
+ this.$parent.showItem = !this.$parent.showItem
211
+ },
212
+ search(args) {
213
+ let tempStr = args.condition
214
+ let condition1 =tempStr
215
+ let condition2 =tempStr
216
+ let condition3 = ' and 1=1 '
217
+ if (this.f_check_start) {
218
+ condition1 += ` AND f_plan_year >= ${this.f_check_start.substr(0,4)} `
219
+ condition1 += ` AND f_plan_month >= ${this.f_check_start.substr(5,2)} `
220
+ }
221
+ if (this.f_check_end) {
222
+ condition1 += ` AND f_plan_year <= ${this.f_check_end.substr(0,4)} `
223
+ condition1 += ` AND f_plan_month <= ${this.f_check_end.substr(5,2)} `
224
+ }
225
+ if(this.f_start_time){
226
+ condition2 += ` AND f_offsite_time >= '${this.f_start_time} 00:00:00'`
227
+ }
228
+ if (this.f_end_time){
229
+ condition2 += ` AND f_offsite_time <= '${this.f_end_time} 23:59:59'`
230
+ }
231
+ if (this.$refs.paged.$refs.cri.model.f_checker_id){
232
+ condition3 += ` AND f_checker = '${this.$refs.paged.$refs.cri.model.f_checker_id}' `
233
+ condition2 += ` AND f_checker_name = '${this.$refs.paged.$refs.cri.model.f_checker_id}' `
234
+ }
235
+ this.model.f_start_time=this.f_start_time
236
+ this.model.f_end_time=this.f_end_time
237
+ this.model.condition1=condition1
238
+ this.model.condition2=condition2
239
+ this.model.condition3=condition3
240
+ this.model.search(args.condition, args.model)
241
+ },
242
+ getRes(obj){
243
+ this.model.f_filialeids = this.$login.convertToIn(obj.resids);
244
+ //tag
245
+ }
246
+ },
247
+ ready() {
248
+ this.model.id = this.$login.f.id
249
+ this.model.f_subcompany = this.$login.f.f_fengongsi
250
+ this.model.f_filialeid = this.$login.f.orgid
251
+ },
252
+
253
+ watch: {
254
+ 'model.condition'(val) {
255
+ if(val){
256
+ this.searchData.condition = val
257
+ }
258
+ },
259
+ 'model.f_checker'(val) {
260
+ if(val){
261
+ this.searchData.f_checker = val
262
+ }
263
+ },
264
+ 'f_start_time'(val) {
265
+ if(val){
266
+ this.searchData.f_start_time = val
267
+ }
268
+ },
269
+ 'f_end_time'(val) {
270
+ if(val){
271
+ this.searchData.f_end_time = val
272
+ }
273
+ },
274
+ 'checker'() {
275
+ // //tag
276
+ //tag
277
+ this.model.chosenOrg = this.checker[0]
278
+ },
279
+ 'model.rows.length'() {
280
+ // 如果查询无结果,将合计置为0
281
+ if(this.model.rows.length < 1 &&this. model.sums){
282
+ this.model.sums.yrj = 0
283
+ this.model.sums.no_plan_num = 0
284
+ this.model.sums.wrj = 0
285
+ this.model.sums.ruhu = 0
286
+ this.model.sums.jujian = 0
287
+ this.model.sums.daofang = 0
288
+ this.model.sums.ruhu_total=0
289
+ this.model.sums.daofang_total=0
290
+ this.model.sums.jujian_total=0
291
+ this.model.sums.total_sum=0
292
+ }
293
+ }
294
+ },
295
+ computed: {
296
+ selected() {
297
+ // //tag
298
+ // this.$parent.showItem=!this.$parent.showItem
299
+ return this.$refs.paged.$refs.grid.selected
300
+ }
301
+ }
302
+ }
303
+ </script>