hzd преди 3 дни
родител
ревизия
ef8ede9fe9

+ 15 - 0
src/main/java/com/jeesite/modules/mes/dao/MesProductOutDao.java

@@ -0,0 +1,15 @@
+package com.jeesite.modules.mes.dao;
+
+import com.jeesite.common.dao.CrudDao;
+import com.jeesite.common.mybatis.annotation.MyBatisDao;
+import com.jeesite.modules.mes.entity.MesProductOut;
+
+/**
+ * 出库验证记录DAO接口
+ * @author mes
+ * @version 2026-07-11
+ */
+@MyBatisDao
+public interface MesProductOutDao extends CrudDao<MesProductOut> {
+	
+}

+ 78 - 0
src/main/java/com/jeesite/modules/mes/entity/MesProductOut.java

@@ -0,0 +1,78 @@
+package com.jeesite.modules.mes.entity;
+
+import javax.validation.constraints.Size;
+
+import com.jeesite.common.entity.DataEntity;
+import com.jeesite.common.mybatis.annotation.Column;
+import com.jeesite.common.mybatis.annotation.Table;
+import com.jeesite.common.mybatis.mapper.query.QueryType;
+import com.jeesite.common.utils.excel.annotation.ExcelField;
+import com.jeesite.common.utils.excel.annotation.ExcelField.Align;
+import com.jeesite.common.utils.excel.annotation.ExcelFields;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 出库验证记录Entity
+ * @author mes
+ * @version 2026-07-11
+ */
+@Table(name="mes_product_out", alias="a", label="出库验证记录信息", columns={
+		@Column(name="id", attrName="id", label="工序id", isPK=true),
+		@Column(name="sn", attrName="sn", label="工件码", queryType=QueryType.LIKE),
+		@Column(name="remark", attrName="remark", label="备注"),
+		@Column(name="create_by", attrName="createBy", label="检验人", isUpdate=false, isQuery=false),
+		@Column(name="create_date", attrName="createDate", label="检验时间", isUpdate=false, isQuery=false, isUpdateForce=true),
+		@Column(name="update_by", attrName="updateBy", label="update_by", isQuery=false),
+		@Column(name="update_date", attrName="updateDate", label="update_date", isQuery=false, isUpdateForce=true),
+	}, orderBy="a.update_date DESC"
+)
+public class MesProductOut extends DataEntity<MesProductOut> {
+	
+	private static final long serialVersionUID = 1L;
+	private String sn;		// 工件码
+	private String remark;		// 备注
+	private List img = new ArrayList();
+
+	@ExcelFields({
+		@ExcelField(title="工序id", attrName="id", align=Align.CENTER, sort=10),
+		@ExcelField(title="工件码", attrName="sn", align=Align.CENTER, sort=20),
+		@ExcelField(title="备注", attrName="remark", align=Align.CENTER, sort=30),
+		@ExcelField(title="检验人", attrName="createBy", align=Align.CENTER, sort=40),
+		@ExcelField(title="检验时间", attrName="createDate", align=Align.CENTER, sort=50, dataFormat="yyyy-MM-dd hh:mm"),
+	})
+	public MesProductOut() {
+		this(null);
+	}
+	
+	public MesProductOut(String id){
+		super(id);
+	}
+	
+	@Size(min=0, max=50, message="工件码长度不能超过 50 个字符")
+	public String getSn() {
+		return sn;
+	}
+
+	public void setSn(String sn) {
+		this.sn = sn;
+	}
+	
+	@Size(min=0, max=255, message="备注长度不能超过 255 个字符")
+	public String getRemark() {
+		return remark;
+	}
+
+	public void setRemark(String remark) {
+		this.remark = remark;
+	}
+
+	public List getImg() {
+		return img;
+	}
+
+	public void setImg(List img) {
+		this.img = img;
+	}
+}

+ 140 - 0
src/main/java/com/jeesite/modules/mes/service/MesProductOutService.java

