manage-client 3.2.65 → 3.2.66

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.65",
3
+ "version": "3.2.66",
4
4
  "description": "经营管控模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -83,33 +83,46 @@
83
83
  <div class="col-sm-2 form-group">
84
84
  <label class="font_normal_body">气表品牌</label>
85
85
  <v-select
86
- placeholder='气表品牌'
86
+ :options='$parent.$parent.meterbrand'
87
+
87
88
  :value.sync="model.f_meter_brand"
88
- v-model="model.f_meter_brand"
89
- :options='$parent.$parent.WarningType'
90
- @change="$parent.$parent.getMeterType"
91
89
  close-on-select
92
- condition="gb.f_meter_brand='{}'">
90
+ condition="f_meter_brand='{}'"
91
+ placeholder='气表品牌'
92
+ style="width:60%"
93
+ v-model="model.f_meter_brand">
93
94
  </v-select>
94
95
  </div>
96
+ <!-- <div class="col-sm-2 form-group">-->
97
+ <!-- <label class="font_normal_body">气表品牌</label>-->
98
+ <!-- <v-select-->
99
+ <!-- placeholder='气表品牌'-->
100
+ <!-- :value.sync="model.f_meter_brand"-->
101
+ <!-- v-model="model.f_meter_brand"-->
102
+ <!-- :options='$parent.$parent.WarningType'-->
103
+ <!-- @change="$parent.$parent.getMeterType"-->
104
+ <!-- close-on-select-->
105
+ <!-- condition="gb.f_meter_brand='{}'">-->
106
+ <!-- </v-select>-->
107
+ <!-- </div>-->
95
108
  <div class="col-sm-2 form-group" >
96
109
  <label class="font_normal_body">气表型号</label>
97
- <v-select v-if="$parent.$parent.styles"
110
+ <v-select
98
111
  placeholder='气表型号'
99
112
  :value.sync="model.f_meter_style"
100
113
  v-model="model.f_meter_style"
101
- :options='$parent.$parent.Warningstyle'
114
+ :options='$parent.$parent.meterstyle[model.f_meter_brand]'
102
115
  close-on-select
103
116
  condition="gm.f_meter_style='{}'">
104
117
  </v-select>
105
- <v-select v-if="!$parent.$parent.styles"
106
- placeholder='气表型号'
107
- :value.sync="model.f_meter_style"
108
- v-model="model.f_meter_style"
109
- :options='$parent.$parent.Warningstyles'
110
- close-on-select
111
- condition="f_meter_style='{}'">
112
- </v-select>
118
+ <!-- <v-select v-if="!$parent.$parent.styles"-->
119
+ <!-- placeholder='气表型号'-->
120
+ <!-- :value.sync="model.f_meter_style"-->
121
+ <!-- v-model="model.f_meter_style"-->
122
+ <!-- :options='$parent.$parent.Warningstyles'-->
123
+ <!-- close-on-select-->
124
+ <!-- condition="f_meter_style='{}'">-->
125
+ <!-- </v-select>-->
113
126
  </div>
114
127
  <div class="col-sm-2 form-group">
115
128
  <label class="font_normal_body" style="word-break:keep-all;">上报时间</label>
@@ -127,31 +140,31 @@
127
140
  :format="'yyyy-MM-dd HH:mm:ss'"
128
141
  ></datepicker>
129
142
  </div>
