sale-client 4.2.144 → 4.2.145
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,7 +1,7 @@
|
|
|
1
1
|
var path = require('path')
|
|
2
2
|
var checkVersion = require('./versionCheck.js')
|
|
3
3
|
checkVersion()
|
|
4
|
-
const [ serverRul, localUrl ] = ['
|
|
4
|
+
const [ serverRul, localUrl ] = ['http://192.168.50.67:31567/', 'http://192.168.50.67:31567/']
|
|
5
5
|
var merge = require('webpack-merge')
|
|
6
6
|
var baseConfig = require('./webpack.dev.conf')
|
|
7
7
|
var devConfig = {
|
|
@@ -11,7 +11,7 @@ var devConfig = {
|
|
|
11
11
|
publicPath: baseConfig.output.publicPath,
|
|
12
12
|
historyApiFallback: true,
|
|
13
13
|
host: '127.0.0.1',
|
|
14
|
-
port:
|
|
14
|
+
port: 8089,
|
|
15
15
|
open: false,
|
|
16
16
|
stats: {
|
|
17
17
|
colors: false, // 配置控制台输出彩色日志
|
|
@@ -19,18 +19,18 @@ var devConfig = {
|
|
|
19
19
|
children: false // 不输出子模块构建信息
|
|
20
20
|
},
|
|
21
21
|
proxy: {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
// '/api/af-revenue/batchdeduction/all': {
|
|
23
|
+
// pathRewrite: {
|
|
24
|
+
// '/api/af-revenue/batchdeduction/all': '/batchdeduction/all'
|
|
25
|
+
// },
|
|
26
|
+
// target: localUrl
|
|
27
|
+
// },
|
|
28
|
+
// '/api/af-revenue/logic': {
|
|
29
|
+
// pathRewrite: {
|
|
30
|
+
// '/api/af-revenue/logic': '/logic'
|
|
31
|
+
// },
|
|
32
|
+
// target: localUrl
|
|
33
|
+
// },
|
|
34
34
|
// '/api/af-revenue/file': {
|
|
35
35
|
// // pathRewrite: {
|
|
36
36
|
// // '/api/af-revenue/file': '/file'
|
|
@@ -47,22 +47,20 @@ var devConfig = {
|
|
|
47
47
|
// },
|
|
48
48
|
// target: localUrl
|
|
49
49
|
// },
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
'/rs/pay': {
|
|
51
|
+
target: 'http://localhost:8080'
|
|
52
|
+
},
|
|
53
|
+
'/api/af-revenue': {
|
|
54
|
+
pathRewrite: {
|
|
55
|
+
'/api/af-revenue': '/af-revenue'
|
|
56
|
+
},
|
|
57
|
+
target: "http://localhost:8080"
|
|
58
|
+
},
|
|
59
59
|
'/api': {
|
|
60
|
-
target: serverRul
|
|
61
|
-
secure: false
|
|
60
|
+
target: serverRul
|
|
62
61
|
},
|
|
63
62
|
'/rs': {
|
|
64
|
-
target: serverRul
|
|
65
|
-
secure: false
|
|
63
|
+
target: serverRul
|
|
66
64
|
}
|
|
67
65
|
}
|
|
68
66
|
}
|
package/package.json
CHANGED
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<!-- <button class="btn btn-success width-60" @click='readCard()' :disabled="hasCard.cardState === -1"> -->
|
|
3
|
-
<button class="button_search" @click='readCard()'>
|
|
4
|
-
<!-- <span class="glyphicon glyphicon-credit-card"></span> -->
|
|
5
|
-
读卡
|
|
6
|
-
</button>
|
|
7
|
-
</template>
|
|
8
|
-
<script>
|
|
9
|
-
/**
|
|
10
|
-
*卡服务
|
|
11
|
-
*读卡
|
|
12
|
-
*/
|
|
13
|
-
import co from 'co'
|
|
14
|
-
// import cardListen from '../../plugins/CardListen'
|
|
15
|
-
// import CardService from '../../../plugins/CardService'
|
|
16
|
-
|
|
17
|
-
let readGen = function * (self, param) {
|
|
18
|
-
let hasCard = yield self.$resetpost('http://127.0.0.1:8003/HasCard', {}, {resolveMsg: null, rejectMsg: null}).catch((error) => {
|
|
19
|
-
if (error.status === 612) {
|
|
20
|
-
self.$showAlert('请检查读卡器是否启动!!', 'danger', 2000)
|
|
21
|
-
}
|
|
22
|
-
})
|
|
23
|
-
if (JSON.parse(hasCard.data).state !== 1) {
|
|
24
|
-
self.$showAlert('请检查卡是否插好!!', 'danger', 2000)
|
|
25
|
-
} else {
|
|
26
|
-
let data = {}
|
|
27
|
-
if (param) {
|
|
28
|
-
data.Factory = param
|
|
29
|
-
}
|
|
30
|
-
yield self.$resetpost('http://127.0.0.1:8003/ReadCard', data, {resolveMsg: null, rejectMsg: null}).then((res) => {
|
|
31
|
-
console.log('返回卡信息')
|
|
32
|
-
self.cardInfo = res
|
|
33
|
-
res.data.Err ? self.$showAlert(res.data.Err, 'danger', 2000) : ''
|
|
34
|
-
if (res.data.Err === null && res.data.Exception) {
|
|
35
|
-
self.$showAlert(res.data.Exception, 'danger', 2000)
|
|
36
|
-
}
|
|
37
|
-
// 验证卡上信息和用户信息是否一致
|
|
38
|
-
if (param) {
|
|
39
|
-
console.log('读完卡之后核对', res.data, self.isSingle)
|
|
40
|
-
if (res.data.CardID != self.isSingle[0].f_card_id || res.data.Factory != self.isSingle[0].f_alias) {
|
|
41
|
-
self.$showAlert('此时的卡片信息和用户信息不匹配,请核实后在进行读卡', 'warning', 5000)
|
|
42
|
-
return
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
self.$dispatch('read-info', res)
|
|
47
|
-
}).catch((res) => {
|
|
48
|
-
self.$showAlert(res.data, 'danger', 2000)
|
|
49
|
-
})
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export default {
|
|
54
|
-
title: '读卡',
|
|
55
|
-
// data () {
|
|
56
|
-
// return {
|
|
57
|
-
// hasCard: cardListen
|
|
58
|
-
// }
|
|
59
|
-
// },
|
|
60
|
-
props: {
|
|
61
|
-
cardInfo: {
|
|
62
|
-
twoWay: true
|
|
63
|
-
},
|
|
64
|
-
isSingle: []
|
|
65
|
-
},
|
|
66
|
-
methods: {
|
|
67
|
-
readCard () {
|
|
68
|
-
console.log('查看是否只有单户', this.isSingle)
|
|
69
|
-
// if (this.isSingle) {
|
|
70
|
-
// let gen = readGen(this, this.isSingle.length == 1 ? this.isSingle[0].f_alias : null)
|
|
71
|
-
// return co(gen)
|
|
72
|
-
// } else {
|
|
73
|
-
let gen = readGen(this)
|
|
74
|
-
return co(gen)
|
|
75
|
-
// }
|
|
76
|
-
},
|
|
77
|
-
async readCard2 (param) {
|
|
78
|
-
// 这是二次掉卡服务,所以这里不做判卡处理
|
|
79
|
-
let data = {}
|
|
80
|
-
if (param) {
|
|
81
|
-
data.kmm = param
|
|
82
|
-
}
|
|
83
|
-
let res = await this.$resetpost('http://127.0.0.1:8003/ReadCard', data, {resolveMsg: null, rejectMsg: '获取卡信息出错!!'})
|
|
84
|
-
return res.data
|
|
85
|
-
},
|
|
86
|
-
// 读卡返回的 cardInfo.NewParam.error 为 0002 需要携带次数进行读卡操作
|
|
87
|
-
async readCard3 (cs) {
|
|
88
|
-
// 这是二次掉卡服务,所以这里不做判卡处理
|
|
89
|
-
let data = {}
|
|
90
|
-
if (cs) {
|
|
91
|
-
data.cs = cs
|
|
92
|
-
}
|
|
93
|
-
let res = await this.$resetpost('http://127.0.0.1:8003/ReadCard', data, {resolveMsg: null, rejectMsg: '获取卡信息出错!!'})
|
|
94
|
-
return res.data
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<!-- <button class="btn btn-success width-60" @click='readCard()' :disabled="hasCard.cardState === -1"> -->
|
|
3
|
+
<button class="button_search" @click='readCard()'>
|
|
4
|
+
<!-- <span class="glyphicon glyphicon-credit-card"></span> -->
|
|
5
|
+
读卡
|
|
6
|
+
</button>
|
|
7
|
+
</template>
|
|
8
|
+
<script>
|
|
9
|
+
/**
|
|
10
|
+
*卡服务
|
|
11
|
+
*读卡
|
|
12
|
+
*/
|
|
13
|
+
import co from 'co'
|
|
14
|
+
// import cardListen from '../../plugins/CardListen'
|
|
15
|
+
// import CardService from '../../../plugins/CardService'
|
|
16
|
+
|
|
17
|
+
let readGen = function * (self, param) {
|
|
18
|
+
let hasCard = yield self.$resetpost('http://127.0.0.1:8003/HasCard', {}, {resolveMsg: null, rejectMsg: null}).catch((error) => {
|
|
19
|
+
if (error.status === 612) {
|
|
20
|
+
self.$showAlert('请检查读卡器是否启动!!', 'danger', 2000)
|
|
21
|
+
}
|
|
22
|
+
})
|
|
23
|
+
if (JSON.parse(hasCard.data).state !== 1) {
|
|
24
|
+
self.$showAlert('请检查卡是否插好!!', 'danger', 2000)
|
|
25
|
+
} else {
|
|
26
|
+
let data = {}
|
|
27
|
+
if (param) {
|
|
28
|
+
data.Factory = param
|
|
29
|
+
}
|
|
30
|
+
yield self.$resetpost('http://127.0.0.1:8003/ReadCard', data, {resolveMsg: null, rejectMsg: null}).then((res) => {
|
|
31
|
+
console.log('返回卡信息')
|
|
32
|
+
self.cardInfo = res
|
|
33
|
+
res.data.Err ? self.$showAlert(res.data.Err, 'danger', 2000) : ''
|
|
34
|
+
if (res.data.Err === null && res.data.Exception) {
|
|
35
|
+
self.$showAlert(res.data.Exception, 'danger', 2000)
|
|
36
|
+
}
|
|
37
|
+
// 验证卡上信息和用户信息是否一致
|
|
38
|
+
if (param) {
|
|
39
|
+
console.log('读完卡之后核对', res.data, self.isSingle)
|
|
40
|
+
if (res.data.CardID != self.isSingle[0].f_card_id || res.data.Factory != self.isSingle[0].f_alias) {
|
|
41
|
+
self.$showAlert('此时的卡片信息和用户信息不匹配,请核实后在进行读卡', 'warning', 5000)
|
|
42
|
+
return
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
self.$dispatch('read-info', res)
|
|
47
|
+
}).catch((res) => {
|
|
48
|
+
self.$showAlert(res.data, 'danger', 2000)
|
|
49
|
+
})
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export default {
|
|
54
|
+
title: '读卡',
|
|
55
|
+
// data () {
|
|
56
|
+
// return {
|
|
57
|
+
// hasCard: cardListen
|
|
58
|
+
// }
|
|
59
|
+
// },
|
|
60
|
+
props: {
|
|
61
|
+
cardInfo: {
|
|
62
|
+
twoWay: true
|
|
63
|
+
},
|
|
64
|
+
isSingle: []
|
|
65
|
+
},
|
|
66
|
+
methods: {
|
|
67
|
+
readCard () {
|
|
68
|
+
console.log('查看是否只有单户', this.isSingle)
|
|
69
|
+
// if (this.isSingle) {
|
|
70
|
+
// let gen = readGen(this, this.isSingle.length == 1 ? this.isSingle[0].f_alias : null)
|
|
71
|
+
// return co(gen)
|
|
72
|
+
// } else {
|
|
73
|
+
let gen = readGen(this)
|
|
74
|
+
return co(gen)
|
|
75
|
+
// }
|
|
76
|
+
},
|
|
77
|
+
async readCard2 (param) {
|
|
78
|
+
// 这是二次掉卡服务,所以这里不做判卡处理
|
|
79
|
+
let data = {}
|
|
80
|
+
if (param) {
|
|
81
|
+
data.kmm = param
|
|
82
|
+
}
|
|
83
|
+
let res = await this.$resetpost('http://127.0.0.1:8003/ReadCard', data, {resolveMsg: null, rejectMsg: '获取卡信息出错!!'})
|
|
84
|
+
return res.data
|
|
85
|
+
},
|
|
86
|
+
// 读卡返回的 cardInfo.NewParam.error 为 0002 需要携带次数进行读卡操作
|
|
87
|
+
async readCard3 (cs) {
|
|
88
|
+
// 这是二次掉卡服务,所以这里不做判卡处理
|
|
89
|
+
let data = {}
|
|
90
|
+
if (cs) {
|
|
91
|
+
data.cs = cs
|
|
92
|
+
}
|
|
93
|
+
let res = await this.$resetpost('http://127.0.0.1:8003/ReadCard', data, {resolveMsg: null, rejectMsg: '获取卡信息出错!!'})
|
|
94
|
+
return res.data
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
</script>
|
|
@@ -0,0 +1,147 @@
|
|
|
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('api/af-revenue/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('api/af-revenue/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('/api/af-revenue/logic/getParamsByGasBrandswitch', {data: {gasBrandId: val}}, {resolveMsg: null, rejectMsg: null})
|
|
102
|
+
let payload = (res && res.data) ? res.data : res
|
|
103
|
+
|
|
104
|
+
let parsed = []
|
|
105
|
+
if (Array.isArray(payload)) {
|
|
106
|
+
parsed = payload
|
|
107
|
+
} else if (payload && typeof payload === 'object' && payload.hasOwnProperty('value')) {
|
|
108
|
+
if (typeof payload.value === 'string') {
|
|
109
|
+
try {
|
|
110
|
+
parsed = JSON.parse(payload.value)
|
|
111
|
+
} catch (err) {
|
|
112
|
+
console.error('解析 payload.value 失败', err)
|
|
113
|
+
this.$showAlert('返回参数解析失败,请联系管理员', 'warning', 2000)
|
|
114
|
+
parsed = []
|
|
115
|
+
}
|
|
116
|
+
} else if (Array.isArray(payload.value)) {
|
|
117
|
+
parsed = payload.value
|
|
118
|
+
} else {
|
|
119
|
+
parsed = []
|
|
120
|
+
}
|
|
121
|
+
} else if (typeof payload === 'string') {
|
|
122
|
+
try {
|
|
123
|
+
parsed = JSON.parse(payload)
|
|
124
|
+
} catch (err) {
|
|
125
|
+
console.error('解析 payload 字符串失败', err)
|
|
126
|
+
parsed = []
|
|
127
|
+
}
|
|
128
|
+
} else {
|
|
129
|
+
parsed = []
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
this.newmeterinfo = parsed
|
|
133
|
+
} catch (error) {
|
|
134
|
+
console.error('refreshParam 出错', error)
|
|
135
|
+
this.$showAlert('该气表品牌不支持参数设置', 'warning', 1500)
|
|
136
|
+
this.newmeterinfo = [{}]
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
</script>
|
|
142
|
+
<style>
|
|
143
|
+
.btn-border {
|
|
144
|
+
border: none;
|
|
145
|
+
border-radius: 6px;
|
|
146
|
+
}
|
|
147
|
+
</style>
|
|
@@ -95,4 +95,5 @@ export default function () {
|
|
|
95
95
|
Vue.component('record-query-user', (resolve) => { require(['./RecordQueryUser'], resolve) })
|
|
96
96
|
Vue.component('param-set', (resolve) => { require(['./ParamSet'], resolve) })
|
|
97
97
|
Vue.component('param-set-form', (resolve) => { require(['./ParamSetForm'], resolve) })
|
|
98
|
+
Vue.component('param-history', (resolve) => { require(['./ParamHistory'], resolve) })
|
|
98
99
|
}
|
package/src/main.js
CHANGED
|
@@ -2,7 +2,7 @@ import Vue from 'vue'
|
|
|
2
2
|
import all from 'vue-client/src/all'
|
|
3
3
|
import App from './App'
|
|
4
4
|
import system from 'system-clients/src/system'
|
|
5
|
-
import FilialeSale from './filiale/
|
|
5
|
+
import FilialeSale from './filiale/meihekou/sale'
|
|
6
6
|
import sale from './sale'
|
|
7
7
|
import address from 'address-client/src/address'
|
|
8
8
|
import ldap from 'ldap-clients/src/ldap'
|