sale-client 3.5.35 → 3.5.37

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,170 @@
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
- })
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://39.108.82.124:8400/', bendi1 = 'http://121.36.106.17:8400/'
14
+ // 公司测试服务
15
+ var fuwu = 'http://39.108.82.124: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
+ '/rs/sql/getAllDefaultValues': {
47
+ target: 'http://127.0.0.1:8080'
48
+ },
49
+ '/rs/sql/getAllDefaultRecord': {
50
+ target: 'http://127.0.0.1:8080'
51
+ },
52
+ '/rs/logic/setDefaultValue': {
53
+ target: 'http://127.0.0.1:8080'
54
+ },
55
+ // 查找资源服务数据
56
+ '/rs/logic/getLogin': {
57
+ target: fuwu
58
+ },
59
+ // 查找资源服务数据
60
+ '/rs/logic/getInitData': {
61
+ target: fuwu
62
+ },
63
+ '/rs/logic/getSaleInitData': {
64
+ target: fuwu
65
+ },
66
+ '/invoice': {
67
+ target: fuwu
68
+ },
69
+ // 用户登录服务地址
70
+ '/rs/user': {
71
+ target: fuwu
72
+ },
73
+ '/rs/path/getParams': {
74
+ target: fuwu
75
+ },
76
+ '/rs/data': {
77
+ target: fuwu
78
+ },
79
+ '/rs/license': {
80
+ target: fuwu
81
+ },
82
+ '/rs/db': {
83
+ target: fuwu
84
+ },
85
+ '/excel': {
86
+ target: fuwu
87
+ },
88
+ '/rs/config': {
89
+ target: fuwu
90
+ },
91
+ '/rs/sql/getLicenseById': {
92
+ target: fuwu
93
+ },
94
+ '/rs/sql/manage_getarealist': {
95
+ target: fuwu
96
+ },
97
+ '/rs/sql/manage_getstreetlist': {
98
+ target: fuwu
99
+ },
100
+ '/rs/report': {
101
+ target: fuwu
102
+ },
103
+ '/rs/vue': {
104
+ target: fuwu
105
+ },
106
+ '/webmeter': {
107
+ target: fuwu
108
+ },
109
+ '/rs': {
110
+ // target: 'http://192.168.30.63:8081/'
111
+ // target: 'http://121.36.106.17:8400/'
112
+ target: bendi
113
+ }
114
+ }
115
+
116
+ var devMiddleware = require('webpack-dev-middleware')(compiler, {
117
+ publicPath: config.output.publicPath,
118
+ stats: {
119
+ colors: true,
120
+ chunks: false
121
+ }
122
+ })
123
+
124
+ var hotMiddleware = require('webpack-hot-middleware')(compiler)
125
+ // force page reload when html-webpack-plugin template changes
126
+ compiler.plugin('compilation', function (compilation) {
127
+ compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
128
+ hotMiddleware.publish({action: 'reload'})
129
+ cb()
130
+ })
131
+ })
132
+
133
+ // proxy api requests
134
+ Object.keys(proxyTable).forEach(function (context) {
135
+ var options = proxyTable[context]
136
+ if (typeof options === 'string') {
137
+ options = {target: options}
138
+ }
139
+ app.use(proxyMiddleware(context, options))
140
+ })
141
+
142
+ // handle fallback for HTML5 history API
143
+ app.use(require('connect-history-api-fallback')())
144
+ // app.use(function (req, res, next) {
145
+ // res.header('Access-Control-Allow-Origin', '*')
146
+ // res.header('Access-Control-Allow-Headers', 'X-Requested-With')
147
+ // res.header('Access-Control-Allow-Methods', 'PUT, POST, GET,DELETE, OPTIONS')
148
+ // res.header('X-Powered-By', '3,2,1')
149
+ // res.header('Access-Control-Allow-Credentials', 'true')
150
+ // res.header('Content-Type', 'application/json;charset=utf-8')
151
+ // next()
152
+ // })
153
+
154
+ // serve webpack bundle output
155
+ app.use(devMiddleware)
156
+
157
+ // enable hot-reload and state-preserving
158
+ // compilation error display
159
+ app.use(hotMiddleware)
160
+
161
+ // serve pure static assets
162
+ app.use('/static', express.static('./static'))
163
+
164
+ module.exports = app.listen(8089, function (err) {
165
+ if (err) {
166
+ console.log(err)
167
+ return
168
+ }
169
+ console.log('Listening at http://localhost:8089')
170
+ })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.5.35",
3
+ "version": "3.5.37",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -0,0 +1,115 @@
1
+ <template>
2
+ <div class="binary-left" style="width:24% ;text-align:center;align-content: center;">
3
+ <div class="row">
4
+ <div v-for="data in newmeterinfo" style="height: auto">
5
+ <ul class="nav nav-tabs col-sm-12" >
6
+ <li class="active"><a>{{data.name}}</a></li>
7
+ </ul>
8
+ <div class="col-sm-12" style="height: auto" v-for="param in data.params">
9
+ {{param.name}}:{{row[param.title]}}
10
+ </div>
11
+ </div>
12
+ </div>
13
+ </div>
14
+ <div class="binary-right" style="width:74%;overflow-y: auto;max-height:1000px;">
15
+ <div class="row list_area table_sy">
16
+ <table class="table table-bordered table-striped table-hover" id="table1" >
17
+ <thead>
18
+ <th style="text-align:center"><nobr>操作</nobr></th>
19
+ <th style="text-align:center"><nobr>指令发送状态</nobr></th>
20
+ <!-- <th style="text-align:center"><nobr>客户类型</nobr></th>-->
21
+ <!-- <th style="text-align:center"><nobr>气表品牌</nobr></th>-->
22
+ </thead>
23
+ <tbody>
24
+ <tr v-for="row in history">
25
+ <td><nobr>{{row.msg}}</nobr></td>
26
+ <td><nobr>{{row.f_instruct_state}}</nobr></td>
27
+ <!-- <td><nobr>{{row.f_user_type}}</nobr></td>-->
28
+ <!-- <td><nobr>{{row.f_meter_brand}}</nobr></td>-->
29
+ </tr>
30
+ </tbody>
31
+ </table>
32
+ </div>
33
+ </div>
34
+ </template>
35
+
36
+
37
+ <script>
38
+ import {PagedList} from 'vue-client'
39
+
40
+ export default {
41
+ title: '表计信息修改',
42
+ props: ['user', 'checked1', 'gasbrandid'],
43
+
44
+ data () {
45
+ return {
46
+ newmeterinfo: [{}],
47
+ history: [],
48
+ row: {},
49
+ gasbrand: null
50
+ }
51
+ },
52
+ ready () {
53
+
54
+ },
55
+ watch: {
56
+ 'user': {
57
+ handler: async function (val) {
58
+ this.history = []
59
+ if (val.length === 1) {
60
+ await this.$resetpost('rs/sql/getIotParams', {data: {t_userfiles_id: val[0].f_userfiles_id}}, {resolveMsg: null, rejectMsg: null}).then((rat) => {
61
+ this.row = {}
62
+ console.log('=============', rat.data)
63
+ this.row.forceSafeCheckUsedDayCount = 0
64
+ this.row.currStairUsedGasCount = 0
65
+ this.row.forceScrapUsedDayCount = 0
66
+ this.row.isForceSrape = '1'
67
+ if (rat.data.length > 0) {
68
+ rat.data.forEach((item) => {
69
+ if(item.f_param_value === '1'){
70
+ item.f_param_value = '开'
71
+ }
72
+ if(item.f_param_value === '0'){
73
+ item.f_param_value = '关'
74
+ }
75
+ this.row[item.f_param_lname] = item.f_param_value
76
+ })
77
+ // let param = JSON.parse(rat.data[0].f_data)
78
+ // console.log(param)
79
+ // this.row= param
80
+ }
81
+ })
82
+ await this.$resetpost('rs/sql/getParamInstruct', {data: {condition: `i.f_userfiles_id='${val[0].f_userfiles_id}'` }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
83
+ this.history = res.data
84
+ })
85
+ }
86
+ if (this.gasbrandid[0]) {
87
+ await this.refreshParam(this.gasbrandid[0])
88
+ }
89
+ },
90
+ deep: true
91
+
92
+ }
93
+ },
94
+ methods: {
95
+ close () {
96
+ this.$dispatch('close')
97
+ },
98
+ async refreshParam (val) {
99
+ this.newmeterinfo = [{}]
100
+ try {
101
+ let res = await this.$resetpost('/webmeter/rs/logic/getParamsByGasBrand', {data: {gasBrandId: val}}, {resolveMsg: null, rejectMsg: null})
102
+ this.newmeterinfo = res.data
103
+ } catch (error) {
104
+ this.$showAlert('该气表品牌不支持参数设置', 'warning', 1500)
105
+ }
106
+ }
107
+ }
108
+ }
109
+ </script>
110
+ <style>
111
+ .btn-border {
112
+ border: none;
113
+ border-radius: 6px;
114
+ }
115
+ </style>