manage-client 1.8.23-40 → 1.8.23-41

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.
@@ -7,8 +7,8 @@ var proxyMiddleware = require('http-proxy-middleware')
7
7
  var app = express()
8
8
  var compiler = webpack(config)
9
9
  // var proxy = httpProxy.createProxyServer()
10
-
11
- var str = 'http://112.35.127.105:8300/', str2 = 'http://112.35.127.105:8300/'
10
+ var str = 'http://112.35.127.105:8305/ ', str2 = 'http://112.35.127.105:8305/'
11
+ // var str = 'http://112.35.127.105:8300/', str2 = 'http://112.35.127.105:8300/'
12
12
  var proxyTable = {
13
13
  /*'/rs/logic/exportfile': {
14
14
  target: str2
@@ -60,7 +60,8 @@ var proxyTable = {
60
60
  },*/
61
61
  '/rs/report': {
62
62
  //target: 'http://127.0.0.1:8080/manage'
63
- target: 'http://127.0.0.1:8081'
63
+ // target: 'http://127.0.0.1:8081'
64
+ target: str
64
65
  },
65
66
  '/rs/vue': {
66
67
  // target: 'http://127.0.0.1:8089/manage'
package/package.json CHANGED
@@ -1,12 +1,11 @@
1
1
  {
2
2
  "name": "manage-client",
3
- "version": "1.8.23-40",
3
+ "version": "1.8.23-41",
4
4
  "description": "经营管控模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {
7
7
  "test": "test"
8
8
  },
9
- "dependencies": {},
10
9
  "devDependencies": {
11
10
  "babel-core": "^6.0.0",
12
11
  "babel-loader": "^6.0.0",
@@ -1,181 +1,241 @@
1
- <template>
2
- <div id='app' >
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-inline auto " partial >
6
- <p class="bg-info text-center" style="padding: 8px;">月销售气量表</p>
7
- <div class="flex-row auto" style="justify-content: space-between">
8
- <div class="form-group" v-if="!$parent.$parent.data.f_files_path">
9
- <label for="startDate">开始日期:</label>
10
- <datepicker id="startDate" placeholder="开始日期"
11
- v-model="model.startDate"
12
- :value.sync="model.startDate"
13
- :disabled-days-of-Week="[]"
14
- :format="'yyyy-MM-dd HH:mm:ss'"
15
- :show-reset-button="reset">
16
- </datepicker>
17
- <label for="endDate">结束日期:</label>
18
- <datepicker id="endDate" placeholder="结束日期"
19
- v-model="model.endDate"
20
- :value.sync="model.endDate"
21
- :disabled-days-of-Week="[]"
22
- :format="'yyyy-MM-dd HH:mm:ss'"
23
- :show-reset-button="reset">
24
- </datepicker>
25
- <label for="endDate" class="control-label">组织机构</label>
26
- <right-tree :userid.sync='$parent.$parent.userid' :source.sync='$parent.$parent.source' @re-res="$parent.$parent.getRes"></right-tree>
27
- <button class="btn btn-primary width-100" @click="search()">查询</button>
28
- <!--<button class="btn btn-success width-100" @click="$parent.$parent.confirmReport()">保存报表</button>-->
29
- </div>
30
- <span></span>
31
- <div class="form-group">
32
- <report-print id='gasprice' top='1cm' left='2cm' width='100%' height='100%'></report-print>
33
- <report-excel id='gasprice' ></report-excel>
34
- </div>
35
- </div>
36
- </div>
37
- </criteria>
38
- <div partial='list' v-el:handcollect id='gasprice'>
39
- <table class='tableprint' style="margin: 0px auto" v-if="!$parent.data.f_files_path">
40
- <thead>
41
- <tr>
42
- <th colspan='6' style="font-weight: normal; text-align: left;">
43
- <h3 style="text-align: center">月用气量汇总表</h3>
44
- </th>
45
- </tr>
46
- <tr>
47
- <th colspan='6' style="font-weight: normal; text-align: center;">
48
- 开始时间:{{model.model.startDate}}&nbsp;&nbsp;&nbsp;
49
- 结束时间:{{ model.model.endDate }}&nbsp;&nbsp;&nbsp;
50
- </th>
51
- </tr>
52
- <tr>
53
- <th colspan='6' style="font-weight: normal; text-align: center;">
54
- 组织机构:{{$parent.filialeNameStr}}
55
- </th>
56
- </tr>
57
- </thead>
58
- <tr>
59
- <td colspan='6'>
60
- {{{ model.data.substring(26,model.data.length-8) }}}
61
- </td>
62
- </tr>
63
- <tfoot>
64
- <tr style="text-align: left">
65
- <th colspan='3'>财务审核:</th>
66
- <th colspan='3'>收款审核:</th>
67
- </tr>
68
- </tfoot>
69
- </table>
70
- {{{ $parent.reportStr }}}
71
- </div>
72
- </criteria-paged>
73
- <modal :show.sync="show" v-ref:modal small backdrop="false">
74
- <header slot="modal-header" class="modal-header">
75
- <h4 class="modal-title">输入文件名称</h4>
76
- </header>
77
- <article slot="modal-body" class="modal-body">
78
- <div class="form-group">
79
- <input type="text" class="form-control" v-model="filename" placeholder='保存的文件名'>
80
- </div>
81
- </article>
82
- <footer slot="modal-footer" class="modal-footer">
83
- <button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
84
- <button v-show="show" type="button" class="btn btn-success" @click='confirm(filename)'>确认</button>
85
- </footer>
86
- </modal>
87
-
88
- </div>
89
- </template>
90
- <script>
91
- import { DataModel } from 'vue-client'
92
- import co from 'co'
93
- let saveFile = function * (self) {
94
- // 线验证文件是否重名
95
- let count = yield self.$resetpost('rs/sql/manageSingleTable',
96
- {data: {tablename: 't_report_record', condition: `f_files_name = '${self.filename}'`}},
97
- {resolveMsg: null, rejectMsg: null})
98
- if (count.data.length > 0) {
99
- self.$showAlert('无法保存,文件名重名', 'warning', 3000)
100
- return
101
- }
102
- let saveBack = yield self.$resetpost('rs/logic/saveReport', {f_files_content: self.$refs.paged.$els.handcollect.innerHTML,
103
- f_files_name: self.filename, f_files_type: self.data.f_report_type, f_component_name: 'manage-month-gas',
104
- f_operator: this.$login.f.name, f_query_month: `${self.model.model.startDate}-${self.model.model.endDate}`,
105
- f_outlets: this.$login.f.f_parentname})
106
- if (saveBack.data.status === 'succeed') {
107
- self.show = false
108
- self.filename = ''
109
- // 后台保存完成,通知刷新
110
- self.$dispatch('save-success', self.filename)
111
- }
112
- }
113
- export default {
114
- title: '月用气量汇总表',
115
- props: ['data'],
116
- data () {
117
- return {
118
- model: new DataModel('rs/report/manage_day_sellgas', {startDate: 'this.model.startDate', endDate: 'this.model.endDate',
119
- filialeCodeStr: 'this.model.filialeCodeStr'}),
120
- reportStr: null,
121
- show: false,
122
- filename: '',
123
- filialeNameStr: this.$login.f.orgpathnames,
124
- filialeCodeStr: this.$login.f.orgpathstr,
125
- userid: this.$login.f.id,
126
- source: `tool.getFullTree(this.getRights().where(row.getType() != $zone$).where(row.getType() != $role$))`
127
- }
128
- },
129
- ready () {
130
- if (this.data) {
131
- this.$refs.paged.$refs.criteria.model.startDate = this.$login.toStandardDateString() + ' 00:00:00'
132
- this.$refs.paged.$refs.criteria.model.endDate = this.$login.toStandardDateString() + ' 23:59:59'
133
- }
134
- this.$refs.paged.$refs.criteria.search()
135
- },
136
- methods: {
137
- selfSearch (args) {
138
- this.$refs.paged.$refs.criteria.model.filialeCodeStr = this.filialeCodeStr[0]
139
- this.$refs.paged.search(args)
140
- },
141
- getRes(obj) {
142
- console.log(obj, '组织')
143
- this.filialeNameStr = obj.res
144
- this.filialeCodeStr = obj.resids
145
- },
146
- // 根据文件路径获取储存的报表内容
147
- getFileContent (path) {
148
- this.$resetpost('rs/logic/getReportFileContent', {f_files_path: path}, {resolveMsg: null, rejectMsg: null}).then((res) => {
149
- this.reportStr = res.data.filecontent
150
- this.model.state = '正确'
151
- })
152
- },
153
- confirm () {
154
- if (!this.filename || this.filename === '') {
155
- this.$showAlert('无法保存,文件名不能为空', 'warning', 3000)
156
- }
157
- let saveGen = saveFile(this)
158
- co(saveGen)
159
- },
160
- close () {
161
- this.show = false
162
- },
163
- // 将报表保存成文件
164
- confirmReport () {
165
- this.show = true
166
- this.filename = this.data.f_report_name + this.$login.toStandardDateString()
167
- }
168
- },
169
- watch: {
170
- 'data' (val) {
171
- if (val.f_files_path) {
172
- this.getFileContent(val.f_files_path)
173
- } else {
174
- this.reportStr = null
175
- }
176
- }
177
- },
178
- computed: {
179
- }
180
- }
181
- </script>
1
+ <template>
2
+ <div id='app' >
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-inline auto " partial >
6
+ <p class="bg-info text-center" style="padding: 8px;">月销售气量表</p>
7
+ <div class="flex-row auto" style="justify-content: space-between">
8
+ <div class="form-group" v-if="!$parent.$parent.data.f_files_path">
9
+ <label for="startDate">开始日期:</label>
10
+ <datepicker id="startDate" placeholder="开始日期"
11
+ v-model="model.startDate"
12
+ :value.sync="model.startDate"
13
+ :disabled-days-of-Week="[]"
14
+ :format="'yyyy-MM-dd HH:mm:ss'"
15
+ :show-reset-button="reset">
16
+ </datepicker>
17
+ <label for="endDate">结束日期:</label>
18
+ <datepicker id="endDate" placeholder="结束日期"
19
+ v-model="model.endDate"
20
+ :value.sync="model.endDate"
21
+ :disabled-days-of-Week="[]"
22
+ :format="'yyyy-MM-dd HH:mm:ss'"
23
+ :show-reset-button="reset">
24
+ </datepicker>
25
+ <button class="btn btn-primary width-100" @click="search()">查询</button>
26
+ <!--<button class="btn btn-success width-100" @click="$parent.$parent.confirmReport()">保存报表</button>-->
27
+ </div>
28
+ <span></span>
29
+ <div class="form-group">
30
+ <report-print id='gasprice' top='1cm' left='2cm' width='100%' height='100%'></report-print>
31
+ <report-excel id='gasprice' ></report-excel>
32
+ </div>
33
+ </div>
34
+ <div class="row">
35
+ <div class="col-sm-4">
36
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;公司&nbsp;&nbsp;&nbsp; </label>
37
+ <right-tree @re-res="$parent.$parent.getRes"></right-tree>
38
+ </div>
39
+ <div class="col-sm-4">
40
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;部门&nbsp;&nbsp;&nbsp; </label>
41
+ <res-select restype='department'
42
+ is-mul="false"
43
+ @res-select="$parent.$parent.getdep"
44
+ :parentresid="$parent.$parent.depresid"
45
+ :initresid='$parent.$parent.depid'>
46
+ </res-select>
47
+
48
+ </div>
49
+ <div class="col-sm-4">
50
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;人员&nbsp;&nbsp;&nbsp; </label>
51
+ <res-select restype='user'
52
+ is-mul="false"
53
+ @res-select="$parent.$parent.getuser"
54
+ :parentresid="$parent.$parent.userresid"
55
+ :initresid='$parent.$parent.operatorid'>
56
+ </res-select>
57
+ </div>
58
+ </div>
59
+ </div>
60
+ </criteria>
61
+ <div partial='list' v-el:handcollect id='gasprice'>
62
+ <table class='tableprint' style="margin: 0px auto" v-if="!$parent.data.f_files_path">
63
+ <thead>
64
+ <tr>
65
+ <th colspan='6' style="font-weight: normal; text-align: left;">
66
+ <h3 style="text-align: center">月用气量汇总表</h3>
67
+ </th>
68
+ </tr>
69
+ <tr>
70
+ <th colspan='6' style="font-weight: normal; text-align: center;">
71
+ 开始时间:{{model.model.startDate}}&nbsp;&nbsp;&nbsp;
72
+ 结束时间:{{ model.model.endDate }}&nbsp;&nbsp;&nbsp;
73
+ </th>
74
+ </tr>
75
+ <tr>
76
+ <th colspan='9' style="font-weight: normal; text-align: center;">
77
+ <div>
78
+ <span v-show="$parent.orgname.trim()!=''">公司:{{$parent.orgname}}</span>
79
+ <span v-show="$parent.depname.trim()!=''"> 部门:{{$parent.depname}}</span>
80
+ <span v-show="$parent.operatorname.trim()!=''">人员:{{$parent.operatorname}}</span>
81
+ </div>
82
+ </th>
83
+ </tr>
84
+ </thead>
85
+ <tr>
86
+ <td colspan='6'>
87
+ {{{ model.data.substring(26,model.data.length-8) }}}
88
+ </td>
89
+ </tr>
90
+ <tfoot>
91
+ <tr style="text-align: left">
92
+ <th colspan='3'>财务审核:</th>
93
+ <th colspan='3'>收款审核:</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
+
115
+ </div>
116
+ </template>
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-month-gas',
131
+ f_operator: this.$login.f.name, f_query_month: `${self.model.model.startDate}-${self.model.model.endDate}`,
132
+ f_outlets: this.$login.f.f_parentname})
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
+ model: new DataModel('rs/report/manage_day_sellgas', {startDate: 'this.model.startDate', endDate: 'this.model.endDate',
146
+ filialeCodeStr: 'this.model.filialeCodeStr'}),
147
+ reportStr: null,
148
+ show: false,
149
+ filename: '',
150
+ depresid: [],
151
+ userresid: [],
152
+ f_orgid: this.$login.f.orgid,
153
+ f_depid: this.$login.f.depids,
154
+ f_operatorid: this.$login.f.id,
155
+ operatorid: [],
156
+ depid: [],
157
+ orgname: '',
158
+ depname: '',
159
+ operatorname: '',
160
+ filialeNameStr: this.$login.f.orgpathnames,
161
+ filialeCodeStr: 'and f_orgid =' + this.$login.f.orgid,
162
+ userid: this.$login.f.id,
163
+ source: `tool.getFullTree(this.getRights().where(row.getType() != $zone$).where(row.getType() != $role$))`
164
+ }
165
+ },
166
+ ready () {
167
+ if (this.data) {
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
+ }
171
+ this.$refs.paged.$refs.criteria.search()
172
+ },
173
+ methods: {
174
+ selfSearch (args) {
175
+ let orgcondition = 'and f_orgid = ' + this.f_orgid
176
+ if (this.f_depid[0]) {
177
+ orgcondition += ' and f_depid = ' + this.f_depid
178
+ }
179
+ if(this.f_operatorid[0]) {
180
+ orgcondition += ' and f_operatorid = ' + this.f_operatorid
181
+ }
182
+ this.$refs.paged.$refs.criteria.model.filialeCodeStr = orgcondition
183
+ this.$refs.paged.search(args)
184
+ },
185
+ // getRes(obj) {
186
+ // console.log(obj, '组织')
187
+ // this.filialeNameStr = obj.res
188
+ // this.filialeCodeStr = obj.resids
189
+ // },
190
+ getRes(obj,val) {
191
+ debugger
192
+ this.filialeCodeStr = obj
193
+ this.orgname = obj.res[0]
194
+ this.depresid = obj.resids
195
+ this.f_orgid = obj.resids
196
+ },
197
+ getdep (obj, val) {
198
+ this.depname = val[0]
199
+ this.userresid = obj
200
+ this.f_depid = obj
201
+ },
202
+ getuser ( obj, val) {
203
+ this.operatorname = val[0]
204
+ this.f_operatorid = obj
205
+ },
206
+ // 根据文件路径获取储存的报表内容
207
+ getFileContent (path) {
208
+ this.$resetpost('rs/logic/getReportFileContent', {f_files_path: path}, {resolveMsg: null, rejectMsg: null}).then((res) => {
209
+ this.reportStr = res.data.filecontent
210
+ this.model.state = '正确'
211
+ })
212
+ },
213
+ confirm () {
214
+ if (!this.filename || this.filename === '') {
215
+ this.$showAlert('无法保存,文件名不能为空', 'warning', 3000)
216
+ }
217
+ let saveGen = saveFile(this)
218
+ co(saveGen)
219
+ },
220
+ close () {
221
+ this.show = false
222
+ },
223
+ // 将报表保存成文件
224
+ confirmReport () {
225
+ this.show = true
226
+ this.filename = this.data.f_report_name + this.$login.toStandardDateString()
227
+ }
228
+ },
229
+ watch: {
230
+ 'data' (val) {
231
+ if (val.f_files_path) {
232
+ this.getFileContent(val.f_files_path)
233
+ } else {
234
+ this.reportStr = null
235
+ }
236
+ }
237
+ },
238
+ computed: {
239
+ }
240
+ }
241
+ </script>