|
@@ -77,12 +77,12 @@
|
77
|
77
|
></el-input>
|
78
|
78
|
</el-form-item>
|
79
|
79
|
|
80
|
|
- <el-form-item label="支付方式:" style="width:100%;">
|
81
|
|
- <el-radio-group v-model="form.pay_way">
|
|
80
|
+ <el-form-item label="支付方式:" style="width:100%;">
|
|
81
|
+ <el-radio-group v-model="form.pay_way">
|
82
|
82
|
<el-radio :label="item.value" :value="item.value" v-for="(item,index) in payWays" :key="index">{{ item.label }}</el-radio>
|
83
|
|
- <el-button type="primary" v-if="form.pay_way == 5" @click="reading()">读卡</el-button>
|
|
83
|
+ <el-button type="primary" v-if="form.pay_way == 4" @click="reading()">读卡</el-button>
|
84
|
84
|
|
85
|
|
- </el-radio-group>
|
|
85
|
+ </el-radio-group>
|
86
|
86
|
</el-form-item>
|
87
|
87
|
|
88
|
88
|
<el-form-item label="个人现金支付方式:" style="width: 100%">
|
|
@@ -167,7 +167,7 @@
|
167
|
167
|
|
168
|
168
|
<span slot="footer" class="dialog-footer">
|
169
|
169
|
<el-button @click="cancel('formValue')">取 消</el-button>
|
170
|
|
-<!-- <el-button @click="init">调试</el-button>-->
|
|
170
|
+ <!-- <el-button @click="init">调试</el-button>-->
|
171
|
171
|
<el-button type="primary" @click="confirm('formValue')">确 定</el-button>
|
172
|
172
|
</span>
|
173
|
173
|
</el-dialog>
|
|
@@ -216,7 +216,7 @@
|
216
|
216
|
// {value: 2, label: '银行卡'},
|
217
|
217
|
// {value: 3, label: '微信'},
|
218
|
218
|
// {value: 4, label: '支付宝'},
|
219
|
|
- { value: 5, label: '医保卡' },
|
|
219
|
+ { value: 4, label: '医保卡' },
|
220
|
220
|
|
221
|
221
|
],
|
222
|
222
|
total: "",
|
|
@@ -259,186 +259,186 @@
|
259
|
259
|
default: 1,
|
260
|
260
|
},
|
261
|
261
|
},
|
262
|
|
- created() {
|
263
|
|
- },
|
264
|
|
- methods: {
|
265
|
|
- reading() {
|
266
|
|
- var that = this
|
267
|
|
- let params = {
|
268
|
|
- 'id_card_type': 1,
|
269
|
|
- 'admin_user_id': this.$store.getters.xt_user.user.id,
|
270
|
|
- 'certificates':1,
|
271
|
|
- }
|
272
|
|
- axios.get('http://127.0.0.1:9532/zh/api/readcard', {
|
273
|
|
- params: params
|
|
262
|
+ created() {
|
|
263
|
+ },
|
|
264
|
+ methods: {
|
|
265
|
+ reading() {
|
|
266
|
+ var that = this
|
|
267
|
+ let params = {
|
|
268
|
+ 'id_card_type': 1,
|
|
269
|
+ 'admin_user_id': this.$store.getters.xt_user.user.id,
|
|
270
|
+ 'certificates':1,
|
|
271
|
+ }
|
|
272
|
+ axios.get('http://127.0.0.1:9532/zh/api/readcard', {
|
|
273
|
+ params: params
|
|
274
|
+ })
|
|
275
|
+ .then(function(response) {
|
|
276
|
+ if (response.data.state == 0) {
|
|
277
|
+ that.$message.error(response.data.msg)
|
|
278
|
+ return false
|
|
279
|
+ } else {
|
|
280
|
+ that.$message({ message: '读卡成功', type: 'success' })
|
|
281
|
+ }
|
274
|
282
|
})
|
275
|
|
- .then(function(response) {
|
276
|
|
- if (response.data.state == 0) {
|
277
|
|
- that.$message.error(response.data.msg)
|
278
|
|
- return false
|
279
|
|
- } else {
|
280
|
|
- that.$message({ message: '读卡成功', type: 'success' })
|
281
|
|
- }
|
282
|
|
- })
|
283
|
|
- .catch(function(error) {
|
284
|
|
-
|
285
|
|
- })
|
286
|
|
- },
|
|
283
|
+ .catch(function(error) {
|
287
|
284
|
|
288
|
|
- init() {
|
289
|
|
- console.log("====this.form.dec_way===", this.form.dec_way)
|
290
|
|
- },
|
291
|
|
- lilili(val) {
|
292
|
|
- console.log("val", val)
|
293
|
|
- if (this.form.tmp_decimal == "") {
|
294
|
|
- this.form.pay_price = this.tmp_pay
|
295
|
|
- return
|
296
|
|
- }
|
|
285
|
+ })
|
|
286
|
+ },
|
|
287
|
+
|
|
288
|
+ init() {
|
|
289
|
+ console.log("====this.form.dec_way===", this.form.dec_way)
|
|
290
|
+ },
|
|
291
|
+ lilili(val) {
|
|
292
|
+ console.log("val", val)
|
|
293
|
+ if (this.form.tmp_decimal == "") {
|
|
294
|
+ this.form.pay_price = this.tmp_pay
|
|
295
|
+ return
|
|
296
|
+ }
|
|
297
|
+ if (parseFloat(this.form.tmp_decimal) > parseFloat(this.form.private_price)) {
|
|
298
|
+ // alert("押金不得大于自费金额")
|
|
299
|
+ this.$message.error("押金不得大于自费金额");
|
|
300
|
+ this.form.tmp_decimal = ""
|
|
301
|
+ this.form.pay_price = this.tmp_pay
|
|
302
|
+ return
|
|
303
|
+ }
|
|
304
|
+ // this.form.private_price = parseFloat(this.form.tmp_decimal) + parseFloat(this.form.pay_price)
|
|
305
|
+
|
|
306
|
+ this.form.pay_price = ((parseFloat(this.form.private_price) * 10000 - parseFloat(this.form.tmp_decimal) * 10000) / 10000).toFixed(2)
|
|
307
|
+ },
|
|
308
|
+ changedecimal() {
|
|
309
|
+ // console.log("this.isshow前",this.isshow)
|
|
310
|
+ this.$forceUpdate();
|
|
311
|
+ this.isshow = this.form.dec_way
|
|
312
|
+ // console.log("this.form.dec_way后",this.form.dec_way)
|
|
313
|
+ if (this.isshow == false) {
|
|
314
|
+ // this.form.private_price = parseFloat(this.form.pay_price)
|
|
315
|
+ this.form.tmp_decimal = 0
|
|
316
|
+ this.form.pay_price = this.tmp_pay
|
|
317
|
+ } else {
|
|
318
|
+ //储存临时付款
|
|
319
|
+ this.tmp_pay = this.form.pay_price
|
297
|
320
|
if (parseFloat(this.form.tmp_decimal) > parseFloat(this.form.private_price)) {
|
|
321
|
+ this.form.tmp_decimal = 0
|
298
|
322
|
// alert("押金不得大于自费金额")
|
299
|
323
|
this.$message.error("押金不得大于自费金额");
|
300
|
|
- this.form.tmp_decimal = ""
|
301
|
|
- this.form.pay_price = this.tmp_pay
|
302
|
324
|
return
|
303
|
325
|
}
|
304
|
326
|
// this.form.private_price = parseFloat(this.form.tmp_decimal) + parseFloat(this.form.pay_price)
|
305
|
|
-
|
|
327
|
+ this.tmp_pay = this.form.pay_price
|
306
|
328
|
this.form.pay_price = ((parseFloat(this.form.private_price) * 10000 - parseFloat(this.form.tmp_decimal) * 10000) / 10000).toFixed(2)
|
307
|
|
- },
|
308
|
|
- changedecimal() {
|
309
|
|
- // console.log("this.isshow前",this.isshow)
|
310
|
|
- this.$forceUpdate();
|
311
|
|
- this.isshow = this.form.dec_way
|
312
|
|
- // console.log("this.form.dec_way后",this.form.dec_way)
|
313
|
|
- if (this.isshow == false) {
|
314
|
|
- // this.form.private_price = parseFloat(this.form.pay_price)
|
315
|
|
- this.form.tmp_decimal = 0
|
316
|
|
- this.form.pay_price = this.tmp_pay
|
317
|
|
- } else {
|
318
|
|
- //储存临时付款
|
319
|
|
- this.tmp_pay = this.form.pay_price
|
320
|
|
- if (parseFloat(this.form.tmp_decimal) > parseFloat(this.form.private_price)) {
|
321
|
|
- this.form.tmp_decimal = 0
|
322
|
|
- // alert("押金不得大于自费金额")
|
323
|
|
- this.$message.error("押金不得大于自费金额");
|
324
|
|
- return
|
325
|
|
- }
|
326
|
|
- // this.form.private_price = parseFloat(this.form.tmp_decimal) + parseFloat(this.form.pay_price)
|
327
|
|
- this.tmp_pay = this.form.pay_price
|
328
|
|
- this.form.pay_price = ((parseFloat(this.form.private_price) * 10000 - parseFloat(this.form.tmp_decimal) * 10000) / 10000).toFixed(2)
|
329
|
|
- }
|
330
|
|
- },
|
331
|
|
- //查询用户当前的余额
|
332
|
|
- updateconfig() {
|
333
|
|
- var params = {
|
334
|
|
- his_patient_id: this.id,
|
335
|
|
- }
|
336
|
|
- idtobalance(params).then((res) => {
|
337
|
|
- if (res.data.state == 1) {
|
338
|
|
- this.decimal = res.data.data.list;
|
339
|
|
- }
|
340
|
|
- })
|
341
|
|
- },
|
342
|
|
- show(total,order,id) {
|
343
|
|
- this.record_date = moment(new Date()).add('year', 0).format("YYYY-MM-DD HH:mm")
|
344
|
|
- //初始化
|
345
|
|
- this.form.tmp_decimal = 0
|
346
|
|
- this.tmp_pay = 0
|
347
|
|
- this.id = id
|
348
|
|
- this.updateconfig()
|
349
|
|
- this.form.dec_way = false
|
350
|
|
- this.form.total = total
|
351
|
|
- this.form.private_price = total
|
352
|
|
- this.form.pay_price = total
|
353
|
|
- this.form.total = total + this.form.medical_insurance_price
|
354
|
|
- this.form.discount_price = 0.0
|
355
|
|
- this.form.preferential_price = 0.0
|
356
|
|
-
|
357
|
|
- this.form.fapiao_code = "";
|
358
|
|
- this.form.fapiao_number = "";
|
359
|
|
- this.order = order;
|
360
|
|
-
|
361
|
|
- if (this.order && this.order.id > 0) {
|
362
|
|
- this.form.acct_pay = this.order.acct_pay
|
363
|
|
- this.form.psn_pay = this.order.psn_cash_pay
|
364
|
|
- this.form.total = this.order.medfee_sumamt
|
365
|
|
- this.form.pay_price = (this.order.medfee_sumamt).toFixed(2)
|
366
|
|
- this.form.medical_insurance_price = this.order.fund_pay_sumamt
|
367
|
|
- this.form.private_price = this.order.psn_part_amt
|
|
329
|
+ }
|
|
330
|
+ },
|
|
331
|
+ //查询用户当前的余额
|
|
332
|
+ updateconfig() {
|
|
333
|
+ var params = {
|
|
334
|
+ his_patient_id: this.id,
|
|
335
|
+ }
|
|
336
|
+ idtobalance(params).then((res) => {
|
|
337
|
+ if (res.data.state == 1) {
|
|
338
|
+ this.decimal = res.data.data.list;
|
368
|
339
|
}
|
|
340
|
+ })
|
|
341
|
+ },
|
|
342
|
+ show(total,order,id) {
|
|
343
|
+ this.record_date = moment(new Date()).add('year', 0).format("YYYY-MM-DD HH:mm")
|
|
344
|
+ //初始化
|
|
345
|
+ this.form.tmp_decimal = 0
|
|
346
|
+ this.tmp_pay = 0
|
|
347
|
+ this.id = id
|
|
348
|
+ this.updateconfig()
|
|
349
|
+ this.form.dec_way = false
|
|
350
|
+ this.form.total = total
|
|
351
|
+ this.form.private_price = total
|
|
352
|
+ this.form.pay_price = total
|
|
353
|
+ this.form.total = total + this.form.medical_insurance_price
|
|
354
|
+ this.form.discount_price = 0.0
|
|
355
|
+ this.form.preferential_price = 0.0
|
|
356
|
+
|
|
357
|
+ this.form.fapiao_code = "";
|
|
358
|
+ this.form.fapiao_number = "";
|
|
359
|
+ this.order = order;
|
|
360
|
+
|
|
361
|
+ if (this.order && this.order.id > 0) {
|
|
362
|
+ this.form.acct_pay = this.order.acct_pay
|
|
363
|
+ this.form.psn_pay = this.order.psn_cash_pay
|
|
364
|
+ this.form.total = this.order.medfee_sumamt
|
|
365
|
+ this.form.pay_price = (this.order.medfee_sumamt).toFixed(2)
|
|
366
|
+ this.form.medical_insurance_price = this.order.fund_pay_sumamt
|
|
367
|
+ this.form.private_price = this.order.psn_part_amt
|
|
368
|
+ }
|
369
|
369
|
|
370
|
|
- this.visibility = true
|
|
370
|
+ this.visibility = true
|
371
|
371
|
|
372
|
|
- },
|
373
|
|
- hide: function() {
|
374
|
|
- this.form = Object.assign({}, this.resetForm);
|
375
|
|
- this.loadingtwo = false;
|
376
|
|
- this.visibility = false
|
377
|
|
- }, cancel: function(formName) {
|
378
|
|
- this.form.tmp_decimal = 0
|
379
|
|
- this.tmp_pay = 0
|
380
|
|
- this.form.dec_way = false
|
381
|
|
- this.$emit('cancel', this.getValue());
|
382
|
|
- this.$refs['formValue'].resetFields()
|
383
|
|
- },
|
384
|
|
- confirm: function(formName) {
|
385
|
|
- if (parseFloat(this.form.tmp_decimal) > parseFloat(this.decimal)){
|
386
|
|
- this.$message.error("押金余额不足");
|
387
|
|
- return
|
388
|
|
- }
|
389
|
|
- this.$refs['formValue'].validate((valid) => {
|
390
|
|
- if (valid) {
|
391
|
|
- let value = {};
|
392
|
|
- value = this.getValue();
|
393
|
|
- this.$emit('confirm', value);
|
394
|
|
- this.loadingtwo = true
|
395
|
|
- }
|
396
|
|
- })
|
397
|
|
- },
|
398
|
|
- getValue: function() {
|
399
|
|
- let form = {};
|
400
|
|
- form = this.form;
|
401
|
|
- return form
|
402
|
|
- },
|
403
|
|
- realityPrice(val) {
|
404
|
|
- if (val < (this.form.total - this.form.discount_price - this.form.preferential_price)) {
|
405
|
|
- this.$message.error('实收金额不能小于收费金额');
|
406
|
|
- return
|
407
|
|
- }
|
408
|
|
- this.form.found_price = parseInt(val) - parseInt(this.form.total) + parseInt(this.form.discount_price) + parseInt(this.form.preferential_price)
|
409
|
|
- },
|
410
|
|
- changeDiscountPrice(val) {
|
411
|
|
- if (val > this.form.total) {
|
412
|
|
- this.$message.error('折扣金额不能超过费用总额');
|
413
|
|
- return
|
414
|
|
- }
|
415
|
|
- this.form.reality_price = parseInt(this.form.total) - parseInt(val) - parseInt(this.form.preferential_price)
|
416
|
|
- },
|
417
|
|
- changePreferentialPrice(val) {
|
418
|
|
- if (val > this.form.total) {
|
419
|
|
- this.$message.error('优惠金额不能超过费用总额');
|
420
|
|
- return
|
|
372
|
+ },
|
|
373
|
+ hide: function() {
|
|
374
|
+ this.form = Object.assign({}, this.resetForm);
|
|
375
|
+ this.loadingtwo = false;
|
|
376
|
+ this.visibility = false
|
|
377
|
+ }, cancel: function(formName) {
|
|
378
|
+ this.form.tmp_decimal = 0
|
|
379
|
+ this.tmp_pay = 0
|
|
380
|
+ this.form.dec_way = false
|
|
381
|
+ this.$emit('cancel', this.getValue());
|
|
382
|
+ this.$refs['formValue'].resetFields()
|
|
383
|
+ },
|
|
384
|
+ confirm: function(formName) {
|
|
385
|
+ if (parseFloat(this.form.tmp_decimal) > parseFloat(this.decimal)){
|
|
386
|
+ this.$message.error("押金余额不足");
|
|
387
|
+ return
|
|
388
|
+ }
|
|
389
|
+ this.$refs['formValue'].validate((valid) => {
|
|
390
|
+ if (valid) {
|
|
391
|
+ let value = {};
|
|
392
|
+ value = this.getValue();
|
|
393
|
+ this.$emit('confirm', value);
|
|
394
|
+ this.loadingtwo = true
|
421
|
395
|
}
|
422
|
|
- this.form.reality_price = parseInt(this.form.total) - parseInt(val) - parseInt(this.form.discount_price)
|
|
396
|
+ })
|
|
397
|
+ },
|
|
398
|
+ getValue: function() {
|
|
399
|
+ let form = {};
|
|
400
|
+ form = this.form;
|
|
401
|
+ return form
|
|
402
|
+ },
|
|
403
|
+ realityPrice(val) {
|
|
404
|
+ if (val < (this.form.total - this.form.discount_price - this.form.preferential_price)) {
|
|
405
|
+ this.$message.error('实收金额不能小于收费金额');
|
|
406
|
+ return
|
423
|
407
|
}
|
|
408
|
+ this.form.found_price = parseInt(val) - parseInt(this.form.total) + parseInt(this.form.discount_price) + parseInt(this.form.preferential_price)
|
424
|
409
|
},
|
425
|
|
- mounted() {
|
426
|
|
- var nowDate = new Date();
|
427
|
|
- var nowYear = nowDate.getFullYear();
|
428
|
|
- var nowMonth = nowDate.getMonth() + 1;
|
429
|
|
- var nowDay = nowDate.getDate();
|
430
|
|
-
|
431
|
|
- var nowHours = nowDate.getHours();
|
432
|
|
- var nowMin = nowDate.getMinutes();
|
433
|
|
- var nowSecond = nowDate.getSeconds();
|
434
|
|
-
|
435
|
|
- this.record_date =
|
436
|
|
- nowYear +
|
437
|
|
- '-' +
|
438
|
|
- (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
|
439
|
|
- '-' +
|
440
|
|
- (nowDay < 10 ? '0' + nowDay : nowDay) + " " + (nowHours < 10 ? '0' + nowHours : nowHours) + ":" + (nowMin < 10 ? '0' + nowMin : nowMin)
|
|
410
|
+ changeDiscountPrice(val) {
|
|
411
|
+ if (val > this.form.total) {
|
|
412
|
+ this.$message.error('折扣金额不能超过费用总额');
|
|
413
|
+ return
|
|
414
|
+ }
|
|
415
|
+ this.form.reality_price = parseInt(this.form.total) - parseInt(val) - parseInt(this.form.preferential_price)
|
|
416
|
+ },
|
|
417
|
+ changePreferentialPrice(val) {
|
|
418
|
+ if (val > this.form.total) {
|
|
419
|
+ this.$message.error('优惠金额不能超过费用总额');
|
|
420
|
+ return
|
|
421
|
+ }
|
|
422
|
+ this.form.reality_price = parseInt(this.form.total) - parseInt(val) - parseInt(this.form.discount_price)
|
441
|
423
|
}
|
|
424
|
+ },
|
|
425
|
+ mounted() {
|
|
426
|
+ var nowDate = new Date();
|
|
427
|
+ var nowYear = nowDate.getFullYear();
|
|
428
|
+ var nowMonth = nowDate.getMonth() + 1;
|
|
429
|
+ var nowDay = nowDate.getDate();
|
|
430
|
+
|
|
431
|
+ var nowHours = nowDate.getHours();
|
|
432
|
+ var nowMin = nowDate.getMinutes();
|
|
433
|
+ var nowSecond = nowDate.getSeconds();
|
|
434
|
+
|
|
435
|
+ this.record_date =
|
|
436
|
+ nowYear +
|
|
437
|
+ '-' +
|
|
438
|
+ (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
|
|
439
|
+ '-' +
|
|
440
|
+ (nowDay < 10 ? '0' + nowDay : nowDay) + " " + (nowHours < 10 ? '0' + nowHours : nowHours) + ":" + (nowMin < 10 ? '0' + nowMin : nowMin)
|
|
441
|
+ }
|
442
|
442
|
|
443
|
443
|
|
444
|
444
|
}
|
|
@@ -446,16 +446,16 @@
|
446
|
446
|
|
447
|
447
|
|
448
|
448
|
<style lang="scss" scoped>
|
449
|
|
-/deep/input::-webkit-input-placeholder {
|
450
|
|
- color: red;
|
451
|
|
- font-size: 15px;
|
452
|
|
-}
|
453
|
|
-
|
454
|
|
-/deep/.el-input__inner {
|
455
|
|
- background-color: transparent !important;
|
456
|
|
- border: 1px solid red;
|
457
|
|
-}
|
458
|
|
-.chargeDialog {
|
|
449
|
+ /deep/input::-webkit-input-placeholder {
|
|
450
|
+ color: red;
|
|
451
|
+ font-size: 15px;
|
|
452
|
+ }
|
|
453
|
+
|
|
454
|
+ /deep/.el-input__inner {
|
|
455
|
+ background-color: transparent !important;
|
|
456
|
+ border: 1px solid red;
|
|
457
|
+ }
|
|
458
|
+ .chargeDialog {
|
459
|
459
|
.el-form {
|
460
|
460
|
display: flex;
|
461
|
461
|
flex-wrap: wrap;
|
|
@@ -463,13 +463,13 @@
|
463
|
463
|
.el-form-item {
|
464
|
464
|
width: 50%;
|
465
|
465
|
}
|
466
|
|
-}
|
467
|
|
-.input_style {
|
468
|
|
- border-radius: 5px;
|
469
|
|
- border: 1px solid #dddddd;
|
470
|
|
-}
|
471
|
|
-.input_style:focus {
|
472
|
|
-outline:none;
|
473
|
|
-border: 1px solid #66b1ff;
|
474
|
|
-}
|
|
466
|
+ }
|
|
467
|
+ .input_style {
|
|
468
|
+ border-radius: 5px;
|
|
469
|
+ border: 1px solid #dddddd;
|
|
470
|
+ }
|
|
471
|
+ .input_style:focus {
|
|
472
|
+ outline:none;
|
|
473
|
+ border: 1px solid #66b1ff;
|
|
474
|
+ }
|
475
|
475
|
</style>
|