manage-client 3.2.51 → 3.2.52

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.2.51",
3
+ "version": "3.2.52",
4
4
  "description": "经营管控模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -1,372 +1,340 @@
1
- <template>
2
- <div id="unit" class="flex-row">
3
- <div class="basic-main" @keyup.enter="search">
4
- <div class="flex" >
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">用户编号</label>
11
- <input type="text" style="width:60%" class="input_search" v-model="model.f_userinfo_code"
12
- condition="f_userinfo_code = '{}' " placeholder="用户编号">
13
- </div>
14
- <div class="col-sm-2 form-group">
15
- <label class="font_normal_body">用户名称</label>
16
- <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
17
- condition=" f_user_name like '%{}%'" placeholder='用户名称'>
18
- </div>
19
- <div class="col-sm-2 form-group">
20
- <label class="font_normal_body">气价状态</label>
21
- <v-select :value.sync="model.price_state" v-model='model.price_state'
22
- :options='$parent.$parent.pricestate' placeholder='气价状态'
23
- close-on-select style="width:60%" :value-single="true"
24
- v-el:cc></v-select>
25
- </div>
26
- <div class="span" style="float:right;">
27
- <button class="button_search button_spacing" @click="search()">查询</button>
28
- <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
29
- <export-excel :data="$parent.$parent.getCondition"
30
- :field="$parent.$parent.getfield"
31
- :header="$parent.$parent.other"
32
- sqlurl="rs/logic/exportfile" sql-name="gasPriceQuery" template-name='气价信息导出'
33
- :choose-col="true"></export-excel>
34
- <print-data :sum-field="$parent.$parent.getfield" :model="$parent.model" :field="$parent.$parent.getfield"
35
- :defaultfield="$parent.$parent.defaultfield" titletable="气价信息"
36
- :sumsmodel="$parent.$parent.sumsmodel"></print-data>
37
- <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.criteriaShow=!$parent.$parent.criteriaShow"></div>
38
- </div>
39
- </div>
40
- <div class="row" v-show="$parent.$parent.criteriaShow">
41
- <res-select-group :show-component="$parent.$parent.resshow" :selectin="true" :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
42
- <div class="col-sm-2 form-group">
43
- <label class="font_normal_body" title="旧客户编号">档案编号</label>
44
- <input type="text" style="width:60%" class="input_search" v-model="model.f_olduserinfo_code"
45
- condition="f_olduserinfo_code = '{}' " placeholder="档案编号">
46
- </div>
47
- <div class="col-sm-2 form-group">
48
- <label class="font_normal_body">客户类型</label>
49
- <v-select :value.sync="model.f_user_type"
50
- @change="$parent.$parent.userTypeChange1()"
51
- :options='$parent.$parent.usertypes' placeholder='请选择' v-model="model.f_user_type"
52
- condition="f_user_type = '{}'"
53
- close-on-select></v-select>
54
- </div>
55
- <div class="col-sm-2 form-group">
56
- <label class="font_normal_body">用气性质</label>
57
- <v-select :value.sync="model.f_gasproperties" v-model="model.f_gasproperties"
58
- :options='$parent.$parent.gasproperties1' placeholder='请选择'
59
- condition="f_gasproperties = '{}'"
60
- close-on-select></v-select>
61
- </div>
62
- <div class="col-sm-2 form-group">
63
- <label class="font_normal_body">气价类型</label>
64
- <v-select :value.sync="model.pricetype" v-model="model.pricetype"
65
- @change="$parent.$parent.pricetypechanged"
66
- placeholder='气价类型' :options="$parent.$parent.pricetypes"
67
- close-on-select v-ref:type>
68
- </v-select>
69
- </div>
70
- <div class="col-sm-2 form-group">
71
- <label class="font_normal_body">表&emsp;&emsp;号</label>
72
- <input type="text" style="width:60%" class="input_search" v-model="model.f_meter_number"
73
- condition="f_meternumber = '{}'" placeholder='表号'>
74
- </div>
75
- <div class="col-sm-2 form-group">
76
- <label class="font_normal_body">卡&emsp;&emsp;号</label>
77
- <input type="text" style="width:60%" class="input_search" v-model="model.f_card_id"
78
- condition="f_card_id = '{}'" placeholder='卡号'>
79
- </div>
80
- <div class="form-group col-sm-2" >
81
- <label class="font_normal_body">气表状态</label>
82
- <v-select style="width:60%" :value.sync="model.f_table_state"
83
- v-model="model.f_table_state"
84
- :options='$parent.$parent.gasStates' placeholder='气表状态'
85
- condition="f_table_state ='{}'"></v-select>
86
- </div>
87
- <div class="col-sm-2 form-group">
88
- <label class="font_normal_body">气表类型</label>
89
- <v-select :value.sync="model.f_meter_classify" v-model="model.f_meter_classify"
90
- :options='$parent.$parent.meters' placeholder='气表类型'
91
- close-on-select
92
- condition="f_meter_classify = '{}'"
93
- style="width: 60%"
94
- >
95
- </v-select>
96
- </div>
97
- </div>
98
-
99
- </div>
100
- </criteria>
101
-
102
- <data-grid :model="model" class="table_sy" partial='list' v-ref:grid :optional="true">
103
- <template partial='head'>
104
- <th><nobr>客户编号</nobr></th>
105
- <th><nobr>表号</nobr></th>
106
- <th><nobr>档案编号</nobr></th>
107
- <th><nobr>气价名称</nobr></th>
108
- <th><nobr>气价类型</nobr></th>
109
- <th><nobr>客户类型</nobr></th>
110
- <th><nobr>用气性质</nobr></th>
111
- <th><nobr>客户名称</nobr></th>
112
- <th><nobr>客户地址</nobr></th>
113
- </template>
114
- <template partial='body'>
115
- <td style="text-align:center"><span @click="$parent.$parent.$parent.dealmsg(row)"><a><b>{{row.f_userinfo_code}}</b></a></span></td>
116
- <td style="text-align:center">{{row.f_meternumber}}</td>
117
- <td style="text-align:center">{{row.f_olduserinfo_code}}</td>
118
- <td style="text-align:center">{{row.f_price_name}}</td>
119
- <td style="text-align:center">{{row.f_price_type}}</td>
120
- <td style="text-align:center">{{row.f_user_type}}</td>
121
- <td style="text-align:center">{{row.f_gasproperties}}</td>
122
- <td style="text-align:center">{{row.f_user_name}}</td>
123
- <td style="text-align:center;white-space: nowrap;">{{row.f_address}}</td>
124
- </template>
125
- <template partial='foot'></template>
126
- </data-grid>
127
- </criteria-paged>
128
- <table class="table-hover">
129
- <tr style="position: relative" class="table-bordered">
130
- <td
131
- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
132
- 汇总信息
133
- </td>
134
- </tr>
135
- </table>
136
- </div>
137
- <div class="flex" v-if="show">
138
- <user-info-detail-manage-new :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage-new>
139
- </div>
140
- </div>
141
- </div>
142
- </template>
143
-
144
- <script>
145
- import {PagedList} from 'vue-client'
146
- import defaultPrint from '../config/DefaultPrint'
147
- import exportConfig from '../config/exportConfig'
148
-
149
- let readySomething = async function (self) {
150
- self.$refs.paged.$refs.cri.model.startDate = self.data ? self.data.startDate : self.$login.toStandardDateString() + ' 00:00:00'
151
- self.$refs.paged.$refs.cri.model.endDate = self.data ? self.data.endDate : self.$login.toStandardDateString() + ' 23:59:59'
152
- self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
153
- await self.$MagLoadParams.loadParam()
154
- self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
155
- }
156
- export default {
157
- props:['data'],
158
- title: '业务查询',
159
- data() {
160
- return {
161
- data: {},
162
- other: [],
163
- footer: [],
164
- model: new PagedList('rs/sql/gasPriceQuery', 20, {}, ),
165
- criteriaShow: false,
166
- bodyData: ["f_userinfo_code", "f_user_name", "f_orgname", "f_depname", "f_operator"],
167
- orgCondtionStr: '',
168
- show:false,
169
- rowdata:{},
170
- modelval: [],
171
- printshow: false,
172
- all: false,
173
- fields: {},
174
- thead: '',
175
- tfoot: '',
176
- defaultfield: [],
177
- resshow:['company','department','operator','slicearea'],
178
- initres: {
179
- org:[this.$login.f.orgid],
180
- dep:[],
181
- user:[]
182
- },
183
- gasproperties1:[],
184
- f_filialeid: this.$login.f.orgid,
185
- prices: [],
186
- config: {
187
- defaultPrint: ['f_userinfo_code', 'f_user_name', 'f_meternumber']
188
- },
189
- pricestate:[{label:'有效',value:''},{label:'无效',value:'无效'}],
190
- //合计数据
191
- sumsmodel: {},
192
- meters: this.$appdata.getParam('气表类型') ? [{label: '全部',value: ''}, ...this.$appdata.getParam('气表类型')] : [],
193
- }
194
- },
195
- ready() {
196
- readySomething(this).then(() => {
197
- this.$emit('ready')
198
- }).catch((error) => {
199
- this.$emit('error', error)
200
- })
201
- },
202
- methods: {
203
- pricetypechanged(){
204
- this.$refs.paged.$refs.cri.model.f_price_name = []
205
- },
206
- userTypeChange1 () {
207
- this.gasproperties1 = []
208
- if (this.$refs.paged.$refs.cri.model !== null) {
209
- this.$refs.paged.$refs.cri.model.f_gasproperties1 = ''
210
- this.gasproperties1 = this.$appdata.getParam(this.$refs.paged.$refs.cri.model.f_user_type[0])
211
- } else {
212
- this.gasproperties1 = [{label: '全部', value: ''}]
213
- }
214
- },
215
- getotherfooter() {
216
- this.other = [];
217
- this.footer = [];
218
- let exportdata = this.getCondition;
219
- let otherInData = [];
220
- otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
221
- let footerData = [], exportfield = this.getfield;
222
- footerData.push("合计");
223
- let self = this;
224
- for (var field in self.sumsmodel) {
225
- footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
226
- }
227
- this.footer.push(footerData);
228
- this.other.push(otherInData);
229
- },
230
- search(){
231
- this.$refs.paged.$refs.cri.search()
232
- },
233
- selfSearch(args) {
234
- console.log(this.$refs.paged.$refs.cri.model.price_state)
235
- if(this.$refs.paged.$refs.cri.model.price_state){
236
- args.condition = `${args.condition} and f_end_date < f_perform_date ` + this.orgCondtionStr
237
- }
238
- args.condition = `${args.condition}` + this.orgCondtionStr
239
- this.model.search(args.condition, args.model)
240
- this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
241
- },
242
- clear() {
243
- Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
244
- this.$refs.paged.$refs.cri.model[key] = []
245
- })
246
- },
247
- getRes(condition,obj) {
248
- this.orgCondtionStr = condition
249
- this.orgname = obj.orgnames[0]
250
- this.depname = obj.depnames[0]
251
-
252
- },
253
- stamp() {
254
- this.all = false
255
- //默认选择要打印的列
256
- this.modelval = defaultPrint.config
257
- this.fields = this.getfield
258
- console.log('所有打印字段', this.fields)
259
- this.printshow = true
260
- this.put()
261
- },
262
- put() {
263
- // 对Modelval进行排序
264
- this.sortModelval()
265
- this.thead = `<tr><th colspan=${this.modelval.length}>启用查询报表</th></tr><tr>`
266
- for (let key of this.modelval) {
267
- this.thead += '<th>' + this.fields[key] + '</th>'
268
- }
269
- this.thead += '</tr>'
270
- },
271
- cancel() {
272
- this.show = false
273
- },
274
- dealmsg(val) {
275
- console.log('---------------dealmsg')
276
- this.rowdata=val
277
- this.show=true
278
- val.model = this.model.model
279
- this.$dispatch('deal-msg', val)
280
- },
281
- print() {
282
- this.$refs.print.PrintAsFile()
283
- this.printshow = false
284
- },
285
- close() {
286
- this.printshow = false
287
- this.all = false
288
- },
289
- // 对选择的列进行排序
290
- sortModelval() {
291
- let sortModel = []
292
- Object.keys(this.fields).forEach((key) => {
293
- if (this.modelval.includes(key)) {
294
- sortModel.push(key)
295
- }
296
- })
297
- this.modelval = sortModel
298
- console.log('选择的打印的字段', this.modelval)
299
- }
300
- },
301
- watch: {
302
- 'all'(val) {
303
- if (val) {
304
- this.modelval = this.bodyData
305
- } else {
306
- this.modelval = defaultPrint.config
307
- this.put()
308
- }
309
- },
310
- sumsmodel: {
311
- handler: function (val) {
312
- this.getotherfooter();
313
- },
314
- deep: true
315
- },
316
- 'modelval.length'() {
317
- this.put()
318
- },
319
- },
320
- computed: {
321
- getPricenames() {
322
- let f_user_type = this.$refs.paged.$refs.cri.model.f_user_type;
323
- let f_gasproperties = this.$refs.paged.$refs.cri.model.f_gasproperties;
324
- let pricetype = this.$refs.paged.$refs.cri.model.pricetype;
325
- console.log("打印一下:",f_user_type,f_gasproperties,pricetype,this.f_filialeid,this.prices)
326
- if(this.$refs.paged.$refs.cri.model !==null) {
327
- let rs = []
328
- let priceArr = []
329
- if ( pricetype.length >0) {
330
- let params = {
331
- f_price_type: pricetype[0],
332
- filter: this.f_filialeid,
333
- prices: this.prices
334
- }
335
- this.$MagGetSaleParam.getPrice(params).forEach((item) => {
336
- let temp = {}
337
- temp.label = item.label
338
- temp.value = item.value.f_price_name
339
- priceArr.push(temp)
340
- })
341
- if(priceArr.length == 0 ){
342
- rs= [{label: '全部', value: ''}]
343
- }else{
344
- rs = [ ...priceArr]
345
- }
346
- }
347
- if (rs.length === 0) {
348
- console.log('rs读出来是空')
349
- this.$refs.paged.$refs.cri.model.f_price_name = ''
350
- }
351
- return rs
352
- }
353
- },
354
- getCondition() {
355
- return {condition: `${this.$refs.paged.$refs.cri.condition}` + this.orgCondtionStr}
356
- },
357
- getfield() {
358
- console.log('export',exportConfig.gasPriceConfig)
359
- return exportConfig.gasPriceConfig
360
- },
361
- gasStates () {
362
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('气表状态')]
363
- },
364
- pricetypes() {
365
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('气价类型')]
366
- },
367
- usertypes() {
368
- return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('用户类型')]
369
- },
370
- }
371
- }
372
- </script>
1
+ <template>
2
+ <div id="unit" class="flex-row">
3
+ <div class="basic-main" @keyup.enter="search">
4
+ <div class="flex" >
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
+ <res-select-group :show-component="$parent.$parent.resshow" :selectin="true" :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
10
+ <div class="span" style="float:right;">
11
+ <button class="button_search button_spacing" @click="search()">查询</button>
12
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
13
+ <export-excel :data="$parent.$parent.getCondition"
14
+ :field="$parent.$parent.getfield"
15
+ :header="$parent.$parent.other"
16
+ sqlurl="rs/logic/exportfile" sql-name="gasPriceQuery" template-name='气价信息导出'
17
+ :choose-col="true"></export-excel>
18
+ <print-data :sum-field="$parent.$parent.getfield" :model="$parent.model" :field="$parent.$parent.getfield"
19
+ :defaultfield="$parent.$parent.defaultfield" titletable="气价信息"
20
+ :sumsmodel="$parent.$parent.sumsmodel"></print-data>
21
+ <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.criteriaShow=!$parent.$parent.criteriaShow"></div>
22
+ </div>
23
+ </div>
24
+ <div class="row" v-show="$parent.$parent.criteriaShow">
25
+ <div class="col-sm-2 form-group">
26
+ <label class="font_normal_body" :title="'参数名为:气价状态'">气价状态</label>
27
+ <v-select :value.sync="model.f_state" v-model='model.f_state'
28
+ :options='$parent.$parent.stateprice' placeholder='气价状态'
29
+ condition="f_state = '{}'"
30
+ close-on-select style="width:60%" :value-single="true"
31
+ v-el:cc></v-select>
32
+ </div>
33
+ <div class="col-sm-2 form-group">
34
+ <label class="font_normal_body">是否启用</label>
35
+ <v-select :value.sync="model.price_state" v-model='model.price_state'
36
+ :options='$parent.$parent.pricestate' placeholder='是否启用'
37
+ condition="price_state = '{}'"
38
+ close-on-select style="width:60%" :value-single="true"
39
+ v-el:cc></v-select>
40
+ </div>
41
+ <div class="col-sm-2 form-group">
42
+ <label class="font_normal_body">客户类型</label>
43
+ <v-select :value.sync="model.f_user_type"
44
+ @change="$parent.$parent.userTypeChange1()"
45
+ :options='$parent.$parent.usertypes' placeholder='请选择' v-model="model.f_user_type"
46
+ condition="f_user_type = '{}'"
47
+ close-on-select></v-select>
48
+ </div>
49
+ <div class="col-sm-2 form-group">
50
+ <label class="font_normal_body">用气性质</label>
51
+ <v-select :value.sync="model.f_gasproperties" v-model="model.f_gasproperties"
52
+ :options='$parent.$parent.gasproperties1' placeholder='请选择'
53
+ condition="f_gasproperties = '{}'"
54
+ close-on-select></v-select>
55
+ </div>
56
+ <div class="col-sm-2 form-group">
57
+ <label class="font_normal_body">气价类型</label>
58
+ <v-select :value.sync="model.pricetype" v-model="model.pricetype"
59
+ @change="$parent.$parent.pricetypechanged"
60
+ placeholder='气价类型' :options="$parent.$parent.pricetypes"
61
+ close-on-select v-ref:type>
62
+ </v-select>
63
+ </div>
64
+ </div>
65
+
66
+ </div>
67
+ </criteria>
68
+
69
+ <data-grid :model="model" class="table_sy" partial='list' v-ref:grid :optional="true">
70
+ <template partial='head'>
71
+ <th><nobr>气价编号</nobr></th>
72
+ <th><nobr>气价类型</nobr></th>
73
+ <th><nobr>气价名称</nobr></th>
74
+ <th><nobr>用户类型</nobr></th>
75
+ <th><nobr>用气性质</nobr></th>
76
+ <th><nobr>阶段月数</nobr></th>
77
+ <th><nobr>执行日期</nobr></th>
78
+ <th><nobr>截止日期</nobr></th>
79
+ <th><nobr>版本号</nobr></th>
80
+ <th><nobr>状态</nobr></th>
81
+ <th><nobr>气价信息</nobr></th>
82
+ </template>
83
+ <template partial='body'>
84
+ <td style="text-align:center">{{row.f_price_id}}</td>
85
+ <td style="text-align:center">{{row.f_price_type }}</td>
86
+ <td style="text-align:center">{{row.f_price_name}}</td>
87
+ <td style="text-align:center">{{row.f_user_type}}</td>
88
+ <td style="text-align:center">{{row.f_gasproperties}}</td>
89
+ <td style="text-align:center">{{row.f_stairmonths}}</td>
90
+ <td style="text-align:center">{{row.f_perform_date}}</td>
91
+ <td style="text-align:center;white-space: nowrap;">{{row.f_end_date}}</td>
92
+ <td style="text-align:center">{{row.f_version}}</td>
93
+ <td style="text-align:center">{{row.f_state}}</td>
94
+ <td style="text-align:center;white-space: nowrap;">{{row.detailvalue}}</td>
95
+ </template>
96
+ <template partial='foot'></template>
97
+ </data-grid>
98
+ </criteria-paged>
99
+ <table class="table-hover">
100
+ <tr style="position: relative" class="table-bordered">
101
+ <td
102
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
103
+ 汇总信息
104
+ </td>
105
+ </tr>
106
+ </table>
107
+ </div>
108
+ </div>
109
+ </div>
110
+ </template>
111
+
112
+ <script>
113
+ import {PagedList} from 'vue-client'
114
+ import defaultPrint from '../config/DefaultPrint'
115
+ import exportConfig from '../config/exportConfig'
116
+
117
+ let readySomething = async function (self) {
118
+ self.$refs.paged.$refs.cri.model.startDate = self.data ? self.data.startDate : self.$login.toStandardDateString() + ' 00:00:00'
119
+ self.$refs.paged.$refs.cri.model.endDate = self.data ? self.data.endDate : self.$login.toStandardDateString() + ' 23:59:59'
120
+ self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
121
+ await self.$MagLoadParams.loadParam()
122
+ self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
123
+ }
124
+ export default {
125
+ props:['data'],
126
+ title: '业务查询',
127
+ data() {
128
+ return {
129
+ data: {},
130
+ other: [],
131
+ footer: [],
132
+ model: new PagedList('rs/sql/gasPriceQuery', 20, {}, ),
133
+ criteriaShow: false,
134
+ bodyData: ["f_userinfo_code", "f_user_name", "f_orgname", "f_depname", "f_operator"],
135
+ orgCondtionStr: '',
136
+ show:false,
137
+ rowdata:{},
138
+ modelval: [],
139
+ printshow: false,
140
+ all: false,
141
+ fields: {},
142
+ thead: '',
143
+ tfoot: '',
144
+ defaultfield: [],
145
+ resshow:['company','department','operator'],
146
+ initres: {
147
+ org:[this.$login.f.orgid],
148
+ dep:[],
149
+ user:[]
150
+ },
151
+ gasproperties1:[],
152
+ f_filialeid: this.$login.f.orgid,
153
+ prices: [],
154
+ config: {
155
+ defaultPrint: ['f_userinfo_code', 'f_user_name', 'f_meternumber']
156
+ },
157
+ pricestate:[{label:'未启用',value:'未启用'},{label:'已启用',value:'已启用'}],
158
+ //合计数据
159
+ sumsmodel: {},
160
+ stateprice: this.$appdata.getParam('气价状态') ? [{label: '全部',value: ''}, ...this.$appdata.getParam('气价状态')] : [],
161
+ }
162
+ },
163
+ ready() {
164
+ readySomething(this).then(() => {
165
+ this.$emit('ready')
166
+ }).catch((error) => {
167
+ this.$emit('error', error)
168
+ })
169
+ },
170
+ methods: {
171
+ pricetypechanged(){
172
+ this.$refs.paged.$refs.cri.model.f_price_name = []
173
+ },
174
+ userTypeChange1 () {
175
+ this.gasproperties1 = []
176
+ if (this.$refs.paged.$refs.cri.model !== null) {
177
+ this.$refs.paged.$refs.cri.model.f_gasproperties1 = ''
178
+ this.gasproperties1 = this.$appdata.getParam(this.$refs.paged.$refs.cri.model.f_user_type[0])
179
+ } else {
180
+ this.gasproperties1 = [{label: '全部', value: ''}]
181
+ }
182
+ },
183
+ getotherfooter() {
184
+ this.other = [];
185
+ this.footer = [];
186
+ let exportdata = this.getCondition;
187
+ let otherInData = [];
188
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
189
+ let footerData = [], exportfield = this.getfield;
190
+ footerData.push("合计");
191
+ let self = this;
192
+ for (var field in self.sumsmodel) {
193
+ footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
194
+ }
195
+ this.footer.push(footerData);
196
+ this.other.push(otherInData);
197
+ },
198
+ search(){
199
+ this.$refs.paged.$refs.cri.search()
200
+ },
201
+ selfSearch(args) {
202
+ console.log(this.$refs.paged.$refs.cri.model.price_state)
203
+ if(this.$refs.paged.$refs.cri.model.price_state){
204
+ args.condition = `${args.condition} ` + this.orgCondtionStr
205
+ }
206
+ args.condition = `${args.condition}` + this.orgCondtionStr
207
+ this.model.search(args.condition, args.model)
208
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
209
+ },
210
+ clear() {
211
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
212
+ this.$refs.paged.$refs.cri.model[key] = []
213
+ })
214
+ },
215
+ getRes(condition,obj) {
216
+ this.orgCondtionStr = condition
217
+ this.orgname = obj.orgnames[0]
218
+ this.depname = obj.depnames[0]
219
+
220
+ },
221
+ stamp() {
222
+ this.all = false
223
+ //默认选择要打印的列
224
+ this.modelval = defaultPrint.config
225
+ this.fields = this.getfield
226
+ console.log('所有打印字段', this.fields)
227
+ this.printshow = true
228
+ this.put()
229
+ },
230
+ put() {
231
+ // 对Modelval进行排序
232
+ this.sortModelval()
233
+ this.thead = `<tr><th colspan=${this.modelval.length}>启用查询报表</th></tr><tr>`
234
+ for (let key of this.modelval) {
235
+ this.thead += '<th>' + this.fields[key] + '</th>'
236
+ }
237
+ this.thead += '</tr>'
238
+ },
239
+ cancel() {
240
+ this.show = false
241
+ },
242
+ dealmsg(val) {
243
+ console.log('---------------dealmsg')
244
+ this.rowdata=val
245
+ this.show=true
246
+ val.model = this.model.model
247
+ this.$dispatch('deal-msg', val)
248
+ },
249
+ print() {
250
+ this.$refs.print.PrintAsFile()
251
+ this.printshow = false
252
+ },
253
+ close() {
254
+ this.printshow = false
255
+ this.all = false
256
+ },
257
+ // 对选择的列进行排序
258
+ sortModelval() {
259
+ let sortModel = []
260
+ Object.keys(this.fields).forEach((key) => {
261
+ if (this.modelval.includes(key)) {
262
+ sortModel.push(key)
263
+ }
264
+ })
265
+ this.modelval = sortModel
266
+ console.log('选择的打印的字段', this.modelval)
267
+ }
268
+ },
269
+ watch: {
270
+ 'all'(val) {
271
+ if (val) {
272
+ this.modelval = this.bodyData
273
+ } else {
274
+ this.modelval = defaultPrint.config
275
+ this.put()
276
+ }
277
+ },
278
+ sumsmodel: {
279
+ handler: function (val) {
280
+ this.getotherfooter();
281
+ },
282
+ deep: true
283
+ },
284
+ 'modelval.length'() {
285
+ this.put()
286
+ },
287
+ },
288
+ computed: {
289
+ getPricenames() {
290
+ let f_user_type = this.$refs.paged.$refs.cri.model.f_user_type;
291
+ let f_gasproperties = this.$refs.paged.$refs.cri.model.f_gasproperties;
292
+ let pricetype = this.$refs.paged.$refs.cri.model.pricetype;
293
+ console.log("打印一下:",f_user_type,f_gasproperties,pricetype,this.f_filialeid,this.prices)
294
+ if(this.$refs.paged.$refs.cri.model !==null) {
295
+ let rs = []
296
+ let priceArr = []
297
+ if ( pricetype.length >0) {
298
+ let params = {
299
+ f_price_type: pricetype[0],
300
+ filter: this.f_filialeid,
301
+ prices: this.prices
302
+ }
303
+ this.$MagGetSaleParam.getPrice(params).forEach((item) => {
304
+ let temp = {}
305
+ temp.label = item.label
306
+ temp.value = item.value.f_price_name
307
+ priceArr.push(temp)
308
+ })
309
+ if(priceArr.length == 0 ){
310
+ rs= [{label: '全部', value: ''}]
311
+ }else{
312
+ rs = [ ...priceArr]
313
+ }
314
+ }
315
+ if (rs.length === 0) {
316
+ console.log('rs读出来是空')
317
+ this.$refs.paged.$refs.cri.model.f_price_name = ''
318
+ }
319
+ return rs
320
+ }
321
+ },
322
+ getCondition() {
323
+ return {condition: `${this.$refs.paged.$refs.cri.condition}` + this.orgCondtionStr}
324
+ },
325
+ getfield() {
326
+ console.log('export',exportConfig.gasPriceConfig)
327
+ return exportConfig.gasPriceConfig
328
+ },
329
+ gasStates () {
330
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('气表状态')]
331
+ },
332
+ pricetypes() {
333
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('气价类型')]
334
+ },
335
+ usertypes() {
336
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('用户类型')]
337
+ },
338
+ }
339
+ }
340
+ </script>
package/src/main.js CHANGED
@@ -1,66 +1,66 @@
1
- import Vue from 'vue'
2
- import App from './App'
3
- import { all } from 'vue-client'
4
-
5
- // import { sale } from 'sale-client'
6
- import { system } from 'system-clients'
7
- import { ldap } from 'ldap-clients'
8
- import saleManage from './saleManage'
9
- import webmeterManage from './webmeterManage'
10
- import reportManage from './reportManage'
11
- import newmanage from './newmanage'
12
- import ManageHome from './ManageHome'
13
- import echarts from 'echarts'
14
- import AMap from 'vue-amap'
15
-
16
- Vue.config.silent = true
17
- // Vue.mmType = 'AES'
18
-
19
- Vue.use(AMap);
20
-
21
- // 初始化vue-amap
22
- AMap.initAMapApiLoader({
23
- // 高德key
24
- key: '3cec9ae8e2349207f7ac29279e3f4abe',
25
- // 插件集合 (插件按需引入)
26
- plugin: [
27
- "AMap.Autocomplete", //输入提示插件
28
- "AMap.PlaceSearch", //POI搜索插件
29
- "AMap.Scale", //右下角缩略图插件 比例尺
30
- "AMap.OverView", //地图鹰眼插件
31
- "AMap.ToolBar", //地图工具条0
32
- "AMap.MapType", //类别切换控件,实现默认图层与卫星图、实施交通图层之间切换的控制
33
- "AMap.PolyEditor", //编辑 折线多,边形
34
- "AMap.CircleEditor", //圆形编辑器插件
35
- "AMap.Geolocation" //定位控件,用来获取和展示用户主机所在的经纬度位置
36
- ],
37
- uiVersion: "1.0"
38
- });
39
- /** **************************通用组件******************************/
40
-
41
- Vue.prototype.$echarts = echarts
42
- all()
43
- // sale()
44
- ldap()
45
- system(false)
46
- saleManage()
47
-
48
- webmeterManage()
49
- ManageHome()
50
- newmanage()
51
- reportManage('tongchuan')
52
- require('system-clients/src/styles/less/bootstrap.less')
53
- require('./components/qinhua/Style/qinhuaStyle.less')
54
- // require('./bootstrap/less/manageStyle/manageChile.less')
55
- // require('./bootstrap/less/manageStyle/safeStyle.less')
56
-
57
- //大屏展示要放开的样式
58
- // require('system-clients/src/styles/less/manageStyle/manageChile.less')
59
- // require('system-clients/src/styles/less/manageStyle/safeStyle.less')
60
- // require('system-clients/src/styles/less/manageStyle/manageStyle.less')
61
-
62
- new Vue({
63
- el: 'body',
64
- components: { App }
65
- })
66
-
1
+ import Vue from 'vue'
2
+ import App from './App'
3
+ import { all } from 'vue-client'
4
+
5
+ // import { sale } from 'sale-client'
6
+ import { system } from 'system-clients'
7
+ import { ldap } from 'ldap-clients'
8
+ import saleManage from './saleManage'
9
+ import webmeterManage from './webmeterManage'
10
+ import reportManage from './reportManage'
11
+ import newmanage from './newmanage'
12
+ import ManageHome from './ManageHome'
13
+ import echarts from 'echarts'
14
+ import AMap from 'vue-amap'
15
+
16
+ Vue.config.silent = true
17
+ // Vue.mmType = 'AES'
18
+
19
+ Vue.use(AMap);
20
+
21
+ // 初始化vue-amap
22
+ AMap.initAMapApiLoader({
23
+ // 高德key
24
+ key: '3cec9ae8e2349207f7ac29279e3f4abe',
25
+ // 插件集合 (插件按需引入)
26
+ plugin: [
27
+ "AMap.Autocomplete", //输入提示插件
28
+ "AMap.PlaceSearch", //POI搜索插件
29
+ "AMap.Scale", //右下角缩略图插件 比例尺
30
+ "AMap.OverView", //地图鹰眼插件
31
+ "AMap.ToolBar", //地图工具条0
32
+ "AMap.MapType", //类别切换控件,实现默认图层与卫星图、实施交通图层之间切换的控制
33
+ "AMap.PolyEditor", //编辑 折线多,边形
34
+ "AMap.CircleEditor", //圆形编辑器插件
35
+ "AMap.Geolocation" //定位控件,用来获取和展示用户主机所在的经纬度位置
36
+ ],
37
+ uiVersion: "1.0"
38
+ });
39
+ /** **************************通用组件******************************/
40
+
41
+ Vue.prototype.$echarts = echarts
42
+ all()
43
+ // sale()
44
+ ldap()
45
+ system(false)
46
+ saleManage('qianneng')
47
+
48
+ webmeterManage()
49
+ ManageHome()
50
+ newmanage()
51
+ reportManage()
52
+ require('system-clients/src/styles/less/bootstrap.less')
53
+ require('./components/qinhua/Style/qinhuaStyle.less')
54
+ // require('./bootstrap/less/manageStyle/manageChile.less')
55
+ // require('./bootstrap/less/manageStyle/safeStyle.less')
56
+
57
+ //大屏展示要放开的样式
58
+ // require('system-clients/src/styles/less/manageStyle/manageChile.less')
59
+ // require('system-clients/src/styles/less/manageStyle/safeStyle.less')
60
+ // require('system-clients/src/styles/less/manageStyle/manageStyle.less')
61
+
62
+ new Vue({
63
+ el: 'body',
64
+ components: { App }
65
+ })
66
+