130
- <div class="col-sm-2 form-group">
131
- <label class="font_normal_body">壁&ensp;挂&ensp;炉</label>
132
- <v-select id="f_meter_brand"
133
- v-model="model.f_usetype"
134
- placeholder='壁挂炉'
135
- :value.sync="model.f_usetype"
136
- :options='$parent.$parent.usetypes'
137
- condition="" :search="false"
138
- close-on-select style="width: 60%">
139
- </v-select>
140
- </div>
141
- <div class="col-sm-2 form-group">
142
- <label class="font_normal_body">房屋类型</label>
143
- <v-select :value.sync="model.f_house_type" v-model="model.f_house_type"
144
- :options='$parent.$parent.houseTypes' placeholder='请选择'
145
- close-on-select
146
- condition=""></v-select>
147
- </div>
148
- <div class="col-sm-2 form-group">
149
- <label class="font_normal_body">安装位置</label>
150
- <v-select :value.sync="model.f_position" v-model="model.f_position"
151
- :options='$parent.$parent.positions' placeholder='请选择'
152
- condition=""
153
- close-on-select></v-select>
154
- </div>
143
+ <!-- <div class="col-sm-2 form-group">-->
144
+ <!-- <label class="font_normal_body">壁&ensp;挂&ensp;炉</label>-->
145
+ <!-- <v-select id="f_meter_brand"-->
146
+ <!-- v-model="model.f_usetype"-->
147
+ <!-- placeholder='壁挂炉'-->
148
+ <!-- :value.sync="model.f_usetype"-->
149
+ <!-- :options='$parent.$parent.usetypes'-->
150
+ <!-- condition="" :search="false"-->
151
+ <!-- close-on-select style="width: 60%">-->
152
+ <!-- </v-select>-->
153
+ <!-- </div>-->
154
+ <!-- <div class="col-sm-2 form-group">-->
155
+ <!-- <label class="font_normal_body">房屋类型</label>-->
156
+ <!-- <v-select :value.sync="model.f_house_type" v-model="model.f_house_type"-->
157
+ <!-- :options='$parent.$parent.houseTypes' placeholder='请选择'-->
158
+ <!-- close-on-select-->
159
+ <!-- condition=""></v-select>-->
160
+ <!-- </div>-->
161
+ <!-- <div class="col-sm-2 form-group">-->
162
+ <!-- <label class="font_normal_body">安装位置</label>-->
163
+ <!-- <v-select :value.sync="model.f_position" v-model="model.f_position"-->
164
+ <!-- :options='$parent.$parent.positions' placeholder='请选择'-->
165
+ <!-- condition=""-->
166
+ <!-- close-on-select></v-select>-->
167
+ <!-- </div>-->
155
168
  </div>
156
169
  </div>
157
170
  </criteria>
@@ -215,7 +228,13 @@
215
228
  import * as Util from '../../../Util'
216
229
  import plugins from '../../../plugins/GetLoginInfoService'
217
230
  import plugin from 'system-clients/src/plugins/GetLoginInfoService'
218
-
231
+ let readySomething = async function (self) {
232
+ self.$refs.paged.$refs.cri.model.startDate = Util.addDate(new Date(),-6).substring(0,10) + ' 00:00:00'
233
+ self.$refs.paged.$refs.cri.model.endDate = Util.toStandardDateString() + ' 23:59:59'
234
+ await self.$MagLoadParams.loadParam()
235
+ self.initQueryParam()
236
+ self.$refs.paged.$refs.cri.search()
237
+ }
219
238
  export default {
220
239
  title: '抄表分析',
221
240
  props: ['data'],
@@ -227,6 +246,8 @@
227
246
  startDate: '',
228
247
  gasproperties:[{label: '全部', value: ''}],
229
248
  endDate: '',
249
+ meterbrand: [],
250
+ meterstyle: {},
230
251
  WarningType: [
231
252
  {label: '全部', value: ''}
232
253
  ],
@@ -262,52 +283,29 @@
262
283
  }
263
284
  },
264
285
  ready () {
265
- this.$refs.paged.$refs.cri.model.startDate = Util.addDate(new Date(),-6).substring(0,10) + ' 00:00:00'
266
- this.$refs.paged.$refs.cri.model.endDate = Util.toStandardDateString() + ' 23:59:59'
267
- this.getMeterTypeAndBrand('f_meter_brand', '1=1')
268
- this.$refs.paged.$refs.cri.search()
286
+ readySomething(this).then(() => {
287
+ this.$emit('ready')
288
+ }).catch((error) => {
289
+ this.$emit('error', error)
290
+ })
269
291
  },
