sale-client 3.5.63 → 3.5.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.5.63",
3
+ "version": "3.5.64",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -15,7 +15,7 @@
15
15
  v-model="row.f_brand_spec"
16
16
  :value.sync="row.f_brand_spec"
17
17
  :options='brandspec'
18
- @change="setTypename"
18
+ @change="setTypename(row,index)"
19
19
  close-on-select clear-button>
20
20
  </v-select>
21
21
  </div>
@@ -26,8 +26,8 @@
26
26
  v-model="row.f_typename"
27
27
  placeholder='请选择'
28
28
  :value.sync="row.f_typename"
29
- :options='gettypename'
30
- @change="setTypenumber"
29
+ :options='row.typeNameList'
30
+ @change="setTypenumber(row,index)"
31
31
  close-on-select clear-button>
32
32
  </v-select>
33
33
  </div>
@@ -38,7 +38,7 @@
38
38
  v-model="row.f_typenumber"
39
39
  placeholder='请选择'
40
40
  :value.sync="row.f_typenumber"
41
- :options='gettypenumber'
41
+ :options='row.typenumberList'
42
42
  @change="setTypeprice(index)"
43
43
  close-on-select clear-button>
44
44
  </v-select>
@@ -50,6 +50,7 @@
50
50
  <input class="input_search" style="width:60%" type="number" min="1" @blur.prevent="getcollection()"
51
51
  v-model="row.f_unitprice"
52
52
  :value.sync="row.f_unitprice"
53
+ :disabled="false"
53
54
  placeholder="单价" v-next-el='sl'>
54
55
  </div>
55
56
  <div class="col-sm-4" :class="{'has-success':row.f_number,'has-error':!row.f_number}">
@@ -273,7 +274,7 @@ let asyncOtherCharge = async function (self) {
273
274
  self.model.f_use_type = self.config.billType
274
275
  self.model.f_bill_type = self.model.f_print
275
276
  self.hasValidateBill = self.config.hasBillManage
276
- self.setTypename(self.model.f_brand_spec[0])
277
+ // self.setTypename(self.model.f_brand_spec[0])
277
278
  }
