Commit 5a87f452 authored by 黄自鹏's avatar 黄自鹏

Merge branch 'master' of gitlab.gavelinfo.com:gavelinfo/kwell-mes

parents 12b48924 a2a7b819
package com.gavel.kwell.controller;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.BaseURL;
import com.gavel.common.SystemOperation;
import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.base.BaseEditJSON;
import com.gavel.common.base.controller.BaseController;
import com.gavel.common.converter.DataConvert;
import com.gavel.common.utils.ThreadContext;
import com.gavel.kwell.service.PcjhkService;
import com.gavel.kwell.vo.PcjhkCondition;
import com.gavel.kwell.vo.PcjhkVO;
import com.gavel.kwell.vo.PcjhmxkCondition;
import com.gavel.kwell.vo.PcjhmxkVO;
import com.gavel.persistence.sql.RecordSet;
import com.gavel.wo.utils.PcjhDjlyEnum;
@Controller
@RequestMapping("kmes/pcjhk")
public class PcjhkController extends BaseController {
@Autowired
private PcjhkService pcjhkService;
@ResourcePermissions()
@RequestMapping("/index")
public String index() {
return "wo/pcjhk/index";
}
@ResourcePermissions({SystemOperation.BottonResource.ADD})
@RequestMapping("/add")
public String add() {
return "wo/pcjhk/edit";
}
@ResourcePermissions({SystemOperation.BottonResource.EDIT})
@RequestMapping("/edit")
public String edit() {
return "wo/pcjhk/edit";
}
@RequestMapping("/arrange")
public String poarrange() {
return "wo/pcjhk/arrange";
}
@RequestMapping("/wosearch")
public String wosearch() {
return "wo/pcjhk/wosearch";
}
@RequestMapping(value = BaseURL.GET, method = RequestMethod.POST)
@ResponseBody
public Object get(@RequestBody JSONObject param) {
PcjhkCondition condition = DataConvert.getCondition(param, PcjhkCondition.class);
RecordSet<PcjhkVO> records = pcjhkService.query(condition);
if ( records.getRecords()!=null && records.getRecords().size()>=1 ){
return buildReturnData(PcjhkVO.class, records.getRecords().get(0));
}
return buildReturnData(PcjhkVO.class, null);
}
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody JSONObject param) {
PcjhkCondition condition = DataConvert.getCondition(param, PcjhkCondition.class);
RecordSet<PcjhkVO> records = pcjhkService.query(condition);
return buildReturnData(records, PcjhkVO.class);
}
@RequestMapping(value = BaseURL.QUERY_DETAIL, method = RequestMethod.POST)
@ResponseBody
public Object queryDetails(@RequestBody JSONObject param) {
PcjhmxkCondition condition = DataConvert.getCondition(param, PcjhmxkCondition.class);
RecordSet<PcjhmxkVO> records = pcjhkService.queryDetails(condition);
return buildReturnData(records, PcjhmxkVO.class);
}
@ResourcePermissions(SystemOperation.BottonResource.ADD)
@RequestMapping(value = BaseURL.ADD, method = RequestMethod.POST)
@ResponseBody
public Object insert(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
pcjhkService.insert(editJson);
return ThreadContext.getReturnData();
}
@ResourcePermissions(SystemOperation.BottonResource.EDIT)
@RequestMapping(value = BaseURL.UPDATE, method = RequestMethod.POST)
@ResponseBody
public Object update(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
pcjhkService.update(editJson);
return ThreadContext.getReturnData();
}
@ResourcePermissions(SystemOperation.BottonResource.DELETE)
@RequestMapping(value = BaseURL.DELETE, method = RequestMethod.POST)
@ResponseBody
public Object delete(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
pcjhkService.delete(editJson);
return ThreadContext.getReturnData();
}
@ResourcePermissions(SystemOperation.BottonResource.EXPORT)
@RequestMapping(value = BaseURL.EXPORT, method = RequestMethod.POST)
@ResponseBody
public void export(HttpServletRequest request,HttpServletResponse response, @RequestBody JSONObject param) throws Exception {
PcjhkCondition condition = DataConvert.getCondition(param, PcjhkCondition.class);
RecordSet<PcjhkVO> records = pcjhkService.query(condition);
doExport(request, response, param, records.getRecords());
}
@RequestMapping(value = "init/djly", method = RequestMethod.POST)
@ResponseBody
public Object initDjly(@RequestBody JSONObject param) {
return buildReturnData(PcjhDjlyEnum.toList());
}
}
package com.gavel.kwell.controller;
import com.gavel.common.BaseURL;
import com.gavel.common.base.BaseEditJSON;
import com.gavel.common.base.controller.BaseController;
import com.gavel.common.converter.DataConvert;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.gavel.persistence.sql.RecordSet;
import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.SystemOperation;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.BaseURL;
import com.gavel.common.SystemOperation;
import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.base.BaseEditJSON;
import com.gavel.common.base.controller.BaseController;
import com.gavel.common.converter.DataConvert;
import com.gavel.common.utils.ThreadContext;
import com.gavel.kwell.service.ZjhService;
import com.gavel.kwell.vo.ZjhCondition;
import com.gavel.kwell.vo.ZjhVO;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.gavel.kwell.service.PcjhmxkService;
import com.gavel.kwell.vo.PcjhmxkCondition;
import com.gavel.kwell.vo.PcjhmxkVO;
import com.gavel.persistence.sql.RecordSet;
import com.gavel.wo.vo.PcjhmxVO;
@Controller
@RequestMapping("kmes/zjh")
public class ZjhController extends BaseController {
@RequestMapping("kmes/pcjhmxk")
public class PcjhmxkController extends BaseController {
@Autowired
private ZjhService zjhService;
private PcjhmxkService pcjhmxkService;
@ResourcePermissions()
@RequestMapping("/index")
public String index() {
return "kmes/zjh/index";
return "wo/pcjhmxk/index";
}
@ResourcePermissions({SystemOperation.BottonResource.ADD})
@RequestMapping("/add")
public String add() {
return "kmes/zjh/edit";
return "wo/pcjhmxk/edit";
}
@ResourcePermissions({SystemOperation.BottonResource.EDIT})
@RequestMapping("/edit")
public String edit() {
return "kmes/zjh/edit";
return "wo/pcjhmxk/edit";
}
@RequestMapping(value = BaseURL.GET, method = RequestMethod.POST)
@ResponseBody
public Object get(@RequestBody JSONObject param) {
ZjhCondition condition = DataConvert.getCondition(param, ZjhCondition.class);
RecordSet<ZjhVO> records = zjhService.query(condition);
PcjhmxkCondition condition = DataConvert.getCondition(param, PcjhmxkCondition.class);
RecordSet<PcjhmxkVO> records = pcjhmxkService.query(condition);
if ( records.getRecords()!=null && records.getRecords().size()>=1 ){
return buildReturnData(ZjhVO.class, records.getRecords().get(0));
return buildReturnData(PcjhmxVO.class, records.getRecords().get(0));
}
return buildReturnData(ZjhVO.class, null);
return buildReturnData(PcjhmxVO.class, null);
}
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody JSONObject param) {
ZjhCondition condition = DataConvert.getCondition(param, ZjhCondition.class);
RecordSet<ZjhVO> records = zjhService.query(condition);
return buildReturnData(records, ZjhVO.class);
PcjhmxkCondition condition = DataConvert.getCondition(param, PcjhmxkCondition.class);
RecordSet<PcjhmxkVO> records = pcjhmxkService.query(condition);
return buildReturnData(records, PcjhmxkVO.class);
}
@ResourcePermissions(SystemOperation.BottonResource.ADD)
......@@ -73,7 +73,7 @@ public class ZjhController extends BaseController {
@ResponseBody
public Object insert(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
zjhService.insert(editJson);
pcjhmxkService.insert(editJson);
return ThreadContext.getReturnData();
}
......@@ -82,7 +82,7 @@ public class ZjhController extends BaseController {
@ResponseBody
public Object update(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
zjhService.update(editJson);
pcjhmxkService.update(editJson);
return ThreadContext.getReturnData();
}
......@@ -91,7 +91,7 @@ public class ZjhController extends BaseController {
@ResponseBody
public Object delete(@RequestBody JSONObject param) {
BaseEditJSON editJson = BaseEditJSON.parseJSON(param);
zjhService.delete(editJson);
pcjhmxkService.delete(editJson);
return ThreadContext.getReturnData();
}
......@@ -99,8 +99,8 @@ public class ZjhController extends BaseController {
@RequestMapping(value = BaseURL.EXPORT, method = RequestMethod.POST)
@ResponseBody
public void export(HttpServletRequest request,HttpServletResponse response, @RequestBody JSONObject param) throws Exception {
ZjhCondition condition = DataConvert.getCondition(param, ZjhCondition.class);
RecordSet<ZjhVO> records = zjhService.query(condition);
PcjhmxkCondition condition = DataConvert.getCondition(param, PcjhmxkCondition.class);
RecordSet<PcjhmxkVO> records = pcjhmxkService.query(condition);
doExport(request, response, param, records.getRecords());
}
......
package com.gavel.kwell.dao;
import com.gavel.common.base.dao.BaseDao;
import com.gavel.kwell.vo.PcjhkCondition;
import com.gavel.kwell.vo.PcjhkVO;
import com.gavel.persistence.sql.RecordSet;
import com.gavel.kwell.vo.ZjhCondition;
import com.gavel.kwell.vo.ZjhVO;
public interface ZjhDao extends BaseDao {
public interface PcjhkDao extends BaseDao {
public RecordSet<ZjhVO> query(ZjhCondition condition);
public RecordSet<PcjhkVO> query(PcjhkCondition condition);
}
package com.gavel.kwell.dao;
import com.gavel.common.base.dao.BaseDao;
import com.gavel.kwell.vo.PcjhmxkCondition;
import com.gavel.kwell.vo.PcjhmxkVO;
import com.gavel.persistence.sql.RecordSet;
public interface PcjhmxkDao extends BaseDao {
public RecordSet<PcjhmxkVO> query(PcjhmxkCondition condition);
}
package com.gavel.kwell.dao.impl;
import com.gavel.common.base.dao.impl.BaseDaoImpl;
import com.gavel.common.utils.DateUtils;
import com.gavel.common.utils.StringUtils;
import com.gavel.kwell.dao.PcjhkDao;
import com.gavel.kwell.vo.PcjhkCondition;
import com.gavel.kwell.vo.PcjhkVO;
import com.gavel.persistence.sql.RecordSet;
import com.gavel.persistence.sql.SqlMap;
import com.gavel.persistence.sql.SqlUtil;
import org.springframework.stereotype.Repository;
@Repository("pcjhkDao")
public class PcjhkDaoImpl extends BaseDaoImpl implements PcjhkDao {
public RecordSet<PcjhkVO> query(PcjhkCondition condition){
SqlMap sqlMap = new SqlMap();
sqlMap.setPageNo(condition.getPageNo());
sqlMap.setRowCount(condition.getPageSize());
sqlMap.append("select PCJH_ID, PCJH_DJID, PCJH_JHRQ,PCJH_JSRQ, PCJH_BMID, PCJH_JHR, ");
sqlMap.append(" PCJH_DJLY, PCJH_BZ, PCJH_WHRID, PCJH_WHR, PCJH_WHSJ, ");
sqlMap.append(" PCJH_CJRID, PCJH_CJR, PCJH_CJSJ, PCJH_SYSVERSION,BM_CODE, BM_NAME ");
sqlMap.append("from PCJH ");
sqlMap.append(" left join BM on BM_ID = PCJH_BMID ");
sqlMap.append("where 1 = 1 ");
if (StringUtils.isNotEmpty(condition.getId())){
sqlMap.append(" and " + SqlUtil.getWhereSql("PCJH_ID", condition.getId()));
sqlMap.setParamValue("PCJH_ID", condition.getId());
}
if (StringUtils.isNotEmpty(condition.getBmid())){
sqlMap.append(" and PCJH_BMID = :pJHBMID ");
sqlMap.setParamValue("pJHBMID", condition.getBmid());
}
if (condition.getStart() != null) {
sqlMap.append(" and PCJH_JHRQ >= :pStart ");
sqlMap.setParamValue("pStart", DateUtils.beginOfDay(condition.getStart()));
}
if (condition.getEnd() != null) {
sqlMap.append(" and PCJH_JHRQ <= :pEnd ");
sqlMap.setParamValue("pEnd", DateUtils.endOfDay(condition.getEnd()));
}
if(StringUtils.isNotEmpty(condition.getDjid())){
sqlMap.append(" and " + SqlUtil.getWhereLikeSql("PCJH_DJID"));
sqlMap.setParamValueLike("PCJH_DJID", condition.getDjid());
}
sqlMap.append("order by PCJH_JHRQ desc,PCJH_DJID desc ");
sqlMap.query(PcjhkVO.class);
return sqlMap.getRecordSet();
}
}
package com.gavel.kwell.dao.impl;
import com.gavel.common.base.dao.impl.BaseDaoImpl;
import com.gavel.common.utils.StringUtils;
import com.gavel.kwell.dao.PcjhmxkDao;
import com.gavel.kwell.vo.PcjhmxkCondition;
import com.gavel.kwell.vo.PcjhmxkVO;
import com.gavel.persistence.sql.RecordSet;
import com.gavel.persistence.sql.SqlMap;
import com.gavel.persistence.sql.SqlUtil;
import org.springframework.stereotype.Repository;
@Repository("pcjhmxkDao")
public class PcjhmxkDaoImpl extends BaseDaoImpl implements PcjhmxkDao {
public RecordSet<PcjhmxkVO> query(PcjhmxkCondition condition){
SqlMap sqlMap = new SqlMap();
sqlMap.setPageNo(condition.getPageNo());
sqlMap.setRowCount(condition.getPageSize());
sqlMap.append("select PCJHMX_ID, PCJHMX_MID, PCJHMX_XH, PCJHMX_WOID, PCJHMX_JHRQ,PCJHMX_JSRQ, ");
sqlMap.append(" PCJHMX_WLID, PCJHMX_JHSL, PCJHMX_WGSL, PCJHMX_HGSL, PCJHMX_BHGSL, ");
sqlMap.append(" PCJHMX_BZ, PCJHMX_WHRID, PCJHMX_WHR, PCJHMX_WHSJ, PCJHMX_CJRID, ");
sqlMap.append(" PCJHMX_CJR, PCJHMX_CJSJ, PCJHMX_SYSVERSION, ");
sqlMap.append(" WLXX_CODE, WLXX_NAME, WLXX_GG,WO_DJID ");
sqlMap.append("from PCJHMX ");
sqlMap.append(" left join WLXX on WLXX_ID = PCJHMX_WLID ");
sqlMap.append(" left join WO on WO_ID = PCJHMX_WOID ");
sqlMap.append("where 1 = 1 ");
if (StringUtils.isNotEmpty(condition.getId())){
sqlMap.append(" and " + SqlUtil.getWhereSql("PCJHMX_ID", condition.getId()));
sqlMap.setParamValue("PCJHMX_ID", condition.getId());
}
if (StringUtils.isNotEmpty(condition.getMid())){
sqlMap.append(" and " + SqlUtil.getWhereSql("PCJHMX_MID", condition.getMid()));
sqlMap.setParamValue("PCJHMX_MID", condition.getMid());
}
if (StringUtils.isNotEmpty(condition.getWoid())){
sqlMap.append(" and " + SqlUtil.getWhereSql("PCJHMX_WOID", condition.getWoid()));
sqlMap.setParamValue("PCJHMX_WOID", condition.getWoid());
}
sqlMap.append("order by PCJHMX_XH desc");
sqlMap.query(PcjhmxkVO.class);
return sqlMap.getRecordSet();
}
}
package com.gavel.kwell.dao.impl;
import com.gavel.common.base.dao.impl.BaseDaoImpl;
import com.gavel.common.utils.StringUtils;
import com.gavel.persistence.sql.RecordSet;
import com.gavel.persistence.sql.SqlMap;
import com.gavel.persistence.sql.SqlUtil;
import org.springframework.stereotype.Repository;
import com.gavel.kwell.dao.ZjhDao;
import com.gavel.kwell.vo.ZjhCondition;
import com.gavel.kwell.vo.ZjhVO;
@Repository("zjhDao")
public class ZjhDaoImpl extends BaseDaoImpl implements ZjhDao {
public RecordSet<ZjhVO> query(ZjhCondition condition){
SqlMap sqlMap = new SqlMap();
sqlMap.setPageNo(condition.getPageNo());
sqlMap.setRowCount(condition.getPageSize());
sqlMap.append("select ZJH_ID, ZJH_DJID, ZJH_BMID, ZJH_WOID, ZJH_KSRQ, ");
sqlMap.append(" ZJH_WLID, ZJH_JHSL, ZJH_WGSL, ZJH_HGSL, ZJH_BHGSL, ");
sqlMap.append(" ZJH_BZ, ZJH_WHRID, ZJH_WHR, ZJH_WHSJ, ZJH_CJRID, ");
sqlMap.append(" ZJH_CJR, ZJH_CJSJ, ZJH_SYSVERSION, ZJH_JHR, ZJH_JSRQ ");
sqlMap.append("from ZJH ");
sqlMap.append("where 1 = 1 ");
if (StringUtils.isNotEmpty(condition.getId())){
sqlMap.append(" and " + SqlUtil.getWhereSql("ZJH_ID", condition.getId()));
sqlMap.setParamValue("ZJH_ID", condition.getId());
}
sqlMap.query(ZjhVO.class);
return sqlMap.getRecordSet();
}
}
package com.gavel.kwell.persistent;
import java.util.Date;
import com.gavel.persistence.annotation.FieldMeta;
import com.gavel.wo.persistent.Pcjh;
public class Pcjhk extends Pcjh{
private static final long serialVersionUID = 1234567890L;
@FieldMeta(fieldName = "PCJH_JSRQ", caption = "计划结束日期")
private Date jsrq;
public Date getJsrq() {
return jsrq;
}
public void setJsrq(Date jsrq) {
this.jsrq = jsrq;
}
}
package com.gavel.kwell.persistent;
import java.util.Date;
import com.gavel.persistence.annotation.FieldMeta;
import com.gavel.wo.persistent.Pcjhmx;
public class Pcjhmxk extends Pcjhmx{
private static final long serialVersionUID = 1234567890L;
@FieldMeta(fieldName = "PCJHMX_JSRQ", caption = "计划结束日期")
private Date jsrq;
public Date getJsrq() {
return jsrq;
}
public void setJsrq(Date jsrq) {
this.jsrq = jsrq;
}
}
package com.gavel.kwell.persistent;
import java.util.Date;
import com.gavel.common.base.entity.BaseEntity;
import com.gavel.common.utils.CodeStrategy;
import com.gavel.persistence.annotation.FieldMeta;
import com.gavel.persistence.annotation.TableMeta;
@TableMeta(id = "ZJH", name = "ZJH")
public class Zjh extends BaseEntity {
private static final long serialVersionUID = 1L;
@FieldMeta(fieldName = "ZJH_ID", caption = "ID", primaryKey = true, notEmpty = true, codeStrategy = CodeStrategy.UUID)
private String id;
@FieldMeta(fieldName = "ZJH_DJID", caption = "计划编码")
private String djid;
@FieldMeta(fieldName = "ZJH_BMID", caption = "部门编码")
private String bmid;
@FieldMeta(fieldName = "ZJH_WOID", caption = "生产订单ID")
private String woid;
@FieldMeta(fieldName = "ZJH_KSRQ", caption = "计划开始日期")
private Date ksrq;
@FieldMeta(fieldName = "ZJH_WLID", caption = "物料ID")
private String wlid;
@FieldMeta(fieldName = "ZJH_JHSL", caption = "计划数量")
private Double jhsl;
@FieldMeta(fieldName = "ZJH_WGSL", caption = "完工数量")
private Double wgsl;
@FieldMeta(fieldName = "ZJH_HGSL", caption = "合格数量")
private Double hgsl;
@FieldMeta(fieldName = "ZJH_BHGSL", caption = "不合格数量")
private Double bhgsl;
@FieldMeta(fieldName = "ZJH_BZ", caption = "备注")
private String bz;
@FieldMeta(fieldName = "ZJH_WHRID", caption = "维护人编码", autoUserId = true)
private String whrid;
@FieldMeta(fieldName = "ZJH_WHR", caption = "维护人", autoUserName = true)
private String whr;
@FieldMeta(fieldName = "ZJH_WHSJ", caption = "维护时间", autoDateTime = true)
private Date whsj;
@FieldMeta(fieldName = "ZJH_CJRID", caption = "创建人编码", autoUserId = true, initial = true)
private String cjrid;
@FieldMeta(fieldName = "ZJH_CJR", caption = "创建人", autoUserName = true, initial = true)
private String cjr;
@FieldMeta(fieldName = "ZJH_CJSJ", caption = "创建时间", autoDateTime = true, initial = true)
private Date cjsj;
@FieldMeta(fieldName = "ZJH_SYSVERSION", caption = "系统版本")
private Integer sysversion;
@FieldMeta(fieldName = "ZJH_JHR", caption = "计划人")
private String jhr;
@FieldMeta(fieldName = "ZJH_JSRQ", caption = "结束日期")
private Date jsrq;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getDjid() {
return djid;
}
public void setDjid(String djid) {
this.djid = djid;
}
public String getBmid() {
return bmid;
}
public void setBmid(String bmid) {
this.bmid = bmid;
}
public String getWoid() {
return woid;
}
public void setWoid(String woid) {
this.woid = woid;
}
public Date getKsrq() {
return ksrq;
}
public void setKsrq(Date ksrq) {
this.ksrq = ksrq;
}
public String getWlid() {
return wlid;
}
public void setWlid(String wlid) {
this.wlid = wlid;
}
public Double getJhsl() {
return jhsl;
}
public void setJhsl(Double jhsl) {
this.jhsl = jhsl;
}
public Double getWgsl() {
return wgsl;
}
public void setWgsl(Double wgsl) {
this.wgsl = wgsl;
}
public Double getHgsl() {
return hgsl;
}
public void setHgsl(Double hgsl) {
this.hgsl = hgsl;
}
public Double getBhgsl() {
return bhgsl;
}
public void setBhgsl(Double bhgsl) {
this.bhgsl = bhgsl;
}
public String getBz() {
return bz;
}
public void setBz(String bz) {
this.bz = bz;
}
public String getWhrid() {
return whrid;
}
public void setWhrid(String whrid) {
this.whrid = whrid;
}
public String getWhr() {
return whr;
}
public void setWhr(String whr) {
this.whr = whr;
}
public Date getWhsj() {
return whsj;
}
public void setWhsj(Date whsj) {
this.whsj = whsj;
}
public String getCjrid() {
return cjrid;
}
public void setCjrid(String cjrid) {
this.cjrid = cjrid;
}
public String getCjr() {
return cjr;
}
public void setCjr(String cjr) {
this.cjr = cjr;
}
public Date getCjsj() {
return cjsj;
}
public void setCjsj(Date cjsj) {
this.cjsj = cjsj;
}
public Integer getSysversion() {
return sysversion;
}
public void setSysversion(Integer sysversion) {
this.sysversion = sysversion;
}
public String getJhr() {
return jhr;
}
public void setJhr(String jhr) {
this.jhr = jhr;
}
public Date getJsrq() {
return jsrq;
}
public void setJsrq(Date jsrq) {
this.jsrq = jsrq;
}
}
package com.gavel.kwell.service;
import com.gavel.common.base.service.BaseEditService;
import com.gavel.kwell.vo.PcjhkCondition;
import com.gavel.kwell.vo.PcjhkVO;
import com.gavel.kwell.vo.PcjhmxkCondition;
import com.gavel.kwell.vo.PcjhmxkVO;
import com.gavel.persistence.sql.RecordSet;
public interface PcjhkService extends BaseEditService {
public RecordSet<PcjhkVO> query(PcjhkCondition condition);
public RecordSet<PcjhmxkVO> queryDetails(PcjhmxkCondition condition);
}
package com.gavel.kwell.service;
import com.gavel.common.base.service.BaseEditService;
import com.gavel.kwell.vo.PcjhmxkCondition;
import com.gavel.kwell.vo.PcjhmxkVO;
import com.gavel.persistence.sql.RecordSet;
import com.gavel.kwell.vo.ZjhCondition;
import com.gavel.kwell.vo.ZjhVO;
public interface ZjhService extends BaseEditService {
public interface PcjhmxkService extends BaseEditService {
public RecordSet<ZjhVO> query(ZjhCondition condition);
public RecordSet<PcjhmxkVO> query(PcjhmxkCondition condition);
}
package com.gavel.kwell.service.impl;
import com.gavel.common.base.entity.BaseEntity;
import com.gavel.common.base.service.impl.BaseEditServiceImpl;
import com.gavel.common.business.service.CommonService;
import com.gavel.common.utils.DateUtils;
import com.gavel.common.utils.StringUtils;
import com.gavel.kwell.dao.PcjhkDao;
import com.gavel.kwell.dao.PcjhmxkDao;
import com.gavel.kwell.persistent.Pcjhk;
import com.gavel.kwell.persistent.Pcjhmxk;
import com.gavel.kwell.service.PcjhkService;
import com.gavel.kwell.vo.PcjhkCondition;
import com.gavel.kwell.vo.PcjhkVO;
import com.gavel.kwell.vo.PcjhmxkCondition;
import com.gavel.kwell.vo.PcjhmxkVO;
import com.gavel.persistence.sql.RecordSet;
import com.gavel.wo.dao.PcjhmxDao;
import com.gavel.wo.persistent.Pcjhmx;
import com.gavel.wo.vo.PcjhmxCondition;
import com.gavel.wo.vo.PcjhmxVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.gavel.wo.dao.PcjhDao;
import com.gavel.wo.persistent.Pcjh;
import com.gavel.wo.service.PcjhService;
import com.gavel.wo.vo.PcjhCondition;
import com.gavel.wo.vo.PcjhVO;
@Service("pcjhkService")
@Transactional
public class PcjhkServiceImpl extends BaseEditServiceImpl implements PcjhkService {
@Autowired
private PcjhkDao pcjhkDao;
@Autowired
private PcjhmxkDao pcjhmxkDao;
@Autowired
private CommonService commonService;
@Override
public void initService() {
addMaster( Pcjhk.class);
addDetail(Pcjhmxk.class);
}
@Override
public RecordSet<PcjhkVO> query(PcjhkCondition condition) {
return pcjhkDao.query(condition);
}
@Override
public RecordSet<PcjhmxkVO> queryDetails(PcjhmxkCondition condition) {
return pcjhmxkDao.query(condition);
}
@Override
public void beforeInsert(BaseEntity entity) {
if ( entity !=null && entity instanceof Pcjh) {
Pcjhk pcjhk = (Pcjhk)entity;
if(StringUtils.isEmpty(pcjhk.getDjid())){
pcjhk.setDjid(commonService.getOrderID("PCJH", DateUtils.getDatetimeStr("yyyyMM"), 12));
}
}
}
}
package com.gavel.kwell.service.impl;
import com.gavel.common.base.service.impl.BaseEditServiceImpl;
import com.gavel.kwell.dao.PcjhmxkDao;
import com.gavel.kwell.persistent.Pcjhmxk;
import com.gavel.kwell.service.PcjhmxkService;
import com.gavel.kwell.vo.PcjhmxkCondition;
import com.gavel.kwell.vo.PcjhmxkVO;
import com.gavel.persistence.sql.RecordSet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.gavel.kwell.dao.ZjhDao;
import com.gavel.kwell.persistent.Zjh;
import com.gavel.kwell.service.ZjhService;
import com.gavel.kwell.vo.ZjhCondition;
import com.gavel.kwell.vo.ZjhVO;
@Service("zjhService")
@Service("pcjhmxkService")
@Transactional
public class ZjhServiceImpl extends BaseEditServiceImpl implements ZjhService {
public class PcjhmxkServiceImpl extends BaseEditServiceImpl implements PcjhmxkService {
@Autowired
private ZjhDao zjhDao;
private PcjhmxkDao pcjhmxkDao;
@Override
public void initService() {
addMaster( Zjh.class);
addMaster( Pcjhmxk.class);
}
@Override
public RecordSet<ZjhVO> query(ZjhCondition condition) {
return zjhDao.query(condition);
public RecordSet<PcjhmxkVO> query(PcjhmxkCondition condition) {
return pcjhmxkDao.query(condition);
}
}
package com.gavel.kwell.vo;
import com.gavel.common.base.entity.BaseEntity;
import java.util.Date;
public class PcjhkCondition extends BaseEntity {
private static final long serialVersionUID = 1L;
private String id;
private Date start;
private Date end;
private String bmid;
private String zt;
private String djid;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Date getStart() {
return start;
}
public void setStart(Date start) {
this.start = start;
}
public Date getEnd() {
return end;
}
public void setEnd(Date end) {
this.end = end;
}
public String getBmid() {
return bmid;
}
public void setBmid(String bmid) {
this.bmid = bmid;
}
public String getZt() {
return zt;
}
public void setZt(String zt) {
this.zt = zt;
}
public String getDjid() {
return djid;
}
public void setDjid(String djid) {
this.djid = djid;
}
}
package com.gavel.kwell.vo;
import com.gavel.kwell.persistent.Pcjhk;
import com.gavel.persistence.annotation.FieldMeta;
public class PcjhkVO extends Pcjhk {
private static final long serialVersionUID = 1L;
@FieldMeta(fieldName = "BM_CODE", caption = "部门编码")
private String bmCode;
@FieldMeta(fieldName = "BM_NAME", caption = "部门名称")
private String bmName;
public String getBmCode() {
return bmCode;
}
public void setBmCode(String bmCode) {
this.bmCode = bmCode;
}
public String getBmName() {
return bmName;
}
public void setBmName(String bmName) {
this.bmName = bmName;
}
}
package com.gavel.kwell.vo;
import com.gavel.common.base.entity.BaseEntity;
public class PcjhmxkCondition extends BaseEntity {
private static final long serialVersionUID = 1L;
private String id;
private String mid;
private String woid;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getMid() {
return mid;
}
public void setMid(String mid) {
this.mid = mid;
}
public String getWoid() {
return woid;
}
public void setWoid(String woid) {
this.woid = woid;
}
}
package com.gavel.kwell.vo;
import com.gavel.kwell.persistent.Pcjhmxk;
import com.gavel.persistence.annotation.FieldMeta;
public class PcjhmxkVO extends Pcjhmxk {
private static final long serialVersionUID = 1L;
/*---------AutoBegin-----------*/
@FieldMeta(fieldName = "WO_DJID", caption = "任务单号")
private String woDjid;
@FieldMeta(fieldName = "WLXX_CODE", caption = "物料编码")
private String wlxxCode;
@FieldMeta(fieldName = "WLXX_NAME", caption = "物料名称")
private String wlxxName;
@FieldMeta(fieldName = "WLXX_GG", caption = "规格")
private String wlxxGg;
public String getWoDjid() {
return woDjid;
}
public void setWoDjid(String woDjid) {
this.woDjid = woDjid;
}
public String getWlxxCode() {
return wlxxCode;
}
public void setWlxxCode(String wlxxCode) {
this.wlxxCode = wlxxCode;
}
public String getWlxxName() {
return wlxxName;
}
public void setWlxxName(String wlxxName) {
this.wlxxName = wlxxName;
}
public String getWlxxGg() {
return wlxxGg;
}
public void setWlxxGg(String wlxxGg) {
this.wlxxGg = wlxxGg;
}
/*---------AutoEnd-------------*/
}
package com.gavel.kwell.vo;
import com.gavel.kwell.persistent.Zjh;
public class ZjhVO extends Zjh {
private static final long serialVersionUID = 1L;
/*---------AutoBegin-----------*/
/*---------AutoEnd-------------*/
}
......@@ -33,9 +33,6 @@
<menu mkid="901001400" mkmc="点位配置" url="kmes/point/index">
<print entity="com.gavel.kwell.vo.UpointVO"/>
</menu>
<menu mkid="901001600" mkmc="周计划" url="kmes/zjh/index">
<print entity="com.gavel.kwell.vo.ZjhVO"/>
</menu>
</menu>
<menu mkid="1901000000" mkmc = "装配大屏" gnlx="M">
......@@ -46,6 +43,12 @@
<menu mkid="1901000600" mkmc="维修反馈" url="kmes/gpwx/index" gnlx="M">
</menu>
</menu>
<menu mkid="510020000" mkmc="排产计划">
<menu mkid="510020100" mkmc="排产计划维护" url="kmes/pcjhk/index">
<print entity="com.gavel.kwell.vo.PcjhkVO" type="M"/>
<print entity="com.gavel.kwell.vo.PcjhmxkVO" type="D"/>
</menu>
</menu>
<disableMenus>
<menu mkid="510050000" mkmc="生产入库"/>
<menu mkid="290040100" mkmc="生产入库登记"/>
......
......@@ -60,7 +60,7 @@
<div class="center-left fl">
<div class="left-top rightTop border">
<div class="title">工艺流程图</div>
<div class="chat">
<div class="chat" style="margin-top: 20px;height: 2.5rem;">
<canvas id="gylct" style="width: 100%;height: 100%"></canvas>
</div>
</div>
......@@ -70,8 +70,8 @@
<div class="allnav banner">
<div class="list clearfix">
<div class="listTxt">
<p><label for="">应到人数:</label><span id="ydrs">0</span></p>
<p><label for="">实际人数:</label><span id="sjrs">0</span></p>
<p><label for="">应到人数:</label><span id="ydrs">20</span></p>
<p><label for="">实际人数:</label><span id="sjrs">20</span></p>
<p><label for="">休假人数:</label><span id="xjrs">0</span> </p>
<p><label for="">总生产量:</label><span id="zscl">0</span></p>
</div>
......@@ -367,12 +367,12 @@
});
// var myChartSdcl = echarts.init(document.getElementById('chartSdcl'));
var chartRpcdcsj=echarts.init(document.getElementById("chartRpcdcsj"));
var chartHgl=echarts.init(document.getElementById("chartHgl"));
var chartRjh=echarts.init(document.getElementById("chartRjh"));
var chartYjh=echarts.init(document.getElementById("chartYjh"));
var chartJdshCirle=echarts.init(document.getElementById("chartJdshCirle"));
var chartTzzp=echarts.init(document.getElementById("chartzzp"));
var chartRpcdcsj=echarts.init(document.getElementById("chartRpcdcsj"),null, {renderer: 'svg'});
var chartHgl=echarts.init(document.getElementById("chartHgl"),null, {renderer: 'svg'});
var chartRjh=echarts.init(document.getElementById("chartRjh"),null, {renderer: 'svg'});
var chartYjh=echarts.init(document.getElementById("chartYjh"),null, {renderer: 'svg'});
var chartJdshCirle=echarts.init(document.getElementById("chartJdshCirle"),null, {renderer: 'svg'});
var chartTzzp=echarts.init(document.getElementById("chartzzp"),null, {renderer: 'svg'});
setproduceEchart(chartTzzp)/* 在制品状态 */
// oaechart(myChartSdcl); /*oa*/
setRclHglEchart(chartRpcdcsj); /*日排产达成数据*/
......
......@@ -42,6 +42,9 @@
})
/* 通用代码 */
const pdfUr="kmes/gpfk/queryPdfByWoidAndZpgx"
var urlo="kmes/gpfkfj/queryFjBybzgx/"+window.bzlx+"/O"
var urlt="kmes/gpfkfj/queryFjBybzgx/"+window.bzlx+"/T"
var urlm="kmes/gpfkfj/queryFjBybzgx/"+window.bzlx+"/M"
/* 初始化工序 */
function jyfk_getgx(e){
let that=e
......@@ -179,16 +182,16 @@
function jyfk_pdfshow(e,woid){
let that=e
let newpdfurl=pdfUr+"/"+woid+"/"+window.bzlx
that.pdf=""
if (newpdfurl!=that.pdfurl){
that.pdfurl=newpdfurl
if(that.sivpdf){
clearInterval(that.sivpdf)
}
pdfshow(that.pdfurl, that.pdfdom, 10000).then(e => {
that.sivpdf = e
})
}
// that.pdf=""
// if (newpdfurl!=that.pdfurl){
// that.pdfurl=newpdfurl
// if(that.sivpdf){
// clearInterval(that.sivpdf)
// }
// pdfshow(that.pdfurl, that.pdfdom, 10000).then(e => {
// that.sivpdf = e
// })
// }
}
</script>
......@@ -204,7 +207,7 @@
</ul>
</div>
<!-- 左侧信息条 -->
<div class="left">
<div class="left" style="width: 30%;">
<!-- 左上信息表 -->
<div class="cbinfor">
<div class="cpif">
......@@ -261,9 +264,20 @@
</div>
</div>
<!-- 右侧信息pdf -->
<div class="right">
<div class="right" style="width: 45%;">
<canvas id="gpjypdf" class="rightPdf"></canvas>
</div>
<!-- new右侧 -->
<div class="right" style="width: 25%;">
<div style="height: 50%;overflow: hidden;">
<video width="100%" height="100%" :src="urlm" controls muted autoplay="autoplay" loop="loop">
</video>
</div>
<div ref="scrollmain" style="height: 50%;overflow: auto;border-bottom: 1px solid #EEEEEE;">
<canvas id="gpjyrpdf" ref="scroll" style="width: 100%;height: 160%;" ></canvas>
</div>
</div>
</div>
<!-- 界面5 -->
<div id="kwrkb05" style="display: none;">
......@@ -430,6 +444,7 @@
dbenlarge('kwrkb04',1,this.isFocus())
// this.sivpdf=
this.initpage()
this.scroll()
this.gettime()
this.appdestory()
},
......@@ -437,9 +452,12 @@
clearInterval(this.sivdestory)
clearInterval(this.sivpdf)
clearInterval(this.sivtimer)
clearInterval(this.sivrpdf)
clearInterval(this.sivscroll)
},
data:function(){
return{
urlm:urlm,
fksl:0,
isok:"",
username:localStorage.getItem("username"),
......@@ -458,11 +476,30 @@
tabdata:[],
sivtimer:null,//时间计数器
sivpdf:null,
sivdestory:null
sivdestory:null,
sivrpdf:null,
sivscroll:null
}
},
methods:{
scroll(){
/* test */
pdfshow(urlo,'gpjypdf', 10000).then(e => {
that.sivpdf = e
})
/* test */
pdfshow(urlt,'gpjyrpdf', 10000).then(e => {
that.sivrpdf = e
})
const mainData=this.$refs.scrollmain
const divData =this.$refs.scroll
this.sivscroll=setInterval(() => {
mainData.scrollTop += 1
if (mainData.clientHeight + mainData.scrollTop+10 > mainData.scrollHeight) {
mainData.scrollTop = 0
}
}, 100)
},
// 扫码接口
apiscanxlh(){
let that=this
......
......@@ -42,6 +42,9 @@
})
/* 通用代码 */
const pdfUr="kmes/gpfk/queryPdfByWoidAndZpgx"
var urlo="kmes/gpfkfj/queryFjBybzgx/"+window.bzlx+"/O"
var urlt="kmes/gpfkfj/queryFjBybzgx/"+window.bzlx+"/T"
var urlm="kmes/gpfkfj/queryFjBybzgx/"+window.bzlx+"/M"
/* 初始化工序 */
function wxfk_getgx(e){
let that=e
......@@ -89,16 +92,16 @@
function wxfk_pdfshow(e,woid){
let that=e
let newpdfurl=pdfUr+"/"+woid+"/"+window.bzlx
that.pdf=""
if (newpdfurl!=that.pdfurl){
that.pdfurl=newpdfurl
if(that.sivpdf){
clearInterval(that.sivpdf)
}
pdfshow(that.pdfurl, that.pdfdom, 10000).then(e => {
that.sivpdf = e
})
}
// that.pdf=""
// if (newpdfurl!=that.pdfurl){
// that.pdfurl=newpdfurl
// if(that.sivpdf){
// clearInterval(that.sivpdf)
// }
// pdfshow(that.pdfurl, that.pdfdom, 10000).then(e => {
// that.sivpdf = e
// })
// }
}
/* 反馈技计数 */
function wxfk_apigetjs(s){
......@@ -204,7 +207,7 @@
</ul>
</div>
<!-- 左侧信息条 -->
<div class="left">
<div class="left" style="width: 30%;">
<!-- 左上信息表 -->
<div class="cbinfor">
<div class="cpif">
......@@ -261,8 +264,19 @@
</div>
</div>
<!-- 右侧信息pdf -->
<div class="right">
<canvas id="gpjypdf" class="rightPdf"></canvas>
<div class="right" style="width: 45%;">
<canvas id="gpwxpdf" class="rightPdf"></canvas>
</div>
<!-- new右侧 -->
<div class="right" style="width: 25%;">
<div style="height: 50%;overflow: hidden;">
<video width="100%" height="100%" :src="urlm" controls muted autoplay="autoplay" loop="loop">
</video>
</div>
<div ref="scrollmain" style="height: 50%;overflow: auto;border-bottom: 1px solid #EEEEEE;">
<canvas id="gpwxrpdf" ref="scroll" style="width: 100%;height: 160%;" ></canvas>
</div>
</div>
</div>
<!-- 界面5 -->
......@@ -430,15 +444,19 @@
// this.sivpdf=
this.initpage()
this.gettime()
this.scroll()
this.appdestory()
},
destroyed() {
clearInterval(this.sivdestory)
clearInterval(this.sivpdf)
clearInterval(this.sivtimer)
clearInterval(this.sivscroll)
clearInterval(this.sivrpdf)
},
data:function(){
return{
urlm:urlm,
fksl:0,
isok:"",
username:localStorage.getItem("username"),
......@@ -457,11 +475,30 @@
tabdata:[],
sivtimer:null,//时间计数器
sivpdf:null,
sivdestory:null
sivdestory:null,
sivscroll:null,
sivrpdf:null
}
},
methods:{
scroll(){
/* test */
pdfshow(urlo,'gpwxpdf', 10000).then(e => {
that.sivpdf = e
})
/* test */
pdfshow(urlt,'gpwxrpdf', 10000).then(e => {
that.sivrpdf = e
})
const mainData=this.$refs.scrollmain
const divData =this.$refs.scroll
this.sivscroll=setInterval(() => {
mainData.scrollTop += 1
if (mainData.clientHeight + mainData.scrollTop+10 > mainData.scrollHeight) {
mainData.scrollTop = 0
}
}, 100)
},
// 扫码接口
apiscanxlh(){
let that=this
......
This diff is collapsed.
<div id="woPcjhk" class="gui-div">
<table class="toolbar-table" data-options="id: 'woPcjhkTable',herf:'kzzx/gridset/query'"></table>
<!-- 表格工具栏开始 -->
<div id="woPcjhkTable-toolbar" class="gui-toolbar" data-options="grid:{type:'datagrid',id:'woPcjhkTable'}">
<div class="navbar-toolbar">
<a class="toolbar-print toolbar" href="javascript:void(0)"></a>
<a class="toolbar-export toolbar" href="javascript:void(0)"></a>
<a class="toolbar-review toolbar" href="javascript:void(0)"></a>
<a class="toolbar-add toolbar" href="javascript:void(0)"></a>
<!--<a class="toolbar-copy toolbar" href="javascript:void(0)"></a>-->
<a class="toolbar-edit toolbar" href="javascript:void(0)"></a>
<a class="toolbar-delete toolbar" href="javascript:void(0)"></a>
</div>
<div class="form-sub">
<form class="query-criteria">
<ul>
<li class="gui-form-row" >
<div class="gui-col-sm4">
<div class="gui-col-sm6">
<label class="gui-form-label">计划日期:</label>
<div class="gui-input-date-start">
<input type="text" name="start" style="width: 100%">
</div>
</div>
<div class="gui-col-sm6">
<div class="gui-input-date-end">
<input type="text" name="end" style="width: 100%">
</div>
</div>
</div>
<div class="gui-col-sm3">
<label class="gui-form-label">计划部门:</label>
<div class="gui-input-block">
<input type="text" name="bmid" class="gui-textbox" style="width: 100%">
</div>
</div>
<div class="gui-col-sm3">
<label class="gui-form-label">计划编号:</label>
<div class="gui-input-block">
<input type="text" class="gui-textbox" name="djid" style="width: 100%">
</div>
</div>
</li>
</ul>
<span class="toolbar-search-span"><a class="toolbar-search" href="javascript:void(0)"></a></span>
</form>
</div>
</div>
</div>
<!-- 表格工具栏结束 -->
<script>
$(function () {
/*js初始化*/
var $div=$('#woPcjhk');
var $datagrid=$div.find(".toolbar-table");
var $cbxBmid=$div.find('input[name="bmid"]');
var $datStart = $div.find('input[name="start"]');
var $datEnd = $div.find('input[name="end"]');
var $scfs = {};
function paramInit(ops){
gas.post("cjzy/zyjh/init/djly", {}, function(res){
if (res.success && res.data.records){
var records = res['data']['records'];
$.each(records,function(i, data){
$scfs[data.id] = data.name;
});
}
}, ops);
}
function pageInit() {
var options = {
url: 'kmes/pcjhk',
noRequest: true,
columns: [[
{title: "计划编号", field: "djid", fieldType: "ftString",width:120},
{title: "计划日期", field: "jhrq", fieldType: "ftDate"},
{title: "计划部门", field: "bmName", fieldType: "ftString",width:120},
{title: "计划人", field: "jhr", fieldType: "ftString",width:120},
{title: "生成方式", field: "djly", width: 120, formatter: function (value, index, row) {
return $scfs[value] || value;
}
},
{title: "备注", field: "bz", fieldType: "ftString",width:200},
{title: "维护人", field: "whr", fieldType: "ftString"},
{title: "维护时间", field: "whsj", fieldType: "ftDateTime"}
]],
dialog: {
footerIn: true,
href: 'kmes/pcjhk/edit'
}
};
$div.Holder(options);
$cbxBmid.iCombobox({valueField:"id", textField:"bmmc", allowNull: true});
$datStart.iDatebox();
$datEnd.iDatebox();
}
/*数据初始化*/
function dataInit(ops){
gas.post("jcsj/common/bm/queryZzbm", {}, function(res){
if (res.success && res.data.records){
$cbxBmid.iCombobox("loadData", res.data.records);
}
}, ops);
gas.post("common/datetime",{},function (result) {
if(result['success']&&result['data']['data']){
var date=DateUtils.getDate(result.data.data);
$datStart.iDatebox("setValue", DateUtils.format(DateUtils.add(date, -30)));
$datEnd.iDatebox("setValue", DateUtils.format(date));
}
}, ops);
}
/*用户操作*/
function run(ops){
$datagrid.datagrid("options").url="kmes/pcjhk/query";
$datagrid.datagrid("load",DataBind.collectData($div))
}
gas.load(paramInit,pageInit,dataInit,run);
})
</script>
<div id="woWoSearch" class="e-dialog-container" data-options="title:'选择生产订单',width: 1020, height: 540">
<div>
<div class="mx-dataTable" style="bottom: 40px">
<table id = "woWoSearchTable" class="toolbar-table mx-dataTable" style="bottom: 60px" data-options="id: 'woWoSearchTable',herf:'kzzx/gridset/query'">
</table>
<div id="woWoSearchTable-toolbar" class="gui-toolbar" data-options="grid:{type:'datagrid',id:'woWoSearchTable'}">
<div class="form-sub">
<form class="query-criteria">
<ul>
<li class="gui-form-row" >
<div class="gui-col-sm6">
<div class="gui-col-sm6">
<label class="gui-form-label">订单日期:</label>
<div class="gui-input-date-start">
<input type="text" name="ksrq" style="width: 100%">
</div>
</div>
<div class="gui-col-sm6">
<div class="gui-input-date-end">
<input type="text" name="jsrq" style="width: 100%">
</div>
</div>
</div>
<div class="gui-col-sm3">
<label class="gui-form-label">物料信息:</label>
<div class="gui-input-block">
<input type="text" name="wlid" class="gui-textbox" style="width: 100%">
</div>
</div>
<div class="gui-col-sm3">
<label class="gui-form-label">生产单号:</label>
<div class="gui-input-block">
<input type="text" name="djid" class="gui-textbox" style="width: 100%">
</div>
</div>
</li>
<li class="gui-form-row" >
<div class="gui-col-sm6">
<div class="gui-col-sm6">
<label class="gui-form-label">下达日期:</label>
<div class="gui-input-date-start">
<input type="text" name="xdksrq" style="width: 100%">
</div>
</div>
<div class="gui-col-sm6">
<div class="gui-input-date-end">
<input type="text" name="xdjsrq" style="width: 100%">
</div>
</div>
</div>
<div class="gui-col-sm3">
<label class="gui-form-label">完工部门:</label>
<div class="gui-input-block" >
<input type="text" name="bmid" class="gui-textbox" data-options="" style="width: 100%">
</div>
</div>
<div class="gui-col-sm3">
<div class="gui-input-block" style="margin-left: 56px" data-toggle="gui-checkbox" data-options="label:'超排产:',labelPosition:'left'">
<input type="checkbox" name="allowPc" >
</div>
</div>
</li>
</ul>
<span class="toolbar-search-span">
<a class="toolbar-search" href="javascript:void(0)"></a>
</span>
</form>
</div>
</div>
</div>
</div>
<div class="e-dialog-footer">
<a href="javascript:void(0);" class="e-dialog-ok"></a>
<a href="javascript:void(0);" class="e-dialog-cancel"></a>
</div>
</div>
<script>
/*js初始化*/
$(function () {
var $div=$('#woWoSearch');
var $datagrid= $div.find("#woWoSearchTable");
var $edtZzbm = $div.find('input[name="bmid"]');
var $datStart = $div.find('input[name="ksrq"]');
var $datEnd = $div.find('input[name="jsrq"]');
var $datxdStart = $div.find('input[name="xdksrq"]');
var $datxdEnd = $div.find('input[name="xdjsrq"]');
var $searchBtn=$div.find(".toolbar-search");
gas.load(paramInit, pageInit, dataInit,run);
function paramInit(ops){
}
function pageInit(ops){
var columns=[
{title: "生产单号", field: "djid", fieldType: "ftString",width:120},
{title: "订单日期", field: "ywrq", fieldType: "ftDate"},
{title: "物料编码", field: "wlxxCode", width: 120},
{title: "物料名称", field: "wlxxName", width: 140},
{title: "订单数量", field: "xqsl", fieldType: "float"},
{title: "完工部门", field: "bmName", fieldType: "ftString",width:140},
/* {title: "确认人", field: "qrr", fieldType: "ftString",width:80},
{title: "确认时间", field: "qrsj", fieldType: "ftDateTime"},*/
{title: "下达人", field: "xdr", fieldType: "ftString",width:80},
{title: "下达时间", field: "xdsj", fieldType: "ftDateTime"},
{title: "维护人", field: "whr", fieldType: "ftString"},
{title: "维护时间", field: "whsj", fieldType: "ftDateTime"}
];
$datagrid.DataTableEditing({
columns:[new $.common.formatterCol(columns)],
pagination:false,
allowAdd:false,
multipleSelect:true
});
$edtZzbm.iCombobox({valueField: 'id', textField: 'bmmc',allowNull:true,allowEdit:true});
$datStart.iDatebox();
$datEnd.iDatebox();
$datxdStart.iDatebox();
$datxdEnd.iDatebox();
}
function dataInit(ops){
gas.post("jcsj/common/bm/queryZzbm", {}, function(res){
$edtZzbm.iCombobox("loadData", res.data.records);
}, ops);
}
/*查询操作*/
function run(ops){
$datagrid.datagrid("options").url="wo/wo/queryWo";
$datagrid.datagrid("load",DataBind.collectData($div));
}
$searchBtn.iMenubutton({
text:"搜索",
iconCls:"fa fa-search",
onClick:function () {
run()
}
});
$div.find(".e-dialog-ok").iMenubutton({
text:"确定",
iconCls:"fa fa-save",
btnCls:"gui-btn-save",
onClick:function (){
$datagrid.datagrid("acceptChanges");
var data=$datagrid.datagrid("getChecked");
var formData=DataBind.collectData($div);
$div.closest("form").iDialog("setStatus",{"state":"ok",data:{form:formData,list:data}});
}
});
})
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment