bug
This commit is contained in:
parent
7ca8ad05c5
commit
13211d382d
@ -181,7 +181,7 @@
|
||||
:label="dict.name"
|
||||
:value="dict.id">
|
||||
</el-option>
|
||||
<!-- <el-option :value="form.giftId" label="已售罄" v-if="!goodsList.includes(form.giftId)">已售罄</el-option>-->
|
||||
<!-- <el-option v-if="!goodsList.includes(form.giftId)" :value="form.giftId" label="已售罄">已售罄</el-option>-->
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品数量" prop="productCount" v-if="form.type==0">
|
||||
|
@ -91,6 +91,7 @@
|
||||
|
||||
<el-table-column label="用户名" align="center" key="accountName" prop="accountName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="真实姓名" align="center" key="realName" prop="realName" />
|
||||
<el-table-column label="用户角色" align="center" key="roleName" prop="roleName" />
|
||||
|
||||
<el-table-column label="所属机构" align="center" prop="storeName" width="160">
|
||||
<template slot-scope="scope">
|
||||
@ -205,17 +206,36 @@
|
||||
<el-row>
|
||||
|
||||
<template v-if="ruleForm.turnoverType === '2'">
|
||||
<el-form-item label="时间限制" prop="turnoverType" style="width:220px">
|
||||
<el-col :span="12">
|
||||
<el-row>
|
||||
<el-form-item label="时间限制" prop="turnoverType" >
|
||||
<!-- <el-date-picker-->
|
||||
<!-- :disabled="isTopDept"-->
|
||||
<!-- v-model="timeFrame"-->
|
||||
<!-- type="daterange"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- range-separator="至"-->
|
||||
<!-- start-placeholder="开始日期"-->
|
||||
<!-- end-placeholder="结束日期">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<el-date-picker
|
||||
v-model="beginTime"
|
||||
:disabled="isTopDept"
|
||||
v-model="timeFrame"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
style="width: 140px"
|
||||
type="date"
|
||||
placeholder="开始日期">
|
||||
</el-date-picker>
|
||||
至
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
:disabled="isTopDept"
|
||||
style="width: 140px"
|
||||
type="date"
|
||||
placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</template>
|
||||
|
||||
|
||||
@ -279,17 +299,32 @@
|
||||
|
||||
<template v-if="ruleForm.turnoverType === '5'">
|
||||
<el-col :span="10">
|
||||
<el-row>
|
||||
<el-form-item label="时间范围">
|
||||
<!-- <el-date-picker-->
|
||||
<!-- :disabled="isTopDept"-->
|
||||
<!-- v-model="timeFrame"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- type="daterange"-->
|
||||
<!-- range-separator="至"-->
|
||||
<!-- start-placeholder="开始日期"-->
|
||||
<!-- end-placeholder="结束日期">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<el-date-picker
|
||||
:disabled="isTopDept"
|
||||
v-model="timeFrame"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
v-model="beginTime"
|
||||
style="width: 140px"
|
||||
type="date"
|
||||
placeholder="开始日期">
|
||||
</el-date-picker>
|
||||
至
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
style="width: 140px"
|
||||
type="date"
|
||||
placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
@ -308,6 +343,9 @@
|
||||
<el-input-number :disabled="isTopDept" v-model="ruleForm.storeNum" @change="handleChangeInputNumber" :min="1"
|
||||
:max="1000" label="可创建油站数量"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="已建油站数量" label-width="110px">
|
||||
<span>{{ruleForm.storeNums || 0}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-row>
|
||||
@ -334,6 +372,10 @@
|
||||
<el-input-number :disabled="isTopDept" v-model="ruleForm.storeNum" @change="handleChangeInputNumber" :min="1"
|
||||
:max="1000" label="可创建油站数量"></el-input-number>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="已建油站数量" label-width="110px">
|
||||
<span>{{ruleForm.storeNums || 0}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-col>
|
||||
@ -533,6 +575,8 @@ export default {
|
||||
cascader:[],
|
||||
storeOptions:[],
|
||||
merchantOptions:[],
|
||||
beginTime:"",
|
||||
endTime:"",
|
||||
deleteid:0,
|
||||
pdinfo: 1 ,
|
||||
activeName: 'list',
|
||||
@ -763,6 +807,8 @@ export default {
|
||||
// 清空数据
|
||||
rateClearing () {
|
||||
this.timeFrame =[]
|
||||
this.beginTime = ""
|
||||
this.endTime = ""
|
||||
this.ruleForm.turnoverLimit = 0
|
||||
this.ruleForm.turnoverTime = ''
|
||||
this.ruleForm.turnoverStartTime = null
|
||||
@ -879,14 +925,16 @@ export default {
|
||||
//新增节点
|
||||
submitForms(formName) {
|
||||
console.log("timeFrame ",this.timeFrame)
|
||||
console.log("this.ruleForm ",this.ruleForm)
|
||||
console.log("this.ruleForm ",this.ruleForm,this.ruleForm.parentId)
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
console.log("timeFrame",this.timeFrame)
|
||||
if (this.timeFrame){
|
||||
this.ruleForm.turnoverStartTime = this.timeFrame[0]
|
||||
this.ruleForm.turnoverEndTime = this.timeFrame[1]
|
||||
// this.ruleForm.turnoverStartTime = this.timeFrame[0]
|
||||
// this.ruleForm.turnoverEndTime = this.timeFrame[1]
|
||||
}
|
||||
this.ruleForm.turnoverStartTime = this.beginTime
|
||||
this.ruleForm.turnoverEndTime = this.endTime
|
||||
if (!this.storeNum) {
|
||||
this.ruleForm.storeNum = null
|
||||
}
|
||||
@ -914,10 +962,12 @@ export default {
|
||||
if (!this.storeNum) {
|
||||
this.ruleForm.storeNum = null
|
||||
}
|
||||
if (this.timeFrame){
|
||||
this.ruleForm.turnoverStartTime = this.timeFrame[0]
|
||||
this.ruleForm.turnoverEndTime = this.timeFrame[1]
|
||||
}
|
||||
// if (this.timeFrame){
|
||||
// this.ruleForm.turnoverStartTime = this.timeFrame[0]
|
||||
// this.ruleForm.turnoverEndTime = this.timeFrame[1]
|
||||
// }
|
||||
this.ruleForm.turnoverStartTime = this.beginTime
|
||||
this.ruleForm.turnoverEndTime = this.endTime
|
||||
deptedit(this.ruleForm).then(res=>{
|
||||
// console.log(res)
|
||||
if(res.code == 200){
|
||||
@ -952,6 +1002,8 @@ export default {
|
||||
this.activeName = 'info'
|
||||
this.pdinfo = 1
|
||||
this.timeFrame = []
|
||||
this.beginTime = ""
|
||||
this.endTime = ""
|
||||
|
||||
this.addNode(data.id,data.label)
|
||||
// console.log(this.pdinfo)
|
||||
@ -974,7 +1026,7 @@ export default {
|
||||
}
|
||||
},
|
||||
// 新增数据
|
||||
async addNode(id,label) {
|
||||
addNode(id,label) {
|
||||
let _this = this
|
||||
// 默认类型
|
||||
this.isClick = false
|
||||
@ -985,22 +1037,33 @@ export default {
|
||||
|
||||
// _this.ruleForm.deptType = '1'
|
||||
// 点击树获取部门信息
|
||||
await Userlist(id).then(res=>{
|
||||
console.log("新增树的返回",res)
|
||||
this.cascader = []
|
||||
this.deptType = res.data.deptType
|
||||
if (res.data.deptType === "3") {
|
||||
this.parentName = res.data.parentName
|
||||
// this.cascader
|
||||
this.ruleForm.parentId = res.data.parentId
|
||||
} else {
|
||||
this.parentName = res.data.deptName
|
||||
this.ruleForm.parentId = res.data.deptId
|
||||
}
|
||||
let fanCascader = []
|
||||
|
||||
this.cascader.push(this.ruleForm.parentId)
|
||||
Userlist(id).then(async res=>{
|
||||
console.log(res ,263)
|
||||
this.deptType = res.data.deptType
|
||||
this.parentName = res.data.parentName
|
||||
// if (res.data.parentId==0){
|
||||
this.ruleForm.parentId = res.data.deptId
|
||||
// }else {
|
||||
// this.ruleForm.parentId = res.data.parentId
|
||||
// }
|
||||
|
||||
let pid = res.data.parentId
|
||||
fanCascader.push(res.data.deptId)
|
||||
while (pid!=0){
|
||||
await Userlist(pid).then(re=> {
|
||||
pid = re.data.parentId
|
||||
fanCascader.push(re.data.deptId)
|
||||
})
|
||||
}
|
||||
this.cascader = fanCascader.reverse()
|
||||
this.isTopDept = false
|
||||
console.log( this.ruleForm.parentId ,111)
|
||||
})
|
||||
|
||||
|
||||
|
||||
},
|
||||
//修改树
|
||||
@ -1023,10 +1086,12 @@ export default {
|
||||
if (this.ruleForm.turnoverStartTime) {
|
||||
const date = new Date(this.ruleForm.turnoverStartTime);
|
||||
this.timeFrame[0] = date.toString();
|
||||
this.beginTime = date.toString();
|
||||
}
|
||||
if (this.ruleForm.turnoverEndTime) {
|
||||
const date = new Date(this.ruleForm.turnoverEndTime);
|
||||
this.timeFrame[1] = date.toString();
|
||||
this.endTime = date.toString();
|
||||
}
|
||||
if (this.ruleForm.storeNum) {
|
||||
this.storeNum = true
|
||||
|
@ -134,14 +134,15 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-form-item label="套餐到期时间" prop="expirationTime" :label-width="formLabelWidth">
|
||||
<el-date-picker
|
||||
v-model="from.expirationTime"
|
||||
type="date"
|
||||
style="width:220px"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="套餐到期时间" :label-width="formLabelWidth">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- disabled-->
|
||||
<!-- v-model="from.expirationTime"-->
|
||||
<!-- type="date"-->
|
||||
<!-- style="width:220px"-->
|
||||
<!-- placeholder="选择日期">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -296,7 +297,7 @@
|
||||
uploadImages: [],
|
||||
dialogImageUrl: "",
|
||||
dialogVisible: false,
|
||||
hideUpload: false,
|
||||
// hideUpload: false,
|
||||
|
||||
from:{
|
||||
name: '',
|
||||
|
@ -27,6 +27,7 @@ import com.fuint.repository.model.MtMerchant;
|
||||
import com.fuint.repository.model.TAccount;
|
||||
import com.fuint.system.dept.entity.SysDept;
|
||||
import com.fuint.system.dept.mapper.SysDeptMapper;
|
||||
import com.fuint.system.dept.service.ISysDeptService;
|
||||
import com.fuint.system.role.entity.TDuty;
|
||||
import com.fuint.system.role.mapper.TDutyMapper;
|
||||
import com.fuint.utils.StringUtil;
|
||||
@ -63,6 +64,8 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
|
||||
|
||||
@Resource
|
||||
private MtMerchantMapper mtMerchantMapper;
|
||||
@Resource
|
||||
private ISysDeptService iSysDeptService;
|
||||
|
||||
/**
|
||||
* 商户接口
|
||||
@ -261,6 +264,15 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
|
||||
}
|
||||
|
||||
StoreDto mtStoreDto = new StoreDto();
|
||||
if (ObjectUtil.isNotEmpty(mtStore.getContractDeptId())){
|
||||
SysDept sysDept = iSysDeptService.selectDeptById(mtStore.getContractDeptId());
|
||||
if (ObjectUtil.isNotEmpty(sysDept)){
|
||||
SysDept sysDept1 = iSysDeptService.selectDeptById(sysDept.getParentId());
|
||||
if (ObjectUtil.isNotEmpty(sysDept1)){
|
||||
mtStore.setExpirationTime(sysDept1.getTurnoverEndTime());
|
||||
}
|
||||
}
|
||||
}
|
||||
BeanUtils.copyProperties(mtStore, mtStoreDto);
|
||||
|
||||
return mtStoreDto;
|
||||
|
@ -1,11 +1,15 @@
|
||||
package com.fuint.common.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 店铺实体
|
||||
* */
|
||||
@Data
|
||||
public class StoreDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -149,6 +153,8 @@ public class StoreDto implements Serializable {
|
||||
* 最后操作人
|
||||
*/
|
||||
private String operator;
|
||||
@TableField(exist = false)
|
||||
private Integer storeNums;
|
||||
|
||||
/**
|
||||
* 服务到期时间
|
||||
|
@ -65,7 +65,10 @@ public class SysDeptController extends BaseController
|
||||
@GetMapping(value = "/{deptId}")
|
||||
public ResponseObject getInfo(@PathVariable Long deptId)
|
||||
{
|
||||
return getSuccessResult(deptService.selectDeptById(deptId));
|
||||
List<SysDept> sysDepts = deptService.selectDeptLists(deptId);
|
||||
SysDept sysDept = deptService.selectDeptById(deptId);
|
||||
if (ObjectUtil.isNotEmpty(sysDept)) sysDept.setStoreNums(sysDepts.size());
|
||||
return getSuccessResult(sysDept);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
|
@ -70,13 +70,15 @@ public class SysDept extends BaseEntity
|
||||
private String turnoverType;
|
||||
private BigDecimal turnoverLimit;
|
||||
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date turnoverStartTime;
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date turnoverEndTime;
|
||||
private BigDecimal rates;
|
||||
@TableField(strategy = FieldStrategy.IGNORED)
|
||||
private Integer storeNum;
|
||||
private BigDecimal prepaidAmount;
|
||||
@TableField(exist = false)
|
||||
private Integer storeNums;
|
||||
|
||||
}
|
||||
|
@ -22,6 +22,8 @@ public interface ISysDeptService extends IService<SysDept>
|
||||
*/
|
||||
public List<SysDept> selectDeptList(SysDept dept);
|
||||
|
||||
List<SysDept> selectDeptLists(Long parentId);
|
||||
|
||||
/**
|
||||
* 查询部门树结构信息
|
||||
*
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.fuint.system.dept.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.aliyun.oss.ServiceException;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@ -25,6 +26,7 @@ import com.fuint.framework.exception.BusinessCheckException;
|
||||
import com.fuint.system.dept.entity.SysDept;
|
||||
import com.fuint.system.dept.mapper.SysDeptMapper;
|
||||
import com.fuint.system.dept.service.ISysDeptService;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -73,6 +75,14 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper,SysDept> imple
|
||||
return sysDepts;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysDept> selectDeptLists(Long parentId) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("parent_id",parentId);
|
||||
queryWrapper.eq("if_delete","0");
|
||||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询部门树结构信息
|
||||
*
|
||||
@ -234,6 +244,12 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper,SysDept> imple
|
||||
throw new ServiceException("部门停用,不允许新增");
|
||||
}
|
||||
dept.setAncestors(info.getAncestors() + "," + dept.getParentId());
|
||||
List<SysDept> sysDepts = this.selectDeptLists(dept.getParentId());
|
||||
if (ObjectUtils.isNotEmpty(info) && ObjectUtils.isNotEmpty(info.getStoreNum()) && CollectionUtil.isNotEmpty(sysDepts) && sysDepts.size()>=info.getStoreNum())
|
||||
{
|
||||
throw new Exception("已到达最大的油站数量,不可添加!");
|
||||
}
|
||||
|
||||
}
|
||||
int insert = baseMapper.insert(dept);
|
||||
//处理店铺
|
||||
|
@ -74,6 +74,8 @@ public class TAccount extends BaseEntity implements Serializable {
|
||||
@TableField(exist = false)
|
||||
private String deptName;
|
||||
@TableField(exist = false)
|
||||
private String roleName;
|
||||
@TableField(exist = false)
|
||||
private String deptType;
|
||||
// @TableField(exist = false)
|
||||
private String mobile;
|
||||
|
@ -26,11 +26,12 @@
|
||||
|
||||
<select id="listAccount" resultType="com.fuint.repository.model.TAccount">
|
||||
SELECT
|
||||
ta.*,sd.dept_name, ms.mobile,sd.dept_type deptType
|
||||
ta.*,sd.dept_name, ms.mobile,sd.dept_type deptType,td.duty_name roleName
|
||||
FROM
|
||||
`t_account` ta
|
||||
left join sys_dept sd on sd.dept_id = ta.dept_id
|
||||
left join mt_staff ms on ta.staff_id = ms.id
|
||||
left join t_duty td ON ta.role_ids = td.duty_id
|
||||
where account_status != -1
|
||||
|
||||
<if test="accountInfo.realName != null and accountInfo.realName != ''">
|
||||
|
Loading…
Reference in New Issue
Block a user