sale-client 4.2.76 → 4.2.78

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.
Files changed (62) hide show
  1. package/.gradle/5.2.1/fileChanges/last-build.bin +0 -0
  2. package/.gradle/5.2.1/fileHashes/fileHashes.lock +0 -0
  3. package/.gradle/5.2.1/gc.properties +0 -0
  4. package/.gradle/8.5/checksums/checksums.lock +0 -0
  5. package/.gradle/8.5/dependencies-accessors/dependencies-accessors.lock +0 -0
  6. package/.gradle/8.5/dependencies-accessors/gc.properties +0 -0
  7. package/.gradle/8.5/executionHistory/executionHistory.bin +0 -0
  8. package/.gradle/8.5/executionHistory/executionHistory.lock +0 -0
  9. package/.gradle/8.5/fileChanges/last-build.bin +0 -0
  10. package/.gradle/8.5/fileHashes/fileHashes.bin +0 -0
  11. package/.gradle/8.5/fileHashes/fileHashes.lock +0 -0
  12. package/.gradle/8.5/gc.properties +0 -0
  13. package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  14. package/.gradle/buildOutputCleanup/cache.properties +2 -0
  15. package/.gradle/file-system.probe +0 -0
  16. package/.gradle/vcs-1/gc.properties +0 -0
  17. package/build/dev-server.js +30 -52
  18. package/index.html +2 -7
  19. package/package.json +1 -1
  20. package/src/App.vue +1 -1
  21. package/src/components/FilesManageNew/FileUserFiles.vue +3 -3
  22. package/src/components/revenue/HandManager/MeterBookUser.vue +726 -726
  23. package/src/components/revenue/comprehen/ComprehenOperation/QrPay/QrPaymentDetailed.vue +423 -423
  24. package/src/components/revenue/comprehen/Maintenance/hand/handOperate.vue +469 -469
  25. package/src/components/revenue/machineHandManage/ArrearsQuery.vue +938 -938
  26. package/src/filiale/alashan/eticket/EticketRecordList.vue +428 -428
  27. package/src/filiale/bayan/ChargeList.vue +1010 -1010
  28. package/src/filiale/bayan/StockListmain.vue +543 -543
  29. package/src/filiale/bazhong/UserInfoDetailManageNew.vue +245 -245
  30. package/src/filiale/bazhong/ic_detail/ChangeMeterQueryUser.vue +370 -370
  31. package/src/filiale/bazhong/sale.js +8 -8
  32. package/src/filiale/beifangshiye/OtherChargeNew.vue +625 -625
  33. package/src/filiale/jinhong/HandList.vue +1 -1
  34. package/src/filiale/lixianV3/ArrearsQuery.vue +938 -938
  35. package/src/filiale/lixianV3/InsuranceChargesDetails.vue +425 -425
  36. package/src/filiale/meihekou/common/userinfo_detail/ic_detail/MachineRecordQuery.vue +281 -281
  37. package/src/filiale/ronghao/ArrearsQuery.vue +974 -974
  38. package/src/filiale/ronghao/CardService.js +2144 -2144
  39. package/src/filiale/ronghao/InsuranceManage.vue +58 -58
  40. package/src/filiale/ronghao/MachineChargeService.js +149 -149
  41. package/src/filiale/ronghao/NoCardMeterCenter.vue +534 -534
  42. package/src/filiale/ronghao/PaymentCode.vue +174 -174
  43. package/src/filiale/ronghao/PriceChangeCompensation/CompensationManage.vue +26 -26
  44. package/src/filiale/ronghao/PriceChangeCompensation/IotCompensation.vue +318 -318
  45. package/src/filiale/ronghao/PriceChangeCompensation/JbCompensation.vue +343 -343
  46. package/src/filiale/ronghao/PriceChangeCompensation/SurplusRecordDetail.vue +74 -74
  47. package/src/filiale/ronghao/ReplaceCardManage.vue +415 -415
  48. package/src/filiale/ronghao/Upload.vue +654 -654
  49. package/src/filiale/ronghao/cardDown.vue +1141 -1141
  50. package/src/filiale/ronghao/changemeterOperate.vue +315 -315
  51. package/src/filiale/ronghao/fillgasSpecific.vue +313 -313
  52. package/src/filiale/ronghao/ic_detail/ChargeRecordQuery.vue +106 -106
  53. package/src/filiale/ronghao/ic_detail/WatchCollection.vue +115 -115
  54. package/src/filiale/ronghao/ic_detail/WebHandQueryUser.vue +411 -411
  55. package/src/filiale/ronghao/machineDown.vue +1176 -1176
  56. package/src/filiale/ronghao/replacementSingleInfoOperation.vue +315 -315
  57. package/src/filiale/ronghao/specificInformation.vue +537 -537
  58. package/src/filiale/yangchun/ChargeList.vue +954 -954
  59. package/src/filiale/yuncheng/changemeterListMaintain.vue +504 -504
  60. package/src/filiale/zhongsheng/BlackListList.vue +293 -293
  61. package/src/filiale/zhongyi/HandQueryUser.vue +389 -389
  62. package/src/main.js +3 -3
