manage-client 3.3.244 → 3.3.245

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.
@@ -0,0 +1,449 @@
1
+ <template>
2
+ <div class="flex-row" v-show="!showdetail">
3
+ <div id='app1' class="basic-main" >
4
+ <criteria-paged :model="model" :pager='true' v-ref:paged>
5
+ <criteria partial='criteria' @condition-changed='$parent.search' v-ref:cri>
6
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" novalidate partial>
7
+ <div class="row">
8
+ <div class="col-sm-2 form-group">
9
+ <label class="font_normal_body">客户编号</label>
10
+ <input @keyup.enter="search" style="width:60%" type="text" class="input_search"
11
+ v-model="model.f_userinfo_code" placeholder='客户编号'
12
+ condition="f_userinfo_code like '%{}%'" v-el:xq v-next-el='userinfocode' v-el:username
13
+ >
14
+ </div>
15
+ <div class="col-sm-2 form-group">
16
+ <label class="font_normal_body">客户名称</label>
17
+ <input @keyup.enter="search" style="width:60%" type="text" class="input_search"
18
+ v-model="model.f_user_name" placeholder='客户名称'
19
+ condition="f_user_name like '%{}%'" v-el:xq v-next-el='username' v-el:username
20
+ >
21
+ </div>
22
+ <div class="col-sm-2 form-group">
23
+ <label class="font_normal_body">客户地址</label>
24
+ <input @keyup.enter="search" style="width:60%" type="text" class="input_search" v-model="model.f_area"
25
+ placeholder='地址'
26
+ condition="f_address like '%{}%'" v-el:xq v-next-el='address' v-el:area
27
+ >
28
+ </div>
29
+ <div class="col-sm-2 form-group">
30
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;表号&nbsp;&nbsp;&nbsp;</label>
31
+ <input @keyup.enter="search" style="width:60%" type="text" class="input_search"
32
+ v-model="model.f_meternumber" placeholder='表号'
33
+ condition="f_meternumber like '%{}%'" v-next-el='meternumber' v-el:meternumber
34
+ >
35
+ </div>
36
+ <div style="float:right">
37
+ <button class="button_search button_spacing" @click="search()">查询</button>
38
+ <button class="button_clear button_spacing" @click="clear">清空</button>
39
+ <export-excel :data="$parent.$parent.getCondition" class="button_export button_spacing"
40
+ :field="$parent.$parent.getfield" :sumname="$parent.$parent.sumName"
41
+ :header="$parent.$parent.other"
42
+ sqlurl="api/af-revenue/logic/openapi/exportfile" sql-name="webmeter_getNoMetereadData" template-name='未上报查询'
43
+ :choose-col="true"></export-excel>
44
+
45
+ <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>
46
+ </div>
47
+ </div>
48
+ <div class="row" v-show="$parent.$parent.criteriaShow">
49
+ <div class="col-sm-2 form-group">
50
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;公司&nbsp;&nbsp;&nbsp;</label>
51
+ <right-tree @re-res="$parent.$parent.getorg" width="60%"
52
+ :initresid='$parent.$parent.org'></right-tree>
53
+ </div>
54
+ <div class="col-sm-2 form-group">
55
+ <label class="font_normal_body">客户类型</label>
56
+ <v-select style="width:60%" id="f_user_type"
57
+ v-model="model.f_user_type"
58
+ placeholder='客户类型'
59
+ :value.sync="model.f_user_type"
60
+ @change="$parent.$parent.userTypeChange()"
61
+ :options='$parent.$parent.usertypes'
62
+ condition="f_user_type = '{}'"
63
+ close-on-select>
64
+ </v-select>
65
+ </div>
66
+ <div class="col-sm-2 form-group">
67
+ <label class="font_normal_body">用气性质</label>
68
+ <v-select style="width:60%" id="f_gasproperties"
69
+ v-model="model.f_gasproperties"
70
+ placeholder='用气性质'
71
+ :value.sync="model.f_gasproperties"
72
+ :options='$parent.$parent.gasproperties'
73
+ condition="f_gasproperties = '{}'"
74
+ close-on-select>
75
+ </v-select>
76
+ </div>
77
+ <div class="col-sm-2 form-group">
78
+ <label class="font_normal_body">气表品牌</label>
79
+ <v-select
80
+ placeholder='气表品牌'
81
+ :value.sync="model.f_meter_brand"
82
+ v-model="model.f_meter_brand"
83
+ :options='$parent.$parent.meterbrands'
84
+ close-on-select
85
+ condition="f_meter_brand='{}'">
86
+ </v-select>
87
+ </div>
88
+ <div class="col-sm-2 form-group" >
89
+ <label class="font_normal_body">气表型号</label>
90
+ <v-select
91
+ placeholder='气表型号'
92
+ :value.sync="model.f_meter_style"
93
+ v-model="model.f_meter_style"
94
+ :options='$parent.$parent.meterstyle[model.f_meter_brand]'
95
+ close-on-select
96
+ condition="f_meter_style='{}'">
97
+ </v-select>
98
+ </div>
99
+ <div class="col-sm-2 form-group">
100
+ <label class="font_normal_body">用户状态</label>
101
+ <v-select
102
+ placeholder='用户状态'
103
+ value-single="true"
104
+ style="width:60%"
105
+ :value.sync="model.f_user_state"
106
+ v-model="model.f_user_state"
107
+ :options='$parent.$parent.userstate'
108
+ close-on-select condition="f_user_state ='{}'">
109
+ </v-select>
110
+ </div>
111
+ <div class="col-sm-2 form-group">
112
+ <label class="font_normal_body">开始时间</label>
113
+ <datepicker style="width:60%" id="startdate" placeholder="开始时间"
114
+ v-model="model.startDate"
115
+ :value.sync="model.startDate"
116
+ :disabled-days-of-Week="[]"
117
+ :format="'yyyy-MM-dd 00:00:00'"
118
+ :show-reset-button="reset">
119
+ </datepicker>
120
+ </div>
121
+ <div class="col-sm-2 form-group">
122
+ <label class="font_normal_body">结束时间</label>
123
+ <datepicker style="width:60%" id="enddate" placeholder="结束日期"
124
+ v-model="model.endDate"
125
+ :value.sync="model.endDate"
126
+ :disabled-days-of-Week="[]"
127
+ :format="'yyyy-MM-dd 23:59:59'"
128
+ :show-reset-button="reset">
129
+ </datepicker>
130
+ </div>
131
+ <div class="col-sm-2 form-group" >
132
+ <label class="font_normal_body" title="开户时间大于">开户时间</label>
133
+ <datepicker placeholder="开户时间大于" style="width:60%"
134
+ v-model="model.f_open_start_date"
135
+ :value.sync="model.f_open_start_date"
136
+ :format="'yyyy-MM-dd'"
137
+ :show-reset-button="true"
138
+ condition="f_open_date >= '{} 00:00:00'">
139
+ </datepicker>
140
+ </div>
141
+ <div class="col-sm-2 form-group" >
142
+ <label class="font_normal_body" title="开户时间小于">开户时间</label>
143
+ <datepicker placeholder="开户时间小于" style="width:60%"
144
+ v-model="model.f_open_end_date"
145
+ :value.sync="model.f_open_end_date"
146
+ :format="'yyyy-MM-dd'"
147
+ :show-reset-button="true"
148
+ condition="f_open_date <= '{} 23:59:59'">
149
+ </datepicker>
150
+ </div>
151
+ </div>
152
+ </div>
153
+ </criteria>
154
+ <data-grid id="lostuserlist" :model="model" partial='list' v-ref:grid class="list_area table_sy">
155
+ <template partial='head'>
156
+ <tr>
157
+ <th style="text-align:center">
158
+ <nobr>序号</nobr>
159
+ </th>
160
+ <th style="text-align:center">
161
+ <nobr>未上报日期</nobr>
162
+ </th>
163
+ <th style="text-align:center">
164
+ <nobr>开户时间</nobr>
165
+ </th>
166
+ <th style="text-align:center">
167
+ <nobr>客户编号</nobr>
168
+ </th>
169
+ <th style="text-align:center">
170
+ <nobr>客户名称</nobr>
171
+ </th>
172
+ <th style="text-align:center">
173
+ <nobr>客户电话</nobr>
174
+ </th>
175
+ <th style="text-align:center">
176
+ <nobr>客户地址</nobr>
177
+ </th>
178
+ <th style="text-align:center">
179
+ <nobr>客户类型</nobr>
180
+ </th>
181
+ <th style="text-align:center">
182
+ <nobr>用气性质</nobr>
183
+ </th>
184
+ <th style="text-align:center">
185
+ <nobr>表号</nobr>
186
+ </th>
187
+ <th style="text-align:center">
188
+ <nobr>气表厂家</nobr>
189
+ </th>
190
+ <th style="text-align:center" >
191
+ <nobr>气表型号</nobr>
192
+ </th>
193
+ <th style="text-align:center" >
194
+ <nobr>用户状态</nobr>
195
+ </th>
196
+ <th style="text-align:center" >
197
+ <nobr>组织机构</nobr>
198
+ </th>
199
+ </tr>
200
+ </template>
201
+ <template partial='body'>
202
+ <td style="text-align:center">{{$index+1}}</td>
203
+ <td style="text-align:center">{{row.f_date}}</td>
204
+ <td style="text-align:center">{{row.f_open_date}}</td>
205
+ <td style="text-align: center;"><nobr>
206
+ <span @click="$parent.$parent.$parent.showmsg(row)"><a>{{row.f_userinfo_code}}</a></span>
207
+ </nobr> </td>
208
+ <td style="text-align:center"><nobr>{{row.f_user_name}}</nobr></td>
209
+ <td style="text-align:center"><nobr>{{row.f_user_phone}}</nobr></td>
210
+ <td><nobr>{{row.f_address}}</nobr></td>
211
+ <td style="text-align:center">{{row.f_user_type}}</td>
212
+ <td style="text-align:center">{{row.f_gasproperties}}</td>
213
+ <td style="text-align:center"><nobr>{{row.f_meternumber}}</nobr></td>
214
+ <td style="text-align:center">
215
+ <nobr>{{row.f_meter_brand}}</nobr>
216
+ </td>
217
+ <td style="text-align:center">
218
+ <nobr>{{row.f_meter_style}}</nobr>
219
+ </td>
220
+ <td style="text-align:center">
221
+ <nobr>{{row.f_user_state}}</nobr>
222
+ </td>
223
+ <td style="text-align:center">
224
+ <nobr>{{row.f_orgname}}</nobr>
225
+ </td>
226
+
227
+ </template>
228
+ </data-grid>
229
+ </criteria-paged>
230
+ </div>
231
+ </div>
232
+ <div class="flex-row" v-if="showdetail">
233
+ <user-info-detail-manage-new :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage-new>
234
+ </div>
235
+ </template>
236
+
237
+ <script>
238
+ import {HttpResetClass, PagedList} from 'vue-client'
239
+ import * as Util from '../../Util'
240
+ import plugin from 'system-clients/src/plugins/GetLoginInfoService'
241
+ import GetSaleParam from "../../stores/MagGetSaleParams";
242
+ import MagLoadParams from "../../stores/MagLoadParams";
243
+ let readySomething = async function (self) {
244
+
245
+ await self.$MagLoadParams.loadParam()
246
+ self.initParams()
247
+ self.$refs.paged.$refs.cri.model.startDate = Util.toStandardDateString() +' 00:00:00'
248
+ self.$refs.paged.$refs.cri.model.endDate = Util.toStandardDateString() + ' 23:59:59'
249
+ self.sumsmodel = self.$refs.paged.$refs.grid.model.sums;
250
+
251
+ }
252
+ export default {
253
+ title: '未上报查询',
254
+ props: ['data'],
255
+ data() {
256
+ return {
257
+ model: new PagedList('api/af-revenue/sql/webmeter_getNoMetereadData', 20, {
258
+ startDate: 'this.model.startDate',
259
+ endDate: 'this.model.endDate'
260
+ }),
261
+ getfield:{
262
+ 'f_userinfo_code':'客户编号','f_user_name':'客户名称', 'f_date': '未上报日期', 'f_open_date': '开户时间',
263
+ 'f_address':'客户地址','f_user_type':'客户类型','f_gasproperties':'用气性质',
264
+ 'f_meternumber':'表号',
265
+ 'f_meter_brand':'气表厂家','f_orgname':'组织机构'},
266
+ showdetail:false,
267
+ rowdata:{},
268
+ startDate: '',
269
+ endDate: '',
270
+ criteriaShow:false,
271
+ outlets: [],
272
+ other: [],
273
+ sumsmodel: {},
274
+ gasproperties:[{label: '全部', value: ''}],
275
+ operator: [],
276
+ meterbrands: [],
277
+ meterstyle:{},
278
+ orgCondtionStr: ` and f_orgid = ${this.$login.f.orgid}`,
279
+ orgid:[this.$login.f.orgid],
280
+ condition: '1=1',
281
+ org:[this.$login.f.orgid]
282
+
283
+ }
284
+ },
285
+ ready() {
286
+ readySomething(this)
287
+ },
288
+ methods: {
289
+ getotherfooter() {
290
+ this.other = [];
291
+
292
+ let firstLine = [`导出时间: ${this.$login.toStandardTimeString()}`];
293
+
294
+
295
+ let secondLine = [
296
+ `开始时间: ${this.$refs.paged.$refs.cri.model.startDate}`,
297
+ `结束时间: ${this.$refs.paged.$refs.cri.model.endDate}`
298
+ ];
299
+
300
+ this.other.push(firstLine);
301
+ this.other.push(secondLine);
302
+
303
+ console.log('Header Data:', this.other);
304
+ },
305
+ userTypeChange () {
306
+ this.gasproperties=[{label: '全部', value: ''}]
307
+ if(this.$refs.paged.$refs.cri.model && this.$refs.paged.$refs.cri.model.f_user_type) {
308
+ this.$refs.paged.$refs.cri.model.f_gasproperties=''
309
+ console.log(this.$refs.paged.$refs.cri.model.f_user_type[0])
310
+ this.gasproperties = this.$appdata.getParam(this.$refs.paged.$refs.cri.model.f_user_type[0])
311
+ }
312
+ else{
313
+ this.gasproperties =[{label: '全部', value: ''}]
314
+ }
315
+ },
316
+ hidden(){
317
+ this.criteriaShow = !this.criteriaShow
318
+ },
319
+ showmsg(obj){
320
+ this.rowdata = obj
321
+ this.showdetail = true
322
+ },
323
+ cancel() {
324
+ this.showdetail = false
325
+ },
326
+ initParams () {
327
+ // 初始化气表品牌
328
+ let brandArr = []
329
+ this.$MagGetSaleParam.getGasbrand().forEach((item) => {
330
+ if(item.value.f_meter_type==='物联网表'){
331
+ let temp = {}
332
+ temp.label = item.label
333
+ temp.value = item.value.f_meter_brand
334
+ brandArr.push(temp)
335
+
336
+ let styleArr = [{label: '全部', value: ''}]
337
+ for (let row of item.value.gasmodel) {
338
+ styleArr.push({label: row.label,value: row.value.f_meter_style})
339
+ }
340
+ this.meterstyle[temp.value] = styleArr
341
+ }
342
+
343
+ })
344
+ this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
345
+ },
346
+ search(args) {
347
+ this.startDate = this.$refs.paged.$refs.cri.model.startDate
348
+ this.endDate = this.$refs.paged.$refs.cri.model.endDate
349
+ if (this.endDate == '' || this.startDate == '') {
350
+ return this.$showMessage("时间区间的开始和结束时间不能为空!")
351
+ }
352
+ this.condition = args.condition = this.$refs.paged.$refs.cri.condition + `${this.orgCondtionStr}`
353
+ this.model.search(args.condition, args.model)
354
+ },
355
+ getorg(obj) {
356
+ if (obj.resids.length>0) {
357
+ this.orgCondtionStr = " and f_orgid in " + plugin.convertToIn(obj.resids)
358
+ this.updateParams(obj.resids[0])
359
+ }else
360
+ {
361
+ this.orgCondtionStr = " and f_orgid = " + this.$login.f.orgid
362
+ }
363
+ },
364
+ async updateParams (f_filialeid) {
365
+ let http = new HttpResetClass()
366
+
367
+ if (GetSaleParam.gasbrands.length === 0 && GetSaleParam.prices.length === 0 && GetSaleParam.adjustables.length === 0 ) {
368
+ let getParams = await http.load('POST','api/af-revenue/logic/getSaleInitData', {data: {f_orgid: f_filialeid?f_filialeid: Vue.$login.f.orgid}}, {resolveMsg: null, rejectMsg: '获取营收参数出错!!!'})
369
+ if (getParams.data && getParams.data.data) {
370
+ MagLoadParams.organizeData(getParams.data.data)
371
+ }else if (getParams.data) {
372
+ MagLoadParams.organizeData(getParams.data)
373
+ }
374
+ } else {
375
+ GetSaleParam.gasbrands = []
376
+ GetSaleParam.prices = []
377
+ GetSaleParam.adjustables = []
378
+ let getParams = await http.load('POST','api/af-revenue/logic/getSaleInitData', {data: {f_orgid: f_filialeid ? f_filialeid: Vue.$login.f.orgid}}, {resolveMsg: null, rejectMsg: '获取营收参数出错!!!'})
379
+ if (getParams.data && getParams.data.data) {
380
+ MagLoadParams.organizeData(getParams.data.data)
381
+ }else if (getParams.data) {
382
+ MagLoadParams.organizeData(getParams.data)
383
+ }
384
+ }
385
+ this.initParams()
386
+ },
387
+ clearmsg() {
388
+ this.$refs.paged.$refs.cri.model = {}
389
+ }
390
+ },
391
+ watch: {
392
+ sumsmodel:{
393
+ handler: function(val) {
394
+ this.getotherfooter();
395
+ },
396
+ deep: true
397
+ },
398
+ },
399
+ computed: {
400
+ getCondition() {
401
+ let condition=this.$refs.paged.$refs.cri.condition + this.orgCondtionStr
402
+ return {
403
+ condition: condition ,
404
+ startDate:`${this.$refs.paged.$refs.cri.model.startDate}`,
405
+ endDate:`${this.$refs.paged.$refs.cri.model.endDate}`
406
+ }
407
+
408
+ },
409
+ usertypes() {
410
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
411
+ },
412
+ userstate() {
413
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户状态')]
414
+ }
415
+ }
416
+ }
417
+ </script>
418
+ <style>
419
+ .form-input-group label {
420
+ text-align: right;
421
+ width: auto;
422
+ }
423
+
424
+ .mystyle {
425
+ float: right;
426
+ padding-right: 10%;
427
+ }
428
+
429
+ .mystyle1 {
430
+ padding-top: 10px;
431
+
432
+ }
433
+
434
+ .mystyle2 {
435
+ width: 100%;
436
+ height: 35px;
437
+ /*background: #00A3F0;*/
438
+ padding-left: 15px;
439
+ float: left;
440
+ }
441
+
442
+ .datapanel {
443
+ color: #333;
444
+ background-color: white;
445
+ box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px;
446
+ padding: 10px 30px 10px 30px;
447
+ border-radius: 15px;
448
+ }
449
+ </style>