manage-client-xy 3.2.28 → 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 (31) hide show
  1. package/build/dev-server.js +2 -2
  2. package/package.json +1 -1
  3. package/src/components/SellReport/FinancialStatement.vue +30 -0
  4. package/src/components/SellReport/ManageBusSummary.vue +241 -241
  5. package/src/components/SellReport/SmartKitchenSummary.vue +275 -275
  6. package/src/components/SellReport/UserNumber.vue +30 -0
  7. package/src/components/SellReport/XianYangNewCharge.vue +355 -355
  8. package/src/components/sale/businessquery/AreaGeneralQuery.vue +715 -700
  9. package/src/components/sale/businessquery/CMHGasQuery.vue +441 -411
  10. package/src/components/sale/businessquery/ChangeMeterQuery.vue +659 -630
  11. package/src/components/sale/businessquery/ChangeUserQuery.vue +403 -373
  12. package/src/components/sale/businessquery/ChargeQuery.vue +1027 -997
  13. package/src/components/sale/businessquery/DisableQuery.vue +433 -403
  14. package/src/components/sale/businessquery/EnableQuery.vue +422 -392
  15. package/src/components/sale/businessquery/FMYGasQuery.vue +440 -410
  16. package/src/components/sale/businessquery/FillCardQuery.vue +522 -492
  17. package/src/components/sale/businessquery/FillGasQuery.vue +506 -476
  18. package/src/components/sale/businessquery/HandplanQuery.vue +728 -698
  19. package/src/components/sale/businessquery/LogQuery.vue +301 -269
  20. package/src/components/sale/businessquery/NewAccountQuery.vue +518 -488
  21. package/src/components/sale/businessquery/OtherChargeQuery.vue +432 -402
  22. package/src/components/sale/businessquery/RecordQuery.vue +399 -369
  23. package/src/components/sale/businessquery/ResidentialQuery.vue +417 -387
  24. package/src/components/sale/businessquery/ReverseQuery.vue +459 -429
  25. package/src/components/sale/businessquery/SellingHand.vue +408 -378
  26. package/src/components/sale/businessquery/TransferQuery.vue +589 -559
  27. package/src/components/sale/businessquery/cancelAccountQuery.vue +518 -488
  28. package/src/components/sale/filesquery/DeviceQuery.vue +30 -0
  29. package/src/components/sale/filesquery/MeterQuery.vue +30 -0
  30. package/src/components/sale/filesquery/UserQuery.vue +796 -764
  31. package/src/components/webmeter/DrillData/UserGasAll.vue +30 -1
@@ -1,476 +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>
120
-
121
- </div>
122
- </criteria>
123
-
124
- <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
125
- <template partial='head'>
126
- <tr>
127
- <th>
128
- <nobr>客户编号</nobr>
129
- </th>
130
- <th>
131
- <nobr>客户名称</nobr>
132
- </th>
133
- <th>
134
- <nobr>客户地址</nobr>
135
- </th>
136
- <th>
137
- <nobr>卡号</nobr>
138
- </th>
139
- <th>
140
- <nobr>气表品牌</nobr>
141
- </th>
142
- <th>
143
- <nobr>补气量</nobr>
144
- </th>
145
- <th>
146
- <nobr>补气金额</nobr>
147
- </th>
148
- <th>
149
- <nobr>补气类型</nobr>
150
- </th>
151
- <th>
152
- <nobr>补气日期</nobr>
153
- </th>
154
- <th>
155
- <nobr>补气原因</nobr>
156
- </th>
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
- </tr>
170
- </template>
171
- <template partial='body'>
172
- <td style="text-align: center;">
173
- <nobr>
174
- <span @click="$parent.$parent.$parent.dealmsg(row)"><a>{{row.f_userinfo_code}}</a></span></nobr>
175
- </td>
176
- <td style="text-align: center;">
177
- <nobr>{{row.f_user_name}}</nobr>
178
- </td>
179
- <td style="text-align: center;">
180
- <nobr>{{row.f_address}}</nobr>
181
- </td>
182
- <td style="text-align: center;">
183
- <nobr>{{row.f_card_id}}</nobr>
184
- </td>
185
- <td style="text-align: center;">
186
- <nobr>{{row.f_meter_brand}}</nobr>
187
- </td>
188
- <td style="text-align: center;">
189
- <nobr>{{row.f_pregas}}</nobr>
190
- </td>
191
- <td style="text-align: center;">
192
- <nobr>{{row.f_preamount}}</nobr>
193
- </td>
194
- <td style="text-align: center;">
195
- <nobr>{{row.f_type}}</nobr>
196
- </td>
197
- <td style="text-align: center;">
198
- <nobr>{{row.f_operate_date}}</nobr>
199
- </td>
200
- <td style="text-align: center;">
201
- <nobr>{{row.f_comments}}</nobr>
202
- </td>
203
- <td style="text-align: center;">
204
- <nobr>{{row.f_operator}}</nobr>
205
- </td>
206
- <td style="text-align: center;">
207
- <nobr>{{row.f_depname}}</nobr>
208
- </td>
209
- <td style="text-align: center;">
210
- <nobr>{{row.f_outlets}}</nobr>
211
- </td>
212
- <td style="text-align: center;">
213
- <nobr>{{row.f_orgname}}</nobr>
214
- </td>
215
- </template>
216
- <template partial='foot'></template>
217
- </data-grid>
218
- </criteria-paged>
219
-
220
- <table class="table-hover">
221
- <tr style="position: relative" class="table-bordered">
222
- <td
223
- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
224
- 汇总信息
225
- </td>
226
- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">
227
- 补气量合计:&emsp;{{sumsmodel.f_pregas}}
228
- </td>
229
- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">
230
- 补气金额合计:&emsp;{{sumsmodel.f_preamount}}
231
- </td>
232
- </tr>
233
- </table>
234
- </div>
235
- <div v-if="show">
236
- <user-info-detail-manage :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage>
237
- </div>
238
- <div v-if="showAttachment">
239
- <attachment-viewer :business-id="currentRow && currentRow.id" table-name="t_fillgas" @close="closeAttachment"></attachment-viewer>
240
- </div>
241
- </div>
242
- </div>
243
- </template>
244
-
245
- <script>
246
- import {HttpResetClass, PagedList} from 'vue-client'
247
- import defaultPrint from '../config/DefaultPrint'
248
- import exportConfig from '../config/exportConfig'
249
- import AttachmentViewer from './AttachmentViewer.vue'
250
-
251
- let readySomething = async function (self) {
252
- self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString() + ' 00:00:00'
253
- self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString() + ' 23:59:59'
254
- // await self.$refs.paged.$refs.cri.search()
255
- self.initParams()
256
- await self.$MagLoadParams.loadParam()
257
- self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
258
- }
259
- export default {
260
- components: {
261
- AttachmentViewer
262
- },
263
- data() {
264
- return {
265
- data: {},
266
- model: new PagedList('rs/sql/fillGasQuery', 20, {}, {f_pregas: 0,f_preamount: 0}),
267
- criteriaShow: false,
268
- headData: ["客户编号", "客户名称", "客户电话", "身份证号", "地址", "补气类型", "表编号", "卡号", "气表品牌", "气表状态", "补气量", "补气日期", "操作员", "部门", "公司"],
269
- 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"],
270
- orgCondtionStr: '',
271
-
272
- modelval: [],
273
- printshow: false,
274
- jurisdiction:this.$login.r,
275
- all: false,
276
- fields: {},
277
- thead: '',
278
- tfoot: '',
279
- show:false,
280
- showAttachment: false,
281
- currentRow: null,
282
- rowdata:{},
283
- meterbrands: [],
284
- initres: {
285
- org:[this.$login.f.orgid],
286
- dep:[],
287
- user:[],
288
- },
289
- residentialArea:[],
290
- area:[],
291
- f_outlets: [],
292
- isPos: [{label: '全部', value: ''}, {label: '是', value: '是'}, {label: '否', value: '否'}],
293
- //合计数据
294
- sumsmodel: {}
295
- }
296
- },
297
- ready() {
298
- this.getaddress()
299
-
300
- readySomething(this).then(() => {
301
- this.$emit('ready')
302
- }).catch((error) => {
303
- this.$emit('error', error)
304
- })
305
- },
306
- methods: {
307
- async getaddress(){
308
- console.log('开始获取小区')
309
- let HttpReset = new HttpResetClass()
310
- var data = await HttpReset.load('POST', 'rs/sql/manage_getarealist', {
311
- data: {
312
- condition: '1=1'
313
- }
314
- }, {resolveMsg: null, rejectMsg: '获取小区失败!'})
315
- console.log('小区',data)
316
- let house = []
317
- for (let row of data.data){
318
- console.log('开始保存小区')
319
- house.push({label: row.f_residential_area, value: row.f_residential_area})
320
- }
321
- this.residentialArea = house
322
- },
323
- search(){
324
- this.$refs.paged.$refs.cri.search()
325
- },
326
- initParams() {
327
- // 初始化气表品牌
328
- let brandArr = []
329
- this.$MagGetSaleParam.getGasbrand().forEach((item) => {
330
- let temp = {}
331
- temp.label = item.label
332
- temp.value = item.value.f_meter_brand
333
- brandArr.push(temp)
334
- })
335
- this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
336
- },
337
- selfSearch(args) {
338
- //小区查询条件
339
- this.area = this.$refs.paged.$refs.cri.model.f_residential_area
340
- console.log("=====小区model绑定====",this.area)
341
- if(this.area.length !== 0){
342
- let str = JSON.stringify(this.area)
343
- str = str.replace(/"/g,`'`)
344
- str = str.replace(/\[/g,``)
345
- str = str.replace(/\]/g,``)
346
- console.log("=====小区model22222222222绑定====",str)
347
- //查询多个小区时条件
348
- args.condition += ` and f_residential_area in ( ${str} )`
349
- }
350
-
351
- // 手持设备查询条件
352
- if(this.f_outlets[0] === '是'){
353
- args.condition+= ` and f_outlets = '手持设备'`
354
- } else if (this.f_outlets[0] === '否'){
355
- args.condition+= ` and f_outlets is null`
356
- }
357
-
358
- args.condition = `${args.condition}` + this.orgCondtionStr
359
- this.model.search(args.condition, args.model)
360
- this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
361
- },
362
- clear() {
363
- //清空部门和人员
364
- this.$refs.paged.$refs.cri.$refs.sel.$children[1].selectres = []
365
- //部门和人员变为全选
366
- this.$refs.paged.$refs.cri.$refs.sel.$children[1].$children[0].isSelectAll = false
367
- this.$refs.paged.$refs.cri.$refs.sel.$children[2].$children[0].isSelectAll = false
368
- Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
369
- this.$refs.paged.$refs.cri.model[key] = ''
370
- })
371
- },
372
- show() {
373
- this.criteriaShow = true
374
- },
375
- hidden() {
376
- this.criteriaShow = !this.criteriaShow
377
- },
378
- getRes(condition) {
379
- this.orgCondtionStr = condition
380
- },
381
- stamp() {
382
- this.all = false
383
- //默认选择要打印的列
384
- this.modelval = defaultPrint.config
385
- this.fields = this.getfield
386
- console.log('所有打印字段', this.fields)
387
- this.printshow = true
388
- this.put()
389
- },
390
- cancel() {
391
- this.show = false
392
- },
393
- dealmsg(val) {
394
- console.log('---------------dealmsg')
395
- this.rowdata=val
396
- this.show=true
397
- val.model = this.model.model
398
- this.$dispatch('deal-msg', val)
399
- },
400
- view(row) {
401
- this.currentRow = row;
402
- this.showAttachment = true;
403
- },
404
- closeAttachment() {
405
- this.showAttachment = false;
406
- },
407
- put() {
408
- // 对Modelval进行排序
409
- this.sortModelval()
410
- this.thead = `<tr><th colspan=${this.modelval.length}>补气查询统计报表</th></tr><tr>`
411
- for (let key of this.modelval) {
412
- this.thead += '<th>' + this.fields[key] + '</th>'
413
- }
414
- this.thead += '</tr>'
415
- },
416
- print() {
417
- this.$refs.print.PrintAsFile()
418
- this.printshow = false
419
- },
420
- close() {
421
- this.printshow = false
422
- this.all = false
423
- },
424
- // 对选择的列进行排序
425
- sortModelval() {
426
- let sortModel = []
427
- Object.keys(this.fields).forEach((key) => {
428
- if (this.modelval.includes(key)) {
429
- sortModel.push(key)
430
- }
431
- })
432
- this.modelval = sortModel
433
- console.log('选择的打印的字段', this.modelval)
434
- },
435
- async updateParams() {
436
- await this.$MagLoadParams.loadParam(this.f_filialeid)
437
- this.initParams()
438
- },
439
- },
440
- watch: {
441
- 'all'(val) {
442
- if (val) {
443
- this.modelval = this.bodyData
444
- } else {
445
- this.modelval = defaultPrint.config
446
- this.put()
447
- }
448
- },
449
- 'modelval.length'() {
450
- this.put()
451
- },
452
- 'orgCondtionStr'(val) {
453
- let res = val.match(/'(.*?)'/)
454
- console.log('正则提取:',res && res[1])
455
- if (res) {
456
- this.f_filialeid = res[1]
457
- this.updateParams()
458
- }
459
- }
460
- },
461
- computed: {
462
- getCondition() {
463
- return {condition: `${this.$refs.paged.$refs.cri.condition}` + this.orgCondtionStr}
464
- },
465
- getfield() {
466
- return exportConfig.fillgasConfig
467
- },
468
- fillGasTypes() {
469
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('补气类型')]
470
- },
471
- chargeState() {
472
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('补气状态')]
473
- }
474
- }
475
- }
476
- </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>