|
@@ -118,9 +118,9 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="管理员账号" align="center" prop="userName"/>
|
|
<el-table-column label="管理员账号" align="center" prop="userName"/>
|
|
|
<el-table-column label="限制用户数量" align="center" prop="limitUserCount"/>
|
|
<el-table-column label="限制用户数量" align="center" prop="limitUserCount"/>
|
|
|
- <el-table-column label="限制pad数量" align="center" prop="maxPadNum" :formatter="padNumFormatter" v-if="this.$store.state.user.medicalMallConfig.resource"/>
|
|
|
|
|
- <el-table-column label="占用pad数量" align="center" prop="usedNum" v-if="this.$store.state.user.medicalMallConfig.resource"/>
|
|
|
|
|
- <el-table-column label="所属部门" align="center" prop="deptId" v-if="this.$store.state.user.medicalMallConfig.resource">
|
|
|
|
|
|
|
+ <el-table-column label="限制pad数量" align="center" prop="maxPadNum" :formatter="padNumFormatter" v-if="this.$store.state.user.medicalMallConfig && this.$store.state.user.medicalMallConfig.resource"/>
|
|
|
|
|
+ <el-table-column label="占用pad数量" align="center" prop="usedNum" v-if="this.$store.state.user.medicalMallConfig && this.$store.state.user.medicalMallConfig.resource"/>
|
|
|
|
|
+ <el-table-column label="所属部门" align="center" prop="deptId" v-if="this.$store.state.user.medicalMallConfig && this.$store.state.user.medicalMallConfig.resource">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<el-tag prop="deptId" v-for="(item, index) in deptOptions" :key="'deptId'+index"
|
|
<el-tag prop="deptId" v-for="(item, index) in deptOptions" :key="'deptId'+index"
|
|
|
v-if="scope.row.deptId===item.deptId"
|
|
v-if="scope.row.deptId===item.deptId"
|
|
@@ -218,7 +218,7 @@
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<!-- 所属部门 -->
|
|
<!-- 所属部门 -->
|
|
|
- <el-form-item label="所属部门" prop="deptId" v-if="this.$store.state.user.medicalMallConfig.resource">
|
|
|
|
|
|
|
+ <el-form-item label="所属部门" prop="deptId" v-if="this.$store.state.user.medicalMallConfig && this.$store.state.user.medicalMallConfig.resource">
|
|
|
<el-select
|
|
<el-select
|
|
|
v-model="form.deptId"
|
|
v-model="form.deptId"
|
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
@@ -245,7 +245,7 @@
|
|
|
<el-form-item label="员工数量" prop="limitUserCount">
|
|
<el-form-item label="员工数量" prop="limitUserCount">
|
|
|
<el-input-number v-model="form.limitUserCount" :min="1" :max="10000"></el-input-number>
|
|
<el-input-number v-model="form.limitUserCount" :min="1" :max="10000"></el-input-number>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="pad数量" prop="maxPadNum" v-if="this.$store.state.user.medicalMallConfig.resource">
|
|
|
|
|
|
|
+ <el-form-item label="pad数量" prop="maxPadNum" v-if="this.$store.state.user.medicalMallConfig && this.$store.state.user.medicalMallConfig.resource">
|
|
|
<el-input-number v-model="form.maxPadNum" :min="-1" :max="10000"></el-input-number>
|
|
<el-input-number v-model="form.maxPadNum" :min="-1" :max="10000"></el-input-number>
|
|
|
<span class="pad-tips">
|
|
<span class="pad-tips">
|
|
|
注:-1表示不做限制
|
|
注:-1表示不做限制
|
|
@@ -608,7 +608,14 @@ export default {
|
|
|
title: '分账配置'
|
|
title: '分账配置'
|
|
|
},
|
|
},
|
|
|
revenueForm:{
|
|
revenueForm:{
|
|
|
- acctInfos: []
|
|
|
|
|
|
|
+ companyId: null,
|
|
|
|
|
+ companyName: '',
|
|
|
|
|
+ divFlag: '0',
|
|
|
|
|
+ delayAcctFlag: 'N',
|
|
|
|
|
+ percentageFlag: 'N',
|
|
|
|
|
+ iscCleanSplit: 'N',
|
|
|
|
|
+ acctInfos: [],
|
|
|
|
|
+ isAdd: 1
|
|
|
},
|
|
},
|
|
|
// 表单参数
|
|
// 表单参数
|
|
|
deductForm: {
|
|
deductForm: {
|
|
@@ -781,7 +788,6 @@ export default {
|
|
|
methods: {
|
|
methods: {
|
|
|
// 添加分账账户
|
|
// 添加分账账户
|
|
|
addAcctInfo() {
|
|
addAcctInfo() {
|
|
|
- console.log("-----------------",this.revenueForm)
|
|
|
|
|
this.revenueForm.acctInfos.push({
|
|
this.revenueForm.acctInfos.push({
|
|
|
huifuId: '',
|
|
huifuId: '',
|
|
|
acctId: '',
|
|
acctId: '',
|
|
@@ -803,24 +809,45 @@ export default {
|
|
|
},
|
|
},
|
|
|
handleRevenue(row){
|
|
handleRevenue(row){
|
|
|
const companyId = row.companyId
|
|
const companyId = row.companyId
|
|
|
|
|
+ // 重置表单数据,避免保留上次的数据
|
|
|
|
|
+ this.revenueForm = {
|
|
|
|
|
+ companyId: companyId,
|
|
|
|
|
+ companyName: row.companyName,
|
|
|
|
|
+ divFlag: '0',
|
|
|
|
|
+ delayAcctFlag: 'N',
|
|
|
|
|
+ percentageFlag: 'N',
|
|
|
|
|
+ iscCleanSplit: 'N',
|
|
|
|
|
+ acctInfos: [],
|
|
|
|
|
+ isAdd: 1
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
//查询配置
|
|
//查询配置
|
|
|
- this.revenueForm.isAdd = 1
|
|
|
|
|
getDivConfig(companyId).then(response => {
|
|
getDivConfig(companyId).then(response => {
|
|
|
if(response.data){
|
|
if(response.data){
|
|
|
- this.revenueForm = response.data
|
|
|
|
|
|
|
+ this.revenueForm = {
|
|
|
|
|
+ ...response.data,
|
|
|
|
|
+ companyId: companyId,
|
|
|
|
|
+ companyName: row.companyName,
|
|
|
|
|
+ isAdd: 1
|
|
|
|
|
+ }
|
|
|
if(response.data.acctInfos == null){
|
|
if(response.data.acctInfos == null){
|
|
|
this.revenueForm.acctInfos = []
|
|
this.revenueForm.acctInfos = []
|
|
|
}
|
|
}
|
|
|
- if(response.data.divFlag){
|
|
|
|
|
|
|
+ if(response.data.divFlag != null){
|
|
|
this.revenueForm.divFlag = String(response.data.divFlag)
|
|
this.revenueForm.divFlag = String(response.data.divFlag)
|
|
|
}
|
|
}
|
|
|
|
|
+ if(!response.data.delayAcctFlag){
|
|
|
|
|
+ this.revenueForm.delayAcctFlag = 'N'
|
|
|
|
|
+ }
|
|
|
|
|
+ if(!response.data.percentageFlag){
|
|
|
|
|
+ this.revenueForm.percentageFlag = 'N'
|
|
|
|
|
+ }
|
|
|
|
|
+ if(!response.data.iscCleanSplit){
|
|
|
|
|
+ this.revenueForm.iscCleanSplit = 'N'
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
- this.revenueForm.companyId = companyId
|
|
|
|
|
- this.revenueForm.companyName = row.companyName
|
|
|
|
|
- if(row.divFlag){
|
|
|
|
|
- this.revenueForm.divFlag == "0"
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
this.revenue.open = true
|
|
this.revenue.open = true
|
|
|
},
|
|
},
|
|
|
handleRecharge(row) {
|
|
handleRecharge(row) {
|
|
@@ -854,9 +881,10 @@ export default {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
submitRevenueForm(){
|
|
submitRevenueForm(){
|
|
|
- var param = this.revenueForm;
|
|
|
|
|
- console.log("--------------",param)
|
|
|
|
|
- if(param.companyId && param.divFlag){
|
|
|
|
|
|
|
+ // 使用深拷贝,避免影响其他数据
|
|
|
|
|
+ var param = JSON.parse(JSON.stringify(this.revenueForm));
|
|
|
|
|
+ console.log("--------------提交的分账配置参数",param)
|
|
|
|
|
+ if(param.companyId && param.divFlag != null){
|
|
|
setDiv(param).then(response => {
|
|
setDiv(param).then(response => {
|
|
|
if (response.code === 200) {
|
|
if (response.code === 200) {
|
|
|
this.msgSuccess(response.msg)
|
|
this.msgSuccess(response.msg)
|
|
@@ -864,7 +892,8 @@ export default {
|
|
|
this.getList()
|
|
this.getList()
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
- console.log("--------------",param)
|
|
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message.error('请填写完整的分账配置信息')
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|