apply-clients 4.1.0-weinan → 4.1.1-weinan

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apply-clients",
3
- "version": "4.1.0-weinan",
3
+ "version": "4.1.1-weinan",
4
4
  "description": "报建前端模块",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -36,7 +36,8 @@
36
36
  "px2rem-loader": "^0.1.9",
37
37
  "vue": "^1.0.17",
38
38
  "vue-bubble": "^1.0.3",
39
- "vue-concise-slider": "^4.2.1"
39
+ "vue-concise-slider": "^4.2.1",
40
+ "qrcodejs2": "0.0.2"
40
41
  },
41
42
  "devDependencies": {
42
43
  "babel-core": "^6.0.0",
@@ -30,12 +30,12 @@ export default function () {
30
30
  //报建 通气点火
31
31
  Vue.component('ventilation', (resolve) => { require(['./components/app_apply/Ventilation'], resolve) })
32
32
 
33
- Vue.component('back-page', (resolve) => { require(['./components/app_apply/ToolsPage.vue'], resolve) })
33
+ Vue.component('back-page', (resolve) => { require(['./components/app_apply/ToolsPage'], resolve) })
34
+ // 收费记录
35
+ Vue.component('app-charge-management', (resolve) => { require(['./components/app_apply/AppChargeManagement'], resolve) })
34
36
 
35
37
  // 业务tab(control层)页
36
38
  Vue.component('service-control-app', (resolve) => { require(['./components/app_apply/ServiceControl'], resolve) })
37
39
  // 公共业务显示(view层)页
38
40
  Vue.component('service-view-app', (resolve) => { require(['./components/app_apply/ServiceView'], resolve) })
39
- // 收费记录
40
- Vue.component('app-charge-management', (resolve) => { require(['./components/app_apply/AppChargeManagement'], resolve) })
41
- }
41
+ }
@@ -1,637 +1,637 @@
1
- <template>
2
- <div>
3
- <div class="col-sm-12 col-xs-12 form-group app-btn">
4
- <button class="btn btn-info" @click.prevent="showChargeModal()">收费</button>
5
- </div>
6
- <!--<div class="col-sm-12 col-xs-12">
7
- <list :model="charge.payment_terms" partial='list'>
8
- <div partial class="auto app-text panel">
9
- <div class="panel-body panel-self">
10
- <div class="row">
11
- <p class="col-xs-4 text-left font"><b>收费项目</b></p>
12
- <p class="col-xs-8 text-left input-font">{{ row.f_payment_term }}</p>
13
- </div>
14
- <div class="row">
15
- <p class="col-xs-4 text-left font"><b>收费金额</b></p>
16
- <p class="col-xs-8 text-left input-font">{{ row.f_charge_money }}</p>
17
- </div>
18
- <div class="row">
19
- <p class="col-xs-4 text-left font"><b>金额大写</b></p>
20
- <p class="col-xs-8 text-left input-font">{{ row.f_amount_words }}</p>
21
- </div>
22
- <div class="row">
23
- <p class="col-xs-4 text-left font"><b>收费状态</b></p>
24
- <p class="col-xs-8 text-left input-font">未缴费</p>
25
- </div>
26
- </div>
27
- </div>
28
- </list>
29
- </div>-->
30
- <div class="col-sm-12 col-xs-12">
31
- <list :model="model" partial='list'>
32
- <div partial class="auto app-text panel">
33
- <div class="panel-body panel-self">
34
- <div class="row" v-if="selectdata.f_apply_type !== '开发商集体报建'">
35
- <p class="col-xs-4 text-left font"><b>地址</b></p>
36
- <p class="col-xs-8 text-left input-font">{{ row.f_useraddres }}</p>
37
- </div>
38
- <div class="row">
39
- <p class="col-xs-4 text-left font"><b>缴费编号</b></p>
40
- <p class="col-xs-8 text-left input-font">{{ row.f_charge_number }}</p>
41
- </div>
42
- <div class="row">
43
- <p class="col-xs-4 text-left font"><b>收费金额</b></p>
44
- <p class="col-xs-8 text-left input-font">{{ row.f_charge_money }}</p>
45
- </div>
46
- <div class="row">
47
- <p class="col-xs-4 text-left font"><b>金额大写</b></p>
48
- <p class="col-xs-8 text-left input-font">{{ row.f_amount_words }}</p>
49
- </div>
50
- <div class="row">
51
- <p class="col-xs-4 text-left font"><b>收费项目</b></p>
52
- <p class="col-xs-8 text-left input-font">{{ row.f_payment_term }}</p>
53
- </div>
54
- <div class="row">
55
- <p class="col-xs-4 text-left font"><b>付款方式</b></p>
56
- <p class="col-xs-8 text-left input-font">{{ row.f_payment_method }}</p>
57
- </div>
58
- <div class="row" v-if="row.f_payment_method === '银行转账'">
59
- <p class="col-xs-4 text-left font"><b>付款方名称</b></p>
60
- <p class="col-xs-8 text-left input-font">{{ row.f_payer_name }}</p>
61
- </div>
62
- <div class="row" v-if="row.f_payment_method === '银行转账'">
63
- <p class="col-xs-4 text-left font"><b>付款方账号</b></p>
64
- <p class="col-xs-8 text-left input-font">{{ row.f_payer_account }}</p>
65
- </div>
66
- <div class="row" v-if="row.f_payment_method === '银行转账'">
67
- <p class="col-xs-4 text-left font"><b>付款流水号</b></p>
68
- <p class="col-xs-8 text-left input-font">{{ row.f_payer_number }}</p>
69
- </div>
70
- <div class="row">
71
- <p class="col-xs-4 text-left font"><b>收费人员</b></p>
72
- <p class="col-xs-8 text-left input-font">{{ row.f_charge_collectors }}</p>
73
- </div>
74
- <div class="row">
75
- <p class="col-xs-4 text-left font"><b>收费日期</b></p>
76
- <p class="col-xs-8 text-left input-font">{{ row.f_charge_date }}</p>
77
- </div>
78
- <div class="row">
79
- <p class="col-xs-4 text-left font"><b>备注</b></p>
80
- <p class="col-xs-8 text-left input-font">{{ row.f_charge_remarks }}</p>
81
- </div>
82
- </div>
83
- </div>
84
- </list>
85
- </div>
86
-
87
- <modal v-if="showCharge" :show.sync="showCharge" v-ref:modal :large="true" :backdrop="false" title="收费明细">
88
- <header slot="modal-header" class="modal-header">
89
- <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
90
- <h4 class="modal-title">收费明细</h4>
91
- </header>
92
- <article slot="modal-body" class="modal-body clearfix">
93
- <div v-for="(index,payment) in charge.payment_terms">
94
- <div class="form-group row vertical-center" :class="payment.f_payment_term ? '':'has-error'">
95
- <label class="col-xs-4 control-label">收费项目:</label>
96
- <div class="col-xs-8">
97
- <input-select class="select select_list"
98
- v-model="payment.f_payment_term"
99
- :value.sync="payment.f_payment_term"
100
- :options='paymentTerm'
101
- :value-single="true"
102
- close-on-select ></input-select>
103
- </div>
104
- </div>
105
- <div class="form-group row vertical-center" :class="payment.f_charge_money ? '':'has-error'">
106
- <label class="col-xs-4 control-label">收费金额:</label>
107
- <div class="col-xs-8">
108
- <input class="form-control input_view" style="" type="number"
109
- v-model="payment.f_charge_money"
110
- @keyup="handleInput(index)"
111
- @change="moneyChange(index)"
112
- :readonly="false"/>
113
- </div>
114
- </div>
115
- <div class="form-group row vertical-center">
116
- <label class="col-xs-4 control-label">金额大写:</label>
117
- <div class="col-xs-8">
118
- <input class="form-control input_view" style=""
119
- v-model="payment.f_amount_words"
120
- :value="smalltoBIG(0)"
121
- :readonly="true"/>
122
- </div>
123
- </div>
124
- </div>
125
- <div class="row" style="display: flex"> <button type="button" style="margin: 0 auto;" class="btn btn-primary" @click.prevent="addPaymentTerms()">增加收费项目</button> </div>
126
- <div class="form-group row vertical-center">
127
- <label class="col-xs-4 control-label">应交总金额:</label>
128
- <div class="col-xs-8">
129
- <input class="form-control input_view" style=""
130
- v-model="selectdata.f_due_money"
131
- :readonly="true"/>
132
- </div>
133
- </div>
134
- <div class="form-group row vertical-center">
135
- <label class="col-xs-4 control-label">缴费总金额:</label>
136
- <div class="col-xs-8">
137
- <input class="form-control input_view" style=""
138
- v-model="selectdata.f_cumulative_payment_money"
139
- :readonly="true"/>
140
- </div>
141
- </div>
142
- <div class="form-group row vertical-center">
143
- <label class="col-xs-4 control-label">未结总金额:</label>
144
- <div class="col-xs-8">
145
- <input class="form-control input_view" style=""
146
- v-model="selectdata.f_surplus_money"
147
- :readonly="true"/>
148
- </div>
149
- </div>
150
- </article>
151
- <footer slot="modal-footer" class="modal-footer">
152
- <button type="button" class="btn btn-primary" @click.prevent="openQrCode()">确认</button>
153
- </footer>
154
- </modal>
155
-
156
- <modal :show.sync="showQrCode" v-ref:qrcodemodal :large="true" :backdrop="false" style="height: 100%">
157
- <header slot="modal-header" class="modal-header">
158
- <h4 class="modal-title">微信扫码支付</h4>
159
- </header>
160
- <article slot="modal-body" class="modal-body clearfix">
161
- <div class="text-center">
162
- <p><b>收费金额:{{ getTotalAmount() }}¥</b></p>
163
- <p><b>收费项目:{{ getPaymentTerm() }}</b></p>
164
- <div id="qrcode" class="qrcode" v-ref:qrcode></div>
165
- <p>
166
- 等待支付,剩余&ensp;<span style="color: #ff791a">{{timeLeft}}</span>&ensp;秒
167
- </p>
168
- <button type="button" @click="closeQRCode">取消支付</button>
169
- </div>
170
- </article>
171
- <footer slot="modal-footer"></footer>
172
- </modal>
173
- </div>
174
- </template>
175
- <script>
176
- import {getNowDate,isEmpty} from '../../../Util'
177
- import {PagedList} from 'vue-client'
178
- import {HttpResetClass} from 'vue-client'
179
- import QRCode from 'qrcodejs2'
180
- import Vue from "vue";
181
-
182
- export default {
183
- title: '收费管理',
184
- props: {
185
- selectdata: {
186
- type: Object
187
- },
188
- mark: {
189
- type: Number,
190
- default: 0
191
- }
192
- },
193
- data () {
194
- return {
195
- showCharge: false, // 收费明细
196
- showQrCode : false, // 二维码
197
- model: {
198
- rows: null
199
- }, // 记录
200
- useraddresList: [], // 地址列表
201
- /*charge: {
202
-
203
- },*/
204
- charge: {
205
- payment_terms:[{f_payment_term: '',f_charge_money: '',f_amount_words:'',f_payment_method : '手机APP'}]
206
- },
207
- order: null,
208
- timeLeft: 120,
209
- paymentInterval: null,
210
- orderInterval: null,
211
- filiale:"",
212
- config: {
213
-
214
- }
215
- }
216
- },
217
- ready () {
218
- this.search()
219
- if (Vue.user.orgid == '10101') {
220
- console.log('zhoukou')
221
- this.filiale = 'zhoukou'
222
- }else if (Vue.user.orgid == '35520') {
223
- console.log('xiangcheng')
224
- this.filiale = 'xiangcheng'
225
- }else if (Vue.user.orgid == '35532') {
226
- console.log('luyi')
227
- this.filiale = 'luyi'
228
- }else if (Vue.user.orgid == '35538') {
229
- console.log('dancheng')
230
- this.filiale = 'dancheng'
231
- }else if (Vue.user.orgid == '35526') {
232
- console.log('xihua')
233
- this.filiale = 'xihua'
234
- }else {
235
- this.$showMessage('分公司异常,请联系管理员!')
236
- }
237
- },
238
- methods: {
239
- addPaymentTerms(){
240
- this.charge.payment_terms.push({f_payment_term: '',f_charge_money: '',f_payment_method : '掌上营业厅'})
241
- },
242
- // 新增收费
243
- async saveCharge() {
244
- let http = new HttpResetClass()
245
- let data = {
246
- apply: this.selectdata,
247
- charge: this.charge,
248
- user: Vue.user,
249
- f_out_trade_no:this.order.f_out_trade_no
250
- }
251
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/appaddApplyChargeRecord`, {data:data}, {
252
- resolveMsg: null,
253
- rejectMsg: '缴费失败!!!'
254
- })
255
- this.selectdata = res.data
256
-
257
- this.$dispatch('breakControl')
258
- },
259
- // 获取订单信息
260
- async getOrderInformation () {
261
- // 查询订单信息
262
- console.log('查询订单信息!!!')
263
- // let data = {
264
- // out_trade_no: this.order.out_trade_no,
265
- // filiale: this.config[Vue.user.number]
266
- // }
267
- // 查询订单状态
268
-
269
- let http = new HttpResetClass()
270
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/tel_singleTable_OrderBy`, {
271
- data: {
272
- items: "id",
273
- tablename: "t_weixinreturnxml",
274
- condition: ` f_out_trade_no = '${this.order.f_out_trade_no}' and f_bill_state = 1 `,
275
- orderitem: "id"
276
- }
277
- }, {
278
- resolveMsg: null,
279
- rejectMsg: '订单查询失败!!!'
280
- })
281
- console.log('8888888888')
282
- console.log(this.order.f_out_trade_no)
283
- console.log(JSON.stringify(res))
284
- // 支付成功
285
- if (res.data.length > 0) {
286
- this.$showMessage('支付成功!!!')
287
- clearTimeout(this.paymentInterval)
288
- clearTimeout(this.orderInterval)
289
- this.timeLeft = 10
290
- // 清除二维码
291
- this.clearQrCode()
292
- this.showQrCode = false
293
-
294
- this.saveCharge()
295
- }
296
- },
297
- checkApplyModel(){
298
- console.log(this.charge.payment_terms)
299
- if (Number(this.getTotalAmount()) != Number(this.selectdata.f_surplus_money)) {
300
- this.$showAlert('本次收费金额必须和未交总金额一致!!!', 'warning', 3000)
301
- //this.charge.f_charge_money = null
302
- return
303
- }
304
-
305
- for(let row = 0;row<this.charge.payment_terms.length; row++){
306
- console.log(this.charge.payment_terms[row])
307
- if (isEmpty(this.charge.payment_terms[row].f_payment_term)) {
308
- console.log(1111)
309
- this.$showAlert('请选择收费项目!!!', 'warning', 3000)
310
- return
311
- }else if (isEmpty(this.charge.payment_terms[row].f_charge_money)) {
312
- console.log(2222)
313
- this.$showAlert('请输入收费金额!!!', 'warning', 3000)
314
- return
315
- }
316
- }
317
- this.showCharge=false
318
- this.$dispatch('changeShowfei','待付款')
319
- },
320
- // 打开二维码
321
- async openQrCode () {
322
- console.log(this.charge.payment_terms)
323
- if (Number(this.getTotalAmount()) != Number(this.selectdata.f_surplus_money)) {
324
- this.$showAlert('本次收费金额必须和未交总金额一致!!!', 'warning', 3000)
325
- //this.charge.f_charge_money = null
326
- return
327
- }
328
-
329
- for(let row = 0;row<this.charge.payment_terms.length; row++){
330
- console.log(this.charge.payment_terms[row])
331
- if (isEmpty(this.charge.payment_terms[row].f_payment_term)) {
332
- console.log(1111)
333
- this.$showAlert('请选择收费项目!!!', 'warning', 3000)
334
- return
335
- }else if (isEmpty(this.charge.payment_terms[row].f_charge_money)) {
336
- console.log(2222)
337
- this.$showAlert('请输入收费金额!!!', 'warning', 3000)
338
- return
339
- }
340
- }
341
- this.showCharge=false
342
- //this.$dispatch('changeShowfei','待付款')
343
- //this.saveCharge()
344
- let http = new HttpResetClass()
345
- // 接口金额 单位为:分
346
- let data = {
347
- money: this.accMul(this.getTotalAmount() ,100),
348
- attach: {
349
- "f_type": '报建收费',
350
- "f_user": Vue.user.id
351
- },
352
- str: this.getPaymentTerm(),
353
- config: this.filiale,
354
- f_revenue: "productV3"
355
- }
356
- console.log('下单信息')
357
- console.log(JSON.stringify(data))
358
- // 下订单
359
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/ICBCGetCode`, data, {
360
- resolveMsg: null,
361
- rejectMsg: '订单生成失败!!!'
362
- })
363
- console.log('=================================')
364
- console.log(JSON.stringify(res.data))
365
- this.order = res.data
366
- let info = {
367
- apply: this.selectdata,
368
- charge: this.charge,
369
- user: Vue.user,
370
- f_out_trade_no:this.order.f_out_trade_no
371
- }
372
- http.load('POST',`${this.$androidUtil.getProxyUrl()}/rs/logic/beforeAddChargeRecord`,{data:info},{
373
- resolveMsg: null,
374
- rejectMsg: null
375
- }).then(ress=>{
376
- console.log('ress',ress)
377
- if(ress.data.code == '200'){
378
- this.showQrCode = true
379
- this.$nextTick(()=>{
380
- this.qrcode()
381
- })
382
- // 剩余支付时间
383
- this.paymentInterval = setInterval(() => {
384
- this.timeLeft = this.timeLeft - 1
385
- },1000)
386
-
387
- // 3秒查询一次订单支付信息
388
- this.orderInterval = setInterval(() => {
389
- this.getOrderInformation()
390
- },3000)
391
- }else{
392
- this.$showMessage('订单生成失败')
393
- }
394
- })
395
-
396
-
397
- },
398
- accMul(arg1,arg2) {
399
- let m = 0, s1 = arg1.toString(), s2 = arg2.toString();
400
- try {
401
- m += s1.split(".")[1].length
402
- } catch (e) {
403
- }
404
- try {
405
- m += s2.split(".")[1].length
406
- } catch (e) {
407
- }
408
- return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m)
409
- },
410
- getTotalAmount(){
411
- let money=0
412
- this.charge.payment_terms.forEach((row)=>{
413
- money = Math.floor((Number(money)+Number(row.f_charge_money)) * 100) / 100
414
- })
415
- return money
416
- },
417
- getPaymentTerm(){
418
- let term=''
419
- this.charge.payment_terms.forEach((row)=>{
420
- term += `${row.f_payment_term} `
421
- })
422
- return term
423
- },
424
- qrcode () {
425
- let qrcode = new QRCode('qrcode',{
426
- text: this.order.url, // 设置二维码内容或跳转地址
427
- width: 200, // 设置宽度,单位像素
428
- height: 200, // 设置高度,单位像素
429
- correctLevel: QRCode.CorrectLevel.L //容错率,L/M/Hs
430
- })
431
- },
432
- clearQrCode () {
433
- document.getElementById('qrcode').innerHTML = ''
434
- },
435
- moneyChange (index) {
436
- console.log(`当前下标----${index}`)
437
- if (isEmpty(this.charge.payment_terms[index].f_charge_money) || Number(this.charge.payment_terms[index].f_charge_money) === 0) {
438
- this.$showAlert('单笔收费不能为0元!!!', 'warning', 3000)
439
- this.charge.payment_terms[index].f_charge_money = null
440
- return
441
- }
442
-
443
- },
444
- /*moneyChange () {
445
- if (isEmpty(this.charge.f_charge_money) || Number(this.charge.f_charge_money) === 0) {
446
- this.$showAlert('单笔收费不能为0元!!!', 'warning', 3000)
447
- this.charge.f_charge_money = null
448
- return
449
- }
450
- if (this.selectdata.f_apply_type === '散户集体报建' && Number(this.charge.f_charge_money) > Number(this.charge.f_outstanding_amount)) {
451
- this.$showAlert('单笔收费不能超过未交金额!!!', 'warning', 3000)
452
- this.charge.f_charge_money = null
453
- return
454
- }
455
- if (Number(this.charge.f_charge_money) > Number(this.selectdata.f_surplus_money)) {
456
- this.$showAlert('单笔收费不能超过未交总金额!!!', 'warning', 3000)
457
- this.charge.f_charge_money = null
458
- return
459
- }
460
- },*/
461
- // 金额转大写
462
- handleInput(index) {
463
- // 通过正则过滤小数点后两位
464
- console.log('-----------------------')
465
- this.charge.payment_terms[index].f_charge_money = (this.charge.payment_terms[index].f_charge_money.match(/^\d*(\.?\d{0,2})/g)[0]) || null
466
- this.charge.payment_terms[index].f_amount_words = this.smalltoBIG( this.charge.payment_terms[index].f_charge_money)
467
- },
468
- // 金额转大写
469
- smalltoBIG(n) {
470
- let fraction = ['角', '分'];
471
- let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
472
- let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
473
- let head = n < 0 ? '欠' : '';
474
- n = Math.abs(n);
475
-
476
- let s = '';
477
-
478
- for (var i = 0; i < fraction.length; i++) {
479
- s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
480
- }
481
- s = s || '整';
482
- n = Math.floor(n);
483
-
484
- for (var i = 0; i < unit[0].length && n > 0; i++) {
485
- let p = '';
486
- for (var j = 0; j < unit[1].length && n > 0; j++) {
487
- p = digit[n % 10] + unit[1][j] + p;
488
- n = Math.floor(n / 10);
489
- }
490
- s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
491
- }
492
- return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
493
- },
494
- async getUserAddress() {
495
- let http = new HttpResetClass()
496
- let data = {}
497
- let url = null
498
- if (this.selectdata.f_apply_type === '改管报建' || this.selectdata.f_apply_type === '增容报建' || this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建') {
499
- data = {
500
- condition: `ui.f_userinfo_id = ${this.selectdata.f_userinfo_id}`
501
- }
502
- url = `${this.$androidUtil.getProxyUrl()}/rs/sql/applyGetUserinfos`
503
- } else {
504
- data = {
505
- condition: this.selectdata.f_apply_type === '散户集体报建' ? `nvl(cr.f_cumulative_payment_money, 0) < ${this.selectdata.f_price}` : '1=1',
506
- f_process_id: this.selectdata.f_process_id
507
- }
508
- url = `${this.$androidUtil.getProxyUrl()}/rs/sql/getAddresAndCumulativePayment`
509
- }
510
- let res = await http.load('POST', url, {data:data}, {
511
- resolveMsg: null,
512
- rejectMsg: '用户获取失败!!!'
513
- })
514
-
515
- if (res.data.length <= 0) {
516
- this.$showAlert('暂无需要缴费用户!!!', 'warning', 3000)
517
- }
518
-
519
- this.useraddresList = res.data.map(item => {
520
- return {
521
- // 有用户姓名地址后拼接姓名
522
- label: `${item.f_address} ${isEmpty(item.f_user_name) ? '' : '--- ' + item.f_user_name}`,
523
- value: item
524
- }
525
- })
526
-
527
- },
528
- async showChargeModal() {
529
- this.getUserAddress()
530
-
531
- this.charge.f_payment_method = '掌上营业厅'
532
-
533
- this.showCharge = true
534
- },
535
- async search () {
536
- let http = new HttpResetClass()
537
- let data = {
538
- f_process_id: this.selectdata.f_process_id
539
- }
540
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/getApplyChargeRecord`, {data:data}, {
541
- resolveMsg: null,
542
- rejectMsg: '收费记录查询失败!!!'
543
- })
544
- this.model.rows = res.data
545
- },
546
- // 关闭对话框
547
- closeModal () {
548
- this.showCharge = false
549
- this.showInvalid = false
550
- this.showPrint = false
551
- this.charge = {
552
- payment_terms:[{f_payment_term: '',f_charge_money: '',f_amount_words:'',f_payment_method : '掌上营业厅'}]
553
- }
554
- this.search()
555
- },
556
- closeQRCode(){
557
- clearTimeout(this.paymentInterval)
558
- clearTimeout(this.orderInterval)
559
- this.timeLeft = 120
560
- // 清除二维码
561
- this.clearQrCode()
562
- this.showQrCode = false
563
- }
564
- // async getConfig () {
565
- // let http = new HttpResetClass()
566
- // let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/getWeiXinConfig`, null, {
567
- // resolveMsg: null,
568
- // rejectMsg: '获取配置失败!!!'
569
- // })
570
- //
571
- // console.log('==============================')
572
- // console.log(res.data)
573
- //
574
- // this.config = res.data
575
- //
576
- // this.timeLeft = 120
577
- // },
578
- },
579
- events: {
580
- },
581
- computed: {
582
- paymentMethod() {
583
- return this.$appdata.getParam("付款方式")
584
- },
585
- paymentTerm() {
586
- return this.$appdata.getParam("收费项目")
587
- //return [{label: '安装费', value: '安装费'}]
588
- }
589
- },
590
- watch: {
591
- timeLeft () {
592
- if (this.timeLeft <= 0) {
593
- clearTimeout(this.paymentInterval)
594
- clearTimeout(this.orderInterval)
595
-
596
- this.timeLeft = 120
597
-
598
- // 清除二维码
599
- this.clearQrCode()
600
-
601
- this.showQrCode = false
602
-
603
- this.$showMessage('订单支付超时!!!')
604
- }
605
- },
606
- /*'selectdata.showfei' (val){
607
- console.log('---------'+val)
608
- if(val=='收款码'){
609
- this.openQrCode()
610
- }
611
- }*/
612
- }
613
- }
614
- </script>
615
- <style scoped lang="less">
616
- .qrcode {
617
- display: inline-block !important;
618
- margin: 10px 0px;
619
- }
620
- .panel-self{
621
- border-radius: 10px;
622
- border:1px solid #499EDF;
623
- background-color: #F8F8F8;
624
- }
625
- .vertical-center {
626
- display: flex;
627
- align-items: center;
628
- text-align: center;
629
- }
630
- /*清除model中的浮动*/
631
- .clearfix:after,.clearfix:before{
632
- display: table;
633
- }
634
- .clearfix:after{
635
- clear: both;
636
- }
637
- </style>
1
+ <template>
2
+ <div>
3
+ <div class="col-sm-12 col-xs-12 form-group app-btn">
4
+ <button class="btn btn-info" @click.prevent="showChargeModal()">收费</button>
5
+ </div>
6
+ <!--<div class="col-sm-12 col-xs-12">
7
+ <list :model="charge.payment_terms" partial='list'>
8
+ <div partial class="auto app-text panel">
9
+ <div class="panel-body panel-self">
10
+ <div class="row">
11
+ <p class="col-xs-4 text-left font"><b>收费项目</b></p>
12
+ <p class="col-xs-8 text-left input-font">{{ row.f_payment_term }}</p>
13
+ </div>
14
+ <div class="row">
15
+ <p class="col-xs-4 text-left font"><b>收费金额</b></p>
16
+ <p class="col-xs-8 text-left input-font">{{ row.f_charge_money }}</p>
17
+ </div>
18
+ <div class="row">
19
+ <p class="col-xs-4 text-left font"><b>金额大写</b></p>
20
+ <p class="col-xs-8 text-left input-font">{{ row.f_amount_words }}</p>
21
+ </div>
22
+ <div class="row">
23
+ <p class="col-xs-4 text-left font"><b>收费状态</b></p>
24
+ <p class="col-xs-8 text-left input-font">未缴费</p>
25
+ </div>
26
+ </div>
27
+ </div>
28
+ </list>
29
+ </div>-->
30
+ <div class="col-sm-12 col-xs-12">
31
+ <list :model="model" partial='list'>
32
+ <div partial class="auto app-text panel">
33
+ <div class="panel-body panel-self">
34
+ <div class="row" v-if="selectdata.f_apply_type !== '开发商集体报建'">
35
+ <p class="col-xs-4 text-left font"><b>地址</b></p>
36
+ <p class="col-xs-8 text-left input-font">{{ row.f_useraddres }}</p>
37
+ </div>
38
+ <div class="row">
39
+ <p class="col-xs-4 text-left font"><b>缴费编号</b></p>
40
+ <p class="col-xs-8 text-left input-font">{{ row.f_charge_number }}</p>
41
+ </div>
42
+ <div class="row">
43
+ <p class="col-xs-4 text-left font"><b>收费金额</b></p>
44
+ <p class="col-xs-8 text-left input-font">{{ row.f_charge_money }}</p>
45
+ </div>
46
+ <div class="row">
47
+ <p class="col-xs-4 text-left font"><b>金额大写</b></p>
48
+ <p class="col-xs-8 text-left input-font">{{ row.f_amount_words }}</p>
49
+ </div>
50
+ <div class="row">
51
+ <p class="col-xs-4 text-left font"><b>收费项目</b></p>
52
+ <p class="col-xs-8 text-left input-font">{{ row.f_payment_term }}</p>
53
+ </div>
54
+ <div class="row">
55
+ <p class="col-xs-4 text-left font"><b>付款方式</b></p>
56
+ <p class="col-xs-8 text-left input-font">{{ row.f_payment_method }}</p>
57
+ </div>
58
+ <div class="row" v-if="row.f_payment_method === '银行转账'">
59
+ <p class="col-xs-4 text-left font"><b>付款方名称</b></p>
60
+ <p class="col-xs-8 text-left input-font">{{ row.f_payer_name }}</p>
61
+ </div>
62
+ <div class="row" v-if="row.f_payment_method === '银行转账'">
63
+ <p class="col-xs-4 text-left font"><b>付款方账号</b></p>
64
+ <p class="col-xs-8 text-left input-font">{{ row.f_payer_account }}</p>
65
+ </div>
66
+ <div class="row" v-if="row.f_payment_method === '银行转账'">
67
+ <p class="col-xs-4 text-left font"><b>付款流水号</b></p>
68
+ <p class="col-xs-8 text-left input-font">{{ row.f_payer_number }}</p>
69
+ </div>
70
+ <div class="row">
71
+ <p class="col-xs-4 text-left font"><b>收费人员</b></p>
72
+ <p class="col-xs-8 text-left input-font">{{ row.f_charge_collectors }}</p>
73
+ </div>
74
+ <div class="row">
75
+ <p class="col-xs-4 text-left font"><b>收费日期</b></p>
76
+ <p class="col-xs-8 text-left input-font">{{ row.f_charge_date }}</p>
77
+ </div>
78
+ <div class="row">
79
+ <p class="col-xs-4 text-left font"><b>备注</b></p>
80
+ <p class="col-xs-8 text-left input-font">{{ row.f_charge_remarks }}</p>
81
+ </div>
82
+ </div>
83
+ </div>
84
+ </list>
85
+ </div>
86
+
87
+ <modal v-if="showCharge" :show.sync="showCharge" v-ref:modal :large="true" :backdrop="false" title="收费明细">
88
+ <header slot="modal-header" class="modal-header">
89
+ <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
90
+ <h4 class="modal-title">收费明细</h4>
91
+ </header>
92
+ <article slot="modal-body" class="modal-body clearfix">
93
+ <div v-for="(index,payment) in charge.payment_terms">
94
+ <div class="form-group row vertical-center" :class="payment.f_payment_term ? '':'has-error'">
95
+ <label class="col-xs-4 control-label">收费项目:</label>
96
+ <div class="col-xs-8">
97
+ <input-select class="select select_list"
98
+ v-model="payment.f_payment_term"
99
+ :value.sync="payment.f_payment_term"
100
+ :options='paymentTerm'
101
+ :value-single="true"
102
+ close-on-select ></input-select>
103
+ </div>
104
+ </div>
105
+ <div class="form-group row vertical-center" :class="payment.f_charge_money ? '':'has-error'">
106
+ <label class="col-xs-4 control-label">收费金额:</label>
107
+ <div class="col-xs-8">
108
+ <input class="form-control input_view" style="" type="number"
109
+ v-model="payment.f_charge_money"
110
+ @keyup="handleInput(index)"
111
+ @change="moneyChange(index)"
112
+ :readonly="false"/>
113
+ </div>
114
+ </div>
115
+ <div class="form-group row vertical-center">
116
+ <label class="col-xs-4 control-label">金额大写:</label>
117
+ <div class="col-xs-8">
118
+ <input class="form-control input_view" style=""
119
+ v-model="payment.f_amount_words"
120
+ :value="smalltoBIG(0)"
121
+ :readonly="true"/>
122
+ </div>
123
+ </div>
124
+ </div>
125
+ <div class="row" style="display: flex"> <button type="button" style="margin: 0 auto;" class="btn btn-primary" @click.prevent="addPaymentTerms()">增加收费项目</button> </div>
126
+ <div class="form-group row vertical-center">
127
+ <label class="col-xs-4 control-label">应交总金额:</label>
128
+ <div class="col-xs-8">
129
+ <input class="form-control input_view" style=""
130
+ v-model="selectdata.f_due_money"
131
+ :readonly="true"/>
132
+ </div>
133
+ </div>
134
+ <div class="form-group row vertical-center">
135
+ <label class="col-xs-4 control-label">缴费总金额:</label>
136
+ <div class="col-xs-8">
137
+ <input class="form-control input_view" style=""
138
+ v-model="selectdata.f_cumulative_payment_money"
139
+ :readonly="true"/>
140
+ </div>
141
+ </div>
142
+ <div class="form-group row vertical-center">
143
+ <label class="col-xs-4 control-label">未结总金额:</label>
144
+ <div class="col-xs-8">
145
+ <input class="form-control input_view" style=""
146
+ v-model="selectdata.f_surplus_money"
147
+ :readonly="true"/>
148
+ </div>
149
+ </div>
150
+ </article>
151
+ <footer slot="modal-footer" class="modal-footer">
152
+ <button type="button" class="btn btn-primary" @click.prevent="openQrCode()">确认</button>
153
+ </footer>
154
+ </modal>
155
+
156
+ <modal :show.sync="showQrCode" v-ref:qrcodemodal :large="true" :backdrop="false" style="height: 100%">
157
+ <header slot="modal-header" class="modal-header">
158
+ <h4 class="modal-title">微信扫码支付</h4>
159
+ </header>
160
+ <article slot="modal-body" class="modal-body clearfix">
161
+ <div class="text-center">
162
+ <p><b>收费金额:{{ getTotalAmount() }}¥</b></p>
163
+ <p><b>收费项目:{{ getPaymentTerm() }}</b></p>
164
+ <div id="qrcode" class="qrcode" v-ref:qrcode></div>
165
+ <p>
166
+ 等待支付,剩余&ensp;<span style="color: #ff791a">{{timeLeft}}</span>&ensp;秒
167
+ </p>
168
+ <button type="button" @click="closeQRCode">取消支付</button>
169
+ </div>
170
+ </article>
171
+ <footer slot="modal-footer"></footer>
172
+ </modal>
173
+ </div>
174
+ </template>
175
+ <script>
176
+ import * as Util from '../Util'
177
+ import {PagedList} from 'vue-client'
178
+ import {HttpResetClass} from 'vue-client'
179
+ import QRCode from 'qrcodejs2'
180
+ import Vue from "vue";
181
+
182
+ export default {
183
+ title: '收费管理',
184
+ props: {
185
+ selectdata: {
186
+ type: Object
187
+ },
188
+ mark: {
189
+ type: Number,
190
+ default: 0
191
+ }
192
+ },
193
+ data () {
194
+ return {
195
+ showCharge: false, // 收费明细
196
+ showQrCode : false, // 二维码
197
+ model: {
198
+ rows: null
199
+ }, // 记录
200
+ useraddresList: [], // 地址列表
201
+ /*charge: {
202
+
203
+ },*/
204
+ charge: {
205
+ payment_terms:[{f_payment_term: '',f_charge_money: '',f_amount_words:'',f_payment_method : '手机APP'}]
206
+ },
207
+ order: null,
208
+ timeLeft: 120,
209
+ paymentInterval: null,
210
+ orderInterval: null,
211
+ filiale:"",
212
+ config: {
213
+
214
+ }
215
+ }
216
+ },
217
+ ready () {
218
+ this.search()
219
+ if (Vue.user.orgid == '10101') {
220
+ console.log('zhoukou')
221
+ this.filiale = 'zhoukou'
222
+ }else if (Vue.user.orgid == '35520') {
223
+ console.log('xiangcheng')
224
+ this.filiale = 'xiangcheng'
225
+ }else if (Vue.user.orgid == '35532') {
226
+ console.log('luyi')
227
+ this.filiale = 'luyi'
228
+ }else if (Vue.user.orgid == '35538') {
229
+ console.log('dancheng')
230
+ this.filiale = 'dancheng'
231
+ }else if (Vue.user.orgid == '35526') {
232
+ console.log('xihua')
233
+ this.filiale = 'xihua'
234
+ }else {
235
+ this.$showMessage('分公司异常,请联系管理员!')
236
+ }
237
+ },
238
+ methods: {
239
+ addPaymentTerms(){
240
+ this.charge.payment_terms.push({f_payment_term: '',f_charge_money: '',f_payment_method : '掌上营业厅'})
241
+ },
242
+ // 新增收费
243
+ async saveCharge() {
244
+ let http = new HttpResetClass()
245
+ let data = {
246
+ apply: this.selectdata,
247
+ charge: this.charge,
248
+ user: Vue.user,
249
+ f_out_trade_no:this.order.f_out_trade_no
250
+ }
251
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/appaddApplyChargeRecord`, {data:data}, {
252
+ resolveMsg: null,
253
+ rejectMsg: '缴费失败!!!'
254
+ })
255
+ this.selectdata = res.data
256
+
257
+ this.$dispatch('breakControl')
258
+ },
259
+ // 获取订单信息
260
+ async getOrderInformation () {
261
+ // 查询订单信息
262
+ console.log('查询订单信息!!!')
263
+ // let data = {
264
+ // out_trade_no: this.order.out_trade_no,
265
+ // filiale: this.config[Vue.user.number]
266
+ // }
267
+ // 查询订单状态
268
+
269
+ let http = new HttpResetClass()
270
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/tel_singleTable_OrderBy`, {
271
+ data: {
272
+ items: "id",
273
+ tablename: "t_weixinreturnxml",
274
+ condition: ` f_out_trade_no = '${this.order.f_out_trade_no}' and f_bill_state = 1 `,
275
+ orderitem: "id"
276
+ }
277
+ }, {
278
+ resolveMsg: null,
279
+ rejectMsg: '订单查询失败!!!'
280
+ })
281
+ console.log('8888888888')
282
+ console.log(this.order.f_out_trade_no)
283
+ console.log(JSON.stringify(res))
284
+ // 支付成功
285
+ if (res.data.length > 0) {
286
+ this.$showMessage('支付成功!!!')
287
+ clearTimeout(this.paymentInterval)
288
+ clearTimeout(this.orderInterval)
289
+ this.timeLeft = 10
290
+ // 清除二维码
291
+ this.clearQrCode()
292
+ this.showQrCode = false
293
+
294
+ this.saveCharge()
295
+ }
296
+ },
297
+ checkApplyModel(){
298
+ console.log(this.charge.payment_terms)
299
+ if (Number(this.getTotalAmount()) != Number(this.selectdata.f_surplus_money)) {
300
+ this.$showAlert('本次收费金额必须和未交总金额一致!!!', 'warning', 3000)
301
+ //this.charge.f_charge_money = null
302
+ return
303
+ }
304
+
305
+ for(let row = 0;row<this.charge.payment_terms.length; row++){
306
+ console.log(this.charge.payment_terms[row])
307
+ if (isEmpty(this.charge.payment_terms[row].f_payment_term)) {
308
+ console.log(1111)
309
+ this.$showAlert('请选择收费项目!!!', 'warning', 3000)
310
+ return
311
+ }else if (isEmpty(this.charge.payment_terms[row].f_charge_money)) {
312
+ console.log(2222)
313
+ this.$showAlert('请输入收费金额!!!', 'warning', 3000)
314
+ return
315
+ }
316
+ }
317
+ this.showCharge=false
318
+ this.$dispatch('changeShowfei','待付款')
319
+ },
320
+ // 打开二维码
321
+ async openQrCode () {
322
+ console.log(this.charge.payment_terms)
323
+ if (Number(this.getTotalAmount()) != Number(this.selectdata.f_surplus_money)) {
324
+ this.$showAlert('本次收费金额必须和未交总金额一致!!!', 'warning', 3000)
325
+ //this.charge.f_charge_money = null
326
+ return
327
+ }
328
+
329
+ for(let row = 0;row<this.charge.payment_terms.length; row++){
330
+ console.log(this.charge.payment_terms[row])
331
+ if (isEmpty(this.charge.payment_terms[row].f_payment_term)) {
332
+ console.log(1111)
333
+ this.$showAlert('请选择收费项目!!!', 'warning', 3000)
334
+ return
335
+ }else if (isEmpty(this.charge.payment_terms[row].f_charge_money)) {
336
+ console.log(2222)
337
+ this.$showAlert('请输入收费金额!!!', 'warning', 3000)
338
+ return
339
+ }
340
+ }
341
+ this.showCharge=false
342
+ //this.$dispatch('changeShowfei','待付款')
343
+ //this.saveCharge()
344
+ let http = new HttpResetClass()
345
+ // 接口金额 单位为:分
346
+ let data = {
347
+ money: this.accMul(this.getTotalAmount() ,100),
348
+ attach: {
349
+ "f_type": '报建收费',
350
+ "f_user": Vue.user.id
351
+ },
352
+ str: this.getPaymentTerm(),
353
+ config: this.filiale,
354
+ f_revenue: "productV3"
355
+ }
356
+ console.log('下单信息')
357
+ console.log(JSON.stringify(data))
358
+ // 下订单
359
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/ICBCGetCode`, data, {
360
+ resolveMsg: null,
361
+ rejectMsg: '订单生成失败!!!'
362
+ })
363
+ console.log('=================================')
364
+ console.log(JSON.stringify(res.data))
365
+ this.order = res.data
366
+ let info = {
367
+ apply: this.selectdata,
368
+ charge: this.charge,
369
+ user: Vue.user,
370
+ f_out_trade_no:this.order.f_out_trade_no
371
+ }
372
+ http.load('POST',`${this.$androidUtil.getProxyUrl()}/rs/logic/beforeAddChargeRecord`,{data:info},{
373
+ resolveMsg: null,
374
+ rejectMsg: null
375
+ }).then(ress=>{
376
+ console.log('ress',ress)
377
+ if(ress.data.code == '200'){
378
+ this.showQrCode = true
379
+ this.$nextTick(()=>{
380
+ this.qrcode()
381
+ })
382
+ // 剩余支付时间
383
+ this.paymentInterval = setInterval(() => {
384
+ this.timeLeft = this.timeLeft - 1
385
+ },1000)
386
+
387
+ // 3秒查询一次订单支付信息
388
+ this.orderInterval = setInterval(() => {
389
+ this.getOrderInformation()
390
+ },3000)
391
+ }else{
392
+ this.$showMessage('订单生成失败')
393
+ }
394
+ })
395
+
396
+
397
+ },
398
+ accMul(arg1,arg2) {
399
+ let m = 0, s1 = arg1.toString(), s2 = arg2.toString();
400
+ try {
401
+ m += s1.split(".")[1].length
402
+ } catch (e) {
403
+ }
404
+ try {
405
+ m += s2.split(".")[1].length
406
+ } catch (e) {
407
+ }
408
+ return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m)
409
+ },
410
+ getTotalAmount(){
411
+ let money=0
412
+ this.charge.payment_terms.forEach((row)=>{
413
+ money = Math.floor((Number(money)+Number(row.f_charge_money)) * 100) / 100
414
+ })
415
+ return money
416
+ },
417
+ getPaymentTerm(){
418
+ let term=''
419
+ this.charge.payment_terms.forEach((row)=>{
420
+ term += `${row.f_payment_term} `
421
+ })
422
+ return term
423
+ },
424
+ qrcode () {
425
+ let qrcode = new QRCode('qrcode',{
426
+ text: this.order.url, // 设置二维码内容或跳转地址
427
+ width: 200, // 设置宽度,单位像素
428
+ height: 200, // 设置高度,单位像素
429
+ correctLevel: QRCode.CorrectLevel.L //容错率,L/M/Hs
430
+ })
431
+ },
432
+ clearQrCode () {
433
+ document.getElementById('qrcode').innerHTML = ''
434
+ },
435
+ moneyChange (index) {
436
+ console.log(`当前下标----${index}`)
437
+ if (isEmpty(this.charge.payment_terms[index].f_charge_money) || Number(this.charge.payment_terms[index].f_charge_money) === 0) {
438
+ this.$showAlert('单笔收费不能为0元!!!', 'warning', 3000)
439
+ this.charge.payment_terms[index].f_charge_money = null
440
+ return
441
+ }
442
+
443
+ },
444
+ /*moneyChange () {
445
+ if (isEmpty(this.charge.f_charge_money) || Number(this.charge.f_charge_money) === 0) {
446
+ this.$showAlert('单笔收费不能为0元!!!', 'warning', 3000)
447
+ this.charge.f_charge_money = null
448
+ return
449
+ }
450
+ if (this.selectdata.f_apply_type === '散户集体报建' && Number(this.charge.f_charge_money) > Number(this.charge.f_outstanding_amount)) {
451
+ this.$showAlert('单笔收费不能超过未交金额!!!', 'warning', 3000)
452
+ this.charge.f_charge_money = null
453
+ return
454
+ }
455
+ if (Number(this.charge.f_charge_money) > Number(this.selectdata.f_surplus_money)) {
456
+ this.$showAlert('单笔收费不能超过未交总金额!!!', 'warning', 3000)
457
+ this.charge.f_charge_money = null
458
+ return
459
+ }
460
+ },*/
461
+ // 金额转大写
462
+ handleInput(index) {
463
+ // 通过正则过滤小数点后两位
464
+ console.log('-----------------------')
465
+ this.charge.payment_terms[index].f_charge_money = (this.charge.payment_terms[index].f_charge_money.match(/^\d*(\.?\d{0,2})/g)[0]) || null
466
+ this.charge.payment_terms[index].f_amount_words = this.smalltoBIG( this.charge.payment_terms[index].f_charge_money)
467
+ },
468
+ // 金额转大写
469
+ smalltoBIG(n) {
470
+ let fraction = ['角', '分'];
471
+ let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
472
+ let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
473
+ let head = n < 0 ? '欠' : '';
474
+ n = Math.abs(n);
475
+
476
+ let s = '';
477
+
478
+ for (var i = 0; i < fraction.length; i++) {
479
+ s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
480
+ }
481
+ s = s || '整';
482
+ n = Math.floor(n);
483
+
484
+ for (var i = 0; i < unit[0].length && n > 0; i++) {
485
+ let p = '';
486
+ for (var j = 0; j < unit[1].length && n > 0; j++) {
487
+ p = digit[n % 10] + unit[1][j] + p;
488
+ n = Math.floor(n / 10);
489
+ }
490
+ s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
491
+ }
492
+ return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
493
+ },
494
+ async getUserAddress() {
495
+ let http = new HttpResetClass()
496
+ let data = {}
497
+ let url = null
498
+ if (this.selectdata.f_apply_type === '改管报建' || this.selectdata.f_apply_type === '增容报建' || this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建') {
499
+ data = {
500
+ condition: `ui.f_userinfo_id = ${this.selectdata.f_userinfo_id}`
501
+ }
502
+ url = `${this.$androidUtil.getProxyUrl()}/rs/sql/applyGetUserinfos`
503
+ } else {
504
+ data = {
505
+ condition: this.selectdata.f_apply_type === '散户集体报建' ? `nvl(cr.f_cumulative_payment_money, 0) < ${this.selectdata.f_price}` : '1=1',
506
+ f_process_id: this.selectdata.f_process_id
507
+ }
508
+ url = `${this.$androidUtil.getProxyUrl()}/rs/sql/getAddresAndCumulativePayment`
509
+ }
510
+ let res = await http.load('POST', url, {data:data}, {
511
+ resolveMsg: null,
512
+ rejectMsg: '用户获取失败!!!'
513
+ })
514
+
515
+ if (res.data.length <= 0) {
516
+ this.$showAlert('暂无需要缴费用户!!!', 'warning', 3000)
517
+ }
518
+
519
+ this.useraddresList = res.data.map(item => {
520
+ return {
521
+ // 有用户姓名地址后拼接姓名
522
+ label: `${item.f_address} ${isEmpty(item.f_user_name) ? '' : '--- ' + item.f_user_name}`,
523
+ value: item
524
+ }
525
+ })
526
+
527
+ },
528
+ async showChargeModal() {
529
+ this.getUserAddress()
530
+
531
+ this.charge.f_payment_method = '掌上营业厅'
532
+
533
+ this.showCharge = true
534
+ },
535
+ async search () {
536
+ let http = new HttpResetClass()
537
+ let data = {
538
+ f_process_id: this.selectdata.f_process_id
539
+ }
540
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/getApplyChargeRecord`, {data:data}, {
541
+ resolveMsg: null,
542
+ rejectMsg: '收费记录查询失败!!!'
543
+ })
544
+ this.model.rows = res.data
545
+ },
546
+ // 关闭对话框
547
+ closeModal () {
548
+ this.showCharge = false
549
+ this.showInvalid = false
550
+ this.showPrint = false
551
+ this.charge = {
552
+ payment_terms:[{f_payment_term: '',f_charge_money: '',f_amount_words:'',f_payment_method : '掌上营业厅'}]
553
+ }
554
+ this.search()
555
+ },
556
+ closeQRCode(){
557
+ clearTimeout(this.paymentInterval)
558
+ clearTimeout(this.orderInterval)
559
+ this.timeLeft = 120
560
+ // 清除二维码
561
+ this.clearQrCode()
562
+ this.showQrCode = false
563
+ }
564
+ // async getConfig () {
565
+ // let http = new HttpResetClass()
566
+ // let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/getWeiXinConfig`, null, {
567
+ // resolveMsg: null,
568
+ // rejectMsg: '获取配置失败!!!'
569
+ // })
570
+ //
571
+ // console.log('==============================')
572
+ // console.log(res.data)
573
+ //
574
+ // this.config = res.data
575
+ //
576
+ // this.timeLeft = 120
577
+ // },
578
+ },
579
+ events: {
580
+ },
581
+ computed: {
582
+ paymentMethod() {
583
+ return this.$appdata.getParam("付款方式")
584
+ },
585
+ paymentTerm() {
586
+ return this.$appdata.getParam("收费项目")
587
+ //return [{label: '安装费', value: '安装费'}]
588
+ }
589
+ },
590
+ watch: {
591
+ timeLeft () {
592
+ if (this.timeLeft <= 0) {
593
+ clearTimeout(this.paymentInterval)
594
+ clearTimeout(this.orderInterval)
595
+
596
+ this.timeLeft = 120
597
+
598
+ // 清除二维码
599
+ this.clearQrCode()
600
+
601
+ this.showQrCode = false
602
+
603
+ this.$showMessage('订单支付超时!!!')
604
+ }
605
+ },
606
+ /*'selectdata.showfei' (val){
607
+ console.log('---------'+val)
608
+ if(val=='收款码'){
609
+ this.openQrCode()
610
+ }
611
+ }*/
612
+ }
613
+ }
614
+ </script>
615
+ <style scoped lang="less">
616
+ .qrcode {
617
+ display: inline-block !important;
618
+ margin: 10px 0px;
619
+ }
620
+ .panel-self{
621
+ border-radius: 10px;
622
+ border:1px solid #499EDF;
623
+ background-color: #F8F8F8;
624
+ }
625
+ .vertical-center {
626
+ display: flex;
627
+ align-items: center;
628
+ text-align: center;
629
+ }
630
+ /*清除model中的浮动*/
631
+ .clearfix:after,.clearfix:before{
632
+ display: table;
633
+ }
634
+ .clearfix:after{
635
+ clear: both;
636
+ }
637
+ </style>