sale-client 3.6.69 → 3.6.70
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/package.json
CHANGED
|
@@ -0,0 +1,318 @@
|
|
|
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">
|
|
7
|
+
<div class="col-sm-4 form-group">
|
|
8
|
+
<label class="font_normal_body"> 操作 </label>
|
|
9
|
+
<v-select v-if="this.row.f_collection_type==='按金额'" :value.sync="model.f_operat_type"
|
|
10
|
+
:options='operator_type' placeholder='请选择'
|
|
11
|
+
selected="赠费"
|
|
12
|
+
style="width:60%"
|
|
13
|
+
close-on-select></v-select>
|
|
14
|
+
<v-select v-if="this.row.f_collection_type==='按气量'" :value.sync="model.f_operat_type"
|
|
15
|
+
:options='operator_type2' placeholder='请选择'
|
|
16
|
+
selected="赠气"
|
|
17
|
+
style="width:60%"
|
|
18
|
+
close-on-select></v-select>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="col-sm-4" :class="[$v.f_pregas.dctest ? 'has-error' : 'has-success']">
|
|
21
|
+
<label class="font_normal_body">赠气</label>
|
|
22
|
+
<input class="input_search" style="width:60%" type="number" @blur="pregas"
|
|
23
|
+
v-validate:f_pregas='{ dctest: [0, ">" ]}' v-model="model.f_pregas" placeholder="赠气量" v-ref:f_pregas>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="col-sm-4" :class="[$v.f_preamount.dctest ? 'has-error' : 'has-success']">
|
|
26
|
+
<label for="f_preamount" class=" font_normal_body">金额:</label>
|
|
27
|
+
<input class="input_search" style="width:60%" type="number" v-model="model.f_preamount" placeholder="金额"
|
|
28
|
+
@blur="preamount()"
|
|
29
|
+
v-validate:f_preamount='{ dctest: [0, ">" ]}'>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
<div class="row" style="margin-top:10px;">
|
|
33
|
+
<label for="f_reason" class=" font_normal_body">备  注</label>
|
|
34
|
+
<input class="input_search" style="width:55%" rows="1" v-model="model.f_reason" placeholder="备注">
|
|
35
|
+
</div>
|
|
36
|
+
</form>
|
|
37
|
+
<div style="text-align:right;margin-top: 2%">
|
|
38
|
+
|
|
39
|
+
<button class="button_search" @click="confirm()" :disabled='!$v.valid' >确认</button>
|
|
40
|
+
<button class="button_clear" @click="clean()" >取消</button>
|
|
41
|
+
</div>
|
|
42
|
+
</validator>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
<upload :blodid="row.f_userinfo_id" isremark="true" fusetype="赠气"></upload>
|
|
46
|
+
</template>
|
|
47
|
+
<script>
|
|
48
|
+
let preamountGen = async function (self) {
|
|
49
|
+
let calFee = self.model.f_preamount
|
|
50
|
+
let getGas = await self.$CommonService.feeCalculate(self.model, calFee)
|
|
51
|
+
if (getGas.data.gas) {
|
|
52
|
+
if (self.row.f_isdecimal === '是') {
|
|
53
|
+
if (self.row.f_alias === 'QiaoSong') {
|
|
54
|
+
self.model.f_pregas = (getGas.data.gas - 0).toFixed(1)
|
|
55
|
+
} else {
|
|
56
|
+
self.model.f_pregas = (getGas.data.gas - 0).toFixed(4)
|
|
57
|
+
}
|
|
58
|
+
self.dymoney = 0
|
|
59
|
+
} else {
|
|
60
|
+
// 如果不支持小数,将划价出的多余非整数气量进行划价为金额
|
|
61
|
+
let tempnum = Math.floor(getGas.data.gas - 0)
|
|
62
|
+
if (getGas.data.gas > tempnum) { // getGas.data.gas-tempnum-0
|
|
63
|
+
let dymoney1 = await self.$CommonService.gasCalculate(self.model, (tempnum).toFixed(4))
|
|
64
|
+
if (dymoney1.data.money) {
|
|
65
|
+
self.dymoney = (getGas.data.money - 0).toFixed(2) - (dymoney1.data.money - 0).toFixed(2)
|
|
66
|
+
}
|
|
67
|
+
} else {
|
|
68
|
+
self.dymoney = 0
|
|
69
|
+
}
|
|
70
|
+
self.model.f_pregas = Math.floor(getGas.data.gas - 0)
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
// 不划气量,归零
|
|
74
|
+
if (self.config.priceCalculation) {
|
|
75
|
+
self.model.f_pregas = 0
|
|
76
|
+
}
|
|
77
|
+
self.model.f_totalcost = ((self.row.f_balance - 0) > (self.model.f_preamount - 0) ? 0 : ((self.model.f_preamount - 0) - (self.row.f_balance - 0)).toFixed(4))
|
|
78
|
+
|
|
79
|
+
self.model.chargeprice = getGas.data.chargeprice
|
|
80
|
+
Object.assign(self.model, self.model, getGas.data)
|
|
81
|
+
self.model.f_totalcost = ((self.model.f_totalcost - 0) - (self.dymoney - 0)).toFixed(2)
|
|
82
|
+
if (self.config.floor) {
|
|
83
|
+
self.model.f_totalcost = Math.ceil(self.model.f_totalcost)
|
|
84
|
+
}
|
|
85
|
+
self.model.f_collection = self.model.f_totalcost
|
|
86
|
+
self.model.f_preamount = ((getGas.data.chargenum - 0) - (self.dymoney - 0))
|
|
87
|
+
if (self.model.f_payment == '赠气') {
|
|
88
|
+
self.model.f_totalcost = self.model.f_preamount
|
|
89
|
+
self.model.f_collection = 0
|
|
90
|
+
}
|
|
91
|
+
self.calText(getGas.data.chargeprice)
|
|
92
|
+
}
|
|
93
|
+
// 输入气量,换算金额
|
|
94
|
+
let pregasGen = async function (self) {
|
|
95
|
+
if (self.row.f_isdecimal === '是') {
|
|
96
|
+
self.model.f_pregas = (self.model.f_pregas - 0).toFixed(4)
|
|
97
|
+
} else {
|
|
98
|
+
self.model.f_pregas = (self.model.f_pregas - 0).toFixed(0)
|
|
99
|
+
}
|
|
100
|
+
self.model.f_meter_type = self.row.f_meter_type
|
|
101
|
+
let getAmount = await self.$CommonService.gasCalculate(self.model, self.model.f_pregas)
|
|
102
|
+
self.model.f_preamount = getAmount.data.chargenum
|
|
103
|
+
self.model.f_totalcost = (self.row.f_balance - 0) > (getAmount.data.chargenum - 0) ? 0 : ((getAmount.data.chargenum - 0) - (self.row.f_balance - 0)).toFixed(4)
|
|
104
|
+
Object.assign(self.model, self.model, getAmount.data)
|
|
105
|
+
self.model.chargeprice = getAmount.data.chargeprice
|
|
106
|
+
if (self.config.floor) {
|
|
107
|
+
self.model.f_totalcost = Math.ceil(self.model.f_totalcost)
|
|
108
|
+
}
|
|
109
|
+
self.model.f_collection = self.model.f_totalcost
|
|
110
|
+
if (self.model.f_payment == '赠气') {
|
|
111
|
+
self.model.f_totalcost = getAmount.data.chargenum
|
|
112
|
+
self.model.f_collection = 0
|
|
113
|
+
}
|
|
114
|
+
self.calText(getAmount.data.chargeprice)
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
let otherGasGen = async function (self) {
|
|
118
|
+
let data = self.getSell()
|
|
119
|
+
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)
|
|
120
|
+
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)
|
|
121
|
+
if (self.isGas) {
|
|
122
|
+
data.f_pregas = self.model.f_pregas
|
|
123
|
+
} else {
|
|
124
|
+
data.f_preamount = self.model.f_preamount
|
|
125
|
+
}
|
|
126
|
+
data.f_userfiles_id = {
|
|
127
|
+
f_userfiles_id: self.row.f_userfiles_id,
|
|
128
|
+
f_user_id: self.row.f_user_id,
|
|
129
|
+
version: self.row.version,
|
|
130
|
+
f_times: self.row.cardInfo.Times + 1,
|
|
131
|
+
f_total_gas: data.f_add_gas === '计入' ? (self.row.f_total_gas - 0) + (self.model.f_pregas - 0) : (self.row.f_total_gas - 0),
|
|
132
|
+
f_total_fee: data.f_add_gas === '计入' ? (self.row.f_total_fee - 0) + (self.model.f_preamount - 0) : (self.row.f_total_fee - 0),
|
|
133
|
+
f_balance_gas: 0,
|
|
134
|
+
f_balance_amount: 0
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
let cardId = self.row.f_card_id
|
|
138
|
+
if (self.row.f_tag && self.row.f_tag !== 'null') {
|
|
139
|
+
// 截取用户编号后四位
|
|
140
|
+
data.f_userfiles_id.f_card_id = cardId = self.row.f_tag + self.row.f_card_id
|
|
141
|
+
data.f_userfiles_id.f_tag = null
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// 保存表类型
|
|
145
|
+
data.f_meter_type = self.row.f_meter_type
|
|
146
|
+
data.f_times = self.row.cardInfo.Times + 1
|
|
147
|
+
|
|
148
|
+
let result = await self.$resetpost('rs/logic/fedWithgaIc', data, {resolveMsg: null, rejectMsg: '补气报错!!!'})
|
|
149
|
+
try {
|
|
150
|
+
// 写卡操作
|
|
151
|
+
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: '获取写卡参数失败'})
|
|
152
|
+
// 获取写卡参数
|
|
153
|
+
let params = self.getWriteCard(cardParams, self.row, data)
|
|
154
|
+
params.kh = cardId
|
|
155
|
+
console.log('获取其他补气写卡参数,,', params)
|
|
156
|
+
let url = 'http://127.0.0.1:8003/WriteGasCard'
|
|
157
|
+
let cardRes = await self.$resetpost(url, params, {resolveMsg: null, rejectMsg: '补气卡服务错误'})
|
|
158
|
+
|
|
159
|
+
// 卡服务写卡异常,业务逻辑回滚
|
|
160
|
+
if (!cardParams || !result || cardRes.data.Err || cardRes.data.Exception) {
|
|
161
|
+
throw new Error(`卡服务错误:${cardRes.data.Err}${cardRes.data.Exception},请联系开发人员处理!!`)
|
|
162
|
+
} else {
|
|
163
|
+
await self.$CommonService.updatePassword(self.row, cardRes)
|
|
164
|
+
self.$showAlert('赠气成功', 'success', 2000)
|
|
165
|
+
return result.data.id
|
|
166
|
+
}
|
|
167
|
+
} catch (error) {
|
|
168
|
+
self.$showAlert(error, 'danger', 0)
|
|
169
|
+
let rollback = {
|
|
170
|
+
id: result.data.id,
|
|
171
|
+
f_card_id: self.row.f_card_id
|
|
172
|
+
}
|
|
173
|
+
if (self.row.f_tag) {
|
|
174
|
+
rollback.f_tag = self.row.f_tag
|
|
175
|
+
}
|
|
176
|
+
await self.$resetpost('rs/logic/otherGasRollback', {data: rollback}, {rejectMsg: '赠气回滚出错', resolveMsg: null})
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export default {
|
|
181
|
+
title: '卡表赠气赠费',
|
|
182
|
+
data () {
|
|
183
|
+
return {
|
|
184
|
+
operator_type: [{label: '赠费', value: '卡表赠费'}, {label: '政府补贴', value: '政府补贴'}],
|
|
185
|
+
operator_type2: [{label: '赠气', value: '卡表赠气'}, {label: '政府补贴', value: '政府补贴'}],
|
|
186
|
+
isGas: false,
|
|
187
|
+
acceptprint: false,
|
|
188
|
+
acceptUrl: '',
|
|
189
|
+
printData: {
|
|
190
|
+
reason: '',
|
|
191
|
+
fillgas: '',
|
|
192
|
+
fillamount: ''
|
|
193
|
+
},
|
|
194
|
+
config: {
|
|
195
|
+
floor: false
|
|
196
|
+
},
|
|
197
|
+
model: {
|
|
198
|
+
f_pregas: 0,
|
|
199
|
+
f_preamount: 0,
|
|
200
|
+
f_reason: '',
|
|
201
|
+
f_operat_type: ''
|
|
202
|
+
// f_add_gas: '不计入'
|
|
203
|
+
},
|
|
204
|
+
print: false
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
props: ['row', 'cardData'],
|
|
208
|
+
ready () {
|
|
209
|
+
this.isGas = this.row.f_meter_type === '气量卡表' || this.row.f_collection_type == '按气量' || (this.row.f_calculation === '预付费' && this.row.f_billing === '按气量')
|
|
210
|
+
this.model.f_operat_type = this.isGas ? '卡表赠气' : '卡表赠费'
|
|
211
|
+
this.row.cardInfo = this.cardData
|
|
212
|
+
this.model.f_price_id = this.row.f_price_id
|
|
213
|
+
this.model.f_user_id = this.row.f_user_id
|
|
214
|
+
this.model.f_userfiles_id = this.row.f_userfiles_id
|
|
215
|
+
this.model.f_userinfo_id = this.row.f_userinfo_id
|
|
216
|
+
this.model.f_balance = this.row.f_alias === 'QiaoSong' ? Math.trunc(this.row.f_balance) : this.row.f_balance
|
|
217
|
+
console.log('卡信息', this.row.cardInfo)
|
|
218
|
+
},
|
|
219
|
+
methods: {
|
|
220
|
+
confirm () {
|
|
221
|
+
otherGasGen(this).then((res) => {
|
|
222
|
+
this.$dispatch('success')
|
|
223
|
+
})
|
|
224
|
+
},
|
|
225
|
+
pregas () {
|
|
226
|
+
// 对气量进行验证
|
|
227
|
+
if ((this.row.f_topup_ceil - 0) > 0 && (this.model.f_pregas - 0) > (this.row.f_topup_ceil - 0)) {
|
|
228
|
+
this.$showAlert(`您输入的气量不能大于该表的充值上限: ${this.row.f_topup_ceil}`, 'warning', 5000)
|
|
229
|
+
this.model.f_pregas = null
|
|
230
|
+
} else {
|
|
231
|
+
try {
|
|
232
|
+
pregasGen(this)
|
|
233
|
+
} catch (error) {
|
|
234
|
+
this.$showAlert(`赠气划价错误,错误类型:${error}`, 'danger', 0)
|
|
235
|
+
this.$dispatch('error', '发卡售气', this.model, error)
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
preamount () {
|
|
240
|
+
if (this.model.f_preamount && this.model.f_preamount > 0) {
|
|
241
|
+
try {
|
|
242
|
+
preamountGen(this)
|
|
243
|
+
} catch (error) {
|
|
244
|
+
this.$showAlert(`赠气划价错误,错误类型:${error}`, 'danger', 0)
|
|
245
|
+
this.$dispatch('error', '赠气', this.model, error)
|
|
246
|
+
}
|
|
247
|
+
} else {
|
|
248
|
+
this.model.f_preamount = null
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
getSell () {
|
|
252
|
+
return {
|
|
253
|
+
f_balance: this.row.f_balance,
|
|
254
|
+
f_curbalance: this.row.f_balance,
|
|
255
|
+
f_card_id: this.row.f_card_id,
|
|
256
|
+
f_comments: this.model.f_reason,
|
|
257
|
+
f_add_gas: '计入',
|
|
258
|
+
f_type: this.model.f_operat_type,
|
|
259
|
+
f_user_id: this.row.f_user_id,
|
|
260
|
+
f_userfiles_id: this.row.f_userfiles_id,
|
|
261
|
+
f_userinfo_id: this.row.f_userinfo_id,
|
|
262
|
+
f_user_name: this.row.f_user_name,
|
|
263
|
+
f_user_type: this.row.f_user_type,
|
|
264
|
+
f_gasproperties: this.row.f_gasproperties,
|
|
265
|
+
f_address: this.row.f_address,
|
|
266
|
+
f_meter_brand: this.row.f_meter_brand,
|
|
267
|
+
f_operat_type: '其他补气',
|
|
268
|
+
f_describe: `${this.$login.f.name}对客户${this.row.f_user_name}进行${this.model.f_operat_type}操作`,
|
|
269
|
+
f_state: '有效',
|
|
270
|
+
f_operator: this.$login.f.name,
|
|
271
|
+
f_operatorid: this.$login.f.id,
|
|
272
|
+
f_orgid: this.$login.f.orgid,
|
|
273
|
+
f_orgname: this.$login.f.orgs,
|
|
274
|
+
f_depid: this.$login.f.depids,
|
|
275
|
+
f_depname: this.$login.f.deps,
|
|
276
|
+
f_zoneid: this.$login.f.zoneid,
|
|
277
|
+
f_zones: this.$login.f.zones
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
getWriteCard (cardParams, row, data) {
|
|
281
|
+
let params = {
|
|
282
|
+
factory: row.f_alias, // 气表厂家
|
|
283
|
+
kh: row.f_card_id, // 卡号
|
|
284
|
+
kmm: row.f_card_password, // 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
285
|
+
bjql: row.f_police_gas, // 报警气量,t_gasbrand表中
|
|
286
|
+
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
287
|
+
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
288
|
+
bkcs: row.f_fillcard_times, // 补卡次数,从补卡表里通过表编号获得
|
|
289
|
+
ql: data.f_pregas, // 预购气量
|
|
290
|
+
cs: row.cardInfo.Times + 1, // 求购气次数,先开户为1
|
|
291
|
+
money: data.f_preamount, // 购气金额
|
|
292
|
+
klx: row.f_coding,
|
|
293
|
+
kzt: '1',
|
|
294
|
+
dqdm: row.f_area_code,
|
|
295
|
+
meterid: row.f_meternumber ? row.f_meternumber : 0 // 表号
|
|
296
|
+
// meternumber: row.f_meternumber ? row.f_meternumber : 0
|
|
297
|
+
}
|
|
298
|
+
return Object.assign({}, this.$CommonService.writeCardParams(cardParams), params)
|
|
299
|
+
},
|
|
300
|
+
close () {
|
|
301
|
+
this.print = false
|
|
302
|
+
this.clean()
|
|
303
|
+
},
|
|
304
|
+
clean () {
|
|
305
|
+
this.$info('取消操作')
|
|
306
|
+
this.$dispatch('cancelclean', this.row)
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
computed: {
|
|
310
|
+
addGas () {
|
|
311
|
+
return [{label: '计入', value: '计入'}, {label: '不计入', value: '不计入'}]
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
</script>
|
|
316
|
+
|
|
317
|
+
<style>
|
|
318
|
+
</style>
|
|
@@ -26,4 +26,6 @@ export default function () {
|
|
|
26
26
|
Vue.component('iot-refund', (resolve) => { require(['./IOTRefund'], resolve) })
|
|
27
27
|
// 物联网赠气
|
|
28
28
|
Vue.component('iotTable', (resolve) => { require(['./iotTable'], resolve) })
|
|
29
|
+
// 卡表赠气
|
|
30
|
+
Vue.component('icTable', (resolve) => { require(['./icTable'], resolve) })
|
|
29
31
|
}
|
package/src/main.js
CHANGED
|
@@ -3,7 +3,7 @@ import all from 'vue-client/src/all'
|
|
|
3
3
|
import App from './App'
|
|
4
4
|
import system from 'system-clients/src/system'
|
|
5
5
|
import sale from './sale'
|
|
6
|
-
import wenxi from './filiale/
|
|
6
|
+
import wenxi from './filiale/yuansheng/sale'
|
|
7
7
|
// import FilialeSale from './filiale/yuansheng/sale'
|
|
8
8
|
import address from 'address-client/src/address'
|
|
9
9
|
import ldap from 'ldap-clients/src/ldap'
|