|
|
@@ -111,6 +111,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"/>
|
|
|
@@ -184,7 +185,31 @@
|
|
|
v-hasPermi="['his:company:deduct']"
|
|
|
>扣款
|
|
|
</el-button>
|
|
|
-
|
|
|
+ <el-button
|
|
|
+ v-if="showRedPacket"
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="handleRedRecharge(scope.row)"
|
|
|
+ v-hasPermi="['his:company:redRecharge']"
|
|
|
+ >红包充值
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="showRedPacket"
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="handleRedDeduct(scope.row)"
|
|
|
+ v-hasPermi="['his:company:redDeduct']"
|
|
|
+ >红包扣款
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="handleRevenue(scope.row)"
|
|
|
+ v-hasPermi="['company:company:revenue']"
|
|
|
+ >分账配置</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -496,6 +521,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="公司">
|
|
|
@@ -516,6 +562,183 @@
|
|
|
<el-button @click="deduct.open=false">取 消</el-button>
|
|
|
</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="公司">
|
|
|
+ <el-input v-model="revenueForm.companyName" disabled/>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="开启分账">
|
|
|
+ <el-switch
|
|
|
+ v-model="revenueForm.divFlag"
|
|
|
+ active-color="#13ce66"
|
|
|
+ inactive-color="#ff4949"
|
|
|
+ active-value="1"
|
|
|
+ inactive-value="0"
|
|
|
+ >
|
|
|
+ </el-switch>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="分账模式" v-if="revenueForm.divFlag == 1">
|
|
|
+ <el-radio v-model="revenueForm.delayAcctFlag" label="N">实时分账</el-radio>
|
|
|
+ <el-radio v-model="revenueForm.delayAcctFlag" label="Y">延时分账</el-radio>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="是否使用百分比分账" v-if="revenueForm.divFlag == 1">
|
|
|
+ <el-switch
|
|
|
+ v-model="revenueForm.percentageFlag"
|
|
|
+ active-color="#13ce66"
|
|
|
+ inactive-color="#ff4949"
|
|
|
+ active-value="Y"
|
|
|
+ inactive-value="N"
|
|
|
+ >
|
|
|
+ </el-switch>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="是否净值分账" v-if="revenueForm.percentageFlag == 'Y'">
|
|
|
+ <el-switch
|
|
|
+ v-model="revenueForm.iscCleanSplit"
|
|
|
+ active-color="#13ce66"
|
|
|
+ inactive-color="#ff4949"
|
|
|
+ active-value="Y"
|
|
|
+ inactive-value="N"
|
|
|
+ >
|
|
|
+ </el-switch>
|
|
|
+ </el-form-item>
|
|
|
+ <div v-if="revenueForm.divFlag == 1">
|
|
|
+ <el-form-item label="分账接收方配置">
|
|
|
+ <el-tooltip content="批量设置分账接收账户" placement="top">
|
|
|
+ <el-button type="primary" icon="el-icon-plus" @click="addAcctInfo" style="margin-bottom: 5px;">
|
|
|
+ 添加新接收方
|
|
|
+ </el-button>
|
|
|
+ </el-tooltip>
|
|
|
+
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <div v-for="(account, index) in revenueForm.acctInfos" :key="index"
|
|
|
+ style="border: 1px solid #dcdfe6; padding: 20px; margin-bottom: 20px; border-radius: 4px;"
|
|
|
+ >
|
|
|
+ <div style="display: flex; justify-content: between; align-items: center; margin-bottom: 15px;">
|
|
|
+ <div style="margin: 0; color: #409eff;">账户 {{ index + 1 }}</div>
|
|
|
+ <el-button
|
|
|
+ type="danger"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ size="mini"
|
|
|
+ @click="removeAcctInfo(index)"
|
|
|
+ v-if="revenueForm.acctInfos.length > 0"
|
|
|
+ >
|
|
|
+ 删除账户
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-form-item label="分账接收方ID" :prop="`acctInfos.${index}.huifuId`">
|
|
|
+ <el-input v-model="account.huifuId" placeholder="斗拱开户时生成;示例值:6666000123120001"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="账户号" :prop="`acctInfos.${index}.acctId`" >
|
|
|
+ <el-input v-model="account.acctId" placeholder="可指定账户号,仅支持基本户、现金户,不填默认为基本户;示例值:F00598600"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="分账百分比%" v-if="revenueForm.percentageFlag == 'Y'" :prop="`acctInfos.${index}.percentageDiv`" >
|
|
|
+ <el-input-number v-model="account.percentageDiv" :precision="2" :step="0.1" :min="0" :max="100" placeholder="示例值:23.50,表示23.50%。acct_infos中全部分账百分比之和必须为100.00%。"></el-input-number>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="分账金额" v-if="revenueForm.percentageFlag == 'N'" :prop="`acctInfos.${index}.divAmt`" >
|
|
|
+ <el-input-number v-model="account.divAmt" :precision="2" :step="1" :min="0.01" placeholder="单位元,需保留小数点后两位,示例值:1.00 ,最低传入0.01"></el-input-number>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitRevenueForm">确 定</el-button>
|
|
|
+ <el-button @click="revenue.open=false">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <!-- 批量修改小程序 -->
|
|
|
+ <el-dialog :title="miniProgram.title" :visible.sync="miniProgram.open" width="700px" append-to-body>
|
|
|
+
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
|
|
+ <el-form-item label="小程序点播配置" prop="courseMiniAppId">
|
|
|
+ <el-select
|
|
|
+ v-model="form.courseMiniAppId"
|
|
|
+ placeholder="请选择小程序"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in miniAppList"
|
|
|
+ :key="item.appId"
|
|
|
+ :label="item.appName"
|
|
|
+ :value="item.appId"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="主要小程序" prop="miniAppMaster">
|
|
|
+ <el-select
|
|
|
+ v-model="form.miniAppMaster"
|
|
|
+ multiple
|
|
|
+ :multiple-limit="1"
|
|
|
+ placeholder="请选择"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in miniAppList"
|
|
|
+ :key="item.appId"
|
|
|
+ :label="item.appName"
|
|
|
+ :value="item.appId"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="备用小程序" prop="miniAppServer">
|
|
|
+ <el-select
|
|
|
+ v-model="form.miniAppServer"
|
|
|
+ multiple
|
|
|
+ :multiple-limit="1"
|
|
|
+ placeholder="请选择"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in miniAppList"
|
|
|
+ :key="item.appId"
|
|
|
+ :label="item.appName"
|
|
|
+ :value="item.appId"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitMiniProgramForm">确 定</el-button>
|
|
|
+ <el-button @click="cancelMiniProgram">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -527,9 +750,13 @@ import {
|
|
|
addCompany,
|
|
|
updateCompany,
|
|
|
recharge,
|
|
|
+ redRecharge,
|
|
|
deduct,
|
|
|
+ redDeduct,
|
|
|
exportCompany,
|
|
|
- resetPwd
|
|
|
+ resetPwd,
|
|
|
+ getDivConfig,
|
|
|
+ setDiv, exitMiniProgram
|
|
|
} from '@/api/his/company'
|
|
|
import {bindShopCompany} from "@/api/company/company";
|
|
|
import { storeList } from '@/api/hisStore/store'
|
|
|
@@ -546,6 +773,16 @@ export default {
|
|
|
name: 'Company',
|
|
|
data() {
|
|
|
return {
|
|
|
+ signProjectName:"",
|
|
|
+ redSubmit: false,
|
|
|
+ //分账参数
|
|
|
+ revenue:{
|
|
|
+ open: false,
|
|
|
+ title: '分账配置'
|
|
|
+ },
|
|
|
+ revenueForm:{
|
|
|
+ acctInfos: []
|
|
|
+ },
|
|
|
shopList: [], // 清空店铺列表
|
|
|
// 绑定店铺相关
|
|
|
bindShopForm: {
|
|
|
@@ -568,12 +805,21 @@ export default {
|
|
|
deductForm: {
|
|
|
money: 0
|
|
|
},
|
|
|
+ // 表单参数
|
|
|
+ redDeductForm: {
|
|
|
+ money: 0
|
|
|
+ },
|
|
|
doctorIds: [],
|
|
|
doctor: [],
|
|
|
recharge: {
|
|
|
open: false,
|
|
|
title: '后台充值'
|
|
|
},
|
|
|
+ redRecharge: {
|
|
|
+ open: false,
|
|
|
+ title: '红包充值'
|
|
|
+ },
|
|
|
+ showRedPacket: false,
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
// 导出遮罩层
|
|
|
@@ -616,6 +862,10 @@ export default {
|
|
|
rechargeForm: {
|
|
|
money: 0
|
|
|
},
|
|
|
+ // 红包充值表单参数
|
|
|
+ redRechargeForm: {
|
|
|
+ money: 0
|
|
|
+ },
|
|
|
followDoctorList: [],
|
|
|
cateList: [],
|
|
|
// 表单参数
|
|
|
@@ -687,18 +937,38 @@ export default {
|
|
|
{ required: true, message: '扣款金额不能为空', trigger: 'blur' }
|
|
|
]
|
|
|
},
|
|
|
+ // 表单校验
|
|
|
+ redDeductRules: {
|
|
|
+ money: [
|
|
|
+ { required: true, message: '扣款金额不能为空', trigger: 'blur' }
|
|
|
+ ]
|
|
|
+ },
|
|
|
rechargeRules: {
|
|
|
money: [
|
|
|
{ required: true, message: '扣款金额不能为空', trigger: 'blur' }
|
|
|
]
|
|
|
},
|
|
|
+ redRechargeRules: {
|
|
|
+ money: [
|
|
|
+ { required: true, message: '扣款金额不能为空', trigger: 'blur' }
|
|
|
+ ]
|
|
|
+ },
|
|
|
deduct: {
|
|
|
open: false,
|
|
|
title: '后台扣款'
|
|
|
},
|
|
|
+ redDeduct: {
|
|
|
+ open: false,
|
|
|
+ title: '红包扣款'
|
|
|
+ },
|
|
|
maAppList: [],
|
|
|
miniAppList: [],
|
|
|
- customAppList: []
|
|
|
+ customAppList: [],
|
|
|
+ //分账参数
|
|
|
+ miniProgram:{
|
|
|
+ open: false,
|
|
|
+ title: '批量修改小程序'
|
|
|
+ },
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
@@ -722,18 +992,65 @@ export default {
|
|
|
listDept().then(response => {
|
|
|
this.deptOptions = response.data
|
|
|
})
|
|
|
- // getConfigByKey("courseMa.config").then(response => {
|
|
|
- // if(response.data && response.data.configValue) {
|
|
|
- // this.miniAppList = JSON.parse(response.data.configValue);
|
|
|
- // } else {
|
|
|
- // this.miniAppList = [];
|
|
|
- // }
|
|
|
- // });
|
|
|
+ getConfigByKey("course.config").then(response => {
|
|
|
+ if(response.data && response.data.configValue) {
|
|
|
+ const config = JSON.parse(response.data.configValue);
|
|
|
+ if( config.isRedPackageBalanceDeduction && config.isRedPackageBalanceDeduction==1){
|
|
|
+ this.showRedPacket=true
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.showRedPacket = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
docList().then(response => {
|
|
|
this.doctor = response.rows
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 添加分账账户
|
|
|
+ addAcctInfo() {
|
|
|
+ console.log("-----------------",this.revenueForm)
|
|
|
+ this.revenueForm.acctInfos.push({
|
|
|
+ huifuId: '',
|
|
|
+ acctId: '',
|
|
|
+ percentageDiv: null,
|
|
|
+ divAmt: null
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 删除接收方账户
|
|
|
+ removeAcctInfo(index) {
|
|
|
+ this.$confirm('确认删除该接收方账户?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.revenueForm.acctInfos.splice(index, 1)
|
|
|
+ this.$message.success('删除成功')
|
|
|
+ }).catch(() => {
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleRevenue(row){
|
|
|
+ const companyId = row.companyId
|
|
|
+ //查询配置
|
|
|
+ this.revenueForm.isAdd = 1
|
|
|
+ getDivConfig(companyId).then(response => {
|
|
|
+ if(response.data){
|
|
|
+ this.revenueForm = response.data
|
|
|
+ if(response.data.acctInfos == null){
|
|
|
+ this.revenueForm.acctInfos = []
|
|
|
+ }
|
|
|
+ if(response.data.divFlag){
|
|
|
+ this.revenueForm.divFlag = String(response.data.divFlag)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.revenueForm.companyId = companyId
|
|
|
+ this.revenueForm.companyName = row.companyName
|
|
|
+ if(row.divFlag){
|
|
|
+ this.revenueForm.divFlag == "0"
|
|
|
+ }
|
|
|
+ this.revenue.open = true
|
|
|
+ },
|
|
|
|
|
|
/** 店铺选择变化 */
|
|
|
handleShopChange(shopId) {
|
|
|
@@ -801,6 +1118,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.redPackageMoney
|
|
|
+ this.redRechargeForm.money = null
|
|
|
+ this.redRecharge.open = true
|
|
|
+ },
|
|
|
handleDeduct(row) {
|
|
|
const companyId = row.companyId
|
|
|
this.deductForm.companyId = row.companyId
|
|
|
@@ -809,6 +1135,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.redPackageMoney
|
|
|
+ this.redDeductForm.money = null
|
|
|
+ this.redDeduct.open = true
|
|
|
+ },
|
|
|
/** 提交按钮 */
|
|
|
submitRechargeForm() {
|
|
|
this.$refs['rechargeForm'].validate(valid => {
|
|
|
@@ -823,6 +1156,35 @@ 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)
|
|
|
+ if(param.companyId && param.divFlag){
|
|
|
+ setDiv(param).then(response => {
|
|
|
+ if (response.code === 200) {
|
|
|
+ this.msgSuccess(response.msg)
|
|
|
+ this.revenue.open = false
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ console.log("--------------",param)
|
|
|
+ }
|
|
|
+ },
|
|
|
/** 提交按钮 */
|
|
|
submitDeductForm() {
|
|
|
this.$refs['deductForm'].validate(valid => {
|
|
|
@@ -837,6 +1199,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
|
|
|
@@ -870,6 +1246,7 @@ export default {
|
|
|
groupName: null,
|
|
|
userId: null,
|
|
|
remark: null,
|
|
|
+ isOpenRestReminder: null,
|
|
|
linkName: null,
|
|
|
limitUserCount: null,
|
|
|
maxPadNum: -1,
|