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,550 +1,550 @@
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="{'has-success':row.f_brand_spec,'select-error':!row.f_brand_spec}">
12
- <label for="f_brand_spec" class="font_normal_body " title="参数名称:品名及规格">收费类型</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" @blur.prevent="getcollection()"
51
- v-model="row.f_unitprice"
52
- :value.sync="row.f_unitprice"
53
- :disabled="false"
54
- placeholder="单价" v-next-el='sl'>
55
- </div>
56
- <div class="col-sm-4" :class="{'has-success':row.f_number,'has-error':!row.f_number}">
57
- <label style="" for="f_number" class="font_normal_body">*数&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;量</label>
58
- <input class="input_search" style="width:60%" type="number" min='1' @blur.prevent="getcollection()"
59
- v-validate:f_number='{required: true, dctest: [0, ">" ] }'
60
- v-model="row.f_number"
61
- :value.sync="row.f_number"
62
- placeholder="数量" v-next-el='sk' v-el:sl>
63
- </div>
64
- <div style="padding-top:10px">
65
- <button type="button" class="glyphicon glyphicon-minus btn-danger"
66
- @click.stop="delthisdetail($index)"></button>&nbsp;&nbsp;&nbsp;
67
- <button type="button" class="glyphicon glyphicon-plus btn-success" @click.stop="addadetail()"></button>
68
- </div>
69
- </div>
70
- <!-- <div class="row" style="margin-top:10px;" v-if="row.f_brand_spec[0]=='其他费用'">-->
71
- <!-- <div class="col-sm-4" :class="[$v.f_fee_type.required ? 'has-error' : 'has-success']">-->
72
- <!-- <input v-validate:f_fee_type='{required: true}' v-model="row.f_fee_type" v-show="false"/>-->
73
- <!-- <label for="f_fee_type" class="font_normal_body ">其他收费类型</label>-->
74
- <!-- <v-select id="f_fee_type"-->
75
- <!-- v-model="row.f_fee_type"-->
76
- <!-- placeholder='请选择'-->
77
- <!-- :value.sync="row.f_fee_type"-->
78
- <!-- :options='feetype'-->
79
- <!-- close-on-select clear-button>-->
80
- <!-- </v-select>-->
81
- <!-- </div>-->
82
-
83
- <!-- <div class="col-sm-4">-->
84
- <!-- <label for="f_fee_time" class="font_normal_body">本次购买时间</label>-->
85
- <!-- <v-select id="f_fee_time"-->
86
- <!-- v-model="row.f_fee_time"-->
87
- <!-- placeholder='请选择'-->
88
- <!-- :value.sync="row.f_fee_time"-->
89
- <!-- :options='feetime'-->
90
- <!-- close-on-select clear-button>-->
91
- <!-- </v-select>-->
92
- <!-- </div>-->
93
- <!-- </div>-->
94
-
95
- </div>
96
-
97
-
98
- <div class="row" style="margin-top:10px;">
99
- <div class="col-sm-4 form-group" :class="[$v.payment.required ? 'select-error' : '']">
100
- <label class=" font_normal_body" title="参数名称:付款方式">收款方式</label>
101
- <input type="text" v-show="false" v-model="$refs.payment.selectedItems"
102
- v-validate:payment='{required: true }'>
103
- <v-select v-model="model.f_payment"
104
- placeholder='请选择'
105
- :value.sync="model.f_payment"
106
- close-on-select
107
- :options='paytype' clear-button v-ref:payment></v-select>
108
- </div>
109
- <div class="col-sm-4">
110
- <label for="f_print" class="font_normal_body">&nbsp;打印格式</label>
111
- <v-select id="print"
112
- v-model="f_print"
113
- placeholder='请选择'
114
- :value.sync="model.f_print"
115
- :options='printstyle'
116
- close-on-select clear-button>
117
- </v-select>
118
- </div>
119
- <div class="col-sm-4">
120
- <label for="f_collection" class="font_normal_body">&nbsp;收&emsp;&emsp;款</label>
121
- <label for="f_collection" class="font_normal_body">{{ model.f_collection }}</label>
122
- </div>
123
- </div>
124
- <div class="row" style="margin-top:10px;" v-if="model.f_payment[0].includes('POS')">
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_voucher_number"
128
- placeholder="凭证号">
129
- </div>
130
- </div>
131
- <div class="row" style="margin-top:10px;">
132
- <div class="col-sm-4">
133
- <label for="f_voucher_number" class="font_normal_body">服务人员</label>
134
- <v-select v-model="model.f_service_person"
135
- placeholder='请选择'
136
- :value.sync="model.f_service_person"
137
- :options='services'
138
- close-on-select clear-button>
139
- </v-select>
140
- </div>
141
- <div class="col-sm-8">
142
- <label for="f_comments" class=" font_normal_body">&nbsp;备&emsp;&emsp;注</label>
143
- <input type="text" class="input_search" style="width:80%" v-model="model.f_comments" rows="1"
144
- placeholder="备注">
145
- </div>
146
- </div>
147
- </form>
148
- <validate-bill v-if="hasValidateBill" :data="model" @validate-bill="validateBill"></validate-bill>
149
- <print-bill :show="print" :data='row' :bill-config='config' :bill-data='billData' v-on:toggle="close"
150
- @printok="printok" v-ref:printbill></print-bill>
151
- <ticket-print :show="eticket_show" @toggle="eticket_toggle" v-ref:eticketbill></ticket-print>
152
- <eticket-modal :show="eticket_msg" @close-modal-show="eticket_msg = false" :row="row" @confirm="confirm"></eticket-modal>
153
- <!-- <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> -->
154
- <!-- <tax-other-bill :show="taxprint" v-ref:taxprintbill :row='row' :logic='model' v-on:success="close" v-on:toggle="close"></tax-other-bill> -->
155
- <div style="text-align:right;height: 25%;">
156
- <button v-if="config.modificationList" class="button_search" @click="confirm(true)"
157
- :disabled=' validflag || validateOk'>确认并转单
158
- </button>
159
- <payment-code-button :clickable=" validflag || validateOk"
160
- :payment.sync="model.f_payment" :payment-data="paytype"
161
- @confirm-payment="confirm()">
162
- </payment-code-button>
163
- <button class="button_search btn-gn" v-if="authArr.includes('其它欠费生成')" @click="createQianfei()"
164
- :disabled=' validflag || validateOk'>生成欠费
165
- </button>
166
- <button class="button_search btn-gn" @click="checkInvoiceMsg()" :disabled='validflag || validateOk'>确认
167
- </button>
168
- <button class="button_clear btn-gn" @click="clean()">取消</button>
169
- </div>
170
- </validator>
171
- <upload :blodid="blodid" v-if="config.showupload" isremark="true" fusetype="其他收费"></upload>
172
- </div>
173
- <payment-code v-ref:paymentcode :payment="model.f_payment" :row="row" :money="model.f_collection"></payment-code>
174
- </div>
175
- </template>
176
- <script>
177
- let otherChargeGen = async function (self, parameter) {
178
- try {
179
- // 加入扫码盒付款码支付流水号
180
- self.model.f_serial_id = self.$refs.paymentcode.paymentCodeReturnData.f_out_trade_no
181
- console.log('11111', self.model)
182
- let resid = await self.$LogicService.otherCharge(self.model, self.row)
183
- console.log('其他收费返回id', resid, self.config.hasPrint, self.$login.r.includes('不打印发票'))
184
- if (self.config.dispatch) {
185
- await self.$showMessage(`是否添加派工单`, ['confirm', 'cancel']).then((res) => {
186
- if (res === 'confirm') {
187
- console.log('其他收费xinxi', self.model)
188
- console.log('其他收费xinxi', self.row)
189
- let batch = {
190
- sf_id: resid.data,
191
- f_userinfo_code: self.row.f_userinfo_code,
192
- f_dispathch_name: self.row.f_user_name,
193
- f_phone: self.row.f_user_phone,
194
- f_dispathch_address: self.row.f_address,
195
- f_meternumber: self.row.f_meternumber,
196
- f_dispathch_type: '安装',
197
- f_source: '其他收费',
198
- f_money: self.model.f_collection,
199
- f_remarks: self.model.f_comments,
200
- f_operator_date: self.$login.toStandardTimeString(),
201
- f_orgid: self.$login.f.orgid,
202
- f_dispathch_state: '待分配'
203
- }
204
- console.log('111:', batch)
205
- self.$resetpost('rs/logic/savePatch', batch).then((res1) => {
206
- // this.params.rows.splice(index, 1)
207
- console.log('更新成功!', res1.data.id)
208
- })
209
- }
210
- })
211
- }
212
- let localeSustainMoney = window.localStorage.getItem('sustainMoney')
213
- if (localeSustainMoney != null) {
214
- localeSustainMoney = (localeSustainMoney - 0) + (self.model.f_collection - 0)
215
- window.localStorage.setItem('sustainMoney', localeSustainMoney)
216
- }
217
- // // 转燃气改装工程单
218
- // if (self.config.modificationList && parameter) {
219
- // let printSheet = {
220
- // f_userinfo_id: self.row.f_userinfo_id,
221
- // f_charge_id: resid.data,
222
- // f_state: '有效',
223
- // f_print_state: '未打印',
224
- // f_type: '改装单',
225
- // f_orgid: self.$login.f.orgid ? self.$login.f.orgid : '',
226
- // f_orgname: self.$login.f.orgs ? self.$login.f.orgs : '',
227
- // f_depid: self.$login.f.depids ? self.$login.f.depids : '',
228
- // f_depname: self.$login.f.deps ? self.$login.f.deps : '',
229
- // f_operator: self.$login.f.name,
230
- // f_operatorid: self.$login.f.id
231
- // }
232
- // await self.$resetpost('rs/logic/savePrintSheet', {data: {printData: printSheet}}, {
233
- // resolveMsg: '',
234
- // rejectMsg: '转单失败, 请重试'
235
- // })
236
- // }
237
- if (self.config.hasPrint && !self.$login.r.includes('不打印发票')) {
238
- if (self.model.f_print[0] != '电子发票') {
239
- if (self.config.hasBillManage) {
240
- self.row.id = resid.data
241
- self.row.f_bill_type = '其他收费'
242
- self.row.f_bill_style = self.model.f_print[0]
243
- self.print = true
244
- } else {
245
- self.row.id = resid.data
246
- self.print = true
247
- }
248
- } else if (self.model.f_print[0] === '国税发票') {
249
- // TODO
250
- self.$dispatch('success')
251
- } else if (self.model.f_print[0] === '电子发票') {
252
- self.eticket_show = true
253
- await self.$refs.eticketbill.openETicket(resid.data, self.row, '其他收费')
254
- // self.$CommonService.openEticket(resid.data, '其他收费')
255
- // self.$dispatch('success')
256
- }
257
- } else {
258
- self.$dispatch('success')
259
- }
260
- } catch (error) {
261
- console.log(error)
262
- self.$showAlert(error, 'danger', 0)
263
- self.$dispatch('refresh')
264
- }
265
- }
266
-
267
- let asyncOtherCharge = async function (self) {
268
- await self.$getConfig(self, 'OtherCharge')
269
- self.model.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
270
- self.model.f_payment = [self.config.payment]
271
- self.model.otherdetail[0].f_brand_spec = [self.config.brandspec]
272
- self.model.f_service_person = [self.config.services]
273
-
274
- self.model.f_use_type = self.config.billType
275
- self.model.f_bill_type = self.model.f_print
276
- self.hasValidateBill = self.config.hasBillManage
277
- // self.setTypename(self.model.f_brand_spec[0])
278
- }
279
- export default {
280
- title: '其他收费',
281
- data () {
282
- return {
283
- config: {
284
- showupload: true,
285
- checkFlag: false,
286
- modificationList: false,
287
- dispatch: false,
288
- hasPrint: true, // 默认打票
289
- hasBillManage: false, // 默认不启用发票管理
290
- billType: '其他费用', // 票据类型(燃气费,其他费用,调用的发票代码不同)
291
- printType: '普通收据', // 收据/电子票/专用发票/国税发票
292
- payment: '现金缴费', // 付款方式
293
- brandspec: '材料费', // 收费类型
294
- services: this.$login.f.name // 服务人员
295
- },
296
- model: {
297
- f_print: [],
298
- f_payment: '现金缴费',
299
- f_number: 0,
300
- f_unitprice: 0,
301
- f_collection: 0,
302
- f_comments: '',
303
- f_voucher_number: '',
304
- f_service_person: '',
305
- // 用户其他费用信息
306
- t_userfees: '',
307
- f_fee_type: ['其他费用'],
308
- f_fee_time: ['12'],
309
- otherdetail: [{f_brand_spec: [''],typeNameList:[],f_typenumber:'',typenumberList:[], f_unitprice: '', f_number: ''}]
310
- },
311
- eticket_msg: false,
312
- eticket_show: false,
313
- invoice_is_pax: '征税',
314
- is_pax: [{label: '征税', value: '征税'}, {label: '不征税', value: '不征税'}],
315
- print: false,
316
- taxprint: false,
317
- billData: {
318
- url: 'rs/report/otherCharge_bill',
319
- bill: ''
320
- },
321
-
322
- // 启用发票管理需要对票号进行验证
323
- hasValidateBill: false,
324
- validateOk: false,
325
- f_typenumber: '',
326
- typeNameList: [],
327
- typenumberList: [],
328
- brandspec: this.$appdata.getParam('品名及规格'),
329
- printstyle: this.$appdata.getParam('打印格式'),
330
- paytype: this.$appdata.getParam('付款方式'),
331
- feetype: this.$appdata.getParam('其他费用'),
332
- services: this.$appdata.getParam('服务人员'),
333
- isflag: false
334
- }
335
- },
336
- props: ['row'],
337
- ready () {
338
- // this.model.f_unitprice = this.$appdata.getSingleValue('置换气费')
339
- asyncOtherCharge(this)
340
- },
341
- watch: {
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) {
350
- console.log("单价变化:",val)
351
- if (this.model.otherdetail[val] && this.model.otherdetail[val].f_typenumber[0]) {
352
- let unitprice = this.$appdata.getSingleValue(this.model.otherdetail[val].f_typenumber[0])
353
- if (unitprice !== undefined) {
354
- this.model.otherdetail[val].f_unitprice = unitprice
355
- }
356
- }
357
- },
358
- async createQianfei () {
359
- let data = {
360
- f_serial_id: this.model.f_serial_id,
361
- record_userinfo: this.row.f_userinfo_id,
362
- f_serial_number: this.model.f_serial_number,
363
- f_userfiles_id: this.row.f_userfiles_id,
364
- f_user_id: this.row.f_user_id,
365
- f_user_name: this.row.f_user_name,
366
- f_address: this.row.f_address,
367
- f_user_type: this.row.f_user_type,
368
- f_gasproperties: this.row.f_gasproperties,
369
- // f_number: model.f_number,
370
- // f_unitprice: model.f_unitprice,
371
- f_collection: this.model.f_collection,
372
- f_comments: this.model.f_comments,
373
- f_payment: this.model.f_payment[0],
374
- f_voucher_number: this.model.f_voucher_number,
375
- f_bill_style: this.model.f_print[0],
376
- // f_brand_spec: model.f_brand_spec[0],
377
- f_userinfo_id: this.row.f_userinfo_id,
378
- f_service_person: this.model.f_service_person[0],
379
- f_operat_type: '其他收费欠费登记',
380
- f_describe: `${this.$login.f.name}对客户${this.row.f_user_name}进行其他收费欠费登记操作`,
381
- f_state: '有效',
382
- f_operator: this.$login.f.name,
383
- f_operatorid: this.$login.f.id,
384
- f_orgid: this.$login.f.orgid,
385
- f_orgname: this.$login.f.orgs,
386
- f_depid: this.$login.f.depids,
387
- f_depname: this.$login.f.deps,
388
- f_zoneid: this.$login.f.zoneid,
389
- f_zones: this.$login.f.zones,
390
- f_is_pay: '否',
391
- // 其他费用信息
392
- t_userfees: this.model.t_userfees,
393
- f_fee_type: this.model.f_fee_type[0],
394
- f_fee_time: this.model.f_fee_time[0],
395
- otherdetail: this.model.otherdetail
396
- }
397
- await this.$resetpost('rs/logic/sale_othercharge_logic_nopay', data, {
398
- resolveMsg: '生成其他欠费成功',
399
- rejectMsg: '生成其他欠费失败'
400
- })
401
- this.$dispatch('success')
402
- },
403
- // 校验发票信息
404
- checkInvoiceMsg () {
405
- if (this.model.f_print[0] === '电子发票') {
406
- if (!this.row.f_taxpayer_id) {
407
- this.row.f_taxpayer_id = this.row.f_idnumber
408
- }
409
- if (!this.row.f_paper_name) {
410
- this.row.f_paper_name = this.row.f_user_name
411
- }
412
- if (!this.row.f_address_phone) {
413
- this.row.f_address_phone = this.row.f_address + ' ' + this.row.f_user_phone
414
- }
415
- if (!this.row.f_email) {
416
- this.row.f_email = this.row.f_email
417
- }
418
- this.eticket_msg = true
419
- } else {
420
- this.confirm()
421
- }
422
- },
423
- eticket_toggle () {
424
- this.eticket_show = false
425
- this.$dispatch('success')
426
- },
427
- async setTypename (val,index) {
428
- this.model.otherdetail[index].f_typenumber = ''
429
- this.model.otherdetail[index].typeNameList = this.$appdata.getParam(val.f_brand_spec[0])
430
- this.model.otherdetail[index].typenumberList = []
431
- this.model.otherdetail[index].f_unitprice = ''
432
- let self = this
433
- if (val == '开卡费') {
434
- if (this.$appdata.getSingleValue('开卡费')) {
435
- let money = this.$appdata.getSingleValue('开卡费')
436
- await this.model.otherdetail.forEach(function (item) {
437
- self.isflag = false
438
- if (item.f_brand_spec[0] == '开卡费') {
439
- item.f_unitprice = money
440
- item.f_number = 1
441
- self.isflag = true
442
- }
443
- })
444
- this.getcollection()
445
- }
446
- }
447
- },
448
- setTypenumber (val,index) {
449
- this.model.otherdetail[index].typenumberList = this.$appdata.getParam(val.f_typename[0 ])
450
- this.model.otherdetail[index].f_unitprice = ''
451
- },
452
- async confirm (parameter) {
453
- let res = await this.$showMessage(`确定对客户${this.row.f_user_name}进行其他收费吗?`, ['confirm', 'cancel'])
454
- if (res != 'confirm') return
455
- this.eticket_msg = false
456
- // 先调用付款码支付组件流程
457
- let ss = await this.$refs.paymentcode.flowPath()
458
- this.$refs.paymentcode.paymentCodeShow = false
459
- console.log('付款码操作返回', ss)
460
- if (!ss.result) return
461
- otherChargeGen(this, parameter)
462
- },
463
- clean () {
464
- this.$dispatch('refresh', this.row)
465
- },
466
- close () {
467
- this.taxprint = false
468
- this.print = false
469
- this.clean()
470
- },
471
- printok () {
472
- this.$dispatch('success')
473
- },
474
- validateBill (val) {
475
- this.validateOk = !val.isOk
476
- this.billData.bill = val.bill
477
- },
478
- getcollection () {
479
- let money = 0
480
- let flag = true
481
- this.model.otherdetail.forEach((item) => {
482
- if (!item.f_number || item.f_number == '0') flag = false
483
- if (item.f_unitprice && item.f_number) {
484
- money += ((item.f_unitprice - 0) * (item.f_number - 0)) - 0
485
- }
486
- })
487
- if (money != 0) {
488
- this.model.f_collection = money.toFixed(2)
489
- }
490
- if (!flag) this.model.f_collection = ''
491
- },
492
- addadetail () {
493
- this.$set(`model.otherdetail[${this.model.otherdetail.length}]`, {f_brand_spec: [''],f_typenumber:'',typeNameList:[],typenumberList:[], f_unitprice: '', f_number: ''})
494
- console.log(JSON.stringify(this.model.otherdetail))
495
- },
496
- delthisdetail (index) {
497
- if (this.model.otherdetail.length > 1) {
498
- this.getcollection()
499
- this.model.otherdetail.splice(index, 1)
500
- }
501
- },
502
- async userfees (userinfoid, feetype) {
503
- this.model.t_userfees = await this.$resetpost('rs/sql/saleSingleTable', {
504
- data: {
505
- tablename: 't_userfees',
506
- condition: `f_userinfo_id=${userinfoid} and f_fee_type='${feetype}'`
507
- }
508
- }, {resolveMsg: null, rejectMsg: '查询客户其他费用失败!'})
509
- }
510
- },
511
- computed: {
512
- validflag () {
513
- console.log(this.isflag)
514
- console.log(this.$v.valid)
515
- if (this.isflag) {
516
- if (this.model.f_collection && this.model.f_collection != '') {
517
- let collection = (parseFloat(this.model.f_collection - 0)).toFixed(2)
518
- if (collection > 0) return !this.isflag
519
- else return !this.$v.valid
520
- } else {
521
- return !this.$v.valid
522
- }
523
- } else {
524
- return !this.$v.valid
525
- }
526
- },
527
- feetime () {
528
- return [{label: '一个月', value: '1'}, {label: '三个月', value: '3'}, {label: '六个月', value: '6'}, {
529
- label: '一年',
530
- value: '12'
531
- }]
532
- },
533
-
534
- authArr () {
535
- console.log('this.$login.r:', this.$login.r)
536
- console.log('this.$login.r.includes:', this.$login.r.includes('收费综合导出权限'))
537
- return this.$login.r ? this.$login.r : []
538
- },
539
- gettypename () {
540
- return this.typeNameList
541
- },
542
- gettypenumber () {
543
- return this.typenumberList
544
- }
545
- }
546
- }
547
- </script>
548
-
549
- <style>
550
- </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="{'has-success':row.f_brand_spec,'select-error':!row.f_brand_spec}">
12
+ <label for="f_brand_spec" class="font_normal_body " title="参数名称:品名及规格">收费类型</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" @blur.prevent="getcollection()"
51
+ v-model="row.f_unitprice"
52
+ :value.sync="row.f_unitprice"
53
+ :disabled="false"
54
+ placeholder="单价" v-next-el='sl'>
55
+ </div>
56
+ <div class="col-sm-4" :class="{'has-success':row.f_number,'has-error':!row.f_number}">
57
+ <label style="" for="f_number" class="font_normal_body">*数&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;量</label>
58
+ <input class="input_search" style="width:60%" type="number" min='1' @blur.prevent="getcollection()"
59
+ v-validate:f_number='{required: true, dctest: [0, ">" ] }'
60
+ v-model="row.f_number"
61
+ :value.sync="row.f_number"
62
+ placeholder="数量" v-next-el='sk' v-el:sl>
63
+ </div>
64
+ <div style="padding-top:10px">
65
+ <button type="button" class="glyphicon glyphicon-minus btn-danger"
66
+ @click.stop="delthisdetail($index)"></button>&nbsp;&nbsp;&nbsp;
67
+ <button type="button" class="glyphicon glyphicon-plus btn-success" @click.stop="addadetail()"></button>
68
+ </div>
69
+ </div>
70
+ <!-- <div class="row" style="margin-top:10px;" v-if="row.f_brand_spec[0]=='其他费用'">-->
71
+ <!-- <div class="col-sm-4" :class="[$v.f_fee_type.required ? 'has-error' : 'has-success']">-->
72
+ <!-- <input v-validate:f_fee_type='{required: true}' v-model="row.f_fee_type" v-show="false"/>-->
73
+ <!-- <label for="f_fee_type" class="font_normal_body ">其他收费类型</label>-->
74
+ <!-- <v-select id="f_fee_type"-->
75
+ <!-- v-model="row.f_fee_type"-->
76
+ <!-- placeholder='请选择'-->
77
+ <!-- :value.sync="row.f_fee_type"-->
78
+ <!-- :options='feetype'-->
79
+ <!-- close-on-select clear-button>-->
80
+ <!-- </v-select>-->
81
+ <!-- </div>-->
82
+
83
+ <!-- <div class="col-sm-4">-->
84
+ <!-- <label for="f_fee_time" class="font_normal_body">本次购买时间</label>-->
85
+ <!-- <v-select id="f_fee_time"-->
86
+ <!-- v-model="row.f_fee_time"-->
87
+ <!-- placeholder='请选择'-->
88
+ <!-- :value.sync="row.f_fee_time"-->
89
+ <!-- :options='feetime'-->
90
+ <!-- close-on-select clear-button>-->
91
+ <!-- </v-select>-->
92
+ <!-- </div>-->
93
+ <!-- </div>-->
94
+
95
+ </div>
96
+
97
+
98
+ <div class="row" style="margin-top:10px;">
99
+ <div class="col-sm-4 form-group" :class="[$v.payment.required ? 'select-error' : '']">
100
+ <label class=" font_normal_body" title="参数名称:付款方式">收款方式</label>
101
+ <input type="text" v-show="false" v-model="$refs.payment.selectedItems"
102
+ v-validate:payment='{required: true }'>
103
+ <v-select v-model="model.f_payment"
104
+ placeholder='请选择'
105
+ :value.sync="model.f_payment"
106
+ close-on-select
107
+ :options='paytype' clear-button v-ref:payment></v-select>
108
+ </div>
109
+ <div class="col-sm-4">
110
+ <label for="f_print" class="font_normal_body">&nbsp;打印格式</label>
111
+ <v-select id="print"
112
+ v-model="f_print"
113
+ placeholder='请选择'
114
+ :value.sync="model.f_print"
115
+ :options='printstyle'
116
+ close-on-select clear-button>
117
+ </v-select>
118
+ </div>
119
+ <div class="col-sm-4">
120
+ <label for="f_collection" class="font_normal_body">&nbsp;收&emsp;&emsp;款</label>
121
+ <label for="f_collection" class="font_normal_body">{{ model.f_collection }}</label>
122
+ </div>
123
+ </div>
124
+ <div class="row" style="margin-top:10px;" v-if="model.f_payment[0].includes('POS')">
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_voucher_number"
128
+ placeholder="凭证号">
129
+ </div>
130
+ </div>
131
+ <div class="row" style="margin-top:10px;">
132
+ <div class="col-sm-4">
133
+ <label for="f_voucher_number" class="font_normal_body">服务人员</label>
134
+ <v-select v-model="model.f_service_person"
135
+ placeholder='请选择'
136
+ :value.sync="model.f_service_person"
137
+ :options='services'
138
+ close-on-select clear-button>
139
+ </v-select>
140
+ </div>
141
+ <div class="col-sm-8">
142
+ <label for="f_comments" class=" font_normal_body">&nbsp;备&emsp;&emsp;注</label>
143
+ <input type="text" class="input_search" style="width:80%" v-model="model.f_comments" rows="1"
144
+ placeholder="备注">
145
+ </div>
146
+ </div>
147
+ </form>
148
+ <validate-bill v-if="hasValidateBill" :data="model" @validate-bill="validateBill"></validate-bill>
149
+ <print-bill :show="print" :data='row' :bill-config='config' :bill-data='billData' v-on:toggle="close"
150
+ @printok="printok" v-ref:printbill></print-bill>
151
+ <ticket-print :show="eticket_show" @toggle="eticket_toggle" v-ref:eticketbill></ticket-print>
152
+ <eticket-modal :show="eticket_msg" @closemodalshow="eticket_msg = false" :row="row" @confirm="confirm"></eticket-modal>
153
+ <!-- <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> -->
154
+ <!-- <tax-other-bill :show="taxprint" v-ref:taxprintbill :row='row' :logic='model' v-on:success="close" v-on:toggle="close"></tax-other-bill> -->
155
+ <div style="text-align:right;height: 25%;">
156
+ <button v-if="config.modificationList" class="button_search" @click="confirm(true)"
157
+ :disabled=' validflag || validateOk'>确认并转单
158
+ </button>
159
+ <payment-code-button :clickable=" validflag || validateOk"
160
+ :payment.sync="model.f_payment" :payment-data="paytype"
161
+ @confirm-payment="confirm()">
162
+ </payment-code-button>
163
+ <button class="button_search btn-gn" v-if="authArr.includes('其它欠费生成')" @click="createQianfei()"
164
+ :disabled=' validflag || validateOk'>生成欠费
165
+ </button>
166
+ <button class="button_search btn-gn" @click="checkInvoiceMsg()" :disabled='validflag || validateOk'>确认
167
+ </button>
168
+ <button class="button_clear btn-gn" @click="clean()">取消</button>
169
+ </div>
170
+ </validator>
171
+ <upload :blodid="blodid" v-if="config.showupload" isremark="true" fusetype="其他收费"></upload>
172
+ </div>
173
+ <payment-code v-ref:paymentcode :payment="model.f_payment" :row="row" :money="model.f_collection"></payment-code>
174
+ </div>
175
+ </template>
176
+ <script>
177
+ let otherChargeGen = async function (self, parameter) {
178
+ try {
179
+ // 加入扫码盒付款码支付流水号
180
+ self.model.f_serial_id = self.$refs.paymentcode.paymentCodeReturnData.f_out_trade_no
181
+ console.log('11111', self.model)
182
+ let resid = await self.$LogicService.otherCharge(self.model, self.row)
183
+ console.log('其他收费返回id', resid, self.config.hasPrint, self.$login.r.includes('不打印发票'))
184
+ if (self.config.dispatch) {
185
+ await self.$showMessage(`是否添加派工单`, ['confirm', 'cancel']).then((res) => {
186
+ if (res === 'confirm') {
187
+ console.log('其他收费xinxi', self.model)
188
+ console.log('其他收费xinxi', self.row)
189
+ let batch = {
190
+ sf_id: resid.data,
191
+ f_userinfo_code: self.row.f_userinfo_code,
192
+ f_dispathch_name: self.row.f_user_name,
193
+ f_phone: self.row.f_user_phone,
194
+ f_dispathch_address: self.row.f_address,
195
+ f_meternumber: self.row.f_meternumber,
196
+ f_dispathch_type: '安装',
197
+ f_source: '其他收费',
198
+ f_money: self.model.f_collection,
199
+ f_remarks: self.model.f_comments,
200
+ f_operator_date: self.$login.toStandardTimeString(),
201
+ f_orgid: self.$login.f.orgid,
202
+ f_dispathch_state: '待分配'
203
+ }
204
+ console.log('111:', batch)
205
+ self.$resetpost('rs/logic/savePatch', batch).then((res1) => {
206
+ // this.params.rows.splice(index, 1)
207
+ console.log('更新成功!', res1.data.id)
208
+ })
209
+ }
210
+ })
211
+ }
212
+ let localeSustainMoney = window.localStorage.getItem('sustainMoney')
213
+ if (localeSustainMoney != null) {
214
+ localeSustainMoney = (localeSustainMoney - 0) + (self.model.f_collection - 0)
215
+ window.localStorage.setItem('sustainMoney', localeSustainMoney)
216
+ }
217
+ // // 转燃气改装工程单
218
+ // if (self.config.modificationList && parameter) {
219
+ // let printSheet = {
220
+ // f_userinfo_id: self.row.f_userinfo_id,
221
+ // f_charge_id: resid.data,
222
+ // f_state: '有效',
223
+ // f_print_state: '未打印',
224
+ // f_type: '改装单',
225
+ // f_orgid: self.$login.f.orgid ? self.$login.f.orgid : '',
226
+ // f_orgname: self.$login.f.orgs ? self.$login.f.orgs : '',
227
+ // f_depid: self.$login.f.depids ? self.$login.f.depids : '',
228
+ // f_depname: self.$login.f.deps ? self.$login.f.deps : '',
229
+ // f_operator: self.$login.f.name,
230
+ // f_operatorid: self.$login.f.id
231
+ // }
232
+ // await self.$resetpost('rs/logic/savePrintSheet', {data: {printData: printSheet}}, {
233
+ // resolveMsg: '',
234
+ // rejectMsg: '转单失败, 请重试'
235
+ // })
236
+ // }
237
+ if (self.config.hasPrint && !self.$login.r.includes('不打印发票')) {
238
+ if (self.model.f_print[0] != '电子发票') {
239
+ if (self.config.hasBillManage) {
240
+ self.row.id = resid.data
241
+ self.row.f_bill_type = '其他收费'
242
+ self.row.f_bill_style = self.model.f_print[0]
243
+ self.print = true
244
+ } else {
245
+ self.row.id = resid.data
246
+ self.print = true
247
+ }
248
+ } else if (self.model.f_print[0] === '国税发票') {
249
+ // TODO
250
+ self.$dispatch('success')
251
+ } else if (self.model.f_print[0] === '电子发票') {
252
+ self.eticket_show = true
253
+ await self.$refs.eticketbill.openETicket(resid.data, self.row, '其他收费')
254
+ // self.$CommonService.openEticket(resid.data, '其他收费')
255
+ // self.$dispatch('success')
256
+ }
257
+ } else {
258
+ self.$dispatch('success')
259
+ }
260
+ } catch (error) {
261
+ console.log(error)
262
+ self.$showAlert(error, 'danger', 0)
263
+ self.$dispatch('refresh')
264
+ }
265
+ }
266
+
267
+ let asyncOtherCharge = async function (self) {
268
+ await self.$getConfig(self, 'OtherCharge')
269
+ self.model.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
270
+ self.model.f_payment = [self.config.payment]
271
+ self.model.otherdetail[0].f_brand_spec = [self.config.brandspec]
272
+ self.model.f_service_person = [self.config.services]
273
+
274
+ self.model.f_use_type = self.config.billType
275
+ self.model.f_bill_type = self.model.f_print
276
+ self.hasValidateBill = self.config.hasBillManage
277
+ // self.setTypename(self.model.f_brand_spec[0])
278
+ }
279
+ export default {
280
+ title: '其他收费',
281
+ data () {
282
+ return {
283
+ config: {
284
+ showupload: true,
285
+ checkFlag: false,
286
+ modificationList: false,
287
+ dispatch: false,
288
+ hasPrint: true, // 默认打票
289
+ hasBillManage: false, // 默认不启用发票管理
290
+ billType: '其他费用', // 票据类型(燃气费,其他费用,调用的发票代码不同)
291
+ printType: '普通收据', // 收据/电子票/专用发票/国税发票
292
+ payment: '现金缴费', // 付款方式
293
+ brandspec: '材料费', // 收费类型
294
+ services: this.$login.f.name // 服务人员
295
+ },
296
+ model: {
297
+ f_print: [],
298
+ f_payment: '现金缴费',
299
+ f_number: 0,
300
+ f_unitprice: 0,
301
+ f_collection: 0,
302
+ f_comments: '',
303
+ f_voucher_number: '',
304
+ f_service_person: '',
305
+ // 用户其他费用信息
306
+ t_userfees: '',
307
+ f_fee_type: ['其他费用'],
308
+ f_fee_time: ['12'],
309
+ otherdetail: [{f_brand_spec: [''],typeNameList:[],f_typenumber:'',typenumberList:[], f_unitprice: '', f_number: ''}]
310
+ },
311
+ eticket_msg: false,
312
+ eticket_show: false,
313
+ invoice_is_pax: '征税',
314
+ is_pax: [{label: '征税', value: '征税'}, {label: '不征税', value: '不征税'}],
315
+ print: false,
316
+ taxprint: false,
317
+ billData: {
318
+ url: 'rs/report/otherCharge_bill',
319
+ bill: ''
320
+ },
321
+
322
+ // 启用发票管理需要对票号进行验证
323
+ hasValidateBill: false,
324
+ validateOk: false,
325
+ f_typenumber: '',
326
+ typeNameList: [],
327
+ typenumberList: [],
328
+ brandspec: this.$appdata.getParam('品名及规格'),
329
+ printstyle: this.$appdata.getParam('打印格式'),
330
+ paytype: this.$appdata.getParam('付款方式'),
331
+ feetype: this.$appdata.getParam('其他费用'),
332
+ services: this.$appdata.getParam('服务人员'),
333
+ isflag: false
334
+ }
335
+ },
336
+ props: ['row'],
337
+ ready () {
338
+ // this.model.f_unitprice = this.$appdata.getSingleValue('置换气费')
339
+ asyncOtherCharge(this)
340
+ },
341
+ watch: {
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) {
350
+ console.log("单价变化:",val)
351
+ if (this.model.otherdetail[val] && this.model.otherdetail[val].f_typenumber[0]) {
352
+ let unitprice = this.$appdata.getSingleValue(this.model.otherdetail[val].f_typenumber[0])
353
+ if (unitprice !== undefined) {
354
+ this.model.otherdetail[val].f_unitprice = unitprice
355
+ }
356
+ }
357
+ },
358
+ async createQianfei () {
359
+ let data = {
360
+ f_serial_id: this.model.f_serial_id,
361
+ record_userinfo: this.row.f_userinfo_id,
362
+ f_serial_number: this.model.f_serial_number,
363
+ f_userfiles_id: this.row.f_userfiles_id,
364
+ f_user_id: this.row.f_user_id,
365
+ f_user_name: this.row.f_user_name,
366
+ f_address: this.row.f_address,
367
+ f_user_type: this.row.f_user_type,
368
+ f_gasproperties: this.row.f_gasproperties,
369
+ // f_number: model.f_number,
370
+ // f_unitprice: model.f_unitprice,
371
+ f_collection: this.model.f_collection,
372
+ f_comments: this.model.f_comments,
373
+ f_payment: this.model.f_payment[0],
374
+ f_voucher_number: this.model.f_voucher_number,
375
+ f_bill_style: this.model.f_print[0],
376
+ // f_brand_spec: model.f_brand_spec[0],
377
+ f_userinfo_id: this.row.f_userinfo_id,
378
+ f_service_person: this.model.f_service_person[0],
379
+ f_operat_type: '其他收费欠费登记',
380
+ f_describe: `${this.$login.f.name}对客户${this.row.f_user_name}进行其他收费欠费登记操作`,
381
+ f_state: '有效',
382
+ f_operator: this.$login.f.name,
383
+ f_operatorid: this.$login.f.id,
384
+ f_orgid: this.$login.f.orgid,
385
+ f_orgname: this.$login.f.orgs,
386
+ f_depid: this.$login.f.depids,
387
+ f_depname: this.$login.f.deps,
388
+ f_zoneid: this.$login.f.zoneid,
389
+ f_zones: this.$login.f.zones,
390
+ f_is_pay: '否',
391
+ // 其他费用信息
392
+ t_userfees: this.model.t_userfees,
393
+ f_fee_type: this.model.f_fee_type[0],
394
+ f_fee_time: this.model.f_fee_time[0],
395
+ otherdetail: this.model.otherdetail
396
+ }
397
+ await this.$resetpost('rs/logic/sale_othercharge_logic_nopay', data, {
398
+ resolveMsg: '生成其他欠费成功',
399
+ rejectMsg: '生成其他欠费失败'
400
+ })
401
+ this.$dispatch('success')
402
+ },
403
+ // 校验发票信息
404
+ checkInvoiceMsg () {
405
+ if (this.model.f_print[0] === '电子发票') {
406
+ if (!this.row.f_taxpayer_id) {
407
+ this.row.f_taxpayer_id = this.row.f_idnumber
408
+ }
409
+ if (!this.row.f_paper_name) {
410
+ this.row.f_paper_name = this.row.f_user_name
411
+ }
412
+ if (!this.row.f_address_phone) {
413
+ this.row.f_address_phone = this.row.f_address + ' ' + this.row.f_user_phone
414
+ }
415
+ if (!this.row.f_email) {
416
+ this.row.f_email = this.row.f_email
417
+ }
418
+ this.eticket_msg = true
419
+ } else {
420
+ this.confirm()
421
+ }
422
+ },
423
+ eticket_toggle () {
424
+ this.eticket_show = false
425
+ this.$dispatch('success')
426
+ },
427
+ async setTypename (val,index) {
428
+ this.model.otherdetail[index].f_typenumber = ''
429
+ this.model.otherdetail[index].typeNameList = this.$appdata.getParam(val.f_brand_spec[0])
430
+ this.model.otherdetail[index].typenumberList = []
431
+ this.model.otherdetail[index].f_unitprice = ''
432
+ let self = this
433
+ if (val == '开卡费') {
434
+ if (this.$appdata.getSingleValue('开卡费')) {
435
+ let money = this.$appdata.getSingleValue('开卡费')
436
+ await this.model.otherdetail.forEach(function (item) {
437
+ self.isflag = false
438
+ if (item.f_brand_spec[0] == '开卡费') {
439
+ item.f_unitprice = money
440
+ item.f_number = 1
441
+ self.isflag = true
442
+ }
443
+ })
444
+ this.getcollection()
445
+ }
446
+ }
447
+ },
448
+ setTypenumber (val,index) {
449
+ this.model.otherdetail[index].typenumberList = this.$appdata.getParam(val.f_typename[0 ])
450
+ this.model.otherdetail[index].f_unitprice = ''
451
+ },
452
+ async confirm (parameter) {
453
+ let res = await this.$showMessage(`确定对客户${this.row.f_user_name}进行其他收费吗?`, ['confirm', 'cancel'])
454
+ if (res != 'confirm') return
455
+ this.eticket_msg = false
456
+ // 先调用付款码支付组件流程
457
+ let ss = await this.$refs.paymentcode.flowPath()
458
+ this.$refs.paymentcode.paymentCodeShow = false
459
+ console.log('付款码操作返回', ss)
460
+ if (!ss.result) return
461
+ otherChargeGen(this, parameter)
462
+ },
463
+ clean () {
464
+ this.$dispatch('refresh', this.row)
465
+ },
466
+ close () {
467
+ this.taxprint = false
468
+ this.print = false
469
+ this.clean()
470
+ },
471
+ printok () {
472
+ this.$dispatch('success')
473
+ },
474
+ validateBill (val) {
475
+ this.validateOk = !val.isOk
476
+ this.billData.bill = val.bill
477
+ },
478
+ getcollection () {
479
+ let money = 0
480
+ let flag = true
481
+ this.model.otherdetail.forEach((item) => {
482
+ if (!item.f_number || item.f_number == '0') flag = false
483
+ if (item.f_unitprice && item.f_number) {
484
+ money += ((item.f_unitprice - 0) * (item.f_number - 0)) - 0
485
+ }
486
+ })
487
+ if (money != 0) {
488
+ this.model.f_collection = money.toFixed(2)
489
+ }
490
+ if (!flag) this.model.f_collection = ''
491
+ },
492
+ addadetail () {
493
+ this.$set(`model.otherdetail[${this.model.otherdetail.length}]`, {f_brand_spec: [''],f_typenumber:'',typeNameList:[],typenumberList:[], f_unitprice: '', f_number: ''})
494
+ console.log(JSON.stringify(this.model.otherdetail))
495
+ },
496
+ delthisdetail (index) {
497
+ if (this.model.otherdetail.length > 1) {
498
+ this.getcollection()
499
+ this.model.otherdetail.splice(index, 1)
500
+ }
501
+ },
502
+ async userfees (userinfoid, feetype) {
503
+ this.model.t_userfees = await this.$resetpost('rs/sql/saleSingleTable', {
504
+ data: {
505
+ tablename: 't_userfees',
506
+ condition: `f_userinfo_id=${userinfoid} and f_fee_type='${feetype}'`
507
+ }
508
+ }, {resolveMsg: null, rejectMsg: '查询客户其他费用失败!'})
509
+ }
510
+ },
511
+ computed: {
512
+ validflag () {
513
+ console.log(this.isflag)
514
+ console.log(this.$v.valid)
515
+ if (this.isflag) {
516
+ if (this.model.f_collection && this.model.f_collection != '') {
517
+ let collection = (parseFloat(this.model.f_collection - 0)).toFixed(2)
518
+ if (collection > 0) return !this.isflag
519
+ else return !this.$v.valid
520
+ } else {
521
+ return !this.$v.valid
522
+ }
523
+ } else {
524
+ return !this.$v.valid
525
+ }
526
+ },
527
+ feetime () {
528
+ return [{label: '一个月', value: '1'}, {label: '三个月', value: '3'}, {label: '六个月', value: '6'}, {
529
+ label: '一年',
530
+ value: '12'
531
+ }]
532
+ },
533
+
534
+ authArr () {
535
+ console.log('this.$login.r:', this.$login.r)
536
+ console.log('this.$login.r.includes:', this.$login.r.includes('收费综合导出权限'))
537
+ return this.$login.r ? this.$login.r : []
538
+ },
539
+ gettypename () {
540
+ return this.typeNameList
541
+ },
542
+ gettypenumber () {
543
+ return this.typenumberList
544
+ }
545
+ }
546
+ }
547
+ </script>
548
+
549
+ <style>
550
+ </style>