manage-client 4.1.122 → 4.1.123-linshi

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,145 +1,145 @@
1
- const express = require('express')
2
- const webpack = require('webpack')
3
- const config = require('./webpack.dev.conf')
4
- const proxyMiddleware = require('http-proxy-middleware')
5
-
6
- const app = express()
7
- const compiler = webpack(config)
8
-
9
- const server = 'http://192.168.50.67:31567/'
10
- const local = 'http://127.0.0.1:9026/'
11
- const proxyTable = {
12
- '/rs/logic/exportfile': {
13
- target: server
14
- },
15
- '/dataManage': {
16
- target: server
17
- },
18
- '/api/af-revenue/sql/': {
19
- pathRewrite: {
20
- '^/api/af-revenue': '/'
21
- },
22
- target: local
23
- },
24
- '/api/af-revenue/report/': {
25
- pathRewrite: {
26
- '^/api/af-revenue': '/'
27
- },
28
- target: local
29
- },
30
- '/api/af-revenue/logic': {
31
- pathRewrite: {
32
- '^/api/af-revenue': '/'
33
- },
34
- target: local
35
- },
36
- '/api': {
37
- target: server
38
- },
39
- '/rs/sql/chargeQuery_by_gasproperties': {
40
- target: server
41
- },
42
- '/rs/logic/chargeQuery_by_gasproperties_line': {
43
- target: server
44
- },
45
- '/files': {
46
- target: server
47
- },
48
- // 查找资源服务数据
49
- '/rs/search': {
50
- target: server
51
- },
52
- // 查找资源服务数据
53
- '/rs/logic/getLogin': {
54
- target: server
55
- },
56
- // 查找资源服务数据
57
- '/rs/logic/getInitData': {
58
- target: server
59
- },
60
- '/rs/logic/getSaleInitData': {
61
- target: server
62
- },
63
- // 用户登录服务地址
64
- '/rs/user': {
65
- target: server
66
- },
67
- '/rs/path/getParams': {
68
- target: server
69
- },
70
- '/rs/data': {
71
- target: server
72
- },
73
- '/rs/license': {
74
- target: server
75
- },
76
- '/rs/db': {
77
- target: server
78
- },
79
- '/excel': {
80
- target: server
81
- },
82
- '/rs/config': {
83
- target: server
84
- },
85
- '/rs/sql/getLicenseById': {
86
- target: server
87
- },
88
- '/rs/report': {
89
- target: server
90
- },
91
- '/rs/vue': {
92
- target: server
93
- },
94
- '/rs/file': {
95
- target: server
96
- },
97
- '/rs/sql/singleTable': {
98
- target: server
99
- },
100
- '/rs': {
101
- target: server
102
- }
103
- }
104
-
105
- const devMiddleware = require('webpack-dev-middleware')(compiler, {
106
- publicPath: config.output.publicPath,
107
- stats: {
108
- colors: true,
109
- chunks: false
110
- }
111
- })
112
-
113
- const hotMiddleware = require('webpack-hot-middleware')(compiler)
114
- // force page reload when html-webpack-plugin template changes
115
- compiler.plugin('compilation', function (compilation) {
116
- compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
117
- hotMiddleware.publish({action: 'reload'})
118
- cb()
119
- })
120
- })
121
-
122
- // proxy api requests
123
- Object.keys(proxyTable).forEach(function (context) {
124
- let options = proxyTable[context]
125
- if (typeof options === 'string') {
126
- options = {target: options}
127
- }
128
- app.use(proxyMiddleware(context, options))
129
- })
130
-
131
- app.use(require('connect-history-api-fallback')())
132
-
133
- app.use(devMiddleware)
134
-
135
- app.use(hotMiddleware)
136
-
137
- app.use('/static', express.static('./static'))
138
-
139
- module.exports = app.listen(8015, function (err) {
140
- if (err) {
141
- console.log(err)
142
- return
143
- }
144
- console.log('Listening at http://localhost:8015')
145
- })
1
+ const express = require('express')
2
+ const webpack = require('webpack')
3
+ const config = require('./webpack.dev.conf')
4
+ const proxyMiddleware = require('http-proxy-middleware')
5
+
6
+ const app = express()
7
+ const compiler = webpack(config)
8
+
9
+ const server = 'http://192.168.50.105:31467/'
10
+ const local = 'http://127.0.0.1:9026/'
11
+ const proxyTable = {
12
+ '/rs/logic/exportfile': {
13
+ target: server
14
+ },
15
+ '/dataManage': {
16
+ target: server
17
+ },
18
+ // '/api/af-revenue/sql/': {
19
+ // pathRewrite: {
20
+ // '^/api/af-revenue': '/'
21
+ // },
22
+ // target: local
23
+ // },
24
+ // '/api/af-revenue/report/': {
25
+ // pathRewrite: {
26
+ // '^/api/af-revenue': '/'
27
+ // },
28
+ // target: local
29
+ // },
30
+ // '/api/af-revenue/logic': {
31
+ // pathRewrite: {
32
+ // '^/api/af-revenue': '/'
33
+ // },
34
+ // target: local
35
+ // },
36
+ '/api': {
37
+ target: server
38
+ },
39
+ '/rs/sql/chargeQuery_by_gasproperties': {
40
+ target: server
41
+ },
42
+ '/rs/logic/chargeQuery_by_gasproperties_line': {
43
+ target: server
44
+ },
45
+ '/files': {
46
+ target: server
47
+ },
48
+ // 查找资源服务数据
49
+ '/rs/search': {
50
+ target: server
51
+ },
52
+ // 查找资源服务数据
53
+ '/rs/logic/getLogin': {
54
+ target: server
55
+ },
56
+ // 查找资源服务数据
57
+ '/rs/logic/getInitData': {
58
+ target: server
59
+ },
60
+ '/rs/logic/getSaleInitData': {
61
+ target: server
62
+ },
63
+ // 用户登录服务地址
64
+ '/rs/user': {
65
+ target: server
66
+ },
67
+ '/rs/path/getParams': {
68
+ target: server
69
+ },
70
+ '/rs/data': {
71
+ target: server
72
+ },
73
+ '/rs/license': {
74
+ target: server
75
+ },
76
+ '/rs/db': {
77
+ target: server
78
+ },
79
+ '/excel': {
80
+ target: server
81
+ },
82
+ '/rs/config': {
83
+ target: server
84
+ },
85
+ '/rs/sql/getLicenseById': {
86
+ target: server
87
+ },
88
+ '/rs/report': {
89
+ target: server
90
+ },
91
+ '/rs/vue': {
92
+ target: server
93
+ },
94
+ '/rs/file': {
95
+ target: server
96
+ },
97
+ '/rs/sql/singleTable': {
98
+ target: server
99
+ },
100
+ '/rs': {
101
+ target: server
102
+ }
103
+ }
104
+
105
+ const devMiddleware = require('webpack-dev-middleware')(compiler, {
106
+ publicPath: config.output.publicPath,
107
+ stats: {
108
+ colors: true,
109
+ chunks: false
110
+ }
111
+ })
112
+
113
+ const hotMiddleware = require('webpack-hot-middleware')(compiler)
114
+ // force page reload when html-webpack-plugin template changes
115
+ compiler.plugin('compilation', function (compilation) {
116
+ compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
117
+ hotMiddleware.publish({action: 'reload'})
118
+ cb()
119
+ })
120
+ })
121
+
122
+ // proxy api requests
123
+ Object.keys(proxyTable).forEach(function (context) {
124
+ let options = proxyTable[context]
125
+ if (typeof options === 'string') {
126
+ options = {target: options}
127
+ }
128
+ app.use(proxyMiddleware(context, options))
129
+ })
130
+
131
+ app.use(require('connect-history-api-fallback')())
132
+
133
+ app.use(devMiddleware)
134
+
135
+ app.use(hotMiddleware)
136
+
137
+ app.use('/static', express.static('./static'))
138
+
139
+ module.exports = app.listen(8015, function (err) {
140
+ if (err) {
141
+ console.log(err)
142
+ return
143
+ }
144
+ console.log('Listening at http://localhost:8015')
145
+ })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "manage-client",
3
- "version": "4.1.122",
3
+ "version": "4.1.123-linshi",
4
4
  "description": "经营管控模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -2,9 +2,9 @@