@@ -1,625 +1,625 @@
1
- <template>
2
- <div class="flex-row">
3
- <div class="span" style="overflow-y: auto;min-height: 500px;">
4
- <validator name='v'>
5
- <form novalidate class="form-horizontal">
6
- <!-- <div class="row" style="margin-top:10px;">-->
7
- <!-- -->
8
- <!-- </div>-->
9
- <div style="margin-top:10px;" v-for="(index, row) in model.otherdetail">
10
- <div class="row">
11
- <div class="col-sm-4" :class="{'select-error': row.f_brand_spec.length === 0 && config.checkFlag}">
12
- <label for="f_brand_spec" class="font_normal_body " title="参数名称:品名及规格">{{brandType}}</label>
13
- <v-select id="f_brand_spec"
14
- placeholder='请选择'
15
- v-model="row.f_brand_spec"
16
- :value.sync="row.f_brand_spec"
17
- :options='brandspec'
18
- @change="setTypename(row,index)"
19
- close-on-select clear-button>
20
- </v-select>
21
- </div>
22
- <div class="col-sm-4" :class="{'has-success':row.f_typename,'has-error':!row.f_typename}">
23
- <label for="f_typename" class=" font_normal_body">&nbsp;品名规格</label>
24
- <v-select
25
- style="width: 100px"
26
- v-model="row.f_typename"
27
- placeholder='请选择'
28
- :value.sync="row.f_typename"
29
- :options='row.typeNameList'
30
- @change="setTypenumber(row,index)"
31
- close-on-select clear-button>
32
- </v-select>
33
- </div>
34
- <div class="col-sm-4" :class="{'has-success':row.f_typenumber,'has-error':!row.f_typenumber}">
35
- <label for="f_typenumber" class=" font_normal_body">&nbsp;型&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号</label>
36
- <v-select
37
- style="width: 100px"
38
- v-model="row.f_typenumber"
39
- placeholder='请选择'
40
- :value.sync="row.f_typenumber"
41
- :options='row.typenumberList'
42
- @change="setTypeprice(index)"
43
- close-on-select clear-button>
44
- </v-select>
45
- </div>
46
- </div>
47
- <div class="row">
48
- <div class="col-sm-4" :class="{'has-success':row.f_unitprice,'has-error':!row.f_unitprice}">
49
- <label style="" for="f_unitprice" class=" font_normal_body">*单&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;价</label>
50
- <input class="input_search" style="width:60%" type="number" min="1" @input.prevent="getcollection()"
51
- v-model="row.f_unitprice"
52
- :value.sync="row.f_unitprice"
53
- v-validate:f_unitprice='{required: true}'
54
- :disabled="false"
55
- placeholder="单价" v-next-el='sl'>
56
- </div>
57
- <div class="col-sm-4" :class="{'has-success':row.f_number,'has-error':!row.f_number}">
58
- <label style="" for="f_number" class="font_normal_body">*数&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;量</label>
59
- <input class="input_search" style="width:60%" type="number" min='1' @input.prevent="getcollection()"
60
- v-validate:f_number='{required: true, dctest: [0, ">" ] }'
61
- v-model="row.f_number"
62
- :value.sync="row.f_number"
63
- placeholder="数量" v-next-el='sk' v-el:sl>
64
- </div>
65
- <div style="padding-top:10px">
66
- <button type="button" class="glyphicon glyphicon-minus btn-danger"
67
- @click.stop="delthisdetail($index)"></button>&nbsp;&nbsp;&nbsp;
68
- <button type="button" class="glyphicon glyphicon-plus btn-success" @click.stop="addadetail()"></button>
69
- </div>
70
- </div>
71
- </div>
72
- <div class="row" style="margin-top:10px;">
73
- <div class="col-sm-4 form-group" :class="[$v.payment.required ? 'select-error' : '']">
74
- <label class=" font_normal_body" title="参数名称:付款方式">收款方式</label>
75
- <input type="text" v-show="false" v-model="$refs.payment.selectedItems"
76
- v-validate:payment='{required: true }'>
77
- <v-select v-model="model.f_payment"
78
- placeholder='请选择'
79
- :value.sync="model.f_payment"
80
- close-on-select
81
- :options='paytype' clear-button v-ref:payment></v-select>
82
- </div>
83
- <div class="col-sm-4">
84
- <label for="f_print" class="font_normal_body">&nbsp;打印格式</label>
85
- <v-select id="print"
86
- v-model="f_print"
87
- placeholder='请选择'
88
- :value.sync="model.f_print"
89
- :options='printstyle'
90
- close-on-select clear-button>
91
- </v-select>
92
- </div>
93
- <div class="col-sm-4">
94
- <label for="f_collection" class="font_normal_body">&nbsp;收&emsp;&emsp;款</label>
95
- <label for="f_collection" class="font_normal_body">{{ model.f_collection }}</label>
96
- </div>
97
- </div>
98
- <div class="row" style="margin-top:10px;" v-if="model.f_payment[0].includes('POS')">
99
- <div class="col-sm-4">
100
- <label for="f_voucher_number" class="font_normal_body">&nbsp;&nbsp;&nbsp;凭证号</label>
101
- <input type="text" class="input_search" style="width:60%" v-model="model.f_voucher_number"
102
- placeholder="凭证号">
103
- </div>
104
- </div>
105
- <div class="row" style="margin-top:10px;">
106
- <div class="col-sm-4">
107
- <label for="f_voucher_number" class="font_normal_body">服务人员</label>
108
- <v-select v-model="model.f_service_person"
109
- placeholder='请选择'
110
- :value.sync="model.f_service_person"
111
- :options='services'
112
- close-on-select clear-button>
113
- </v-select>
114
- </div>
115
- <div class="col-sm-4" v-if="!mjshow" >
116
- <label for="f_serial_number" class=" font_normal_body">业务单号</label>
117
- <input class="input_search" style="width:60%" type="text"
118
- v-model="model.f_serial_number" placeholder="业务单号">
119
- </div>
120
- <div class="col-sm-4" v-if="mjshow" :class="[$v.f_serial_number.required || $v.f_serial_number.dctest ? 'has-error' : 'has-success']">
121
- <label for="f_serial_number" class=" font_normal_body">业务单号</label>
122
- <input class="input_search" style="width:60%" type="text" v-validate:f_serial_number='{required: true }'
123
- v-model="model.f_serial_number" placeholder="业务单号">
124
- </div>
125
- <div class="col-sm-4">
126
- <label for="f_voucher_number" class="font_normal_body">&nbsp;付&nbsp;款&nbsp;人</label>
127
- <input type="text" class="input_search" style="width:60%" v-model="model.f_payer"
128
- placeholder="付款人">
129
- </div>
130
- </div>
131
- <div class="row" style="margin-top:10px;">
132
- <div class="col-sm-12">
133
- <label for="f_comments" class=" font_normal_body">备&emsp;&emsp;注</label>
134
- <input type="text" class="input_search" style="width:85%" v-model="model.f_comments" rows="1"
135
- placeholder="备注">
136
- </div>
137
- </div>
138
- </form>
139
- <validate-bill v-if="hasValidateBill" :data="model" @validate-bill="validateBill"></validate-bill>
140
- <print-bill :show="print" :data='row' :bill-config='config' :bill-data='billData' v-on:toggle="close"
141
- @printok="printok" v-ref:printbill></print-bill>
142
- <ticket-print :show="eticket_show" @toggle="eticket_toggle" v-ref:eticketbill></ticket-print>
143
- <eticket-modal :show="eticket_msg" @closemodalshow="eticket_msg = false" :row="row" @confirm="confirm"></eticket-modal>
144
- <!-- <print-other-charge-bill :show="print" v-ref:printbill :row='row' :logic='model' v-on:success="close" v-on:toggle="close"></print-other-charge-bill> -->
145
- <!-- <tax-other-bill :show="taxprint" v-ref:taxprintbill :row='row' :logic='model' v-on:success="close" v-on:toggle="close"></tax-other-bill> -->
146
- <div style="text-align:right;height: 25%;">
147
- <button v-if="config.modificationList" class="button_search" @click="confirm(true)"
148
- :disabled=' validflag || validateOk || chargetypecheckflag'>确认并转单
149
- </button>
150
- <payment-code-button :clickable=" validflag || validateOk || chargetypecheckflag"
151
- :payment.sync="model.f_payment" :payment-data="paytype"
152
- @confirm-payment="confirm()">
153
- </payment-code-button>
154
- <button class="button_search btn-gn" v-if="authArr.includes('其它欠费生成')" @click="createQianfei()"
155
- :disabled=' validflag || validateOk || !model.f_collection'>生成欠费
156
- </button>
157
- <button class="button_search btn-gn" @click="checkInvoiceMsg()" :disabled='validflag || validateOk || chargetypecheckflag || !model.f_collection'>确认
158
- </button>
159
- <button class="button_clear btn-gn" @click="clean()">取消</button>
160
- </div>
161
- </validator>
162
- <upload :blodid="row.f_userinfo_id" v-if="config.showupload" :businessid="randomBusinessId" isremark="true" fusetype="其他收费"></upload>
163
- </div>
164
- <payment-code v-ref:paymentcode :payment="model.f_payment" :row="row" :money="model.f_collection"></payment-code>
165
- </div>
166
- </template>
167
- <script>
168
- import {HttpResetClass} from 'vue-client'
169
- let otherChargeGen = async function (self, parameter) {
170
- try {
171
- // 加入扫码盒付款码支付流水号
172
- self.model.f_serial_id = self.$refs.paymentcode.paymentCodeReturnData.f_out_trade_no
173
- console.log('11111', self.model)
174
- let resid = await self.$LogicService.otherCharge(self.model, self.row)
175
- console.log('其他收费返回id', resid, self.config.hasPrint, self.$login.r.includes('不打印发票'))
176
- if (self.config.showupload) {
177
- let param = []
178
- for (let row of self.resid) {
179
- param.push({id: row.id})
180
- }
181
- let data = {
182
- param: param,
183
- f_blobid: resid.data
184
- }
185
- await self.$resetpost('api/af-revenue/logic/updatefiles', data)
186
- }
187
- if (self.config.dispatch) {
188
- await self.$showMessage(`是否添加派工单`, ['confirm', 'cancel']).then((res) => {
189
- if (res === 'confirm') {
190
- console.log('其他收费xinxi', self.model)
191
- console.log('其他收费xinxi', self.row)
192
- let batch = {
193
- sf_id: resid.data,
194
- f_userinfo_code: self.row.f_userinfo_code,
195
- f_dispathch_name: self.row.f_user_name,
196
- f_phone: self.row.f_user_phone,
197
- f_dispathch_address: self.row.f_address,
198
- f_meternumber: self.row.f_meternumber,
199
- f_dispathch_type: '安装',
200
- f_source: '其他收费',
201
- f_money: self.model.f_collection,
202
- f_remarks: self.model.f_comments,
203
- f_operator_date: self.$login.toStandardTimeString(),
204
- f_orgid: self.$login.f.orgid,
205
- f_dispathch_state: '待分配'
206
- }
207
- console.log('111:', batch)
208
- self.$resetpost('api/af-revenue/logic/savePatch', batch).then((res1) => {
209
- // this.params.rows.splice(index, 1)
210
- console.log('更新成功!', res1.data.id)
211
- })
212
- }
213
- })
214
- }
215
- let localeSustainMoney = window.localStorage.getItem('sustainMoney')
216
- if (localeSustainMoney != null) {
217
- localeSustainMoney = (localeSustainMoney - 0) + (self.model.f_collection - 0)
218
- window.localStorage.setItem('sustainMoney', localeSustainMoney)
219
- }
220
- // // 转燃气改装工程单
221
- // if (self.config.modificationList && parameter) {
222
- // let printSheet = {
223
- // f_userinfo_id: self.row.f_userinfo_id,
224
- // f_charge_id: resid.data,
225
- // f_state: '有效',
226
- // f_print_state: '未打印',
227
- // f_type: '改装单',
228
- // f_orgid: self.$login.f.orgid ? self.$login.f.orgid : '',
229
- // f_orgname: self.$login.f.orgs ? self.$login.f.orgs : '',
230
- // f_depid: self.$login.f.depids ? self.$login.f.depids : '',
231
- // f_depname: self.$login.f.deps ? self.$login.f.deps : '',
232
- // f_operator: self.$login.f.name,
233
- // f_operatorid: self.$login.f.id
234
- // }
235
- // await self.$resetpost('api/af-revenue/logic/savePrintSheet', {data: {printData: printSheet}}, {
236
- // resolveMsg: '',
237
- // rejectMsg: '转单失败, 请重试'
238
- // })
239
- // }
240
- if (self.config.hasPrint && !self.$login.r.includes('不打印发票')) {
241
- if (self.printInvoiceType.indexOf(self.model.f_print) === -1) {
242
- if (self.config.hasBillManage) {
243
- self.row.id = resid.data
244
- self.row.f_bill_type = '其他收费'
245
- self.row.f_bill_style = self.model.f_print[0]
246
- self.print = true
247
- } else {
248
- self.row.id = resid.data
249
- self.print = true
250
- }
251
- } else if (self.model.f_print[0] === '国税发票') {
252
- // TODO
253
- self.$dispatch('success')
254
- } else if (self.printInvoiceType.indexOf(self.model.f_print[0]) !== -1) {
255
- self.eticket_show = true
256
- self.row.f_print = self.model.f_print[0]
257
- await self.$refs.eticketbill.openETicket(resid.data, self.row, '其他收费', '其他收费', '其他收费', self.model.f_print[0])
258
- // self.$CommonService.openEticket(resid.data, '其他收费')
259
- // self.$dispatch('success')
260
- }
261
- } else {
262
- self.$dispatch('success')
263
- }
264
- } catch (error) {
265
- console.log(error)
266
- self.$showAlert(error, 'danger', 0)
267
- self.$dispatch('refresh')
268
- }
269
- }
270
-
271
- let asyncOtherCharge = async function (self) {
272
- await self.$getConfig(self, 'OtherCharge')
273
- self.model.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
274
- self.model.f_payment = [self.config.payment]
275
- self.model.otherdetail[0].f_brand_spec = [self.config.brandspec]
276
- self.model.f_service_person = [self.config.services]
277
-
278
- self.model.f_use_type = self.config.billType
279
- self.model.f_bill_type = self.model.f_print
280
- self.hasValidateBill = self.config.hasBillManage
281
- self.initSecuritypersons()
282
- // self.setTypename(self.model.f_brand_spec[0])
283
- }
284
- export default {
285
- title: '其他收费',
286
- data () {
287
- return {
288
- config: {
289
- showupload: true,
290
- // 验证收费类型是否必填
291
- checkFlag: false,
292
- modificationList: false,
293
- dispatch: false,
294
- hasPrint: true, // 默认打票
295
- hasBillManage: false, // 默认不启用发票管理
296
- billType: '其他费用', // 票据类型(燃气费,其他费用,调用的发票代码不同)
297
- printType: '普通收据', // 收据/电子票/专用发票/国税发票
298
- payment: '现金缴费', // 付款方式
299
- brandspec: '材料费', // 收费类型
300
- services: this.$login.f.name // 服务人员
301
- },
302
- randomBusinessId: '',
303
- resid: [], // 存放新增的f_files表中id
304
- model: {
305
- f_print: [],
306
- f_payment: '现金缴费',
307
- f_number: 0,
308
- f_unitprice: 0,
309
- f_collection: 0,
310
- f_comments: '',
311
- f_voucher_number: '',
312
- f_service_person: '',
313
- f_payer: '',
314
- // 用户其他费用信息
315
- t_userfees: '',
316
- f_fee_type: ['其他费用'],
317
- f_fee_time: ['12'],
318
- otherdetail: [{f_brand_spec: [''], typeNameList: [], f_typenumber: '', typenumberList: [], f_unitprice: '', f_number: ''}]
319
- },
320
- eticket_msg: false,
321
- mjshow: false,
322
- eticket_show: false,
323
- invoice_is_pax: '征税',
324
- is_pax: [{label: '征税', value: '征税'}, {label: '不征税', value: '不征税'}],
325
- print: false,
326
- taxprint: false,
327
- billData: {
328
- url: 'api/af-revenue/report/otherCharge_bill',
329
- bill: ''
330
- },
331
-
332
- // 启用发票管理需要对票号进行验证
333
- hasValidateBill: false,
334
- validateOk: false,
335
- f_typenumber: '',
336
- typeNameList: [],
337
- typenumberList: [],
338
- brandspec: this.$appdata.getParam('品名及规格'),
339
- brandType: this.$appdata.getSingleValue('其他收费类型') ? this.$appdata.getSingleValue('其他收费类型') : '收费类型',
340
- printInvoiceType: this.$appdata.getSingleValue('电子票打印类型') ? this.$appdata.getSingleValue('电子票打印类型') : '电子发票',
341
- printstyle: this.$appdata.getParam('打印格式'),
342
- paytype: this.$appdata.getParam('付款方式'),
343
- feetype: this.$appdata.getParam('其他费用'),
344
- services: this.$appdata.getParam('服务人员'),
345
- isflag: false
346
- }
347
- },
348
- props: ['row'],
349
- ready () {
350
- // this.model.f_unitprice = this.$appdata.getSingleValue('置换气费')
351
- asyncOtherCharge(this)
352
- this.getRandomId()
353
- },
354
- watch: {
355
- 'model.f_fee_type' (val) {
356
- if (val[0]) {
357
- this.userfees(this.row.f_userinfo_id, val[0])
358
- }
359
- },
360
- 'model.f_payment' (val) {
361
- let _payment = this.$appdata.getSingleValue('需要输入业务单号的付款方式') || ''
362
- this.mjshow = (val === '免交' || _payment.includes(val))
363
- }
364
- },
365
- events: {
366
- // 删除Resid数组元素
367
- 'delResid' (val) {
368
- this.resid.$remove({id: val, f_biobid: ''})
369
- // this.resid.splice(this.resid.indexOf({id:val,f_biobid:''}),1);
370
- },
371
- // 增加Resid数组元素
372
- 'resid' (val) {
373
- this.resid.push({id: val, f_biobid: ''})
374
- }
375
- },
376
- methods: {
377
- getRandomId () {
378
- this.randomBusinessId = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
379
- let res = Math.random() * 16 | 0
380
- let v = c == 'x' ? res : (res & 0x3 | 0x8)
381
- return v.toString(16)
382
- })
383
- },
384
- // 初始化安检人
385
- initSecuritypersons () {
386
- let origin = this.$appdata.getSingleValue('服务人员来源')
387
- if (origin) {
388
- try {
389
- this.services = []
390
- let http = new HttpResetClass()
391
- http.load('post', '/rs/search', {
392
- source: `this.getParentByType($organization$).getChildByName($${origin}$).getUsers()`,
393
- userid: this.$login.f.id
394
- }, {resolveMsg: null, rejectMsg: null}).then((res) => {
395
- console.log('获取安检人员', res.data)
396
- for (let i = 0; i < res.data.length; i++) {
397
- this.services.push({label: res.data[i].name, value: res.data[i].name})
398
- }
399
- })
400
- } catch (e) {
401
- console.log('获取安检人员失败')
402
- }
403
- }
404
- },
405
- setTypeprice (val) {
406
- console.log('单价变化:', val)
407
- if (this.model.otherdetail[val] && this.model.otherdetail[val].f_typenumber[0]) {
408
- let unitprice = this.$appdata.getSingleValue(this.model.otherdetail[val].f_typenumber[0])
409
- if (unitprice) {
410
- this.model.otherdetail[val].f_unitprice = Number(unitprice)
411
- }
412
- }
413
- },
414
- async createQianfei () {
415
- let data = {
416
- f_serial_id: this.model.f_serial_id,
417
- record_userinfo: this.row.f_userinfo_id,
418
- f_serial_number: this.model.f_serial_number,
419
- f_userfiles_id: this.row.f_userfiles_id,
420
- f_user_id: this.row.f_user_id,
421
- f_user_name: this.row.f_user_name,
422
- f_address: this.row.f_address,
423
- f_user_type: this.row.f_user_type,
424
- f_gasproperties: this.row.f_gasproperties,
425
- // f_number: model.f_number,
426
- // f_unitprice: model.f_unitprice,
427
- f_collection: this.model.f_collection,
428
- f_comments: this.model.f_comments,
429
- f_payment: this.model.f_payment[0],
430
- f_voucher_number: this.model.f_voucher_number,
431
- f_bill_style: this.model.f_print[0],
432
- // f_brand_spec: model.f_brand_spec[0],
433
- f_userinfo_id: this.row.f_userinfo_id,
434
- f_service_person: this.model.f_service_person[0],
435
- f_operat_type: '其他收费欠费登记',
436
- f_describe: `${this.$login.f.name}对客户${this.row.f_user_name}进行其他收费欠费登记操作`,
437
- f_state: '有效',
438
- f_operator: this.$login.f.name,
439
- f_operatorid: this.$login.f.id,
440
- f_orgid: this.$login.f.orgid,
441
- f_orgname: this.$login.f.orgs,
442
- f_depid: this.$login.f.depids,
443
- f_depname: this.$login.f.deps,
444
- f_zoneid: this.$login.f.zoneid,
445
- f_zones: this.$login.f.zones,
446
- f_is_pay: '否',
447
- // 其他费用信息
448
- t_userfees: this.model.t_userfees,
449
- f_fee_type: this.model.f_fee_type[0],
450
- f_fee_time: this.model.f_fee_time[0],
451
- otherdetail: this.model.otherdetail
452
- }
453
- if (this.$appdata.getSingleValue('其他欠费审核') === '启用') {
454
- data.f_state = '待审核'
455
- }
456
- await this.$resetpost('api/af-revenue/logic/sale_othercharge_logic_nopay', data, {
457
- resolveMsg: '生成其他欠费成功',
458
- rejectMsg: '生成其他欠费失败'
459
- })
460
- this.$dispatch('success')
461
- },
462
- // 校验发票信息
463
- checkInvoiceMsg () {
464
- if (this.printInvoiceType.indexOf(this.model.f_print[0]) !== -1) {
465
- if (!this.row.f_taxpayer_id) {
466
- this.row.f_taxpayer_id = this.row.f_idnumber
467
- }
468
- if (!this.row.f_paper_name) {
469
- this.row.f_paper_name = this.row.f_user_name
470
- }
471
- if (!this.row.f_address_phone) {
472
- this.row.f_address_phone = this.row.f_address + ' ' + this.row.f_user_phone
473
- }
474
- if (!this.row.f_email) {
475
- this.row.f_email = this.row.f_email
476
- }
477
- this.eticket_msg = true
478
- } else {
479
- this.confirm()
480
- }
481
- },
482
- eticket_toggle () {
483
- this.eticket_show = false
484
- this.$dispatch('success')
485
- },
486
- async setTypename (val, index) {
487
- this.model.otherdetail[index].f_typenumber = ''
488
- this.model.otherdetail[index].typeNameList = this.$appdata.getParam(val.f_brand_spec[0])
489
- this.model.otherdetail[index].typenumberList = []
490
- this.model.otherdetail[index].f_unitprice = ''
491
- let self = this
492
- if (val == '开卡费') {
493
- if (this.$appdata.getSingleValue('开卡费')) {
494
- let money = this.$appdata.getSingleValue('开卡费')
495
- await this.model.otherdetail.forEach(function (item) {
496
- self.isflag = false
497
- if (item.f_brand_spec[0] == '开卡费') {
498
- item.f_unitprice = money
499
- item.f_number = 1
500
- self.isflag = true
501
- }
502
- })
503
- this.getcollection()
504
- }
505
- }
506
- },
507
- setTypenumber (val, index) {
508
- this.model.otherdetail[index].typenumberList = this.$appdata.getParam(val.f_typename[0 ])
509
- this.model.otherdetail[index].f_unitprice = ''
510
- },
511
- async confirm (parameter) {
512
- let res = await this.$showMessage(`确定对客户${this.row.f_user_name}进行其他收费吗?`, ['confirm', 'cancel'])
513
- if (res != 'confirm') return
514
- this.eticket_msg = false
515
- // 先调用付款码支付组件流程
516
- let ss = await this.$refs.paymentcode.flowPath()
517
- this.$refs.paymentcode.paymentCodeShow = false
518
- console.log('付款码操作返回', ss)
519
- if (!ss.result) return
520
- otherChargeGen(this, parameter)
521
- },
522
- clean () {
523
- this.$dispatch('refresh', this.row)
524
- },
525
- close () {
526
- this.taxprint = false
527
- this.print = false
528
- this.clean()
529
- },
530
- printok () {
531
- this.$dispatch('success')
532
- },
533
- validateBill (val) {
534
- this.validateOk = !val.isOk
535
- this.billData.bill = val.bill
536
- },
537
- getcollection () {
538
- let money = 0
539
- let flag = true
540
- this.model.otherdetail.forEach((item) => {
541
- if (!item.f_number || item.f_number == '0') flag = false
542
- if (!item.f_unitprice || item.f_unitprice == '0') flag = false
543
- if (item.f_unitprice && item.f_number) {
544
- money += ((item.f_unitprice - 0) * (item.f_number - 0)) - 0
545
- } else {
546
- flag = false
547
- this.model.f_collection = 0
548
- }
549
- })
550
- if (money != 0) {
551
- this.model.f_collection = money.toFixed(2)
552
- }
553
- if (!flag) this.model.f_collection = ''
554
- },
555
- addadetail () {
556
- this.$set(`model.otherdetail[${this.model.otherdetail.length}]`, {f_brand_spec: [''], f_typenumber: '', typeNameList: [], typenumberList: [], f_unitprice: '', f_number: ''})
557
- console.log(JSON.stringify(this.model.otherdetail))
558
- },
559
- delthisdetail (index) {
560
- if (this.model.otherdetail.length > 1) {
561
- this.model.otherdetail.splice(index, 1)
562
- this.getcollection()
563
- }
564
- },
565
- async userfees (userinfoid, feetype) {
566
- this.model.t_userfees = await this.$resetpost('api/af-revenue/sql/saleSingleTable', {
567
- data: {
568
- tablename: 't_userfees',
569
- condition: `f_userinfo_id=${userinfoid} and f_fee_type='${feetype}'`
570
- }
571
- }, {resolveMsg: null, rejectMsg: '查询客户其他费用失败!'})
572
- }
573
- },
574
- computed: {
575
- validflag () {
576
- console.log(this.isflag)
577
- console.log(this.$v.valid)
578
- if (this.isflag) {
579
- if (this.model.f_collection && this.model.f_collection != '') {
580
- let collection = (parseFloat(this.model.f_collection - 0)).toFixed(2)
581
- if (collection > 0) return !this.isflag
582
- else return !this.$v.valid
583
- } else {
584
- return !this.$v.valid
585
- }
586
- } else {
587
- return !this.$v.valid
588
- }
589
- },
590
- // 验证收费类型是否必填
591
- chargetypecheckflag () {
592
- let b = false
593
- if (this.config.checkFlag) {
594
- this.model.otherdetail.forEach((item) => {
595
- if (item.f_brand_spec && item.f_brand_spec.length === 0) {
596
- b = true
597
- }
598
- })
599
- }
600
- return b
601
- },
602
- feetime () {
603
- return [{label: '一个月', value: '1'}, {label: '三个月', value: '3'}, {label: '六个月', value: '6'}, {
604
- label: '一年',
605
- value: '12'
606
- }]
607
- },
608
-
609
- authArr () {
610
- console.log('this.$login.r:', this.$login.r)
611
- console.log('this.$login.r.includes:', this.$login.r.includes('收费综合导出权限'))
612
- return this.$login.r ? this.$login.r : []
613
- },
614
- gettypename () {
615
- return this.typeNameList
616
- },
617
- gettypenumber () {
618
- return this.typenumberList
619
- }
620
- }
621
- }
622
- </script>
623
-
624
- <style>
625
- </style>
1
+ <template>
2
+ <div class="flex-row">
3
+ <div class="span" style="overflow-y: auto;min-height: 500px;">
4
+ <validator name='v'>
5
+ <form novalidate class="form-horizontal">
6
+ <!-- <div class="row" style="margin-top:10px;">-->
7
+ <!-- -->
8
+ <!-- </div>-->
9
+ <div style="margin-top:10px;" v-for="(index, row) in model.otherdetail">
10
+ <div class="row">
11
+ <div class="col-sm-4" :class="{'select-error': row.f_brand_spec.length === 0 && config.checkFlag}">
12
+ <label for="f_brand_spec" class="font_normal_body " title="参数名称:品名及规格">{{brandType}}</label>
13
+ <v-select id="f_brand_spec"
14
+ placeholder='请选择'
15
+ v-model="row.f_brand_spec"
16
+ :value.sync="row.f_brand_spec"
17
+ :options='brandspec'
18
+ @change="setTypename(row,index)"
19
+ close-on-select clear-button>
20
+ </v-select>
21
+ </div>
22
+ <div class="col-sm-4" :class="{'has-success':row.f_typename,'has-error':!row.f_typename}">
23
+ <label for="f_typename" class=" font_normal_body">&nbsp;品名规格</label>
24
+ <v-select
25
+ style="width: 100px"
26
+ v-model="row.f_typename"
27
+ placeholder='请选择'
28
+ :value.sync="row.f_typename"
29
+ :options='row.typeNameList'
30
+ @change="setTypenumber(row,index)"
31
+ close-on-select clear-button>
32
+ </v-select>
33
+ </div>
34
+ <div class="col-sm-4" :class="{'has-success':row.f_typenumber,'has-error':!row.f_typenumber}">
35
+ <label for="f_typenumber" class=" font_normal_body">&nbsp;型&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号</label>
36
+ <v-select
37
+ style="width: 100px"
38
+ v-model="row.f_typenumber"
39
+ placeholder='请选择'
40
+ :value.sync="row.f_typenumber"
41
+ :options='row.typenumberList'
42
+ @change="setTypeprice(index)"
43
+ close-on-select clear-button>
44
+ </v-select>
45
+ </div>
46
+ </div>
47
+ <div class="row">
48
+ <div class="col-sm-4" :class="{'has-success':row.f_unitprice,'has-error':!row.f_unitprice}">
49
+ <label style="" for="f_unitprice" class=" font_normal_body">*单&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;价</label>
50
+ <input class="input_search" style="width:60%" type="number" min="1" @input.prevent="getcollection()"
51
+ v-model="row.f_unitprice"
52
+ :value.sync="row.f_unitprice"
53
+ v-validate:f_unitprice='{required: true}'
54
+ :disabled="false"
55
+ placeholder="单价" v-next-el='sl'>
56
+ </div>
57
+ <div class="col-sm-4" :class="{'has-success':row.f_number,'has-error':!row.f_number}">
58
+ <label style="" for="f_number" class="font_normal_body">*数&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;量</label>
59
+ <input class="input_search" style="width:60%" type="number" min='1' @input.prevent="getcollection()"
60
+ v-validate:f_number='{required: true, dctest: [0, ">" ] }'
61
+ v-model="row.f_number"
62
+ :value.sync="row.f_number"
63
+ placeholder="数量" v-next-el='sk' v-el:sl>
64
+ </div>
65
+ <div style="padding-top:10px">
66
+ <button type="button" class="glyphicon glyphicon-minus btn-danger"
67
+ @click.stop="delthisdetail($index)"></button>&nbsp;&nbsp;&nbsp;
68
+ <button type="button" class="glyphicon glyphicon-plus btn-success" @click.stop="addadetail()"></button>
69
+ </div>
70
+ </div>
71
+ </div>
72
+ <div class="row" style="margin-top:10px;">
73
+ <div class="col-sm-4 form-group" :class="[$v.payment.required ? 'select-error' : '']">
74
+ <label class=" font_normal_body" title="参数名称:付款方式">收款方式</label>
75
+ <input type="text" v-show="false" v-model="$refs.payment.selectedItems"
76
+ v-validate:payment='{required: true }'>
77
+ <v-select v-model="model.f_payment"
78
+ placeholder='请选择'
79
+ :value.sync="model.f_payment"
80
+ close-on-select
81
+ :options='paytype' clear-button v-ref:payment></v-select>
82
+ </div>
83
+ <div class="col-sm-4">
84
+ <label for="f_print" class="font_normal_body">&nbsp;打印格式</label>
85
+ <v-select id="print"
86
+ v-model="f_print"
87
+ placeholder='请选择'
88
+ :value.sync="model.f_print"
89
+ :options='printstyle'
90
+ close-on-select clear-button>
91
+ </v-select>
92
+ </div>
93
+ <div class="col-sm-4">
94
+ <label for="f_collection" class="font_normal_body">&nbsp;收&emsp;&emsp;款</label>
95
+ <label for="f_collection" class="font_normal_body">{{ model.f_collection }}</label>
96
+ </div>
97
+ </div>
98
+ <div class="row" style="margin-top:10px;" v-if="model.f_payment[0].includes('POS')">
99
+ <div class="col-sm-4">
100
+ <label for="f_voucher_number" class="font_normal_body">&nbsp;&nbsp;&nbsp;凭证号</label>
101
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_voucher_number"
102
+ placeholder="凭证号">
103
+ </div>
104
+ </div>
105
+ <div class="row" style="margin-top:10px;">
106
+ <div class="col-sm-4">
107
+ <label for="f_voucher_number" class="font_normal_body">服务人员</label>
108
+ <v-select v-model="model.f_service_person"
109
+ placeholder='请选择'
110
+ :value.sync="model.f_service_person"
111
+ :options='services'
112
+ close-on-select clear-button>
113
+ </v-select>
114
+ </div>
115
+ <div class="col-sm-4" v-if="!mjshow" >
116
+ <label for="f_serial_number" class=" font_normal_body">业务单号</label>
117
+ <input class="input_search" style="width:60%" type="text"
118
+ v-model="model.f_serial_number" placeholder="业务单号">
119
+ </div>
120
+ <div class="col-sm-4" v-if="mjshow" :class="[$v.f_serial_number.required || $v.f_serial_number.dctest ? 'has-error' : 'has-success']">
121
+ <label for="f_serial_number" class=" font_normal_body">业务单号</label>
122
+ <input class="input_search" style="width:60%" type="text" v-validate:f_serial_number='{required: true }'
123
+ v-model="model.f_serial_number" placeholder="业务单号">
124
+ </div>
125
+ <div class="col-sm-4">
126
+ <label for="f_voucher_number" class="font_normal_body">&nbsp;付&nbsp;款&nbsp;人</label>
127
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_payer"
128
+ placeholder="付款人">
129
+ </div>
130
+ </div>
131
+ <div class="row" style="margin-top:10px;">
132
+ <div class="col-sm-12">
133
+ <label for="f_comments" class=" font_normal_body">备&emsp;&emsp;注</label>
134
+ <input type="text" class="input_search" style="width:85%" v-model="model.f_comments" rows="1"
135
+ placeholder="备注">
136
+ </div>
137
+ </div>
138
+ </form>
139
+ <validate-bill v-if="hasValidateBill" :data="model" @validate-bill="validateBill"></validate-bill>
140
+ <print-bill :show="print" :data='row' :bill-config='config' :bill-data='billData' v-on:toggle="close"
141
+ @printok="printok" v-ref:printbill></print-bill>
142
+ <ticket-print :show="eticket_show" @toggle="eticket_toggle" v-ref:eticketbill></ticket-print>
143
+ <eticket-modal :show="eticket_msg" @closemodalshow="eticket_msg = false" :row="row" @confirm="confirm"></eticket-modal>
144
+ <!-- <print-other-charge-bill :show="print" v-ref:printbill :row='row' :logic='model' v-on:success="close" v-on:toggle="close"></print-other-charge-bill> -->
145
+ <!-- <tax-other-bill :show="taxprint" v-ref:taxprintbill :row='row' :logic='model' v-on:success="close" v-on:toggle="close"></tax-other-bill> -->
146
+ <div style="text-align:right;height: 25%;">
147
+ <button v-if="config.modificationList" class="button_search" @click="confirm(true)"
148
+ :disabled=' validflag || validateOk || chargetypecheckflag'>确认并转单
149
+ </button>
150
+ <payment-code-button :clickable=" validflag || validateOk || chargetypecheckflag"
151
+ :payment.sync="model.f_payment" :payment-data="paytype"
152
+ @confirm-payment="confirm()">
153
+ </payment-code-button>
154
+ <button class="button_search btn-gn" v-if="authArr.includes('其它欠费生成')" @click="createQianfei()"
155
+ :disabled=' validflag || validateOk || !model.f_collection'>生成欠费
156
+ </button>
157
+ <button class="button_search btn-gn" @click="checkInvoiceMsg()" :disabled='validflag || validateOk || chargetypecheckflag || !model.f_collection'>确认
158
+ </button>
159
+ <button class="button_clear btn-gn" @click="clean()">取消</button>
160
+ </div>
161
+ </validator>
162
+ <upload :blodid="row.f_userinfo_id" v-if="config.showupload" :businessid="randomBusinessId" isremark="true" fusetype="其他收费"></upload>
163
+ </div>
164
+ <payment-code v-ref:paymentcode :payment="model.f_payment" :row="row" :money="model.f_collection"></payment-code>
165
+ </div>
166
+ </template>
167
+ <script>
168
+ import {HttpResetClass} from 'vue-client'
169
+ let otherChargeGen = async function (self, parameter) {
170
+ try {
171
+ // 加入扫码盒付款码支付流水号
172
+ self.model.f_serial_id = self.$refs.paymentcode.paymentCodeReturnData.f_out_trade_no
173
+ console.log('11111', self.model)
174
+ let resid = await self.$LogicService.otherCharge(self.model, self.row)
175
+ console.log('其他收费返回id', resid, self.config.hasPrint, self.$login.r.includes('不打印发票'))
176
+ if (self.config.showupload) {
177
+ let param = []
178
+ for (let row of self.resid) {
179
+ param.push({id: row.id})
180
+ }
181
+ let data = {
182
+ param: param,
183
+ f_blobid: resid.data
184
+ }
185
+ await self.$resetpost('api/af-revenue/logic/updatefiles', data)
186
+ }
187
+ if (self.config.dispatch) {
188
+ await self.$showMessage(`是否添加派工单`, ['confirm', 'cancel']).then((res) => {
189
+ if (res === 'confirm') {
190
+ console.log('其他收费xinxi', self.model)
191
+ console.log('其他收费xinxi', self.row)
192
+ let batch = {
193
+ sf_id: resid.data,
194
+ f_userinfo_code: self.row.f_userinfo_code,
195
+ f_dispathch_name: self.row.f_user_name,
196
+ f_phone: self.row.f_user_phone,
197
+ f_dispathch_address: self.row.f_address,
198
+ f_meternumber: self.row.f_meternumber,
199
+ f_dispathch_type: '安装',
200
+ f_source: '其他收费',
201
+ f_money: self.model.f_collection,
202
+ f_remarks: self.model.f_comments,
203
+ f_operator_date: self.$login.toStandardTimeString(),
204
+ f_orgid: self.$login.f.orgid,
205
+ f_dispathch_state: '待分配'
206
+ }
207
+ console.log('111:', batch)
208
+ self.$resetpost('api/af-revenue/logic/savePatch', batch).then((res1) => {
209
+ // this.params.rows.splice(index, 1)
210
+ console.log('更新成功!', res1.data.id)
211
+ })
212
+ }
213
+ })
214
+ }
215
+ let localeSustainMoney = window.localStorage.getItem('sustainMoney')
216
+ if (localeSustainMoney != null) {
217
+ localeSustainMoney = (localeSustainMoney - 0) + (self.model.f_collection - 0)
218
+ window.localStorage.setItem('sustainMoney', localeSustainMoney)
219
+ }
220
+ // // 转燃气改装工程单
221
+ // if (self.config.modificationList && parameter) {
222
+ // let printSheet = {
223
+ // f_userinfo_id: self.row.f_userinfo_id,
224
+ // f_charge_id: resid.data,
225
+ // f_state: '有效',
226
+ // f_print_state: '未打印',
227
+ // f_type: '改装单',
228
+ // f_orgid: self.$login.f.orgid ? self.$login.f.orgid : '',
229
+ // f_orgname: self.$login.f.orgs ? self.$login.f.orgs : '',
230
+ // f_depid: self.$login.f.depids ? self.$login.f.depids : '',
231
+ // f_depname: self.$login.f.deps ? self.$login.f.deps : '',
232
+ // f_operator: self.$login.f.name,
233
+ // f_operatorid: self.$login.f.id
234
+ // }
235
+ // await self.$resetpost('api/af-revenue/logic/savePrintSheet', {data: {printData: printSheet}}, {
236
+ // resolveMsg: '',
237
+ // rejectMsg: '转单失败, 请重试'
238
+ // })
239
+ // }
240
+ if (self.config.hasPrint && !self.$login.r.includes('不打印发票')) {
241
+ if (self.printInvoiceType.indexOf(self.model.f_print) === -1) {
242
+ if (self.config.hasBillManage) {
243
+ self.row.id = resid.data
244
+ self.row.f_bill_type = '其他收费'
245
+ self.row.f_bill_style = self.model.f_print[0]
246
+ self.print = true
247
+ } else {
248
+ self.row.id = resid.data
249
+ self.print = true
250
+ }
251
+ } else if (self.model.f_print[0] === '国税发票') {
252
+ // TODO
253
+ self.$dispatch('success')
254
+ } else if (self.printInvoiceType.indexOf(self.model.f_print[0]) !== -1) {
255
+ self.eticket_show = true
256
+ self.row.f_print = self.model.f_print[0]
257
+ await self.$refs.eticketbill.openETicket(resid.data, self.row, '其他收费', '其他收费', '其他收费', self.model.f_print[0])
258
+ // self.$CommonService.openEticket(resid.data, '其他收费')
259
+ // self.$dispatch('success')
260
+ }
261
+ } else {
262
+ self.$dispatch('success')
263
+ }
264
+ } catch (error) {
265
+ console.log(error)
266
+ self.$showAlert(error, 'danger', 0)
267
+ self.$dispatch('refresh')
268
+ }
269
+ }
270
+
271
+ let asyncOtherCharge = async function (self) {
272
+ await self.$getConfig(self, 'OtherCharge')
273
+ self.model.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
274
+ self.model.f_payment = [self.config.payment]
275
+ self.model.otherdetail[0].f_brand_spec = [self.config.brandspec]
276
+ self.model.f_service_person = [self.config.services]
277
+
278
+ self.model.f_use_type = self.config.billType
279
+ self.model.f_bill_type = self.model.f_print
280
+ self.hasValidateBill = self.config.hasBillManage
281
+ self.initSecuritypersons()
282
+ // self.setTypename(self.model.f_brand_spec[0])
283
+ }
284
+ export default {
285
+ title: '其他收费',
286
+ data () {
287
+ return {
288
+ config: {
289
+ showupload: true,
290
+ // 验证收费类型是否必填
291
+ checkFlag: false,
292
+ modificationList: false,
293
+ dispatch: false,
294
+ hasPrint: true, // 默认打票
295
+ hasBillManage: false, // 默认不启用发票管理
296
+ billType: '其他费用', // 票据类型(燃气费,其他费用,调用的发票代码不同)
297
+ printType: '普通收据', // 收据/电子票/专用发票/国税发票
298
+ payment: '现金缴费', // 付款方式
299
+ brandspec: '材料费', // 收费类型
300
+ services: this.$login.f.name // 服务人员
301
+ },
302
+ randomBusinessId: '',
303
+ resid: [], // 存放新增的f_files表中id
304
+ model: {
305
+ f_print: [],
306
+ f_payment: '现金缴费',
307
+ f_number: 0,
308
+ f_unitprice: 0,
309
+ f_collection: 0,
310
+ f_comments: '',
311
+ f_voucher_number: '',
312
+ f_service_person: '',
313
+ f_payer: '',
314
+ // 用户其他费用信息
315
+ t_userfees: '',
316
+ f_fee_type: ['其他费用'],
317
+ f_fee_time: ['12'],
318
+ otherdetail: [{f_brand_spec: [''], typeNameList: [], f_typenumber: '', typenumberList: [], f_unitprice: '', f_number: ''}]
319
+ },
320
+ eticket_msg: false,
321
+ mjshow: false,
322
+ eticket_show: false,
323
+ invoice_is_pax: '征税',
324
+ is_pax: [{label: '征税', value: '征税'}, {label: '不征税', value: '不征税'}],
325
+ print: false,
326
+ taxprint: false,
327
+ billData: {
328
+ url: 'api/af-revenue/report/otherCharge_bill',
329
+ bill: ''
330
+ },
331
+
332
+ // 启用发票管理需要对票号进行验证
333
+ hasValidateBill: false,
334
+ validateOk: false,
335
+ f_typenumber: '',
336
+ typeNameList: [],
337
+ typenumberList: [],
338
+ brandspec: this.$appdata.getParam('品名及规格'),
339
+ brandType: this.$appdata.getSingleValue('其他收费类型') ? this.$appdata.getSingleValue('其他收费类型') : '收费类型',
340
+ printInvoiceType: this.$appdata.getSingleValue('电子票打印类型') ? this.$appdata.getSingleValue('电子票打印类型') : '电子发票',
341
+ printstyle: this.$appdata.getParam('打印格式'),
342
+ paytype: this.$appdata.getParam('付款方式'),
343
+ feetype: this.$appdata.getParam('其他费用'),
344
+ services: this.$appdata.getParam('服务人员'),
345
+ isflag: false
346
+ }
347
+ },
348
+ props: ['row'],
349
+ ready () {
350
+ // this.model.f_unitprice = this.$appdata.getSingleValue('置换气费')
351
+ asyncOtherCharge(this)
352
+ this.getRandomId()
353
+ },
354
+ watch: {
355
+ 'model.f_fee_type' (val) {
356
+ if (val[0]) {
357
+ this.userfees(this.row.f_userinfo_id, val[0])
358
+ }
359
+ },
360
+ 'model.f_payment' (val) {
361
+ let _payment = this.$appdata.getSingleValue('需要输入业务单号的付款方式') || ''
362
+ this.mjshow = (val === '免交' || _payment.includes(val))
363
+ }
364
+ },
365
+ events: {
366
+ // 删除Resid数组元素
367
+ 'delResid' (val) {
368
+ this.resid.$remove({id: val, f_biobid: ''})
369
+ // this.resid.splice(this.resid.indexOf({id:val,f_biobid:''}),1);
370
+ },
371
+ // 增加Resid数组元素
372
+ 'resid' (val) {
373
+ this.resid.push({id: val, f_biobid: ''})
374
+ }
375
+ },
376
+ methods: {
377
+ getRandomId () {
378
+ this.randomBusinessId = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
379
+ let res = Math.random() * 16 | 0
380
+ let v = c == 'x' ? res : (res & 0x3 | 0x8)
381
+ return v.toString(16)
382
+ })
383
+ },
384
+ // 初始化安检人
385
+ initSecuritypersons () {
386
+ let origin = this.$appdata.getSingleValue('服务人员来源')
387
+ if (origin) {
388
+ try {
389
+ this.services = []
390
+ let http = new HttpResetClass()
391
+ http.load('post', '/rs/search', {
392
+ source: `this.getParentByType($organization$).getChildByName($${origin}$).getUsers()`,
393
+ userid: this.$login.f.id
394
+ }, {resolveMsg: null, rejectMsg: null}).then((res) => {
395
+ console.log('获取安检人员', res.data)
396
+ for (let i = 0; i < res.data.length; i++) {
397
+ this.services.push({label: res.data[i].name, value: res.data[i].name})
398
+ }
399
+ })
400
+ } catch (e) {
401
+ console.log('获取安检人员失败')
402
+ }
403
+ }
404
+ },
405
+ setTypeprice (val) {
406
+ console.log('单价变化:', val)
407
+ if (this.model.otherdetail[val] && this.model.otherdetail[val].f_typenumber[0]) {
408
+ let unitprice = this.$appdata.getSingleValue(this.model.otherdetail[val].f_typenumber[0])
409
+ if (unitprice) {
410
+ this.model.otherdetail[val].f_unitprice = Number(unitprice)
411
+ }
412
+ }
413
+ },
414
+ async createQianfei () {
415
+ let data = {
416
+ f_serial_id: this.model.f_serial_id,
417
+ record_userinfo: this.row.f_userinfo_id,
418
+ f_serial_number: this.model.f_serial_number,
419
+ f_userfiles_id: this.row.f_userfiles_id,
420
+ f_user_id: this.row.f_user_id,
421
+ f_user_name: this.row.f_user_name,
422
+ f_address: this.row.f_address,
423
+ f_user_type: this.row.f_user_type,
424
+ f_gasproperties: this.row.f_gasproperties,
425
+ // f_number: model.f_number,
426
+ // f_unitprice: model.f_unitprice,
427
+ f_collection: this.model.f_collection,
428
+ f_comments: this.model.f_comments,
429
+ f_payment: this.model.f_payment[0],
430
+ f_voucher_number: this.model.f_voucher_number,
431
+ f_bill_style: this.model.f_print[0],
432
+ // f_brand_spec: model.f_brand_spec[0],
433
+ f_userinfo_id: this.row.f_userinfo_id,
434
+ f_service_person: this.model.f_service_person[0],
435
+ f_operat_type: '其他收费欠费登记',
436
+ f_describe: `${this.$login.f.name}对客户${this.row.f_user_name}进行其他收费欠费登记操作`,
437
+ f_state: '有效',
438
+ f_operator: this.$login.f.name,
439
+ f_operatorid: this.$login.f.id,
440
+ f_orgid: this.$login.f.orgid,
441
+ f_orgname: this.$login.f.orgs,
442
+ f_depid: this.$login.f.depids,
443
+ f_depname: this.$login.f.deps,
444
+ f_zoneid: this.$login.f.zoneid,
445
+ f_zones: this.$login.f.zones,
446
+ f_is_pay: '否',
447
+ // 其他费用信息
448
+ t_userfees: this.model.t_userfees,
449
+ f_fee_type: this.model.f_fee_type[0],
450
+ f_fee_time: this.model.f_fee_time[0],
451
+ otherdetail: this.model.otherdetail
452
+ }
453
+ if (this.$appdata.getSingleValue('其他欠费审核') === '启用') {
454
+ data.f_state = '待审核'
455
+ }
456
+ await this.$resetpost('api/af-revenue/logic/sale_othercharge_logic_nopay', data, {
457
+ resolveMsg: '生成其他欠费成功',
458
+ rejectMsg: '生成其他欠费失败'
459
+ })
460
+ this.$dispatch('success')
461
+ },
462
+ // 校验发票信息
463
+ checkInvoiceMsg () {
464
+ if (this.printInvoiceType.indexOf(this.model.f_print[0]) !== -1) {
465
+ if (!this.row.f_taxpayer_id) {
466
+ this.row.f_taxpayer_id = this.row.f_idnumber
467
+ }
468
+ if (!this.row.f_paper_name) {
469
+ this.row.f_paper_name = this.row.f_user_name
470
+ }
471
+ if (!this.row.f_address_phone) {
472
+ this.row.f_address_phone = this.row.f_address + ' ' + this.row.f_user_phone
473
+ }
474
+ if (!this.row.f_email) {
475
+ this.row.f_email = this.row.f_email
476
+ }
477
+ this.eticket_msg = true
478
+ } else {
479
+ this.confirm()
480
+ }
481
+ },
482
+ eticket_toggle () {
483
+ this.eticket_show = false
484
+ this.$dispatch('success')
485
+ },
486
+ async setTypename (val, index) {
487
+ this.model.otherdetail[index].f_typenumber = ''
488
+ this.model.otherdetail[index].typeNameList = this.$appdata.getParam(val.f_brand_spec[0])
489
+ this.model.otherdetail[index].typenumberList = []
490
+ this.model.otherdetail[index].f_unitprice = ''
491
+ let self = this
492
+ if (val == '开卡费') {
493
+ if (this.$appdata.getSingleValue('开卡费')) {
494
+ let money = this.$appdata.getSingleValue('开卡费')
495
+ await this.model.otherdetail.forEach(function (item) {
496
+ self.isflag = false
497
+ if (item.f_brand_spec[0] == '开卡费') {
498
+ item.f_unitprice = money
499
+ item.f_number = 1
500
+ self.isflag = true
501
+ }
502
+ })
503
+ this.getcollection()
504
+ }
505
+ }
506
+ },
507
+ setTypenumber (val, index) {
508
+ this.model.otherdetail[index].typenumberList = this.$appdata.getParam(val.f_typename[0 ])
509
+ this.model.otherdetail[index].f_unitprice = ''
510
+ },
511
+ async confirm (parameter) {
512
+ let res = await this.$showMessage(`确定对客户${this.row.f_user_name}进行其他收费吗?`, ['confirm', 'cancel'])
513
+ if (res != 'confirm') return
514
+ this.eticket_msg = false
515
+ // 先调用付款码支付组件流程
516
+ let ss = await this.$refs.paymentcode.flowPath()
517
+ this.$refs.paymentcode.paymentCodeShow = false
518
+ console.log('付款码操作返回', ss)
519
+ if (!ss.result) return
520
+ otherChargeGen(this, parameter)
521
+ },
522
+ clean () {
523
+ this.$dispatch('refresh', this.row)
524
+ },
525
+ close () {
526
+ this.taxprint = false
527
+ this.print = false
528
+ this.clean()
529
+ },
530
+ printok () {
531
+ this.$dispatch('success')
532
+ },
533
+ validateBill (val) {
534
+ this.validateOk = !val.isOk
535
+ this.billData.bill = val.bill
536
+ },
537
+ getcollection () {
538
+ let money = 0
539
+ let flag = true
540
+ this.model.otherdetail.forEach((item) => {
541
+ if (!item.f_number || item.f_number == '0') flag = false
542
+ if (!item.f_unitprice || item.f_unitprice == '0') flag = false
543
+ if (item.f_unitprice && item.f_number) {
544
+ money += ((item.f_unitprice - 0) * (item.f_number - 0)) - 0
545
+ } else {
546
+ flag = false
547
+ this.model.f_collection = 0
548
+ }
549
+ })
550
+ if (money != 0) {
551
+ this.model.f_collection = money.toFixed(2)
552
+ }
553
+ if (!flag) this.model.f_collection = ''
554
+ },
555
+ addadetail () {
556
+ this.$set(`model.otherdetail[${this.model.otherdetail.length}]`, {f_brand_spec: [''], f_typenumber: '', typeNameList: [], typenumberList: [], f_unitprice: '', f_number: ''})
557
+ console.log(JSON.stringify(this.model.otherdetail))
558
+ },
559
+ delthisdetail (index) {
560
+ if (this.model.otherdetail.length > 1) {
561
+ this.model.otherdetail.splice(index, 1)
562
+ this.getcollection()
563
+ }
564
+ },
565
+ async userfees (userinfoid, feetype) {
566
+ this.model.t_userfees = await this.$resetpost('api/af-revenue/sql/saleSingleTable', {
567
+ data: {
568
+ tablename: 't_userfees',
569
+ condition: `f_userinfo_id=${userinfoid} and f_fee_type='${feetype}'`
570
+ }
571
+ }, {resolveMsg: null, rejectMsg: '查询客户其他费用失败!'})
572
+ }
573
+ },
574
+ computed: {
575
+ validflag () {
576
+ console.log(this.isflag)
577
+ console.log(this.$v.valid)
578
+ if (this.isflag) {
579
+ if (this.model.f_collection && this.model.f_collection != '') {
580
+ let collection = (parseFloat(this.model.f_collection - 0)).toFixed(2)
581
+ if (collection > 0) return !this.isflag
582
+ else return !this.$v.valid
583
+ } else {
584
+ return !this.$v.valid
585
+ }
586
+ } else {
587
+ return !this.$v.valid
588
+ }
589
+ },
590
+ // 验证收费类型是否必填
591
+ chargetypecheckflag () {
592
+ let b = false
593
+ if (this.config.checkFlag) {
594
+ this.model.otherdetail.forEach((item) => {
595
+ if (item.f_brand_spec && item.f_brand_spec.length === 0) {
596
+ b = true
597
+ }
598
+ })
599
+ }
600
+ return b
601
+ },
602
+ feetime () {
603
+ return [{label: '一个月', value: '1'}, {label: '三个月', value: '3'}, {label: '六个月', value: '6'}, {
604
+ label: '一年',
605
+ value: '12'
606
+ }]
607
+ },
608
+
609
+ authArr () {
610
+ console.log('this.$login.r:', this.$login.r)
611
+ console.log('this.$login.r.includes:', this.$login.r.includes('收费综合导出权限'))
612
+ return this.$login.r ? this.$login.r : []
613
+ },
614
+ gettypename () {
615
+ return this.typeNameList
616
+ },
617
+ gettypenumber () {
618
+ return this.typenumberList
619
+ }
620
+ }
621
+ }
622
+ </script>
623
+
624
+ <style>
625
+ </style>