sale-client 3.5.272 → 3.5.274
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 +82 -82
- package/package.json +1 -1
- package/src/filiale/wuhai/CardMeterCenter.vue +9 -3
- package/src/filiale/wuhai/IOTMeterCenter.vue +6 -6
- package/src/filiale/wuhai/OtherGas.vue +359 -0
- package/src/filiale/wuhai/ShowCardSellGas.vue +6 -5
- package/src/filiale/wuhai/sale.js +2 -0
- package/src/main.js +27 -27
package/build/dev-server.js
CHANGED
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
var path = require('path')
|
|
2
|
-
const [localUrl, serverRul] = ['http://
|
|
3
|
-
var merge = require('webpack-merge')
|
|
4
|
-
var baseConfig = require('./webpack.dev.conf')
|
|
5
|
-
var devConfig = {
|
|
6
|
-
devServer: {
|
|
7
|
-
contentBase: path.join(__dirname, 'src'),
|
|
8
|
-
hot: true,
|
|
9
|
-
publicPath: baseConfig.output.publicPath,
|
|
10
|
-
historyApiFallback: true,
|
|
11
|
-
host: '127.0.0.1',
|
|
12
|
-
port: 8089,
|
|
13
|
-
open: true,
|
|
14
|
-
stats: {
|
|
15
|
-
colors: false, // 配置控制台输出彩色日志
|
|
16
|
-
chunks: false, // 不输出构建 chunk 信息
|
|
17
|
-
children: false // 不输出子模块构建信息
|
|
18
|
-
},
|
|
19
|
-
proxy: {
|
|
20
|
-
'/rs/file': {
|
|
21
|
-
target: serverRul
|
|
22
|
-
},
|
|
23
|
-
// 查找资源服务数据
|
|
24
|
-
'/rs/search': {
|
|
25
|
-
target: serverRul
|
|
26
|
-
},
|
|
27
|
-
// 查找资源服务数据
|
|
28
|
-
'/rs/logic/getLogin': {
|
|
29
|
-
target: serverRul
|
|
30
|
-
},
|
|
31
|
-
// 查找资源服务数据
|
|
32
|
-
'/rs/logic/getInitData': {
|
|
33
|
-
target: serverRul
|
|
34
|
-
},
|
|
35
|
-
'/rs/logic/getSaleInitData': {
|
|
36
|
-
target: serverRul
|
|
37
|
-
},
|
|
38
|
-
// 用户登录服务地址
|
|
39
|
-
'/rs/user': {
|
|
40
|
-
target: serverRul
|
|
41
|
-
},
|
|
42
|
-
'/rs/path': {
|
|
43
|
-
target: serverRul
|
|
44
|
-
},
|
|
45
|
-
'/rs/data': {
|
|
46
|
-
target: serverRul
|
|
47
|
-
},
|
|
48
|
-
'/rs/license': {
|
|
49
|
-
target: serverRul
|
|
50
|
-
},
|
|
51
|
-
'/rs/db': {
|
|
52
|
-
target: serverRul
|
|
53
|
-
},
|
|
54
|
-
'/excel': {
|
|
55
|
-
target: serverRul
|
|
56
|
-
},
|
|
57
|
-
'/rs/config': {
|
|
58
|
-
target: serverRul
|
|
59
|
-
},
|
|
60
|
-
'/rs/report': {
|
|
61
|
-
target: serverRul
|
|
62
|
-
},
|
|
63
|
-
'/rs/vue': {
|
|
64
|
-
target: serverRul
|
|
65
|
-
},
|
|
66
|
-
'/rs/logic': {
|
|
67
|
-
target: localUrl
|
|
68
|
-
},
|
|
69
|
-
'/rs/sql': {
|
|
70
|
-
target: localUrl
|
|
71
|
-
},
|
|
72
|
-
'/webmeter': {
|
|
73
|
-
target: serverRul
|
|
74
|
-
},
|
|
75
|
-
'/rs': {
|
|
76
|
-
target: serverRul
|
|
77
|
-
// changeOrigin: true
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
module.exports = merge(baseConfig, devConfig)
|
|
1
|
+
var path = require('path')
|
|
2
|
+
const [localUrl, serverRul] = ['http://203.57.101.233:8400/', 'http://203.57.101.233:8400/']
|
|
3
|
+
var merge = require('webpack-merge')
|
|
4
|
+
var baseConfig = require('./webpack.dev.conf')
|
|
5
|
+
var devConfig = {
|
|
6
|
+
devServer: {
|
|
7
|
+
contentBase: path.join(__dirname, 'src'),
|
|
8
|
+
hot: true,
|
|
9
|
+
publicPath: baseConfig.output.publicPath,
|
|
10
|
+
historyApiFallback: true,
|
|
11
|
+
host: '127.0.0.1',
|
|
12
|
+
port: 8089,
|
|
13
|
+
open: true,
|
|
14
|
+
stats: {
|
|
15
|
+
colors: false, // 配置控制台输出彩色日志
|
|
16
|
+
chunks: false, // 不输出构建 chunk 信息
|
|
17
|
+
children: false // 不输出子模块构建信息
|
|
18
|
+
},
|
|
19
|
+
proxy: {
|
|
20
|
+
'/rs/file': {
|
|
21
|
+
target: serverRul
|
|
22
|
+
},
|
|
23
|
+
// 查找资源服务数据
|
|
24
|
+
'/rs/search': {
|
|
25
|
+
target: serverRul
|
|
26
|
+
},
|
|
27
|
+
// 查找资源服务数据
|
|
28
|
+
'/rs/logic/getLogin': {
|
|
29
|
+
target: serverRul
|
|
30
|
+
},
|
|
31
|
+
// 查找资源服务数据
|
|
32
|
+
'/rs/logic/getInitData': {
|
|
33
|
+
target: serverRul
|
|
34
|
+
},
|
|
35
|
+
'/rs/logic/getSaleInitData': {
|
|
36
|
+
target: serverRul
|
|
37
|
+
},
|
|
38
|
+
// 用户登录服务地址
|
|
39
|
+
'/rs/user': {
|
|
40
|
+
target: serverRul
|
|
41
|
+
},
|
|
42
|
+
'/rs/path': {
|
|
43
|
+
target: serverRul
|
|
44
|
+
},
|
|
45
|
+
'/rs/data': {
|
|
46
|
+
target: serverRul
|
|
47
|
+
},
|
|
48
|
+
'/rs/license': {
|
|
49
|
+
target: serverRul
|
|
50
|
+
},
|
|
51
|
+
'/rs/db': {
|
|
52
|
+
target: serverRul
|
|
53
|
+
},
|
|
54
|
+
'/excel': {
|
|
55
|
+
target: serverRul
|
|
56
|
+
},
|
|
57
|
+
'/rs/config': {
|
|
58
|
+
target: serverRul
|
|
59
|
+
},
|
|
60
|
+
'/rs/report': {
|
|
61
|
+
target: serverRul
|
|
62
|
+
},
|
|
63
|
+
'/rs/vue': {
|
|
64
|
+
target: serverRul
|
|
65
|
+
},
|
|
66
|
+
'/rs/logic': {
|
|
67
|
+
target: localUrl
|
|
68
|
+
},
|
|
69
|
+
'/rs/sql': {
|
|
70
|
+
target: localUrl
|
|
71
|
+
},
|
|
72
|
+
'/webmeter': {
|
|
73
|
+
target: serverRul
|
|
74
|
+
},
|
|
75
|
+
'/rs': {
|
|
76
|
+
target: serverRul
|
|
77
|
+
// changeOrigin: true
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
module.exports = merge(baseConfig, devConfig)
|
package/package.json
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
<label for="f_pregas" class=" font_normal_body">*预购气量</label>
|
|
20
20
|
<input class="input_search" style="width:60%" type="number" :disabled="config.calculatePreByCollection"
|
|
21
21
|
@blur="pregas()" v-model="model.f_pregas" v-el:fpregas
|
|
22
|
+
v-scale="[model.f_pregas, 2]"
|
|
22
23
|
v-validate:f_pregas='{required: true, dctest: [maxgas, "<=" ]}' placeholder="预购气量"
|
|
23
24
|
v-next-el='fcollection'>
|
|
24
25
|
</div>
|
|
@@ -26,6 +27,7 @@
|
|
|
26
27
|
<label for="f_pregas" class=" font_normal_body">*预购气量</label>
|
|
27
28
|
<input class="input_search" style="width:60%" type="number" v-el:fpregas
|
|
28
29
|
@blur="pregas()" v-model="model.f_pregas" placeholder="预购气量"
|
|
30
|
+
v-scale="[model.f_pregas, 2]"
|
|
29
31
|
v-next-el='fcollection' :disabled="config.calculatePreByCollection"/>
|
|
30
32
|
</div>
|
|
31
33
|
<div class="col-sm-4"
|
|
@@ -33,6 +35,7 @@
|
|
|
33
35
|
<label for="f_pregas" class=" font_normal_body">*预购金额</label>
|
|
34
36
|
<input class="input_search" style="width:60%" type="number"
|
|
35
37
|
@blur="preamount()" v-model="model.f_preamount"
|
|
38
|
+
v-scale="[model.f_preamount, 3]"
|
|
36
39
|
:disabled="config.calculatePreByCollection"
|
|
37
40
|
v-validate:f_preamount='{required: true, dctest: [maxmoney, "<=" ]}' placeholder="预购金额">
|
|
38
41
|
</div><!--
|
|
@@ -77,7 +80,7 @@
|
|
|
77
80
|
<input class="input_search" style="width:60%" type="number"
|
|
78
81
|
@blur="preamount()" v-model="model.f_totalcost"
|
|
79
82
|
v-validate:f_totalcost='{required: true, dctest: [0, ">=" ] }' placeholder="应收金额"
|
|
80
|
-
v-next-el='fcollection' v-scale="[model.f_totalcost,
|
|
83
|
+
v-next-el='fcollection' v-scale="[model.f_totalcost, 3]" disabled>
|
|
81
84
|
</div>
|
|
82
85
|
</div>
|
|
83
86
|
<div class="row">
|
|
@@ -100,12 +103,13 @@
|
|
|
100
103
|
<input id="f_collection" class="input_search" style="width:60%" type="number" v-model="model.f_collection"
|
|
101
104
|
v-validate:f_collection='{required: true, dctest: [(model.f_totalcost - 0), ">=" ] }'
|
|
102
105
|
v-el:fcollection @keyup.enter="checkInvoiceMsg((!$v.valid || validateOk || !islegal || clickConfirm))"
|
|
103
|
-
v-scale="[model.
|
|
106
|
+
v-scale="[model.f_collection, 2]" :disabled="$refs.givechange.promptText != ''"/>
|
|
104
107
|
</div>
|
|
105
108
|
<div class="col-sm-3" v-if="row.f_collection_type === '按气量' && model.f_payment!='赠气' && row.f_meter_type.includes('卡表') && config.calculatePreByCollection"
|
|
106
109
|
:class="[$v.f_collection.required ? 'has-error' : 'has-success']">
|
|
107
110
|
<label for="f_collection" class=" font_normal_body">*收  款</label>
|
|
108
111
|
<input id="f_collection" class="input_search" style="width:60%" type="number" v-model="model.f_collection"
|
|
112
|
+
v-scale="[model.f_collection, 2]"
|
|
109
113
|
v-validate:f_collection='{required: true }'
|
|
110
114
|
@blur="calculatePreByCollection()"
|
|
111
115
|
v-el:fcollection
|
|
@@ -116,12 +120,14 @@
|
|
|
116
120
|
<label for="f_collection" class=" font_normal_body"><font size="4px" style="font-weight:bold">*收 款</font></label>
|
|
117
121
|
<input id="f_collection" class="input_search" style="width:60%;font-size: 18px;font-weight:bold;" type="number" v-model="model.f_collection"
|
|
118
122
|
@blur="config.calculatePreByCollection && calculatePreByCollection()"
|
|
123
|
+
v-scale="[model.f_collection, 2]"
|
|
119
124
|
v-el:fcollection @keyup.enter="checkInvoiceMsg((!$v.valid || validateOk || !islegal || clickConfirm))" v-scale="[model.f_totalcost, 4]" :disabled="$refs.givechange.promptText != ''">
|
|
120
125
|
</div>
|
|
121
126
|
<div class="col-sm-3" v-if="row.f_collection_type === '按金额' && row.f_meter_type.includes('卡表')">
|
|
122
127
|
<label for="f_collection" class=" font_normal_body"><font size="4px" style="font-weight:bold">*收 款</font></label>
|
|
123
128
|
<input id="f_collection" class="input_search" style="width:50%;font-size: 18px;font-weight:bold;" type="number" v-model="model.f_collection"
|
|
124
129
|
@blur="config.calculatePreByCollection && calculatePreByCollection()"
|
|
130
|
+
v-scale="[model.f_collection, 2]"
|
|
125
131
|
v-el:fcollection @keyup.enter="checkInvoiceMsg((!$v.valid || validateOk || !islegal || clickConfirm))" v-scale="[model.f_collection, 4]" :disabled="$refs.givechange.promptText != ''">
|
|
126
132
|
</div>
|
|
127
133
|
<div class="col-sm-4" v-if="!row.f_meter_type.includes('卡表')">
|
|
@@ -132,7 +138,7 @@
|
|
|
132
138
|
v-el:fcollection
|
|
133
139
|
@blur="config.calculatePreByCollection && calculatePreByCollection()"
|
|
134
140
|
@keyup.enter="checkInvoiceMsg((!$v.valid || validateOk || !islegal || clickConfirm))"
|
|
135
|
-
v-scale="[model.f_collection,
|
|
141
|
+
v-scale="[model.f_collection, 2]" disabled>
|
|
136
142
|
</div>
|
|
137
143
|
<div class="col-sm-1 form-group" v-show=" row.f_meter_type.includes('卡表')">
|
|
138
144
|
<give-change :curbalance="curbalance" :collection.sync="model.f_collection" v-ref:givechange></give-change>
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<label for="f_pregas" class=" font_normal_body">预购气量</label>
|
|
20
20
|
<input class="input_search" style="width:60%" type="number" id="pregasFocue"
|
|
21
21
|
@blur="pregas()" v-model="model.f_pregas"
|
|
22
|
-
v-scale="[model.f_pregas,
|
|
22
|
+
v-scale="[model.f_pregas, 2]"
|
|
23
23
|
v-validate:f_pregas='{required: true, dctest: [maxgas, "<=" ]}' placeholder="预购气量"
|
|
24
24
|
v-next-el='sk' >
|
|
25
25
|
</div>
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
<label for="f_preamount" class=" font_normal_body">预购金额</label>
|
|
34
34
|
<input class="input_search" style="width:60%" @blur="preamount()" type="number" v-model="model.f_preamount"
|
|
35
35
|
v-validate:f_preamount='{required: true, dctest: [maxmoney, "<=" ] }'
|
|
36
|
-
v-scale="[model.f_preamount,
|
|
36
|
+
v-scale="[model.f_preamount, 2]" placeholder="预购金额" >
|
|
37
37
|
</div>
|
|
38
38
|
</div>
|
|
39
39
|
<div class="row" style="margin-top:6px;">
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
<input class="input_search" style="width:60%" type="number"
|
|
72
72
|
@blur="preamount()" v-model="model.f_totalcost"
|
|
73
73
|
v-validate:f_totalcost='{required: true, dctest: [0, ">=" ] }' placeholder="应收金额"
|
|
74
|
-
v-next-el='sk' v-scale="[model.f_totalcost,
|
|
74
|
+
v-next-el='sk' v-scale="[model.f_totalcost, 2]" disabled>
|
|
75
75
|
</div>
|
|
76
76
|
</div>
|
|
77
77
|
<div class="row">
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
<div class="col-sm-3 form-group">
|
|
104
104
|
<label for="f_collection" class=" font_normal_body"> 收款 </label>
|
|
105
105
|
<input id="f_collection" class="input_search" style="width:60%" type="number" v-model="model.f_collection"
|
|
106
|
-
v-el:sk v-scale="[model.f_collection,
|
|
106
|
+
v-el:sk v-scale="[model.f_collection, 2]" disabled>
|
|
107
107
|
</div>
|
|
108
108
|
<div class="col-sm-1 form-group">
|
|
109
109
|
<give-change :curbalance="curbalance" :collection.sync="model.f_collection" v-ref:givechange></give-change>
|
|
@@ -128,12 +128,12 @@
|
|
|
128
128
|
<div class="col-sm-4 form-group">
|
|
129
129
|
<label for="f_preamount" class=" font_normal_body"> 优惠金额</label>
|
|
130
130
|
<input class="input_search" style="width:60%" type="number" v-model="model.f_privilege_money"
|
|
131
|
-
v-scale="[model.f_privilege_money,
|
|
131
|
+
v-scale="[model.f_privilege_money, 2]" placeholder="优惠金额" disabled>
|
|
132
132
|
</div>
|
|
133
133
|
<div class="col-sm-4 form-group">
|
|
134
134
|
<label for="f_preamount" class=" font_normal_body"> 实际收款</label>
|
|
135
135
|
<input class="input_search" style="width:60%" type="number" v-model="model.f_after_discount"
|
|
136
|
-
v-scale="[model.f_after_discount,
|
|
136
|
+
v-scale="[model.f_after_discount, 2]" placeholder="优惠后收款" disabled>
|
|
137
137
|
</div>
|
|
138
138
|
</div>
|
|
139
139
|
<div class="row" v-if="model.f_payment[0].includes('POS')">
|
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex-row">
|
|
3
|
+
<div class="span">
|
|
4
|
+
<validator name='v'>
|
|
5
|
+
<form novalidate class="form-horizontal">
|
|
6
|
+
<div class="row" v-if="isGas">
|
|
7
|
+
<div class="col-sm-4" :class="[$v.f_pregas.dctest ? 'has-error' : 'has-success']">
|
|
8
|
+
<label class="font_normal_body">应补气量</label>
|
|
9
|
+
<input class="input_search" style="width:60%" type="number" @blur="pregas"
|
|
10
|
+
v-validate:f_pregas='{ dctest: [0, ">=" ]}' v-model="model.f_pregas" placeholder="应补气量" v-ref:f_pregas>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="col-sm-4">
|
|
13
|
+
<label for="f_add_gas" class="font_normal_body">是否入累计</label>
|
|
14
|
+
<v-select id="f_add_gas"
|
|
15
|
+
v-model="model.f_add_gas"
|
|
16
|
+
placeholder='请选择'
|
|
17
|
+
:value.sync="model.f_add_gas"
|
|
18
|
+
:options='addGas'
|
|
19
|
+
close-on-select clear-button>
|
|
20
|
+
</v-select>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="col-sm-4">
|
|
23
|
+
<label for="f_write_card" style="color: red" class=" font_normal_body">是否写卡</label>
|
|
24
|
+
<v-select id="f_write_card"
|
|
25
|
+
v-model="model.f_write_card"
|
|
26
|
+
placeholder='是否写卡'
|
|
27
|
+
value-single
|
|
28
|
+
:value.sync="model.f_write_card"
|
|
29
|
+
:options='writecard'
|
|
30
|
+
close-on-select clear-button></v-select>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="row" v-if="!isGas">
|
|
34
|
+
<div class="col-sm-4">
|
|
35
|
+
<label for="f_preamount" class=" font_normal_body">应补金额:</label>
|
|
36
|
+
<input class="input_search" style="width:60%" type="number" min = "0" v-model="model.f_preamount" placeholder="金额">
|
|
37
|
+
</div>
|
|
38
|
+
<div class="col-sm-4">
|
|
39
|
+
<label for="f_add_gas" class="font_normal_body">是否入累计:</label>
|
|
40
|
+
<v-select v-model="model.f_add_gas"
|
|
41
|
+
placeholder='请选择'
|
|
42
|
+
:value.sync="model.f_add_gas"
|
|
43
|
+
:options='addGas'
|
|
44
|
+
close-on-select clear-button>
|
|
45
|
+
</v-select>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
<div class="row" style="margin-top:10px;">
|
|
49
|
+
<label for="f_reason" class=" font_normal_body">备  注</label>
|
|
50
|
+
<input class="input_search" style="width:55%" rows="1" v-model="model.f_reason" placeholder="备注">
|
|
51
|
+
</div>
|
|
52
|
+
</form>
|
|
53
|
+
<print-bill :show="print" :bill-config='config' :bill-data='billData' :data='row' @toggle="close" @printok="printok" v-ref:printbill></print-bill>
|
|
54
|
+
<accept-bill :show="acceptprint" :bill-url='acceptUrl' v-on:toggle="closeAccept" :data='row' :billdata="printData" v-ref:acceptbill @closeaccept="closeAccept"></accept-bill>
|
|
55
|
+
<div style="text-align:right;margin-top: 2%">
|
|
56
|
+
<button class="button_search" @click="accept()" v-if="config.hasAcceptance" :disabled='!$v.valid'>受理单</button>
|
|
57
|
+
<button class="button_search" @click="confirm()" :disabled='!$v.valid' >确认</button>
|
|
58
|
+
<button class="button_clear" @click="clean()" >取消</button>
|
|
59
|
+
</div>
|
|
60
|
+
</validator>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
<upload :blodid="blodid" isremark="true" fusetype="其他补气"></upload>
|
|
64
|
+
</template>
|
|
65
|
+
<script>
|
|
66
|
+
let otherGasGen = async function (self) {
|
|
67
|
+
// 划价
|
|
68
|
+
let data = self.getSell()
|
|
69
|
+
|
|
70
|
+
// 获取最后一次操作
|
|
71
|
+
let getLastOper = await self.$resetpost('rs/logic/sale_getLastOper', {data: {f_userfiles_id: self.row.f_userfiles_id}}, {resolveMsg: null, rejectMsg: '获取最后一次操作失败'})
|
|
72
|
+
console.log('获取最后一次的操作。。', getLastOper)
|
|
73
|
+
|
|
74
|
+
// 验证是否可以不计入补气(这里不计入补气 == 掉气补气)
|
|
75
|
+
// if (data.f_add_gas === '不计入' && getLastOper.data.ispick === '已过表') {
|
|
76
|
+
// self.$showAlert('该客户最后一次购气已过表,禁止不计入补气,请修改为计入在进行补气', 'warning', 10000)
|
|
77
|
+
// return
|
|
78
|
+
// }
|
|
79
|
+
|
|
80
|
+
data.f_total_gas = data.f_add_gas === '计入' ? (self.row.f_total_gas - 0) + (self.model.f_pregas - 0) : (self.row.f_total_gas - 0)
|
|
81
|
+
data.f_total_fee = data.f_add_gas === '计入' ? (self.row.f_total_fee - 0) + (self.model.f_preamount - 0) : (self.row.f_total_fee - 0)
|
|
82
|
+
|
|
83
|
+
// 组织划价model
|
|
84
|
+
let param = {
|
|
85
|
+
f_price_id: self.row.f_price_id,
|
|
86
|
+
f_userfiles_id: self.row.f_userfiles_id,
|
|
87
|
+
f_user_id: self.row.f_user_id,
|
|
88
|
+
f_meter_type: self.row.f_meter_type
|
|
89
|
+
}
|
|
90
|
+
// 若是气量卡表 temp为金额 若是金额卡表 temp为气量
|
|
91
|
+
if (self.isGas) {
|
|
92
|
+
data.f_pregas = self.model.f_pregas
|
|
93
|
+
// let fee = await self.$CommonService.gasCalculate(param, self.model.f_pregas)
|
|
94
|
+
// data.f_preamount = fee.data.chargenum
|
|
95
|
+
} else {
|
|
96
|
+
data.f_preamount = self.model.f_preamount
|
|
97
|
+
let gas = await self.$CommonService.feeCalculate(param, self.model.f_preamount)
|
|
98
|
+
data.f_pregas = gas.data.gas
|
|
99
|
+
}
|
|
100
|
+
data.f_userfiles_id = {
|
|
101
|
+
f_userfiles_id: self.row.f_userfiles_id,
|
|
102
|
+
f_user_id: self.row.f_user_id,
|
|
103
|
+
version: self.row.version,
|
|
104
|
+
f_times: self.row.cardInfo.Times + 1,
|
|
105
|
+
f_total_gas: data.f_add_gas === '计入' ? (self.row.f_total_gas - 0) + (self.model.f_pregas - 0) : (self.row.f_total_gas - 0),
|
|
106
|
+
f_total_fee: data.f_add_gas === '计入' ? (self.row.f_total_fee - 0) + (self.model.f_preamount - 0) : (self.row.f_total_fee - 0),
|
|
107
|
+
f_write_totalgas: data.f_add_gas === '计入' ? (self.row.f_write_totalgas - 0) + (self.model.f_pregas - 0) : (self.row.f_write_totalgas - 0),
|
|
108
|
+
f_write_totalfee: data.f_add_gas === '计入' ? (self.row.f_write_totalfee - 0) + (self.model.f_preamount - 0) : (self.row.f_write_totalfee - 0),
|
|
109
|
+
f_balance_gas: 0,
|
|
110
|
+
f_balance_amount: 0
|
|
111
|
+
}
|
|
112
|
+
if (self.row.f_meter_type === '物联网表') {
|
|
113
|
+
if (self.row.f_calculation === '预付费' || (self.row.f_hascard == '是' && self.row.f_calculation == '表端结算')) {
|
|
114
|
+
if (self.row.f_billing === '按气量') {
|
|
115
|
+
data.f_userfiles_id.f_balance_gas = (self.row.f_balance_gas - 0) + (self.model.f_pregas - 0)
|
|
116
|
+
} else {
|
|
117
|
+
data.f_userfiles_id.f_balance_amount = (self.row.f_balance_amount - 0) + (self.model.f_preamount - 0)
|
|
118
|
+
}
|
|
119
|
+
} else {
|
|
120
|
+
data.f_userinfo_id = {
|
|
121
|
+
f_userinfo_id: self.row.f_userinfo_id,
|
|
122
|
+
f_balance: (self.row.f_balance - 0) + (self.model.f_preamount - 0),
|
|
123
|
+
f_real_balance: (self.row.f_real_balance - 0) + (self.model.f_preamount - 0),
|
|
124
|
+
version: self.row.userinfo_version
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
} else if (self.row.f_meter_type === '机表') {
|
|
128
|
+
data.f_user_id.f_balance_amount = (self.row.f_balance_amount - 0) + (self.model.f_preamount - 0)
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
let cardId = self.row.f_card_id
|
|
132
|
+
if (self.row.f_tag && self.row.f_tag !== 'null') {
|
|
133
|
+
// 截取用户编号后四位
|
|
134
|
+
data.f_userfiles_id.f_card_id = cardId = self.row.f_tag + self.row.f_card_id
|
|
135
|
+
data.f_userfiles_id.f_tag = null
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// 保存表类型
|
|
139
|
+
data.f_meter_type = self.row.f_meter_type
|
|
140
|
+
if(!(self.row.f_hascard==null) && !(self.row.f_share_times==null) && self.row.f_meter_type =='物联网表' && self.row.f_hascard == '是' && self.row.f_share_times == '是'){
|
|
141
|
+
data.f_times = self.row.f_times+1
|
|
142
|
+
}else{
|
|
143
|
+
data.f_times = self.row.cardInfo.Times + 1
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
let result = await self.$resetpost('rs/logic/sale_fillGas', data, {resolveMsg: null, rejectMsg: '补气报错!!!'})
|
|
147
|
+
|
|
148
|
+
if (self.row.f_meter_type == '机表' || self.model.f_write_card ==='不写卡') {
|
|
149
|
+
self.$showAlert('补气成功', 'success', 2000)
|
|
150
|
+
return result.data.id
|
|
151
|
+
} else {
|
|
152
|
+
try {
|
|
153
|
+
// 写卡操作
|
|
154
|
+
let cardParams = await self.$resetpost('rs/logic/stairCard', {data: {f_card_id: cardId + '', f_alias: self.row.f_alias, f_user_id: self.row.f_user_id}}, {resolveMsg: null, rejectMsg: '获取写卡参数失败'})
|
|
155
|
+
|
|
156
|
+
// 获取写卡参数
|
|
157
|
+
let params = self.getWriteCard(cardParams, self.row, data)
|
|
158
|
+
params.kh = cardId
|
|
159
|
+
params.kzt = getLastOper.data.ispick === '未过表' && getLastOper.data.lastsell_oper === '发卡售气' ? '0' : '1'
|
|
160
|
+
if(!(self.row.f_hascard==null) && !(self.row.f_share_times==null) && self.row.f_meter_type =='物联网表' && self.row.f_hascard == '是' && self.row.f_share_times == '是'){
|
|
161
|
+
params.cs = self.row.f_times+1
|
|
162
|
+
}
|
|
163
|
+
console.log('获取其他补气写卡参数,,', params)
|
|
164
|
+
|
|
165
|
+
let url = (getLastOper.data.last_oper === '补卡' || getLastOper.data.last_oper === '换表')
|
|
166
|
+
? 'http://127.0.0.1:8003/WriteNewCard' : 'http://127.0.0.1:8003/WriteGasCard'
|
|
167
|
+
|
|
168
|
+
let cardRes = await self.$resetpost(url, params, {resolveMsg: null, rejectMsg: '补气卡服务错误'})
|
|
169
|
+
|
|
170
|
+
// 卡服务写卡异常,业务逻辑回滚
|
|
171
|
+
if (!cardParams || !result || cardRes.data.Err || cardRes.data.Exception) {
|
|
172
|
+
throw new Error(`卡服务错误:${cardRes.data.Err}${cardRes.data.Exception},请联系开发人员处理!!`)
|
|
173
|
+
} else {
|
|
174
|
+
await self.$CommonService.updatePassword(self.row, cardRes)
|
|
175
|
+
self.$showAlert('补气成功', 'success', 2000)
|
|
176
|
+
return result.data.id
|
|
177
|
+
}
|
|
178
|
+
} catch (error) {
|
|
179
|
+
self.$showAlert(error, 'danger', 0)
|
|
180
|
+
let rollback = {
|
|
181
|
+
id: result.data.id,
|
|
182
|
+
f_card_id: self.row.f_card_id
|
|
183
|
+
}
|
|
184
|
+
if (self.row.f_tag) {
|
|
185
|
+
rollback.f_tag = self.row.f_tag
|
|
186
|
+
}
|
|
187
|
+
await self.$resetpost('rs/logic/otherGasRollback', {data: rollback}, {rejectMsg: '其他补气回滚出错', resolveMsg: null})
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
let readyGen = async function (self) {
|
|
193
|
+
console.log('其他补气,,,', self.row)
|
|
194
|
+
await self.$getConfig(self, 'OtherGas')
|
|
195
|
+
console.log('其他补气config', self.config)
|
|
196
|
+
self.model.f_add_gas = [self.config.addGas]
|
|
197
|
+
self.model.f_write_card=self.config.writeCard
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export default {
|
|
201
|
+
title: '其他补气',
|
|
202
|
+
data () {
|
|
203
|
+
return {
|
|
204
|
+
isGas: false,
|
|
205
|
+
config: {
|
|
206
|
+
hasPrint: false, // 默认打票
|
|
207
|
+
hasBillManage: false, // 默认不启用发票管理
|
|
208
|
+
addGas: '计入',
|
|
209
|
+
billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
|
|
210
|
+
printType: '普通收据', // 收据/电子票/专用发票/国税发票
|
|
211
|
+
payment: '现金缴费',
|
|
212
|
+
hasAcceptance: false, // 是否需要打印受理单
|
|
213
|
+
writeCard: '写卡'
|
|
214
|
+
},
|
|
215
|
+
acceptprint: false,
|
|
216
|
+
acceptUrl: '',
|
|
217
|
+
printData: {
|
|
218
|
+
reason: '',
|
|
219
|
+
fillgas: '',
|
|
220
|
+
fillamount: ''
|
|
221
|
+
},
|
|
222
|
+
model: {
|
|
223
|
+
f_write_card: '写卡',
|
|
224
|
+
f_pregas: 0,
|
|
225
|
+
f_preamount: 0,
|
|
226
|
+
f_reason: '',
|
|
227
|
+
f_add_gas: '不计入'
|
|
228
|
+
},
|
|
229
|
+
|
|
230
|
+
print: false,
|
|
231
|
+
billData: {
|
|
232
|
+
url: 'rs/report/acceptOtherGas_bill',
|
|
233
|
+
billnumber: ''
|
|
234
|
+
},
|
|
235
|
+
writecard: [{label: '写卡',value:'写卡'},{label: '不写卡',value:'不写卡'}],
|
|
236
|
+
blodid: ''
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
props: ['row', 'cardData'],
|
|
240
|
+
ready () {
|
|
241
|
+
this.isGas = this.row.f_meter_type === '气量卡表' || this.row.f_collection_type == '按气量' || (this.row.f_calculation === '预付费' && this.row.f_billing === '按气量')
|
|
242
|
+
this.row.cardInfo = this.cardData
|
|
243
|
+
this.blodid = this.row.f_userinfo_id
|
|
244
|
+
console.log('卡信息', this.row.cardInfo)
|
|
245
|
+
readyGen(this)
|
|
246
|
+
},
|
|
247
|
+
methods: {
|
|
248
|
+
accept () {
|
|
249
|
+
// 打印受理单
|
|
250
|
+
console.log('其他补气model', this.model)
|
|
251
|
+
console.log('其他补气受累单中row', this.row)
|
|
252
|
+
this.printData.reason = this.model.f_comments ? `'${this.model.f_reason}'` : '' + `'${this.model.f_reason}'`
|
|
253
|
+
this.printData.fillgas = `'${this.model.f_pregas}'`
|
|
254
|
+
this.printData.fillamount = `'${this.model.f_preamount}'`
|
|
255
|
+
console.log('受累单中printData', this.printData)
|
|
256
|
+
this.acceptUrl = 'rs/report/acceptOtherGas_bill'
|
|
257
|
+
this.acceptprint = true
|
|
258
|
+
},
|
|
259
|
+
closeAccept () {
|
|
260
|
+
this.acceptprint = false
|
|
261
|
+
},
|
|
262
|
+
async confirm () {
|
|
263
|
+
let res = await otherGasGen(this)
|
|
264
|
+
if (this.config.hasPrint) {
|
|
265
|
+
if (this.config.hasBillManage) {
|
|
266
|
+
this.row.id = res
|
|
267
|
+
this.row.f_bill_type = '其他补气'
|
|
268
|
+
this.row.f_bill_style = ''
|
|
269
|
+
this.print = true
|
|
270
|
+
} else {
|
|
271
|
+
this.row.id = res
|
|
272
|
+
this.print = true
|
|
273
|
+
}
|
|
274
|
+
} else {
|
|
275
|
+
this.$dispatch('success')
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
pregas () {
|
|
279
|
+
// 对气量进行验证
|
|
280
|
+
if ((this.row.f_topup_ceil - 0) > 0 && (this.model.f_pregas - 0) > (this.row.f_topup_ceil - 0)) {
|
|
281
|
+
this.$showAlert(`您输入的气量不能大于该表的充值上限: ${this.row.f_topup_ceil}`, 'warning', 5000)
|
|
282
|
+
this.model.f_pregas = null
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
getSell () {
|
|
286
|
+
return {
|
|
287
|
+
f_balance: this.row.f_balance,
|
|
288
|
+
f_curbalance: this.row.f_balance,
|
|
289
|
+
f_card_id: this.row.f_card_id,
|
|
290
|
+
f_meternumber: this.row.f_meternumber,
|
|
291
|
+
|
|
292
|
+
f_comments: this.model.f_reason,
|
|
293
|
+
f_add_gas: this.model.f_add_gas[0],
|
|
294
|
+
f_type: '其他补气',
|
|
295
|
+
f_user_id: this.row.f_user_id,
|
|
296
|
+
f_userfiles_id: this.row.f_userfiles_id,
|
|
297
|
+
f_userinfo_id: this.row.f_userinfo_id,
|
|
298
|
+
f_user_name: this.row.f_user_name,
|
|
299
|
+
f_user_type: this.row.f_user_type,
|
|
300
|
+
f_gasproperties: this.row.f_gasproperties,
|
|
301
|
+
f_address: this.row.f_address,
|
|
302
|
+
f_meter_brand: this.row.f_meter_brand,
|
|
303
|
+
|
|
304
|
+
f_operat_type: '其他补气',
|
|
305
|
+
f_describe: `${this.$login.f.name}对客户${this.row.f_user_name}进行其他补气操作`,
|
|
306
|
+
f_state: '有效',
|
|
307
|
+
f_operator: this.$login.f.name,
|
|
308
|
+
f_operatorid: this.$login.f.id,
|
|
309
|
+
f_orgid: this.$login.f.orgid,
|
|
310
|
+
f_orgname: this.$login.f.orgs,
|
|
311
|
+
f_depid: this.$login.f.depids,
|
|
312
|
+
f_depname: this.$login.f.deps,
|
|
313
|
+
f_zoneid: this.$login.f.zoneid,
|
|
314
|
+
f_zones: this.$login.f.zones
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
getWriteCard (cardParams, row, data) {
|
|
318
|
+
let params = {
|
|
319
|
+
factory: row.f_alias, // 气表厂家
|
|
320
|
+
kh: row.f_card_id, // 卡号
|
|
321
|
+
kmm: row.f_card_password, // 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
322
|
+
bjql: row.f_police_gas, // 报警气量,t_gasbrand表中
|
|
323
|
+
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
324
|
+
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
325
|
+
bkcs: row.f_fillcard_times, // 补卡次数,从补卡表里通过表编号获得
|
|
326
|
+
ql: data.f_pregas, // 预购气量
|
|
327
|
+
cs: row.cardInfo.Times + 1, // 求购气次数,先开户为1
|
|
328
|
+
iotTimes: row.f_iot_times, // 远传次数
|
|
329
|
+
money: data.f_preamount, // 购气金额
|
|
330
|
+
klx: row.f_coding,
|
|
331
|
+
kzt: '1',
|
|
332
|
+
dqdm: row.f_area_code,
|
|
333
|
+
meterid: row.f_meternumber ? row.f_meternumber : 0 // 表号
|
|
334
|
+
// meternumber: row.f_meternumber ? row.f_meternumber : 0
|
|
335
|
+
}
|
|
336
|
+
return Object.assign({}, this.$CommonService.writeCardParams(cardParams), params)
|
|
337
|
+
},
|
|
338
|
+
close () {
|
|
339
|
+
this.print = false
|
|
340
|
+
this.clean()
|
|
341
|
+
},
|
|
342
|
+
clean () {
|
|
343
|
+
this.$info('取消操作')
|
|
344
|
+
this.$dispatch('cancelclean', this.row)
|
|
345
|
+
},
|
|
346
|
+
printok () {
|
|
347
|
+
this.$dispatch('success')
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
computed: {
|
|
351
|
+
addGas () {
|
|
352
|
+
return [{label: '计入', value: '计入'}, {label: '不计入', value: '不计入'}]
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
</script>
|
|
357
|
+
|
|
358
|
+
<style>
|
|
359
|
+
</style>
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
:class="[$v.f_pregas.required || $v.f_pregas.dctest? 'has-error' : 'has-success']">
|
|
19
19
|
<label for="f_pregas" class=" font_normal_body">*预购气量</label>
|
|
20
20
|
<input class="input_search" style="width:60%" type="number" id="fouces"
|
|
21
|
+
v-scale="[model.f_pregas, 2]"
|
|
21
22
|
@blur="pregas()" v-model="model.f_pregas" :disabled="config.calculatePreByCollection"
|
|
22
23
|
v-validate:f_pregas='{required: true, dctest: [maxgas, "<=" ]}' placeholder="预购气量"
|
|
23
24
|
v-next-el='sk'>
|
|
@@ -29,7 +30,7 @@
|
|
|
29
30
|
<input class="input_search" style="width:60%" type="number" v-model="model.f_preamount"
|
|
30
31
|
@blur="preamount()" v-validate:f_preamount='{required: true, dctest: [maxmoney, "<=" ]}'
|
|
31
32
|
placeholder="预购金额" :disabled="config.calculatePreByCollection"
|
|
32
|
-
v-scale="[model.f_preamount,
|
|
33
|
+
v-scale="[model.f_preamount, 3]" placeholder="预购金额">
|
|
33
34
|
</div>
|
|
34
35
|
</div>
|
|
35
36
|
<div class="row" style="margin-top:5px;">
|
|
@@ -67,7 +68,7 @@
|
|
|
67
68
|
<input class="input_search" style="width:60%" type="number"
|
|
68
69
|
v-model="model.f_totalcost"
|
|
69
70
|
v-validate:f_totalcost='{required: true, dctest: [(openFee - 0), ">=" ] }' placeholder="应收金额"
|
|
70
|
-
v-next-el='sk' v-scale="[model.f_totalcost,
|
|
71
|
+
v-next-el='sk' v-scale="[model.f_totalcost, 3]" disabled>
|
|
71
72
|
</div>
|
|
72
73
|
</div>
|
|
73
74
|
|
|
@@ -91,17 +92,17 @@
|
|
|
91
92
|
@blur="calculatePreByCollection()"
|
|
92
93
|
v-show="config.calculatePreByCollection"
|
|
93
94
|
v-validate:f_collection='{required: true, dctest: [(model.f_totalcost - 0) + (openFee - 0), ">=" ] }'
|
|
94
|
-
v-el:sk v-scale="[model.f_collection,
|
|
95
|
+
v-el:sk v-scale="[model.f_collection, 2]" :disabled="$refs.givechange.promptText != ''">
|
|
95
96
|
<input class="input_search" style="width:60%" type="number" v-model="model.f_collection"
|
|
96
97
|
v-show="!config.calculatePreByCollection"
|
|
97
98
|
v-validate:f_collection='{required: true, dctest: [(model.f_totalcost - 0) + (openFee - 0), ">=" ] }'
|
|
98
|
-
v-el:sk v-scale="[model.f_collection,
|
|
99
|
+
v-el:sk v-scale="[model.f_collection, 2]" :disabled="$refs.givechange.promptText != ''">
|
|
99
100
|
</div>
|
|
100
101
|
<div class="col-sm-3 form-group" v-if="row.f_collection_type === '按金额'">
|
|
101
102
|
<label for="f_collection" class=" font_normal_body">*收  款</label>
|
|
102
103
|
<input class="input_search" style="width:50%" type="number" v-model="model.f_collection"
|
|
103
104
|
@blur="config.calculatePreByCollection && calculatePreByCollection()"
|
|
104
|
-
v-el:sk v-scale="[model.f_collection,
|
|
105
|
+
v-el:sk v-scale="[model.f_collection, 2]" :disabled="$refs.givechange.promptText != ''">
|
|
105
106
|
</div>
|
|
106
107
|
<div class="col-sm-1 form-group">
|
|
107
108
|
<give-change :curbalance="curbalance" :collection.sync="model.f_collection"
|
|
@@ -27,4 +27,6 @@ export default function () {
|
|
|
27
27
|
Vue.component('show-card-sell-gas', (resolve) => { require(['./ShowCardSellGas'], resolve) })
|
|
28
28
|
// 无卡收费
|
|
29
29
|
Vue.component('no-card-meter-center', (resolve) => { require(['./NoCardMeterCenter'], resolve) })
|
|
30
|
+
// 无卡收费
|
|
31
|
+
Vue.component('other-gas', (resolve) => { require(['./OtherGas'], resolve) })
|
|
30
32
|
}
|
package/src/main.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import Vue from 'vue'
|
|
2
|
-
import all from 'vue-client/src/all'
|
|
3
|
-
import App from './App'
|
|
4
|
-
import system from 'system-clients/src/system'
|
|
5
|
-
import sale from './sale'
|
|
6
|
-
import wenxi from './filiale/
|
|
7
|
-
// import FilialeSale from './filiale/yuansheng/sale'
|
|
8
|
-
import address from 'address-client/src/address'
|
|
9
|
-
import ldap from 'ldap-clients/src/ldap'
|
|
10
|
-
import VueClipboard from 'vue-clipboard2'
|
|
11
|
-
|
|
12
|
-
Vue.use(VueClipboard)
|
|
13
|
-
Vue.config.silent = true
|
|
14
|
-
|
|
15
|
-
all()
|
|
16
|
-
system(false)
|
|
17
|
-
sale()
|
|
18
|
-
wenxi()
|
|
19
|
-
// FilialeSale()
|
|
20
|
-
address()
|
|
21
|
-
ldap()
|
|
22
|
-
require('system-clients/src/styles/less/bootstrap.less')
|
|
23
|
-
|
|
24
|
-
new Vue({
|
|
25
|
-
el: 'body',
|
|
26
|
-
components: { App }
|
|
27
|
-
})
|
|
1
|
+
import Vue from 'vue'
|
|
2
|
+
import all from 'vue-client/src/all'
|
|
3
|
+
import App from './App'
|
|
4
|
+
import system from 'system-clients/src/system'
|
|
5
|
+
import sale from './sale'
|
|
6
|
+
import wenxi from './filiale/wuhai/sale'
|
|
7
|
+
// import FilialeSale from './filiale/yuansheng/sale'
|
|
8
|
+
import address from 'address-client/src/address'
|
|
9
|
+
import ldap from 'ldap-clients/src/ldap'
|
|
10
|
+
import VueClipboard from 'vue-clipboard2'
|
|
11
|
+
|
|
12
|
+
Vue.use(VueClipboard)
|
|
13
|
+
Vue.config.silent = true
|
|
14
|
+
|
|
15
|
+
all()
|
|
16
|
+
system(false)
|
|
17
|
+
sale()
|
|
18
|
+
wenxi()
|
|
19
|
+
// FilialeSale()
|
|
20
|
+
address()
|
|
21
|
+
ldap()
|
|
22
|
+
require('system-clients/src/styles/less/bootstrap.less')
|
|
23
|
+
|
|
24
|
+
new Vue({
|
|
25
|
+
el: 'body',
|
|
26
|
+
components: { App }
|
|
27
|
+
})
|