manage-client 3.2.246 → 3.2.248

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,262 @@
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-2 form-group" >
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-2 form-group" >
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
+ <res-select-group :initres="$parent.$parent.initres" :show-component=['company','department','operator'] :cascade="true" @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
30
+ <div class="col-sm-2 form-group">
31
+ <label class="font_normal_body">收费状态</label>
32
+ <v-select :value.sync="$parent.$parent.f_state"
33
+ v-model="$parent.$parent.f_state"
34
+ :options='$parent.$parent.charge_state' placeholder='请选择'
35
+ condition="f_state in {}"
36
+ close-on-select></v-select>
37
+ </div>
38
+ <div style = "float:right;">
39
+ <button class="button_search" @click="$parent.$parent.searchData()">查询</button>
40
+ <report-print id='gasprice' top='3cm' left='0' width='100%' height='100%' :preview="true"></report-print>
41
+ <report-excel id='gasprice'></report-excel>
42
+ </div>
43
+ </div>
44
+ <!--<div class="span" style = "float:right;">-->
45
+
46
+ <!--</div>-->
47
+ </div>
48
+ </criteria>
49
+ <div partial='list' v-el:handcollect id='gasprice' style="overflow-y: scroll">
50
+ <table class='tableprint' style="margin: 0px auto" v-if="!$parent.data.f_files_path">
51
+ <thead>
52
+ <tr>
53
+ <th colspan='{{$parent.spans}}' style="font-weight: bold; text-align: left;">
54
+ <h3 style="text-align: center">月售气量汇总表</h3>
55
+ </th>
56
+ </tr>
57
+ <tr>
58
+ <th colspan='{{$parent.spans}}' style="font-weight: normal; text-align: center;">
59
+ 开始时间:{{model.model.startDate}}&nbsp;&nbsp;&nbsp;
60
+ 结束时间:{{ model.model.endDate }}&nbsp;&nbsp;
61
+ </th>
62
+ </tr>
63
+ <tr>
64
+ <th colspan='{{$parent.spans}}' style="font-weight: normal; text-align: center;">
65
+ 打印时间:{{{$parent.printTime}}}
66
+ </th>
67
+ </tr>
68
+ <tr>
69
+ <th colspan='{{$parent.spans}}' style="font-weight: normal; text-align: center;">
70
+ <div>
71
+ <span v-show="$parent.orgname.trim()!=''">公司:{{$parent.orgname}}</span>
72
+ <span v-show="$parent.depname.trim()!=''"> 部门:{{$parent.depname}}</span>
73
+ </div>
74
+ </th>
75
+ </tr>
76
+ </thead>
77
+ <tr>
78
+ <td style="font-weight: normal;" id="test">
79
+ {{{ model.data.substring(26,model.data.length-8) }}}
80
+ </td>
81
+ </tr>
82
+ <tfoot>
83
+ <tr style="text-align: left">
84
+ <th colspan='{{$parent.spans}}' style="font-weight: normal; text-align: left;">
85
+ 收款人:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
86
+ 审核人:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
87
+ 经手人:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
88
+ </th>
89
+ </tr>
90
+ </tfoot>
91
+ </table>
92
+ {{{ $parent.reportStr}}}
93
+ </div>
94
+ </criteria-paged>
95
+ <modal :show.sync="show" v-ref:modal small backdrop="false">
96
+ <header slot="modal-header" class="modal-header">
97
+ <h4 class="modal-title">输入文件名称</h4>
98
+ </header>
99
+ <article slot="modal-body" class="modal-body">
100
+ <div class="form-group">
101
+ <input type="text" class="form-control" v-model="filename" placeholder='保存的文件名'>
102
+ </div>
103
+ </article>
104
+ <footer slot="modal-footer" class="modal-footer">
105
+ <button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
106
+ <button v-show="show" type="button" class="btn btn-success" @click='confirm(filename)'>确认</button>
107
+ </footer>
108
+ </modal>
109
+ </div>
110
+ </template>
111
+
112
+ <script>
113
+ import { DataModel } from 'vue-client'
114
+ import co from 'co'
115
+ let saveFile = function * (self) {
116
+ // 线验证文件是否重名
117
+ let count = yield self.$resetpost('rs/sql/manageSingleTable',
118
+ {data: {tablename: 't_report_record', condition: `f_files_name = '${self.filename}'`}},
119
+ {resolveMsg: null, rejectMsg: null})
120
+ if (count.data.length > 0) {
121
+ self.$showAlert('无法保存,文件名重名', 'warning', 3000)
122
+ return
123
+ }
124
+ let saveBack = yield self.$resetpost('rs/logic/saveReport', {f_files_content: self.$refs.paged.$els.handcollect.innerHTML,
125
+ f_files_name: self.filename, f_files_type: self.data.f_report_type, f_component_name: 'manage-bus-summary',
126
+ f_operator: this.$login.f.name, f_query_month: `${self.model.model.startDate}-${self.model.model.endDate}`,
127
+ f_outlets: this.$login.f.depname})
128
+ if (saveBack.data.status === 'succeed') {
129
+ self.show = false
130
+ self.filename = ''
131
+ // 后台保存完成,通知刷新
132
+ self.$dispatch('save-success', self.filename)
133
+ }
134
+ }
135
+ export default {
136
+ title: '月售气量汇总表',
137
+ props: ['data'],
138
+ data () {
139
+ return {
140
+ printTime: this.$login.toStandardTimeString(),
141
+ depresid: [],
142
+ userresid: [],
143
+ initres: {
144
+ org:[this.$login.f.orgid],
145
+ dep:[this.$login.f.depids],
146
+ user:[this.$login.f.id]
147
+ },
148
+ f_orgid: this.$login.f.orgid,
149
+ f_depid: this.$login.f.depids,
150
+ f_operatorid: this.$login.f.id,
151
+ operatorid: [],
152
+ depid: [],
153
+ orgname: '',
154
+ depname: '',
155
+ depName: this.$login.f.deps,
156
+ f_state:['有效'],
157
+ operatorname: '',
158
+ orgCondtionStr: '1=1',
159
+ model: new DataModel('rs/report/manage_month_sellgas', {startDate: 'this.model.startDate', endDate: 'this.model.endDate',
160
+ f_orgid: 'this.model.f_orgid'}),
161
+ reportStr: null,
162
+ show: false,
163
+ spans: '',
164
+ flag: false
165
+ }
166
+ },
167
+ ready () {
168
+ this.$refs.paged.$refs.criteria.model.startDate = this.$login.toStandardDateString() + ' 00:00:00'
169
+ this.$refs.paged.$refs.criteria.model.endDate = this.$login.toStandardDateString() + ' 23:59:59'
170
+ // this.$refs.paged.$refs.criteria.search()
171
+ if (this.depName.includes('营业厅')) {
172
+ this.$refs.paged.$refs.criteria.$refs.sel.mustselect = true
173
+ this.flag = true
174
+ } else {
175
+ this.$refs.paged.$refs.criteria.$refs.sel.mustselect = false
176
+ }
177
+ },
178
+ methods: {
179
+ searchData () {
180
+ this.$refs.paged.$refs.criteria.search()
181
+ },
182
+ selfSearch (args) {
183
+ this.printTime = this.$login.toStandardTimeString()
184
+ let orgstr = this.orgCondtionStr
185
+ args.condition = `${args.condition} ` + orgstr
186
+ this.$refs.paged.$refs.criteria.model.f_orgid = this.orgCondtionStr + (this.f_state && this.f_state != '' ? " and f_state='" + this.f_state + "' " : '')
187
+ this.$refs.paged.search(args)
188
+ },
189
+ getRes (condition, obj) {
190
+ this.orgCondtionStr = condition
191
+ this.orgname = obj.orgnames[0]
192
+ this.depname = obj.depnames[0]
193
+ if (this.flag) {
194
+ console.log('手动拼接条件')
195
+ this.orgCondtionStr = ''
196
+ this.orgCondtionStr = ` and f_orgid in ( '${this.f_orgid}') and f_depid in ( '${this.f_depid}') and f_operatorid in ( '${this.f_operatorid}')`
197
+ }
198
+ },
199
+ // getdep (obj, val) {
200
+ // // this.depname = val[0]
201
+ // this.userresid = obj
202
+ // this.f_depid = obj
203
+ // },
204
+ // getuser ( obj, val) {
205
+ // this.operatorname = val[0]
206
+ // this.f_operatorid = obj
207
+ // },
208
+
209
+ // 根据文件路径获取储存的报表内容
210
+ getFileContent (path) {
211
+ this.$resetpost('rs/logic/getReportFileContent', {f_files_path: path}, {resolveMsg: null, rejectMsg: null}).then((res) => {
212
+ this.reportStr = res.data.filecontent
213
+ this.model.state = '正确'
214
+ })
215
+ },
216
+ confirm () {
217
+ if (!this.filename || this.filename === '') {
218
+ this.$showAlert('无法保存,文件名不能为空', 'warning', 3000)
219
+ }
220
+ let saveGen = saveFile(this)
221
+ co(saveGen)
222
+ },
223
+ close () {
224
+ this.show = false
225
+ },
226
+ // 将报表保存成文件
227
+ confirmReport () {
228
+ this.show = true
229
+ this.filename = this.data.f_report_name + this.$login.toStandardDateString()
230
+ }
231
+ },
232
+ watch: {
233
+ 'data' (val) {
234
+ if (val.f_files_path) {
235
+ this.getFileContent(val.f_files_path)
236
+ } else {
237
+ this.reportStr = null
238
+ }
239
+ },
240
+ 'model.data' (val) {
241
+ let tab = document.getElementById('test').children[0]
242
+ var tds = tab.getElementsByTagName('td')
243
+ var num = 0
244
+ for (let td of tds) {
245
+ let span = td.getAttribute('colspan')
246
+ num = num + ((span ? span : 1) - 0)
247
+ }
248
+ this.spans = num
249
+ }
250
+ },
251
+ computed: {
252
+ charge_state() {
253
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('收费状态')]
254
+ }
255
+ }
256
+ }
257
+ </script>
258
+ <style scoped>
259
+ .noborder{
260
+ border: none;
261
+ }
262
+ </style>
@@ -0,0 +1,263 @@
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-2 form-group" >
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-2 form-group" >
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
+ <res-select-group :initres="$parent.$parent.initres" :show-component="['company','department','operator']" @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
30
+ <!--<div class="col-sm-4">-->
31
+ <!--<label class="font_normal_body">&nbsp;&nbsp;&nbsp;公司&nbsp;&nbsp;&nbsp; </label>-->
32
+ <!--<right-tree @re-res="$parent.$parent.getRes"></right-tree>-->
33
+ <!--</div>-->
34
+ <!--<div class="col-sm-4">-->
35
+ <!--<label class="font_normal_body">&nbsp;&nbsp;&nbsp;部门&nbsp;&nbsp;&nbsp; </label>-->
36
+ <!--<res-select restype='department'-->
37
+ <!--is-mul="false"-->
38
+ <!--@res-select="$parent.$parent.getdep"-->
39
+ <!--:parentresid="$parent.$parent.depresid"-->
40
+ <!--:initresid='$parent.$parent.depid'>-->
41
+ <!--</res-select>-->
42
+ <!--</div>-->
43
+ <div style = "float:right;">
44
+ <button class="button_search" @click="$parent.$parent.searchData()">查询</button>
45
+ <report-print id='gasprice' top='3cm' left='0' width='100%' height='100%' :preview="true"></report-print>
46
+ <report-excel id='gasprice'></report-excel>
47
+ </div>
48
+ </div>
49
+ <!--<div class="span" style = "float:right;">-->
50
+
51
+ <!--</div>-->
52
+ </div>
53
+ </criteria>
54
+ <div partial='list' v-el:handcollect id='gasprice' style="overflow-y: scroll">
55
+ <table class='tableprint' style="margin: 0px auto">
56
+ <thead>
57
+ <tr>
58
+ <th colspan='{{$parent.spans}}' style="font-weight: bold; text-align: left;">
59
+ <h3 style="text-align: center">其他收费汇总</h3>
60
+ </th>
61
+ </tr>
62
+ <tr>
63
+ <th colspan='{{$parent.spans}}' style="font-weight: normal; text-align: center;">
64
+ 开始时间:{{model.model.startDate}}&nbsp;&nbsp;&nbsp;
65
+ 结束时间:{{ model.model.endDate }}&nbsp;&nbsp;
66
+ </th>
67
+ </tr>
68
+ <tr>
69
+ <th colspan='{{$parent.spans}}' style="font-weight: normal; text-align: center;">
70
+ 打印时间:{{{$parent.printTime}}}
71
+ </th>
72
+ </tr>
73
+ <tr>
74
+ <th colspan='{{$parent.spans}}' style="font-weight: normal; text-align: center;">
75
+ <div>
76
+ <span v-show="$parent.orgname.trim()!=''">公司:{{$parent.orgname}}</span>
77
+ <span v-show="$parent.depname.trim()!=''"> 部门:{{$parent.depname}}</span>
78
+ </div>
79
+ </th>
80
+ </tr>
81
+ </thead>
82
+ <tr>
83
+ <td style="font-weight: normal;" id="test">
84
+ {{{ model.data.substring(26,model.data.length-8) }}}
85
+ </td>
86
+ </tr>
87
+ <tfoot>
88
+ <tr style="text-align: left">
89
+ <th colspan='{{$parent.spans}}' style="font-weight: normal; text-align: left;">
90
+ 收款人:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
91
+ 审核人:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
92
+ 经手人:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
93
+ </th>
94
+ </tr>
95
+ </tfoot>
96
+ </table>
97
+ {{{ $parent.reportStr}}}
98
+ </div>
99
+ </criteria-paged>
100
+ <modal :show.sync="show" v-ref:modal small backdrop="false">
101
+ <header slot="modal-header" class="modal-header">
102
+ <h4 class="modal-title">输入文件名称</h4>
103
+ </header>
104
+ <article slot="modal-body" class="modal-body">
105
+ <div class="form-group">
106
+ <input type="text" class="form-control" v-model="filename" placeholder='保存的文件名'>
107
+ </div>
108
+ </article>
109
+ <footer slot="modal-footer" class="modal-footer">
110
+ <button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
111
+ <button v-show="show" type="button" class="btn btn-success" @click='confirm(filename)'>确认</button>
112
+ </footer>
113
+ </modal>
114
+ </div>
115
+ </template>
116
+
117
+ <script>
118
+ import { DataModel } from 'vue-client'
119
+ import co from 'co'
120
+ let saveFile = function * (self) {
121
+ // 线验证文件是否重名
122
+ let count = yield self.$resetpost('rs/sql/manageSingleTable',
123
+ {data: {tablename: 't_report_record', condition: `f_files_name = '${self.filename}'`}},
124
+ {resolveMsg: null, rejectMsg: null})
125
+ if (count.data.length > 0) {
126
+ self.$showAlert('无法保存,文件名重名', 'warning', 3000)
127
+ return
128
+ }
129
+ let saveBack = yield self.$resetpost('rs/logic/saveReport', {f_files_content: self.$refs.paged.$els.handcollect.innerHTML,
130
+ f_files_name: self.filename, f_files_type: self.data.f_report_type, f_component_name: 'manage-bus-summary',
131
+ f_operator: this.$login.f.name, f_query_month: `${self.model.model.startDate}-${self.model.model.endDate}`,
132
+ f_outlets: this.$login.f.depname})
133
+ if (saveBack.data.status === 'succeed') {
134
+ self.show = false
135
+ self.filename = ''
136
+ // 后台保存完成,通知刷新
137
+ self.$dispatch('save-success', self.filename)
138
+ }
139
+ }
140
+ export default {
141
+ title: '其他收费汇总',
142
+ props: ['data'],
143
+ data () {
144
+ return {
145
+ printTime: this.$login.toStandardTimeString(),
146
+ depresid: [],
147
+ userresid: [],
148
+ initres: {
149
+ org:[this.$login.f.orgid],
150
+ dep:[],
151
+ user:[]
152
+ },
153
+ f_orgid: this.$login.f.orgid,
154
+ f_depid: this.$login.f.depids,
155
+ f_operatorid: this.$login.f.id,
156
+ operatorid: [],
157
+ depid: [],
158
+ orgname: '',
159
+ depname: '',
160
+ depName: this.$login.f.deps,
161
+ operatorname: '',
162
+ orgCondtionStr: '1=1',
163
+ model: new DataModel('rs/report/othercharge', {startDate: 'this.model.startDate', endDate: 'this.model.endDate',
164
+ f_orgid: 'this.model.f_orgid'}),
165
+ reportStr: null,
166
+ show: false,
167
+ spans: '',
168
+ flag: false
169
+ }
170
+ },
171
+ ready () {
172
+ this.$refs.paged.$refs.criteria.model.startDate = this.$login.toStandardDateString() + ' 00:00:00'
173
+ this.$refs.paged.$refs.criteria.model.endDate = this.$login.toStandardDateString() + ' 23:59:59'
174
+ // this.$refs.paged.$refs.criteria.search()
175
+ if (this.depName.includes('营业厅')) {
176
+ this.$refs.paged.$refs.criteria.$refs.sel.mustselect = true
177
+ this.flag = true
178
+ } else {
179
+ this.$refs.paged.$refs.criteria.$refs.sel.mustselect = false
180
+ }
181
+ },
182
+ methods: {
183
+ searchData () {
184
+ this.$refs.paged.$refs.criteria.search()
185
+ },
186
+ selfSearch (args) {
187
+ this.printTime = this.$login.toStandardTimeString()
188
+ let orgstr = this.orgCondtionStr
189
+ args.condition = `${args.condition} ` + orgstr
190
+ this.$refs.paged.$refs.criteria.model.f_orgid = orgstr
191
+ this.$refs.paged.search(args)
192
+ },
193
+ getRes (condition, obj) {
194
+ this.orgCondtionStr = condition
195
+ if (this.flag) {
196
+ console.log('手动拼接条件')
197
+ this.orgCondtionStr = ''
198
+ this.orgCondtionStr = ` and f_orgid in ( '${this.f_orgid}') and f_depid in ( '${this.f_depid}') and f_operatorid in ( '${this.f_operatorid}')`
199
+ }
200
+ this.orgname = obj.orgnames[0]
201
+ this.depname = obj.depnames[0]
202
+ },
203
+ // getdep (obj, val) {
204
+ // // this.depname = val[0]
205
+ // this.userresid = obj
206
+ // this.f_depid = obj
207
+ // },
208
+ // getuser ( obj, val) {
209
+ // this.operatorname = val[0]
210
+ // this.f_operatorid = obj
211
+ // },
212
+
213
+ // 根据文件路径获取储存的报表内容
214
+ getFileContent (path) {
215
+ this.$resetpost('rs/logic/getReportFileContent', {f_files_path: path}, {resolveMsg: null, rejectMsg: null}).then((res) => {
216
+ this.reportStr = res.data.filecontent
217
+ this.model.state = '正确'
218
+ })
219
+ },
220
+ confirm () {
221
+ if (!this.filename || this.filename === '') {
222
+ this.$showAlert('无法保存,文件名不能为空', 'warning', 3000)
223
+ }
224
+ let saveGen = saveFile(this)
225
+ co(saveGen)
226
+ },
227
+ close () {
228
+ this.show = false
229
+ },
230
+ // 将报表保存成文件
231
+ confirmReport () {
232
+ this.show = true
233
+ this.filename = this.data.f_report_name + this.$login.toStandardDateString()
234
+ }
235
+ },
236
+ watch: {
237
+ 'data' (val) {
238
+ if (val.f_files_path) {
239
+ this.getFileContent(val.f_files_path)
240
+ } else {
241
+ this.reportStr = null
242
+ }
243
+ },
244
+ 'model.data' (val) {
245
+ let tab = document.getElementById('test').children[0]
246
+ var tds = tab.getElementsByTagName('td')
247
+ var num = 0
248
+ for (let td of tds) {
249
+ let span = td.getAttribute('colspan')
250
+ num = num + ((span ? span : 1) - 0)
251
+ }
252
+ this.spans = num
253
+ }
254
+ },
255
+ computed: {
256
+ }
257
+ }
258
+ </script>
259
+ <style scoped>
260
+ .noborder{
261
+ border: none;
262
+ }
263
+ </style>