| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 返回给前端点击下拉框的数据 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/cstmrUuid/auth") |
| | | public R cstmrUuid(){ |
| | | List<Cstmr> cstmrs = cstmrService.selectList(null); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (Cstmr cstmr : cstmrs) { |
| | | Map<String,Object> content = new HashMap<>(); |
| | | content.put("id",cstmr.getId()); |
| | | content.put("value",cstmr.getName()); |
| | | result.add(content); |
| | | } |
| | | |
| | | |
| | | |
| | | return R.ok(result); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.common.DateUtils; |
| | | import zy.cloud.wms.manager.entity.Cstmr; |
| | | import zy.cloud.wms.manager.entity.FlowStatus; |
| | | import zy.cloud.wms.manager.service.FlowStatusService; |
| | | import com.core.annotations.ManagerAuth; |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 单击input之后弹出的选择框 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/flowId/auth") |
| | | public R getAllFlowIds(){ |
| | | List<FlowStatus> flowStatuses = flowStatusService.selectList(null); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (FlowStatus flowStatus : flowStatuses) { |
| | | Map<String,Object> content = new HashMap<>(); |
| | | content.put("id",flowStatus.getId()); |
| | | content.put("value",flowStatus.getName()); |
| | | result.add(content); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | } |
| | |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import zy.cloud.wms.common.web.BaseController; |
| | | import zy.cloud.wms.manager.entity.Cstmr; |
| | | import zy.cloud.wms.manager.entity.Item; |
| | | import zy.cloud.wms.manager.entity.ProjectPlan; |
| | | import zy.cloud.wms.manager.entity.ProjectType; |
| | | import zy.cloud.wms.manager.service.CstmrService; |
| | | import zy.cloud.wms.manager.service.ItemService; |
| | | import zy.cloud.wms.manager.service.ProjectPlanService; |
| | | import zy.cloud.wms.manager.service.ProjectTypeService; |
| | | |
| | | import java.util.*; |
| | |
| | | @Autowired |
| | | private ItemService itemService; |
| | | @Autowired |
| | | private CstmrService cstmrService; |
| | | @Autowired |
| | | private ProjectTypeService projectTypeService; |
| | | private ProjectPlanService planService; |
| | | |
| | | @RequestMapping(value = "/item/{id}/auth") |
| | | @ManagerAuth |
| | |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | hostEq(wrapper); |
| | | wrapper.orderBy("status",false); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(itemService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | |
| | | if (Cools.isEmpty(item)) { |
| | | return R.error("参数为空,请联系管理员"); |
| | | } |
| | | Cstmr user_code = cstmrService.selectOne(new EntityWrapper<Cstmr>() |
| | | .eq("user_code", item.getCstmrUuid())); |
| | | if (!Cools.isEmpty(user_code)) { |
| | | item.setCstmr(user_code.getName()); |
| | | }else { |
| | | return R.error("参数错误,请输入正确的客户编号"); |
| | | |
| | | if (!item.getType().equals("1")) { |
| | | throw new CoolException("目前仅支持集成项目"); |
| | | } |
| | | ProjectType id = projectTypeService.selectOne(new EntityWrapper<ProjectType>() |
| | | .eq("id", item.getType())); |
| | | if (!Cools.isEmpty(id)) { |
| | | item.setType(id.getTypeName()); |
| | | }else { |
| | | return R.error("参数错误,找不到该项目类型"); |
| | | Item name = itemService.selectOne(new EntityWrapper<Item>() |
| | | .eq("name", item.getName())); |
| | | if (!Cools.isEmpty(name)) { |
| | | throw new CoolException("不可有重复项目名"); |
| | | } |
| | | |
| | | item.setHostId(getHostId()); |
| | |
| | | item.setStatus(1); |
| | | item.setUpdateBy(getUserId()); |
| | | item.setUpdateTime(new Date()); |
| | | itemService.insert(item); |
| | | itemService.insertAll(item); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | if (Cools.isEmpty(item)) { |
| | | return R.error("参数为空,请联系管理员"); |
| | | } |
| | | Cstmr user_code = cstmrService.selectOne(new EntityWrapper<Cstmr>() |
| | | .eq("user_code", item.getCstmrUuid())); |
| | | if (!Cools.isEmpty(user_code)) { |
| | | item.setCstmr(user_code.getName()); |
| | | }else { |
| | | return R.error("参数错误,请输入正确的客户编号"); |
| | | |
| | | if (!item.getType().equals("1")) { |
| | | throw new CoolException("目前仅支持集成项目"); |
| | | } |
| | | ProjectType id = projectTypeService.selectOne(new EntityWrapper<ProjectType>() |
| | | .eq("id", item.getType())); |
| | | if (!Cools.isEmpty(id)) { |
| | | item.setType(id.getTypeName()); |
| | | }else { |
| | | return R.error("参数错误,找不到该项目类型"); |
| | | } |
| | | // if (Cools.isEmpty(item) || null==item.getUuid()){ |
| | | // return R.error(); |
| | | // } |
| | | item.setUpdateBy(getUserId()); |
| | | item.setUpdateTime(new Date()); |
| | | itemService.updateById(item); |
| | |
| | | @RequestMapping(value = "/item/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam("ids[]") String param){ |
| | | |
| | | if (param != null){ |
| | | itemService.delete(new EntityWrapper<Item>() |
| | | .eq("id",param)); |
| | | planService.delete(new EntityWrapper<ProjectPlan>() |
| | | .eq("item_id",param)); |
| | | } |
| | | |
| | | // List<Item> list = JSONArray.parseArray(param, Item.class); |
| | | // if (Cools.isEmpty(list)){ |
| | | // return R.error(); |
| | |
| | | package zy.cloud.wms.manager.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.core.exception.CoolException; |
| | | import zy.cloud.wms.manager.entity.FlowStatus; |
| | | import zy.cloud.wms.manager.entity.Item; |
| | | import zy.cloud.wms.manager.entity.Node; |
| | | import zy.cloud.wms.manager.entity.ProjectPlan; |
| | | import zy.cloud.wms.manager.entity.*; |
| | | import zy.cloud.wms.manager.service.FlowStatusService; |
| | | import zy.cloud.wms.manager.service.ItemService; |
| | | import zy.cloud.wms.manager.service.ProjectPlanService; |
| | |
| | | return R.ok(projectPlanService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | |
| | | |
| | | @RequestMapping(value = "/projectPlan/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1") Integer curr, |
| | |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | wrapper.orderBy("weight_num"); |
| | | |
| | | // if (!Cools.isEmpty(orderByField)) { |
| | | // wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | // } |
| | |
| | | return R.error(); |
| | | } |
| | | |
| | | ProjectPlan checkExist = projectPlanService.selectOne(new EntityWrapper<ProjectPlan>() |
| | | .eq("item_id", projectPlan.getItemId()) |
| | | .eq("weight_num", projectPlan.getWeightNum())); |
| | | if (!Cools.isEmpty(checkExist)) { |
| | | throw new CoolException("权重值冲突,请检查"); |
| | | } |
| | | FlowStatus id = flowStatusService.selectOne(new EntityWrapper<FlowStatus>() |
| | | .eq("id", projectPlan.getFlowId())); |
| | | if (!Cools.isEmpty(id)) { |
| | | projectPlan.setFlowName(id.getName()); |
| | | }else { |
| | | throw new CoolException("无法通过节点ID找到对应节点"); |
| | | } |
| | | projectPlan.setModifyTime(new Date()); |
| | | projectPlan.setModifyId(getUserId()); |
| | | projectPlanService.update(projectPlan,new EntityWrapper<ProjectPlan>() |
| | | .eq("item_id",projectPlan.getItemId()) |
| | | .eq("weight_num",projectPlan.getWeightNum())); |
| | | // projectPlanService.updateById(projectPlan); |
| | | |
| | | projectPlanService.updateById(projectPlan); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | @RequestMapping("/projectPlan/allProjects") |
| | | public R allProjects() { |
| | | |
| | | List<Item> items = itemService.selectList(null); |
| | | List<Item> items = itemService.selectList(new EntityWrapper<Item>() |
| | | .eq("status","1")); |
| | | |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (Item item : items) { |
| | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 获取延期项目 |
| | | * @param curr |
| | | * @param limit |
| | | * @param orderByField |
| | | * @param orderByType |
| | | * @param param |
| | | * @return |
| | | */ |
| | | |
| | | @RequestMapping("/projectPlan/diffProjects") |
| | | public R diffProjects(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | String name = (String) param.get("id"); |
| | | |
| | | Wrapper<ProjectPlan> condition = new EntityWrapper<ProjectPlan>(); |
| | | if (!Cools.isEmpty(name)) { |
| | | Item targetItem = itemService.selectOne(new EntityWrapper<Item>() |
| | | .like("name", name)); |
| | | |
| | | if (!Cools.isEmpty(targetItem)) { |
| | | |
| | | condition |
| | | .eq("item_id",targetItem.getId()) |
| | | .and() |
| | | .gt("delay", 0) |
| | | .or() |
| | | .isNotNull("delay_reason") |
| | | .and() |
| | | .ne("delay_reason", "") |
| | | .and() |
| | | .eq("item_id",targetItem.getId()); |
| | | }else { |
| | | return R.ok(new Page<>(curr,limit)); |
| | | } |
| | | |
| | | }else { |
| | | condition |
| | | .gt("delay", 0) |
| | | .or() |
| | | .isNotNull("delay_reason") |
| | | .and() |
| | | .ne("delay_reason", ""); |
| | | } |
| | | Page<ProjectPlan> projectPlanPage = projectPlanService.selectPage(new Page<>(curr, limit), condition); |
| | | return R.ok(projectPlanPage); |
| | | } |
| | | |
| | | /** |
| | | * 打印方法 |
| | | * @param param |
| | | * @return |
| | | */ |
| | | @RequestMapping("/projectPlan/diffProjects/export") |
| | | public R diffExport(@RequestBody JSONObject param){ |
| | | |
| | | // EntityWrapper<ProjectPlan> wrapper = new EntityWrapper<>(); |
| | | // hostEq(wrapper); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | // Map<String, Object> map = excludeTrash(param.getJSONObject("item")); |
| | | // convert(map, wrapper); |
| | | // List<ProjectPlan> projectPlans = projectPlanService.selectList(wrapper); |
| | | |
| | | Wrapper<ProjectPlan> condition = new EntityWrapper<ProjectPlan>() |
| | | .gt("delay", 0) |
| | | .or() |
| | | .isNotNull("delay_reason") |
| | | .and() |
| | | .ne("delay_reason", ""); |
| | | List<ProjectPlan> projectPlans = projectPlanService.selectList(condition); |
| | | return R.ok(exportSupport(projectPlans, fields)); |
| | | } |
| | | |
| | | /** |
| | | * 返回所有节点类型给小杨写的前端 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/projectPlan/flowStatus") |
| | | public R flowStatus(){ |
| | | EntityWrapper<FlowStatus> wrapper = new EntityWrapper<>(); |
| | | wrapper.orderBy("weight_num"); |
| | | List<FlowStatus> flowStatuses = flowStatusService.selectList(wrapper); |
| | | |
| | | return R.ok().add(flowStatuses); |
| | | } |
| | | |
| | | /** |
| | | * 返回给小杨前端数据 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/projectPlan/toFront") |
| | | public R toFront(){ |
| | | List<Item> items = itemService.selectList(new EntityWrapper<Item>() |
| | | .eq("status","1")); |
| | | List<ItemsDTO> itemsDTOs = new ArrayList<>(); |
| | | for (Item item : items) { |
| | | ItemsDTO itemsDTO = new ItemsDTO(); |
| | | |
| | | itemsDTO.setId(item.getName()); |
| | | itemsDTO.setStartDay(item.getStartTime()); |
| | | itemsDTO.setEndDay(item.getEndTime()); |
| | | List<ProjectPlan> allPlans = projectPlanService.selectList(new EntityWrapper<ProjectPlan>() |
| | | .eq("item_id", item.getId())); |
| | | for (ProjectPlan projectPlan : allPlans) { |
| | | projectPlan.setFlowName(projectPlan.getFlowId$()); |
| | | } |
| | | |
| | | itemsDTO.setNodes(allPlans); |
| | | itemsDTOs.add(itemsDTO); |
| | | } |
| | | return R.ok().add(itemsDTOs); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.common.DateUtils; |
| | | import zy.cloud.wms.manager.entity.Cstmr; |
| | | import zy.cloud.wms.manager.entity.ProjectType; |
| | | import zy.cloud.wms.manager.service.ProjectTypeService; |
| | | import com.core.annotations.ManagerAuth; |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 返回给前端点击下拉框的数据 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/type/auth") |
| | | public R getProjectType(){ |
| | | List<ProjectType> projectTypes = projectTypeService.selectList(null); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (ProjectType projectType : projectTypes) { |
| | | Map<String,Object> content = new HashMap<>(); |
| | | content.put("id",projectType.getId()); |
| | | content.put("value",projectType.getTypeName()); |
| | | result.add(content); |
| | | } |
| | | |
| | | |
| | | return R.ok(result); |
| | | } |
| | | } |
| | |
| | | package zy.cloud.wms.manager.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @NoArgsConstructor |
| | | @TableName("sys_flow_status") |
| | | public class FlowStatus implements Serializable { |
| | | |
| | |
| | | @ApiModelProperty(value= "") |
| | | private String str3; |
| | | |
| | | public FlowStatus() {} |
| | | @TableField("weight_num") |
| | | private Integer weightNum; |
| | | |
| | | public FlowStatus(Integer type,String name,String memo,String str1,String str2,String str3) { |
| | | this.type = type; |
| | | this.name = name; |
| | | this.memo = memo; |
| | | this.str1 = str1; |
| | | this.str2 = str2; |
| | | this.str3 = str3; |
| | | } |
| | | |
| | | // FlowStatus flowStatus = new FlowStatus( |
| | | // null, // 节点类型 |
New file |
| | |
| | | package zy.cloud.wms.manager.entity; |
| | | |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @NoArgsConstructor |
| | | public class FlowsDTO { |
| | | private String name; |
| | | private Date deadline; |
| | | private Date realDeadline; |
| | | private int extraDay; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import zy.cloud.wms.manager.service.CstmrService; |
| | | import zy.cloud.wms.manager.service.ProjectTypeService; |
| | | import zy.cloud.wms.system.entity.Host; |
| | | import zy.cloud.wms.system.entity.User; |
| | | import zy.cloud.wms.system.service.HostService; |
| | |
| | | /** |
| | | * 状态 1: 正常 0: 禁用 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 禁用 ") |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 完结 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | |
| | | @TableField("duty_man") |
| | | private String dutyMan; |
| | | |
| | | @TableField("origin_area") |
| | | private String originArea; |
| | | |
| | | public Item() {} |
| | | |
| | | |
| | |
| | | public String getUuid() { |
| | | return uuid; |
| | | } |
| | | |
| | | |
| | | public void setUuid(String uuid) { |
| | | this.uuid = uuid; |
| | |
| | | case 1: |
| | | return "正常"; |
| | | case 0: |
| | | return "禁用"; |
| | | return "完结"; |
| | | default: |
| | | return String.valueOf(this.status); |
| | | } |
| | |
| | | } |
| | | return null; |
| | | } |
| | | public String getCstmrUuid$(){ |
| | | CstmrService bean = SpringUtils.getBean(CstmrService.class); |
| | | Cstmr id = bean.selectOne(new EntityWrapper<Cstmr>() |
| | | .eq("id", this.cstmrUuid)); |
| | | if (!Cools.isEmpty(id)) { |
| | | return id.getName(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getType$(){ |
| | | ProjectTypeService bean = SpringUtils.getBean(ProjectTypeService.class); |
| | | ProjectType id = bean.selectOne(new EntityWrapper<ProjectType>() |
| | | .eq("id", this.type)); |
| | | if (!Cools.isEmpty(id)) { |
| | | return id.getTypeName(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setUpdateBy(Long updateBy) { |
| | | this.updateBy = updateBy; |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package zy.cloud.wms.manager.entity; |
| | | |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @NoArgsConstructor |
| | | public class ItemsDTO { |
| | | private String id; |
| | | private Date startDay; |
| | | private Date endDay; |
| | | private List<ProjectPlan> nodes; |
| | | } |
| | |
| | | package zy.cloud.wms.manager.entity; |
| | | |
| | | import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import zy.cloud.wms.manager.service.FlowStatusService; |
| | | import zy.cloud.wms.manager.service.ItemService; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | |
| | | // null, // 修改人id |
| | | // null // 节点名称 |
| | | // ); |
| | | |
| | | |
| | | public Long getId() { |
| | | return id; |
| | |
| | | this.flowName = flowName; |
| | | } |
| | | |
| | | public String getItemId$(){ |
| | | ItemService itemService = SpringUtils.getBean(ItemService.class); |
| | | Item id = itemService.selectOne(new EntityWrapper<Item>() |
| | | .eq("id", this.getItemId())); |
| | | if (!Cools.isEmpty(id)) { |
| | | |
| | | return id.getName(); |
| | | }else { |
| | | return null; |
| | | } |
| | | } |
| | | public String getFlowId$(){ |
| | | FlowStatusService bean = SpringUtils.getBean(FlowStatusService.class); |
| | | FlowStatus id = bean.selectOne(new EntityWrapper<FlowStatus>() |
| | | .eq("id", this.flowId)); |
| | | if (!Cools.isEmpty(id)) { |
| | | return id.getName(); |
| | | } |
| | | return null; |
| | | } |
| | | } |
| | |
| | | package zy.cloud.wms.manager.mapper; |
| | | |
| | | import org.apache.ibatis.annotations.Insert; |
| | | import org.apache.ibatis.annotations.Options; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import zy.cloud.wms.manager.entity.Item; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | |
| | | @Repository |
| | | public interface ItemMapper extends BaseMapper<Item> { |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | Item selectByName(String name); |
| | | |
| | | void insertAll(Item item); |
| | | } |
| | |
| | | package zy.cloud.wms.manager.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import zy.cloud.wms.manager.entity.FlowStatus; |
| | | import zy.cloud.wms.manager.entity.ProjectPlan; |
| | | import zy.cloud.wms.manager.entity.ProjectType; |
| | | import zy.cloud.wms.manager.mapper.ItemMapper; |
| | | import zy.cloud.wms.manager.entity.Item; |
| | | import zy.cloud.wms.manager.service.FlowStatusService; |
| | | import zy.cloud.wms.manager.service.ItemService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | import zy.cloud.wms.manager.service.ProjectPlanService; |
| | | import zy.cloud.wms.manager.service.ProjectTypeService; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Service("itemService") |
| | | public class ItemServiceImpl extends ServiceImpl<ItemMapper, Item> implements ItemService { |
| | | @Autowired |
| | | private ProjectPlanService planService; |
| | | @Autowired |
| | | private FlowStatusService flowStatusService; |
| | | |
| | | @Override |
| | | public Item selectByName(String name) { |
| | |
| | | item.setName(name); |
| | | return this.selectOne(new EntityWrapper<>(item)); |
| | | } |
| | | |
| | | @Transactional |
| | | @Override |
| | | public void insertAll(Item item) { |
| | | this.insert(item); |
| | | List<FlowStatus> allTypes = flowStatusService.selectList(new EntityWrapper<FlowStatus>() |
| | | .eq("type", item.getType()) |
| | | .orderBy("weight_num",true)); |
| | | for (FlowStatus oneType : allTypes) { |
| | | ProjectPlan projectPlan = new ProjectPlan(); |
| | | projectPlan.setItemId(item.getId()); |
| | | projectPlan.setWeightNum(oneType.getWeightNum()); |
| | | projectPlan.setFlowId(oneType.getId()); |
| | | projectPlan.setStartTime(item.getStartTime()); |
| | | projectPlan.setEndTime(item.getEndTime()); |
| | | projectPlan.setRealStartTime(null); |
| | | projectPlan.setRealEndTime(null); |
| | | projectPlan.setCreateId(item.getCreateBy()); |
| | | projectPlan.setCreateTime(item.getCreateTime()); |
| | | projectPlan.setModifyId(item.getUpdateBy()); |
| | | projectPlan.setModifyTime(item.getUpdateTime()); |
| | | planService.insert(projectPlan); |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | @RequestMapping(value = "/user/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | public R list(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam Map<String, Object> param) { |
| | | excludeTrash(param); |
| | | EntityWrapper<User> wrapper = new EntityWrapper<>(); |
| | | convert(param, wrapper); |
| | |
| | | return R.ok(userService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper) { |
| | | for (Map.Entry<String, Object> entry : map.entrySet()) { |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | if (val.contains(RANGE_TIME_LINK)) { |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | |
| | | @ManagerAuth(memo = "系统用户添加") |
| | | public R add(User user) { |
| | | user.setNickname(user.getUsername()); |
| | | if (userService.selectCount(new EntityWrapper<User>().eq("mobile", user.getMobile()))>0) { |
| | | if (userService.selectCount(new EntityWrapper<User>().eq("mobile", user.getMobile())) > 0) { |
| | | return R.error("手机号已存在"); |
| | | } |
| | | user.setStatus(1); |
| | |
| | | |
| | | @RequestMapping(value = "/user/update/auth") |
| | | @ManagerAuth(memo = "系统用户修改") |
| | | public R update(User user){ |
| | | if (Cools.isEmpty(user) || null==user.getId()){ |
| | | public R update(User user) { |
| | | if (Cools.isEmpty(user) || null == user.getId()) { |
| | | return R.error(); |
| | | } |
| | | int count = userService.selectCount(new EntityWrapper<User>().ne("id", user.getId()).eq("username", user.getUsername())); |
| | |
| | | @RequestMapping(value = "/user/delete/auth") |
| | | @ManagerAuth |
| | | @Transactional |
| | | public R deleteBatch(@RequestParam(value = "ids[]") Long[] ids){ |
| | | if (Cools.isEmpty((Object) ids)){ |
| | | public R deleteBatch(@RequestParam(value = "ids[]") Long[] ids) { |
| | | if (Cools.isEmpty((Object) ids)) { |
| | | return R.error(); |
| | | } |
| | | for (Long id : ids){ |
| | | for (Long id : ids) { |
| | | if (!userService.deleteById(id)) { |
| | | throw new CoolException("服务器错误,请联系管理员"); |
| | | } |
| | |
| | | |
| | | @RequestMapping(value = "/user/export/auth") |
| | | @ManagerAuth(memo = "系统用户导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<User> wrapper = new EntityWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("user")); |
| | |
| | | wrapper.like("username", condition); |
| | | Page<User> page = userService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (User user : page.getRecords()){ |
| | | for (User user : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", user.getId()); |
| | | map.put("value", user.getNickname()); |
| | |
| | | return R.ok(result); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | defaultOption.title = ""; |
| | | selectDom.appendChild(defaultOption); |
| | | selectDom.style.display='none'; |
| | | |
| | | $.ajax({ |
| | | |
| | | url: baseUrl+"/"+getForeignKeyQuery(val)+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {condition: inputDomVal}, |
| | |
| | | var list = res.data; |
| | | for (var i=0;i<list.length;i++){ |
| | | var option = new Option(list[i].value, i); |
| | | |
| | | option.title = list[i].id; |
| | | selectDom.options[i+1] = option; |
| | | } |
New file |
| | |
| | | var pageCurr; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'admin'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | var admin = layui.admin; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#item', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/projectPlan/diffProjects', |
| | | // url: baseUrl+'/projectPlan/list/auth', |
| | | page: true, |
| | | limit: 16, |
| | | limits: [16, 30, 50, 100, 200, 500], |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | // ,{field: 'id', align: 'center',title: '唯一ID'} |
| | | ,{field: 'itemId$', align: 'center',title: '项目名称'} |
| | | ,{field: 'flowName', align: 'center',title: '节点名称'} |
| | | // ,{field: 'weightNum', align: 'center',title: '权重值'} |
| | | // ,{field: 'flowId', align: 'center',title: '节点ID'} |
| | | ,{field: 'delay', align: 'center',title: '延期天数'} |
| | | ,{field: 'delayReason', align: 'center',title: '延期原因'} |
| | | ,{field: 'dutyDepartment', align: 'center',title: '责任部门'} |
| | | ,{field: 'dutyMan', align: 'center',title: '责任人'} |
| | | ,{field: 'startTime$', align: 'center',title: '计划开始时间'} |
| | | ,{field: 'endTime$', align: 'center',title: '计划结束时间'} |
| | | ,{field: 'realStartTime$', align: 'center',title: '实际开始时间'} |
| | | ,{field: 'realEndTime$', align: 'center',title: '实际结束时间'} |
| | | ,{field: 'memo', align: 'center',title: '备注'} |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:150} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(item)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: 1} |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(item)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id).data; |
| | | switch(obj.event) { |
| | | case 'addData': |
| | | showEditModel(); |
| | | break; |
| | | case 'deleteData': |
| | | if (checkStatus.length === 0) { |
| | | layer.msg('请选择要删除的数据', {icon: 2}); |
| | | return; |
| | | } |
| | | var ids = checkStatus.map(function (d) { |
| | | return d.id; |
| | | }); |
| | | del(ids); |
| | | break; |
| | | case 'exportData': |
| | | layer.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'item': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/projectPlan/diffProjects/export", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles,res.data,'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(item)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'edit': |
| | | showEditModel(data); |
| | | break; |
| | | case "del": |
| | | var ids = [data.id]; |
| | | del(ids); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | /* 弹窗 - 新增、修改 */ |
| | | function showEditModel(mData) { |
| | | admin.open({ |
| | | type: 1, |
| | | area: '600px', |
| | | title: (mData ? '修改' : '添加') + '订单状态', |
| | | content: $('#editDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | layDateRender(); |
| | | form.val('detail', mData); |
| | | form.on('submit(editSubmit)', function (data) { |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/item/"+(mData?'update':'add')+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: data.field, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.close(dIndex); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | return false; |
| | | }); |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | layui.form.render('select'); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /* 删除 */ |
| | | function del(ids) { |
| | | layer.confirm('确定要删除选中数据吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/item/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {ids: ids}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | // 搜索 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 重置 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | function layDateRender() { |
| | | layDate.render({ |
| | | elem: '#startTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#endTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#createTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#updateTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#realStartTime\\$' |
| | | ,type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#realEndTime\\$' |
| | | ,type: 'datetime' |
| | | }); |
| | | } |
| | | layDateRender(); |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | |
| | | }); |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: pageCurr} |
| | | }); |
| | | } |
| | |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'id', align: 'center',title: '唯一id'} |
| | | ,{field: 'id', align: 'center',title: '唯一id',width: 100} |
| | | ,{field: 'type', align: 'center',title: '节点类型', hide:true} |
| | | ,{field: 'weightNum', align: 'center',title: '权重值', width: 100} |
| | | ,{field: 'name', align: 'center',title: '节点名称'} |
| | | ,{field: 'memo', align: 'center',title: '备注', width: 100} |
| | | |
| | | ,{field: 'memo', align: 'center',title: '备注', width: 300} |
| | | // ,{field: 'str1', align: 'center',title: ''} |
| | | // ,{field: 'str2', align: 'center',title: ''} |
| | | // ,{field: 'str3', align: 'center',title: ''} |
| | |
| | | ,{field: 'name', align: 'center',title: '项目名称'} |
| | | ,{field: 'inUuid', align: 'center',title: '内部编号', hide: true} |
| | | // ,{field: 'cstmrUuid', align: 'center',title: '客户编号'} |
| | | ,{field: 'cstmr', align: 'center',title: '客户名称'} |
| | | ,{field: 'cstmrUuid$', align: 'center',title: '客户名称'} |
| | | // ,{field: 'member', align: 'center',title: '项目成员'} |
| | | // ,{field: 'leader', align: 'center',title: '项目经理'} |
| | | ,{field: 'startTime$', align: 'center',title: '计划开始时间'} |
| | | ,{field: 'endTime$', align: 'center',title: '计划结束时间'} |
| | | ,{field: 'realStartTime', align: 'center', title: '实际开始时间'} |
| | | ,{field: 'realEndTime', align: 'center', title: '实际结束时间'} |
| | | ,{field: 'type', align: 'center', title: '项目类型'} |
| | | ,{field: 'type$', align: 'center', title: '项目类型'} |
| | | ,{field: 'originArea', align: 'center', title: '生产地'} |
| | | ,{field: 'realMonth', align: 'center', title: '时间跨度(月)'} |
| | | ,{field: 'dutyMan', align: 'center', title: '责任人'} |
| | | ,{field: 'dutyDepartment', align: 'center', title: '责任部门'} |
| | | // ,{field: 'status$', align: 'center',title: '状态'} |
| | | ,{field: 'status$', align: 'center',title: '状态'} |
| | | // ,{field: 'createBy$', align: 'center',title: '添加人员'} |
| | | // ,{field: 'createTime$', align: 'center',title: '添加时间'} |
| | | // ,{field: 'updateBy$', align: 'center',title: '修改人员'} |
| | |
| | | layDateRender(); |
| | | form.val('detail', mData); |
| | | form.on('submit(editSubmit)', function (data) { |
| | | |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/item/"+(mData?'update':'add')+"/auth", |
| | |
| | | }, |
| | | |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | {type: 'checkbox', hide:true} |
| | | // ,{field: 'id', align: 'center',title: '唯一ID'} |
| | | // ,{field: 'itemId', align: 'center',title: '项目ID'} |
| | | ,{field: 'flowName', align: 'center',title: '节点名称'} |
| | | ,{field: 'flowId$', align: 'center',title: '节点名称'} |
| | | ,{field: 'weightNum', align: 'center',title: '权重值'} |
| | | // ,{field: 'flowId', align: 'center',title: '节点ID'} |
| | | |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | </head> |
| | | <body> |
| | | |
| | | <!-- 搜索栏 --> |
| | | <div id="search-box" class="layui-form layui-card-header"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="id" placeholder="请输入" autocomplete="off"> |
| | | </div> |
| | | |
| | | </div> |
| | | <!-- <div class="layui-inline">--> |
| | | <!-- <div class="layui-input-inline">--> |
| | | <!-- <input class="layui-input" type="text" name="condition" placeholder="请输入" autocomplete="off">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- 待添加 --> |
| | | <div id="data-search-btn" class="layui-btn-container layui-form-item"> |
| | | <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">搜索</button> |
| | | <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">重置</button> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 表格 --> |
| | | <div class="layui-form"> |
| | | <table class="layui-hide" id="item" lay-filter="item"></table> |
| | | </div> |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <!-- <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button>--> |
| | | <!-- <button class="layui-btn layui-btn-sm" id="btn-delete" lay-event="deleteData">删除</button>--> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="margin-top: 10px">导出</button> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/diff/diff.js" charset="utf-8"></script> |
| | | </body> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | | <form id="detail" lay-filter="detail" class="layui-form admin-form"> |
| | | <input name="id" type="hidden"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">项目编号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="uuid" placeholder="请输入项目编号" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">项目名称: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="name" placeholder="请输入项目名称" lay-vertype="tips" 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" name="inUuid" placeholder="请输入内部编号"> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">客户编号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="cstmrUuid" placeholder="请输入客户名称" lay-vertype="tips" 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" name="cstmr" placeholder="请输入客户">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">计划开始时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="startTime" id="startTime$" placeholder="请输入开始时间" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">计划结束时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="endTime" id="endTime$" placeholder="请输入结束时间" lay-vertype="tips" 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" name="realStartTime" id="realStartTime$" placeholder="可空填,等待真实项目启动再填"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">实际结束时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="realEndTime" id="realEndTime$" placeholder="可空填,等待真实项目结束再填"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">项目类型: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="type" placeholder="请输入项目类型" lay-vertype="tips" lay-verify="required" type="number"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">状态: </label> |
| | | <div class="layui-input-block"> |
| | | <select name="status"> |
| | | <option value="">请选择状态</option> |
| | | <option value="1">正常</option> |
| | | <option value="0">禁用</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">时间跨度: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="realMonth" id="realMonth$" placeholder="填写数字月份" type="number"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">责任人: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="dutyMan" id="dutyMan$" placeholder="请输入责任人"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">责任部门: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="dutyDepartment" id="dutyDepartment$" placeholder="请输入责任部门"> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- <div class="layui-form-item">--> |
| | | <!-- <label class="layui-form-label">添加人员: </label>--> |
| | | <!-- <div class="layui-input-block cool-auto-complete">--> |
| | | <!-- <input class="layui-input" name="createBy" placeholder="请输入添加人员" style="display: none">--> |
| | | <!-- <input id="createBy$" 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="userQueryBycreateBy" onkeyup="autoLoad(this.getAttribute('data-key'))">--> |
| | | <!-- <select class="cool-auto-complete-window-select" data-key="userQueryBycreateBySelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple">--> |
| | | <!-- </select>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | |
| | | <!-- <div class="layui-form-item">--> |
| | | <!-- <label class="layui-form-label">添加时间: </label>--> |
| | | <!-- <div class="layui-input-block">--> |
| | | <!-- <input class="layui-input" name="createTime" id="createTime$" placeholder="请输入添加时间">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">备注: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="memo" placeholder="请输入备注"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <hr class="layui-bg-gray"> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn" lay-filter="editSubmit" lay-submit="">保存</button> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | </html> |
| | | |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">权重值: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="weightNum" placeholder="请输入权重值" lay-verify="required" lay-vertype="tips" type="number"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">备注: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="memo" placeholder="请输入备注"> |
| | |
| | | <input class="layui-input" name="name" placeholder="请输入项目名称" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">内部编号: </label> |
| | | <div class="layui-input-block"> |
| | |
| | | </div> |
| | | |
| | | |
| | | <!-- <div class="layui-form-item">--> |
| | | <!-- <label class="layui-form-label layui-form-required">客户编号: </label>--> |
| | | <!-- <div class="layui-input-block">--> |
| | | <!-- <input class="layui-input" name="cstmrUuid" placeholder="请输入客户名称" lay-vertype="tips" lay-verify="required">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">客户编号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="cstmrUuid" placeholder="请输入客户名称" lay-vertype="tips" lay-verify="required"> |
| | | <label class="layui-form-label layui-form-required">客户名称: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input id="cstmrUuid" class="layui-input" name="cstmrUuid" placeholder="请输入客户名称" style="display: none" lay-vertype="tips" lay-verify="required"> |
| | | <input id="cstmrUuid$" 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="cstmrUuidBycstmrUuid" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="cstmrUuidBycstmrUuidSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- <div class="layui-form-item">--> |
| | | <!-- <label class="layui-form-label">客户: </label>--> |
| | | <!-- <div class="layui-input-block">--> |
| | |
| | | </div> |
| | | <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="type" placeholder="请输入客户名称" style="display: none" lay-vertype="tips" lay-verify="required"> |
| | | <!-- <input id="createBy$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入项目类型" onfocus=this.blur()>--> |
| | | <input id="type$" 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="typeBycreateBy" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="typeBycreateBySelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-form-item">--> |
| | | <!-- <label class="layui-form-label layui-form-required">项目类型: </label>--> |
| | | <!-- <div class="layui-input-block">--> |
| | | <!-- <input class="layui-input" name="type" placeholder="请输入项目类型" lay-vertype="tips" lay-verify="required" type="number">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">生产地: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="type" placeholder="请输入项目类型" lay-vertype="tips" lay-verify="required" type="number"> |
| | | <input class="layui-input" name="originArea" placeholder="请输入生产地" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | |
| | | <select name="status"> |
| | | <option value="">请选择状态</option> |
| | | <option value="1">正常</option> |
| | | <option value="0">禁用</option> |
| | | <option value="0">完结</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button> |
| | | <button class="layui-btn layui-btn-sm" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData">导出</button> |
| | | <!-- <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button>--> |
| | | <!-- <button class="layui-btn layui-btn-sm" id="btn-delete" lay-event="deleteData">删除</button>--> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="margin-top: 10px; margin-right:20px" >导出</button> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a> |
| | | <!-- <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a>--> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | |
| | | <!-- <input class="layui-input" name="itemId" placeholder="请输入项目ID" lay-vertype="tips" lay-verify="required">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">节点名称: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input id="flowId" class="layui-input" name="flowId" placeholder="请输入客户名称" style="display: none" lay-vertype="tips" lay-verify="required"> |
| | | <input id="flowId$" 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="flowIdByflowId" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="flowIdByflowIdSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">权重值: </label> |
| | | <div class="layui-input-block"> |
| | |
| | | lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">节点ID: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="flowId" placeholder="请输入节点ID" lay-vertype="tips" |
| | | lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-form-item">--> |
| | | <!-- <label class="layui-form-label layui-form-required">节点ID: </label>--> |
| | | <!-- <div class="layui-input-block">--> |
| | | <!-- <input class="layui-input" name="flowId" placeholder="请输入节点ID" lay-vertype="tips"--> |
| | | <!-- lay-verify="required">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">计划开始时间: </label> |
| | | <div class="layui-input-block"> |