manage-client 3.3.109 → 3.3.110

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "manage-client",
3
- "version": "3.3.109",
3
+ "version": "3.3.110",
4
4
  "description": "经营管控模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -0,0 +1,682 @@
1
+ <template>
2
+ <div id="unit" class="flex-row">
3
+ <div class="basic-main">
4
+ <div class="flex" v-if="!show">
5
+ <criteria-paged :model="model" v-ref:paged>
6
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
7
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial >
8
+ <div class="row">
9
+ <div class="col-sm-2 form-group">
10
+ <label class="font_normal_body">公&emsp;&emsp;司&emsp;</label>
11
+ <right-tree @re-res="$parent.$parent.getorg"
12
+ :initresid='$parent.$parent.org'></right-tree>
13
+ </div>
14
+
15
+ <div class="col-sm-2 form-group ">
16
+ <label for="startDate" class="font_normal_body">抄表开始&emsp;</label>
17
+ <datepicker id="startDate" placeholder="开始日期"
18
+ v-model="model.startDate"
19
+ style="width:60%"
20
+ :value.sync="model.startDate"
21
+ :disabled-days-of-Week="[]"
22
+ :format="'yyyy-MM-dd HH:mm:ss'"
23
+ :show-reset-button="reset">
24
+ </datepicker>
25
+ </div>
26
+ <div class="col-sm-2 form-group ">
27
+ <label for="startDate" class="font_normal_body">抄表结束&emsp;</label>
28
+ <datepicker id="endDate" placeholder="结束日期"
29
+ v-model="model.endDate"
30
+ style="width:60%"
31
+ :value.sync="model.endDate"
32
+ :disabled-days-of-Week="[]"
33
+ :format="'yyyy-MM-dd HH:mm:ss'"
34
+ :show-reset-button="reset">
35
+ </datepicker>
36
+ </div>
37
+
38
+ <div class="col-sm-2 form-group ">
39
+ <label for="f_gasproperties"class="font_normal_body">用气性质&emsp;</label>
40
+ <v-select id="f_gasproperties"
41
+ style="width:60%"
42
+ v-model="model.f_gasproperties"
43
+ placeholder='用气性质'
44
+ :value.sync="model.f_gasproperties"
45
+ :options='$parent.$parent.gasproperties'
46
+ condition="f_gasproperties = '{}'"
47
+ close-on-select >
48
+ </v-select>
49
+ </div>
50
+ <div class="span" style="float:right;">
51
+ <button class="btn button_search" @click="search()">查询</button>
52
+ <button class="btn button_clear" @click="$parent.$parent.clear()">清空</button>
53
+ <export-excel :data="$parent.$parent.getCondition"
54
+ :field="$parent.$parent.getfield"
55
+ :footer="$parent.$parent.footer"
56
+ :header="$parent.$parent.other"
57
+ sqlurl="rs/logic/exportfile"
58
+ :sql-name="$parent.$parent.sqlName"
59
+ template-name='用气稽查导出' :choose-col="true"></export-excel>
60
+ <print-data :model="$parent.model" :field="$parent.$parent.getfield" :defaultfield="$parent.$parent.defaultfield" print-name="稽查查询打印" :sumsmodel="$parent.$parent.sumsmodel" ></print-data>
61
+ <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>
62
+
63
+ </div>
64
+ </div>
65
+ <div class="row" v-show="$parent.$parent.criteriaShow">
66
+ <div class="col-sm-2 form-group">
67
+ <label class="font_normal_body" title="二级用气性质">二级性质</label>
68
+ <v-select :value.sync="model.f_gasproperties_second" v-model="model.f_gasproperties_second"
69
+ :options='$parent.$parent.gaspropertiessecond' placeholder='二级用气性质'
70
+ condition="f_gasproperties_second = '{}'"
71
+ close-on-select></v-select>
72
+ </div>
73
+ <div class="col-sm-2 form-group">
74
+ <label class="font_normal_body">客户状态&emsp; </label>
75
+ <v-select :value.sync="model.f_user_state"
76
+ v-model="model.f_user_state"
77
+ :options='$parent.$parent.userstates' placeholder='请选择'
78
+ condition="f_user_state = '{}'"
79
+ close-on-select></v-select>
80
+ </div>
81
+ <div class="col-sm-2 form-group">
82
+ <label class="font_normal_body">气表状态&emsp;</label>
83
+ <v-select :value.sync="model.f_table_state"
84
+ v-model="model.f_table_state"
85
+ :options='$parent.$parent.tablestate' placeholder='请选择'
86
+ condition="f_table_state = '{}'"
87
+ close-on-select></v-select>
88
+ </div>
89
+ <div class="col-sm-2 form-group">
90
+ <label class="font_normal_body">表&emsp;&emsp;号&emsp;</label>
91
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_meternumber"
92
+ condition="f_meternumber = '{}'" placeholder='表号'>
93
+ </div>
94
+ <div class="col-sm-2 form-group ">
95
+ <label class="font_normal_body">用户类型&emsp;</label>
96
+ <v-select :value.sync="model.f_user_type"
97
+ @change="$parent.$parent.userTypeChange()"
98
+ :options='$parent.$parent.usertypes' placeholder='请选择' v-model="model.f_user_type"
99
+ condition="f_user_type = '{}'"
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.pricetype" v-model="model.pricetype"
105
+ placeholder='气价类型' :options="$parent.$parent.pricetypes"
106
+ close-on-select v-ref:type>
107
+ </v-select>
108
+ </div>
109
+ <div class="col-sm-2 form-group">
110
+ <label class="font_normal_body">气价名称</label>
111
+ <v-select :value.sync="model.f_price_name"
112
+ v-model="model.f_price_name"
113
+ :options="$parent.$parent.getPricenames"
114
+ condition="f_price_name = '{}'"
115
+ close-on-select></v-select>
116
+ </div>
117
+ <div class="col-sm-2 form-group">
118
+ <label class="font_normal_body">客户名称&emsp;</label>
119
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
120
+ condition="f_user_name like '%{}%'" placeholder="客户名称">
121
+ </div>
122
+ <div class="col-sm-2 form-group">
123
+ <label class="font_normal_body">客户编号&emsp;</label>
124
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_userinfo_code"
125
+ condition="f_userinfo_code = '{}' " placeholder="客户编号">
126
+ </div>
127
+ <div class="col-sm-2 form-group">
128
+ <label class="font_normal_body" title="旧客户编号">档案编号&emsp;</label>
129
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_olduserinfo_code"
130
+ condition="f_olduserinfo_code = '{}' " placeholder="档案编号">
131
+ </div>
132
+ <div class="col-sm-2 form-group">
133
+ <label class="font_normal_body">表箱号&emsp;&emsp;</label>
134
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_metertitles"
135
+ condition="f_metertitles = '{}'" placeholder="表箱号">
136
+ </div>
137
+ <div class="col-sm-2 form-group">
138
+ <label class="font_normal_body">客户地址&emsp;</label>
139
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_address"
140
+ condition="f_address like '%{}%'" placeholder='客户地址'>
141
+ </div>
142
+ <div class="col-sm-2 form-group">
143
+ <label class="font_normal_body">客户电话&emsp;</label>
144
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_phone"
145
+ condition="f_user_phone like '%{}%'" placeholder="客户电话">
146
+ </div>
147
+ <div class="col-sm-2 form-group">
148
+ <label class="font_normal_body">气表品牌&emsp;</label>
149
+ <v-select :value.sync="model.f_meter_brand"
150
+ v-model="model.f_meter_brand"
151
+ :options='$parent.$parent.meterbrands' placeholder='请选择'
152
+ condition="f_meter_brand = '{}'"
153
+ close-on-select></v-select>
154
+ </div>
155
+ <div class="col-sm-2 form-group">
156
+ <label class="font_normal_body">表册片区&emsp;</label>
157
+ <v-select :value.sync="model.f_book_slice_area" v-model="model.f_book_slice_area"
158
+ :options='$parent.$parent.bookSlice' placeholder='片区/表册'
159
+ style="width:60%"
160
+ close-on-select
161
+ condition="f_book_slice_area = '{}'"></v-select>
162
+ </div>
163
+ <div class="col-sm-2 ">
164
+ <label for="f_meter_classify" class="font_normal_body">表类型&emsp;&emsp;</label>
165
+ <v-select id="f_meter_classify"
166
+ v-model="model.meter_classify"
167
+ placeholder='表类型'
168
+ style="width:70%"
169
+ :value.sync="model.meter_classify"
170
+ :options='$parent.$parent.f_meter_classify'
171
+ condition="f_meter_classify like '%{}'"
172
+ :value-single="true"
173
+ close-on-select >
174
+ </v-select>
175
+ </div>
176
+ <div class="col-sm-2 form-group flex-row" style="white-space: nowrap">
177
+ <label class="font_normal_body">欠费月数&emsp;</label>
178
+ <div class="row">
179
+ <input type="text" style="width:30%" class="input_search" v-model="model.model.qianfei_month_nummin"
180
+ placeholder="">
181
+ <label class="font_normal_body"> ≤ x ≤ </label>
182
+ <input type="text" style="width:30%" class="input_search" v-model="model.model.qianfei_month_nummax"
183
+ placeholder="">
184
+ </div>
185
+ </div>
186
+
187
+ <div class="col-sm-2 form-group flex-row" style="white-space: nowrap">
188
+ <label class="font_normal_body">欠费条数&emsp;</label>
189
+ <div class="row">
190
+ <input type="text" style="width:30%" class="input_search" v-model="model.model.qianfei_nummin"
191
+ placeholder="">
192
+ <label class="font_normal_body"> ≤ x ≤ </label>
193
+ <input type="text" style="width:30%" class="input_search" v-model="model.model.qianfei_nummax"
194
+ placeholder="">
195
+ </div>
196
+ </div>
197
+ <div class="col-sm-2 form-group flex-row" style="white-space: nowrap">
198
+ <label class="font_normal_body">总欠费气量</label>
199
+ <div class="row">
200
+ <input type="text" style="width:30%" class="input_search" v-model="model.model.f_totalowe_gasmin"
201
+ placeholder="">
202
+ <label class="font_normal_body"> ≤ x ≤ </label>
203
+ <input type="text" style="width:30%" class="input_search" v-model="model.model.f_totalowe_gasmax"
204
+ placeholder="">
205
+ </div>
206
+ </div>
207
+ <div class="col-sm-2 form-group flex-row" style="white-space: nowrap">
208
+ <label class="font_normal_body">总欠费金额</label>
209
+ <div class="row">
210
+ <input type="text" style="width:30%" class="input_search" v-model="model.model.f_totalowe_feemin"
211
+ placeholder="">
212
+ <label class="font_normal_body"> ≤ x ≤ </label>
213
+ <input type="text" style="width:30%" class="input_search" v-model="model.model.f_totalowe_feemax"
214
+ placeholder="">
215
+ </div>
216
+ </div>
217
+ <div class="col-sm-2 form-group flex-row" style="white-space: nowrap">
218
+ <label class="font_normal_body">欠费月平均气量</label>
219
+ <div class="row">
220
+ <input type="text" style="width:30%" class="input_search" v-model="model.model.qianfei_avg_gasmin"
221
+ placeholder="">
222
+ <label class="font_normal_body"> ≤ x ≤ </label>
223
+ <input type="text" style="width:30%" class="input_search" v-model="model.model.qianfei_avg_gasmax"
224
+ placeholder="">
225
+ </div>
226
+ </div>
227
+ <div class="col-sm-2 form-group flex-row" style="white-space: nowrap">
228
+ <label class="font_normal_body">用气量&emsp;&emsp;</label>
229
+ <div class="row">
230
+ <input type="text" style="width:30%" class="input_search" v-model="model.model.f_oughtamount_min"
231
+ placeholder="">
232
+ <label class="font_normal_body"> ≤ x ≤ </label>
233
+ <input type="text" style="width:30%" class="input_search" v-model="model.model.f_oughtamount_max"
234
+ placeholder="">
235
+ </div>
236
+ </div>
237
+ </div>
238
+
239
+ </div>
240
+ </criteria>
241
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
242
+ <template partial='head'>
243
+ <tr>
244
+ <th><nobr>序号</nobr></th>
245
+ <th><nobr>客户编号</nobr></th>
246
+ <th><nobr>客户电话</nobr></th>
247
+ <th><nobr>档案编号</nobr></th>
248
+ <th><nobr>表号</nobr></th>
249
+ <th><nobr>客户名称</nobr></th>
250
+ <th><nobr>地址</nobr></th>
251
+ <th><nobr>表箱号</nobr></th>
252
+ <th><nobr>用户类型</nobr></th>
253
+ <th><nobr>用气性质</nobr></th>
254
+ <th><nobr>二级用气性质</nobr></th>
255
+ <th><nobr>表具状态</nobr></th>
256
+ <th><nobr>客户状态</nobr></th>
257
+ <th><nobr>气价名称</nobr></th>
258
+ <th><nobr>气表品牌</nobr></th>
259
+ <th><nobr>表册片区</nobr></th>
260
+ <th><nobr>当前表底数</nobr></th>
261
+ <th><nobr>最后抄表日期</nobr></th>
262
+ <th><nobr>用气量</nobr></th>
263
+ <th><nobr>用气金额</nobr></th>
264
+ <th><nobr>欠费月数</nobr></th>
265
+ <th><nobr>欠费条数</nobr></th>
266
+ <th><nobr>欠费月平均气量</nobr></th>
267
+ <th><nobr>欠费气量</nobr></th>
268
+ <th><nobr>欠费金额</nobr></th>
269
+ </tr>
270
+ </template>
271
+ <template partial='body'>
272
+ <td style="text-align: center;"><nobr>{{$index+1}}</nobr></td>
273
+ <td style="text-align: center;"><nobr>
274
+ <span @click="$parent.$parent.$parent.showmsg(row)"><a>{{row.f_userinfo_code}}</a></span>
275
+ </nobr> </td>
276
+ <td style="text-align: center;"><nobr>{{row.f_user_phone}}</nobr></td>
277
+ <td style="text-align: center;"><nobr>{{row.f_olduserinfo_code}}</nobr></td>
278
+ <td style="text-align: center;"><nobr>{{row.f_meternumber}}</nobr></td>
279
+ <th style="text-align: center;"><nobr>{{row.f_user_name}}</nobr></th>
280
+ <th style="text-align: center;"><nobr>{{row.f_address}}</nobr></th>
281
+ <th style="text-align: center;"><nobr>{{row.f_metertitles}}</nobr></th>
282
+ <th style="text-align: center;"><nobr>{{row.f_user_type}}</nobr></th>
283
+ <th style="text-align: center;"><nobr>{{row.f_gasproperties}}</nobr></th>
284
+ <th style="text-align: center;"><nobr>{{row.f_gasproperties_second}}</nobr></th>
285
+ <th style="text-align: center;"><nobr>{{row.f_table_state}}</nobr></th>
286
+ <th style="text-align: center;"><nobr>{{row.f_user_state}}</nobr></th>
287
+ <th style="text-align: center;"><nobr>{{row.f_price_name}}</nobr></th>
288
+ <th style="text-align: center;"><nobr>{{row.f_meter_brand}}</nobr></th>
289
+ <th style="text-align: center;"><nobr>{{row.f_book_slice_area}}</nobr></th>
290
+ <th style="text-align: center;"><nobr>{{row.f_meter_base}}</nobr></th>
291
+ <th style="text-align: center;"><nobr>{{row.end_time}}</nobr></th>
292
+ <th style="text-align: center;"><nobr>{{row.f_oughtamount}}</nobr></th>
293
+ <th style="text-align: center;"><nobr>{{row.f_oughtfee}}</nobr></th>
294
+ <th style="text-align: center;"><nobr>{{row.qianfei_month_num}}</nobr></th>
295
+ <th style="text-align: center;"><nobr>{{row.qianfei_num}}</nobr></th>
296
+ <th style="text-align: center;"><nobr>{{row.qianfei_avg_gas}}</nobr></th>
297
+ <th style="text-align: center;"><nobr>{{row.f_totalowe_gas}}</nobr></th>
298
+ <th style="text-align: center;"><nobr>{{row.f_totalowe_fee}}</nobr></th>
299
+ </template>
300
+ </data-grid>
301
+ </criteria-paged>
302
+ <table class="table-hover">
303
+ <tr style="position: relative" class="table-bordered">
304
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">汇总信息</td>
305
+ <td style="display: inline-block;width: auto;border-right: 1px solid #f2f6fa;padding: 0px 10px 0px 10px;font-weight: bold">总用气量:&emsp;&emsp;{{sumsmodel.f_oughtamount}}</td>
306
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">总用气金额:&emsp;&emsp;{{sumsmodel.f_oughtfee}}</td>
307
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">总欠费条数:&emsp;&emsp;{{sumsmodel.qianfei_num}}</td>
308
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">总欠费气量:&emsp;{{sumsmodel.f_totalowe_gas}}</td>
309
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">总欠费金额:&emsp;{{sumsmodel.f_totalowe_fee}}</td>
310
+ </tr>
311
+ </table>
312
+ </div>
313
+ <div class="flex" v-if="show">
314
+ <user-info-detail-manage-new :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage-new>
315
+ </div>
316
+ </div></div>
317
+ </template>
318
+ <script>
319
+ /**
320
+ *用户档案查询列表以及添加操作组件
321
+ */
322
+ import { PagedList } from 'vue-client'
323
+ import Vue from 'vue'
324
+ import plugin from 'system-clients/src/plugins/GetLoginInfoService'
325
+
326
+ let readySomething = async function (self) {
327
+ await self.$MagLoadParams.loadParam()
328
+ self.initParams()
329
+ self.initSlice(self.$login.f.orgid)
330
+ let year = new Date().getFullYear()
331
+ self.$refs.paged.$refs.cri.model.startDate = year+'-01-01 00:00:00'
332
+ self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString() + ' 23:59:59'
333
+ self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
334
+ self.prices = self.$MagGetSaleParam.getPrices();
335
+ }
336
+ export default {
337
+ title: '用气稽查',
338
+ data () {
339
+ return {
340
+ other:[],
341
+ footer:[],
342
+ org:[this.$login.f.orgid],
343
+ criteriaShow: false,
344
+ filialeNameStr: null,
345
+ filialeCodeStr: `and f_orgid = ${this.$login.f.orgid}`,
346
+ userid: this.$login.f.id,
347
+ source: `tool.getFullTree(this.getRights().where(row.getType() == $organization$))`,
348
+ model: new PagedList('rs/sql/getGasInspection', 50,{mycondition:'this.model.model.mycondition'},{
349
+ f_oughtamount:0,
350
+ f_oughtfee:0,
351
+ qianfei_num:0,
352
+ f_totalowe_gas:0,
353
+ f_totalowe_fee:0
354
+ }),
355
+ prices: [],
356
+ rows: null,
357
+ //orgid:'',
358
+ sumsmodel: {},
359
+ sqlName:'getGasInspection',
360
+ gaspropertiessecond: this.$appdata.getParam('二级用气性质') ? [{
361
+ label: '全部',
362
+ value: ''
363
+ }, ...this.$appdata.getParam('二级用气性质')] : [],
364
+ config: {
365
+ defaultPrint: ['f_userinfo_code','f_user_id']
366
+ },
367
+ show:false,
368
+ rowdata:{},
369
+ initres: {
370
+ org:[this.$login.f.orgid],
371
+ dep:[],
372
+ user:[],
373
+ },
374
+ // qianfei_month_nummin:null,
375
+ // qianfei_month_nummax:null,
376
+ // qianfei_nummin:null,
377
+ // qianfei_nummax:null,
378
+ // qianfei_avg_gasmin:null,
379
+ // qianfei_avg_gasmax:null,
380
+ // f_totalowe_feemin:null,
381
+ // f_totalowe_feemax:null,
382
+ // f_totalowe_gasmin:null,
383
+ // f_totalowe_gasmax:null,
384
+ mycondition:null,
385
+ defaultfield: [],
386
+ meterbrands: [],
387
+ // 表册片区
388
+ bookSlice:[],
389
+ f_filialeid: this.$login.f.orgid,
390
+
391
+ }
392
+ },
393
+ watch:{
394
+ sumsmodel:{
395
+ handler: function(val) {
396
+ this.getotherfooter();
397
+ },
398
+ deep: true
399
+ }
400
+ },
401
+ ready () {
402
+ readySomething(this).then(() => {
403
+ this.$emit('ready')
404
+ }).catch((error) => {
405
+ this.$emit('error', error)
406
+ })
407
+ },
408
+ methods: {
409
+ // 初始化抄表册片区
410
+ async initSlice (val) {
411
+ if (val) {
412
+ let getAllArea = await this.$resetpost('/rs/search', {
413
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
414
+ userid: this.$login.f.id
415
+ }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
416
+ let arr = getAllArea.data.filter((res) => {
417
+ return res.parentid == val
418
+ })
419
+ this.bookSlice = [{label: '全部',value: ''}]
420
+ arr.forEach((res) => {
421
+ this.bookSlice.push({label: res.name, value: res.name})
422
+ })
423
+ }
424
+ },
425
+ initParams () {
426
+ // 初始化气表品牌
427
+ let brandArr = []
428
+ this.$MagGetSaleParam.getGasbrand().forEach((item) => {
429
+ let temp = {}
430
+ temp.label = item.label
431
+ temp.value = item.value.f_meter_brand
432
+ brandArr.push(temp)
433
+ })
434
+ this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
435
+ },
436
+ getotherfooter(){
437
+ // this.$refs.paged.$refs.cri.$refs.exports.otherData=[];
438
+ // this.$refs.paged.$refs.cri.$refs.exports.footerData=[];
439
+ this.other=[];
440
+ this.footer=[];
441
+ // let exportdata = this.$refs.paged.$refs.cri.model.model.mycondition;
442
+ let otherInData=[];
443
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
444
+ let footerData=[],exportfield=this.getfield;
445
+ footerData.push("合计");
446
+ let self = this;
447
+ for(var field in self.sumsmodel){
448
+ footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
449
+ }
450
+ this.footer.push(footerData);
451
+ this.other.push(otherInData);
452
+ },
453
+ cancel() {
454
+ this.show = false
455
+ },
456
+ showmsg(obj){
457
+ this.rowdata=obj
458
+ this.show=true
459
+ },
460
+ async getorg (obj) {
461
+ console.log('组织变化',obj)
462
+ if(obj && obj.resids && obj.resids[0]){
463
+ this.initSlice(obj.resids[0])
464
+ }
465
+
466
+ if(obj.resids.length>0){
467
+ this.filialeCodeStr =" and f_orgid in " + plugin.convertToIn(obj.resids)
468
+ }
469
+ else{
470
+ this.filialeCodeStr= " and f_orgid = " + this.$login.f.orgid
471
+ }
472
+ },
473
+ userTypeChange () {
474
+ this.gasproperties=[]
475
+ if(this.$refs.paged.model.model !==null) {
476
+ this.$refs.paged.model.model.f_gasproperties=''
477
+ this.gasproperties = this.$appdata.getParam(this.$refs.paged.model.model.f_user_type[0])
478
+ // this.gasproperties.push({label: '全部', value: ''})
479
+ console.log(this.gasproperties )
480
+ }
481
+ else{
482
+ this.gasproperties =[{label: '全部', value: ''}]
483
+ }
484
+ },
485
+ search () {
486
+ this.$refs.paged.$refs.cri.search()
487
+ },
488
+ selfSearch (args) {
489
+ let a = " and 1=1 "
490
+ let m=this.$refs.paged.$refs.cri.model.model;
491
+ if(m.qianfei_month_nummin!=null && m.qianfei_month_nummin!=''){
492
+ a += " and qianfei_month_num >= "+this.$refs.paged.$refs.cri.model.model.qianfei_month_nummin
493
+ }
494
+ if(m.qianfei_month_nummax!=null&&m.qianfei_month_nummax!=''){
495
+ a+=' and qianfei_month_num <= '+this.$refs.paged.$refs.cri.model.model.qianfei_month_nummax
496
+ }
497
+ if(m.qianfei_nummin!=null&&m.qianfei_nummin!=''){
498
+ a += " and qianfei_num >= "+this.$refs.paged.$refs.cri.model.model.qianfei_nummin
499
+ }
500
+ if(m.qianfei_nummax!=null&&m.qianfei_nummax!=''){
501
+ a +=" and qianfei_num <= "+this.$refs.paged.$refs.cri.model.model.qianfei_nummax
502
+ }
503
+ if(m.qianfei_avg_gasmin!=null&&m.qianfei_avg_gasmin!=''){
504
+ a +=" and qianfei_avg_gas >= "+this.$refs.paged.$refs.cri.model.model.qianfei_avg_gasmin
505
+ }
506
+ if(m.qianfei_avg_gasmax!=null&&m.qianfei_avg_gasmax!=''){
507
+ a += " and qianfei_avg_gas <= "+this.$refs.paged.$refs.cri.model.model.qianfei_avg_gasmax
508
+ }
509
+ if(m.f_totalowe_feemin!=null&&m.f_totalowe_feemin!=''){
510
+ a += " and f_totalowe_fee >= "+this.$refs.paged.$refs.cri.model.model.f_totalowe_feemin
511
+ }
512
+ if(m.f_totalowe_feemax!=null&&m.f_totalowe_feemax!=''){
513
+ a += " and f_totalowe_fee <= "+this.$refs.paged.$refs.cri.model.model.f_totalowe_feemax
514
+ }
515
+ if(m.f_totalowe_gasmin!=null&&m.f_totalowe_gasmin!=''){
516
+ a += " and f_totalowe_gas >= "+this.$refs.paged.$refs.cri.model.model.f_totalowe_gasmin
517
+ }
518
+ if(m.f_totalowe_gasmax!=null&&m.f_totalowe_gasmax!=''){
519
+ a += " and f_totalowe_gas <= "+this.$refs.paged.$refs.cri.model.model.f_totalowe_gasmax
520
+ }
521
+ if (m.f_oughtamount_min) {
522
+ a += " and f_oughtamount >= "+this.$refs.paged.$refs.cri.model.model.f_oughtamount_min
523
+ }
524
+ if (m.f_oughtamount_max) {
525
+ a += " and f_oughtamount <= "+this.$refs.paged.$refs.cri.model.model.f_oughtamount_max
526
+ }
527
+ if (m.f_book_slice_area) {
528
+ a += ` and f_book_slice_area = '${this.$refs.paged.$refs.cri.model.model.f_book_slice_area}'`
529
+ }
530
+ if(this.$refs.paged.$refs.cri.model.startDate){
531
+ this.model.params.startDate = `'${this.$refs.paged.$refs.cri.model.startDate}' `
532
+ }else{
533
+ this.model.params.startDate = this.$login.toStandardDateString() + ' 00:00:00'
534
+ }
535
+
536
+ if(this.$refs.paged.$refs.cri.model.endDate){
537
+ this.model.params.endDate = `'${this.$refs.paged.$refs.cri.model.endDate}' `
538
+ }else{
539
+ this.model.params.endDate = this.$login.toStandardDateString() + ' 23:59:59'
540
+ }
541
+ this.mycondition = a
542
+ args.condition = args.condition+ ` ${this.filialeCodeStr}`
543
+ args.condition = args.condition+ ` ${a}`
544
+ console.log("拼接的condition", args.condition, this.model)
545
+ this.model.search(args.condition, args.model)
546
+ },
547
+ hidden(){
548
+ this.criteriaShow = !this.criteriaShow
549
+ },
550
+ clear(){
551
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
552
+ if (key != 'startDate' && key != 'endDate')
553
+ if (key == 'model')
554
+ this.$refs.paged.$refs.cri.model[key] = {}
555
+ else
556
+ this.$refs.paged.$refs.cri.model[key] = []
557
+ })
558
+ this.$refs.paged.$refs.cri.model.contain_newfile='是'
559
+ let year = new Date().getFullYear()
560
+ this.$refs.paged.$refs.cri.model.startDate = year+'-01-01'
561
+ this.$refs.paged.$refs.cri.model.endDate = this.$login.toStandardDateString()
562
+ }
563
+
564
+ },
565
+ computed: {
566
+ getPricenames() {
567
+ let f_user_type = this.$refs.paged.$refs.cri.model.f_user_type;
568
+ let f_gasproperties = this.$refs.paged.$refs.cri.model.f_gasproperties;
569
+ let pricetype = this.$refs.paged.$refs.cri.model.pricetype;
570
+ console.log("打印一下:",f_user_type,f_gasproperties,pricetype,this.f_filialeid,this.prices)
571
+ if(this.$refs.paged.$refs.cri.model !==null) {
572
+ let rs = []
573
+ let priceArr = []
574
+ if ( pricetype.length >0) {
575
+ let params = {
576
+ f_price_type: pricetype[0],
577
+ filter: this.f_filialeid,
578
+ prices: this.prices
579
+ }
580
+ this.$MagGetSaleParam.getPrice(params).forEach((item) => {
581
+ let temp = {}
582
+ temp.label = item.label
583
+ temp.value = item.value.f_price_name
584
+ priceArr.push(temp)
585
+ })
586
+ rs = [{label: '全部', value: ''}, ...priceArr]
587
+ }
588
+ if (rs.length === 0) {
589
+ console.log('rs读出来是空')
590
+ this.$refs.paged.$refs.cri.model.f_price_name = ''
591
+ }
592
+ return rs
593
+ }
594
+ },
595
+ userstates (){
596
+ return this.$appdata.getParam('用户状态') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('用户状态')] : []
597
+ },
598
+ tablestate() {
599
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('气表状态')]
600
+ },
601
+ pricetypes() {
602
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('气价类型')]
603
+ },
604
+ getfield() {
605
+ return {
606
+ 'f_userinfo_code': '客户编号',
607
+ 'f_user_phone': '客户电话',
608
+ 'f_olduserinfo_code': '档案编号',
609
+ 'f_meternumber': '表号',
610
+ 'f_user_name': '客户名称',
611
+ 'f_address': '地址',
612
+ 'f_metertitles': '表箱号',
613
+ 'f_user_type': '用户类型',
614
+ 'f_gasproperties': '用气性质',
615
+ 'f_gasproperties_second': '二级用气性质',
616
+ 'f_price_name': '气价名称',
617
+ 'f_table_state': '表具状态',
618
+ 'f_user_state': '用户状态',
619
+ 'f_meter_brand': '气表品牌',
620
+ 'f_book_slice_area': '表册片区',
621
+ 'end_time': '最后抄表日期',
622
+ 'f_meter_base': '表底数',
623
+ 'f_oughtamount': '用气量',
624
+ 'f_oughtfee': '用气金额',
625
+ 'qianfei_month_num': '欠费月数',
626
+ 'qianfei_num': '欠费条数',
627
+ 'qianfei_avg_gas': '欠费月平均气量',
628
+ 'f_totalowe_gas': '欠费气量',
629
+ 'f_totalowe_fee': '欠费金额'
630
+ }
631
+ },
632
+ usertypes() {
633
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('用户类型')]
634
+ },
635
+ gasproperties() {
636
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('用气性质')]
637
+ },
638
+ f_meter_classify(){
639
+ return [{label: '全部', value: ''}, {label: '卡表', value: '卡表'},{label: '机表', value: '机表'},{label: '网表', value: '物联网表'} ]
640
+ // return [{label: '卡表', value: '卡表'}]
641
+ },
642
+ getCondition () {
643
+ let result = {
644
+ condition: '',
645
+ startDate: '',
646
+ endDate: '',
647
+ mycondition:''
648
+ }
649
+ result.condition = this.$refs.paged.$refs.cri.condition + this.filialeCodeStr
650
+ result.condition = result.condition + this.mycondition
651
+ let temp2 = this.$refs.paged.$refs.cri
652
+ if (temp2.model.startDate && temp2.model.endDate) {
653
+ result.startDate = ` '${temp2.model.startDate}'`
654
+ result.endDate = ` '${temp2.model.endDate}'`
655
+ } if (!temp2.model.startDate && !temp2.model.endDate) {
656
+ result.startDate = this.$login.toStandardDateString() + ' 00:00:00'
657
+ result.endDate = this.$login.toStandardDateString() + ' 23:59:59'
658
+ }
659
+ if (temp2.model.startDate&&!temp2.model.endDate) {
660
+ result.startDate = ` '${temp2.model.startDate}'`
661
+ result.endDate = this.$login.toStandardDateString() + ' 23:59:59'
662
+ } if (temp2.model.endDate&&!temp2.model.startDate) {
663
+ result.startDate = this.$login.toStandardDateString() + ' 00:00:00'
664
+ result.endDate = ` '${temp2.model.endDate}'`
665
+ }
666
+ if (temp2.model.contain_newfile==='否'){
667
+ result.condition = result.condition+" and f_open_date not between " + result.startDate + " and " + result.endDate
668
+ }
669
+ return result
670
+ }
671
+ }
672
+ }
673
+ </script>
674
+ <style media="screen">
675
+ .divtext {
676
+ min-width: 50px;
677
+ max-width: 200px;
678
+ border: 1px solid green;
679
+ display: inline-block;
680
+ }
681
+ </style>
682
+
@@ -20,4 +20,8 @@ export default function () {
20
20
  Vue.component('inspect-list-gas', (resolve) => {
21
21
  require(['./InspectListGas'], resolve)
22
22
  })
23
+ // 用气稽查
24
+ Vue.component('gas-inspection', (resolve) => {
25
+ require(['./GasInspection'], resolve)
26
+ })
23
27
  }