@@ -0,0 +1,140 @@
+package com.jeesite.modules.mes.service;
+
+import java.util.List;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.jeesite.common.entity.Page;
+import com.jeesite.common.service.CrudService;
+import com.jeesite.modules.mes.entity.MesProductOut;
+import com.jeesite.modules.mes.dao.MesProductOutDao;
+import com.jeesite.common.service.ServiceException;
+import com.jeesite.modules.file.utils.FileUploadUtils;
+import com.jeesite.common.config.Global;
+import com.jeesite.common.validator.ValidatorUtils;
+import com.jeesite.common.utils.excel.ExcelImport;
+import org.springframework.web.multipart.MultipartFile;
+import javax.validation.ConstraintViolation;
+import javax.validation.ConstraintViolationException;
+
+/**
+ * 出库验证记录Service
+ * @author mes
+ * @version 2026-07-11
+ */
+@Service
+public class MesProductOutService extends CrudService<MesProductOutDao, MesProductOut> {
+	
+	/**
+	 * 获取单条数据
+	 * @param mesProductOut
+	 * @return
+	 */
+	@Override
+	public MesProductOut get(MesProductOut mesProductOut) {
+		return super.get(mesProductOut);
+	}
+	
+	/**
+	 * 查询分页数据
+	 * @param mesProductOut 查询条件
+	 * @param mesProductOut.page 分页对象
+	 * @return
+	 */
+	@Override
+	public Page<MesProductOut> findPage(MesProductOut mesProductOut) {
+		return super.findPage(mesProductOut);
+	}
+	
+	/**
+	 * 查询列表数据
+	 * @param mesProductOut
+	 * @return
+	 */
+	@Override
+	public List<MesProductOut> findList(MesProductOut mesProductOut) {
+		return super.findList(mesProductOut);
+	}
+	
+	/**
+	 * 保存数据(插入或更新)
+	 * @param mesProductOut
+	 */
+	@Override
+	@Transactional
+	public void save(MesProductOut mesProductOut) {
+		super.save(mesProductOut);
+		// 保存上传图片
+		FileUploadUtils.saveFileUpload(mesProductOut, mesProductOut.getId(), "mesProductOut_image");
+	}
+
+	/**
+	 * 导入数据
+	 * @param file 导入的数据文件
+	 */
+	@Transactional
+	public String importData(MultipartFile file) {
+		if (file == null){
+			throw new ServiceException(text("请选择导入的数据文件!"));
+		}
+		int successNum = 0; int failureNum = 0;
+		StringBuilder successMsg = new StringBuilder();
+		StringBuilder failureMsg = new StringBuilder();
+		try(ExcelImport ei = new ExcelImport(file, 2, 0)){
+			List<MesProductOut> list = ei.getDataList(MesProductOut.class);
+			for (MesProductOut mesProductOut : list) {
+				try{
+					ValidatorUtils.validateWithException(mesProductOut);
+					this.save(mesProductOut);
+					successNum++;
+					successMsg.append("<br/>" + successNum + "、编号 " + mesProductOut.getId() + " 导入成功");
+				} catch (Exception e) {
+					failureNum++;
+					String msg = "<br/>" + failureNum + "、编号 " + mesProductOut.getId() + " 导入失败:";
+					if (e instanceof ConstraintViolationException){
+						ConstraintViolationException cve = (ConstraintViolationException)e;
+						for (ConstraintViolation<?> violation : cve.getConstraintViolations()) {
+							msg += Global.getText(violation.getMessage()) + " ("+violation.getPropertyPath()+")";
+						}
+					}else{
+						msg += e.getMessage();
+					}
+					failureMsg.append(msg);
+					logger.error(msg, e);
+				}
+			}
+		} catch (Exception e) {
+			logger.error(e.getMessage(), e);
+			failureMsg.append(e.getMessage());
+			return failureMsg.toString();
+		}
+		if (failureNum > 0) {
+			failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
+			throw new ServiceException(failureMsg.toString());
+		}else{
+			successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
+		}
+		return successMsg.toString();
+	}
+	
+	/**
+	 * 更新状态
+	 * @param mesProductOut
+	 */
+	@Override
+	@Transactional
+	public void updateStatus(MesProductOut mesProductOut) {
+		super.updateStatus(mesProductOut);
+	}
+	
+	/**
+	 * 删除数据
+	 * @param mesProductOut
+	 */
+	@Override
+	@Transactional
+	public void delete(MesProductOut mesProductOut) {
+		super.delete(mesProductOut);
+	}
+	
+}

+ 239 - 0
src/main/java/com/jeesite/modules/mes/web/MesProductOutController.java

@@ -0,0 +1,239 @@
+package com.jeesite.modules.mes.web;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.transaction.Transactional;
+
+import com.alibaba.druid.util.StringUtils;
+import com.jeesite.common.collect.MapUtils;
+import com.jeesite.common.lang.ObjectUtils;
+import com.jeesite.modules.file.entity.FileUpload;
+import com.jeesite.modules.file.service.FileUploadService;
+import com.jeesite.modules.file.utils.FileUploadUtils;
+import com.jeesite.modules.mes.entity.MesProduct;
+import com.jeesite.modules.mes.entity.MesScrap;
+import com.jeesite.modules.mes.resp.CommonResp;
+import com.jeesite.modules.mes.service.MesProductService;
+import com.jeesite.modules.sys.entity.User;
+import com.jeesite.modules.sys.utils.UserUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import com.jeesite.common.config.Global;
+import com.jeesite.common.collect.ListUtils;
+import com.jeesite.common.entity.Page;
+import com.jeesite.common.lang.DateUtils;
+import com.jeesite.common.utils.excel.ExcelExport;
+import com.jeesite.common.utils.excel.annotation.ExcelField.Type;
+import org.springframework.web.multipart.MultipartFile;
+import com.jeesite.common.web.BaseController;
+import com.jeesite.modules.mes.entity.MesProductOut;
+import com.jeesite.modules.mes.service.MesProductOutService;
+
+/**
+ * 出库验证记录Controller
+ * @author mes
+ * @version 2026-07-11
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/mes/mesProductOut")
+public class MesProductOutController extends BaseController {
+
+	@Autowired
+	private MesProductOutService mesProductOutService;
+    @Autowired
+    private MesProductService mesProductService;
+    @Autowired
+    private FileUploadService fileUploadService;
+
+	/**
+	 * 获取数据
+	 */
+	@ModelAttribute
+	public MesProductOut get(String id, boolean isNewRecord) {
+		return mesProductOutService.get(id, isNewRecord);
+	}
+	
+	/**
+	 * 查询列表
+	 */
+	@RequiresPermissions("mes:mesProductOut:view")
+	@RequestMapping(value = {"list", ""})
+	public String list(MesProductOut mesProductOut, Model model) {
+		model.addAttribute("mesProductOut", mesProductOut);
+		return "modules/mes/mesProductOutList";
+	}
+	
+	/**
+	 * 查询列表数据
+	 */
+	@RequiresPermissions("mes:mesProductOut:view")
+	@RequestMapping(value = "listData")
+	@ResponseBody
+	public Page<MesProductOut> listData(MesProductOut mesProductOut, HttpServletRequest request, HttpServletResponse response) {
+		mesProductOut.setPage(new Page<>(request, response));
+		Page<MesProductOut> page = mesProductOutService.findPage(mesProductOut);
+		return page;
+	}
+
+	/**
+	 * 查看编辑表单
+	 */
+	@RequiresPermissions("mes:mesProductOut:view")
+	@RequestMapping(value = "form")
+	public String form(MesProductOut mesProductOut, Model model) {
+		model.addAttribute("mesProductOut", mesProductOut);
+		return "modules/mes/mesProductOutForm";
+	}
+
+	/**
+	 * 保存数据
+	 */
+	@RequiresPermissions("mes:mesProductOut:edit")
+	@PostMapping(value = "save")
+	@ResponseBody
+	public String save(@Validated MesProductOut mesProductOut) {
+		mesProductOutService.save(mesProductOut);
+		return renderResult(Global.TRUE, text("保存出库验证记录成功!"));
+	}
+
+	/**
+	 * 导出数据
+	 */
+	@RequiresPermissions("mes:mesProductOut:view")
+	@RequestMapping(value = "exportData")
+	public void exportData(MesProductOut mesProductOut, HttpServletResponse response) {
+		List<MesProductOut> list = mesProductOutService.findList(mesProductOut);
+		String fileName = "出库验证记录" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
+		try(ExcelExport ee = new ExcelExport("出库验证记录", MesProductOut.class)){
+			ee.setDataList(list).write(response, fileName);
+		}
+	}
+
+	/**
+	 * 下载模板
+	 */
+	@RequiresPermissions("mes:mesProductOut:view")
+	@RequestMapping(value = "importTemplate")
+	public void importTemplate(HttpServletResponse response) {
+		MesProductOut mesProductOut = new MesProductOut();
+		List<MesProductOut> list = ListUtils.newArrayList(mesProductOut);
+		String fileName = "出库验证记录模板.xlsx";
+		try(ExcelExport ee = new ExcelExport("出库验证记录", MesProductOut.class, Type.IMPORT)){
+			ee.setDataList(list).write(response, fileName);
+		}
+	}
+
+	/**
+	 * 导入数据
+	 */
+	@ResponseBody
+	@RequiresPermissions("mes:mesProductOut:edit")
+	@PostMapping(value = "importData")
+	public String importData(MultipartFile file) {
+		try {
+			String message = mesProductOutService.importData(file);
+			return renderResult(Global.TRUE, "posfull:"+message);
+		} catch (Exception ex) {
+			return renderResult(Global.FALSE, "posfull:"+ex.getMessage());
+		}
+	}
+
+//	@RequiresPermissions("mes:mesProductOut:api")
+	@RequestMapping(value = "add")
+	@ResponseBody
+	@Transactional
+	public CommonResp add(MesProductOut mesProductOut, HttpServletRequest request) {
+		Map<String, Object> map = MapUtils.newHashMap();
+		CommonResp<Map<String, Object>> resp = new CommonResp<>();
+		resp.setResult(Global.FALSE);
+
+		if(StringUtils.isEmpty(mesProductOut.getSn())){
+			resp.setMessage("包装不能为空");
+			return resp;
+		}
+
+		MesProduct mesProduct1 = new MesProduct();
+		mesProduct1.setBatchSn(mesProductOut.getSn());
+		mesProduct1.setState("1");
+		List<MesProduct> mesProducts = mesProductService.findList(mesProduct1);
+		if(ListUtils.isEmpty(mesProducts)){
+			resp.setMessage("包装码不正确");
+			return resp;
+		}
+		// 检查是否静置24小时
+		Date now = new Date();
+		for(MesProduct mesProduct : mesProducts){
+			long differenceInMillis = now.getTime() - mesProduct.getBindDate().getTime();
+			long twoHoursInMillis = 24 * 60 * 60 * 1000;
+			if(differenceInMillis < twoHoursInMillis){
+				resp.setMessage("该包装工件未静置24小时,不能出货");
+				return resp;
+			}
+		}
+
+		mesProductOutService.save(mesProductOut);
+		resp.setResult(Global.TRUE);
+		return resp;
+	}
+
+//	@RequiresPermissions("mes:mesProductOut:api")
+	@RequestMapping(value = "ulist")
+	@ResponseBody
+	public CommonResp ulist(MesProductOut mesProductOut, HttpServletRequest request, HttpServletResponse response) {
+//		User user = UserUtils.getUser();
+//		mesScrap.setCreateBy(user.getUserCode());
+
+		mesProductOut.setPage(new Page<>(request, response));
+		Page<MesProductOut> page = mesProductOutService.findPage(mesProductOut);
+
+		CommonResp<Page> resp = new CommonResp<>();
+
+		resp.setData(page);
+		resp.setResult(Global.TRUE);
+		return resp;
+	}
+
+	/**
+	 * 详情
+	 */
+//	@RequiresPermissions("mes:mesProductOut:api")
+	@RequestMapping(value = "info")
+	@ResponseBody
+	public CommonResp info(MesProductOut mesProductOut, HttpServletRequest request) {
+		mesProductOut.setId(request.getParameter("id"));
+		MesProductOut info = mesProductOutService.get(mesProductOut);
+
+		String host = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + "/js";
+
+		FileUpload fu = new FileUpload();
+		fu.setBizKey(info.getId());
+		fu.setBizType("mesProductOut_image");
+		List<FileUpload> finfo = fileUploadService.findList(fu);
+		List imgList = ListUtils.newArrayList();
+		for (FileUpload fi:finfo){
+			Map<String, Object> map1 = MapUtils.newHashMap();
+			map1.put("id",fi.getFileEntity().getFileId());
+			map1.put("url",host + fi.getFileUrl());
+			map1.put("name",fi.getFileName());
+			map1.put("size",fi.getFileEntity().getFileSize());
+
+			imgList.add(map1);
+		}
+		info.setImg(imgList);
+		CommonResp<MesProductOut> resp = new CommonResp<>();
+		resp.setData(info);
+		return resp;
+	}
+	
+}

