sale-client 3.4.112 → 3.4.113
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 → 4.4}/fileChanges/last-build.bin +0 -0
- package/.gradle/{6.1.1 → 4.4}/fileHashes/fileHashes.bin +0 -0
- package/.gradle/4.4/fileHashes/fileHashes.lock +0 -0
- package/build/dev-server.js +3 -3
- package/{.gradle/5.2.1/gc.properties → npm} +0 -0
- package/package.json +1 -1
- package/src/components/FilesManage/MeterinfoTest.vue +904 -905
- package/src/components/FilesManage/TemplateManage.vue +167 -167
- package/src/components/FilesManage/UserGeneralInfoTest.vue +642 -640
- package/src/components/charge/business/CardChangeFill.vue +612 -612
- package/src/components/charge/business/CardMeterCenter.vue +899 -899
- package/src/components/charge/business/FilesComplete.vue +253 -253
- package/src/components/charge/business/refund/IOTRefund.vue +236 -236
- package/src/components/charge/business/refund/RefundManage.vue +28 -28
- package/src/components/charge/gasloss/gasLossOperate.vue +357 -357
- package/src/components/chargeNew/thirdSurplus.vue +2 -0
- package/src/components/revenue/Common/MeterMessage.vue +184 -184
- package/src/components/revenue/HandManager/MeterBookManage.vue +153 -153
- package/src/components/revenue/base/leftview/MixPriceInfo.vue +60 -60
- package/src/components/revenue/base/leftview/Mulitinfo.vue +74 -74
- package/src/components/revenue/base/leftview/SafeCheck.vue +311 -311
- package/src/components/revenue/base/leftview/Stairinfo.vue +156 -156
- package/src/components/revenue/base/leftview/meterinfodetail.vue +195 -195
- package/src/components/revenue/base/rightview/CardList.vue +477 -477
- package/src/components/revenue/comprehen/ComprehenOperation/MeterDisable/DisableManage.vue +93 -93
- package/src/components/revenue/comprehen/ComprehenOperation/MeterEnable/EnableManage.vue +184 -184
- package/src/components/revenue/comprehen/ComprehenOperation/OtherGas/OtherGas.vue +5 -1
- package/src/components/revenue/comprehen/ComprehenOperation/removeTable.vue +1 -1
- package/src/components/revenue/comprehen/Maintenance/hand/handListMaintain.vue +638 -638
- package/src/components/revenue/comprehen/Maintenance/revenue/StockListmain.vue +7 -7
- package/src/components/revenue/comprehen/Message/MessageList.vue +587 -587
- package/src/components/revenue/comprehen/SpecialUser/BlackList/BlackList.vue +1 -1
- package/src/components/revenue/comprehen/SpecialUser/BlackList/BlackListManage.vue +1 -1
- package/src/components/revenue/comprehen/StairPrice/GasPriceList.vue +303 -303
- package/src/components/revenue/comprehen/replacement/replacementHandInfoRecord.vue +155 -155
- package/src/components/revenue/comprehen/wechatpay/WeChat.vue +62 -62
- package/src/components/webMeter/MeterManage/WebMeterBatchOperationValve.vue +8 -4
- package/src/filiale/alashan/PrintBill.vue +116 -116
- package/src/filiale/jingwei/CardHand.vue +742 -742
- package/src/filiale/macheng/FilesManageNew/FileUserFiles.vue +743 -0
- package/src/filiale/macheng/FilesManageNew/UserEssentialInfoTest.vue +371 -371
- package/src/filiale/macheng/FilesManageNew/UserGeneralInfoTest.vue +596 -596
- package/src/filiale/macheng/UserEssentialInfoTest.vue +368 -366
- package/src/filiale/meihekou/MeterinfoTest.vue +0 -1
- package/src/filiale/meihekou/PrintBill.vue +140 -140
- package/src/filiale/meihekou/ReissueBill.vue +322 -322
- package/src/filiale/qianneng/FilesManage/MeterinfoTest.vue +0 -1
- package/src/filiale/qianneng/GasPriceList.vue +330 -330
- package/src/filiale/qianneng/HandManager.vue +1838 -1838
- package/src/filiale/qianneng/OtherChargeNew.vue +6 -2
- package/src/filiale/qianneng/sale.js +30 -32
- package/src/filiale/qingtongxia/UserGeneralInfoTest.vue +538 -533
- package/src/filiale/rongcheng/FilesManageNew/UserGeneralInfoTest.vue +608 -608
- package/src/filiale/rongchuang/OtherGas.vue +329 -329
- package/src/filiale/tongchuan/CardList.vue +482 -482
- package/src/filiale/tongchuan/MeterinfoTest.vue +892 -892
- package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/AutomaticPurse.vue +298 -298
- package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/CardHandRecord.vue +267 -267
- package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/ChangeMeterQueryUser.vue +240 -240
- package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/ChangeRecord.vue +235 -235
- package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/ChargeQueryUser.vue +372 -372
- package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/DeveiceRecord.vue +251 -251
- package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/FillCardQueryUser.vue +209 -209
- package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/HandQueryUser.vue +365 -365
- package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/MachineRecordQuery.vue +252 -252
- package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/OtherChargeQueryUser.vue +250 -250
- package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/RecordQueryUser.vue +249 -249
- package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/TransferQueryUser.vue +222 -222
- package/src/filiale/tongchuan/sale.js +107 -107
- package/src/filiale/zhongsheng/rightview/CardList.vue +492 -492
- package/src/filiale/zhongsheng/wechatpay/WeChatPayDetail.vue +469 -469
- package/src/main.js +1 -1
- package/src/plugins/CardService.js +1798 -1798
- package/src/plugins/ChangeMeterService.js +756 -756
- package/src/plugins/FileManageService.js +366 -366
- package/.gradle/5.2.1/fileHashes/fileHashes.lock +0 -0
- package/.gradle/6.1.1/executionHistory/executionHistory.bin +0 -0
- package/.gradle/6.1.1/executionHistory/executionHistory.lock +0 -0
- package/.gradle/6.1.1/fileChanges/last-build.bin +0 -0
- package/.gradle/6.1.1/fileHashes/fileHashes.lock +0 -0
- package/.gradle/6.1.1/gc.properties +0 -0
- package/.gradle/7.1/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/.gradle/7.1/dependencies-accessors/gc.properties +0 -0
- package/.gradle/7.1/executionHistory/executionHistory.bin +0 -0
- package/.gradle/7.1/executionHistory/executionHistory.lock +0 -0
- package/.gradle/7.1/fileChanges/last-build.bin +0 -0
- package/.gradle/7.1/fileHashes/fileHashes.bin +0 -0
- package/.gradle/7.1/fileHashes/fileHashes.lock +0 -0
- package/.gradle/7.1/gc.properties +0 -0
- package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/.gradle/checksums/checksums.lock +0 -0
- package/.gradle/vcs-1/gc.properties +0 -0
|
@@ -1,322 +1,322 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="auto">
|
|
3
|
-
<modal :show.sync="show" v-ref:modal large backdrop="false" style="overflow-y: auto !important;">
|
|
4
|
-
<header slot="modal-header" class="modal-header" style="text-align: center;">
|
|
5
|
-
<h4 class="modal-title">{{data.type}}票据补打</h4>
|
|
6
|
-
</header>
|
|
7
|
-
<article slot="modal-body" class="modal-body">
|
|
8
|
-
<validator name='v'>
|
|
9
|
-
<form class="form-horizontal select-overspread">
|
|
10
|
-
<div class="row" style="display: flex;justify-content: center;" id='reissue-bill'>
|
|
11
|
-
{{{bill.data}}}
|
|
12
|
-
</div>
|
|
13
|
-
<div class="row" v-if="config.hasBillManage">
|
|
14
|
-
<div v-if="!messShow">
|
|
15
|
-
<!--<span><strong>发票号:{{model.f_using_number}}</strong></span>-->
|
|
16
|
-
<div v-if="model.f_rprint_type === 'new'">
|
|
17
|
-
<div class="form-group form-input-group col-sm-4">
|
|
18
|
-
<label class="control-label col-sm-2">新票号:</label>
|
|
19
|
-
<div class="col-sm-2">
|
|
20
|
-
<input type="text" class="form-control col-sm-2" v-model="model.newNumber.number" readonly>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
<div v-if="model.f_rprint_type === 'old'">
|
|
25
|
-
<div class="form-group form-input-group col-sm-4">
|
|
26
|
-
<label class="control-label col-sm-2">原票号:</label>
|
|
27
|
-
<div class="col-sm-2">
|
|
28
|
-
<input type="text" class="form-control col-sm-2" v-model="model.oldNumber.number" readonly>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
<div class="row" v-if="config.hasBillManage" style="margin-top: 1%">
|
|
36
|
-
<div class="form-group form-input-group col-sm-4">
|
|
37
|
-
<label class="col-sm-2 control-label">补打类型:</label>
|
|
38
|
-
<div class="col-sm-2">
|
|
39
|
-
<v-select
|
|
40
|
-
v-model="model.f_rprint_type"
|
|
41
|
-
placeholder='请选择'
|
|
42
|
-
:value.sync="model.f_rprint_type"
|
|
43
|
-
:options='rprinttype'
|
|
44
|
-
:value-single="true"
|
|
45
|
-
:disabled="isOnlyNew"
|
|
46
|
-
@change="printTypeChane"
|
|
47
|
-
close-on-select clear-button>
|
|
48
|
-
</v-select>
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
<div v-if="isOnlyNew">
|
|
52
|
-
|
|
53
|
-
<div class="form-group form-input-group col-sm-4" :class="[$v.billtype.required ? 'has-error' : 'has-success']">
|
|
54
|
-
<label class="col-sm-2 control-label">票据类型</label>
|
|
55
|
-
<div class="col-sm-2" >
|
|
56
|
-
<v-select :value.sync="model.f_bill_type"
|
|
57
|
-
v-model="model.f_bill_type"
|
|
58
|
-
:options='printtypes'
|
|
59
|
-
placeholder='请选择'
|
|
60
|
-
v-model="model.f_bill_type"
|
|
61
|
-
@change="useTypeChange"
|
|
62
|
-
:value-single="true"
|
|
63
|
-
close-on-select v-ref:billtype>
|
|
64
|
-
</v-select>
|
|
65
|
-
<input type="text" v-show="false" v-model="$refs.billtype.selectedItems" v-validate:billtype='{required: true }'>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
|
|
69
|
-
<div class="form-group form-input-group col-sm-4" :class="[$v.usetype.required ? 'select-error' : '']">
|
|
70
|
-
<label class="col-sm-2 control-label">使用类型</label>
|
|
71
|
-
<div class="col-sm-2" >
|
|
72
|
-
<v-select :value.sync="model.f_use_type"
|
|
73
|
-
v-model="model.f_use_type"
|
|
74
|
-
:options='usetypes'
|
|
75
|
-
placeholder='请选择'
|
|
76
|
-
v-model="model.f_use_type"
|
|
77
|
-
@change="useTypeChange"
|
|
78
|
-
:value-single="true"
|
|
79
|
-
close-on-select v-ref:usetype>
|
|
80
|
-
</v-select>
|
|
81
|
-
<input type="text" v-show="false" v-model="$refs.usetype.selectedItems" v-validate:usetype='{required: true }'>
|
|
82
|
-
</div>
|
|
83
|
-
</div>
|
|
84
|
-
|
|
85
|
-
</div>
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
</div>
|
|
90
|
-
<div class="row" style="margin-top: 1%">
|
|
91
|
-
<div class="form-group form-input-group col-sm-12">
|
|
92
|
-
<label for="f_cause" class=" col-sm-2 control-label">补打原因:</label>
|
|
93
|
-
<div class="col-sm-10">
|
|
94
|
-
<textarea class="form-control" v-model="model.f_cause" rows="1" placeholder="补打原因"></textarea>
|
|
95
|
-
</div>
|
|
96
|
-
</div>
|
|
97
|
-
</div>
|
|
98
|
-
</form>
|
|
99
|
-
</validator>
|
|
100
|
-
</article>
|
|
101
|
-
<footer slot="modal-footer" class="modal-footer">
|
|
102
|
-
<button type="button" class="btn btn-success" @click='print()' :disabled="!$v.valid">打印</button>
|
|
103
|
-
<report-print id='reissue-bill' top='5mm' left='5mm' width='90%' height='80%' :notrepeat="false" :showbtn="false" v-ref:reportprint></report-print>
|
|
104
|
-
<button class="btn btn-default" @click="clean()">取消</button>
|
|
105
|
-
</footer>
|
|
106
|
-
</modal>
|
|
107
|
-
</div>
|
|
108
|
-
</template>
|
|
109
|
-
<script>
|
|
110
|
-
/**
|
|
111
|
-
*票据补打
|
|
112
|
-
*/
|
|
113
|
-
|
|
114
|
-
import {DataModel, HttpResetClass} from 'vue-client'
|
|
115
|
-
|
|
116
|
-
let readyGen = async function (self) {
|
|
117
|
-
await self.$getConfig(self, 'ReissueBill')
|
|
118
|
-
console.log('补打业务config', self.config)
|
|
119
|
-
await getBillData(self)
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
let getBillGen = async function (self) {
|
|
123
|
-
// 判断发票管理是否启用
|
|
124
|
-
if (self.config.hasBillManage) {
|
|
125
|
-
if (self.model.f_rprint_type === 'old') {
|
|
126
|
-
await getOld(self)
|
|
127
|
-
} else {
|
|
128
|
-
await getNew(self)
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
let getOld = async function (self) {
|
|
134
|
-
let param = {
|
|
135
|
-
id: self.data.id,
|
|
136
|
-
type: self.data.type
|
|
137
|
-
}
|
|
138
|
-
let getOld = await self.$resetpost('rs/logic/sale_getOldBillNumber', param, {resolveMsg: null, rejectMsg: null})
|
|
139
|
-
console.log('获取原始票号', getOld)
|
|
140
|
-
// 验证原始票号是否存在
|
|
141
|
-
if (getOld.data.id && getOld.data.number) {
|
|
142
|
-
self.model.oldNumber.number = getOld.data.number
|
|
143
|
-
self.model.oldNumber.id = getOld.data.id
|
|
144
|
-
} else {
|
|
145
|
-
self.$showAlert('此次正常操作时没有出票,只能使用新票号进行补打', 'warning', 2000)
|
|
146
|
-
self.model.f_rprint_type = 'new'
|
|
147
|
-
self.isOnlyNew = true
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
let getNew = async function (self) {
|
|
152
|
-
// 获取原来收费记录使用的发票类型
|
|
153
|
-
let param = {
|
|
154
|
-
id: self.data.id,
|
|
155
|
-
type: self.data.type
|
|
156
|
-
}
|
|
157
|
-
let oldUseType = await self.$resetpost('rs/logic/sale_getOldUseType', param, {resolveMsg: null, rejectMsg: '获取原始票据信息出错!!'})
|
|
158
|
-
console.log('获取原始票据信息。。。', oldUseType)
|
|
159
|
-
|
|
160
|
-
let newparam = {
|
|
161
|
-
f_bill_user: self.$login.f.name, // 票据使用人
|
|
162
|
-
f_filialeids: self.$login.f.orgid // 所属分公司
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
if (oldUseType.data.billtype && oldUseType.data.f_use_type) {
|
|
166
|
-
newparam.f_bill_type = oldUseType.data.billtype
|
|
167
|
-
newparam.f_use_type = oldUseType.data.f_use_type
|
|
168
|
-
} else {
|
|
169
|
-
if (self.model.f_use_type && self.model.f_bill_type) {
|
|
170
|
-
newparam.f_bill_type = self.model.f_bill_type
|
|
171
|
-
newparam.f_use_type = self.model.f_use_type
|
|
172
|
-
} else {
|
|
173
|
-
self.isOnlyNew = true
|
|
174
|
-
// self.model.f_bill_type = '普通收据'
|
|
175
|
-
self.$showAlert('请选择票据使用类型', 'warning', 2000)
|
|
176
|
-
return
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
let getNew
|
|
180
|
-
try {
|
|
181
|
-
getNew = await self.$resetpost('rs/logic/sale_getNewBillNumber', newparam, {resolveMsg: null, rejectMsg: null})
|
|
182
|
-
} catch (e) {
|
|
183
|
-
self.model.newNumber.number = ''
|
|
184
|
-
self.model.newNumber.id = ''
|
|
185
|
-
self.$showAlert('未获取到发票号', 'warning', 2000)
|
|
186
|
-
return
|
|
187
|
-
}
|
|
188
|
-
console.log('获取新票号', getNew)
|
|
189
|
-
self.model.newNumber.number = getNew.data.number
|
|
190
|
-
self.model.newNumber.id = getNew.data.id
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* ready执行过程
|
|
195
|
-
*/
|
|
196
|
-
let getBillData = async function (self) {
|
|
197
|
-
let billParam = {reprint: "'补打'"}
|
|
198
|
-
// 显示票据
|
|
199
|
-
if (self.data.f_bill_type == '卡表收费' || self.data.f_bill_type == '发卡售气') {
|
|
200
|
-
let http = new HttpResetClass()
|
|
201
|
-
let param = {
|
|
202
|
-
model: {f_userfiles_id: self.data.f_userfiles_id},
|
|
203
|
-
isGasValue: 0,
|
|
204
|
-
value: 0
|
|
205
|
-
}
|
|
206
|
-
let a = await http.load('POST', 'rs/logic/commonCal', {data: param}, {resolveMsg: null, rejectMsg: '获取阶梯使用情况出错'})
|
|
207
|
-
let value = a.data
|
|
208
|
-
let jt = a.data.chargeprice.length
|
|
209
|
-
if (jt > 1) {
|
|
210
|
-
value.f_hasuse1 = (value.sumamount >= value.f_stair1ceiling ? value.f_stair1ceiling : value.sumamount).toFixed(4)
|
|
211
|
-
value.f_hasuse2 = (value.sumamount >= value.f_stair2ceiling ? value.f_stair2ceiling - value.f_stair1ceiling : value.sumamount - value.f_stair1ceiling).toFixed(4)
|
|
212
|
-
value.f_hasuse3 = (value.sumamount >= value.f_stair3ceiling ? value.f_stair3ceiling - value.f_stair2ceiling : value.sumamount - value.f_stair2ceiling).toFixed(4)
|
|
213
|
-
if (value.f_hasuse2 < 0) value.f_hasuse2 = 0
|
|
214
|
-
if (value.f_hasuse3 < 0) value.f_hasuse3 = 0
|
|
215
|
-
} else {
|
|
216
|
-
let parm1 = {
|
|
217
|
-
items: 'f_pregas',
|
|
218
|
-
tablename: 't_sellinggas',
|
|
219
|
-
condition: `id=${self.data.id}`
|
|
220
|
-
}
|
|
221
|
-
let b = await http.load('POST', 'rs/sql/querySingleTable', {data: parm1}, {resolveMsg: null, rejectMsg: '获取同价使用情况出错'})
|
|
222
|
-
value.f_hasuse1 = b.data[0].f_pregas
|
|
223
|
-
value.f_hasuse2 = 0
|
|
224
|
-
value.f_hasuse3 = 0
|
|
225
|
-
value.f_stair1price = value.chargeprice[0].f_price
|
|
226
|
-
value.f_stair2price = 0
|
|
227
|
-
value.f_stair3price = 0
|
|
228
|
-
}
|
|
229
|
-
billParam = Object.assign(billParam, value)
|
|
230
|
-
}
|
|
231
|
-
self.bill = new DataModel(self.data.billUrl, billParam)
|
|
232
|
-
await self.bill.search(self.data.id)
|
|
233
|
-
// self.bill.data = '我是补打发票'
|
|
234
|
-
await getBillGen(self)
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
export default {
|
|
238
|
-
title: '票据补打',
|
|
239
|
-
data () {
|
|
240
|
-
return {
|
|
241
|
-
config: {
|
|
242
|
-
hasBillManage: false // 默认不启用发票管理
|
|
243
|
-
},
|
|
244
|
-
bill: Object,
|
|
245
|
-
model: {
|
|
246
|
-
oldNumber: {
|
|
247
|
-
number: '',
|
|
248
|
-
id: ''
|
|
249
|
-
},
|
|
250
|
-
newNumber: {
|
|
251
|
-
number: '',
|
|
252
|
-
id: ''
|
|
253
|
-
},
|
|
254
|
-
f_end_number: null,
|
|
255
|
-
f_cause: null,
|
|
256
|
-
f_rprint_type: 'new'
|
|
257
|
-
},
|
|
258
|
-
messShow: false,
|
|
259
|
-
|
|
260
|
-
isOnlyNew: false,
|
|
261
|
-
rprinttype: [{label: '原票号补打', value: 'old'}, {label: '新票号补打', value: 'new'}],
|
|
262
|
-
usetypes: this.$appdata.getParam('发票使用类型'),
|
|
263
|
-
printtypes: this.$appdata.getParam('分配票据格式')
|
|
264
|
-
}
|
|
265
|
-
},
|
|
266
|
-
props: ['show', 'data', 'billUrl'],
|
|
267
|
-
ready () {
|
|
268
|
-
readyGen(this)
|
|
269
|
-
},
|
|
270
|
-
methods: {
|
|
271
|
-
printTypeChane () {
|
|
272
|
-
if (this.model.f_rprint_type === 'new') {
|
|
273
|
-
getNew(this)
|
|
274
|
-
} else {
|
|
275
|
-
getOld(this)
|
|
276
|
-
}
|
|
277
|
-
},
|
|
278
|
-
|
|
279
|
-
useTypeChange () {
|
|
280
|
-
if (this.model.f_rprint_type === 'new') {
|
|
281
|
-
getNew(this)
|
|
282
|
-
}
|
|
283
|
-
},
|
|
284
|
-
clean () {
|
|
285
|
-
this.$dispatch('cancel', '票据补打', this.row)
|
|
286
|
-
},
|
|
287
|
-
async print () {
|
|
288
|
-
if (this.config.hasBillManage && !this.model.newNumber.number) {
|
|
289
|
-
this.$showMessage('当前没有票号')
|
|
290
|
-
return
|
|
291
|
-
}
|
|
292
|
-
// 进行补打
|
|
293
|
-
try {
|
|
294
|
-
console.log('开具收据的参数:', this.data.id, this.data.f_bill_type)
|
|
295
|
-
if (this.config.hasBillManage) {
|
|
296
|
-
await this.$CommonService.reissuePaperBill(this.data.id, this.data.f_bill_type, this.model)
|
|
297
|
-
} else {
|
|
298
|
-
this.data.f_cause = this.model.f_cause
|
|
299
|
-
await this.$resetpost('rs/logic/sale_billReprint', {data: this.data}, {resolveMsg: null, rejectMsg: '票据补打出错!!'})
|
|
300
|
-
}
|
|
301
|
-
console.log('开始打印、、')
|
|
302
|
-
this.$refs.reportprint.print()
|
|
303
|
-
} catch (error) {
|
|
304
|
-
this.$dispatch('refresh')
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
},
|
|
308
|
-
events: {
|
|
309
|
-
'print' () {
|
|
310
|
-
console.log('发送补打成功事件')
|
|
311
|
-
this.$dispatch('reissue-success')
|
|
312
|
-
},
|
|
313
|
-
'print-error' () {
|
|
314
|
-
this.$showAlert('打印失败,若有需要,请补打发票', 'error', 3)
|
|
315
|
-
this.$dispatch('error', '票据补打', this.data, null)
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
</script>
|
|
320
|
-
|
|
321
|
-
<style>
|
|
322
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="auto">
|
|
3
|
+
<modal :show.sync="show" v-ref:modal large backdrop="false" style="overflow-y: auto !important;">
|
|
4
|
+
<header slot="modal-header" class="modal-header" style="text-align: center;">
|
|
5
|
+
<h4 class="modal-title">{{data.type}}票据补打</h4>
|
|
6
|
+
</header>
|
|
7
|
+
<article slot="modal-body" class="modal-body">
|
|
8
|
+
<validator name='v'>
|
|
9
|
+
<form class="form-horizontal select-overspread">
|
|
10
|
+
<div class="row" style="display: flex;justify-content: center;" id='reissue-bill'>
|
|
11
|
+
{{{bill.data}}}
|
|
12
|
+
</div>
|
|
13
|
+
<div class="row" v-if="config.hasBillManage">
|
|
14
|
+
<div v-if="!messShow">
|
|
15
|
+
<!--<span><strong>发票号:{{model.f_using_number}}</strong></span>-->
|
|
16
|
+
<div v-if="model.f_rprint_type === 'new'">
|
|
17
|
+
<div class="form-group form-input-group col-sm-4">
|
|
18
|
+
<label class="control-label col-sm-2">新票号:</label>
|
|
19
|
+
<div class="col-sm-2">
|
|
20
|
+
<input type="text" class="form-control col-sm-2" v-model="model.newNumber.number" readonly>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
<div v-if="model.f_rprint_type === 'old'">
|
|
25
|
+
<div class="form-group form-input-group col-sm-4">
|
|
26
|
+
<label class="control-label col-sm-2">原票号:</label>
|
|
27
|
+
<div class="col-sm-2">
|
|
28
|
+
<input type="text" class="form-control col-sm-2" v-model="model.oldNumber.number" readonly>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="row" v-if="config.hasBillManage" style="margin-top: 1%">
|
|
36
|
+
<div class="form-group form-input-group col-sm-4">
|
|
37
|
+
<label class="col-sm-2 control-label">补打类型:</label>
|
|
38
|
+
<div class="col-sm-2">
|
|
39
|
+
<v-select
|
|
40
|
+
v-model="model.f_rprint_type"
|
|
41
|
+
placeholder='请选择'
|
|
42
|
+
:value.sync="model.f_rprint_type"
|
|
43
|
+
:options='rprinttype'
|
|
44
|
+
:value-single="true"
|
|
45
|
+
:disabled="isOnlyNew"
|
|
46
|
+
@change="printTypeChane"
|
|
47
|
+
close-on-select clear-button>
|
|
48
|
+
</v-select>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
<div v-if="isOnlyNew">
|
|
52
|
+
|
|
53
|
+
<div class="form-group form-input-group col-sm-4" :class="[$v.billtype.required ? 'has-error' : 'has-success']">
|
|
54
|
+
<label class="col-sm-2 control-label">票据类型</label>
|
|
55
|
+
<div class="col-sm-2" >
|
|
56
|
+
<v-select :value.sync="model.f_bill_type"
|
|
57
|
+
v-model="model.f_bill_type"
|
|
58
|
+
:options='printtypes'
|
|
59
|
+
placeholder='请选择'
|
|
60
|
+
v-model="model.f_bill_type"
|
|
61
|
+
@change="useTypeChange"
|
|
62
|
+
:value-single="true"
|
|
63
|
+
close-on-select v-ref:billtype>
|
|
64
|
+
</v-select>
|
|
65
|
+
<input type="text" v-show="false" v-model="$refs.billtype.selectedItems" v-validate:billtype='{required: true }'>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<div class="form-group form-input-group col-sm-4" :class="[$v.usetype.required ? 'select-error' : '']">
|
|
70
|
+
<label class="col-sm-2 control-label">使用类型</label>
|
|
71
|
+
<div class="col-sm-2" >
|
|
72
|
+
<v-select :value.sync="model.f_use_type"
|
|
73
|
+
v-model="model.f_use_type"
|
|
74
|
+
:options='usetypes'
|
|
75
|
+
placeholder='请选择'
|
|
76
|
+
v-model="model.f_use_type"
|
|
77
|
+
@change="useTypeChange"
|
|
78
|
+
:value-single="true"
|
|
79
|
+
close-on-select v-ref:usetype>
|
|
80
|
+
</v-select>
|
|
81
|
+
<input type="text" v-show="false" v-model="$refs.usetype.selectedItems" v-validate:usetype='{required: true }'>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
</div>
|
|
90
|
+
<div class="row" style="margin-top: 1%">
|
|
91
|
+
<div class="form-group form-input-group col-sm-12">
|
|
92
|
+
<label for="f_cause" class=" col-sm-2 control-label">补打原因:</label>
|
|
93
|
+
<div class="col-sm-10">
|
|
94
|
+
<textarea class="form-control" v-model="model.f_cause" rows="1" placeholder="补打原因"></textarea>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
</form>
|
|
99
|
+
</validator>
|
|
100
|
+
</article>
|
|
101
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
102
|
+
<button type="button" class="btn btn-success" @click='print()' :disabled="!$v.valid">打印</button>
|
|
103
|
+
<report-print id='reissue-bill' top='5mm' left='5mm' width='90%' height='80%' :notrepeat="false" :showbtn="false" v-ref:reportprint></report-print>
|
|
104
|
+
<button class="btn btn-default" @click="clean()">取消</button>
|
|
105
|
+
</footer>
|
|
106
|
+
</modal>
|
|
107
|
+
</div>
|
|
108
|
+
</template>
|
|
109
|
+
<script>
|
|
110
|
+
/**
|
|
111
|
+
*票据补打
|
|
112
|
+
*/
|
|
113
|
+
|
|
114
|
+
import {DataModel, HttpResetClass} from 'vue-client'
|
|
115
|
+
|
|
116
|
+
let readyGen = async function (self) {
|
|
117
|
+
await self.$getConfig(self, 'ReissueBill')
|
|
118
|
+
console.log('补打业务config', self.config)
|
|
119
|
+
await getBillData(self)
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
let getBillGen = async function (self) {
|
|
123
|
+
// 判断发票管理是否启用
|
|
124
|
+
if (self.config.hasBillManage) {
|
|
125
|
+
if (self.model.f_rprint_type === 'old') {
|
|
126
|
+
await getOld(self)
|
|
127
|
+
} else {
|
|
128
|
+
await getNew(self)
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
let getOld = async function (self) {
|
|
134
|
+
let param = {
|
|
135
|
+
id: self.data.id,
|
|
136
|
+
type: self.data.type
|
|
137
|
+
}
|
|
138
|
+
let getOld = await self.$resetpost('rs/logic/sale_getOldBillNumber', param, {resolveMsg: null, rejectMsg: null})
|
|
139
|
+
console.log('获取原始票号', getOld)
|
|
140
|
+
// 验证原始票号是否存在
|
|
141
|
+
if (getOld.data.id && getOld.data.number) {
|
|
142
|
+
self.model.oldNumber.number = getOld.data.number
|
|
143
|
+
self.model.oldNumber.id = getOld.data.id
|
|
144
|
+
} else {
|
|
145
|
+
self.$showAlert('此次正常操作时没有出票,只能使用新票号进行补打', 'warning', 2000)
|
|
146
|
+
self.model.f_rprint_type = 'new'
|
|
147
|
+
self.isOnlyNew = true
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
let getNew = async function (self) {
|
|
152
|
+
// 获取原来收费记录使用的发票类型
|
|
153
|
+
let param = {
|
|
154
|
+
id: self.data.id,
|
|
155
|
+
type: self.data.type
|
|
156
|
+
}
|
|
157
|
+
let oldUseType = await self.$resetpost('rs/logic/sale_getOldUseType', param, {resolveMsg: null, rejectMsg: '获取原始票据信息出错!!'})
|
|
158
|
+
console.log('获取原始票据信息。。。', oldUseType)
|
|
159
|
+
|
|
160
|
+
let newparam = {
|
|
161
|
+
f_bill_user: self.$login.f.name, // 票据使用人
|
|
162
|
+
f_filialeids: self.$login.f.orgid // 所属分公司
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if (oldUseType.data.billtype && oldUseType.data.f_use_type) {
|
|
166
|
+
newparam.f_bill_type = oldUseType.data.billtype
|
|
167
|
+
newparam.f_use_type = oldUseType.data.f_use_type
|
|
168
|
+
} else {
|
|
169
|
+
if (self.model.f_use_type && self.model.f_bill_type) {
|
|
170
|
+
newparam.f_bill_type = self.model.f_bill_type
|
|
171
|
+
newparam.f_use_type = self.model.f_use_type
|
|
172
|
+
} else {
|
|
173
|
+
self.isOnlyNew = true
|
|
174
|
+
// self.model.f_bill_type = '普通收据'
|
|
175
|
+
self.$showAlert('请选择票据使用类型', 'warning', 2000)
|
|
176
|
+
return
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
let getNew
|
|
180
|
+
try {
|
|
181
|
+
getNew = await self.$resetpost('rs/logic/sale_getNewBillNumber', newparam, {resolveMsg: null, rejectMsg: null})
|
|
182
|
+
} catch (e) {
|
|
183
|
+
self.model.newNumber.number = ''
|
|
184
|
+
self.model.newNumber.id = ''
|
|
185
|
+
self.$showAlert('未获取到发票号', 'warning', 2000)
|
|
186
|
+
return
|
|
187
|
+
}
|
|
188
|
+
console.log('获取新票号', getNew)
|
|
189
|
+
self.model.newNumber.number = getNew.data.number
|
|
190
|
+
self.model.newNumber.id = getNew.data.id
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* ready执行过程
|
|
195
|
+
*/
|
|
196
|
+
let getBillData = async function (self) {
|
|
197
|
+
let billParam = {reprint: "'补打'"}
|
|
198
|
+
// 显示票据
|
|
199
|
+
if (self.data.f_bill_type == '卡表收费' || self.data.f_bill_type == '发卡售气') {
|
|
200
|
+
let http = new HttpResetClass()
|
|
201
|
+
let param = {
|
|
202
|
+
model: {f_userfiles_id: self.data.f_userfiles_id},
|
|
203
|
+
isGasValue: 0,
|
|
204
|
+
value: 0
|
|
205
|
+
}
|
|
206
|
+
let a = await http.load('POST', 'rs/logic/commonCal', {data: param}, {resolveMsg: null, rejectMsg: '获取阶梯使用情况出错'})
|
|
207
|
+
let value = a.data
|
|
208
|
+
let jt = a.data.chargeprice.length
|
|
209
|
+
if (jt > 1) {
|
|
210
|
+
value.f_hasuse1 = (value.sumamount >= value.f_stair1ceiling ? value.f_stair1ceiling : value.sumamount).toFixed(4)
|
|
211
|
+
value.f_hasuse2 = (value.sumamount >= value.f_stair2ceiling ? value.f_stair2ceiling - value.f_stair1ceiling : value.sumamount - value.f_stair1ceiling).toFixed(4)
|
|
212
|
+
value.f_hasuse3 = (value.sumamount >= value.f_stair3ceiling ? value.f_stair3ceiling - value.f_stair2ceiling : value.sumamount - value.f_stair2ceiling).toFixed(4)
|
|
213
|
+
if (value.f_hasuse2 < 0) value.f_hasuse2 = 0
|
|
214
|
+
if (value.f_hasuse3 < 0) value.f_hasuse3 = 0
|
|
215
|
+
} else {
|
|
216
|
+
let parm1 = {
|
|
217
|
+
items: 'f_pregas',
|
|
218
|
+
tablename: 't_sellinggas',
|
|
219
|
+
condition: `id=${self.data.id}`
|
|
220
|
+
}
|
|
221
|
+
let b = await http.load('POST', 'rs/sql/querySingleTable', {data: parm1}, {resolveMsg: null, rejectMsg: '获取同价使用情况出错'})
|
|
222
|
+
value.f_hasuse1 = b.data[0].f_pregas
|
|
223
|
+
value.f_hasuse2 = 0
|
|
224
|
+
value.f_hasuse3 = 0
|
|
225
|
+
value.f_stair1price = value.chargeprice[0].f_price
|
|
226
|
+
value.f_stair2price = 0
|
|
227
|
+
value.f_stair3price = 0
|
|
228
|
+
}
|
|
229
|
+
billParam = Object.assign(billParam, value)
|
|
230
|
+
}
|
|
231
|
+
self.bill = new DataModel(self.data.billUrl, billParam)
|
|
232
|
+
await self.bill.search(self.data.id)
|
|
233
|
+
// self.bill.data = '我是补打发票'
|
|
234
|
+
await getBillGen(self)
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export default {
|
|
238
|
+
title: '票据补打',
|
|
239
|
+
data () {
|
|
240
|
+
return {
|
|
241
|
+
config: {
|
|
242
|
+
hasBillManage: false // 默认不启用发票管理
|
|
243
|
+
},
|
|
244
|
+
bill: Object,
|
|
245
|
+
model: {
|
|
246
|
+
oldNumber: {
|
|
247
|
+
number: '',
|
|
248
|
+
id: ''
|
|
249
|
+
},
|
|
250
|
+
newNumber: {
|
|
251
|
+
number: '',
|
|
252
|
+
id: ''
|
|
253
|
+
},
|
|
254
|
+
f_end_number: null,
|
|
255
|
+
f_cause: null,
|
|
256
|
+
f_rprint_type: 'new'
|
|
257
|
+
},
|
|
258
|
+
messShow: false,
|
|
259
|
+
|
|
260
|
+
isOnlyNew: false,
|
|
261
|
+
rprinttype: [{label: '原票号补打', value: 'old'}, {label: '新票号补打', value: 'new'}],
|
|
262
|
+
usetypes: this.$appdata.getParam('发票使用类型'),
|
|
263
|
+
printtypes: this.$appdata.getParam('分配票据格式')
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
props: ['show', 'data', 'billUrl'],
|
|
267
|
+
ready () {
|
|
268
|
+
readyGen(this)
|
|
269
|
+
},
|
|
270
|
+
methods: {
|
|
271
|
+
printTypeChane () {
|
|
272
|
+
if (this.model.f_rprint_type === 'new') {
|
|
273
|
+
getNew(this)
|
|
274
|
+
} else {
|
|
275
|
+
getOld(this)
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
|
|
279
|
+
useTypeChange () {
|
|
280
|
+
if (this.model.f_rprint_type === 'new') {
|
|
281
|
+
getNew(this)
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
clean () {
|
|
285
|
+
this.$dispatch('cancel', '票据补打', this.row)
|
|
286
|
+
},
|
|
287
|
+
async print () {
|
|
288
|
+
if (this.config.hasBillManage && !this.model.newNumber.number) {
|
|
289
|
+
this.$showMessage('当前没有票号')
|
|
290
|
+
return
|
|
291
|
+
}
|
|
292
|
+
// 进行补打
|
|
293
|
+
try {
|
|
294
|
+
console.log('开具收据的参数:', this.data.id, this.data.f_bill_type)
|
|
295
|
+
if (this.config.hasBillManage) {
|
|
296
|
+
await this.$CommonService.reissuePaperBill(this.data.id, this.data.f_bill_type, this.model)
|
|
297
|
+
} else {
|
|
298
|
+
this.data.f_cause = this.model.f_cause
|
|
299
|
+
await this.$resetpost('rs/logic/sale_billReprint', {data: this.data}, {resolveMsg: null, rejectMsg: '票据补打出错!!'})
|
|
300
|
+
}
|
|
301
|
+
console.log('开始打印、、')
|
|
302
|
+
this.$refs.reportprint.print()
|
|
303
|
+
} catch (error) {
|
|
304
|
+
this.$dispatch('refresh')
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
events: {
|
|
309
|
+
'print' () {
|
|
310
|
+
console.log('发送补打成功事件')
|
|
311
|
+
this.$dispatch('reissue-success')
|
|
312
|
+
},
|
|
313
|
+
'print-error' () {
|
|
314
|
+
this.$showAlert('打印失败,若有需要,请补打发票', 'error', 3)
|
|
315
|
+
this.$dispatch('error', '票据补打', this.data, null)
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
</script>
|
|
320
|
+
|
|
321
|
+
<style>
|
|
322
|
+
</style>
|
|
@@ -215,7 +215,6 @@
|
|
|
215
215
|
<div class="col-sm-4 form-group" v-show="opteratormetrbook" >
|
|
216
216
|
<label for="f_position" class="font_normal_body" > 抄 表 册</label>
|
|
217
217
|
<v-select :value.sync="row.f_meter_book_num" v-model="row.f_meter_book_num"
|
|
218
|
-
:value-single="true"
|
|
219
218
|
:options='meterbookoptions' placeholder='抄表册'
|
|
220
219
|
close-on-select></v-select>
|
|
221
220
|
</div>
|