PLC调度
parent
4ac7cb7a1b
commit
be62e55b97
File diff suppressed because it is too large
Load Diff
|
@ -10,10 +10,13 @@ import java.text.SimpleDateFormat;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.zzjee.wm.entity.WmToMoveGoodsEntity;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
import org.springframework.util.StringUtils;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
@ -163,48 +166,8 @@ public class WmsPlcController extends BaseController {
|
||||||
message = "PLC指令执行成功";
|
message = "PLC指令执行成功";
|
||||||
try{
|
try{
|
||||||
for(String id:ids.split(",")){
|
for(String id:ids.split(",")){
|
||||||
long start = System.currentTimeMillis();
|
run(id,"","");
|
||||||
|
}
|
||||||
WmsPlcEntity wmsPlc = systemService.getEntity(WmsPlcEntity.class,
|
|
||||||
id
|
|
||||||
);
|
|
||||||
SiemensPLCS siemensPLCS = SiemensPLCS.S200Smart;
|
|
||||||
SiemensS7Net siemensS7Net = null;
|
|
||||||
siemensS7Net = new SiemensS7Net(siemensPLCS);
|
|
||||||
siemensS7Net.setIpAddress(wmsPlc.getPlcIp());
|
|
||||||
siemensS7Net.setPort(Integer.parseInt(wmsPlc.getPlcPort()) );
|
|
||||||
OperateResult connect = siemensS7Net.ConnectServer();
|
|
||||||
if(connect.IsSuccess){
|
|
||||||
System.out.println("connect success");
|
|
||||||
}else{
|
|
||||||
System.out.println("connect error");
|
|
||||||
}
|
|
||||||
String[] coms = wmsPlc.getComCons().split(";");
|
|
||||||
for (String com : coms) {
|
|
||||||
Thread.sleep(500);
|
|
||||||
|
|
||||||
String[] split = com.split(",");
|
|
||||||
String defaultAddress = split[1];
|
|
||||||
if(split[0].equals("boolean")){
|
|
||||||
if(split[2].equals("false")){
|
|
||||||
siemensS7Net.Write(defaultAddress,false);
|
|
||||||
}else{
|
|
||||||
siemensS7Net.Write(defaultAddress,true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(split[0].equals("float")){
|
|
||||||
siemensS7Net.Write(defaultAddress,Float.parseFloat(split[2]));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//执行完指令等待时间
|
|
||||||
Thread.sleep(Long.parseLong(wmsPlc.getComTime()));
|
|
||||||
|
|
||||||
|
|
||||||
long end = System.currentTimeMillis();
|
|
||||||
long times = end - start;
|
|
||||||
org.jeecgframework.core.util.LogUtil.info(wmsPlc.getComRemark()+"总耗时" + times + "毫秒"+wmsPlc.getComCons());
|
|
||||||
}
|
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
message = "PLC指令执行失败";
|
message = "PLC指令执行失败";
|
||||||
|
@ -212,6 +175,91 @@ public class WmsPlcController extends BaseController {
|
||||||
}
|
}
|
||||||
j.setMsg(message);
|
j.setMsg(message);
|
||||||
return j;
|
return j;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void run(String id,String comNo,String stepNum){
|
||||||
|
|
||||||
|
if(stepNum.equals("0")){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
WmsPlcEntity wmsPlc = null ;
|
||||||
|
if(StringUtil.isNotEmpty(id)){
|
||||||
|
wmsPlc = systemService.getEntity(WmsPlcEntity.class,id);
|
||||||
|
}
|
||||||
|
if(StringUtil.isNotEmpty(comNo)){
|
||||||
|
|
||||||
|
String hql = "";
|
||||||
|
List<WmsPlcEntity> wmsPlcEntityList = new ArrayList<WmsPlcEntity>();
|
||||||
|
hql = "from WmsPlcEntity t where t.comNo = ? ";
|
||||||
|
wmsPlcEntityList = systemService.findHql(hql,comNo);
|
||||||
|
if(!CollectionUtils.isEmpty(wmsPlcEntityList)){
|
||||||
|
wmsPlc = wmsPlcEntityList.get(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(wmsPlc != null){
|
||||||
|
long start = System.currentTimeMillis();
|
||||||
|
|
||||||
|
SiemensPLCS siemensPLCS = SiemensPLCS.S200Smart;
|
||||||
|
SiemensS7Net siemensS7Net = null;
|
||||||
|
siemensS7Net = new SiemensS7Net(siemensPLCS);
|
||||||
|
siemensS7Net.setIpAddress(wmsPlc.getPlcIp());
|
||||||
|
siemensS7Net.setPort(Integer.parseInt(wmsPlc.getPlcPort()) );
|
||||||
|
OperateResult connect = siemensS7Net.ConnectServer();
|
||||||
|
if(connect.IsSuccess){
|
||||||
|
System.out.println("connect success");
|
||||||
|
}else{
|
||||||
|
System.out.println("connect error");
|
||||||
|
}
|
||||||
|
String comCons = wmsPlc.getComCons();
|
||||||
|
String query01 = wmsPlc.getQuery01();
|
||||||
|
String query02 = wmsPlc.getQuery02();
|
||||||
|
Float stepNumrun = Float.valueOf("1");
|
||||||
|
if(StringUtil.isNotEmpty(stepNum)){
|
||||||
|
stepNumrun =Float.parseFloat(stepNum);
|
||||||
|
}else{
|
||||||
|
stepNumrun =Float.parseFloat(wmsPlc.getSetpNum());
|
||||||
|
}
|
||||||
|
Float stepTime = Float.parseFloat(wmsPlc.getSetpTime());
|
||||||
|
comCons = StringUtils.replace(comCons,"{query01}",query01);
|
||||||
|
comCons = StringUtils.replace(comCons,"{query02}",query02);
|
||||||
|
String[] coms = wmsPlc.getComCons().split(";");
|
||||||
|
for (String com : coms) {
|
||||||
|
try {
|
||||||
|
Thread.sleep(500);
|
||||||
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
String[] split = com.split(",");
|
||||||
|
String defaultAddress = split[1];
|
||||||
|
if(split[0].equals("boolean")){
|
||||||
|
if(split[2].equals("false")){
|
||||||
|
siemensS7Net.Write(defaultAddress,false);
|
||||||
|
}else{
|
||||||
|
siemensS7Net.Write(defaultAddress,true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(split[0].equals("float")){
|
||||||
|
Float runfloat = Float.parseFloat(split[2]) * stepNumrun;
|
||||||
|
siemensS7Net.Write(defaultAddress,runfloat);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//执行完指令等待时间
|
||||||
|
try{
|
||||||
|
Float sleeptime = Math.abs(stepNumrun * stepTime) ;
|
||||||
|
Thread.sleep(sleeptime.longValue());
|
||||||
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
long end = System.currentTimeMillis();
|
||||||
|
long times = end - start;
|
||||||
|
org.jeecgframework.core.util.LogUtil.info(wmsPlc.getComRemark()+"总耗时" + times + "毫秒"+wmsPlc.getComCons());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 批量删除PLC指令
|
* 批量删除PLC指令
|
||||||
|
|
|
@ -22,7 +22,7 @@ import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
* @Title: Entity
|
* @Title: Entity
|
||||||
* @Description: PLC指令
|
* @Description: PLC指令
|
||||||
* @author onlineGenerator
|
* @author onlineGenerator
|
||||||
* @date 2022-09-12 18:33:25
|
* @date 2022-10-22 10:15:15
|
||||||
* @version V1.0
|
* @version V1.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -30,7 +30,7 @@ import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
@Table(name = "wms_plc", schema = "")
|
@Table(name = "wms_plc", schema = "")
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public class WmsPlcEntity implements java.io.Serializable {
|
public class WmsPlcEntity implements java.io.Serializable {
|
||||||
/**主键*/
|
/**id*/
|
||||||
private String id;
|
private String id;
|
||||||
/**创建人名称*/
|
/**创建人名称*/
|
||||||
private String createName;
|
private String createName;
|
||||||
|
@ -74,10 +74,25 @@ public class WmsPlcEntity implements java.io.Serializable {
|
||||||
/**备用1*/
|
/**备用1*/
|
||||||
@Excel(name="备用1")
|
@Excel(name="备用1")
|
||||||
private String remark1;
|
private String remark1;
|
||||||
|
/**指令编号*/
|
||||||
|
@Excel(name="指令编号")
|
||||||
|
private String comNo;
|
||||||
|
/**单步参数1*/
|
||||||
|
@Excel(name="单步参数1")
|
||||||
|
private String query01;
|
||||||
|
/**单步参数2*/
|
||||||
|
@Excel(name="单步参数2")
|
||||||
|
private String query02;
|
||||||
|
/**单步时间*/
|
||||||
|
@Excel(name="单步时间")
|
||||||
|
private String setpTime;
|
||||||
|
/**步数*/
|
||||||
|
@Excel(name="步数")
|
||||||
|
private String setpNum;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*方法: 取得java.lang.String
|
*方法: 取得java.lang.String
|
||||||
*@return: java.lang.String 主键
|
*@return: java.lang.String id
|
||||||
*/
|
*/
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(generator = "paymentableGenerator")
|
@GeneratedValue(generator = "paymentableGenerator")
|
||||||
|
@ -89,7 +104,7 @@ public class WmsPlcEntity implements java.io.Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*方法: 设置java.lang.String
|
*方法: 设置java.lang.String
|
||||||
*@param: java.lang.String 主键
|
*@param: java.lang.String id
|
||||||
*/
|
*/
|
||||||
public void setId(String id){
|
public void setId(String id){
|
||||||
this.id = id;
|
this.id = id;
|
||||||
|
@ -130,7 +145,7 @@ public class WmsPlcEntity implements java.io.Serializable {
|
||||||
*方法: 取得java.util.Date
|
*方法: 取得java.util.Date
|
||||||
*@return: java.util.Date 创建日期
|
*@return: java.util.Date 创建日期
|
||||||
*/
|
*/
|
||||||
@Column(name ="CREATE_DATE",nullable=true,length=20)
|
@Column(name ="CREATE_DATE",nullable=true)
|
||||||
public Date getCreateDate(){
|
public Date getCreateDate(){
|
||||||
return this.createDate;
|
return this.createDate;
|
||||||
}
|
}
|
||||||
|
@ -178,7 +193,7 @@ public class WmsPlcEntity implements java.io.Serializable {
|
||||||
*方法: 取得java.util.Date
|
*方法: 取得java.util.Date
|
||||||
*@return: java.util.Date 更新日期
|
*@return: java.util.Date 更新日期
|
||||||
*/
|
*/
|
||||||
@Column(name ="UPDATE_DATE",nullable=true,length=20)
|
@Column(name ="UPDATE_DATE",nullable=true)
|
||||||
public Date getUpdateDate(){
|
public Date getUpdateDate(){
|
||||||
return this.updateDate;
|
return this.updateDate;
|
||||||
}
|
}
|
||||||
|
@ -338,7 +353,7 @@ public class WmsPlcEntity implements java.io.Serializable {
|
||||||
*方法: 取得java.lang.String
|
*方法: 取得java.lang.String
|
||||||
*@return: java.lang.String 指令集
|
*@return: java.lang.String 指令集
|
||||||
*/
|
*/
|
||||||
@Column(name ="COM_CONS",nullable=true,length=32)
|
@Column(name ="COM_CONS",nullable=true)
|
||||||
public String getComCons(){
|
public String getComCons(){
|
||||||
return this.comCons;
|
return this.comCons;
|
||||||
}
|
}
|
||||||
|
@ -366,4 +381,84 @@ public class WmsPlcEntity implements java.io.Serializable {
|
||||||
public void setRemark1(String remark1){
|
public void setRemark1(String remark1){
|
||||||
this.remark1 = remark1;
|
this.remark1 = remark1;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
*方法: 取得java.lang.String
|
||||||
|
*@return: java.lang.String 指令编号
|
||||||
|
*/
|
||||||
|
@Column(name ="COM_NO",nullable=true,length=32)
|
||||||
|
public String getComNo(){
|
||||||
|
return this.comNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*方法: 设置java.lang.String
|
||||||
|
*@param: java.lang.String 指令编号
|
||||||
|
*/
|
||||||
|
public void setComNo(String comNo){
|
||||||
|
this.comNo = comNo;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*方法: 取得java.lang.String
|
||||||
|
*@return: java.lang.String 单步参数1
|
||||||
|
*/
|
||||||
|
@Column(name ="QUERY01",nullable=true,length=32)
|
||||||
|
public String getQuery01(){
|
||||||
|
return this.query01;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*方法: 设置java.lang.String
|
||||||
|
*@param: java.lang.String 单步参数1
|
||||||
|
*/
|
||||||
|
public void setQuery01(String query01){
|
||||||
|
this.query01 = query01;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*方法: 取得java.lang.String
|
||||||
|
*@return: java.lang.String 单步参数2
|
||||||
|
*/
|
||||||
|
@Column(name ="QUERY02",nullable=true,length=32)
|
||||||
|
public String getQuery02(){
|
||||||
|
return this.query02;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*方法: 设置java.lang.String
|
||||||
|
*@param: java.lang.String 单步参数2
|
||||||
|
*/
|
||||||
|
public void setQuery02(String query02){
|
||||||
|
this.query02 = query02;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*方法: 取得java.lang.String
|
||||||
|
*@return: java.lang.String 单步时间
|
||||||
|
*/
|
||||||
|
@Column(name ="SETP_TIME",nullable=true,length=32)
|
||||||
|
public String getSetpTime(){
|
||||||
|
return this.setpTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*方法: 设置java.lang.String
|
||||||
|
*@param: java.lang.String 单步时间
|
||||||
|
*/
|
||||||
|
public void setSetpTime(String setpTime){
|
||||||
|
this.setpTime = setpTime;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*方法: 取得java.lang.String
|
||||||
|
*@return: java.lang.String 步数
|
||||||
|
*/
|
||||||
|
@Column(name ="SETP_NUM",nullable=true,length=32)
|
||||||
|
public String getSetpNum(){
|
||||||
|
return this.setpNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*方法: 设置java.lang.String
|
||||||
|
*@param: java.lang.String 步数
|
||||||
|
*/
|
||||||
|
public void setSetpNum(String setpNum){
|
||||||
|
this.setpNum = setpNum;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,231 @@
|
||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||||
|
<%@include file="/context/mytags.jsp" %>
|
||||||
|
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
|
||||||
|
<div class="easyui-layout" fit="true">
|
||||||
|
<div style="padding:0px;border:0px">
|
||||||
|
<%-- <div style="margin-left:100px"> 桃红色标识此储位有货,淡绿色标识此储位为空</div>--%>
|
||||||
|
<div name="searchColums" style="float: left; padding-left: 0px;padding-top: 5px;">
|
||||||
|
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 90px;text-align:right;"
|
||||||
|
title="仓库">仓库: </span>
|
||||||
|
<input type="text" name="cangku" value="agv" style="width: 100px; height: 30px;">
|
||||||
|
</span>
|
||||||
|
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 90px;text-align:right;"
|
||||||
|
title="开始">开始: </span>
|
||||||
|
<input type="text" id = "chuweiid" name="chuwei" style="width: 80px; height: 30px;">
|
||||||
|
</span>
|
||||||
|
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 90px;text-align:right;"
|
||||||
|
title="结束">结束: </span>
|
||||||
|
<input type="text" id = "desid" name="des" style="width: 80px; height: 30px;">
|
||||||
|
</span>
|
||||||
|
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 90px;text-align:right;"
|
||||||
|
title="层数">层数: </span>
|
||||||
|
<input type="text" name="cengshu" value="01" style="width: 20px; height: 30px;">
|
||||||
|
</span>
|
||||||
|
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 90px;text-align:right;"
|
||||||
|
title="行数">行数: </span>
|
||||||
|
<input type="text" name="hangshu" value="03" style="width: 20px; height: 30px;">
|
||||||
|
</span>
|
||||||
|
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 90px;text-align:right;"
|
||||||
|
title="列数">列数: </span>
|
||||||
|
<input type="text" name="lieshu" value="03" style="width: 20px; height: 30px;">
|
||||||
|
</span>
|
||||||
|
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 90px;text-align:right;">
|
||||||
|
<button onclick="chaxun('zhengxiang')">查询</button> </span>
|
||||||
|
<button onclick="chaxun('fanxiang')">调度</button> </span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="bottom" style="margin-top:60px;border:2px">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<style type="text/css">
|
||||||
|
#bottom{
|
||||||
|
/*width: 1000px;*/
|
||||||
|
/*background: red;*/
|
||||||
|
/*width: 100%;*/
|
||||||
|
}
|
||||||
|
a.a01:link, a.a01:visited {
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: verdana;
|
||||||
|
/*width: 90px;*/
|
||||||
|
margin: 1px;
|
||||||
|
color: #1A1A1A;
|
||||||
|
display: inline-table;
|
||||||
|
background-color: #FF4040;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.a01:active, a.a01:hover {
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: verdana;
|
||||||
|
/*width: 90px;*/
|
||||||
|
margin: 1px;
|
||||||
|
color: #1A1A1A;
|
||||||
|
display: inline-table;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.a02:link, a.a01:visited {
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: verdana;
|
||||||
|
/*width: 90px;*/
|
||||||
|
margin: 1px;
|
||||||
|
color: #1A1A1A;
|
||||||
|
display: inline-table;
|
||||||
|
background-color: #66CD00;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.a02:active, a.a01:hover {
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: verdana;
|
||||||
|
/*width: 90px;*/
|
||||||
|
margin: 1px;
|
||||||
|
color: #1A1A1A;
|
||||||
|
display: inline-table;
|
||||||
|
}
|
||||||
|
.all{
|
||||||
|
/*display: inline-block;*/
|
||||||
|
width: 160.5px;
|
||||||
|
height:160.5px;
|
||||||
|
line-height: 160.5px;
|
||||||
|
text-align: center;
|
||||||
|
margin-right: 1px;
|
||||||
|
margin-bottom: 1px;
|
||||||
|
}
|
||||||
|
#bottom{
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function addtab(name) {
|
||||||
|
var binid = document.getElementById("chuweiid").value
|
||||||
|
if(!binid){
|
||||||
|
document.getElementById("chuweiid").value = name;
|
||||||
|
|
||||||
|
}else{
|
||||||
|
document.getElementById("desid").value =name;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
chaxun();
|
||||||
|
// $("#mvCusCostListtb").find("input[name='outtime_begin']").attr("class","Wdate").click(function(){WdatePicker({dateFmt:'yyyy-MM-dd'});});
|
||||||
|
// $("#mvCusCostListtb").find("input[name='outtime_end']").attr("class","Wdate").click(function(){WdatePicker({dateFmt:'yyyy-MM-dd'});});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
function chaxun(type) {
|
||||||
|
|
||||||
|
var cangku;
|
||||||
|
var chuwei;
|
||||||
|
var des;
|
||||||
|
cangku = $('input[name="cangku"]').attr("value");
|
||||||
|
chuwei = $('input[name="chuwei"]').attr("value");
|
||||||
|
var hangshu = $('input[name="hangshu"]').attr("value") * 1;
|
||||||
|
var lieshu = $('input[name="lieshu"]').attr("value") * 1;
|
||||||
|
var cengshu = $('input[name="cengshu"]').attr("value");
|
||||||
|
des = $('input[name="des"]').attr("value");
|
||||||
|
//加载消息
|
||||||
|
var url = "mdBinController.do?getbinallagv&binstore=" + cangku + "&binid=" + chuwei + "&des=" + des+ "&cengshu=" + cengshu+ "&hangshu=" + hangshu+ "&type=" + type;
|
||||||
|
$.ajax({
|
||||||
|
url: url,
|
||||||
|
type: "GET",
|
||||||
|
dataType: "JSON",
|
||||||
|
async: false,
|
||||||
|
success: function (data) {
|
||||||
|
if (data.success) {
|
||||||
|
var messageList = data.attributes.messageList;
|
||||||
|
var messageCount = data.obj;
|
||||||
|
|
||||||
|
var messageContent = "";
|
||||||
|
var tincount = 0;
|
||||||
|
if (messageList.length > 0) {
|
||||||
|
let num = hangshu * lieshu +1; // 行数乘以列数 计算一共有多少格子
|
||||||
|
let obj ={
|
||||||
|
bin_store: "",
|
||||||
|
binid: "",
|
||||||
|
colour: "white",
|
||||||
|
des: "",
|
||||||
|
tincount: "",
|
||||||
|
xnode: "",
|
||||||
|
ynode: "",
|
||||||
|
znode: "",
|
||||||
|
} ;// 创建一个空数字 用于填充空格子(因为空格子后台不返回 前端循环渲染需要填充数据)
|
||||||
|
let list = []; // 创建数组填充所有格子
|
||||||
|
//循环填充数组
|
||||||
|
for(let s = 0 ; s < num ; s ++){
|
||||||
|
list.push(obj);
|
||||||
|
}
|
||||||
|
for(let o = 0; o < messageList.length; o++){
|
||||||
|
if(messageList[o].ynode*1 == 1){
|
||||||
|
console.log(messageList[o].ynode*1 * messageList[o].xnode*1 )
|
||||||
|
list[messageList[o].ynode*1 * messageList[o].xnode*1 ] = messageList[o]
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
console.log((messageList[o].ynode*1 - 1) * hangshu*1 + messageList[o].xnode*1)
|
||||||
|
list[(messageList[o].ynode*1 - 1) * hangshu*1 + messageList[o].xnode*1 ] = messageList[o]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// console.log(list)
|
||||||
|
//计算宽度
|
||||||
|
var width = 170.5 * hangshu*1
|
||||||
|
$("#bottom").css("width",width);
|
||||||
|
|
||||||
|
for (let i = 1; i < list.length; i++) {
|
||||||
|
messageContent += " <div class='all' href='javascript:void(0);' style='background:" +list[i].colour+"' id='" +list[i].binid+"' onclick='javascript:addtab(\"" + list[i].binid + "\")';return false;'>";
|
||||||
|
messageContent += list[i].tincount+ " </div> ";
|
||||||
|
// tincount = list[i].tincount + 0;
|
||||||
|
// if (tincount > 0) {
|
||||||
|
// messageContent += " <a class='a01 all' href='javascript:void(0);' onclick='javascript:addtab(\"" + list[i].des + "\")';return false;'>";
|
||||||
|
// messageContent += list[i].binid + " </a> ";
|
||||||
|
//
|
||||||
|
// } else {
|
||||||
|
// messageContent += " <a class='a02 all' href='javascript:void(0);' >";
|
||||||
|
// messageContent += list[i].binid + " </a> ";
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
// var aList = $('.all')
|
||||||
|
// console.log(aList)
|
||||||
|
|
||||||
|
// for (var i = 0; i < messageList.length; i++) {
|
||||||
|
// tincount = messageList[i].tincount + 0;
|
||||||
|
// if (tincount > 0) {
|
||||||
|
// messageContent += " <a class='a01' href='javascript:void(0);' onclick='javascript:addtab(\"" + messageList[i].des + "\")';return false;'>";
|
||||||
|
// messageContent += messageList[i].binid + " </a> ";
|
||||||
|
//
|
||||||
|
// } else {
|
||||||
|
// messageContent += " <a class='a02' href='javascript:void(0);' >";
|
||||||
|
// messageContent += messageList[i].binid + " </a> ";
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$("#bottom").html(messageContent);
|
||||||
|
// console.dir(messageContent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function print(id) {
|
||||||
|
|
||||||
|
if (begindate == "" || enddate == "") {
|
||||||
|
alert("开始或者结束日期不能为空");
|
||||||
|
} else {
|
||||||
|
var url = "mvCusCostController.do?doPrint&id=" + id + "&begindate=" + begindate + "&enddate=" + enddate;
|
||||||
|
window.open(url);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
|
@ -1,206 +1,222 @@
|
||||||
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||||
<%@include file="/context/mytags.jsp"%>
|
<%@include file="/context/mytags.jsp"%>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="zh-CN">
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<title>PLC指令</title>
|
<title>PLC指令</title>
|
||||||
<meta name="description" content="">
|
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<script type="text/javascript">
|
||||||
<link rel="stylesheet" href="online/template/ledefault/css/vendor.css">
|
|
||||||
<link rel="stylesheet" href="online/template/ledefault/css/bootstrap-theme.css">
|
|
||||||
<link rel="stylesheet" href="online/template/ledefault/css/bootstrap.css">
|
|
||||||
<link rel="stylesheet" href="online/template/ledefault/css/app.css">
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="plug-in/Validform/css/metrole/style.css" type="text/css"/>
|
|
||||||
<link rel="stylesheet" href="plug-in/Validform/css/metrole/tablefrom.css" type="text/css"/>
|
|
||||||
|
|
||||||
<script type="text/javascript" src="plug-in/jquery/jquery-1.8.3.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/tools/dataformat.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/easyui/jquery.easyui.min.1.3.2.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/easyui/locale/zh-cn.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/tools/syUtil.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/My97DatePicker/WdatePicker.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/lhgDialog/lhgdialog.min.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/tools/curdtools_zh-cn.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/tools/easyuiextend.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/Validform/js/Validform_v5.3.1_min_zh-cn.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/Validform/js/Validform_Datatype_zh-cn.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/Validform/js/datatype_zh-cn.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/Validform/plugin/passwordStrength/passwordStrength-min.js"></script>
|
|
||||||
<script type="text/javascript" charset="utf-8" src="plug-in/ueditor/ueditor.config.js"></script>
|
|
||||||
<script type="text/javascript" charset="utf-8" src="plug-in/ueditor/ueditor.all.min.js"></script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
//编写自定义JS代码
|
//编写自定义JS代码
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="wmsPlcController.do?doAdd" >
|
||||||
|
<input id="id" name="id" type="hidden" value="${wmsPlcPage.id }"/>
|
||||||
|
<input id="createName" name="createName" type="hidden" value="${wmsPlcPage.createName }"/>
|
||||||
|
<input id="createBy" name="createBy" type="hidden" value="${wmsPlcPage.createBy }"/>
|
||||||
|
<input id="createDate" name="createDate" type="hidden" value="${wmsPlcPage.createDate }"/>
|
||||||
|
<input id="updateName" name="updateName" type="hidden" value="${wmsPlcPage.updateName }"/>
|
||||||
|
<input id="updateBy" name="updateBy" type="hidden" value="${wmsPlcPage.updateBy }"/>
|
||||||
|
<input id="updateDate" name="updateDate" type="hidden" value="${wmsPlcPage.updateDate }"/>
|
||||||
|
<input id="sysOrgCode" name="sysOrgCode" type="hidden" value="${wmsPlcPage.sysOrgCode }"/>
|
||||||
|
<input id="sysCompanyCode" name="sysCompanyCode" type="hidden" value="${wmsPlcPage.sysCompanyCode }"/>
|
||||||
|
<input id="bpmStatus" name="bpmStatus" type="hidden" value="${wmsPlcPage.bpmStatus }"/>
|
||||||
|
<table style="width: 600px;" cellpadding="0" cellspacing="1" class="formtable">
|
||||||
|
<tr>
|
||||||
|
<td align="right">
|
||||||
|
<label class="Validform_label">
|
||||||
|
PLCIP:
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td class="value">
|
||||||
|
<input id="plcIp" name="plcIp" type="text" style="width: 150px" class="inputxt"
|
||||||
|
|
||||||
<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="wmsPlcController.do?doAdd" tiptype="1" >
|
ignore="ignore"
|
||||||
<input type="hidden" id="btn_sub" class="btn_sub"/>
|
/>
|
||||||
<input type="hidden" id="id" name="id"/>
|
<span class="Validform_checktip"></span>
|
||||||
<div class="tab-wrapper">
|
<label class="Validform_label" style="display: none;">PLCIP</label>
|
||||||
<!-- tab -->
|
</td>
|
||||||
<ul class="nav nav-tabs">
|
<tr>
|
||||||
<li role="presentation" class="active"><a href="javascript:void(0);">PLC指令</a></li>
|
<td align="right">
|
||||||
</ul>
|
<label class="Validform_label">
|
||||||
<!-- tab内容 -->
|
PLC端口:
|
||||||
<div class="con-wrapper" id="con-wrapper1" style="display: block;">
|
</label>
|
||||||
<div class="row form-wrapper">
|
</td>
|
||||||
<div class="row show-grid">
|
<td class="value">
|
||||||
<div class="col-xs-3 text-center">
|
<input id="plcPort" name="plcPort" type="text" style="width: 150px" class="inputxt"
|
||||||
<b>PLCIP:</b>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-3">
|
|
||||||
<input id="plcIp" name="plcIp" type="text" class="form-control"
|
|
||||||
ignore="ignore"
|
|
||||||
/>
|
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
|
||||||
<label class="Validform_label" style="display: none">PLCIP</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
ignore="ignore"
|
||||||
|
/>
|
||||||
|
<span class="Validform_checktip"></span>
|
||||||
|
<label class="Validform_label" style="display: none;">PLC端口</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right">
|
||||||
|
<label class="Validform_label">
|
||||||
|
PLC型号:
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td class="value">
|
||||||
|
<input id="plcType" name="plcType" type="text" style="width: 150px" class="inputxt"
|
||||||
|
|
||||||
<div class="row show-grid">
|
ignore="ignore"
|
||||||
<div class="col-xs-3 text-center">
|
/>
|
||||||
<b>PLC端口:</b>
|
<span class="Validform_checktip"></span>
|
||||||
</div>
|
<label class="Validform_label" style="display: none;">PLC型号</label>
|
||||||
<div class="col-xs-3">
|
</td>
|
||||||
<input id="plcPort" name="plcPort" type="text" class="form-control"
|
<tr>
|
||||||
ignore="ignore"
|
<td align="right">
|
||||||
/>
|
<label class="Validform_label">
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
指令备注:
|
||||||
<label class="Validform_label" style="display: none">PLC端口</label>
|
</label>
|
||||||
</div>
|
</td>
|
||||||
</div>
|
<td class="value">
|
||||||
|
<input id="comRemark" name="comRemark" type="text" style="width: 150px" class="inputxt"
|
||||||
|
|
||||||
|
ignore="ignore"
|
||||||
|
/>
|
||||||
|
<span class="Validform_checktip"></span>
|
||||||
|
<label class="Validform_label" style="display: none;">指令备注</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right">
|
||||||
|
<label class="Validform_label">
|
||||||
|
执行时间:
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td class="value">
|
||||||
|
<input id="comTime" name="comTime" type="text" style="width: 150px" class="inputxt"
|
||||||
|
|
||||||
<div class="row show-grid">
|
ignore="ignore"
|
||||||
<div class="col-xs-3 text-center">
|
/>
|
||||||
<b>PLC型号:</b>
|
<span class="Validform_checktip"></span>
|
||||||
</div>
|
<label class="Validform_label" style="display: none;">执行时间</label>
|
||||||
<div class="col-xs-3">
|
</td>
|
||||||
<input id="plcType" name="plcType" type="text" class="form-control"
|
<tr>
|
||||||
ignore="ignore"
|
<td align="right">
|
||||||
/>
|
<label class="Validform_label">
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
执行顺序:
|
||||||
<label class="Validform_label" style="display: none">PLC型号</label>
|
</label>
|
||||||
</div>
|
</td>
|
||||||
</div>
|
<td class="value">
|
||||||
|
<input id="comSeq" name="comSeq" type="text" style="width: 150px" class="inputxt"
|
||||||
|
|
||||||
|
ignore="ignore"
|
||||||
|
/>
|
||||||
|
<span class="Validform_checktip"></span>
|
||||||
|
<label class="Validform_label" style="display: none;">执行顺序</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right">
|
||||||
|
<label class="Validform_label">
|
||||||
|
指令集:
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td class="value">
|
||||||
|
<textarea style="width:600px;" class="inputxt" rows="6" id="comCons" name="comCons"
|
||||||
|
ignore="ignore"
|
||||||
|
></textarea>
|
||||||
|
<span class="Validform_checktip"></span>
|
||||||
|
<label class="Validform_label" style="display: none;">指令集</label>
|
||||||
|
</td>
|
||||||
|
<tr>
|
||||||
|
<td align="right">
|
||||||
|
<label class="Validform_label">
|
||||||
|
备用1:
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td class="value">
|
||||||
|
<input id="remark1" name="remark1" type="text" style="width: 150px" class="inputxt"
|
||||||
|
|
||||||
<div class="row show-grid">
|
ignore="ignore"
|
||||||
<div class="col-xs-3 text-center">
|
/>
|
||||||
<b>指令备注:</b>
|
<span class="Validform_checktip"></span>
|
||||||
</div>
|
<label class="Validform_label" style="display: none;">备用1</label>
|
||||||
<div class="col-xs-3">
|
</td>
|
||||||
<input id="comRemark" name="comRemark" type="text" class="form-control"
|
</tr>
|
||||||
ignore="ignore"
|
<tr>
|
||||||
/>
|
<td align="right">
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
<label class="Validform_label">
|
||||||
<label class="Validform_label" style="display: none">指令备注</label>
|
指令编号:
|
||||||
</div>
|
</label>
|
||||||
</div>
|
</td>
|
||||||
|
<td class="value">
|
||||||
|
<input id="comNo" name="comNo" type="text" style="width: 150px" class="inputxt"
|
||||||
|
|
||||||
|
ignore="ignore"
|
||||||
|
/>
|
||||||
|
<span class="Validform_checktip"></span>
|
||||||
|
<label class="Validform_label" style="display: none;">指令编号</label>
|
||||||
|
</td>
|
||||||
|
<tr>
|
||||||
|
<td align="right">
|
||||||
|
<label class="Validform_label">
|
||||||
|
单步参数1:
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td class="value">
|
||||||
|
<input id="query01" name="query01" type="text" style="width: 150px" class="inputxt"
|
||||||
|
|
||||||
<div class="row show-grid">
|
ignore="ignore"
|
||||||
<div class="col-xs-3 text-center">
|
/>
|
||||||
<b>执行时间:</b>
|
<span class="Validform_checktip"></span>
|
||||||
</div>
|
<label class="Validform_label" style="display: none;">单步参数1</label>
|
||||||
<div class="col-xs-3">
|
</td>
|
||||||
<input id="comTime" name="comTime" type="text" class="form-control"
|
</tr>
|
||||||
ignore="ignore"
|
<tr>
|
||||||
/>
|
<td align="right">
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
<label class="Validform_label">
|
||||||
<label class="Validform_label" style="display: none">执行时间</label>
|
单步参数2:
|
||||||
</div>
|
</label>
|
||||||
</div>
|
</td>
|
||||||
|
<td class="value">
|
||||||
|
<input id="query02" name="query02" type="text" style="width: 150px" class="inputxt"
|
||||||
|
|
||||||
|
ignore="ignore"
|
||||||
|
/>
|
||||||
|
<span class="Validform_checktip"></span>
|
||||||
|
<label class="Validform_label" style="display: none;">单步参数2</label>
|
||||||
|
</td>
|
||||||
|
<tr>
|
||||||
|
<td align="right">
|
||||||
|
<label class="Validform_label">
|
||||||
|
单步时间:
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td class="value">
|
||||||
|
<input id="setpTime" name="setpTime" type="text" style="width: 150px" class="inputxt"
|
||||||
|
|
||||||
<div class="row show-grid">
|
ignore="ignore"
|
||||||
<div class="col-xs-3 text-center">
|
/>
|
||||||
<b>执行顺序:</b>
|
<span class="Validform_checktip"></span>
|
||||||
</div>
|
<label class="Validform_label" style="display: none;">单步时间</label>
|
||||||
<div class="col-xs-3">
|
</td>
|
||||||
<input id="comSeq" name="comSeq" type="text" class="form-control"
|
</tr>
|
||||||
ignore="ignore"
|
<tr>
|
||||||
/>
|
<td align="right">
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
<label class="Validform_label">
|
||||||
<label class="Validform_label" style="display: none">执行顺序</label>
|
步数:
|
||||||
</div>
|
</label>
|
||||||
</div>
|
</td>
|
||||||
|
<td class="value">
|
||||||
|
<input id="setpNum" name="setpNum" type="text" style="width: 150px" class="inputxt"
|
||||||
|
|
||||||
|
ignore="ignore"
|
||||||
<div class="row show-grid">
|
/>
|
||||||
<div class="col-xs-3 text-center">
|
<span class="Validform_checktip"></span>
|
||||||
<b>指令集:</b>
|
<label class="Validform_label" style="display: none;">步数</label>
|
||||||
</div>
|
</td>
|
||||||
<div class="col-xs-3">
|
<td align="right">
|
||||||
<textarea id="comCons" class="form-control" rows="6"
|
<label class="Validform_label">
|
||||||
ignore="ignore"
|
</label>
|
||||||
name="comCons"></textarea>
|
</td>
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
<td class="value">
|
||||||
<label class="Validform_label" style="display: none">指令集</label>
|
</td>
|
||||||
</div>
|
</tr>
|
||||||
</div>
|
</table>
|
||||||
|
</t:formvalid>
|
||||||
|
|
||||||
<div class="row show-grid">
|
|
||||||
<div class="col-xs-3 text-center">
|
|
||||||
<b>备用1:</b>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-3">
|
|
||||||
<input id="remark1" name="remark1" type="text" class="form-control"
|
|
||||||
ignore="ignore"
|
|
||||||
/>
|
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
|
||||||
<label class="Validform_label" style="display: none">备用1</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row" id = "sub_tr" style="display: none;">
|
|
||||||
<div class="col-xs-12 layout-header">
|
|
||||||
<div class="col-xs-6"></div>
|
|
||||||
<div class="col-xs-6"><button type="button" onclick="neibuClick();" class="btn btn-default">提交</button></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="con-wrapper" id="con-wrapper2" style="display: block;"></div>
|
|
||||||
</div>
|
|
||||||
</t:formvalid>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(function(){
|
|
||||||
//查看模式情况下,删除和上传附件功能禁止使用
|
|
||||||
if(location.href.indexOf("load=detail")!=-1){
|
|
||||||
$(".jeecgDetail").hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(location.href.indexOf("mode=read")!=-1){
|
|
||||||
//查看模式控件禁用
|
|
||||||
$("#formobj").find(":input").attr("disabled","disabled");
|
|
||||||
}
|
|
||||||
if(location.href.indexOf("mode=onbutton")!=-1){
|
|
||||||
//其他模式显示提交按钮
|
|
||||||
$("#sub_tr").show();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
var neibuClickFlag = false;
|
|
||||||
function neibuClick() {
|
|
||||||
neibuClickFlag = true;
|
|
||||||
$('#btn_sub').trigger('click');
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</body>
|
</body>
|
||||||
<script src = "webpage/com/zzjee/plc/wmsPlc.js"></script>
|
<script src = "webpage/com/zzjee/plc/wmsPlc.js"></script>
|
||||||
</html>
|
|
||||||
|
|
|
@ -1,206 +1,210 @@
|
||||||
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||||
<%@include file="/context/mytags.jsp"%>
|
<%@include file="/context/mytags.jsp"%>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="zh-CN">
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<title>PLC指令</title>
|
<title>PLC指令</title>
|
||||||
<meta name="description" content="">
|
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<script type="text/javascript">
|
||||||
<link rel="stylesheet" href="online/template/ledefault/css/vendor.css">
|
|
||||||
<link rel="stylesheet" href="online/template/ledefault/css/bootstrap-theme.css">
|
|
||||||
<link rel="stylesheet" href="online/template/ledefault/css/bootstrap.css">
|
|
||||||
<link rel="stylesheet" href="online/template/ledefault/css/app.css">
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="plug-in/Validform/css/metrole/style.css" type="text/css"/>
|
|
||||||
<link rel="stylesheet" href="plug-in/Validform/css/metrole/tablefrom.css" type="text/css"/>
|
|
||||||
|
|
||||||
<script type="text/javascript" src="plug-in/jquery/jquery-1.8.3.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/tools/dataformat.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/easyui/jquery.easyui.min.1.3.2.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/easyui/locale/zh-cn.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/tools/syUtil.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/My97DatePicker/WdatePicker.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/lhgDialog/lhgdialog.min.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/tools/curdtools_zh-cn.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/tools/easyuiextend.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/Validform/js/Validform_v5.3.1_min_zh-cn.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/Validform/js/Validform_Datatype_zh-cn.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/Validform/js/datatype_zh-cn.js"></script>
|
|
||||||
<script type="text/javascript" src="plug-in/Validform/plugin/passwordStrength/passwordStrength-min.js"></script>
|
|
||||||
<script type="text/javascript" charset="utf-8" src="plug-in/ueditor/ueditor.config.js"></script>
|
|
||||||
<script type="text/javascript" charset="utf-8" src="plug-in/ueditor/ueditor.all.min.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
//编写自定义JS代码
|
//编写自定义JS代码
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="wmsPlcController.do?doUpdate" tiptype="1" >
|
<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="wmsPlcController.do?doUpdate" >
|
||||||
<input type="hidden" id="btn_sub" class="btn_sub"/>
|
<input id="id" name="id" type="hidden" value="${wmsPlcPage.id }">
|
||||||
<input type="hidden" name="id" value='${wmsPlcPage.id}' >
|
<input id="createName" name="createName" type="hidden" value="${wmsPlcPage.createName }">
|
||||||
|
<input id="createBy" name="createBy" type="hidden" value="${wmsPlcPage.createBy }">
|
||||||
|
<input id="createDate" name="createDate" type="hidden" value="${wmsPlcPage.createDate }">
|
||||||
<div class="tab-wrapper">
|
<input id="updateName" name="updateName" type="hidden" value="${wmsPlcPage.updateName }">
|
||||||
<!-- tab -->
|
<input id="updateBy" name="updateBy" type="hidden" value="${wmsPlcPage.updateBy }">
|
||||||
<ul class="nav nav-tabs">
|
<input id="updateDate" name="updateDate" type="hidden" value="${wmsPlcPage.updateDate }">
|
||||||
<li role="presentation" class="active"><a href="javascript:void(0);">PLC指令</a></li>
|
<input id="sysOrgCode" name="sysOrgCode" type="hidden" value="${wmsPlcPage.sysOrgCode }">
|
||||||
</ul>
|
<input id="sysCompanyCode" name="sysCompanyCode" type="hidden" value="${wmsPlcPage.sysCompanyCode }">
|
||||||
<!-- tab内容 -->
|
<input id="bpmStatus" name="bpmStatus" type="hidden" value="${wmsPlcPage.bpmStatus }">
|
||||||
<div class="con-wrapper" id="con-wrapper1" style="display: block;">
|
<table style="width: 600px;" cellpadding="0" cellspacing="1" class="formtable">
|
||||||
<div class="row form-wrapper">
|
<tr>
|
||||||
<div class="row show-grid">
|
<td align="right">
|
||||||
<div class="col-xs-3 text-center">
|
<label class="Validform_label">
|
||||||
<b>PLCIP:</b>
|
PLCIP:
|
||||||
</div>
|
</label>
|
||||||
<div class="col-xs-3">
|
</td>
|
||||||
<input id="plcIp" name="plcIp" type="text" class="form-control"
|
<td class="value">
|
||||||
ignore="ignore"
|
<input id="plcIp" name="plcIp" type="text" style="width: 150px" class="inputxt"
|
||||||
value='${wmsPlcPage.plcIp}' />
|
ignore="ignore"
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
value='${wmsPlcPage.plcIp}'>
|
||||||
<label class="Validform_label" style="display: none">PLCIP</label>
|
<span class="Validform_checktip"></span>
|
||||||
</div>
|
<label class="Validform_label" style="display: none;">PLCIP</label>
|
||||||
</div>
|
</td>
|
||||||
|
<tr>
|
||||||
|
<td align="right">
|
||||||
<div class="row show-grid">
|
<label class="Validform_label">
|
||||||
<div class="col-xs-3 text-center">
|
PLC端口:
|
||||||
<b>PLC端口:</b>
|
</label>
|
||||||
</div>
|
</td>
|
||||||
<div class="col-xs-3">
|
<td class="value">
|
||||||
<input id="plcPort" name="plcPort" type="text" class="form-control"
|
<input id="plcPort" name="plcPort" type="text" style="width: 150px" class="inputxt"
|
||||||
ignore="ignore"
|
ignore="ignore"
|
||||||
value='${wmsPlcPage.plcPort}' />
|
value='${wmsPlcPage.plcPort}'>
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
<span class="Validform_checktip"></span>
|
||||||
<label class="Validform_label" style="display: none">PLC端口</label>
|
<label class="Validform_label" style="display: none;">PLC端口</label>
|
||||||
</div>
|
</td>
|
||||||
</div>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right">
|
||||||
<div class="row show-grid">
|
<label class="Validform_label">
|
||||||
<div class="col-xs-3 text-center">
|
PLC型号:
|
||||||
<b>PLC型号:</b>
|
</label>
|
||||||
</div>
|
</td>
|
||||||
<div class="col-xs-3">
|
<td class="value">
|
||||||
<input id="plcType" name="plcType" type="text" class="form-control"
|
<input id="plcType" name="plcType" type="text" style="width: 150px" class="inputxt"
|
||||||
ignore="ignore"
|
ignore="ignore"
|
||||||
value='${wmsPlcPage.plcType}' />
|
value='${wmsPlcPage.plcType}'>
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
<span class="Validform_checktip"></span>
|
||||||
<label class="Validform_label" style="display: none">PLC型号</label>
|
<label class="Validform_label" style="display: none;">PLC型号</label>
|
||||||
</div>
|
</td>
|
||||||
</div>
|
<tr>
|
||||||
|
<td align="right">
|
||||||
|
<label class="Validform_label">
|
||||||
<div class="row show-grid">
|
指令备注:
|
||||||
<div class="col-xs-3 text-center">
|
</label>
|
||||||
<b>指令备注:</b>
|
</td>
|
||||||
</div>
|
<td class="value">
|
||||||
<div class="col-xs-3">
|
<input id="comRemark" name="comRemark" type="text" style="width: 150px" class="inputxt"
|
||||||
<input id="comRemark" name="comRemark" type="text" class="form-control"
|
ignore="ignore"
|
||||||
ignore="ignore"
|
value='${wmsPlcPage.comRemark}'>
|
||||||
value='${wmsPlcPage.comRemark}' />
|
<span class="Validform_checktip"></span>
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
<label class="Validform_label" style="display: none;">指令备注</label>
|
||||||
<label class="Validform_label" style="display: none">指令备注</label>
|
</td>
|
||||||
</div>
|
</tr>
|
||||||
</div>
|
<tr>
|
||||||
|
<td align="right">
|
||||||
|
<label class="Validform_label">
|
||||||
<div class="row show-grid">
|
执行时间:
|
||||||
<div class="col-xs-3 text-center">
|
</label>
|
||||||
<b>执行时间:</b>
|
</td>
|
||||||
</div>
|
<td class="value">
|
||||||
<div class="col-xs-3">
|
<input id="comTime" name="comTime" type="text" style="width: 150px" class="inputxt"
|
||||||
<input id="comTime" name="comTime" type="text" class="form-control"
|
ignore="ignore"
|
||||||
ignore="ignore"
|
value='${wmsPlcPage.comTime}'>
|
||||||
value='${wmsPlcPage.comTime}' />
|
<span class="Validform_checktip"></span>
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
<label class="Validform_label" style="display: none;">执行时间</label>
|
||||||
<label class="Validform_label" style="display: none">执行时间</label>
|
</td>
|
||||||
</div>
|
<tr>
|
||||||
</div>
|
<td align="right">
|
||||||
|
<label class="Validform_label">
|
||||||
|
执行顺序:
|
||||||
<div class="row show-grid">
|
</label>
|
||||||
<div class="col-xs-3 text-center">
|
</td>
|
||||||
<b>执行顺序:</b>
|
<td class="value">
|
||||||
</div>
|
<input id="comSeq" name="comSeq" type="text" style="width: 150px" class="inputxt"
|
||||||
<div class="col-xs-3">
|
ignore="ignore"
|
||||||
<input id="comSeq" name="comSeq" type="text" class="form-control"
|
value='${wmsPlcPage.comSeq}'>
|
||||||
ignore="ignore"
|
<span class="Validform_checktip"></span>
|
||||||
value='${wmsPlcPage.comSeq}' />
|
<label class="Validform_label" style="display: none;">执行顺序</label>
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
</td>
|
||||||
<label class="Validform_label" style="display: none">执行顺序</label>
|
</tr>
|
||||||
</div>
|
<tr>
|
||||||
</div>
|
<td align="right">
|
||||||
|
<label class="Validform_label">
|
||||||
|
指令集:
|
||||||
<div class="row show-grid">
|
</label>
|
||||||
<div class="col-xs-3 text-center">
|
</td>
|
||||||
<b>指令集:</b>
|
<td class="value">
|
||||||
</div>
|
<textarea id="comCons" style="width:600px;" class="inputxt" rows="6" name="comCons"
|
||||||
<div class="col-xs-3">
|
ignore="ignore"
|
||||||
<textarea id="comCons" class="form-control" rows="6"
|
>${wmsPlcPage.comCons}</textarea>
|
||||||
ignore="ignore"
|
<span class="Validform_checktip"></span>
|
||||||
name="comCons">${wmsPlcPage.comCons}</textarea>
|
<label class="Validform_label" style="display: none;">指令集</label>
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
</td>
|
||||||
<label class="Validform_label" style="display: none">指令集</label>
|
<tr>
|
||||||
</div>
|
<td align="right">
|
||||||
</div>
|
<label class="Validform_label">
|
||||||
|
备用1:
|
||||||
|
</label>
|
||||||
<div class="row show-grid">
|
</td>
|
||||||
<div class="col-xs-3 text-center">
|
<td class="value">
|
||||||
<b>备用1:</b>
|
<input id="remark1" name="remark1" type="text" style="width: 150px" class="inputxt"
|
||||||
</div>
|
ignore="ignore"
|
||||||
<div class="col-xs-3">
|
value='${wmsPlcPage.remark1}'>
|
||||||
<input id="remark1" name="remark1" type="text" class="form-control"
|
<span class="Validform_checktip"></span>
|
||||||
ignore="ignore"
|
<label class="Validform_label" style="display: none;">备用1</label>
|
||||||
value='${wmsPlcPage.remark1}' />
|
</td>
|
||||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
</tr>
|
||||||
<label class="Validform_label" style="display: none">备用1</label>
|
<tr>
|
||||||
</div>
|
<td align="right">
|
||||||
</div>
|
<label class="Validform_label">
|
||||||
|
指令编号:
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td class="value">
|
||||||
<div class="row" id = "sub_tr" style="display: none;">
|
<input id="comNo" name="comNo" type="text" style="width: 150px" class="inputxt"
|
||||||
<div class="col-xs-12 layout-header">
|
ignore="ignore"
|
||||||
<div class="col-xs-6"></div>
|
value='${wmsPlcPage.comNo}'>
|
||||||
<div class="col-xs-6"><button type="button" onclick="neibuClick();" class="btn btn-default">提交</button></div>
|
<span class="Validform_checktip"></span>
|
||||||
</div>
|
<label class="Validform_label" style="display: none;">指令编号</label>
|
||||||
</div>
|
</td>
|
||||||
</div>
|
<tr>
|
||||||
</div>
|
<td align="right">
|
||||||
|
<label class="Validform_label">
|
||||||
<div class="con-wrapper" id="con-wrapper2" style="display: block;"></div>
|
单步参数1:
|
||||||
</div>
|
</label>
|
||||||
</t:formvalid>
|
</td>
|
||||||
|
<td class="value">
|
||||||
<script type="text/javascript">
|
<input id="query01" name="query01" type="text" style="width: 150px" class="inputxt"
|
||||||
$(function(){
|
ignore="ignore"
|
||||||
//查看模式情况下,删除和上传附件功能禁止使用
|
value='${wmsPlcPage.query01}'>
|
||||||
if(location.href.indexOf("load=detail")!=-1){
|
<span class="Validform_checktip"></span>
|
||||||
$(".jeecgDetail").hide();
|
<label class="Validform_label" style="display: none;">单步参数1</label>
|
||||||
}
|
</td>
|
||||||
|
</tr>
|
||||||
if(location.href.indexOf("mode=read")!=-1){
|
<tr>
|
||||||
//查看模式控件禁用
|
<td align="right">
|
||||||
$("#formobj").find(":input").attr("disabled","disabled");
|
<label class="Validform_label">
|
||||||
}
|
单步参数2:
|
||||||
if(location.href.indexOf("mode=onbutton")!=-1){
|
</label>
|
||||||
//其他模式显示提交按钮
|
</td>
|
||||||
$("#sub_tr").show();
|
<td class="value">
|
||||||
}
|
<input id="query02" name="query02" type="text" style="width: 150px" class="inputxt"
|
||||||
});
|
ignore="ignore"
|
||||||
|
value='${wmsPlcPage.query02}'>
|
||||||
var neibuClickFlag = false;
|
<span class="Validform_checktip"></span>
|
||||||
function neibuClick() {
|
<label class="Validform_label" style="display: none;">单步参数2</label>
|
||||||
neibuClickFlag = true;
|
</td>
|
||||||
$('#btn_sub').trigger('click');
|
<tr>
|
||||||
}
|
<td align="right">
|
||||||
|
<label class="Validform_label">
|
||||||
</script>
|
单步时间:
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td class="value">
|
||||||
|
<input id="setpTime" name="setpTime" type="text" style="width: 150px" class="inputxt"
|
||||||
|
ignore="ignore"
|
||||||
|
value='${wmsPlcPage.setpTime}'>
|
||||||
|
<span class="Validform_checktip"></span>
|
||||||
|
<label class="Validform_label" style="display: none;">单步时间</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right">
|
||||||
|
<label class="Validform_label">
|
||||||
|
步数:
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td class="value">
|
||||||
|
<input id="setpNum" name="setpNum" type="text" style="width: 150px" class="inputxt"
|
||||||
|
ignore="ignore"
|
||||||
|
value='${wmsPlcPage.setpNum}'>
|
||||||
|
<span class="Validform_checktip"></span>
|
||||||
|
<label class="Validform_label" style="display: none;">步数</label>
|
||||||
|
</td>
|
||||||
|
<td align="right">
|
||||||
|
<label class="Validform_label">
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td class="value">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</t:formvalid>
|
||||||
</body>
|
</body>
|
||||||
<script src = "webpage/com/zzjee/plc/wmsPlc.js"></script>
|
<script src = "webpage/com/zzjee/plc/wmsPlc.js"></script>
|
||||||
</html>
|
|
||||||
|
|
|
@ -21,6 +21,10 @@ function commonUpload(callback){
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
function browseImages(inputId, Img) {// 图片管理器,可多个上传共用
|
||||||
|
}
|
||||||
|
function browseFiles(inputId, file) {// 文件管理器,可多个上传共用
|
||||||
|
}
|
||||||
function decode(value, id) {//value传入值,id接受值
|
function decode(value, id) {//value传入值,id接受值
|
||||||
var last = value.lastIndexOf("/");
|
var last = value.lastIndexOf("/");
|
||||||
var filename = value.substring(last + 1, value.length);
|
var filename = value.substring(last + 1, value.length);
|
||||||
|
|
|
@ -14,14 +14,19 @@
|
||||||
<t:dgCol title="所属部门" field="sysOrgCode" hidden="true" queryMode="single" width="120"></t:dgCol>
|
<t:dgCol title="所属部门" field="sysOrgCode" hidden="true" queryMode="single" width="120"></t:dgCol>
|
||||||
<t:dgCol title="所属公司" field="sysCompanyCode" hidden="true" queryMode="single" width="120"></t:dgCol>
|
<t:dgCol title="所属公司" field="sysCompanyCode" hidden="true" queryMode="single" width="120"></t:dgCol>
|
||||||
<t:dgCol title="流程状态" field="bpmStatus" hidden="true" queryMode="single" dictionary="bpm_status" width="120"></t:dgCol>
|
<t:dgCol title="流程状态" field="bpmStatus" hidden="true" queryMode="single" dictionary="bpm_status" width="120"></t:dgCol>
|
||||||
<t:dgCol title="PLCIP" field="plcIp" query="true" queryMode="single" width="120"></t:dgCol>
|
<t:dgCol title="PLCIP" field="plcIp" queryMode="group" width="120"></t:dgCol>
|
||||||
<t:dgCol title="PLC端口" field="plcPort" query="true" queryMode="single" width="120"></t:dgCol>
|
<t:dgCol title="PLC端口" field="plcPort" queryMode="group" width="120"></t:dgCol>
|
||||||
<t:dgCol title="PLC型号" field="plcType" query="true" queryMode="single" width="120"></t:dgCol>
|
<t:dgCol title="PLC型号" field="plcType" query="true" queryMode="group" width="120"></t:dgCol>
|
||||||
<t:dgCol title="指令备注" field="comRemark" query="true" queryMode="single" width="120"></t:dgCol>
|
<t:dgCol title="指令备注" field="comRemark" query="true" queryMode="group" width="120"></t:dgCol>
|
||||||
<t:dgCol title="执行时间(毫秒)" field="comTime" queryMode="single" width="120"></t:dgCol>
|
<t:dgCol title="执行时间" field="comTime" queryMode="group" width="120"></t:dgCol>
|
||||||
<t:dgCol title="执行顺序" field="comSeq" queryMode="single" width="120"></t:dgCol>
|
<t:dgCol title="执行顺序" field="comSeq" queryMode="group" width="120"></t:dgCol>
|
||||||
<t:dgCol title="指令集" field="comCons" queryMode="single" width="120"></t:dgCol>
|
<t:dgCol title="指令集" field="comCons" queryMode="group" width="120"></t:dgCol>
|
||||||
<t:dgCol title="备用1" field="remark1" queryMode="single" width="120"></t:dgCol>
|
<t:dgCol title="备用1" field="remark1" queryMode="group" width="120"></t:dgCol>
|
||||||
|
<t:dgCol title="指令编号" field="comNo" query="true" queryMode="single" width="120"></t:dgCol>
|
||||||
|
<t:dgCol title="单步参数1" field="query01" queryMode="single" width="120"></t:dgCol>
|
||||||
|
<t:dgCol title="单步参数2" field="query02" queryMode="single" width="120"></t:dgCol>
|
||||||
|
<t:dgCol title="单步时间" field="setpTime" queryMode="single" width="120"></t:dgCol>
|
||||||
|
<t:dgCol title="步数" field="setpNum" queryMode="single" width="120"></t:dgCol>
|
||||||
<t:dgCol title="操作" field="opt" width="100"></t:dgCol>
|
<t:dgCol title="操作" field="opt" width="100"></t:dgCol>
|
||||||
<t:dgDelOpt title="删除" url="wmsPlcController.do?doDel&id={id}" urlclass="ace_button" urlfont="fa-trash-o"/>
|
<t:dgDelOpt title="删除" url="wmsPlcController.do?doDel&id={id}" urlclass="ace_button" urlfont="fa-trash-o"/>
|
||||||
<t:dgToolBar title="录入" icon="icon-add" url="wmsPlcController.do?goAdd" funname="add"></t:dgToolBar>
|
<t:dgToolBar title="录入" icon="icon-add" url="wmsPlcController.do?goAdd" funname="add"></t:dgToolBar>
|
||||||
|
|
Loading…
Reference in New Issue