sale-client 3.4.156-2 → 3.4.158

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.4.156-2",
3
+ "version": "3.4.158",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -388,7 +388,7 @@ export default {
388
388
  this.data.baseinfo.base.f_cost_type = this.data.baseinfo.base.f_cost_type ? [this.data.baseinfo.base.f_cost_type] : '现金缴费'
389
389
  this.data.baseinfo.base.f_bz_type = this.data.baseinfo.base.f_bz_type ? [this.data.baseinfo.base.f_bz_type] : ''
390
390
 
391
- this.data.baseinfo.base.f_paper_type = this.data.baseinfo.base.f_paper_type ? [this.data.baseinfo.base.f_paper_type] : '国税发票'
391
+ this.data.baseinfo.base.f_paper_type = this.data.baseinfo.base.f_paper_type ? [this.data.baseinfo.base.f_paper_type] : '电子发票'
392
392
  this.data.baseinfo.bank.f_bank_name = this.data.baseinfo.bank.f_bank_name ? [this.data.baseinfo.bank.f_bank_name] : '中国银行'
393
393
  this.data.baseinfo.base.f_people_num = this.data.baseinfo.base.f_people_num ? this.data.baseinfo.base.f_people_num : (this.peopleNum ? this.peopleNum : 0)
394
394
 
@@ -190,6 +190,11 @@
190
190
  }
191
191
  })
192
192
  }
193
+ let localeSustainMoney = window.localStorage.getItem('sustainMoney')
194
+ if (localeSustainMoney != null) {
195
+ localeSustainMoney = (localeSustainMoney - 0) + (self.model.f_collection - 0)
196
+ window.localStorage.setItem('sustainMoney', localeSustainMoney)
197
+ }
193
198
  // // 转燃气改装工程单
194
199
  // if (self.config.modificationList && parameter) {
195
200
  // let printSheet = {
@@ -260,6 +260,11 @@
260
260
  }
261
261
  })
262
262
  }
263
+ let localeSustainMoney = window.localStorage.getItem('sustainMoney')
264
+ if (localeSustainMoney != null) {
265
+ localeSustainMoney = (localeSustainMoney - 0) + (self.model.f_collection - 0)
266
+ window.localStorage.setItem('sustainMoney', localeSustainMoney)
267
+ }
263
268
  // // 转燃气改装工程单
264
269
  // if (self.config.modificationList && parameter) {
265
270
  // let printSheet = {
@@ -418,8 +423,8 @@
418
423
  // f_brand_spec: model.f_brand_spec[0],
419
424
  f_userinfo_id: this.row.f_userinfo_id,
420
425
  f_service_person: this.model.f_service_person[0],
421
- f_operat_type: '其他收费',
422
- f_describe: `${this.$login.f.name}对客户${this.row.f_user_name}进行其他收费操作`,
426
+ f_operat_type: '其他收费欠费登记',
427
+ f_describe: `${this.$login.f.name}对客户${this.row.f_user_name}进行其他收费欠费登记操作`,
423
428
  f_state: '有效',
424
429
  f_operator: this.$login.f.name,
425
430
  f_operatorid: this.$login.f.id,
@@ -260,6 +260,11 @@
260
260
  }
261
261
  })
262
262
  }
263
+ let localeSustainMoney = window.localStorage.getItem('sustainMoney')
264
+ if (localeSustainMoney != null) {
265
+ localeSustainMoney = (localeSustainMoney - 0) + (self.model.f_collection - 0)
266
+ window.localStorage.setItem('sustainMoney', localeSustainMoney)
267
+ }
263
268
  // // 转燃气改装工程单
264
269
  // if (self.config.modificationList && parameter) {
265
270
  // let printSheet = {
