Commit d4720609 authored by liuChang's avatar liuChang

Merge branch 'dev20230707' of 192.168.60.201:root/dsk-operate-sys into dev20230707

parents 9d326ff3 af903d1b
...@@ -125,6 +125,8 @@ public class CustomerController extends BaseController { ...@@ -125,6 +125,8 @@ public class CustomerController extends BaseController {
} }
} }
/** /**
* 编辑客户 * 编辑客户
*/ */
...@@ -190,4 +192,32 @@ public class CustomerController extends BaseController { ...@@ -190,4 +192,32 @@ public class CustomerController extends BaseController {
success.put("successCount", successCount); success.put("successCount", successCount);
return success; return success;
} }
/**
* 客户状态
*/
@GetMapping("/status/{customerId}")
@RepeatSubmit
public AjaxResult status(@PathVariable String companyName) {
return AjaxResult.success(baseService.status(companyName));
}
/**
* 取消认领
*/
@PutMapping("/cancelClaim/{customerId}")
@RepeatSubmit
public AjaxResult cancelClaim(@PathVariable String customerId) {
return toAjax(baseService.cancelClaim(customerId));
}
/**
* 历史认领
*/
@PutMapping("/historyClaim/{customerId}")
@RepeatSubmit
public AjaxResult historyClaim(@PathVariable String customerId) {
return toAjax(baseService.historyClaim(customerId));
}
} }
...@@ -576,6 +576,9 @@ ...@@ -576,6 +576,9 @@
padding: 16px; padding: 16px;
border-radius: 6px; border-radius: 6px;
border: 1px solid #68AEFF; border: 1px solid #68AEFF;
&.w836{
width: 836px;
}
.wri_top{ .wri_top{
>img{ >img{
float: left; float: left;
...@@ -662,6 +665,11 @@ ...@@ -662,6 +665,11 @@
width: 128px; width: 128px;
} }
} }
.w120{
.el-input__inner{
width: 120px;
}
}
} }
} }
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<img src="@/assets/images/project/add_3.png"> <img src="@/assets/images/project/add_3.png">
<div>新建一条跟进记录,如:周五上午预约客户上门拜访</div> <div>新建一条跟进记录,如:周五上午预约客户上门拜访</div>
</div> </div>
<div class="writting" v-if="isEdit == true"> <div class="writting" v-if="isEdit == true" :class="{'w836':showtype!='gjjl'}">
<div class="wri_top"> <div class="wri_top">
<img src="@/assets/images/project/add_3.png"> <img src="@/assets/images/project/add_3.png">
<el-input v-model="addParam.content" placeholder="新建一条跟进记录,如:周五上午预约客户上门拜访"></el-input> <el-input v-model="addParam.content" placeholder="新建一条跟进记录,如:周五上午预约客户上门拜访"></el-input>
...@@ -43,6 +43,13 @@ ...@@ -43,6 +43,13 @@
<el-input v-model="addParam.position" placeholder="客户职位" style="width: 100px;"> <el-input v-model="addParam.position" placeholder="客户职位" style="width: 100px;">
</el-input> </el-input>
</div> </div>
<div class="sels times" style="width: 132px"><img src="@/assets/images/project/ico_4.png">
<el-date-picker class="w120" value-format="yyyy-MM-dd"
v-model="addParam.visitTime"
type="date"
placeholder="拜访时间">
</el-date-picker>
</div>
<div class="times"><img src="@/assets/images/project/ico_4.png"> <div class="times"><img src="@/assets/images/project/ico_4.png">
<el-date-picker class="w128" value-format="yyyy-MM-dd" <el-date-picker class="w128" value-format="yyyy-MM-dd"
v-model="addParam.nextVisitTime" v-model="addParam.nextVisitTime"
...@@ -79,7 +86,7 @@ ...@@ -79,7 +86,7 @@
<span v-if="item.name">拜访对象:{{item.name||'--'}}</span> <span v-if="item.name">拜访对象:{{item.name||'--'}}</span>
<span v-if="showtype == 'gjdt' && item.companyName != ''">关联企业:{{item.companyName}}</span> <span v-if="showtype == 'gjdt' && item.companyName != ''">关联企业:{{item.companyName}}</span>
<span v-if="item.position">职位:{{item.position}}</span> <span v-if="item.position">职位:{{item.position}}</span>
<span v-if="item.createTime">拜访时间:{{item.createTime.slice(0, 10)}}</span> <span v-if="item.visitTime">拜访时间:{{item.visitTime.slice(0, 10)}}</span>
<span v-if="item.nextVisitTime">下次拜访时间:{{item.nextVisitTime.slice(0, 10)}}</span> <span v-if="item.nextVisitTime">下次拜访时间:{{item.nextVisitTime.slice(0, 10)}}</span>
</div> </div>
</div> </div>
...@@ -110,7 +117,7 @@ ...@@ -110,7 +117,7 @@
<span v-if="item.projectName && showtype == 'projectgjdt'">关联项目:{{item.projectName||'--'}}</span> <span v-if="item.projectName && showtype == 'projectgjdt'">关联项目:{{item.projectName||'--'}}</span>
<span v-if="item.visitPerson">拜访对象:{{item.visitPerson||'--'}}</span> <span v-if="item.visitPerson">拜访对象:{{item.visitPerson||'--'}}</span>
<span v-if="item.position">职位:{{item.position||'--'}}</span> <span v-if="item.position">职位:{{item.position||'--'}}</span>
<span v-if="item.creatTime">拜访时间:{{item.creatTime}}</span> <span v-if="item.visitTime">拜访时间:{{item.visitTime}}</span>
<span v-if="item.nextVisitTime">下次拜访时间:{{item.nextVisitTime || '--'}}</span> <span v-if="item.nextVisitTime">下次拜访时间:{{item.nextVisitTime || '--'}}</span>
</div> </div>
</div> </div>
...@@ -169,6 +176,7 @@ ...@@ -169,6 +176,7 @@
addParam:{ addParam:{
customerId:'', //客户id customerId:'', //客户id
visitMode:'',//拜访方式 visitMode:'',//拜访方式
visitTime:'',//拜访时间
nextVisitTime:'',//下次拜访时间 nextVisitTime:'',//下次拜访时间
name:'',//拜访对象姓名 name:'',//拜访对象姓名
position:'',//拜访对象职务 position:'',//拜访对象职务
...@@ -250,6 +258,7 @@ ...@@ -250,6 +258,7 @@
userId:this.$store.state.user.userId, userId:this.$store.state.user.userId,
visitPerson:this.addParam.name, visitPerson:this.addParam.name,
position:this.addParam.position, position:this.addParam.position,
visitTime: this.addParam.visitTime,
nextVisitTime: this.addParam.nextVisitTime, nextVisitTime: this.addParam.nextVisitTime,
recordInfo:this.addParam.content, recordInfo:this.addParam.content,
visitWay:this.addParam.visitMode, visitWay:this.addParam.visitMode,
...@@ -317,6 +326,7 @@ ...@@ -317,6 +326,7 @@
this.recordlist = result.code == 200?result:[] this.recordlist = result.code == 200?result:[]
this.recordlist.rows.forEach(item=>{ this.recordlist.rows.forEach(item=>{
item.createTime = this.gettime(item.createTime) item.createTime = this.gettime(item.createTime)
item.visitTime = this.gettime(item.visitTime)
item.nextVisitTime = this.gettime(item.nextVisitTime) item.nextVisitTime = this.gettime(item.nextVisitTime)
}) })
}) })
...@@ -365,6 +375,7 @@ ...@@ -365,6 +375,7 @@
this.addParam={ this.addParam={
customerId:'', //客户id customerId:'', //客户id
visitMode:'',//拜访方式 visitMode:'',//拜访方式
visitTime:'',//拜访时间
nextVisitTime:'',//下次拜访时间 nextVisitTime:'',//下次拜访时间
name:'',//拜访对象姓名 name:'',//拜访对象姓名
position:'',//拜访对象职务 position:'',//拜访对象职务
......
...@@ -137,7 +137,39 @@ ...@@ -137,7 +137,39 @@
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<el-dropdown @command="PlanTenderDatehandleCommand" trigger="click" placement="bottom-start" class="el-dropdown-land" ref="PlanTenderDateShowPopper" :hide-on-click="false" >
<span class="el-dropdown-link" :class="PlanTenderDateValue ? 'color_text' : ''" >
计划招标时间{{ PlanTenderDateValue ? " 1项" : ""}}
<i class="el-icon-caret-bottom"></i>
</span>
<div>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="(item, i) in PlanTenderDateOptions" class="el-dropdown-land" :class=" PlanTenderDateValue && PlanTenderDateValue == item.value ? 'color_text': '' " :key="i" :command="item.value">
<div @mouseenter="hidePoper1">{{ item.label }}</div>
</el-dropdown-item>
<el-dropdown-item command="自定义" style="padding: 0; text-indent: 20px">
<div @mouseenter="mouseenter1">
<span :class="PlanTenderDateValue == '自定义' ? 'color_text' : ''">
自定义<i class="el-icon-arrow-right"></i>
</span>
<el-date-picker
v-if="PlanTenderDateShowPopper"
@change="changePlanTenderDate"
class="land_date_picker"
v-model="PlanTenderDate"
ref="datePicker1"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</div>
</el-dropdown-item>
</el-dropdown-menu>
</div>
</el-dropdown>
<div class="select-popper"> <div class="select-popper">
<span :class="{ color_text: jskBidPlanDto.projectCapitalSource.length }"> <span :class="{ color_text: jskBidPlanDto.projectCapitalSource.length }">
资金来源{{jskBidPlanDto.projectCapitalSource.length? jskBidPlanDto.projectCapitalSource.length + "项": ""}} 资金来源{{jskBidPlanDto.projectCapitalSource.length? jskBidPlanDto.projectCapitalSource.length + "项": ""}}
...@@ -317,6 +349,43 @@ export default { ...@@ -317,6 +349,43 @@ export default {
IssueTimeValue: "", IssueTimeValue: "",
IssueTime: "", IssueTime: "",
IssueTimeShowPopper: false, IssueTimeShowPopper: false,
PlanTenderDateOptions: [
{
label: "不限",
value: "",
},
{
label: "今天",
value: "今天",
},
{
label: "近3日",
value: "近3日",
},
{
label: "近7日",
value: "近7日",
},
{
label: "近1个月",
value: "近1个月",
},
{
label: "近3个月",
value: "近3个月",
},
{
label: "近半年",
value: "近半年",
},
{
label: "近1年",
value: "近1年",
},
],
PlanTenderDateValue: "",
PlanTenderDate: "",
PlanTenderDateShowPopper: false,
addressList: [], addressList: [],
addressType: [], addressType: [],
...@@ -370,6 +439,8 @@ export default { ...@@ -370,6 +439,8 @@ export default {
projectCapitalSource:[], projectCapitalSource:[],
startIssueTime:'', startIssueTime:'',
endIssueTime:'', endIssueTime:'',
startPlanTenderDate:'',
endPlanTenderDate:'',
}, },
planTenderAmountShowPopper:false, planTenderAmountShowPopper:false,
...@@ -528,7 +599,6 @@ export default { ...@@ -528,7 +599,6 @@ export default {
delete params.keywordNot delete params.keywordNot
} }
api.jskBidPlanPage(params).then(res=>{ api.jskBidPlanPage(params).then(res=>{
console.log(res);
if (res.code==200) { if (res.code==200) {
this.tableData=res.data.list; this.tableData=res.data.list;
this.total=res.data.total; this.total=res.data.total;
...@@ -661,6 +731,114 @@ export default { ...@@ -661,6 +731,114 @@ export default {
} }
this.jskBidPlanDto = obj; this.jskBidPlanDto = obj;
}, },
PlanTenderDatehandleCommand(command) {
var obj = JSON.parse(JSON.stringify(this.jskBidPlanDto));
if (command && command != "自定义") {
this.PlanTenderDateValue = command;
this.$refs.PlanTenderDateShowPopper.hide();
const datetime = new Date();
var startTime, endTime, Year, Month, Day;
Year = datetime.getFullYear();
Month = datetime.getMonth() + 1;
Day = datetime.getDate();
switch (command) {
case "今天":
startTime = Year + "-" + Month +"-" + Day;
endTime = Year + "-" + Month + "-" + Day;
break;
case "近3日":
endTime = Year + "-" + Month + "-" + Day;
if (Day > 3) {
startTime = Year + "-" + Month + "-" +(Day-3);
} else {
let newTime = datetime.getTime()-3*24*60*60*1000
Year = new Date(newTime).getFullYear();
Month = new Date(newTime).getMonth() + 1;
Day = new Date(newTime).getDate();
startTime = Year + "-" + Month +"-" + Day;
}
break;
case "近7日":
endTime = Year + "-" + Month + "-" + Day;
if (Day > 7) {
startTime = Year + "-" + Month + "-" +(Day-7);
} else {
let newTime = datetime.getTime()-7*24*60*60*1000
Year = new Date(newTime).getFullYear();
Month = new Date(newTime).getMonth() + 1;
Day = new Date(newTime).getDate();
startTime = Year + "-" + Month +"-" + Day;
}
break;
case "近1个月":
endTime = Year + "-" + Month + "-" + Day;
if (Month > 1) {
startTime = Year + "-" + (Month - 1) + "-1";
} else {
startTime = Year - 1 + "-" + (12 + Month - 1) + "-1";
}
break;
case "近3个月":
endTime = Year + "-" + Month + "-" + Day;
if (Month > 3) {
startTime = Year + "-" + (Month - 3) + "-1";
} else {
startTime = Year - 1 + "-" + (12 + Month - 3) + "-1";
}
break;
case "近半年":
endTime = Year + "-" + Month + "-" + Day;
if (Month > 6) {
startTime = Year + "-" + (Month - 6) + "-1";
} else {
startTime = Year - 1 + "-" + (12 + Month - 6) + "-1";
}
break;
case "近1年":
startTime = Year - 1 + "-" + Month + "-" + Day;
endTime = Year + "-" + Month + "-" + Day;
break;
case "自定义":
if (!this.PlanTenderDate) {
this.PlanTenderDateValue = "";
}
break;
}
if(startTime){
var start=startTime.split('-');
startTime=start.map((item)=>{
if(item.length==1){
return '0'+item
}else{
return item
}
})
startTime=startTime.join('-')
}
if(endTime){
var end=endTime.split('-');
endTime=end.map((item)=>{
if(item.length==1){
return '0'+item
}else{
return item
}
})
endTime=endTime.join('-')
}
obj.startPlanTenderDate = startTime;
obj.endPlanTenderDate = endTime;
} else if (command == "自定义") {
this.$refs.datePicker1.pickerVisible = true;
} else {
this.$refs.PlanTenderDateShowPopper.hide();
this.PlanTenderDateValue = "";
this.PlanTenderDate = "";
obj.startPlanTenderDate = "";
obj.endPlanTenderDate = "";
}
this.jskBidPlanDto = obj;
},
changeIssueTime(type) { changeIssueTime(type) {
if(type=='bid'&&this.tenderDate){ if(type=='bid'&&this.tenderDate){
this.tenderDateValue = "自定义"; this.tenderDateValue = "自定义";
...@@ -676,6 +854,21 @@ export default { ...@@ -676,6 +854,21 @@ export default {
this.jskBidPlanDto = obj; this.jskBidPlanDto = obj;
} }
}, },
changePlanTenderDate(type) {
if(type=='bid'&&this.tenderDate){
this.tenderDateValue = "自定义";
var obj = JSON.parse(JSON.stringify(this.jskBidPlanDto));
obj.startTenderTime = this.tenderDate[0];
obj.endTenderTime = this.tenderDate[1];
this.jskBidPlanDto = obj;
}else if(this.PlanTenderDate) {
this.PlanTenderDateValue = "自定义";
var obj = JSON.parse(JSON.stringify(this.jskBidPlanDto));
obj.startPlanTenderDate = this.PlanTenderDate[0];
obj.endPlanTenderDate = this.PlanTenderDate[1];
this.jskBidPlanDto = obj;
}
},
hidePoper(type) { hidePoper(type) {
if(type=='bid'&&this.$refs.tenderDatePicker){ if(type=='bid'&&this.$refs.tenderDatePicker){
this.$refs.tenderDatePicker.pickerVisible = false; this.$refs.tenderDatePicker.pickerVisible = false;
...@@ -683,6 +876,13 @@ export default { ...@@ -683,6 +876,13 @@ export default {
this.$refs.datePicker.pickerVisible = false; this.$refs.datePicker.pickerVisible = false;
} }
}, },
hidePoper1(type) {
if(type=='bid'&&this.$refs.tenderDatePicker){
this.$refs.tenderDatePicker.pickerVisible = false;
}else if(this.$refs.datePicker1){
this.$refs.datePicker1.pickerVisible = false;
}
},
mouseenter(type) { mouseenter(type) {
if(type=='bid'){ if(type=='bid'){
this.tenderDateShowPopper = true; this.tenderDateShowPopper = true;
...@@ -700,6 +900,23 @@ export default { ...@@ -700,6 +900,23 @@ export default {
} }
} }
}, },
mouseenter1(type) {
if(type=='bid'){
this.tenderDateShowPopper = true;
if(this.tenderDateValue=="自定义"){
this.$nextTick(() => {
this.$refs.tenderDatePicker.pickerVisible = true;
});
}
}else{
this.PlanTenderDateShowPopper = true;
if(this.PlanTenderDateValue=="自定义"){
this.$nextTick(() => {
this.$refs.datePicker1.pickerVisible = true;
});
}
}
},
clearIssueTime(type) { clearIssueTime(type) {
var obj = JSON.parse(JSON.stringify(this.jskBidPlanDto)); var obj = JSON.parse(JSON.stringify(this.jskBidPlanDto));
if(type=='bid'){ if(type=='bid'){
...@@ -715,6 +932,21 @@ export default { ...@@ -715,6 +932,21 @@ export default {
} }
this.jskBidPlanDto = obj; this.jskBidPlanDto = obj;
}, },
clearPlanTenderDate(type) {
var obj = JSON.parse(JSON.stringify(this.jskBidPlanDto));
if(type=='bid'){
this.tenderDate = "";
this.tenderDateValue = "";
obj.startTenderTime = "";
obj.endTenderTime = "";
}else{
this.PlanTenderDate = "";
this.PlanTenderDateValue = "";
obj.startPlanTenderDate = "";
obj.endPlanTenderDate = "";
}
this.jskBidPlanDto = obj;
},
deleteDomicile() { deleteDomicile() {
this.$refs.address.handleClear(); this.$refs.address.handleClear();
}, },
......
...@@ -18,5 +18,9 @@ public class CustomerSearchDto implements Serializable { ...@@ -18,5 +18,9 @@ public class CustomerSearchDto implements Serializable {
* 用户id * 用户id
*/ */
private Long userId; private Long userId;
/**
* 客户状态 0:正常 1:历史
*/
private Integer status;
} }
...@@ -3,6 +3,8 @@ package com.dsk.system.mapper; ...@@ -3,6 +3,8 @@ package com.dsk.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dsk.system.domain.customer.CustomerUser; import com.dsk.system.domain.customer.CustomerUser;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
/** /**
...@@ -14,5 +16,7 @@ import org.apache.ibatis.annotations.Mapper; ...@@ -14,5 +16,7 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper @Mapper
public interface CustomerUserMapper extends BaseMapper<CustomerUser> { public interface CustomerUserMapper extends BaseMapper<CustomerUser> {
CustomerUser selectByCustomerIdAndUserId(@Param("customerId") String customerId,@Param("userId") Long userId);
} }
...@@ -31,4 +31,10 @@ public interface ICustomerService { ...@@ -31,4 +31,10 @@ public interface ICustomerService {
List<String> selectUipIdList(List<String> uipIds); List<String> selectUipIdList(List<String> uipIds);
Integer status(String companyName);
boolean cancelClaim(String customerId);
boolean historyClaim(String customerId);
} }
...@@ -48,6 +48,7 @@ public class CustomerServiceImpl implements ICustomerService { ...@@ -48,6 +48,7 @@ public class CustomerServiceImpl implements ICustomerService {
@Override @Override
public List<CustomerListVo> selectList(CustomerSearchDto dto) { public List<CustomerListVo> selectList(CustomerSearchDto dto) {
dto.setUserId(SecurityUtils.getUserId()); dto.setUserId(SecurityUtils.getUserId());
dto.setStatus(ObjectUtils.isEmpty(dto.getStatus()) ? 0 : dto.getStatus());
return baseMapper.selectList(dto); return baseMapper.selectList(dto);
} }
...@@ -124,4 +125,38 @@ public class CustomerServiceImpl implements ICustomerService { ...@@ -124,4 +125,38 @@ public class CustomerServiceImpl implements ICustomerService {
return baseMapper.selectUipIdList(uipIds, SecurityUtils.getUserId()); return baseMapper.selectUipIdList(uipIds, SecurityUtils.getUserId());
} }
@Override
public Integer status(String companyName) {
Customer cus = baseMapper.selectByCompanyNameAndUserId(companyName, SecurityUtils.getUserId());
if (ObjectUtils.isEmpty(cus)) {
return null;
}
CustomerUser customerUser = customerUserMapper.selectByCustomerIdAndUserId(cus.getCustomerId(), SecurityUtils.getUserId());
if (ObjectUtils.isEmpty(customerUser)) {
throw new ServiceException("数据错误!");
}
return customerUser.getStatus();
}
@Override
public boolean cancelClaim(String customerId) {
return updateClaimStatus(customerId, 1);
}
@Override
public boolean historyClaim(String customerId) {
return updateClaimStatus(customerId, 0);
}
//修改客户认领状态
private boolean updateClaimStatus(String customerId, Integer status) {
CustomerUser customerUser = customerUserMapper.selectByCustomerIdAndUserId(customerId, SecurityUtils.getUserId());
if (ObjectUtils.isEmpty(customerUser)) {
throw new ServiceException("数据错误!");
}
customerUser.setStatus(status);
return customerUserMapper.updateById(customerUser) == 1;
}
} }
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
left join ( left join (
select count(status) num,customer_id from business_info where `status` = 2 group by customer_id select count(status) num,customer_id from business_info where `status` = 2 group by customer_id
) bi3 on bi3.customer_id = ct.customer_id ) bi3 on bi3.customer_id = ct.customer_id
where ctu.user_id = #{dto.userId} where ctu.user_id = #{dto.userId} and ctu.status = #{dto.status}
<if test="dto.companyName != null and dto.companyName != '' "> and ct.company_name like concat('%',#{dto.companyName},'%')</if> <if test="dto.companyName != null and dto.companyName != '' "> and ct.company_name like concat('%',#{dto.companyName},'%')</if>
order by ct.create_time desc order by ct.create_time desc
</select> </select>
......
...@@ -2,6 +2,13 @@ ...@@ -2,6 +2,13 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dsk.system.mapper.CustomerUserMapper"> <mapper namespace="com.dsk.system.mapper.CustomerUserMapper">
<select id="selectByCustomerIdAndUserId" resultType="com.dsk.system.domain.customer.CustomerUser">
select
id, customer_id, user_id, status, create_time, update_time
from customer_user
where customer_id = #{customerId} and user_id = #{userId}
</select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment