sale-client 3.6.524 → 3.6.526
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -213,9 +213,9 @@
|
|
|
213
213
|
Object.assign(self.model, self.model, getAmount.data)
|
|
214
214
|
self.model.chargeprice = getAmount.data.chargeprice
|
|
215
215
|
self.model.f_collection = self.model.f_totalcost
|
|
216
|
-
if(self.config.floor){
|
|
217
|
-
|
|
218
|
-
}
|
|
216
|
+
// if(self.config.floor){
|
|
217
|
+
// self.model.f_collection=Math.ceil(self.model.f_collection)
|
|
218
|
+
// }
|
|
219
219
|
self.calText(getAmount.data.chargeprice)
|
|
220
220
|
}
|
|
221
221
|
}
|
|
@@ -326,7 +326,7 @@
|
|
|
326
326
|
notShowFormula: false, // 不显示计算公式,默认显示
|
|
327
327
|
hasPrint: true, // 默认打票
|
|
328
328
|
hasBillManage: false, // 默认不启用发票管理
|
|
329
|
-
floor: false,
|
|
329
|
+
floor: false, // 是否取整收费
|
|
330
330
|
billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
|
|
331
331
|
printType: '普通收据', // 收据/电子票/专用发票/国税发票
|
|
332
332
|
showupload: true,
|
|
@@ -185,14 +185,19 @@
|
|
|
185
185
|
</div>
|
|
186
186
|
<div class="row" v-if="!model.f_type.includes('换卡控流量计')">
|
|
187
187
|
<div class="col-sm-4 form-group" :class="[$m.type.required ? 'has-error' : '']">
|
|
188
|
-
<label class="font_normal_body"
|
|
188
|
+
<label class="font_normal_body" style="color: #d9534f; font-weight: bold;">
|
|
189
|
+
气价类型
|
|
190
|
+
<span style="color: #f0ad4e; margin-left: 5px;" title="换表前请检查用户气价是否正确,如需调整请及时修改!">
|
|
191
|
+
<i class="fa fa-exclamation-circle"></i>
|
|
192
|
+
</span>
|
|
193
|
+
</label>
|
|
189
194
|
<v-select :value.sync="newinfo.pricetype" v-model="newinfo.pricetype"
|
|
190
195
|
placeholder='气价类型' :options="pricetypes"
|
|
191
196
|
close-on-select v-ref:type>
|
|
192
197
|
</v-select>
|
|
193
198
|
</div>
|
|
194
199
|
<div class="col-sm-4 form-group" :class="[$m.name.required ? 'has-error' : '']">
|
|
195
|
-
<label class="font_normal_body">气价名称</label>
|
|
200
|
+
<label class="font_normal_body" style="color: #d9534f; font-weight: bold;">气价名称</label>
|
|
196
201
|
<v-select :value.sync="newinfo.pricename" v-model="newinfo.pricename"
|
|
197
202
|
placeholder='气价名称' :options="getPricenames()"
|
|
198
203
|
close-on-select :disabled='newinfo.pricetype.length === 0 ' v-ref:name></v-select>
|
|
@@ -276,6 +281,9 @@
|
|
|
276
281
|
<textarea class="input_textarea" rows="3" style="width:87%;" v-model="model.f_changetables_reason"></textarea>
|
|
277
282
|
</div>
|
|
278
283
|
<div style="text-align:right;height:auto;">
|
|
284
|
+
<span style="float: left; color: #f0ad4e; line-height: 34px;">
|
|
285
|
+
<span style="display: inline-block; width: 16px; height: 16px; background: #f0ad4e; border-radius: 50%; text-align: center; line-height: 16px; color: white; margin-right: 5px;">!</span> 温馨提示:换表前请检查用户气价是否正确,如需调整请及时修改!
|
|
286
|
+
</span>
|
|
279
287
|
<button class="button_search" v-show="config.approve == true ? applyButtonShow : false" type="button" @click="apply()"
|
|
280
288
|
:disabled="(!meterinfo && !(model.f_type.includes('清零') || model.f_type.includes('换卡控流量计'))) || !$v.valid"
|
|
281
289
|
>换表审核
|
|
@@ -0,0 +1,315 @@
|
|
|
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
|
+
<div v-html="bill.data"></div>
|
|
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
|
+
<div v-if="model.f_rprint_type === 'no'">
|
|
33
|
+
<div class="form-group form-input-group col-sm-4">
|
|
34
|
+
<label class="control-label col-sm-2">票号:</label>
|
|
35
|
+
<div class="col-sm-2" style="padding-top: 15px">
|
|
36
|
+
不占用票号
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
<div class="row" v-if="config.hasBillManage" style="margin-top: 1%">
|
|
43
|
+
<div class="form-group form-input-group col-sm-4">
|
|
44
|
+
<label class="col-sm-2 control-label">补打类型:</label>
|
|
45
|
+
<div class="col-sm-2">
|
|
46
|
+
<v-select
|
|
47
|
+
v-model="model.f_rprint_type"
|
|
48
|
+
placeholder='请选择'
|
|
49
|
+
:value.sync="model.f_rprint_type"
|
|
50
|
+
:options='rprinttype'
|
|
51
|
+
:value-single="true"
|
|
52
|
+
:width="80"
|
|
53
|
+
@change="printTypeChane"
|
|
54
|
+
close-on-select clear-button>
|
|
55
|
+
</v-select>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
<div v-if="isOnlyNew && model.f_rprint_type !== 'no' && config.hasBillManage">
|
|
59
|
+
<div class="form-group form-input-group col-sm-4" :class="[$v.billtype.required ? 'has-error' : 'has-success']">
|
|
60
|
+
<label class="col-sm-2 control-label">票据类型</label>
|
|
61
|
+
<div class="col-sm-2" >
|
|
62
|
+
<v-select :value.sync="model.f_bill_type"
|
|
63
|
+
:options='printtypes'
|
|
64
|
+
placeholder='请选择'
|
|
65
|
+
v-model="model.f_bill_type"
|
|
66
|
+
@change="useTypeChange"
|
|
67
|
+
:value-single="true"
|
|
68
|
+
close-on-select v-ref:billtype>
|
|
69
|
+
</v-select>
|
|
70
|
+
<input type="text" v-show="false" v-model="$refs.billtype.selectedItems" v-validate:billtype='{required: true }'>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<div class="form-group form-input-group col-sm-4" :class="[$v.usetype.required ? 'select-error' : '']">
|
|
75
|
+
<label class="col-sm-2 control-label">使用类型</label>
|
|
76
|
+
<div class="col-sm-2" >
|
|
77
|
+
<v-select :value.sync="model.f_use_type"
|
|
78
|
+
:options='usetypes'
|
|
79
|
+
placeholder='请选择'
|
|
80
|
+
v-model="model.f_use_type"
|
|
81
|
+
@change="useTypeChange"
|
|
82
|
+
:value-single="true"
|
|
83
|
+
close-on-select v-ref:usetype>
|
|
84
|
+
</v-select>
|
|
85
|
+
<input type="text" v-show="false" v-model="$refs.usetype.selectedItems" v-validate:usetype='{required: true }'>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
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(true)' :disabled="!valid">选择打印机打印</button>
|
|
103
|
+
<button type="button" class="btn btn-success" @click='print()' :disabled="!valid">打印</button>
|
|
104
|
+
<report-print id='reissue-bill' top='5mm' left='5mm' width='90%' height='80%' :notrepeat="false" :showbtn="false" v-ref:reportprint></report-print>
|
|
105
|
+
<button class="btn btn-default" @click="clean()">取消</button>
|
|
106
|
+
</footer>
|
|
107
|
+
</modal>
|
|
108
|
+
</div>
|
|
109
|
+
</template>
|
|
110
|
+
<script>
|
|
111
|
+
/**
|
|
112
|
+
*票据补打
|
|
113
|
+
*/
|
|
114
|
+
|
|
115
|
+
import { DataModel } from 'vue-client'
|
|
116
|
+
|
|
117
|
+
let readyGen = async function (self) {
|
|
118
|
+
await self.$getConfig(self, 'ReissueBill')
|
|
119
|
+
console.log('补打业务config', self.config)
|
|
120
|
+
self.model.f_rprint_type = 'no'
|
|
121
|
+
await getBillData(self)
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
let getBillGen = async function (self) {
|
|
125
|
+
// 判断发票管理是否启用
|
|
126
|
+
if (self.config.hasBillManage) {
|
|
127
|
+
if (self.model.f_rprint_type === 'old') {
|
|
128
|
+
await getOld(self)
|
|
129
|
+
} else if (self.model.f_rprint_type === 'new') {
|
|
130
|
+
await getNew(self)
|
|
131
|
+
}
|
|
132
|
+
// 不占用票号补打不需要获取票号
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
let getOld = async function (self) {
|
|
137
|
+
let param = {
|
|
138
|
+
id: self.data.id,
|
|
139
|
+
type: self.data.type
|
|
140
|
+
}
|
|
141
|
+
let getOld = await self.$resetpost('rs/logic/sale_getOldBillNumber', param, {resolveMsg: null, rejectMsg: null})
|
|
142
|
+
console.log('获取原始票号', getOld)
|
|
143
|
+
// 验证原始票号是否存在
|
|
144
|
+
if (getOld.data.id && getOld.data.number) {
|
|
145
|
+
self.model.oldNumber.number = getOld.data.number
|
|
146
|
+
self.model.oldNumber.id = getOld.data.id
|
|
147
|
+
} else {
|
|
148
|
+
self.$showAlert('此次正常操作时没有出票,只能使用新票号或不占用票号进行补打', 'warning', 2000)
|
|
149
|
+
self.model.f_rprint_type = 'new'
|
|
150
|
+
self.isOnlyNew = true
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
let getNew = async function (self) {
|
|
155
|
+
// 获取原来收费记录使用的发票类型
|
|
156
|
+
let param = {
|
|
157
|
+
id: self.data.id,
|
|
158
|
+
type: self.data.type
|
|
159
|
+
}
|
|
160
|
+
let oldUseType = await self.$resetpost('rs/logic/sale_getOldUseType', param, {resolveMsg: null, rejectMsg: '获取原始票据信息出错!!'})
|
|
161
|
+
console.log('获取原始票据信息。。。', oldUseType)
|
|
162
|
+
|
|
163
|
+
let newparam = {
|
|
164
|
+
f_bill_user: self.$login.f.name, // 票据使用人
|
|
165
|
+
f_filialeids: self.$login.f.orgid // 所属分公司
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
if (oldUseType.data.billtype && oldUseType.data.f_use_type) {
|
|
169
|
+
newparam.f_bill_type = oldUseType.data.billtype
|
|
170
|
+
newparam.f_use_type = oldUseType.data.f_use_type
|
|
171
|
+
} else {
|
|
172
|
+
if (self.model.f_use_type && self.model.f_bill_type) {
|
|
173
|
+
newparam.f_bill_type = self.model.f_bill_type
|
|
174
|
+
newparam.f_use_type = self.model.f_use_type
|
|
175
|
+
} else {
|
|
176
|
+
self.isOnlyNew = true
|
|
177
|
+
// self.model.f_bill_type = '普通收据'
|
|
178
|
+
self.$showAlert('请选择票据使用类型', 'warning', 2000)
|
|
179
|
+
return
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
let getNew
|
|
183
|
+
try {
|
|
184
|
+
getNew = await self.$resetpost('rs/logic/sale_getNewBillNumber', newparam, {resolveMsg: null, rejectMsg: null})
|
|
185
|
+
} catch (e) {
|
|
186
|
+
self.model.newNumber.number = ''
|
|
187
|
+
self.model.newNumber.id = ''
|
|
188
|
+
self.$showAlert('未获取到发票号', 'warning', 2000)
|
|
189
|
+
return
|
|
190
|
+
}
|
|
191
|
+
console.log('获取新票号', getNew)
|
|
192
|
+
self.model.newNumber.number = getNew.data.number
|
|
193
|
+
self.model.newNumber.id = getNew.data.id
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* ready执行过程
|
|
198
|
+
*/
|
|
199
|
+
let getBillData = async function (self) {
|
|
200
|
+
// 显示票据
|
|
201
|
+
self.bill = new DataModel(self.data.billUrl, {reprint: "'补打'",operator: `'${self.$login.f.name}'`,})
|
|
202
|
+
await self.bill.search(self.data.id)
|
|
203
|
+
// self.bill.data = '我是补打发票'
|
|
204
|
+
await getBillGen(self)
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export default {
|
|
208
|
+
title: '票据补打',
|
|
209
|
+
data () {
|
|
210
|
+
return {
|
|
211
|
+
config: {
|
|
212
|
+
hasBillManage: true // 默认不启用发票管理
|
|
213
|
+
},
|
|
214
|
+
bill: Object,
|
|
215
|
+
model: {
|
|
216
|
+
oldNumber: {
|
|
217
|
+
number: '',
|
|
218
|
+
id: ''
|
|
219
|
+
},
|
|
220
|
+
newNumber: {
|
|
221
|
+
number: '',
|
|
222
|
+
id: ''
|
|
223
|
+
},
|
|
224
|
+
f_end_number: null,
|
|
225
|
+
f_cause: null,
|
|
226
|
+
f_rprint_type: 'no'
|
|
227
|
+
},
|
|
228
|
+
messShow: false,
|
|
229
|
+
|
|
230
|
+
isOnlyNew: false,
|
|
231
|
+
rprinttype: this.data.type === '卡表收费' || this.data.type === '物联网表收费' || this.data.type === '机表收费'
|
|
232
|
+
? [{label: '原票号补打', value: 'old'}, {label: '新票号补打', value: 'new'}, {label: '不占用票号补打', value: 'no'}]
|
|
233
|
+
: [{label: '原票号补打', value: 'old'}, {label: '不占用票号补打', value: 'no'}],
|
|
234
|
+
usetypes: this.$appdata.getParam('发票使用类型'),
|
|
235
|
+
printtypes: this.$appdata.getParam('分配票据格式')
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
props: ['show', 'data', 'billUrl'],
|
|
239
|
+
ready () {
|
|
240
|
+
console.log('data', this.data)
|
|
241
|
+
readyGen(this)
|
|
242
|
+
},
|
|
243
|
+
computed: {
|
|
244
|
+
valid () {
|
|
245
|
+
// 当选择"不占用票号补打"时,忽略票据类型和使用类型的验证
|
|
246
|
+
if (this.model.f_rprint_type === 'no') {
|
|
247
|
+
return !!this.model.f_cause
|
|
248
|
+
}
|
|
249
|
+
return this.$v ? this.$v.valid : false
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
methods: {
|
|
253
|
+
printTypeChane () {
|
|
254
|
+
if (this.model.f_rprint_type === 'new') {
|
|
255
|
+
getNew(this)
|
|
256
|
+
} else if (this.model.f_rprint_type === 'old') {
|
|
257
|
+
getOld(this)
|
|
258
|
+
} else if (this.model.f_rprint_type === 'no') {
|
|
259
|
+
// 不占用票号补打不需要获取票号
|
|
260
|
+
this.model.newNumber.number = ''
|
|
261
|
+
this.model.newNumber.id = ''
|
|
262
|
+
this.model.oldNumber.number = ''
|
|
263
|
+
this.model.oldNumber.id = ''
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
|
|
267
|
+
useTypeChange () {
|
|
268
|
+
if (this.model.f_rprint_type === 'new') {
|
|
269
|
+
getNew(this)
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
clean () {
|
|
273
|
+
this.$dispatch('cancel', '票据补打', this.row)
|
|
274
|
+
},
|
|
275
|
+
async print (select) {
|
|
276
|
+
// 如果需要使用票号但没有票号,则提示错误
|
|
277
|
+
if (this.config.hasBillManage && this.model.f_rprint_type !== 'no' && !this.model.newNumber.number) {
|
|
278
|
+
this.$showMessage('当前没有票号')
|
|
279
|
+
return
|
|
280
|
+
}
|
|
281
|
+
// 进行补打
|
|
282
|
+
try {
|
|
283
|
+
console.log('开具收据的参数:', this.data.id, this.data.f_bill_type)
|
|
284
|
+
if (this.config.hasBillManage && this.model.f_rprint_type !== 'no') {
|
|
285
|
+
await this.$CommonService.reissuePaperBill(this.data.id, this.data.f_bill_type, this.model)
|
|
286
|
+
} else {
|
|
287
|
+
this.data.f_cause = this.model.f_cause
|
|
288
|
+
await this.$resetpost('rs/logic/sale_billReprint', {data: this.data}, {resolveMsg: null, rejectMsg: '票据补打出错!!'})
|
|
289
|
+
}
|
|
290
|
+
console.log('开始打印、、', select)
|
|
291
|
+
if (select) {
|
|
292
|
+
this.$refs.reportprint.print(true)
|
|
293
|
+
} else {
|
|
294
|
+
this.$refs.reportprint.print()
|
|
295
|
+
}
|
|
296
|
+
} catch (error) {
|
|
297
|
+
this.$dispatch('refresh')
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
events: {
|
|
302
|
+
'print' () {
|
|
303
|
+
console.log('发送补打成功事件')
|
|
304
|
+
this.$dispatch('reissue-success')
|
|
305
|
+
},
|
|
306
|
+
'print-error' () {
|
|
307
|
+
this.$showAlert('打印失败,若有需要,请补打发票', 'error', 3)
|
|
308
|
+
this.$dispatch('error', '票据补打', this.data, null)
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
</script>
|
|
313
|
+
|
|
314
|
+
<style>
|
|
315
|
+
</style>
|
|
@@ -20,4 +20,6 @@ export default function () {
|
|
|
20
20
|
Vue.component('iot-meter-center', (resolve) => { require(['./IOTMeterCenter'], resolve) })
|
|
21
21
|
// 物联网表收费
|
|
22
22
|
Vue.component('card-meter-center', (resolve) => { require(['./CardMeterCenter'], resolve) })
|
|
23
|
+
// 票据补打
|
|
24
|
+
Vue.component('reissue-bill', (resolve) => { require(['./ReissueBill'], resolve) })
|
|
23
25
|
}
|
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/qianneng/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'
|