manage-client-xy 3.2.28 → 3.2.29

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.
Files changed (31) hide show
  1. package/build/dev-server.js +1 -1
  2. package/package.json +1 -1
  3. package/src/components/SellReport/FinancialStatement.vue +30 -0
  4. package/src/components/SellReport/ManageBusSummary.vue +241 -241
  5. package/src/components/SellReport/SmartKitchenSummary.vue +275 -275
  6. package/src/components/SellReport/UserNumber.vue +30 -0
  7. package/src/components/SellReport/XianYangNewCharge.vue +355 -355
  8. package/src/components/sale/businessquery/AreaGeneralQuery.vue +30 -15
  9. package/src/components/sale/businessquery/CMHGasQuery.vue +30 -0
  10. package/src/components/sale/businessquery/ChangeMeterQuery.vue +30 -1
  11. package/src/components/sale/businessquery/ChangeUserQuery.vue +30 -0
  12. package/src/components/sale/businessquery/ChargeQuery.vue +30 -0
  13. package/src/components/sale/businessquery/DisableQuery.vue +30 -0
  14. package/src/components/sale/businessquery/EnableQuery.vue +30 -0
  15. package/src/components/sale/businessquery/FMYGasQuery.vue +30 -0
  16. package/src/components/sale/businessquery/FillCardQuery.vue +30 -0
  17. package/src/components/sale/businessquery/FillGasQuery.vue +30 -0
  18. package/src/components/sale/businessquery/HandplanQuery.vue +30 -0
  19. package/src/components/sale/businessquery/LogQuery.vue +32 -0
  20. package/src/components/sale/businessquery/NewAccountQuery.vue +30 -0
  21. package/src/components/sale/businessquery/OtherChargeQuery.vue +30 -0
  22. package/src/components/sale/businessquery/RecordQuery.vue +30 -0
  23. package/src/components/sale/businessquery/ResidentialQuery.vue +30 -0
  24. package/src/components/sale/businessquery/ReverseQuery.vue +30 -0
  25. package/src/components/sale/businessquery/SellingHand.vue +30 -0
  26. package/src/components/sale/businessquery/TransferQuery.vue +30 -0
  27. package/src/components/sale/businessquery/cancelAccountQuery.vue +30 -0
  28. package/src/components/sale/filesquery/DeviceQuery.vue +30 -0
  29. package/src/components/sale/filesquery/MeterQuery.vue +30 -0
  30. package/src/components/sale/filesquery/UserQuery.vue +33 -1
  31. package/src/components/webmeter/DrillData/UserGasAll.vue +30 -1
