sale-client 3.5.32 → 3.5.33

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,161 +1,161 @@
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://117.33.181.102:8400/', bendi1 = 'http://121.36.106.17:8400/'
14
- // 公司测试服务
15
- var fuwu = 'http://117.33.181.102:8400/'
16
- // var fuwu = 'http://121.36.106.17:8400/'
17
- // 铜川正式
18
- // var fuwu = 'http://61.134.55.234:9999/'
19
- // 铜川测试
20
- // var fuwu = 'http://61.134.55.234:9999/'
21
- // var fuwu = 'http://60.222.250.39:8300/'
22
- // 韶关
23
- // var fuwu = 'http://119.146.1.106:8300/'
24
- // 巩义测试服务
25
- // var fuwu = 'http://192.168.0.227:8400'
26
- // 燎原测试服务
27
- // var fuwu = 'http://121.41.19.238:8400 '
28
- // var fuwu = 'http://121.41.19.238:9001/'
29
-
30
- // var fuwu = 'http://139.214.92.34:8301/'
31
-
32
- var proxyTable = {
33
- '/rs/logic/saleExport': {
34
- target: fuwu
35
- },
36
- '/rs/logic/saleGetExportProgress': {
37
- target: fuwu
38
- },
39
- '/files': {
40
- target: fuwu
41
- },
42
- // 查找资源服务数据
43
- '/rs/search': {
44
- target: fuwu
45
- },
46
- // 查找资源服务数据
47
- '/rs/logic/getLogin': {
48
- target: fuwu
49
- },
50
- // 查找资源服务数据
51
- '/rs/logic/getInitData': {
52
- target: fuwu
53
- },
54
- '/rs/logic/getSaleInitData': {
55
- target: fuwu
56
- },
57
- '/invoice': {
58
- target: fuwu
59
- },
60
- // 用户登录服务地址
61
- '/rs/user': {
62
- target: fuwu
63
- },
64
- '/rs/path/getParams': {
65
- target: fuwu
66
- },
67
- '/rs/data': {
68
- target: fuwu
69
- },
70
- '/rs/license': {
71
- target: fuwu
72
- },
73
- '/rs/db': {
74
- target: fuwu
75
- },
76
- '/excel': {
77
- target: fuwu
78
- },
79
- '/rs/config': {
80
- target: fuwu
81
- },
82
- '/rs/sql/getLicenseById': {
83
- target: fuwu
84
- },
85
- '/rs/sql/manage_getarealist': {
86
- target: fuwu
87
- },
88
- '/rs/sql/manage_getstreetlist': {
89
- target: fuwu
90
- },
91
- '/rs/report': {
92
- target: 'http://121.36.106.17:8400/'
93
- },
94
- '/rs/vue': {
95
- target: fuwu
96
- },
97
- '/webmeter': {
98
- target: 'http://192.168.50.4:8450'
99
- },
100
- '/rs': {
101
- // target: 'http://192.168.30.63:8081/'
102
- // target: 'http://121.36.106.17:8400/'
103
- target: bendi
104
- }
105
- }
106
-
107
- var devMiddleware = require('webpack-dev-middleware')(compiler, {
108
- publicPath: config.output.publicPath,
109
- stats: {
110
- colors: true,
111
- chunks: false
112
- }
113
- })
114
-
115
- var hotMiddleware = require('webpack-hot-middleware')(compiler)
116
- // force page reload when html-webpack-plugin template changes
117
- compiler.plugin('compilation', function (compilation) {
118
- compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
119
- hotMiddleware.publish({action: 'reload'})
120
- cb()
121
- })
122
- })
123
-
124
- // proxy api requests
125
- Object.keys(proxyTable).forEach(function (context) {
126
- var options = proxyTable[context]
127
- if (typeof options === 'string') {
128
- options = {target: options}
129
- }
130
- app.use(proxyMiddleware(context, options))
131
- })
132
-
133
- // handle fallback for HTML5 history API
134
- app.use(require('connect-history-api-fallback')())
135
- // app.use(function (req, res, next) {
136
- // res.header('Access-Control-Allow-Origin', '*')
137
- // res.header('Access-Control-Allow-Headers', 'X-Requested-With')
138
- // res.header('Access-Control-Allow-Methods', 'PUT, POST, GET,DELETE, OPTIONS')
139
- // res.header('X-Powered-By', '3,2,1')
140
- // res.header('Access-Control-Allow-Credentials', 'true')
141
- // res.header('Content-Type', 'application/json;charset=utf-8')
142
- // next()
143
- // })
144
-
145
- // serve webpack bundle output
146
- app.use(devMiddleware)
147
-
148
- // enable hot-reload and state-preserving
149
- // compilation error display
150
- app.use(hotMiddleware)
151
-
152
- // serve pure static assets
153
- app.use('/static', express.static('./static'))
154
-
155
- module.exports = app.listen(8089, function (err) {
156
- if (err) {
157
- console.log(err)
158
- return
159
- }
160
- console.log('Listening at http://localhost:8089')
161
- })
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:8080', bendi1 = 'http://121.36.106.17:8400/'
14
+ // 公司测试服务
15
+ var fuwu = 'http://192.168.50.4:8400'
16
+ // var fuwu = 'http://121.36.106.17:8400/'
17
+ // 铜川正式
18
+ // var fuwu = 'http://61.134.55.234:9999/'
19
+ // 铜川测试
20
+ // var fuwu = 'http://61.134.55.234:9999/'
21
+ // var fuwu = 'http://60.222.250.39:8300/'
22
+ // 韶关
23
+ // var fuwu = 'http://119.146.1.106:8300/'
24
+ // 巩义测试服务
25
+ // var fuwu = 'http://192.168.0.227:8400'
26
+ // 燎原测试服务
27
+ // var fuwu = 'http://121.41.19.238:8400 '
28
+ // var fuwu = 'http://121.41.19.238:9001/'
29
+
30
+ // var fuwu = 'http://139.214.92.34:8301/'
31
+
32
+ var proxyTable = {
33
+ '/rs/logic/saleExport': {
34
+ target: fuwu
35
+ },
36
+ '/rs/logic/saleGetExportProgress': {
37
+ target: fuwu
38
+ },
39
+ '/files': {
40
+ target: fuwu
41
+ },
42
+ // 查找资源服务数据
43
+ '/rs/search': {
44
+ target: fuwu
45
+ },
46
+ // 查找资源服务数据
47
+ '/rs/logic/getLogin': {
48
+ target: fuwu
49
+ },
50
+ // 查找资源服务数据
51
+ '/rs/logic/getInitData': {
52
+ target: fuwu
53
+ },
54
+ '/rs/logic/getSaleInitData': {
55
+ target: fuwu
56
+ },
57
+ '/invoice': {
58
+ target: fuwu
59
+ },
60
+ // 用户登录服务地址
61
+ '/rs/user': {
62
+ target: fuwu
63
+ },
64
+ '/rs/path/getParams': {
65
+ target: fuwu
66
+ },
67
+ '/rs/data': {
68
+ target: fuwu
69
+ },
70
+ '/rs/license': {
71
+ target: fuwu
72
+ },
73
+ '/rs/db': {
74
+ target: fuwu
75
+ },
76
+ '/excel': {
77
+ target: fuwu
78
+ },
79
+ '/rs/config': {
80
+ target: fuwu
81
+ },
82
+ '/rs/sql/getLicenseById': {
83
+ target: fuwu
84
+ },
85
+ '/rs/sql/manage_getarealist': {
86
+ target: fuwu
87
+ },
88
+ '/rs/sql/manage_getstreetlist': {
89
+ target: fuwu
90
+ },
91
+ '/rs/report': {
92
+ target: 'http://121.36.106.17:8400/'
93
+ },
94
+ '/rs/vue': {
95
+ target: fuwu
96
+ },
97
+ '/webmeter': {
98
+ target: 'http://192.168.50.4:8450'
99
+ },
100
+ '/rs': {
101
+ // target: 'http://192.168.30.63:8081/'
102
+ // target: 'http://121.36.106.17:8400/'
103
+ target: bendi
104
+ }
105
+ }
106
+
107
+ var devMiddleware = require('webpack-dev-middleware')(compiler, {
108
+ publicPath: config.output.publicPath,
109
+ stats: {
110
+ colors: true,
111
+ chunks: false
112
+ }
113
+ })
114
+
115
+ var hotMiddleware = require('webpack-hot-middleware')(compiler)
116
+ // force page reload when html-webpack-plugin template changes
117
+ compiler.plugin('compilation', function (compilation) {
118
+ compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
119
+ hotMiddleware.publish({action: 'reload'})
120
+ cb()
121
+ })
122
+ })
123
+
124
+ // proxy api requests
125
+ Object.keys(proxyTable).forEach(function (context) {
126
+ var options = proxyTable[context]
127
+ if (typeof options === 'string') {
128
+ options = {target: options}
129
+ }
130
+ app.use(proxyMiddleware(context, options))
131
+ })
132
+
133
+ // handle fallback for HTML5 history API
134
+ app.use(require('connect-history-api-fallback')())
135
+ // app.use(function (req, res, next) {
136
+ // res.header('Access-Control-Allow-Origin', '*')
137
+ // res.header('Access-Control-Allow-Headers', 'X-Requested-With')
138
+ // res.header('Access-Control-Allow-Methods', 'PUT, POST, GET,DELETE, OPTIONS')
139
+ // res.header('X-Powered-By', '3,2,1')
140
+ // res.header('Access-Control-Allow-Credentials', 'true')
141
+ // res.header('Content-Type', 'application/json;charset=utf-8')
142
+ // next()
143
+ // })
144
+
145
+ // serve webpack bundle output
146
+ app.use(devMiddleware)
147
+
148
+ // enable hot-reload and state-preserving
149
+ // compilation error display
150
+ app.use(hotMiddleware)
151
+
152
+ // serve pure static assets
153
+ app.use('/static', express.static('./static'))
154
+
155
+ module.exports = app.listen(8089, function (err) {
156
+ if (err) {
157
+ console.log(err)
158
+ return
159
+ }
160
+ console.log('Listening at http://localhost:8089')
161
+ })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.5.32",
3
+ "version": "3.5.33",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -373,7 +373,7 @@
373
373
  let res = await this.$resetpost('rs/sql/singleTable_OrderBy', {data: {orderitem: 'f_userinfo_id',
374
374
  items: '*',
375
375
  tablename: 't_user_address',
376
- condition: 'f_userinfo_id = ' + this.row.f_userinfo_id}})
376
+ condition: 'f_userinfo_id = ' + this.row.f_userinfo_id}},{resolveMsg: null,rejectMsg: null})
377
377
  console.log('=============', res.data[0])
378
378
  let data = {
379
379
  f_pcd: res.data[0].f_pcd,
@@ -244,6 +244,12 @@ let overChargeGen = async function (self) {
244
244
  self.$dispatch('success')
245
245
  }
246
246
  } catch (error) {
247
+ console.log('捕获到异常', error)
248
+ if (error instanceof Object) {
249
+ self.$showAlert(error.data, 'danger', 0)
250
+ } else {
251
+ self.$showAlert(error, 'danger', 0)
252
+ }
247
253
  self.$showAlert(error, 'danger', 0)
248
254
  self.$dispatch('refresh')
249
255
  }
@@ -74,6 +74,16 @@
74
74
  >
75
75
  </v-select>
76
76
  </div>
77
+ <div class="form-group col-sm-3">
78
+ <label class="font_normal_body">小区名称</label>
79
+ <v-select :value.sync="model.f_residential_area_id" v-model="model.f_residential_area_id"
80
+ :options='$parent.$parent.areaList' placeholder='小区名称'
81
+ close-on-select @select-search="$parent.$parent.getAreaList"
82
+ condition="f_residential_area_id = '{}'"
83
+ style="width: 60%"
84
+ >
85
+ </v-select>
86
+ </div>
77
87
  </div>
78
88
  </div>
79
89
  </criteria>
@@ -216,7 +226,7 @@
216
226
  model: new PagedList('rs/sql/getGasUser', 20, {}),
217
227
  condition: '',
218
228
  criteriaShow2: false,
219
- gasproperties1:[],
229
+ gasproperties1: [],
220
230
  getfield: {},
221
231
  show: false,
222
232
  gasproperties: [],
@@ -228,18 +238,19 @@
228
238
  pricename: '',
229
239
  f_comments: ''
230
240
  },
231
- oldinfo:{
232
- f_user_type:'',
233
- f_gasproperties:'',
234
- f_price_type:'',
235
- f_price_name:'',
236
- f_price_id:'',
237
- f_stairprice_id:''
241
+ oldinfo: {
242
+ f_user_type: '',
243
+ f_gasproperties: '',
244
+ f_price_type: '',
245
+ f_price_name: '',
246
+ f_price_id: '',
247
+ f_stairprice_id: ''
238
248
  },
239
- gongyetype: this.$appdata.getParam('用气类别')?[{label: '全部', value: ''}, ...this.$appdata.getParam('用气类别')] : [],
249
+ areaList: [],
250
+ gongyetype: this.$appdata.getParam('用气类别') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('用气类别')] : [],
240
251
  usertypes: this.$appdata.getParam('用户类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')] : [],
