|
|
@@ -180,6 +180,14 @@
|
|
|
v-hasPermi="['his:company:recharge']"
|
|
|
>充值
|
|
|
</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="handleDeduct(scope.row)"
|
|
|
+ v-hasPermi="['his:company:deduct']"
|
|
|
+ >扣款
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
@@ -192,9 +200,9 @@
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-edit"
|
|
|
- @click="handleDeduct(scope.row)"
|
|
|
- v-hasPermi="['his:company:deduct']"
|
|
|
- >扣款
|
|
|
+ @click="handleRedDeduct(scope.row)"
|
|
|
+ v-hasPermi="['his:company:redDeduct']"
|
|
|
+ >红包扣款
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
@@ -521,6 +529,27 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
+ <el-dialog :title="redDeduct.title" :visible.sync="redDeduct.open" width="500px" append-to-body>
|
|
|
+ <el-form ref="redDeductForm" :rules="redDeductRules" :model="redDeductForm" label-width="80px">
|
|
|
+ <el-form-item label="公司">
|
|
|
+ <el-input v-model="redDeductForm.companyName" disabled/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="余额">
|
|
|
+ <el-input v-model="redDeductForm.balance" disabled/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="扣款金额" prop="money">
|
|
|
+ <el-input-number v-model="redDeductForm.money" :min="0.01" placeholder="请输入扣款金额"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="备注" prop="remark">
|
|
|
+ <el-input v-model="redDeductForm.remark" placeholder="请输入备注"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitRedDeductForm">确 定</el-button>
|
|
|
+ <el-button @click="redDeduct.open=false">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
<el-dialog :title="revenue.title" :visible.sync="revenue.open" width="800px" append-to-body>
|
|
|
<el-form ref="revenueForm" :model="revenueForm" label-width="150px">
|
|
|
<el-form-item label="公司">
|
|
|
@@ -689,6 +718,7 @@ import {
|
|
|
recharge,
|
|
|
redRecharge,
|
|
|
deduct,
|
|
|
+ redDeduct,
|
|
|
exportCompany,
|
|
|
resetPwd,
|
|
|
getDivConfig,
|
|
|
@@ -720,6 +750,10 @@ export default {
|
|
|
deductForm: {
|
|
|
money: 0
|
|
|
},
|
|
|
+ // 表单参数
|
|
|
+ redDeductForm: {
|
|
|
+ money: 0
|
|
|
+ },
|
|
|
doctorIds: [],
|
|
|
doctor: [],
|
|
|
recharge: {
|
|
|
@@ -847,6 +881,12 @@ export default {
|
|
|
{ required: true, message: '扣款金额不能为空', trigger: 'blur' }
|
|
|
]
|
|
|
},
|
|
|
+ // 表单校验
|
|
|
+ redDeductRules: {
|
|
|
+ money: [
|
|
|
+ { required: true, message: '扣款金额不能为空', trigger: 'blur' }
|
|
|
+ ]
|
|
|
+ },
|
|
|
rechargeRules: {
|
|
|
money: [
|
|
|
{ required: true, message: '扣款金额不能为空', trigger: 'blur' }
|
|
|
@@ -861,6 +901,10 @@ export default {
|
|
|
open: false,
|
|
|
title: '后台扣款'
|
|
|
},
|
|
|
+ redDeduct: {
|
|
|
+ open: false,
|
|
|
+ title: '红包扣款'
|
|
|
+ },
|
|
|
maAppList: [],
|
|
|
miniAppList: [],
|
|
|
customAppList: [],
|
|
|
@@ -972,6 +1016,13 @@ export default {
|
|
|
this.deductForm.money = null
|
|
|
this.deduct.open = true
|
|
|
},
|
|
|
+ handleRedDeduct(row) {
|
|
|
+ this.redDeductForm.companyId = row.companyId
|
|
|
+ this.redDeductForm.companyName = row.companyName
|
|
|
+ this.redDeductForm.balance = row.money
|
|
|
+ this.redDeductForm.money = null
|
|
|
+ this.redDeduct.open = true
|
|
|
+ },
|
|
|
/** 提交按钮 */
|
|
|
submitRechargeForm() {
|
|
|
this.$refs['rechargeForm'].validate(valid => {
|
|
|
@@ -1029,6 +1080,20 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ /** 提交按钮 */
|
|
|
+ submitRedDeductForm() {
|
|
|
+ this.$refs['redDeductForm'].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ redDeduct(this.redDeductForm).then(response => {
|
|
|
+ if (response.code === 200) {
|
|
|
+ this.msgSuccess(response.msg)
|
|
|
+ this.redDeduct.open = false
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
getList() {
|
|
|
this.loading = true
|