| | |
| | | import com.zy.crm.common.utils.SetOfUtils; |
| | | import com.zy.crm.common.web.BaseController; |
| | | import com.zy.crm.manager.controller.result.FollowerTableVo; |
| | | import com.zy.crm.manager.entity.Order; |
| | | import com.zy.crm.manager.entity.Plan; |
| | | import com.zy.crm.manager.entity.PlanFoll; |
| | | import com.zy.crm.manager.entity.PlanType; |
| | |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/planQueryName/auth") |
| | | @ManagerAuth |
| | | public R queryName(String condition) { |
| | | EntityWrapper<Plan> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("name", condition); |
| | | Long id = getRole().getId(); |
| | | if (id.equals(1L)) { |
| | | wrapper.eq("host_id", 1); |
| | | } else if (id.equals(2L)) { |
| | | wrapper.eq("dept_id", getDeptId()); |
| | | } else { |
| | | wrapper.eq("user_id", getUserId()); |
| | | } |
| | | Page<Plan> page = planService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (Plan plan : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", plan.getId()); |
| | | map.put("value", plan.getName()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/plan/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.crm.manager.entity.Item; |
| | | import com.zy.crm.manager.entity.Order; |
| | | import com.zy.crm.manager.entity.Pri; |
| | | import com.zy.crm.manager.entity.PriOnline; |
| | | import com.zy.crm.manager.service.ItemService; |
| | | import com.zy.crm.manager.service.OrderService; |
| | | import com.zy.crm.manager.service.PriOnlineService; |
| | | import com.zy.crm.manager.entity.*; |
| | | import com.zy.crm.manager.service.*; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.core.domain.KeyValueVo; |
| | | import com.zy.crm.common.web.BaseController; |
| | | import com.zy.crm.manager.service.PriService; |
| | | import com.zy.crm.system.entity.Role; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.core.io.ClassPathResource; |
| | |
| | | private PriService priService; |
| | | |
| | | @Autowired |
| | | private OrderService orderService; |
| | | private PlanService planService; |
| | | |
| | | @RequestMapping(value = "/priOnline/{id}/auth") |
| | | @ManagerAuth |
| | |
| | | priOnline.setStatus(0); |
| | | //业务员 |
| | | // Item item = itemService.selectById(priOnline.getItemId()); |
| | | Order order = orderService.selectById(priOnline.getItemId()); |
| | | priOnline.setMemberId(order.getUserId()); |
| | | Plan plan = planService.selectById(priOnline.getItemId()); |
| | | priOnline.setMemberId(plan.getUserId()); |
| | | |
| | | |
| | | //设置项目流程 |
| | | order.setStep(2); |
| | | orderService.updateById(order); |
| | | plan.setStep(2); |
| | | planService.updateById(plan); |
| | | |
| | | priOnlineService.insert(priOnline); |
| | | return R.ok(); |
| | |
| | | priOnline.setDeptId(getDeptId()); |
| | | //业务员 |
| | | // Item item = itemService.selectById(priOnline.getItemId()); |
| | | Order order = orderService.selectById(priOnline.getItemId()); |
| | | priOnline.setMemberId(order.getUserId()); |
| | | Plan plan = planService.selectById(priOnline.getItemId()); |
| | | priOnline.setMemberId(plan.getUserId()); |
| | | |
| | | priOnlineService.insert(priOnline); |
| | | return R.ok(); |
| | |
| | | for (PriOnline priOnline : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", priOnline.getId()); |
| | | map.put("value", priOnline.getOrderNum() + "/" + priOnline.getOrderId$() + "/" + priOnline.getMemberId$()); |
| | | map.put("value", priOnline.getOrderNum() + "/" + priOnline.getPlanId$() + "/" + priOnline.getMemberId$()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | |
| | | import com.core.domain.KeyValueVo; |
| | | import com.zy.crm.common.web.BaseController; |
| | | import com.zy.crm.manager.entity.Item; |
| | | import com.zy.crm.manager.entity.Plan; |
| | | import com.zy.crm.manager.entity.PriQuoteBudget; |
| | | import com.zy.crm.manager.entity.PriSales; |
| | | import com.zy.crm.manager.service.ItemService; |
| | | import com.zy.crm.manager.service.PlanService; |
| | | import com.zy.crm.manager.service.PriQuoteBudgetService; |
| | | import com.zy.crm.manager.service.PriSalesService; |
| | | import org.apache.poi.xssf.usermodel.XSSFSheet; |
| | |
| | | private PriQuoteBudgetService priQuoteBudgetService; |
| | | |
| | | @Autowired |
| | | private ItemService itemService; |
| | | private PlanService planService; |
| | | |
| | | @Autowired |
| | | private PriSalesService priSalesService; |
| | |
| | | priQuoteBudget.setUpdateTime(new Date()); |
| | | |
| | | //业务员 |
| | | Item item = itemService.selectById(priQuoteBudget.getItemId()); |
| | | priQuoteBudget.setMemberId(item.getMember()); |
| | | Plan plan = planService.selectById(priQuoteBudget.getItemId()); |
| | | priQuoteBudget.setMemberId(plan.getUserId()); |
| | | |
| | | //设置项目流程 |
| | | item.setStep(4); |
| | | itemService.updateById(item); |
| | | plan.setStep(4); |
| | | planService.updateById(plan); |
| | | |
| | | priQuoteBudgetService.insert(priQuoteBudget); |
| | | return R.ok(); |
| | |
| | | priQuoteBudget.setUpdateTime(new Date()); |
| | | |
| | | //业务员 |
| | | Item item = itemService.selectById(priQuoteBudget.getItemId()); |
| | | priQuoteBudget.setMemberId(item.getMember()); |
| | | Plan plan = planService.selectById(priQuoteBudget.getItemId()); |
| | | priQuoteBudget.setMemberId(plan.getUserId()); |
| | | |
| | | priQuoteBudgetService.insert(priQuoteBudget); |
| | | return R.ok(); |
| | |
| | | for (PriQuoteBudget priQuoteBudget : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", priQuoteBudget.getId()); |
| | | map.put("value", priQuoteBudget.getInOrderNum() + "/" + priQuoteBudget.getItemId$() + "/" + priQuoteBudget.getMemberId$()); |
| | | map.put("value", priQuoteBudget.getInOrderNum() + "/" + priQuoteBudget.getPlanId$() + "/" + priQuoteBudget.getMemberId$()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | |
| | | import com.core.domain.KeyValueVo; |
| | | import com.zy.crm.common.web.BaseController; |
| | | import com.zy.crm.manager.entity.Item; |
| | | import com.zy.crm.manager.entity.Plan; |
| | | import com.zy.crm.manager.entity.PriQuote; |
| | | import com.zy.crm.manager.entity.PriQuoteBudget; |
| | | import com.zy.crm.manager.service.ItemService; |
| | | import com.zy.crm.manager.service.PlanService; |
| | | import com.zy.crm.manager.service.PriQuoteBudgetService; |
| | | import com.zy.crm.manager.service.PriQuoteService; |
| | | import org.apache.poi.xssf.usermodel.XSSFSheet; |
| | |
| | | private PriQuoteService priQuoteService; |
| | | |
| | | @Autowired |
| | | private ItemService itemService; |
| | | private PlanService planService; |
| | | |
| | | @Autowired |
| | | private PriQuoteBudgetService priQuoteBudgetService; |
| | |
| | | priQuote.setUpdateTime(new Date()); |
| | | |
| | | //业务员 |
| | | Item item = itemService.selectById(priQuote.getItemId()); |
| | | priQuote.setMemberId(item.getMember()); |
| | | Plan plan = planService.selectById(priQuote.getItemId()); |
| | | priQuote.setMemberId(plan.getUserId()); |
| | | |
| | | //设置项目流程 |
| | | item.setStep(5); |
| | | itemService.updateById(item); |
| | | plan.setStep(5); |
| | | planService.updateById(plan); |
| | | |
| | | priQuoteService.insert(priQuote); |
| | | return R.ok(); |
| | |
| | | priQuote.setUpdateTime(new Date()); |
| | | |
| | | //业务员 |
| | | Item item = itemService.selectById(priQuote.getItemId()); |
| | | priQuote.setMemberId(item.getMember()); |
| | | Plan plan = planService.selectById(priQuote.getItemId()); |
| | | priQuote.setMemberId(plan.getUserId()); |
| | | |
| | | priQuoteService.insert(priQuote); |
| | | return R.ok(); |
| | |
| | | import com.core.domain.KeyValueVo; |
| | | import com.zy.crm.common.web.BaseController; |
| | | import com.zy.crm.manager.entity.Item; |
| | | import com.zy.crm.manager.entity.Plan; |
| | | import com.zy.crm.manager.entity.PriOnline; |
| | | import com.zy.crm.manager.entity.PriSales; |
| | | import com.zy.crm.manager.service.ItemService; |
| | | import com.zy.crm.manager.service.PlanService; |
| | | import com.zy.crm.manager.service.PriOnlineService; |
| | | import com.zy.crm.manager.service.PriSalesService; |
| | | import org.apache.poi.xssf.usermodel.XSSFSheet; |
| | |
| | | private PriOnlineService priOnlineService; |
| | | |
| | | @Autowired |
| | | private ItemService itemService; |
| | | private PlanService planService; |
| | | |
| | | @RequestMapping(value = "/priSales/{id}/auth") |
| | | @ManagerAuth |
| | |
| | | priSales.setDeptId(getDeptId()); |
| | | |
| | | //业务员 |
| | | Item item = itemService.selectById(priSales.getItemId()); |
| | | priSales.setMemberId(item.getMember()); |
| | | Plan plan = planService.selectById(priSales.getItemId()); |
| | | priSales.setMemberId(plan.getUserId()); |
| | | |
| | | //设置项目流程 |
| | | item.setStep(3); |
| | | itemService.updateById(item); |
| | | plan.setStep(3); |
| | | planService.updateById(plan); |
| | | |
| | | priSalesService.insert(priSales); |
| | | return R.ok(); |
| | |
| | | priSales.setUpdateTime(new Date()); |
| | | |
| | | //业务员 |
| | | Item item = itemService.selectById(priSales.getItemId()); |
| | | priSales.setMemberId(item.getMember()); |
| | | Plan plan = planService.selectById(priSales.getItemId()); |
| | | priSales.setMemberId(plan.getUserId()); |
| | | |
| | | priSalesService.insert(priSales); |
| | | return R.ok(); |
| | |
| | | for (PriSales priSales : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", priSales.getId()); |
| | | map.put("value", priSales.getInOrderNum() + "/" + priSales.getItemId$() + "/" + priSales.getMemberId$()); |
| | | map.put("value", priSales.getInOrderNum() + "/" + priSales.getPlanId$() + "/" + priSales.getMemberId$()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | |
| | | @ApiModelProperty(value= "注释") |
| | | private String memo; |
| | | |
| | | /** |
| | | * 项目进度流程{1:项目创建,2:核价处理,3:产品费用明细,4:报价预算单,5:报价单} |
| | | */ |
| | | @ApiModelProperty(value= "项目进度流程{1:项目创建,2:核价处理,3:产品费用明细,4:报价预算单,5:报价单}") |
| | | private Integer step; |
| | | |
| | | public Plan() {} |
| | | |
| | | public String getHostId$(){ |
| | |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.crm.manager.service.ItemService; |
| | | import com.zy.crm.manager.service.OrderService; |
| | | import com.zy.crm.manager.service.PlanService; |
| | | import com.zy.crm.system.entity.User; |
| | | import com.zy.crm.system.service.UserService; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | |
| | | // return null; |
| | | // } |
| | | |
| | | public String getOrderId$() { |
| | | OrderService orderService = SpringUtils.getBean(OrderService.class); |
| | | Order order = orderService.selectById(this.itemId); |
| | | if (!Cools.isEmpty(order)){ |
| | | return String.valueOf(order.getName()); |
| | | public String getPlanId$() { |
| | | PlanService planService = SpringUtils.getBean(PlanService.class); |
| | | Plan plan = planService.selectById(this.itemId); |
| | | if (!Cools.isEmpty(plan)){ |
| | | return String.valueOf(plan.getUuid()); |
| | | } |
| | | return null; |
| | | } |
| | |
| | | |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.crm.manager.service.ItemService; |
| | | import com.zy.crm.manager.service.PlanService; |
| | | import com.zy.crm.system.entity.User; |
| | | import com.zy.crm.system.service.UserService; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public String getItemId$() { |
| | | ItemService itemService = SpringUtils.getBean(ItemService.class); |
| | | Item item = itemService.selectById(this.itemId); |
| | | if (!Cools.isEmpty(item)){ |
| | | return String.valueOf(item.getName()); |
| | | public String getPlanId$() { |
| | | PlanService planService = SpringUtils.getBean(PlanService.class); |
| | | Plan plan = planService.selectById(this.itemId); |
| | | if (!Cools.isEmpty(plan)){ |
| | | return String.valueOf(plan.getUuid()); |
| | | } |
| | | return null; |
| | | } |
| | |
| | | |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.crm.manager.service.ItemService; |
| | | import com.zy.crm.manager.service.PlanService; |
| | | import com.zy.crm.system.entity.User; |
| | | import com.zy.crm.system.service.UserService; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public String getItemId$() { |
| | | ItemService itemService = SpringUtils.getBean(ItemService.class); |
| | | Item item = itemService.selectById(this.itemId); |
| | | if (!Cools.isEmpty(item)){ |
| | | return String.valueOf(item.getName()); |
| | | public String getPlanId$() { |
| | | PlanService planService = SpringUtils.getBean(PlanService.class); |
| | | Plan plan = planService.selectById(this.itemId); |
| | | if (!Cools.isEmpty(plan)){ |
| | | return String.valueOf(plan.getUuid()); |
| | | } |
| | | return null; |
| | | } |
| | |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.crm.manager.service.ItemService; |
| | | import com.zy.crm.manager.service.OrderService; |
| | | import com.zy.crm.manager.service.PlanService; |
| | | import com.zy.crm.system.entity.User; |
| | | import com.zy.crm.system.service.UserService; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public String getItemId$() { |
| | | ItemService itemService = SpringUtils.getBean(ItemService.class); |
| | | Item item = itemService.selectById(this.itemId); |
| | | if (!Cools.isEmpty(item)){ |
| | | return String.valueOf(item.getName()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getOrderId$() { |
| | | OrderService orderService = SpringUtils.getBean(OrderService.class); |
| | | Order order = orderService.selectById(this.itemId); |
| | | if (!Cools.isEmpty(order)){ |
| | | return String.valueOf(order.getName()); |
| | | public String getPlanId$() { |
| | | PlanService planService = SpringUtils.getBean(PlanService.class); |
| | | Plan plan = planService.selectById(this.itemId); |
| | | if (!Cools.isEmpty(plan)){ |
| | | return String.valueOf(plan.getUuid()); |
| | | } |
| | | return null; |
| | | } |
| | |
| | | ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80,hide: true} |
| | | ,{field: 'templateName', align: 'center',title: '核价名',hide: false} |
| | | ,{field: 'orderNum', align: 'center',title: '核价单号'} |
| | | ,{field: 'orderId$', align: 'center',title: '项目名'} |
| | | ,{field: 'planId$', align: 'center',title: '规划单号'} |
| | | ,{field: 'createTime$', align: 'center',title: '创建时间'} |
| | | ,{field: 'updateTime$', align: 'center',title: '更新时间'} |
| | | ,{field: 'status$', align: 'center',title: '状态'} |
| | |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: false, |
| | | content: 'priOnline_detail.html?item_id=' + data.field.itemId + "&pri_id=" + data.field.priId, |
| | | content: 'priOnline_detail.html?item_id=' + data.field.planId + "&pri_id=" + data.field.priId, |
| | | success: function(layero, index){ |
| | | clearFormVal(layer.getChildFrame('#detail', index)); |
| | | // layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | |
| | | ,{field: 'templateName', align: 'center',title: '模板名', width: 220, style: 'color: #1890ff;cursor:pointer', event: 'more',hide: false} |
| | | ,{field: 'orderNum', align: 'center',title: '报价预算单号'} |
| | | ,{field: 'inOrderNum', align: 'center',title: '报价编号'} |
| | | ,{field: 'itemId$', align: 'center',title: '项目名'} |
| | | ,{field: 'planId$', align: 'center',title: '规划单号'} |
| | | ,{field: 'createTime$', align: 'center',title: '创建时间'} |
| | | ,{field: 'updateTime$', align: 'center',title: '更新时间'} |
| | | ,{field: 'memberId$', align: 'center',title: '业务员'} |
| | |
| | | traditional:true, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | $("#itemName").val(res.data.itemId$) |
| | | $("#planId").val(res.data.planId$) |
| | | $("#priSalesNum").val(res.data.orderNum) |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | |
| | | ,{field: 'templateName', align: 'center',title: '模板名'} |
| | | ,{field: 'orderNum', align: 'center',title: '产品费用明细单号'} |
| | | ,{field: 'inOrderNum', align: 'center',title: '预算编号'} |
| | | ,{field: 'itemId$', align: 'center',title: '项目名'} |
| | | ,{field: 'planId$', align: 'center',title: '规划单号'} |
| | | ,{field: 'createTime$', align: 'center',title: '创建时间'} |
| | | ,{field: 'updateTime$', align: 'center',title: '更新时间'} |
| | | ,{field: 'memberId$', align: 'center',title: '业务员'} |
| | |
| | | success: function (res) { |
| | | console.log(res) |
| | | if (res.code === 200){ |
| | | $("#itemName").val(res.data.itemId$) |
| | | $("#planId").val(res.data.planId$) |
| | | $("#priOrderNum").val(res.data.orderNum) |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | |
| | | ,{field: 'templateName', align: 'center',title: '模板名'} |
| | | ,{field: 'orderNum', align: 'center',title: '核价订单号'} |
| | | ,{field: 'inOrderNum', align: 'center',title: '明细编号'} |
| | | ,{field: 'itemId$', align: 'center',title: '项目名'} |
| | | ,{field: 'planId$', align: 'center',title: '项目名'} |
| | | ,{field: 'createTime$', align: 'center',title: '创建时间'} |
| | | ,{field: 'updateTime$', align: 'center',title: '更新时间'} |
| | | ,{field: 'memberId$', align: 'center',title: '业务员'} |
| | |
| | | success: function (res) { |
| | | console.log(res) |
| | | if (res.code === 200){ |
| | | $("#itemName").val(res.data.itemId$) |
| | | $("#planId").val(res.data.planId$) |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">项目名: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="itemId" placeholder="请输入项目名" style="display: none" lay-verify="required"> |
| | | <input id="orderId$" name="orderId$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入项目名" onfocus=this.blur()> |
| | | <input class="layui-input" name="planId" placeholder="请输入项目名" style="display: none" lay-verify="required"> |
| | | <input id="planId$" name="planId$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入项目名" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="orderQueryNameBydirector" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="orderQueryNameBydirectorSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | <input class="cool-auto-complete-window-input" data-key="planQueryNameBydirector" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="planQueryNameBydirectorSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">项目名: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" id="itemName" disabled placeholder="请输入项目名" autocomplete="off" lay-verify="required"> |
| | | <input class="layui-input" id="planId" disabled placeholder="请输入项目名" autocomplete="off" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">项目名: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" id="itemName" disabled placeholder="请输入项目名" autocomplete="off" lay-verify="required"> |
| | | <input class="layui-input" id="planId" disabled placeholder="请输入项目名" autocomplete="off" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">项目名: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" id="orderId$" disabled placeholder="请输入项目名" autocomplete="off" lay-verify="required"> |
| | | <input class="layui-input" id="planId" disabled placeholder="请输入项目名" autocomplete="off" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | |