feat: 销售二次分配时,需要记录原是销售是谁
This commit is contained in:
parent
76fc495423
commit
b02c9b41a7
|
|
@ -340,6 +340,30 @@ public class ClewController extends BaseController
|
|||
return toAjax(clewService.updateClew(clew));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/getBackClew")
|
||||
@ResponseBody
|
||||
public AjaxResult getBackClew(Clew clew)
|
||||
{
|
||||
Clew sourceClew = clewService.selectClewById(clew.getId());
|
||||
if(sourceClew.getSaleId() != 2L){
|
||||
return AjaxResult.error("该线索已被人取走!");
|
||||
}
|
||||
sourceClew.setSaleId(getSysUser().getUserId());
|
||||
return toAjax(clewService.updateClew(sourceClew));
|
||||
}
|
||||
|
||||
@PostMapping("/addPublicClew")
|
||||
@ResponseBody
|
||||
public AjaxResult addPublicClew(Clew clew)
|
||||
{
|
||||
Clew sourceClew = clewService.selectClewById(clew.getId());
|
||||
sourceClew.setSaleId(2L);
|
||||
clew.setUpdateTime(DateUtils.getNowDate());
|
||||
return toAjax(clewService.updateClew(sourceClew));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/changeUser/{clewId}")
|
||||
public String changeUser(@PathVariable("clewId") String id, ModelMap mmap)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -296,6 +296,8 @@
|
|||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="getBackClew(\'' + row.id + '\')"><i class="fa fa-remove"></i>取回线索</a>');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="addPublicClew(\'' + row.id + '\')"><i class="fa fa-remove"></i>放入公海池</a>');
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="changeUser(\'' + row.id + '\')"><i class="fa fa-remove"></i>分配客服</a>');
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
|
|
@ -306,6 +308,21 @@
|
|||
$.table.init(options);
|
||||
});
|
||||
|
||||
|
||||
/* 用户管理-停用 */
|
||||
function getBackClew(id) {
|
||||
$.modal.confirm("确定要取回该线索吗?", function() {
|
||||
$.operate.post(prefix + "/getBackClew", { "id": id});
|
||||
})
|
||||
}
|
||||
|
||||
/* 用户管理启用 */
|
||||
function addPublicClew(id) {
|
||||
$.modal.confirm("确定要加入公海池吗?", function() {
|
||||
$.operate.post(prefix + "/addPublicClew", { "id": id});
|
||||
})
|
||||
}
|
||||
|
||||
/* 选择供应商 */
|
||||
function changeUser(clewId) {
|
||||
var url = prefix + '/changeUser/' + clewId;
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
<include refid="selectClewVo"/>
|
||||
<where>
|
||||
<if test="company != null "> and company = #{company}</if>
|
||||
<if test="saleId != null "> and sale_id = #{saleId}</if>
|
||||
<if test="saleId != null "> and (sale_id = #{saleId} or sale_id = 2)</if>
|
||||
<if test="infoFlow != null and infoFlow != ''"> and info_flow = #{infoFlow}</if>
|
||||
<if test="nextTime != null "> and next_time = #{nextTime}</if>
|
||||
<if test="wxName != null and wxName != ''"> and wx_name like concat('%', #{wxName}, '%')</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue