manage-client 4.1.29 → 4.1.30

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": "4.1.29",
3
+ "version": "4.1.30",
4
4
  "description": "经营管控模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -0,0 +1,200 @@
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
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial >
6
+ <div class="row">
7
+ <div class="col-sm-2 form-group" >
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'"
14
+ :show-reset-button="reset">
15
+ </datepicker>
16
+ </div>
17
+ <div class="col-sm-2 form-group" >
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'"
24
+ :show-reset-button="reset">
25
+ </datepicker>
26
+ </div>
27
+ <div class="col-sm-2 form-group">
28
+ <label class="font_normal_body">用户类型</label>
29
+ <v-select :value.sync="model.f_user_type"
30
+ v-model="model.f_user_type"
31
+ multiple
32
+ :options='$parent.$parent.user_type' placeholder='请选择'
33
+ condition="f_user_type in {}"
34
+ close-on-select></v-select>
35
+ </div>
36
+ <div class="col-sm-2 form-group">
37
+ <label class="font_normal_body">用气性质</label>
38
+ <v-select :value.sync="model.f_gasproperties"
39
+ v-model="model.f_gasproperties"
40
+ multiple
41
+ :options='$parent.$parent.gasproperties' placeholder='请选择'
42
+ condition="f_gasproperties in {}"
43
+ close-on-select></v-select>
44
+ </div>
45
+ <res-select-group :show-component="$parent.$parent.resshow"
46
+ :selectin="true" :initres="$parent.$parent.initres"
47
+ :cascade =true @re-res="$parent.$parent.getRes"
48
+ v-ref:sel>
49
+ </res-select-group>
50
+ </div>
51
+ <div class="span" style = "float:right;">
52
+ <button class="button_search" @click="$parent.$parent.searchData()">查询</button>
53
+ <report-print id='gasprice' top='3cm' left='0' width='100%' height='100%' :preview="true"></report-print>
54
+ <report-excel id='gasprice'></report-excel>
55
+ </div>
56
+ </div>
57
+ </criteria>
58
+ <div partial='list' v-el:handcollect id='gasprice' style="overflow-y: scroll">
59
+ <table class='tableprint' style="margin: 0px auto">
60
+ <thead>
61
+ <tr>
62
+ <th :colspan='$parent.spans' style="font-weight: normal; text-align: left;">
63
+ <h3 style="text-align: center">客服中心报账单</h3>
64
+ </th>
65
+ </tr>
66
+ <tr>
67
+ <th :colspan='$parent.spans' style="font-weight: normal; text-align: center;">
68
+ 开始时间:{{model.model.startDate}}&nbsp;&nbsp;&nbsp;
69
+ 结束时间:{{ model.model.endDate }}&nbsp;&nbsp;<br/>
70
+ <!--收费员:{{// $parent.operatorname}}-->
71
+ </th>
72
+ </tr>
73
+ <tr >
74
+ <th v-if="false" :colspan='$parent.spans' style="font-weight: normal; text-align: center;">
75
+ <div>
76
+ <span style="font-weight: normal;text-align: center;margin:5px 15px" v-show="$parent.orgname">公司:{{$parent.orgname}}</span>
77
+ <span v-show="$parent.depname"> 部门:{{$parent.depname}}</span>
78
+ <span style="font-weight: normal;text-align: center;margin:5px 15px" v-show="$parent.operatorname">人员:{{$parent.operatorname}}</span>
79
+ </div>
80
+ </th>
81
+ </tr>
82
+ </thead>
83
+ <tr>
84
+ <td :colspan='$parent.spans' class="noborder">
85
+ {{{ model.data.substring(26,model.data.length-8) }}}
86
+ </td>
87
+ </tr>
88
+ <tfoot>
89
+ <tr style="text-align: left">
90
+ <th :colspan='Math.floor($parent.spans/3)'>报账人:</th>
91
+ <th :colspan='Math.floor($parent.spans/3)'>数据审核:</th>
92
+ <th :colspan='Math.floor($parent.spans/3)'>接收人:</th>
93
+ </tr>
94
+ </tfoot>
95
+ </table>
96
+ {{{ $parent.reportStr}}}
97
+ </div>
98
+ </criteria-paged>
99
+ </div>
100
+ </template>
101
+
102
+ <script>
103
+ import { DataModel } from 'vue-client'
104
+ import co from 'co'
105
+ export default {
106
+ title: '客服中心报账单',
107
+ props: ['data'],
108
+ data () {
109
+ return {
110
+ printTime: this.$login.toStandardTimeString(),
111
+ depresid: [],
112
+ userresid: [],
113
+ f_orgid: this.$login.f.orgid,
114
+ f_depid: this.$login.f.depids,
115
+ // f_operatorid: this.$login.f.id,
116
+ operatorid: [],
117
+ depid: [],
118
+ orgname: '',
119
+ depname: '',
120
+ criteriaShow: false,
121
+ operatorname: '',
122
+ orgCondtionStr: '1=1',
123
+ f_user_type: '',
124
+ f_gasproperties: '',
125
+ f_state: ['有效'],
126
+ model: new DataModel('api/af-revenue/report/ruihua_charge', {startDate: 'this.model.startDate', endDate: 'this.model.endDate',
127
+ f_orgid: 'this.model.f_orgid'}),
128
+ reportStr: null,
129
+ resshow: ['company', 'department', 'operator'],
130
+ spans: 0,
131
+ initres: {
132
+ org: [this.$login.f.orgid],
133
+ dep: [],
134
+ user: []
135
+ }
136
+ }
137
+ },
138
+ ready () {
139
+ this.$refs.paged.$refs.criteria.model.startDate = this.$login.toStandardDateString()
140
+ this.$refs.paged.$refs.criteria.model.endDate = this.$login.toStandardDateString()
141
+ },
142
+ methods: {
143
+ searchData () {
144
+ this.$refs.paged.$refs.criteria.search()
145
+ },
146
+ selfSearch (args) {
147
+ this.printTime = this.$login.toStandardTimeString()
148
+ let orgcondition = args.condition
149
+ let orgstr = this.orgCondtionStr
150
+ orgcondition = orgcondition + orgstr
151
+ this.$refs.paged.$refs.criteria.model.f_orgid = orgcondition
152
+ this.$refs.paged.search(args)
153
+ },
154
+
155
+ hidden () {
156
+ this.criteriaShow = !this.criteriaShow
157
+ },
158
+ getRes (condition, obj) {
159
+ this.orgCondtionStr = condition
160
+ this.orgname = obj.orgnames[0]
161
+ this.depname = obj.depnames[0]
162
+ this.operatorname = obj.operatornames[0]
163
+ },
164
+ getdep (obj, val) {
165
+ this.depname = val[0]
166
+ this.userresid = obj
167
+ this.f_depid = obj
168
+ },
169
+ getuser ( obj, val) {
170
+ this.operatorname = val[0]
171
+ this.f_operatorid = obj
172
+ }
173
+ },
174
+ watch: {
175
+ 'model.data' (val) {
176
+ let len=0
177
+ let a=val.split('</tr>')
178
+ for(let i=0;i<a.length;i++){
179
+ if(a[i].split('</td>').length-1>len){
180
+ len=a[i].split('</td>').length-1
181
+ }
182
+ }
183
+ this.spans = len
184
+ }
185
+ },
186
+ computed: {
187
+ user_type () {
188
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
189
+ },
190
+ gasproperties () {
191
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')]
192
+ }
193
+ }
194
+ }
195
+ </script>
196
+ <style scoped>
197
+ .noborder{
198
+ border: none;
199
+ }
200
+ </style>
@@ -0,0 +1,247 @@
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
+ <div class="col-sm-2 form-group">
30
+ <label class="font_normal_body" title="参数:付款方式查询">付款方式</label>
31
+ <v-select :value.sync="model.f_payment" multiple
32
+ v-model="model.f_payment"
33
+ :options='$parent.$parent.payment' placeholder='请选择'
34
+ condition="f_payment in {}"
35
+ close-on-select></v-select>
36
+ </div>
37
+ <res-select-group :initres="$parent.$parent.initres" :show-component="['company','department','operator']" @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
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>
45
+ </criteria>
46
+ <div partial='list' v-el:handcollect id='gasprice' style="overflow-y: scroll">
47
+ <table class='tableprint' style="margin: 0px auto" v-if="!$parent.data.f_files_path">
48
+ <thead>
49
+ <tr>
50
+ <th colspan='8' style="font-weight: bold; text-align: left;">
51
+ <h3 style="text-align: center">用气量统计报表</h3>
52
+ </th>
53
+ </tr>
54
+ <tr>
55
+ <th colspan='8' style="font-weight: normal; text-align: center;">
56
+ 开始时间:{{model.model.startDate}}&nbsp;&nbsp;&nbsp;
57
+ 结束时间:{{ model.model.endDate }}&nbsp;&nbsp;
58
+ </th>
59
+ </tr>
60
+ <tr>
61
+ <th colspan='8' style="font-weight: normal; text-align: center;">
62
+ 打印时间:{{{$parent.printTime}}}
63
+ </th>
64
+ </tr>
65
+ <tr>
66
+ <th colspan='8' style="font-weight: normal; text-align: center;">
67
+ <div>
68
+ <span v-show="$parent.orgname.trim()!=''">公司:{{$parent.orgname}}</span>
69
+ <span v-show="$parent.depname.trim()!=''"> 部门:{{$parent.depname}}</span>
70
+ </div>
71
+ </th>
72
+ </tr>
73
+ </thead>
74
+ <tr>
75
+ <td colspan='8' style="font-weight: normal;" id="test">
76
+ {{{ model.data.substring(26,model.data.length-8) }}}
77
+ </td>
78
+ </tr>
79
+ <tfoot>
80
+ <tr style="text-align: left">
81
+ <th colspan='3' style="font-weight: normal; text-align: center;">
82
+ 收款人:
83
+ </th><th colspan='3' style="font-weight: normal; text-align: center;">
84
+ 审核人:
85
+ </th><th colspan='2' style="font-weight: normal; text-align: center;">
86
+ 经手人:
87
+ </th>
88
+ </tr>
89
+ </tfoot>
90
+ </table>
91
+ {{{ $parent.reportStr}}}
92
+ </div>
93
+ </criteria-paged>
94
+ <modal :show.sync="show" v-ref:modal small backdrop="false">
95
+ <header slot="modal-header" class="modal-header">
96
+ <h4 class="modal-title">输入文件名称</h4>
97
+ </header>
98
+ <article slot="modal-body" class="modal-body">
99
+ <div class="form-group">
100
+ <input type="text" class="form-control" v-model="filename" placeholder='保存的文件名'>
101
+ </div>
102
+ </article>
103
+ <footer slot="modal-footer" class="modal-footer">
104
+ <button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
105
+ <button v-show="show" type="button" class="btn btn-success" @click='confirm(filename)'>确认</button>
106
+ </footer>
107
+ </modal>
108
+ </div>
109
+ </template>
110
+
111
+ <script>
112
+ import { DataModel } from 'vue-client'
113
+ import co from 'co'
114
+ let saveFile = function * (self) {
115
+ // 线验证文件是否重名
116
+ let count = yield self.$resetpost('api/af-revenue/sql/manageSingleTable',
117
+ {data: {tablename: 't_report_record', condition: `f_files_name = '${self.filename}'`}},
118
+ {resolveMsg: null, rejectMsg: null})
119
+ if (count.data.length > 0) {
120
+ self.$showAlert('无法保存,文件名重名', 'warning', 3000)
121
+ return
122
+ }
123
+ let saveBack = yield self.$resetpost('api/af-revenue/logic/saveReport', {f_files_content: self.$refs.paged.$els.handcollect.innerHTML,
124
+ f_files_name: self.filename, f_files_type: self.data.f_report_type, f_component_name: 'manage-bus-summary',
125
+ f_operator: this.$login.f.name, f_query_month: `${self.model.model.startDate}-${self.model.model.endDate}`,
126
+ f_outlets: this.$login.f.depname})
127
+ if (saveBack.data.status === 'succeed') {
128
+ self.show = false
129
+ self.filename = ''
130
+ // 后台保存完成,通知刷新
131
+ self.$dispatch('save-success', self.filename)
132
+ }
133
+ }
134
+ export default {
135
+ title: '用气量统计报表',
136
+ props: ['data'],
137
+ data () {
138
+ return {
139
+ printTime: this.$login.toStandardTimeString(),
140
+ depresid: [],
141
+ userresid: [],
142
+ initres: {
143
+ org:[this.$login.f.orgid],
144
+ dep:[],
145
+ user:[]
146
+ },
147
+ f_orgid: this.$login.f.orgid,
148
+ f_depid: this.$login.f.depids,
149
+ f_operatorid: this.$login.f.id,
150
+ operatorid: [],
151
+ depid: [],
152
+ orgname: '',
153
+ depname: '',
154
+ operatorname: '',
155
+ orgCondtionStr: '1=1',
156
+ model: new DataModel('api/af-revenue/report/ruihua_getgasall', {startDate: 'this.model.startDate', endDate: 'this.model.endDate',
157
+ f_orgid: 'this.model.f_orgid'}),
158
+ reportStr: null,
159
+ show: false,
160
+ spans: ''
161
+ }
162
+ },
163
+ ready () {
164
+ this.$refs.paged.$refs.criteria.model.startDate = this.$login.toStandardDateString() + ' 00:00:00'
165
+ this.$refs.paged.$refs.criteria.model.endDate = this.$login.toStandardDateString() + ' 23:59:59'
166
+ // this.$refs.paged.$refs.criteria.search()
167
+ },
168
+ methods: {
169
+ searchData () {
170
+ this.$refs.paged.$refs.criteria.search()
171
+ },
172
+ selfSearch (args) {
173
+ this.printTime = this.$login.toStandardTimeString()
174
+ let orgstr = this.orgCondtionStr
175
+ args.condition = `${args.condition} ` + orgstr
176
+ this.$refs.paged.$refs.criteria.model.f_orgid = args.condition
177
+ this.$refs.paged.search(args)
178
+ },
179
+ getRes (condition, obj) {
180
+ this.orgCondtionStr = condition
181
+ this.orgname = obj.orgnames[0]
182
+ this.depname = obj.depnames[0]
183
+ },
184
+ // getdep (obj, val) {
185
+ // // this.depname = val[0]
186
+ // this.userresid = obj
187
+ // this.f_depid = obj
188
+ // },
189
+ // getuser ( obj, val) {
190
+ // this.operatorname = val[0]
191
+ // this.f_operatorid = obj
192
+ // },
193
+
194
+ // 根据文件路径获取储存的报表内容
195
+ getFileContent (path) {
196
+ this.$resetpost('api/af-revenue/logic/getReportFileContent', {f_files_path: path}, {resolveMsg: null, rejectMsg: null}).then((res) => {
197
+ this.reportStr = res.data.filecontent
198
+ this.model.state = '正确'
199
+ })
200
+ },
201
+ confirm () {
202
+ if (!this.filename || this.filename === '') {
203
+ this.$showAlert('无法保存,文件名不能为空', 'warning', 3000)
204
+ }
205
+ let saveGen = saveFile(this)
206
+ co(saveGen)
207
+ },
208
+ close () {
209
+ this.show = false
210
+ },
211
+ // 将报表保存成文件
212
+ confirmReport () {
213
+ this.show = true
214
+ this.filename = this.data.f_report_name + this.$login.toStandardDateString()
215
+ }
216
+ },
217
+ watch: {
218
+ 'data' (val) {
219
+ if (val.f_files_path) {
220
+ this.getFileContent(val.f_files_path)
221
+ } else {
222
+ this.reportStr = null
223
+ }
224
+ },
225
+ 'model.data' (val) {
226
+ let tab = document.getElementById('test').children[0]
227
+ var tds = tab.getElementsByTagName('td')
228
+ var num = 0
229
+ for (let td of tds) {
230
+ let span = td.getAttribute('colspan')
231
+ num = num + ((span ? span : 1) - 0)
232
+ }
233
+ this.spans = num
234
+ }
235
+ },
236
+ computed: {
237
+ payment() {
238
+ return [...this.$appdata.getParam('付款方式查询')]
239
+ },
240
+ }
241
+ }
242
+ </script>
243
+ <style scoped>
244
+ .noborder{
245
+ border: none;
246
+ }
247
+ </style>