2
2
  <div class="basic-main" style="height: 100%">
3
3
  <criteria-paged :model="model" :pager='false' v-ref:paged>
4
4
  <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:criteria>
5
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial >
5
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
6
  <div class="row">
7
- <div class="col-sm-2 form-group" >
7
+ <div class="col-sm-2 form-group">
8
8
  <label class="font_normal_body" for="startDate">开始日期:</label>
9
9
  <datepicker id="startDate" placeholder="开始日期" style="width: 60%"
10
10
  v-model="model.startDate"
@@ -14,8 +14,8 @@
14
14
  :show-reset-button="reset">
15
15
  </datepicker>
16
16
  </div>
17
- <div class="col-sm-2 form-group" >
18
- <label class="font_normal_body" for="endDate">结束日期:</label>
17
+ <div class="col-sm-2 form-group">
18
+ <label class="font_normal_body" for="endDate">结束日期:</label>
19
19
  <datepicker id="endDate" placeholder="结束日期" style="width: 60%"
20
20
  v-model="model.endDate"
21
21
  :value.sync="model.endDate"
@@ -23,39 +23,18 @@
23
23
  :format="'yyyy-MM-dd HH:mm:ss'"
24
24
  :show-reset-button="reset">
25
25
  </datepicker>
26
- </div><!--
27
- <div class="col-sm-2 form-group">
28
- <label class="font_normal_body">&nbsp;&nbsp;&nbsp;公司&nbsp;&nbsp;&nbsp; </label>
29
- <right-tree @re-res="$parent.$parent.getRes" style="width: 60%"></right-tree>
30
26
  </div>
