sale-client 4.2.24 → 4.2.26
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/.gradle/5.2.1/fileHashes/fileHashes.lock +0 -0
- package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/.gradle/buildOutputCleanup/cache.properties +2 -2
- package/build/dev-server.js +6 -9
- package/package.json +1 -1
- package/src/filiale/fugou/components/revenue/comprehen/ComprehenOperation/newchangemeter/ChangeMeter.vue +16 -0
- package/src/filiale/meihekou/manualChargeCenter.vue +394 -394
- package/src/filiale/qingjian/MeterinfoTest.vue +27 -13
- package/src/filiale/qingjian/SafeCheck.vue +37 -4
- package/src/filiale/qingjian/UserEssentialInfoTest.vue +5 -5
- package/src/filiale/qingjian/WebHandQueryUser.vue +2 -2
- package/src/main.js +1 -1
- package/.gradle/8.10/checksums/checksums.lock +0 -0
- package/.gradle/8.10/executionHistory/executionHistory.bin +0 -0
- package/.gradle/8.10/executionHistory/executionHistory.lock +0 -0
- package/.gradle/8.10/fileHashes/fileHashes.bin +0 -0
- package/.gradle/8.10/fileHashes/fileHashes.lock +0 -0
- package/.gradle/8.10/gc.properties +0 -0
- package/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/.gradle/file-system.probe +0 -0
- /package/.gradle/{8.10 → 5.2.1}/fileChanges/last-build.bin +0 -0
- /package/.gradle/{8.10/dependencies-accessors → 5.2.1}/gc.properties +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#Mon
|
|
2
|
-
gradle.version=
|
|
1
|
+
#Mon Jul 29 08:34:01 CST 2024
|
|
2
|
+
gradle.version=5.2.1
|
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 ] = ['http://
|
|
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 = {
|
|
@@ -50,16 +50,13 @@ var devConfig = {
|
|
|
50
50
|
'/rs/pay': {
|
|
51
51
|
target: 'http://localhost:8080'
|
|
52
52
|
},
|
|
53
|
-
|
|
54
|
-
// pathRewrite: {
|
|
55
|
-
// '/api/af-revenue': '/af-revenue'
|
|
56
|
-
// },
|
|
57
|
-
// target: "http://localhost:8080"
|
|
58
|
-
// },
|
|
59
|
-
'/api': {
|
|
53
|
+
'/api/af-revenue': {
|
|
60
54
|
pathRewrite: {
|
|
61
|
-
'/api/af-revenue': '/
|
|
55
|
+
'/api/af-revenue': '/af-revenue'
|
|
62
56
|
},
|
|
57
|
+
target: "http://localhost:8080"
|
|
58
|
+
},
|
|
59
|
+
'/api': {
|
|
63
60
|
target: serverRul
|
|
64
61
|
},
|
|
65
62
|
'/rs': {
|
package/package.json
CHANGED
|
@@ -669,6 +669,22 @@ export default {
|
|
|
669
669
|
this.addTaskModalShow = true
|
|
670
670
|
},
|
|
671
671
|
async confirmbefore () {
|
|
672
|
+
// 校验是否存在需提示的记录,若存在则询问是否继续
|
|
673
|
+
try {
|
|
674
|
+
console.log('123999999')
|
|
675
|
+
let http = new HttpResetClass()
|
|
676
|
+
let change = await http.load('POST', 'api/af-revenue/logic/validateOwe', {data: {f_userinfo_id: this.row.f_userinfo_id}}, {resolveMsg: null, rejectMsg: '获取异常出错!!'})
|
|
677
|
+
console.log('1239999998', change)
|
|
678
|
+
let hasUnhand = change && change.data && change.data.unhand && change.data.unhand.length > 0
|
|
679
|
+
let hasOwe = change && change.data && change.data.owe && change.data.owe.length > 0
|
|
680
|
+
if (hasUnhand || hasOwe) {
|
|
681
|
+
let r = await this.$showMessage('存在相关异常/欠费记录,是否继续换表?', ['confirm', 'cancel'])
|
|
682
|
+
if (r !== 'confirm') { return }
|
|
683
|
+
}
|
|
684
|
+
} catch (e) {
|
|
685
|
+
// 接口异常时不中断原流程,仅按原逻辑继续
|
|
686
|
+
console.log('validateOwe 接口异常:', e)
|
|
687
|
+
}
|
|
672
688
|
if (this.model.metermessage.f_meter_type[0] !== '机表') {
|
|
673
689
|
if (!this.config.hasArrearsChange && this.books.data && this.books.data.length > 0) {
|
|
674
690
|
if (this.books.data[0].f_whether_pay === '否') {
|
|
@@ -1,394 +1,394 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="flex-row">
|
|
3
|
-
<div class="span" style="overflow-y: auto;">
|
|
4
|
-
<validator name='v'>
|
|
5
|
-
<form novalidate class="form-horizontal">
|
|
6
|
-
<div class="row">
|
|
7
|
-
<div class="col-sm-4">
|
|
8
|
-
<label for="f_paytype" class=" font_normal_body" title="参数名称:付款方式">收款方式</label>
|
|
9
|
-
<v-select id="f_payment"
|
|
10
|
-
v-model="f_payment"
|
|
11
|
-
placeholder='请选择'
|
|
12
|
-
:value.sync="model.f_payment"
|
|
13
|
-
:options='paytype'
|
|
14
|
-
close-on-select clear-button></v-select>
|
|
15
|
-
</div>
|
|
16
|
-
<div class="col-sm-4">
|
|
17
|
-
<label for="f_price" class="font_normal_body">单价</label>
|
|
18
|
-
<input class="input_search" style="width:60%" type="number" v-model="model.f_price" placeholder="请输入单价">
|
|
19
|
-
</div>
|
|
20
|
-
<div class="col-sm-4">
|
|
21
|
-
<label for="f_pregas" class=" font_normal_body">气量</label>
|
|
22
|
-
<input class="input_search" style="width:60%" type="number"
|
|
23
|
-
v-model="model.f_pregas" id="fpregas"
|
|
24
|
-
v-validate:f_pregas='{required: true, dctest: [maxgas, "<=" ]}' placeholder="请输入气量"
|
|
25
|
-
>
|
|
26
|
-
</div>
|
|
27
|
-
<div class="col-sm-4">
|
|
28
|
-
<label for="f_totalcost" class=" font_normal_body"> 金额</label>
|
|
29
|
-
<input class="input_search" style="width:60%" type="number" v-model="model.f_totalcost" placeholder="金额"
|
|
30
|
-
>
|
|
31
|
-
</div>
|
|
32
|
-
<div class="col-sm-4" v-if="row.f_collection_type === '按气量'"
|
|
33
|
-
:class="[$v.f_collection.required ? 'has-error' : 'has-success']">
|
|
34
|
-
<label for="f_collection" class=" font_normal_body">收款</label>
|
|
35
|
-
<input class="input_search" style="width:60%" type="number" v-model="model.f_collection"
|
|
36
|
-
v-validate:f_collection='{required: true, dctest: [model.f_totalcost, ">=" ] }'
|
|
37
|
-
v-el:sk v-scale="[model.f_totalcost, 2]" >
|
|
38
|
-
</div>
|
|
39
|
-
<div class="col-sm-4" v-if="row.f_collection_type === '按金额'">
|
|
40
|
-
<label for="f_collection" class=" font_normal_body">收款</label>
|
|
41
|
-
<input class="input_search" style="width:60%" type="number" v-model="model.f_collection"
|
|
42
|
-
v-el:sk v-scale="[model.f_collection, 4]" >
|
|
43
|
-
</div>
|
|
44
|
-
<div class="row" style="padding-top: 0.5em;">
|
|
45
|
-
<div class="col-sm-8">
|
|
46
|
-
<label for="f_comments" class="font_normal_body">备  注</label>
|
|
47
|
-
<input class="input_search" style="width:87%" v-model="model.f_comments" placeholder="备注">
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
|
|
51
|
-
</div>
|
|
52
|
-
</form>
|
|
53
|
-
<print-bill :show="print" :bill-config='config' v-ref:printbill :bill-data='billData' :data='row'
|
|
54
|
-
v-on:toggle="close" @printok="printok" :data='row'></print-bill>
|
|
55
|
-
<div style="text-align:right;height: 25%;">
|
|
56
|
-
<payment-code-button :clickable="!$v.valid || clickConfirm"
|
|
57
|
-
:payment.sync="model.f_payment" :payment-data="paytype"
|
|
58
|
-
@confirm-payment="confirm()">
|
|
59
|
-
</payment-code-button>
|
|
60
|
-
<button class="button_search btn-gn" @click="confirm()" :disabled='!$v.valid || clickConfirm'>确认</button>
|
|
61
|
-
<button class="button_clear btn-gn" @click="clean()">取消</button>
|
|
62
|
-
</div>
|
|
63
|
-
</validator>
|
|
64
|
-
<payment-code v-ref:paymentcode :payment="model.f_payment" :row="row" :money="model.f_collection"></payment-code>
|
|
65
|
-
<upload :blodid="row.f_userinfo_id" v-if="config.showupload" :businessid="randomBusinessId" isremark="true" fusetype="自定义收费"></upload>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
</template>
|
|
69
|
-
<script>
|
|
70
|
-
import Vue from 'vue'
|
|
71
|
-
|
|
72
|
-
// 输入金额,换算气量
|
|
73
|
-
let preamountGen = async function (self) {
|
|
74
|
-
let dymoney = 0
|
|
75
|
-
let calFee = (self.model.f_totalcost - 0) + (self.row.f_balance - 0)
|
|
76
|
-
let getGas = await self.$CommonService.feeCalculate(self.model, calFee)
|
|
77
|
-
if (getGas.data.gas) {
|
|
78
|
-
if (self.row.f_isdecimal === '是') {
|
|
79
|
-
if (self.row.f_alias === 'QiaoSong') {
|
|
80
|
-
self.model.f_pregas = (getGas.data.gas - 0).toFixed(1)
|
|
81
|
-
} else {
|
|
82
|
-
self.model.f_pregas = (getGas.data.gas - 0).toFixed(4)
|
|
83
|
-
}
|
|
84
|
-
} else {
|
|
85
|
-
let tempnum = Math.floor(getGas.data.gas - 0)
|
|
86
|
-
let dymoney1 = await self.$CommonService.gasCalculate(self.model, (tempnum).toFixed(4))
|
|
87
|
-
dymoney = (getGas.data.chargenum - 0).toFixed(2) - (dymoney1.data.chargenum - 0).toFixed(2)
|
|
88
|
-
self.model.f_pregas = Math.floor(getGas.data.gas - 0)
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
self.model.f_preamount = calFee - (dymoney - 0)
|
|
92
|
-
self.model.chargeprice = getGas.data.chargeprice
|
|
93
|
-
Object.assign(self.model, self.model, getGas.data)
|
|
94
|
-
self.model.f_totalcost = ((self.model.f_totalcost - 0) - (dymoney - 0)).toFixed(4)
|
|
95
|
-
// self.model.f_totalcost=Math.ceil(self.model.f_totalcost)
|
|
96
|
-
if(self.config.floor){
|
|
97
|
-
self.model.f_totalcost=Math.ceil(self.model.f_totalcost)
|
|
98
|
-
}
|
|
99
|
-
self.calText(getGas.data.chargeprice)
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
// 输入气量,换算金额
|
|
103
|
-
let pregasGen = async function (self) {
|
|
104
|
-
if (self.row.f_isdecimal === '是') {
|
|
105
|
-
self.model.f_pregas = (self.model.f_pregas - 0).toFixed(4)
|
|
106
|
-
} else {
|
|
107
|
-
self.model.f_pregas = (self.model.f_pregas - 0).toFixed(0)
|
|
108
|
-
}
|
|
109
|
-
if ((self.model.f_pregas - 0) - (self.maxgas - 0) <= 0) {
|
|
110
|
-
self.model.f_meter_type = self.row.f_meter_type
|
|
111
|
-
let getAmount = await self.$CommonService.gasCalculate(self.model, self.model.f_pregas)
|
|
112
|
-
self.model.f_preamount = getAmount.data.chargenum
|
|
113
|
-
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))
|
|
114
|
-
Object.assign(self.model, self.model, getAmount.data)
|
|
115
|
-
self.model.chargeprice = getAmount.data.chargeprice
|
|
116
|
-
self.model.f_collection = self.model.f_totalcost
|
|
117
|
-
if(self.config.floor){
|
|
118
|
-
self.model.f_collection=Math.ceil(self.model.f_collection)
|
|
119
|
-
}
|
|
120
|
-
self.calText(getAmount.data.chargeprice)
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
let asyncCardMeterCenter = async function (self) {
|
|
127
|
-
await self.$getConfig(self, 'CardMeterCenter')
|
|
128
|
-
console.log('卡表收费config', self.config)
|
|
129
|
-
// 默认打印格式
|
|
130
|
-
self.model.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
|
|
131
|
-
self.model.f_payment = [self.config.payment]
|
|
132
|
-
self.mulPrint = self.config.printType instanceof Array
|
|
133
|
-
// 判断限购
|
|
134
|
-
let limit_param = {
|
|
135
|
-
f_userinfo_id: self.row.f_userinfo_id,
|
|
136
|
-
f_user_id: self.row.f_user_id,
|
|
137
|
-
f_stairprice_id: self.row.f_stairprice_id
|
|
138
|
-
}
|
|
139
|
-
let getLimit = await self.$resetpost('api/af-revenue/logic/sale_getLimitGas', {data: limit_param}, {resolveMsg: null, rejectMsg: '获取限购值失败!!'})
|
|
140
|
-
console.log('获取限购值', getLimit)
|
|
141
|
-
self.hasLimit = getLimit.data.hasLimit
|
|
142
|
-
if (self.hasLimit) {
|
|
143
|
-
if (getLimit.data.f_limit_value || getLimit.data.f_limit_amount) {
|
|
144
|
-
if (getLimit.data.f_limit_value < 0 || getLimit.data.f_limit_amount < 0) {
|
|
145
|
-
self.$showAlert(`${getLimit.data.msg}`, 'warning', 3000)
|
|
146
|
-
self.$dispatch('refresh')
|
|
147
|
-
} else {
|
|
148
|
-
if (getLimit.data.f_limit_value) {
|
|
149
|
-
self.maxgas = (getLimit.data.f_limit_value - 0)
|
|
150
|
-
self.limitgas = true
|
|
151
|
-
}
|
|
152
|
-
if (getLimit.data.f_limit_amount) {
|
|
153
|
-
self.maxmoney = (getLimit.data.f_limit_amount - 0)
|
|
154
|
-
self.limitmoney = true
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
export default {
|
|
161
|
-
title: '自定义收费',
|
|
162
|
-
data () {
|
|
163
|
-
return {
|
|
164
|
-
serialShow: false,
|
|
165
|
-
resid: [], // 存放新增的f_files表中id
|
|
166
|
-
config: {
|
|
167
|
-
notShowFormula: false, // 不显示计算公式,默认显示
|
|
168
|
-
hasPrint: true, // 默认打票
|
|
169
|
-
hasBillManage: false, // 默认不启用发票管理
|
|
170
|
-
floor: false, // 是否取整收费
|
|
171
|
-
billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
|
|
172
|
-
printType: '普通收据', // 收据/电子票/专用发票/国税发票
|
|
173
|
-
showupload: true,
|
|
174
|
-
payment: '现金缴费'
|
|
175
|
-
},
|
|
176
|
-
model: {
|
|
177
|
-
f_purchase: 0,
|
|
178
|
-
f_write_card: '不写卡',
|
|
179
|
-
f_payment: '',
|
|
180
|
-
f_pregas: '',
|
|
181
|
-
f_preamount: 0,
|
|
182
|
-
f_totalcost: 0,
|
|
183
|
-
f_curbalance: 0,
|
|
184
|
-
f_collection: 0,
|
|
185
|
-
f_balance: 0,
|
|
186
|
-
f_print: [],
|
|
187
|
-
f_meter_type: '',
|
|
188
|
-
f_voucher_number: '',
|
|
189
|
-
is_accumulate: '计入',
|
|
190
|
-
f_user_name: '',
|
|
191
|
-
f_comments: ''
|
|
192
|
-
},
|
|
193
|
-
calculatedetail: '',
|
|
194
|
-
print: false,
|
|
195
|
-
billData: {
|
|
196
|
-
url: 'api/af-revenue/report/card_bill',
|
|
197
|
-
billnumber: ''
|
|
198
|
-
},
|
|
199
|
-
randomBusinessId: '',
|
|
200
|
-
hasLimit: false,
|
|
201
|
-
maxgas: 99999999, // 限购
|
|
202
|
-
maxmoney: 99999999,
|
|
203
|
-
limitmoney: false,
|
|
204
|
-
limitgas: false,
|
|
205
|
-
mulPrint: false,
|
|
206
|
-
clickConfirm: false, // 控制确认按钮只能点击一次
|
|
207
|
-
// 下拉框值
|
|
208
|
-
paytype: this.$appdata.getParam('付款方式'),
|
|
209
|
-
printstyle: this.$appdata.getParam('打印格式'),
|
|
210
|
-
mjshow: false
|
|
211
|
-
}
|
|
212
|
-
},
|
|
213
|
-
props: ['row'],
|
|
214
|
-
ready () {
|
|
215
|
-
// this.getPurchase()
|
|
216
|
-
console.log('456789', this.row)
|
|
217
|
-
this.model.f_price_id = this.row.f_price_id
|
|
218
|
-
this.model.f_user_id = this.row.f_user_id
|
|
219
|
-
this.model.f_userfiles_id = this.row.f_userfiles_id
|
|
220
|
-
this.model.f_userinfo_id = this.row.f_userinfo_id
|
|
221
|
-
this.model.f_userinfo_code = this.row.f_userinfo_code
|
|
222
|
-
this.model.f_user_name = this.row.f_user_name
|
|
223
|
-
this.model.f_user_type = this.row.f_user_type
|
|
224
|
-
this.model.f_meternumber = this.row.f_meternumber
|
|
225
|
-
this.model.f_address = this.row.f_address
|
|
226
|
-
this.model.f_meter_brand = this.row.f_meter_brand
|
|
227
|
-
this.model.f_meter_style = this.row.f_meter_style
|
|
228
|
-
this.model.f_balance = this.row.f_alias === 'QiaoSong' ? Math.trunc(this.row.f_balance) : this.row.f_balance
|
|
229
|
-
if (this.row.f_collection_type == '按金额') {
|
|
230
|
-
this.model.f_totalcost = ''
|
|
231
|
-
this.model.f_pregas = 0
|
|
232
|
-
}
|
|
233
|
-
document.getElementById('fpregas').focus()
|
|
234
|
-
asyncCardMeterCenter(this)
|
|
235
|
-
this.getRandomId()
|
|
236
|
-
},
|
|
237
|
-
events: {
|
|
238
|
-
// 删除Resid数组元素
|
|
239
|
-
'delResid' (val) {
|
|
240
|
-
this.resid.$remove({id: val, f_biobid: ''})
|
|
241
|
-
// this.resid.splice(this.resid.indexOf({id:val,f_biobid:''}),1);
|
|
242
|
-
},
|
|
243
|
-
// 增加Resid数组元素
|
|
244
|
-
'resid' (val) {
|
|
245
|
-
this.resid.push({id: val, f_biobid: ''})
|
|
246
|
-
}
|
|
247
|
-
},
|
|
248
|
-
methods: {
|
|
249
|
-
getRandomId () {
|
|
250
|
-
this.randomBusinessId = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
251
|
-
let res = Math.random() * 16 | 0
|
|
252
|
-
let v = c == 'x' ? res : (res & 0x3 | 0x8)
|
|
253
|
-
return v.toString(16)
|
|
254
|
-
})
|
|
255
|
-
},
|
|
256
|
-
confirm () {
|
|
257
|
-
this.clickConfirm = true
|
|
258
|
-
this.$showMessage(`对客户${this.model.f_user_name}进行收费。该操作只做收费,不做写卡,确定要进行该操作吗?`, ['confirm', 'cancel']).then(async (res) => {
|
|
259
|
-
if (res === 'confirm') {
|
|
260
|
-
let data = {
|
|
261
|
-
f_user_id: this.model.f_user_id,
|
|
262
|
-
f_userfiles_id: this.model.f_userfiles_id,
|
|
263
|
-
f_userinfo_id: this.model.f_userinfo_id,
|
|
264
|
-
f_user_name: this.model.f_user_name,
|
|
265
|
-
f_user_type: this.model.f_user_type,
|
|
266
|
-
f_meternumber: this.model.f_meternumber,
|
|
267
|
-
f_address: this.model.f_address,
|
|
268
|
-
f_meter_brand: this.model.f_meter_brand,
|
|
269
|
-
f_meter_style: this.model.f_meter_style,
|
|
270
|
-
f_operator: Vue.$login.f.name,
|
|
271
|
-
f_operatorid: Vue.$login.f.id,
|
|
272
|
-
f_orgid: Vue.$login.f.orgid,
|
|
273
|
-
f_orgname: Vue.$login.f.orgs,
|
|
274
|
-
f_depid: Vue.$login.f.depids,
|
|
275
|
-
f_depname: Vue.$login.f.deps,
|
|
276
|
-
f_operate_date: this.$login.toStandardTimeString(),
|
|
277
|
-
f_payment: this.model.f_payment[0],
|
|
278
|
-
f_price: this.model.f_price,
|
|
279
|
-
f_pregas: this.model.f_pregas,
|
|
280
|
-
f_total_cost: this.model.f_totalcost,
|
|
281
|
-
f_collection: this.model.f_collection,
|
|
282
|
-
f_comments: this.model.f_comments
|
|
283
|
-
}
|
|
284
|
-
console.log('自定义收费', data)
|
|
285
|
-
await this.$resetpost('api/af-revenue/entity/save/t_customizedFees', data, {warnMsg: `确定要对用户${this.model.f_user_name}进行自定义收费吗?`, resolveMsg: '收费成功!!', rejectMsg: '收费失败!!请重试!!'})
|
|
286
|
-
let ss = await this.$refs.paymentcode.flowPath()
|
|
287
|
-
this.$refs.paymentcode.paymentCodeShow = false
|
|
288
|
-
console.log('付款码操作返回', ss)
|
|
289
|
-
if (!ss.result) return
|
|
290
|
-
this.$dispatch('refresh')
|
|
291
|
-
this.clickConfirm = false
|
|
292
|
-
}
|
|
293
|
-
})
|
|
294
|
-
},
|
|
295
|
-
clean () {
|
|
296
|
-
this.$info('取消操作')
|
|
297
|
-
this.$dispatch('refresh', this.row)
|
|
298
|
-
},
|
|
299
|
-
printok () {
|
|
300
|
-
// 收据打完,判断是否还有其他票据进行请求
|
|
301
|
-
for (let i = 0; i < this.model.f_print.length; i++) {
|
|
302
|
-
if (this.model.f_print[i] === '电子发票') {
|
|
303
|
-
this.$CommonService.openEticket(this.row.id, '售气收费')
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
this.$dispatch('success')
|
|
307
|
-
},
|
|
308
|
-
pregas () {
|
|
309
|
-
if (this.model.f_pregas && this.model.f_pregas > 0) {
|
|
310
|
-
try {
|
|
311
|
-
// 对气量进行验证
|
|
312
|
-
if ((this.row.f_topup_ceil - 0) > 0 && (this.model.f_pregas - 0) > (this.row.f_topup_ceil - 0)) {
|
|
313
|
-
this.$showAlert(`您输入的气量不能大于该表的充值上限: ${this.row.f_topup_ceil}`, 'warning', 5000)
|
|
314
|
-
this.model.f_pregas = null
|
|
315
|
-
} else {
|
|
316
|
-
pregasGen(this)
|
|
317
|
-
}
|
|
318
|
-
} catch (error) {
|
|
319
|
-
this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
|
|
320
|
-
this.$dispatch('error', '发卡售气', this.model, error)
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
},
|
|
324
|
-
preamount () {
|
|
325
|
-
if ((this.model.f_totalcost && this.model.f_totalcost > 0) || this.row.f_balance > 0) {
|
|
326
|
-
try {
|
|
327
|
-
preamountGen(this)
|
|
328
|
-
} catch (error) {
|
|
329
|
-
this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
|
|
330
|
-
this.$dispatch('error', '发卡售气', this.model, error)
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
},
|
|
334
|
-
calText (val) {
|
|
335
|
-
let str = ''
|
|
336
|
-
let num = 0
|
|
337
|
-
val.forEach((item) => {
|
|
338
|
-
if (item.f_gas > 0) {
|
|
339
|
-
num = num + 1
|
|
340
|
-
}
|
|
341
|
-
str = str + item.f_price + ' x ' + item.f_gas + '+'
|
|
342
|
-
})
|
|
343
|
-
str = str.slice(0, str.length - 1)
|
|
344
|
-
this.calculatedetail = str
|
|
345
|
-
if (num > 1) {
|
|
346
|
-
if (this.$login.r.find(item => item == '阶梯提示无按钮')) {
|
|
347
|
-
this.$showAlert('友好提示:本次购气已跨阶梯 计算公式:' + (this.calculatedetail ? this.calculatedetail : ' 暂无'), 'warning', 3000)
|
|
348
|
-
} else {
|
|
349
|
-
this.$showMessage('友好提示:本次购气已跨阶梯 计算公式:' + (this.calculatedetail ? this.calculatedetail : ' 暂无'), ['confirm', 'cancel'])
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
},
|
|
353
|
-
close () {
|
|
354
|
-
this.print = false
|
|
355
|
-
this.clean()
|
|
356
|
-
}
|
|
357
|
-
},
|
|
358
|
-
watch: {
|
|
359
|
-
'model.f_payment' (val) {
|
|
360
|
-
if (val == '免交') {
|
|
361
|
-
this.mjshow = true
|
|
362
|
-
} else {
|
|
363
|
-
this.mjshow = false
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
},
|
|
367
|
-
computed: {
|
|
368
|
-
'curbalance' () {
|
|
369
|
-
if (this.model.f_preamount) {
|
|
370
|
-
if (this.config.calculatePreByCollection) {
|
|
371
|
-
return ((this.model.f_collection - 0) + (this.row.f_balance - 0) - this.model.f_preamount).toFixed(4)
|
|
372
|
-
}
|
|
373
|
-
if (this.row.f_collection_type === '按金额') {
|
|
374
|
-
return ((this.model.f_totalcost - 0) + (this.row.f_balance - 0) - (this.model.f_preamount - 0)).toFixed(4)
|
|
375
|
-
} else {
|
|
376
|
-
if ((this.row.f_balance - 0) > (this.model.f_preamount - 0)) {
|
|
377
|
-
return ((this.row.f_balance - 0) - (this.model.f_preamount - 0)).toFixed(4)
|
|
378
|
-
} else {
|
|
379
|
-
return ((this.model.f_collection - 0) - (this.model.f_totalcost - 0)).toFixed(4)
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
} else {
|
|
383
|
-
return 0
|
|
384
|
-
}
|
|
385
|
-
},
|
|
386
|
-
isMachineMeter() {
|
|
387
|
-
return this.row.f_meter_type && this.row.f_meter_type.indexOf('机表') !== -1
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
</script>
|
|
392
|
-
|
|
393
|
-
<style>
|
|
394
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex-row">
|
|
3
|
+
<div class="span" style="overflow-y: auto;">
|
|
4
|
+
<validator name='v'>
|
|
5
|
+
<form novalidate class="form-horizontal">
|
|
6
|
+
<div class="row">
|
|
7
|
+
<div class="col-sm-4">
|
|
8
|
+
<label for="f_paytype" class=" font_normal_body" title="参数名称:付款方式">收款方式</label>
|
|
9
|
+
<v-select id="f_payment"
|
|
10
|
+
v-model="f_payment"
|
|
11
|
+
placeholder='请选择'
|
|
12
|
+
:value.sync="model.f_payment"
|
|
13
|
+
:options='paytype'
|
|
14
|
+
close-on-select clear-button></v-select>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="col-sm-4">
|
|
17
|
+
<label for="f_price" class="font_normal_body">单价</label>
|
|
18
|
+
<input class="input_search" style="width:60%" type="number" v-model="model.f_price" placeholder="请输入单价">
|
|
19
|
+
</div>
|
|
20
|
+
<div class="col-sm-4">
|
|
21
|
+
<label for="f_pregas" class=" font_normal_body">气量</label>
|
|
22
|
+
<input class="input_search" style="width:60%" type="number"
|
|
23
|
+
v-model="model.f_pregas" id="fpregas"
|
|
24
|
+
v-validate:f_pregas='{required: true, dctest: [maxgas, "<=" ]}' placeholder="请输入气量"
|
|
25
|
+
>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="col-sm-4">
|
|
28
|
+
<label for="f_totalcost" class=" font_normal_body"> 金额</label>
|
|
29
|
+
<input class="input_search" style="width:60%" type="number" v-model="model.f_totalcost" placeholder="金额"
|
|
30
|
+
>
|
|
31
|
+
</div>
|
|
32
|
+
<div class="col-sm-4" v-if="row.f_collection_type === '按气量'"
|
|
33
|
+
:class="[$v.f_collection.required ? 'has-error' : 'has-success']">
|
|
34
|
+
<label for="f_collection" class=" font_normal_body">收款</label>
|
|
35
|
+
<input class="input_search" style="width:60%" type="number" v-model="model.f_collection"
|
|
36
|
+
v-validate:f_collection='{required: true, dctest: [model.f_totalcost, ">=" ] }'
|
|
37
|
+
v-el:sk v-scale="[model.f_totalcost, 2]" >
|
|
38
|
+
</div>
|
|
39
|
+
<div class="col-sm-4" v-if="row.f_collection_type === '按金额'">
|
|
40
|
+
<label for="f_collection" class=" font_normal_body">收款</label>
|
|
41
|
+
<input class="input_search" style="width:60%" type="number" v-model="model.f_collection"
|
|
42
|
+
v-el:sk v-scale="[model.f_collection, 4]" >
|
|
43
|
+
</div>
|
|
44
|
+
<div class="row" style="padding-top: 0.5em;">
|
|
45
|
+
<div class="col-sm-8">
|
|
46
|
+
<label for="f_comments" class="font_normal_body">备  注</label>
|
|
47
|
+
<input class="input_search" style="width:87%" v-model="model.f_comments" placeholder="备注">
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
</div>
|
|
52
|
+
</form>
|
|
53
|
+
<print-bill :show="print" :bill-config='config' v-ref:printbill :bill-data='billData' :data='row'
|
|
54
|
+
v-on:toggle="close" @printok="printok" :data='row'></print-bill>
|
|
55
|
+
<div style="text-align:right;height: 25%;">
|
|
56
|
+
<payment-code-button :clickable="!$v.valid || clickConfirm"
|
|
57
|
+
:payment.sync="model.f_payment" :payment-data="paytype"
|
|
58
|
+
@confirm-payment="confirm()">
|
|
59
|
+
</payment-code-button>
|
|
60
|
+
<button class="button_search btn-gn" @click="confirm()" :disabled='!$v.valid || clickConfirm'>确认</button>
|
|
61
|
+
<button class="button_clear btn-gn" @click="clean()">取消</button>
|
|
62
|
+
</div>
|
|
63
|
+
</validator>
|
|
64
|
+
<payment-code v-ref:paymentcode :payment="model.f_payment" :row="row" :money="model.f_collection"></payment-code>
|
|
65
|
+
<upload :blodid="row.f_userinfo_id" v-if="config.showupload" :businessid="randomBusinessId" isremark="true" fusetype="自定义收费"></upload>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
</template>
|
|
69
|
+
<script>
|
|
70
|
+
import Vue from 'vue'
|
|
71
|
+
|
|
72
|
+
// 输入金额,换算气量
|
|
73
|
+
let preamountGen = async function (self) {
|
|
74
|
+
let dymoney = 0
|
|
75
|
+
let calFee = (self.model.f_totalcost - 0) + (self.row.f_balance - 0)
|
|
76
|
+
let getGas = await self.$CommonService.feeCalculate(self.model, calFee)
|
|
77
|
+
if (getGas.data.gas) {
|
|
78
|
+
if (self.row.f_isdecimal === '是') {
|
|
79
|
+
if (self.row.f_alias === 'QiaoSong') {
|
|
80
|
+
self.model.f_pregas = (getGas.data.gas - 0).toFixed(1)
|
|
81
|
+
} else {
|
|
82
|
+
self.model.f_pregas = (getGas.data.gas - 0).toFixed(4)
|
|
83
|
+
}
|
|
84
|
+
} else {
|
|
85
|
+
let tempnum = Math.floor(getGas.data.gas - 0)
|
|
86
|
+
let dymoney1 = await self.$CommonService.gasCalculate(self.model, (tempnum).toFixed(4))
|
|
87
|
+
dymoney = (getGas.data.chargenum - 0).toFixed(2) - (dymoney1.data.chargenum - 0).toFixed(2)
|
|
88
|
+
self.model.f_pregas = Math.floor(getGas.data.gas - 0)
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
self.model.f_preamount = calFee - (dymoney - 0)
|
|
92
|
+
self.model.chargeprice = getGas.data.chargeprice
|
|
93
|
+
Object.assign(self.model, self.model, getGas.data)
|
|
94
|
+
self.model.f_totalcost = ((self.model.f_totalcost - 0) - (dymoney - 0)).toFixed(4)
|
|
95
|
+
// self.model.f_totalcost=Math.ceil(self.model.f_totalcost)
|
|
96
|
+
if(self.config.floor){
|
|
97
|
+
self.model.f_totalcost=Math.ceil(self.model.f_totalcost)
|
|
98
|
+
}
|
|
99
|
+
self.calText(getGas.data.chargeprice)
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// 输入气量,换算金额
|
|
103
|
+
let pregasGen = async function (self) {
|
|
104
|
+
if (self.row.f_isdecimal === '是') {
|
|
105
|
+
self.model.f_pregas = (self.model.f_pregas - 0).toFixed(4)
|
|
106
|
+
} else {
|
|
107
|
+
self.model.f_pregas = (self.model.f_pregas - 0).toFixed(0)
|
|
108
|
+
}
|
|
109
|
+
if ((self.model.f_pregas - 0) - (self.maxgas - 0) <= 0) {
|
|
110
|
+
self.model.f_meter_type = self.row.f_meter_type
|
|
111
|
+
let getAmount = await self.$CommonService.gasCalculate(self.model, self.model.f_pregas)
|
|
112
|
+
self.model.f_preamount = getAmount.data.chargenum
|
|
113
|
+
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))
|
|
114
|
+
Object.assign(self.model, self.model, getAmount.data)
|
|
115
|
+
self.model.chargeprice = getAmount.data.chargeprice
|
|
116
|
+
self.model.f_collection = self.model.f_totalcost
|
|
117
|
+
if(self.config.floor){
|
|
118
|
+
self.model.f_collection=Math.ceil(self.model.f_collection)
|
|
119
|
+
}
|
|
120
|
+
self.calText(getAmount.data.chargeprice)
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
let asyncCardMeterCenter = async function (self) {
|
|
127
|
+
await self.$getConfig(self, 'CardMeterCenter')
|
|
128
|
+
console.log('卡表收费config', self.config)
|
|
129
|
+
// 默认打印格式
|
|
130
|
+
self.model.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
|
|
131
|
+
self.model.f_payment = [self.config.payment]
|
|
132
|
+
self.mulPrint = self.config.printType instanceof Array
|
|
133
|
+
// 判断限购
|
|
134
|
+
let limit_param = {
|
|
135
|
+
f_userinfo_id: self.row.f_userinfo_id,
|
|
136
|
+
f_user_id: self.row.f_user_id,
|
|
137
|
+
f_stairprice_id: self.row.f_stairprice_id
|
|
138
|
+
}
|
|
139
|
+
let getLimit = await self.$resetpost('api/af-revenue/logic/sale_getLimitGas', {data: limit_param}, {resolveMsg: null, rejectMsg: '获取限购值失败!!'})
|
|
140
|
+
console.log('获取限购值', getLimit)
|
|
141
|
+
self.hasLimit = getLimit.data.hasLimit
|
|
142
|
+
if (self.hasLimit) {
|
|
143
|
+
if (getLimit.data.f_limit_value || getLimit.data.f_limit_amount) {
|
|
144
|
+
if (getLimit.data.f_limit_value < 0 || getLimit.data.f_limit_amount < 0) {
|
|
145
|
+
self.$showAlert(`${getLimit.data.msg}`, 'warning', 3000)
|
|
146
|
+
self.$dispatch('refresh')
|
|
147
|
+
} else {
|
|
148
|
+
if (getLimit.data.f_limit_value) {
|
|
149
|
+
self.maxgas = (getLimit.data.f_limit_value - 0)
|
|
150
|
+
self.limitgas = true
|
|
151
|
+
}
|
|
152
|
+
if (getLimit.data.f_limit_amount) {
|
|
153
|
+
self.maxmoney = (getLimit.data.f_limit_amount - 0)
|
|
154
|
+
self.limitmoney = true
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
export default {
|
|
161
|
+
title: '自定义收费',
|
|
162
|
+
data () {
|
|
163
|
+
return {
|
|
164
|
+
serialShow: false,
|
|
165
|
+
resid: [], // 存放新增的f_files表中id
|
|
166
|
+
config: {
|
|
167
|
+
notShowFormula: false, // 不显示计算公式,默认显示
|
|
168
|
+
hasPrint: true, // 默认打票
|
|
169
|
+
hasBillManage: false, // 默认不启用发票管理
|
|
170
|
+
floor: false, // 是否取整收费
|
|
171
|
+
billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
|
|
172
|
+
printType: '普通收据', // 收据/电子票/专用发票/国税发票
|
|
173
|
+
showupload: true,
|
|
174
|
+
payment: '现金缴费'
|
|
175
|
+
},
|
|
176
|
+
model: {
|
|
177
|
+
f_purchase: 0,
|
|
178
|
+
f_write_card: '不写卡',
|
|
179
|
+
f_payment: '',
|
|
180
|
+
f_pregas: '',
|
|
181
|
+
f_preamount: 0,
|
|
182
|
+
f_totalcost: 0,
|
|
183
|
+
f_curbalance: 0,
|
|
184
|
+
f_collection: 0,
|
|
185
|
+
f_balance: 0,
|
|
186
|
+
f_print: [],
|
|
187
|
+
f_meter_type: '',
|
|
188
|
+
f_voucher_number: '',
|
|
189
|
+
is_accumulate: '计入',
|
|
190
|
+
f_user_name: '',
|
|
191
|
+
f_comments: ''
|
|
192
|
+
},
|
|
193
|
+
calculatedetail: '',
|
|
194
|
+
print: false,
|
|
195
|
+
billData: {
|
|
196
|
+
url: 'api/af-revenue/report/card_bill',
|
|
197
|
+
billnumber: ''
|
|
198
|
+
},
|
|
199
|
+
randomBusinessId: '',
|
|
200
|
+
hasLimit: false,
|
|
201
|
+
maxgas: 99999999, // 限购
|
|
202
|
+
maxmoney: 99999999,
|
|
203
|
+
limitmoney: false,
|
|
204
|
+
limitgas: false,
|
|
205
|
+
mulPrint: false,
|
|
206
|
+
clickConfirm: false, // 控制确认按钮只能点击一次
|
|
207
|
+
// 下拉框值
|
|
208
|
+
paytype: this.$appdata.getParam('付款方式'),
|
|
209
|
+
printstyle: this.$appdata.getParam('打印格式'),
|
|
210
|
+
mjshow: false
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
props: ['row'],
|
|
214
|
+
ready () {
|
|
215
|
+
// this.getPurchase()
|
|
216
|
+
console.log('456789', this.row)
|
|
217
|
+
this.model.f_price_id = this.row.f_price_id
|
|
218
|
+
this.model.f_user_id = this.row.f_user_id
|
|
219
|
+
this.model.f_userfiles_id = this.row.f_userfiles_id
|
|
220
|
+
this.model.f_userinfo_id = this.row.f_userinfo_id
|
|
221
|
+
this.model.f_userinfo_code = this.row.f_userinfo_code
|
|
222
|
+
this.model.f_user_name = this.row.f_user_name
|
|
223
|
+
this.model.f_user_type = this.row.f_user_type
|
|
224
|
+
this.model.f_meternumber = this.row.f_meternumber
|
|
225
|
+
this.model.f_address = this.row.f_address
|
|
226
|
+
this.model.f_meter_brand = this.row.f_meter_brand
|
|
227
|
+
this.model.f_meter_style = this.row.f_meter_style
|
|
228
|
+
this.model.f_balance = this.row.f_alias === 'QiaoSong' ? Math.trunc(this.row.f_balance) : this.row.f_balance
|
|
229
|
+
if (this.row.f_collection_type == '按金额') {
|
|
230
|
+
this.model.f_totalcost = ''
|
|
231
|
+
this.model.f_pregas = 0
|
|
232
|
+
}
|
|
233
|
+
document.getElementById('fpregas').focus()
|
|
234
|
+
asyncCardMeterCenter(this)
|
|
235
|
+
this.getRandomId()
|
|
236
|
+
},
|
|
237
|
+
events: {
|
|
238
|
+
// 删除Resid数组元素
|
|
239
|
+
'delResid' (val) {
|
|
240
|
+
this.resid.$remove({id: val, f_biobid: ''})
|
|
241
|
+
// this.resid.splice(this.resid.indexOf({id:val,f_biobid:''}),1);
|
|
242
|
+
},
|
|
243
|
+
// 增加Resid数组元素
|
|
244
|
+
'resid' (val) {
|
|
245
|
+
this.resid.push({id: val, f_biobid: ''})
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
methods: {
|
|
249
|
+
getRandomId () {
|
|
250
|
+
this.randomBusinessId = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
251
|
+
let res = Math.random() * 16 | 0
|
|
252
|
+
let v = c == 'x' ? res : (res & 0x3 | 0x8)
|
|
253
|
+
return v.toString(16)
|
|
254
|
+
})
|
|
255
|
+
},
|
|
256
|
+
confirm () {
|
|
257
|
+
this.clickConfirm = true
|
|
258
|
+
this.$showMessage(`对客户${this.model.f_user_name}进行收费。该操作只做收费,不做写卡,确定要进行该操作吗?`, ['confirm', 'cancel']).then(async (res) => {
|
|
259
|
+
if (res === 'confirm') {
|
|
260
|
+
let data = {
|
|
261
|
+
f_user_id: this.model.f_user_id,
|
|
262
|
+
f_userfiles_id: this.model.f_userfiles_id,
|
|
263
|
+
f_userinfo_id: this.model.f_userinfo_id,
|
|
264
|
+
f_user_name: this.model.f_user_name,
|
|
265
|
+
f_user_type: this.model.f_user_type,
|
|
266
|
+
f_meternumber: this.model.f_meternumber,
|
|
267
|
+
f_address: this.model.f_address,
|
|
268
|
+
f_meter_brand: this.model.f_meter_brand,
|
|
269
|
+
f_meter_style: this.model.f_meter_style,
|
|
270
|
+
f_operator: Vue.$login.f.name,
|
|
271
|
+
f_operatorid: Vue.$login.f.id,
|
|
272
|
+
f_orgid: Vue.$login.f.orgid,
|
|
273
|
+
f_orgname: Vue.$login.f.orgs,
|
|
274
|
+
f_depid: Vue.$login.f.depids,
|
|
275
|
+
f_depname: Vue.$login.f.deps,
|
|
276
|
+
f_operate_date: this.$login.toStandardTimeString(),
|
|
277
|
+
f_payment: this.model.f_payment[0],
|
|
278
|
+
f_price: this.model.f_price,
|
|
279
|
+
f_pregas: this.model.f_pregas,
|
|
280
|
+
f_total_cost: this.model.f_totalcost,
|
|
281
|
+
f_collection: this.model.f_collection,
|
|
282
|
+
f_comments: this.model.f_comments
|
|
283
|
+
}
|
|
284
|
+
console.log('自定义收费', data)
|
|
285
|
+
await this.$resetpost('api/af-revenue/entity/save/t_customizedFees', data, {warnMsg: `确定要对用户${this.model.f_user_name}进行自定义收费吗?`, resolveMsg: '收费成功!!', rejectMsg: '收费失败!!请重试!!'})
|
|
286
|
+
let ss = await this.$refs.paymentcode.flowPath()
|
|
287
|
+
this.$refs.paymentcode.paymentCodeShow = false
|
|
288
|
+
console.log('付款码操作返回', ss)
|
|
289
|
+
if (!ss.result) return
|
|
290
|
+
this.$dispatch('refresh')
|
|
291
|
+
this.clickConfirm = false
|
|
292
|
+
}
|
|
293
|
+
})
|
|
294
|
+
},
|
|
295
|
+
clean () {
|
|
296
|
+
this.$info('取消操作')
|
|
297
|
+
this.$dispatch('refresh', this.row)
|
|
298
|
+
},
|
|
299
|
+
printok () {
|
|
300
|
+
// 收据打完,判断是否还有其他票据进行请求
|
|
301
|
+
for (let i = 0; i < this.model.f_print.length; i++) {
|
|
302
|
+
if (this.model.f_print[i] === '电子发票') {
|
|
303
|
+
this.$CommonService.openEticket(this.row.id, '售气收费')
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
this.$dispatch('success')
|
|
307
|
+
},
|
|
308
|
+
pregas () {
|
|
309
|
+
if (this.model.f_pregas && this.model.f_pregas > 0) {
|
|
310
|
+
try {
|
|
311
|
+
// 对气量进行验证
|
|
312
|
+
if ((this.row.f_topup_ceil - 0) > 0 && (this.model.f_pregas - 0) > (this.row.f_topup_ceil - 0)) {
|
|
313
|
+
this.$showAlert(`您输入的气量不能大于该表的充值上限: ${this.row.f_topup_ceil}`, 'warning', 5000)
|
|
314
|
+
this.model.f_pregas = null
|
|
315
|
+
} else {
|
|
316
|
+
pregasGen(this)
|
|
317
|
+
}
|
|
318
|
+
} catch (error) {
|
|
319
|
+
this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
|
|
320
|
+
this.$dispatch('error', '发卡售气', this.model, error)
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
preamount () {
|
|
325
|
+
if ((this.model.f_totalcost && this.model.f_totalcost > 0) || this.row.f_balance > 0) {
|
|
326
|
+
try {
|
|
327
|
+
preamountGen(this)
|
|
328
|
+
} catch (error) {
|
|
329
|
+
this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
|
|
330
|
+
this.$dispatch('error', '发卡售气', this.model, error)
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
calText (val) {
|
|
335
|
+
let str = ''
|
|
336
|
+
let num = 0
|
|
337
|
+
val.forEach((item) => {
|
|
338
|
+
if (item.f_gas > 0) {
|
|
339
|
+
num = num + 1
|
|
340
|
+
}
|
|
341
|
+
str = str + item.f_price + ' x ' + item.f_gas + '+'
|
|
342
|
+
})
|
|
343
|
+
str = str.slice(0, str.length - 1)
|
|
344
|
+
this.calculatedetail = str
|
|
345
|
+
if (num > 1) {
|
|
346
|
+
if (this.$login.r.find(item => item == '阶梯提示无按钮')) {
|
|
347
|
+
this.$showAlert('友好提示:本次购气已跨阶梯 计算公式:' + (this.calculatedetail ? this.calculatedetail : ' 暂无'), 'warning', 3000)
|
|
348
|
+
} else {
|
|
349
|
+
this.$showMessage('友好提示:本次购气已跨阶梯 计算公式:' + (this.calculatedetail ? this.calculatedetail : ' 暂无'), ['confirm', 'cancel'])
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
close () {
|
|
354
|
+
this.print = false
|
|
355
|
+
this.clean()
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
watch: {
|
|
359
|
+
'model.f_payment' (val) {
|
|
360
|
+
if (val == '免交') {
|
|
361
|
+
this.mjshow = true
|
|
362
|
+
} else {
|
|
363
|
+
this.mjshow = false
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
computed: {
|
|
368
|
+
'curbalance' () {
|
|
369
|
+
if (this.model.f_preamount) {
|
|
370
|
+
if (this.config.calculatePreByCollection) {
|
|
371
|
+
return ((this.model.f_collection - 0) + (this.row.f_balance - 0) - this.model.f_preamount).toFixed(4)
|
|
372
|
+
}
|
|
373
|
+
if (this.row.f_collection_type === '按金额') {
|
|
374
|
+
return ((this.model.f_totalcost - 0) + (this.row.f_balance - 0) - (this.model.f_preamount - 0)).toFixed(4)
|
|
375
|
+
} else {
|
|
376
|
+
if ((this.row.f_balance - 0) > (this.model.f_preamount - 0)) {
|
|
377
|
+
return ((this.row.f_balance - 0) - (this.model.f_preamount - 0)).toFixed(4)
|
|
378
|
+
} else {
|
|
379
|
+
return ((this.model.f_collection - 0) - (this.model.f_totalcost - 0)).toFixed(4)
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
} else {
|
|
383
|
+
return 0
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
isMachineMeter() {
|
|
387
|
+
return this.row.f_meter_type && this.row.f_meter_type.indexOf('机表') !== -1
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
</script>
|
|
392
|
+
|
|
393
|
+
<style>
|
|
394
|
+
</style>
|
|
@@ -345,8 +345,14 @@
|
|
|
345
345
|
<label for="f_adjustable" class="font_normal_body" style="width: auto;letter-spacing: 0.5em;margin-right: -0.5em;margin-left: -0.5em"> {{getConfigLabelName('f_adjustable','调压箱')}}</label>
|
|
346
346
|
<input type="text" v-model="row.f_adjustable" v-show="false"
|
|
347
347
|
v-validate:f_adjustable=getConfigValidate("f_adjustable",false)>
|
|
348
|
-
<v-select :value.sync="row.f_adjustable"
|
|
349
|
-
|
|
348
|
+
<v-select :value.sync="row.f_adjustable"
|
|
349
|
+
:options='adjustables'
|
|
350
|
+
placeholder='调压箱'
|
|
351
|
+
close-on-select
|
|
352
|
+
@select-search="getAdjustables"
|
|
353
|
+
v-model='row.f_adjustable'
|
|
354
|
+
:search='true'>
|
|
355
|
+
</v-select>
|
|
350
356
|
</div>
|
|
351
357
|
<div class="col-sm-4 form-group" :class="[$m.f_hand_date.required ? 'has-error' : '']"
|
|
352
358
|
v-show="(formconfig && formconfig.f_hand_date && formconfig.f_hand_date.required) || !onlyshowmust"
|
|
@@ -720,6 +726,7 @@
|
|
|
720
726
|
opteratormetrbook: false, // 抄表册操作
|
|
721
727
|
oldrow: [],
|
|
722
728
|
overdueset: [],
|
|
729
|
+
adjustables: [],
|
|
723
730
|
isiot: true,
|
|
724
731
|
meterNumberDisabled: false,
|
|
725
732
|
meterChangeDisabled: this.$appdata.getSingleValue('建档后禁止更改表号') ? this.$appdata.getSingleValue('建档后禁止更改表号') : false,
|
|
@@ -757,8 +764,26 @@
|
|
|
757
764
|
}
|
|
758
765
|
await this.getConcentrators()
|
|
759
766
|
co(meterBookGen(this))
|
|
767
|
+
this.getAdjustables()
|
|
760
768
|
},
|
|
761
769
|
methods: {
|
|
770
|
+
async getAdjustables (searchText) {
|
|
771
|
+
let condition = `f_orgid = '${this.$login.f.orgid}'`
|
|
772
|
+
if (searchText) {
|
|
773
|
+
condition = condition + ` and (f_adjustable_name like '%${searchText}%' or f_adjustable_id like '%${searchText}%')`
|
|
774
|
+
}
|
|
775
|
+
let data = {
|
|
776
|
+
items: 'id,f_adjustable_name,f_adjustable_id',
|
|
777
|
+
tablename: 't_adjustablebox',
|
|
778
|
+
condition: condition,
|
|
779
|
+
orderitem: 'id desc'
|
|
780
|
+
}
|
|
781
|
+
let result = await this.$resetpost('rs/sql/singleTable_OrderBy?pageNo=1&pageSize=100', {data: data}, {resolveMsg: null, rejectMsg: '获取集中器失败!'})
|
|
782
|
+
this.adjustables = [{label: '全部', value: ''}]
|
|
783
|
+
for (let row of result.data) {
|
|
784
|
+
this.adjustables.push({label: `[${row.f_adjustable_id}]-${row.f_adjustable_name}`, value: row})
|
|
785
|
+
}
|
|
786
|
+
},
|
|
762
787
|
validateInput (event, key) {
|
|
763
788
|
const value = event.target.value
|
|
764
789
|
const sanitizedValue = value.replace(/[^0-9.]/g, '')
|
|
@@ -1090,17 +1115,6 @@
|
|
|
1090
1115
|
return Array.from(new Set(result))
|
|
1091
1116
|
},
|
|
1092
1117
|
|
|
1093
|
-
adjustables () {
|
|
1094
|
-
let arr = []
|
|
1095
|
-
let filter = this.f_filialeid
|
|
1096
|
-
this.$GetSaleParam.getAdjustable(filter).forEach((item) => {
|
|
1097
|
-
let temp = {}
|
|
1098
|
-
temp.label = `[${item.value.f_adjustable_id}]-${item.label}`
|
|
1099
|
-
temp.value = item.value
|
|
1100
|
-
arr.push(temp)
|
|
1101
|
-
})
|
|
1102
|
-
return [{label: '全部', value: ''}, ...arr]
|
|
1103
|
-
},
|
|
1104
1118
|
inputtores () {
|
|
1105
1119
|
// return this.$login.f.f_gasman
|
|
1106
1120
|
let rs = new Array()
|
|
@@ -89,13 +89,29 @@
|
|
|
89
89
|
</thead>
|
|
90
90
|
<tbody>
|
|
91
91
|
<tr v-show="nextCheckDateShow">
|
|
92
|
-
<td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;"
|
|
92
|
+
<td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;">本次安检时间:</td>
|
|
93
93
|
<td colspan="3" :style=style>{{ model.f_next_check_date }}</td>
|
|
94
94
|
</tr>
|
|
95
95
|
<tr>
|
|
96
96
|
<td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;">上次安检时间:</td>
|
|
97
97
|
<td colspan="3" style="text-align: center;border: #E9E9E9 solid 1px;">{{ model.f_last_check_date }}</td>
|
|
98
98
|
</tr>
|
|
99
|
+
<tr>
|
|
100
|
+
<td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;">上次安检结果:</td>
|
|
101
|
+
<td colspan="3" style="text-align: center;border: #E9E9E9 solid 1px;">{{ lastDefectResult }}</td>
|
|
102
|
+
</tr>
|
|
103
|
+
<tr>
|
|
104
|
+
<td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;">上次是否有隐患:</td>
|
|
105
|
+
<td colspan="3" style="text-align: center;border: #E9E9E9 solid 1px;">{{ lastDefectResult === '有隐患' ? '是' : '否' }}</td>
|
|
106
|
+
</tr>
|
|
107
|
+
<tr>
|
|
108
|
+
<td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;">上次隐患名称:</td>
|
|
109
|
+
<td colspan="3" style="text-align: center;border: #E9E9E9 solid 1px;">{{ model.f_last_defect_text }}</td>
|
|
110
|
+
</tr>
|
|
111
|
+
<tr>
|
|
112
|
+
<td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;">上次处理结果:</td>
|
|
113
|
+
<td colspan="3" style="text-align: center;border: #E9E9E9 solid 1px;">{{ model.f_last_repaired === '已修' ? '已处理' : '未处理' }}</td>
|
|
114
|
+
</tr>
|
|
99
115
|
<tr>
|
|
100
116
|
<td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;">安检员:</td>
|
|
101
117
|
<td colspan="3" style="text-align: center;border: #E9E9E9 solid 1px;">{{model.f_checker_name}}</td>
|
|
@@ -289,11 +305,28 @@
|
|
|
289
305
|
}
|
|
290
306
|
},
|
|
291
307
|
computed: {
|
|
292
|
-
inspectionResult() {
|
|
308
|
+
inspectionResult () {
|
|
293
309
|
if (this.model.safecheckitem == null || this.model.safecheckitem.every(item => item.f_repaire_state === '已处理')) {
|
|
294
|
-
return '正常'
|
|
310
|
+
return '正常'
|
|
311
|
+
}
|
|
312
|
+
return '有隐患'
|
|
313
|
+
},
|
|
314
|
+
lastDefectResult () {
|
|
315
|
+
let content = this.model.f_last_defect_content
|
|
316
|
+
if (!content) return ''
|
|
317
|
+
|
|
318
|
+
try {
|
|
319
|
+
// 先解析一次
|
|
320
|
+
let parsed = typeof content === 'string' ? JSON.parse(content) : content
|
|
321
|
+
// 如果 result 还是 undefined,再尝试一次解析
|
|
322
|
+
if (typeof parsed.result === 'undefined' && typeof parsed === 'string') {
|
|
323
|
+
parsed = JSON.parse(parsed)
|
|
324
|
+
}
|
|
325
|
+
return parsed.result || ''
|
|
326
|
+
} catch (e) {
|
|
327
|
+
console.warn('解析 f_last_defect_content 出错', e)
|
|
328
|
+
return ''
|
|
295
329
|
}
|
|
296
|
-
return '有隐患';
|
|
297
330
|
}
|
|
298
331
|
},
|
|
299
332
|
watch: {
|
|
@@ -441,14 +441,14 @@ export default {
|
|
|
441
441
|
'baseinfo.base.f_cost_type[0]' () {
|
|
442
442
|
this.$resetValidation()
|
|
443
443
|
},
|
|
444
|
-
'baseinfo.base.f_user_name'(val) {
|
|
444
|
+
'baseinfo.base.f_user_name' (val) {
|
|
445
445
|
console.log('f_user_name变化', val)
|
|
446
446
|
},
|
|
447
|
-
'addressinfo.f_lat'(newVal) {
|
|
448
|
-
this.lat = newVal
|
|
447
|
+
'addressinfo.f_lat' (newVal) {
|
|
448
|
+
this.lat = newVal
|
|
449
449
|
},
|
|
450
|
-
'addressinfo.f_lng'(newVal) {
|
|
451
|
-
this.lng = newVal
|
|
450
|
+
'addressinfo.f_lng' (newVal) {
|
|
451
|
+
this.lng = newVal
|
|
452
452
|
}
|
|
453
453
|
},
|
|
454
454
|
computed: {
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
data () {
|
|
170
170
|
return {
|
|
171
171
|
condition: '1=1',
|
|
172
|
-
model: new PagedList(`${this.row.f_meter_type === '物联网表'?'api/af-revenue/sql/sale_WebHandplanQuery':'api/af-revenue/sql/sale_HandplanQuery'}`, 20, {f_user_id: this.row.f_user_id}, {
|
|
172
|
+
model: new PagedList(`${this.row.f_meter_type === '物联网表' ? 'api/af-revenue/sql/sale_WebHandplanQuery' : 'api/af-revenue/sql/sale_HandplanQuery'}`, 20, {f_user_id: this.row.f_user_id}, {
|
|
173
173
|
f_oughtfee: 0,
|
|
174
174
|
f_oughtamount: 0,
|
|
175
175
|
f_stairamount1: 0,
|
|
@@ -252,7 +252,7 @@
|
|
|
252
252
|
this.condition = `${this.$refs.paged.$refs.criteria.condition} and ${this.searchValue} = '${this.row[this.searchValue]}'`
|
|
253
253
|
this.model.search(this.condition, this.model)
|
|
254
254
|
let http = new HttpResetClass()
|
|
255
|
-
let res = await http.load('POST', `${this.row.f_meter_type === '物联网表'?'api/af-revenue/sql/sale_WebHandplanQuery':'api/af-revenue/sql/sale_HandplanQuery'}`, {
|
|
255
|
+
let res = await http.load('POST', `${this.row.f_meter_type === '物联网表' ? 'api/af-revenue/sql/sale_WebHandplanQuery' : 'api/af-revenue/sql/sale_HandplanQuery'}`, {
|
|
256
256
|
data: {
|
|
257
257
|
f_user_id: this.row.f_user_id,
|
|
258
258
|
condition: this.condition
|
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/yuncheng/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'
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|