bug
This commit is contained in:
parent
8c86c0a780
commit
fac80c5b77
@ -159,8 +159,9 @@
|
||||
<el-tab-pane label="机构信息" name="info">
|
||||
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
|
||||
<el-form-item label="父级节点" prop="name">
|
||||
<el-cascader :disabled="isTopDept" :options="Thetree" v-model="cascader" :props="defaultProps" @change="handleChanges" :placeholder="parentName" ></el-cascader>
|
||||
<el-form-item label="父级节点" prop="name" v-if="ruleForm.parentId != 0">
|
||||
<el-cascader :disabled="isTopDept" :options="Thetree" disabled style="width: 300px"
|
||||
v-model="cascader" :props="defaultProps" @change="handleChanges" :placeholder="parentName" ></el-cascader>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="上级部门" prop="parentId">-->
|
||||
@ -176,13 +177,25 @@
|
||||
<el-input :disabled="isTopDept" v-model="ruleForm.leaderPhone"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型" prop="deptType">
|
||||
<el-radio-group :disabled="isTopDept" v-model="ruleForm.deptType">
|
||||
<el-radio
|
||||
v-for="dict in judgementNodeType(dict.type.node_type)"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
<span v-if="isTopDept">
|
||||
<el-radio-group :disabled="isTopDept" v-model="ruleForm.deptType">
|
||||
<el-radio
|
||||
v-for="dict in judgementNodeType(dict.type.node_type)"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
v-if="dict.value==ruleForm.deptType"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</span>
|
||||
<span v-else>
|
||||
<el-radio-group :disabled="isTopDept" v-model="ruleForm.deptType">
|
||||
<el-radio
|
||||
v-for="dict in judgementNodeType(dict.type.node_type)"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</span>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
@ -190,15 +203,25 @@
|
||||
<template v-if="ruleForm.deptType !== '3'">
|
||||
<el-row >
|
||||
<el-col :span="20">
|
||||
<el-form-item label="额度设置方式" prop="">
|
||||
<el-radio-group :disabled="isTopDept" v-model="ruleForm.turnoverType" @input="changeTheBillingRule">
|
||||
<el-radio label=1>无限制</el-radio>
|
||||
<el-radio label=2>时间限制</el-radio>
|
||||
<el-radio label=3>预付费</el-radio>
|
||||
<el-radio label=4>后付费</el-radio>
|
||||
<el-radio label=5>年付费</el-radio>
|
||||
<!-- <el-radio label=6>可创建油站站点数量</el-radio>-->
|
||||
</el-radio-group>
|
||||
<el-form-item label="计费方式" prop="">
|
||||
<span v-if="isTopDept">
|
||||
<el-radio-group :disabled="isTopDept" v-model="ruleForm.turnoverType" @input="changeTheBillingRule">
|
||||
<el-radio v-if="ruleForm.turnoverType=='1'" label=1>无限制</el-radio>
|
||||
<el-radio v-if="ruleForm.turnoverType=='2'" label=2>时间限制</el-radio>
|
||||
<el-radio v-if="ruleForm.turnoverType=='3'" label=3>预付费</el-radio>
|
||||
<el-radio v-if="ruleForm.turnoverType=='4'" label=4>后付费</el-radio>
|
||||
<el-radio v-if="ruleForm.turnoverType=='5'" label=5>年付费</el-radio>
|
||||
</el-radio-group>
|
||||
</span>
|
||||
<span v-else>
|
||||
<el-radio-group :disabled="isTopDept" v-model="ruleForm.turnoverType" @input="changeTheBillingRule">
|
||||
<el-radio label=1>无限制</el-radio>
|
||||
<el-radio label=2>时间限制</el-radio>
|
||||
<el-radio label=3>预付费</el-radio>
|
||||
<el-radio label=4>后付费</el-radio>
|
||||
<el-radio label=5>年付费</el-radio>
|
||||
</el-radio-group>
|
||||
</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@ -223,6 +246,7 @@
|
||||
:disabled="isTopDept"
|
||||
style="width: 140px"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="开始日期">
|
||||
</el-date-picker>
|
||||
至
|
||||
@ -231,6 +255,7 @@
|
||||
:disabled="isTopDept"
|
||||
style="width: 140px"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
@ -242,9 +267,9 @@
|
||||
<template v-if="ruleForm.turnoverType === '3'">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="预付金额">
|
||||
<el-input-number :disabled="isTopDept" v-model="ruleForm.prepaidAmount" @input="rateCalculation()">
|
||||
<el-input type="number" :disabled="isTopDept" v-model="ruleForm.prepaidAmount" @input="rateCalculation()">
|
||||
<template slot="append">元</template>
|
||||
</el-input-number>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@ -270,8 +295,8 @@
|
||||
|
||||
<template v-if="ruleForm.turnoverType === '4'">
|
||||
<el-col :span="6">
|
||||
<el-form-item :disabled="isTopDept" label="费率">
|
||||
<el-input v-model="ruleForm.rates" @input="rateCalculation()">
|
||||
<el-form-item label="费率">
|
||||
<el-input :disabled="isTopDept" v-model="ruleForm.rates" @input="rateCalculation()">
|
||||
<template slot="append">%</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@ -311,16 +336,20 @@
|
||||
<!-- end-placeholder="结束日期">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<el-date-picker
|
||||
:disabled="isTopDept"
|
||||
v-model="beginTime"
|
||||
style="width: 140px"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="开始日期">
|
||||
</el-date-picker>
|
||||
至
|
||||
<el-date-picker
|
||||
:disabled="isTopDept"
|
||||
v-model="endTime"
|
||||
style="width: 140px"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
@ -329,7 +358,9 @@
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="价格">
|
||||
<el-input :disabled="isTopDept" v-model="ruleForm.prepaidAmount"></el-input>
|
||||
<el-input :disabled="isTopDept" v-model="ruleForm.prepaidAmount">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
@ -340,8 +371,12 @@
|
||||
<el-col :span="10">
|
||||
|
||||
<el-form-item label="可创建油站数量" label-width="110px">
|
||||
<el-input-number :disabled="isTopDept" v-model="ruleForm.storeNum" @change="handleChangeInputNumber" :min="1"
|
||||
:max="1000" label="可创建油站数量"></el-input-number>
|
||||
<!-- <el-input-number :disabled="isTopDept" v-model="ruleForm.storeNum" @change="handleChangeInputNumber" :min="1"-->
|
||||
<!-- :max="1000" label="可创建油站数量"></el-input-number>-->
|
||||
<el-input type="number" :disabled="isTopDept" v-model="ruleForm.storeNum":min="1" style="width: 200px"
|
||||
:max="1000">
|
||||
<template slot="append">个</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="已建油站数量" label-width="110px">
|
||||
<span>{{ruleForm.storeNums || 0}}</span>
|
||||
@ -356,6 +391,7 @@
|
||||
<el-col span="3">
|
||||
<el-form-item label="设置油站数量">
|
||||
<el-switch
|
||||
:disabled="isTopDept"
|
||||
v-model="storeNum"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
@ -369,8 +405,12 @@
|
||||
<el-col :span="10">
|
||||
|
||||
<el-form-item label="可创建油站数量" label-width="110px">
|
||||
<el-input-number :disabled="isTopDept" v-model="ruleForm.storeNum" @change="handleChangeInputNumber" :min="1"
|
||||
:max="1000" label="可创建油站数量"></el-input-number>
|
||||
<!-- <el-input-number :disabled="isTopDept" v-model="ruleForm.storeNum" @change="handleChangeInputNumber" :min="1"-->
|
||||
<!-- :max="1000" label="可创建油站数量"></el-input-number>-->
|
||||
<el-input type="number" :disabled="isTopDept" v-model="ruleForm.storeNum":min="1" style="width: 200px"
|
||||
:max="1000">
|
||||
<template slot="append">个</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="已建油站数量" label-width="110px">
|
||||
@ -795,7 +835,11 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.rateClearing()
|
||||
if (this.ruleForm.turnoverType=='1'||this.ruleForm.turnoverType=='3'||this.ruleForm.turnoverType=='4'){
|
||||
this.beginTime = ""
|
||||
this.endTime = ""
|
||||
}
|
||||
// this.rateClearing()
|
||||
}).catch(() => {
|
||||
console.log("event",event)
|
||||
this.ruleForm.turnoverType = this.oldValue
|
||||
@ -968,6 +1012,7 @@ export default {
|
||||
// }
|
||||
this.ruleForm.turnoverStartTime = this.beginTime
|
||||
this.ruleForm.turnoverEndTime = this.endTime
|
||||
|
||||
deptedit(this.ruleForm).then(res=>{
|
||||
// console.log(res)
|
||||
if(res.code == 200){
|
||||
@ -1085,13 +1130,17 @@ export default {
|
||||
|
||||
if (this.ruleForm.turnoverStartTime) {
|
||||
const date = new Date(this.ruleForm.turnoverStartTime);
|
||||
this.timeFrame[0] = date.toString();
|
||||
this.beginTime = date.toString();
|
||||
// this.timeFrame[0] = date.toString();
|
||||
// this.beginTime = date.toString();
|
||||
this.timeFrame[0] = date;
|
||||
this.beginTime = date;
|
||||
}
|
||||
if (this.ruleForm.turnoverEndTime) {
|
||||
const date = new Date(this.ruleForm.turnoverEndTime);
|
||||
this.timeFrame[1] = date.toString();
|
||||
this.endTime = date.toString();
|
||||
// this.timeFrame[1] = date.toString();
|
||||
// this.endTime = date.toString();
|
||||
this.timeFrame[1] = date;
|
||||
this.endTime = date;
|
||||
}
|
||||
if (this.ruleForm.storeNum) {
|
||||
this.storeNum = true
|
||||
@ -1437,6 +1486,7 @@ export default {
|
||||
submitForm: function () {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
// this.form.merchantId =
|
||||
// this.form.roleIds = [this.form.roleIds]
|
||||
// if (this.form.userId !== undefined) {
|
||||
if (this.form.acctId) {
|
||||
|
@ -15,5 +15,12 @@ public interface ChainStoreInfoService extends IService<ChainStoreInfo> {
|
||||
IPage<ChainStoreInfo> listVo(Page page, ChainStoreInfo chainStoreInfo);
|
||||
|
||||
boolean theJudgmentIsTheSame(Integer chainStoreId);
|
||||
|
||||
/**
|
||||
* 根据部门id查询连锁店信息
|
||||
* @param contractDeptId
|
||||
* @return
|
||||
*/
|
||||
ChainStoreInfo selectChainStoreByDeptId(Long contractDeptId);
|
||||
}
|
||||
|
||||
|
@ -100,5 +100,12 @@ public class ChainStoreInfoServiceImpl extends ServiceImpl<ChainStoreInfoMapper,
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChainStoreInfo selectChainStoreByDeptId(Long contractDeptId) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("contract_dept_id",contractDeptId);
|
||||
return baseMapper.selectOne(queryWrapper);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,8 +9,10 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.member.entity.LJStaff;
|
||||
import com.fuint.business.member.mapper.LJStaffMapper;
|
||||
import com.fuint.business.member.service.ILJStaffService;
|
||||
import com.fuint.business.store.entity.ChainStoreInfo;
|
||||
import com.fuint.business.store.entity.MtStore;
|
||||
import com.fuint.business.store.mapper.MtStoreMapper;
|
||||
import com.fuint.business.store.service.ChainStoreInfoService;
|
||||
import com.fuint.common.dto.AccountDto;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.service.AccountService;
|
||||
@ -80,6 +82,11 @@ public class AccountServiceImpl extends ServiceImpl<TAccountMapper, TAccount> im
|
||||
*/
|
||||
@Resource
|
||||
LJStaffMapper ljStaffMapper;
|
||||
/**
|
||||
* 员工接口
|
||||
*/
|
||||
@Resource
|
||||
ChainStoreInfoService chainStoreInfoService;
|
||||
/**
|
||||
* 员工接口
|
||||
*/
|
||||
@ -227,6 +234,10 @@ public class AccountServiceImpl extends ServiceImpl<TAccountMapper, TAccount> im
|
||||
String staffId = param.get("staffId") == null ? "0" : param.get("staffId").toString();
|
||||
String deptId = param.get("deptId") == null ? "0" : param.get("deptId").toString();
|
||||
|
||||
ChainStoreInfo chainStoreInfo = chainStoreInfoService.selectChainStoreByDeptId(Long.valueOf(deptId));
|
||||
if (ObjectUtil.isNotEmpty(chainStoreInfo) && ObjectUtil.isNotEmpty(chainStoreInfo.getId()))
|
||||
merchantId = String.valueOf(chainStoreInfo.getId());
|
||||
|
||||
// 获取角色code
|
||||
String code = param.get("code") == null ? "0" : param.get("code").toString();
|
||||
// 所属的连锁店类型
|
||||
@ -361,6 +372,11 @@ public class AccountServiceImpl extends ServiceImpl<TAccountMapper, TAccount> im
|
||||
if (StringUtil.isNotEmpty(staffId)) {
|
||||
tAccount.setStaffId(Integer.parseInt(staffId));
|
||||
}
|
||||
|
||||
ChainStoreInfo chainStoreInfo = chainStoreInfoService.selectChainStoreByDeptId(tAccount.getDeptId());
|
||||
if (ObjectUtil.isNotEmpty(chainStoreInfo) && ObjectUtil.isNotEmpty(chainStoreInfo.getId()))
|
||||
merchantId = String.valueOf(chainStoreInfo.getId());
|
||||
|
||||
if (StringUtil.isNotEmpty(merchantId)) {
|
||||
tAccount.setMerchantId(Integer.parseInt(merchantId));
|
||||
}
|
||||
@ -383,6 +399,8 @@ public class AccountServiceImpl extends ServiceImpl<TAccountMapper, TAccount> im
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// List<TDuty> duties = null;
|
||||
// if (roleIds.size() > 0) {
|
||||
// Integer[] roles = roleIds.toArray(new Integer[roleIds.size()]);
|
||||
|
@ -2,6 +2,7 @@ package com.fuint.system.dept.controller;
|
||||
|
||||
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.fuint.business.storeInformation.entity.LJStore;
|
||||
import com.fuint.business.storeInformation.entity.QRCode;
|
||||
@ -68,6 +69,11 @@ public class SysDeptController extends BaseController
|
||||
List<SysDept> sysDepts = deptService.selectDeptLists(deptId);
|
||||
SysDept sysDept = deptService.selectDeptById(deptId);
|
||||
if (ObjectUtil.isNotEmpty(sysDept)) sysDept.setStoreNums(sysDepts.size());
|
||||
List<SysDept> sysDepts1 = deptService.selectDeptList(new SysDept());
|
||||
if (CollectionUtil.isNotEmpty(sysDepts) && CollectionUtil.isNotEmpty(sysDepts1)
|
||||
&& sysDepts1.get(0).getParentId()==100 && sysDepts1.get(0).getDeptType().equals("2")){
|
||||
sysDept.setParentId(Long.valueOf("0"));
|
||||
}
|
||||
return getSuccessResult(sysDept);
|
||||
}
|
||||
|
||||
|
@ -366,6 +366,10 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper,SysDept> imple
|
||||
store.setStatus(dept.getStatus());
|
||||
storeService.updateById(store);
|
||||
}
|
||||
if (ObjectUtil.isEmpty(dept.getTurnoverStartTime()))
|
||||
this.lambdaUpdate().eq(SysDept::getDeptId,dept.getDeptId()).set(SysDept::getTurnoverStartTime,null).update();
|
||||
if (ObjectUtil.isEmpty(dept.getTurnoverEndTime()))
|
||||
this.lambdaUpdate().eq(SysDept::getDeptId,dept.getDeptId()).set(SysDept::getTurnoverEndTime,null).update();
|
||||
int result = baseMapper.updateById(dept);
|
||||
if (UserConstants.DEPT_DISABLE.equals(dept.getStatus()) && StringUtils.isNotEmpty(dept.getAncestors()))
|
||||
{
|
||||
|
@ -27,10 +27,18 @@ public class TDutySource implements Serializable {
|
||||
|
||||
@TableId(value = "duty_source_id", type = IdType.AUTO)
|
||||
private Integer dutySourceId;
|
||||
|
||||
/**
|
||||
* 角色id
|
||||
*/
|
||||
private Integer dutyId;
|
||||
|
||||
/**
|
||||
* 菜单id
|
||||
*/
|
||||
private Integer sourceId;
|
||||
/**
|
||||
* 连锁店id
|
||||
*/
|
||||
private Integer chainStoreId;
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user