31
- <div class="col-sm-2 form-group">
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-2 form-group">
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
- -->
51
- <res-select-group :show-component="$parent.$parent.resshow" :selectin="true" :initres="$parent.$parent.initres" :cascade =true @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
27
+ <res-select-group :show-component="$parent.$parent.resshow" :selectin="true"
28
+ :initres="$parent.$parent.initres" :cascade=true @re-res="$parent.$parent.getRes"
29
+ v-ref:sel></res-select-group>
52
30
  </div>
53
- <div class="span" style = "float:right;">
31
+ <div class="span" style="float:right;">
32
+ <button class="button_search" @click="$parent.$parent.pushAudit()" v-if="$parent.$parent.config.hasAudit">审核</button>
54
33
  <button class="button_search" @click="$parent.$parent.searchData()">查询</button>
55
34
  <report-print id='gasprice' top='3cm' left='0' width='100%' height='100%' :preview="true"></report-print>
56
35
  <report-excel id='gasprice'></report-excel>
57
- <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,
58
- 'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
36
+ <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,
37
+ 'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
59
38
  </div>
60
39
  <div class="row" v-show="$parent.$parent.criteriaShow">
61
40
  <div class="col-sm-2 form-group">
@@ -77,7 +56,7 @@
77
56
  </div>
78
57
  </div>
79
58
  </criteria>
80
- <div partial='list' v-el:handcollect id='gasprice' style="overflow-y: scroll">
59
+ <div partial='list' v-el:handcollect id='gasprice' style="overflow-y: scroll">
81
60
  <table class='tableprint' style="margin: 0px auto">
82
61
  <thead>
83
62
  <tr>
@@ -87,10 +66,10 @@
87
66
  </tr>
88
67
  <tr>
89
68
  <th :colspan='$parent.spans' style="font-weight: normal; text-align: center;">
90
- 开始时间:{{model.model.startDate}}&nbsp;&nbsp;&nbsp;
69
+ 开始时间:{{ model.model.startDate }}&nbsp;&nbsp;&nbsp;
91
70
  结束时间:{{ model.model.endDate }}&nbsp;&nbsp;<br/>
92
71
  <!--打印时间:{{{$parent.printTime}}}-->
