New file |
| | |
| | | -- save flowStatus record |
| | | -- mysql |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'flowStatus/flowStatus.html', 'flowStatus管理', null , '2', null , '1'); |
| | | |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'flowStatus#view', '查询', '', '3', '0', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'flowStatus#btn-add', '新增', '', '3', '1', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'flowStatus#btn-edit', '编辑', '', '3', '2', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'flowStatus#btn-delete', '删除', '', '3', '3', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'flowStatus#btn-export', '导出', '', '3', '4', '1'); |
| | | |
| | | -- sqlserver |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'flowStatus/flowStatus.html', N'flowStatus管理', null, '2', null, '1'); |
| | | |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'flowStatus#view', N'查询', '', '3', '0', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'flowStatus#btn-add', N'新增', '', '3', '1', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'flowStatus#btn-edit', N'编辑', '', '3', '2', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'flowStatus#btn-delete', N'删除', '', '3', '3', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'flowStatus#btn-export', N'导出', '', '3', '4', '1'); |
| | |
| | | // generator.password="xltys1995"; |
| | | // generator.table="sys_host"; |
| | | // sqlserver |
| | | generator.url="localhost:1433;databasename=wms_saas"; |
| | | generator.url="localhost:1433;databasename=zypms"; |
| | | generator.username="sa"; |
| | | generator.password="sa@123"; |
| | | generator.table="man_receive_detl"; |
| | | generator.table="sys_flow_status"; |
| | | generator.packagePath="zy.cloud.wms.manager"; |
| | | generator.sqlOsType = SqlOsType.SQL_SERVER; |
| | | // generator.js = false; |
New file |
| | |
| | | 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 zy.cloud.wms.manager.entity.FlowStatus; |
| | | import zy.cloud.wms.manager.service.FlowStatusService; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import zy.cloud.wms.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class FlowStatusController extends BaseController { |
| | | |
| | | @Autowired |
| | | private FlowStatusService flowStatusService; |
| | | |
| | | @RequestMapping(value = "/flowStatus/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(flowStatusService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/flowStatus/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){ |
| | | EntityWrapper<FlowStatus> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(flowStatusService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | 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])); |
| | | } else { |
| | | wrapper.like(entry.getKey(), val); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/flowStatus/add/auth") |
| | | @ManagerAuth |
| | | public R add(FlowStatus flowStatus) { |
| | | flowStatusService.insert(flowStatus); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/flowStatus/update/auth") |
| | | @ManagerAuth |
| | | public R update(FlowStatus flowStatus){ |
| | | if (Cools.isEmpty(flowStatus) || null==flowStatus.getId()){ |
| | | return R.error(); |
| | | } |
| | | flowStatusService.updateById(flowStatus); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/flowStatus/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | flowStatusService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/flowStatus/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<FlowStatus> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("flowStatus")); |
| | | convert(map, wrapper); |
| | | List<FlowStatus> list = flowStatusService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/flowStatusQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<FlowStatus> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<FlowStatus> page = flowStatusService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (FlowStatus flowStatus : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", flowStatus.getId()); |
| | | map.put("value", flowStatus.getId()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/flowStatus/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<FlowStatus> wrapper = new EntityWrapper<FlowStatus>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != flowStatusService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(FlowStatus.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import zy.cloud.wms.system.entity.Host; |
| | | import zy.cloud.wms.system.entity.User; |
| | | import zy.cloud.wms.system.service.HostService; |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("man_cstmr") |
| | | public class Cstmr implements Serializable { |
| | | |
| | |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | @TableField("user_code") |
| | | private String userCode; |
| | | |
| | | public Cstmr() {} |
| | | |
| | | public Cstmr(Long hostId, String uuid,String name,String contacts,String tel,String addr,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | this.hostId = hostId; |
| | | this.uuid = uuid; |
| | | this.name = name; |
| | | this.contacts = contacts; |
| | | this.tel = tel; |
| | | this.addr = addr; |
| | | this.status = status; |
| | | this.createBy = createBy; |
| | | this.createTime = createTime; |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.memo = memo; |
| | | } |
| | | |
| | | |
| | | // Cstmr cstmr = new Cstmr( |
| | | // null, // 客户编号[非空] |
New file |
| | |
| | | package zy.cloud.wms.manager.entity; |
| | | |
| | | 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 io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @TableName("sys_flow_status") |
| | | public class FlowStatus implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 唯一id |
| | | */ |
| | | @ApiModelProperty(value= "唯一id") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 节点类型 |
| | | */ |
| | | @ApiModelProperty(value= "节点类型") |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 节点名称 |
| | | */ |
| | | @ApiModelProperty(value= "节点名称") |
| | | private String name; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | private String str1; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | private String str2; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | private String str3; |
| | | |
| | | public FlowStatus() {} |
| | | |
| | | 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, // 节点类型 |
| | | // null, // 节点名称 |
| | | // null, // 备注 |
| | | // null, // |
| | | // null, // |
| | | // null // |
| | | // ); |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Integer getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(Integer type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getMemo() { |
| | | return memo; |
| | | } |
| | | |
| | | public void setMemo(String memo) { |
| | | this.memo = memo; |
| | | } |
| | | |
| | | public String getStr1() { |
| | | return str1; |
| | | } |
| | | |
| | | public void setStr1(String str1) { |
| | | this.str1 = str1; |
| | | } |
| | | |
| | | public String getStr2() { |
| | | return str2; |
| | | } |
| | | |
| | | public void setStr2(String str2) { |
| | | this.str2 = str2; |
| | | } |
| | | |
| | | public String getStr3() { |
| | | return str3; |
| | | } |
| | | |
| | | public void setStr3(String str3) { |
| | | this.str3 = str3; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | 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.system.entity.Host; |
| | | import zy.cloud.wms.system.entity.User; |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("man_item") |
| | | public class Item implements Serializable { |
| | | |
| | |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | @TableField("type") |
| | | private String type; |
| | | |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @TableField("real_start_time") |
| | | private Date realStartTime; |
| | | |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @TableField("real_end_time") |
| | | private Date realEndTime; |
| | | |
| | | @TableField("real_month") |
| | | private Integer realMonth; |
| | | |
| | | @TableField("duty_department") |
| | | private String dutyDepartment; |
| | | |
| | | @TableField("duty_man") |
| | | private String dutyMan; |
| | | |
| | | public Item() {} |
| | | |
| | | public Item(Long hostId, String uuid,String name,String inUuid,String cstmrUuid,String cstmr,String member,String leader,Date startTime,Date endTime,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | this.hostId = hostId; |
| | | this.name = name; |
| | | this.inUuid = inUuid; |
| | | this.cstmrUuid = cstmrUuid; |
| | | this.cstmr = cstmr; |
| | | this.member = member; |
| | | this.leader = leader; |
| | | this.startTime = startTime; |
| | | this.endTime = endTime; |
| | | this.status = status; |
| | | this.createBy = createBy; |
| | | this.createTime = createTime; |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.memo = memo; |
| | | } |
| | | |
| | | |
| | | // Item item = new Item( |
| | | // null, // 项目编号[非空] |
New file |
| | |
| | | package zy.cloud.wms.manager.mapper; |
| | | |
| | | import zy.cloud.wms.manager.entity.FlowStatus; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface FlowStatusMapper extends BaseMapper<FlowStatus> { |
| | | |
| | | } |
New file |
| | |
| | | package zy.cloud.wms.manager.service; |
| | | |
| | | import zy.cloud.wms.manager.entity.FlowStatus; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | public interface FlowStatusService extends IService<FlowStatus> { |
| | | |
| | | } |
New file |
| | |
| | | package zy.cloud.wms.manager.service.impl; |
| | | |
| | | import zy.cloud.wms.manager.mapper.FlowStatusMapper; |
| | | import zy.cloud.wms.manager.entity.FlowStatus; |
| | | import zy.cloud.wms.manager.service.FlowStatusService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("flowStatusService") |
| | | public class FlowStatusServiceImpl extends ServiceImpl<FlowStatusMapper, FlowStatus> implements FlowStatusService { |
| | | |
| | | } |
| | |
| | | # password: xltys1995 |
| | | # sql-server |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | url: jdbc:sqlserver://localhost:1433;databasename=wms_saas |
| | | url: jdbc:sqlserver://localhost:1433;databasename=zypms |
| | | username: sa |
| | | password: sa@123 |
| | | mvc: |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="zy.cloud.wms.manager.mapper.FlowStatusMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="zy.cloud.wms.manager.entity.FlowStatus"> |
| | | <id column="id" property="id" /> |
| | | <result column="type" property="type" /> |
| | | <result column="name" property="name" /> |
| | | <result column="memo" property="memo" /> |
| | | <result column="str1" property="str1" /> |
| | | <result column="str2" property="str2" /> |
| | | <result column="str3" property="str3" /> |
| | | |
| | | </resultMap> |
| | | |
| | | </mapper> |
| | |
| | | {type: 'checkbox'} |
| | | // ,{field: 'id', align: 'center',title: 'ID'} |
| | | // ,{field: 'uuid', align: 'center',title: '客户编号'} |
| | | ,{field: 'userCode', align: "center", title: '客户代码'} |
| | | ,{field: 'name', align: 'center',title: '客户名称'} |
| | | ,{field: 'contacts', align: 'center',title: '联系人'} |
| | | ,{field: 'tel', align: 'center',title: '联系电话'} |
| | |
| | | // ,{field: 'status$', align: 'center',title: '状态'} |
| | | // ,{field: 'createBy$', align: 'center',title: '添加人员',event: 'createBy', style: 'cursor:pointer'} |
| | | // ,{field: 'createTime$', align: 'center',title: '添加时间'} |
| | | ,{field: 'updateBy$', align: 'center',title: '修改人员'} |
| | | ,{field: 'updateTime$', align: 'center',title: '修改时间'} |
| | | // ,{field: 'updateBy$', align: 'center',title: '修改人员'} |
| | | // ,{field: 'updateTime$', align: 'center',title: '修改时间'} |
| | | ,{field: 'memo', align: 'center',title: '备注'} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:150} |
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: '#flowStatus', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/flowStatus/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: 'type', align: 'center',title: '节点类型'} |
| | | ,{field: 'name', align: 'center',title: '节点名称'} |
| | | ,{field: 'memo', align: 'center',title: '备注'} |
| | | ,{field: 'str1', align: 'center',title: ''} |
| | | ,{field: 'str2', align: 'center',title: ''} |
| | | ,{field: 'str3', 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(flowStatus)', 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(flowStatus)', 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 = { |
| | | 'flowStatus': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/flowStatus/export/auth", |
| | | 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(flowStatus)', 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+"/flowStatus/"+(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+"/flowStatus/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() { |
| | | |
| | | } |
| | | 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: 'hostId', align: 'center',title: ''} |
| | | // ,{field: 'id', align: 'center',title: 'ID'} |
| | | // ,{field: 'hostId', align: 'center',title: ''} |
| | | ,{field: 'uuid', align: 'center',title: '项目编号'} |
| | | ,{field: 'name', align: 'center',title: '项目名称'} |
| | | ,{field: 'inUuid', align: 'center',title: '内部编号'} |
| | | ,{field: 'cstmrUuid', align: 'center',title: '客户编号'} |
| | | // ,{field: 'inUuid', align: 'center',title: '内部编号'} |
| | | // ,{field: 'cstmrUuid', align: 'center',title: '客户编号'} |
| | | ,{field: 'cstmr', align: 'center',title: '客户'} |
| | | ,{field: 'member', align: 'center',title: '项目成员'} |
| | | ,{field: 'leader', align: 'center',title: '项目经理'} |
| | | // ,{field: 'member', align: 'center',title: '项目成员'} |
| | | // ,{field: 'leader', align: 'center',title: '项目经理'} |
| | | ,{field: 'startTime$', align: 'center',title: '开始时间'} |
| | | ,{field: 'realStartTime', align: 'center', title: '真实开始时间'} |
| | | ,{field: 'endTime$', align: 'center',title: '结束时间'} |
| | | ,{field: 'status$', align: 'center',title: '状态'} |
| | | ,{field: 'createBy$', align: 'center',title: '添加人员'} |
| | | ,{field: 'createTime$', align: 'center',title: '添加时间'} |
| | | ,{field: 'updateBy$', align: 'center',title: '修改人员'} |
| | | ,{field: 'updateTime$', align: 'center',title: '修改时间'} |
| | | ,{field: 'realEndTime', align: 'center', title: '真实结束时间'} |
| | | ,{field: 'type', align: 'center', title: '项目类型'} |
| | | ,{field: 'realMonth', align: 'center', title: '时间跨度(月)'} |
| | | ,{field: 'dutyMan', align: 'center', title: '责任人'} |
| | | ,{field: 'dutyDepartment', align: 'center', title: '责任部门'} |
| | | // ,{field: 'status$', align: 'center',title: '状态'} |
| | | // ,{field: 'createBy$', align: 'center',title: '添加人员'} |
| | | // ,{field: 'createTime$', align: 'center',title: '添加时间'} |
| | | // ,{field: 'updateBy$', align: 'center',title: '修改人员'} |
| | | // ,{field: 'updateTime$', align: 'center',title: '修改时间'} |
| | | ,{field: 'memo', align: 'center',title: '备注'} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:150} |
| | |
| | | elem: '#updateTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | |
| | | layDate.render({ |
| | | elem: '#realStartTime\\$' |
| | | ,type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#realEndTime\\$' |
| | | ,type: 'datetime' |
| | | }); |
| | | } |
| | | layDateRender(); |
| | | |
| | |
| | | <div class="layui-row"> |
| | | <div class="layui-col-md6"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label"> |
| | | 客户代号: |
| | | </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="userCode" placeholder="请输入客户代号(英文)"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">客户名称: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="name" placeholder="请输入客户名称"> |
| | |
| | | <input class="layui-input" name="contacts" placeholder="请输入联系人"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">联系电话: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="tel" placeholder="请输入联系电话"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="layui-col-md6"> |
| | | <div class="layui-form-item"> |
| | |
| | | <input class="layui-input" name="memo" placeholder="请输入备注"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">联系电话: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="tel" placeholder="请输入联系电话"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <hr class="layui-bg-gray"> |
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 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="flowStatus" lay-filter="flowStatus"></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">导出</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/flowStatus/flowStatus.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">节点类型: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="type" placeholder="请输入节点类型"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">节点名称: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="name" 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 class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="str1" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="str2" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="str3" 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">项目成员: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="member" placeholder="请输入项目成员"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">项目经理: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="leader" placeholder="请输入项目经理"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">开始时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="startTime" id="startTime$" placeholder="请输入开始时间"> |
| | | </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="endTime" id="endTime$" 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"> |
| | |
| | | <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"> |
| | |
| | | </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 cool-auto-complete"> |
| | | <input class="layui-input" name="updateBy" placeholder="请输入修改人员" style="display: none"> |
| | | <input id="updateBy$" 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="userQueryByupdateBy" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryByupdateBySelect" 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="updateTime" id="updateTime$" placeholder="请输入修改时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | |
| | | <input class="layui-input" name="memo" placeholder="请输入备注"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <hr class="layui-bg-gray"> |