manage-client-xy 3.2.29 → 3.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 (23) hide show
  1. package/build/dev-server.js +2 -2
  2. package/package.json +1 -1
  3. package/src/components/sale/businessquery/AreaGeneralQuery.vue +715 -715
  4. package/src/components/sale/businessquery/CMHGasQuery.vue +441 -441
  5. package/src/components/sale/businessquery/ChangeMeterQuery.vue +659 -659
  6. package/src/components/sale/businessquery/ChangeUserQuery.vue +403 -403
  7. package/src/components/sale/businessquery/ChargeQuery.vue +1027 -1027
  8. package/src/components/sale/businessquery/DisableQuery.vue +433 -433
  9. package/src/components/sale/businessquery/EnableQuery.vue +422 -422
  10. package/src/components/sale/businessquery/FMYGasQuery.vue +440 -440
  11. package/src/components/sale/businessquery/FillCardQuery.vue +522 -522
  12. package/src/components/sale/businessquery/FillGasQuery.vue +506 -506
  13. package/src/components/sale/businessquery/HandplanQuery.vue +728 -728
  14. package/src/components/sale/businessquery/LogQuery.vue +301 -301
  15. package/src/components/sale/businessquery/NewAccountQuery.vue +518 -518
  16. package/src/components/sale/businessquery/OtherChargeQuery.vue +432 -432
  17. package/src/components/sale/businessquery/RecordQuery.vue +399 -399
  18. package/src/components/sale/businessquery/ResidentialQuery.vue +417 -417
  19. package/src/components/sale/businessquery/ReverseQuery.vue +459 -459
  20. package/src/components/sale/businessquery/SellingHand.vue +408 -408
  21. package/src/components/sale/businessquery/TransferQuery.vue +589 -589
  22. package/src/components/sale/businessquery/cancelAccountQuery.vue +518 -518
  23. package/src/components/sale/filesquery/UserQuery.vue +796 -796
