sale-client 3.6.21 → 3.6.22
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 +1 -1
- package/src/components/charge/business/CardMeterCenter.vue +944 -944
- package/src/components/charge/business/IOTMeterCenter.vue +793 -793
- package/src/components/charge/business/OtherChargeNew.vue +550 -550
- package/src/components/charge/business/machine/MachineMeterCenter.vue +676 -676
- package/src/components/charge/gasloss/gasLossOperate.vue +383 -383
- package/src/components/newBill/CardMeterCenter.vue +902 -902
- package/src/components/newBill/IOTMeterCenter.vue +797 -797
- package/src/components/revenue/Common/EticketModal.vue +90 -90
- package/src/filiale/alashan/business/CardMeterCenter.vue +897 -897
- package/src/filiale/chengtou/components/OtherChargeNew.vue +549 -549
- package/src/filiale/gehua/CardMeterCenter.vue +898 -898
- package/src/filiale/gehua/IOTMeterCenter.vue +791 -791
- package/src/filiale/gehua/MachineMeterCenter.vue +685 -685
- package/src/filiale/gehua/OtherChargeNew.vue +558 -558
- package/src/filiale/guangxi/CardMeterCenter.vue +891 -891
- package/src/filiale/guangxi/IOTMeterCenter.vue +774 -774
- package/src/filiale/guangxi/MachineMeterCenter.vue +622 -622
- package/src/filiale/haile/MachineMeterCenter.vue +762 -762
- package/src/filiale/huayin/CardMeterCenter.vue +903 -903
- package/src/filiale/huayin/IOTMeterCenter.vue +796 -796
- package/src/filiale/huayin/MachineMeterCenter.vue +680 -680
- package/src/filiale/jingwei/CardMeterCenter.vue +870 -870
- package/src/filiale/jingwei/ShowCardSellGas.vue +903 -903
- package/src/filiale/kelai/CardMeterCenter.vue +934 -934
- package/src/filiale/kelai/IOTMeterCenter.vue +833 -833
- package/src/filiale/kelai/MachineMeterCenter.vue +705 -705
- package/src/filiale/macheng/CardMeterCenter.vue +939 -939
- package/src/filiale/qianneng/OtherChargeNew.vue +544 -544
- package/src/filiale/qianneng/eticket/EticketModal.vue +91 -91
- package/src/filiale/qianneng/machine/MachineMeterCenter.vue +676 -676
- package/src/filiale/rizhao/IOTMeterCenter.vue +795 -795
- package/src/filiale/shangluo/CardMeterCenter.vue +892 -892
- package/src/filiale/shangluo/IOTMeterCenter.vue +797 -797
- package/src/filiale/shangluo/MachineMeterCenter.vue +734 -734
- package/src/filiale/shanxian/OtherChargeNew.vue +561 -561
- package/src/filiale/shanxian/components/revenue/CardMeterCenter.vue +944 -944
- package/src/filiale/tongchuan/CardMeterCenter.vue +923 -923
- package/src/filiale/tongchuan/bill/EticketModal.vue +90 -90
- package/src/filiale/wenxi/CardMeterCenter.vue +942 -942
- package/src/filiale/wenxi/IOTMeterCenter.vue +774 -774
- package/src/filiale/wuhai/CardMeterCenter.vue +945 -945
- package/src/filiale/wuhai/IOTMeterCenter.vue +757 -757
- package/src/filiale/yuansheng/CardMeterCenter.vue +950 -950
- package/src/filiale/yuansheng/IOTMeterCenter.vue +788 -788
|
@@ -1,383 +1,383 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="flex-row auto">
|
|
3
|
-
<div class="span auto" style="height: 98%;overflow-y: auto;">
|
|
4
|
-
<validator name='v'>
|
|
5
|
-
<form novalidate class="form-horizontal">
|
|
6
|
-
<div class="flex-auto">
|
|
7
|
-
<div style="height:550px;overflow-y: auto;">
|
|
8
|
-
<div style="margin-top:10px;" class="auto row" v-for="row in model.gaslossdetail">
|
|
9
|
-
<div class="panel panel-primary datapanel" style="background-color: #f4f6f8">
|
|
10
|
-
<div class="col-sm-4 form-group" :class="{'has-success':row.f_type,'has-error':!row.f_type}">
|
|
11
|
-
<label for="f_brand_spec" class="font_normal_body" title="参数名称:气损分类">气损分类</label>
|
|
12
|
-
<input v-show="false" v-model="row.f_type" v-validate:f_type='{required: true }'>
|
|
13
|
-
<v-select placeholder='气损分类'
|
|
14
|
-
v-model="row.f_type"
|
|
15
|
-
:value.sync="row.f_type"
|
|
16
|
-
:options='types'
|
|
17
|
-
:value-single="true"
|
|
18
|
-
close-on-select clear-button>
|
|
19
|
-
</v-select>
|
|
20
|
-
</div>
|
|
21
|
-
<div class="col-sm-4 form-group" :class="{'has-success':row.f_loss_type,'has-error':!row.f_loss_type}">
|
|
22
|
-
<label for="f_brand_spec" class="font_normal_body" title="参数名称:气损类型">气损类型</label>
|
|
23
|
-
<input v-show="false" v-model="row.f_loss_type" v-validate:f_loss_type='{required: true }'>
|
|
24
|
-
<v-select id="f_brand_spec"
|
|
25
|
-
placeholder='气损类型'
|
|
26
|
-
v-model="row.f_loss_type"
|
|
27
|
-
:value.sync="row.f_loss_type"
|
|
28
|
-
:options='row.f_type?this.$appdata.getParam(row.f_type):[]'
|
|
29
|
-
:value-single="true"
|
|
30
|
-
close-on-select clear-button>
|
|
31
|
-
</v-select>
|
|
32
|
-
</div>
|
|
33
|
-
<div class="col-sm-4 form-group" :class="{'has-success':row.f_unitprice,'has-error':!row.f_unitprice}">
|
|
34
|
-
<label style="" for="f_unitprice" class=" font_normal_body">单  价</label>
|
|
35
|
-
<input class="input_search" style="width:60%" type="number" min="0"
|
|
36
|
-
v-validate:f_unitprice='{required: true, dctest: [0, ">" ] }'
|
|
37
|
-
@blur.prevent="getcollection()"
|
|
38
|
-
v-model="row.f_unitprice"
|
|
39
|
-
placeholder="单价" >
|
|
40
|
-
</div>
|
|
41
|
-
<div class="col-sm-4 form-group" :class="{'has-success':row.f_number,'has-error':!row.f_number}">
|
|
42
|
-
<label style="" for="f_number" class="font_normal_body">数  量</label>
|
|
43
|
-
<input class="input_search" style="width:60%" type="number" min='1' @blur.prevent="getcollection()"
|
|
44
|
-
v-validate:f_number='{required: true, dctest: [0, ">" ] }'
|
|
45
|
-
v-model="row.f_number"
|
|
46
|
-
placeholder="数量" >
|
|
47
|
-
</div>
|
|
48
|
-
<div class="form-group" style="display: flow-root;width: 60px">
|
|
49
|
-
<button type="button" class="glyphicon glyphicon-minus btn-danger" @click.stop="delthisdetail($index)"></button>
|
|
50
|
-
<button type="button" class="glyphicon glyphicon-plus btn-success" @click.stop="addadetail()"></button>
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
<div class=" panel panel-primary datapanel" style="height:260px">
|
|
57
|
-
<div class="row">
|
|
58
|
-
<div class="col-sm-4 form-group">
|
|
59
|
-
<label class=" font_normal_body"> 客户编号</label>
|
|
60
|
-
<input class="input_search" style="width:60%"
|
|
61
|
-
v-model="model.f_userinfo_code"
|
|
62
|
-
@blur="codeChange()"
|
|
63
|
-
placeholder="客户编号">
|
|
64
|
-
</div>
|
|
65
|
-
<div class="col-sm-4 form-group" :class="{'has-success':model.f_charge_person,'has-error':!model.f_charge_person}">
|
|
66
|
-
<label class=" font_normal_body"> 缴 费 人 </label>
|
|
67
|
-
<input class="input_search" style="width:60%"
|
|
68
|
-
v-validate:f_charge_person='{required: true }'
|
|
69
|
-
v-model="model.f_charge_person"
|
|
70
|
-
placeholder="缴费人">
|
|
71
|
-
</div>
|
|
72
|
-
<div class="col-sm-4 form-group" :class="{'has-success':model.f_charge_phone,'has-error':!model.f_charge_phone}">
|
|
73
|
-
<label class=" font_normal_body"> 联系电话</label>
|
|
74
|
-
<input class="input_search" style="width:60%"
|
|
75
|
-
v-validate:f_charge_phone='{required: true }'
|
|
76
|
-
v-model="model.f_charge_phone"
|
|
77
|
-
placeholder="联系电话">
|
|
78
|
-
</div>
|
|
79
|
-
<div class="col-sm-12 form-group" :class="{'has-success':model.f_charge_address,'has-error':!model.f_charge_address}">
|
|
80
|
-
<label class=" font_normal_body">缴费人地址</label>
|
|
81
|
-
<input class="input_search" style="width:89%"
|
|
82
|
-
v-validate:f_charge_address='{required: true }'
|
|
83
|
-
v-model="model.f_charge_address"
|
|
84
|
-
placeholder="缴费人地址">
|
|
85
|
-
</div>
|
|
86
|
-
<div class="col-sm-4 form-group">
|
|
87
|
-
<label for="f_paytype" class="font_normal_body" title="参数名称:付款方式"> 收款方式</label>
|
|
88
|
-
<v-select id="f_payment"
|
|
89
|
-
v-model="f_payment"
|
|
90
|
-
placeholder='请选择'
|
|
91
|
-
:value.sync="model.f_payment"
|
|
92
|
-
:value-single="true"
|
|
93
|
-
:options='paytype'
|
|
94
|
-
close-on-select clear-button>
|
|
95
|
-
</v-select>
|
|
96
|
-
</div>
|
|
97
|
-
<div class="col-sm-4 form-group">
|
|
98
|
-
<label for="f_print" class="font_normal_body"> 打印格式</label>
|
|
99
|
-
<v-select id="print"
|
|
100
|
-
v-model="model.f_print"
|
|
101
|
-
placeholder='请选择'
|
|
102
|
-
:value.sync="model.f_print"
|
|
103
|
-
:options='printstyle'
|
|
104
|
-
:value-single="true"
|
|
105
|
-
close-on-select clear-button>
|
|
106
|
-
</v-select>
|
|
107
|
-
</div>
|
|
108
|
-
<div class="col-sm-4 auto">
|
|
109
|
-
<label for="f_collection" style="text-align:right;"><font size="6px" style="font-weight:bold;color:darkred">收 款:{{model.f_collection}}</font></label>
|
|
110
|
-
</div>
|
|
111
|
-
<div class="col-sm-9 form-group">
|
|
112
|
-
<label class=" font_normal_body"> 备  注</label>
|
|
113
|
-
<input class="input_search" style="width:70%"
|
|
114
|
-
v-model="model.f_comments"
|
|
115
|
-
placeholder="备注">
|
|
116
|
-
</div>
|
|
117
|
-
<div style="text-align:right;height: 25%;">
|
|
118
|
-
<button class="button_search btn-gn" type="button" @click="checkInvoiceMsg()" :disabled='!$v.valid || validateOk'>确认</button>
|
|
119
|
-
<button class="button_clear btn-gn" type="button" @click="clean()">取消</button>
|
|
120
|
-
</div>
|
|
121
|
-
</div>
|
|
122
|
-
</div>
|
|
123
|
-
</form>
|
|
124
|
-
<validate-bill v-if="hasValidateBill" :data="model" @validate-bill="validateBill"></validate-bill>
|
|
125
|
-
<print-bill :show="print" :data='model' :bill-config='config' :bill-data='billData' v-on:toggle="close" @printok="printok" v-ref:printbill></print-bill>
|
|
126
|
-
<ticket-print :show="eticket_show" @toggle="eticket_toggle" v-ref:eticketbill></ticket-print>
|
|
127
|
-
<eticket-modal :show="eticket_msg" @
|
|
128
|
-
</validator>
|
|
129
|
-
</div>
|
|
130
|
-
<payment-code v-ref:paymentcode :payment="model.f_payment" :money="model.f_collection"></payment-code>
|
|
131
|
-
</div>
|
|
132
|
-
</template>
|
|
133
|
-
|
|
134
|
-
<script>
|
|
135
|
-
import {HttpResetClass} from 'vue-client'
|
|
136
|
-
import Vue from 'vue'
|
|
137
|
-
|
|
138
|
-
let gasLossGen = async function (self) {
|
|
139
|
-
try {
|
|
140
|
-
// 加入扫码盒付款码支付流水号
|
|
141
|
-
self.model.f_serial_id = self.$refs.paymentcode.paymentCodeReturnData.f_out_trade_no
|
|
142
|
-
self.model.f_bill_style = self.model.f_print
|
|
143
|
-
let http = new HttpResetClass()
|
|
144
|
-
self.model.f_describe = `${Vue.$login.f.name}对${self.model.f_charge_person}进行气损收费`
|
|
145
|
-
let resid = await http.load('POST', 'rs/logic/gasLoss', self.model, {resolveMsg: '气损收费成功', rejectMsg: '气损收费失败'})
|
|
146
|
-
console.log('f_print:', resid)
|
|
147
|
-
if (self.model.f_print !== '电子发票') {
|
|
148
|
-
if (self.config.hasBillManage) {
|
|
149
|
-
self.model.id = resid.data
|
|
150
|
-
self.model.f_bill_type = '其他费用'
|
|
151
|
-
self.model.f_bill_style = self.model.f_print[0]
|
|
152
|
-
self.print = true
|
|
153
|
-
} else {
|
|
154
|
-
self.model.id = resid.data
|
|
155
|
-
self.print = true
|
|
156
|
-
}
|
|
157
|
-
} else if (self.model.f_print === '国税发票') {
|
|
158
|
-
// TODO
|
|
159
|
-
self.clean()
|
|
160
|
-
self.$dispatch('refresh')
|
|
161
|
-
} else if (self.model.f_print === '电子发票') {
|
|
162
|
-
self.eticket_show = true
|
|
163
|
-
await self.$refs.eticketbill.openETicket([resid.data], self.model, '气损收费')
|
|
164
|
-
}
|
|
165
|
-
} catch (error) {
|
|
166
|
-
self.$showAlert(error, 'danger', 0)
|
|
167
|
-
self.$dispatch('refresh')
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
let asyncGasLoss = async function (self) {
|
|
172
|
-
try {
|
|
173
|
-
await self.$getConfig(self, 'gasLossCharge')
|
|
174
|
-
} catch (error) {
|
|
175
|
-
console.log('无配置文件')
|
|
176
|
-
}
|
|
177
|
-
self.model.f_print = self.config.printType
|
|
178
|
-
self.model.f_payment = self.config.payment
|
|
179
|
-
self.model.f_use_type = self.config.billType
|
|
180
|
-
self.model.f_bill_type = self.config.f_print
|
|
181
|
-
self.hasValidateBill = self.config.hasBillManage
|
|
182
|
-
}
|
|
183
|
-
export default {
|
|
184
|
-
title: '气损收费',
|
|
185
|
-
data () {
|
|
186
|
-
return {
|
|
187
|
-
config: {
|
|
188
|
-
showupload: false,
|
|
189
|
-
hasPrint: false, // 默认打票
|
|
190
|
-
hasBillManage: false, // 默认不启用发票管理
|
|
191
|
-
billType: '其他费用', // 票据类型(燃气费,其他费用,调用的发票代码不同)
|
|
192
|
-
printType: '普通收据', // 收据/电子票/专用发票/国税发票
|
|
193
|
-
payment: '现金缴费', // 付款方式
|
|
194
|
-
f_type: '', // 气损分类
|
|
195
|
-
f_loss_type: '' // 气损类型
|
|
196
|
-
},
|
|
197
|
-
eticket_msg: false,
|
|
198
|
-
eticket_show: false,
|
|
199
|
-
invoice_is_pax: '征税',
|
|
200
|
-
is_pax: [{label: '征税', value: '征税'}, {label: '不征税', value: '不征税'}],
|
|
201
|
-
model: {
|
|
202
|
-
f_userinfo_id: null,
|
|
203
|
-
f_collection: 0,
|
|
204
|
-
f_payment: '',
|
|
205
|
-
f_bill_style: '',
|
|
206
|
-
f_comments: '',
|
|
207
|
-
f_charge_person: '',
|
|
208
|
-
f_charge_phone: '',
|
|
209
|
-
f_charge_address: '',
|
|
210
|
-
f_state: '有效',
|
|
211
|
-
f_operator: Vue.$login.f.name,
|
|
212
|
-
f_operatorid: Vue.$login.f.id,
|
|
213
|
-
f_orgid: Vue.$login.f.orgid,
|
|
214
|
-
f_orgname: Vue.$login.f.orgs,
|
|
215
|
-
f_depid: Vue.$login.f.depids,
|
|
216
|
-
f_depname: Vue.$login.f.deps,
|
|
217
|
-
f_operat_type: '气损收费',
|
|
218
|
-
f_print: '',
|
|
219
|
-
gaslossdetail: [{}],
|
|
220
|
-
f_user_name: '',
|
|
221
|
-
f_user_phone: '',
|
|
222
|
-
f_address: '',
|
|
223
|
-
f_paper_name: '',
|
|
224
|
-
f_paper_account: '',
|
|
225
|
-
f_idnumber: '',
|
|
226
|
-
f_taxpayer_id: '',
|
|
227
|
-
f_address_phone: ''
|
|
228
|
-
},
|
|
229
|
-
print: false,
|
|
230
|
-
taxprint: false,
|
|
231
|
-
billData: {
|
|
232
|
-
url: 'rs/report/gasloss_bill',
|
|
233
|
-
bill: ''
|
|
234
|
-
},
|
|
235
|
-
|
|
236
|
-
// 启用发票管理需要对票号进行验证
|
|
237
|
-
hasValidateBill: false,
|
|
238
|
-
validateOk: false,
|
|
239
|
-
types: this.$appdata.getParam('气损分类'),
|
|
240
|
-
printstyle: this.$appdata.getParam('打印格式'),
|
|
241
|
-
paytype: this.$appdata.getParam('付款方式'),
|
|
242
|
-
feetype: this.$appdata.getParam('其他费用'),
|
|
243
|
-
services: this.$appdata.getParam('服务人员')
|
|
244
|
-
}
|
|
245
|
-
},
|
|
246
|
-
ready () {
|
|
247
|
-
asyncGasLoss(this)
|
|
248
|
-
},
|
|
249
|
-
|
|
250
|
-
methods: {
|
|
251
|
-
checkInvoiceMsg () {
|
|
252
|
-
if (this.model.f_print === '电子发票') {
|
|
253
|
-
if (!this.model.f_taxpayer_id) {
|
|
254
|
-
this.model.f_taxpayer_id = this.model.f_idnumber
|
|
255
|
-
}
|
|
256
|
-
if (!this.model.f_paper_name) {
|
|
257
|
-
this.model.f_paper_name = this.model.f_user_name
|
|
258
|
-
}
|
|
259
|
-
if (!this.model.f_address_phone) {
|
|
260
|
-
this.model.f_address_phone = this.model.f_address + ' ' + this.model.f_user_phone
|
|
261
|
-
}
|
|
262
|
-
this.eticket_msg = true
|
|
263
|
-
} else {
|
|
264
|
-
this.confirm()
|
|
265
|
-
}
|
|
266
|
-
},
|
|
267
|
-
eticket_toggle () {
|
|
268
|
-
this.eticket_show = false
|
|
269
|
-
this.$dispatch('success')
|
|
270
|
-
},
|
|
271
|
-
async codeChange () {
|
|
272
|
-
this.model.f_userinfo_code = this.model.f_userinfo_code.trim()
|
|
273
|
-
if (this.model.f_userinfo_code) {
|
|
274
|
-
let http = new HttpResetClass()
|
|
275
|
-
let res = await http.load('POST', 'rs/sql/singleTable_OrderBy', {
|
|
276
|
-
data: {
|
|
277
|
-
items: 'u.f_userinfo_id,u.f_user_name,u.f_user_phone,a.f_address,u.f_paper_name,u.f_paper_account,u.f_idnumber,u.f_taxpayer_id,u.f_address_phone',
|
|
278
|
-
tablename: 't_userinfo u left join t_user_address a on u.f_userinfo_id = a.f_userinfo_id',
|
|
279
|
-
condition: `u.f_userinfo_code = '${this.model.f_userinfo_code}' and u.f_user_state = '正常'`,
|
|
280
|
-
orderitem: 'u.f_userinfo_id desc'
|
|
281
|
-
}
|
|
282
|
-
}, {resolveMsg: null, rejectMsg: '获取用户信息失败'})
|
|
283
|
-
if (res.data.length == 0) {
|
|
284
|
-
this.$showAlert('该客户编号不存在,请重新输入', 'warning', 3000)
|
|
285
|
-
this.model.f_userinfo_code = null
|
|
286
|
-
} else {
|
|
287
|
-
this.model.f_userinfo_id = res.data[0].f_userinfo_id
|
|
288
|
-
this.model.f_charge_person = res.data[0].f_user_name
|
|
289
|
-
this.model.f_charge_phone = res.data[0].f_user_phone
|
|
290
|
-
this.model.f_charge_address = res.data[0].f_address
|
|
291
|
-
this.model.f_user_name = res.data[0].f_user_name
|
|
292
|
-
this.model.f_user_phone = res.data[0].f_user_phone
|
|
293
|
-
this.model.f_address = res.data[0].f_address
|
|
294
|
-
this.model.f_paper_name = res.data[0].f_paper_name
|
|
295
|
-
this.model.f_paper_account = res.data[0].f_paper_account
|
|
296
|
-
this.model.f_idnumber = res.data[0].f_idnumber
|
|
297
|
-
this.model.f_taxpayer_id = res.data[0].f_taxpayer_id
|
|
298
|
-
this.model.f_address_phone = res.data[0].f_address_phone
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
},
|
|
302
|
-
async clean () {
|
|
303
|
-
this.model = {}
|
|
304
|
-
await this.$nextTick()
|
|
305
|
-
this.model = {
|
|
306
|
-
f_userinfo_id: null,
|
|
307
|
-
f_collection: 0,
|
|
308
|
-
f_payment: '',
|
|
309
|
-
f_bill_style: '',
|
|
310
|
-
f_comments: '',
|
|
311
|
-
f_charge_person: '',
|
|
312
|
-
f_charge_phone: '',
|
|
313
|
-
f_charge_address: '',
|
|
314
|
-
f_state: '有效',
|
|
315
|
-
f_operator: Vue.$login.f.name,
|
|
316
|
-
f_operatorid: Vue.$login.f.id,
|
|
317
|
-
f_orgid: Vue.$login.f.orgid,
|
|
318
|
-
f_orgname: Vue.$login.f.orgs,
|
|
319
|
-
f_depid: Vue.$login.f.depids,
|
|
320
|
-
f_depname: Vue.$login.f.deps,
|
|
321
|
-
f_operat_type: '气损收费',
|
|
322
|
-
f_print: '',
|
|
323
|
-
gaslossdetail: [{}],
|
|
324
|
-
f_user_name: '',
|
|
325
|
-
f_user_phone: '',
|
|
326
|
-
f_address: '',
|
|
327
|
-
f_paper_name: '',
|
|
328
|
-
f_paper_account: '',
|
|
329
|
-
f_idnumber: '',
|
|
330
|
-
f_taxpayer_id: '',
|
|
331
|
-
f_address_phone: ''
|
|
332
|
-
}
|
|
333
|
-
},
|
|
334
|
-
async confirm () {
|
|
335
|
-
this.eticket_msg = false
|
|
336
|
-
// // 先调用付款码支付组件流程
|
|
337
|
-
let ss = await this.$refs.paymentcode.flowPath()
|
|
338
|
-
this.$refs.paymentcode.paymentCodeShow = false
|
|
339
|
-
console.log('付款码操作返回', ss)
|
|
340
|
-
if (!ss.result) return
|
|
341
|
-
gasLossGen(this)
|
|
342
|
-
},
|
|
343
|
-
close () {
|
|
344
|
-
this.taxprint = false
|
|
345
|
-
this.print = false
|
|
346
|
-
this.clean()
|
|
347
|
-
},
|
|
348
|
-
printok () {
|
|
349
|
-
this.$dispatch('success')
|
|
350
|
-
},
|
|
351
|
-
validateBill (val) {
|
|
352
|
-
this.validateOk = !val.isOk
|
|
353
|
-
this.billData.bill = val.bill
|
|
354
|
-
},
|
|
355
|
-
getcollection () {
|
|
356
|
-
let money = 0
|
|
357
|
-
this.model.gaslossdetail.forEach((item) => {
|
|
358
|
-
if (item.f_unitprice && item.f_number) {
|
|
359
|
-
money += ((item.f_unitprice - 0) * (item.f_number - 0)) - 0
|
|
360
|
-
}
|
|
361
|
-
})
|
|
362
|
-
|
|
363
|
-
if (money != 0) {
|
|
364
|
-
this.model.f_collection = money.toFixed(2)
|
|
365
|
-
}
|
|
366
|
-
},
|
|
367
|
-
addadetail () {
|
|
368
|
-
this.model.gaslossdetail.push({})
|
|
369
|
-
},
|
|
370
|
-
delthisdetail (index) {
|
|
371
|
-
if (this.model.gaslossdetail.length > 1) {
|
|
372
|
-
this.model.gaslossdetail.splice(index, 1)
|
|
373
|
-
this.getcollection()
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
},
|
|
377
|
-
computed: {
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
</script>
|
|
381
|
-
|
|
382
|
-
<style>
|
|
383
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex-row auto">
|
|
3
|
+
<div class="span auto" style="height: 98%;overflow-y: auto;">
|
|
4
|
+
<validator name='v'>
|
|
5
|
+
<form novalidate class="form-horizontal">
|
|
6
|
+
<div class="flex-auto">
|
|
7
|
+
<div style="height:550px;overflow-y: auto;">
|
|
8
|
+
<div style="margin-top:10px;" class="auto row" v-for="row in model.gaslossdetail">
|
|
9
|
+
<div class="panel panel-primary datapanel" style="background-color: #f4f6f8">
|
|
10
|
+
<div class="col-sm-4 form-group" :class="{'has-success':row.f_type,'has-error':!row.f_type}">
|
|
11
|
+
<label for="f_brand_spec" class="font_normal_body" title="参数名称:气损分类">气损分类</label>
|
|
12
|
+
<input v-show="false" v-model="row.f_type" v-validate:f_type='{required: true }'>
|
|
13
|
+
<v-select placeholder='气损分类'
|
|
14
|
+
v-model="row.f_type"
|
|
15
|
+
:value.sync="row.f_type"
|
|
16
|
+
:options='types'
|
|
17
|
+
:value-single="true"
|
|
18
|
+
close-on-select clear-button>
|
|
19
|
+
</v-select>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="col-sm-4 form-group" :class="{'has-success':row.f_loss_type,'has-error':!row.f_loss_type}">
|
|
22
|
+
<label for="f_brand_spec" class="font_normal_body" title="参数名称:气损类型">气损类型</label>
|
|
23
|
+
<input v-show="false" v-model="row.f_loss_type" v-validate:f_loss_type='{required: true }'>
|
|
24
|
+
<v-select id="f_brand_spec"
|
|
25
|
+
placeholder='气损类型'
|
|
26
|
+
v-model="row.f_loss_type"
|
|
27
|
+
:value.sync="row.f_loss_type"
|
|
28
|
+
:options='row.f_type?this.$appdata.getParam(row.f_type):[]'
|
|
29
|
+
:value-single="true"
|
|
30
|
+
close-on-select clear-button>
|
|
31
|
+
</v-select>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="col-sm-4 form-group" :class="{'has-success':row.f_unitprice,'has-error':!row.f_unitprice}">
|
|
34
|
+
<label style="" for="f_unitprice" class=" font_normal_body">单  价</label>
|
|
35
|
+
<input class="input_search" style="width:60%" type="number" min="0"
|
|
36
|
+
v-validate:f_unitprice='{required: true, dctest: [0, ">" ] }'
|
|
37
|
+
@blur.prevent="getcollection()"
|
|
38
|
+
v-model="row.f_unitprice"
|
|
39
|
+
placeholder="单价" >
|
|
40
|
+
</div>
|
|
41
|
+
<div class="col-sm-4 form-group" :class="{'has-success':row.f_number,'has-error':!row.f_number}">
|
|
42
|
+
<label style="" for="f_number" class="font_normal_body">数  量</label>
|
|
43
|
+
<input class="input_search" style="width:60%" type="number" min='1' @blur.prevent="getcollection()"
|
|
44
|
+
v-validate:f_number='{required: true, dctest: [0, ">" ] }'
|
|
45
|
+
v-model="row.f_number"
|
|
46
|
+
placeholder="数量" >
|
|
47
|
+
</div>
|
|
48
|
+
<div class="form-group" style="display: flow-root;width: 60px">
|
|
49
|
+
<button type="button" class="glyphicon glyphicon-minus btn-danger" @click.stop="delthisdetail($index)"></button>
|
|
50
|
+
<button type="button" class="glyphicon glyphicon-plus btn-success" @click.stop="addadetail()"></button>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
<div class=" panel panel-primary datapanel" style="height:260px">
|
|
57
|
+
<div class="row">
|
|
58
|
+
<div class="col-sm-4 form-group">
|
|
59
|
+
<label class=" font_normal_body"> 客户编号</label>
|
|
60
|
+
<input class="input_search" style="width:60%"
|
|
61
|
+
v-model="model.f_userinfo_code"
|
|
62
|
+
@blur="codeChange()"
|
|
63
|
+
placeholder="客户编号">
|
|
64
|
+
</div>
|
|
65
|
+
<div class="col-sm-4 form-group" :class="{'has-success':model.f_charge_person,'has-error':!model.f_charge_person}">
|
|
66
|
+
<label class=" font_normal_body"> 缴 费 人 </label>
|
|
67
|
+
<input class="input_search" style="width:60%"
|
|
68
|
+
v-validate:f_charge_person='{required: true }'
|
|
69
|
+
v-model="model.f_charge_person"
|
|
70
|
+
placeholder="缴费人">
|
|
71
|
+
</div>
|
|
72
|
+
<div class="col-sm-4 form-group" :class="{'has-success':model.f_charge_phone,'has-error':!model.f_charge_phone}">
|
|
73
|
+
<label class=" font_normal_body"> 联系电话</label>
|
|
74
|
+
<input class="input_search" style="width:60%"
|
|
75
|
+
v-validate:f_charge_phone='{required: true }'
|
|
76
|
+
v-model="model.f_charge_phone"
|
|
77
|
+
placeholder="联系电话">
|
|
78
|
+
</div>
|
|
79
|
+
<div class="col-sm-12 form-group" :class="{'has-success':model.f_charge_address,'has-error':!model.f_charge_address}">
|
|
80
|
+
<label class=" font_normal_body">缴费人地址</label>
|
|
81
|
+
<input class="input_search" style="width:89%"
|
|
82
|
+
v-validate:f_charge_address='{required: true }'
|
|
83
|
+
v-model="model.f_charge_address"
|
|
84
|
+
placeholder="缴费人地址">
|
|
85
|
+
</div>
|
|
86
|
+
<div class="col-sm-4 form-group">
|
|
87
|
+
<label for="f_paytype" class="font_normal_body" title="参数名称:付款方式"> 收款方式</label>
|
|
88
|
+
<v-select id="f_payment"
|
|
89
|
+
v-model="f_payment"
|
|
90
|
+
placeholder='请选择'
|
|
91
|
+
:value.sync="model.f_payment"
|
|
92
|
+
:value-single="true"
|
|
93
|
+
:options='paytype'
|
|
94
|
+
close-on-select clear-button>
|
|
95
|
+
</v-select>
|
|
96
|
+
</div>
|
|
97
|
+
<div class="col-sm-4 form-group">
|
|
98
|
+
<label for="f_print" class="font_normal_body"> 打印格式</label>
|
|
99
|
+
<v-select id="print"
|
|
100
|
+
v-model="model.f_print"
|
|
101
|
+
placeholder='请选择'
|
|
102
|
+
:value.sync="model.f_print"
|
|
103
|
+
:options='printstyle'
|
|
104
|
+
:value-single="true"
|
|
105
|
+
close-on-select clear-button>
|
|
106
|
+
</v-select>
|
|
107
|
+
</div>
|
|
108
|
+
<div class="col-sm-4 auto">
|
|
109
|
+
<label for="f_collection" style="text-align:right;"><font size="6px" style="font-weight:bold;color:darkred">收 款:{{model.f_collection}}</font></label>
|
|
110
|
+
</div>
|
|
111
|
+
<div class="col-sm-9 form-group">
|
|
112
|
+
<label class=" font_normal_body"> 备  注</label>
|
|
113
|
+
<input class="input_search" style="width:70%"
|
|
114
|
+
v-model="model.f_comments"
|
|
115
|
+
placeholder="备注">
|
|
116
|
+
</div>
|
|
117
|
+
<div style="text-align:right;height: 25%;">
|
|
118
|
+
<button class="button_search btn-gn" type="button" @click="checkInvoiceMsg()" :disabled='!$v.valid || validateOk'>确认</button>
|
|
119
|
+
<button class="button_clear btn-gn" type="button" @click="clean()">取消</button>
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
</form>
|
|
124
|
+
<validate-bill v-if="hasValidateBill" :data="model" @validate-bill="validateBill"></validate-bill>
|
|
125
|
+
<print-bill :show="print" :data='model' :bill-config='config' :bill-data='billData' v-on:toggle="close" @printok="printok" v-ref:printbill></print-bill>
|
|
126
|
+
<ticket-print :show="eticket_show" @toggle="eticket_toggle" v-ref:eticketbill></ticket-print>
|
|
127
|
+
<eticket-modal :show="eticket_msg" @closemodalshow="eticket_msg = false" :row="model" @confirm="confirm"></eticket-modal>
|
|
128
|
+
</validator>
|
|
129
|
+
</div>
|
|
130
|
+
<payment-code v-ref:paymentcode :payment="model.f_payment" :money="model.f_collection"></payment-code>
|
|
131
|
+
</div>
|
|
132
|
+
</template>
|
|
133
|
+
|
|
134
|
+
<script>
|
|
135
|
+
import {HttpResetClass} from 'vue-client'
|
|
136
|
+
import Vue from 'vue'
|
|
137
|
+
|
|
138
|
+
let gasLossGen = async function (self) {
|
|
139
|
+
try {
|
|
140
|
+
// 加入扫码盒付款码支付流水号
|
|
141
|
+
self.model.f_serial_id = self.$refs.paymentcode.paymentCodeReturnData.f_out_trade_no
|
|
142
|
+
self.model.f_bill_style = self.model.f_print
|
|
143
|
+
let http = new HttpResetClass()
|
|
144
|
+
self.model.f_describe = `${Vue.$login.f.name}对${self.model.f_charge_person}进行气损收费`
|
|
145
|
+
let resid = await http.load('POST', 'rs/logic/gasLoss', self.model, {resolveMsg: '气损收费成功', rejectMsg: '气损收费失败'})
|
|
146
|
+
console.log('f_print:', resid)
|
|
147
|
+
if (self.model.f_print !== '电子发票') {
|
|
148
|
+
if (self.config.hasBillManage) {
|
|
149
|
+
self.model.id = resid.data
|
|
150
|
+
self.model.f_bill_type = '其他费用'
|
|
151
|
+
self.model.f_bill_style = self.model.f_print[0]
|
|
152
|
+
self.print = true
|
|
153
|
+
} else {
|
|
154
|
+
self.model.id = resid.data
|
|
155
|
+
self.print = true
|
|
156
|
+
}
|
|
157
|
+
} else if (self.model.f_print === '国税发票') {
|
|
158
|
+
// TODO
|
|
159
|
+
self.clean()
|
|
160
|
+
self.$dispatch('refresh')
|
|
161
|
+
} else if (self.model.f_print === '电子发票') {
|
|
162
|
+
self.eticket_show = true
|
|
163
|
+
await self.$refs.eticketbill.openETicket([resid.data], self.model, '气损收费')
|
|
164
|
+
}
|
|
165
|
+
} catch (error) {
|
|
166
|
+
self.$showAlert(error, 'danger', 0)
|
|
167
|
+
self.$dispatch('refresh')
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
let asyncGasLoss = async function (self) {
|
|
172
|
+
try {
|
|
173
|
+
await self.$getConfig(self, 'gasLossCharge')
|
|
174
|
+
} catch (error) {
|
|
175
|
+
console.log('无配置文件')
|
|
176
|
+
}
|
|
177
|
+
self.model.f_print = self.config.printType
|
|
178
|
+
self.model.f_payment = self.config.payment
|
|
179
|
+
self.model.f_use_type = self.config.billType
|
|
180
|
+
self.model.f_bill_type = self.config.f_print
|
|
181
|
+
self.hasValidateBill = self.config.hasBillManage
|
|
182
|
+
}
|
|
183
|
+
export default {
|
|
184
|
+
title: '气损收费',
|
|
185
|
+
data () {
|
|
186
|
+
return {
|
|
187
|
+
config: {
|
|
188
|
+
showupload: false,
|
|
189
|
+
hasPrint: false, // 默认打票
|
|
190
|
+
hasBillManage: false, // 默认不启用发票管理
|
|
191
|
+
billType: '其他费用', // 票据类型(燃气费,其他费用,调用的发票代码不同)
|
|
192
|
+
printType: '普通收据', // 收据/电子票/专用发票/国税发票
|
|
193
|
+
payment: '现金缴费', // 付款方式
|
|
194
|
+
f_type: '', // 气损分类
|
|
195
|
+
f_loss_type: '' // 气损类型
|
|
196
|
+
},
|
|
197
|
+
eticket_msg: false,
|
|
198
|
+
eticket_show: false,
|
|
199
|
+
invoice_is_pax: '征税',
|
|
200
|
+
is_pax: [{label: '征税', value: '征税'}, {label: '不征税', value: '不征税'}],
|
|
201
|
+
model: {
|
|
202
|
+
f_userinfo_id: null,
|
|
203
|
+
f_collection: 0,
|
|
204
|
+
f_payment: '',
|
|
205
|
+
f_bill_style: '',
|
|
206
|
+
f_comments: '',
|
|
207
|
+
f_charge_person: '',
|
|
208
|
+
f_charge_phone: '',
|
|
209
|
+
f_charge_address: '',
|
|
210
|
+
f_state: '有效',
|
|
211
|
+
f_operator: Vue.$login.f.name,
|
|
212
|
+
f_operatorid: Vue.$login.f.id,
|
|
213
|
+
f_orgid: Vue.$login.f.orgid,
|
|
214
|
+
f_orgname: Vue.$login.f.orgs,
|
|
215
|
+
f_depid: Vue.$login.f.depids,
|
|
216
|
+
f_depname: Vue.$login.f.deps,
|
|
217
|
+
f_operat_type: '气损收费',
|
|
218
|
+
f_print: '',
|
|
219
|
+
gaslossdetail: [{}],
|
|
220
|
+
f_user_name: '',
|
|
221
|
+
f_user_phone: '',
|
|
222
|
+
f_address: '',
|
|
223
|
+
f_paper_name: '',
|
|
224
|
+
f_paper_account: '',
|
|
225
|
+
f_idnumber: '',
|
|
226
|
+
f_taxpayer_id: '',
|
|
227
|
+
f_address_phone: ''
|
|
228
|
+
},
|
|
229
|
+
print: false,
|
|
230
|
+
taxprint: false,
|
|
231
|
+
billData: {
|
|
232
|
+
url: 'rs/report/gasloss_bill',
|
|
233
|
+
bill: ''
|
|
234
|
+
},
|
|
235
|
+
|
|
236
|
+
// 启用发票管理需要对票号进行验证
|
|
237
|
+
hasValidateBill: false,
|
|
238
|
+
validateOk: false,
|
|
239
|
+
types: this.$appdata.getParam('气损分类'),
|
|
240
|
+
printstyle: this.$appdata.getParam('打印格式'),
|
|
241
|
+
paytype: this.$appdata.getParam('付款方式'),
|
|
242
|
+
feetype: this.$appdata.getParam('其他费用'),
|
|
243
|
+
services: this.$appdata.getParam('服务人员')
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
ready () {
|
|
247
|
+
asyncGasLoss(this)
|
|
248
|
+
},
|
|
249
|
+
|
|
250
|
+
methods: {
|
|
251
|
+
checkInvoiceMsg () {
|
|
252
|
+
if (this.model.f_print === '电子发票') {
|
|
253
|
+
if (!this.model.f_taxpayer_id) {
|
|
254
|
+
this.model.f_taxpayer_id = this.model.f_idnumber
|
|
255
|
+
}
|
|
256
|
+
if (!this.model.f_paper_name) {
|
|
257
|
+
this.model.f_paper_name = this.model.f_user_name
|
|
258
|
+
}
|
|
259
|
+
if (!this.model.f_address_phone) {
|
|
260
|
+
this.model.f_address_phone = this.model.f_address + ' ' + this.model.f_user_phone
|
|
261
|
+
}
|
|
262
|
+
this.eticket_msg = true
|
|
263
|
+
} else {
|
|
264
|
+
this.confirm()
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
eticket_toggle () {
|
|
268
|
+
this.eticket_show = false
|
|
269
|
+
this.$dispatch('success')
|
|
270
|
+
},
|
|
271
|
+
async codeChange () {
|
|
272
|
+
this.model.f_userinfo_code = this.model.f_userinfo_code.trim()
|
|
273
|
+
if (this.model.f_userinfo_code) {
|
|
274
|
+
let http = new HttpResetClass()
|
|
275
|
+
let res = await http.load('POST', 'rs/sql/singleTable_OrderBy', {
|
|
276
|
+
data: {
|
|
277
|
+
items: 'u.f_userinfo_id,u.f_user_name,u.f_user_phone,a.f_address,u.f_paper_name,u.f_paper_account,u.f_idnumber,u.f_taxpayer_id,u.f_address_phone',
|
|
278
|
+
tablename: 't_userinfo u left join t_user_address a on u.f_userinfo_id = a.f_userinfo_id',
|
|
279
|
+
condition: `u.f_userinfo_code = '${this.model.f_userinfo_code}' and u.f_user_state = '正常'`,
|
|
280
|
+
orderitem: 'u.f_userinfo_id desc'
|
|
281
|
+
}
|
|
282
|
+
}, {resolveMsg: null, rejectMsg: '获取用户信息失败'})
|
|
283
|
+
if (res.data.length == 0) {
|
|
284
|
+
this.$showAlert('该客户编号不存在,请重新输入', 'warning', 3000)
|
|
285
|
+
this.model.f_userinfo_code = null
|
|
286
|
+
} else {
|
|
287
|
+
this.model.f_userinfo_id = res.data[0].f_userinfo_id
|
|
288
|
+
this.model.f_charge_person = res.data[0].f_user_name
|
|
289
|
+
this.model.f_charge_phone = res.data[0].f_user_phone
|
|
290
|
+
this.model.f_charge_address = res.data[0].f_address
|
|
291
|
+
this.model.f_user_name = res.data[0].f_user_name
|
|
292
|
+
this.model.f_user_phone = res.data[0].f_user_phone
|
|
293
|
+
this.model.f_address = res.data[0].f_address
|
|
294
|
+
this.model.f_paper_name = res.data[0].f_paper_name
|
|
295
|
+
this.model.f_paper_account = res.data[0].f_paper_account
|
|
296
|
+
this.model.f_idnumber = res.data[0].f_idnumber
|
|
297
|
+
this.model.f_taxpayer_id = res.data[0].f_taxpayer_id
|
|
298
|
+
this.model.f_address_phone = res.data[0].f_address_phone
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
async clean () {
|
|
303
|
+
this.model = {}
|
|
304
|
+
await this.$nextTick()
|
|
305
|
+
this.model = {
|
|
306
|
+
f_userinfo_id: null,
|
|
307
|
+
f_collection: 0,
|
|
308
|
+
f_payment: '',
|
|
309
|
+
f_bill_style: '',
|
|
310
|
+
f_comments: '',
|
|
311
|
+
f_charge_person: '',
|
|
312
|
+
f_charge_phone: '',
|
|
313
|
+
f_charge_address: '',
|
|
314
|
+
f_state: '有效',
|
|
315
|
+
f_operator: Vue.$login.f.name,
|
|
316
|
+
f_operatorid: Vue.$login.f.id,
|
|
317
|
+
f_orgid: Vue.$login.f.orgid,
|
|
318
|
+
f_orgname: Vue.$login.f.orgs,
|
|
319
|
+
f_depid: Vue.$login.f.depids,
|
|
320
|
+
f_depname: Vue.$login.f.deps,
|
|
321
|
+
f_operat_type: '气损收费',
|
|
322
|
+
f_print: '',
|
|
323
|
+
gaslossdetail: [{}],
|
|
324
|
+
f_user_name: '',
|
|
325
|
+
f_user_phone: '',
|
|
326
|
+
f_address: '',
|
|
327
|
+
f_paper_name: '',
|
|
328
|
+
f_paper_account: '',
|
|
329
|
+
f_idnumber: '',
|
|
330
|
+
f_taxpayer_id: '',
|
|
331
|
+
f_address_phone: ''
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
async confirm () {
|
|
335
|
+
this.eticket_msg = false
|
|
336
|
+
// // 先调用付款码支付组件流程
|
|
337
|
+
let ss = await this.$refs.paymentcode.flowPath()
|
|
338
|
+
this.$refs.paymentcode.paymentCodeShow = false
|
|
339
|
+
console.log('付款码操作返回', ss)
|
|
340
|
+
if (!ss.result) return
|
|
341
|
+
gasLossGen(this)
|
|
342
|
+
},
|
|
343
|
+
close () {
|
|
344
|
+
this.taxprint = false
|
|
345
|
+
this.print = false
|
|
346
|
+
this.clean()
|
|
347
|
+
},
|
|
348
|
+
printok () {
|
|
349
|
+
this.$dispatch('success')
|
|
350
|
+
},
|
|
351
|
+
validateBill (val) {
|
|
352
|
+
this.validateOk = !val.isOk
|
|
353
|
+
this.billData.bill = val.bill
|
|
354
|
+
},
|
|
355
|
+
getcollection () {
|
|
356
|
+
let money = 0
|
|
357
|
+
this.model.gaslossdetail.forEach((item) => {
|
|
358
|
+
if (item.f_unitprice && item.f_number) {
|
|
359
|
+
money += ((item.f_unitprice - 0) * (item.f_number - 0)) - 0
|
|
360
|
+
}
|
|
361
|
+
})
|
|
362
|
+
|
|
363
|
+
if (money != 0) {
|
|
364
|
+
this.model.f_collection = money.toFixed(2)
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
addadetail () {
|
|
368
|
+
this.model.gaslossdetail.push({})
|
|
369
|
+
},
|
|
370
|
+
delthisdetail (index) {
|
|
371
|
+
if (this.model.gaslossdetail.length > 1) {
|
|
372
|
+
this.model.gaslossdetail.splice(index, 1)
|
|
373
|
+
this.getcollection()
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
computed: {
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
</script>
|
|
381
|
+
|
|
382
|
+
<style>
|
|
383
|
+
</style>
|