manage-client-xy 3.1.69 → 3.1.74

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,173 +1,173 @@
1
- var express = require('express')
2
- var webpack = require('webpack')
3
- var config = require('./webpack.dev.conf')
4
- var proxyMiddleware = require('http-proxy-middleware')
5
- // var httpProxy = require('http-proxy')
6
-
7
- var app = express()
8
- var compiler = webpack(config)
9
- // var proxy = httpProxy.createProxyServer()
10
-
11
- // Define HTTP proxies to your custom API backend
12
- // https://github.com/chimurai/http-proxy-middleware
13
- // var bendi = 'http://127.0.0.1:8089/manage', fuwu = 'http://36.103.224.217:6300/'
14
- var bendi = 'http://200.100.100.111:8300/'
15
- ,fuwu ='http://200.100.100.111:8300/'
16
- // ,fuwu = 'http://172.16.16.163:8300/'
17
- var proxyTable = {
18
-
19
- '/rs/logic/exportfile': {
20
- target: bendi
21
- },
22
- '/files': {
23
- target: fuwu
24
- },
25
- '/rs/sql': {
26
- target: bendi
27
- },
28
- // 查找资源服务数据
29
- '/rs/search': {
30
- target: fuwu
31
- },
32
- // 查找资源服务数据
33
- '/rs/logic/getLogin': {
34
- target: fuwu
35
- },
36
- // 查找资源服务数据
37
- '/rs/logic/getInitData': {
38
- target: fuwu
39
- },
40
- '/rs/logic/getSaleInitData':{
41
- target: fuwu
42
- },
43
- // 用户登录服务地址
44
- '/rs/user': {
45
- target: fuwu
46
- },
47
- '/rs/path/getParams': {
48
- target: fuwu
49
- },
50
- '/rs/data': {
51
- target: fuwu
52
- },
53
- '/rs/license': {
54
- target: fuwu
55
- },
56
- '/rs/db': {
57
- target: fuwu
58
- },
59
- '/excel': {
60
- target: fuwu
61
- },
62
- '/rs/config': {
63
- target: fuwu
64
- },
65
- '/rs/sql/getLicenseById': {
66
- target: fuwu
67
- },
68
- '/rs/report': {
69
- target: bendi
70
- },
71
- '/rs/vue': {
72
- target: fuwu
73
- },
74
- '/rs/file': {
75
- target: fuwu
76
- },
77
- '/rs/logic/SumSettleFileImport':{
78
- target: 'http://127.0.0.1:8087'
79
- },
80
- '/rs': {
81
- target: fuwu
82
- }
83
- }
84
-
85
- var devMiddleware = require('webpack-dev-middleware')(compiler, {
86
- publicPath: config.output.publicPath,
87
- stats: {
88
- colors: true,
89
- chunks: false
90
- }
91
- })
92
-
93
- var hotMiddleware = require('webpack-hot-middleware')(compiler)
94
- // force page reload when html-webpack-plugin template changes
95
- compiler.plugin('compilation', function (compilation) {
96
- compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
97
- hotMiddleware.publish({action: 'reload'})
98
- cb()
99
- })
100
- })
101
-
102
- // proxy api requests
103
- Object.keys(proxyTable).forEach(function (context) {
104
- var options = proxyTable[context]
105
- if (typeof options === 'string') {
106
- options = {target: options}
107
- }
108
- app.use(proxyMiddleware(context, options))
109
- })
110
-
111
- // handle fallback for HTML5 history API
112
- app.use(require('connect-history-api-fallback')())
113
- // app.use(function (req, res, next) {
114
- // res.header('Access-Control-Allow-Origin', '*')
115
- // res.header('Access-Control-Allow-Headers', 'X-Requested-With')
116
- // res.header('Access-Control-Allow-Methods', 'PUT, POST, GET,DELETE, OPTIONS')
117
- // res.header('X-Powered-By', '3,2,1')
118
- // res.header('Access-Control-Allow-Credentials', 'true')
119
- // res.header('Content-Type', 'application/json;charset=utf-8')
120
- // next()
121
- // })
122
-
123
- // serve webpack bundle output
124
- app.use(devMiddleware)
125
-
126
- // enable hot-reload and state-preserving
127
- // compilation error display
128
- app.use(hotMiddleware)
129
-
130
- // serve pure static assets
131
- app.use('/static', express.static('./static'))
132
-
133
- // app.all('/rs/*', function (req, res) {
134
- // proxy.web(req, res, {
135
- // target: 'http://127.0.0.1:8081/reports'
136
- // })
137
- // })
138
-
139
- // app.all('/rs/*', function (req, res) {
140
- // proxy.web(req, res, {
141
- // target: 'http://127.0.0.1:8081/ldap'
142
- // })
143
- // })
144
- // app.all('/excel/*', function (req, res) {
145
- // proxy.web(req, res, {
146
- // target: 'http://127.0.0.1:8081/charge'
147
- // })
148
- // })
149
-
150
- // app.all('/rs/*', function (req, res) {
151
- // proxy.web(req, res, {
152
- // target: 'http://127.0.0.1:82/charge'
153
- // })
154
- // })
155
-
156
- // app.all('/*', function (req, res) {
157
- // proxy.web(req, res, {
158
- // target: 'http://127.0.0.1:82'
159
- // })
160
- // })
161
- // app.all('/rs/user', function (req, res) {
162
- // proxy.web(req, res, {
163
- // target: 'http://127.0.0.1:82'
164
- // })
165
- // })
166
-
167
- module.exports = app.listen(8085, function (err) {
168
- if (err) {
169
- console.log(err)
170
- return
171
- }
172
- console.log('Listening at http://localhost:8085')
173
- })
1
+ var express = require('express')
2
+ var webpack = require('webpack')
3
+ var config = require('./webpack.dev.conf')
4
+ var proxyMiddleware = require('http-proxy-middleware')
5
+ // var httpProxy = require('http-proxy')
6
+
7
+ var app = express()
8
+ var compiler = webpack(config)
9
+ // var proxy = httpProxy.createProxyServer()
10
+
11
+ // Define HTTP proxies to your custom API backend
12
+ // https://github.com/chimurai/http-proxy-middleware
13
+ // var bendi = 'http://127.0.0.1:8089/manage', fuwu = 'http://36.103.224.217:6300/'
14
+ var bendi = 'http://127.0.0.1:8080/'
15
+ ,fuwu ='http://200.100.100.111:8300/'
16
+ // ,fuwu = 'http://172.16.16.163:8300/'
17
+ var proxyTable = {
18
+
19
+ '/rs/logic/exportfile': {
20
+ target: bendi
21
+ },
22
+ '/files': {
23
+ target: fuwu
24
+ },
25
+ '/rs/sql': {
26
+ target: bendi
27
+ },
28
+ // 查找资源服务数据
29
+ '/rs/search': {
30
+ target: fuwu
31
+ },
32
+ // 查找资源服务数据
33
+ '/rs/logic/getLogin': {
34
+ target: fuwu
35
+ },
36
+ // 查找资源服务数据
37
+ '/rs/logic/getInitData': {
38
+ target: fuwu
39
+ },
40
+ '/rs/logic/getSaleInitData':{
41
+ target: fuwu
42
+ },
43
+ // 用户登录服务地址
44
+ '/rs/user': {
45
+ target: fuwu
46
+ },
47
+ '/rs/path/getParams': {
48
+ target: fuwu
49
+ },
50
+ '/rs/data': {
51
+ target: fuwu
52
+ },
53
+ '/rs/license': {
54
+ target: fuwu
55
+ },
56
+ '/rs/db': {
57
+ target: fuwu
58
+ },
59
+ '/excel': {
60
+ target: fuwu
61
+ },
62
+ '/rs/config': {
63
+ target: fuwu
64
+ },
65
+ '/rs/sql/getLicenseById': {
66
+ target: fuwu
67
+ },
68
+ '/rs/report': {
69
+ target: bendi
70
+ },
71
+ '/rs/vue': {
72
+ target: fuwu
73
+ },
74
+ '/rs/file': {
75
+ target: fuwu
76
+ },
77
+ '/rs/logic/SumSettleFileImport':{
78
+ target: 'http://127.0.0.1:8087'
79
+ },
80
+ '/rs': {
81
+ target: fuwu
82
+ }
83
+ }
84
+
85
+ var devMiddleware = require('webpack-dev-middleware')(compiler, {
86
+ publicPath: config.output.publicPath,
87
+ stats: {
88
+ colors: true,
89
+ chunks: false
90
+ }
91
+ })
92
+
93
+ var hotMiddleware = require('webpack-hot-middleware')(compiler)
94
+ // force page reload when html-webpack-plugin template changes
95
+ compiler.plugin('compilation', function (compilation) {
96
+ compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
97
+ hotMiddleware.publish({action: 'reload'})
98
+ cb()
99
+ })
100
+ })
101
+
102
+ // proxy api requests
103
+ Object.keys(proxyTable).forEach(function (context) {
104
+ var options = proxyTable[context]
105
+ if (typeof options === 'string') {
106
+ options = {target: options}
107
+ }
108
+ app.use(proxyMiddleware(context, options))
109
+ })
110
+
111
+ // handle fallback for HTML5 history API
112
+ app.use(require('connect-history-api-fallback')())
113
+ // app.use(function (req, res, next) {
114
+ // res.header('Access-Control-Allow-Origin', '*')
115
+ // res.header('Access-Control-Allow-Headers', 'X-Requested-With')
116
+ // res.header('Access-Control-Allow-Methods', 'PUT, POST, GET,DELETE, OPTIONS')
117
+ // res.header('X-Powered-By', '3,2,1')
118
+ // res.header('Access-Control-Allow-Credentials', 'true')
119
+ // res.header('Content-Type', 'application/json;charset=utf-8')
120
+ // next()
121
+ // })
122
+
123
+ // serve webpack bundle output
124
+ app.use(devMiddleware)
125
+
126
+ // enable hot-reload and state-preserving
127
+ // compilation error display
128
+ app.use(hotMiddleware)
129
+
130
+ // serve pure static assets
131
+ app.use('/static', express.static('./static'))
132
+
133
+ // app.all('/rs/*', function (req, res) {
134
+ // proxy.web(req, res, {
135
+ // target: 'http://127.0.0.1:8081/reports'
136
+ // })
137
+ // })
138
+
139
+ // app.all('/rs/*', function (req, res) {
140
+ // proxy.web(req, res, {
141
+ // target: 'http://127.0.0.1:8081/ldap'
142
+ // })
143
+ // })
144
+ // app.all('/excel/*', function (req, res) {
145
+ // proxy.web(req, res, {
146
+ // target: 'http://127.0.0.1:8081/charge'
147
+ // })
148
+ // })
149
+
150
+ // app.all('/rs/*', function (req, res) {
151
+ // proxy.web(req, res, {
152
+ // target: 'http://127.0.0.1:82/charge'
153
+ // })
154
+ // })
155
+
156
+ // app.all('/*', function (req, res) {
157
+ // proxy.web(req, res, {
158
+ // target: 'http://127.0.0.1:82'
159
+ // })
160
+ // })
161
+ // app.all('/rs/user', function (req, res) {
162
+ // proxy.web(req, res, {
163
+ // target: 'http://127.0.0.1:82'
164
+ // })
165
+ // })
166
+
167
+ module.exports = app.listen(8085, function (err) {
168
+ if (err) {
169
+ console.log(err)
170
+ return
171
+ }
172
+ console.log('Listening at http://localhost:8085')
173
+ })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "manage-client-xy",
3
- "version": "3.1.69",
3
+ "version": "3.1.74",
4
4
  "description": "经营管控模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -63,7 +63,7 @@
