sale-client 3.6.21 → 3.6.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.
Files changed (88) hide show
  1. package/build/dev-server.js +1 -1
  2. package/package.json +2 -2
  3. package/src/components/FilesManage/FileUserFiles.vue +1014 -1014
  4. package/src/components/FilesManage/FileUserMerge.vue +203 -203
  5. package/src/components/FilesManage/UserPaperInfoTest.vue +58 -51
  6. package/src/components/FilesManageNew/FileUserFiles.vue +756 -756
  7. package/src/components/FilesManageNew/FileUserMerge.vue +202 -202
  8. package/src/components/charge/business/CardMeterCenter.vue +944 -944
  9. package/src/components/charge/business/IOTMeterCenter.vue +793 -793
  10. package/src/components/charge/business/OtherChargeNew.vue +550 -550
  11. package/src/components/charge/business/machine/MachineMeterCenter.vue +676 -676
  12. package/src/components/charge/gasloss/gasLossOperate.vue +383 -383
  13. package/src/components/newBill/CardMeterCenter.vue +902 -902
  14. package/src/components/newBill/IOTMeterCenter.vue +797 -797
  15. package/src/components/revenue/Common/EticketModal.vue +95 -90
  16. package/src/components/revenue/comprehen/Maintenance/T+MoneyDocking/moneyDocking.vue +202 -202
  17. package/src/components/revenue/comprehen/SpecialUser/BasicLiving/BasicLivingList.vue +280 -280
  18. package/src/filiale/alashan/business/CardMeterCenter.vue +897 -897
  19. package/src/filiale/ancheng/FilesManage/FileUserFiles.vue +1010 -1010
  20. package/src/filiale/ancheng/FilesManageNew/FileUserFiles.vue +763 -763
  21. package/src/filiale/chengtou/components/FilesManage/FileUserFiles.vue +1019 -1019
  22. package/src/filiale/chengtou/components/OtherChargeNew.vue +549 -549
  23. package/src/filiale/dongguan/components/FilesManage/FileUserFiles.vue +1037 -1037
  24. package/src/filiale/gaomi/components/FilesManage/FileUserFiles.vue +934 -934
  25. package/src/filiale/gehua/CardMeterCenter.vue +898 -898
  26. package/src/filiale/gehua/FileManageNew/FileUserFiles.vue +769 -769
  27. package/src/filiale/gehua/FileUserFiles.vue +1007 -1007
  28. package/src/filiale/gehua/IOTMeterCenter.vue +791 -791
  29. package/src/filiale/gehua/MachineMeterCenter.vue +685 -685
  30. package/src/filiale/gehua/OtherChargeNew.vue +558 -558
  31. package/src/filiale/guangxi/CardMeterCenter.vue +891 -891
  32. package/src/filiale/guangxi/IOTMeterCenter.vue +774 -774
  33. package/src/filiale/guangxi/MachineMeterCenter.vue +622 -622
  34. package/src/filiale/haile/MachineMeterCenter.vue +762 -762
  35. package/src/filiale/huayin/CardMeterCenter.vue +903 -903
  36. package/src/filiale/huayin/FileUserFiles.vue +1007 -1007
  37. package/src/filiale/huayin/IOTMeterCenter.vue +796 -796
  38. package/src/filiale/huayin/MachineMeterCenter.vue +680 -680
  39. package/src/filiale/jingwei/CardMeterCenter.vue +870 -870
  40. package/src/filiale/jingwei/FileUserFiles.vue +905 -905
  41. package/src/filiale/jingwei/ShowCardSellGas.vue +903 -903
  42. package/src/filiale/kelai/CardMeterCenter.vue +934 -934
  43. package/src/filiale/kelai/FileUserFiles.vue +762 -762
  44. package/src/filiale/kelai/IOTMeterCenter.vue +833 -833
  45. package/src/filiale/kelai/MachineMeterCenter.vue +705 -705
  46. package/src/filiale/konggang/FileUserFiles.vue +990 -990
  47. package/src/filiale/liaoyuan/FileUserFiles.vue +844 -844
  48. package/src/filiale/macheng/CardMeterCenter.vue +939 -939
  49. package/src/filiale/macheng/FileUserFiles.vue +930 -930
  50. package/src/filiale/meihekou/FileUserFiles.vue +995 -995
  51. package/src/filiale/ningjin/FileUserFiles.vue +1020 -1020
  52. package/src/filiale/qianneng/OtherChargeNew.vue +544 -544
  53. package/src/filiale/qianneng/eticket/EticketModal.vue +96 -91
  54. package/src/filiale/qianneng/eticket/EticketPrint.vue +377 -376
  55. package/src/filiale/qianneng/eticket/EticketRecordList.vue +309 -289
  56. package/src/filiale/qianneng/machine/MachineMeterCenter.vue +676 -676
  57. package/src/filiale/rizhao/FileUserFiles.vue +984 -984
  58. package/src/filiale/rizhao/IOTMeterCenter.vue +795 -795
  59. package/src/filiale/rongcheng/FileUserFiles.vue +881 -881
  60. package/src/filiale/rongcheng/FilesManageNew/FileUserFiles.vue +732 -732
  61. package/src/filiale/rongcheng/FilesManageNew/FileUserMerge.vue +202 -202
  62. package/src/filiale/shanggao/FileUserFiles.vue +995 -995
  63. package/src/filiale/shangluo/CardMeterCenter.vue +892 -892
  64. package/src/filiale/shangluo/IOTMeterCenter.vue +797 -797
  65. package/src/filiale/shangluo/MachineMeterCenter.vue +734 -734
  66. package/src/filiale/shanxian/OtherChargeNew.vue +561 -561
  67. package/src/filiale/shanxian/components/FilesManage/FileUserFiles.vue +1004 -1004
  68. package/src/filiale/shanxian/components/FilesManageNew/FileUserFiles.vue +756 -756
  69. package/src/filiale/shanxian/components/revenue/CardMeterCenter.vue +944 -944
  70. package/src/filiale/shaoguan/FilesManage/FileUserFiles.vue +881 -881
  71. package/src/filiale/shaoguan/FilesManageNew/FileUserFiles.vue +734 -734
  72. package/src/filiale/shexian/FilesManage/FileUserFiles.vue +991 -991
  73. package/src/filiale/tongchuan/BasicLivingList.vue +253 -253
  74. package/src/filiale/tongchuan/CardMeterCenter.vue +923 -923
  75. package/src/filiale/tongchuan/FileUserFiles.vue +1206 -1206
  76. package/src/filiale/tongchuan/bill/EticketModal.vue +90 -90
  77. package/src/filiale/tongchuan/filemanagenew/FileUserFiles.vue +842 -842
  78. package/src/filiale/wenxi/CardMeterCenter.vue +942 -942
  79. package/src/filiale/wenxi/FileUserFiles.vue +1032 -1032
  80. package/src/filiale/wenxi/IOTMeterCenter.vue +774 -774
  81. package/src/filiale/wuan/FileUserFiles.vue +1006 -1006
  82. package/src/filiale/wuhai/CardMeterCenter.vue +945 -945
  83. package/src/filiale/wuhai/IOTMeterCenter.vue +757 -757
  84. package/src/filiale/yuansheng/CardMeterCenter.vue +950 -950
  85. package/src/filiale/yuansheng/IOTMeterCenter.vue +788 -788
  86. package/src/filiale/zhongsheng/FilesManage/FileUserFiles.vue +1038 -1038
  87. package/src/filiale/zhongyi/FileUserFiles.vue +1020 -1020
  88. package/src/main.js +27 -27
