¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.stylefeng.guns.modular.zsx.kb.formula.controller; |
| | | |
| | | import cn.stylefeng.guns.modular.zsx.kb.utils.IPUtil; |
| | | import cn.stylefeng.guns.modular.zsx.pm.salesOrder.service.SalesOrderService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.net.*; |
| | | import java.util.Enumeration; |
| | | import java.util.Set; |
| | | |
| | | |
| | | @Controller |
| | | @RequestMapping("/kb/formulaView") |
| | | public class FormulaKbController { |
| | | private String PREFIX = "/modular/kb/formula"; |
| | | |
| | | /** |
| | | * 跳转å°ä¸»é¡µé¢ |
| | | * |
| | | * @author ruimin |
| | | * @Date 2023-08-26 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "/formulaView.html"; |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | try { |
| | | Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces(); |
| | | while (networkInterfaces.hasMoreElements()) { |
| | | NetworkInterface networkInterface = networkInterfaces.nextElement(); |
| | | Enumeration<InetAddress> inetAddresses = networkInterface.getInetAddresses(); |
| | | while (inetAddresses.hasMoreElements()) { |
| | | InetAddress inetAddress = inetAddresses.nextElement(); |
| | | if (inetAddress instanceof Inet4Address) { // è¿æ»¤IPv4å°å |
| | | System.out.println(inetAddress.getHostAddress()); |
| | | } |
| | | } |
| | | } |
| | | } catch (SocketException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.stylefeng.guns.modular.zsx.kb.utils; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | /** |
| | | * @Author: ll |
| | | * @Date: 2021/4/1 9:20 |
| | | * @Version 1.0 |
| | | */ |
| | | public class IPUtil { |
| | | //è·åipå°å |
| | | public static String getRealIp(HttpServletRequest request) { |
| | | String ip = request.getHeader("x-forwarded-for"); |
| | | System.out.println("x-forwarded-for ip: " + ip); |
| | | if (ip != null && ip.length() != 0 && !"unknown".equalsIgnoreCase(ip)) { |
| | | // å¤æ¬¡åå代çåä¼æå¤ä¸ªipå¼ï¼ç¬¬ä¸ä¸ªipææ¯çå®ip |
| | | if( ip.indexOf(",")!=-1 ){ |
| | | ip = ip.split(",")[0]; |
| | | } |
| | | } |
| | | if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { |
| | | ip = request.getHeader("Proxy-Client-IP"); |
| | | } |
| | | if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { |
| | | ip = request.getHeader("WL-Proxy-Client-IP"); |
| | | } |
| | | if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { |
| | | ip = request.getHeader("HTTP_CLIENT_IP"); |
| | | } |
| | | if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { |
| | | ip = request.getHeader("HTTP_X_FORWARDED_FOR"); |
| | | } |
| | | if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { |
| | | ip = request.getHeader("X-Real-IP"); |
| | | } |
| | | if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { |
| | | ip = request.getRemoteAddr(); |
| | | } |
| | | return ip; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.stylefeng.guns.modular.zsx.sys.kanbanConf.controller; |
| | | |
| | | import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo; |
| | | import cn.stylefeng.guns.modular.zsx.kb.utils.IPUtil; |
| | | import cn.stylefeng.guns.modular.zsx.sys.kanbanConf.entity.KanbanConf; |
| | | import cn.stylefeng.guns.modular.zsx.sys.kanbanConf.model.params.KanbanConfParam; |
| | | import cn.stylefeng.guns.modular.zsx.sys.kanbanConf.service.KanbanConfService; |
| | | import cn.stylefeng.roses.core.base.controller.BaseController; |
| | | import cn.stylefeng.roses.kernel.model.response.ResponseData; |
| | | import cn.stylefeng.roses.core.mutidatasource.annotion.DataSource; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | |
| | | /** |
| | | * çæ¿é
ç½®æ§å¶å¨ |
| | | * |
| | | * @author ruimin |
| | | * @Date 2023-10-08 15:23:17 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/kanbanConf") |
| | | public class KanbanConfController extends BaseController { |
| | | |
| | | private String PREFIX = "/modular/sys/kanbanConf"; |
| | | |
| | | @Autowired |
| | | private KanbanConfService kanbanConfService; |
| | | |
| | | /** |
| | | * 跳转å°ä¸»é¡µé¢ |
| | | * |
| | | * @author ruimin |
| | | * @Date 2023-10-08 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "/kanbanConf.html"; |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢é¡µé¢ |
| | | * |
| | | * @author ruimin |
| | | * @Date 2023-10-08 |
| | | */ |
| | | @RequestMapping("/add") |
| | | public String add() { |
| | | return PREFIX + "/kanbanConf_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾é¡µé¢ |
| | | * |
| | | * @author ruimin |
| | | * @Date 2023-10-08 |
| | | */ |
| | | @RequestMapping("/edit") |
| | | public String edit() { |
| | | return PREFIX + "/kanbanConf_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢æ¥å£ |
| | | * |
| | | * @author ruimin |
| | | * @Date 2023-10-08 |
| | | */ |
| | | @RequestMapping("/addItem") |
| | | @ResponseBody |
| | | @DataSource(name = "self") |
| | | public ResponseData addItem(KanbanConfParam kanbanConfParam) { |
| | | this.kanbanConfService.add(kanbanConfParam); |
| | | return ResponseData.success(); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾æ¥å£ |
| | | * |
| | | * @author ruimin |
| | | * @Date 2023-10-08 |
| | | */ |
| | | @RequestMapping("/editItem") |
| | | @ResponseBody |
| | | @DataSource(name = "self") |
| | | public ResponseData editItem(KanbanConfParam kanbanConfParam) { |
| | | this.kanbanConfService.update(kanbanConfParam); |
| | | return ResponseData.success(); |
| | | } |
| | | |
| | | /** |
| | | * å é¤æ¥å£ |
| | | * |
| | | * @author ruimin |
| | | * @Date 2023-10-08 |
| | | */ |
| | | @RequestMapping("/delete") |
| | | @ResponseBody |
| | | @DataSource(name = "self") |
| | | public ResponseData delete(KanbanConfParam kanbanConfParam) { |
| | | this.kanbanConfService.delete(kanbanConfParam); |
| | | return ResponseData.success(); |
| | | } |
| | | |
| | | /** |
| | | * æ¥ç详æ
æ¥å£ |
| | | * |
| | | * @author ruimin |
| | | * @Date 2023-10-08 |
| | | */ |
| | | @RequestMapping("/detail") |
| | | @ResponseBody |
| | | @DataSource(name = "self") |
| | | public ResponseData detail(KanbanConfParam kanbanConfParam) { |
| | | KanbanConf detail = this.kanbanConfService.getById(kanbanConfParam.getId()); |
| | | return ResponseData.success(detail); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å表 |
| | | * |
| | | * @author ruimin |
| | | * @Date 2023-10-08 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping("/list") |
| | | @DataSource(name = "self") |
| | | public LayuiPageInfo list(KanbanConfParam kanbanConfParam) { |
| | | return this.kanbanConfService.findPageBySpec(kanbanConfParam); |
| | | } |
| | | |
| | | @RequestMapping("/ipSetting") |
| | | @ResponseBody |
| | | @DataSource(name = "self") |
| | | public ResponseData ipSetting(KanbanConfParam kanbanConfParam, HttpServletRequest request) { |
| | | String realIp = IPUtil.getRealIp(request); |
| | | KanbanConf kanbanConf = new KanbanConf(); |
| | | KanbanConf ipAddress = this.kanbanConfService.getOne(new QueryWrapper<KanbanConf>().eq("ip_address", realIp)); |
| | | if(ipAddress == null){ |
| | | kanbanConf.setLineCode(kanbanConfParam.getLineCode()); |
| | | kanbanConf.setLocationCode(kanbanConfParam.getLocationCode()); |
| | | kanbanConf.setIpAddress(realIp); |
| | | this.kanbanConfService.save(kanbanConf); |
| | | }else { |
| | | kanbanConf.setLineCode(kanbanConfParam.getLineCode()); |
| | | kanbanConf.setLocationCode(kanbanConfParam.getLocationCode()); |
| | | this.kanbanConfService.update(kanbanConf,new QueryWrapper<KanbanConf>().eq("ip_address", realIp)); |
| | | } |
| | | return ResponseData.success(); |
| | | } |
| | | |
| | | @RequestMapping("/initIpConf") |
| | | @ResponseBody |
| | | @DataSource(name = "self") |
| | | public ResponseData initIpConf(HttpServletRequest request) { |
| | | String realIp = IPUtil.getRealIp(request); |
| | | KanbanConf ipAddress = this.kanbanConfService.getOne(new QueryWrapper<KanbanConf>().eq("ip_address", realIp)); |
| | | return ResponseData.success(ipAddress); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.stylefeng.guns.modular.zsx.sys.kanbanConf.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * çæ¿é
ç½® |
| | | * </p> |
| | | * |
| | | * @author ruimin |
| | | * @since 2023-10-08 |
| | | */ |
| | | @TableName("sys_kanban_conf") |
| | | public class KanbanConf implements Serializable { |
| | | |
| | | private static final long serialVersionUID=1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @TableId(value = "id", type = IdType.ID_WORKER) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 页é¢ç¼å· |
| | | */ |
| | | @TableField("page_code") |
| | | private String pageCode; |
| | | |
| | | /** |
| | | * ipå°å |
| | | */ |
| | | @TableField("ip_address") |
| | | private String ipAddress; |
| | | |
| | | /** |
| | | * MACå°å |
| | | */ |
| | | @TableField("mac_address") |
| | | private String macAddress; |
| | | |
| | | /** |
| | | * 车é´ç¼å· |
| | | */ |
| | | @TableField("workshop_code") |
| | | private String workshopCode; |
| | | |
| | | /** |
| | | * 车é´å称 |
| | | */ |
| | | @TableField("workshop_name") |
| | | private String workshopName; |
| | | |
| | | /** |
| | | * 产线ç¼å· |
| | | */ |
| | | @TableField("line_code") |
| | | private String lineCode; |
| | | |
| | | /** |
| | | * 产线å称 |
| | | */ |
| | | @TableField("line_name") |
| | | private String lineName; |
| | | |
| | | /** |
| | | * å·¥ä½ç¼ç |
| | | */ |
| | | @TableField("location_code") |
| | | private String locationCode; |
| | | |
| | | /** |
| | | * å·¥ä½å称 |
| | | */ |
| | | @TableField("location_name") |
| | | private String locationName; |
| | | |
| | | /** |
| | | * ä»åºç¼å· |
| | | */ |
| | | @TableField("warehouse_code") |
| | | private String warehouseCode; |
| | | |
| | | /** |
| | | * ä»åºå称 |
| | | */ |
| | | @TableField("warehouse_name") |
| | | private String warehouseName; |
| | | |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getPageCode() { |
| | | return pageCode; |
| | | } |
| | | |
| | | public void setPageCode(String pageCode) { |
| | | this.pageCode = pageCode; |
| | | } |
| | | |
| | | public String getIpAddress() { |
| | | return ipAddress; |
| | | } |
| | | |
| | | public void setIpAddress(String ipAddress) { |
| | | this.ipAddress = ipAddress; |
| | | } |
| | | |
| | | public String getMacAddress() { |
| | | return macAddress; |
| | | } |
| | | |
| | | public void setMacAddress(String macAddress) { |
| | | this.macAddress = macAddress; |
| | | } |
| | | |
| | | public String getWorkshopCode() { |
| | | return workshopCode; |
| | | } |
| | | |
| | | public void setWorkshopCode(String workshopCode) { |
| | | this.workshopCode = workshopCode; |
| | | } |
| | | |
| | | public String getWorkshopName() { |
| | | return workshopName; |
| | | } |
| | | |
| | | public void setWorkshopName(String workshopName) { |
| | | this.workshopName = workshopName; |
| | | } |
| | | |
| | | public String getLineCode() { |
| | | return lineCode; |
| | | } |
| | | |
| | | public void setLineCode(String lineCode) { |
| | | this.lineCode = lineCode; |
| | | } |
| | | |
| | | public String getLineName() { |
| | | return lineName; |
| | | } |
| | | |
| | | public void setLineName(String lineName) { |
| | | this.lineName = lineName; |
| | | } |
| | | |
| | | public String getLocationCode() { |
| | | return locationCode; |
| | | } |
| | | |
| | | public void setLocationCode(String locationCode) { |
| | | this.locationCode = locationCode; |
| | | } |
| | | |
| | | public String getLocationName() { |
| | | return locationName; |
| | | } |
| | | |
| | | public void setLocationName(String locationName) { |
| | | this.locationName = locationName; |
| | | } |
| | | |
| | | public String getWarehouseCode() { |
| | | return warehouseCode; |
| | | } |
| | | |
| | | public void setWarehouseCode(String warehouseCode) { |
| | | this.warehouseCode = warehouseCode; |
| | | } |
| | | |
| | | public String getWarehouseName() { |
| | | return warehouseName; |
| | | } |
| | | |
| | | public void setWarehouseName(String warehouseName) { |
| | | this.warehouseName = warehouseName; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "KanbanConf{" + |
| | | "id=" + id + |
| | | ", pageCode=" + pageCode + |
| | | ", ipAddress=" + ipAddress + |
| | | ", macAddress=" + macAddress + |
| | | ", workshopCode=" + workshopCode + |
| | | ", workshopName=" + workshopName + |
| | | ", lineCode=" + lineCode + |
| | | ", lineName=" + lineName + |
| | | ", locationCode=" + locationCode + |
| | | ", locationName=" + locationName + |
| | | ", warehouseCode=" + warehouseCode + |
| | | ", warehouseName=" + warehouseName + |
| | | "}"; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.stylefeng.guns.modular.zsx.sys.kanbanConf.mapper; |
| | | |
| | | import cn.stylefeng.guns.modular.zsx.sys.kanbanConf.entity.KanbanConf; |
| | | import cn.stylefeng.guns.modular.zsx.sys.kanbanConf.model.params.KanbanConfParam; |
| | | import cn.stylefeng.guns.modular.zsx.sys.kanbanConf.model.result.KanbanConfResult; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * çæ¿é
ç½® Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author ruimin |
| | | * @since 2023-10-08 |
| | | */ |
| | | public interface KanbanConfMapper extends BaseMapper<KanbanConf> { |
| | | |
| | | /** |
| | | * è·åå表 |
| | | * |
| | | * @author ruimin |
| | | * @Date 2023-10-08 |
| | | */ |
| | | List<KanbanConfResult> customList(@Param("paramCondition") KanbanConfParam paramCondition); |
| | | |
| | | /** |
| | | * è·åmapå表 |
| | | * |
| | | * @author ruimin |
| | | * @Date 2023-10-08 |
| | | */ |
| | | List<Map<String, Object>> customMapList(@Param("paramCondition") KanbanConfParam paramCondition); |
| | | |
| | | /** |
| | | * è·åå页å®ä½å表 |
| | | * |
| | | * @author ruimin |
| | | * @Date 2023-10-08 |
| | | */ |
| | | Page<KanbanConfResult> customPageList(@Param("page") Page page, @Param("paramCondition") KanbanConfParam paramCondition); |
| | | |
| | | /** |
| | | * è·åå页mapå表 |
| | | * |
| | | * @author ruimin |
| | | * @Date 2023-10-08 |
| | | */ |
| | | Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") KanbanConfParam paramCondition); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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="cn.stylefeng.guns.modular.zsx.sys.kanbanConf.mapper.KanbanConfMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="cn.stylefeng.guns.modular.zsx.sys.kanbanConf.entity.KanbanConf"> |
| | | <id column="id" property="id" /> |
| | | <result column="page_code" property="pageCode" /> |
| | | <result column="ip_address" property="ipAddress" /> |
| | | <result column="mac_address" property="macAddress" /> |
| | | <result column="workshop_code" property="workshopCode" /> |
| | | <result column="workshop_name" property="workshopName" /> |
| | | <result column="line_code" property="lineCode" /> |
| | | <result column="line_name" property="lineName" /> |
| | | <result column="location_code" property="locationCode" /> |
| | | <result column="location_name" property="locationName" /> |
| | | <result column="warehouse_code" property="warehouseCode" /> |
| | | <result column="warehouse_name" property="warehouseName" /> |
| | | </resultMap> |
| | | |
| | | <!-- éç¨æ¥è¯¢ç»æå --> |
| | | <sql id="Base_Column_List"> |
| | | id AS "id", page_code AS "pageCode", ip_address AS "ipAddress", mac_address AS "macAddress", workshop_code AS "workshopCode", workshop_name AS "workshopName", line_code AS "lineCode", line_name AS "lineName", location_code AS "locationCode", location_name AS "locationName", warehouse_code AS "warehouseCode", warehouse_name AS "warehouseName" |
| | | </sql> |
| | | |
| | | |
| | | <select id="customList" resultType="cn.stylefeng.guns.modular.zsx.sys.kanbanConf.model.result.KanbanConfResult" parameterType="cn.stylefeng.guns.modular.zsx.sys.kanbanConf.model.params.KanbanConfParam"> |
| | | select |
| | | <include refid="Base_Column_List"/> |
| | | from sys_kanban_conf where 1 = 1 |
| | | <if test="paramCondition.ipAddress != null and paramCondition.ipAddress != ''"> |
| | | and ip_address like CONCAT('%',#{paramCondition.ipAddress},'%') |
| | | </if> |
| | | <if test="paramCondition.lineCode != null and paramCondition.lineCode != ''"> |
| | | and line_code like CONCAT('%',#{paramCondition.lineCode},'%') |
| | | </if> |
| | | <if test="paramCondition.locationCode != null and paramCondition.locationCode != ''"> |
| | | and location_code like CONCAT('%',#{paramCondition.locationCode},'%') |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.zsx.sys.kanbanConf.model.params.KanbanConfParam"> |
| | | select |
| | | <include refid="Base_Column_List"/> |
| | | from sys_kanban_conf where 1 = 1 |
| | | <if test="paramCondition.ipAddress != null and paramCondition.ipAddress != ''"> |
| | | and ip_address like CONCAT('%',#{paramCondition.ipAddress},'%') |
| | | </if> |
| | | <if test="paramCondition.lineCode != null and paramCondition.lineCode != ''"> |
| | | and line_code like CONCAT('%',#{paramCondition.lineCode},'%') |
| | | </if> |
| | | <if test="paramCondition.locationCode != null and paramCondition.locationCode != ''"> |
| | | and location_code like CONCAT('%',#{paramCondition.locationCode},'%') |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="customPageList" resultType="cn.stylefeng.guns.modular.zsx.sys.kanbanConf.model.result.KanbanConfResult" parameterType="cn.stylefeng.guns.modular.zsx.sys.kanbanConf.model.params.KanbanConfParam"> |
| | | select |
| | | <include refid="Base_Column_List"/> |
| | | from sys_kanban_conf where 1 = 1 |
| | | <if test="paramCondition.ipAddress != null and paramCondition.ipAddress != ''"> |
| | | and ip_address like CONCAT('%',#{paramCondition.ipAddress},'%') |
| | | </if> |
| | | <if test="paramCondition.lineCode != null and paramCondition.lineCode != ''"> |
| | | and line_code like CONCAT('%',#{paramCondition.lineCode},'%') |
| | | </if> |
| | | <if test="paramCondition.locationCode != null and paramCondition.locationCode != ''"> |
| | | and location_code like CONCAT('%',#{paramCondition.locationCode},'%') |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.zsx.sys.kanbanConf.model.params.KanbanConfParam"> |
| | | select |
| | | <include refid="Base_Column_List"/> |
| | | from sys_kanban_conf where 1 = 1 |
| | | <if test="paramCondition.ipAddress != null and paramCondition.ipAddress != ''"> |
| | | and ip_address like CONCAT('%',#{paramCondition.ipAddress},'%') |
| | | </if> |
| | | <if test="paramCondition.lineCode != null and paramCondition.lineCode != ''"> |
| | | and line_code like CONCAT('%',#{paramCondition.lineCode},'%') |
| | | </if> |
| | | <if test="paramCondition.locationCode != null and paramCondition.locationCode != ''"> |
| | | and location_code like CONCAT('%',#{paramCondition.locationCode},'%') |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.stylefeng.guns.modular.zsx.sys.kanbanConf.model.params; |
| | | |
| | | import lombok.Data; |
| | | import cn.stylefeng.roses.kernel.model.validator.BaseValidatingParam; |
| | | import java.util.Date; |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * <p> |
| | | * çæ¿é
ç½® |
| | | * </p> |
| | | * |
| | | * @author ruimin |
| | | * @since 2023-10-08 |
| | | */ |
| | | @Data |
| | | public class KanbanConfParam implements Serializable, BaseValidatingParam { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | private Long id; |
| | | |
| | | /** |
| | | * 页é¢ç¼å· |
| | | */ |
| | | private String pageCode; |
| | | |
| | | /** |
| | | * ipå°å |
| | | */ |
| | | private String ipAddress; |
| | | |
| | | /** |
| | | * MACå°å |
| | | */ |
| | | private String macAddress; |
| | | |
| | | /** |
| | | * 车é´ç¼å· |
| | | */ |
| | | private String workshopCode; |
| | | |
| | | /** |
| | | * 车é´å称 |
| | | */ |
| | | private String workshopName; |
| | | |
| | | /** |
| | | * 产线ç¼å· |
| | | */ |
| | | private String lineCode; |
| | | |
| | | /** |
| | | * 产线å称 |
| | | */ |
| | | private String lineName; |
| | | |
| | | /** |
| | | * å·¥ä½ç¼ç |
| | | */ |
| | | private String locationCode; |
| | | |
| | | /** |
| | | * å·¥ä½å称 |
| | | */ |
| | | private String locationName; |
| | | |
| | | /** |
| | | * ä»åºç¼å· |
| | | */ |
| | | private String warehouseCode; |
| | | |
| | | /** |
| | | * ä»åºå称 |
| | | */ |
| | | private String warehouseName; |
| | | |
| | | @Override |
| | | public String checkParam() { |
| | | return null; |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.stylefeng.guns.modular.zsx.sys.kanbanConf.model.result; |
| | | |
| | | import lombok.Data; |
| | | import java.util.Date; |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * <p> |
| | | * çæ¿é
ç½® |
| | | * </p> |
| | | * |
| | | * @author ruimin |
| | | * @since 2023-10-08 |
| | | */ |
| | | @Data |
| | | public class KanbanConfResult implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | private Long id; |
| | | |
| | | /** |
| | | * 页é¢ç¼å· |
| | | */ |
| | | private String pageCode; |
| | | |
| | | /** |
| | | * ipå°å |
| | | */ |
| | | private String ipAddress; |
| | | |
| | | /** |
| | | * MACå°å |
| | | */ |
| | | private String macAddress; |
| | | |
| | | /** |
| | | * 车é´ç¼å· |
| | | */ |
| | | private String workshopCode; |
| | | |
| | | /** |
| | | * 车é´å称 |
| | | */ |
| | | private String workshopName; |
| | | |
| | | /** |
| | | * 产线ç¼å· |
| | | */ |
| | | private String lineCode; |
| | | |
| | | /** |
| | | * 产线å称 |
| | | */ |
| | | private String lineName; |
| | | |
| | | /** |
| | | * å·¥ä½ç¼ç |
| | | */ |
| | | private String locationCode; |
| | | |
| | | /** |
| | | * å·¥ä½å称 |
| | | */ |
| | | private String locationName; |
| | | |
| | | /** |
| | | * ä»åºç¼å· |
| | | */ |
| | | private String warehouseCode; |
| | | |
| | | /** |
| | | * ä»åºå称 |
| | | */ |
| | | private String warehouseName; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.stylefeng.guns.modular.zsx.sys.kanbanConf.service; |
| | | |
| | | import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo; |
| | | import cn.stylefeng.guns.modular.zsx.sys.kanbanConf.entity.KanbanConf; |
| | | import cn.stylefeng.guns.modular.zsx.sys.kanbanConf.model.params.KanbanConfParam; |
| | | import cn.stylefeng.guns.modular.zsx.sys.kanbanConf.model.result.KanbanConfResult; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * çæ¿é
ç½® æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author ruimin |
| | | * @since 2023-10-08 |
| | | */ |
| | | public interface KanbanConfService extends IService<KanbanConf> { |
| | | |
| | | /** |
| | | * æ°å¢ |
| | | * |
| | | * @author ruimin |
| | | * @Date 2023-10-08 |
| | | */ |
| | | void add(KanbanConfParam param); |
| | | |
| | | /** |
| | | * å é¤ |
| | | * |
| | | * @author ruimin |
| | | * @Date 2023-10-08 |
| | | */ |
| | | void delete(KanbanConfParam param); |
| | | |
| | | /** |
| | | * æ´æ° |
| | | * |
| | | * @author ruimin |
| | | * @Date 2023-10-08 |
| | | */ |
| | | void update(KanbanConfParam param); |
| | | |
| | | /** |
| | | * æ¥è¯¢åæ¡æ°æ®ï¼Specificationæ¨¡å¼ |
| | | * |
| | | * @author ruimin |
| | | * @Date 2023-10-08 |
| | | */ |
| | | KanbanConfResult findBySpec(KanbanConfParam param); |
| | | |
| | | /** |
| | | * æ¥è¯¢å表ï¼Specificationæ¨¡å¼ |
| | | * |
| | | * @author ruimin |
| | | * @Date 2023-10-08 |
| | | */ |
| | | List<KanbanConfResult> findListBySpec(KanbanConfParam param); |
| | | |
| | | /** |
| | | * æ¥è¯¢å页æ°æ®ï¼Specificationæ¨¡å¼ |
| | | * |
| | | * @author ruimin |
| | | * @Date 2023-10-08 |
| | | */ |
| | | LayuiPageInfo findPageBySpec(KanbanConfParam param); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.stylefeng.guns.modular.zsx.sys.kanbanConf.service.impl; |
| | | |
| | | import cn.stylefeng.guns.base.pojo.page.LayuiPageFactory; |
| | | import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo; |
| | | import cn.stylefeng.guns.modular.zsx.sys.kanbanConf.entity.KanbanConf; |
| | | import cn.stylefeng.guns.modular.zsx.sys.kanbanConf.mapper.KanbanConfMapper; |
| | | import cn.stylefeng.guns.modular.zsx.sys.kanbanConf.model.params.KanbanConfParam; |
| | | import cn.stylefeng.guns.modular.zsx.sys.kanbanConf.model.result.KanbanConfResult; |
| | | import cn.stylefeng.guns.modular.zsx.sys.kanbanConf.service.KanbanConfService; |
| | | import cn.stylefeng.roses.core.util.ToolUtil; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * çæ¿é
ç½® æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author ruimin |
| | | * @since 2023-10-08 |
| | | */ |
| | | @Service |
| | | public class KanbanConfServiceImpl extends ServiceImpl<KanbanConfMapper, KanbanConf> implements KanbanConfService { |
| | | |
| | | @Override |
| | | public void add(KanbanConfParam param){ |
| | | KanbanConf entity = getEntity(param); |
| | | this.save(entity); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(KanbanConfParam param){ |
| | | this.removeById(getKey(param)); |
| | | } |
| | | |
| | | @Override |
| | | public void update(KanbanConfParam param){ |
| | | KanbanConf oldEntity = getOldEntity(param); |
| | | KanbanConf newEntity = getEntity(param); |
| | | ToolUtil.copyProperties(newEntity, oldEntity); |
| | | this.updateById(newEntity); |
| | | } |
| | | |
| | | @Override |
| | | public KanbanConfResult findBySpec(KanbanConfParam param){ |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public List<KanbanConfResult> findListBySpec(KanbanConfParam param){ |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public LayuiPageInfo findPageBySpec(KanbanConfParam param){ |
| | | Page pageContext = getPageContext(); |
| | | IPage page = this.baseMapper.customPageList(pageContext, param); |
| | | return LayuiPageFactory.createPageInfo(page); |
| | | } |
| | | |
| | | private Serializable getKey(KanbanConfParam param){ |
| | | return param.getId(); |
| | | } |
| | | |
| | | private Page getPageContext() { |
| | | return LayuiPageFactory.defaultPage(); |
| | | } |
| | | |
| | | private KanbanConf getOldEntity(KanbanConfParam param) { |
| | | return this.getById(getKey(param)); |
| | | } |
| | | |
| | | private KanbanConf getEntity(KanbanConfParam param) { |
| | | KanbanConf entity = new KanbanConf(); |
| | | ToolUtil.copyProperties(param, entity); |
| | | return entity; |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | INSERT INTO `sys_menu`(`MENU_ID`, `CODE`, `PCODE`, `PCODES`, `NAME`, `ICON`, `URL`, `SORT`, `LEVELS`, `MENU_FLAG`, `DESCRIPTION`, `STATUS`, `NEW_PAGE_FLAG`, `OPEN_FLAG`, `SYSTEM_TYPE`, `CREATE_TIME`, `UPDATE_TIME`, `CREATE_USER`, `UPDATE_USER`) VALUES (1710918774504177666, 'KANBAN_CONF', '0', '[0],', 'çæ¿é
ç½®', 'fa-star', '/kanbanConf', 999, 1, 'Y', '', 'ENABLE', '', '', 'BASE_SYSTEM', '2023-10-08 15:23:17', '2023-10-08 15:23:17', 1, 1); |
| | | INSERT INTO `sys_menu`(`MENU_ID`, `CODE`, `PCODE`, `PCODES`, `NAME`, `ICON`, `URL`, `SORT`, `LEVELS`, `MENU_FLAG`, `DESCRIPTION`, `STATUS`, `NEW_PAGE_FLAG`, `OPEN_FLAG`, `SYSTEM_TYPE`, `CREATE_TIME`, `UPDATE_TIME`, `CREATE_USER`, `UPDATE_USER`) VALUES (1710918774508371970, 'KANBAN_CONF_ADD', 'KANBAN_CONF', '[0],[KANBAN_CONF],', 'çæ¿é
置添å ', 'fa-star', '', 999, 2, 'N', '', 'ENABLE', '', '', 'BASE_SYSTEM', '2023-10-08 15:23:17', '2023-10-08 15:23:17', 1, 1); |
| | | INSERT INTO `sys_menu`(`MENU_ID`, `CODE`, `PCODE`, `PCODES`, `NAME`, `ICON`, `URL`, `SORT`, `LEVELS`, `MENU_FLAG`, `DESCRIPTION`, `STATUS`, `NEW_PAGE_FLAG`, `OPEN_FLAG`, `SYSTEM_TYPE`, `CREATE_TIME`, `UPDATE_TIME`, `CREATE_USER`, `UPDATE_USER`) VALUES (1710918774508371971, 'KANBAN_CONF_EDIT', 'KANBAN_CONF', '[0],[KANBAN_CONF],', 'çæ¿é
置修æ¹', 'fa-star', '', 999, 2, 'N', '', 'ENABLE', '', '', 'BASE_SYSTEM', '2023-10-08 15:23:17', '2023-10-08 15:23:17', 1, 1); |
| | | INSERT INTO `sys_menu`(`MENU_ID`, `CODE`, `PCODE`, `PCODES`, `NAME`, `ICON`, `URL`, `SORT`, `LEVELS`, `MENU_FLAG`, `DESCRIPTION`, `STATUS`, `NEW_PAGE_FLAG`, `OPEN_FLAG`, `SYSTEM_TYPE`, `CREATE_TIME`, `UPDATE_TIME`, `CREATE_USER`, `UPDATE_USER`) VALUES (1710918774508371972, 'KANBAN_CONF_DELETE', 'KANBAN_CONF', '[0],[KANBAN_CONF],', 'çæ¿é
ç½®å é¤', 'fa-star', '', 999, 2, 'N', '', 'ENABLE', '', '', 'BASE_SYSTEM', '2023-10-08 15:23:17', '2023-10-08 15:23:17', 1, 1); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | layui.use(['form', 'table', 'admin', 'ax', 'func','element'], function () { |
| | | var $ = layui.$; |
| | | var table = layui.table; |
| | | var $ax = layui.ax; |
| | | var admin = layui.admin; |
| | | var func = layui.func; |
| | | var form = layui.form; |
| | | var element = layui.element; |
| | | |
| | | initLineInfo(); |
| | | |
| | | var ajax = new $ax(Feng.ctxPath + "/workOrder/list?state=3"); |
| | | var result = ajax.start(); |
| | | let msg = result.data[0]; |
| | | $('#workOrder').text(msg.workOrderCode); |
| | | $('#salesOrderCode').text(msg.salesOrderCode); |
| | | $('#productCode').text(msg.productCode); |
| | | $('#productName').text(msg.productName); |
| | | $('#planQty').text(msg.planQty); |
| | | $('#planStartTime').text(msg.planStartTime); |
| | | $('#planEndTime').text(msg.planEndTime); |
| | | var radioElement = $('#sex1'); |
| | | |
| | | function initLineInfo(){ |
| | | $.ajax({ |
| | | type: "POST", |
| | | contentType: "application/json;charset=UTF-8", |
| | | url: Feng.ctxPath + '/lineInfo/list', |
| | | success: function (result) { |
| | | var initIpConf = new $ax(Feng.ctxPath + "/kanbanConf/initIpConf"); |
| | | var initResult = initIpConf.start(); |
| | | |
| | | $('#lineCode').append(new Option("请éæ©äº§çº¿", ""));// ä¸æèåéæ·»å å
ç´ |
| | | $.each(result.data, function (index, value) { |
| | | $('#lineCode').append(new Option(value.lineCode));// ä¸æèåéæ·»å å
ç´ |
| | | }); |
| | | if(initResult.data!==""){ |
| | | $('#lineCode').val(initResult.data.lineCode);// ä¸æèåéæ·»å å
ç´ |
| | | $('#locationCode').append(new Option(initResult.data.locationCode));// ä¸æèåéæ·»å å
ç´ |
| | | } |
| | | layui.form.render("select");//éæ°æ¸²æ åºå®åæ³ |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | form.on("select", function (data) { |
| | | switch(data.elem.id){ |
| | | case 'lineCode': |
| | | console.log(data.value); |
| | | if(data.value === ""){ |
| | | $('#locationCode').empty(); |
| | | layui.form.render("select");//éæ°æ¸²æ åºå®åæ³ |
| | | }else { |
| | | $.ajax({ |
| | | type: "POST", |
| | | contentType: "application/json;charset=UTF-8", |
| | | url: Feng.ctxPath + '/locationInfo/list?productionLineCode='+data.value, |
| | | success: function (result) { |
| | | $('#locationCode').empty(); |
| | | $('#locationCode').append(new Option("请éæ©å·¥ä½", ""));// ä¸æèåéæ·»å å
ç´ |
| | | |
| | | $.each(result.data, function (index, value) { |
| | | $('#locationCode').append(new Option(value.locationCode));// ä¸æèåéæ·»å å
ç´ |
| | | }); |
| | | layui.form.render("select");//éæ°æ¸²æ åºå®åæ³ |
| | | }, |
| | | }); |
| | | } |
| | | break; |
| | | case 'locationCode': |
| | | console.log($('#locationCode').val()); |
| | | console.log($('#lineCode').val()); |
| | | var getIp = new $ax(Feng.ctxPath + "/kanbanConf/ipSetting?lineCode="+$('#lineCode').val()+"&locationCode="+$('#locationCode').val()); |
| | | var result = getIp.start(); |
| | | Feng.info("æ´æ°å®æ!") |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | setInterval(function() { |
| | | $('input[name="sex1"][value="nan1"]').prop('checked', true); |
| | | }, 1000); |
| | | setInterval(function() { |
| | | radioElement.prop('checked', false); |
| | | }, 2000); |
| | | |
| | | //Hashå°åçå®ä½ |
| | | var layid = location.hash.replace(/^#test=/, ''); |
| | | element.tabChange('test', layid); |
| | | |
| | | element.on('tab(test)', function(elem){ |
| | | location.hash = 'test='+ $(this).attr('lay-id'); |
| | | }); |
| | | |
| | | }); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | layui.use(['table', 'admin', 'ax', 'func'], function () { |
| | | var $ = layui.$; |
| | | var table = layui.table; |
| | | var $ax = layui.ax; |
| | | var admin = layui.admin; |
| | | var func = layui.func; |
| | | |
| | | /** |
| | | * çæ¿é
置管ç |
| | | */ |
| | | var KanbanConf = { |
| | | tableId: "kanbanConfTable" |
| | | }; |
| | | |
| | | /** |
| | | * åå§åè¡¨æ ¼çå |
| | | */ |
| | | KanbanConf.initColumn = function () { |
| | | return [[ |
| | | {type: 'checkbox'}, |
| | | {field: 'id', hide: true, title: 'ID'}, |
| | | // {field: 'pageCode', sort: true, title: '页é¢ç¼å·'}, |
| | | {field: 'ipAddress', sort: true, title: 'ipå°å'}, |
| | | // {field: 'macAddress', sort: true, title: 'MACå°å'}, |
| | | // {field: 'workshopCode', sort: true, title: '车é´ç¼å·'}, |
| | | // {field: 'workshopName', sort: true, title: '车é´å称'}, |
| | | {field: 'lineCode', sort: true, title: '产线ç¼å·'}, |
| | | {field: 'lineName', sort: true, title: '产线å称'}, |
| | | {field: 'locationCode', sort: true, title: 'å·¥ä½ç¼ç '}, |
| | | {field: 'locationName', sort: true, title: 'å·¥ä½å称'}, |
| | | // {field: 'warehouseCode', sort: true, title: 'ä»åºç¼å·'}, |
| | | // {field: 'warehouseName', sort: true, title: 'ä»åºå称'}, |
| | | {fixed: 'right',width: 125, minWidth: 125, align: 'center', toolbar: '#tableBar', title: 'æä½'} |
| | | ]]; |
| | | }; |
| | | |
| | | /** |
| | | * ç¹å»æ¥è¯¢æé® |
| | | */ |
| | | KanbanConf.search = function () { |
| | | var queryData = {}; |
| | | |
| | | queryData['ipAddress'] = $('#ipAddress').val(); |
| | | queryData['lineCode'] = $('#lineCode').val(); |
| | | queryData['locationCode'] = $('#locationCode').val(); |
| | | |
| | | table.reload(KanbanConf.tableId, { |
| | | where: queryData, page: {curr: 1} |
| | | }); |
| | | }; |
| | | |
| | | /** |
| | | * 跳转å°æ·»å é¡µé¢ |
| | | */ |
| | | KanbanConf.jumpAddPage = function () { |
| | | window.location.href = Feng.ctxPath + '/kanbanConf/add' |
| | | }; |
| | | |
| | | /** |
| | | * 跳转å°ç¼è¾é¡µé¢ |
| | | * |
| | | * @param data ç¹å»æé®æ¶åçè¡æ°æ® |
| | | */ |
| | | KanbanConf.jumpEditPage = function (data) { |
| | | window.location.href = Feng.ctxPath + '/kanbanConf/edit?id=' + data.id |
| | | }; |
| | | |
| | | /** |
| | | * 导åºexcelæé® |
| | | */ |
| | | KanbanConf.exportExcel = function () { |
| | | var checkRows = table.checkStatus(KanbanConf.tableId); |
| | | if (checkRows.data.length === 0) { |
| | | Feng.error("请éæ©è¦å¯¼åºçæ°æ®"); |
| | | } else { |
| | | table.exportFile(tableResult.config.id, checkRows.data, 'xls'); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * ç¹å»å é¤ |
| | | * |
| | | * @param data ç¹å»æé®æ¶åçè¡æ°æ® |
| | | */ |
| | | KanbanConf.onDeleteItem = function (data) { |
| | | var operation = function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/kanbanConf/delete", function (data) { |
| | | Feng.success("å é¤æå!"); |
| | | table.reload(KanbanConf.tableId); |
| | | }, function (data) { |
| | | Feng.error("å é¤å¤±è´¥!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id", data.id); |
| | | ajax.start(); |
| | | }; |
| | | Feng.confirm("æ¯å¦å é¤?", operation); |
| | | }; |
| | | |
| | | // 渲æè¡¨æ ¼ |
| | | var tableResult = table.render({ |
| | | elem: '#' + KanbanConf.tableId, |
| | | url: Feng.ctxPath + '/kanbanConf/list', |
| | | page: true, |
| | | height: "full-158", |
| | | cellMinWidth: 100, |
| | | cols: KanbanConf.initColumn() |
| | | }); |
| | | |
| | | // æç´¢æé®ç¹å»äºä»¶ |
| | | $('#btnSearch').click(function () { |
| | | KanbanConf.search(); |
| | | }); |
| | | |
| | | // æ·»å æé®ç¹å»äºä»¶ |
| | | $('#btnAdd').click(function () { |
| | | |
| | | KanbanConf.jumpAddPage(); |
| | | |
| | | }); |
| | | |
| | | // 导åºexcel |
| | | $('#btnExp').click(function () { |
| | | KanbanConf.exportExcel(); |
| | | }); |
| | | |
| | | // å·¥å
·æ¡ç¹å»äºä»¶ |
| | | table.on('tool(' + KanbanConf.tableId + ')', function (obj) { |
| | | var data = obj.data; |
| | | var layEvent = obj.event; |
| | | |
| | | if (layEvent === 'edit') { |
| | | KanbanConf.jumpEditPage(data); |
| | | } else if (layEvent === 'delete') { |
| | | KanbanConf.onDeleteItem(data); |
| | | } |
| | | }); |
| | | }); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /** |
| | | * æ·»å æè
ä¿®æ¹é¡µé¢ |
| | | */ |
| | | var KanbanConfInfoDlg = { |
| | | data: { |
| | | id: "", |
| | | pageCode: "", |
| | | ipAddress: "", |
| | | macAddress: "", |
| | | workshopCode: "", |
| | | workshopName: "", |
| | | lineCode: "", |
| | | lineName: "", |
| | | locationCode: "", |
| | | locationName: "", |
| | | warehouseCode: "", |
| | | warehouseName: "" |
| | | } |
| | | }; |
| | | |
| | | layui.use(['form', 'admin', 'ax','laydate','upload','formSelects'], function () { |
| | | var $ = layui.jquery; |
| | | var $ax = layui.ax; |
| | | var form = layui.form; |
| | | var admin = layui.admin; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | //表åæ交äºä»¶ |
| | | form.on('submit(btnSubmit)', function (data) { |
| | | var ajax = new $ax(Feng.ctxPath + "/kanbanConf/addItem", function (data) { |
| | | Feng.success("æ·»å æåï¼"); |
| | | window.location.href = Feng.ctxPath + '/kanbanConf' |
| | | }, function (data) { |
| | | Feng.error("æ·»å 失败ï¼" + data.responseJSON.message) |
| | | }); |
| | | ajax.set(data.field); |
| | | ajax.start(); |
| | | |
| | | return false; |
| | | }); |
| | | |
| | | $('#cancel').click(function(){ |
| | | window.location.href = Feng.ctxPath + '/kanbanConf' |
| | | }); |
| | | |
| | | }); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /** |
| | | * 详æ
对è¯æ¡ |
| | | */ |
| | | var KanbanConfInfoDlg = { |
| | | data: { |
| | | id: "", |
| | | pageCode: "", |
| | | ipAddress: "", |
| | | macAddress: "", |
| | | workshopCode: "", |
| | | workshopName: "", |
| | | lineCode: "", |
| | | lineName: "", |
| | | locationCode: "", |
| | | locationName: "", |
| | | warehouseCode: "", |
| | | warehouseName: "" |
| | | } |
| | | }; |
| | | |
| | | layui.use(['form', 'admin', 'ax','laydate','upload','formSelects'], function () { |
| | | var $ = layui.jquery; |
| | | var $ax = layui.ax; |
| | | var form = layui.form; |
| | | var admin = layui.admin; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | //è·å详æ
ä¿¡æ¯ï¼å¡«å
表å |
| | | var ajax = new $ax(Feng.ctxPath + "/kanbanConf/detail?id=" + Feng.getUrlParam("id")); |
| | | var result = ajax.start(); |
| | | form.val('kanbanConfForm', result.data); |
| | | |
| | | //表åæ交äºä»¶ |
| | | form.on('submit(btnSubmit)', function (data) { |
| | | var ajax = new $ax(Feng.ctxPath + "/kanbanConf/editItem", function (data) { |
| | | Feng.success("æ´æ°æåï¼"); |
| | | window.location.href = Feng.ctxPath + '/kanbanConf' |
| | | }, function (data) { |
| | | Feng.error("æ´æ°å¤±è´¥ï¼" + data.responseJSON.message) |
| | | }); |
| | | ajax.set(data.field); |
| | | ajax.start(); |
| | | |
| | | return false; |
| | | }); |
| | | |
| | | $('#cancel').click(function(){ |
| | | window.location.href = Feng.ctxPath + '/kanbanConf' |
| | | }); |
| | | }); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | @layout("/common/_container.html",{js:["/assets/modular/kb/formula/formulaView.js"]}){ |
| | | |
| | | <div class="layui-fluid"> |
| | | <div class="layui-row layui-col-space15"> |
| | | <div class="layui-col-sm3 layui-col-md3 layui-col-lg3"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-header" style="font-weight: bold"> |
| | | <i class="layui-icon layui-icon-rate-solid"></i>å·¥ä½é
ç½® |
| | | </div> |
| | | <div class="layui-card-body"> |
| | | <form class="layui-form" action=""> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-inline"> |
| | | 产 线 ç¼ å·: |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <select id="lineCode" lay-verify="lineCode"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-inline"> |
| | | å·¥ ä½ ç¼ ç : |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <select id="locationCode" lay-verify="locationCode"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-header" style="font-weight: bold"> |
| | | <i class="layui-icon layui-icon-rate-solid"></i>å·¥åä¿¡æ¯ |
| | | </div> |
| | | <div class="layui-card-body"> |
| | | <div class="orderInfo"> |
| | | <span>å·¥åç¼å·</span> |
| | | <span class="mySpan" style="float: right" id="workOrder"></span> |
| | | </div> |
| | | <div class="orderInfo"> |
| | | <span>订åç¼å·</span> |
| | | <span class="mySpan" style="float: right" id="salesOrderCode"></span> |
| | | </div> |
| | | <div class="orderInfo"> |
| | | <span>产åç¼å·</span> |
| | | <span class="mySpan" style="float: right" id="productCode"></span> |
| | | </div> |
| | | <div class="orderInfo"> |
| | | <span>产åå称</span> |
| | | <span class="mySpan" style="float: right" id="productName"></span> |
| | | </div> |
| | | <div class="orderInfo"> |
| | | <span>计åæ°é</span> |
| | | <span class="mySpan" style="float: right" id="planQty"></span> |
| | | </div> |
| | | <div class="orderInfo"> |
| | | <span>计åå¼å§æ¶é´</span> |
| | | <span class="mySpan" style="float: right" id="planStartTime"></span> |
| | | </div> |
| | | <div class="orderInfo"> |
| | | <span>计åç»ææ¶é´</span> |
| | | <span class="mySpan" style="float: right" id="planEndTime"></span> |
| | | </div> |
| | | <hr class="layui-border-orange"> |
| | | <!-- <span>PLC交äºç¹</span>--> |
| | | <div class="container"> |
| | | <input type="radio" id="sex1" name="sex1" value="nan1" title="ç·"> |
| | | <span>ç³»ç»å°±ç»ª</span> |
| | | <input style="margin-left: 150px" type="radio" name="sex" value="nan" title="ç·"> |
| | | <span>工件å°ä½</span> |
| | | </div> |
| | | <div class="container"> |
| | | <input type="radio" name="sex" value="nan" title="ç·"> |
| | | <span>读åæ¡ç </span> |
| | | <input style="margin-left: 150px" type="radio" name="sex" value="nan" title="ç·"> |
| | | <span>ä¸åæºå</span> |
| | | </div> |
| | | <div class="container"> |
| | | <input type="radio" name="sex" value="nan" title="ç·"> |
| | | <span>å
许å¯å¨</span> |
| | | <input style="margin-left: 150px" type="radio" name="sex" value="nan" title="ç·"> |
| | | <span>ä¸å
许å¯å¨</span> |
| | | </div> |
| | | <div class="container"> |
| | | <input type="radio" name="sex" value="nan" title="ç·"> |
| | | <span>åæ ¼å®æ</span> |
| | | <input style="margin-left: 150px" type="radio" name="sex" value="nan" title="ç·"> |
| | | <span>ä¸åæ ¼å®æ</span> |
| | | </div> |
| | | <div class="container"> |
| | | <input type="radio" name="sex" value="nan" title="ç·"> |
| | | <span>ä¿åå®æ</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-sm9 layui-col-md9 layui-col-lg9"> |
| | | <div class="layui-card" style="height: 577px"> |
| | | <div class="layui-card-header" style="font-weight: bold"> |
| | | <i class="layui-icon layui-icon-rate-solid"></i>æä½æ |
| | | </div> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-tab" lay-filter="test"> |
| | | <ul class="layui-tab-title"> |
| | | <li class="layui-this" lay-id="11">é¦é¡µ</li> |
| | | <li lay-id="22">å·¥åºç¶æ</li> |
| | | <li lay-id="33">è£
é
ééæ¸
å</li> |
| | | <li lay-id="44">å·¥èºåæ°</li> |
| | | <li lay-id="55">ä¸åæ ¼è´¨éæ°æ®</li> |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-tab-item layui-show"> |
| | | ç¹å»è¯¥Tabçä»»ä¸æ é¢ï¼è§å¯å°åæ ååï¼åå·æ°é¡µé¢ãé项å¡å°ä¼èªå¨å®ä½å°ä¸ä¸æ¬¡åæ¢ç项 |
| | | </div> |
| | | <div class="layui-tab-item">å
容2</div> |
| | | <div class="layui-tab-item">å
容3</div> |
| | | <div class="layui-tab-item">å
容4</div> |
| | | <div class="layui-tab-item">å
容5</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <style> |
| | | .orderInfo { |
| | | margin-bottom: 5px; /* 设置æ¢è¡åçä¸è¾¹è· */ |
| | | } |
| | | .container { |
| | | display: flex; /* ä½¿ç¨ Flex å¸å± */ |
| | | align-items: center; /* å°åå
ç´ åç´å±
ä¸å¯¹é½ */ |
| | | } |
| | | </style> |
| | | @} |
¶Ô±ÈÐÂÎļþ |
| | |
| | | @layout("/common/_container.html",{js:["/assets/modular/sys/kanbanConf/kanbanConf.js"]}){ |
| | | |
| | | <div class="layui-body-header"> |
| | | <span class="layui-body-header-title">çæ¿é
置管ç</span> |
| | | </div> |
| | | |
| | | <div class="layui-fluid"> |
| | | <div class="layui-row layui-col-space15"> |
| | | <div class="layui-col-sm12 layui-col-md12 layui-col-lg12"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-form toolbar"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <input id="ipAddress" class="layui-input" type="text" placeholder="ipå°å"/> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <input id="lineCode" class="layui-input" type="text" placeholder="产线ç¼å·"/> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <input id="locationCode" class="layui-input" type="text" placeholder="å·¥ä½ç¼ç "/> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <button id="btnSearch" class="layui-btn icon-btn"><i class="layui-icon"></i>æç´¢</button> |
| | | <button id="btnAdd" class="layui-btn icon-btn"><i class="layui-icon"></i>æ·»å </button> |
| | | <button id="btnExp" class="layui-btn icon-btn"><i class="layui-icon"></i>导åº</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="layui-table" id="kanbanConfTable" lay-filter="kanbanConfTable"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script type="text/html" id="tableBar"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">ä¿®æ¹</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">å é¤</a> |
| | | </script> |
| | | @} |
¶Ô±ÈÐÂÎļþ |
| | |
| | | @layout("/common/_form.html",{js:["/assets/modular/sys/kanbanConf/kanbanConf_add.js"],css:["/assets/expand/module/formSelects/formSelects-v4.css"]}){ |
| | | |
| | | <form class="layui-form" id="kanbanConfForm" lay-filter="kanbanConfForm"> |
| | | <div class="layui-fluid" style="padding-bottom: 75px;"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-header">åºæ¬ä¿¡æ¯</div> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-form-item layui-row"> |
| | | <input name="id" type="hidden"/> |
| | | |
| | | <div class="layui-inline layui-col-md12"> |
| | | <label class="layui-form-label">页é¢ç¼å·<span style="color: red;">*</span></label> |
| | | <div class="layui-input-block"> |
| | | <input id="pageCode" name="pageCode" placeholder="请è¾å
¥é¡µé¢ç¼å·" type="text" class="layui-input" lay-verify="required" required/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md12"> |
| | | <label class="layui-form-label">ipå°å<span style="color: red;">*</span></label> |
| | | <div class="layui-input-block"> |
| | | <input id="ipAddress" name="ipAddress" placeholder="请è¾å
¥ipå°å" type="text" class="layui-input" lay-verify="required" required/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md12"> |
| | | <label class="layui-form-label">MACå°å<span style="color: red;">*</span></label> |
| | | <div class="layui-input-block"> |
| | | <input id="macAddress" name="macAddress" placeholder="请è¾å
¥MACå°å" type="text" class="layui-input" lay-verify="required" required/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md12"> |
| | | <label class="layui-form-label">车é´ç¼å·<span style="color: red;">*</span></label> |
| | | <div class="layui-input-block"> |
| | | <input id="workshopCode" name="workshopCode" placeholder="请è¾å
¥è½¦é´ç¼å·" type="text" class="layui-input" lay-verify="required" required/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md12"> |
| | | <label class="layui-form-label">车é´å称<span style="color: red;">*</span></label> |
| | | <div class="layui-input-block"> |
| | | <input id="workshopName" name="workshopName" placeholder="请è¾å
¥è½¦é´å称" type="text" class="layui-input" lay-verify="required" required/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md12"> |
| | | <label class="layui-form-label">产线ç¼å·<span style="color: red;">*</span></label> |
| | | <div class="layui-input-block"> |
| | | <input id="lineCode" name="lineCode" placeholder="请è¾å
¥äº§çº¿ç¼å·" type="text" class="layui-input" lay-verify="required" required/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md12"> |
| | | <label class="layui-form-label">产线å称<span style="color: red;">*</span></label> |
| | | <div class="layui-input-block"> |
| | | <input id="lineName" name="lineName" placeholder="请è¾å
¥äº§çº¿å称" type="text" class="layui-input" lay-verify="required" required/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md12"> |
| | | <label class="layui-form-label">å·¥ä½ç¼ç <span style="color: red;">*</span></label> |
| | | <div class="layui-input-block"> |
| | | <input id="locationCode" name="locationCode" placeholder="请è¾å
¥å·¥ä½ç¼ç " type="text" class="layui-input" lay-verify="required" required/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md12"> |
| | | <label class="layui-form-label">å·¥ä½å称<span style="color: red;">*</span></label> |
| | | <div class="layui-input-block"> |
| | | <input id="locationName" name="locationName" placeholder="请è¾å
¥å·¥ä½å称" type="text" class="layui-input" lay-verify="required" required/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md12"> |
| | | <label class="layui-form-label">ä»åºç¼å·<span style="color: red;">*</span></label> |
| | | <div class="layui-input-block"> |
| | | <input id="warehouseCode" name="warehouseCode" placeholder="请è¾å
¥ä»åºç¼å·" type="text" class="layui-input" lay-verify="required" required/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md12"> |
| | | <label class="layui-form-label">ä»åºå称<span style="color: red;">*</span></label> |
| | | <div class="layui-input-block"> |
| | | <input id="warehouseName" name="warehouseName" placeholder="请è¾å
¥ä»åºå称" type="text" class="layui-input" lay-verify="required" required/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="form-group-bottom text-center"> |
| | | <button class="layui-btn" lay-filter="btnSubmit" lay-submit> æ交 </button> |
| | | <button type="reset" class="layui-btn layui-btn-primary" id="cancel"> åæ¶ </button> |
| | | </div> |
| | | |
| | | </form> |
| | | |
| | | @} |
¶Ô±ÈÐÂÎļþ |
| | |
| | | @layout("/common/_form.html",{js:["/assets/modular/sys/kanbanConf/kanbanConf_edit.js"]}){ |
| | | |
| | | <form class="layui-form" id="kanbanConfForm" lay-filter="kanbanConfForm"> |
| | | <div class="layui-fluid" style="padding-bottom: 75px;"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-header">åºæ¬ä¿¡æ¯</div> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-form-item layui-row"> |
| | | <input name="id" type="hidden"/> |
| | | |
| | | <div class="layui-inline layui-col-md12"> |
| | | <label class="layui-form-label">页é¢ç¼å·<span style="color: red;">*</span></label> |
| | | <div class="layui-input-block"> |
| | | <input id="pageCode" name="pageCode" placeholder="请è¾å
¥é¡µé¢ç¼å·" type="text" class="layui-input" lay-verify="required" required/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md12"> |
| | | <label class="layui-form-label">ipå°å<span style="color: red;">*</span></label> |
| | | <div class="layui-input-block"> |
| | | <input id="ipAddress" name="ipAddress" placeholder="请è¾å
¥ipå°å" type="text" class="layui-input" lay-verify="required" required/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md12"> |
| | | <label class="layui-form-label">MACå°å<span style="color: red;">*</span></label> |
| | | <div class="layui-input-block"> |
| | | <input id="macAddress" name="macAddress" placeholder="请è¾å
¥MACå°å" type="text" class="layui-input" lay-verify="required" required/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md12"> |
| | | <label class="layui-form-label">车é´ç¼å·<span style="color: red;">*</span></label> |
| | | <div class="layui-input-block"> |
| | | <input id="workshopCode" name="workshopCode" placeholder="请è¾å
¥è½¦é´ç¼å·" type="text" class="layui-input" lay-verify="required" required/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md12"> |
| | | <label class="layui-form-label">车é´å称<span style="color: red;">*</span></label> |
| | | <div class="layui-input-block"> |
| | | <input id="workshopName" name="workshopName" placeholder="请è¾å
¥è½¦é´å称" type="text" class="layui-input" lay-verify="required" required/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md12"> |
| | | <label class="layui-form-label">产线ç¼å·<span style="color: red;">*</span></label> |
| | | <div class="layui-input-block"> |
| | | <input id="lineCode" name="lineCode" placeholder="请è¾å
¥äº§çº¿ç¼å·" type="text" class="layui-input" lay-verify="required" required/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md12"> |
| | | <label class="layui-form-label">产线å称<span style="color: red;">*</span></label> |
| | | <div class="layui-input-block"> |
| | | <input id="lineName" name="lineName" placeholder="请è¾å
¥äº§çº¿å称" type="text" class="layui-input" lay-verify="required" required/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md12"> |
| | | <label class="layui-form-label">å·¥ä½ç¼ç <span style="color: red;">*</span></label> |
| | | <div class="layui-input-block"> |
| | | <input id="locationCode" name="locationCode" placeholder="请è¾å
¥å·¥ä½ç¼ç " type="text" class="layui-input" lay-verify="required" required/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md12"> |
| | | <label class="layui-form-label">å·¥ä½å称<span style="color: red;">*</span></label> |
| | | <div class="layui-input-block"> |
| | | <input id="locationName" name="locationName" placeholder="请è¾å
¥å·¥ä½å称" type="text" class="layui-input" lay-verify="required" required/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md12"> |
| | | <label class="layui-form-label">ä»åºç¼å·<span style="color: red;">*</span></label> |
| | | <div class="layui-input-block"> |
| | | <input id="warehouseCode" name="warehouseCode" placeholder="请è¾å
¥ä»åºç¼å·" type="text" class="layui-input" lay-verify="required" required/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md12"> |
| | | <label class="layui-form-label">ä»åºå称<span style="color: red;">*</span></label> |
| | | <div class="layui-input-block"> |
| | | <input id="warehouseName" name="warehouseName" placeholder="请è¾å
¥ä»åºå称" type="text" class="layui-input" lay-verify="required" required/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="form-group-bottom text-center"> |
| | | <button class="layui-btn" lay-filter="btnSubmit" lay-submit> æ交 </button> |
| | | <button type="reset" class="layui-btn layui-btn-primary" id="cancel"> åæ¶ </button> |
| | | </div> |
| | | |
| | | </form> |
| | | |
| | | @} |