278
279
  export default {
279
280
  title: '其他收费',
@@ -304,7 +305,7 @@ export default {
304
305
  t_userfees: '',
305
306
  f_fee_type: ['其他费用'],
306
307
  f_fee_time: ['12'],
307
- otherdetail: [{f_brand_spec: ['材料费'], f_unitprice: '', f_number: ''}]
308
+ otherdetail: [{f_brand_spec: [''],typeNameList:[],f_typenumber:'',typenumberList:[], f_unitprice: '', f_number: ''}]
308
309
  },
309
310
  eticket_msg: false,
310
311
  eticket_show: false,
@@ -345,6 +346,7 @@ export default {
345
346
  },
346
347
  methods: {
347
348
  setTypeprice (val) {
349
+ console.log("单价变化:",val)
348
350
  if (this.model.otherdetail[val] && this.model.otherdetail[val].f_typenumber[0]) {
349
351
  let unitprice = this.$appdata.getSingleValue(this.model.otherdetail[val].f_typenumber[0])
350
352
  if (unitprice !== undefined) {
@@ -421,10 +423,11 @@ export default {
421
423
  this.eticket_show = false
422
424
  this.$dispatch('success')
423
425
  },
424
- async setTypename (val) {
425
- this.f_typenumber = ''
426
- this.f_unitprice = ''
427
- this.typeNameList = this.$appdata.getParam(val)
426
+ async setTypename (val,index) {
427
+ this.model.otherdetail[index].f_typenumber = ''
428
+ this.model.otherdetail[index].typeNameList = this.$appdata.getParam(val.f_brand_spec[0])
429
+ this.model.otherdetail[index].typenumberList = []
430
+ this.model.otherdetail[index].f_unitprice = ''
428
431
  let self = this
429
432
  if (val == '开卡费') {
430
433
  if (this.$appdata.getSingleValue('开卡费')) {
@@ -441,8 +444,9 @@ export default {
441
444
  }
442
445
  }
443
446
  },
444
- setTypenumber (val) {
445
- this.typenumberList = this.$appdata.getParam(val)
447
+ setTypenumber (val,index) {
448
+ this.model.otherdetail[index].typenumberList = this.$appdata.getParam(val.f_typename[0 ])
449
+ this.model.otherdetail[index].f_unitprice = ''
446
450
  },
447
451
  async confirm (parameter) {
448
452
  let res = await this.$showMessage(`确定对客户${this.row.f_user_name}进行其他收费吗?`, ['confirm', 'cancel'])
@@ -485,7 +489,7 @@ export default {
485
489
  if (!flag) this.model.f_collection = ''
486
490
  },
487
491
  addadetail () {
488
- this.$set(`model.otherdetail[${this.model.otherdetail.length}]`, {f_brand_spec: ['材料费'], f_unitprice: '', f_number: ''})
492
+ this.$set(`model.otherdetail[${this.model.otherdetail.length}]`, {f_brand_spec: [''],f_typenumber:'',typeNameList:[],typenumberList:[], f_unitprice: '', f_number: ''})
489
493
  console.log(JSON.stringify(this.model.otherdetail))
490
494
  },
491
495
  delthisdetail (index) {
@@ -131,7 +131,7 @@
131
131
  },
132
132
  'close' () {
133
133
  this.showItem = false
134
- this.$refs.stocklist.search()
134
+ // this.$refs.stocklist.search()
135
135
  console.log('this.$refs', this.$refs)
136
136
  console.log('showitem', this.showItem)
137
137
  },
@@ -0,0 +1,549 @@
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="true"
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
+
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, '是', self.invoice_is_pax, '其他收费')
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
+ checkFlag: false,
285
+ modificationList: false,
286
+ dispatch: false,
287
+ hasPrint: true, // 默认打票
288
+ hasBillManage: false, // 默认不启用发票管理
289
+ billType: '其他费用', // 票据类型(燃气费,其他费用,调用的发票代码不同)
290
+ printType: '普通收据', // 收据/电子票/专用发票/国税发票
291
+ payment: '现金缴费', // 付款方式
292
+ brandspec: '材料费', // 收费类型
293
+ services: this.$login.f.name // 服务人员
294
+ },
295
+ model: {
296
+ f_print: [],
297
+ f_payment: '现金缴费',
298
+ f_number: 0,
299
+ f_unitprice: 0,
300
+ f_collection: 0,
301
+ f_comments: '',
302
+ f_voucher_number: '',
303
+ f_service_person: '',
304
+ // 用户其他费用信息
305
+ t_userfees: '',
306
+ f_fee_type: ['其他费用'],
307
+ f_fee_time: ['12'],
308
+ otherdetail: [{f_brand_spec: [''],typeNameList:[],f_typenumber:'',typenumberList:[], f_unitprice: '', f_number: ''}]
309
+ },
310
+ eticket_msg: false,
311
+ eticket_show: false,
312
+ invoice_is_pax: '征税',
313
+ is_pax: [{label: '征税', value: '征税'}, {label: '不征税', value: '不征税'}],
314
+ print: false,
315
+ taxprint: false,
316
+ billData: {
317
+ url: 'rs/report/otherCharge_bill',
318
+ bill: ''
319
+ },
320
+
321
+ // 启用发票管理需要对票号进行验证
322
+ hasValidateBill: false,
323
+ validateOk: false,
324
+ f_typenumber: '',
325
+ typeNameList: [],
326
+ typenumberList: [],
327
+ brandspec: this.$appdata.getParam('品名及规格'),
328
+ printstyle: this.$appdata.getParam('打印格式'),
329
+ paytype: this.$appdata.getParam('付款方式'),
330
+ feetype: this.$appdata.getParam('其他费用'),
331
+ services: this.$appdata.getParam('服务人员'),
332
+ isflag: false
333
+ }
334
+ },
335
+ props: ['row'],
336
+ ready () {
337
+ // this.model.f_unitprice = this.$appdata.getSingleValue('置换气费')
338
+ asyncOtherCharge(this)
339
+ },
340
+ watch: {
341
+ 'model.f_fee_type' (val) {
342
+ if (val[0]) {
343
+ this.userfees(this.row.f_userinfo_id, val[0])
344
+ }
345
+ }
346
+ },
347
+ methods: {
348
+ setTypeprice (val) {
349
+ console.log("单价变化:",val)
350
+ if (this.model.otherdetail[val] && this.model.otherdetail[val].f_typenumber[0]) {
351
+ let unitprice = this.$appdata.getSingleValue(this.model.otherdetail[val].f_typenumber[0])
352
+ if (unitprice !== undefined) {
353
+ this.model.otherdetail[val].f_unitprice = unitprice
354
+ }
355
+ }
356
+ },
357
+ async createQianfei () {
358
+ let data = {
359
+ f_serial_id: this.model.f_serial_id,
360
+ record_userinfo: this.row.f_userinfo_id,
361
+ f_serial_number: this.model.f_serial_number,
362
+ f_userfiles_id: this.row.f_userfiles_id,
363
+ f_user_id: this.row.f_user_id,
364
+ f_user_name: this.row.f_user_name,
365
+ f_address: this.row.f_address,
366
+ f_user_type: this.row.f_user_type,
367
+ f_gasproperties: this.row.f_gasproperties,
368
+ // f_number: model.f_number,
369
+ // f_unitprice: model.f_unitprice,
370
+ f_collection: this.model.f_collection,
371
+ f_comments: this.model.f_comments,
372
+ f_payment: this.model.f_payment[0],
373
+ f_voucher_number: this.model.f_voucher_number,
374
+ f_bill_style: this.model.f_print[0],
375
+ // f_brand_spec: model.f_brand_spec[0],
376
+ f_userinfo_id: this.row.f_userinfo_id,
377
+ f_service_person: this.model.f_service_person[0],
378
+ f_operat_type: '其他收费欠费登记',
379
+ f_describe: `${this.$login.f.name}对客户${this.row.f_user_name}进行其他收费欠费登记操作`,
380
+ f_state: '有效',
381
+ f_operator: this.$login.f.name,
382
+ f_operatorid: this.$login.f.id,
383
+ f_orgid: this.$login.f.orgid,
384
+ f_orgname: this.$login.f.orgs,
385
+ f_depid: this.$login.f.depids,
386
+ f_depname: this.$login.f.deps,
387
+ f_zoneid: this.$login.f.zoneid,
388
+ f_zones: this.$login.f.zones,
389
+ f_is_pay: '否',
390
+ // 其他费用信息
391
+ t_userfees: this.model.t_userfees,
392
+ f_fee_type: this.model.f_fee_type[0],
393
+ f_fee_time: this.model.f_fee_time[0],
394
+ otherdetail: this.model.otherdetail
395
+ }
396
+ await this.$resetpost('rs/logic/sale_othercharge_logic_nopay', data, {
397
+ resolveMsg: '生成其他欠费成功',
398
+ rejectMsg: '生成其他欠费失败'
399
+ })
400
+ this.$dispatch('success')
401
+ },
402
+ // 校验发票信息
403
+ checkInvoiceMsg () {
404
+ if (this.model.f_print[0] === '电子发票') {
405
+ if (!this.row.f_taxpayer_id) {
406
+ this.row.f_taxpayer_id = this.row.f_idnumber
407
+ }
408
+ if (!this.row.f_paper_name) {
409
+ this.row.f_paper_name = this.row.f_user_name
410
+ }
411
+ if (!this.row.f_address_phone) {
412
+ this.row.f_address_phone = this.row.f_address + ' ' + this.row.f_user_phone
413
+ }
414
+ if (!this.row.f_email) {
415
+ this.row.f_email = this.row.f_email
416
+ }
417
+ this.eticket_msg = true
418
+ } else {
419
+ this.confirm()
420
+ }
421
+ },
422
+ eticket_toggle () {
423
+ this.eticket_show = false
424
+ this.$dispatch('success')
425
+ },
426
+ async setTypename (val,index) {
427
+ this.model.otherdetail[index].f_typenumber = ''
428
+ this.model.otherdetail[index].typeNameList = this.$appdata.getParam(val.f_brand_spec[0])
429
+ this.model.otherdetail[index].typenumberList = []
430
+ this.model.otherdetail[index].f_unitprice = ''
431
+ let self = this
432
+ if (val == '开卡费') {
433
+ if (this.$appdata.getSingleValue('开卡费')) {
434
+ let money = this.$appdata.getSingleValue('开卡费')
435
+ await this.model.otherdetail.forEach(function (item) {
436
+ self.isflag = false
437
+ if (item.f_brand_spec[0] == '开卡费') {
438
+ item.f_unitprice = money
439
+ item.f_number = 1
440
+ self.isflag = true
441
+ }
442
+ })
443
+ this.getcollection()
444
+ }
445
+ }
446
+ },
447
+ setTypenumber (val,index) {
448
+ this.model.otherdetail[index].typenumberList = this.$appdata.getParam(val.f_typename[0 ])
449
+ this.model.otherdetail[index].f_unitprice = ''
450
+ },
451
+ async confirm (parameter) {
452
+ let res = await this.$showMessage(`确定对客户${this.row.f_user_name}进行其他收费吗?`, ['confirm', 'cancel'])
453
+ if (res != 'confirm') return
454
+ this.eticket_msg = false
455
+ // 先调用付款码支付组件流程
456
+ let ss = await this.$refs.paymentcode.flowPath()
457
+ this.$refs.paymentcode.paymentCodeShow = false
458
+ console.log('付款码操作返回', ss)
459
+ if (!ss.result) return
460
+ otherChargeGen(this, parameter)
461
+ },
462
+ clean () {
463
+ this.$dispatch('refresh', this.row)
464
+ },
465
+ close () {
466
+ this.taxprint = false
467
+ this.print = false
468
+ this.clean()
469
+ },
470
+ printok () {
471
+ this.$dispatch('success')
472
+ },
473
+ validateBill (val) {
474
+ this.validateOk = !val.isOk
475
+ this.billData.bill = val.bill
476
+ },
477
+ getcollection () {
478
+ let money = 0
479
+ let flag = true
480
+ this.model.otherdetail.forEach((item) => {
481
+ if (!item.f_number || item.f_number == '0') flag = false
482
+ if (item.f_unitprice && item.f_number) {
483
+ money += ((item.f_unitprice - 0) * (item.f_number - 0)) - 0
484
+ }
485
+ })
486
+ if (money != 0) {
487
+ this.model.f_collection = money.toFixed(2)
488
+ }
489
+ if (!flag) this.model.f_collection = ''
490
+ },
491
+ addadetail () {
492
+ this.$set(`model.otherdetail[${this.model.otherdetail.length}]`, {f_brand_spec: [''],f_typenumber:'',typeNameList:[],typenumberList:[], f_unitprice: '', f_number: ''})
493
+ console.log(JSON.stringify(this.model.otherdetail))
494
+ },
495
+ delthisdetail (index) {
496
+ if (this.model.otherdetail.length > 1) {
497
+ this.getcollection()
498
+ this.model.otherdetail.splice(index, 1)
499
+ }
500
+ },
501
+ async userfees (userinfoid, feetype) {
502
+ this.model.t_userfees = await this.$resetpost('rs/sql/saleSingleTable', {
503
+ data: {
504
+ tablename: 't_userfees',
505
+ condition: `f_userinfo_id=${userinfoid} and f_fee_type='${feetype}'`
506
+ }
507
+ }, {resolveMsg: null, rejectMsg: '查询客户其他费用失败!'})
508
+ }
509
+ },
510
+ computed: {
511
+ validflag () {
512
+ console.log(this.isflag)
513
+ console.log(this.$v.valid)
514
+ if (this.isflag) {
515
+ if (this.model.f_collection && this.model.f_collection != '') {
516
+ let collection = (parseFloat(this.model.f_collection - 0)).toFixed(2)
517
+ if (collection > 0) return !this.isflag
518
+ else return !this.$v.valid
519
+ } else {
520
+ return !this.$v.valid
521
+ }
522
+ } else {
523
+ return !this.$v.valid
524
+ }
525
+ },
526
+ feetime () {
527
+ return [{label: '一个月', value: '1'}, {label: '三个月', value: '3'}, {label: '六个月', value: '6'}, {
528
+ label: '一年',
529
+ value: '12'
530
+ }]
531
+ },
532
+
533
+ authArr () {
534
+ console.log('this.$login.r:', this.$login.r)
535
+ console.log('this.$login.r.includes:', this.$login.r.includes('收费综合导出权限'))
536
+ return this.$login.r ? this.$login.r : []
537
+ },
538
+ gettypename () {
539
+ return this.typeNameList
540
+ },
541
+ gettypenumber () {
542
+ return this.typenumberList
543
+ }
544
+ }
545
+ }
546
+ </script>
547
+
548
+ <style>
549
+ </style>
@@ -7,5 +7,8 @@ let specialComp = {
7
7
  'file-user-general-info': (resolve) => {
8
8
  require(['./components/FilesManage/UserGeneralInfoTest'], resolve)
9
9
  },
10
+ 'other-charge-new': (resolve) => {
11
+ require(['./components/OtherChargeNew'], resolve)
12
+ }
10
13
  }
11
14
  exports.specialComp = specialComp
@@ -315,8 +315,8 @@ const myMap = new Map()
315
315
  this.$refs.paged.$refs.criteria.model.f_endDate = this.$login.toStandardDateString() + ' 23:59:59'
316
316
  this.search()
317
317
  await this.getinputtores()
318
- readyGen(this)
319
- this.$refs.paged.$refs.criteria.search()
318
+ // readyGen(this)
319
+ // this.$refs.paged.$refs.criteria.search()
320
320
  // this.getwarehouse()
321
321
  },
322
322
  props: ['showMessage'],