@@ -1,544 +1,544 @@
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="row in model.otherdetail">
10
- <div class="row">
11
- <div class="col-sm-4" :class="[$v.brand.required ? 'has-error' : '']">
12
- <input type="text" v-show="false" v-model="$refs.brand.selectedItems"
13
- v-validate:brand='{required: true }'>
14
- <label for="f_brand_spec" class="font_normal_body " title="参数名称:其他收费收费类型">收费类型</label>
15
- <v-select id="f_brand_spec"
16
- placeholder='材料'
17
- v-model="row.f_brand_spec"
18
- :value.sync="row.f_brand_spec"
19
- :options='brandspec'
20
- @change="setTypename(row.f_brand_spec, row)"
21
- close-on-select clear-button v-ref:brand>
22
- </v-select>
23
- </div>
24
- <div class="col-sm-4" :class="[$v.typename.required ? 'has-error' : '']">
25
- <input type="text" v-show="false" v-model="$refs.typename.selectedItems"
26
- v-validate:typename='{required: true }'>
27
- <label for="f_typename" class=" font_normal_body">&nbsp;品名规格</label>
28
- <v-select
29
- style="width: 100px"
30
- v-model="row.f_typename"
31
- placeholder='品名'
32
- :value.sync="row.f_typename"
33
- :options='row.typeNameList'
34
- @change="setTypenumber(row.f_typename, row)"
35
- close-on-select clear-button v-ref:typename>
36
- </v-select>
37
- </div>
38
- <div class="col-sm-4" :class="{'has-success':row.f_typenumber,'has-error':!row.f_typenumber}">
39
- <label for="f_typenumber" class=" font_normal_body">&nbsp;型&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号</label>
40
- <v-select
41
- style="width: 100px"
42
- v-model="row.f_typenumber"
43
- placeholder='型号'
44
- :value.sync="row.f_typenumber"
45
- :options='row.typenumberList'
46
- @change="setTypeprice(row.f_typenumber, row)"
47
- close-on-select clear-button>
48
- </v-select>
49
- </div>
50
- </div>
51
- <div class="row">
52
- <div class="col-sm-4" :class="{'has-success':row.f_unitprice,'has-error':!row.f_unitprice}">
53
- <label style="" for="f_unitprice" class=" font_normal_body">*单&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;价</label>
54
- <input class="input_search" style="width:60%" type="number" min="0" @blur.prevent="getcollection()"
55
- v-validate:f_unitprice='{required: true, dctest: [0, ">=" ] }'
56
- v-model="row.f_unitprice"
57
- :value.sync="row.f_unitprice"
58
- placeholder="单价" v-next-el='sl'>
59
- </div>
60
- <div class="col-sm-4" :class="{'has-success':row.f_number,'has-error':!row.f_number}">
61
- <label style="" for="f_number" class="font_normal_body">*数&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;量</label>
62
- <input class="input_search" style="width:60%" type="number" min='0' @blur.prevent="getcollection()"
63
- v-validate:f_number='{required: true, dctest: [0, ">=" ] }'
64
- v-model="row.f_number"
65
- :value.sync="row.f_number"
66
- placeholder="数量" v-next-el='sk' v-el:sl>
67
- </div>
68
- <div style="padding-top:10px">
69
- <button type="button" class="glyphicon glyphicon-minus btn-danger"
70
- @click.stop="delthisdetail($index)"></button>&nbsp;&nbsp;&nbsp;
71
- <button type="button" class="glyphicon glyphicon-plus btn-success" @click.stop="addadetail()"></button>
72
- </div>
73
- </div>
74
- <!-- <div class="row" style="margin-top:10px;" v-if="row.f_brand_spec[0]=='其他费用'">-->
75
- <!-- <div class="col-sm-4" :class="[$v.f_fee_type.required ? 'has-error' : 'has-success']">-->
76
- <!-- <input v-validate:f_fee_type='{required: true}' v-model="row.f_fee_type" v-show="false"/>-->
77
- <!-- <label for="f_fee_type" class="font_normal_body ">其他收费类型</label>-->
78
- <!-- <v-select id="f_fee_type"-->
79
- <!-- v-model="row.f_fee_type"-->
80
- <!-- placeholder='请选择'-->
81
- <!-- :value.sync="row.f_fee_type"-->
82
- <!-- :options='feetype'-->
83
- <!-- close-on-select clear-button>-->
84
- <!-- </v-select>-->
85
- <!-- </div>-->
86
-
87
- <!-- <div class="col-sm-4">-->
88
- <!-- <label for="f_fee_time" class="font_normal_body">本次购买时间</label>-->
89
- <!-- <v-select id="f_fee_time"-->
90
- <!-- v-model="row.f_fee_time"-->
91
- <!-- placeholder='请选择'-->
92
- <!-- :value.sync="row.f_fee_time"-->
93
- <!-- :options='feetime'-->
94
- <!-- close-on-select clear-button>-->
95
- <!-- </v-select>-->
96
- <!-- </div>-->
97
- <!-- </div>-->
98
-
99
- </div>
100
-
101
-
102
- <div class="row" style="margin-top:10px;">
103
- <div class="col-sm-4" :class="[$v.payment.required ? 'has-error' : '']">
104
- <label for="f_payment" class="font_normal_body" title="参数名称:付款方式">收款方式</label>
105
- <input type="text" v-show="false" v-model="$refs.payment.selectedItems"
106
- v-validate:payment='{required: true }'>
107
- <v-select id="f_payment"
108
- v-model="f_payment"
109
- placeholder='请选择'
110
- :value.sync="model.f_payment"
111
- :options='paytype'
112
- close-on-select clear-button v-ref:payment>
113
- </v-select>
114
- </div>
115
- <div class="col-sm-4">
116
- <label for="print" class="font_normal_body">&nbsp;打印格式</label>
117
- <v-select id="print"
118
- v-model="f_print"
119
- placeholder='请选择'
120
- :value.sync="model.f_print"
121
- :options='printstyle'
122
- close-on-select clear-button>
123
- </v-select>
124
- </div>
125
- <div class="col-sm-4">
126
- <label for="f_collection" class="font_normal_body">&nbsp;收&emsp;&emsp;款</label>
127
- <label for="f_collection" class="font_normal_body">{{model.f_collection}}</label>
128
- </div>
129
- </div>
130
- <div class="row" style="margin-top:10px;" v-if="model.f_payment[0].includes('POS')">
131
- <div class="col-sm-4">
132
- <label for="f_voucher_number" class="font_normal_body">&nbsp;&nbsp;&nbsp;凭证号</label>
133
- <input type="text" class="input_search" style="width:60%" v-model="model.f_voucher_number"
134
- placeholder="凭证号">
135
- </div>
136
- </div>
137
- <div class="row" style="margin-top:10px;">
138
- <div class="col-sm-4">
139
- <label for="f_voucher_number" class="font_normal_body">服务人员</label>
140
- <v-select v-model="model.f_service_person"
141
- placeholder='请选择'
142
- :value.sync="model.f_service_person"
143
- :options='services'
144
- close-on-select clear-button>
145
- </v-select>
146
- </div>
147
- <div class="col-sm-8">
148
- <label for="f_comments" class=" font_normal_body">&nbsp;备&emsp;&emsp;注</label>
149
- <input type="text" class="input_search" style="width:80%" v-model="model.f_comments" rows="1"
150
- placeholder="备注">
151
- </div>
152
- </div>
153
- </form>
154
- <validate-bill v-if="hasValidateBill" :data="model" @validate-bill="validateBill"></validate-bill>
155
- <print-bill :show="print" :data='row' :bill-config='config' :bill-data='billData' v-on:toggle="close"
156
- @printok="printok" v-ref:printbill></print-bill>
157
- <ticket-print :show="eticket_show" @toggle="eticket_toggle" v-ref:eticketbill></ticket-print>
158
- <eticket-modal :show="eticket_msg" @close-modal-show="eticket_msg = false" :row="row" @confirm="confirm"></eticket-modal>
159
- <!-- <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> -->
160
- <!-- <tax-other-bill :show="taxprint" v-ref:taxprintbill :row='row' :logic='model' v-on:success="close" v-on:toggle="close"></tax-other-bill> -->
161
- <div style="text-align:right;height: 25%;">
162
- <button v-if="config.modificationList" class="button_search" @click="confirm(true)"
163
- :disabled=' validflag || validateOk'>确认并转单
164
- </button>
165
- <payment-code-button :clickable=" validflag || validateOk"
166
- :payment.sync="model.f_payment" :payment-data="paytype"
167
- @confirm-payment="confirm()">
168
- </payment-code-button>
169
- <button class="button_search btn-gn" v-if="authArr.includes('其它欠费生成')" @click="createQianfei()" :disabled=' validflag || validateOk'>生成欠费</button>
170
- <button class="button_search btn-gn" @click="checkInvoiceMsg()" :disabled=' validflag || false'>确认</button>
171
- <button class="button_clear btn-gn" @click="clean()">取消</button>
172
- </div>
173
- </validator>
174
-
175
- </div>
176
- <payment-code v-ref:paymentcode :payment="model.f_payment" :row="row" :money="model.f_collection"></payment-code>
177
- </div>
178
- </template>
179
- <script>
180
- let otherChargeGen = async function (self, parameter) {
181
- try {
182
- // 加入扫码盒付款码支付流水号
183
- self.model.f_serial_id = self.$refs.paymentcode.paymentCodeReturnData.f_out_trade_no
184
- console.log('11111', self.model)
185
- let resid = await self.$LogicService.otherCharge(self.model, self.row)
186
- console.log('其他收费返回id', resid, self.config.hasPrint, self.$login.r.includes('不打印发票'))
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('rs/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('rs/logic/savePrintSheet', {data: {printData: printSheet}}, {
236
- // resolveMsg: '',
237
- // rejectMsg: '转单失败, 请重试'
238
- // })
239
- // }
240
- if (self.config.hasPrint && !self.$login.r.includes('不打印发票')) {
241
- if (self.model.f_print[0] != '电子发票') {
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.model.f_print[0] === '电子发票') {
255
- self.eticket_show = true
256
- await self.$refs.eticketbill.openETicket([resid.data], self.row, '其他收费')
257
- // self.$CommonService.openEticket(resid.data, '其他收费')
258
- // self.$dispatch('success')
259
- }
260
- } else {
261
- self.$dispatch('success')
262
- }
263
- } catch (error) {
264
- console.log(error)
265
- self.$showAlert(error, 'danger', 0)
266
- self.$dispatch('refresh')
267
- }
268
- }
269
-
270
- let asyncOtherCharge = async function (self) {
271
- await self.$getConfig(self, 'OtherCharge')
272
- self.model.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
273
- self.model.f_payment = [self.config.payment]
274
- self.model.otherdetail[0].f_brand_spec = [self.config.brandspec]
275
- self.model.f_use_type = self.config.billType
276
- self.model.f_bill_type = self.model.f_print
277
- self.hasValidateBill = self.config.hasBillManage
278
- self.setTypename(self.model.otherdetail[0].f_brand_spec, self.model.otherdetail[0])
279
- }
280
- export default {
281
- title: '其他收费',
282
- data () {
283
- return {
284
- config: {
285
- modificationList: false,
286
- dispatch: false,
287
- hasPrint: true, // 默认打票
288
- hasBillManage: false, // 默认不启用发票管理
289
- billType: '其他费用', // 票据类型(燃气费,其他费用,调用的发票代码不同)
290
- printType: '普通收据', // 收据/电子票/专用发票/国税发票
291
- payment: '现金缴费', // 付款方式
292
- brandspec: '材料费' // 收费类型
293
- },
294
- model: {
295
- f_print: [],
296
- f_payment: '现金缴费',
297
- f_number: 0,
298
- f_unitprice: 0,
299
- f_collection: 0,
300
- f_comments: '',
301
- f_voucher_number: '',
302
- f_service_person: '',
303
- // 用户其他费用信息
304
- t_userfees: '',
305
- f_fee_type: [],
306
- f_fee_time: ['12'],
307
- otherdetail: [{f_brand_spec: [''], f_unitprice: '', f_number: '', typeNameList: [], typenumberList: []}]
308
- },
309
- eticket_msg: false,
310
- eticket_show: false,
311
- invoice_is_pax: '征税',
312
- is_pax: [{label: '征税', value: '征税'}, {label: '不征税', value: '不征税'}],
313
- print: false,
314
- taxprint: false,
315
- billData: {
316
- url: 'rs/report/otherCharge_bill',
317
- bill: ''
318
- },
319
-
320
- // 启用发票管理需要对票号进行验证
321
- hasValidateBill: false,
322
- validateOk: false,
323
- f_typenumber: '',
324
- typeNameList: [],
325
- typenumberList: [],
326
- brandspec: this.$appdata.getParam('其他收费收费类型') ? this.$appdata.getParam('其他收费收费类型') : [],
327
- printstyle: this.$appdata.getParam('打印格式'),
328
- paytype: this.$appdata.getParam('付款方式'),
329
- feetype: this.$appdata.getParam('其他费用'),
330
- services: this.$appdata.getParam('服务人员'),
331
- isflag: false
332
- }
333
- },
334
- props: ['row'],
335
- ready () {
336
- // this.model.f_unitprice = this.$appdata.getSingleValue('置换气费')
337
- asyncOtherCharge(this)
338
- },
339
- watch: {
340
- 'model.otherdetail' (val) {
341
- },
342
- 'model.f_fee_type' (val) {
343
- if (val[0]) {
344
- this.userfees(this.row.f_userinfo_id, val[0])
345
- }
346
- }
347
- },
348
- methods: {
349
- setTypeprice (val, row) {
350
- console.log('f_typenumber', this.f_typenumber)
351
- if (this.f_typenumber !== ' ') {
352
- let unitprice = this.$appdata.getSingleValue(val)
353
- console.log('unitprice', unitprice)
354
- if (unitprice !== undefined) {
355
- row.f_unitprice = unitprice
356
- }
357
- }
358
- },
359
- async createQianfei () {
360
- let data = {
361
- f_serial_id: this.model.f_serial_id,
362
- record_userinfo: this.row.f_userinfo_id,
363
- f_serial_number: this.model.f_serial_number,
364
- f_userfiles_id: this.row.f_userfiles_id,
365
- f_user_id: this.row.f_user_id,
366
- f_user_name: this.row.f_user_name,
367
- f_address: this.row.f_address,
368
- f_user_type: this.row.f_user_type,
369
- f_gasproperties: this.row.f_gasproperties,
370
- // f_number: model.f_number,
371
- // f_unitprice: model.f_unitprice,
372
- f_collection: this.model.f_collection,
373
- f_comments: this.model.f_comments,
374
- f_payment: this.model.f_payment[0],
375
- f_voucher_number: this.model.f_voucher_number,
376
- f_bill_style: this.model.f_print[0],
377
- // f_brand_spec: model.f_brand_spec[0],
378
- f_userinfo_id: this.row.f_userinfo_id,
379
- f_service_person: this.model.f_service_person[0],
380
- f_operat_type: '其他收费欠费登记',
381
- f_describe: `${this.$login.f.name}对客户${this.row.f_user_name}进行其他收费欠费登记操作`,
382
- f_state: '有效',
383
- f_operator: this.$login.f.name,
384
- f_operatorid: this.$login.f.id,
385
- f_orgid: this.$login.f.orgid,
386
- f_orgname: this.$login.f.orgs,
387
- f_depid: this.$login.f.depids,
388
- f_depname: this.$login.f.deps,
389
- f_zoneid: this.$login.f.zoneid,
390
- f_zones: this.$login.f.zones,
391
- f_is_pay: '否',
392
- // 其他费用信息
393
- t_userfees: this.model.t_userfees,
394
- f_fee_type: this.model.f_fee_type[0],
395
- f_fee_time: this.model.f_fee_time[0],
396
- otherdetail: this.model.otherdetail
397
- }
398
- await this.$resetpost('rs/logic/sale_othercharge_logic_nopay', data, {resolveMsg: '生成其他欠费成功', rejectMsg: '生成其他欠费失败'})
399
- this.$dispatch('success')
400
- },
401
- // 校验发票信息
402
- checkInvoiceMsg () {
403
- if (this.model.f_print[0] === '电子发票') {
404
- if (!this.row.f_taxpayer_id) {
405
- this.row.f_taxpayer_id = this.row.f_idnumber
406
- }
407
- if (!this.row.f_paper_name) {
408
- this.row.f_paper_name = this.row.f_user_name
409
- }
410
- if (!this.row.f_address_phone) {
411
- this.row.f_address_phone = this.row.f_address + ' ' + this.row.f_user_phone
412
- }
413
- this.eticket_msg = true
414
- } else {
415
- this.confirm()
416
- }
417
- },
418
- eticket_toggle () {
419
- this.eticket_show = false
420
- this.$dispatch('success')
421
- },
422
- async setTypename (val, row) {
423
- this.f_typenumber = ''
424
- this.f_unitprice = ''
425
- row.typeNameList = this.$appdata.getParam(val)
426
- let self = this
427
- if (val == '开卡费') {
428
- if (this.$appdata.getSingleValue('开卡费')) {
429
- let money = this.$appdata.getSingleValue('开卡费')
430
- await this.model.otherdetail.forEach(function (item) {
431
- self.isflag = false
432
- if (item.f_brand_spec[0] == '开卡费') {
433
- item.f_unitprice = money
434
- item.f_number = 1
435
- self.isflag = true
436
- }
437
- })
438
- this.getcollection()
439
- }
440
- }
441
- },
442
- setTypenumber (val, row) {
443
- row.typenumberList = this.$appdata.getParam(val)
444
- let unitprice = this.$appdata.getSingleValue(val)
445
- if (unitprice !== undefined) row.f_unitprice = unitprice
446
- },
447
- async confirm (parameter) {
448
- let res = await this.$showMessage(`确定对客户${this.row.f_user_name}进行其他收费吗?`, ['confirm', 'cancel'])
449
- if (res != 'confirm') return
450
- this.eticket_msg = false
451
- // 先调用付款码支付组件流程
452
- let ss = await this.$refs.paymentcode.flowPath()
453
- this.$refs.paymentcode.paymentCodeShow = false
454
- console.log('付款码操作返回', ss)
455
- if (!ss.result) return
456
- otherChargeGen(this, parameter)
457
- },
458
- clean () {
459
- this.$dispatch('refresh', this.row)
460
- },
461
- close () {
462
- this.taxprint = false
463
- this.print = false
464
- this.clean()
465
- },
466
- printok () {
467
- this.$dispatch('success')
468
- },
469
- validateBill (val) {
470
- this.validateOk = !val.isOk
471
- this.billData.bill = val.bill
472
- },
473
- getcollection () {
474
- let money = 0
475
- let flag = true
476
- this.model.otherdetail.forEach((item) => {
477
- if (!item.f_number) flag = false
478
- if (item.f_unitprice && item.f_number) {
479
- money += ((item.f_unitprice - 0) * (item.f_number - 0)) - 0
480
- }
481
- })
482
- if (money != 0) {
483
- this.model.f_collection = money.toFixed(2)
484
- }
485
- if (!flag) this.model.f_collection = ''
486
- },
487
- addadetail () {
488
- this.model.otherdetail.push({f_brand_spec: [], typeNameList: [], typenumberList: []})
489
- },
490
- delthisdetail (index) {
491
- if (this.model.otherdetail.length > 1) {
492
- this.model.otherdetail.splice(index, 1)
493
- this.getcollection()
494
- }
495
- },
496
- async userfees (userinfoid, feetype) {
497
- this.model.t_userfees = await this.$resetpost('rs/sql/saleSingleTable', {
498
- data: {
499
- tablename: 't_userfees',
500
- condition: `f_userinfo_id=${userinfoid} and f_fee_type='${feetype}'`
501
- }
502
- }, {resolveMsg: null, rejectMsg: '查询客户其他费用失败!'})
503
- }
504
- },
505
- computed: {
506
- validflag () {
507
- console.log(this.isflag)
508
- console.log(this.$v.valid)
509
- if (this.isflag) {
510
- if (this.model.f_collection && this.model.f_collection != '') {
511
- let collection = (parseFloat(this.model.f_collection - 0)).toFixed(2)
512
- if (collection > 0) return !this.isflag
513
- else return !this.$v.valid
514
- } else {
515
- return !this.$v.valid
516
- }
517
- } else {
518
- return !this.$v.valid
519
- }
520
- },
521
- feetime () {
522
- return [{label: '一个月', value: '1'}, {label: '三个月', value: '3'}, {label: '六个月', value: '6'}, {
523
- label: '一年',
524
- value: '12'
525
- }]
526
- },
527
-
528
- authArr () {
529
- console.log('this.$login.r:', this.$login.r)
530
- console.log('this.$login.r.includes:', this.$login.r.includes('收费综合导出权限'))
531
- return this.$login.r ? this.$login.r : []
532
- },
533
- gettypename () {
534
- return this.typeNameList
535
- },
536
- gettypenumber () {
537
- return this.typenumberList
538
- }
539
- }
540
- }
541
- </script>
542
-
543
- <style>
544
- </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="row in model.otherdetail">
10
+ <div class="row">
11
+ <div class="col-sm-4" :class="[$v.brand.required ? 'has-error' : '']">
12
+ <input type="text" v-show="false" v-model="$refs.brand.selectedItems"
13
+ v-validate:brand='{required: true }'>
14
+ <label for="f_brand_spec" class="font_normal_body " title="参数名称:其他收费收费类型">收费类型</label>
15
+ <v-select id="f_brand_spec"
16
+ placeholder='材料'
17
+ v-model="row.f_brand_spec"
18
+ :value.sync="row.f_brand_spec"
19
+ :options='brandspec'
20
+ @change="setTypename(row.f_brand_spec, row)"
21
+ close-on-select clear-button v-ref:brand>
22
+ </v-select>
23
+ </div>
24
+ <div class="col-sm-4" :class="[$v.typename.required ? 'has-error' : '']">
25
+ <input type="text" v-show="false" v-model="$refs.typename.selectedItems"
26
+ v-validate:typename='{required: true }'>
27
+ <label for="f_typename" class=" font_normal_body">&nbsp;品名规格</label>
28
+ <v-select
29
+ style="width: 100px"
30
+ v-model="row.f_typename"
31
+ placeholder='品名'
32
+ :value.sync="row.f_typename"
33
+ :options='row.typeNameList'
34
+ @change="setTypenumber(row.f_typename, row)"
35
+ close-on-select clear-button v-ref:typename>
36
+ </v-select>
37
+ </div>
38
+ <div class="col-sm-4" :class="{'has-success':row.f_typenumber,'has-error':!row.f_typenumber}">
39
+ <label for="f_typenumber" class=" font_normal_body">&nbsp;型&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号</label>
40
+ <v-select
41
+ style="width: 100px"
42
+ v-model="row.f_typenumber"
43
+ placeholder='型号'
44
+ :value.sync="row.f_typenumber"
45
+ :options='row.typenumberList'
46
+ @change="setTypeprice(row.f_typenumber, row)"
47
+ close-on-select clear-button>
48
+ </v-select>
49
+ </div>
50
+ </div>
51
+ <div class="row">
52
+ <div class="col-sm-4" :class="{'has-success':row.f_unitprice,'has-error':!row.f_unitprice}">
53
+ <label style="" for="f_unitprice" class=" font_normal_body">*单&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;价</label>
54
+ <input class="input_search" style="width:60%" type="number" min="0" @blur.prevent="getcollection()"
55
+ v-validate:f_unitprice='{required: true, dctest: [0, ">=" ] }'
56
+ v-model="row.f_unitprice"
57
+ :value.sync="row.f_unitprice"
58
+ placeholder="单价" v-next-el='sl'>
59
+ </div>
60
+ <div class="col-sm-4" :class="{'has-success':row.f_number,'has-error':!row.f_number}">
61
+ <label style="" for="f_number" class="font_normal_body">*数&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;量</label>
62
+ <input class="input_search" style="width:60%" type="number" min='0' @blur.prevent="getcollection()"
63
+ v-validate:f_number='{required: true, dctest: [0, ">=" ] }'
64
+ v-model="row.f_number"
65
+ :value.sync="row.f_number"
66
+ placeholder="数量" v-next-el='sk' v-el:sl>
67
+ </div>
68
+ <div style="padding-top:10px">
69
+ <button type="button" class="glyphicon glyphicon-minus btn-danger"
70
+ @click.stop="delthisdetail($index)"></button>&nbsp;&nbsp;&nbsp;
71
+ <button type="button" class="glyphicon glyphicon-plus btn-success" @click.stop="addadetail()"></button>
72
+ </div>
73
+ </div>
74
+ <!-- <div class="row" style="margin-top:10px;" v-if="row.f_brand_spec[0]=='其他费用'">-->
75
+ <!-- <div class="col-sm-4" :class="[$v.f_fee_type.required ? 'has-error' : 'has-success']">-->
76
+ <!-- <input v-validate:f_fee_type='{required: true}' v-model="row.f_fee_type" v-show="false"/>-->
77
+ <!-- <label for="f_fee_type" class="font_normal_body ">其他收费类型</label>-->
78
+ <!-- <v-select id="f_fee_type"-->
79
+ <!-- v-model="row.f_fee_type"-->
80
+ <!-- placeholder='请选择'-->
81
+ <!-- :value.sync="row.f_fee_type"-->
82
+ <!-- :options='feetype'-->
83
+ <!-- close-on-select clear-button>-->
84
+ <!-- </v-select>-->
85
+ <!-- </div>-->
86
+
87
+ <!-- <div class="col-sm-4">-->
88
+ <!-- <label for="f_fee_time" class="font_normal_body">本次购买时间</label>-->
89
+ <!-- <v-select id="f_fee_time"-->
90
+ <!-- v-model="row.f_fee_time"-->
91
+ <!-- placeholder='请选择'-->
92
+ <!-- :value.sync="row.f_fee_time"-->
93
+ <!-- :options='feetime'-->
94
+ <!-- close-on-select clear-button>-->
95
+ <!-- </v-select>-->
96
+ <!-- </div>-->
97
+ <!-- </div>-->
98
+
99
+ </div>
100
+
101
+
102
+ <div class="row" style="margin-top:10px;">
103
+ <div class="col-sm-4" :class="[$v.payment.required ? 'has-error' : '']">
104
+ <label for="f_payment" class="font_normal_body" title="参数名称:付款方式">收款方式</label>
105
+ <input type="text" v-show="false" v-model="$refs.payment.selectedItems"
106
+ v-validate:payment='{required: true }'>
107
+ <v-select id="f_payment"
108
+ v-model="f_payment"
109
+ placeholder='请选择'
110
+ :value.sync="model.f_payment"
111
+ :options='paytype'
112
+ close-on-select clear-button v-ref:payment>
113
+ </v-select>
114
+ </div>
115
+ <div class="col-sm-4">
116
+ <label for="print" class="font_normal_body">&nbsp;打印格式</label>
117
+ <v-select id="print"
118
+ v-model="f_print"
119
+ placeholder='请选择'
120
+ :value.sync="model.f_print"
121
+ :options='printstyle'
122
+ close-on-select clear-button>
123
+ </v-select>
124
+ </div>
125
+ <div class="col-sm-4">
126
+ <label for="f_collection" class="font_normal_body">&nbsp;收&emsp;&emsp;款</label>
127
+ <label for="f_collection" class="font_normal_body">{{model.f_collection}}</label>
128
+ </div>
129
+ </div>
130
+ <div class="row" style="margin-top:10px;" v-if="model.f_payment[0].includes('POS')">
131
+ <div class="col-sm-4">
132
+ <label for="f_voucher_number" class="font_normal_body">&nbsp;&nbsp;&nbsp;凭证号</label>
133
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_voucher_number"
134
+ placeholder="凭证号">
135
+ </div>
136
+ </div>
137
+ <div class="row" style="margin-top:10px;">
138
+ <div class="col-sm-4">
139
+ <label for="f_voucher_number" class="font_normal_body">服务人员</label>
140
+ <v-select v-model="model.f_service_person"
141
+ placeholder='请选择'
142
+ :value.sync="model.f_service_person"
143
+ :options='services'
144
+ close-on-select clear-button>
145
+ </v-select>
146
+ </div>
147
+ <div class="col-sm-8">
148
+ <label for="f_comments" class=" font_normal_body">&nbsp;备&emsp;&emsp;注</label>
149
+ <input type="text" class="input_search" style="width:80%" v-model="model.f_comments" rows="1"
150
+ placeholder="备注">
151
+ </div>
152
+ </div>
153
+ </form>
154
+ <validate-bill v-if="hasValidateBill" :data="model" @validate-bill="validateBill"></validate-bill>
155
+ <print-bill :show="print" :data='row' :bill-config='config' :bill-data='billData' v-on:toggle="close"
156
+ @printok="printok" v-ref:printbill></print-bill>
157
+ <ticket-print :show="eticket_show" @toggle="eticket_toggle" v-ref:eticketbill></ticket-print>
158
+ <eticket-modal :show="eticket_msg" @closemodalshow="eticket_msg = false" :row="row" @confirm="confirm"></eticket-modal>
159
+ <!-- <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> -->
160
+ <!-- <tax-other-bill :show="taxprint" v-ref:taxprintbill :row='row' :logic='model' v-on:success="close" v-on:toggle="close"></tax-other-bill> -->
161
+ <div style="text-align:right;height: 25%;">
162
+ <button v-if="config.modificationList" class="button_search" @click="confirm(true)"
163
+ :disabled=' validflag || validateOk'>确认并转单
164
+ </button>
165
+ <payment-code-button :clickable=" validflag || validateOk"
166
+ :payment.sync="model.f_payment" :payment-data="paytype"
167
+ @confirm-payment="confirm()">
168
+ </payment-code-button>
169
+ <button class="button_search btn-gn" v-if="authArr.includes('其它欠费生成')" @click="createQianfei()" :disabled=' validflag || validateOk'>生成欠费</button>
170
+ <button class="button_search btn-gn" @click="checkInvoiceMsg()" :disabled=' validflag || false'>确认</button>
171
+ <button class="button_clear btn-gn" @click="clean()">取消</button>
172
+ </div>
173
+ </validator>
174
+
175
+ </div>
176
+ <payment-code v-ref:paymentcode :payment="model.f_payment" :row="row" :money="model.f_collection"></payment-code>
177
+ </div>
178
+ </template>
179
+ <script>
180
+ let otherChargeGen = async function (self, parameter) {
181
+ try {
182
+ // 加入扫码盒付款码支付流水号
183
+ self.model.f_serial_id = self.$refs.paymentcode.paymentCodeReturnData.f_out_trade_no
184
+ console.log('11111', self.model)
185
+ let resid = await self.$LogicService.otherCharge(self.model, self.row)
186
+ console.log('其他收费返回id', resid, self.config.hasPrint, self.$login.r.includes('不打印发票'))
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('rs/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('rs/logic/savePrintSheet', {data: {printData: printSheet}}, {
236
+ // resolveMsg: '',
237
+ // rejectMsg: '转单失败, 请重试'
238
+ // })
239
+ // }
240
+ if (self.config.hasPrint && !self.$login.r.includes('不打印发票')) {
241
+ if (self.model.f_print[0] != '电子发票') {
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.model.f_print[0] === '电子发票') {
255
+ self.eticket_show = true
256
+ await self.$refs.eticketbill.openETicket([resid.data], self.row, '其他收费')
257
+ // self.$CommonService.openEticket(resid.data, '其他收费')
258
+ // self.$dispatch('success')
259
+ }
260
+ } else {
261
+ self.$dispatch('success')
262
+ }
263
+ } catch (error) {
264
+ console.log(error)
265
+ self.$showAlert(error, 'danger', 0)
266
+ self.$dispatch('refresh')
267
+ }
268
+ }
269
+
270
+ let asyncOtherCharge = async function (self) {
271
+ await self.$getConfig(self, 'OtherCharge')
272
+ self.model.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
273
+ self.model.f_payment = [self.config.payment]
274
+ self.model.otherdetail[0].f_brand_spec = [self.config.brandspec]
275
+ self.model.f_use_type = self.config.billType
276
+ self.model.f_bill_type = self.model.f_print
277
+ self.hasValidateBill = self.config.hasBillManage
278
+ self.setTypename(self.model.otherdetail[0].f_brand_spec, self.model.otherdetail[0])
279
+ }
280
+ export default {
281
+ title: '其他收费',
282
+ data () {
283
+ return {
284
+ config: {
285
+ modificationList: false,
286
+ dispatch: false,
287
+ hasPrint: true, // 默认打票
288
+ hasBillManage: false, // 默认不启用发票管理
289
+ billType: '其他费用', // 票据类型(燃气费,其他费用,调用的发票代码不同)
290
+ printType: '普通收据', // 收据/电子票/专用发票/国税发票
291
+ payment: '现金缴费', // 付款方式
292
+ brandspec: '材料费' // 收费类型
293
+ },
294
+ model: {
295
+ f_print: [],
296
+ f_payment: '现金缴费',
297
+ f_number: 0,
298
+ f_unitprice: 0,
299
+ f_collection: 0,
300
+ f_comments: '',
301
+ f_voucher_number: '',
302
+ f_service_person: '',
303
+ // 用户其他费用信息
304
+ t_userfees: '',
305
+ f_fee_type: [],
306
+ f_fee_time: ['12'],
307
+ otherdetail: [{f_brand_spec: [''], f_unitprice: '', f_number: '', typeNameList: [], typenumberList: []}]
308
+ },
309
+ eticket_msg: false,
310
+ eticket_show: false,
311
+ invoice_is_pax: '征税',
312
+ is_pax: [{label: '征税', value: '征税'}, {label: '不征税', value: '不征税'}],
313
+ print: false,
314
+ taxprint: false,
315
+ billData: {
316
+ url: 'rs/report/otherCharge_bill',
317
+ bill: ''
318
+ },
319
+
320
+ // 启用发票管理需要对票号进行验证
321
+ hasValidateBill: false,
322
+ validateOk: false,
323
+ f_typenumber: '',
324
+ typeNameList: [],
325
+ typenumberList: [],
326
+ brandspec: this.$appdata.getParam('其他收费收费类型') ? this.$appdata.getParam('其他收费收费类型') : [],
327
+ printstyle: this.$appdata.getParam('打印格式'),
328
+ paytype: this.$appdata.getParam('付款方式'),
329
+ feetype: this.$appdata.getParam('其他费用'),
330
+ services: this.$appdata.getParam('服务人员'),
331
+ isflag: false
332
+ }
333
+ },
334
+ props: ['row'],
335
+ ready () {
336
+ // this.model.f_unitprice = this.$appdata.getSingleValue('置换气费')
337
+ asyncOtherCharge(this)
338
+ },
339
+ watch: {
340
+ 'model.otherdetail' (val) {
341
+ },
342
+ 'model.f_fee_type' (val) {
343
+ if (val[0]) {
344
+ this.userfees(this.row.f_userinfo_id, val[0])
345
+ }
346
+ }
347
+ },
348
+ methods: {
349
+ setTypeprice (val, row) {
350
+ console.log('f_typenumber', this.f_typenumber)
351
+ if (this.f_typenumber !== ' ') {
352
+ let unitprice = this.$appdata.getSingleValue(val)
353
+ console.log('unitprice', unitprice)
354
+ if (unitprice !== undefined) {
355
+ row.f_unitprice = unitprice
356
+ }
357
+ }
358
+ },
359
+ async createQianfei () {
360
+ let data = {
361
+ f_serial_id: this.model.f_serial_id,
362
+ record_userinfo: this.row.f_userinfo_id,
363
+ f_serial_number: this.model.f_serial_number,
364
+ f_userfiles_id: this.row.f_userfiles_id,
365
+ f_user_id: this.row.f_user_id,
366
+ f_user_name: this.row.f_user_name,
367
+ f_address: this.row.f_address,
368
+ f_user_type: this.row.f_user_type,
369
+ f_gasproperties: this.row.f_gasproperties,
370
+ // f_number: model.f_number,
371
+ // f_unitprice: model.f_unitprice,
372
+ f_collection: this.model.f_collection,
373
+ f_comments: this.model.f_comments,
374
+ f_payment: this.model.f_payment[0],
375
+ f_voucher_number: this.model.f_voucher_number,
376
+ f_bill_style: this.model.f_print[0],
377
+ // f_brand_spec: model.f_brand_spec[0],
378
+ f_userinfo_id: this.row.f_userinfo_id,
379
+ f_service_person: this.model.f_service_person[0],
380
+ f_operat_type: '其他收费欠费登记',
381
+ f_describe: `${this.$login.f.name}对客户${this.row.f_user_name}进行其他收费欠费登记操作`,
382
+ f_state: '有效',
383
+ f_operator: this.$login.f.name,
384
+ f_operatorid: this.$login.f.id,
385
+ f_orgid: this.$login.f.orgid,
386
+ f_orgname: this.$login.f.orgs,
387
+ f_depid: this.$login.f.depids,
388
+ f_depname: this.$login.f.deps,
389
+ f_zoneid: this.$login.f.zoneid,
390
+ f_zones: this.$login.f.zones,
391
+ f_is_pay: '否',
392
+ // 其他费用信息
393
+ t_userfees: this.model.t_userfees,
394
+ f_fee_type: this.model.f_fee_type[0],
395
+ f_fee_time: this.model.f_fee_time[0],
396
+ otherdetail: this.model.otherdetail
397
+ }
398
+ await this.$resetpost('rs/logic/sale_othercharge_logic_nopay', data, {resolveMsg: '生成其他欠费成功', rejectMsg: '生成其他欠费失败'})
399
+ this.$dispatch('success')
400
+ },
401
+ // 校验发票信息
402
+ checkInvoiceMsg () {
403
+ if (this.model.f_print[0] === '电子发票') {
404
+ if (!this.row.f_taxpayer_id) {
405
+ this.row.f_taxpayer_id = this.row.f_idnumber
406
+ }
407
+ if (!this.row.f_paper_name) {
408
+ this.row.f_paper_name = this.row.f_user_name
409
+ }
410
+ if (!this.row.f_address_phone) {
411
+ this.row.f_address_phone = this.row.f_address + ' ' + this.row.f_user_phone
412
+ }
413
+ this.eticket_msg = true
414
+ } else {
415
+ this.confirm()
416
+ }
417
+ },
418
+ eticket_toggle () {
419
+ this.eticket_show = false
420
+ this.$dispatch('success')
421
+ },
422
+ async setTypename (val, row) {
423
+ this.f_typenumber = ''
424
+ this.f_unitprice = ''
425
+ row.typeNameList = this.$appdata.getParam(val)
426
+ let self = this
427
+ if (val == '开卡费') {
428
+ if (this.$appdata.getSingleValue('开卡费')) {
429
+ let money = this.$appdata.getSingleValue('开卡费')
430
+ await this.model.otherdetail.forEach(function (item) {
431
+ self.isflag = false
432
+ if (item.f_brand_spec[0] == '开卡费') {
433
+ item.f_unitprice = money
434
+ item.f_number = 1
435
+ self.isflag = true
436
+ }
437
+ })
438
+ this.getcollection()
439
+ }
440
+ }
441
+ },
442
+ setTypenumber (val, row) {
443
+ row.typenumberList = this.$appdata.getParam(val)
444
+ let unitprice = this.$appdata.getSingleValue(val)
445
+ if (unitprice !== undefined) row.f_unitprice = unitprice
446
+ },
447
+ async confirm (parameter) {
448
+ let res = await this.$showMessage(`确定对客户${this.row.f_user_name}进行其他收费吗?`, ['confirm', 'cancel'])
449
+ if (res != 'confirm') return
450
+ this.eticket_msg = false
451
+ // 先调用付款码支付组件流程
452
+ let ss = await this.$refs.paymentcode.flowPath()
453
+ this.$refs.paymentcode.paymentCodeShow = false
454
+ console.log('付款码操作返回', ss)
455
+ if (!ss.result) return
456
+ otherChargeGen(this, parameter)
457
+ },
458
+ clean () {
459
+ this.$dispatch('refresh', this.row)
460
+ },
461
+ close () {
462
+ this.taxprint = false
463
+ this.print = false
464
+ this.clean()
465
+ },
466
+ printok () {
467
+ this.$dispatch('success')
468
+ },
469
+ validateBill (val) {
470
+ this.validateOk = !val.isOk
471
+ this.billData.bill = val.bill
472
+ },
473
+ getcollection () {
474
+ let money = 0
475
+ let flag = true
476
+ this.model.otherdetail.forEach((item) => {
477
+ if (!item.f_number) flag = false
478
+ if (item.f_unitprice && item.f_number) {
479
+ money += ((item.f_unitprice - 0) * (item.f_number - 0)) - 0
480
+ }
481
+ })
482
+ if (money != 0) {
483
+ this.model.f_collection = money.toFixed(2)
484
+ }
485
+ if (!flag) this.model.f_collection = ''
486
+ },
487
+ addadetail () {
488
+ this.model.otherdetail.push({f_brand_spec: [], typeNameList: [], typenumberList: []})
489
+ },
490
+ delthisdetail (index) {
491
+ if (this.model.otherdetail.length > 1) {
492
+ this.model.otherdetail.splice(index, 1)
493
+ this.getcollection()
494
+ }
495
+ },
496
+ async userfees (userinfoid, feetype) {
497
+ this.model.t_userfees = await this.$resetpost('rs/sql/saleSingleTable', {
498
+ data: {
499
+ tablename: 't_userfees',
500
+ condition: `f_userinfo_id=${userinfoid} and f_fee_type='${feetype}'`
501
+ }
502
+ }, {resolveMsg: null, rejectMsg: '查询客户其他费用失败!'})
503
+ }
504
+ },
505
+ computed: {
506
+ validflag () {
507
+ console.log(this.isflag)
508
+ console.log(this.$v.valid)
509
+ if (this.isflag) {
510
+ if (this.model.f_collection && this.model.f_collection != '') {
511
+ let collection = (parseFloat(this.model.f_collection - 0)).toFixed(2)
512
+ if (collection > 0) return !this.isflag
513
+ else return !this.$v.valid
514
+ } else {
515
+ return !this.$v.valid
516
+ }
517
+ } else {
518
+ return !this.$v.valid
519
+ }
520
+ },
521
+ feetime () {
522
+ return [{label: '一个月', value: '1'}, {label: '三个月', value: '3'}, {label: '六个月', value: '6'}, {
523
+ label: '一年',
524
+ value: '12'
525
+ }]
526
+ },
527
+
528
+ authArr () {
529
+ console.log('this.$login.r:', this.$login.r)
530
+ console.log('this.$login.r.includes:', this.$login.r.includes('收费综合导出权限'))
531
+ return this.$login.r ? this.$login.r : []
532
+ },
533
+ gettypename () {
534
+ return this.typeNameList
535
+ },
536
+ gettypenumber () {
537
+ return this.typenumberList
538
+ }
539
+ }
540
+ }
541
+ </script>
542
+
543
+ <style>
544
+ </style>