93
- 打印时间:{{$parent.printTime}}
72
+ 打印时间:{{ $parent.printTime }}
94
73
  <!--收费员:{{// $parent.operatorname}}-->
95
74
  </th>
96
75
  </tr>
@@ -120,11 +99,44 @@
120
99
  {{{ $parent.reportStr}}}
121
100
  </div>
122
101
  </criteria-paged>
102
+ <modal :show.sync="show" v-ref:modal small backdrop="false">
103
+ </modal>
104
+ <modal :show.sync="pushAuditShow" large backdrop="false" width="40%">
105
+ <header slot="modal-header" class="modal-header" style="text-align: center">
106
+ <h4 class="modal-title">审核推送</h4>
107
+ </header>
108
+ <article slot="modal-body" class="modal-body">
109
+ <validator name='v'>
110
+ <form class="form-horizontal select-overspread">
111
+ <div class="form-group" :class="[$v.f_audit_person.required ? 'has-error' : '']">
112
+ <label class="col-sm-4 font_normal_body">审核人:</label>
113
+ <input type="text" v-show="false" v-model="$refs.f_audit_person.selectedItems"
114
+ v-validate:f_audit_person='{required: true }'>
115
+ <div class="col-sm-8">
116
+ <v-select v-model="pushAuditData.f_audit_person"
117
+ placeholder='请选择'
118
+ :value.sync="pushAuditData.f_audit_person"
119
+ :options='auditor'
120
+ :value-single="true"
121
+ close-on-select
122
+ clear-button
123
+ v-ref:f_audit_person>
124
+ </v-select>
125
+ </div>
126
+ </div>
127
+ </form>
128
+ </validator>
129
+ </article>
130
+ <footer slot="modal-footer" class="modal-footer">
131
+ <button class="button_search" @click="auditConfirm()" :disabled="!$v.valid">提交审核</button>
132
+ <button class="button_clear" @click="cancel()">取消</button>
133
+ </footer>
134
+ </modal>
123
135
  </div>
124
136
  </template>
125
137
 
126
138
  <script>
127
- import { DataModel } from 'vue-client'
139
+ import {DataModel} from 'vue-client'
128
140
  import co from 'co'
129
141
 
130
142
  export default {
@@ -146,25 +158,77 @@ export default {
146
158
  operatorname: '',
147
159
  orgCondtionStr: '1=1',
148
160
  f_user_type: '',
149
- f_state:['有效'],
150
- model: new DataModel('api/af-revenue/report/getmoneyall', {startDate: 'this.model.startDate', endDate: 'this.model.endDate',
151
- f_orgid: 'this.model.f_orgid'}),
161
+ f_state: ['有效'],
162
+ auditor: [],
163
+ model: new DataModel('api/af-revenue/report/getmoneyall', {
164
+ startDate: 'this.model.startDate', endDate: 'this.model.endDate',
165
+ f_orgid: 'this.model.f_orgid'
166
+ }),
152
167
  reportStr: null,
153
- resshow:['company','department','operator'],
168
+ resshow: ['company', 'department', 'operator'],
154
169
  spans: 0,
155
170
  initres: {
156
171
  org: [this.$login.f.orgid],
157
172
  dep: [],
158
173
  user: []
174
+ },
175
+ pushAuditData: {},
176
+ pushAuditShow: false,
177
+ config: {
178
+ hasAudit: false
159
179
  }
160
180
  }
161
181
  },
162
- ready () {
182
+ async ready () {
163
183
  this.$refs.paged.$refs.criteria.model.startDate = this.$login.toStandardDateString() + ' 00:00:00'
164
184
  this.$refs.paged.$refs.criteria.model.endDate = this.$login.toStandardDateString() + ' 23:59:59'
165
- console.log(this.$login.f)
185
+ this.getAuditor()
186
+ await this.$getConfig(this, 'reportAuditConfig')
187
+ console.log('this.config.hasAudit', this.config.hasAudit)
188
+ console.log('config对象结构:', JSON.stringify(this.config))
166
189
  },
167
190
  methods: {
191
+ auditConfirm () {
192
+ const param = {
193
+ f_type: '收费结账报表',
194
+ f_requestparam: this.model.data,
195
+ f_audit_person: this.pushAuditData.f_audit_person,
196
+ f_otherparam: this.pushAuditData,
197
+ f_operator: this.$login.f.name,
198
+ f_operatorid: this.$login.f.id,
199
+ f_orgid: this.$login.f.orgid,
200
+ f_orgname: this.$login.f.orgs,
201
+ f_depid: this.$login.f.depids,
202
+ f_depname: this.$login.f.deps,
203
+ f_describe: `${this.$login.f.name}发起收费结账报表审核操作`,
204
+ f_is_report_audit: '是'
205
+ }
206
+ this.$resetpost('api/af-revenue/logic/saveReportAuditLogic', param, {
207
+ warnMsg: `确定要对当前查询的报表数据进行推送审核吗?`,
208
+ resolveMsg: `提交审核完成!!`,
209
+ rejectMsg: `提交审核失败!!请重试!!`
210
+ }).then((res) => {
211
+ this.pushAuditShow = false
212
+ this.pushAuditData.f_audit_person = ''
213
+ })
214
+ },
215
+ async getAuditor () {
216
+ await this.$MagGetSaleParam.initinputtor()
217
+ console.log('查询到的人员:', await this.$MagGetSaleParam.initinputtor())
218
+ this.auditor = this.$MagGetSaleParam.getAudit(this.$login.f.orgid)
219
+ this.auditor.push({label: '管理员', value: '管理员'})
220
+ console.log('查询到的审核员:', this.auditor)
221
+ },
222
+ cancel () {
223
+ this.pushAuditShow = false
224
+ },
225
+ pushAudit () {
226
+ if (this.model.data === null || this.model.data === ' ') {
227
+ this.$showMessage('请先查询报表再发起审核')
228
+ return
229
+ }
230
+ this.pushAuditShow = true
231
+ },
168
232
  searchData () {
169
233
  this.$refs.paged.$refs.criteria.search()
170
234
  },
@@ -173,31 +237,24 @@ export default {
173
237
  let orgcondition = '1=1'
174
238
  let orgstr = this.orgCondtionStr
175
239
  orgcondition = orgcondition + orgstr
176
- console.log('23231312321:',this.f_user_type)
177
- if(this.f_user_type && this.f_user_type[0]) {
178
- orgcondition += ` and f_user_type = '${ this.f_user_type} '`
240
+ if (this.f_user_type && this.f_user_type[0]) {
241
+ orgcondition += ` and f_user_type = '${this.f_user_type} '`
179
242
  }
180
- /* if (this.f_orgid && this.f_orgid[0]) {
181
- orgcondition += ` and f_orgid in ('${this.f_orgid}')`
182
- }
183
- if (this.f_depid && this.f_depid[0]) {
184
- orgcondition += ` and f_depid in ('${this.f_depid}')`
185
- }
186
- if(this.f_operatorid && this.f_operatorid[0]) {
187
- orgcondition += ` and f_operatorid in ('${this.f_operatorid}')`
188
- }*/
189
243
  this.$refs.paged.$refs.criteria.model.f_orgid = orgcondition
190
244
  this.$refs.paged.search(args)
245
+ this.pushAuditData.startDate = this.model.params.startDate
246
+ this.pushAuditData.endDate = this.model.params.endDate
247
+ this.pushAuditData.condition = orgcondition.replace(/'/g, "''")
191
248
  },
192
249
 
193
- hidden() {
250
+ hidden () {
194
251
  this.criteriaShow = !this.criteriaShow
195
252
  },
196
253
  getRes (condition, obj) {
197
254
  this.orgCondtionStr = condition
198
255
  this.orgname = obj.orgnames[0]
199
256
  this.depname = obj.depnames[0]
200
- console.log(obj,"========")
257
+ console.log(obj, '========')
201
258
  this.operatorname = obj.operatornames[0]
202
259
  },
203
260
  getdep (obj, val) {
@@ -205,35 +262,38 @@ export default {
205
262
  this.userresid = obj
206
263
  this.f_depid = obj
207
264
  },
208
- getuser ( obj, val) {
265
+ getuser (obj, val) {
209
266
  this.operatorname = val[0]
210
267
  this.f_operatorid = obj
211
268
  }
212
269
  },
213
270
  watch: {
214
271
  'model.data' (val) {
215
- let len=0
216
- let a=val.split('</tr>')
217
- for(let i=0;i<a.length;i++){
218
- if(a[i].split('</td>').length-1>len){
219
- len=a[i].split('</td>').length-1
272
+ let len = 0
273
+ let a = val.split('</tr>')
274
+ for (let i = 0; i < a.length; i++) {
275
+ if (a[i].split('</td>').length - 1 > len) {
276
+ len = a[i].split('</td>').length - 1
220
277
  }
221
278
  }
222
279
  this.spans = len
223
280
  }
224
281
  },
225
282
  computed: {
226
- charge_state() {
283
+ charge_state () {
227
284
  return [{label: '全部', value: ''}, ...this.$appdata.getParam('收费状态')]
228
285
  },
229
286
  user_type () {
230
287
  return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
288
+ },
289
+ showAudit () {
290
+ return this.config.hasAudit
231
291
  }
232
292
  }
233
293
  }
234
294
  </script>
235
295
  <style scoped>
236
- .noborder{
296
+ .noborder {
237
297
  border: none;
238
298
  }
239
299
  </style>