63
63
  "sinon-chai": "^2.8.0",
64
64
  "style": "0.0.3",
65
65
  "style-loader": "^0.20.3",
66
- "system-clients": "3.1.75-xianyang",
66
+ "system-clients": "3.1.77-xianyang",
67
67
  "url-loader": "^0.5.7",
68
68
  "vue-amap": "0.5.10",
69
69
  "vue-client": "1.22.33-xy",
@@ -0,0 +1,261 @@
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-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">&emsp;&emsp;公司:</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">&emsp;&emsp;部门:</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">&emsp;&emsp;人员:</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-4" style="float:right;">
53
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;&emsp;&emsp;&nbsp;&nbsp;&nbsp;</label>
54
+ <button class="button_search" @click="$parent.$parent.searchData()">查询</button>
55
+ <report-print id='gasprice' top='3cm' left='0' width='100%' height='100%' :preview="true"></report-print>
56
+ <report-excel id='gasprice'
57
+ v-if="$parent.$parent.jurisdiction.includes('excel导出')"
58
+ ></report-excel>
59
+ </div>
60
+ </div>
61
+ </div>
62
+ </criteria>
63
+ <div partial='list' v-el:handcollect id='gasprice' style="overflow-y: scroll">
64
+ <table class='tableprint' style="margin: 0px auto">
65
+ <thead>
66
+ <tr>
67
+ <th colspan='17' style="font-weight: normal; text-align: left;">
68
+ <h3 style="text-align: center">咸阳发票统计报表</h3>
69
+ </th>
70
+ </tr>
71
+ <tr>
72
+ <th colspan='17' style="font-weight: normal; text-align: center;">
73
+ 开始时间:{{model.model.startDate}}&nbsp;&nbsp;&nbsp;
74
+ 结束时间:{{ model.model.endDate }}
75
+ </th>
76
+ </tr>
77
+ <tr>
78
+ <th colspan='17' style="font-weight: normal; text-align: center;">
79
+ 打印时间:{{{$parent.printTime}}}
80
+ </th>
81
+ </tr>
82
+ <tr>
83
+ <th colspan='17' style="font-weight: normal; text-align: center;">
84
+ <div>
85
+ <span v-show="$parent.orgname.trim()!=''">公司:{{ $parent.orgname }}</span>
86
+ <span v-show="$parent.depname.trim()!=''"> 部门:{{ $parent.depname }}</span>
87
+ <span v-show="$parent.operatorname.trim()!=''">人员:{{ $parent.operatorname }}</span>
88
+ </div>
89
+ </th>
90
+ </tr>
91
+ </thead>
92
+ <tr>
93
+ <td colspan='17'>
94
+ {{{ model.data.substring(26,model.data.length-8) }}}
95
+ </td>
96
+ </tr>
97
+ <tfoot>
98
+ <tr style="text-align: left">
99
+ <th colspan='6'>财务审核:</th>
100
+ <th colspan='6'>收款审核:</th>
101
+ <th colspan='5'>收款员:</th>
102
+ </tr>
103
+ </tfoot>
104
+ </table>
105
+ {{{ $parent.reportStr}}}
106
+ </div>
107
+ </criteria-paged>
108
+ <modal :show.sync="show" v-ref:modal small backdrop="false">
109
+ <header slot="modal-header" class="modal-header">
110
+ <h4 class="modal-title">输入文件名称</h4>
111
+ </header>
112
+ <article slot="modal-body" class="modal-body">
113
+ <div class="form-group">
114
+ <input type="text" class="form-control" v-model="filename" placeholder='保存的文件名'>
115
+ </div>
116
+ </article>
117
+ <footer slot="modal-footer" class="modal-footer">
118
+ <button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
119
+ <button v-show="show" type="button" class="btn btn-success" @click='confirm(filename)'>确认</button>
120
+ </footer>
121
+ </modal>
122
+ </div>
123
+ </template>
124
+
125
+ <script>
126
+ import { DataModel } from 'vue-client'
127
+ import co from 'co'
128
+ let saveFile = function * (self) {
129
+ // 线验证文件是否重名
130
+ let count = yield self.$resetpost('rs/sql/manageSingleTable',
131
+ {data: {tablename: 't_report_record', condition: `f_files_name = '${self.filename}'`}},
132
+ {resolveMsg: null, rejectMsg: null})
133
+ if (count.data.length > 0) {
134
+ self.$showAlert('无法保存,文件名重名', 'warning', 3000)
135
+ return
136
+ }
137
+ let saveBack = yield self.$resetpost('rs/logic/saveReport', {f_files_content: self.$refs.paged.$els.handcollect.innerHTML,
138
+ f_files_name: self.filename, f_files_type: self.data.f_report_type, f_component_name: 'manage-bus-summary',
139
+ f_operator: this.$login.f.name, f_query_month: `${self.model.model.startDate}-${self.model.model.endDate}`,
140
+ f_outlets: this.$login.f.depname})
141
+ if (saveBack.data.status === 'succeed') {
142
+ self.show = false
143
+ self.filename = ''
144
+ // 后台保存完成,通知刷新
145
+ self.$dispatch('save-success', self.filename)
146
+ }
147
+ }
148
+ export default {
149
+ title: '咸阳发票统计报表',
150
+ props: ['data'],
151
+ data () {
152
+ return {
153
+ printTime: this.$login.toStandardTimeString(),
154
+ depresid: [],
155
+ userresid: [],
156
+ f_orgid: this.$login.f.orgid,
157
+ f_depid: this.$login.f.depids,
158
+ f_operatorid: this.$login.f.id,
159
+ jurisdiction: this.$login.r,
160
+ operatorid: [],
161
+ depid: [],
162
+ orgname: '',
163
+ depname: '',
164
+ operatorname: '',
165
+ f_inputtor:[],
166
+ f_user_type:'',
167
+ orgCondtionStr: '1=1',
168
+ model: new DataModel('rs/report/BillDataCount', {startDate: 'this.model.startDate', endDate: 'this.model.endDate',
169
+ f_orgid: 'this.model.f_orgid'}),
170
+ reportStr: null,
171
+ show: false
172
+ }
173
+ },
174
+ ready () {
175
+ this.$refs.paged.$refs.criteria.model.startDate = this.$login.toStandardDateString() + ' 00:00:00'
176
+ this.$refs.paged.$refs.criteria.model.endDate = this.$login.toStandardDateString() + ' 23:59:59'
177
+ this.$refs.paged.$refs.criteria.search()
178
+ console.log(this.$login.f)
179
+ },
180
+ methods: {
181
+ searchData () {
182
+ this.$refs.paged.$refs.criteria.search()
183
+ },
184
+ selfSearch (args) {
185
+ console.log(args.condition + 'yyyqqq')
186
+ this.printTime = this.$login.toStandardTimeString()
187
+ let orgcondition = '1=1'
188
+ if (this.f_orgid[0]) {
189
+ orgcondition += " and f_orgid in ( " + this.f_orgid.toString() + " ) "
190
+ console.log('f_orgids:' + this.f_orgid.toString())
191
+ }
192
+ if (this.f_depid[0]) {
193
+ orgcondition += " and F_DEPNAME like '%" + this.depname + "%'"
194
+ }
195
+ if(this.f_operatorid[0]) {
196
+ orgcondition += " and f_operator like '%" + this.operatorname + "%'"
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
+ this.userresid = obj.resids
206
+ },
207
+ getdep (obj, val) {
208
+ this.depname = val[0]
209
+ this.f_depid = obj
210
+ },
211
+ getuser ( obj, val) {
212
+ this.operatorname = val[0]
213
+ this.f_operatorid = obj
214
+ },
215
+ // 根据文件路径获取储存的报表内容
216
+ getFileContent (path) {
217
+ this.$resetpost('rs/logic/getReportFileContent', {f_files_path: path}, {resolveMsg: null, rejectMsg: null}).then((res) => {
218
+ this.reportStr = res.data.filecontent
219
+ this.model.state = '正确'
220
+ })
221
+ },
222
+ confirm () {
223
+ if (!this.filename || this.filename === '') {
224
+ this.$showAlert('无法保存,文件名不能为空', 'warning', 3000)
225
+ }
226
+ let saveGen = saveFile(this)
227
+ co(saveGen)
228
+ },
229
+ close () {
230
+ this.show = false
231
+ },
232
+ // 将报表保存成文件
233
+ confirmReport () {
234
+ this.show = true
235
+ this.filename = this.data.f_report_name + this.$login.toStandardDateString()
236
+ },
237
+ },
238
+ watch: {
239
+ 'data' (val) {
240
+ if (val.f_files_path) {
241
+ this.getFileContent(val.f_files_path)
242
+ } else {
243
+ this.reportStr = null
244
+ }
245
+ }
246
+ },
247
+ computed: {
248
+ usertypes() {
249
+ return [{label: ' 全部 ', value: ''}, ...this.$appdata.getParam('用户类型')]
250
+ },
251
+ inputtor() {
252
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('抄表员')]
253
+ },
254
+ }
255
+ }
256
+ </script>
257
+ <style scoped>
258
+ .noborder{
259
+ border: none;
260
+ }
261
+ </style>