@@ -1,506 +1,506 @@
1
- <template>
2
- <div id="unit" class="flex-row">
3
- <div class="basic-main" @keyup.enter="search">
4
- <div class="flex" v-if="!show">
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">客户编号</label>
12
- <input type="text" style="width:60%" class="input_search" v-model="model.f_userinfo_code"
13
- condition="f_userinfo_code = '{}' " placeholder="客户编号">
14
- </div>
15
- <div class="col-sm-2 form-group">
16
- <label class="font_normal_body">客户名称</label>
17
- <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
18
- condition="f_user_name like '%{}%'" placeholder="客户名称">
19
- </div>
20
- <div class="col-sm-2 form-group">
21
- <label for="startDate" class="font_normal_body">开始日期</label>
22
- <datepicker id="startDate" placeholder="开始日期" style="width:60%"
23
- v-model="model.startDate"
24
- :value.sync="model.startDate"
25
- :format="'yyyy-MM-dd HH:mm:ss'"
26
- :show-reset-button="true"
27
- condition="f_operate_date >= to_date('{}','yyyy-mm-dd hh24:mi:ss')">
28
- </datepicker>
29
- </div>
30
- <div class="col-sm-2 form-group">
31
- <label for="endDate" class="font_normal_body">结束日期</label>
32
- <datepicker id="endDate" placeholder="结束日期" style="width:60%"
33
- v-model="model.endDate"
34
- :value.sync="model.endDate"
35
- :format="'yyyy-MM-dd HH:mm:ss'"
36
- :show-reset-button="true"
37
- condition="f_operate_date <= to_date('{}','yyyy-mm-dd hh24:mi:ss')">
38
- </datepicker>
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.getfield"
47
- sqlurl="rs/logic/exportfile" sql-name="fillGasQuery" template-name='补气查询导出'
48
- v-if ="$parent.$parent.jurisdiction.includes('excel导出')"
49
- :choose-col="true"></export-excel>
50
-
51
- <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>
52
- </div>
53
- </div>
54
- <div class="row">
55
- <res-select-group style="col-sm-2 form-group" :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
56
- <div class="col-sm-2 form-group">
57
- <label for="f_area_id" class="font_normal_body">小区编码</label>
58
- <input id="f_area_id" type="text" style="width:60%" class="input_search" v-model="model.f_area_id"
59
- condition="f_area_id = '{}'" placeholder='小区编码'>
60
- </div>
61
- <div class="col-sm-2 form-group">
62
- <label class="font_normal_body">&nbsp;&nbsp;&nbsp;小区&nbsp;&nbsp;&nbsp;</label>
63
- <v-select :value.sync="model.f_residential_area"
64
- class="select_list select"
65
- enter-push
66
- multiple = "true"
67
- v-model="model.f_residential_area"
68
- style="width: 60%"
69
- :options='$parent.$parent.residentialArea' placeholder='选择小区'
70
- close-on-select>
71
- </v-select>
72
- </div>
73
- </div>
74
- <div class="row" v-show="$parent.$parent.criteriaShow">
75
- <div class="col-sm-2 form-group">
76
- <label class="font_normal_body">客户地址</label>
77
- <input type="text" style="width:60%" class="input_search" v-model="model.f_address"
78
- condition="f_address like '%{}%'" placeholder='客户地址'>
79
- </div>
80
- <div class="col-sm-2 form-group">
81
- <label class="font_normal_body">补气类型</label>
82
- <v-select :value.sync="model.f_type"
83
- v-model="model.f_type"
84
- :options='$parent.$parent.fillGasTypes' placeholder='请选择'
85
- condition="f_type = '{}'"
86
- close-on-select></v-select>
87
- </div>
88
-
89
- <div class="col-sm-2 form-group">
90
- <label class="font_normal_body">&nbsp;&nbsp;&nbsp;卡号&nbsp;&nbsp;&nbsp;</label>
91
- <input type="text" style="width:60%" class="input_search" v-model="model.f_card_id"
92
- condition="f_card_id like '%{}%'" placeholder='卡号'>
93
- </div>
94
- <div class="col-sm-2 form-group">
95
- <label class="font_normal_body">气表品牌</label>
96
- <v-select :value.sync="model.f_meter_brand"
97
- v-model="model.f_meter_brand"
98
- :options='$parent.$parent.meterbrands' placeholder='请选择'
99
- condition="f_meter_brand = '{}'"
100
- close-on-select></v-select>
101
- </div>
102
- <div class="col-sm-2 form-group">
103
- <label class="font_normal_body">补气状态</label>
104
- <v-select :value.sync="model.f_state"
105
- v-model="model.f_state"
106
- :options='$parent.$parent.chargeState' placeholder='请选择'
107
- condition="f_state = '{}'"
108
- close-on-select></v-select>
109
- </div>
110
- <div class="col-sm-2 form-group">
111
- <label class="font_normal_body">是否<br/>手持设备</label>
112
- <v-select :value.sync="$parent.$parent.f_outlets"
113
- :options="$parent.$parent.isPos"
114
- :search="false"
115
- placeholder='请选择'
116
- condition="{}"
117
- close-on-select></v-select>
118
- </div>
119
- <div class="col-sm-2 form-group">
120
- <label class="font_normal_body">房产地址</label>
121
- <input class="input_search" condition="f_house_address = '{}'"
122
- placeholder='房产地址'
123
- style="width:60%" type="text" v-model="model.f_house_address">
124
- </div>
125
- <div class="col-sm-2 form-group">
126
- <label class="font_normal_body">用途</label>
127
- <input class="input_search" condition="f_property_usage = '{}'"
128
- placeholder='用途'
129
- style="width:60%" type="text" v-model="model.f_property_usage">
130
- </div>
131
- <div class="col-sm-2 form-group">
132
- <label class="font_normal_body">房型</label>
133
- <input class="input_search" condition="f_house_type = '{}'"
134
- placeholder='房型'
135
- style="width:60%" type="text" v-model="model.f_house_type">
136
- </div>
137
- <div class="col-sm-2 form-group">
138
- <label class="font_normal_body">是否一户多表</label>
139
- <input class="input_search" condition="f_is_multi_meter = '{}'"
140
- placeholder='是否一户多表'
141
- style="width:60%" type="text" v-model="model.f_is_multi_meter">
142
- </div>
143
- <div class="col-sm-2 form-group">
144
- <label class="font_normal_body">关联ID</label>
145
- <input class="input_search" condition="f_house_id = '{}'"
146
- placeholder='关联ID'
147
- style="width:60%" type="text" v-model="model.f_house_id">
148
- </div>
149
- </div>
150
-
151
- </div>
152
- </criteria>
153
-
154
- <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
155
- <template partial='head'>
156
- <tr>
157
- <th>
158
- <nobr>客户编号</nobr>
159
- </th>
160
- <th>
161
- <nobr>客户名称</nobr>
162
- </th>
163
- <th>
164
- <nobr>客户地址</nobr>
165
- </th>
166
- <th>
167
- <nobr>卡号</nobr>
168
- </th>
169
- <th>
170
- <nobr>气表品牌</nobr>
171
- </th>
172
- <th>
173
- <nobr>补气量</nobr>
174
- </th>
175
- <th>
176
- <nobr>补气金额</nobr>
177
- </th>
178
- <th>
179
- <nobr>补气类型</nobr>
180
- </th>
181
- <th>
182
- <nobr>补气日期</nobr>
183
- </th>
184
- <th>
185
- <nobr>补气原因</nobr>
186
- </th>
187
- <th>
188
- <nobr>操作员</nobr>
189
- </th>
190
- <th>
191
- <nobr>部门</nobr>
192
- </th>
193
- <th>
194
- <nobr>网点</nobr>
195
- </th>
196
- <th>
197
- <nobr>公司</nobr>
198
- </th>
199
- </tr>
200
- </template>
201
- <template partial='body'>
202
- <td style="text-align: center;">
203
- <nobr>
204
- <span @click="$parent.$parent.$parent.dealmsg(row)"><a>{{row.f_userinfo_code}}</a></span></nobr>
205
- </td>
206
- <td style="text-align: center;">
207
- <nobr>{{row.f_user_name}}</nobr>
208
- </td>
209
- <td style="text-align: center;">
210
- <nobr>{{row.f_address}}</nobr>
211
- </td>
212
- <td style="text-align: center;">
213
- <nobr>{{row.f_card_id}}</nobr>
214
- </td>
215
- <td style="text-align: center;">
216
- <nobr>{{row.f_meter_brand}}</nobr>
217
- </td>
218
- <td style="text-align: center;">
219
- <nobr>{{row.f_pregas}}</nobr>
220
- </td>
221
- <td style="text-align: center;">
222
- <nobr>{{row.f_preamount}}</nobr>
223
- </td>
224
- <td style="text-align: center;">
225
- <nobr>{{row.f_type}}</nobr>
226
- </td>
227
- <td style="text-align: center;">
228
- <nobr>{{row.f_operate_date}}</nobr>
229
- </td>
230
- <td style="text-align: center;">
231
- <nobr>{{row.f_comments}}</nobr>
232
- </td>
233
- <td style="text-align: center;">
234
- <nobr>{{row.f_operator}}</nobr>
235
- </td>
236
- <td style="text-align: center;">
237
- <nobr>{{row.f_depname}}</nobr>
238
- </td>
239
- <td style="text-align: center;">
240
- <nobr>{{row.f_outlets}}</nobr>
241
- </td>
242
- <td style="text-align: center;">
243
- <nobr>{{row.f_orgname}}</nobr>
244
- </td>
245
- </template>
246
- <template partial='foot'></template>
247
- </data-grid>
248
- </criteria-paged>
249
-
250
- <table class="table-hover">
251
- <tr style="position: relative" class="table-bordered">
252
- <td
253
- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
254
- 汇总信息
255
- </td>
256
- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">
257
- 补气量合计:&emsp;{{sumsmodel.f_pregas}}
258
- </td>
259
- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">
260
- 补气金额合计:&emsp;{{sumsmodel.f_preamount}}
261
- </td>
262
- </tr>
263
- </table>
264
- </div>
265
- <div v-if="show">
266
- <user-info-detail-manage :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage>
267
- </div>
268
- <div v-if="showAttachment">
269
- <attachment-viewer :business-id="currentRow && currentRow.id" table-name="t_fillgas" @close="closeAttachment"></attachment-viewer>
270
- </div>
271
- </div>
272
- </div>
273
- </template>
274
-
275
- <script>
276
- import {HttpResetClass, PagedList} from 'vue-client'
277
- import defaultPrint from '../config/DefaultPrint'
278
- import exportConfig from '../config/exportConfig'
279
- import AttachmentViewer from './AttachmentViewer.vue'
280
-
281
- let readySomething = async function (self) {
282
- self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString() + ' 00:00:00'
283
- self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString() + ' 23:59:59'
284
- // await self.$refs.paged.$refs.cri.search()
285
- self.initParams()
286
- await self.$MagLoadParams.loadParam()
287
- self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
288
- }
289
- export default {
290
- components: {
291
- AttachmentViewer
292
- },
293
- data() {
294
- return {
295
- data: {},
296
- model: new PagedList('rs/sql/fillGasQuery', 20, {}, {f_pregas: 0,f_preamount: 0}),
297
- criteriaShow: false,
298
- headData: ["客户编号", "客户名称", "客户电话", "身份证号", "地址", "补气类型", "表编号", "卡号", "气表品牌", "气表状态", "补气量", "补气日期", "操作员", "部门", "公司"],
299
- bodyData: ["f_userinfo_code", "f_user_name", "f_user_phone", "f_idnumber", "address", "f_type", "f_user_id", "f_card_id", "f_meter_brand", "f_table_state", "f_fillgas", "f_operate_date", "f_operator", "f_depname", "f_orgname"],
300
- orgCondtionStr: '',
301
-
302
- modelval: [],
303
- printshow: false,
304
- jurisdiction:this.$login.r,
305
- all: false,
306
- fields: {},
307
- thead: '',
308
- tfoot: '',
309
- show:false,
310
- showAttachment: false,
311
- currentRow: null,
312
- rowdata:{},
313
- meterbrands: [],
314
- initres: {
315
- org:[this.$login.f.orgid],
316
- dep:[],
317
- user:[],
318
- },
319
- residentialArea:[],
320
- area:[],
321
- f_outlets: [],
322
- isPos: [{label: '全部', value: ''}, {label: '是', value: '是'}, {label: '否', value: '否'}],
323
- //合计数据
324
- sumsmodel: {}
325
- }
326
- },
327
- ready() {
328
- this.getaddress()
329
-
330
- readySomething(this).then(() => {
331
- this.$emit('ready')
332
- }).catch((error) => {
333
- this.$emit('error', error)
334
- })
335
- },
336
- methods: {
337
- async getaddress(){
338
- console.log('开始获取小区')
339
- let HttpReset = new HttpResetClass()
340
- var data = await HttpReset.load('POST', 'rs/sql/manage_getarealist', {
341
- data: {
342
- condition: '1=1'
343
- }
344
- }, {resolveMsg: null, rejectMsg: '获取小区失败!'})
345
- console.log('小区',data)
346
- let house = []
347
- for (let row of data.data){
348
- console.log('开始保存小区')
349
- house.push({label: row.f_residential_area, value: row.f_residential_area})
350
- }
351
- this.residentialArea = house
352
- },
353
- search(){
354
- this.$refs.paged.$refs.cri.search()
355
- },
356
- initParams() {
357
- // 初始化气表品牌
358
- let brandArr = []
359
- this.$MagGetSaleParam.getGasbrand().forEach((item) => {
360
- let temp = {}
361
- temp.label = item.label
362
- temp.value = item.value.f_meter_brand
363
- brandArr.push(temp)
364
- })
365
- this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
366
- },
367
- selfSearch(args) {
368
- //小区查询条件
369
- this.area = this.$refs.paged.$refs.cri.model.f_residential_area
370
- console.log("=====小区model绑定====",this.area)
371
- if(this.area.length !== 0){
372
- let str = JSON.stringify(this.area)
373
- str = str.replace(/"/g,`'`)
374
- str = str.replace(/\[/g,``)
375
- str = str.replace(/\]/g,``)
376
- console.log("=====小区model22222222222绑定====",str)
377
- //查询多个小区时条件
378
- args.condition += ` and f_residential_area in ( ${str} )`
379
- }
380
-
381
- // 手持设备查询条件
382
- if(this.f_outlets[0] === '是'){
383
- args.condition+= ` and f_outlets = '手持设备'`
384
- } else if (this.f_outlets[0] === '否'){
385
- args.condition+= ` and f_outlets is null`
386
- }
387
-
388
- args.condition = `${args.condition}` + this.orgCondtionStr
389
- this.model.search(args.condition, args.model)
390
- this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
391
- },
392
- clear() {
393
- //清空部门和人员
394
- this.$refs.paged.$refs.cri.$refs.sel.$children[1].selectres = []
395
- //部门和人员变为全选
396
- this.$refs.paged.$refs.cri.$refs.sel.$children[1].$children[0].isSelectAll = false
397
- this.$refs.paged.$refs.cri.$refs.sel.$children[2].$children[0].isSelectAll = false
398
- Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
399
- this.$refs.paged.$refs.cri.model[key] = ''
400
- })
401
- },
402
- show() {
403
- this.criteriaShow = true
404
- },
405
- hidden() {
406
- this.criteriaShow = !this.criteriaShow
407
- },
408
- getRes(condition) {
409
- this.orgCondtionStr = condition
410
- },
411
- stamp() {
412
- this.all = false
413
- //默认选择要打印的列
414
- this.modelval = defaultPrint.config
415
- this.fields = this.getfield
416
- console.log('所有打印字段', this.fields)
417
- this.printshow = true
418
- this.put()
419
- },
420
- cancel() {
421
- this.show = false
422
- },
423
- dealmsg(val) {
424
- console.log('---------------dealmsg')
425
- this.rowdata=val
426
- this.show=true
427
- val.model = this.model.model
428
- this.$dispatch('deal-msg', val)
429
- },
430
- view(row) {
431
- this.currentRow = row;
432
- this.showAttachment = true;
433
- },
434
- closeAttachment() {
435
- this.showAttachment = false;
436
- },
437
- put() {
438
- // 对Modelval进行排序
439
- this.sortModelval()
440
- this.thead = `<tr><th colspan=${this.modelval.length}>补气查询统计报表</th></tr><tr>`
441
- for (let key of this.modelval) {
442
- this.thead += '<th>' + this.fields[key] + '</th>'
443
- }
444
- this.thead += '</tr>'
445
- },
446
- print() {
447
- this.$refs.print.PrintAsFile()
448
- this.printshow = false
449
- },
450
- close() {
451
- this.printshow = false
452
- this.all = false
453
- },
454
- // 对选择的列进行排序
455
- sortModelval() {
456
- let sortModel = []
457
- Object.keys(this.fields).forEach((key) => {
458
- if (this.modelval.includes(key)) {
459
- sortModel.push(key)
460
- }
461
- })
462
- this.modelval = sortModel
463
- console.log('选择的打印的字段', this.modelval)
464
- },
465
- async updateParams() {
466
- await this.$MagLoadParams.loadParam(this.f_filialeid)
467
- this.initParams()
468
- },
469
- },
470
- watch: {
471
- 'all'(val) {
472
- if (val) {
473
- this.modelval = this.bodyData
474
- } else {
475
- this.modelval = defaultPrint.config
476
- this.put()
477
- }
478
- },
479
- 'modelval.length'() {
480
- this.put()
481
- },
482
- 'orgCondtionStr'(val) {
483
- let res = val.match(/'(.*?)'/)
484
- console.log('正则提取:',res && res[1])
485
- if (res) {
486
- this.f_filialeid = res[1]
487
- this.updateParams()
488
- }
489
- }
490
- },
491
- computed: {
492
- getCondition() {
493
- return {condition: `${this.$refs.paged.$refs.cri.condition}` + this.orgCondtionStr}
494
- },
495
- getfield() {
496
- return exportConfig.fillgasConfig
497
- },
498
- fillGasTypes() {
499
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('补气类型')]
500
- },
501
- chargeState() {
502
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('补气状态')]
503
- }
504
- }
505
- }
506
- </script>
1
+ <template>
2
+ <div id="unit" class="flex-row">
3
+ <div class="basic-main" @keyup.enter="search">
4
+ <div class="flex" v-if="!show">
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">客户编号</label>
12
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_userinfo_code"
13
+ condition="f_userinfo_code = '{}' " placeholder="客户编号">
14
+ </div>
15
+ <div class="col-sm-2 form-group">
16
+ <label class="font_normal_body">客户名称</label>
17
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
18
+ condition="f_user_name like '%{}%'" placeholder="客户名称">
19
+ </div>
20
+ <div class="col-sm-2 form-group">
21
+ <label for="startDate" class="font_normal_body">开始日期</label>
22
+ <datepicker id="startDate" placeholder="开始日期" style="width:60%"
23
+ v-model="model.startDate"
24
+ :value.sync="model.startDate"
25
+ :format="'yyyy-MM-dd HH:mm:ss'"
26
+ :show-reset-button="true"
27
+ condition="f_operate_date >= to_date('{}','yyyy-mm-dd hh24:mi:ss')">
28
+ </datepicker>
29
+ </div>
30
+ <div class="col-sm-2 form-group">
31
+ <label for="endDate" class="font_normal_body">结束日期</label>
32
+ <datepicker id="endDate" placeholder="结束日期" style="width:60%"
33
+ v-model="model.endDate"
34
+ :value.sync="model.endDate"
35
+ :format="'yyyy-MM-dd HH:mm:ss'"
36
+ :show-reset-button="true"
37
+ condition="f_operate_date <= to_date('{}','yyyy-mm-dd hh24:mi:ss')">
38
+ </datepicker>
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.getfield"
47
+ sqlurl="rs/logic/exportfile" sql-name="fillGasQuery" template-name='补气查询导出'
48
+ v-if ="$parent.$parent.jurisdiction.includes('excel导出')"
49
+ :choose-col="true"></export-excel>
50
+
51
+ <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>
52
+ </div>
53
+ </div>
54
+ <div class="row">
55
+ <res-select-group style="col-sm-2 form-group" :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
56
+ <div class="col-sm-2 form-group">
57
+ <label for="f_area_id" class="font_normal_body">小区编码</label>
58
+ <input id="f_area_id" type="text" style="width:60%" class="input_search" v-model="model.f_area_id"
59
+ condition="f_area_id = '{}'" placeholder='小区编码'>
60
+ </div>
61
+ <div class="col-sm-2 form-group">
62
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;小区&nbsp;&nbsp;&nbsp;</label>
63
+ <v-select :value.sync="model.f_residential_area"
64
+ class="select_list select"
65
+ enter-push
66
+ multiple = "true"
67
+ v-model="model.f_residential_area"
68
+ style="width: 60%"
69
+ :options='$parent.$parent.residentialArea' placeholder='选择小区'
70
+ close-on-select>
71
+ </v-select>
72
+ </div>
73
+ </div>
74
+ <div class="row" v-show="$parent.$parent.criteriaShow">
75
+ <div class="col-sm-2 form-group">
76
+ <label class="font_normal_body">客户地址</label>
77
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_address"
78
+ condition="f_address like '%{}%'" placeholder='客户地址'>
79
+ </div>
80
+ <div class="col-sm-2 form-group">
81
+ <label class="font_normal_body">补气类型</label>
82
+ <v-select :value.sync="model.f_type"
83
+ v-model="model.f_type"
84
+ :options='$parent.$parent.fillGasTypes' placeholder='请选择'
85
+ condition="f_type = '{}'"
86
+ close-on-select></v-select>
87
+ </div>
88
+
89
+ <div class="col-sm-2 form-group">
90
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;卡号&nbsp;&nbsp;&nbsp;</label>
91
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_card_id"
92
+ condition="f_card_id like '%{}%'" placeholder='卡号'>
93
+ </div>
94
+ <div class="col-sm-2 form-group">
95
+ <label class="font_normal_body">气表品牌</label>
96
+ <v-select :value.sync="model.f_meter_brand"
97
+ v-model="model.f_meter_brand"
98
+ :options='$parent.$parent.meterbrands' placeholder='请选择'
99
+ condition="f_meter_brand = '{}'"
100
+ close-on-select></v-select>
101
+ </div>
102
+ <div class="col-sm-2 form-group">
103
+ <label class="font_normal_body">补气状态</label>
104
+ <v-select :value.sync="model.f_state"
105
+ v-model="model.f_state"
106
+ :options='$parent.$parent.chargeState' placeholder='请选择'
107
+ condition="f_state = '{}'"
108
+ close-on-select></v-select>
109
+ </div>
110
+ <div class="col-sm-2 form-group">
111
+ <label class="font_normal_body">是否<br/>手持设备</label>
112
+ <v-select :value.sync="$parent.$parent.f_outlets"
113
+ :options="$parent.$parent.isPos"
114
+ :search="false"
115
+ placeholder='请选择'
116
+ condition="{}"
117
+ close-on-select></v-select>
118
+ </div>
119
+ <div class="col-sm-2 form-group">
120
+ <label class="font_normal_body">房产地址</label>
121
+ <input class="input_search" condition="f_house_address = '{}'"
122
+ placeholder='房产地址'
123
+ style="width:60%" type="text" v-model="model.f_house_address">
124
+ </div>
125
+ <div class="col-sm-2 form-group">
126
+ <label class="font_normal_body">用途</label>
127
+ <input class="input_search" condition="f_property_usage = '{}'"
128
+ placeholder='用途'
129
+ style="width:60%" type="text" v-model="model.f_property_usage">
130
+ </div>
131
+ <div class="col-sm-2 form-group">
132
+ <label class="font_normal_body">房型</label>
133
+ <input class="input_search" condition="f_house_type = '{}'"
134
+ placeholder='房型'
135
+ style="width:60%" type="text" v-model="model.f_house_type">
136
+ </div>
137
+ <div class="col-sm-2 form-group">
138
+ <label class="font_normal_body">是否一户多表</label>
139
+ <input class="input_search" condition="f_is_multi_meter = '{}'"
140
+ placeholder='是否一户多表'
141
+ style="width:60%" type="text" v-model="model.f_is_multi_meter">
142
+ </div>
143
+ <div class="col-sm-2 form-group">
144
+ <label class="font_normal_body">关联ID</label>
145
+ <input class="input_search" condition="f_house_id = '{}'"
146
+ placeholder='关联ID'
147
+ style="width:60%" type="text" v-model="model.f_house_id">
148
+ </div>
149
+ </div>
150
+
151
+ </div>
152
+ </criteria>
153
+
154
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
155
+ <template partial='head'>
156
+ <tr>
157
+ <th>
158
+ <nobr>客户编号</nobr>
159
+ </th>
160
+ <th>
161
+ <nobr>客户名称</nobr>
162
+ </th>
163
+ <th>
164
+ <nobr>客户地址</nobr>
165
+ </th>
166
+ <th>
167
+ <nobr>卡号</nobr>
168
+ </th>
169
+ <th>
170
+ <nobr>气表品牌</nobr>
171
+ </th>
172
+ <th>
173
+ <nobr>补气量</nobr>
174
+ </th>
175
+ <th>
176
+ <nobr>补气金额</nobr>
177
+ </th>
178
+ <th>
179
+ <nobr>补气类型</nobr>
180
+ </th>
181
+ <th>
182
+ <nobr>补气日期</nobr>
183
+ </th>
184
+ <th>
185
+ <nobr>补气原因</nobr>
186
+ </th>
187
+ <th>
188
+ <nobr>操作员</nobr>
189
+ </th>
190
+ <th>
191
+ <nobr>部门</nobr>
192
+ </th>
193
+ <th>
194
+ <nobr>网点</nobr>
195
+ </th>
196
+ <th>
197
+ <nobr>公司</nobr>
198
+ </th>
199
+ </tr>
200
+ </template>
201
+ <template partial='body'>
202
+ <td style="text-align: center;">
203
+ <nobr>
204
+ <span @click="$parent.$parent.$parent.dealmsg(row)"><a>{{row.f_userinfo_code}}</a></span></nobr>
205
+ </td>
206
+ <td style="text-align: center;">
207
+ <nobr>{{row.f_user_name}}</nobr>
208
+ </td>
209
+ <td style="text-align: center;">
210
+ <nobr>{{row.f_address}}</nobr>
211
+ </td>
212
+ <td style="text-align: center;">
213
+ <nobr>{{row.f_card_id}}</nobr>
214
+ </td>
215
+ <td style="text-align: center;">
216
+ <nobr>{{row.f_meter_brand}}</nobr>
217
+ </td>
218
+ <td style="text-align: center;">
219
+ <nobr>{{row.f_pregas}}</nobr>
220
+ </td>
221
+ <td style="text-align: center;">
222
+ <nobr>{{row.f_preamount}}</nobr>
223
+ </td>
224
+ <td style="text-align: center;">
225
+ <nobr>{{row.f_type}}</nobr>
226
+ </td>
227
+ <td style="text-align: center;">
228
+ <nobr>{{row.f_operate_date}}</nobr>
229
+ </td>
230
+ <td style="text-align: center;">
231
+ <nobr>{{row.f_comments}}</nobr>
232
+ </td>
233
+ <td style="text-align: center;">
234
+ <nobr>{{row.f_operator}}</nobr>
235
+ </td>
236
+ <td style="text-align: center;">
237
+ <nobr>{{row.f_depname}}</nobr>
238
+ </td>
239
+ <td style="text-align: center;">
240
+ <nobr>{{row.f_outlets}}</nobr>
241
+ </td>
242
+ <td style="text-align: center;">
243
+ <nobr>{{row.f_orgname}}</nobr>
244
+ </td>
245
+ </template>
246
+ <template partial='foot'></template>
247
+ </data-grid>
248
+ </criteria-paged>
249
+
250
+ <table class="table-hover">
251
+ <tr style="position: relative" class="table-bordered">
252
+ <td
253
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
254
+ 汇总信息
255
+ </td>
256
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">
257
+ 补气量合计:&emsp;{{sumsmodel.f_pregas}}
258
+ </td>
259
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">
260
+ 补气金额合计:&emsp;{{sumsmodel.f_preamount}}
261
+ </td>
262
+ </tr>
263
+ </table>
264
+ </div>
265
+ <div v-if="show">
266
+ <user-info-detail-manage :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage>
267
+ </div>
268
+ <div v-if="showAttachment">
269
+ <attachment-viewer :business-id="currentRow && currentRow.id" table-name="t_fillgas" @close="closeAttachment"></attachment-viewer>
270
+ </div>
271
+ </div>
272
+ </div>
273
+ </template>
274
+
275
+ <script>
276
+ import {HttpResetClass, PagedList} from 'vue-client'
277
+ import defaultPrint from '../config/DefaultPrint'
278
+ import exportConfig from '../config/exportConfig'
279
+ import AttachmentViewer from './AttachmentViewer.vue'
280
+
281
+ let readySomething = async function (self) {
282
+ self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString() + ' 00:00:00'
283
+ self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString() + ' 23:59:59'
284
+ // await self.$refs.paged.$refs.cri.search()
285
+ self.initParams()
286
+ await self.$MagLoadParams.loadParam()
287
+ self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
288
+ }
289
+ export default {
290
+ components: {
291
+ AttachmentViewer
292
+ },
293
+ data() {
294
+ return {
295
+ data: {},
296
+ model: new PagedList('rs/sql/fillGasQuery', 20, {}, {f_pregas: 0,f_preamount: 0}),
297
+ criteriaShow: false,
298
+ headData: ["客户编号", "客户名称", "客户电话", "身份证号", "地址", "补气类型", "表编号", "卡号", "气表品牌", "气表状态", "补气量", "补气日期", "操作员", "部门", "公司"],
299
+ bodyData: ["f_userinfo_code", "f_user_name", "f_user_phone", "f_idnumber", "address", "f_type", "f_user_id", "f_card_id", "f_meter_brand", "f_table_state", "f_fillgas", "f_operate_date", "f_operator", "f_depname", "f_orgname"],
300
+ orgCondtionStr: '',
301
+
302
+ modelval: [],
303
+ printshow: false,
304
+ jurisdiction:this.$login.r,
305
+ all: false,
306
+ fields: {},
307
+ thead: '',
308
+ tfoot: '',
309
+ show:false,
310
+ showAttachment: false,
311
+ currentRow: null,
312
+ rowdata:{},
313
+ meterbrands: [],
314
+ initres: {
315
+ org:[this.$login.f.orgid],
316
+ dep:[],
317
+ user:[],
318
+ },
319
+ residentialArea:[],
320
+ area:[],
321
+ f_outlets: [],
322
+ isPos: [{label: '全部', value: ''}, {label: '是', value: '是'}, {label: '否', value: '否'}],
323
+ //合计数据
324
+ sumsmodel: {}
325
+ }
326
+ },
327
+ ready() {
328
+ this.getaddress()
329
+
330
+ readySomething(this).then(() => {
331
+ this.$emit('ready')
332
+ }).catch((error) => {
333
+ this.$emit('error', error)
334
+ })
335
+ },
336
+ methods: {
337
+ async getaddress(){
338
+ console.log('开始获取小区')
339
+ let HttpReset = new HttpResetClass()
340
+ var data = await HttpReset.load('POST', 'rs/sql/manage_getarealist', {
341
+ data: {
342
+ condition: '1=1'
343
+ }
344
+ }, {resolveMsg: null, rejectMsg: '获取小区失败!'})
345
+ console.log('小区',data)
346
+ let house = []
347
+ for (let row of data.data){
348
+ console.log('开始保存小区')
349
+ house.push({label: row.f_residential_area, value: row.f_residential_area})
350
+ }
351
+ this.residentialArea = house
352
+ },
353
+ search(){
354
+ this.$refs.paged.$refs.cri.search()
355
+ },
356
+ initParams() {
357
+ // 初始化气表品牌
358
+ let brandArr = []
359
+ this.$MagGetSaleParam.getGasbrand().forEach((item) => {
360
+ let temp = {}
361
+ temp.label = item.label
362
+ temp.value = item.value.f_meter_brand
363
+ brandArr.push(temp)
364
+ })
365
+ this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
366
+ },
367
+ selfSearch(args) {
368
+ //小区查询条件
369
+ this.area = this.$refs.paged.$refs.cri.model.f_residential_area
370
+ console.log("=====小区model绑定====",this.area)
371
+ if(this.area.length !== 0){
372
+ let str = JSON.stringify(this.area)
373
+ str = str.replace(/"/g,`'`)
374
+ str = str.replace(/\[/g,``)
375
+ str = str.replace(/\]/g,``)
376
+ console.log("=====小区model22222222222绑定====",str)
377
+ //查询多个小区时条件
378
+ args.condition += ` and f_residential_area in ( ${str} )`
379
+ }
380
+
381
+ // 手持设备查询条件
382
+ if(this.f_outlets[0] === '是'){
383
+ args.condition+= ` and f_outlets = '手持设备'`
384
+ } else if (this.f_outlets[0] === '否'){
385
+ args.condition+= ` and f_outlets is null`
386
+ }
387
+
388
+ args.condition = `${args.condition}` + this.orgCondtionStr
389
+ this.model.search(args.condition, args.model)
390
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
391
+ },
392
+ clear() {
393
+ //清空部门和人员
394
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].selectres = []
395
+ //部门和人员变为全选
396
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].$children[0].isSelectAll = false
397
+ this.$refs.paged.$refs.cri.$refs.sel.$children[2].$children[0].isSelectAll = false
398
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
399
+ this.$refs.paged.$refs.cri.model[key] = ''
400
+ })
401
+ },
402
+ show() {
403
+ this.criteriaShow = true
404
+ },
405
+ hidden() {
406
+ this.criteriaShow = !this.criteriaShow
407
+ },
408
+ getRes(condition) {
409
+ this.orgCondtionStr = condition
410
+ },
411
+ stamp() {
412
+ this.all = false
413
+ //默认选择要打印的列
414
+ this.modelval = defaultPrint.config
415
+ this.fields = this.getfield
416
+ console.log('所有打印字段', this.fields)
417
+ this.printshow = true
418
+ this.put()
419
+ },
420
+ cancel() {
421
+ this.show = false
422
+ },
423
+ dealmsg(val) {
424
+ console.log('---------------dealmsg')
425
+ this.rowdata=val
426
+ this.show=true
427
+ val.model = this.model.model
428
+ this.$dispatch('deal-msg', val)
429
+ },
430
+ view(row) {
431
+ this.currentRow = row;
432
+ this.showAttachment = true;
433
+ },
434
+ closeAttachment() {
435
+ this.showAttachment = false;
436
+ },
437
+ put() {
438
+ // 对Modelval进行排序
439
+ this.sortModelval()
440
+ this.thead = `<tr><th colspan=${this.modelval.length}>补气查询统计报表</th></tr><tr>`
441
+ for (let key of this.modelval) {
442
+ this.thead += '<th>' + this.fields[key] + '</th>'
443
+ }
444
+ this.thead += '</tr>'
445
+ },
446
+ print() {
447
+ this.$refs.print.PrintAsFile()
448
+ this.printshow = false
449
+ },
450
+ close() {
451
+ this.printshow = false
452
+ this.all = false
453
+ },
454
+ // 对选择的列进行排序
455
+ sortModelval() {
456
+ let sortModel = []
457
+ Object.keys(this.fields).forEach((key) => {
458
+ if (this.modelval.includes(key)) {
459
+ sortModel.push(key)
460
+ }
461
+ })
462
+ this.modelval = sortModel
463
+ console.log('选择的打印的字段', this.modelval)
464
+ },
465
+ async updateParams() {
466
+ await this.$MagLoadParams.loadParam(this.f_filialeid)
467
+ this.initParams()
468
+ },
469
+ },
470
+ watch: {
471
+ 'all'(val) {
472
+ if (val) {
473
+ this.modelval = this.bodyData
474
+ } else {
475
+ this.modelval = defaultPrint.config
476
+ this.put()
477
+ }
478
+ },
479
+ 'modelval.length'() {
480
+ this.put()
481
+ },
482
+ 'orgCondtionStr'(val) {
483
+ let res = val.match(/'(.*?)'/)
484
+ console.log('正则提取:',res && res[1])
485
+ if (res) {
486
+ this.f_filialeid = res[1]
487
+ this.updateParams()
488
+ }
489
+ }
490
+ },
491
+ computed: {
492
+ getCondition() {
493
+ return {condition: `${this.$refs.paged.$refs.cri.condition}` + this.orgCondtionStr}
494
+ },
495
+ getfield() {
496
+ return exportConfig.fillgasConfig
497
+ },
498
+ fillGasTypes() {
499
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('补气类型')]
500
+ },
501
+ chargeState() {
502
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('补气状态')]
503
+ }
504
+ }
505
+ }
506
+ </script>