manage-client 1.22.44-ca → 1.22.45-ca

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.
@@ -1,311 +1,311 @@
1
- <template>
2
- <div style="flex:1;overflow: hidden !important;" class="flex">
3
- <criteria-paged :model="model" v-ref:paged>
4
- <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
5
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
- <div class="row" v-show="$parent.$parent.criteriaShow">
7
- <div class="col-sm-2 form-group form-fix-width" >
8
- <label class="font_normal_body _zoom4" >用户编号</label>
9
- <input type="text" class="form-control _zoom6" v-model="model.f_userinfo_code"
10
- condition="f_userinfo_code = '{}' " placeholder="用户编号">
11
- </div>
12
- <div class="col-sm-2 form-group form-fix-width" >
13
- <label class="font_normal_body _zoom4" >用户姓名</label>
14
- <input type="text" class="form-control _zoom6" v-model="model.f_user_name"
15
- condition="f_user_name like '%{}%'" placeholder="用户姓名">
16
- </div>
17
- <div class="col-sm-2 form-group form-fix-width" >
18
- <label class="font_normal_body _zoom4" >用户地址</label>
19
- <input type="text" class="form-control _zoom6" v-model="model.f_address"
20
- condition="f_address like '%{}%'" placeholder='用户地址'>
21
- </div>
22
- <div class="col-sm-2 form-group form-fix-width" >
23
- <label class="font_normal_body _zoom4" >补气类型</label>
24
- <v-select :value.sync="model.f_type"
25
- v-model="model.f_type"
26
- :options='$parent.$parent.fillGasTypes' placeholder='请选择'
27
- condition="f_type = '{}'"
28
- close-on-select></v-select>
29
- </div>
30
-
31
- <div class="col-sm-2 form-group form-fix-width" >
32
- <label class="font_normal_body _zoom4" >卡号</label>
33
- <input type="text" class="form-control _zoom6" v-model="model.f_card_id"
34
- condition="f_card_id like '%{}%'" placeholder='卡号'>
35
- </div>
36
- <div class="col-sm-2 form-group form-fix-width" >
37
- <label class="font_normal_body _zoom4" >气表品牌</label>
38
- <v-select :value.sync="model.f_meter_brand"
39
- v-model="model.f_meter_brand"
40
- :options='$parent.$parent.meterbrands' placeholder='请选择'
41
- condition="f_meter_brand = '{}'"
42
- close-on-select></v-select>
43
- </div>
44
- <div class="col-sm-2 form-group form-fix-width" >
45
- <label class="font_normal_body _zoom4" >补气状态</label>
46
- <v-select :value.sync="model.f_state"
47
- v-model="model.f_state"
48
- :options='$parent.$parent.chargeState' placeholder='请选择'
49
- condition="f_state = '{}'"
50
- close-on-select></v-select>
51
- </div>
52
- <div class="col-sm-2 form-group form-fix-width" >
53
- <label for="startDate" class="font_normal_body _zoom4" >开始日期</label>
54
- <datepicker id="startDate" placeholder="开始日期" class="_zoom6"
55
- v-model="model.startDate"
56
- :value.sync="model.startDate"
57
- :format="'yyyy-MM-dd'"
58
- :show-reset-button="true"
59
- condition="f_operate_date >= to_date('{} 00:00:00','yyyy-mm-dd hh24:mi:ss')">
60
- </datepicker>
61
- </div>
62
- <div class="col-sm-2 form-group form-fix-width" >
63
- <label for="endDate" class="font_normal_body _zoom4" >结束日期</label>
64
- <datepicker id="endDate" placeholder="结束日期" class="_zoom6"
65
- v-model="model.endDate"
66
- :value.sync="model.endDate"
67
- :format="'yyyy-MM-dd'"
68
- :show-reset-button="true"
69
- condition="f_operate_date <= to_date('{} 23:59:59','yyyy-mm-dd hh24:mi:ss')">
70
- </datepicker>
71
- </div>
72
- <div class="col-sm-2 form-group form-input-group" >
73
- <label class="font_normal_body _zoom4" >售气单位</label>
74
- <v-select :value.sync="model.f_filiale"
75
- v-model="model.f_filiale"
76
- :options='$parent.$parent.filialelist' placeholder='请选择'
77
- condition="f_filiale = '{}'"
78
- close-on-select></v-select>
79
- </div>
80
- <div class="col-sm-2 form-group form-input-group" >
81
- <label class="font_normal_body _zoom4" >售气部门</label>
82
- <v-select :value.sync="model.f_outlets"
83
- v-model="model.f_outlets"
84
- :options='$parent.$parent.selldep' placeholder='请选择'
85
- condition="f_outlets = '{}'"
86
- close-on-select></v-select>
87
- </div>
88
-
89
- </div>
90
- <div class="row">
91
- <div style="float:right" :class="{'_btnclitested':!$parent.$parent.criteriaShow}">
92
- <button class="btn btn-success" @click="search()">查询</button>
93
- <button class="btn btn-default" @click="$parent.$parent.clear()">清空</button>
94
- <!--<button class="btn btn-default" @click="$parent.$parent.stamp()">打印</button>-->
95
-
96
- <export-excel :data="$parent.$parent.getCondition"
97
- :field="$parent.$parent.getfield"
98
- sqlurl="rs/logic/exportfile" sql-name="fillGasQuery" template-name='补气查询导出' :choose-col="true"></export-excel>
99
-
100
- <div
101
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
102
- @click="$parent.$parent.hidden()" class="button_spacing" style="float: right"></div>
103
- </div>
104
- </div>
105
- </div>
106
- </criteria>
107
-
108
- <data-grid :model="model" partial='list' v-ref:grid>
109
- <template partial='head'>
110
- <tr>
111
- <th><nobr>用户编号</nobr></th>
112
- <th><nobr>用户姓名</nobr></th>
113
- <th><nobr>用户地址</nobr></th>
114
- <th><nobr>卡号</nobr></th>
115
- <th><nobr>气表品牌</nobr></th>
116
- <th><nobr>补气量</nobr></th>
117
- <th><nobr>补气金额</nobr></th>
118
- <th><nobr>补气类型</nobr></th>
119
- <th><nobr>补气日期</nobr></th>
120
- <th><nobr>补气原因</nobr></th>
121
- <th><nobr>操作员</nobr></th>
122
- <th><nobr>营业网点</nobr></th>
123
- <!--<th><nobr>分公司</nobr></th>-->
124
- </tr>
125
- </template>
126
- <template partial='body'>
127
- <td style="text-align: center;"><nobr>{{row.f_userinfo_code}}</nobr></td>
128
- <td style="text-align: center;"><nobr>{{row.f_user_name}}</nobr></td>
129
- <td style="text-align: center;"><nobr>{{row.f_address}}</nobr></td>
130
- <td style="text-align: center;"><nobr>
131
- <span @click="$parent.$parent.$parent.dealmsg(row)"><a>{{row.f_card_id}}</a></span></nobr></td>
132
- <td style="text-align: center;"><nobr>{{row.f_meter_brand}}</nobr></td>
133
- <td style="text-align: center;"><nobr>{{row.f_fillgas}}</nobr></td>
134
- <td style="text-align: center;"><nobr>{{row.f_fillgas_fee}}</nobr></td>
135
- <td style="text-align: center;"><nobr>{{row.f_type}}</nobr></td>
136
- <td style="text-align: center;"><nobr>{{row.f_operate_date}}</nobr></td>
137
- <td style="text-align: center;"><nobr>{{row.f_reason}}</nobr></td>
138
- <td style="text-align: center;"><nobr>{{row.f_operator}}</nobr></td>
139
- <td style="text-align: center;"><nobr>{{row.f_outlets}}</nobr></td>
140
- <!--<td style="text-align: center;"><nobr>{{row.f_filiale}}</nobr></td>-->
141
- </template>
142
- <template partial='foot'></template>
143
- </data-grid>
144
- </criteria-paged>
145
-
146
- <table class="table-hover">
147
- <tr class="table-bordered">
148
- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">汇总信息</td>
149
- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">补气量合计:&emsp;{{sumsmodel.f_fillgas}}</td>
150
- </tr>
151
- </table>
152
- </div>
153
- </template>
154
-
155
- <script>
156
- import { PagedList } from 'vue-client'
157
- import defaultPrint from '../config/DefaultPrint'
158
- import exportConfig from '../config/exportConfig'
159
- let readySomething = async function (self) {
160
- self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString()
161
- self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString()
162
- self.$refs.paged.$refs.cri.model.f_state = ['有效']
163
- await self.$MagLoadParams.loadParam(self.$login.f)
164
- self.initParams()
165
- /* await self.$refs.paged.$refs.cri.search()
166
- self.sumsmodel = self.$refs.paged.$refs.grid.model.sums*/
167
- }
168
- export default {
169
- data() {
170
- return {
171
- data: {},
172
- model: new PagedList('rs/sql/fillGasQuery', 20,{},{f_fillgas: 0}),
173
- criteriaShow: true,
174
- headData: ["用户编号","用户姓名","用户电话","身份证号","地址","补气类型","表编号","卡号","气表品牌","气表状态","补气量","补气日期","操作员","营业网点","分公司"],
175
- 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_outlets","f_filiale"],
176
-
177
- filialeNameStr: null,
178
- filialeCodeStr: this.$login.f.f_orgids,
179
- userid: this.$login.f.id,
180
- source:`tool.getFullTree(this.getRights().where(row.getType() != $zone$).where(row.getType() != $role$))`,
181
-
182
- modelval: [],
183
- printshow: false,
184
- all: false,
185
- fields: {},
186
- thead: '',
187
- tfoot: '',
188
-
189
- meterbrands: [],
190
- fillGasTypes: this.$appdata.getParam('补气类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('补气类型')] : [],
191
- chargeState: this.$appdata.getParam('补气状态') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('补气状态')] : [],
192
- filialelist: this.$appdata.getParam('售气单位') ? [{label: '全部', value: ''},...this.$appdata.getParam('售气单位')] : [],
193
-
194
- //合计数据
195
- sumsmodel: {}
196
- }
197
- },
198
- ready(){
199
- readySomething(this).then(() => {
200
- this.$emit('ready')
201
- }).catch((error) => {
202
- this.$emit('error', error)
203
- })
204
- },
205
- methods: {
206
- initParams () {
207
- // 初始化气表品牌
208
- let brandArr = []
209
- this.$MagGetSaleParam.getGasbrand().forEach((item) => {
210
- let temp = {}
211
- temp.label = item.label
212
- temp.value = item.value.f_meter_brand
213
- brandArr.push(temp)
214
- })
215
- this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
216
- },
217
- selfSearch (args) {
218
- this.model.search(args.condition, args.model)
219
- this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
220
- },
221
- clear(){
222
- Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
223
- this.$refs.paged.$refs.cri.model[key] = ''
224
- })
225
- },
226
- show(){
227
- this.criteriaShow = true
228
- },
229
- hidden(){
230
- this.criteriaShow = !this.criteriaShow
231
- },
232
- getRes(obj) {
233
- this.filialeNameStr = obj.res
234
- this.filialeCodeStr = obj.resids
235
- },
236
- stamp () {
237
- this.all = false
238
- //默认选择要打印的列
239
- this.modelval = defaultPrint.config
240
- this.fields = this.getfield
241
- console.log('所有打印字段',this.fields)
242
- this.printshow = true
243
- this.put()
244
- },
245
- dealmsg (val) {
246
- console.log('---------------dealmsg')
247
- val.model = this.model.model
248
- this.$dispatch('deal-msg',val)
249
- },
250
- put () {
251
- // 对Modelval进行排序
252
- this.sortModelval()
253
- this.thead = `<tr><th colspan=${this.modelval.length}>补气查询统计报表</th></tr><tr>`
254
- for (let key of this.modelval) {
255
- this.thead += '<th>' + this.fields[key] + '</th>'
256
- }
257
- this.thead += '</tr>'
258
- },
259
- print () {
260
- this.$refs.print.PrintAsFile()
261
- this.printshow = false
262
- },
263
- close () {
264
- this.printshow = false
265
- this.all = false
266
- },
267
- // 对选择的列进行排序
268
- sortModelval () {
269
- let sortModel = []
270
- Object.keys(this.fields).forEach((key) => {
271
- if (this.modelval.includes(key)) {
272
- sortModel.push(key)
273
- }
274
- })
275
- this.modelval = sortModel
276
- console.log('选择的打印的字段', this.modelval)
277
- }
278
- },
279
- watch:{
280
- 'all' (val) {
281
- if (val) {
282
- this.modelval = this.bodyData
283
- } else {
284
- this.modelval = defaultPrint.config
285
- this.put()
286
- }
287
- },
288
- 'modelval.length' () {
289
- this.put()
290
- },
291
- },
292
- computed:{
293
- selldep () {
294
- let rs = []
295
- if(this.$refs.paged.$refs.cri.model.f_filiale){
296
- this.$refs.paged.$refs.cri.model.f_outlets = ''
297
- return [{label: '全部', value: ''}, ...this.$appdata.getParam(this.$refs.paged.$refs.cri.model.f_filiale) ]
298
- }
299
- else {
300
- return [{label: '全部', value: ''}]
301
- }
302
- },
303
- getCondition(){
304
- return {condition: `${this.$refs.paged.$refs.cri.condition}`}
305
- },
306
- getfield(){
307
- return exportConfig.fillgasConfig
308
- }
309
- }
310
- }
311
- </script>
1
+ <template>
2
+ <div style="flex:1;overflow: hidden !important;" class="flex">
3
+ <criteria-paged :model="model" v-ref:paged>
4
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
5
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
+ <div class="row" v-show="$parent.$parent.criteriaShow">
7
+ <div class="col-sm-2 form-group form-fix-width" >
8
+ <label class="font_normal_body _zoom4" >用户编号</label>
9
+ <input type="text" class="form-control _zoom6" v-model="model.f_userinfo_code"
10
+ condition="f_userinfo_code = '{}' " placeholder="用户编号">
11
+ </div>
12
+ <div class="col-sm-2 form-group form-fix-width" >
13
+ <label class="font_normal_body _zoom4" >用户姓名</label>
14
+ <input type="text" class="form-control _zoom6" v-model="model.f_user_name"
15
+ condition="f_user_name like '%{}%'" placeholder="用户姓名">
16
+ </div>
17
+ <div class="col-sm-2 form-group form-fix-width" >
18
+ <label class="font_normal_body _zoom4" >用户地址</label>
19
+ <input type="text" class="form-control _zoom6" v-model="model.f_address"
20
+ condition="f_address like '%{}%'" placeholder='用户地址'>
21
+ </div>
22
+ <div class="col-sm-2 form-group form-fix-width" >
23
+ <label class="font_normal_body _zoom4" >补气类型</label>
24
+ <v-select :value.sync="model.f_type"
25
+ v-model="model.f_type"
26
+ :options='$parent.$parent.fillGasTypes' placeholder='请选择'
27
+ condition="f_type = '{}'"
28
+ close-on-select></v-select>
29
+ </div>
30
+
31
+ <div class="col-sm-2 form-group form-fix-width" >
32
+ <label class="font_normal_body _zoom4" >卡号</label>
33
+ <input type="text" class="form-control _zoom6" v-model="model.f_card_id"
34
+ condition="f_card_id like '%{}%'" placeholder='卡号'>
35
+ </div>
36
+ <div class="col-sm-2 form-group form-fix-width" >
37
+ <label class="font_normal_body _zoom4" >气表品牌</label>
38
+ <v-select :value.sync="model.f_meter_brand"
39
+ v-model="model.f_meter_brand"
40
+ :options='$parent.$parent.meterbrands' placeholder='请选择'
41
+ condition="f_meter_brand = '{}'"
42
+ close-on-select></v-select>
43
+ </div>
44
+ <div class="col-sm-2 form-group form-fix-width" >
45
+ <label class="font_normal_body _zoom4" >补气状态</label>
46
+ <v-select :value.sync="model.f_state"
47
+ v-model="model.f_state"
48
+ :options='$parent.$parent.chargeState' placeholder='请选择'
49
+ condition="f_state = '{}'"
50
+ close-on-select></v-select>
51
+ </div>
52
+ <div class="col-sm-2 form-group form-fix-width" >
53
+ <label for="startDate" class="font_normal_body _zoom4" >开始日期</label>
54
+ <datepicker id="startDate" placeholder="开始日期" class="_zoom6"
55
+ v-model="model.startDate"
56
+ :value.sync="model.startDate"
57
+ :format="'yyyy-MM-dd'"
58
+ :show-reset-button="true"
59
+ condition="f_operate_date >= to_date('{} 00:00:00','yyyy-mm-dd hh24:mi:ss')">
60
+ </datepicker>
61
+ </div>
62
+ <div class="col-sm-2 form-group form-fix-width" >
63
+ <label for="endDate" class="font_normal_body _zoom4" >结束日期</label>
64
+ <datepicker id="endDate" placeholder="结束日期" class="_zoom6"
65
+ v-model="model.endDate"
66
+ :value.sync="model.endDate"
67
+ :format="'yyyy-MM-dd'"
68
+ :show-reset-button="true"
69
+ condition="f_operate_date <= to_date('{} 23:59:59','yyyy-mm-dd hh24:mi:ss')">
70
+ </datepicker>
71
+ </div>
72
+ <div class="col-sm-2 form-group form-input-group" >
73
+ <label class="font_normal_body _zoom4" >售气单位</label>
74
+ <v-select :value.sync="model.f_filiale"
75
+ v-model="model.f_filiale"
76
+ :options='$parent.$parent.filialelist' placeholder='请选择'
77
+ condition="f_filiale = '{}'"
78
+ close-on-select></v-select>
79
+ </div>
80
+ <div class="col-sm-2 form-group form-input-group" >
81
+ <label class="font_normal_body _zoom4" >售气部门</label>
82
+ <v-select :value.sync="model.f_outlets"
83
+ v-model="model.f_outlets"
84
+ :options='$parent.$parent.selldep' placeholder='请选择'
85
+ condition="f_outlets = '{}'"
86
+ close-on-select></v-select>
87
+ </div>
88
+
89
+ </div>
90
+ <div class="row">
91
+ <div style="float:right" :class="{'_btnclitested':!$parent.$parent.criteriaShow}">
92
+ <button class="btn btn-success" @click="search()">查询</button>
93
+ <button class="btn btn-default" @click="$parent.$parent.clear()">清空</button>
94
+ <!--<button class="btn btn-default" @click="$parent.$parent.stamp()">打印</button>-->
95
+
96
+ <export-excel :data="$parent.$parent.getCondition"
97
+ :field="$parent.$parent.getfield"
98
+ sqlurl="rs/logic/exportfile" sql-name="fillGasQuery" template-name='补气查询导出' :choose-col="true"></export-excel>
99
+
100
+ <div
101
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
102
+ @click="$parent.$parent.hidden()" class="button_spacing" style="float: right"></div>
103
+ </div>
104
+ </div>
105
+ </div>
106
+ </criteria>
107
+
108
+ <data-grid :model="model" partial='list' v-ref:grid>
109
+ <template partial='head'>
110
+ <tr>
111
+ <th><nobr>用户编号</nobr></th>
112
+ <th><nobr>用户姓名</nobr></th>
113
+ <th><nobr>用户地址</nobr></th>
114
+ <th><nobr>卡号</nobr></th>
115
+ <th><nobr>气表品牌</nobr></th>
116
+ <th><nobr>补气量</nobr></th>
117
+ <th><nobr>补气金额</nobr></th>
118
+ <th><nobr>补气类型</nobr></th>
119
+ <th><nobr>补气日期</nobr></th>
120
+ <th><nobr>补气原因</nobr></th>
121
+ <th><nobr>操作员</nobr></th>
122
+ <th><nobr>营业网点</nobr></th>
123
+ <!--<th><nobr>分公司</nobr></th>-->
124
+ </tr>
125
+ </template>
126
+ <template partial='body'>
127
+ <td style="text-align: center;"><nobr>{{row.f_userinfo_code}}</nobr></td>
128
+ <td style="text-align: center;"><nobr>{{row.f_user_name}}</nobr></td>
129
+ <td style="text-align: center;"><nobr>{{row.f_address}}</nobr></td>
130
+ <td style="text-align: center;"><nobr>
131
+ <span @click="$parent.$parent.$parent.dealmsg(row)"><a>{{row.f_card_id}}</a></span></nobr></td>
132
+ <td style="text-align: center;"><nobr>{{row.f_meter_brand}}</nobr></td>
133
+ <td style="text-align: center;"><nobr>{{row.f_fillgas}}</nobr></td>
134
+ <td style="text-align: center;"><nobr>{{row.f_fillgas_fee}}</nobr></td>
135
+ <td style="text-align: center;"><nobr>{{row.f_type}}</nobr></td>
136
+ <td style="text-align: center;"><nobr>{{row.f_operate_date}}</nobr></td>
137
+ <td style="text-align: center;"><nobr>{{row.f_reason}}</nobr></td>
138
+ <td style="text-align: center;"><nobr>{{row.f_operator}}</nobr></td>
139
+ <td style="text-align: center;"><nobr>{{row.f_outlets}}</nobr></td>
140
+ <!--<td style="text-align: center;"><nobr>{{row.f_filiale}}</nobr></td>-->
141
+ </template>
142
+ <template partial='foot'></template>
143
+ </data-grid>
144
+ </criteria-paged>
145
+
146
+ <table class="table-hover">
147
+ <tr class="table-bordered">
148
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">汇总信息</td>
149
+ <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">补气量合计:&emsp;{{sumsmodel.f_fillgas}}</td>
150
+ </tr>
151
+ </table>
152
+ </div>
153
+ </template>
154
+
155
+ <script>
156
+ import { PagedList } from 'vue-client'
157
+ import defaultPrint from '../config/DefaultPrint'
158
+ import exportConfig from '../config/exportConfig'
159
+ let readySomething = async function (self) {
160
+ self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString()
161
+ self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString()
162
+ self.$refs.paged.$refs.cri.model.f_state = ['有效']
163
+ await self.$MagLoadParams.loadParam(self.$login.f)
164
+ self.initParams()
165
+ /* await self.$refs.paged.$refs.cri.search()
166
+ self.sumsmodel = self.$refs.paged.$refs.grid.model.sums*/
167
+ }
168
+ export default {
169
+ data() {
170
+ return {
171
+ data: {},
172
+ model: new PagedList('rs/sql/fillGasQuery', 20,{},{f_fillgas: 0}),
173
+ criteriaShow: true,
174
+ headData: ["用户编号","用户姓名","用户电话","身份证号","地址","补气类型","表编号","卡号","气表品牌","气表状态","补气量","补气日期","操作员","营业网点","分公司"],
175
+ 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_outlets","f_filiale"],
176
+
177
+ filialeNameStr: null,
178
+ filialeCodeStr: this.$login.f.f_orgids,
179
+ userid: this.$login.f.id,
180
+ source:`tool.getFullTree(this.getRights().where(row.getType() != $zone$).where(row.getType() != $role$))`,
181
+
182
+ modelval: [],
183
+ printshow: false,
184
+ all: false,
185
+ fields: {},
186
+ thead: '',
187
+ tfoot: '',
188
+
189
+ meterbrands: [],
190
+ fillGasTypes: this.$appdata.getParam('补气类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('补气类型')] : [],
191
+ chargeState: this.$appdata.getParam('补气状态') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('补气状态')] : [],
192
+ filialelist: this.$appdata.getParam('售气单位') ? [{label: '全部', value: ''},...this.$appdata.getParam('售气单位')] : [],
193
+
194
+ //合计数据
195
+ sumsmodel: {}
196
+ }
197
+ },
198
+ ready(){
199
+ readySomething(this).then(() => {
200
+ this.$emit('ready')
201
+ }).catch((error) => {
202
+ this.$emit('error', error)
203
+ })
204
+ },
205
+ methods: {
206
+ initParams () {
207
+ // 初始化气表品牌
208
+ let brandArr = []
209
+ this.$MagGetSaleParam.getGasbrand().forEach((item) => {
210
+ let temp = {}
211
+ temp.label = item.label
212
+ temp.value = item.value.f_meter_brand
213
+ brandArr.push(temp)
214
+ })
215
+ this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
216
+ },
217
+ selfSearch (args) {
218
+ this.model.search(args.condition, args.model)
219
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
220
+ },
221
+ clear(){
222
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
223
+ this.$refs.paged.$refs.cri.model[key] = ''
224
+ })
225
+ },
226
+ show(){
227
+ this.criteriaShow = true
228
+ },
229
+ hidden(){
230
+ this.criteriaShow = !this.criteriaShow
231
+ },
232
+ getRes(obj) {
233
+ this.filialeNameStr = obj.res
234
+ this.filialeCodeStr = obj.resids
235
+ },
236
+ stamp () {
237
+ this.all = false
238
+ //默认选择要打印的列
239
+ this.modelval = defaultPrint.config
240
+ this.fields = this.getfield
241
+ console.log('所有打印字段',this.fields)
242
+ this.printshow = true
243
+ this.put()
244
+ },
245
+ dealmsg (val) {
246
+ console.log('---------------dealmsg')
247
+ val.model = this.model.model
248
+ this.$dispatch('deal-msg',val)
249
+ },
250
+ put () {
251
+ // 对Modelval进行排序
252
+ this.sortModelval()
253
+ this.thead = `<tr><th colspan=${this.modelval.length}>补气查询统计报表</th></tr><tr>`
254
+ for (let key of this.modelval) {
255
+ this.thead += '<th>' + this.fields[key] + '</th>'
256
+ }
257
+ this.thead += '</tr>'
258
+ },
259
+ print () {
260
+ this.$refs.print.PrintAsFile()
261
+ this.printshow = false
262
+ },
263
+ close () {
264
+ this.printshow = false
265
+ this.all = false
266
+ },
267
+ // 对选择的列进行排序
268
+ sortModelval () {
269
+ let sortModel = []
270
+ Object.keys(this.fields).forEach((key) => {
271
+ if (this.modelval.includes(key)) {
272
+ sortModel.push(key)
273
+ }
274
+ })
275
+ this.modelval = sortModel
276
+ console.log('选择的打印的字段', this.modelval)
277
+ }
278
+ },
279
+ watch:{
280
+ 'all' (val) {
281
+ if (val) {
282
+ this.modelval = this.bodyData
283
+ } else {
284
+ this.modelval = defaultPrint.config
285
+ this.put()
286
+ }
287
+ },
288
+ 'modelval.length' () {
289
+ this.put()
290
+ },
291
+ },
292
+ computed:{
293
+ selldep () {
294
+ let rs = []
295
+ if(this.$refs.paged.$refs.cri.model.f_filiale){
296
+ this.$refs.paged.$refs.cri.model.f_outlets = ''
297
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam(this.$refs.paged.$refs.cri.model.f_filiale) ]
298
+ }
299
+ else {
300
+ return [{label: '全部', value: ''}]
301
+ }
302
+ },
303
+ getCondition(){
304
+ return {condition: `${this.$refs.paged.$refs.cri.condition}`}
305
+ },
306
+ getfield(){
307
+ return exportConfig.fillgasConfig
308
+ }
309
+ }
310
+ }
311
+ </script>