sale-client 3.6.480 → 3.6.481

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.
@@ -1,2 +1,2 @@
1
- #Mon Jul 08 09:48:59 CST 2024
1
+ #Wed Jan 22 10:06:39 CST 2025
2
2
  gradle.version=5.2.1
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.6.480",
3
+ "version": "3.6.481",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -346,6 +346,7 @@
346
346
  }
347
347
  },
348
348
  methods: {
349
+
349
350
  setTypeprice (val, row) {
350
351
  console.log('f_typenumber', this.f_typenumber)
351
352
  if (this.f_typenumber !== ' ') {
@@ -398,6 +399,21 @@
398
399
  await this.$resetpost('rs/logic/sale_othercharge_logic_nopay', data, {resolveMsg: '生成其他欠费成功', rejectMsg: '生成其他欠费失败'})
399
400
  this.$dispatch('success')
400
401
  },
402
+ getBusinessData () {
403
+ if (this.model.f_print[0] === '电子发票') {
404
+ if (!this.row.f_taxpayer_id) {
405
+ this.row.f_taxpayer_id = this.row.f_idnumber
406
+ }
407
+ if (!this.row.f_paper_name) {
408
+ this.row.f_paper_name = this.row.f_user_name
409
+ }
410
+ if (!this.row.f_address_phone) {
411
+ this.row.f_address_phone = this.row.f_address + ' ' + this.row.f_user_phone
412
+ }
413
+ this.eticket_msg = true
414
+ }
415
+ return this.$LogicService.otherChargeData(this.model, this.row)
416
+ },
401
417
  // 校验发票信息
402
418
  checkInvoiceMsg () {
403
419
  if (this.model.f_print[0] === '电子发票') {
@@ -0,0 +1,167 @@
1
+ <template>
2
+ <div id='PaymentCode'>
3
+ <modal :show.sync="paymentCodeShow" backdrop="false">
4
+ <header slot="modal-header" class="modal-header">
5
+ <h4 class="modal-title">请扫描用户付款码</h4>
6
+ </header>
7
+ <article slot="modal-body" class="modal-body">
8
+ <div class="form-horizontal">
9
+ <div class="form-group">
10
+ <input type="text" class="form-control" id="paycode" @keyup.enter="ConfirmCode" @blur="paycodefocus"
11
+ v-model="paymentCode" placeholder="请扫描用户付款码" v-el:paycode>
12
+ </div>
13
+ </div>
14
+ </article>
15
+ <footer slot="modal-footer" class="modal-footer">
16
+ <button type="button" class="btn btn-default" @click='closeCode'>取消</button>
17
+ </footer>
18
+ </modal>
19
+ </div>
20
+ </template>
21
+
22
+ <script>
23
+ export default {
24
+ name: 'PaymentCode',
25
+ props: {
26
+ // 付款方式
27
+ payment: {},
28
+ // 业务类型
29
+ type: {},
30
+ // 用户信息
31
+ row: {},
32
+ // 付款金额
33
+ money: {}
34
+ },
35
+ data () {
36
+ return {
37
+ // 付款码弹框显示
38
+ paymentCodeShow: false,
39
+ // 付款码值
40
+ paymentCode: null,
41
+ // 付款码流程控制
42
+ paycoderesolve: null,
43
+ // 付款码返回数据
44
+ paymentCodeReturnData: {},
45
+ // 定时器
46
+ timer: null,
47
+ // 收费成功id
48
+ sellinggasId: null,
49
+ canPayment: this.$appdata.getSingleValue('微信支付付款方式') ? this.$appdata.getSingleValue('微信支付付款方式') : '',
50
+ }
51
+ },
52
+ created () {
53
+ },
54
+ ready () {
55
+ },
56
+ methods: {
57
+ // 返回结果为true意味着可以通行
58
+ flowPath () {
59
+ return new Promise((resolve) => {
60
+ this.paycoderesolve = resolve
61
+ // 如果是付款码支付则显示界面扫用户付款码收钱
62
+ if (this.canPayment.indexOf(this.payment.toString()) !== -1 || this.payment.toString().indexOf('&') !== -1) {
63
+ this.paymentCodeShow = true
64
+ this.paycodefocus()
65
+ } else {
66
+ this.paycoderesolve({msg: '不是付款码支付', result: true})
67
+ }
68
+ })
69
+ },
70
+ // 付款码框获得焦点
71
+ paycodefocus () {
72
+ this.$nextTick(() => {
73
+ this.$els.paycode.focus()
74
+ })
75
+ },
76
+ // 付款码支付流程
77
+ async ConfirmCode () {
78
+ // 扫完一次码之后失去焦点,避免重复扫码
79
+ this.paymentCodeShow = false
80
+ let data = {
81
+ f_userinfo_id: this.row ? this.row.f_userinfo_id : null,
82
+ type: this.type ? this.type : '燃气费',
83
+ f_operatorid: this.$login.f.id,
84
+ f_operator: this.$login.f.name,
85
+ f_user_id: this.row ? this.row.f_user_id : null,
86
+ f_userfiles_id: this.row ? this.row.f_userfiles_id : null,
87
+ money: this.money,
88
+ f_payment: this.payment,
89
+ auth_code: this.paymentCode,
90
+ filiale: this.$login.f.orgid,
91
+ body: this.$login.f.orgs
92
+ }
93
+ if (this.type === '其他收费') {
94
+ data.f_details = this.$parent.getBusinessData()
95
+ }
96
+ let res = await this.$resetpost('rs/logic/WeiXinPay', data, {resolveMsg: null, rejectMsg: '服务器内部出错,'})
97
+ this.paymentCodeReturnData = res = res.data
98
+ if (res.result_msg == '支付确认成功') {
99
+ this.paycoderesolve({msg: '支付完成', result: true})
100
+ this.$closeAlert()
101
+ } else if (res.result_msg == '支付结果未知') {
102
+ // 支付结果未知, 根据商户订单号继续查询
103
+ this.$showAlert(`正在查询用户付款状态,请勿进行任何操作,耐心等待,如长时间未响应可手动取消`, 'warning')
104
+ let self = this
105
+ // 启动定时器之前先关闭定时器,防止之前的定时器未关闭
106
+ if (this.timer) {
107
+ this.closeTimer()
108
+ }
109
+ let times = 1
110
+ this.timer = setInterval(async () => {
111
+ times++
112
+ let res1 = await self.$resetpost('rs/logic/WeiXinPayStatus', res, {resolveMsg: null, rejectMsg: '付款码支付查询出错,'})
113
+ this.paymentCodeReturnData = res1.data
114
+ res1 = res1.data
115
+ // 支付成功关闭定时器
116
+ if (res1.result_msg == '支付确认成功') {
117
+ self.paycoderesolve({msg: '支付完成', result: true})
118
+ self.closeTimer()
119
+ return
120
+ }
121
+ if (res1.result_msg == '支付失败') {
122
+ this.$showAlert(`支付失败, 请提醒用户重新付款`, 'danger')
123
+ this.closeTimer()
124
+ return
125
+ }
126
+ if (times > 24) {
127
+ self.$showAlert(`多次查询未成功,请重新扫描用户付款码`, 'danger')
128
+ self.closeTimer()
129
+ }
130
+
131
+ }, 5000)
132
+ } else {
133
+ this.$showAlert(`${res.result_msg}, 请重新扫描用户付款码`, 'danger')
134
+ }
135
+ // 清空付款码
136
+ this.paymentCode = ''
137
+ },
138
+ // 付款成功更新收费记录订单号
139
+ async updateSellinggas () {
140
+ if (this.payment.toString().indexOf('&') !== -1) {
141
+ let sqldata = `update t_sellinggas set f_serial_id = '${this.paymentCodeReturnData.f_out_trade_no}' where id = '${this.sellinggasId}'`
142
+ await this.$resetpost('rs/logic/runSQL', {data: {sql: sqldata}}, {resolveMsg: null, rejectMsg: '更新收费记录订单号失败'})
143
+ }
144
+ },
145
+ // 关闭定时器
146
+ closeTimer () {
147
+ console.log('关闭定时器')
148
+ clearInterval(this.timer)
149
+ this.timer = null
150
+ },
151
+ closeCode () {
152
+ this.$showMessage('取消后无法继续收款,确定取消吗?', ['confirm', 'cancel']).then((res) => {
153
+ if (res == 'confirm') {
154
+ this.paymentCodeShow = false
155
+ this.$closeAlert()
156
+ this.paycoderesolve({msg: '支付取消', result: false})
157
+ this.closeTimer()
158
+ }
159
+ })
160
+ }
161
+ }
162
+ }
163
+ </script>
164
+
165
+ <style lang="less">
166
+
167
+ </style>
@@ -117,4 +117,6 @@ export default function () {
117
117
  Vue.component('message-report', (resolve) => { require(['./revenue/sms/MessageReport.vue'], resolve) })
118
118
  // 账单推送
119
119
  Vue.component('account-message-list', (resolve) => { require(['./revenue/sms/AccountMessageList.vue'], resolve) })
120
+ // 付款码支付
121
+ Vue.component('payment-code', (resolve) => { require(['./PaymentCode.vue'], resolve) })
120
122
  }
@@ -99,10 +99,10 @@ let LogicService = {
99
99
  f_serial_number: model.f_serial_number,
100
100
  f_userfiles_id: row.f_userfiles_id,
101
101
  f_user_id: row.f_user_id,
102
- f_user_name:row.f_user_name,
103
- f_address:row.f_address,
104
- f_user_type:row.f_user_type,
105
- f_gasproperties:row.f_gasproperties,
102
+ f_user_name: row.f_user_name,
103
+ f_address: row.f_address,
104
+ f_user_type: row.f_user_type,
105
+ f_gasproperties: row.f_gasproperties,
106
106
  // f_number: model.f_number,
107
107
  // f_unitprice: model.f_unitprice,
108
108
  f_collection: model.f_collection,
@@ -132,6 +132,47 @@ let LogicService = {
132
132
  }
133
133
  return Vue.resetpost('rs/logic/sale_othercharge_logic', data, {resolveMsg: '其他收费成功', rejectMsg: '其他收费失败'})
134
134
  },
135
+ otherChargeData (model, row) {
136
+ let data = {
137
+ f_time_date: model.f_time_date,
138
+ f_serial_id: model.f_serial_id,
139
+ record_userinfo: row.f_userinfo_id,
140
+ f_serial_number: model.f_serial_number,
141
+ f_userfiles_id: row.f_userfiles_id,
142
+ f_user_id: row.f_user_id,
143
+ f_user_name: row.f_user_name,
144
+ f_address: row.f_address,
145
+ f_user_type: row.f_user_type,
146
+ f_gasproperties: row.f_gasproperties,
147
+ // f_number: model.f_number,
148
+ // f_unitprice: model.f_unitprice,
149
+ f_collection: model.f_collection,
150
+ f_comments: model.f_comments,
151
+ f_payment: model.f_payment[0],
152
+ f_voucher_number: model.f_voucher_number,
153
+ f_bill_style: model.f_print[0],
154
+ // f_brand_spec: model.f_brand_spec[0],
155
+ f_userinfo_id: row.f_userinfo_id,
156
+ f_service_person: model.f_service_person[0],
157
+ f_operat_type: '其他收费',
158
+ f_describe: `${Vue.$login.f.name}对客户${row.f_user_name}进行其他收费操作`,
159
+ f_state: '有效',
160
+ f_operator: Vue.$login.f.name,
161
+ f_operatorid: Vue.$login.f.id,
162
+ f_orgid: Vue.$login.f.orgid,
163
+ f_orgname: Vue.$login.f.orgs,
164
+ f_depid: Vue.$login.f.depids,
165
+ f_depname: Vue.$login.f.deps,
166
+ f_zoneid: Vue.$login.f.zoneid,
167
+ f_zones: Vue.$login.f.zones,
168
+ // 其他费用信息
169
+ t_userfees: model.t_userfees,
170
+ f_fee_type: model.f_fee_type[0],
171
+ f_fee_time: model.f_fee_time[0],
172
+ otherdetail: model.otherdetail
173
+ }
174
+ return data
175
+ },
135
176
  otherChargeByPay (model, row) {
136
177
  let data = {
137
178
  f_serial_id: model.f_serial_id,
File without changes
File without changes