|
|
@@ -122,6 +122,7 @@
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column label="余额" align="center" prop="money"/>
|
|
|
+ <el-table-column label="红包余额" align="center" prop="redPackageMoney"/>
|
|
|
<el-table-column label="企业类型" align="center" prop="companyType">
|
|
|
<template slot-scope="scope">
|
|
|
<dict-tag :options="companyTypeOptions" :value="scope.row.companyType"/>
|
|
|
@@ -179,6 +180,14 @@
|
|
|
v-hasPermi="['his:company:recharge']"
|
|
|
>充值
|
|
|
</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="handleRedRecharge(scope.row)"
|
|
|
+ v-hasPermi="['his:company:redRecharge']"
|
|
|
+ >红包充值
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
@@ -470,6 +479,27 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
+ <el-dialog :title="redRecharge.title" :visible.sync="redRecharge.open" width="500px" append-to-body>
|
|
|
+ <el-form ref="redRechargeForm" :rules="redRechargeRules" :model="redRechargeForm" label-width="80px">
|
|
|
+ <el-form-item label="公司">
|
|
|
+ <el-input v-model="redRechargeForm.companyName" disabled/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="余额">
|
|
|
+ <el-input v-model="redRechargeForm.balance" disabled/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="充值金额" prop="money">
|
|
|
+ <el-input-number v-model="redRechargeForm.money" :min="0.01" placeholder="请输入充值金额"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="备注" prop="remark">
|
|
|
+ <el-input v-model="redRechargeForm.remark" placeholder="请输入备注"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitRedRechargeForm" :disabled="redSubmit">确 定</el-button>
|
|
|
+ <el-button @click="redRecharge.open=false">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
<el-dialog :title="deduct.title" :visible.sync="deduct.open" width="500px" append-to-body>
|
|
|
<el-form ref="deductForm" :rules="deductRules" :model="deductForm" label-width="80px">
|
|
|
<el-form-item label="公司">
|
|
|
@@ -657,6 +687,7 @@ import {
|
|
|
addCompany,
|
|
|
updateCompany,
|
|
|
recharge,
|
|
|
+ redRecharge,
|
|
|
deduct,
|
|
|
exportCompany,
|
|
|
resetPwd,
|
|
|
@@ -676,6 +707,7 @@ export default {
|
|
|
name: 'Company',
|
|
|
data() {
|
|
|
return {
|
|
|
+ redSubmit: false,
|
|
|
//分账参数
|
|
|
revenue:{
|
|
|
open: false,
|
|
|
@@ -694,6 +726,10 @@ export default {
|
|
|
open: false,
|
|
|
title: '后台充值'
|
|
|
},
|
|
|
+ redRecharge: {
|
|
|
+ open: false,
|
|
|
+ title: '红包充值'
|
|
|
+ },
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
// 导出遮罩层
|
|
|
@@ -736,6 +772,10 @@ export default {
|
|
|
rechargeForm: {
|
|
|
money: 0
|
|
|
},
|
|
|
+ // 红包充值表单参数
|
|
|
+ redRechargeForm: {
|
|
|
+ money: 0
|
|
|
+ },
|
|
|
followDoctorList: [],
|
|
|
cateList: [],
|
|
|
// 表单参数
|
|
|
@@ -812,6 +852,11 @@ export default {
|
|
|
{ required: true, message: '扣款金额不能为空', trigger: 'blur' }
|
|
|
]
|
|
|
},
|
|
|
+ redRechargeRules: {
|
|
|
+ money: [
|
|
|
+ { required: true, message: '扣款金额不能为空', trigger: 'blur' }
|
|
|
+ ]
|
|
|
+ },
|
|
|
deduct: {
|
|
|
open: false,
|
|
|
title: '后台扣款'
|
|
|
@@ -910,6 +955,15 @@ export default {
|
|
|
this.rechargeForm.money = null
|
|
|
this.recharge.open = true
|
|
|
},
|
|
|
+ // 红包充值
|
|
|
+ handleRedRecharge(row) {
|
|
|
+ this.redSubmit=false
|
|
|
+ this.redRechargeForm.companyId = row.companyId
|
|
|
+ this.redRechargeForm.companyName = row.companyName
|
|
|
+ this.redRechargeForm.balance = row.money
|
|
|
+ this.redRechargeForm.money = null
|
|
|
+ this.redRecharge.open = true
|
|
|
+ },
|
|
|
handleDeduct(row) {
|
|
|
const companyId = row.companyId
|
|
|
this.deductForm.companyId = row.companyId
|
|
|
@@ -932,6 +986,21 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ /** 红包充值提交按钮 */
|
|
|
+ submitRedRechargeForm() {
|
|
|
+ this.$refs['redRechargeForm'].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ this.redSubmit=true
|
|
|
+ redRecharge(this.redRechargeForm).then(response => {
|
|
|
+ if (response.code === 200) {
|
|
|
+ this.msgSuccess(response.msg)
|
|
|
+ this.redRecharge.open = false
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
submitRevenueForm(){
|
|
|
var param = this.revenueForm;
|
|
|
console.log("--------------",param)
|