manage-client 3.2.10-aode → 3.2.10-test-aode

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,482 +1,497 @@
1
- <template>
2
- <div id="unit" class="flex-row">
3
- <div class="basic-main">
4
- <div class="flex" v-if="!showinfo">
5
-
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 class="font_normal_body">公&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;司</label>
12
- <res-select :initresid="$parent.$parent.orgid"
13
- style="width:60%"
14
- @res-select="$parent.$parent.getRes"
15
- restype='organization'>
16
- </res-select>
17
- </div>
18
- <div class="col-sm-2 form-group">
19
- <label class="font_normal_body">客户编号</label>
20
- <input type="text" style="width:60%" class="input_search" v-model="model.f_userinfo_code"
21
- condition="f_userinfo_code = '{}' " placeholder="客户编号">
22
- </div>
23
- <div class="col-sm-2 form-group">
24
- <label for="startDate" class="font_normal_body">开始日期</label>
25
- <datepicker id="startDate" placeholder="开始日期" style="width:60%"
26
- v-model="model.startDate"
27
- :value.sync="model.startDate"
28
- :format="'yyyy-MM-dd'"
29
- :show-reset-button="true"
30
- condition="f_open_date >= '{} 00:00:00'">
31
- </datepicker>
32
- </div>
33
- <div class="col-sm-2 form-group">
34
- <label for="endDate" class="font_normal_body">结束日期</label>
35
- <datepicker id="endDate" placeholder="结束日期" style="width:60%"
36
- v-model="model.endDate"
37
- :value.sync="model.endDate"
38
- :format="'yyyy-MM-dd'"
39
- :show-reset-button="true"
40
- condition="f_open_date <= '{} 23:59:59'">
41
- </datepicker>
42
- </div>
43
-
44
- <div class="span" style="float:right;">
45
- <button class="button_search button_spacing" @click="search()">查询</button>
46
- <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
47
- <!--<button class="btn btn-default" @click="$parent.$parent.stamp()">打印</button>-->
48
-
49
- <export-excel-plus :data="$parent.$parent.getCondition" :defaultselect="$parent.$parent.selectfields"
50
- :field="$parent.$parent.getfield"
51
- sqlurl="rs/logic/exportfileplus" sql-name="newAccountQuery" template-name='开户查询导出'
52
- :choose-col="true"></export-excel-plus>
53
-
54
- <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>
55
- </div>
56
- </div>
57
- <div class="row" v-show="$parent.$parent.criteriaShow">
58
- <div class="col-sm-2 form-group">
59
- <label class="font_normal_body">客户名称</label>
60
- <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
61
- condition="f_user_name like '%{}%'" placeholder="客户名称">
62
- </div>
63
- <div class="col-sm-2 form-group">
64
- <label class="font_normal_body">用气性质</label>
65
- <v-select :value.sync="model.f_gasproperties" :multiple="true"
66
- v-model="model.f_gasproperties"
67
- :options='$parent.$parent.newuseroptiones' placeholder='请选择'
68
- condition=" f_gasproperties in {}"
69
- close-on-select></v-select>
70
- </div>
71
- <div class="col-sm-2 form-group">
72
- <label class="font_normal_body">气表品牌</label>
73
- <v-select :value.sync="model.f_meter_brand"
74
- v-model="model.f_meter_brand"
75
- :options='$parent.$parent.meterbrands' placeholder='请选择'
76
- condition="f_meter_brand = '{}'"
77
- close-on-select></v-select>
78
- </div>
79
- <div class="col-sm-2 form-group">
80
- <label class="font_normal_body">用户状态</label>
81
- <v-select :value.sync="model.f_user_state"
82
- v-model="model.f_user_state"
83
- :options='$parent.$parent.getusertypes' placeholder='请选择'
84
- condition="f_user_state = '{}'"
85
- close-on-select></v-select>
86
- </div>
87
- <div class="col-sm-2 form-group">
88
- <label class="font_normal_body">表具状态</label>
89
- <v-select :value.sync="model.f_table_state"
90
- v-model="model.f_table_state"
91
- :options='$parent.$parent.gettabletypes' placeholder='请选择'
92
- condition="f_table_state = '{}'"
93
- close-on-select></v-select>
94
- </div>
95
- <div class="col-sm-2 form-group">
96
- <label class="font_normal_body">是否黑名单</label>
97
- <v-select :value.sync="model.f_user_back"
98
- v-model="model.f_user_back"
99
- :options='$parent.$parent.backstates' placeholder='请选择'
100
- condition="f_user_back = '{}'"
101
- close-on-select></v-select>
102
- </div>
103
- <div class="col-sm-2 form-group">
104
- <label class="font_normal_body">是否置换</label>
105
- <v-select :value.sync="model.f_substite"
106
- v-model="model.f_substite"
107
- :options='$parent.$parent.backstates' placeholder='请选择'
108
- condition="f_substite = '{}'"
109
- close-on-select></v-select>
110
- </div>
111
- <div class="col-sm-2 form-group">
112
- <label class="font_normal_body">是否已缴费</label>
113
- <v-select :value.sync="model.sellnum"
114
- v-model="model.sellnum"
115
- :options='$parent.$parent.sellnumoptions' placeholder='请选择'
116
- condition=" {} "
117
- close-on-select></v-select>
118
- </div>
119
- <div class="col-sm-4 form-group">
120
- <label class="font_normal_body">客户地址</label>
121
- <input type="text" style="width:80%" class="input_search" v-model="model.f_address"
122
- condition="f_address like '%{}%' " placeholder="客户地址">
123
- </div>
124
- </div>
125
-
126
- </div>
127
- </criteria>
128
-
129
- <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
130
- <template partial='head'>
131
- <tr>
132
- <th>
133
- <nobr>客户编号</nobr>
134
- </th>
135
- <th>
136
- <nobr>客户名称</nobr>
137
- </th>
138
- <th>
139
- <nobr>用户状态</nobr>
140
- </th>
141
- <th>
142
- <nobr>表具状态</nobr>
143
- </th>
144
- <th>
145
- <nobr>客户地址</nobr>
146
- </th>
147
- <th>
148
- <nobr>客户电话</nobr>
149
- </th>
150
- <th>
151
- <nobr>身份证号</nobr>
152
- </th>
153
- <th>
154
- <nobr>气价名称</nobr>
155
- </th>
156
- <th>
157
- <nobr>开户时间</nobr>
158
- </th>
159
- <th>
160
- <nobr>表号</nobr>
161
- </th>
162
- <th>
163
- <nobr>置换员</nobr>
164
- </th>
165
- <th>
166
- <nobr>当前表通气时间</nobr>
167
- </th>
168
- <th>
169
- <nobr>用气性质</nobr>
170
- </th>
171
- <th>
172
- <nobr>累购气量</nobr>
173
- </th>
174
- <th>
175
- <nobr>气表品牌</nobr>
176
- </th>
177
- <th>
178
- <nobr>是否有壁挂炉</nobr>
179
- </th>
180
- <th>
181
- <nobr>是否有热水器</nobr>
182
- </th>
183
- <th>
184
- <nobr>是否黑名单</nobr>
185
- </th>
186
- <th>
187
- <nobr>是否置换</nobr>
188
- </th>
189
- <th>
190
- <nobr>最后一次安检时间</nobr>
191
- </th>
192
- <th>
193
- <nobr>销户人</nobr>
194
- </th>
195
- <th>
196
- <nobr>销户时间</nobr>
197
- </th>
198
- <th>
199
- <nobr>销户原因</nobr>
200
- </th>
201
- <th>
202
- <nobr>所属公司</nobr>
203
- </th>
204
- </tr>
205
- </template>
206
- <template partial='body'>
207
- <td style="text-align: center;">
208
- <span @click="$parent.$parent.$parent.showmsg(row)"><a>{{row.f_userinfo_code}}</a></span>
209
- </td>
210
- <td style="text-align: center;">
211
- <nobr>{{row.f_user_name}}</nobr>
212
- </td>
213
- <td style="text-align: center;">
214
- <nobr>{{row.f_user_state}}</nobr>
215
- </td>
216
- <td style="text-align: center;">
217
- <nobr>{{row.f_table_state}}</nobr>
218
- </td>
219
- <td style="text-align: center;">
220
- <nobr>{{row.f_address}}</nobr>
221
- </td>
222
- <td style="text-align: center;">
223
- <nobr>{{row.f_user_phone}}</nobr>
224
- </td>
225
- <td style="text-align: center;">
226
- <nobr>{{row.f_idnumber}}</nobr>
227
- </td>
228
- <td style="text-align: center;">
229
- <nobr>{{row.f_price_name}}</nobr>
230
- </td>
231
- <td style="text-align: center;">
232
- <nobr>{{row.f_open_date}}</nobr>
233
- </td>
234
- <td style="text-align: center;">
235
- <nobr>{{row.f_meternumber}}</nobr>
236
- </td>
237
- <td style="text-align: center;">
238
- <nobr>{{row.f_gas_person}}</nobr>
239
- </td>
240
- <td style="text-align: center;">
241
- <nobr>{{row.f_gas_date}}</nobr>
242
- </td>
243
- <td style="text-align: center;">
244
- <nobr>{{row.f_gasproperties}}</nobr>
245
- </td>
246
- <td style="text-align: center;">
247
- <nobr>{{row.f_total_gas}}</nobr>
248
- </td>
249
- <td style="text-align: center;">
250
- <nobr>{{row.f_meter_brand}}</nobr>
251
- </td>
252
- <td style="text-align: center;">
253
- <nobr>{{row.isbgl}}</nobr>
254
- </td>
255
- <td style="text-align: center;">
256
- <nobr>{{row.ishot}}</nobr>
257
- </td>
258
- <td style="text-align: center;">
259
- <nobr>{{row.f_user_back}}</nobr>
260
- </td>
261
- <td style="text-align: center;">
262
- <nobr>{{row.f_substite}}</nobr>
263
- </td>
264
- <td style="text-align: center;">
265
- <nobr>{{row.f_check_time}}</nobr>
266
- </td>
267
- <td style="text-align: center;">
268
- <nobr>{{row.f_canceloperator}}</nobr>
269
- </td>
270
- <td style="text-align: center;">
271
- <nobr>{{row.f_canceltime}}</nobr>
272
- </td>
273
- <td style="text-align: center;">
274
- <nobr>{{row.f_cancelreason}}</nobr>
275
- </td>
276
- <td style="text-align: center;">
277
- <nobr>{{row.f_orgname}}</nobr>
278
- </td>
279
- </template>
280
- <template partial='foot'></template>
281
- </data-grid>
282
- </criteria-paged>
283
- </div>
284
- <div v-if="showinfo">
285
- <user-info-detail-manage :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage>
286
- </div>
287
- </div>
288
- </div>
289
- </template>
290
-
291
- <script>
292
- import {PagedList} from 'vue-client'
293
- import defaultPrint from '../config/DefaultPrint'
294
- import exportConfig from '../config/exportConfig'
295
- import plugins from '../../../plugins/GetLoginInfoService'
296
-
297
- let readySomething = async function (self) {
298
- self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString()
299
- self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString()
300
- // await self.$refs.paged.$refs.cri.search()
301
- await self.$MagLoadParams.loadParam()
302
- self.initParams()
303
-
304
- self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
305
- }
306
- export default {
307
- title: '开户统计',
308
- data() {
309
- return {
310
- data: {},
311
- orgid:[this.$login.f.orgid],
312
- model: new PagedList('rs/sql/newAccountQuery', 20),
313
- f_orgid: this.$login.f.orgid,
314
- criteriaShow: false,
315
- modelval: [],
316
- printshow: false,
317
- all: false,
318
- fields: {},
319
- thead: '',
320
- tfoot: '',
321
- orgCondtionStr: '(' + this.$login.f.orgid + ')',
322
- // orgCondtionStr: ` and f_orgid = '${this.$login.f.orgid}'`,
323
- meterbrands: [],
324
- showinfo:false,
325
- rowdata:{},
326
- //合计数据
327
- sumsmodel: {},
328
- newuseroptiones:[{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')],
329
- selectfields:[],
330
- backstates:[{label: '全部', value: ''},{label: '是', value: '是'},{label: '否', value: '否'}],
331
- gaspropertyTypes: [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')],
332
- getusertypes: [{label: '全部', value: ''}, ...this.$appdata.getParam('用户状态')],
333
- gettabletypes: [{label: '全部', value: ''}, ...this.$appdata.getParam('表具状态')],
334
- sellnumoptions:[{label: '全部', value: ''},{label:'是',value:'sellnum>0'},{label:'否',value:'sellnum=0'}]
335
- }
336
- },
337
- props:['selectorg'],
338
- ready() {
339
- if(this.selectorg != null && this.selectorg != null != ''){
340
- this.initres.org=[]
341
- this.initres.org.push(this.selectorg);
342
- }
343
- readySomething(this).then(() => {
344
- this.$emit('ready')
345
- }).catch((error) => {
346
- this.$emit('error', error)
347
- })
348
- for(var item in exportConfig.NewAccountConfig){
349
- this.selectfields.push(item)
350
- }
351
- },
352
- methods: {
353
- cancel() {
354
- this.showinfo = false
355
- },
356
- getRes (obj) {
357
- this.orgCondtionStr = plugins.convertToIn(obj)
358
- },
359
-
360
- selfSearch(args) {
361
- if (this.orgCondtionStr)
362
- args.condition = `${args.condition}` + 'and f_filialeid in ' + this.orgCondtionStr
363
- else
364
- args.condition = `${args.condition}` + 'and f_filialeid in ' + '(' + this.$login.f.orgid + ')'
365
- this.model.search(args.condition, args.model)
366
- },
367
- showmsg(obj){
368
- this.rowdata=obj
369
- this.showinfo=true
370
- },
371
- initParams() {
372
- // 初始化气表品牌
373
- let brandArr = []
374
- this.$MagGetSaleParam.getGasbrand().forEach((item) => {
375
- let temp = {}
376
- temp.label = item.label
377
- temp.value = item.value.f_meter_brand
378
- brandArr.push(temp)
379
- })
380
- this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
381
- },
382
-
383
- clear() {
384
- Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
385
- this.$refs.paged.$refs.cri.model[key] = ''
386
- })
387
- },
388
- show() {
389
- this.criteriaShow = true
390
- },
391
- hidden() {
392
- this.criteriaShow = !this.criteriaShow
393
- },
394
- dealmsg(val) {
395
- console.log('---------------dealmsg')
396
- this.rowdata=val
397
- this.show=true
398
- val.model = this.model.model
399
- this.$dispatch('deal-msg', val)
400
- },
401
- stamp() {
402
- this.all = false
403
- //默认选择要打印的列
404
- this.modelval = defaultPrint.config
405
- this.fields = this.getfield
406
- console.log('所有打印字段', this.fields)
407
- this.printshow = true
408
- this.put()
409
- },
410
- put() {
411
- // 对Modelval进行排序
412
- this.sortModelval()
413
- this.thead = `<tr><th colspan=${this.modelval.length}>补卡查询统计报表</th></tr><tr>`
414
- for (let key of this.modelval) {
415
- this.thead += '<th>' + this.fields[key] + '</th>'
416
- }
417
- this.thead += '</tr>'
418
- },
419
- print() {
420
- this.$refs.print.PrintAsFile()
421
- this.printshow = false
422
- },
423
- close() {
424
- this.printshow = false
425
- this.all = false
426
- },
427
- // 对选择的列进行排序
428
- sortModelval() {
429
- let sortModel = []
430
- Object.keys(this.fields).forEach((key) => {
431
- if (this.modelval.includes(key)) {
432
- sortModel.push(key)
433
- }
434
- })
435
- this.modelval = sortModel
436
- console.log('选择的打印的字段', this.modelval)
437
- },
438
- async updateParams() {
439
- await this.$MagLoadParams.loadParam(this.f_filialeid)
440
- this.initParams()
441
- }
442
- },
443
- watch: {
444
- 'all'(val) {
445
- if (val) {
446
- this.modelval = this.bodyData
447
- } else {
448
- this.modelval = defaultPrint.config
449
- this.put()
450
- }
451
- },
452
- 'modelval.length'() {
453
- this.put()
454
- },
455
- 'orgCondtionStr'(val) {
456
- let res = val.match(/'(.*?)'/)
457
- console.log('正则提取:',res && res[1])
458
- if (res) {
459
- this.selectorg = res[1]
460
- }
461
- }
462
-
463
- },
464
- computed: {
465
- getCondition () {
466
- var con = ""
467
- if (this.orgCondtionStr) {
468
- con = `${this.$refs.paged.$refs.cri.condition} and f_filialeid in ${this.orgCondtionStr}`
469
- }
470
- else {
471
- con = `${this.$refs.paged.$refs.cri.condition}and f_filialeid in ('${this.$login.f.orgid}' )`
472
- }
473
- return {
474
- condition: con
475
- }
476
- },
477
- getfield() {
478
- return exportConfig.NewAccountConfig
479
- }
480
- }
481
- }
482
- </script>
1
+ <template>
2
+ <div id="unit" class="flex-row">
3
+ <div class="basic-main">
4
+ <div class="flex" v-if="!showinfo">
5
+
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 class="font_normal_body">公&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;司</label>
12
+ <res-select :initresid="$parent.$parent.orgid"
13
+ style="width:60%"
14
+ @res-select="$parent.$parent.getRes"
15
+ restype='organization'>
16
+ </res-select>
17
+ </div>
18
+ <div class="col-sm-2 form-group">
19
+ <label class="font_normal_body">客户编号</label>
20
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_userinfo_code"
21
+ condition="f_userinfo_code = '{}' " placeholder="客户编号">
22
+ </div>
23
+ <div class="col-sm-2 form-group">
24
+ <label for="startDate" class="font_normal_body">开始日期</label>
25
+ <datepicker id="startDate" placeholder="开始日期" style="width:60%"
26
+ v-model="model.startDate"
27
+ :value.sync="model.startDate"
28
+ :format="'yyyy-MM-dd'"
29
+ :show-reset-button="true"
30
+ condition="f_open_date >= '{} 00:00:00'">
31
+ </datepicker>
32
+ </div>
33
+ <div class="col-sm-2 form-group">
34
+ <label for="endDate" class="font_normal_body">结束日期</label>
35
+ <datepicker id="endDate" placeholder="结束日期" style="width:60%"
36
+ v-model="model.endDate"
37
+ :value.sync="model.endDate"
38
+ :format="'yyyy-MM-dd'"
39
+ :show-reset-button="true"
40
+ condition="f_open_date <= '{} 23:59:59'">
41
+ </datepicker>
42
+ </div>
43
+
44
+ <div class="span" style="float:right;">
45
+ <button class="button_search button_spacing" @click="search()">查询</button>
46
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
47
+ <!--<button class="btn btn-default" @click="$parent.$parent.stamp()">打印</button>-->
48
+
49
+ <export-excel-plus :data="$parent.$parent.getCondition" :defaultselect="$parent.$parent.selectfields"
50
+ :field="$parent.$parent.getfield"
51
+ sqlurl="rs/logic/exportfileplus" sql-name="newAccountQuery" template-name='开户查询导出'
52
+ :choose-col="true"></export-excel-plus>
53
+
54
+ <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>
55
+ </div>
56
+ </div>
57
+ <div class="row" v-show="$parent.$parent.criteriaShow">
58
+ <div class="col-sm-2 form-group">
59
+ <label class="font_normal_body">客户名称</label>
60
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
61
+ condition="f_user_name like '%{}%'" placeholder="客户名称">
62
+ </div>
63
+ <div class="col-sm-2 form-group">
64
+ <label class="font_normal_body">用气性质</label>
65
+ <v-select :value.sync="model.f_gasproperties" :multiple="true"
66
+ v-model="model.f_gasproperties"
67
+ :options='$parent.$parent.newuseroptiones' placeholder='请选择'
68
+ condition=" f_gasproperties in {}"
69
+ close-on-select></v-select>
70
+ </div>
71
+ <div class="col-sm-2">
72
+ <label class="font_normal_body">气表分类</label>
73
+ <v-select :value.sync="model.f_meter_classify"
74
+ v-model="model.f_meter_classify"
75
+ :options='$parent.$parent.metertypes' placeholder='请选择'
76
+ condition="f_meter_classify = '{}'"
77
+ close-on-select></v-select>
78
+ </div>
79
+ <div class="col-sm-2 form-group">
80
+ <label class="font_normal_body">气表品牌</label>
81
+ <v-select :value.sync="model.f_meter_brand"
82
+ v-model="model.f_meter_brand"
83
+ :options='$parent.$parent.meterbrands' placeholder='请选择'
84
+ condition="f_meter_brand = '{}'"
85
+ close-on-select></v-select>
86
+ </div>
87
+ <div class="col-sm-2 form-group">
88
+ <label class="font_normal_body">用户状态</label>
89
+ <v-select :value.sync="model.f_user_state"
90
+ v-model="model.f_user_state"
91
+ :options='$parent.$parent.getusertypes' placeholder='请选择'
92
+ condition="f_user_state = '{}'"
93
+ close-on-select></v-select>
94
+ </div>
95
+ <div class="col-sm-2 form-group">
96
+ <label class="font_normal_body">表具状态</label>
97
+ <v-select :value.sync="model.f_table_state"
98
+ v-model="model.f_table_state"
99
+ :options='$parent.$parent.gettabletypes' placeholder='请选择'
100
+ condition="f_table_state = '{}'"
101
+ close-on-select></v-select>
102
+ </div>
103
+ <div class="col-sm-2 form-group">
104
+ <label class="font_normal_body">是否黑名单</label>
105
+ <v-select :value.sync="model.f_user_back"
106
+ v-model="model.f_user_back"
107
+ :options='$parent.$parent.backstates' placeholder='请选择'
108
+ condition="f_user_back = '{}'"
109
+ close-on-select></v-select>
110
+ </div>
111
+ <div class="col-sm-2 form-group">
112
+ <label class="font_normal_body">是否置换</label>
113
+ <v-select :value.sync="model.f_substite"
114
+ v-model="model.f_substite"
115
+ :options='$parent.$parent.backstates' placeholder='请选择'
116
+ condition="f_substite = '{}'"
117
+ close-on-select></v-select>
118
+ </div>
119
+ <div class="col-sm-2 form-group">
120
+ <label class="font_normal_body">是否已缴费</label>
121
+ <v-select :value.sync="model.sellnum"
122
+ v-model="model.sellnum"
123
+ :options='$parent.$parent.sellnumoptions' placeholder='请选择'
124
+ condition=" {} "
125
+ close-on-select></v-select>
126
+ </div>
127
+ <div class="col-sm-4 form-group">
128
+ <label class="font_normal_body">客户地址</label>
129
+ <input type="text" style="width:80%" class="input_search" v-model="model.f_address"
130
+ condition="f_address like '%{}%' " placeholder="客户地址">
131
+ </div>
132
+ </div>
133
+
134
+ </div>
135
+ </criteria>
136
+
137
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
138
+ <template partial='head'>
139
+ <tr>
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
+ <th>
153
+ <nobr>客户地址</nobr>
154
+ </th>
155
+ <th>
156
+ <nobr>客户电话</nobr>
157
+ </th>
158
+ <th>
159
+ <nobr>身份证号</nobr>
160
+ </th>
161
+ <th>
162
+ <nobr>气价名称</nobr>
163
+ </th>
164
+ <th>
165
+ <nobr>开户时间</nobr>
166
+ </th>
167
+ <th>
168
+ <nobr>表号</nobr>
169
+ </th>
170
+ <th>
171
+ <nobr>置换员</nobr>
172
+ </th>
173
+ <th>
174
+ <nobr>当前表通气时间</nobr>
175
+ </th>
176
+ <th>
177
+ <nobr>用气性质</nobr>
178
+ </th>
179
+ <th>
180
+ <nobr>累购气量</nobr>
181
+ </th>
182
+ <th>
183
+ <nobr>气表类型</nobr>
184
+ </th>
185
+ <th>
186
+ <nobr>气表品牌</nobr>
187
+ </th>
188
+ <th>
189
+ <nobr>是否有壁挂炉</nobr>
190
+ </th>
191
+ <th>
192
+ <nobr>是否有热水器</nobr>
193
+ </th>
194
+ <th>
195
+ <nobr>是否黑名单</nobr>
196
+ </th>
197
+ <th>
198
+ <nobr>是否置换</nobr>
199
+ </th>
200
+ <th>
201
+ <nobr>最后一次安检时间</nobr>
202
+ </th>
203
+ <th>
204
+ <nobr>销户人</nobr>
205
+ </th>
206
+ <th>
207
+ <nobr>销户时间</nobr>
208
+ </th>
209
+ <th>
210
+ <nobr>销户原因</nobr>
211
+ </th>
212
+ <th>
213
+ <nobr>所属公司</nobr>
214
+ </th>
215
+ </tr>
216
+ </template>
217
+ <template partial='body'>
218
+ <td style="text-align: center;">
219
+ <span @click="$parent.$parent.$parent.showmsg(row)"><a>{{row.f_userinfo_code}}</a></span>
220
+ </td>
221
+ <td style="text-align: center;">
222
+ <nobr>{{row.f_user_name}}</nobr>
223
+ </td>
224
+ <td style="text-align: center;">
225
+ <nobr>{{row.f_user_state}}</nobr>
226
+ </td>
227
+ <td style="text-align: center;">
228
+ <nobr>{{row.f_table_state}}</nobr>
229
+ </td>
230
+ <td style="text-align: center;">
231
+ <nobr>{{row.f_address}}</nobr>
232
+ </td>
233
+ <td style="text-align: center;">
234
+ <nobr>{{row.f_user_phone}}</nobr>
235
+ </td>
236
+ <td style="text-align: center;">
237
+ <nobr>{{row.f_idnumber}}</nobr>
238
+ </td>
239
+ <td style="text-align: center;">
240
+ <nobr>{{row.f_price_name}}</nobr>
241
+ </td>
242
+ <td style="text-align: center;">
243
+ <nobr>{{row.f_open_date}}</nobr>
244
+ </td>
245
+ <td style="text-align: center;">
246
+ <nobr>{{row.f_meternumber}}</nobr>
247
+ </td>
248
+ <td style="text-align: center;">
249
+ <nobr>{{row.f_gas_person}}</nobr>
250
+ </td>
251
+ <td style="text-align: center;">
252
+ <nobr>{{row.f_gas_date}}</nobr>
253
+ </td>
254
+ <td style="text-align: center;">
255
+ <nobr>{{row.f_gasproperties}}</nobr>
256
+ </td>
257
+ <td style="text-align: center;">
258
+ <nobr>{{row.f_total_gas}}</nobr>
259
+ </td>
260
+ <td style="text-align: center;">
261
+ <nobr>{{row.f_meter_type}}</nobr>
262
+ </td>
263
+ <td style="text-align: center;">
264
+ <nobr>{{row.f_meter_brand}}</nobr>
265
+ </td>
266
+ <td style="text-align: center;">
267
+ <nobr>{{row.isbgl}}</nobr>
268
+ </td>
269
+ <td style="text-align: center;">
270
+ <nobr>{{row.ishot}}</nobr>
271
+ </td>
272
+ <td style="text-align: center;">
273
+ <nobr>{{row.f_user_back}}</nobr>
274
+ </td>
275
+ <td style="text-align: center;">
276
+ <nobr>{{row.f_substite}}</nobr>
277
+ </td>
278
+ <td style="text-align: center;">
279
+ <nobr>{{row.f_check_time}}</nobr>
280
+ </td>
281
+ <td style="text-align: center;">
282
+ <nobr>{{row.f_canceloperator}}</nobr>
283
+ </td>
284
+ <td style="text-align: center;">
285
+ <nobr>{{row.f_canceltime}}</nobr>
286
+ </td>
287
+ <td style="text-align: center;">
288
+ <nobr>{{row.f_cancelreason}}</nobr>
289
+ </td>
290
+ <td style="text-align: center;">
291
+ <nobr>{{row.f_orgname}}</nobr>
292
+ </td>
293
+ </template>
294
+ <template partial='foot'></template>
295
+ </data-grid>
296
+ </criteria-paged>
297
+ </div>
298
+ <div v-if="showinfo">
299
+ <user-info-detail-manage :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage>
300
+ </div>
301
+ </div>
302
+ </div>
303
+ </template>
304
+
305
+ <script>
306
+ import {PagedList} from 'vue-client'
307
+ import defaultPrint from '../config/DefaultPrint'
308
+ import exportConfig from '../config/exportConfig'
309
+ import plugins from '../../../plugins/GetLoginInfoService'
310
+
311
+ let readySomething = async function (self) {
312
+ self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString()
313
+ self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString()
314
+ // await self.$refs.paged.$refs.cri.search()
315
+ await self.$MagLoadParams.loadParam()
316
+ self.initParams()
317
+
318
+ self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
319
+ }
320
+ export default {
321
+ title: '开户统计',
322
+ data() {
323
+ return {
324
+ data: {},
325
+ orgid:[this.$login.f.orgid],
326
+ model: new PagedList('rs/sql/newAccountQuery', 20),
327
+ f_orgid: this.$login.f.orgid,
328
+ criteriaShow: false,
329
+ modelval: [],
330
+ printshow: false,
331
+ all: false,
332
+ fields: {},
333
+ thead: '',
334
+ tfoot: '',
335
+ orgCondtionStr: '(' + this.$login.f.orgid + ')',
336
+ // orgCondtionStr: ` and f_orgid = '${this.$login.f.orgid}'`,
337
+ meterbrands: [],
338
+ showinfo:false,
339
+ rowdata:{},
340
+ //合计数据
341
+ sumsmodel: {},
342
+ newuseroptiones:[{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')],
343
+ selectfields:[],
344
+ metertypes:[{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')],
345
+ backstates:[{label: '全部', value: ''},{label: '是', value: '是'},{label: '否', value: '否'}],
346
+ gaspropertyTypes: [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')],
347
+ getusertypes: [{label: '全部', value: ''}, ...this.$appdata.getParam('用户状态')],
348
+ gettabletypes: [{label: '全部', value: ''}, ...this.$appdata.getParam('表具状态')],
349
+ sellnumoptions:[{label: '全部', value: ''},{label:'是',value:'sellnum>0'},{label:'否',value:'sellnum=0'}]
350
+ }
351
+ },
352
+ props:['selectorg'],
353
+ ready() {
354
+ if(this.selectorg != null && this.selectorg != null != ''){
355
+ this.initres.org=[]
356
+ this.initres.org.push(this.selectorg);
357
+ }
358
+ readySomething(this).then(() => {
359
+ this.$emit('ready')
360
+ }).catch((error) => {
361
+ this.$emit('error', error)
362
+ })
363
+ for(var item in exportConfig.NewAccountConfig){
364
+ this.selectfields.push(item)
365
+ }
366
+ },
367
+ methods: {
368
+ cancel() {
369
+ this.showinfo = false
370
+ },
371
+ getRes (obj) {
372
+ this.orgCondtionStr = plugins.convertToIn(obj)
373
+ },
374
+
375
+ selfSearch(args) {
376
+ if (this.orgCondtionStr)
377
+ args.condition = `${args.condition}` + 'and f_filialeid in ' + this.orgCondtionStr
378
+ else
379
+ args.condition = `${args.condition}` + 'and f_filialeid in ' + '(' + this.$login.f.orgid + ')'
380
+ this.model.search(args.condition, args.model)
381
+ },
382
+ showmsg(obj){
383
+ this.rowdata=obj
384
+ this.showinfo=true
385
+ },
386
+ initParams() {
387
+ // 初始化气表品牌
388
+ let brandArr = []
389
+ this.$MagGetSaleParam.getGasbrand().forEach((item) => {
390
+ let temp = {}
391
+ temp.label = item.label
392
+ temp.value = item.value.f_meter_brand
393
+ brandArr.push(temp)
394
+ })
395
+ this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
396
+ },
397
+
398
+ clear() {
399
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
400
+ this.$refs.paged.$refs.cri.model[key] = ''
401
+ })
402
+ },
403
+ show() {
404
+ this.criteriaShow = true
405
+ },
406
+ hidden() {
407
+ this.criteriaShow = !this.criteriaShow
408
+ },
409
+ dealmsg(val) {
410
+ console.log('---------------dealmsg')
411
+ this.rowdata=val
412
+ this.show=true
413
+ val.model = this.model.model
414
+ this.$dispatch('deal-msg', val)
415
+ },
416
+ stamp() {
417
+ this.all = false
418
+ //默认选择要打印的列
419
+ this.modelval = defaultPrint.config
420
+ this.fields = this.getfield
421
+ console.log('所有打印字段', this.fields)
422
+ this.printshow = true
423
+ this.put()
424
+ },
425
+ put() {
426
+ // 对Modelval进行排序
427
+ this.sortModelval()
428
+ this.thead = `<tr><th colspan=${this.modelval.length}>补卡查询统计报表</th></tr><tr>`
429
+ for (let key of this.modelval) {
430
+ this.thead += '<th>' + this.fields[key] + '</th>'
431
+ }
432
+ this.thead += '</tr>'
433
+ },
434
+ print() {
435
+ this.$refs.print.PrintAsFile()
436
+ this.printshow = false
437
+ },
438
+ close() {
439
+ this.printshow = false
440
+ this.all = false
441
+ },
442
+ // 对选择的列进行排序
443
+ sortModelval() {
444
+ let sortModel = []
445
+ Object.keys(this.fields).forEach((key) => {
446
+ if (this.modelval.includes(key)) {
447
+ sortModel.push(key)
448
+ }
449
+ })
450
+ this.modelval = sortModel
451
+ console.log('选择的打印的字段', this.modelval)
452
+ },
453
+ async updateParams() {
454
+ await this.$MagLoadParams.loadParam(this.f_filialeid)
455
+ this.initParams()
456
+ }
457
+ },
458
+ watch: {
459
+ 'all'(val) {
460
+ if (val) {
461
+ this.modelval = this.bodyData
462
+ } else {
463
+ this.modelval = defaultPrint.config
464
+ this.put()
465
+ }
466
+ },
467
+ 'modelval.length'() {
468
+ this.put()
469
+ },
470
+ 'orgCondtionStr'(val) {
471
+ let res = val.match(/'(.*?)'/)
472
+ console.log('正则提取:',res && res[1])
473
+ if (res) {
474
+ this.selectorg = res[1]
475
+ }
476
+ }
477
+
478
+ },
479
+ computed: {
480
+ getCondition () {
481
+ var con = ""
482
+ if (this.orgCondtionStr) {
483
+ con = `${this.$refs.paged.$refs.cri.condition} and f_filialeid in ${this.orgCondtionStr}`
484
+ }
485
+ else {
486
+ con = `${this.$refs.paged.$refs.cri.condition}and f_filialeid in ('${this.$login.f.orgid}' )`
487
+ }
488
+ return {
489
+ condition: con
490
+ }
491
+ },
492
+ getfield() {
493
+ return exportConfig.NewAccountConfig
494
+ }
495
+ }
496
+ }
497
+ </script>