270
292
  methods: {
271
- getMeterType() {
272
- this.Warningstyle = [{label: '全部', value: ''}]
273
- this.styles = false
274
- let f_meter_brand = this.$refs.paged.$refs.cri.model.f_meter_brand
275
- this.getMeterTypeAndBrand('f_meter_style', `f_meter_brand='${f_meter_brand}'`)
276
- },
277
- getMeterTypeAndBrand(groupname, condition) {
278
- condition = `${condition} and ui.f_orgid like '${this.$login.f.orgid}%'`
279
- let self = this
280
- let load = new HttpResetClass()
281
- load.load('POST', 'rs/sql/getMeterStyleAndBrand1', {
282
- data: {
283
- condition: condition,
284
- groupname: groupname
285
- }
286
- }, {warnMsg: null, resolveMsg: null}).then((res) => {
287
- let dr = {label: '', value: ''}
288
- let i = 0
289
- for (i = 0; i < res.data.length; i++) {
290
- dr = {label: '', value: ''}
291
- if (groupname == 'f_meter_brand') {
292
- dr.label = res.data[i].f_meter_brand
293
- dr.value = res.data[i].f_meter_brand
294
- //气表品牌
295
- self.WarningType.push(dr)
296
- console.log('气表品牌~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~')
297
- console.log(dr)
298
- console.log( self.WarningType)
299
- } else if (groupname == 'f_meter_style') {
300
- dr.label = res.data[i].f_meter_style
301
- dr.value = res.data[i].f_meter_style
302
- //气表类型
303
- self.Warningstyle.push(dr)
293
+ initQueryParam () {
294
+ let meters = this.$MagGetSaleParam.getGasbrand().filter(item => item.value.f_meter_type==='物联网表')
295
+ let arr = meters.map(res => {
296
+ let sty = res.value.gasmodel.map(row => {
297
+ return {
298
+ label: row.label,
299
+ value: row.value.f_meter_style
304
300
  }
305
- }
306
- if (self.Warningstyle.length > 1) {
307
- self.showMeterStyle()
301
+ })
302
+ this.meterstyle[res.value.f_meter_brand] = [{label: '全部', value: ''}, ...sty]
303
+ return {
304
+ label: res.label,
305
+ value: res.value.f_meter_brand
308
306
  }
309
307
  })
310
-
308
+ this.meterbrand = [{label: '全部', value: ''}, ...arr]
311
309
  },
312
310
  showMeterStyle() {
313
311
  this.styles = true
@@ -365,7 +363,7 @@
365
363
  return this.$showMessage("时间区间的开始和结束时间不能为空!")
366
364
  }
367
365
  if (this.orgCondtionStr){
368
- this.condition = this.$refs.paged.$refs.cri.condition + `and uf.f_orgid in ${this.orgCondtionStr}`
366
+ this.condition = this.$refs.paged.$refs.cri.condition + ` and uf.f_orgid in ${this.orgCondtionStr}`
369
367
  }
370
368
  else
371
369
  this.condition = this.$refs.paged.$refs.cri.condition
@@ -1,262 +1,255 @@
1
- <template>
2
- <div class="basic-main" style="height: 98%">
3
- <criteria-paged :model="model" :pager='false' v-ref:paged>
4
- <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:criteria>
5
- <p class="bg-info text-center" style="padding: 8px;">气价明细报表</p>
6
- <div class="form-group" v-if="!$parent.$parent.data.f_files_path"></div>
7
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial >
8
- <div class="row">
9
- <div class="col-sm-4" >
10
- <label class="font_normal_body" for="startDate">开始日期:</label>
11
- <datepicker id="startDate" placeholder="开始日期" style="width: 60%"
12
- v-model="model.startDate"
13
- :value.sync="model.startDate"
14
- :disabled-days-of-Week="[]"
15
- :format="'yyyy-MM-dd HH:mm:ss'"
16
- :show-reset-button="reset">
17
- </datepicker>
18
- </div>
19
- <div class="col-sm-4" >
20
- <label class="font_normal_body" for="endDate">结束日期:</label>
21
- <datepicker id="endDate" placeholder="结束日期" style="width: 60%"
22
- v-model="model.endDate"
23
- :value.sync="model.endDate"
24
- :disabled-days-of-Week="[]"
25
- :format="'yyyy-MM-dd HH:mm:ss'"
26
- :show-reset-button="reset">
27
- </datepicker>
28
- </div>
29
- <div class="col-sm-4">
30
- <label class="font_normal_body">&nbsp;&nbsp;&nbsp;公司&nbsp;&nbsp;&nbsp; </label>
31
- <right-tree @re-res="$parent.$parent.getRes"></right-tree>
32
- </div>
33
- <div class="col-sm-4">
34
- <label class="font_normal_body">&nbsp;&nbsp;&nbsp;部门&nbsp;&nbsp;&nbsp; </label>
35
- <res-select restype='department'
36
- is-mul="false"
37
- @res-select="$parent.$parent.getdep"
38
- :parentresid="$parent.$parent.depresid"
39
- :initresid='$parent.$parent.depid'>
40
- </res-select>
41
-
42
- </div>
43
- <div class="col-sm-4">
44
- <label class="font_normal_body">&nbsp;&nbsp;&nbsp;人员&nbsp;&nbsp;&nbsp; </label>
45
- <res-select restype='user'
46
- is-mul="false"
47
- @res-select="$parent.$parent.getuser"
48
- :parentresid="$parent.$parent.userresid"
49
- :initresid='$parent.$parent.operatorid'>
50
- </res-select>
51
- </div>
52
- <div class="col-sm-3 form-group">
53
- <label class="font_normal_body" for="oper1">格式一</label>
54
- <input type="radio" name="reportStyle" id="oper1" v-model="$parent.$parent.reportStyle" value="1">
55
- <label class="font_normal_body" for="oper2">格式二</label>
56
- <input type="radio" name="reportStyle" id="oper2" v-model="$parent.$parent.reportStyle" value="2">
57
- </div>
58
- </div>
59
- <div class="span" style = "float:right;">
60
- <button class="button_search" @click="$parent.$parent.searchData()">查询</button>
61
- <report-print id='gasprice' top='3cm' left='0' width='100%' height='100%' :preview="true"></report-print>
62
- <report-excel id='gasprice'></report-excel>
63
- </div>
64
- </div>
65
- </criteria>
66
- <div partial='list' v-el:handcollect id='gasprice' style="overflow-y: scroll">
67
- <table class='tableprint' style="margin: 0px auto;">
68
- <thead>
69
- <tr>
70
- <th colspan='18' style="font-weight: normal; text-align: left;">
71
- <h3 style="text-align: center">气价明细报表</h3>
72
- </th>
73
- </tr>
74
- <tr>
75
- <th colspan='18' style="font-weight: normal; text-align: center;">
76
- 开始时间:{{model.model.startDate}}&nbsp;&nbsp;&nbsp;
77
- 结束时间:{{ model.model.endDate }}&nbsp;&nbsp;<br/>
78
- 打印时间:{{{$parent.printTime}}}
79
- </th>
80
- </tr>
81
- <tr>
82
- <th colspan='18' style="font-weight: normal; text-align: center;">
83
- <div>
84
- <span v-show="$parent.orgname.trim()!=''">公司:{{$parent.orgname}}</span>
85
- <span v-show="$parent.depname.trim()!=''"> 部门:{{$parent.depname}}</span>
86
- <span v-show="$parent.operatorname.trim()!=''">人员:{{$parent.operatorname}}</span>
87
- </div>
88
- </th>
89
- </tr>
90
- </thead>
91
- <tr>
92
- <td colspan='18'>
93
- {{{ model.data.substring(26,model.data.length-8) }}}
94
- </td>
95
- </tr>
96
- <tfoot>
97
- <tr style="text-align: left">
98
- <th colspan='6'>财务审核:</th>
99
- <th colspan='6'>收款审核:</th>
100
- <th colspan='6'>收款员:</th>
101
- </tr>
102
- </tfoot>
103
- </table>
104
- {{{ $parent.reportStr}}}
105
- </div>
106
- </criteria-paged>
107
- <modal :show.sync="show" v-ref:modal small backdrop="false">
108
- <header slot="modal-header" class="modal-header">
109
- <h4 class="modal-title">输入文件名称</h4>
110
- </header>
111
- <article slot="modal-body" class="modal-body">
112
- <div class="form-group">
113
- <input type="text" class="form-control" v-model="filename" placeholder='保存的文件名'>
114
- </div>
115
- </article>
116
- <footer slot="modal-footer" class="modal-footer">
117
- <button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
118
- <button v-show="show" type="button" class="btn btn-success" @click='confirm(filename)'>确认</button>
119
- </footer>
120
- </modal>
121
- </div>
122
- </template>
123
-
124
- <script>
125
- import { DataModel } from 'vue-client'
126
- import co from 'co'
127
- let saveFile = function * (self) {
128
- // 线验证文件是否重名
129
- let count = yield self.$resetpost('rs/sql/manageSingleTable',
130
- {data: {tablename: 't_report_record', condition: `f_files_name = '${self.filename}'`}},
131
- {resolveMsg: null, rejectMsg: null})
132
- if (count.data.length > 0) {
133
- self.$showAlert('无法保存,文件名重名', 'warning', 3000)
134
- return
135
- }
136
- let saveBack = yield self.$resetpost('rs/logic/saveReport', {f_files_content: self.$refs.paged.$els.handcollect.innerHTML,
137
- f_files_name: self.filename, f_files_type: self.data.f_report_type, f_component_name: 'manage-bus-summary',
138
- f_operator: this.$login.f.name, f_query_month: `${self.model.model.startDate}-${self.model.model.endDate}`,
139
- f_outlets: this.$login.f.depname})
140
- if (saveBack.data.status === 'succeed') {
141
- self.show = false
142
- self.filename = ''
143
- // 后台保存完成,通知刷新
144
- self.$dispatch('save-success', self.filename)
145
- }
146
- }
147
- export default {
148
- title: '气价明细报表',
149
- props: ['data'],
150
- data () {
151
- return {
152
- printTime: this.$login.toStandardTimeString(),
153
- depresid: [],
154
-
155
- userresid: [],
156
- f_orgid: this.$login.f.orgid,
157
- f_depid: this.$login.f.depids,
158
- f_operatorid: this.$login.f.id,
159
- operatorid: [],
160
- depid: [],
161
- orgname: '',
162
- depname: '',
163
- reportStyle: 1,
164
- operatorname: '',
165
- orgCondtionStr: '1=1',
166
- model: new DataModel('rs/report/gasprice', {startDate: 'this.model.startDate', endDate: 'this.model.endDate',
167
- f_orgid: 'this.model.f_orgid'}),
168
- reportStr: null,
169
- show: false
170
- }
171
- },
172
- ready () {
173
- this.$refs.paged.$refs.criteria.model.startDate = this.$login.toStandardDateString() + ' 00:00:00'
174
- this.$refs.paged.$refs.criteria.model.endDate = this.$login.toStandardDateString() + ' 23:59:59'
175
- console.log(this.$login.f)
176
- },
177
- methods: {
178
- searchData () {
179
- this.$refs.paged.$refs.criteria.search()
180
- },
181
- selfSearch (args) {
182
- if (this.reportStyle == '1') {
183
- this.model.url = 'rs/report/gasprice'
184
- } else {
185
- this.model.url = 'rs/report/gaspricetwo'
186
- }
187
- this.printTime = this.$login.toStandardTimeString()
188
- let orgcondition = '1=1'
189
- if (this.f_orgid && this.f_orgid[0]) {
190
- orgcondition += ' and f_orgid in(' + this.f_orgid + ')'
191
- }
192
- if (this.f_depid && this.f_depid[0]) {
193
- orgcondition += ' and f_depid in(' + this.f_depid + ')'
194
- }
195
- if (this.f_operatorid && this.f_operatorid[0]) {
196
- orgcondition += ' and f_operatorid in(' + this.f_operatorid + ')'
197
- }
198
- this.$refs.paged.$refs.criteria.model.f_orgid = orgcondition
199
- this.$refs.paged.search(args)
200
- },
201
- getRes (obj) {
202
- this.orgname = obj.res[0]
203
- this.depresid = obj.resids
204
- this.f_orgid = obj.resids
205
- },
206
- getdep (obj, val) {
207
- // this.depname = val[0]
208
- this.userresid = obj
209
- this.f_depid = obj
210
- },
211
- getuser ( obj, val) {
212
- this.operatorname = val[0]
213
- this.f_operatorid = obj
214
- },
215
-
216
- // 根据文件路径获取储存的报表内容
217
- getFileContent (path) {
218
- this.$resetpost('rs/logic/getReportFileContent', {f_files_path: path}, {resolveMsg: null, rejectMsg: null}).then((res) => {
219
- this.reportStr = res.data.filecontent
220
- this.model.state = '正确'
221
- })
222
- },
223
- confirm () {
224
- if (!this.filename || this.filename === '') {
225
- this.$showAlert('无法保存,文件名不能为空', 'warning', 3000)
226
- }
227
- let saveGen = saveFile(this)
228
- co(saveGen)
229
- },
230
- close () {
231
- this.show = false
232
- },
233
- // 将报表保存成文件
234
- confirmReport () {
235
- this.show = true
236
- this.filename = this.data.f_report_name + this.$login.toStandardDateString()
237
- }
238
- },
239
- watch: {
240
- 'data' (val) {
241
- if (val.f_files_path) {
242
- this.getFileContent(val.f_files_path)
243
- } else {
244
- this.reportStr = null
245
- }
246
- },
247
- 'reportStyle' (val) {
248
- this.$refs.paged.$refs.criteria.search()
249
- }
250
- },
251
- computed: {
252
- }
253
- }
254
- </script>
255
- <style scoped>
256
- .noborder{
257
- border: none;
258
- }
259
- .fontSize{
260
- font-size: 13px;
261
- }
262
- </style>
1
+ <template>
2
+ <div class="basic-main" style="height: 98%">
3
+ <criteria-paged :model="model" :pager='false' v-ref:paged>
4
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:criteria>
5
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial >
6
+ <div class="row">
7
+ <div class="col-sm-4" >
8
+ <label class="font_normal_body" for="startDate">开始日期:</label>
9
+ <datepicker id="startDate" placeholder="开始日期" style="width: 60%"
10
+ v-model="model.startDate"
11
+ :value.sync="model.startDate"
12
+ :disabled-days-of-Week="[]"
13
+ :format="'yyyy-MM-dd HH:mm:ss'"
14
+ :show-reset-button="reset">
15
+ </datepicker>
16
+ </div>
17
+ <div class="col-sm-4" >
18
+ <label class="font_normal_body" for="endDate">结束日期:</label>
19
+ <datepicker id="endDate" placeholder="结束日期" style="width: 60%"
20
+ v-model="model.endDate"
21
+ :value.sync="model.endDate"
22
+ :disabled-days-of-Week="[]"
23
+ :format="'yyyy-MM-dd HH:mm:ss'"
24
+ :show-reset-button="reset">
25
+ </datepicker>
26
+ </div>
27
+ <div class="col-sm-4">
28
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;公司&nbsp;&nbsp;&nbsp; </label>
29
+ <right-tree @re-res="$parent.$parent.getRes"></right-tree>
30
+ </div>
31
+ <div class="col-sm-4">
32
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;部门&nbsp;&nbsp;&nbsp; </label>
33
+ <res-select restype='department'
34
+ is-mul="false"
35
+ @res-select="$parent.$parent.getdep"
36
+ :parentresid="$parent.$parent.depresid"
37
+ :initresid='$parent.$parent.depid'>
38
+ </res-select>
39
+
40
+ </div>
41
+ <div class="col-sm-4">
42
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;人员&nbsp;&nbsp;&nbsp; </label>
43
+ <res-select restype='user'
44
+ is-mul="false"
45
+ @res-select="$parent.$parent.getuser"
46
+ :parentresid="$parent.$parent.userresid"
47
+ :initresid='$parent.$parent.operatorid'>
48
+ </res-select>
49
+ </div>
50
+ <div class="col-sm-3 form-group">
51
+ <label class="font_normal_body" for="oper1">格式一</label>
52
+ <input type="radio" name="reportStyle" id="oper1" v-model="$parent.$parent.reportStyle" value="1">
53
+ <label class="font_normal_body" for="oper2">格式二</label>
54
+ <input type="radio" name="reportStyle" id="oper2" v-model="$parent.$parent.reportStyle" value="2">
55
+ </div>
56
+ </div>
57
+ <div class="span" style = "float:right;">
58
+ <button class="button_search" @click="$parent.$parent.searchData()">查询</button>
59
+ <report-print id='gasprice' top='3cm' left='0' width='100%' height='100%' :preview="true"></report-print>
60
+ <report-excel id='gasprice'></report-excel>
61
+ </div>
62
+ </div>
63
+ </criteria>
64
+ <div partial='list' v-el:handcollect id='gasprice' style="overflow-y: scroll">
65
+ <table class='tableprint' style="margin: 0px auto;">
66
+ <thead>
67
+ <tr>
68
+ <th :colspan='$parent.spans' style="font-weight: normal; text-align: left;">
69
+ <h3 style="text-align: center">气价明细报表</h3>
70
+ </th>
71
+ </tr>
72
+ <tr>
73
+ <th :colspan='$parent.spans' style="font-weight: normal; text-align: center;">
74
+ 开始时间:{{model.model.startDate}}&nbsp;&nbsp;&nbsp;
75
+ 结束时间:{{ model.model.endDate }}&nbsp;&nbsp;<br/>
76
+ 打印时间:{{{$parent.printTime}}}
77
+ </th>
78
+ </tr>
79
+ <tr>
80
+ <th :colspan='$parent.spans' style="font-weight: normal; text-align: center;">
81
+ <div>
82
+ <span v-show="$parent.orgname.trim()!=''">公司:{{$parent.orgname}}</span>
83
+ <span v-show="$parent.depname.trim()!=''"> 部门:{{$parent.depname}}</span>
84
+ <span v-show="$parent.operatorname.trim()!=''">人员:{{$parent.operatorname}}</span>
85
+ </div>
86
+ </th>
87
+ </tr>
88
+ </thead>
89
+ <tr>
90
+ <td :colspan='$parent.spans'>
91
+ {{{ model.data.substring(26,model.data.length-8) }}}
92
+ </td>
93
+ </tr>
94
+ <tfoot>
95
+ <tr style="text-align: left">
96
+ <th :colspan='Math.floor($parent.spans/3)'>财务审核:</th>
97
+ <th :colspan='Math.floor($parent.spans/3)'>收款审核:</th>
98
+ <th :colspan='Math.floor($parent.spans/3)'>收款员:</th>
99
+ </tr>
100
+ </tfoot>
101
+ </table>
102
+ </div>
103
+ </criteria-paged>
104
+ </div>
105
+ </template>
106
+
107
+ <script>
108
+ import {DataModel, HttpResetClass} from 'vue-client'
109
+ import co from 'co'
110
+ let saveFile = function * (self) {
111
+ }
112
+ export default {
113
+ title: '气价明细报表',
114
+ props: ['data'],
115
+ data () {
116
+ return {
117
+ printTime: this.$login.toStandardTimeString(),
118
+ depresid: [],
119
+
120
+ userresid: [],
121
+ f_orgid: this.$login.f.orgid,
122
+ f_depid: this.$login.f.depids,
123
+ f_operatorid: this.$login.f.id,
124
+ operatorid: [],
125
+ depid: [],
126
+ orgname: '',
127
+ depname: '',
128
+ spans: 0,
129
+ reportStyle: 1,
130
+ operatorname: '',
131
+ orgCondtionStr: '1=1',
132
+ model: new DataModel('rs/report/gasprice', {startDate: 'this.model.startDate', endDate: 'this.model.endDate',
133
+ f_orgid: 'this.model.f_orgid'}),
134
+ reportStr: null,
135
+ show: false
136
+ }
137
+ },
138
+ ready () {
139
+ this.$refs.paged.$refs.criteria.model.startDate = this.$login.toStandardDateString() + ' 00:00:00'
140
+ this.$refs.paged.$refs.criteria.model.endDate = this.$login.toStandardDateString() + ' 23:59:59'
141
+ console.log(this.$login.f)
142
+ },
143
+ methods: {
144
+ searchData () {
145
+ this.$refs.paged.$refs.criteria.search()
146
+ },
147
+ distinctJson(obj){
148
+ let at = []
149
+ for (let i = 0; i < obj.length; i++) {
150
+ let flag = false
151
+ if (i == 0 ) {
152
+ at.push(obj[i])
153
+ } else {
154
+ for (let j = 0; j < at.length; j++) {
155
+ if (JSON.stringify(obj[i]) == JSON.stringify(at[j])) {
156
+ flag = true
157
+ }
158
+ }
159
+ if (!flag) {
160
+ at.push(obj[i])
161
+ }
162
+ }
163
+ }
164
+ return at
165
+ },
166
+ selfSearch (args) {
167
+ this.printTime = this.$login.toStandardTimeString()
168
+ let orgcondition = '1=1'
169
+ if (this.f_orgid && this.f_orgid[0]) {
170
+ orgcondition += ' and f_orgid in(' + this.f_orgid + ')'
171
+ }
172
+ if (this.f_depid && this.f_depid[0]) {
173
+ orgcondition += ' and f_depid in(' + this.f_depid + ')'
174
+ }
175
+ if (this.f_operatorid && this.f_operatorid[0]) {
176
+ orgcondition += ' and f_operatorid in(' + this.f_operatorid + ')'
177
+ }
178
+ this.$refs.paged.$refs.criteria.model.f_orgid = orgcondition
179
+ if (this.reportStyle == '1') {
180
+ let load = new HttpResetClass()
181
+ load.load("POST", 'rs/sql/getGasPriceDetail',
182
+ {data: {
183
+ startDate: args.model.startDate,
184
+ endDate: args.model.endDate,
185
+ f_orgid: orgcondition
186
+ }},
187
+ {resolveMsg: null, rejectMsg: null})
188
+ .then((res) => {
189
+ let info = res.data
190
+ let gasproperties = info.map(item => {return {f_gasproperties: item.f_gasproperties}})
191
+ let district = info.map(item => {
192
+ return { f_gasproperties: item.f_gasproperties, f_district: item.f_district }
193
+ })
194
+ let meter_type = info.map(item => {
195
+ return { f_gasproperties: item.f_gasproperties, f_district: item.f_district, f_meter_type: item.f_meter_type }
196
+ })
197
+ let price_name = info.map(item => {
198
+ return {
199
+ f_gasproperties: item.f_gasproperties,
200
+ f_district: item.f_district,
201
+ f_meter_type: item.f_meter_type,
202
+ f_price_name: item.f_price_name
203
+ }
204
+ })
205
+ this.model.url = 'rs/report/gasprice'
206
+ this.$refs.paged.$refs.criteria.model.f_orgid = {
207
+ left1: JSON.stringify(this.distinctJson(gasproperties)),
208
+ left2: JSON.stringify(this.distinctJson(district)),
209
+ left3: JSON.stringify(this.distinctJson(meter_type)),
210
+ left4: JSON.stringify(this.distinctJson(price_name)),
211
+ infoall: JSON.stringify(info)
212
+ }
213
+ this.$refs.paged.search(args)
214
+ })
215
+ } else {
216
+ this.model.url = 'rs/report/gaspricetwo'
217
+ this.$refs.paged.search(args)
218
+ }
219
+
220
+ },
221
+ getRes (obj) {
222
+ this.orgname = obj.res[0]
223
+ this.depresid = obj.resids
224
+ this.f_orgid = obj.resids
225
+ },
226
+ getdep (obj, val) {
227
+ // this.depname = val[0]
228
+ this.userresid = obj
229
+ this.f_depid = obj
230
+ },
231
+ getuser ( obj, val) {
232
+ this.operatorname = val[0]
233
+ this.f_operatorid = obj
234
+ }
235
+ },
236
+ watch: {
237
+ 'reportStyle' (val) {
238
+ this.$refs.paged.$refs.criteria.search()
239
+ },
240
+ 'model.data' (val) {
241
+ this.spans = val.split('</tr>').map(item => item.split('</td>').length-1).reduce((x, y) => x > y ? x : y)
242
+ }
243
+ },
244
+ computed: {
245
+ }
246
+ }
247
+ </script>
248
+ <style scoped>
249
+ .noborder{
250
+ border: none;
251
+ }
252
+ .fontSize{
253
+ font-size: 13px;
254
+ }
255
+ </style>
package/src/main.js CHANGED
@@ -43,7 +43,7 @@ all()
43
43
  // sale()
44
44
  ldap()
45
45
  system(false)
46
- saleManage('qianneng')
46
+ saleManage()
47
47
 
48
48
  webmeterManage()
49
49
  ManageHome()