manage-client 3.3.208 → 3.3.209

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,417 +1,417 @@
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 @sort="sort">
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_open_date >= '{} 00:00:00'">
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_open_date <= '{} 23:59:59'">
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="col-sm-2 form-group">
41
- <label class="font_normal_body">用户类型</label>
42
- <v-select :value.sync="model.f_user_type"
43
- v-model="model.f_user_type"
44
- :options='$parent.$parent.userTypes' placeholder='请选择'
45
- condition=" f_user_type = '{}'"
46
- close-on-select></v-select>
47
- </div>
48
- <!-- <div class="col-sm-2 form-group">-->
49
- <!-- <label class="font_normal_body">公&ensp;&ensp;司</label>-->
50
- <!-- <res-select :initresid="$parent.$parent.orgid"-->
51
- <!-- style="width:60%"-->
52
- <!-- @res-select="$parent.$parent.getRes"-->
53
- <!-- restype='organization'>-->
54
- <!-- </res-select>-->
55
- <!-- </div>-->
56
-
57
-
58
- <div class="span" style="float:right;">
59
- <button class="button_search button_spacing" @click="search()">查询</button>
60
- <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
61
- <!--<button class="btn btn-default" @click="$parent.$parent.stamp()">打印</button>-->
62
-
63
- <!-- <export-excel :data="$parent.$parent.getCondition"-->
64
- <!-- :field="$parent.$parent.getfield"-->
65
- <!-- v-if="$parent.$parent.authArr.includes('开户查询导出')"-->
66
- <!-- sqlurl="api/af-revenue/logic/openapi/exportfile" sql-name="newAccountQuery" template-name='开户查询导出'-->
67
- <!-- :choose-col="true"></export-excel>-->
68
-
69
- <!-- <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>-->
70
- </div>
71
- </div>
72
- <div class="row" v-show="$parent.$parent.criteriaShow">
73
- <div class="col-sm-2 form-group">
74
- <label class="font_normal_body">用气性质</label>
75
- <v-select :value.sync="model.f_gasproperties"
76
- v-model="model.f_gasproperties"
77
- :options='$parent.$parent.gaspropertyTypes' placeholder='请选择'
78
- condition=" f_gasproperties = '{}'"
79
- close-on-select></v-select>
80
- </div>
81
- <div class="col-sm-2 form-group">
82
- <label class="font_normal_body">气表品牌</label>
83
- <v-select :value.sync="model.f_meter_brand"
84
- v-model="model.f_meter_brand"
85
- :options='$parent.$parent.meterbrands' placeholder='请选择'
86
- condition="f_meter_brand = '{}'"
87
- close-on-select></v-select>
88
- </div>
89
- <div class="col-sm-2 form-group">
90
- <label class="font_normal_body">客户地址</label>
91
- <input type="text" style="width:60%" class="input_search" v-model="model.f_address"
92
- condition="f_address like '%{}%'" placeholder='客户地址'>
93
- </div>
94
- <div class="col-sm-2 form-group">
95
- <label class="font_normal_body">&nbsp;&nbsp;&nbsp;小区&nbsp;&nbsp;&nbsp;</label>
96
- <input type="text" style="width:60%" class="input_search" v-model="model.f_residential_area"
97
- condition="f_residential_area like '%{}%'" placeholder="小区"/>
98
- </div>
99
- </div>
100
- <div class="row" v-show="$parent.$parent.criteriaShow">
101
- <res-select-group :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
102
-
103
- </div>
104
-
105
- </div>
106
- </criteria>
107
-
108
- <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
109
- <template partial='head'>
110
- <tr>
111
- <th>
112
- <nobr>客户编号</nobr>
113
- </th>
114
- <th>
115
- <nobr>客户名称</nobr>
116
- </th>
117
- <th>
118
- <data-order field="f_address" name="客户地址"></data-order>
119
- </th>
120
- <th>
121
- <nobr>客户电话</nobr>
122
- </th>
123
- <th>
124
- <nobr>身份证号</nobr>
125
- </th>
126
- <!-- <th>-->
127
- <!-- <nobr>气价名称</nobr>-->
128
- <!-- </th>-->
129
- <th>
130
- <nobr>开户时间</nobr>
131
- </th>
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
- </tr>
157
- </template>
158
- <template partial='body'>
159
- <td style="text-align: center;">
160
- <span @click="$parent.$parent.$parent.showmsg(row)"><a>{{row.f_userinfo_code}}</a></span>
161
- </td>
162
- <td style="text-align: center;">
163
- <nobr>{{row.f_user_name}}</nobr>
164
- </td>
165
- <td style="text-align: center;">
166
- <nobr>{{row.f_address}}</nobr>
167
- </td>
168
- <td style="text-align: center;">
169
- <nobr>{{row.f_user_phone}}</nobr>
170
- </td>
171
- <td style="text-align: center;">
172
- <nobr>{{row.f_idnumber}}</nobr>
173
- </td>
174
- <!-- <td style="text-align: center;">-->
175
- <!-- <nobr>{{row.f_price_name}}</nobr>-->
176
- <!-- </td>-->
177
- <td style="text-align: center;">
178
- <nobr>{{row.f_open_date}}</nobr>
179
- </td>
180
- <!-- <td style="text-align: center;">-->
181
- <!-- <nobr>{{row.f_meternumber}}</nobr>-->
182
- <!-- </td>-->
183
- <!-- <td style="text-align: center;">-->
184
- <!-- <nobr>{{row.f_gas_person}}</nobr>-->
185
- <!-- </td>-->
186
- <!-- <td style="text-align: center;">-->
187
- <!-- <nobr>{{row.f_gas_date}}</nobr>-->
188
- <!-- </td>-->
189
- <!-- <td style="text-align: center;">-->
190
- <!-- <nobr>{{row.f_gasproperties}}</nobr>-->
191
- <!-- </td>-->
192
- <!-- <td style="text-align: center;">-->
193
- <!-- <nobr>{{row.f_total_gas}}</nobr>-->
194
- <!-- </td>-->
195
- <!-- <td style="text-align: center;">-->
196
- <!-- <nobr>{{row.f_meter_brand}}</nobr>-->
197
- <!-- </td>-->
198
- <!-- <td style="text-align: center;">-->
199
- <!-- <nobr>{{row.isbgl}}</nobr>-->
200
- <!-- </td>-->
201
- <!-- <td style="text-align: center;">-->
202
- <!-- <nobr>{{row.f_operator}}</nobr>-->
203
- <!-- </td>-->
204
- </template>
205
- <template partial='foot'></template>
206
- </data-grid>
207
- </criteria-paged>
208
- </div>
209
- <div v-if="showinfo">
210
- <user-info-detail-manage-new :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage-new>
211
- </div>
212
- </div>
213
- </div>
214
- </template>
215
-
216
- <script>
217
- import {PagedList} from 'vue-client'
218
- import defaultPrint from './../../components/sale/config/DefaultPrint'
219
- import exportConfig from './../../components/sale/config/exportConfig'
220
- import plugins from './../../plugins/GetLoginInfoService'
221
-
222
- let readySomething = async function (self) {
223
- self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString()
224
- self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString()
225
- // await self.$refs.paged.$refs.cri.search()
226
- await self.$MagLoadParams.loadParam()
227
- self.initParams()
228
-
229
- self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
230
- }
231
- export default {
232
- title: '开户统计',
233
- data() {
234
- return {
235
- data: {},
236
- initres: {
237
- org:[this.$login.f.orgid],
238
- dep:[],
239
- user:[],
240
- },
241
- orderFields: {
242
- f_address: 'no'
243
- },
244
- orderDefault: "'f_open_date desc'",
245
- model: new PagedList('api/af-revenue/sql/newAccountQuery', 20,{orderitem: "'f_open_date desc'"}),
246
- f_orgid: this.$login.f.orgid,
247
- criteriaShow: false,
248
- modelval: [],
249
- printshow: false,
250
- all: false,
251
- fields: {},
252
- thead: '',
253
- tfoot: '',
254
- orgCondtionStr: '(' + this.$login.f.orgid + ')',
255
- // orgCondtionStr: ` and f_orgid = '${this.$login.f.orgid}'`,
256
- meterbrands: [],
257
- showinfo:false,
258
- rowdata:{},
259
- //合计数据
260
- sumsmodel: {}
261
- }
262
- },
263
- ready() {
264
- readySomething(this).then(() => {
265
- this.$emit('ready')
266
- }).catch((error) => {
267
- this.$emit('error', error)
268
- })
269
- },
270
- methods: {
271
- cancel() {
272
- this.showinfo = false
273
- },
274
- search() {
275
- this.$refs.paged.$refs.cri.search()
276
- },
277
- getRes(obj) {
278
- console.log(obj,"========")
279
- this.orgCondtionStr = obj
280
- },
281
-
282
- selfSearch(args) {
283
- args.condition = `${args.condition}` + this.orgCondtionStr
284
- this.model.search(args.condition, args.model)
285
- },
286
- showmsg(obj){
287
- this.rowdata=obj
288
- this.showinfo=true
289
- },
290
- initParams() {
291
- // 初始化气表品牌
292
- let brandArr = []
293
- this.$MagGetSaleParam.getGasbrand().forEach((item) => {
294
- let temp = {}
295
- temp.label = item.label
296
- temp.value = item.value.f_meter_brand
297
- brandArr.push(temp)
298
- })
299
- this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
300
- },
301
-
302
- clear() {
303
- Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
304
- this.$refs.paged.$refs.cri.model[key] = []
305
- })
306
- },
307
- show() {
308
- this.criteriaShow = true
309
- },
310
- hidden() {
311
- this.criteriaShow = !this.criteriaShow
312
- },
313
- dealmsg(val) {
314
- console.log('---------------dealmsg')
315
- this.rowdata=val
316
- this.show=true
317
- val.model = this.model.model
318
- this.$dispatch('deal-msg', val)
319
- },
320
- stamp() {
321
- this.all = false
322
- //默认选择要打印的列
323
- this.modelval = defaultPrint.config
324
- this.fields = this.getfield
325
- console.log('所有打印字段', this.fields)
326
- this.printshow = true
327
- this.put()
328
- },
329
- put() {
330
- // 对Modelval进行排序
331
- this.sortModelval()
332
- this.thead = `<tr><th colspan=${this.modelval.length}>补卡查询统计报表</th></tr><tr>`
333
- for (let key of this.modelval) {
334
- this.thead += '<th>' + this.fields[key] + '</th>'
335
- }
336
- this.thead += '</tr>'
337
- },
338
- print() {
339
- this.$refs.print.PrintAsFile()
340
- this.printshow = false
341
- },
342
- close() {
343
- this.printshow = false
344
- this.all = false
345
- },
346
- // 对选择的列进行排序
347
- sortModelval() {
348
- let sortModel = []
349
- Object.keys(this.fields).forEach((key) => {
350
- if (this.modelval.includes(key)) {
351
- sortModel.push(key)
352
- }
353
- })
354
- this.modelval = sortModel
355
- console.log('选择的打印的字段', this.modelval)
356
- },
357
- async updateParams() {
358
- await this.$MagLoadParams.loadParam(this.f_filialeid)
359
- this.initParams()
360
- },
361
- sort (field, rule) {
362
- // 将所有排序方式设为不排序,实现相互排斥
363
- for (let key in this.orderFields) {
364
- if (key === field) {
365
- this.orderFields[key] = rule
366
- } else {
367
- this.orderFields[key] = 'no'
368
- }
369
- }
370
- // 如果新规则不排序,还原为默认排序
371
- if (rule === 'no') {
372
- this.model.paramSource.orderitem = `'${this.orderDefault}'`
373
- } else {
374
- this.model.paramSource.orderitem = `'${field} ${rule}'`
375
- }
376
-
377
- this.search()
378
- }
379
- },
380
- watch: {
381
- 'all'(val) {
382
- if (val) {
383
- this.modelval = this.bodyData
384
- } else {
385
- this.modelval = defaultPrint.config
386
- this.put()
387
- }
388
- },
389
- 'modelval.length'() {
390
- this.put()
391
- }
392
- },
393
- computed: {
394
- authArr () {
395
- return this.$login.r ? this.$login.r : []
396
- },
397
- getCondition () {
398
- var con = ""
399
- if (this.orgCondtionStr) {
400
- con = `${this.$refs.paged.$refs.cri.condition} and u.f_orgid in (${this.orgCondtionStr})`
401
- }
402
- else {
403
- con = `${this.$refs.paged.$refs.cri.condition}and u.f_orgid in ('${this.$login.f.orgid}' )`
404
- }
405
- return {
406
- condition: con
407
- }
408
- },
409
- getfield() {
410
- return exportConfig.NewAccountConfig
411
- },
412
- userTypes() {
413
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
414
- }
415
- }
416
- }
417
- </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 @sort="sort">
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_open_date >= '{} 00:00:00'">
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_open_date <= '{} 23:59:59'">
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="col-sm-2 form-group">
41
+ <label class="font_normal_body">用户类型</label>
42
+ <v-select :value.sync="model.f_user_type"
43
+ v-model="model.f_user_type"
44
+ :options='$parent.$parent.userTypes' placeholder='请选择'
45
+ condition=" f_user_type = '{}'"
46
+ close-on-select></v-select>
47
+ </div>
48
+ <!-- <div class="col-sm-2 form-group">-->
49
+ <!-- <label class="font_normal_body">公&ensp;&ensp;司</label>-->
50
+ <!-- <res-select :initresid="$parent.$parent.orgid"-->
51
+ <!-- style="width:60%"-->
52
+ <!-- @res-select="$parent.$parent.getRes"-->
53
+ <!-- restype='organization'>-->
54
+ <!-- </res-select>-->
55
+ <!-- </div>-->
56
+
57
+
58
+ <div class="span" style="float:right;">
59
+ <button class="button_search button_spacing" @click="search()">查询</button>
60
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
61
+ <!--<button class="btn btn-default" @click="$parent.$parent.stamp()">打印</button>-->
62
+
63
+ <!-- <export-excel :data="$parent.$parent.getCondition"-->
64
+ <!-- :field="$parent.$parent.getfield"-->
65
+ <!-- v-if="$parent.$parent.authArr.includes('开户查询导出')"-->
66
+ <!-- sqlurl="api/af-revenue/logic/openapi/exportfile" sql-name="newAccountQuery" template-name='开户查询导出'-->
67
+ <!-- :choose-col="true"></export-excel>-->
68
+
69
+ <!-- <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>-->
70
+ </div>
71
+ </div>
72
+ <div class="row" v-show="$parent.$parent.criteriaShow">
73
+ <div class="col-sm-2 form-group">
74
+ <label class="font_normal_body">用气性质</label>
75
+ <v-select :value.sync="model.f_gasproperties"
76
+ v-model="model.f_gasproperties"
77
+ :options='$parent.$parent.gaspropertyTypes' placeholder='请选择'
78
+ condition=" f_gasproperties = '{}'"
79
+ close-on-select></v-select>
80
+ </div>
81
+ <div class="col-sm-2 form-group">
82
+ <label class="font_normal_body">气表品牌</label>
83
+ <v-select :value.sync="model.f_meter_brand"
84
+ v-model="model.f_meter_brand"
85
+ :options='$parent.$parent.meterbrands' placeholder='请选择'
86
+ condition="f_meter_brand = '{}'"
87
+ close-on-select></v-select>
88
+ </div>
89
+ <div class="col-sm-2 form-group">
90
+ <label class="font_normal_body">客户地址</label>
91
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_address"
92
+ condition="f_address like '%{}%'" placeholder='客户地址'>
93
+ </div>
94
+ <div class="col-sm-2 form-group">
95
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;小区&nbsp;&nbsp;&nbsp;</label>
96
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_residential_area"
97
+ condition="f_residential_area like '%{}%'" placeholder="小区"/>
98
+ </div>
99
+ </div>
100
+ <div class="row" v-show="$parent.$parent.criteriaShow">
101
+ <res-select-group :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
102
+
103
+ </div>
104
+
105
+ </div>
106
+ </criteria>
107
+
108
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
109
+ <template partial='head'>
110
+ <tr>
111
+ <th>
112
+ <nobr>客户编号</nobr>
113
+ </th>
114
+ <th>
115
+ <nobr>客户名称</nobr>
116
+ </th>
117
+ <th>
118
+ <data-order field="f_address" name="客户地址"></data-order>
119
+ </th>
120
+ <th>
121
+ <nobr>客户电话</nobr>
122
+ </th>
123
+ <th>
124
+ <nobr>身份证号</nobr>
125
+ </th>
126
+ <!-- <th>-->
127
+ <!-- <nobr>气价名称</nobr>-->
128
+ <!-- </th>-->
129
+ <th>
130
+ <nobr>开户时间</nobr>
131
+ </th>
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
+ </tr>
157
+ </template>
158
+ <template partial='body'>
159
+ <td style="text-align: center;">
160
+ <span @click="$parent.$parent.$parent.showmsg(row)"><a>{{row.f_userinfo_code}}</a></span>
161
+ </td>
162
+ <td style="text-align: center;">
163
+ <nobr>{{row.f_user_name}}</nobr>
164
+ </td>
165
+ <td style="text-align: center;">
166
+ <nobr>{{row.f_address}}</nobr>
167
+ </td>
168
+ <td style="text-align: center;">
169
+ <nobr>{{row.f_user_phone}}</nobr>
170
+ </td>
171
+ <td style="text-align: center;">
172
+ <nobr>{{row.f_idnumber}}</nobr>
173
+ </td>
174
+ <!-- <td style="text-align: center;">-->
175
+ <!-- <nobr>{{row.f_price_name}}</nobr>-->
176
+ <!-- </td>-->
177
+ <td style="text-align: center;">
178
+ <nobr>{{row.f_open_date}}</nobr>
179
+ </td>
180
+ <!-- <td style="text-align: center;">-->
181
+ <!-- <nobr>{{row.f_meternumber}}</nobr>-->
182
+ <!-- </td>-->
183
+ <!-- <td style="text-align: center;">-->
184
+ <!-- <nobr>{{row.f_gas_person}}</nobr>-->
185
+ <!-- </td>-->
186
+ <!-- <td style="text-align: center;">-->
187
+ <!-- <nobr>{{row.f_gas_date}}</nobr>-->
188
+ <!-- </td>-->
189
+ <!-- <td style="text-align: center;">-->
190
+ <!-- <nobr>{{row.f_gasproperties}}</nobr>-->
191
+ <!-- </td>-->
192
+ <!-- <td style="text-align: center;">-->
193
+ <!-- <nobr>{{row.f_total_gas}}</nobr>-->
194
+ <!-- </td>-->
195
+ <!-- <td style="text-align: center;">-->
196
+ <!-- <nobr>{{row.f_meter_brand}}</nobr>-->
197
+ <!-- </td>-->
198
+ <!-- <td style="text-align: center;">-->
199
+ <!-- <nobr>{{row.isbgl}}</nobr>-->
200
+ <!-- </td>-->
201
+ <!-- <td style="text-align: center;">-->
202
+ <!-- <nobr>{{row.f_operator}}</nobr>-->
203
+ <!-- </td>-->
204
+ </template>
205
+ <template partial='foot'></template>
206
+ </data-grid>
207
+ </criteria-paged>
208
+ </div>
209
+ <div v-if="showinfo">
210
+ <user-info-detail-manage-new :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage-new>
211
+ </div>
212
+ </div>
213
+ </div>
214
+ </template>
215
+
216
+ <script>
217
+ import {PagedList} from 'vue-client'
218
+ import defaultPrint from './../../components/sale/config/DefaultPrint'
219
+ import exportConfig from './../../components/sale/config/exportConfig'
220
+ import plugins from './../../plugins/GetLoginInfoService'
221
+
222
+ let readySomething = async function (self) {
223
+ self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString()
224
+ self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString()
225
+ // await self.$refs.paged.$refs.cri.search()
226
+ await self.$MagLoadParams.loadParam()
227
+ self.initParams()
228
+
229
+ self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
230
+ }
231
+ export default {
232
+ title: '开户统计',
233
+ data() {
234
+ return {
235
+ data: {},
236
+ initres: {
237
+ org:[this.$login.f.orgid],
238
+ dep:[],
239
+ user:[],
240
+ },
241
+ orderFields: {
242
+ f_address: 'no'
243
+ },
244
+ orderDefault: "'f_open_date desc'",
245
+ model: new PagedList('api/af-revenue/sql/newAccountQuery', 20,{orderitem: "'f_open_date desc'"}),
246
+ f_orgid: this.$login.f.orgid,
247
+ criteriaShow: false,
248
+ modelval: [],
249
+ printshow: false,
250
+ all: false,
251
+ fields: {},
252
+ thead: '',
253
+ tfoot: '',
254
+ orgCondtionStr: '(' + this.$login.f.orgid + ')',
255
+ // orgCondtionStr: ` and f_orgid = '${this.$login.f.orgid}'`,
256
+ meterbrands: [],
257
+ showinfo:false,
258
+ rowdata:{},
259
+ //合计数据
260
+ sumsmodel: {}
261
+ }
262
+ },
263
+ ready() {
264
+ readySomething(this).then(() => {
265
+ this.$emit('ready')
266
+ }).catch((error) => {
267
+ this.$emit('error', error)
268
+ })
269
+ },
270
+ methods: {
271
+ cancel() {
272
+ this.showinfo = false
273
+ },
274
+ search() {
275
+ this.$refs.paged.$refs.cri.search()
276
+ },
277
+ getRes(obj) {
278
+ console.log(obj,"========")
279
+ this.orgCondtionStr = obj
280
+ },
281
+
282
+ selfSearch(args) {
283
+ args.condition = `${args.condition}` + this.orgCondtionStr
284
+ this.model.search(args.condition, args.model)
285
+ },
286
+ showmsg(obj){
287
+ this.rowdata=obj
288
+ this.showinfo=true
289
+ },
290
+ initParams() {
291
+ // 初始化气表品牌
292
+ let brandArr = []
293
+ this.$MagGetSaleParam.getGasbrand().forEach((item) => {
294
+ let temp = {}
295
+ temp.label = item.label
296
+ temp.value = item.value.f_meter_brand
297
+ brandArr.push(temp)
298
+ })
299
+ this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
300
+ },
301
+
302
+ clear() {
303
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
304
+ this.$refs.paged.$refs.cri.model[key] = []
305
+ })
306
+ },
307
+ show() {
308
+ this.criteriaShow = true
309
+ },
310
+ hidden() {
311
+ this.criteriaShow = !this.criteriaShow
312
+ },
313
+ dealmsg(val) {
314
+ console.log('---------------dealmsg')
315
+ this.rowdata=val
316
+ this.show=true
317
+ val.model = this.model.model
318
+ this.$dispatch('deal-msg', val)
319
+ },
320
+ stamp() {
321
+ this.all = false
322
+ //默认选择要打印的列
323
+ this.modelval = defaultPrint.config
324
+ this.fields = this.getfield
325
+ console.log('所有打印字段', this.fields)
326
+ this.printshow = true
327
+ this.put()
328
+ },
329
+ put() {
330
+ // 对Modelval进行排序
331
+ this.sortModelval()
332
+ this.thead = `<tr><th colspan=${this.modelval.length}>补卡查询统计报表</th></tr><tr>`
333
+ for (let key of this.modelval) {
334
+ this.thead += '<th>' + this.fields[key] + '</th>'
335
+ }
336
+ this.thead += '</tr>'
337
+ },
338
+ print() {
339
+ this.$refs.print.PrintAsFile()
340
+ this.printshow = false
341
+ },
342
+ close() {
343
+ this.printshow = false
344
+ this.all = false
345
+ },
346
+ // 对选择的列进行排序
347
+ sortModelval() {
348
+ let sortModel = []
349
+ Object.keys(this.fields).forEach((key) => {
350
+ if (this.modelval.includes(key)) {
351
+ sortModel.push(key)
352
+ }
353
+ })
354
+ this.modelval = sortModel
355
+ console.log('选择的打印的字段', this.modelval)
356
+ },
357
+ async updateParams() {
358
+ await this.$MagLoadParams.loadParam(this.f_filialeid)
359
+ this.initParams()
360
+ },
361
+ sort (field, rule) {
362
+ // 将所有排序方式设为不排序,实现相互排斥
363
+ for (let key in this.orderFields) {
364
+ if (key === field) {
365
+ this.orderFields[key] = rule
366
+ } else {
367
+ this.orderFields[key] = 'no'
368
+ }
369
+ }
370
+ // 如果新规则不排序,还原为默认排序
371
+ if (rule === 'no') {
372
+ this.model.paramSource.orderitem = `'${this.orderDefault}'`
373
+ } else {
374
+ this.model.paramSource.orderitem = `'${field} ${rule}'`
375
+ }
376
+
377
+ this.search()
378
+ }
379
+ },
380
+ watch: {
381
+ 'all'(val) {
382
+ if (val) {
383
+ this.modelval = this.bodyData
384
+ } else {
385
+ this.modelval = defaultPrint.config
386
+ this.put()
387
+ }
388
+ },
389
+ 'modelval.length'() {
390
+ this.put()
391
+ }
392
+ },
393
+ computed: {
394
+ authArr () {
395
+ return this.$login.r ? this.$login.r : []
396
+ },
397
+ getCondition () {
398
+ var con = ""
399
+ if (this.orgCondtionStr) {
400
+ con = `${this.$refs.paged.$refs.cri.condition} and u.f_orgid in (${this.orgCondtionStr})`
401
+ }
402
+ else {
403
+ con = `${this.$refs.paged.$refs.cri.condition}and u.f_orgid in ('${this.$login.f.orgid}' )`
404
+ }
405
+ return {
406
+ condition: con
407
+ }
408
+ },
409
+ getfield() {
410
+ return exportConfig.NewAccountConfig
411
+ },
412
+ userTypes() {
413
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
414
+ }
415
+ }
416
+ }
417
+ </script>