safecheck-client 4.0.2-3 → 4.0.2-30

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.
Files changed (35) hide show
  1. package/package.json +2 -2
  2. package/src/components/android/week/CheckResultSimple.vue +222 -0
  3. package/src/components/android/week/FirstWeekCheck.vue +236 -0
  4. package/src/components/android/week/StepHeaderBar.vue +323 -0
  5. package/src/components/android/week/WeekCheck.vue +151 -0
  6. package/src/components/android/week/WeekCheckPaper.vue +151 -0
  7. package/src/components/checkplan/SelectCheckPlan.vue +39 -0
  8. package/src/components/paper/safetyledger.vue +194 -0
  9. package/src/components/pc/CheckBook.vue +1 -1
  10. package/src/components/planmanage/PlanManage.vue +902 -902
  11. package/src/components/planmanage/checkUserList.vue +1 -1
  12. package/src/components/querycheckpaper/CheckSearchUser.vue +2 -1
  13. package/src/components/report/CheckByPlan.vue +1 -1
  14. package/src/components/report/CheckPlanAreaList.vue +45 -2
  15. package/src/filiale/jinhong/android/CurrentCreate.vue +6 -3
  16. package/src/filiale/jinhong/android/PhoneInsurancePurchaseDetail.vue +28 -3
  17. package/src/filiale/jinhong/pc/CheckBookList.vue +28 -18
  18. package/src/filiale/jinhong/pc/PaperList.vue +1 -1
  19. package/src/filiale/jinhong/pc/checkPlanList.vue +73 -24
  20. package/src/filiale/meihekou/android/CurrentCreate.vue +1038 -1038
  21. package/src/filiale/meihekou/android/SafecheckDevices.vue +6 -3
  22. package/src/filiale/meihekou/android/SafecheckOrderV.vue +9 -8
  23. package/src/filiale/meihekou/pc/CheckDetail.vue +208 -0
  24. package/src/filiale/meihekou/pc/CheckPlan.vue +52 -0
  25. package/src/filiale/meihekou/pc/CheckPlanAreaList.vue +504 -0
  26. package/src/filiale/meihekou/pc/SelectCheckPlan.vue +262 -0
  27. package/src/filiale/meihekou/pc.js +3 -0
  28. package/src/filiale/qingjian/pc/SecurityCheckCoordinates.vue +2 -2
  29. package/src/filiale/xinkang/android/SafecheckOrderV.vue +1 -1
  30. package/src/filiale/xinliansihui/pc/PaperList.vue +814 -0
  31. package/src/filiale/xinliansihui/pc/PaperVisitMain.vue +206 -0
  32. package/src/filiale/xinliansihui/pc.js +13 -0
  33. package/src/main.js +33 -33
  34. package/src/safecheck-android.js +10 -0
  35. package/src/safecheck.js +3 -0
@@ -0,0 +1,504 @@
1
+ <template>
2
+ <div class="flex">
3
+ <criteria-paged :model="model" v-ref:paged :pager="false">
4
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' 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-3':$parent.$parent.$parent.isdetail,'form-group col-sm-2':!$parent.$parent.$parent.isdetail}">
8
+ <label class="font_normal_body">组织机构</label>
9
+ <res-select restype='organization'
10
+ class="select select_list"
11
+ style="width: 60%"
12
+ @res-select="$parent.$parent.getorg"
13
+ :initresid='$parent.$parent.curorgid'>
14
+ </res-select>
15
+ </div>-->
16
+ <div :class="{'col-sm-6':$parent.$parent.$parent.isdetail,'col-sm-4':!$parent.$parent.$parent.isdetail}">
17
+ <role-selector-safe
18
+ role-name="安检员"
19
+ role-lable="安&ensp;检&ensp;员"
20
+ @re-res="$parent.$parent.getorg"
21
+ :value.sync="model.f_checker_id"
22
+ v-model="model.f_checker_id"
23
+ condition="f_checker_name like '%{}%'">
24
+ </role-selector-safe>
25
+ </div>
26
+ <div :class="{'form-group col-sm-3':$parent.$parent.$parent.isdetail,'form-group col-sm-2':!$parent.$parent.$parent.isdetail}">
27
+ <label class="font_normal_body">小区名称</label>
28
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_residential_area" placeholder='小区名称'
29
+ condition="f_residential_area like '%{}%'" v-next-el="cx" v-el:qjmc>
30
+ </div>
31
+ <div :class="{'form-group col-sm-3':$parent.$parent.$parent.isdetail,'form-group col-sm-2':!$parent.$parent.$parent.isdetail}">
32
+ <label class="font_normal_body">计划名称</label>
33
+ <v-select class="select_list select"
34
+ placeholder='计划名称' style="width: 60%"
35
+ :search="true"
36
+ v-model="model.f_plan_name"
37
+ :value.sync="model.f_plan_name"
38
+ :options='$parent.$parent.planName'
39
+ condition="f_plan_id = '{}'"
40
+ :value-single="true"
41
+ close-on-select clear-button></v-select>
42
+
43
+ </div>
44
+ <!--<div :class="{
45
+ 'form-group col-sm-3':$parent.$parent.$parent.isdetail,'form-group col-sm-2':!$parent.$parent.$parent.isdetail}">
46
+ <label class="font_normal_body">安&ensp;检&ensp;员</label>
47
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_building" placeholder='楼栋'
48
+ condition="f_building like '%{}%'" v-next-el="cx" v-el:qjmc>
49
+ </div>-->
50
+ <div class="form-group col-sm-2" v-if="!$parent.$parent.$parent.isdetail"></div>
51
+ <div :class="{'form-group col-sm-3':$parent.$parent.$parent.isdetail,'form-group col-sm-2':!$parent.$parent.$parent.isdetail}" style="float:right; padding-right: 25px">
52
+ <div class="span" style="float:right;">
53
+ <div style="float: right;margin-left:10px" class="button_spacing"
54
+ :class="{'button_shrink_left':!$parent.$parent.$parent.isdetail,'button_shrink_right':$parent.$parent.$parent.isdetail}"
55
+ @click="$parent.$parent.hiddenr()"></div>
56
+ <div class="button_spacing" style="float: right;margin-left:10px"
57
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
58
+ @click="$parent.$parent.hidden()">
59
+ </div>
60
+ <!-- <export-excel :data="$parent.$parent.exportParameter"
61
+ :field="$parent.$parent.exportExcelField"
62
+ sqlurl="api/af-safecheck/logic/exportfile" sql-name="getCheckPlanAreaList"
63
+ template-name='安检汇总' :choose-col="true">
64
+ </export-excel>-->
65
+ <button id="btnaaaa" style="float: right" class="button_search"
66
+ @click="$parent.$parent.exportexcel()"
67
+ v-el:cx>导出</button>
68
+ <button id="btnaaa" style="float: right" class="button_search"
69
+ @click="$parent.$parent.getGroupName1(),search(),$parent.$parent.getexportExcelField(),$parent.$parent.$parent.isdetail=false,$parent.$parent.listflag=false"
70
+ v-el:cx>查询</button>
71
+ </div>
72
+ </div>
73
+ <div :class="{'form-group col-sm-3':$parent.$parent.$parent.isdetail,'form-group col-sm-2':!$parent.$parent.$parent.isdetail}" v-if="$parent.$parent.criteriaShow">
74
+ <label class="font_normal_body">起始时间</label>
75
+ <datepicker
76
+ :value.sync="$parent.$parent.f_check_start"
77
+ placeholder='起始时间' style="width:60%"
78
+ :disabled-days-of-week="[]"
79
+ :format="'yyyy-MM'"
80
+ :select-month="true"
81
+ :show-rest-button="reset">
82
+ </datepicker>
83
+ </div>
84
+ <div :class="{'form-group col-sm-3':$parent.$parent.$parent.isdetail,'form-group col-sm-2':!$parent.$parent.$parent.isdetail}" v-if="$parent.$parent.criteriaShow">
85
+ <label class="font_normal_body">结束时间</label>
86
+ <datepicker
87
+ :value.sync="$parent.$parent.f_check_end"
88
+ placeholder='结束时间' style="width:60%"
89
+ :disabled-days-of-week="[]"
90
+ :format="'yyyy-MM'"
91
+ :select-month="true"
92
+ :show-rest-button="reset">
93
+ </datepicker>
94
+ </div>
95
+ </div>
96
+ <div class="row">
97
+ <div class="col-sm-12">
98
+ <label class="control-label" style="color: #c7254e">汇 总 项</label>
99
+ <input type="checkbox" id="f_plan_month" value="f_plan_month" v-model="$parent.$parent.nameForSql"/>
100
+ <label for="f_plan_month">计划月份</label>
101
+ <input type="checkbox" id="f_no_checkplan" value="f_no_checkplan" v-model="$parent.$parent.nameForSql"/>
102
+ <label for="f_no_checkplan">计划类型</label>
103
+ <input type="checkbox" id="f_residential_area" value="f_residential_area" v-model="$parent.$parent.nameForSql"/>
104
+ <label for="f_residential_area">小区名称</label>
105
+ <input type="checkbox" id="f_plan_name" value="f_plan_name" v-model="$parent.$parent.nameForSql"/>
106
+ <label for="f_plan_name">计划名称</label>
107
+ <input type="checkbox" id="f_building" value="f_building" v-model="$parent.$parent.nameForSql"/>
108
+ <label for="f_building">楼栋</label>
109
+ <input type="checkbox" id="f_user_number" value="f_user_number" v-model="$parent.$parent.nameForSql"/>
110
+ <label for="f_building">档案数量</label>
111
+ </div>
112
+ </div>
113
+ </div>
114
+
115
+ </criteria>
116
+ <data-grid id="excelid" :model="model" partial='list' class="list_area table_sy excelid" v-ref:grid>
117
+ <template partial='head'>
118
+ <tr>
119
+ <th>
120
+ <nobr>序号</nobr>
121
+ </th>
122
+ <th v-if="$parent.$parent.$parent.nameForSql.includes('f_plan_month')"><nobr>计划月份</nobr></th>
123
+ <th v-if="$parent.$parent.$parent.nameForSql.includes('f_no_checkplan')"><nobr>计划类型</nobr></th>
124
+ <th v-if="$parent.$parent.$parent.nameForSql.includes('f_residential_area')"><nobr>小区名称</nobr></th>
125
+ <th v-if="$parent.$parent.$parent.nameForSql.includes('f_plan_name')"><nobr>计划名称</nobr></th>
126
+ <th v-if="$parent.$parent.$parent.nameForSql.includes('f_building')"><nobr>楼栋</nobr></th>
127
+ <th v-if="$parent.$parent.$parent.nameForSql.includes('f_user_number')"><nobr>档案数量</nobr></th>
128
+ <th>
129
+ <nobr>计划总数</nobr>
130
+ </th>
131
+ <th>
132
+ <nobr>未检</nobr>
133
+ </th>
134
+ <th>
135
+ <nobr>已检</nobr>
136
+ </th>
137
+ <th>
138
+ <nobr>入户</nobr>
139
+ </th>
140
+ <th>
141
+ <nobr>到访不遇</nobr>
142
+ </th>
143
+ <th>
144
+ <nobr>拒检</nobr>
145
+ </th>
146
+ <th>
147
+ <nobr>安检率</nobr>
148
+ </th>
149
+ <!--<th>-->
150
+ <!--<nobr>查看</nobr>-->
151
+ <!--</th>-->
152
+ </tr>
153
+ </template>
154
+ <template partial='body'>
155
+ <tr>
156
+ <td style="text-align:center;border-right: 1px solid ">{{$index + 1}}</td>
157
+ <!-- <td style="text-align:center" v-if="$parent.$parent.$parent.nameForSql.includes('f_plan_month')">{{row.f_plan_month.indexOf('*&')!=-1?'':row.f_plan_month}}</td>-->
158
+ <!-- <td style="text-align:center" v-if="$parent.$parent.$parent.nameForSql.includes('f_no_checkplan')">{{row.f_no_checkplan.indexOf('*&')!=-1?'':row.f_no_checkplan}}</td>-->
159
+ <!-- <td style="text-align:center" v-if="$parent.$parent.$parent.nameForSql.includes('f_residential_area')">{{row.f_residential_area.indexOf('*&')!=-1?'':row.f_residential_area}}</td>-->
160
+ <!-- <td style="text-align:center" v-if="$parent.$parent.$parent.nameForSql.includes('f_plan_name')">{{row.f_plan_name.indexOf('*&')!=-1?'':row.f_plan_name}}</td>-->
161
+ <!-- <td style="text-align:center" v-if="$parent.$parent.$parent.nameForSql && $parent.$parent.$parent.nameForSql.includes('f_building')">{{row.f_building && row.f_building.indexOf('*&')!=-1?'':row.f_building}}</td>-->
162
+ <td style="text-align:center" :class="{'td-0':row.f_plan_month==undefined,'td-1':model.rows && model.rows.length!=($index+1)&&row.f_plan_month.indexOf('*&')==-1,'td-2':model.rows && model.rows.length!=($index+1)&&row.f_plan_month.indexOf('*&')!=-1,'td-3':model.rows && model.rows.length==($index+1)&&row.f_plan_month.indexOf('*&')!=-1,'td-4':model.rows && model.rows.length==($index+1)&&row.f_plan_month.indexOf('*&')==-1}" v-if="$parent.$parent.$parent.nameForSql.includes('f_plan_month')">{{row.f_plan_month.indexOf('*&')!=-1?'':row.f_plan_month}}</td>
163
+ <td style="text-align:center" :class="{'td-0':row.f_no_checkplan==undefined,'td-1':model.rows && model.rows.length!=($index+1)&&row.f_no_checkplan.indexOf('*&')==-1,'td-2':model.rows && model.rows.length!=($index+1)&&row.f_no_checkplan.indexOf('*&')!=-1,'td-3':model.rows && model.rows.length==($index+1)&&row.f_no_checkplan.indexOf('*&')!=-1,'td-4':model.rows && model.rows.length==($index+1)&&row.f_no_checkplan.indexOf('*&')==-1}" v-if="$parent.$parent.$parent.nameForSql.includes('f_no_checkplan')">{{row.f_no_checkplan.indexOf('*&')!=-1?'':row.f_no_checkplan}}</td>
164
+ <td style="text-align:center" :class="{'td-0':row.f_residential_area==undefined,'td-1':model.rows && model.rows.length!=($index+1)&&row.f_residential_area.indexOf('*&')==-1,'td-2':model.rows && model.rows.length!=($index+1)&&row.f_residential_area.indexOf('*&')!=-1,'td-3':model.rows && model.rows.length==($index+1)&&row.f_residential_area.indexOf('*&')!=-1,'td-4':model.rows && model.rows.length==($index+1)&&row.f_residential_area.indexOf('*&')==-1}" v-if="$parent.$parent.$parent.nameForSql.includes('f_residential_area')">{{row.f_residential_area.indexOf('*&')!=-1?'':row.f_residential_area}}</td>
165
+ <td style="text-align:center" :class="{'td-0':row.f_plan_name==undefined,'td-1':model.rows && model.rows.length!=($index+1)&&row.f_plan_name.indexOf('*&')==-1,'td-2':model.rows && model.rows.length!=($index+1)&&row.f_plan_name.indexOf('*&')!=-1,'td-3':model.rows && model.rows.length==($index+1)&&row.f_plan_name.indexOf('*&')!=-1,'td-4':model.rows && model.rows.length==($index+1)&&row.f_plan_name.indexOf('*&')==-1}" v-if="$parent.$parent.$parent.nameForSql.includes('f_plan_name')">{{row.f_plan_name.indexOf('*&')!=-1?'':row.f_plan_name}}</td>
166
+ <td style="text-align:center" :class="{'td-0':row && !row.f_building,'td-1':model.rows && model.rows.length!=($index+1)&&row.f_building && row.f_building.indexOf('*&')==-1,'td-2':model.rows && model.rows.length!=($index+1)&&row.f_building &&row.f_building.indexOf('*&')!=-1,'td-3':model.rows && model.rows.length==($index+1)&&row.f_building &&row.f_building.indexOf('*&')!=-1,'td-4':model.rows && model.rows.length==($index+1)&&row.f_building &&row.f_building.indexOf('*&')==-1}" v-if="$parent.$parent.$parent.nameForSql && $parent.$parent.$parent.nameForSql.includes('f_building')">{{row.f_building && row.f_building.indexOf('*&')!=-1?'':row.f_building}}</td>
167
+ <td style="text-align:center" v-if="$parent.$parent.$parent.nameForSql.includes('f_user_number')">{{row.f_user_number}}</td>
168
+ <td style="text-align:center">{{row.f_plan_total}}</td>
169
+ <td style="text-align:center">{{row.f_weijian}}</td>
170
+ <td style="text-align:center"><nobr>{{row.f_yijian}}</nobr></td>
171
+ <td style="text-align:center"><nobr>{{row.f_ruhu}}</nobr></td>
172
+ <td style="text-align:center">{{row.f_buyu}}</td>
173
+ <td style="text-align:center"><nobr>{{row.f_jujian}}</nobr></td>
174
+ <td style="text-align:center"><nobr>{{row.f_check_bv}}</nobr></td>
175
+ </tr>
176
+ </template>
177
+ <template partial="foot">
178
+ <tr>
179
+ <td style="text-align:center"><strong>合计:</strong></td>
180
+ <td style="text-align:center" :colspan="$parent.$parent.$parent.nameForSql.length"></td>
181
+ <td style="text-align:center"><strong>{{model.sums.f_plan_total}}</strong></td>
182
+ <td style="text-align:center"><strong>{{model.sums.f_weijian}}</strong></td>
183
+ <td style="text-align:center"><nobr><strong>{{model.sums.f_yijian}}</strong></nobr></td>
184
+ <td style="text-align:center"><nobr><strong>{{model.sums.f_ruhu}}</strong></nobr></td>
185
+ <td style="text-align:center"><nobr><strong>{{model.sums.f_buyu}}</strong></nobr></td>
186
+ <td style="text-align:center"><nobr><strong>{{model.sums.f_jujian}}</strong></nobr></td>
187
+ <td style="text-align:center"><strong>{{model.sums.f_plan_total>0?(model.sums.f_yijian/model.sums.f_plan_total*100).toFixed(2)+'%':0}}</strong></td>
188
+ </tr >
189
+ </template>
190
+ </data-grid>
191
+ </criteria-paged>
192
+ </div>
193
+ </template>
194
+
195
+ <script>
196
+ /**
197
+ *阶梯气价查询列表
198
+ */
199
+ import {PagedList} from 'vue-client'
200
+ import { HttpResetClass } from 'vue-client'
201
+ import XLSX from 'xlsx'
202
+ export default {
203
+ data () {
204
+ return {
205
+ model: new PagedList('api/af-safecheck/sql/getCheckPlanAreaList', 99999,{},{f_plan_total:'',f_weijian:'',f_yijian:'',f_ruhu:'',f_buyu:'',f_jujian:''}),
206
+ // 公司下拉
207
+ curorgid: [this.$login.f.orgid],
208
+ row: {},
209
+ f_orgid: '',
210
+ nameForSql: [],
211
+ groupNameForSql: '',
212
+ listflag:false,
213
+ nameflag:false,
214
+ criteriaShow: false,
215
+ f_check_start:new Date().getFullYear() + '-01',
216
+ f_check_end:new Date().getFullYear() + '-12',
217
+ planName:[{label: '全部', value: ''}],
218
+ exportExcelField: {
219
+ 'f_weijian':'未检',
220
+ 'f_yijian':'已检',
221
+ 'f_ruhu':'入户',
222
+ 'f_buyu':'到访不遇',
223
+ 'f_jujian':'拒检',
224
+ 'f_check_bv':'安检率'
225
+ }
226
+ }
227
+ },
228
+ props: {
229
+ row: {},
230
+ config: {},
231
+ ispartial: false,
232
+ f_filialeid: {
233
+ type: String
234
+ }
235
+ },
236
+ ready () {
237
+ this.nameForSql = ['f_plan_month', 'f_plan_name','f_building']
238
+ this.groupNameForSql = 'f_plan_month', 'f_plan_name','f_building'
239
+ this.pl()
240
+ // this.search()
241
+
242
+ },
243
+ methods: {
244
+ exportexcel(){
245
+ //tag
246
+ // 以上四行也可以直接一行搞定,如果不需要对表格数据进行修改的话
247
+ const aa = document.getElementsByClassName("list_area table_sy excelid")[0]
248
+ console.log(aa)
249
+ let workbook = XLSX.utils.table_to_book(document.getElementsByClassName("list_area table_sy excelid")[0])
250
+ try {
251
+ XLSX.writeFile(workbook, '安检情况汇总导出.xlsx');
252
+ } catch(e) {
253
+ //tag;
254
+ }
255
+ },
256
+ // 获取导出列
257
+ getexportExcelField(){
258
+ this.exportExcelField = {
259
+ 'f_weijian':'未检',
260
+ 'f_yijian':'已检',
261
+ 'f_ruhu':'入户',
262
+ 'f_buyu':'到访不遇',
263
+ 'f_jujian':'拒检',
264
+ 'f_check_bv':'安检率',
265
+ 'f_plan_total':'计划总数'
266
+ }
267
+ let forName = this.groupNameForSql.split(",")
268
+ for (let i = 0; i < forName.length; i++) {
269
+ let ff = forName[i]
270
+ if (ff==='f_plan_month') {
271
+ this.exportExcelField.f_plan_month='计划月份'
272
+ }
273
+ if (ff==='f_no_checkplan') {
274
+ this.exportExcelField.f_no_checkplan='计划类型'
275
+ }
276
+ if (ff==='f_plan_name') {
277
+ this.exportExcelField.f_plan_name='计划名称'
278
+ }
279
+ if (ff==='f_building') {
280
+ this.exportExcelField.f_building='楼栋'
281
+ }if (ff==='f_residential_area') {
282
+ this.exportExcelField.f_residential_area='小区名称'
283
+ }if (ff==='f_user_number') {
284
+ this.exportExcelField.f_user_number='档案数量'
285
+ }
286
+ }
287
+ },
288
+ pl() {
289
+ let getGasman = new HttpResetClass()
290
+ getGasman.load('POST', `api/af-safecheck/sql/safe_singleTable_OrderBy`, {
291
+ data: {
292
+ items: "id,f_plan_name",
293
+ tablename: "t_check_plan",
294
+ condition: `f_filialeid = '${this.curorgid}'`,
295
+ orderitem: "id"
296
+ }
297
+ }, {resolveMsg: null, rejectMsg: null}).then((plne) => {
298
+ //tag
299
+ //tag
300
+ //tag
301
+ for (let i = 0; i < plne.data.length; i++) {
302
+ this.planName.push({label: plne.data[i].f_plan_name, value: plne.data[i].id})
303
+ }
304
+ //tag
305
+ })
306
+ },
307
+ hiddenr() {
308
+ this.$parent.isdetail = !this.$parent.isdetail
309
+ },
310
+ hidden() {
311
+ this.criteriaShow = !this.criteriaShow
312
+ },
313
+ search () {
314
+ this.$refs.paged.$refs.cri.search()
315
+ this.$dispatch('search')
316
+ },
317
+ getorg (val) {
318
+ this.f_orgid = this.$login.convertToIn(val.resids)
319
+ this.f_filialeid = val[0]
320
+
321
+ },
322
+ selfSearch (args) {
323
+ if (!this.f_orgid) {
324
+ this.getorg([this.$login.f.orgid])
325
+ args.condition = `f_filialeid in ('${this.$login.f.orgid}') and ${args.condition}`
326
+ }
327
+ if (this.f_orgid) {
328
+ args.condition = `f_filialeid in ${this.f_orgid} and ${args.condition}`
329
+ }
330
+ if(this.f_check_start && this.f_check_end){
331
+ if(new Date(this.f_check_start).getFullYear() == new Date(this.f_check_end).getFullYear() ){
332
+ args.condition += ` and f_year>=${new Date(this.f_check_start).getFullYear()} and f_month>=${new Date(this.f_check_start).getMonth()+1} and f_month<=${new Date(this.f_check_end).getMonth()+1}`
333
+ }else {
334
+ args.condition += ` and (
335
+ (f_year = ${new Date(this.f_check_start).getFullYear()} and f_month >= ${new Date(this.f_check_start).getMonth()+1})
336
+ or
337
+ ( f_year > ${new Date(this.f_check_start).getFullYear()} and f_year < ${new Date(this.f_check_end).getFullYear()})
338
+ or
339
+ (f_year = ${new Date(this.f_check_end).getFullYear()} and f_month <= ${new Date(this.f_check_end).getMonth()+1}))`
340
+ }
341
+ } else {
342
+ if(this.f_check_start){
343
+ args.condition += ` and f_year>=${new Date(this.f_check_start).getFullYear()} and f_month>=${new Date(this.f_check_start).getMonth()+1}`
344
+ }
345
+ if(this.f_check_end){
346
+ args.condition += ` and f_year<=${new Date(this.f_check_end).getFullYear()} and f_month<=${new Date(this.f_check_end).getMonth()+1}`
347
+ }
348
+ }
349
+ this.$refs.paged.$refs.grid.$el.scrollTop = 0
350
+ if (this.groupNameForSql=='undefined'){
351
+ //tag
352
+ this.$showMessage("请至少选择一项进行汇总")
353
+ return
354
+ }
355
+ this.model.paramSource = {groupName: `'${this.groupNameForSql}'`}
356
+ this.model.search(args.condition, args.model)
357
+ },
358
+
359
+ // 拼接groupName1
360
+ getGroupName1 () {
361
+ var temp=['f_plan_month','f_no_checkplan','f_residential_area','f_plan_name','f_building','f_user_number']
362
+ var newtemp=[]
363
+
364
+ for (var i=0;i<temp.length;i++){
365
+ for (var j=0;j<this.nameForSql.length;j++){
366
+ //tag
367
+ if(temp[i]==this.nameForSql[j]){
368
+ newtemp.push(this.nameForSql[j])
369
+ }
370
+ }
371
+ }
372
+ let str = ''
373
+
374
+ for (var i=0;i < newtemp.length - 1; i++) {
375
+ str += newtemp[i] + ','
376
+ }
377
+ str += newtemp[i]
378
+ this.groupNameForSql = str.trim()
379
+ }
380
+ },
381
+ watch: {
382
+ // 'nameForSql' () {
383
+ //
384
+ // this.getGroupName1()
385
+ // },
386
+ 'nameForSql' () {
387
+ var e = document.createEvent("MouseEvents");
388
+ e.initEvent("click", true, true);
389
+ document.getElementById("btnaaa").dispatchEvent(e);
390
+ },
391
+ 'model.rows'(){
392
+ //tag
393
+ if(this.listflag){
394
+ return;
395
+ }
396
+ this.listflag=true
397
+ //tag
398
+ var temp=['f_plan_month','f_no_checkplan','f_residential_area','f_plan_name','f_building','f_user_number']
399
+ var newtemp=[]
400
+ for (var i=0;i<temp.length;i++){
401
+ for (var j=0;j<this.nameForSql.length;j++){
402
+ //tag
403
+ if(temp[i]==this.nameForSql[j]){
404
+ newtemp.push(this.nameForSql[j])
405
+ }
406
+ }
407
+ }
408
+ if((newtemp.includes('f_user_number')&&newtemp.length==2)||(!newtemp.includes('f_user_number')&&newtemp.length==1)){
409
+ return
410
+ }
411
+ var temp=JSON.parse(JSON.stringify(this.model.rows))
412
+
413
+ //遍历查询结果 为指定列增加样式
414
+ for (var i=0;i<newtemp.length-1;i++){
415
+ if(newtemp[i]=='f_user_number'){
416
+ return;
417
+ }
418
+ //tag
419
+ var ss=''
420
+ for (var j=0;j<temp.length;j++){
421
+ if(j>0&&i>0){
422
+ var flag=false
423
+ for(var t=i-1;t>-1;t--){
424
+ //tag
425
+ //tag
426
+ //tag
427
+ //tag
428
+ if(temp[j-1][newtemp[t]]!=temp[j][newtemp[t]]&&(temp[j][newtemp[t]] !=null && temp[j][newtemp[t]].indexOf('*&') )==-1){
429
+ flag=true
430
+ break
431
+ }
432
+ }
433
+ //tag
434
+ if(flag){
435
+ ss=temp[j][newtemp[i]]
436
+ continue
437
+ }
438
+ }
439
+ if(temp[j][newtemp[i]]==ss){
440
+ temp[j][newtemp[i]]=temp[j][newtemp[i]]+'*&'
441
+ }else {
442
+ ss=temp[j][newtemp[i]]
443
+ }
444
+ }
445
+ }
446
+ //tag
447
+ this.model.rows=JSON.parse(JSON.stringify(temp))
448
+ },
449
+ 'model.rows.length'() {
450
+ // 如果查询无结果,将合计置为0
451
+ if(this.model.rows.length < 1){
452
+ this.model.sums.f_plan_total = 0
453
+ this.model.sums.f_weijian = 0
454
+ this.model.sums.f_yijian = 0
455
+ this.model.sums.f_ruhu = 0
456
+ this.model.sums.f_buyu = 0
457
+ this.model.sums.f_jujian = 0
458
+ }
459
+ }
460
+ },
461
+ computed:{
462
+ exportParameter(){
463
+ // excel 导出条件拼接
464
+ return {
465
+ condition: this.$refs.paged.model.condition,
466
+ groupName: this.groupNameForSql
467
+ }
468
+ }
469
+ }
470
+ }
471
+ </script>
472
+
473
+ <style scoped>
474
+
475
+ .td-0{
476
+ border: 1px solid #000000;
477
+ }
478
+
479
+ .td-1{
480
+ border: none;
481
+ border-top: 1px solid #000000;
482
+ border-left: 1px solid #000000;
483
+ border-right: 1px solid #000000;
484
+ }
485
+
486
+ .td-2{
487
+ border: none;
488
+ border-left: 1px solid #000000;
489
+ border-right: 1px solid #000000;
490
+ }
491
+ .td-4{
492
+ border: none;
493
+ border-top: 1px solid #000000;
494
+ border-left: 1px solid #000000;
495
+ border-right: 1px solid #000000;
496
+ border-bottom: 1px solid #000000;
497
+ }
498
+ .td-3{
499
+ border: none;
500
+ border-left: 1px solid #000000;
501
+ border-right: 1px solid #000000;
502
+ border-bottom: 1px solid #000000;
503
+ }
504
+ </style>