sale-client 3.7.34 → 3.7.35
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/fileChanges/last-build.bin +0 -0
- package/.gradle/5.2.1/fileHashes/fileHashes.lock +0 -0
- package/.gradle/5.2.1/gc.properties +0 -0
- package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/.gradle/vcs-1/gc.properties +0 -0
- package/package.json +1 -1
- package/src/components/charge/business/CardMeterCenter.vue +39 -5
- package/src/components/charge/business/NoCardMeterCenter.vue +200 -12
- package/src/components/charge/business/ShowCardSellGas.vue +41 -4
- package/src/components/common/searchuploadfile/uploadFilesHistory.vue +24 -3
- package/src/filiale/rongchuang/FilesManage/UserGeneralInfoTest.vue +13 -1
- package/src/filiale/rongchuang/UploadIdCard.vue +592 -0
- package/src/filiale/rongchuang/sale.js +1 -0
- package/src/main.js +1 -1
- package/src/plugins/CardService.js +8 -0
- package/.arts/settings.json +0 -3
- package/src/components/manualsemmary/ManualSummaryManage.vue +0 -310
- package/src/filiale/tongchuan/ManualSummaryManage.vue +0 -219
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
<input id="f_collection" class="input_search" style="width:60%" type="number" v-model="model.f_collection"
|
|
107
107
|
v-validate:f_collection='{required: true, dctest: [(model.f_totalcost - 0), ">=" ] }'
|
|
108
108
|
v-el:fcollection @keyup.enter="checkInvoiceMsg((!$v.valid || validateOk || !islegal || clickConfirm))"
|
|
109
|
-
v-scale="[model.
|
|
109
|
+
v-scale="[model.f_collection, row.f_fee_decimal||4]" :disabled="$refs.givechange.promptText != ''"/>
|
|
110
110
|
</div>
|
|
111
111
|
<div class="col-sm-3" v-if="row.f_collection_type === '按气量' && model.f_payment!='赠气' && row.f_meter_type.includes('卡表') && config.calculatePreByCollection"
|
|
112
112
|
:class="[$v.f_collection.required ? 'has-error' : 'has-success']">
|
|
@@ -152,8 +152,8 @@
|
|
|
152
152
|
</div>
|
|
153
153
|
</div>
|
|
154
154
|
|
|
155
|
-
<div class="row" style="margin-top:5px;" v-show="authArr.includes('优惠权限')">
|
|
156
|
-
<div class="col-sm-4">
|
|
155
|
+
<div class="row" style="margin-top:5px;" v-show="authArr.includes('优惠权限')|| hasDisCount">
|
|
156
|
+
<div class="col-sm-4" v-if="!hasDisCount">
|
|
157
157
|
<label class="font_normal_body">优惠方式</label>
|
|
158
158
|
<v-select v-model="model.f_privilege_id" @blur.native.capture="privilegeCalculate"
|
|
159
159
|
placeholder='请选择'
|
|
@@ -466,6 +466,7 @@
|
|
|
466
466
|
}
|
|
467
467
|
let getLimit = await self.$resetpost('rs/logic/sale_getLimitGas', {data: limit_param}, {
|
|
468
468
|
resolveMsg: null,
|
|
469
|
+
newly: true,
|
|
469
470
|
rejectMsg: '获取限购值失败!!'
|
|
470
471
|
})
|
|
471
472
|
console.log('获取限购值', getLimit)
|
|
@@ -516,6 +517,18 @@
|
|
|
516
517
|
}
|
|
517
518
|
})
|
|
518
519
|
}
|
|
520
|
+
// 获取优惠信息
|
|
521
|
+
if (self.config.newDiscount) {
|
|
522
|
+
let getDiscount = await self.$resetpost('rs/logic/getDiscountInfo', {data: nowrite_param}, {
|
|
523
|
+
resolveMsg: null,
|
|
524
|
+
newly: true,
|
|
525
|
+
rejectMsg: '获取优惠信息失败!!'
|
|
526
|
+
})
|
|
527
|
+
if (getDiscount.data.leftDiscount > 0) {
|
|
528
|
+
self.disCountInfo = getDiscount.data
|
|
529
|
+
self.hasDisCount = true
|
|
530
|
+
}
|
|
531
|
+
}
|
|
519
532
|
}
|
|
520
533
|
export default {
|
|
521
534
|
title: '卡表收费',
|
|
@@ -524,12 +537,15 @@
|
|
|
524
537
|
mjshow: false,
|
|
525
538
|
serialShow: false,
|
|
526
539
|
randomBusinessId: '',
|
|
540
|
+
hasDisCount: false,
|
|
541
|
+
disCountInfo: {},
|
|
527
542
|
resid: [], // 存放新增的f_files表中id
|
|
528
543
|
config: {
|
|
529
544
|
calculatePreByCollection: false, // 可以更具收款来反向计算预购
|
|
530
545
|
notShowFormula: false, // 不显示计算公式,默认显示
|
|
531
546
|
autoCollection: true, // 自动填写收款
|
|
532
547
|
quickSale: false,
|
|
548
|
+
newDiscount: false,
|
|
533
549
|
showupload: true, // 显示上传
|
|
534
550
|
hasPrint: true, // 默认打票
|
|
535
551
|
MinSellGas: 0,
|
|
@@ -561,6 +577,7 @@
|
|
|
561
577
|
f_banktransfer_person: '',
|
|
562
578
|
f_banktransfer_date: '',
|
|
563
579
|
f_privilege_id: 0,
|
|
580
|
+
f_privilege_gas: 0,
|
|
564
581
|
f_privilege_money: 0,
|
|
565
582
|
f_after_discount: 0,
|
|
566
583
|
getDeduct: 0
|
|
@@ -705,8 +722,8 @@
|
|
|
705
722
|
this.model.getDeduct = 0
|
|
706
723
|
if (this.row.f_project_money && this.row.f_project_money > 0) {
|
|
707
724
|
this.model.getDeduct = (this.$CommonService.getDeduct(this.row, this.model.f_pregas) - 0)
|
|
708
|
-
this.model.f_totalcost = (this.model.f_totalcost - 0
|
|
709
|
-
this.model.f_collection = (this.model.f_collection - 0
|
|
725
|
+
this.model.f_totalcost = (this.model.f_totalcost - 0) + (this.model.getDeduct - 0)
|
|
726
|
+
this.model.f_collection = (this.model.f_collection - 0) + (this.model.getDeduct - 0)
|
|
710
727
|
}
|
|
711
728
|
this.calText(dymoney2.data.chargeprice, this.model.getDeduct)
|
|
712
729
|
} catch (error) {
|
|
@@ -899,6 +916,23 @@
|
|
|
899
916
|
}
|
|
900
917
|
this.privilegeCalculate()
|
|
901
918
|
}
|
|
919
|
+
if (this.hasDisCount) {
|
|
920
|
+
this.calDisCount()
|
|
921
|
+
}
|
|
922
|
+
},
|
|
923
|
+
async calDisCount () {
|
|
924
|
+
// 初始化减免金额
|
|
925
|
+
this.model.f_privilege_money = 0
|
|
926
|
+
this.model.f_after_discount = this.model.f_collection
|
|
927
|
+
let param = this.disCountInfo
|
|
928
|
+
param.f_collection = this.model.f_collection
|
|
929
|
+
param.f_pregas = this.model.f_pregas
|
|
930
|
+
let privilegeData = await this.$resetpost('rs/logic/calculateDiscount', param, {resolveMsg: null, rejectMsg: '计算优惠金额出错'})
|
|
931
|
+
// 减免金额
|
|
932
|
+
this.model.f_privilege_money = privilegeData.data.f_privilege_money
|
|
933
|
+
this.model.f_privilege_gas = privilegeData.data.f_privilege_gas
|
|
934
|
+
// 减免后收款金额
|
|
935
|
+
this.model.f_after_discount = privilegeData.data.f_collection
|
|
902
936
|
},
|
|
903
937
|
// 优惠计算
|
|
904
938
|
async privilegeCalculate () {
|
|
@@ -88,12 +88,14 @@
|
|
|
88
88
|
:class="[$v.f_collection.required ? 'has-error' : 'has-success']">
|
|
89
89
|
<label for="f_collection" class=" font_normal_body"> 收款 </label>
|
|
90
90
|
<input class="input_search" style="width:60%" type="number" v-model="model.f_collection"
|
|
91
|
+
@blur="config.calculatePreByCollection && calculatePreByCollection()"
|
|
91
92
|
v-validate:f_collection='{required: true, dctest: [model.f_totalcost, ">=" ] }'
|
|
92
93
|
v-el:sk v-scale="[model.f_totalcost, 2]">
|
|
93
94
|
</div>
|
|
94
95
|
<div class="col-sm-4" v-if="row.f_collection_type === '按金额'">
|
|
95
96
|
<label for="f_collection" class=" font_normal_body"> 收款 </label>
|
|
96
97
|
<input class="input_search" style="width:60%" type="number" v-model="model.f_collection"
|
|
98
|
+
@blur="config.calculatePreByCollection && calculatePreByCollection()"
|
|
97
99
|
v-el:sk v-scale="[model.f_collection, 4]" disabled>
|
|
98
100
|
</div>
|
|
99
101
|
</div>
|
|
@@ -126,6 +128,26 @@
|
|
|
126
128
|
<span v-if="$v.f_collection.dctest" style="color:red ">收款不能小于应收金额</span>
|
|
127
129
|
</div>
|
|
128
130
|
</div>
|
|
131
|
+
<div class="row" style="margin-top:5px;" v-show="authArr.includes('优惠权限')|| hasDisCount">
|
|
132
|
+
<div class="col-sm-4" v-if="!hasDisCount">
|
|
133
|
+
<label class="font_normal_body">优惠方式</label>
|
|
134
|
+
<v-select v-model="model.f_privilege_id" @blur.native.capture="privilegeCalculate"
|
|
135
|
+
placeholder='请选择'
|
|
136
|
+
:value.sync="model.f_privilege_id"
|
|
137
|
+
:options='privilegeList' clear-button value-single>
|
|
138
|
+
</v-select>
|
|
139
|
+
</div>
|
|
140
|
+
<div class="col-sm-4">
|
|
141
|
+
<label for="f_preamount" class=" font_normal_body"> 优惠金额</label>
|
|
142
|
+
<input class="input_search" style="width:60%" type="number" v-model="model.f_privilege_money"
|
|
143
|
+
v-scale="[model.f_privilege_money, row.f_fee_decimal||4]" placeholder="优惠金额" disabled>
|
|
144
|
+
</div>
|
|
145
|
+
<div class="col-sm-4">
|
|
146
|
+
<label for="f_preamount" class=" font_normal_body"> 实际收款</label>
|
|
147
|
+
<input class="input_search" style="width:60%" type="number" v-model="model.f_after_discount"
|
|
148
|
+
v-scale="[model.f_after_discount, row.f_fee_decimal||4]" placeholder="优惠后收款" disabled>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
129
151
|
<div class="row" v-if="model.f_payment[0].includes('POS')">
|
|
130
152
|
<div class="col-sm-4">
|
|
131
153
|
<label for="f_voucher_number" class="font_normal_body">凭证号</label>
|
|
@@ -157,18 +179,19 @@
|
|
|
157
179
|
<button class="button_clear btn-gn" @click="clean()">取消</button>
|
|
158
180
|
</div>
|
|
159
181
|
</validator>
|
|
160
|
-
<payment-code v-ref:paymentcode :payment="model.f_payment" :row="row" :money="model.
|
|
182
|
+
<payment-code v-ref:paymentcode :payment="model.f_payment" :row="row" :money="model.f_after_discount"></payment-code>
|
|
161
183
|
<upload :blodid="row.f_userinfo_id" v-if="config.showupload" :businessid="randomBusinessId" isremark="true" fusetype="无卡收费"></upload>
|
|
162
184
|
</div>
|
|
163
185
|
</div>
|
|
164
186
|
</template>
|
|
165
187
|
<script>
|
|
166
|
-
|
|
188
|
+
/**
|
|
167
189
|
*综合业务
|
|
168
190
|
*卡表收费组件
|
|
169
|
-
|
|
191
|
+
*/
|
|
192
|
+
import {HttpResetClass} from 'vue-client'
|
|
170
193
|
|
|
171
|
-
|
|
194
|
+
// 输入金额,换算气量
|
|
172
195
|
let preamountGen = async function (self) {
|
|
173
196
|
let dymoney = 0
|
|
174
197
|
let calFee = (self.model.f_totalcost - 0) + (self.row.f_balance - 0)
|
|
@@ -192,8 +215,8 @@
|
|
|
192
215
|
Object.assign(self.model, self.model, getGas.data)
|
|
193
216
|
self.model.f_totalcost = ((self.model.f_totalcost - 0) - (dymoney - 0)).toFixed(4)
|
|
194
217
|
// self.model.f_totalcost=Math.ceil(self.model.f_totalcost)
|
|
195
|
-
if(self.config.floor){
|
|
196
|
-
self.model.f_totalcost=Math.ceil(self.model.f_totalcost)
|
|
218
|
+
if (self.config.floor) {
|
|
219
|
+
self.model.f_totalcost = Math.ceil(self.model.f_totalcost)
|
|
197
220
|
}
|
|
198
221
|
self.calText(getGas.data.chargeprice)
|
|
199
222
|
}
|
|
@@ -213,8 +236,8 @@
|
|
|
213
236
|
Object.assign(self.model, self.model, getAmount.data)
|
|
214
237
|
self.model.chargeprice = getAmount.data.chargeprice
|
|
215
238
|
self.model.f_collection = self.model.f_totalcost
|
|
216
|
-
if(self.config.floor){
|
|
217
|
-
self.model.f_collection=Math.ceil(self.model.f_collection)
|
|
239
|
+
if (self.config.floor) {
|
|
240
|
+
self.model.f_collection = Math.ceil(self.model.f_collection)
|
|
218
241
|
}
|
|
219
242
|
self.calText(getAmount.data.chargeprice)
|
|
220
243
|
}
|
|
@@ -292,7 +315,7 @@
|
|
|
292
315
|
f_user_id: self.row.f_user_id,
|
|
293
316
|
f_stairprice_id: self.row.f_stairprice_id
|
|
294
317
|
}
|
|
295
|
-
let getLimit = await self.$resetpost('rs/logic/sale_getLimitGas', {data: limit_param}, {resolveMsg: null, rejectMsg: '获取限购值失败!!'})
|
|
318
|
+
let getLimit = await self.$resetpost('rs/logic/sale_getLimitGas', {data: limit_param}, {resolveMsg: null, newly: true, rejectMsg: '获取限购值失败!!'})
|
|
296
319
|
console.log('获取限购值', getLimit)
|
|
297
320
|
self.hasLimit = getLimit.data.hasLimit
|
|
298
321
|
if (self.hasLimit) {
|
|
@@ -312,6 +335,21 @@
|
|
|
312
335
|
}
|
|
313
336
|
}
|
|
314
337
|
}
|
|
338
|
+
// 获取优惠信息
|
|
339
|
+
if (self.config.newDiscount) {
|
|
340
|
+
let nowrite_param = {
|
|
341
|
+
f_userfiles_id: self.row.f_userfiles_id
|
|
342
|
+
}
|
|
343
|
+
let getDiscount = await self.$resetpost('rs/logic/getDiscountInfo', {data: nowrite_param}, {
|
|
344
|
+
resolveMsg: null,
|
|
345
|
+
newly: true,
|
|
346
|
+
rejectMsg: '获取优惠信息失败!!'
|
|
347
|
+
})
|
|
348
|
+
if (getDiscount.data.leftDiscount > 0) {
|
|
349
|
+
self.disCountInfo = getDiscount.data
|
|
350
|
+
self.hasDisCount = true
|
|
351
|
+
}
|
|
352
|
+
}
|
|
315
353
|
}
|
|
316
354
|
export default {
|
|
317
355
|
title: '无卡收费',
|
|
@@ -319,11 +357,15 @@
|
|
|
319
357
|
return {
|
|
320
358
|
serialShow: false,
|
|
321
359
|
resid: [], // 存放新增的f_files表中id
|
|
360
|
+
hasDisCount: false,
|
|
361
|
+
disCountInfo: {},
|
|
322
362
|
config: {
|
|
363
|
+
calculatePreByCollection: false, // 可以更具收款来反向计算预购
|
|
323
364
|
notShowFormula: false, // 不显示计算公式,默认显示
|
|
324
365
|
hasPrint: true, // 默认打票
|
|
366
|
+
newDiscount: false, // 新优惠
|
|
325
367
|
hasBillManage: false, // 默认不启用发票管理
|
|
326
|
-
floor: false,
|
|
368
|
+
floor: false, // 是否取整收费
|
|
327
369
|
billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
|
|
328
370
|
printType: '普通收据', // 收据/电子票/专用发票/国税发票
|
|
329
371
|
showupload: true,
|
|
@@ -337,6 +379,11 @@
|
|
|
337
379
|
f_preamount: 0,
|
|
338
380
|
f_totalcost: 0,
|
|
339
381
|
f_curbalance: 0,
|
|
382
|
+
f_privilege_id: 0,
|
|
383
|
+
f_privilege_gas: 0,
|
|
384
|
+
f_privilege_money: 0,
|
|
385
|
+
f_after_discount: 0,
|
|
386
|
+
getDeduct: 0,
|
|
340
387
|
f_collection: '',
|
|
341
388
|
f_balance: 0,
|
|
342
389
|
f_print: [],
|
|
@@ -360,7 +407,7 @@
|
|
|
360
407
|
// 下拉框值
|
|
361
408
|
paytype: this.$appdata.getParam('付款方式'),
|
|
362
409
|
printstyle: this.$appdata.getParam('打印格式'),
|
|
363
|
-
writecard: [{label: '写卡',value:'写卡'},{label: '不写卡',value:'不写卡'}],
|
|
410
|
+
writecard: [{label: '写卡', value: '写卡'}, {label: '不写卡', value: '不写卡'}],
|
|
364
411
|
mjshow: false
|
|
365
412
|
}
|
|
366
413
|
},
|
|
@@ -392,6 +439,33 @@
|
|
|
392
439
|
}
|
|
393
440
|
},
|
|
394
441
|
methods: {
|
|
442
|
+
// 根据收款金额计算划价信息
|
|
443
|
+
// 需要配置 calculatePreByCollection = true
|
|
444
|
+
async calculatePreByCollection () {
|
|
445
|
+
try {
|
|
446
|
+
console.log('看看走了没', this.model)
|
|
447
|
+
this.model.f_collection = (this.model.f_collection - 0)
|
|
448
|
+
let calFee = ((this.model.f_collection - 0) + (this.row.f_balance)).toFixed(4)
|
|
449
|
+
// 通过收款进行划价
|
|
450
|
+
let getGas = await this.$CommonService.feeCalculate(this.model, calFee)
|
|
451
|
+
this.model.f_pregas = parseInt(getGas.data.gas)
|
|
452
|
+
let dymoney2 = await this.$CommonService.gasCalculate(this.model, this.model.f_pregas)
|
|
453
|
+
this.model.chargeprice = dymoney2.data.chargeprice
|
|
454
|
+
Object.assign(this.model, this.model, dymoney2.data)
|
|
455
|
+
this.model.f_totalcost = dymoney2.data.chargenum
|
|
456
|
+
this.model.f_preamount = dymoney2.data.chargenum
|
|
457
|
+
this.model.getDeduct = 0
|
|
458
|
+
if (this.row.f_project_money && this.row.f_project_money > 0) {
|
|
459
|
+
this.model.getDeduct = (this.$CommonService.getDeduct(this.row, this.model.f_pregas) - 0)
|
|
460
|
+
this.model.f_totalcost = (this.model.f_totalcost - 0) + (this.model.getDeduct - 0)
|
|
461
|
+
this.model.f_collection = (this.model.f_collection - 0) + (this.model.getDeduct - 0)
|
|
462
|
+
}
|
|
463
|
+
this.calText(dymoney2.data.chargeprice, this.model.getDeduct)
|
|
464
|
+
} catch (error) {
|
|
465
|
+
this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
|
|
466
|
+
this.$dispatch('error', '发卡售气', this.model, error)
|
|
467
|
+
}
|
|
468
|
+
},
|
|
395
469
|
getRandomId () {
|
|
396
470
|
this.randomBusinessId = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
397
471
|
let res = Math.random() * 16 | 0
|
|
@@ -413,6 +487,86 @@
|
|
|
413
487
|
}
|
|
414
488
|
})
|
|
415
489
|
},
|
|
490
|
+
// 根据选择的付款方式 获取优惠列表
|
|
491
|
+
async getPrivilegeList () {
|
|
492
|
+
// 初始化下拉选择列表
|
|
493
|
+
this.privilegeList = [{label: '无优惠', value: '0'}]
|
|
494
|
+
// 初始为无优惠
|
|
495
|
+
this.model.f_privilege_id = '0'
|
|
496
|
+
if (this.model.f_payment && this.model.f_payment.length) {
|
|
497
|
+
// 查询条件
|
|
498
|
+
let payments = JSON.stringify(this.model.f_payment)
|
|
499
|
+
payments = payments.replace('[', '(').replace(']', ')').replace(/"/g, '\'')
|
|
500
|
+
let HttpReset = new HttpResetClass()
|
|
501
|
+
let privilege = await HttpReset.load('POST', 'rs/sql/singleTable_OrderBy', {
|
|
502
|
+
data: {
|
|
503
|
+
items: 'id,f_privilege_name,f_privilege_type',
|
|
504
|
+
tablename: 't_privilege',
|
|
505
|
+
condition: `f_payment in ${payments} and f_gasproperties = '${this.row.f_gasproperties}' and f_user_type = '${this.row.f_user_type}' and f_perform_date <= GETDATE() and f_end_date >= GETDATE() and f_state = '有效'`,
|
|
506
|
+
orderitem: 'id'
|
|
507
|
+
}
|
|
508
|
+
}, {resolveMsg: null, rejectMsg: '查询优惠信息失败'})
|
|
509
|
+
// 查询结果放到下拉列表
|
|
510
|
+
for (let p of privilege.data) {
|
|
511
|
+
this.privilegeList.push({label: p.f_privilege_name, value: p.id, type: p.f_privilege_type})
|
|
512
|
+
}
|
|
513
|
+
this.privilegeCalculate()
|
|
514
|
+
}
|
|
515
|
+
if (this.hasDisCount) {
|
|
516
|
+
this.calDisCount()
|
|
517
|
+
}
|
|
518
|
+
},
|
|
519
|
+
async calDisCount () {
|
|
520
|
+
// 初始化减免金额
|
|
521
|
+
this.model.f_privilege_money = 0
|
|
522
|
+
this.model.f_after_discount = this.model.f_collection
|
|
523
|
+
let param = this.disCountInfo
|
|
524
|
+
param.f_collection = this.model.f_collection
|
|
525
|
+
param.f_pregas = this.model.f_pregas
|
|
526
|
+
let privilegeData = await this.$resetpost('rs/logic/calculateDiscount', param, {resolveMsg: null, rejectMsg: '计算优惠金额出错'})
|
|
527
|
+
// 减免金额
|
|
528
|
+
this.model.f_privilege_money = privilegeData.data.f_privilege_money
|
|
529
|
+
this.model.f_privilege_gas = privilegeData.data.f_privilege_gas
|
|
530
|
+
// 减免后收款金额
|
|
531
|
+
this.model.f_after_discount = privilegeData.data.f_collection
|
|
532
|
+
},
|
|
533
|
+
// 优惠计算
|
|
534
|
+
async privilegeCalculate () {
|
|
535
|
+
// 初始化减免金额
|
|
536
|
+
this.model.f_privilege_money = 0
|
|
537
|
+
this.model.f_after_discount = this.model.f_collection
|
|
538
|
+
// 判断是否是自定义优惠
|
|
539
|
+
if (parseInt(this.model.f_privilege_id)) {
|
|
540
|
+
for (let p of this.privilegeList) {
|
|
541
|
+
if (p.value == this.model.f_privilege_id && p.type == '自定义') {
|
|
542
|
+
this.model.f_privilege_money = window.prompt('请输入你想优惠的金额')
|
|
543
|
+
if (!(/^[1-9]\d*(\.\d+)?$/).test(this.model.f_privilege_money) || !(/^[1-9]\d*(\.\d+)?$/).test(this.model.f_privilege_money)) {
|
|
544
|
+
this.$showMessage('金额输入格式不正确!')
|
|
545
|
+
this.model.f_privilege_money = 0
|
|
546
|
+
return
|
|
547
|
+
}
|
|
548
|
+
if ((this.model.f_privilege_money - 0) >= this.model.f_collection) {
|
|
549
|
+
this.$showMessage('减免金额不能大于等于收款金额')
|
|
550
|
+
this.model.f_privilege_money = 0
|
|
551
|
+
return
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
// 优惠方式, 收款 缺一不计算
|
|
557
|
+
if (this.model.f_payment && this.model.f_payment.length && parseInt(this.model.f_privilege_id) && this.model.f_collection) {
|
|
558
|
+
let c = {
|
|
559
|
+
f_privilege_id: this.model.f_privilege_id,
|
|
560
|
+
f_collection: this.model.f_collection,
|
|
561
|
+
f_privilege_money: this.model.f_privilege_money
|
|
562
|
+
}
|
|
563
|
+
let privilegeData = await this.$resetpost('rs/logic/calculatePrivilege', c, {resolveMsg: null, rejectMsg: '计算优惠金额出错'})
|
|
564
|
+
// 减免金额
|
|
565
|
+
this.model.f_privilege_money = privilegeData.data.f_privilege_money
|
|
566
|
+
// 减免后收款金额
|
|
567
|
+
this.model.f_after_discount = privilegeData.data.f_collection
|
|
568
|
+
}
|
|
569
|
+
},
|
|
416
570
|
clean () {
|
|
417
571
|
this.$info('取消操作')
|
|
418
572
|
this.$dispatch('refresh', this.row)
|
|
@@ -466,15 +620,49 @@
|
|
|
466
620
|
}
|
|
467
621
|
},
|
|
468
622
|
watch: {
|
|
623
|
+
'model.f_payment.length' (val) {
|
|
624
|
+
console.log('付款方式多选。。', val)
|
|
625
|
+
if (val > 1 && !this.model.f_preamount) {
|
|
626
|
+
this.model.f_payment = ['现金缴费']
|
|
627
|
+
this.$showAlert('请先计算付款金额', 'warning', 2000)
|
|
628
|
+
} else {
|
|
629
|
+
this.paymentModel = []
|
|
630
|
+
|
|
631
|
+
this.model.f_payment.forEach((res) => {
|
|
632
|
+
let temp = {
|
|
633
|
+
f_payment: res,
|
|
634
|
+
f_money: 0
|
|
635
|
+
}
|
|
636
|
+
this.paymentModel.push(temp)
|
|
637
|
+
})
|
|
638
|
+
this.$resetValidation()
|
|
639
|
+
|
|
640
|
+
// 获取计算优惠
|
|
641
|
+
this.getPrivilegeList()
|
|
642
|
+
}
|
|
643
|
+
},
|
|
469
644
|
'model.f_payment' (val) {
|
|
470
|
-
|
|
645
|
+
let _payment = this.$appdata.getSingleValue('需要输入业务单号的付款方式') || ''
|
|
646
|
+
if (val == '免交' || _payment.includes(val)) {
|
|
471
647
|
this.mjshow = true
|
|
472
648
|
} else {
|
|
473
649
|
this.mjshow = false
|
|
474
650
|
}
|
|
651
|
+
// if(this.row.f_collection_type == '按气量'){
|
|
652
|
+
// this.pregas();
|
|
653
|
+
// }else{
|
|
654
|
+
// this.preamount();
|
|
655
|
+
// }
|
|
656
|
+
},
|
|
657
|
+
'model.f_collection' (val) {
|
|
658
|
+
// 获取计算优惠
|
|
659
|
+
this.getPrivilegeList()
|
|
475
660
|
}
|
|
476
661
|
},
|
|
477
662
|
computed: {
|
|
663
|
+
authArr () {
|
|
664
|
+
return this.$login.r ? this.$login.r : []
|
|
665
|
+
},
|
|
478
666
|
'curbalance' () {
|
|
479
667
|
if (this.model.f_preamount) {
|
|
480
668
|
if (this.row.f_collection_type === '按金额') {
|
|
@@ -109,8 +109,8 @@
|
|
|
109
109
|
v-ref:givechange></give-change>
|
|
110
110
|
</div>
|
|
111
111
|
</div>
|
|
112
|
-
<div class="row" style="margin-top:5px;" v-show="authArr.includes('优惠权限')">
|
|
113
|
-
<div class="col-sm-4 form-group">
|
|
112
|
+
<div class="row" style="margin-top:5px;" v-show="authArr.includes('优惠权限') || hasDisCount">
|
|
113
|
+
<div class="col-sm-4 form-group" v-if="!hasDisCount">
|
|
114
114
|
<label class="font_normal_body">优惠方式</label>
|
|
115
115
|
<v-select v-model="model.f_privilege_id" @blur.native.capture="privilegeCalculate"
|
|
116
116
|
placeholder='请选择'
|
|
@@ -318,7 +318,7 @@ let preamountGen = async function (self) {
|
|
|
318
318
|
}
|
|
319
319
|
self.model.f_preamount = (calFee - (self.dymoney - 0)).toFixed(self.row.f_fee_decimal || 4)
|
|
320
320
|
self.calText(getGas.data.chargeprice)
|
|
321
|
-
self.pricetext = getGas.data.chargeprice[0].pricetext ? getGas.data.chargeprice[0].pricetext:null
|
|
321
|
+
self.pricetext = getGas.data.chargeprice[0].pricetext ? getGas.data.chargeprice[0].pricetext : null
|
|
322
322
|
}
|
|
323
323
|
|
|
324
324
|
// 输入气量,换算金额
|
|
@@ -339,7 +339,7 @@ let pregasGen = async function (self) {
|
|
|
339
339
|
if (self.config.floor) {
|
|
340
340
|
self.model.f_collection = Math.ceil(self.model.f_collection)
|
|
341
341
|
}
|
|
342
|
-
self.pricetext = getAmount.data.chargeprice[0].pricetext?getAmount.data.chargeprice[0].pricetext:null
|
|
342
|
+
self.pricetext = getAmount.data.chargeprice[0].pricetext ? getAmount.data.chargeprice[0].pricetext : null
|
|
343
343
|
self.calText(getAmount.data.chargeprice)
|
|
344
344
|
}
|
|
345
345
|
}
|
|
@@ -447,6 +447,7 @@ let asyncShowCardSellGas = async function (self) {
|
|
|
447
447
|
let http = new HttpResetClass()
|
|
448
448
|
let getLimit = await http.load('POST', 'rs/logic/sale_getLimitGas', {data: limit_param}, {
|
|
449
449
|
resolveMsg: null,
|
|
450
|
+
newly: true,
|
|
450
451
|
rejectMsg: '获取限购值失败!!'
|
|
451
452
|
})
|
|
452
453
|
console.log('获取限购值', getLimit)
|
|
@@ -472,6 +473,21 @@ let asyncShowCardSellGas = async function (self) {
|
|
|
472
473
|
}
|
|
473
474
|
}
|
|
474
475
|
}
|
|
476
|
+
// 获取优惠信息
|
|
477
|
+
if (self.config.newDiscount) {
|
|
478
|
+
let nowrite_param = {
|
|
479
|
+
f_userfiles_id: self.row.f_userfiles_id
|
|
480
|
+
}
|
|
481
|
+
let getDiscount = await self.$resetpost('rs/logic/getDiscountInfo', {data: nowrite_param}, {
|
|
482
|
+
resolveMsg: null,
|
|
483
|
+
newly: true,
|
|
484
|
+
rejectMsg: '获取优惠信息失败!!'
|
|
485
|
+
})
|
|
486
|
+
if (getDiscount.data.leftDiscount > 0) {
|
|
487
|
+
self.disCountInfo = getDiscount.data
|
|
488
|
+
self.hasDisCount = true
|
|
489
|
+
}
|
|
490
|
+
}
|
|
475
491
|
}
|
|
476
492
|
|
|
477
493
|
export default {
|
|
@@ -480,11 +496,14 @@ export default {
|
|
|
480
496
|
return {
|
|
481
497
|
serialShow: false,
|
|
482
498
|
pricetext: null,
|
|
499
|
+
hasDisCount: false,
|
|
500
|
+
disCountInfo: {},
|
|
483
501
|
resid: [],
|
|
484
502
|
config: {
|
|
485
503
|
notShowFormula: false, // 不显示计算公式,默认显示
|
|
486
504
|
calculatePreByCollection: false, // 可以更具收款来反向计算预购
|
|
487
505
|
showupload: true, // 默认不显示上传附件
|
|
506
|
+
newDiscount: false, // 新优惠
|
|
488
507
|
hasPrint: false, // 默认打票
|
|
489
508
|
floor: true, // 是否取整收费
|
|
490
509
|
hasBillManage: false, // 默认不启用发票管理
|
|
@@ -506,6 +525,7 @@ export default {
|
|
|
506
525
|
f_meter_type: '',
|
|
507
526
|
f_voucher_number: '',
|
|
508
527
|
f_privilege_id: 0,
|
|
528
|
+
f_privilege_gas: 0,
|
|
509
529
|
f_privilege_money: 0,
|
|
510
530
|
f_after_discount: 0
|
|
511
531
|
},
|
|
@@ -842,6 +862,23 @@ export default {
|
|
|
842
862
|
}
|
|
843
863
|
this.privilegeCalculate()
|
|
844
864
|
}
|
|
865
|
+
if (this.hasDisCount) {
|
|
866
|
+
this.calDisCount()
|
|
867
|
+
}
|
|
868
|
+
},
|
|
869
|
+
async calDisCount () {
|
|
870
|
+
// 初始化减免金额
|
|
871
|
+
this.model.f_privilege_money = 0
|
|
872
|
+
this.model.f_after_discount = this.model.f_collection
|
|
873
|
+
let param = this.disCountInfo
|
|
874
|
+
param.f_collection = this.model.f_collection
|
|
875
|
+
param.f_pregas = this.model.f_pregas
|
|
876
|
+
let privilegeData = await this.$resetpost('rs/logic/calculateDiscount', param, {resolveMsg: null, rejectMsg: '计算优惠金额出错'})
|
|
877
|
+
// 减免金额
|
|
878
|
+
this.model.f_privilege_money = privilegeData.data.f_privilege_money
|
|
879
|
+
this.model.f_privilege_gas = privilegeData.data.f_privilege_gas
|
|
880
|
+
// 减免后收款金额
|
|
881
|
+
this.model.f_after_discount = privilegeData.data.f_collection
|
|
845
882
|
},
|
|
846
883
|
// 优惠计算
|
|
847
884
|
async privilegeCalculate () {
|
|
@@ -82,7 +82,8 @@ export default {
|
|
|
82
82
|
fusetypes: [],
|
|
83
83
|
isDelete: '0', // 删除按钮,可以进行控制(权限等)
|
|
84
84
|
userinfo_id: '',
|
|
85
|
-
images: ''
|
|
85
|
+
images: '',
|
|
86
|
+
extraBlodid: '' // 额外的附件id(从t_apply.f_process_id获取)
|
|
86
87
|
}
|
|
87
88
|
},
|
|
88
89
|
methods: {
|
|
@@ -111,10 +112,31 @@ export default {
|
|
|
111
112
|
this.selfSearch()
|
|
112
113
|
})
|
|
113
114
|
},
|
|
114
|
-
|
|
115
|
+
async getFiles () {
|
|
115
116
|
this.files = []
|
|
116
117
|
this.userinfo_id = this.row.f_userinfo_id
|
|
118
|
+
|
|
119
|
+
// 先查询 t_apply 获取 f_process_id 作为额外的附件 blodid
|
|
120
|
+
let http = new HttpResetClass()
|
|
121
|
+
try {
|
|
122
|
+
let applyRes = await http.load('POST', 'rs/sql/saleSingleTable', {
|
|
123
|
+
data: {
|
|
124
|
+
tablename: 't_apply',
|
|
125
|
+
condition: `f_userinfo_id = '${this.userinfo_id}' `
|
|
126
|
+
}
|
|
127
|
+
}, {resolveMsg: null, rejectMsg: null, newly: true})
|
|
128
|
+
if (applyRes.data[0] && applyRes.data[0].f_process_id) {
|
|
129
|
+
this.extraBlodid = applyRes.data[0].f_process_id
|
|
130
|
+
}
|
|
131
|
+
} catch (e) {
|
|
132
|
+
console.log('查询t_apply失败', e)
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// 构建查询条件,同时查询两个 blodid
|
|
117
136
|
let condition = `f_blobid = '${this.userinfo_id}' `
|
|
137
|
+
if (this.extraBlodid) {
|
|
138
|
+
condition = `f_blobid in ('${this.userinfo_id}', '${this.extraBlodid}') `
|
|
139
|
+
}
|
|
118
140
|
if (this.upload_date !== '') {
|
|
119
141
|
condition += `and CONVERT( VARCHAR ( 100 ), f_uploaddate, 23 )='${this.upload_date}' `
|
|
120
142
|
}
|
|
@@ -123,7 +145,6 @@ export default {
|
|
|
123
145
|
condition += `and fusetype='${this.fusetype}' `
|
|
124
146
|
}
|
|
125
147
|
}
|
|
126
|
-
let http = new HttpResetClass()
|
|
127
148
|
|
|
128
149
|
if (this.userinfo_id) {
|
|
129
150
|
http.load('POST', 'rs/logic/getAllFiles', {
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
@limit="getLimitGas"></limit-gas>
|
|
77
77
|
<modal :show.sync="showfiles" width="80%" style="width:auto; overflow-y: auto" v-ref:modal middle backdrop="false">
|
|
78
78
|
<article slot="modal-body">
|
|
79
|
-
<upload-idcard :blodid="blodid" isremark="true" @getidinfo="confirmIdCard" style="width:auto"
|
|
79
|
+
<upload-idcard :blodid="blodid" :extrablobid="extraBlodid" isremark="true" @getidinfo="confirmIdCard" style="width:auto"
|
|
80
80
|
fusetype="档案信息" v-ref:upload></upload-idcard>
|
|
81
81
|
</article>
|
|
82
82
|
<footer slot="modal-footer" class="modal-footer">
|
|
@@ -294,6 +294,7 @@ export default {
|
|
|
294
294
|
pointsNum: this.$appdata.getSingleValue('默认用气点'),
|
|
295
295
|
kitchenType: this.$appdata.getSingleValue('默认厨房类型'),
|
|
296
296
|
blodid: '', // 附件的临时id
|
|
297
|
+
extraBlodid: '', // 额外的附件id(从t_apply.f_process_id获取)
|
|
297
298
|
defaultMeterInfo: '', // 默认的表具信息
|
|
298
299
|
fileSaveData: {
|
|
299
300
|
// 修改原因
|
|
@@ -331,6 +332,17 @@ export default {
|
|
|
331
332
|
// 将小区信息转化为综合信息的格式
|
|
332
333
|
await this.areainfoInUser(this.areainfo)
|
|
333
334
|
}
|
|
335
|
+
let res = await this.$resetpost('rs/sql/saleSingleTable', {
|
|
336
|
+
data: {
|
|
337
|
+
tablename: 't_apply',
|
|
338
|
+
condition: `f_userinfo_id = '${this.data.baseinfo.base.f_userinfo_id}' `
|
|
339
|
+
}
|
|
340
|
+
}, {resolveMsg: null, rejectMsg: '', newly: true})
|
|
341
|
+
console.log('报建图片id',res.data[0].f_process_id)
|
|
342
|
+
// 将 f_process_id 作为额外的附件blodid,用于显示申请附件图片
|
|
343
|
+
if (res.data[0] && res.data[0].f_process_id) {
|
|
344
|
+
this.extraBlodid = res.data[0].f_process_id
|
|
345
|
+
}
|
|
334
346
|
},
|
|
335
347
|
watch: {
|
|
336
348
|
async 'row' (val) {
|