sale-client 3.5.92 → 3.5.93
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.
package/build/dev-server.js
CHANGED
|
@@ -1,167 +1,167 @@
|
|
|
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
|
-
'/rs/logic/getWarningMsg': {
|
|
40
|
-
|
|
41
|
-
},
|
|
42
|
-
'/rs/file': {
|
|
43
|
-
target: fuwu
|
|
44
|
-
},
|
|
45
|
-
'/files': {
|
|
46
|
-
target: fuwu
|
|
47
|
-
},
|
|
48
|
-
// 查找资源服务数据
|
|
49
|
-
'/rs/search': {
|
|
50
|
-
target: fuwu
|
|
51
|
-
},
|
|
52
|
-
// 查找资源服务数据
|
|
53
|
-
'/rs/logic/getLogin': {
|
|
54
|
-
target: fuwu
|
|
55
|
-
},
|
|
56
|
-
// 查找资源服务数据
|
|
57
|
-
'/rs/logic/getInitData': {
|
|
58
|
-
target: fuwu
|
|
59
|
-
},
|
|
60
|
-
'/rs/logic/getSaleInitData': {
|
|
61
|
-
target: fuwu
|
|
62
|
-
},
|
|
63
|
-
'/invoice': {
|
|
64
|
-
target: fuwu
|
|
65
|
-
},
|
|
66
|
-
// 用户登录服务地址
|
|
67
|
-
'/rs/user': {
|
|
68
|
-
target: fuwu
|
|
69
|
-
},
|
|
70
|
-
'/rs/path/getParams': {
|
|
71
|
-
target: fuwu
|
|
72
|
-
},
|
|
73
|
-
'/rs/data': {
|
|
74
|
-
target: fuwu
|
|
75
|
-
},
|
|
76
|
-
'/rs/license': {
|
|
77
|
-
target: fuwu
|
|
78
|
-
},
|
|
79
|
-
'/rs/db': {
|
|
80
|
-
target: fuwu
|
|
81
|
-
},
|
|
82
|
-
'/excel': {
|
|
83
|
-
target: fuwu
|
|
84
|
-
},
|
|
85
|
-
'/rs/config': {
|
|
86
|
-
target: fuwu
|
|
87
|
-
},
|
|
88
|
-
'/rs/sql/getLicenseById': {
|
|
89
|
-
target: fuwu
|
|
90
|
-
},
|
|
91
|
-
'/rs/sql/manage_getarealist': {
|
|
92
|
-
target: fuwu
|
|
93
|
-
},
|
|
94
|
-
'/rs/sql/manage_getstreetlist': {
|
|
95
|
-
target: fuwu
|
|
96
|
-
},
|
|
97
|
-
'/rs/report': {
|
|
98
|
-
target: 'http://121.36.106.17:8400/'
|
|
99
|
-
},
|
|
100
|
-
'/rs/vue': {
|
|
101
|
-
target: fuwu
|
|
102
|
-
},
|
|
103
|
-
'/webmeter': {
|
|
104
|
-
target: 'http://192.168.50.4:8450'
|
|
105
|
-
},
|
|
106
|
-
'/rs': {
|
|
107
|
-
// target: 'http://192.168.30.63:8081/'
|
|
108
|
-
// target: 'http://121.36.106.17:8400/'
|
|
109
|
-
target: fuwu
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
var devMiddleware = require('webpack-dev-middleware')(compiler, {
|
|
114
|
-
publicPath: config.output.publicPath,
|
|
115
|
-
stats: {
|
|
116
|
-
colors: true,
|
|
117
|
-
chunks: false
|
|
118
|
-
}
|
|
119
|
-
})
|
|
120
|
-
|
|
121
|
-
var hotMiddleware = require('webpack-hot-middleware')(compiler)
|
|
122
|
-
// force page reload when html-webpack-plugin template changes
|
|
123
|
-
compiler.plugin('compilation', function (compilation) {
|
|
124
|
-
compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
|
|
125
|
-
hotMiddleware.publish({action: 'reload'})
|
|
126
|
-
cb()
|
|
127
|
-
})
|
|
128
|
-
})
|
|
129
|
-
|
|
130
|
-
// proxy api requests
|
|
131
|
-
Object.keys(proxyTable).forEach(function (context) {
|
|
132
|
-
var options = proxyTable[context]
|
|
133
|
-
if (typeof options === 'string') {
|
|
134
|
-
options = {target: options}
|
|
135
|
-
}
|
|
136
|
-
app.use(proxyMiddleware(context, options))
|
|
137
|
-
})
|
|
138
|
-
|
|
139
|
-
// handle fallback for HTML5 history API
|
|
140
|
-
app.use(require('connect-history-api-fallback')())
|
|
141
|
-
// app.use(function (req, res, next) {
|
|
142
|
-
// res.header('Access-Control-Allow-Origin', '*')
|
|
143
|
-
// res.header('Access-Control-Allow-Headers', 'X-Requested-With')
|
|
144
|
-
// res.header('Access-Control-Allow-Methods', 'PUT, POST, GET,DELETE, OPTIONS')
|
|
145
|
-
// res.header('X-Powered-By', '3,2,1')
|
|
146
|
-
// res.header('Access-Control-Allow-Credentials', 'true')
|
|
147
|
-
// res.header('Content-Type', 'application/json;charset=utf-8')
|
|
148
|
-
// next()
|
|
149
|
-
// })
|
|
150
|
-
|
|
151
|
-
// serve webpack bundle output
|
|
152
|
-
app.use(devMiddleware)
|
|
153
|
-
|
|
154
|
-
// enable hot-reload and state-preserving
|
|
155
|
-
// compilation error display
|
|
156
|
-
app.use(hotMiddleware)
|
|
157
|
-
|
|
158
|
-
// serve pure static assets
|
|
159
|
-
app.use('/static', express.static('./static'))
|
|
160
|
-
|
|
161
|
-
module.exports = app.listen(8089, function (err) {
|
|
162
|
-
if (err) {
|
|
163
|
-
console.log(err)
|
|
164
|
-
return
|
|
165
|
-
}
|
|
166
|
-
console.log('Listening at http://localhost:8089')
|
|
167
|
-
})
|
|
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
|
+
// '/rs/logic/getWarningMsg': {
|
|
40
|
+
// // target: 'http://localhost:8080/'
|
|
41
|
+
// },
|
|
42
|
+
'/rs/file': {
|
|
43
|
+
target: fuwu
|
|
44
|
+
},
|
|
45
|
+
'/files': {
|
|
46
|
+
target: fuwu
|
|
47
|
+
},
|
|
48
|
+
// 查找资源服务数据
|
|
49
|
+
'/rs/search': {
|
|
50
|
+
target: fuwu
|
|
51
|
+
},
|
|
52
|
+
// 查找资源服务数据
|
|
53
|
+
'/rs/logic/getLogin': {
|
|
54
|
+
target: fuwu
|
|
55
|
+
},
|
|
56
|
+
// 查找资源服务数据
|
|
57
|
+
'/rs/logic/getInitData': {
|
|
58
|
+
target: fuwu
|
|
59
|
+
},
|
|
60
|
+
'/rs/logic/getSaleInitData': {
|
|
61
|
+
target: fuwu
|
|
62
|
+
},
|
|
63
|
+
'/invoice': {
|
|
64
|
+
target: fuwu
|
|
65
|
+
},
|
|
66
|
+
// 用户登录服务地址
|
|
67
|
+
'/rs/user': {
|
|
68
|
+
target: fuwu
|
|
69
|
+
},
|
|
70
|
+
'/rs/path/getParams': {
|
|
71
|
+
target: fuwu
|
|
72
|
+
},
|
|
73
|
+
'/rs/data': {
|
|
74
|
+
target: fuwu
|
|
75
|
+
},
|
|
76
|
+
'/rs/license': {
|
|
77
|
+
target: fuwu
|
|
78
|
+
},
|
|
79
|
+
'/rs/db': {
|
|
80
|
+
target: fuwu
|
|
81
|
+
},
|
|
82
|
+
'/excel': {
|
|
83
|
+
target: fuwu
|
|
84
|
+
},
|
|
85
|
+
'/rs/config': {
|
|
86
|
+
target: fuwu
|
|
87
|
+
},
|
|
88
|
+
'/rs/sql/getLicenseById': {
|
|
89
|
+
target: fuwu
|
|
90
|
+
},
|
|
91
|
+
'/rs/sql/manage_getarealist': {
|
|
92
|
+
target: fuwu
|
|
93
|
+
},
|
|
94
|
+
'/rs/sql/manage_getstreetlist': {
|
|
95
|
+
target: fuwu
|
|
96
|
+
},
|
|
97
|
+
'/rs/report': {
|
|
98
|
+
target: 'http://121.36.106.17:8400/'
|
|
99
|
+
},
|
|
100
|
+
'/rs/vue': {
|
|
101
|
+
target: fuwu
|
|
102
|
+
},
|
|
103
|
+
'/webmeter': {
|
|
104
|
+
target: 'http://192.168.50.4:8450'
|
|
105
|
+
},
|
|
106
|
+
'/rs': {
|
|
107
|
+
// target: 'http://192.168.30.63:8081/'
|
|
108
|
+
// target: 'http://121.36.106.17:8400/'
|
|
109
|
+
target: fuwu
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
var devMiddleware = require('webpack-dev-middleware')(compiler, {
|
|
114
|
+
publicPath: config.output.publicPath,
|
|
115
|
+
stats: {
|
|
116
|
+
colors: true,
|
|
117
|
+
chunks: false
|
|
118
|
+
}
|
|
119
|
+
})
|
|
120
|
+
|
|
121
|
+
var hotMiddleware = require('webpack-hot-middleware')(compiler)
|
|
122
|
+
// force page reload when html-webpack-plugin template changes
|
|
123
|
+
compiler.plugin('compilation', function (compilation) {
|
|
124
|
+
compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
|
|
125
|
+
hotMiddleware.publish({action: 'reload'})
|
|
126
|
+
cb()
|
|
127
|
+
})
|
|
128
|
+
})
|
|
129
|
+
|
|
130
|
+
// proxy api requests
|
|
131
|
+
Object.keys(proxyTable).forEach(function (context) {
|
|
132
|
+
var options = proxyTable[context]
|
|
133
|
+
if (typeof options === 'string') {
|
|
134
|
+
options = {target: options}
|
|
135
|
+
}
|
|
136
|
+
app.use(proxyMiddleware(context, options))
|
|
137
|
+
})
|
|
138
|
+
|
|
139
|
+
// handle fallback for HTML5 history API
|
|
140
|
+
app.use(require('connect-history-api-fallback')())
|
|
141
|
+
// app.use(function (req, res, next) {
|
|
142
|
+
// res.header('Access-Control-Allow-Origin', '*')
|
|
143
|
+
// res.header('Access-Control-Allow-Headers', 'X-Requested-With')
|
|
144
|
+
// res.header('Access-Control-Allow-Methods', 'PUT, POST, GET,DELETE, OPTIONS')
|
|
145
|
+
// res.header('X-Powered-By', '3,2,1')
|
|
146
|
+
// res.header('Access-Control-Allow-Credentials', 'true')
|
|
147
|
+
// res.header('Content-Type', 'application/json;charset=utf-8')
|
|
148
|
+
// next()
|
|
149
|
+
// })
|
|
150
|
+
|
|
151
|
+
// serve webpack bundle output
|
|
152
|
+
app.use(devMiddleware)
|
|
153
|
+
|
|
154
|
+
// enable hot-reload and state-preserving
|
|
155
|
+
// compilation error display
|
|
156
|
+
app.use(hotMiddleware)
|
|
157
|
+
|
|
158
|
+
// serve pure static assets
|
|
159
|
+
app.use('/static', express.static('./static'))
|
|
160
|
+
|
|
161
|
+
module.exports = app.listen(8089, function (err) {
|
|
162
|
+
if (err) {
|
|
163
|
+
console.log(err)
|
|
164
|
+
return
|
|
165
|
+
}
|
|
166
|
+
console.log('Listening at http://localhost:8089')
|
|
167
|
+
})
|
package/package.json
CHANGED
|
@@ -95,6 +95,8 @@
|
|
|
95
95
|
</template>
|
|
96
96
|
|
|
97
97
|
<script>
|
|
98
|
+
import {HttpResetClass} from "vue-client";
|
|
99
|
+
|
|
98
100
|
let asyncMachineMeterCenter = async function (self) {
|
|
99
101
|
await self.$getConfig(self, 'BatchCharge')
|
|
100
102
|
self.data.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
|
|
@@ -108,6 +110,9 @@ export default {
|
|
|
108
110
|
title: '团体缴费',
|
|
109
111
|
data () {
|
|
110
112
|
return {
|
|
113
|
+
// 请求对象(批量导入,查询进度使用)
|
|
114
|
+
HttpReset: new HttpResetClass(),
|
|
115
|
+
timer: null,
|
|
111
116
|
config: {
|
|
112
117
|
showupload: true, // 显示上传
|
|
113
118
|
hasPrint: true, // 默认打票
|
|
@@ -131,6 +136,10 @@ export default {
|
|
|
131
136
|
}
|
|
132
137
|
},
|
|
133
138
|
props: ['data', 'owe', 'civill'],
|
|
139
|
+
beforeDestroy () {
|
|
140
|
+
// 销毁定时器
|
|
141
|
+
if (this.timer) clearInterval(this.timer)
|
|
142
|
+
},
|
|
134
143
|
ready () {
|
|
135
144
|
this.paycodefocus()
|
|
136
145
|
if (!this.$login.r.includes('免交充值付款')) {
|
|
@@ -218,7 +227,9 @@ export default {
|
|
|
218
227
|
})
|
|
219
228
|
},
|
|
220
229
|
async machineChargeGen () {
|
|
230
|
+
let uuid = this.$login.guid()
|
|
221
231
|
let param = {
|
|
232
|
+
uuid: uuid,
|
|
222
233
|
chargeUser: [],
|
|
223
234
|
f_serial_id: this.$refs.paymentcode.paymentCodeReturnData.f_out_trade_no,
|
|
224
235
|
f_balance: this.data.f_balance,
|
|
@@ -248,29 +259,45 @@ export default {
|
|
|
248
259
|
if (this.civill) {
|
|
249
260
|
param = Object.assign(this.civill, param)
|
|
250
261
|
}
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
262
|
+
try {
|
|
263
|
+
await this.$resetpost('rs/logic/batchPayment', {data: param}, {resolveMsg: null, rejectMsg: null}, 1000)
|
|
264
|
+
} catch (e) {}
|
|
265
|
+
this.$showMessage(`正在批量处理中, 请耐心等待...`, [])
|
|
266
|
+
// 启动定时器定时查询处理结果
|
|
267
|
+
this.timer = setInterval(async () => {
|
|
268
|
+
let res = await this.HttpReset.load('POST', 'rs/logic/getBatchOperaPro', {data: {uuid: uuid}}, {resolveMsg: null, rejectMsg: null})
|
|
269
|
+
if (res.data.msg || res.data.error) {
|
|
270
|
+
clearInterval(this.timer)
|
|
271
|
+
this.$closeMessage()
|
|
272
|
+
if (res.data.error) {
|
|
273
|
+
this.$showAlert(`${res.data.error}`, 'danger')
|
|
274
|
+
return
|
|
275
|
+
}
|
|
276
|
+
await this.$showMessage(res.data.msg)
|
|
277
|
+
if (this.config.hasPrint) {
|
|
278
|
+
if (this.data.f_print.indexOf('电子发票') == -1) {
|
|
279
|
+
console.log('this.config.hasBillManage', this.config.hasBillManage)
|
|
280
|
+
if (this.config.hasBillManage) {
|
|
281
|
+
// 启用发票管理,获取票据管理中的票号并存储记录
|
|
282
|
+
this.row.id = res.data.id
|
|
283
|
+
this.row.f_bill_type = '物联网收费'
|
|
284
|
+
this.row.f_bill_style = this.model.f_print[0]
|
|
285
|
+
this.print = true
|
|
286
|
+
} else {
|
|
287
|
+
this.data.id = res.data.id
|
|
288
|
+
this.print = true
|
|
289
|
+
}
|
|
290
|
+
} else if (this.config.printType === '国税发票') {
|
|
291
|
+
// TODO
|
|
292
|
+
} else if (this.model.f_print[0] === '电子发票') {
|
|
293
|
+
this.eticket_show = true
|
|
294
|
+
await this.$refs.eticketbill.openETicket([res.data.id], this.row, this.invoice_show_gas, this.invoice_is_pax, '物联网收费')
|
|
295
|
+
}
|
|
261
296
|
} else {
|
|
262
|
-
this.
|
|
263
|
-
this.print = true
|
|
297
|
+
this.clean()
|
|
264
298
|
}
|
|
265
|
-
} else if (this.config.printType === '国税发票') {
|
|
266
|
-
// TODO
|
|
267
|
-
} else if (this.model.f_print[0] === '电子发票') {
|
|
268
|
-
this.eticket_show = true
|
|
269
|
-
await this.$refs.eticketbill.openETicket([res.data.id], this.row, this.invoice_show_gas, this.invoice_is_pax, '物联网收费')
|
|
270
299
|
}
|
|
271
|
-
}
|
|
272
|
-
this.clean()
|
|
273
|
-
}
|
|
300
|
+
}, 5000)
|
|
274
301
|
},
|
|
275
302
|
clean () {
|
|
276
303
|
this.$dispatch('success')
|
|
@@ -294,7 +294,7 @@
|
|
|
294
294
|
// 加入扫码盒付款码支付流水号
|
|
295
295
|
param.f_serial_id = self.$refs.paymentcode.paymentCodeReturnData.f_out_trade_no ? self.$refs.paymentcode.paymentCodeReturnData.f_out_trade_no : ''
|
|
296
296
|
param.f_serial_id = self.$refs.mispospay.misposReturnData.f_out_trade_no ? self.$refs.paymentcode.misposReturnData.f_out_trade_no : ''
|
|
297
|
-
let res = await self.$resetpost('rs/logic/sale_IOTCharge_logic', {data: param}, {
|
|
297
|
+
let res = await self.$resetpost('/mispos/rs/logic/sale_IOTCharge_logic', {data: param}, {
|
|
298
298
|
resolveMsg: '物联网收费成功!!',
|
|
299
299
|
rejectMsg: '物联网收费出错!!!'
|
|
300
300
|
})
|
|
@@ -605,8 +605,8 @@ let sendCardSaleGasGenremanent = async function (model, row) {
|
|
|
605
605
|
}
|
|
606
606
|
// 判断是否是累购表
|
|
607
607
|
if (row.f_support_purchase === '是') {
|
|
608
|
-
params.ljgql = (row.f_write_totalgas - 0) + (model.f_pregas - 0)
|
|
609
|
-
params.ljgqje = (row.f_write_totalfee - 0) + (model.f_preamount - 0)
|
|
608
|
+
params.ljgql = (row.f_write_totalgas - 0) + (model.f_pregas - 0)
|
|
609
|
+
params.ljgqje = (row.f_write_totalfee - 0) + (model.f_preamount - 0)
|
|
610
610
|
}
|
|
611
611
|
params = Object.assign({}, Vue.CommonService.writeCardParams(cardParams), params)
|
|
612
612
|
console.log('换表发卡写卡参数', params)
|