241
252
  pricetypes: this.$appdata.getParam('气价类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('气价类型')] : [],
242
- meters: this.$appdata.getParam('气表类型') ? [{label: '全部',value: ''}, ...this.$appdata.getParam('气表类型')] : [],
253
+ meters: this.$appdata.getParam('气表类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')] : [],
243
254
  adjustpricereasons: this.$appdata.getParam('批量调价原因'),
244
255
  config: {
245
256
  excelHeaders: {
@@ -258,8 +269,33 @@
258
269
  this.search()
259
270
  this.getfield = this.config.excelHeaders
260
271
  loadParamGem(this)
272
+ this.getAreaList()
261
273
  },
262
274
  methods: {
275
+ getAreaList (searchText) {
276
+ let condition = ' 1 = 1 '
277
+ if (searchText) {
278
+ condition = ` f_residential_area like '%${searchText}%' `
279
+ }
280
+ let HttpReset = new HttpResetClass()
281
+ HttpReset.load('POST', 'rs/sql/saleSingleTable?pageNo=1&pageSize=100', {
282
+ data: {
283
+ items: 'f_residential_area, id',
284
+ tablename: 't_area',
285
+ orderitem: 'id desc',
286
+ condition: condition
287
+ }
288
+ }, {resolveMsg: null, rejectMsg: '获取小区信息失败!'}).then((req) => {
289
+ let redata = []
290
+ req.data.forEach((row, n) => {
291
+ redata[n] = {
292
+ label: row.f_residential_area,
293
+ value: row.id
294
+ }
295
+ })
296
+ this.areaList = [{label: '全部', value: ''}, ...redata]
297
+ })
298
+ },
263
299
  userTypeChange1 () {
264
300
  this.gasproperties1 = []
265
301
  if (this.$refs.paged.$refs.criteria.model !== null) {
@@ -304,7 +340,7 @@
304
340
  condition: condition,
305
341
  fileuploadid: fileuploadid
306
342
  }
307
- if(this.priceid){
343
+ if (this.priceid) {
308
344
  if (this.newinfo.pricename[0].f_price_id == this.model.rows[0].f_price_id) {
309
345
  this.$showMessage('选择的气价和当前气价相同, 请重新选择')
310
346
  return
@@ -318,9 +354,8 @@
318
354
  param.f_stairprice_id_old = this.model.rows[0].f_stairprice_id
319
355
  let res = await this.$resetpost('rs/logic/pricechangeall', {data: param}, {resolveMsg: '更新成功', rejectMsg: '更新失败'})
320
356
  this.$showMessage(`成功批量修改了${res.data}位用户的气价`)
321
-
322
- }else{
323
- param.oldinfo=this.param
357
+ } else {
358
+ param.oldinfo = this.param
324
359
  let res = await this.$resetpost('rs/logic/pricechangebatch', {data: param}, {resolveMsg: '更新成功', rejectMsg: '更新失败'})
325
360
  this.$showMessage(`成功批量修改了${res.data}位用户的气价`)
326
361
  }
@@ -338,47 +373,45 @@
338
373
  this.$refs.paged.$refs.criteria.search()
339
374
  },
340
375
  changeprice () {
341
- let rowdata = this.$refs.paged.$refs.grid.getRowData().length>0? this.$refs.paged.$refs.grid.getRowData():this.model.rows
342
- if(this.priceid && this.model.rows.length>0){
343
- this.oldinfo = {
344
- f_user_type : this.model.rows[0].f_user_type,
345
- f_gasproperties : this.model.rows[0].f_gasproperties,
346
- f_price_type : this.model.rows[0].f_price_type,
347
- f_price_name : this.model.rows[0].f_price_name,
348
- f_price_id : this.model.rows[0].f_price_id,
349
- f_stairprice_id : this.model.rows[0].f_stairprice_id
350
- }
351
- } else
352
- {
353
- this.oldinfo={
354
- f_user_type : rowdata[0].f_user_type,
355
- f_gasproperties : rowdata[0].f_gasproperties,
356
- f_price_type : rowdata[0].f_price_type,
357
- f_price_name : rowdata[0].f_price_name
358
- }
359
- for ( var i = 1 ; i < rowdata.length ; i++ ) {
360
- if (rowdata[i].f_user_type !== rowdata[i-1].f_user_type) {
376
+ let rowdata = this.$refs.paged.$refs.grid.getRowData().length > 0 ? this.$refs.paged.$refs.grid.getRowData() : this.model.rows
377
+ if (this.priceid && this.model.rows.length > 0) {
378
+ this.oldinfo = {
379
+ f_user_type: this.model.rows[0].f_user_type,
380
+ f_gasproperties: this.model.rows[0].f_gasproperties,
381
+ f_price_type: this.model.rows[0].f_price_type,
382
+ f_price_name: this.model.rows[0].f_price_name,
383
+ f_price_id: this.model.rows[0].f_price_id,
384
+ f_stairprice_id: this.model.rows[0].f_stairprice_id
385
+ }
386
+ } else {
387
+ this.oldinfo = {
388
+ f_user_type: rowdata[0].f_user_type,
389
+ f_gasproperties: rowdata[0].f_gasproperties,
390
+ f_price_type: rowdata[0].f_price_type,
391
+ f_price_name: rowdata[0].f_price_name
392
+ }
393
+ for (var i = 1; i < rowdata.length; i++) {
394
+ if (rowdata[i].f_user_type !== rowdata[i - 1].f_user_type) {
361
395
  this.oldinfo.f_user_type = ''
362
396
  }
363
- if (rowdata[i].f_gasproperties !== rowdata[i-1].f_gasproperties) {
397
+ if (rowdata[i].f_gasproperties !== rowdata[i - 1].f_gasproperties) {
364
398
  this.oldinfo.f_gasproperties = ''
365
399
  }
366
- if (rowdata[i].f_price_type !== rowdata[i-1].f_price_type) {
400
+ if (rowdata[i].f_price_type !== rowdata[i - 1].f_price_type) {
367
401
  this.oldinfo.f_price_type = ''
368
402
  }
369
- if (rowdata[i].f_price_name != rowdata[i-1].f_price_name) {
403
+ if (rowdata[i].f_price_name != rowdata[i - 1].f_price_name) {
370
404
  this.oldinfo.f_price_name = ''
371
405
  }
372
406
  }
373
-
374
407
  }
375
408
  this.show = true
376
409
  },
377
410
  selfSearch (args) {
378
411
  this.$refs.paged.$refs.grid.selectInit()
379
- if(this.priceid){
412
+ if (this.priceid) {
380
413
  args.condition = `${args.condition} and f_price_id = '${this.priceid}'`
381
- }else{
414
+ } else {
382
415
  args.condition = `${args.condition} and f_orgid = '${this.$login.f.orgid}'`
383
416
  }
384
417
  this.condition = args.condition