@@ -0,0 +1,381 @@
1
+ <template>
2
+ <div class="auto">
3
+ <validator name='v' style="overflow-y: auto">
4
+ <form class="form-horizontal">
5
+ <div class="row">
6
+ <div class="col-sm-6 form-group">
7
+ <label class="font_normal_body">&emsp;&emsp;&emsp;&emsp;费用类型</label>
8
+ <input type="text" v-model="model.f_fee_type" placeholder="保险收费" disabled=disabled style="width: 60%"
9
+ class="input_search">
10
+ </div>
11
+ <div class="col-sm-6 form-group">
12
+ <label class="font_normal_body">&emsp;&emsp;&emsp;&emsp;&emsp;投保人</label>
13
+ <input type="text" v-model="model.f_user_name" style="width: 60%"
14
+ class="input_search">
15
+ </div>
16
+ <div class="col-sm-6 form-group">
17
+ <label class="font_normal_body">&emsp;&emsp;&emsp;&emsp;&emsp;身份证</label>
18
+ <input type="text" v-model="model.f_idnumber" style="width: 60%"
19
+ class="input_search">
20
+ </div>
21
+ <div class="col-sm-6 form-group">
22
+ <label class="font_normal_body">&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;电话</label>
23
+ <input type="text" v-model="model.f_user_phone" style="width: 60%"
24
+ class="input_search">
25
+ </div>
26
+ <div class="col-sm-6 form-group">
27
+ <label class="font_normal_body">&emsp;&emsp;&emsp;&emsp;购买日期</label>
28
+ <datepicker id="f_buy_date" placeholder="本次保费开始日期" style="width:60%"
29
+ v-model="model.f_buy_date"
30
+ :value.sync="model.f_buy_date"
31
+ :format="'yyyy-MM-dd HH:mm:ss'"
32
+ :show-reset-button="true">
33
+ </datepicker>
34
+ </div>
35
+ <div class="col-sm-6 form-group" :class="[$v.f_ins_start_date.required ? 'has-error' : '']" v-if="model.f_state === '待执行'">
36
+ <label class="font_normal_body">本次保费开始日期</label>
37
+ <input type="text" v-show="false" v-model="model.f_ins_start_date">
38
+ <datepicker id="f_ins_start_date" placeholder="本次保费开始日期" style="width:60%"
39
+ v-model="model.f_ins_start_date"
40
+ :value.sync="model.f_ins_start_date"
41
+ :format="'yyyy-MM-dd HH:mm:ss'"
42
+ :show-reset-button="true">
43
+ </datepicker>
44
+ </div>
45
+ <div class="col-sm-6 form-group" :class="[$v.f_ins_start_date.required ? 'has-error' : '']" v-else="model.f_state !== '待执行'">
46
+ <label class="font_normal_body">本次保费开始日期</label>
47
+ <input type="text" v-show="false" v-model="model.f_ins_start_date"
48
+ v-validate:f_ins_start_date='{required: true }'>
49
+ <datepicker id="f_ins_start_date" placeholder="本次保费开始日期" style="width:60%"
50
+ v-model="model.f_ins_start_date"
51
+ :value.sync="model.f_ins_start_date"
52
+ :format="'yyyy-MM-dd HH:mm:ss'"
53
+ :show-reset-button="true">
54
+ </datepicker>
55
+ </div>
56
+ <div class="col-sm-6 form-group" v-if="model.f_state ==='待执行'" :class="[$v.f_salecount.required? 'has-error' : '']">
57
+ <label class="font_normal_body">&emsp;&emsp;&emsp;&emsp;购买年限</label>
58
+ <input type="number" v-model="model.f_salecount" placeholder="购买年限" style="width: 60%"
59
+ class="input_search" v-validate:f_salecount='{required: true }' v-el:style v-next-el="inpipe">
60
+ </div>
61
+ <div class="col-sm-6 form-group" v-if="model.f_state !=='待执行'">
62
+ <label class="font_normal_body">&emsp;&emsp;&emsp;&emsp;购买年限</label>
63
+ <input type="number" v-model="model.f_salecount" placeholder="购买年限" style="width: 60%"
64
+ class="input_search" v v-el:style v-next-el="inpipe">
65
+ </div>
66
+ <div class="col-sm-6 form-group" :class="[$v.f_expiration_date2.required ? 'has-error' : '']" v-if="model.f_state === '待执行'">
67
+ <input type="text" v-show="false" v-model="tmp" :value.sync='model.f_expiration_date' v-el:f_expiration_date2>
68
+ <label class="font_normal_body">&emsp;&emsp;保费结束日期</label>
69
+ <datepicker id="f_expiration_date" placeholder="保费结束日期" style="width:60%"
70
+ @con-bulr="isShowSaleCount"
71
+ v-ref:f_expiration_date
72
+ v-model="model.f_expiration_date"
73
+ :value.sync="model.f_expiration_date"
74
+ :format="'yyyy-MM-dd HH:mm:ss'"
75
+ :show-reset-button="true">
76
+ </datepicker>
77
+ </div>
78
+ <div class="col-sm-6 form-group" :class="[$v.f_expiration_date2.required ? 'has-error' : '']" v-else="model.f_state !== '待执行'">
79
+ <input type="text" v-show="false" v-model="tmp" :value.sync='model.f_expiration_date' v-validate:f_expiration_date2='{required: true }' v-el:f_expiration_date2>
80
+ <label class="font_normal_body">&emsp;&emsp;保费结束日期</label>
81
+ <datepicker id="f_expiration_date" placeholder="保费结束日期" style="width:60%"
82
+ @con-bulr="isShowSaleCount"
83
+ v-ref:f_expiration_date
84
+ v-model="model.f_expiration_date"
85
+ :value.sync="model.f_expiration_date"
86
+ :format="'yyyy-MM-dd HH:mm:ss'"
87
+ :show-reset-button="true">
88
+ </datepicker>
89
+ </div>
90
+ <div class="col-sm-6 form-group" :class="[$v.f_insurance_type.required ? 'has-error' : '']">
91
+ <label class="font_normal_body" title="参数:险种">&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;险种</label>
92
+ <input type="text" v-show="false" v-model="model.f_insurance_type"
93
+ v-validate:f_insurance_type='{required: true }'>
94
+ <v-select
95
+ placeholder='险种'
96
+ :value.sync="model.f_insurance_type"
97
+ style="width:60%"
98
+ :value-single="true"
99
+ v-model="model.f_insurance_type"
100
+ :options='insurancetype'
101
+ @change="getmoney()"
102
+ close-on-select>
103
+ </v-select>
104
+ </div>
105
+ <div class="col-sm-6 form-group" :class="[$v.f_state.required ? 'has-error' : '']">
106
+ <label class="font_normal_body" title="参数:保险状态">&emsp;&emsp;&emsp;&emsp;保险状态</label>
107
+ <input type="text" v-show="false" v-model="model.f_state"
108
+ v-validate:f_state='{required: true }'>
109
+ <v-select
110
+ placeholder='保险状态'
111
+ :value.sync="model.f_state"
112
+ style="width:60%"
113
+ :value-single="true"
114
+ v-model="model.f_state"
115
+ :options='insurancestate'
116
+ close-on-select>
117
+ </v-select>
118
+ </div>
119
+ <div class="col-sm-6 form-group" :class="[$v.f_money.required ? 'has-error' : '']">
120
+ <label class="font_normal_body">&emsp;&emsp;&emsp;&emsp;保费金额</label>
121
+ <input type="number" v-model="model.f_money" class="input_search" style="width:60%"
122
+ v-validate:f_money='{required: true, dctest: [0, ">=" ] }' placeholder="保费金额">
123
+ </div>
124
+ <div class="col-sm-6 form-group" :class="[$v.payment.required ? 'has-error select-error' : '']">
125
+ <label class="font_normal_body">&emsp;&emsp;&emsp;&emsp;收款方式</label>
126
+ <input type="text" v-show="false" v-model="$refs.payment.selectedItems" v-validate:payment='{required: true }'>
127
+ <v-select v-model="model.f_payment"
128
+ style="width:60%"
129
+ placeholder='请选择'
130
+ :value.sync="model.f_payment"
131
+ :options='paytype'
132
+ v-ref:payment value-single
133
+ close-on-select clear-button>
134
+ </v-select>
135
+ </div>
136
+ <div class="col-sm-6 form-group">
137
+ <label class="font_normal_body">&emsp;&emsp;&emsp;确认书编号</label>
138
+ <input type="text" v-model="model.f_ok_number" style="width: 60%"
139
+ class="input_search">
140
+ </div>
141
+ <div class="col-sm-6" v-show="false">
142
+ <label class="font_normal_body">&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;公司 </label>
143
+ <right-tree @re-res="getRes"></right-tree>
144
+ </div>
145
+ <div class="col-sm-6">
146
+ <label class="font_normal_body">&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;部门</label>
147
+ <res-select restype='department'
148
+ :is-mul="mul"
149
+ @res-select="getdep"
150
+ :parentresid="depresid"
151
+ :initresid='depid'>
152
+ </res-select>
153
+ </div>
154
+ <div class="col-sm-6">
155
+ <label class="font_normal_body">&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;人员</label>
156
+ <res-select restype='user'
157
+ @res-select="getuser"
158
+ :is-mul="mul"
159
+ :parentresid="userresid"
160
+ :initresid='operatorid'>
161
+ </res-select>
162
+ </div>
163
+ <div class="col-sm-12 form-group">
164
+ <label class="font_normal_body">&emsp;&emsp;&emsp;&emsp;备注信息</label>
165
+ <input type="textarea" v-model="model.f_comments" style="width: 80%;height: 50px" class="input_search">
166
+ </div>
167
+ </div>
168
+ </form>
169
+ <div style="float: right;padding-top:20px">
170
+ <button class="button_search" @click="save" :disabled="!$v.valid">保存</button>
171
+ <button class="button_clear" @click="cancel">取消</button>
172
+ </div>
173
+ </validator>
174
+ </div>
175
+ </template>
176
+ <script>
177
+ import {HttpResetClass} from 'vue-client'
178
+
179
+ export default {
180
+ title: '新增保险',
181
+ data () {
182
+ return {
183
+ config: {
184
+ payment: '现金缴费',
185
+ insuranceType: '民用'
186
+ },
187
+ paytype: [],
188
+ insurancetype: this.$appdata.getParam('险种'),
189
+ insurancestate: this.$appdata.getParam('保险状态'),
190
+ f_salecount: {
191
+ dctest: true
192
+ },
193
+ mul: false,
194
+ tmp: '',
195
+ depresid: [this.$login.f.depids],
196
+ userresid: [this.$login.f.id],
197
+ f_orgid: this.$login.f.orgid,
198
+ f_depid: this.$login.f.depids,
199
+ f_operatorid: this.$login.f.id,
200
+ operatorid: [this.$login.f.id],
201
+ depid: [this.$login.f.depids],
202
+ orgname: '',
203
+ depname: '',
204
+ operatorname: ''
205
+ }
206
+ },
207
+ props: {
208
+ model: Object,
209
+ row: Object
210
+ },
211
+ ready () {
212
+ this.paytype = this.$appdata.getParam('付款方式') ? this.$appdata.getParam('付款方式') : []
213
+ if (!this.$login.r.includes('免交充值付款')) {
214
+ this.paytype = this.paytype.filter((item) => {
215
+ return item.label != '免交'
216
+ })
217
+ }
218
+ console.log('----------------row', this.row)
219
+ if (this.row) {
220
+ if (JSON.stringify(this.row) != '{}') {
221
+ this.model = {
222
+ f_userinfo_id: this.row.f_userinfo_id,
223
+ f_ins_stop_date: this.row.f_ins_stop_date,
224
+ f_user_name: this.row.f_user_name,
225
+ f_idnumber: this.row.f_idnumber,
226
+ f_user_phone: this.row.f_user_phone,
227
+ f_salecount: this.row.f_saleCount,
228
+ f_userinfo_code: this.row.f_userinfo_code,
229
+ f_last_insexpiration_date: this.row.f_ins_stop_date
230
+ }
231
+ }
232
+ }
233
+ this.model.f_buy_date = this.$login.toStandardTimeString()
234
+ this.configMerge()
235
+ },
236
+ watch: {
237
+ 'model.f_ins_start_date' (val) {
238
+ if (val && this.model.f_salecount) {
239
+ let tx = new Date(val)
240
+ let tmp = {
241
+ year: tx.getFullYear(),
242
+ month: tx.getMonth() + 1,
243
+ day: tx.getDate()
244
+ }
245
+ let tmpdate = new Date((tmp.year + (this.model.f_salecount - 0)) + '-' + (tmp.month < 10 ? '0' + tmp.month : tmp.month) + '-' + (tmp.day < 10 ? '0' + tmp.day : tmp.day))
246
+ let date
247
+ if (tmp.month < (tmpdate.getMonth() + 1)) {
248
+ date = new Date(tmpdate.getTime() - 24 * 60 * 60 * 1000 * 2)
249
+ } else {
250
+ date = new Date(tmpdate.getTime() - 24 * 60 * 60 * 1000)
251
+ }
252
+ let jt = {
253
+ year: date.getFullYear(),
254
+ month: date.getMonth() + 1,
255
+ day: date.getDate()
256
+ }
257
+ this.$refs.f_expiration_date.value = jt.year + '-' + (jt.month < 10 ? '0' + jt.month : jt.month) + '-' + (jt.day < 10 ? '0' + jt.day : jt.day)
258
+ }
259
+ },
260
+ 'model.f_money' (val) {
261
+ if (val && (val < 0 || Math.floor(val - 0) !== (val - 0))) {
262
+ this.model.f_money = 0
263
+ }
264
+ },
265
+ 'model.f_salecount' (val) {
266
+ if (val && (val < 0 || Math.floor(val - 0) !== (val - 0))) {
267
+ this.model.f_salecount = 0
268
+ this.f_salecount.dctest = false
269
+ } else if (val && this.model.f_ins_start_date) {
270
+ let tx = new Date(this.model.f_ins_start_date)
271
+ let tmp = {
272
+ year: tx.getFullYear(),
273
+ month: tx.getMonth() + 1,
274
+ day: tx.getDate()
275
+ }
276
+ let tmpdate = new Date((tmp.year + (val - 0)) + '-' + (tmp.month < 10 ? '0' + tmp.month : tmp.month) + '-' + (tmp.day < 10 ? '0' + tmp.day : tmp.day))
277
+ let date
278
+ if (tmp.month < (tmpdate.getMonth() + 1)) {
279
+ date = new Date(tmpdate.getTime() - 24 * 60 * 60 * 1000 * 2)
280
+ } else {
281
+ date = new Date(tmpdate.getTime() - 24 * 60 * 60 * 1000)
282
+ }
283
+ let jt = {
284
+ year: date.getFullYear(),
285
+ month: date.getMonth() + 1,
286
+ day: date.getDate()
287
+ }
288
+ this.$refs.f_expiration_date.value = jt.year + '-' + (jt.month < 10 ? '0' + jt.month : jt.month) + '-' + (jt.day < 10 ? '0' + jt.day : jt.day)
289
+ this.f_salecount.dctest = true
290
+ } else {
291
+ this.f_salecount.dctest = true
292
+ }
293
+ }
294
+ },
295
+ methods: {
296
+ async configMerge () {
297
+ try {
298
+ let http = new HttpResetClass()
299
+ let result = await http.load('GET', `rs/vue/InsuranceAdd.json`, {}, {resolveMsg: null, rejectMsg: null})
300
+ Object.assign(this.config, result.data)
301
+ } catch (error) {
302
+ // 忽略704,文件找不到异常
303
+ if (error.status !== 704) {
304
+ throw error
305
+ }
306
+ }
307
+ this.model.f_insurance_type = this.config.insuranceType
308
+ this.model.f_payment = this.config.payment
309
+ },
310
+ getRes (obj) {
311
+ this.orgname = obj.res[0]
312
+ this.depresid = obj.resids
313
+ this.f_orgid = obj.resids
314
+ this.userresid = obj.resids
315
+ },
316
+ getdep (obj, val) {
317
+ this.depname = val
318
+ // this.userresid = obj
319
+ this.f_depid = obj
320
+ },
321
+ getuser (obj, val) {
322
+ this.operatorname = val
323
+ this.f_operatorid = obj
324
+ },
325
+ valids (val1, val2) {
326
+ console.log(val1, val2)
327
+
328
+ if (!(val1.valid && val2)) {
329
+ return true
330
+ } else {
331
+ return false
332
+ }
333
+ },
334
+ isShowSaleCount (oldVal) {
335
+ console.log(oldVal)
336
+ if (this.model.f_expiration_date) {
337
+ this.model.f_salecount = ''
338
+ }
339
+ },
340
+ getmoney () {
341
+ let val = this.$appdata.getSingleValue(this.model.f_insurance_type)
342
+ this.money = val || 0
343
+ },
344
+ cancel () {
345
+ this.$info('取消操作')
346
+ this.$dispatch('refresh', this.row)
347
+ this.$dispatch('close')
348
+ },
349
+ async save () {
350
+ let saveState = true
351
+ if (this.model.f_state !== '待执行') {
352
+ if (Date.parse(this.model.f_ins_start_date) > Date.parse(this.model.f_expiration_date)) {
353
+ this.$showAlert('结束日期不能早于开始日期', 'warning', 2000)
354
+ saveState = false
355
+ } else if (this.model.f_ins_start_date !== null && this.model.f_ins_start_date !== '' && Date.parse(this.model.f_ins_stop_date) > Date.parse(this.model.f_ins_start_date)) {
356
+ this.$showAlert('开始日期不能早于上期保费截止日期', 'warning', 2000)
357
+ saveState = false
358
+ }
359
+ }
360
+ if (saveState) {
361
+ this.model.f_total_ins_charge = this.model.f_total_ins_charge == null ? 0 : this.model.f_total_ins_charge
362
+ this.model.f_operat_type = '保险'
363
+ this.model.f_operator = this.operatorname[0]
364
+ this.model.f_operatorid = this.f_operatorid[0]
365
+ this.model.f_orgid = this.$login.f.orgid
366
+ this.model.f_orgname = this.$login.f.orgs
367
+ this.model.f_depid = this.f_depid[0]
368
+ this.model.f_depname = this.depname[0]
369
+ this.model.f_fee_type = '保险收费'
370
+ this.model.f_last_insexpiration_date = this.model.f_ins_stop_date
371
+ await
372
+ this.$resetpost('rs/logic/saveInsInfo', {data: this.model}).then((res) => {
373
+ this.$showAlert('新增保险成功', 'success', 2000)
374
+ })
375
+ this.$dispatch('close')
376
+ this.$dispatch('success')
377
+ }
378
+ }
379
+ }
380
+ }
381
+ </script>
@@ -0,0 +1,180 @@
1
+ <template>
2
+ <partial-view v-ref:pv>
3
+ <div class="panel panel-info auto" >
4
+ <div class="panel-heading" style="height: 35px">
5
+ <h4 style="display:inline-block;margin-top: auto">档案信息</h4>
6
+ </div>
7
+ <div class="auto info-content">
8
+
9
+ <div class="row">
10
+ <label class = "col-sm-5 " >&emsp;客户编号</label>
11
+ <span class = "col-sm-7"><a @click="dealmsg(data)">{{data?data.f_userinfo_code:dafault.f_userinfo_code}}</a></span>
12
+ </div>
13
+ <div class="row">
14
+ <label class = "col-sm-5 " >&emsp;客户名称</label>
15
+ <span class = "col-sm-7">{{data?data.f_user_name:dafault.f_user_name}}</span>
16
+ </div>
17
+ <div class="row">
18
+ <label class = "col-sm-5 " >&emsp;客户类型</label>
19
+ <span class = "col-sm-7">{{data?data.f_user_type:dafault.f_user_type}}</span>
20
+ </div>
21
+ <div class="row">
22
+ <label class = "col-sm-5 " >&emsp;账户余额</label>
23
+ <span class = "col-sm-7">{{data ? data.f_balance:dafault.f_user_type}}</span>
24
+ </div>
25
+ <div class="row">
26
+ <label class = "col-sm-5 " >&emsp;证件号码</label>
27
+ <span class = "col-sm-7" style="word-break: break-all">{{data?data.f_idnumber:dafault.f_idnumber}}</span>
28
+ </div>
29
+ <div class="row">
30
+ <label class = "col-sm-5 " >&emsp;客户电话</label>
31
+ <span class = "col-sm-7">{{data?data.f_user_phone:dafault.f_user_phone}}
32
+ <span v-if="data && data.f_user_phone" @click.stop="changeuserphone" class="glyphicon glyphicon-pencil clickchange" title="修正客户电话"></span>
33
+ </span>
34
+ </div>
35
+ <div class="row">
36
+ <label class = "col-sm-5 " >&emsp;备用电话</label>
37
+ <span class = "col-sm-7">{{data?data.f_rent_phone:dafault.f_rent_phone}}</span>
38
+ </div>
39
+ <div class="row">
40
+ <label class = "col-sm-5 " >&emsp;备注信息</label>
41
+ <span class = "col-sm-7">{{data?data.f_comments:dafault.f_comments}}</span>
42
+ </div>
43
+ <div class="row">
44
+ <label class = "col-sm-5 " >&emsp;客户地址</label>
45
+ <span class = "col-sm-7">{{data?data.f_address:dafault.f_address}}</span>
46
+ </div>
47
+ <div class="row">
48
+ <label class = "col-sm-5 " >&emsp;开户时间</label>
49
+ <span class = "col-sm-7">{{data?data.f_open_date.substr(0,10):dafault.f_open_date}}</span>
50
+ </div>
51
+ <div class="row">
52
+ <label class = "col-sm-5 " >&emsp;安装时间</label>
53
+ <span class = "col-sm-7">{{data?data.f_install_date.substr(0,10):dafault.f_input_date}}</span>
54
+ </div>
55
+ <div class="row">
56
+ <label class = "col-sm-5 " >&emsp;人&ensp;口&ensp;数</label>
57
+ <span class = "col-sm-7" style="word-break: break-all">{{data?data.f_people_num:dafault.f_people_num}}</span>
58
+ </div>
59
+ <div class="row">
60
+ <label class = "col-sm-5 " >&emsp;用户等级</label>
61
+ <span class = "col-sm-7" style="word-break: break-all">{{data?data.f_user_level:dafault.f_people_num}}</span>
62
+ </div>
63
+ <div class="row">
64
+ <label class = "col-sm-5 " >旧客户编号</label>
65
+ <span class = "col-sm-7">{{data?data.f_olduserinfo_code:dafault.f_userinfo_code}}</span>
66
+ </div>
67
+ <div class="row">
68
+ <label class = "col-sm-5 " >&emsp;分&ensp;公&ensp;司</label>
69
+ <span class = "col-sm-7">{{data?data.f_orgname:dafault.f_userinfo_code}}</span>
70
+ </div>
71
+ <div class="row">
72
+ <label class = "col-sm-5 " >保险到期日期</label>
73
+ <span class = "col-sm-7" :style="data.insdays<=90?'color:darkred':'color:black'">{{data?(data.f_ins_stop_date?data.f_ins_stop_date:'暂无'):dafault.f_userinfo_code}}</span>
74
+ </div>
75
+ <modal v-if="showselectncuserinfo" :show.sync="showselectncuserinfo" width="40%" title="修正客户电话号码" v-ref:modal large backdrop="false">
76
+ <article slot="modal-body" class="modal-body">
77
+ <div class="form-horizontal" >
78
+ <div class="row">
79
+ <div class="col-sm-12 form-group">
80
+ <label class="font_normal_body">旧客户电话</label>
81
+ <input disabled readonly type="text" style="width:80%" class="input_search" v-model="data.f_user_phone" placeholder='旧客户电话'>
82
+ </div>
83
+ </div>
84
+ <div class="row">
85
+ <div class="col-sm-12 form-group">
86
+ <label class="font_normal_body">新客户电话</label>
87
+ <input type="text" style="width:80%" class="input_search" v-model="newuserphone" placeholder='新客户电话'>
88
+ </div>
89
+ </div>
90
+ </div>
91
+ </article>
92
+ <footer slot="modal-footer" class="modal-footer">
93
+ <button class="button_search" :disabled='!$m.valid ' @click="modifyUser">确定</button>
94
+ <button type="button" class="button_clear" @click='close'>取消</button>
95
+ </footer>
96
+ </modal>
97
+ </div>
98
+ </div>
99
+ </partial-view>
100
+ </template>
101
+
102
+ <script>
103
+ /**
104
+ *用户档案相关信息组件
105
+ */
106
+
107
+ export default {
108
+ ready () {
109
+ console.log('看看userinfo里面接收的data数据:', this.data)
110
+ },
111
+ title: '客户基本信息',
112
+ data () {
113
+ return {
114
+ dafault: {
115
+ f_user_name: '***',
116
+ f_userinfo_code: '********',
117
+ f_people_num: '**',
118
+ f_idnumber: '****',
119
+ f_user_phone: '************',
120
+ f_address: '*****',
121
+ f_user_type: '***',
122
+ f_open_date: '****年**月**日',
123
+ f_input_date: '****年**月**日',
124
+ f_hand_date: '****年**月**日',
125
+ f_rent_phone: '************',
126
+ f_comments: '**'
127
+ },
128
+ model: null,
129
+ showselectncuserinfo:false,
130
+ newuserphone:'',
131
+ }
132
+ },
133
+ props: ['data'],
134
+ methods: {
135
+ dealmsg (val) {
136
+ if (val.f_userinfo_code !== '********') {
137
+ this.$dispatch('deal-msg', val)
138
+ }
139
+ },
140
+ changeuserphone(){
141
+ //修正客户电话
142
+ this.showselectncuserinfo = true;
143
+ this.newuserphone ='';
144
+ },
145
+ async modifyUser(){
146
+ let param ={
147
+ new_userphone: this.newuserphone,
148
+ f_userinfo_id: this.data.f_userinfo_id,
149
+ f_user_id: this.data.f_user_id,
150
+ f_operator: this.$login.f.name,
151
+ f_operatorid: this.$login.f.id,
152
+ f_orgid: this.$login.f.orgid,
153
+ f_orgname: this.$login.f.orgs,
154
+ f_depid: this.$login.f.depids,
155
+ f_depname: this.$login.f.deps
156
+ };
157
+ await this.$resetpost('/rs/logic/changeuserinfo',{data:param},{resolveMsg: '修正成功', rejectMsg:null});
158
+ this.$parent.$parent.close();
159
+ this.$parent.$parent.clean();
160
+ this.$parent.$parent.$refs.list.searchNoData();
161
+ this.close();
162
+ },
163
+ close(){
164
+ this.showselectncuserinfo = false;
165
+ this.newuserphone ='';
166
+ }
167
+ },
168
+ watch: {
169
+ 'data' (val) {
170
+ }
171
+ }
172
+ }
173
+ </script>
174
+ <style scoped>
175
+ .clickchange:hover{
176
+ color:#3592ef;
177
+ cursor: pointer;
178
+ }
179
+
180
+ </style>
@@ -0,0 +1,7 @@
1
+ // 分公司特殊组件页面注册
2
+ let specialComp = {
3
+ // 当前选择用户的表具基本信息
4
+ 'userinfo': (resolve) => { require(['./Userinfo'], resolve) },
5
+ 'insurance-add': (resolve) => { require(['./InsuranceAdd'], resolve) }
6
+ }
7
+ exports.specialComp = specialComp
@@ -0,0 +1,100 @@
1
+ <template>
2
+ <div style="height:100%">
3
+ <data-grid :model="model" class="table_sy" partial='list' v-ref:grid >
4
+ <template partial='head' >
5
+ <tr>
6
+ <th><nobr>序号</nobr></th>
7
+
8
+ <th><nobr>气量</nobr></th>
9
+ <th><nobr>应交</nobr></th>
10
+ <th><nobr>付款方式</nobr></th>
11
+ <th><nobr>上期结余</nobr></th>
12
+ <th><nobr>收款</nobr></th>
13
+ <th><nobr>本期结余</nobr></th>
14
+ <th><nobr>操作类型</nobr></th>
15
+ <th><nobr>操作时间 </nobr></th>
16
+ <th><nobr>业务单号 </nobr></th>
17
+ <th><nobr>操作员 </nobr></th>
18
+ <th><nobr>备注</nobr></th>
19
+ </tr>
20
+ </template>
21
+ <template partial='body' >
22
+ <tr >
23
+ <td style="text-align:center;white-space:nowrap;">{{$index+1}}</td>
24
+
25
+ <td style="text-align:center;white-space:nowrap;">{{row.gas}}</td>
26
+ <td style="text-align:center;white-space:nowrap;">{{row.fee}}</td>
27
+ <td style="text-align:center;white-space:nowrap;">{{row.f_payment}}</td>
28
+ <td style="text-align:center;white-space:nowrap;">{{row.f_balance}}</td>
29
+ <td style="text-align:center;white-space:nowrap;">{{row.f_collection}}</td>
30
+ <td style="text-align:center;white-space:nowrap;">{{row.f_curbalance}}</td>
31
+ <td style="text-align:center;white-space:nowrap;">{{row.type}}</td>
32
+ <td style="text-align:center;white-space:nowrap;">{{row.f_operate_date}}</td>
33
+ <td style="text-align:center;white-space:nowrap;">{{row.f_serial_number}}</td>
34
+ <td style="text-align:center;white-space:nowrap;">{{row.f_operator}}</td>
35
+ <td style="text-align:left;white-space:nowrap;">{{row.note}}{{row.f_write_card}}</td>
36
+ </tr>
37
+ </template>
38
+ </data-grid>
39
+ <modal :show.sync="cardCental" v-ref:modal backdrop="false">
40
+ <header slot="modal-header" class="modal-header">
41
+ <h4 class="modal-title">温馨提示</h4>
42
+ </header>
43
+ <article slot="modal-body" class="modal-body">
44
+ <div class="form-group">
45
+ <p> 当日此用户已经进行过一次购气,若卡上无气,请先进行补卡(未过表),之后掉气补气即可</p>
46
+ </div>
47
+ </article>
48
+ <footer slot="modal-footer" class="modal-footer">
49
+ <button type="button" class="btn btn-success" @click='cancel()'>确认
50
+ </button>
51
+ </footer>
52
+ </modal>
53
+ </div>
54
+ </template>
55
+
56
+ <script>
57
+ import {HttpResetClass} from 'vue-client'
58
+
59
+ export default {
60
+ title: '操作查询',
61
+ data () {
62
+ return {
63
+ model: {rows: []},
64
+ cardCental:false
65
+ }
66
+ },
67
+ props: ['searchdata'],
68
+ ready () {
69
+ this.getsalerecord()
70
+ },
71
+ methods: {
72
+ cancel(){
73
+ this.cardCental = false;
74
+ },
75
+ async getsalerecord () {
76
+ let http = new HttpResetClass()
77
+ // this.condition = `1=1 and f_user_id = '${this.searchdata.f_user_id}'`
78
+ this.condition = `1=1 and f_userfiles_id = '${this.searchdata.f_userfiles_id}'`
79
+ let record = await http.load('POST', 'rs/sql/sale_RecordQuery', {data: {condition: this.condition}}, {
80
+ rejectMsg: '流水查询出错!!',
81
+ resolveMsg: null
82
+ })
83
+ this.model.rows = record.data
84
+ if(this.model.rows.length>0 && ( this.model.rows[0].type== '发卡售气' || this.model.rows[0].type== '卡表收费' ) ){
85
+ let checkdata = this.model.rows[0].operate_date.substr(0,10)
86
+ let nowdate = new Date();
87
+ let pdate = nowdate.getFullYear()+'-'+(nowdate.getMonth()<10? '0'+nowdate.getMonth()+1 : nowdate.getMonth()+1) +'-'+(nowdate.getDate()<10? '0'+nowdate.getDate() : nowdate.getDate());
88
+ if(new Date(checkdata).getTime() == new Date(pdate).getTime()){
89
+ this.cardCental = true;
90
+ }
91
+ }
92
+ }
93
+ },
94
+ watch: {
95
+ 'searchdata' () {
96
+ this.getsalerecord()
97
+ }
98
+ }
99
+ }
100
+ </script>
@@ -0,0 +1,244 @@
1
+ <template>
2
+ <div class="auto">
3
+ <validator name='v'>
4
+ <form novalidate class="form-horizontal">
5
+ <div class="row">
6
+ <div class="col-sm-4 form-group" :class="[$v.payment.required ? 'select-error' : '']">
7
+ <label class="font_normal_body" title="参数名称:付款方式">收款方式</label>
8
+ <input type="text" v-show="false" v-model="$refs.payment.selectedItems" v-validate:payment='{required: true }'>
9
+ <v-select v-model="f_payment"
10
+ placeholder='请选择'
11
+ style="width:60%"
12
+ :value.sync="model.f_payment"
13
+ :options='paytype'
14
+ v-ref:payment
15
+ close-on-select clear-button></v-select>
16
+
17
+ </div>
18
+ <div class="col-sm-4 form-group">
19
+ <label for="f_print" class="font_normal_body">打印格式</label>
20
+
21
+ <v-select id="print"
22
+ v-model="f_print"
23
+ style="width:60%"
24
+ placeholder='请选择'
25
+ :value.sync="model.f_print"
26
+ :options='printstyle'
27
+ close-on-select clear-button>
28
+ </v-select>
29
+ </div>
30
+ <div class="col-sm-4 form-group" v-if="data.f_collection_type === '按气量'">
31
+ <label class="font_normal_body">剩余气量</label>
32
+ <input class="input_search" style="width:60%" type="number" v-model="data.f_balance_gas" readonly>
33
+ </div>
34
+ <div class="col-sm-4 form-group" v-if="data.f_collection_type === '按气量'">
35
+ <label class="font_normal_body">核算单价</label>
36
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_price" >
37
+ </div>
38
+ <div class="col-sm-4 form-group" v-if="data.f_collection_type === '按金额'">
39
+ <label class="font_normal_body">剩余金额</label>
40
+ <input class="input_search" style="width:60%" type="number" v-model="data.f_balance_amount" readonly>
41
+ </div>
42
+ <div class="col-sm-4 form-group" v-if="config.overBalance && data.f_collection_type === '按气量'"
43
+ :class="[$v.f_refund_gas.required || $v.f_refund_gas.dctest ? 'has-error' : 'has-success']">
44
+ <label class="font_normal_body">冲减气量</label>
45
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_refund_gas"
46
+ v-validate:f_refund_gas='{required: true, dctest: [0, ">=" ]}' placeholder="冲减气量" >
47
+ </div>
48
+ <div class="col-sm-4 form-group" v-if="!config.overBalance && data.f_collection_type === '按气量'"
49
+ :class="[$v.f_refund_gas.required || $v.f_refund_gas.dctest ? 'has-error' : 'has-success']">
50
+ <label class="font_normal_body">冲减气量</label>
51
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_refund_gas"
52
+ v-validate:f_refund_gas='{required: true, dctest: [data.f_balance_gas, "<=" ]}' placeholder="冲减气量" >
53
+ </div>
54
+ </div>
55
+
56
+ <div class="row">
57
+
58
+ <div class="col-sm-8">
59
+ <label for="f_paper_account" class="font_normal_body ">&nbsp;&nbsp;&nbsp;备注&nbsp;&nbsp;&nbsp;</label>
60
+ <input class="input_search" style="width:80%" v-model="model.f_comments">
61
+ </div>
62
+ <div class="col-sm-4 form-group" v-if="data.f_collection_type === '按气量'">
63
+ <label class="font_normal_body">退费金额</label>
64
+ <input class="input_search" style="width:60%"
65
+ type="number" v-model="model.f_refund_fee"
66
+ placeholder="退费金额">
67
+ </div>
68
+ <div class="col-sm-4 form-group" v-if="!config.overBalance && data.f_collection_type === '按金额'"
69
+ :class="[$v.f_refund_fee.required || $v.f_refund_fee.dctest ? 'has-error' : 'has-success']">
70
+ <label class="font_normal_body">退费金额</label>
71
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_refund_fee"
72
+ v-validate:f_refund_fee='{required: true, dctest: [data.f_balance_amount, "<=" ]}' placeholder="退费金额">
73
+ </div>
74
+ <div class="col-sm-4 form-group" v-if="config.overBalance && data.f_collection_type === '按金额'"
75
+ :class="[$v.f_refund_fee.required || $v.f_refund_fee.dctest ? 'has-error' : 'has-success']">
76
+ <label class="font_normal_body">退费金额</label>
77
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_refund_fee"
78
+ v-validate:f_refund_fee='{required: true, dctest: [0, ">=" ]}' placeholder="退费金额">
79
+ </div>
80
+ </div>
81
+ <div class="row">
82
+ <div class="col-sm-4 form-group">
83
+ <label class="font_normal_body">业务单号</label>
84
+ <input class="input_search" style="width:60%" type="text" v-model="model.f_serial_number">
85
+ </div>
86
+ </div>
87
+ </form>
88
+ <div style="text-align:right;">
89
+ <button class="button_search btn-gn" @click="confirm()" :disabled='!$v.valid'>确认</button>
90
+ <button class="button_clear btn-gn" @click="clean()">取消</button>
91
+ </div>
92
+ </validator>
93
+ <validate-bill v-if="hasValidateBill" :data="model" @validate-bill="validateBill"></validate-bill>
94
+ <!--<print-bill :show="print" :bill-manager='config.hasBillManage' v-ref:printbill :bill-url='billUrl' v-on:toggle="clean" @printok="printok" :data='printModel'></print-bill>-->
95
+ <print-bill :show="print" :bill-config='config' :bill-data='billData' v-on:toggle="clean" @printok="printok" :data='printModel' v-ref:printbill></print-bill>
96
+ </div>
97
+
98
+ <upload :blodid="data.f_userinfo_id" isremark="true" fusetype="退费管理"></upload>
99
+ </template>
100
+
101
+
102
+ <script>
103
+ let readyGen = async function (self) {
104
+ await self.$getConfig(self, 'IOTRefund')
105
+ // 默认打印格式
106
+ self.model.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
107
+ self.model.f_payment = [self.config.payment]
108
+
109
+ self.model.f_use_type = self.config.billType
110
+ self.model.f_bill_type = self.model.f_print
111
+ self.hasValidateBill = self.config.hasBillManage
112
+ }
113
+
114
+ export default {
115
+ title: '物联网表退费',
116
+ data () {
117
+ return {
118
+ config: {
119
+ showupload: false, // 默认不上传附件
120
+ hasPrint: false, // 默认打票
121
+ hasBillManage: false, // 默认不启用发票管理
122
+ overBalance: false, //为true时退费金额可以大于余额
123
+ printType: '普通收据', // 收据/电子票/专用发票/国税发票
124
+ payment: '现金缴费',
125
+ billType: '燃气费'
126
+ },
127
+ model: {
128
+ f_refund_fee: '',
129
+ f_refund_gas: '',
130
+ f_comments: '',
131
+ f_payment: '',
132
+ f_print: '',
133
+ f_price: 0
134
+ },
135
+
136
+ blodid: '',
137
+ hasValidateBill: false,
138
+ validateOk: false,
139
+
140
+ printModel: {},
141
+ print: false,
142
+ billUrl: '',
143
+ billData: {
144
+ url: 'rs/report/refund_sell',
145
+ bill: ''
146
+ },
147
+
148
+ // 下拉框值
149
+ paytype: this.$appdata.getParam('付款方式'),
150
+ printstyle: this.$appdata.getParam('打印格式')
151
+ }
152
+ },
153
+ props: ['data'],
154
+ ready () {
155
+ readyGen(this)
156
+ if (this.data.f_collection_type === '按气量') {
157
+ // this.$showAlert('按气量缴费的物联网表退费功能尚未开放!!', 'warning', 3000)
158
+ this.model.f_price = this.data.f_price
159
+
160
+ // this.$dispatch('refresh')
161
+ }
162
+ },
163
+ methods: {
164
+ async confirm () {
165
+ let param = {
166
+ f_user_id: this.data.f_user_id,
167
+ f_userfiles_id: this.data.f_userfiles_id,
168
+ version: this.data.version,
169
+ f_price: this.model.f_price,
170
+ f_refund_gas: this.model.f_refund_gas,
171
+ f_refund_fee: this.model.f_refund_fee,
172
+ f_comments: this.model.f_comments,
173
+ f_collection_type: this.data.f_collection_type,
174
+ f_payment: this.model.f_payment[0],
175
+ f_print: this.model.f_print[0],
176
+ f_serial_number: this.model.f_serial_number,
177
+ f_price_id: this.data.f_price_id,
178
+ f_total_gas: parseFloat(this.data.f_total_gas) - parseFloat(this.model.f_refund_gas),
179
+ f_total_fee: parseFloat(this.data.f_total_fee) - parseFloat(this.model.f_refund_fee),
180
+ f_stairprice_id: this.data.f_stairprice_id,
181
+ operInfo: {
182
+ f_operator: this.$login.f.name,
183
+ f_operatorid: this.$login.f.id,
184
+ f_orgid: this.$login.f.orgid,
185
+ f_orgname: this.$login.f.orgs,
186
+ f_depid: this.$login.f.depids,
187
+ f_depname: this.$login.f.deps
188
+ }
189
+ }
190
+ console.log('退费传参', param)
191
+ let res = await this.$resetpost('rs/logic/iotRefund', {data: param}, {warnMsg: `确定要对用户${this.data.f_user_name}进行退费吗?`, resolveMsg: '退费成功!!', rejectMsg: '退费失败!!请重试!!'})
192
+ console.log('退费', res)
193
+ console.log('退费this.config', this.config)
194
+ console.log('退费this.model', this.model)
195
+ if (this.config.hasPrint) {
196
+ if (this.model.f_print.indexOf('电子发票') == -1) {
197
+ console.log('this.config.hasBillManage', this.config.hasBillManage)
198
+ if (this.config.hasBillManage) {
199
+ // 启用发票管理,获取票据管理中的票号并存储记录
200
+ this.printModel.id = res.data.id
201
+ this.printModel.f_bill_type = '退费'
202
+ this.printModel.f_bill_style = this.model.f_print[0]
203
+ // this.billUrl = 'rs/report/refund_sell'
204
+ this.print = true
205
+ } else {
206
+ this.printModel.id = res.data.id
207
+ // this.billUrl = 'rs/report/refund_sell'
208
+ this.print = true
209
+ }
210
+ } else if (this.config.printType === '国税发票') {
211
+ // TODO
212
+ this.$dispatch('success')
213
+ } else if (this.config.printType === '电子发票') {
214
+ // TODO
215
+ this.$dispatch('success')
216
+ }
217
+ }else{
218
+ this.$dispatch('success')
219
+ }
220
+ },
221
+ refundChange () {
222
+ this.model.f_refund_fee = (this.model.f_refund_gas - 0) * (this.model.f_price - 0)
223
+ },
224
+ clean () {
225
+ this.$dispatch('refresh')
226
+ },
227
+ printok () {
228
+ this.$dispatch('success')
229
+ },
230
+ validateBill (val) {
231
+ this.validateOk = !val.isOk
232
+ this.billData.bill = val.bill
233
+ }
234
+ },
235
+ watch:{
236
+ 'model.f_price'(){
237
+ this.model.f_refund_fee = (this.model.f_refund_gas - 0) * (this.model.f_price - 0)
238
+ },
239
+ 'model.f_refund_gas'(){
240
+ this.model.f_refund_fee = (this.model.f_refund_gas - 0) * (this.model.f_price - 0)
241
+ }
242
+ }
243
+ }
244
+ </script>
@@ -0,0 +1,28 @@
1
+ <template>
2
+ <div class="auto">
3
+ <iot-refund v-if="row.f_meter_type === '物联网表'" :data="row"></iot-refund>
4
+ <machine-Refund v-if="row.f_meter_type !== '物联网表'" :data="row"></machine-Refund>
5
+ </div>
6
+
7
+ </template>
8
+ <script>
9
+ import IotRefund from './IOTRefund'
10
+ import machineRefund from './machineRefund'
11
+
12
+ export default {
13
+ title: '退费管理',
14
+ components: {
15
+ IotRefund,
16
+ machineRefund
17
+ },
18
+ data () {
19
+ return {
20
+
21
+ }
22
+ },
23
+ ready () {
24
+
25
+ },
26
+ props: ['row']
27
+ }
28
+ </script>
@@ -0,0 +1,200 @@
1
+ <template>
2
+ <div class="auto">
3
+ <validator name='v'>
4
+ <form novalidate class="form-horizontal">
5
+ <div class="row">
6
+ <div class="col-sm-4 form-group">
7
+ <label class="font_normal_body" title="参数名称:付款方式">收款方式</label>
8
+
9
+ <v-select v-model="f_payment"
10
+ placeholder='请选择'
11
+ style="width:60%"
12
+ :value.sync="model.f_payment"
13
+ :options='paytype'
14
+ close-on-select clear-button></v-select>
15
+
16
+ </div>
17
+ <div class="col-sm-4 form-group">
18
+ <label for="f_print" class="font_normal_body">打印格式</label>
19
+
20
+ <v-select id="print"
21
+ v-model="f_print"
22
+ style="width:60%"
23
+ placeholder='请选择'
24
+ :value.sync="model.f_print"
25
+ :options='printstyle'
26
+ close-on-select clear-button>
27
+ </v-select>
28
+ </div>
29
+
30
+ <div class="col-sm-4 form-group">
31
+ <label class="font_normal_body">剩余金额</label>
32
+ <input class="input_search" style="width:60%" type="number" v-model="data.f_balance" readonly>
33
+ </div>
34
+ </div>
35
+
36
+ <div class="row">
37
+
38
+
39
+ <div class="col-sm-8">
40
+ <label for="f_paper_account" class="font_normal_body ">&nbsp;&nbsp;&nbsp;备注&nbsp;&nbsp;&nbsp;</label>
41
+ <input class="input_search" style="width:80%" v-model="model.f_comments">
42
+ </div>
43
+ <div class="col-sm-4 form-group" v-if="!config.overBalance"
44
+ :class="[$v.f_refund_fee.required || $v.f_refund_fee.dctest ? 'has-error' : 'has-success']">
45
+ <label class="font_normal_body">退费金额</label>
46
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_refund_fee"
47
+ v-validate:f_refund_fee='{required: true, dctest: [data.f_balance, "<=" ]}' placeholder="退费金额">
48
+ </div>
49
+ <div class="col-sm-4 form-group" v-if="config.overBalance"
50
+ :class="[$v.f_refund_fee.required || $v.f_refund_fee.dctest ? 'has-error' : 'has-success']">
51
+ <label class="font_normal_body">退费金额</label>
52
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_refund_fee"
53
+ v-validate:f_refund_fee='{required: true, dctest: [0, ">=" ]}' placeholder="退费金额">
54
+ </div>
55
+ </div>
56
+ <div class="row">
57
+ <div class="col-sm-4 form-group">
58
+ <label class="font_normal_body">业务单号</label>
59
+ <input class="input_search" style="width:60%" type="text" v-model="model.f_serial_number">
60
+ </div>
61
+ </div>
62
+ </form>
63
+ <div style="text-align:right;">
64
+ <button class="button_search btn-gn" @click="confirm()" :disabled='!$v.valid'>确认</button>
65
+ <button class="button_clear btn-gn" @click="clean()">取消</button>
66
+ </div>
67
+ </validator>
68
+ <validate-bill v-if="hasValidateBill" :data="model" @validate-bill="validateBill"></validate-bill>
69
+ <!--<print-bill :show="print" :bill-manager='config.hasBillManage' v-ref:printbill :bill-url='billUrl' v-on:toggle="clean" @printok="printok" :data='printModel'></print-bill>-->
70
+ <print-bill :show="print" :bill-config='config' :bill-data='billData' v-on:toggle="clean" @printok="printok" :data='printModel' v-ref:printbill></print-bill>
71
+ </div>
72
+
73
+ <upload :blodid="data.f_userinfo_id" isremark="true" fusetype="退费管理"></upload>
74
+ </template>
75
+
76
+
77
+ <script>
78
+ let readyGen = async function (self) {
79
+ await self.$getConfig(self, 'MachineTRefund')
80
+ console.log('机表退费config', self.config)
81
+ // 默认打印格式
82
+ self.blodid = self.data.f_userinfo_id
83
+ self.model.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
84
+ self.model.f_payment = [self.config.payment]
85
+
86
+ self.model.f_use_type = self.config.billType
87
+ self.model.f_bill_type = self.model.f_print
88
+ self.hasValidateBill = self.config.hasBillManage
89
+ }
90
+
91
+ export default {
92
+ title: '机表退费',
93
+ data () {
94
+ return {
95
+ config: {
96
+ showupload: false, // 默认不上传附件
97
+ hasPrint: false, // 默认打票
98
+ hasBillManage: false, // 默认不启用发票管理
99
+ overBalance: false, //为true时退费金额可以大于余额
100
+ printType: '普通收据', // 收据/电子票/专用发票/国税发票
101
+ payment: '现金缴费',
102
+ billType: '燃气费'
103
+ },
104
+ model: {
105
+ f_refund_fee: '',
106
+ f_comments: '',
107
+ f_payment: '',
108
+ f_print: ''
109
+ },
110
+
111
+ blodid: '',
112
+ hasValidateBill: false,
113
+ validateOk: false,
114
+
115
+ printModel: {},
116
+ print: false,
117
+ billUrl: '',
118
+ billData: {
119
+ url: 'rs/report/refund_sell',
120
+ bill: ''
121
+ },
122
+
123
+ // 下拉框值
124
+ paytype: this.$appdata.getParam('付款方式'),
125
+ printstyle: this.$appdata.getParam('打印格式')
126
+ }
127
+ },
128
+ props: ['data'],
129
+ ready () {
130
+ /* if (this.data.f_billing === '按气量') {
131
+ this.$showAlert('按气量缴费的机表退费功能尚未开放!!', 'warning', 3000)
132
+ this.$dispatch('refresh')
133
+ } else { */
134
+ readyGen(this)
135
+ /* } */
136
+ },
137
+ methods: {
138
+ async confirm () {
139
+ let param = {
140
+ f_user_id: this.data.f_user_id,
141
+ f_userfiles_id: this.data.f_userfiles_id,
142
+ version: this.data.version,
143
+ f_refund_fee: this.model.f_refund_fee,
144
+ f_comments: this.model.f_comments,
145
+ f_payment: this.model.f_payment[0],
146
+ f_print: this.model.f_print[0],
147
+ f_serial_number: this.model.f_serial_number,
148
+ f_price_id: this.data.f_price_id,
149
+
150
+ f_total_fee: parseFloat(this.data.f_total_fee) - parseFloat(this.model.f_refund_fee),
151
+ f_stairprice_id: this.data.f_stairprice_id,
152
+ operInfo: {
153
+ f_operator: this.$login.f.name,
154
+ f_operatorid: this.$login.f.id,
155
+ f_orgid: this.$login.f.orgid,
156
+ f_orgname: this.$login.f.orgs,
157
+ f_depid: this.$login.f.depids,
158
+ f_depname: this.$login.f.deps
159
+ }
160
+ }
161
+
162
+ let res = await this.$resetpost('rs/logic/machineRefund', {data: param}, {warnMsg: `确定要对用户${this.data.f_user_name}进行退费吗?`, resolveMsg: '退费成功!!', rejectMsg: '退费失败!!请重试!!'})
163
+
164
+ if (this.model.f_print.indexOf('电子发票') == -1 && this.config.hasPrint && !this.$login.r.includes('不打印发票')) {
165
+ console.log('this.config.hasBillManage', this.config.hasBillManage)
166
+ if (this.config.hasBillManage) {
167
+ // 启用发票管理,获取票据管理中的票号并存储记录
168
+ this.printModel.id = res.data.id
169
+ this.printModel.f_bill_type = '退费'
170
+ this.printModel.f_bill_style = this.model.f_print[0]
171
+ // this.billUrl = 'rs/report/refund_sell'
172
+ this.print = true
173
+ } else {
174
+ this.printModel.id = res.data.id
175
+ // this.billUrl = 'rs/report/refund_sell'
176
+ this.print = true
177
+ }
178
+ } else if (this.config.printType === '国税发票') {
179
+ // TODO
180
+ this.$dispatch('success')
181
+ } else if (this.config.printType === '电子发票') {
182
+ // TODO
183
+ this.$dispatch('success')
184
+ } else {
185
+ this.$dispatch('success')
186
+ }
187
+ },
188
+ clean () {
189
+ this.$dispatch('refresh')
190
+ },
191
+ printok () {
192
+ this.$dispatch('success')
193
+ },
194
+ validateBill (val) {
195
+ this.validateOk = !val.isOk
196
+ this.billData.bill = val.bill
197
+ }
198
+ }
199
+ }
200
+ </script>
@@ -3,6 +3,10 @@ let specialComp = {
3
3
  // 表具单个信息
4
4
  'file-meter-info': (resolve) => { require(['./MeterinfoTest'], resolve) },
5
5
  // 表具单个信息
6
- 'userinfo': (resolve) => { require(['./userinfo'], resolve) }
6
+ 'userinfo': (resolve) => { require(['./userinfo'], resolve) },
7
+ // 收费页面的流水查询
8
+ 'meter-charge-record-query': (resolve) => { require(['./ChargeRecordQuery'], resolve) },
9
+ // 退费管理
10
+ 'refund-manage': (resolve) => { require(['./refund/RefundManage'], resolve) }
7
11
  }
8
12
  exports.specialComp = specialComp