@@ -1,355 +1,355 @@
1
- <template>
2
- <div class="basic-main" style="height: 100%">
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-3">
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-3">
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-3">
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-3">
34
- <label class="font_normal_body">用户所属公司</label>
35
- <res-select restype='organization'
36
- @res-select="$parent.$parent.getRess"
37
- :initresid="$parent.$parent.curorgid">
38
- </res-select>
39
- </div>
40
- <div class="col-sm-3 ">
41
- <label class="font_normal_body">用户分类</label>
42
- <v-select :value.sync="model.f_user_type"
43
- @change="$parent.$parent.userTypeChange"
44
- :options='$parent.$parent.usertypes' placeholder='请选择' v-model="model.f_user_type"
45
- condition="uf.f_user_type = '{}'"
46
- close-on-select></v-select>
47
- </div>
48
- <div class="col-sm-3 ">
49
- <label class="font_normal_body">用户类型</label>
50
- <v-select :value.sync="model.f_user_mold"
51
- @change="$parent.$parent.userMoldChange"
52
- :options='$parent.$parent.usermold' placeholder='请选择' v-model="model.f_user_mold"
53
- condition="uf.f_user_mold = '{}'"
54
- close-on-select></v-select>
55
- </div>
56
- <div class="col-sm-3 ">
57
- <label class="font_normal_body">用气性质</label>
58
- <v-select :value.sync="model.f_gasproperties" v-model="model.f_gasproperties"
59
- :options='$parent.$parent.gasproperties' placeholder='请选择'
60
- condition="uf.f_gasproperties = '{}'"
61
- close-on-select></v-select>
62
- </div>
63
- </div>
64
- <div class="row" style="text-align: right">
65
- <div class="span col-sm-3"></div>
66
- <div class="span col-sm-3"></div>
67
- <div class="span col-sm-3"></div>
68
- <div class="span col-sm-3" style="text-align: right;">
69
- <button class="button_search" @click="$parent.$parent.searchData()">查询</button>
70
- <report-print id='gasprice' top='3cm' left='0' width='100%' height='100%' :preview="true"></report-print>
71
- <report-excel id='gasprice'
72
- v-if="$parent.$parent.jurisdiction.includes('excel导出')"
73
- ></report-excel>
74
- </div>
75
- </div>
76
- </div>
77
- </criteria>
78
- <div partial='list' v-el:handcollect id='gasprice' style="overflow-y: scroll">
79
- <table class='tableprint' style="margin: 0px auto">
80
- <thead>
81
- <tr>
82
- <th colspan='7' style="font-weight: normal; text-align: left;">
83
- <h3 style="text-align: center">咸阳财务收费报表(新)</h3>
84
- </th>
85
- </tr>
86
- <tr>
87
- <th colspan='8' style="font-weight: normal; text-align: center;">
88
- 开始时间:{{ model.model.startDate }}&nbsp;&nbsp;&nbsp;
89
- 结束时间:{{ model.model.endDate }}
90
- </th>
91
- </tr>
92
- <tr>
93
- <th colspan='8' style="font-weight: normal; text-align: center;">
94
- 打印时间:{{{ $parent.printTime }}}
95
- </th>
96
- </tr>
97
- <tr>
98
- <th colspan='8' style="font-weight: normal; text-align: center;">
99
- <div>
100
- <span v-show="$parent.orgname.trim()!=''">公司:{{ $parent.orgname }}</span>
101
- <span v-show="$parent.depname.trim()!=''"> 部门:{{ $parent.depname }}</span>
102
- <span v-show="$parent.operatorname.trim()!=''">人员:{{ $parent.operatorname }}</span>
103
- </div>
104
- </th>
105
- </tr>
106
- </thead>
107
- <tr>
108
- <td colspan='12'>
109
- {{{ model.data.substring(26, model.data.length - 8) }}}
110
- </td>
111
- </tr>
112
- <tfoot>
113
- <tr style="text-align: left">
114
- <th colspan='3'>财务审核:</th>
115
- <th colspan='3'>收款审核:</th>
116
- <th colspan='1'>收款员:</th>
117
- </tr>
118
- </tfoot>
119
- </table>
120
- {{{ $parent.reportStr }}}
121
- </div>
122
- </criteria-paged>
123
- <modal :show.sync="show" v-ref:modal small backdrop="false">
124
- <header slot="modal-header" class="modal-header">
125
- <h4 class="modal-title">输入文件名称</h4>
126
- </header>
127
- <article slot="modal-body" class="modal-body">
128
- <div class="form-group">
129
- <input type="text" class="form-control" v-model="filename" placeholder='保存的文件名'>
130
- </div>
131
- </article>
132
- <footer slot="modal-footer" class="modal-footer">
133
- <button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
134
- <button v-show="show" type="button" class="btn btn-success" @click='confirm(filename)'>确认</button>
135
- </footer>
136
- </modal>
137
- </div>
138
- </template>
139
-
140
- <script>
141
- import {DataModel} from 'vue-client'
142
- import co from 'co'
143
- import * as Util from "../../Util";
144
-
145
- let saveFile = function* (self) {
146
- // 线验证文件是否重名
147
- let count = yield self.$resetpost('rs/sql/manageSingleTable',
148
- {data: {tablename: 't_report_record', condition: `f_files_name = '${self.filename}'`}},
149
- {resolveMsg: null, rejectMsg: null})
150
- if (count.data.length > 0) {
151
- self.$showAlert('无法保存,文件名重名', 'warning', 3000)
152
- return
153
- }
154
- let saveBack = yield self.$resetpost('rs/logic/saveReport', {
155
- f_files_content: self.$refs.paged.$els.handcollect.innerHTML,
156
- f_files_name: self.filename, f_files_type: self.data.f_report_type, f_component_name: 'manage-bus-summary',
157
- f_operator: this.$login.f.name, f_query_month: `${self.model.model.startDate}-${self.model.model.endDate}`,
158
- f_outlets: this.$login.f.depname
159
- })
160
- if (saveBack.data.status === 'succeed') {
161
- self.show = false
162
- self.filename = ''
163
- // 后台保存完成,通知刷新
164
- self.$dispatch('save-success', self.filename)
165
- }
166
- }
167
- export default {
168
- title: '咸阳财务收费报表(新)',
169
- props: ['data'],
170
- data() {
171
- return {
172
- printTime: this.$login.toStandardTimeString(),
173
- depresid: [],
174
- userresid: [],
175
- gasproperties: [],
176
- usermold: [],
177
- curorgid: [this.$login.f.orgid],
178
- f_orgid: this.$login.f.orgid,
179
- f_orgid_other: this.$login.f.orgid,
180
- f_depid: this.$login.f.depids,
181
- f_operatorid: this.$login.f.id,
182
- jurisdiction: this.$login.r,
183
- operatorid: [],
184
- depid: [],
185
- orgname: '',
186
- depname: '',
187
- operatorname: '',
188
- f_inputtor: [],
189
- f_user_type: '',
190
- orgCondtionStr: '1=1',
191
- model: new DataModel('rs/report/咸阳财务收费新报表(总计)', {
192
- startDate: 'this.model.startDate', endDate: 'this.model.endDate',
193
- f_orgid: 'this.model.f_orgid',
194
- f_orgid_other: 'this.model.f_orgid_other',
195
- userCondition: 'this.model.userCondition'
196
- }),
197
- reportStr: null,
198
- show: false,
199
- userCondition: ' 1 = 1 '
200
- }
201
- },
202
- ready() {
203
- this.$refs.paged.$refs.criteria.model.startDate = this.$login.toStandardDateString() + ' 00:00:00'
204
- this.$refs.paged.$refs.criteria.model.endDate = this.$login.toStandardDateString() + ' 23:59:59'
205
- // this.$refs.paged.$refs.criteria.search()
206
- console.log(this.$login.f)
207
- },
208
- methods: {
209
- userTypeChange() {
210
- this.usermold = []
211
- this.f_gasproperties = []
212
- if (this.$refs.paged.$refs.criteria.model !== null) {
213
- this.$refs.paged.$refs.criteria.model.f_gasproperties = ''
214
- this.$refs.paged.$refs.criteria.model.f_user_mold = ''
215
- this.usermold = this.$appdata.getParam(this.$refs.paged.$refs.criteria.model.f_user_type[0])
216
- } else {
217
- this.usermold = [{label: '全部', value: ''}]
218
- }
219
- },
220
- userMoldChange() {
221
- this.gasproperties = []
222
- if (this.$refs.paged.$refs.criteria.model !== null) {
223
- this.$refs.paged.$refs.criteria.model.f_gasproperties = ''
224
- if (this.$refs.paged.$refs.criteria.model.f_user_mold[0] === '居民') {
225
- this.gasproperties = this.$appdata.getParam(this.$refs.paged.$refs.criteria.model.f_user_type[0] + this.$refs.paged.$refs.criteria.model.f_user_mold[0])
226
- return
227
- }
228
- this.gasproperties = this.$appdata.getParam(this.$refs.paged.$refs.criteria.model.f_user_mold[0])
229
- } else {
230
- this.gasproperties = [{label: '全部', value: ''}]
231
- }
232
- },
233
- getRes(obj) {
234
- this.orgname = obj.res[0]
235
- this.depresid = obj.resids
236
- this.f_orgid = obj.resids
237
- this.f_orgid_other = obj.resids
238
- },
239
- getdep(obj, val) {
240
- // this.depname = val[0]
241
- this.userresid = obj
242
- this.f_depid = obj
243
- },
244
- getuser(obj, val) {
245
- this.operatorname = val[0]
246
- this.f_operatorid = obj
247
- },
248
- getRess(obj) {
249
- if (obj.length > 0) {
250
- this.userCondition = ` info.f_orgid in ${Util.convertToIn(obj)} `
251
- } else {
252
- this.userCondition = ' 1 = 1 '
253
- }
254
- },
255
- searchData() {
256
- this.$refs.paged.$refs.criteria.search()
257
- },
258
- selfSearch(args) {
259
- this.printTime = this.$login.toStandardTimeString()
260
- let orgcondition = '1=1'
261
- let orgConditionOther = '1=1'
262
- if (this.f_orgid[0]) {
263
- var id = this.f_orgid.toString()
264
- var ids = id.split(',')
265
- console.log('几个公司:' + ids.length)
266
- var orgids = ''
267
- var f_orgids = ''
268
- if (ids.length == 1) {
269
- orgcondition += " and s.F_PAYMENT != '银行'"
270
- f_orgids += "'" + ids[0] + "'"
271
- } else {
272
- for (var i = 0; i < ids.length; i++) {
273
- console.log('id = ' + ids[i])
274
- orgids += "'" + ids[i] + "',"
275
- }
276
- f_orgids = orgids.substring(0, orgids.length - 1)
277
- }
278
-
279
- orgcondition += " and s.f_orgid in ( " + f_orgids + " ) "
280
- console.log('f_orgids:' + f_orgids)
281
- }
282
- if (this.f_orgid_other[0]) {
283
- var id = this.f_orgid.toString()
284
- var ids = id.split(',')
285
- console.log('几个公司:' + ids.length)
286
- var orgids = ''
287
- var f_orgids = ''
288
- if (ids.length == 1) {
289
- orgConditionOther += " and 1= 1"
290
- f_orgids += "'" + ids[0] + "'"
291
- } else {
292
- for (var i = 0; i < ids.length; i++) {
293
- console.log('id = ' + ids[i])
294
- orgids += "'" + ids[i] + "',"
295
- }
296
- f_orgids = orgids.substring(0, orgids.length - 1)
297
- }
298
- orgConditionOther += " and f_orgid in ( " + f_orgids + " ) "
299
- console.log('f_orgids:' + f_orgids)
300
- }
301
- this.$refs.paged.$refs.criteria.model.f_orgid = orgcondition
302
- this.$refs.paged.$refs.criteria.model.f_orgid_other = orgConditionOther
303
- this.$refs.paged.$refs.criteria.model.userCondition = this.userCondition
304
- this.$refs.paged.search(args)
305
- },
306
- // 根据文件路径获取储存的报表内容
307
- getFileContent(path) {
308
- this.$resetpost('rs/logic/getReportFileContent', {f_files_path: path}, {
309
- resolveMsg: null,
310
- rejectMsg: null
311
- }).then((res) => {
312
- this.reportStr = res.data.filecontent
313
- this.model.state = '正确'
314
- })
315
- },
316
- confirm() {
317
- if (!this.filename || this.filename === '') {
318
- this.$showAlert('无法保存,文件名不能为空', 'warning', 3000)
319
- }
320
- let saveGen = saveFile(this)
321
- co(saveGen)
322
- },
323
- close() {
324
- this.show = false
325
- },
326
- // 将报表保存成文件
327
- confirmReport() {
328
- this.show = true
329
- this.filename = this.data.f_report_name + this.$login.toStandardDateString()
330
- },
331
- },
332
- watch: {
333
- 'data'(val) {
334
- if (val.f_files_path) {
335
- this.getFileContent(val.f_files_path)
336
- } else {
337
- this.reportStr = null
338
- }
339
- }
340
- },
341
- computed: {
342
- usertypes() {
343
- return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('用户类型')]
344
- },
345
- inputtor() {
346
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('抄表员')]
347
- },
348
- }
349
- }
350
- </script>
351
- <style scoped>
352
- .noborder {
353
- border: none;
354
- }
355
- </style>
1
+ <template>
2
+ <div class="basic-main" style="height: 100%">
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-3">
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-3">
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-3">
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-3">
34
+ <label class="font_normal_body">用户所属公司</label>
35
+ <res-select restype='organization'
36
+ @res-select="$parent.$parent.getRess"
37
+ :initresid="$parent.$parent.curorgid">
38
+ </res-select>
39
+ </div>
40
+ <div class="col-sm-3 ">
41
+ <label class="font_normal_body">用户分类</label>
42
+ <v-select :value.sync="model.f_user_type"
43
+ @change="$parent.$parent.userTypeChange"
44
+ :options='$parent.$parent.usertypes' placeholder='请选择' v-model="model.f_user_type"
45
+ condition="uf.f_user_type = '{}'"
46
+ close-on-select></v-select>
47
+ </div>
48
+ <div class="col-sm-3 ">
49
+ <label class="font_normal_body">用户类型</label>
50
+ <v-select :value.sync="model.f_user_mold"
51
+ @change="$parent.$parent.userMoldChange"
52
+ :options='$parent.$parent.usermold' placeholder='请选择' v-model="model.f_user_mold"
53
+ condition="uf.f_user_mold = '{}'"
54
+ close-on-select></v-select>
55
+ </div>
56
+ <div class="col-sm-3 ">
57
+ <label class="font_normal_body">用气性质</label>
58
+ <v-select :value.sync="model.f_gasproperties" v-model="model.f_gasproperties"
59
+ :options='$parent.$parent.gasproperties' placeholder='请选择'
60
+ condition="uf.f_gasproperties = '{}'"
61
+ close-on-select></v-select>
62
+ </div>
63
+ </div>
64
+ <div class="row" style="text-align: right">
65
+ <div class="span col-sm-3"></div>
66
+ <div class="span col-sm-3"></div>
67
+ <div class="span col-sm-3"></div>
68
+ <div class="span col-sm-3" style="text-align: right;">
69
+ <button class="button_search" @click="$parent.$parent.searchData()">查询</button>
70
+ <report-print id='gasprice' top='3cm' left='0' width='100%' height='100%' :preview="true"></report-print>
71
+ <report-excel id='gasprice'
72
+ v-if="$parent.$parent.jurisdiction.includes('excel导出')"
73
+ ></report-excel>
74
+ </div>
75
+ </div>
76
+ </div>
77
+ </criteria>
78
+ <div partial='list' v-el:handcollect id='gasprice' style="overflow-y: scroll">
79
+ <table class='tableprint' style="margin: 0px auto">
80
+ <thead>
81
+ <tr>
82
+ <th colspan='7' style="font-weight: normal; text-align: left;">
83
+ <h3 style="text-align: center">咸阳财务收费报表(新)</h3>
84
+ </th>
85
+ </tr>
86
+ <tr>
87
+ <th colspan='8' style="font-weight: normal; text-align: center;">
88
+ 开始时间:{{ model.model.startDate }}&nbsp;&nbsp;&nbsp;
89
+ 结束时间:{{ model.model.endDate }}
90
+ </th>
91
+ </tr>
92
+ <tr>
93
+ <th colspan='8' style="font-weight: normal; text-align: center;">
94
+ 打印时间:{{{ $parent.printTime }}}
95
+ </th>
96
+ </tr>
97
+ <tr>
98
+ <th colspan='8' style="font-weight: normal; text-align: center;">
99
+ <div>
100
+ <span v-show="$parent.orgname.trim()!=''">公司:{{ $parent.orgname }}</span>
101
+ <span v-show="$parent.depname.trim()!=''"> 部门:{{ $parent.depname }}</span>
102
+ <span v-show="$parent.operatorname.trim()!=''">人员:{{ $parent.operatorname }}</span>
103
+ </div>
104
+ </th>
105
+ </tr>
106
+ </thead>
107
+ <tr>
108
+ <td colspan='12'>
109
+ {{{ model.data.substring(26, model.data.length - 8) }}}
110
+ </td>
111
+ </tr>
112
+ <tfoot>
113
+ <tr style="text-align: left">
114
+ <th colspan='3'>财务审核:</th>
115
+ <th colspan='3'>收款审核:</th>
116
+ <th colspan='1'>收款员:</th>
117
+ </tr>
118
+ </tfoot>
119
+ </table>
120
+ {{{ $parent.reportStr }}}
121
+ </div>
122
+ </criteria-paged>
123
+ <modal :show.sync="show" v-ref:modal small backdrop="false">
124
+ <header slot="modal-header" class="modal-header">
125
+ <h4 class="modal-title">输入文件名称</h4>
126
+ </header>
127
+ <article slot="modal-body" class="modal-body">
128
+ <div class="form-group">
129
+ <input type="text" class="form-control" v-model="filename" placeholder='保存的文件名'>
130
+ </div>
131
+ </article>
132
+ <footer slot="modal-footer" class="modal-footer">
133
+ <button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
134
+ <button v-show="show" type="button" class="btn btn-success" @click='confirm(filename)'>确认</button>
135
+ </footer>
136
+ </modal>
137
+ </div>
138
+ </template>
139
+
140
+ <script>
141
+ import {DataModel} from 'vue-client'
142
+ import co from 'co'
143
+ import * as Util from "../../Util";
144
+
145
+ let saveFile = function* (self) {
146
+ // 线验证文件是否重名
147
+ let count = yield self.$resetpost('rs/sql/manageSingleTable',
148
+ {data: {tablename: 't_report_record', condition: `f_files_name = '${self.filename}'`}},
149
+ {resolveMsg: null, rejectMsg: null})
150
+ if (count.data.length > 0) {
151
+ self.$showAlert('无法保存,文件名重名', 'warning', 3000)
152
+ return
153
+ }
154
+ let saveBack = yield self.$resetpost('rs/logic/saveReport', {
155
+ f_files_content: self.$refs.paged.$els.handcollect.innerHTML,
156
+ f_files_name: self.filename, f_files_type: self.data.f_report_type, f_component_name: 'manage-bus-summary',
157
+ f_operator: this.$login.f.name, f_query_month: `${self.model.model.startDate}-${self.model.model.endDate}`,
158
+ f_outlets: this.$login.f.depname
159
+ })
160
+ if (saveBack.data.status === 'succeed') {
161
+ self.show = false
162
+ self.filename = ''
163
+ // 后台保存完成,通知刷新
164
+ self.$dispatch('save-success', self.filename)
165
+ }
166
+ }
167
+ export default {
168
+ title: '咸阳财务收费报表(新)',
169
+ props: ['data'],
170
+ data() {
171
+ return {
172
+ printTime: this.$login.toStandardTimeString(),
173
+ depresid: [],
174
+ userresid: [],
175
+ gasproperties: [],
176
+ usermold: [],
177
+ curorgid: [this.$login.f.orgid],
178
+ f_orgid: this.$login.f.orgid,
179
+ f_orgid_other: this.$login.f.orgid,
180
+ f_depid: this.$login.f.depids,
181
+ f_operatorid: this.$login.f.id,
182
+ jurisdiction: this.$login.r,
183
+ operatorid: [],
184
+ depid: [],
185
+ orgname: '',
186
+ depname: '',
187
+ operatorname: '',
188
+ f_inputtor: [],
189
+ f_user_type: '',
190
+ orgCondtionStr: '1=1',
191
+ model: new DataModel('rs/report/咸阳财务收费新报表(总计)', {
192
+ startDate: 'this.model.startDate', endDate: 'this.model.endDate',
193
+ f_orgid: 'this.model.f_orgid',
194
+ f_orgid_other: 'this.model.f_orgid_other',
195
+ userCondition: 'this.model.userCondition'
196
+ }),
197
+ reportStr: null,
198
+ show: false,
199
+ userCondition: ' 1 = 1 '
200
+ }
201
+ },
202
+ ready() {
203
+ this.$refs.paged.$refs.criteria.model.startDate = this.$login.toStandardDateString() + ' 00:00:00'
204
+ this.$refs.paged.$refs.criteria.model.endDate = this.$login.toStandardDateString() + ' 23:59:59'
205
+ // this.$refs.paged.$refs.criteria.search()
206
+ console.log(this.$login.f)
207
+ },
208
+ methods: {
209
+ userTypeChange() {
210
+ this.usermold = []
211
+ this.f_gasproperties = []
212
+ if (this.$refs.paged.$refs.criteria.model !== null) {
213
+ this.$refs.paged.$refs.criteria.model.f_gasproperties = ''
214
+ this.$refs.paged.$refs.criteria.model.f_user_mold = ''
215
+ this.usermold = this.$appdata.getParam(this.$refs.paged.$refs.criteria.model.f_user_type[0])
216
+ } else {
217
+ this.usermold = [{label: '全部', value: ''}]
218
+ }
219
+ },
220
+ userMoldChange() {
221
+ this.gasproperties = []
222
+ if (this.$refs.paged.$refs.criteria.model !== null) {
223
+ this.$refs.paged.$refs.criteria.model.f_gasproperties = ''
224
+ if (this.$refs.paged.$refs.criteria.model.f_user_mold[0] === '居民') {
225
+ this.gasproperties = this.$appdata.getParam(this.$refs.paged.$refs.criteria.model.f_user_type[0] + this.$refs.paged.$refs.criteria.model.f_user_mold[0])
226
+ return
227
+ }
228
+ this.gasproperties = this.$appdata.getParam(this.$refs.paged.$refs.criteria.model.f_user_mold[0])
229
+ } else {
230
+ this.gasproperties = [{label: '全部', value: ''}]
231
+ }
232
+ },
233
+ getRes(obj) {
234
+ this.orgname = obj.res[0]
235
+ this.depresid = obj.resids
236
+ this.f_orgid = obj.resids
237
+ this.f_orgid_other = obj.resids
238
+ },
239
+ getdep(obj, val) {
240
+ // this.depname = val[0]
241
+ this.userresid = obj
242
+ this.f_depid = obj
243
+ },
244
+ getuser(obj, val) {
245
+ this.operatorname = val[0]
246
+ this.f_operatorid = obj
247
+ },
248
+ getRess(obj) {
249
+ if (obj.length > 0) {
250
+ this.userCondition = ` info.f_orgid in ${Util.convertToIn(obj)} `
251
+ } else {
252
+ this.userCondition = ' 1 = 1 '
253
+ }
254
+ },
255
+ searchData() {
256
+ this.$refs.paged.$refs.criteria.search()
257
+ },
258
+ selfSearch(args) {
259
+ this.printTime = this.$login.toStandardTimeString()
260
+ let orgcondition = '1=1'
261
+ let orgConditionOther = '1=1'
262
+ if (this.f_orgid[0]) {
263
+ var id = this.f_orgid.toString()
264
+ var ids = id.split(',')
265
+ console.log('几个公司:' + ids.length)
266
+ var orgids = ''
267
+ var f_orgids = ''
268
+ if (ids.length == 1) {
269
+ orgcondition += " and s.F_PAYMENT != '银行'"
270
+ f_orgids += "'" + ids[0] + "'"
271
+ } else {
272
+ for (var i = 0; i < ids.length; i++) {
273
+ console.log('id = ' + ids[i])
274
+ orgids += "'" + ids[i] + "',"
275
+ }
276
+ f_orgids = orgids.substring(0, orgids.length - 1)
277
+ }
278
+
279
+ orgcondition += " and s.f_orgid in ( " + f_orgids + " ) "
280
+ console.log('f_orgids:' + f_orgids)
281
+ }
282
+ if (this.f_orgid_other[0]) {
283
+ var id = this.f_orgid.toString()
284
+ var ids = id.split(',')
285
+ console.log('几个公司:' + ids.length)
286
+ var orgids = ''
287
+ var f_orgids = ''
288
+ if (ids.length == 1) {
289
+ orgConditionOther += " and 1= 1"
290
+ f_orgids += "'" + ids[0] + "'"
291
+ } else {
292
+ for (var i = 0; i < ids.length; i++) {
293
+ console.log('id = ' + ids[i])
294
+ orgids += "'" + ids[i] + "',"
295
+ }
296
+ f_orgids = orgids.substring(0, orgids.length - 1)
297
+ }
298
+ orgConditionOther += " and f_orgid in ( " + f_orgids + " ) "
299
+ console.log('f_orgids:' + f_orgids)
300
+ }
301
+ this.$refs.paged.$refs.criteria.model.f_orgid = orgcondition
302
+ this.$refs.paged.$refs.criteria.model.f_orgid_other = orgConditionOther
303
+ this.$refs.paged.$refs.criteria.model.userCondition = this.userCondition
304
+ this.$refs.paged.search(args)
305
+ },
306
+ // 根据文件路径获取储存的报表内容
307
+ getFileContent(path) {
308
+ this.$resetpost('rs/logic/getReportFileContent', {f_files_path: path}, {
309
+ resolveMsg: null,
310
+ rejectMsg: null
311
+ }).then((res) => {
312
+ this.reportStr = res.data.filecontent
313
+ this.model.state = '正确'
314
+ })
315
+ },
316
+ confirm() {
317
+ if (!this.filename || this.filename === '') {
318
+ this.$showAlert('无法保存,文件名不能为空', 'warning', 3000)
319
+ }
320
+ let saveGen = saveFile(this)
321
+ co(saveGen)
322
+ },
323
+ close() {
324
+ this.show = false
325
+ },
326
+ // 将报表保存成文件
327
+ confirmReport() {
328
+ this.show = true
329
+ this.filename = this.data.f_report_name + this.$login.toStandardDateString()
330
+ },
331
+ },
332
+ watch: {
333
+ 'data'(val) {
334
+ if (val.f_files_path) {
335
+ this.getFileContent(val.f_files_path)
336
+ } else {
337
+ this.reportStr = null
338
+ }
339
+ }
340
+ },
341
+ computed: {
342
+ usertypes() {
343
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('用户类型')]
344
+ },
345
+ inputtor() {
346
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('抄表员')]
347
+ },
348
+ }
349
+ }
350
+ </script>
351
+ <style scoped>
352
+ .noborder {
353
+ border: none;
354
+ }
355
+ </style>