+ 2 - 2
src/main/resources/config/application.yml

@@ -54,8 +54,8 @@ jdbc:
   # Mysql 数据库配置
   type: mysql
   driver: com.mysql.cj.jdbc.Driver
-  url: jdbc:mysql://127.0.0.1:3306/mescloud?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true
-#  url: jdbc:mysql://192.168.21.99:3306/mescloud?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true
+#  url: jdbc:mysql://127.0.0.1:3306/mescloud?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true
+  url: jdbc:mysql://192.168.21.99:3306/mescloud?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true
 #  url: jdbc:mysql://127.0.0.1:3306/mes_cloud_x13?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true
   username: mescloud
   password: 8neywEN86NLam3ts

+ 15 - 0
src/main/resources/mappings/modules/mes/MesProductOutDao.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeesite.modules.mes.dao.MesProductOutDao">
+	
+	<!-- 查询数据
+	<select id="findList" resultType="MesProductOut">
+		SELECT ${sqlMap.column.toSql()}
+		FROM ${sqlMap.table.toSql()}
+		<where>
+			${sqlMap.where.toSql()}
+		</where>
+		ORDER BY ${sqlMap.order.toSql()}
+	</select> -->
+	
+</mapper>

+ 76 - 0
src/main/resources/views/modules/mes/mesProductOutForm.html

@@ -0,0 +1,76 @@
+<% layout('/layouts/default.html', {title: '出库验证记录管理', libs: ['validate','fileupload']}){ %>
+<div class="main-content">
+	<div class="box box-main">
+		<div class="box-header with-border">
+			<div class="box-title">
+				<i class="fa icon-note"></i> ${text(mesProductOut.isNewRecord ? '新增出库验证记录' : '编辑出库验证记录')}
+			</div>
+			<div class="box-tools pull-right">
+				<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
+			</div>
+		</div>
+		<#form:form id="inputForm" model="${mesProductOut}" action="${ctx}/mes/mesProductOut/save" method="post" class="form-horizontal">
+			<div class="box-body">
+				<div class="form-unit">${text('基本信息')}</div>
+				<#form:hidden path="id"/>
+				<div class="row">
+					<div class="col-xs-6">
+						<div class="form-group">
+							<label class="control-label col-sm-4" title="">
+								<span class="required hide">*</span> ${text('工件码')}:<i class="fa icon-question hide"></i></label>
+							<div class="col-sm-8">
+								<#form:input path="sn" readonly="true" maxlength="50" class="form-control"/>
+							</div>
+						</div>
+					</div>
+					<div class="col-xs-6">
+						<div class="form-group">
+							<label class="control-label col-sm-4" title="">
+								<span class="required hide">*</span> ${text('备注')}:<i class="fa icon-question hide"></i></label>
+							<div class="col-sm-8">
+								<#form:input path="remark" readonly="true" maxlength="255" class="form-control"/>
+							</div>
+						</div>
+					</div>
+				</div>
+				<div class="row">
+					<div class="col-xs-12">
+						<div class="form-group">
+							<label class="control-label col-sm-2">
+								<span class="required hide">*</span> ${text('图片上传')}:</label>
+							<div class="col-sm-10">
+								<#form:fileupload id="uploadImage" bizKey="${mesProductOut.id}" bizType="mesProductOut_image"
+									uploadType="image" class="" readonly="true" preview="true"/>
+							</div>
+						</div>
+					</div>
+				</div>
+			</div>
+			<div class="box-footer">
+				<div class="row">
+					<div class="col-sm-offset-2 col-sm-10">
+						<% if (hasPermi('mes:mesProductOut:edit')){ %>
+<!--							<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> ${text('保 存')}</button>&nbsp;-->
+						<% } %>
+						<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> ${text('关 闭')}</button>
+					</div>
+				</div>
+			</div>
+		</#form:form>
+	</div>
+</div>
+<% } %>
+<script>
+$("#inputForm").validate({
+	submitHandler: function(form){
+		js.ajaxSubmitForm($(form), function(data){
+			js.showMessage(data.message);
+			if(data.result == Global.TRUE){
+				js.closeCurrentTabPage(function(contentWindow){
+					contentWindow.page();
+				});
+			}
+		}, "json");
+    }
+});
+</script>

+ 119 - 0
src/main/resources/views/modules/mes/mesProductOutList.html

@@ -0,0 +1,119 @@
+<% layout('/layouts/default.html', {title: '出库验证记录管理', libs: ['dataGrid']}){ %>
+<div class="main-content">
+	<div class="box box-main">
+		<div class="box-header">
+			<div class="box-title">
+				<i class="fa icon-notebook"></i> ${text('出库验证记录管理')}
+			</div>
+			<div class="box-tools pull-right">
+				<a href="#" class="btn btn-default" id="btnSearch" title="${text('查询')}"><i class="fa fa-filter"></i> ${text('查询')}</a>
+				<a href="#" class="btn btn-default" id="btnExport"><i class="glyphicon glyphicon-export"></i> 导出</a>
+				<% if(hasPermi('mes:mesProductOut:edit')){ %>
+						<a href="#" class="btn btn-default" id="btnImport"><i class="glyphicon glyphicon-import"></i> 导入</a>
+<!--					<a href="${ctx}/mes/mesProductOut/form" class="btn btn-default btnTool" title="${text('新增出库验证记录')}"><i class="fa fa-plus"></i> ${text('新增')}</a>-->
+				<% } %>
+				<a href="#" class="btn btn-default" id="btnSetting" title="${text('设置')}"><i class="fa fa-navicon"></i></a>
+			</div>
+		</div>
+		<div class="box-body">
+			<#form:form id="searchForm" model="${mesProductOut}" action="${ctx}/mes/mesProductOut/listData" method="post" class="form-inline hide"
+					data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
+				<div class="form-group">
+					<label class="control-label">${text('工件码')}:</label>
+					<div class="control-inline">
+						<#form:input path="sn" maxlength="50" class="form-control width-120"/>
+					</div>
+				</div>
+				<div class="form-group">
+					<label class="control-label">${text('备注')}:</label>
+					<div class="control-inline">
+						<#form:input path="remark" maxlength="255" class="form-control width-120"/>
+					</div>
+				</div>
+				<div class="form-group">
+					<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
+					<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
+				</div>
+			</#form:form>
+			<table id="dataGrid"></table>
+			<div id="dataGridPage"></div>
+		</div>
+	</div>
+</div>
+<% } %>
+<script>
+// 初始化DataGrid对象
+$('#dataGrid').dataGrid({
+	searchForm: $("#searchForm"),
+	columnModel: [
+		{header:'${text("工件码")}', name:'sn', index:'a.sn', width:250, align:"center", frozen:true},
+		{header:'${text("备注")}', name:'remark', index:'a.remark', width:150, align:"center"},
+		{header:'${text("检验人")}', name:'createBy', index:'a.create_by', width:150, align:"center"},
+		{header:'${text("检验时间")}', name:'createDate', index:'a.create_date', width:150, align:"center"},
+		{header:'${text("操作")}', name:'actions', width:120, formatter: function(val, obj, row, act){
+			var actions = [];
+			//<% if(hasPermi('mes:mesProductOut:edit')){ %>
+				actions.push('<a href="${ctx}/mes/mesProductOut/form?id='+row.id+'" class="btnList" title="${text("编辑出库验证记录")}"><i class="fa fa-pencil"></i></a>&nbsp;');
+			//<% } %>
+			return actions.join('');
+		}}
+	],
+	// 加载成功后执行事件
+	ajaxSuccess: function(data){
+		
+	}
+});
+</script><script>
+$('#btnExport').click(function(){
+	js.ajaxSubmitForm($('#searchForm'), {
+		url:'${ctx}/mes/mesProductOut/exportData',
+		downloadFile:true
+	});
+});
+$('#btnImport').click(function(){
+	js.layer.open({
+		type: 1,
+		area: ['400px'],
+		title: '${text("导入出库验证记录")}',
+		resize: false,
+		scrollbar: true,
+		content: js.template('importTpl'),
+		btn: ['<i class="fa fa-check"></i> ${text("导入")}',
+			'<i class="fa fa-remove"></i> ${text("关闭")}'],
+		btn1: function(index, layero){
+			var form = {
+				inputForm: layero.find('#inputForm'),
+				file: layero.find('#file').val()
+			};
+		    if (form.file == '' || (!js.endWith(form.file, '.xls') && !js.endWith(form.file, '.xlsx'))){
+		    	js.showMessage("${text('文件不正确,请选择后缀为“xls”或“xlsx”的文件。')}", null, 'warning');
+		        return false;
+		    }
+			js.ajaxSubmitForm(form.inputForm, function(data){
+				js.showMessage(data.message);
+				if(data.result == Global.TRUE){
+					js.layer.closeAll();
+				}
+				page();
+			}, "json");
+			return true;
+		}
+	});
+});
+</script>
+<script id="importTpl" type="text/template">//<!--
+<form id="inputForm" action="${ctx}/mes/mesProductOut/importData" method="post" enctype="multipart/form-data"
+	class="form-horizontal mt20 mb10" style="overflow:auto;max-height:200px;">
+	<div class="row">
+		<div class="col-xs-12 col-xs-offset-1">
+			<input type="file" id="file" name="file" class="form-file"/>
+			<div class="mt10 pt5" style="color:red">
+				${text('提示:仅允许导入“xls”或“xlsx”格式文件!')}
+			</div>
+			<div class="mt10 pt5">
+				<a href="${ctx}/mes/mesProductOut/importTemplate" class="btn btn-default btn-xs"><i class="fa fa-file-excel-o"></i> ${text('下载模板')}</a>
+			</div>
+		</div>
+	</div>
+</form>
+//--></script>