manage-client 4.0.39 → 4.0.40

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.
@@ -1,361 +1,418 @@
1
- <template>
2
- <div id="unit" class="flex-row">
3
- <div class="basic-main" @keyup.enter="search">
4
- <div class="flex">
5
- <div style="flex:1;" class="flex" v-if="!show">
6
- <criteria-paged :model="model" v-ref:paged>
7
- <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
8
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
9
- <div class="row">
10
- <div class="col-sm-2 form-group">
11
- <label for="startDate" class="font_normal_body">开始日期</label>
12
- <datepicker id="startDate" placeholder="开始日期" style="width:60%"
13
- v-model="model.startDate"
14
- :value.sync="model.startDate"
15
- :format="'yyyy-MM-dd'"
16
- :show-reset-button="true"
17
- condition="f_band_time >= '{}'">
18
- </datepicker>
19
- </div>
20
- <div class="col-sm-2 form-group">
21
- <label for="endDate" class="font_normal_body">结束日期</label>
22
- <datepicker id="endDate" placeholder="结束日期" style="width:60%"
23
- v-model="model.endDate"
24
- :value.sync="model.endDate"
25
- :format="'yyyy-MM-dd'"
26
- :show-reset-button="true"
27
- condition="f_band_time <= '{}'">
28
- </datepicker>
29
- </div>
30
- <div class="col-sm-2 form-group">
31
- <label class="font_normal_body">客户编号</label>
32
- <input type="text" style="width:60%" class="input_search" v-model="model.f_userinfo_code"
33
- condition="f_userinfo_code = '{}' " placeholder="客户编号">
34
- </div>
35
- <div class="col-sm-2 form-group">
36
- <label class="font_normal_body">客户名称</label>
37
- <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
38
- condition="f_user_name like '%{}%'" placeholder="客户名称">
39
- </div>
40
- <div class="span" style="float:right;">
41
- <button class="button_search button_spacing" @click="search()">查询</button>
42
- <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
43
- <!--<button class="btn btn-default" @click="$parent.$parent.stamp()">打印</button>-->
44
-
45
- <export-excel :data="$parent.$parent.getCondition"
46
- :field="$parent.$parent.getExportField"
47
- sqlurl="api/af-revenue/logic/openapi/exportfile" sql-name="wechatQuery" template-name='微信查询导出'
48
- :choose-col="true"></export-excel>
49
-
50
- <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
51
- </div>
52
- </div>
53
- <div class="row" v-show="$parent.$parent.criteriaShow">
54
- <res-select-group :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes"></res-select-group>
55
- <div class="col-sm-2 form-group">
56
- <label class="font_normal_body">客户电话</label>
57
- <input type="text" style="width:60%" class="input_search" v-model="model.f_user_phone"
58
- condition="f_user_phone like '%{}%'" placeholder="客户电话">
59
- </div>
60
- <div class="col-sm-2 form-group">
61
- <label class="font_normal_body">客户地址</label>
62
- <input type="text" style="width:60%" class="input_search" v-model="model.f_address"
63
- condition="f_address like '%{}%'" placeholder='客户地址'>
64
- </div>
65
- <div class="col-sm-2 form-group" >
66
- <label class="font_normal_body">气表品牌</label>
67
- <v-select :value.sync="model.gasbrand" v-model="model.gasbrand"
68
- :options='$parent.$parent.meterbrands' placeholder='气表品牌' close-on-select
69
- v-model='$parent.$parent.gasbrand'
70
- condition="f_meter_brand = '{}'"
71
- ></v-select>
72
- </div>
73
- </div>
74
- </div>
75
- </criteria>
76
-
77
- <data-grid :model="model" partial='list' class="list_area table_sy" @dblclick="$parent.dblclick" v-ref:grid>
78
- <template partial='head'>
79
- <tr>
80
- <th>
81
- <nobr>客户编号</nobr>
82
- </th>
83
- <th>
84
- <nobr>客户名称</nobr>
85
- </th>
86
- <th>
87
- <nobr>气表品牌</nobr>
88
- </th>
89
- <th>
90
- <nobr>气表类型</nobr>
91
- </th>
92
- <th>
93
- <nobr>客户电话</nobr>
94
- </th>
95
- <th>
96
- <nobr>微信标识</nobr>
97
- </th>
98
- <th>
99
- <nobr>绑定状态</nobr>
100
- </th>
101
- <th>
102
- <nobr>客户地址</nobr>
103
- </th>
104
- <th>
105
- <nobr>操作</nobr>
106
- </th>
107
- </tr>
108
- </template>
109
- <template partial='body'>
110
- <td :class="'back-blue'" style="text-align: center;" >
111
- <nobr>
112
- {{row.f_userinfo_code}}
113
- </nobr> </td>
114
- <td :class="'back-blue'" style="text-align: center;">
115
- <nobr>{{row.f_user_name}}</nobr>
116
- </td>
117
- <td :class="'back-blue'" style="text-align: center;">
118
- <nobr>{{row.f_meter_brand}}</nobr>
119
- </td>
120
- <td :class="'back-blue'" style="text-align: center;">
121
- <nobr>{{row.f_meter_type}}</nobr>
122
- </td>
123
- <td :class="'back-blue'" style="text-align: center;">
124
- <nobr>{{row.f_user_phone}}</nobr>
125
- </td>
126
- <td :class="'back-blue'" style="text-align: center;">
127
- <nobr>{{row.f_open_id}}</nobr>
128
- </td>
129
- <td :class="'back-blue'" style="text-align: center;">
130
- <nobr>{{row.f_band_state}}</nobr>
131
- </td>
132
- <td :class="'back-blue'" style="text-align: center;">
133
- <nobr>{{row.f_address}}</nobr>
134
- </td>
135
- <td style="text-align: center;">
136
- <button type="button" name="button" class="btn btn-link"
137
- @click="$parent.$parent.$parent.wechatbing(row)">解绑
138
- </button>
139
- </td>
140
- </template>
141
- </data-grid>
142
- </criteria-paged>
143
- </div>
144
- </div>
145
- </div>
146
- </div>
147
- </template>
148
-
149
- <script>
150
- import {HttpResetClass, PagedList} from 'vue-client'
151
- import defaultPrint from '../config/DefaultPrint'
152
- import exportConfig from '../config/exportConfig'
153
-
154
- let readySomething = async function (self) {
155
-
156
-
157
- await self.$MagLoadParams.loadParam()
158
- await self.$LoadParams.loadParam(self.f_filialeid)
159
- self.loadMeterBooks()
160
- self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString() + ' 00:00:00'
161
- self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString() + ' 23:59:59'
162
- await self.$refs.paged.$refs.cri.search()
163
- // self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
164
-
165
- }
166
-
167
- export default {
168
- title: '微信绑定查询',
169
- data() {
170
- return {
171
- model: new PagedList('api/af-revenue/sql/wechatQuery', 20, {}),
172
- criteriaShow: false,
173
- orgCondtionStr: '',
174
- modelval: [],
175
- printshow: false,
176
- all: false,
177
- fields: {},
178
- meterbrands:[{label: '全部',value: ''}],
179
- thead: '',
180
- tfoot: '',
181
- area: [],
182
- //合计数据
183
- // sumsmodel: {},
184
- initres: {
185
- org:[this.$login.f.orgid],
186
- dep:[],
187
- user:[],
188
- },
189
- userdetail: {
190
- show: false,
191
- f_userinfo_code: '',
192
- f_filialeids: ''
193
- },
194
- show:false,
195
- rowdata:{},
196
- sliceArea: []
197
- }
198
- },
199
- ready() {
200
- readySomething(this).then(() => {
201
- this.$emit('ready')
202
- }).catch((error) => {
203
- this.$emit('error', error)
204
- })
205
- this.initAreas(this.$login.f.orgid)
206
- },
207
- methods: {
208
- loadMeterBooks(){
209
- let meterbrand = this.$GetSaleParam.getGasbrand()
210
- for(let row of meterbrand){
211
- this.meterbrands.push({label: row.label,value: row.value.f_meter_brand})
212
- }
213
- },
214
- //把数据库查询数据转换为下拉数据
215
- calculate(rows){
216
- let data = []
217
- rows.forEach((row, n) => {
218
- data[n] = {label: row.f_residential_area, value: row.id}
219
- })
220
- return data
221
- },
222
- search(){
223
- this.$refs.paged.$refs.cri.search()
224
- },
225
- wechatbing(row) {
226
- console.log('微信解绑用户', row)
227
- let param = {
228
- id: row.id
229
- }
230
- this.$resetpost('api/af-revenue/logic/wechatbind', {data: param}, {warnMsg: '确定对这条记录进行解绑吗?'}).then(() => {
231
- this.$refs.paged.$refs.cri.search()
232
- })
233
- },
234
- cancel(obj) {
235
- this.show = false
236
- },
237
- async initAreas (val) {
238
-
239
- if (val) {
240
- let getAllArea = await this.$resetpost('/rs/search', {
241
- source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
242
- userid: this.$login.f.id
243
- }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
244
-
245
- let arr = getAllArea.data.filter((res) => {
246
- return res.parentid == val
247
- })
248
- console.log('过滤之后的片区', arr)
249
- this.sliceArea = []
250
- this.sliceArea.push({label: "全部", value: ""})
251
- arr.forEach((res) => {
252
- this.sliceArea.push({label: res.name, value: res.name})
253
- })
254
- console.log(this.sliceArea)
255
- }
256
- },
257
- selfSearch(args) {
258
- if (!this.orgCondtionStr) {
259
- args.condition = `${args.condition}` + " and f_orgid = " + this.$login.f.orgid
260
- } else {
261
- args.condition = `${args.condition}` + this.orgCondtionStr
262
- }
263
- this.model.search(args.condition, args.model)
264
- },
265
- clear() {
266
- Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
267
- this.$refs.paged.$refs.cri.model[key] = []
268
- })
269
- },
270
- hidden() {
271
- this.criteriaShow = !this.criteriaShow
272
- },
273
- getRes(obj) {
274
- this.orgCondtionStr = obj
275
- },
276
- stamp() {
277
- this.all = false
278
- //默认选择要打印的列
279
- this.modelval = defaultPrint.config
280
- this.fields = this.getfield
281
- console.log('所有打印字段', this.fields)
282
- this.printshow = true
283
- this.put()
284
- },
285
- put() {
286
- // 对Modelval进行排序
287
- this.sortModelval()
288
- this.thead = `<tr><th colspan=${this.modelval.length}>用户查询统计报表</th></tr><tr>`
289
- for (let key of this.modelval) {
290
- this.thead += '<th>' + this.fields[key] + '</th>'
291
- }
292
- this.thead += '</tr>'
293
- },
294
- print() {
295
- this.$refs.print.PrintAsFile()
296
- this.printshow = false
297
- },
298
- close() {
299
- this.printshow = false
300
- },
301
- // 对选择的列进行排序
302
- sortModelval() {
303
- let sortModel = []
304
- Object.keys(this.fields).forEach((key) => {
305
- if (this.modelval.includes(key)) {
306
- sortModel.push(key)
307
- }
308
- })
309
- this.modelval = sortModel
310
- console.log('选择的打印的字段', this.modelval)
311
- },
312
- dblclick(row, index) {
313
- console.log('双击之后数据', row, index)
314
- this.userdetail.show = true
315
- this.userdetail.f_userinfo_code = row.f_userinfo_code
316
- this.userdetail.f_filialeids = row.f_filialeids
317
- }
318
- },
319
- watch: {
320
- 'all'(val) {
321
- if (val) {
322
- this.modelval = this.bodyData
323
- } else {
324
- this.modelval = defaultPrint.config
325
- this.put()
326
- }
327
- },
328
- 'modelval.length'() {
329
- this.put()
330
- },
331
- },
332
- computed: {
333
- authArr () {
334
- return this.$login.r ? this.$login.r : []
335
- },
336
-
337
- getCondition() {
338
- return {condition: `${this.$refs.paged.$refs.cri.condition}` + this.orgCondtionStr}
339
- },
340
- getfield() {
341
- let data = {}
342
- this.bodyData.forEach((value, index) => {
343
- data[this.bodyData[index]] = this.headData[index]
344
- })
345
- return data
346
- },
347
- getExportField() {
348
- return exportConfig.wechatConfig
349
- }
350
- }
351
- }
352
- </script>
353
- <style>
354
- .back-red{ /* 红色背景 */
355
- background-color: #F6C6CE;
356
- }
357
- .back-blue{ /* 蓝色背景 */
358
-
359
- }
360
- </style>
361
-
1
+ <template>
2
+ <div id="unit" class="flex-row">
3
+ <div class="basic-main" @keyup.enter="search">
4
+ <div class="flex">
5
+ <div style="flex:1;" class="flex" v-if="!show">
6
+ <criteria-paged :model="model" v-ref:paged>
7
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
8
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
9
+ <div class="row">
10
+ <div class="col-sm-2 form-group">
11
+ <label for="startDate" class="font_normal_body">开始日期</label>
12
+ <datepicker id="startDate" placeholder="开始日期" style="width:60%"
13
+ v-model="model.startDate"
14
+ :value.sync="model.startDate"
15
+ :format="'yyyy-MM-dd'"
16
+ :show-reset-button="true"
17
+ condition="f_band_time >= '{}'">
18
+ </datepicker>
19
+ </div>
20
+ <div class="col-sm-2 form-group">
21
+ <label for="endDate" class="font_normal_body">结束日期</label>
22
+ <datepicker id="endDate" placeholder="结束日期" style="width:60%"
23
+ v-model="model.endDate"
24
+ :value.sync="model.endDate"
25
+ :format="'yyyy-MM-dd'"
26
+ :show-reset-button="true"
27
+ condition="f_band_time <= '{}'">
28
+ </datepicker>
29
+ </div>
30
+ <div class="col-sm-2 form-group">
31
+ <label class="font_normal_body">客户编号</label>
32
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_userinfo_code"
33
+ condition="f_userinfo_code = '{}' " placeholder="客户编号">
34
+ </div>
35
+ <div class="col-sm-2 form-group">
36
+ <label class="font_normal_body">客户名称</label>
37
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
38
+ condition="f_user_name like '%{}%'" placeholder="客户名称">
39
+ </div>
40
+ <div class="span" style="float:right;">
41
+ <button class="button_search button_spacing" @click="search()">查询</button>
42
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
43
+ <!--<button class="btn btn-default" @click="$parent.$parent.stamp()">打印</button>-->
44
+
45
+ <export-excel :data="$parent.$parent.getCondition"
46
+ :field="$parent.$parent.getExportField"
47
+ sqlurl="api/af-revenue/logic/openapi/exportfile" sql-name="wechatQuery" template-name='微信查询导出'
48
+ :choose-col="true"></export-excel>
49
+
50
+ <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
51
+ </div>
52
+ </div>
53
+ <div class="row" v-show="$parent.$parent.criteriaShow">
54
+ <res-select-group :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes"></res-select-group>
55
+ <div class="col-sm-2 form-group">
56
+ <label class="font_normal_body">客户电话</label>
57
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_phone"
58
+ condition="f_user_phone like '%{}%'" placeholder="客户电话">
59
+ </div>
60
+ <div class="col-sm-2 form-group">
61
+ <label class="font_normal_body">客户地址</label>
62
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_address"
63
+ condition="f_address like '%{}%'" placeholder='客户地址'>
64
+ </div>
65
+ <div class="col-sm-2 form-group" >
66
+ <label class="font_normal_body">气表品牌</label>
67
+ <v-select :value.sync="model.gasbrand" v-model="model.gasbrand"
68
+ :options='$parent.$parent.meterbrands' placeholder='气表品牌' close-on-select
69
+ v-model='$parent.$parent.gasbrand'
70
+ condition="f_meter_brand = '{}'"
71
+ ></v-select>
72
+ </div>
73
+ <div class="col-sm-2 form-group">
74
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;小区&nbsp;&nbsp;&nbsp;</label>
75
+ <v-select :value.sync="model.f_residential_area"
76
+ class="select_list select"
77
+ v-model="model.f_residential_area"
78
+ style="width: 60%"
79
+ multiple
80
+ condition="f_residential_area in {}"
81
+ :options='$parent.$parent.residentialArea' placeholder='选择小区'
82
+ close-on-select>
83
+
84
+ </v-select>
85
+ </div>
86
+ <div class="col-sm-2 form-group">
87
+ <label class="font_normal_body">楼号</label>
88
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_building"
89
+ condition="f_building = '{}'" placeholder='楼号'>
90
+ </div>
91
+ <div class="col-sm-2 form-group">
92
+ <label class="font_normal_body">单元</label>
93
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_unit"
94
+ condition="f_unit = '{}'" placeholder='单元'>
95
+ </div>
96
+ <div class="col-sm-2 form-group">
97
+ <label class="font_normal_body">楼层</label>
98
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_floor"
99
+ condition="f_floor = '{}'" placeholder='楼层'>
100
+ </div>
101
+ <div class="col-sm-2 form-group">
102
+ <label class="font_normal_body">房间号</label>
103
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_room"
104
+ condition="f_room = '{}'" placeholder='房间号'>
105
+ </div>
106
+ </div>
107
+ </div>
108
+ </criteria>
109
+
110
+ <data-grid :model="model" partial='list' class="list_area table_sy" @dblclick="$parent.dblclick" v-ref:grid>
111
+ <template partial='head'>
112
+ <tr>
113
+ <th>
114
+ <nobr>客户编号</nobr>
115
+ </th>
116
+ <th>
117
+ <nobr>客户名称</nobr>
118
+ </th>
119
+ <th>
120
+ <nobr>气表品牌</nobr>
121
+ </th>
122
+ <th>
123
+ <nobr>气表类型</nobr>
124
+ </th>
125
+ <th>
126
+ <nobr>客户电话</nobr>
127
+ </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
+ </tr>
144
+ </template>
145
+ <template partial='body'>
146
+ <td :class="'back-blue'" style="text-align: center;" >
147
+ <nobr>
148
+ {{row.f_userinfo_code}}
149
+ </nobr> </td>
150
+ <td :class="'back-blue'" style="text-align: center;">
151
+ <nobr>{{row.f_user_name}}</nobr>
152
+ </td>
153
+ <td :class="'back-blue'" style="text-align: center;">
154
+ <nobr>{{row.f_meter_brand}}</nobr>
155
+ </td>
156
+ <td :class="'back-blue'" style="text-align: center;">
157
+ <nobr>{{row.f_meter_type}}</nobr>
158
+ </td>
159
+ <td :class="'back-blue'" style="text-align: center;">
160
+ <nobr>{{row.f_user_phone}}</nobr>
161
+ </td>
162
+ <td :class="'back-blue'" style="text-align: center;">
163
+ <nobr>{{row.f_open_id}}</nobr>
164
+ </td>
165
+ <td :class="'back-blue'" style="text-align: center;">
166
+ <nobr>{{row.f_band_state}}</nobr>
167
+ </td>
168
+ <td :class="'back-blue'" style="text-align: center;">
169
+ <nobr>{{row.f_residential_area}}</nobr>
170
+ </td>
171
+ <td :class="'back-blue'" style="text-align: center;">
172
+ <nobr>{{row.f_address}}</nobr>
173
+ </td>
174
+ <td style="text-align: center;">
175
+ <button type="button" name="button" class="btn btn-link"
176
+ @click="$parent.$parent.$parent.wechatbing(row)">解绑
177
+ </button>
178
+ </td>
179
+ </template>
180
+ </data-grid>
181
+ </criteria-paged>
182
+ </div>
183
+ </div>
184
+ </div>
185
+ </div>
186
+ </template>
187
+
188
+ <script>
189
+ import {HttpResetClass, PagedList} from 'vue-client'
190
+ import defaultPrint from '../config/DefaultPrint'
191
+ import exportConfig from '../config/exportConfig'
192
+
193
+ let readySomething = async function (self) {
194
+
195
+
196
+ await self.$MagLoadParams.loadParam()
197
+ await self.$LoadParams.loadParam(self.f_filialeid)
198
+ self.loadMeterBooks()
199
+ self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString() + ' 00:00:00'
200
+ self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString() + ' 23:59:59'
201
+ await self.$refs.paged.$refs.cri.search()
202
+ // self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
203
+
204
+ }
205
+
206
+ export default {
207
+ title: '微信绑定查询',
208
+ data() {
209
+ return {
210
+ model: new PagedList('api/af-revenue/sql/wechatQuery', 20, {}),
211
+ criteriaShow: false,
212
+ orgCondtionStr: '',
213
+ modelval: [],
214
+ residentialArea: [],
215
+ printshow: false,
216
+ all: false,
217
+ fields: {},
218
+ meterbrands:[{label: '全部',value: ''}],
219
+ thead: '',
220
+ tfoot: '',
221
+ area: [],
222
+ //合计数据
223
+ // sumsmodel: {},
224
+ initres: {
225
+ org:[this.$login.f.orgid],
226
+ dep:[],
227
+ user:[],
228
+ },
229
+ userdetail: {
230
+ show: false,
231
+ f_userinfo_code: '',
232
+ f_filialeids: ''
233
+ },
234
+ show:false,
235
+ rowdata:{},
236
+ sliceArea: []
237
+ }
238
+ },
239
+ ready() {
240
+ this.getaddress()
241
+ readySomething(this).then(() => {
242
+ this.$emit('ready')
243
+ }).catch((error) => {
244
+ this.$emit('error', error)
245
+ })
246
+ this.initAreas(this.$login.f.orgid)
247
+ },
248
+ methods: {
249
+ loadMeterBooks(){
250
+ let meterbrand = this.$GetSaleParam.getGasbrand()
251
+ for(let row of meterbrand){
252
+ this.meterbrands.push({label: row.label,value: row.value.f_meter_brand})
253
+ }
254
+ },
255
+ async getaddress(){
256
+ console.log('开始获取小区')
257
+ let HttpReset = new HttpResetClass()
258
+ var data = await HttpReset.load('POST', 'api/af-revenue/sql/manage_getarealist', {
259
+ data: {
260
+ condition: `1=1 and s.f_filialeid = '${this.$login.f.orgid}'`
261
+ }
262
+ }, {resolveMsg: null, rejectMsg: '获取小区失败!'})
263
+ console.log('小区',data)
264
+ let house = []
265
+ for (let row of data.data){
266
+ console.log('开始保存小区')
267
+ house.push({label: row.f_residential_area, value: row.f_residential_area})
268
+ }
269
+ this.residentialArea = house
270
+ },
271
+ //把数据库查询数据转换为下拉数据
272
+ calculate(rows){
273
+ let data = []
274
+ rows.forEach((row, n) => {
275
+ data[n] = {label: row.f_residential_area, value: row.id}
276
+ })
277
+ return data
278
+ },
279
+ search(){
280
+ this.$refs.paged.$refs.cri.search()
281
+ },
282
+ wechatbing(row) {
283
+ console.log('微信解绑用户', row)
284
+ let param = {
285
+ id: row.id
286
+ }
287
+ this.$resetpost('api/af-revenue/logic/wechatbind', {data: param}, {warnMsg: '确定对这条记录进行解绑吗?'}).then(() => {
288
+ this.$refs.paged.$refs.cri.search()
289
+ })
290
+ },
291
+ cancel(obj) {
292
+ this.show = false
293
+ },
294
+ async initAreas (val) {
295
+
296
+ if (val) {
297
+ let getAllArea = await this.$resetpost('/rs/search', {
298
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
299
+ userid: this.$login.f.id
300
+ }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
301
+
302
+ let arr = getAllArea.data.filter((res) => {
303
+ return res.parentid == val
304
+ })
305
+ console.log('过滤之后的片区', arr)
306
+ this.sliceArea = []
307
+ this.sliceArea.push({label: "全部", value: ""})
308
+ arr.forEach((res) => {
309
+ this.sliceArea.push({label: res.name, value: res.name})
310
+ })
311
+ console.log(this.sliceArea)
312
+ }
313
+ },
314
+ selfSearch(args) {
315
+ if (!this.orgCondtionStr) {
316
+ args.condition = `${args.condition}` + " and f_orgid = " + this.$login.f.orgid
317
+ } else {
318
+ args.condition = `${args.condition}` + this.orgCondtionStr
319
+ }
320
+ this.model.search(args.condition, args.model)
321
+ },
322
+ clear() {
323
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
324
+ this.$refs.paged.$refs.cri.model[key] = []
325
+ })
326
+ },
327
+ hidden() {
328
+ this.criteriaShow = !this.criteriaShow
329
+ },
330
+ getRes(obj) {
331
+ this.orgCondtionStr = obj
332
+ },
333
+ stamp() {
334
+ this.all = false
335
+ //默认选择要打印的列
336
+ this.modelval = defaultPrint.config
337
+ this.fields = this.getfield
338
+ console.log('所有打印字段', this.fields)
339
+ this.printshow = true
340
+ this.put()
341
+ },
342
+ put() {
343
+ // 对Modelval进行排序
344
+ this.sortModelval()
345
+ this.thead = `<tr><th colspan=${this.modelval.length}>用户查询统计报表</th></tr><tr>`
346
+ for (let key of this.modelval) {
347
+ this.thead += '<th>' + this.fields[key] + '</th>'
348
+ }
349
+ this.thead += '</tr>'
350
+ },
351
+ print() {
352
+ this.$refs.print.PrintAsFile()
353
+ this.printshow = false
354
+ },
355
+ close() {
356
+ this.printshow = false
357
+ },
358
+ // 对选择的列进行排序
359
+ sortModelval() {
360
+ let sortModel = []
361
+ Object.keys(this.fields).forEach((key) => {
362
+ if (this.modelval.includes(key)) {
363
+ sortModel.push(key)
364
+ }
365
+ })
366
+ this.modelval = sortModel
367
+ console.log('选择的打印的字段', this.modelval)
368
+ },
369
+ dblclick(row, index) {
370
+ console.log('双击之后数据', row, index)
371
+ this.userdetail.show = true
372
+ this.userdetail.f_userinfo_code = row.f_userinfo_code
373
+ this.userdetail.f_filialeids = row.f_filialeids
374
+ }
375
+ },
376
+ watch: {
377
+ 'all'(val) {
378
+ if (val) {
379
+ this.modelval = this.bodyData
380
+ } else {
381
+ this.modelval = defaultPrint.config
382
+ this.put()
383
+ }
384
+ },
385
+ 'modelval.length'() {
386
+ this.put()
387
+ },
388
+ },
389
+ computed: {
390
+ authArr () {
391
+ return this.$login.r ? this.$login.r : []
392
+ },
393
+
394
+ getCondition() {
395
+ return {condition: `${this.$refs.paged.$refs.cri.condition}` + this.orgCondtionStr}
396
+ },
397
+ getfield() {
398
+ let data = {}
399
+ this.bodyData.forEach((value, index) => {
400
+ data[this.bodyData[index]] = this.headData[index]
401
+ })
402
+ return data
403
+ },
404
+ getExportField() {
405
+ return exportConfig.wechatConfig
406
+ }
407
+ }
408
+ }
409
+ </script>
410
+ <style>
411
+ .back-red{ /* 红色背景 */
412
+ background-color: #F6C6CE;
413
+ }
414
+ .back-blue{ /* 蓝色背景 */
415
+
416
+ }
417
+ </style>
418
+