sale-client 4.1.21 → 4.1.23

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": "sale-client",
3
- "version": "4.1.21",
3
+ "version": "4.1.23",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -0,0 +1,531 @@
1
+ <template>
2
+ <div class="flex-row">
3
+ <div class="span" style="overflow-y: auto;">
4
+ <validator name='v'>
5
+ <form novalidate class="form-horizontal">
6
+ <div class="row">
7
+ <div class="col-sm-4">
8
+ <label for="f_paytype" class=" font_normal_body" title="参数名称:付款方式">收款方式</label>
9
+ <v-select id="f_payment"
10
+ v-model="f_payment"
11
+ placeholder='请选择'
12
+ :value.sync="model.f_payment"
13
+ :options='paytype'
14
+ close-on-select clear-button></v-select>
15
+ </div>
16
+ <div class="col-sm-4"
17
+ :class="[$v.f_pregas.required || $v.f_pregas.dctest? 'has-error' : 'has-success']">
18
+ <label for="f_pregas" class=" font_normal_body">预购气量</label>
19
+ <input class="input_search" style="width:60%" type="number"
20
+ @blur="pregas()" v-model="model.f_pregas" id="fpregas"
21
+ v-validate:f_pregas='{required: true, dctest: [maxgas, "<=" ]}' placeholder="预购气量"
22
+ v-next-el='sk' >
23
+ </div>
24
+ <!-- <div class="col-sm-4" v-if="row.f_collection_type == '按金额'">
25
+ <label for="f_pregas" class=" font_normal_body">预购气量</label>
26
+ <input class="input_search" style="width:60%" type="number"
27
+ @blur="pregas()" v-model="model.f_pregas" placeholder="预购气量"
28
+ v-next-el='sk' disabled>
29
+ </div>-->
30
+
31
+ <div class="col-sm-4">
32
+ <label for="f_preamount" class=" font_normal_body">预购金额</label>
33
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_preamount"
34
+ v-validate:f_preamount='{required: true, dctest: [maxmoney, "<=" ] }'
35
+ v-scale="[model.f_preamount, 4]" placeholder="预购金额" disabled>
36
+ </div>
37
+ </div>
38
+ <div class="row" style="margin-top:6px;">
39
+
40
+ <div class="col-sm-4">
41
+ <label for="f_print" class="font_normal_body">打印格式</label>
42
+ <v-select id="print"
43
+ v-model="f_print"
44
+ placeholder='请选择'
45
+ :multiple="mulPrint"
46
+ :value.sync="model.f_print"
47
+ :options='printstyle'
48
+ close-on-select clear-button></v-select>
49
+ </div>
50
+ <div class="col-sm-4" v-if="hasLimit&&limitgas">
51
+ <label class="font_normal_body">购气上限</label>
52
+ <input class="input_search" style="width:60%" style="width:60%" type="number" v-model="maxgas"
53
+ v-scale="[maxgas, 2]" placeholder='限购余气' disabled>
54
+ </div>
55
+ <div class="col-sm-4 form-group" v-if="hasLimit&&limitmoney">
56
+ <label class="font_normal_body">金额上限</label>
57
+ <input class="input_search" style="width:60%" style="width:60%" type="number" v-model="maxmoney"
58
+ v-scale="[maxmoney, 2]" placeholder='限购金额' disabled>
59
+ </div>
60
+ <div class="col-sm-4" v-if="!hasLimit">
61
+ </div>
62
+
63
+ <div class="col-sm-4"
64
+ :class="[$v.f_totalcost.required || $v.f_totalcost.dctest ? 'has-error' : 'has-success']">
65
+ <label for="f_temp_amount" v-if="row.f_collection_type === '按气量'"
66
+ class=" font_normal_body">应收金额</label>
67
+ <label for="f_temp_amount" v-if="row.f_collection_type === '按金额'"
68
+ class=" font_normal_body">本次缴费</label>
69
+ <input class="input_search" style="width:60%" type="number"
70
+ @blur="preamount()" v-model="model.f_totalcost"
71
+ v-validate:f_totalcost='{required: true, dctest: [0, ">=" ] }' placeholder="应收金额"
72
+ v-next-el='sk' v-scale="[model.f_totalcost, 4]" >
73
+ </div>
74
+ </div>
75
+ <div class="row">
76
+ <div class="col-sm-4">
77
+ <label for="f_balance" class="font_normal_body">上期结余</label>
78
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_balance"
79
+ v-scale="[model.f_balance, 4]" placeholder="上期结余" disabled>
80
+ </div>
81
+ <div class="col-sm-4">
82
+ <label for="f_curbalance" class="font_normal_body">本期结余</label>
83
+ <input class="input_search" style="width:60%" type="number" v-model="curbalance"
84
+ v-scale="[model.f_curbalance, 4]" placeholder="本期结余" disabled>
85
+ </div>
86
+
87
+ <div class="col-sm-4" v-if="row.f_collection_type === '按气量'"
88
+ :class="[$v.f_collection.required ? 'has-error' : 'has-success']">
89
+ <label for="f_collection" class=" font_normal_body">&nbsp;&nbsp;&nbsp;收款&nbsp;&nbsp;&nbsp;</label>
90
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_collection"
91
+ @blur="config.calculatePreByCollection && calculatePreByCollection()"
92
+ v-validate:f_collection='{required: true, dctest: [model.f_totalcost, ">=" ] }'
93
+ v-el:sk v-scale="[model.f_totalcost, 2]">
94
+ </div>
95
+ <div class="col-sm-4" v-if="row.f_collection_type === '按金额'">
96
+ <label for="f_collection" class=" font_normal_body">&nbsp;&nbsp;&nbsp;收款&nbsp;&nbsp;&nbsp;</label>
97
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_collection"
98
+ @blur="config.calculatePreByCollection && calculatePreByCollection()"
99
+ v-el:sk v-scale="[model.f_collection, 4]" >
100
+ </div>
101
+ </div>
102
+ <div class="row" style="margin-top:5px;">
103
+ <div class="col-sm-4" v-if="!mjshow" >
104
+ <label for="f_serial_number" class=" font_normal_body">业务单号</label>
105
+ <input class="input_search" style="width:60%" type="text"
106
+ v-model="model.f_serial_number" placeholder="业务单号">
107
+ </div>
108
+ <div class="col-sm-4" v-if="mjshow" :class="[$v.f_serial_number.required || $v.f_serial_number.dctest ? 'has-error' : 'has-success']">
109
+ <label for="f_serial_number" class=" font_normal_body">业务单号</label>
110
+ <input class="input_search" style="width:60%" type="text" v-validate:f_serial_number='{required: true }'
111
+ v-model="model.f_serial_number" placeholder="业务单号">
112
+ </div>
113
+ <div class="col-sm-4">
114
+ <label for="f_write_card" style="color: red" class=" font_normal_body">是否写卡</label>
115
+ <v-select id="f_write_card"
116
+ v-model="model.f_write_card"
117
+ placeholder='是否写卡'
118
+ value-single
119
+ :value.sync="model.f_write_card"
120
+ :options='writecard'
121
+ close-on-select clear-button></v-select>
122
+ </div>
123
+ </div>
124
+ <div class="row" style="margin-top:5px;">
125
+ <div class="col-sm-9">
126
+ </div>
127
+ <div class="col-sm-3">
128
+ <span v-if="$v.f_collection.dctest" style="color:red ">收款不能小于应收金额</span>
129
+ </div>
130
+ </div>
131
+ <div class="row" v-if="model.f_payment[0].includes('POS')">
132
+ <div class="col-sm-4">
133
+ <label for="f_voucher_number" class="font_normal_body">凭证号</label>
134
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_voucher_number" placeholder="凭证号">
135
+ </div>
136
+ </div>
137
+ <div class="row" v-if="!config.notShowFormula">
138
+ <div class="col-sm-4 col-sm-offset-8">
139
+ <strong>计算公式:{{calculatedetail ? calculatedetail : ' 暂无'}}</strong>
140
+ </div>
141
+ </div>
142
+ <div class="row">
143
+ <div class="col-sm-5" v-if="row.f_collection_type === '按气量'">
144
+ <strong style="color:blue">温馨提示: 此气表品牌是按气量收费!!</strong>
145
+ </div>
146
+ <div class="col-sm-4" v-if="row.f_collection_type === '按金额'">
147
+ <strong style="color:blue">温馨提示: 此气表品牌是按金额收费!!</strong>
148
+ </div>
149
+ </div>
150
+ </form>
151
+ <print-bill :show="print" :bill-config='config' v-ref:printbill :bill-data='billData' :data='row'
152
+ v-on:toggle="close" @printok="printok" :data='row'></print-bill>
153
+ <div style="text-align:right;height: 25%;">
154
+ <payment-code-button :clickable="!$v.valid || clickConfirm"
155
+ :payment.sync="model.f_payment" :payment-data="paytype"
156
+ @confirm-payment="confirm()">
157
+ </payment-code-button>
158
+ <button class="button_search btn-gn" @click="confirm()" :disabled='!$v.valid || clickConfirm'>确认</button>
159
+ <button class="button_clear btn-gn" @click="clean()">取消</button>
160
+ </div>
161
+ </validator>
162
+ <payment-code v-ref:paymentcode :payment="model.f_payment" :row="row" :money="model.f_collection"></payment-code>
163
+ <upload :blodid="row.f_userinfo_id" v-if="config.showupload" :businessid="randomBusinessId" isremark="true" fusetype="无卡收费"></upload>
164
+ </div>
165
+ </div>
166
+ </template>
167
+ <script>
168
+ /**
169
+ *综合业务
170
+ *卡表收费组件
171
+ */
172
+
173
+ // 输入金额,换算气量
174
+ let preamountGen = async function (self) {
175
+ let dymoney = 0
176
+ let calFee = (self.model.f_totalcost - 0) + (self.row.f_balance - 0)
177
+ let getGas = await self.$CommonService.feeCalculate(self.model, calFee)
178
+ if (getGas.data.gas) {
179
+ if (self.row.f_isdecimal === '是') {
180
+ if (self.row.f_alias === 'QiaoSong') {
181
+ self.model.f_pregas = (getGas.data.gas - 0).toFixed(1)
182
+ } else {
183
+ self.model.f_pregas = (getGas.data.gas - 0).toFixed(4)
184
+ }
185
+ } else {
186
+ let tempnum = Math.floor(getGas.data.gas - 0)
187
+ let dymoney1 = await self.$CommonService.gasCalculate(self.model, (tempnum).toFixed(4))
188
+ dymoney = (getGas.data.chargenum - 0).toFixed(2) - (dymoney1.data.chargenum - 0).toFixed(2)
189
+ self.model.f_pregas = Math.floor(getGas.data.gas - 0)
190
+ }
191
+ }
192
+ self.model.f_preamount = calFee - (dymoney - 0)
193
+ self.model.chargeprice = getGas.data.chargeprice
194
+ Object.assign(self.model, self.model, getGas.data)
195
+ self.model.f_totalcost = ((self.model.f_totalcost - 0) - (dymoney - 0)).toFixed(4)
196
+ // self.model.f_totalcost=Math.ceil(self.model.f_totalcost)
197
+ if(self.config.floor){
198
+ self.model.f_totalcost=Math.ceil(self.model.f_totalcost)
199
+ }
200
+ self.calText(getGas.data.chargeprice)
201
+ }
202
+
203
+ // 输入气量,换算金额
204
+ let pregasGen = async function (self) {
205
+ if (self.row.f_isdecimal === '是') {
206
+ self.model.f_pregas = (self.model.f_pregas - 0).toFixed(4)
207
+ } else {
208
+ self.model.f_pregas = (self.model.f_pregas - 0).toFixed(0)
209
+ }
210
+ if ((self.model.f_pregas - 0) - (self.maxgas - 0) <= 0) {
211
+ self.model.f_meter_type = self.row.f_meter_type
212
+ let getAmount = await self.$CommonService.gasCalculate(self.model, self.model.f_pregas)
213
+ self.model.f_preamount = getAmount.data.chargenum
214
+ self.model.f_totalcost = ((self.row.f_balance - 0) > (getAmount.data.chargenum - 0) ? 0 : ((getAmount.data.chargenum - 0) - (self.row.f_balance - 0)).toFixed(4))
215
+ Object.assign(self.model, self.model, getAmount.data)
216
+ self.model.chargeprice = getAmount.data.chargeprice
217
+ self.model.f_collection = self.model.f_totalcost
218
+ if(self.config.floor){
219
+ self.model.f_collection=Math.ceil(self.model.f_collection)
220
+ }
221
+ self.calText(getAmount.data.chargeprice)
222
+ }
223
+ }
224
+
225
+ // 执行保存逻辑
226
+ let sellgasGen = async function (self) {
227
+ try {
228
+ self.model.f_write_money = self.model.f_preamount
229
+ if (self.row.f_price_type == '阶梯气价' && self.row.f_is_step == '否') {
230
+ self.model.f_write_money = (self.model.f_pregas * self.model.chargeprice[0].f_price)
231
+ self.model.f_write_money = self.model.f_write_money.toFixed(2)
232
+ }
233
+ // 加入扫码盒付款码支付流水号
234
+ self.model.f_serial_id = self.$refs.paymentcode.paymentCodeReturnData.transactionId
235
+
236
+ let res = await self.$CardService.noCardSellGas(self.model, self.row, self.cardallot)
237
+ console.log('卡表收费返回id', res, self.model)
238
+ if (self.config.showupload) {
239
+ let param = []
240
+ for (let row of self.resid) {
241
+ param.push({id: row.id})
242
+ }
243
+ let data = {
244
+ param: param,
245
+ f_blobid: res
246
+ }
247
+ await self.$resetpost('api/af-revenue/logic/updatefiles', data)
248
+ }
249
+ // 开始打票
250
+ if (self.config.hasPrint) {
251
+ if (self.model.f_print.indexOf('电子发票') == -1) {
252
+ if (self.config.hasBillManage) {
253
+ // 启用发票管理,获取票据管理中的票号并存储记录
254
+ self.row.id = res
255
+ self.row.f_bill_type = '卡表收费'
256
+ self.row.f_bill_style = self.model.f_print[0]
257
+ self.row.f_preamount = self.model.f_preamount
258
+ self.row.f_url = 'http://192.168.50.77:31039/report/jmreport/shareView/787097260170534912'
259
+ self.row.f_collection = self.model.f_collection
260
+ self.print = true
261
+ } else {
262
+ self.row.id = res
263
+ self.row.f_url = 'http://192.168.50.77:31039/report/jmreport/shareView/787097260170534912'
264
+ self.print = true
265
+ }
266
+ } else {
267
+ if (self.model.f_print[0] === '电子发票') {
268
+ await self.$CommonService.openEticket(res, '售气收费')
269
+ self.row.id = res
270
+ self.print = true
271
+ }
272
+ }
273
+ } else {
274
+ self.$dispatch('success')
275
+ }
276
+ self.clickConfirm = false
277
+ } catch (error) {
278
+ self.$showAlert(error, 'danger', 0)
279
+ self.$dispatch('refresh')
280
+ self.clickConfirm = false
281
+ }
282
+ }
283
+
284
+ let asyncCardMeterCenter = async function (self) {
285
+ await self.$getConfig(self, 'CardMeterCenter')
286
+ console.log('卡表收费config', self.config)
287
+ // 默认打印格式
288
+ self.model.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
289
+ self.model.f_payment = [self.config.payment]
290
+ self.mulPrint = self.config.printType instanceof Array
291
+ // 判断限购
292
+ let limit_param = {
293
+ f_userinfo_id: self.row.f_userinfo_id,
294
+ f_user_id: self.row.f_user_id,
295
+ f_stairprice_id: self.row.f_stairprice_id
296
+ }
297
+ let getLimit = await self.$resetpost('api/af-revenue/logic/sale_getLimitGas', {data: limit_param}, {resolveMsg: null, rejectMsg: '获取限购值失败!!'})
298
+ console.log('获取限购值', getLimit)
299
+ self.hasLimit = getLimit.data.hasLimit
300
+ if (self.hasLimit) {
301
+ if (getLimit.data.f_limit_value || getLimit.data.f_limit_amount) {
302
+ if (getLimit.data.f_limit_value < 0 || getLimit.data.f_limit_amount < 0) {
303
+ self.$showAlert(`${getLimit.data.msg}`, 'warning', 3000)
304
+ self.$dispatch('refresh')
305
+ } else {
306
+ if (getLimit.data.f_limit_value) {
307
+ self.maxgas = (getLimit.data.f_limit_value - 0)
308
+ self.limitgas = true
309
+ }
310
+ if (getLimit.data.f_limit_amount) {
311
+ self.maxmoney = (getLimit.data.f_limit_amount - 0)
312
+ self.limitmoney = true
313
+ }
314
+ }
315
+ }
316
+ }
317
+ }
318
+ export default {
319
+ title: '无卡收费',
320
+ data () {
321
+ return {
322
+ serialShow: false,
323
+ resid: [], // 存放新增的f_files表中id
324
+ config: {
325
+ calculatePreByCollection: false, // 可以更具收款来反向计算预购
326
+ notShowFormula: false, // 不显示计算公式,默认显示
327
+ hasPrint: true, // 默认打票
328
+ hasBillManage: false, // 默认不启用发票管理
329
+ floor: false, // 是否取整收费
330
+ billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
331
+ printType: '普通收据', // 收据/电子票/专用发票/国税发票
332
+ showupload: true,
333
+ payment: '现金缴费'
334
+ },
335
+ model: {
336
+ f_purchase: 0,
337
+ f_write_card: '不写卡',
338
+ f_payment: '',
339
+ f_pregas: '',
340
+ f_preamount: 0,
341
+ f_totalcost: 0,
342
+ f_curbalance: 0,
343
+ f_collection: '',
344
+ f_balance: 0,
345
+ f_print: [],
346
+ f_meter_type: '',
347
+ f_voucher_number: ''
348
+ },
349
+ calculatedetail: '',
350
+ print: false,
351
+ billData: {
352
+ url: 'api/af-revenue/report/card_bill',
353
+ billnumber: ''
354
+ },
355
+ randomBusinessId: '',
356
+ hasLimit: false,
357
+ maxgas: 99999999, // 限购
358
+ maxmoney: 99999999,
359
+ limitmoney: false,
360
+ limitgas: false,
361
+ mulPrint: false,
362
+ clickConfirm: false, // 控制确认按钮只能点击一次
363
+ // 下拉框值
364
+ paytype: this.$appdata.getParam('付款方式'),
365
+ printstyle: this.$appdata.getParam('打印格式'),
366
+ writecard: [{label: '写卡',value:'写卡'},{label: '不写卡',value:'不写卡'}],
367
+ mjshow: false
368
+ }
369
+ },
370
+ props: ['row'],
371
+ ready () {
372
+ // this.getPurchase()
373
+ this.model.f_price_id = this.row.f_price_id
374
+ this.model.f_user_id = this.row.f_user_id
375
+ this.model.f_userfiles_id = this.row.f_userfiles_id
376
+ this.model.f_userinfo_id = this.row.f_userinfo_id
377
+ this.model.f_balance = this.row.f_alias === 'QiaoSong' ? Math.trunc(this.row.f_balance) : this.row.f_balance
378
+ if (this.row.f_collection_type == '按金额') {
379
+ this.model.f_totalcost = ''
380
+ this.model.f_pregas = 0
381
+ }
382
+ document.getElementById('fpregas').focus()
383
+ asyncCardMeterCenter(this)
384
+ this.getRandomId()
385
+ },
386
+ events: {
387
+ // 删除Resid数组元素
388
+ 'delResid' (val) {
389
+ this.resid.$remove({id: val, f_biobid: ''})
390
+ // this.resid.splice(this.resid.indexOf({id:val,f_biobid:''}),1);
391
+ },
392
+ // 增加Resid数组元素
393
+ 'resid' (val) {
394
+ this.resid.push({id: val, f_biobid: ''})
395
+ }
396
+ },
397
+ methods: {
398
+ // 根据收款金额计算划价信息
399
+ // 需要配置 calculatePreByCollection = true
400
+ async calculatePreByCollection () {
401
+ try {
402
+ console.log('看看走了没', this.model)
403
+ this.model.f_collection = (this.model.f_collection - 0)
404
+ let calFee = ((this.model.f_collection - 0) + (this.row.f_balance)).toFixed(4)
405
+ // 通过收款进行划价
406
+ let getGas = await this.$CommonService.feeCalculate(this.model, calFee)
407
+ this.model.f_pregas = parseInt(getGas.data.gas)
408
+ let dymoney2 = await this.$CommonService.gasCalculate(this.model, this.model.f_pregas)
409
+ this.model.chargeprice = dymoney2.data.chargeprice
410
+ Object.assign(this.model, this.model, dymoney2.data)
411
+ this.model.f_totalcost = dymoney2.data.chargenum
412
+ this.model.f_preamount = dymoney2.data.chargenum
413
+ this.model.getDeduct = 0
414
+ if (this.row.f_project_money && this.row.f_project_money > 0) {
415
+ this.model.getDeduct = (this.$CommonService.getDeduct(this.row, this.model.f_pregas) - 0)
416
+ this.model.f_totalcost = (this.model.f_totalcost - 0) + (this.model.getDeduct - 0)
417
+ this.model.f_collection = (this.model.f_collection - 0) + (this.model.getDeduct - 0)
418
+ }
419
+ this.calText(dymoney2.data.chargeprice, this.model.getDeduct)
420
+ } catch (error) {
421
+ this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
422
+ this.$dispatch('error', '发卡售气', this.model, error)
423
+ }
424
+ },
425
+ getRandomId () {
426
+ this.randomBusinessId = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
427
+ let res = Math.random() * 16 | 0
428
+ let v = c == 'x' ? res : (res & 0x3 | 0x8)
429
+ return v.toString(16)
430
+ })
431
+ },
432
+ confirm () {
433
+ this.$showMessage(`对客户${this.row.f_user_name}进行收费。该操作只做收费,不做写卡,确定要进行该操作吗?`, ['confirm', 'cancel']).then(async (res) => {
434
+ if (res === 'confirm') {
435
+ let ss = await this.$refs.paymentcode.flowPath()
436
+ this.$refs.paymentcode.paymentCodeShow = false
437
+ console.log('付款码操作返回', ss)
438
+ if (!ss.result) return
439
+ this.clickConfirm = true
440
+ this.model.f_curbalance = this.curbalance
441
+ this.$dispatch('no-button')
442
+ sellgasGen(this)
443
+ }
444
+ })
445
+ },
446
+ clean () {
447
+ this.$info('取消操作')
448
+ this.$dispatch('refresh', this.row)
449
+ },
450
+ printok () {
451
+ // 收据打完,判断是否还有其他票据进行请求
452
+ for (let i = 0; i < this.model.f_print.length; i++) {
453
+ if (this.model.f_print[i] === '电子发票') {
454
+ this.$CommonService.openEticket(this.row.id, '售气收费')
455
+ }
456
+ }
457
+ this.$dispatch('success')
458
+ },
459
+ pregas () {
460
+ if (this.model.f_pregas && this.model.f_pregas > 0) {
461
+ try {
462
+ // 对气量进行验证
463
+ if ((this.row.f_topup_ceil - 0) > 0 && (this.model.f_pregas - 0) > (this.row.f_topup_ceil - 0)) {
464
+ this.$showAlert(`您输入的气量不能大于该表的充值上限: ${this.row.f_topup_ceil}`, 'warning', 5000)
465
+ this.model.f_pregas = null
466
+ } else {
467
+ pregasGen(this)
468
+ }
469
+ } catch (error) {
470
+ this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
471
+ this.$dispatch('error', '发卡售气', this.model, error)
472
+ }
473
+ }
474
+ },
475
+ preamount () {
476
+ if ((this.model.f_totalcost && this.model.f_totalcost > 0) || this.row.f_balance > 0) {
477
+ try {
478
+ preamountGen(this)
479
+ } catch (error) {
480
+ this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
481
+ this.$dispatch('error', '发卡售气', this.model, error)
482
+ }
483
+ }
484
+ },
485
+ calText (val) {
486
+ let str = ''
487
+ val.forEach((item) => {
488
+ str = str + item.f_price + ' x ' + item.f_gas + '+'
489
+ })
490
+ str = str.slice(0, str.length - 1)
491
+ this.calculatedetail = str
492
+ },
493
+ close () {
494
+ this.print = false
495
+ this.clean()
496
+ }
497
+ },
498
+ watch: {
499
+ 'model.f_payment' (val) {
500
+ if (val == '免交') {
501
+ this.mjshow = true
502
+ } else {
503
+ this.mjshow = false
504
+ }
505
+ }
506
+ },
507
+ computed: {
508
+ 'curbalance' () {
509
+ if (this.model.f_preamount) {
510
+ if (this.config.calculatePreByCollection) {
511
+ return ((this.model.f_collection - 0) + (this.row.f_balance - 0) - this.model.f_preamount).toFixed(4)
512
+ }
513
+ if (this.row.f_collection_type === '按金额') {
514
+ return ((this.model.f_totalcost - 0) + (this.row.f_balance - 0) - (this.model.f_preamount - 0)).toFixed(4)
515
+ } else {
516
+ if ((this.row.f_balance - 0) > (this.model.f_preamount - 0)) {
517
+ return ((this.row.f_balance - 0) - (this.model.f_preamount - 0)).toFixed(4)
518
+ } else {
519
+ return ((this.model.f_collection - 0) - (this.model.f_totalcost - 0)).toFixed(4)
520
+ }
521
+ }
522
+ } else {
523
+ return 0
524
+ }
525
+ }
526
+ }
527
+ }
528
+ </script>
529
+
530
+ <style>
531
+ </style>
@@ -0,0 +1,704 @@
1
+ <template>
2
+ <div class="flex-row">
3
+ <div class="span" style="overflow-y: auto;">
4
+ <validator name='v'>
5
+ <form novalidate class="form-horizontal">
6
+ <div class="row" style="margin-top:10px;">
7
+ <div class="col-sm-4" :class="[$v.f_newuser_name.required ? 'has-error' : 'has-success']">
8
+ <label for="f_newuser_name" id="label" class="font_normal_body" >*新&ensp;姓&ensp;名</label>
9
+ <input class="input_search" style="width:60%" type="text" title="新姓名" v-model="model.f_newuser_name"
10
+ v-validate:f_newuser_name='{required: true }' placeholder="新姓名" v-next-el='phone'>
11
+ <!-- <label v-if="$v.f_newuser_name.required && namespan" class = "" style = "color:red">不能为空</label> -->
12
+ </div>
13
+ <div class="col-sm-4" :class="[$v.f_newuser_phone.required ? 'has-error' : '']">
14
+ <label id="label" for="f_newuser_phone" class="font_normal_body">*新&ensp;电&ensp;话</label>
15
+ <input title="新电话" class="input_search" style="width:60%" type="text" v-model="model.f_newuser_phone"
16
+ maxlength="11"
17
+ v-validate:f_newuser_phone='{required: true}'
18
+ placeholder="新电话" v-next-el='number' v-el:phone>
19
+ </div>
20
+ <div class="col-sm-4" :class="[$v.f_newrent_phone.required ? 'has-error' : '']">
21
+ <label id="label" for="f_newrent_phone" class="font_normal_body">&nbsp;备用电话</label>
22
+ <!--v-validate:f_newrent_phone='{required: false}'-->
23
+ <input title="备用电话" class="input_search" style="width:60%" type="text" v-model="model.f_newrent_phone"
24
+ maxlength="11"
25
+
26
+ placeholder="备用电话" v-next-el='number' v-el:phone>
27
+ </div>
28
+ <div class="col-sm-4">
29
+ <label for="f_credentials" id="label" class="font_normal_body">&nbsp;证件类型</label>
30
+ <v-select :value.sync="model.f_newcredentials"
31
+ :options='credentials' placeholder='证件类型'
32
+ close-on-select></v-select>
33
+ </div>
34
+ <div class="col-sm-8" :class="[$v.f_newidnumber.identityCardValid ? 'has-error' : '']"
35
+ v-if="model.f_newcredentials[0] === '身份证'">
36
+ <label id="label" class="font_normal_body">*证件号码</label>
37
+ <input type="text" v-model="model.f_newidnumber" maxlength="18"
38
+ v-validate:f_newidnumber='{identityCardValid: true}' class="input_search" style="width:80%"
39
+ placeholder="新身份证号">
40
+ </div>
41
+ <div class="col-sm-8" v-if="model.f_newcredentials[0] !== '身份证'">
42
+ <label class="font_normal_body">&nbsp;证件号码</label>
43
+ <input type="text" v-model="model.f_newidnumber" class="input_search" style="width:80%"
44
+ placeholder="新证件号">
45
+ </div>
46
+ <div class="col-sm-4">
47
+ <label id="label" for="f_print" class="font_normal_body">&nbsp;打印格式</label>
48
+ <v-select id="print"
49
+ v-model="f_print"
50
+ placeholder='请选择'
51
+ :value.sync="model.f_print"
52
+ :options='printstyle'
53
+ close-on-select clear-button></v-select>
54
+ </div>
55
+ <div class="col-sm-8" >
56
+ <label for="f_contract" class="font_normal_body">合同编号</label>
57
+ <input type="text" v-model="model.f_contract_id" class="input_search" style="width:80%"
58
+ placeholder="合同编号">
59
+ </div>
60
+ </div>
61
+ <div class="row" style="margin-top:10px;">
62
+ <div class="col-sm-4">
63
+ <label id="label" for="f_transfer_fees" class="font_normal_body" title="单值管理:过户费">&nbsp;过&ensp;户&ensp;费</label>
64
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_transfer_fees"
65
+ placeholder="过户费"
66
+ v-next-el='accopen' v-el:fees>
67
+ </div>
68
+ <div class="col-sm-4" :class="[$v.payment.required ? 'has-error' : '']">
69
+ <label id="label" for="f_paymenttype" class="font_normal_body">&nbsp;付款方式</label>
70
+ <input type="text" v-show="false" v-model="$refs.payment.selectedItems"
71
+ v-validate:payment='{required: true }'>
72
+ <v-select :value.sync="model.f_payment"
73
+ v-model="model.f_payment"
74
+ :options='payments' placeholder='付款方式'
75
+ v-ref:payment
76
+ close-on-select></v-select>
77
+ </div>
78
+ <div class="col-sm-4">
79
+ <label id="label" for="f_transfer_fees" class="font_normal_body" title="新人口数">&nbsp;新人口数</label>
80
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_new_people_num"
81
+ placeholder="新人口数"
82
+ v-next-el='accopen' v-el:fees>
83
+ </div>
84
+ </div>
85
+ <div class="row" style="margin-top:10px;" v-if="bankinfo">
86
+ <div class="col-sm-4">
87
+ <label id="label" for="f_newbank_accopen" class=" font_normal_body">新银行开户名:</label>
88
+ <input class="input_search" style="width:60%" type="text" title="新银行开户名"
89
+ v-model="model.f_newbank_accopen"
90
+ placeholder="新银行开户名" v-next-el='newbank' v-el:accopen>
91
+ </div>
92
+ <div class="col-sm-8" :class="[$v.f_bank_idnumber.identityCardValid ? 'has-error' : 'has-success']">
93
+ <label for="f_bank_idnumber" class=" font_normal_body">新开户身份证号</label>
94
+ <input class="input_search" style="width:60%" type="text" title="新开户身份证号"
95
+ v-model="model.f_bank_idnumber"
96
+ v-validate:f_bank_idnumber='{identityCardValid: true }' placeholder="新开户身份证号">
97
+ </div>
98
+
99
+ </div>
100
+ <div class="row" style="margin-top:10px;" v-if="bankinfo">
101
+ <div class="col-sm-4">
102
+ <label id="label" for="f_newbank_name" class="font_normal_body">新银行名</label>
103
+ <v-select :value.sync="model.f_newbank_name"
104
+ :options='banknames' placeholder='新银行开户名'
105
+ close-on-select></v-select>
106
+ </div>
107
+ <div class="col-sm-8">
108
+ <label id="label" for="f_newbank_account" class="font_normal_body">新银行账号</label>
109
+ <input class="input_search" style="width:60%" type="text" title="新银行账号"
110
+ v-model="model.f_newbank_account"
111
+ placeholder="新银行账号" v-el:account>
112
+ </div>
113
+ </div>
114
+ <div class="row">
115
+ <div class="col-sm-8 form-group">
116
+ <label class="font_normal_body" for="f_taxpayer_id">纳税人识别号</label>
117
+ <input class="input_search" placeholder="纳税人识别号" style="width:70%" type="text"
118
+ v-model="model.f_taxpayer_id" v-next-el="addressphone">
119
+ </div>
120
+ <div class="col-sm-4 form-group">
121
+ <label class="font_normal_body" for="f_paper_name">名&emsp;&emsp;称</label>
122
+ <input class="input_search" placeholder="名称" style="width:60%" type="text" v-el:papername
123
+ v-model="model.f_paper_name" v-next-el="paperaccount">
124
+ </div>
125
+ </div>
126
+ <div class="row">
127
+ <div class="col-sm-8 form-group">
128
+ <label class="font_normal_body" for="f_address_phone">地址电话&emsp;&emsp;</label>
129
+ <input class="input_search" placeholder="地址-电话" style="width:70%" type="text" v-el:addressphone
130
+ v-model="model.f_address_phone" v-next-el="papername">
131
+ </div>
132
+ <div class="col-sm-4 form-group">
133
+ <label class="font_normal_body" for="f_paper_type">票据类型</label>
134
+ <v-select :options='papertype'
135
+ :value-single="true"
136
+ :value.sync="model.f_paper_type" close-on-select
137
+ placeholder='票据类型'></v-select>
138
+ </div>
139
+ </div>
140
+ <div class="row">
141
+ <div class="col-sm-8 form-group">
142
+ <label class="font_normal_body " for="f_paper_account">开户行及账号</label>
143
+ <input class="input_search" placeholder="银行名称" style="width:70%" type="text" v-el:paperaccount
144
+ v-model="model.f_paper_account">
145
+ </div>
146
+ <div class="col-sm-4 form-group">
147
+ <label class="font_normal_body" for="f_contact_user">联系人名</label>
148
+ <input class="input_search" placeholder="联系人姓名" style="width:60%" type="text" v-el:contactuser
149
+ v-model="model.f_contact_user">
150
+ </div>
151
+ </div>
152
+ <div class="row">
153
+ <div class="col-sm-8 form-group">
154
+ <label class="font_normal_body " for="f_paper_account">推送票据邮箱</label>
155
+ <input class="input_search" placeholder="推送票据邮箱" style="width:70%" type="text" v-el:f_email
156
+ v-model="model.f_email">
157
+ </div>
158
+ <div v-if="config.hasAudit" class="col-sm-4 form-group"
159
+ :class="[$v.f_audit_person.required ? 'has-error' : 'has-success']">
160
+ <label class="font_normal_body">审核人员</label>
161
+ <input v-show="false" v-model="model.f_audit_person" v-validate:f_audit_person='{required: true}'>
162
+ <v-select :value.sync="model.f_audit_person"
163
+ :options='auditor' placeholder='请选择'
164
+ selected="审核人员"
165
+ :value-single="true"
166
+ style="width:60%"
167
+ close-on-select></v-select>
168
+ </div>
169
+ </div>
170
+ <div class="row" style="margin-top:10px;">
171
+
172
+ <div class="col-sm-12">
173
+ <label id="label" for="f_comments" class="font_normal_body">&nbsp;备&emsp;&emsp;注</label>
174
+ <input class="input_search" style="width:87%" v-model="model.f_comments"
175
+ placeholder="备注"/>
176
+ </div>
177
+ </div>
178
+ </form>
179
+ <accept-bill :show="acceptprint" :bill-url='acceptUrl' v-on:toggle="close" :data='row' :billdata="printData"
180
+ @closeaccept="closeAccept" v-ref:acceptbill></accept-bill>
181
+ <validate-bill v-if="hasValidateBill" :data="model" @validate-bill="validateBill"></validate-bill>
182
+ <print-bill :show="print" :bill-config='config' :bill-data='billData' v-on:toggle="close" @printok="printok"
183
+ :data='row' v-ref:printbill></print-bill>
184
+ <div style="text-align:right;height:auto;">
185
+ <button style="margin-right:5px;" v-if="this.$login.r.includes('加载过户资料')" class="button_search"
186
+ @click="loaduser()">
187
+ 加载过户资料
188
+ </button>
189
+ <button class="button_clear" @click="accept()" v-if="config.hasAcceptance" :disabled='!$v.valid'>受理单
190
+ </button>
191
+ <button class="button_search" v-show="config.hasAudit" type="button" @click="auditConfirm()"
192
+ :disabled='!$v.valid'>
193
+ 过户审核
194
+ </button>
195
+ <button class="button_search" v-show="!config.hasAudit" @click="confirm()" :disabled='!$v.valid'>
196
+ 确认
197
+ </button>
198
+ <button class="button_clear" @click="clear()">
199
+ 取消
200
+ </button>
201
+ </div>
202
+ <!--<upload :blodid="blodid" isremark="true" fusetype="过户"></upload>-->
203
+ <upload :blodid="blodid" v-if="config.showupload" v-on:confirminfo="confirmIdCard"
204
+ :businessid="randomBusinessId" isremark="true" fusetype="过户管理"></upload>
205
+ </validator>
206
+ </div>
207
+ <modal v-if="loaduserflag" :show.sync="loaduserflag" width="80%" title="过户资产信息" v-ref:modal large
208
+ backdrop="false">
209
+ <article slot="modal-body" class="modal-body" style="height: 700px;padding: 0!important;">
210
+ <tranfersel-list :f_filialeid.sync="f_filialeid"></tranfersel-list>
211
+ </article>
212
+ <footer slot="modal-footer" class="modal-footer">
213
+ </footer>
214
+ </modal>
215
+ </div>
216
+ </template>
217
+ <script>
218
+ import Vue from 'vue'
219
+
220
+ let transfersaveGen = async function (self) {
221
+ try {
222
+ let condition = `f_userinfo_id = '${self.row.f_userinfo_id}'`
223
+ let bank = await self.$SqlService.singleTable('t_infobank', condition)
224
+ self.setbank(bank)
225
+ let res = await self.$LogicService.changeAccount(self.transferdata)
226
+ console.log('过户返回=====>', res)
227
+ if (self.config.showupload) {
228
+ let param = []
229
+ for (let row of self.resid) {
230
+ param.push({id: row.id})
231
+ }
232
+ let data = {
233
+ param: param,
234
+ f_blobid: res.data
235
+ }
236
+ await self.$resetpost('api/af-revenue/logic/updatefiles', data)
237
+ }
238
+ if (self.config.hasPrint && !self.$login.r.includes('不打印发票')) {
239
+ if (self.model.f_print[0] != '电子发票') {
240
+ if (self.config.hasBillManage) {
241
+ self.row.id = res.data
242
+ self.row.f_bill_type = '过户'
243
+ self.row.f_bill_style = self.model.f_print[0]
244
+ self.print = true
245
+ } else {
246
+ self.row.id = res.data
247
+ self.print = true
248
+ }
249
+ } else if (self.model.f_print[0] === '国税发票') {
250
+ // TODO
251
+ self.$dispatch('success')
252
+ } else if (self.model.f_print[0] === '电子发票') {
253
+ // TODO
254
+ self.$dispatch('success')
255
+ }
256
+ } else {
257
+ self.$dispatch('success')
258
+ }
259
+ } catch (error) {
260
+ self.$showAlert(error, 'danger', 0)
261
+ self.$dispatch('refresh')
262
+ }
263
+ }
264
+
265
+ let asyncTransferManage = async function (self) {
266
+ await self.$getConfig(self, 'TransferManage')
267
+ console.log('过户config', self.config)
268
+ self.model.f_new_people_num = self.config.f_new_people_num
269
+ self.model.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
270
+ self.model.f_payment = [self.config.payment]
271
+ self.mulPrint = self.config.printType instanceof Array
272
+
273
+ // 获取当前票号用
274
+ self.model.f_use_type = self.config.billType
275
+ self.model.f_bill_type = self.model.f_print
276
+ self.hasValidateBill = self.config.hasBillManage
277
+ }
278
+
279
+ export default {
280
+ title: '过户管理',
281
+ props: ['row'],
282
+ data () {
283
+ return {
284
+ config: {
285
+ showupload: true, // 默认显示上传附件
286
+ hasPrint: false, // 默认打票
287
+ hasAcceptance: false,
288
+ hasBillManage: false, // 默认不启用发票管理
289
+ billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
290
+ payment: '现金缴费',
291
+ f_contract_id: '',
292
+ f_new_people_num: 4, // 默认人口数
293
+ printType: '普通收据', // 收据/电子票/专用发票/国税发票
294
+ hasAudit: false // 是否审核
295
+ },
296
+ bankinfo: false,
297
+ numspan: false,
298
+ namespan: false,
299
+ phonespan: false,
300
+ randomBusinessId: '',
301
+ resid: [], // 存放新增的f_files表中id
302
+ model: {
303
+ f_operat_type: '过户',
304
+ f_print: [],
305
+ f_newcredentials: ['身份证'],
306
+ f_payment: [],
307
+ f_paymenttype: ['现金缴费'],
308
+ f_transfer_fees: this.$appdata.getSingleValue('过户费') ? this.$appdata.getSingleValue('过户费') : '',
309
+ // f_transfer_fees: '',
310
+ f_newbank_accopen: '',
311
+ f_newuser_name: '',
312
+ f_newidnumber: '',
313
+ f_new_people_num: 4,
314
+ f_address_phone: '',
315
+ f_paper_type: '',
316
+ f_paper_account: '',
317
+ f_email: '',
318
+ f_contact_user: '',
319
+ f_paper_name: '',
320
+ f_taxpayer_id: '',
321
+ f_newbank_name: ''
322
+ },
323
+ transferdata: {
324
+ userinfo: {}
325
+ },
326
+ print: false,
327
+ printData: {
328
+ username: '',
329
+ userphone: '',
330
+ credentials: '',
331
+ idnumber: ''
332
+ },
333
+ billData: {
334
+ url: 'api/af-revenue/report/transfer_bill',
335
+ billnumber: ''
336
+ },
337
+ mulPrint: false,
338
+
339
+ // 启用发票管理需要对票号进行验证
340
+ hasValidateBill: false,
341
+ validateOk: false,
342
+
343
+ blodid: '', // 附件
344
+
345
+ acceptprint: false,
346
+ acceptUrl: '',
347
+ auditor: [],
348
+ banknames: this.$appdata.getParam('银行名称'),
349
+ costtypes: this.$appdata.getParam('缴费类型'),
350
+ payments: this.$appdata.getParam('付款方式'),
351
+ papertype: this.$appdata.getParam('票据类型'),
352
+ printstyle: this.$appdata.getParam('打印格式'),
353
+ credentials: this.$appdata.getParam('证件类型'),
354
+ loaduserflag: false
355
+ }
356
+ },
357
+ ready () {
358
+ this.model.f_print = [this.config.printType]
359
+ this.blodid = this.row.f_userinfo_id
360
+ this.model.f_taxpayer_id = this.row.f_taxpayer_id
361
+ this.model.f_address_phone = this.row.f_address_phone
362
+ this.model.f_paper_name = this.row.f_paper_name
363
+ this.model.f_paper_account = this.row.f_paper_account
364
+ this.model.f_paper_type = this.row.f_paper_type
365
+ this.model.f_email = this.row.f_email
366
+ this.model.f_contact_user = this.row.f_contact_user
367
+ asyncTransferManage(this)
368
+ this.getRandomId()
369
+ this.getAuditor()
370
+ },
371
+
372
+ methods: {
373
+ async getAuditor () {
374
+ await this.$GetSaleParam.initinputtor()
375
+ this.auditor = this.$GetSaleParam.getAudit(this.$login.f.orgid)
376
+ },
377
+ confirmIdCard (msg) {
378
+ console.log(msg)
379
+ this.model.f_newuser_name = msg.strName
380
+ this.model.f_newidnumber = msg.strID
381
+ },
382
+ getRandomId () {
383
+ this.randomBusinessId = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
384
+ let res = Math.random() * 16 | 0
385
+ let v = c == 'x' ? res : (res & 0x3 | 0x8)
386
+ return v.toString(16)
387
+ })
388
+ },
389
+ // 加载过户资料
390
+ loaduser () {
391
+ this.loaduserflag = true
392
+ },
393
+ accept () {
394
+ // 打印受理单
395
+ this.printData.username = this.model.f_newuser_name ? `'${this.model.f_newuser_name}'` : '' + `'${this.model.f_newuser_name}'`
396
+ this.printData.userphone = this.model.f_newuser_phone ? `'${this.model.f_newuser_phone}'` : '' + `'${this.model.f_newuser_phone}'`
397
+ this.printData.credentials = this.model.f_newcredentials ? `'${this.model.f_newcredentials[0]}'` : '' + `'${this.model.f_newcredentials}'`
398
+ this.printData.idnumber = this.model.f_newidnumber ? `'${this.model.f_newidnumber}'` : '' + `'${this.model.f_newidnumber}'`
399
+ console.log('受累单中printData', this.printData)
400
+ this.acceptUrl = 'api/af-revenue/report/acceptTransfer_bill'
401
+ this.acceptprint = true
402
+ },
403
+ closeAccept () {
404
+ this.acceptprint = false
405
+ },
406
+ // 用户更改信息
407
+ getuserinfo () {
408
+ return {
409
+ f_userinfo_id: this.row.f_userinfo_id,
410
+ f_user_name: this.model.f_newuser_name,
411
+ f_credentials: this.model.f_newcredentials[0],
412
+ f_idnumber: this.model.f_newidnumber ? this.model.f_newidnumber : '',
413
+ f_user_phone: this.model.f_newuser_phone ? this.model.f_newuser_phone : '',
414
+ f_rent_phone: this.model.f_newrent_phone ? this.model.f_newrent_phone : '',
415
+ f_contract_id: this.model.f_contract_id ? this.model.f_contract_id : '',
416
+ f_cost_type: this.model.f_paymenttype[0],
417
+ version: this.row.userinfo_version,
418
+ f_taxpayer_id: this.model.f_taxpayer_id,
419
+ f_address_phone: this.model.f_address_phone,
420
+ f_paper_name: this.model.f_paper_name,
421
+ f_paper_account: this.model.f_paper_account,
422
+ f_email: this.model.f_email,
423
+ f_paper_type: this.model.f_paper_type,
424
+ f_contact_user: this.model.f_contact_user,
425
+ f_people_num: this.model.f_new_people_num ? this.model.f_new_people_num : 0,
426
+ infobank: {
427
+ f_userinfo_id: this.row.f_userinfo_id,
428
+ f_bank_name: this.model.f_newbank_name[0],
429
+ f_bank_accopen: this.model.f_newbank_accopen,
430
+ f_bank_account: this.model.f_newbank_account,
431
+ f_bank_idnumber: this.model.f_bank_idnumber
432
+ }
433
+ }
434
+ },
435
+ changecost (val) {
436
+ if (val[0] === '银行代扣') {
437
+ this.bankinfo = true
438
+ } else {
439
+ this.bankinfo = false
440
+ }
441
+ this.$resetValidation()
442
+ },
443
+ validateBill (val) {
444
+ this.validateOk = val.isOk
445
+ this.billData.bill = val.bill
446
+ },
447
+ printok () {
448
+ this.$dispatch('success')
449
+ },
450
+
451
+ // 过户表及操作表信息
452
+ getOperateInfo () {
453
+ return {
454
+ f_userinfo_id: this.row.f_userinfo_id,
455
+ record_userinfo: this.row.f_userinfo_id,
456
+ f_user_id: this.row.f_user_id,
457
+ f_serial_number: this.model.f_serial_number ? this.model.f_serial_number : '',
458
+ f_userfiles_id: this.row.f_userfiles_id ? this.row.f_userfiles_id : '',
459
+ f_user_name: this.row.f_user_name,
460
+ f_taxpayer_id: this.row.f_taxpayer_id,
461
+ f_address_phone: this.row.f_address_phone,
462
+ f_paper_name: this.row.f_paper_name,
463
+ f_paper_account: this.row.f_paper_account,
464
+ f_email: this.row.f_email,
465
+ f_paper_type: this.row.f_paper_type,
466
+ f_contact_user: this.row.f_contact_user,
467
+ f_user_phone: this.row.f_user_phone ? this.row.f_user_phone : '',
468
+ f_idnumber: this.row.f_idnumber ? this.row.f_idnumber : '',
469
+ f_credentials: this.row.f_credentials ? this.row.f_credentials : '',
470
+ f_payment: this.model.f_payment[0] ? this.model.f_payment[0] : '',
471
+ f_bill_style: this.model.f_print[0] ? this.model.f_print[0] : '',
472
+ f_newuser_name: this.model.f_newuser_name,
473
+ f_newuser_phone: this.model.f_newuser_phone,
474
+ f_newrent_phone: this.model.f_newrent_phone ? this.model.f_newrent_phone : '',
475
+ f_newcredentials: this.model.f_newcredentials[0],
476
+ f_newidnumber: this.model.f_newidnumber ? this.model.f_newidnumber : '',
477
+ f_bank_accopen: null,
478
+ f_bank_name: null,
479
+ f_bank_account: null,
480
+ f_newbank_accopen: this.model.f_newbank_accopen ? this.model.f_newbank_accopen : '',
481
+ f_newbank_name: this.model.f_newbank_name[0] ? this.model.f_newbank_name[0] : '',
482
+ f_newbank_account: this.model.f_newbank_account ? this.model.f_newbank_account : '',
483
+ f_bank_idnumber: this.row.f_bank_idnumber ? this.model.f_bank_idnumber : '',
484
+ f_newbank_idnumber: this.model.f_bank_idnumber ? this.model.f_bank_idnumber : '',
485
+ f_transfer_fees: this.model.f_transfer_fees ? this.model.f_transfer_fees : 0,
486
+ f_old_people_num: this.row.f_people_num ? this.row.f_people_num : 0,
487
+ f_new_people_num: this.model.f_new_people_num ? this.model.f_new_people_num : 0,
488
+ f_newtaxpayer_id: this.model.f_taxpayer_id,
489
+ f_newaddress_phone: this.model.f_address_phone,
490
+ f_newpaper_name: this.model.f_paper_name,
491
+ f_newpaper_account: this.model.f_paper_account,
492
+ f_newemail: this.model.f_email,
493
+ f_newpaper_type: this.model.f_paper_type,
494
+ f_newcontact_user: this.model.f_contact_user,
495
+ f_comments: this.model.f_comments ? this.model.f_comments : '',
496
+ f_operat_type: '过户',
497
+ f_describe: this.$login.f.name + '对用户' + this.row.f_user_name + '进行过户',
498
+ f_state: '有效',
499
+ f_operator: this.$login.f.name,
500
+ f_operatorid: this.$login.f.id,
501
+ f_orgid: this.$login.f.orgid,
502
+ f_orgname: this.$login.f.orgs,
503
+ f_depid: this.$login.f.depids,
504
+ f_depname: this.$login.f.deps,
505
+ f_zoneid: this.$login.f.zoneid ? this.$login.f.zoneid : '',
506
+ f_zones: this.$login.f.zones ? this.$login.f.zones : '',
507
+ deletebank: false
508
+ }
509
+ },
510
+ // 银行信息的设置
511
+ setbank (bank) {
512
+ if (!bank.data[0]) {
513
+ if (this.model.f_paymenttype[0] === '现金缴费') {
514
+ delete this.transferdata.userinfo.infobank
515
+ } else if (this.model.f_paymenttype[0] === '银行代扣') {
516
+ delete this.transferdata.userinfo.infobank.f_userinfo_id
517
+ }
518
+ } else {
519
+ if (this.model.f_paymenttype[0] === '现金缴费') {
520
+ this.transferdata.deletebank = true
521
+ delete this.transferdata.userinfo.infobank
522
+ } else if (this.model.f_paymenttype[0] === '银行代扣') {
523
+ this.transferdata.f_bank_name = bank.data[0].f_bank_name
524
+ this.transferdata.f_bank_accopen = bank.data[0].f_bank_accopen
525
+ this.transferdata.f_bank_account = bank.data[0].f_bank_account
526
+ this.transferdata.f_bank_idnumber = bank.data[0].f_bank_idnumber
527
+ }
528
+ }
529
+ },
530
+ confirm () {
531
+ this.transferdata = Object.assign({}, this.getOperateInfo())
532
+ this.newbankname()
533
+ this.transferdata.userinfo = Object.assign({}, this.getuserinfo())
534
+ console.log('过户保存', this.transferdata)
535
+ transfersaveGen(this)
536
+ console.log(this)
537
+ },
538
+ async auditConfirm () {
539
+ let fileParam = []
540
+ for (let row of this.resid) {
541
+ fileParam.push({id: row.id})
542
+ }
543
+ let param = {
544
+ // 业务参数
545
+ requestParam: {
546
+ model: {
547
+ f_userinfo_id: this.row.f_userinfo_id,
548
+ record_userinfo: this.row.f_userinfo_id,
549
+ f_user_id: this.row.f_user_id,
550
+ f_serial_number: this.model.f_serial_number ? this.model.f_serial_number : '',
551
+ f_userfiles_id: this.row.f_userfiles_id ? this.row.f_userfiles_id : '',
552
+ f_user_name: this.row.f_user_name,
553
+ f_taxpayer_id: this.row.f_taxpayer_id,
554
+ f_address_phone: this.row.f_address_phone,
555
+ f_paper_name: this.row.f_paper_name,
556
+ f_paper_account: this.row.f_paper_account,
557
+ f_email: this.row.f_email,
558
+ f_paper_type: this.row.f_paper_type,
559
+ f_contact_user: this.row.f_contact_user,
560
+ f_user_phone: this.row.f_user_phone ? this.row.f_user_phone : '',
561
+ f_idnumber: this.row.f_idnumber ? this.row.f_idnumber : '',
562
+ f_credentials: this.row.f_credentials ? this.row.f_credentials : '',
563
+ f_payment: this.model.f_payment[0] ? this.model.f_payment[0] : '',
564
+ f_bill_style: this.model.f_print[0] ? this.model.f_print[0] : '',
565
+ f_newuser_name: this.model.f_newuser_name,
566
+ f_newuser_phone: this.model.f_newuser_phone,
567
+ f_newrent_phone: this.model.f_newrent_phone ? this.model.f_newrent_phone : '',
568
+ f_newcredentials: this.model.f_newcredentials[0],
569
+ f_newidnumber: this.model.f_newidnumber ? this.model.f_newidnumber : '',
570
+ f_bank_accopen: null,
571
+ f_bank_name: null,
572
+ f_bank_account: null,
573
+ f_newbank_accopen: this.model.f_newbank_accopen ? this.model.f_newbank_accopen : '',
574
+ f_newbank_name: this.model.f_newbank_name[0] ? this.model.f_newbank_name[0] : '',
575
+ f_newbank_account: this.model.f_newbank_account ? this.model.f_newbank_account : '',
576
+ f_bank_idnumber: this.row.f_bank_idnumber ? this.model.f_bank_idnumber : '',
577
+ f_newbank_idnumber: this.model.f_bank_idnumber ? this.model.f_bank_idnumber : '',
578
+ f_transfer_fees: this.model.f_transfer_fees ? this.model.f_transfer_fees : 0,
579
+ f_old_people_num: this.row.f_people_num ? this.row.f_people_num : 0,
580
+ f_new_people_num: this.model.f_new_people_num ? this.model.f_new_people_num : 0,
581
+ f_newtaxpayer_id: this.model.f_taxpayer_id,
582
+ f_newaddress_phone: this.model.f_address_phone,
583
+ f_newpaper_name: this.model.f_paper_name,
584
+ f_newpaper_account: this.model.f_paper_account,
585
+ f_newemail: this.model.f_email,
586
+ f_newpaper_type: this.model.f_paper_type,
587
+ f_newcontact_user: this.model.f_contact_user,
588
+ f_comments: this.model.f_comments ? this.model.f_comments : '',
589
+ f_operat_type: '过户',
590
+ f_describe: this.$login.f.name + '对用户' + this.row.f_user_name + '进行过户',
591
+ f_state: '有效',
592
+ f_operator: this.$login.f.name,
593
+ f_operatorid: this.$login.f.id,
594
+ f_orgid: this.$login.f.orgid,
595
+ f_orgname: this.$login.f.orgs,
596
+ f_depid: this.$login.f.depids,
597
+ f_depname: this.$login.f.deps,
598
+ f_zoneid: this.$login.f.zoneid ? this.$login.f.zoneid : '',
599
+ f_zones: this.$login.f.zones ? this.$login.f.zones : '',
600
+ deletebank: false,
601
+ userinfo: {
602
+ f_userinfo_id: this.row.f_userinfo_id,
603
+ f_user_name: this.model.f_newuser_name,
604
+ f_credentials: this.model.f_newcredentials[0],
605
+ f_idnumber: this.model.f_newidnumber ? this.model.f_newidnumber : '',
606
+ f_user_phone: this.model.f_newuser_phone ? this.model.f_newuser_phone : '',
607
+ f_rent_phone: this.model.f_newrent_phone ? this.model.f_newrent_phone : '',
608
+ f_contract_id: this.model.f_contract_id ? this.model.f_contract_id : '',
609
+ f_cost_type: this.model.f_paymenttype[0],
610
+ version: this.row.userinfo_version,
611
+ f_taxpayer_id: this.model.f_taxpayer_id,
612
+ f_address_phone: this.model.f_address_phone,
613
+ f_paper_name: this.model.f_paper_name,
614
+ f_paper_account: this.model.f_paper_account,
615
+ f_email: this.model.f_email,
616
+ f_paper_type: this.model.f_paper_type,
617
+ f_contact_user: this.model.f_contact_user,
618
+ f_people_num: this.model.f_new_people_num ? this.model.f_new_people_num : 0,
619
+ infobank: {
620
+ f_userinfo_id: this.row.f_userinfo_id,
621
+ f_bank_name: this.model.f_newbank_name[0],
622
+ f_bank_accopen: this.model.f_newbank_accopen,
623
+ f_bank_account: this.model.f_newbank_account,
624
+ f_bank_idnumber: this.model.f_bank_idnumber
625
+ }
626
+ }
627
+ }
628
+ },
629
+ // 审核人
630
+ f_audit_person: this.model.f_audit_person,
631
+ // 描述
632
+ f_describe: `${this.$login.f.name}对用户${this.row.f_user_name}进行过户`,
633
+ // 附件
634
+ fileParam: fileParam,
635
+ // 登录人信息
636
+ userBaseInfo: {
637
+ f_operator: Vue.$login.f.name,
638
+ f_userinfo_code: this.row.f_userinfo_code,
639
+ f_userinfo_id: this.row.f_userinfo_id,
640
+ f_operatorid: Vue.$login.f.id,
641
+ f_orgid: Vue.$login.f.orgid,
642
+ f_orgname: Vue.$login.f.orgs,
643
+ f_depid: Vue.$login.f.depids,
644
+ f_depname: Vue.$login.f.deps
645
+ },
646
+ // 业务类型
647
+ type: '过户',
648
+ // 执行业务
649
+ f_type: this.model.f_operat_type,
650
+ // 其他业务请求
651
+ f_otherparam: [],
652
+ // 备注
653
+ f_comments: this.model.f_comments,
654
+ // 执行logic
655
+ logicName: 'transferSave'
656
+ }
657
+ this.$resetpost('api/af-revenue/logic/commonAuditLogic', {data: param}, {
658
+ warnMsg: `确定要对用户${this.row.f_user_name}进行${this.model.f_operat_type}审核吗?`,
659
+ resolveMsg: `提交审核完成!!`,
660
+ rejectMsg: `提交审核失败!!请重试!!`
661
+ }).then((res) => {
662
+ this.clear()
663
+ })
664
+ },
665
+ clear () {
666
+ this.$dispatch('refresh')
667
+ },
668
+ close () {
669
+ this.print = false
670
+ this.clear()
671
+ },
672
+ newbankname () {
673
+ if (this.model.f_paymenttype[0] !== '银行代扣') {
674
+ this.model.f_newbank_accopen = null
675
+ }
676
+ }
677
+ },
678
+ events: {
679
+ 'confirmuserfiles' (val) {
680
+ if (val) {
681
+ if (val.buyername != null) this.$set('model.f_newuser_name', val.buyername)
682
+ if (val.buyerphone != null) this.$set('model.f_newuser_phone', val.buyerphone)
683
+ if (val.buyercardno != null) this.$set('model.f_newidnumber', val.buyercardno)
684
+ this.loaduserflag = false
685
+ }
686
+ },
687
+ // 删除Resid数组元素
688
+ 'delResid' (val) {
689
+ this.resid.$remove({id: val, f_biobid: ''})
690
+ // this.resid.splice(this.resid.indexOf({id:val,f_biobid:''}),1);
691
+ },
692
+ // 增加Resid数组元素
693
+ 'resid' (val) {
694
+ this.resid.push({id: val, f_biobid: ''})
695
+ }
696
+ }
697
+ }
698
+ </script>
699
+
700
+ <style scoped>
701
+ #label {
702
+ margin-top: 5px;
703
+ }
704
+ </style>
@@ -0,0 +1,9 @@
1
+ // 分公司特殊组件页面注册
2
+ import Vue from 'vue'
3
+
4
+ export default function () {
5
+ // 无卡收费
6
+ Vue.component('no-card-meter-center', (resolve) => { require(['./NoCardMeterCenter'], resolve) })
7
+ // 过户
8
+ Vue.component('transfer-manage', (resolve) => { require(['./TransferManage'], resolve) })
9
+ }
@@ -52,7 +52,7 @@ export default {
52
52
  async rushRedInvoice (data) {
53
53
  try {
54
54
  // 否则正常打票
55
- let result = await axios.post('/invoice/rs/logic/getInvoice', Object.assign(data, {invoice_type: 1}), {
55
+ let result = await axios.post('api/af-invoice/logic/getInvoice', Object.assign(data, {invoice_type: 1}), {
56
56
  resolveMsg: null,
57
57
  rejectMsg: '发票冲红失败!!'
58
58
  })
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/dexin/sale'
5
+ import FilialeSale from './filiale/ronghao/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'
package/src/sale.js CHANGED
@@ -955,9 +955,9 @@ export default function () {
955
955
 
956
956
  // 微信相关页面
957
957
  // // 微信中间表对账
958
- Vue.component('we-chat-pay-contrast', (resolve) => { require(['./components/revenue/comprehen/wechatpay/WeChatPayContrast.vue'], resolve) })
959
- Vue.component('we-chat-pay-detail', (resolve) => { require(['./components/revenue/comprehen/wechatpay/WeChatPayDetail.vue'], resolve) })
960
- Vue.component('we-chat', (resolve) => { require(['./components/revenue/comprehen/wechatpay/WeChat.vue'], resolve) })
958
+ // Vue.component('we-chat-pay-contrast', (resolve) => { require(['./components/revenue/comprehen/wechatpay/WeChatPayContrast.vue'], resolve) })
959
+ // Vue.component('we-chat-pay-detail', (resolve) => { require(['./components/revenue/comprehen/wechatpay/WeChatPayDetail.vue'], resolve) })
960
+ // Vue.component('we-chat', (resolve) => { require(['./components/revenue/comprehen/wechatpay/WeChat.vue'], resolve) })
961
961
  // Vue.component('we-chat-pay-pos', (resolve) => { require(['./components/revenue/comprehen/wechatpay/WeChatPayPos.vue'], resolve) })
962
962
  // 预约中心 咸阳简单报装
963
963
  // 报装预约中心