Browse Source

x13-优化

张田野 20 hours ago
parent
commit
439be332b0

+ 1 - 1
src/main/java/com/jeesite/modules/mes/web/MesRepairController.java

@@ -191,7 +191,7 @@ public class MesRepairController extends BaseController {
 	/**
 	 * 删除数据
 	 */
-	@RequiresPermissions("mes:mesRepair:edit")
+	@RequiresPermissions("mes:mesRepair:delete")
 	@RequestMapping(value = "delete")
 	@ResponseBody
 	public String delete(MesRepair mesRepair) {

+ 7 - 7
src/main/resources/views/modules/mes/mesProductList.html

@@ -121,13 +121,13 @@ $('#dataGrid').dataGrid({
 		// {header:'${text("包装人")}', name:'bindBy', index:'a.bind_by', width:150, align:"center"},
 		{header:'${text("创建日期")}', name:'createDate', index:'a.create_date', width:150, align:"center" },
 		{header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:150, align:"center"},
-		// {header:'${text("操作")}', name:'actions', width:120, formatter: function(val, obj, row, act){
-		// 	var actions = [];
-		// 	//<% if(hasPermi('mes:mesProduct:edit')){ %>
-		// 	// 	actions.push('<a href="${ctx}/mes/mesProduct/form?id='+row.id+'" class="btnList" title="${text("编辑产品")}"><i class="fa fa-pencil"></i></a>&nbsp;');
-		// 	//<% } %>
-		// 	return actions.join('');
-		// }}
+		{header:'${text("操作")}', name:'actions', width:80, align:"center", formatter: function(val, obj, row, act){
+			var actions = [];
+			<% if(hasPermi('mes:mesProduct:edit')){ %>
+				actions.push('<a href="${ctx}/mes/mesProduct/form?id='+row.id+'" class="btnList" title="${text("编辑产品")}"><i class="fa fa-pencil"></i></a>&nbsp;');
+			<% } %>
+			return actions.join('');
+		}}
 	],
 	// 加载成功后执行事件
 	ajaxSuccess: function(data){

+ 8 - 12
src/main/resources/views/modules/mes/mesRepairList.html

@@ -8,9 +8,6 @@
 			<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:mesRepair:edit')){ %>-->
-<!--					<a href="${ctx}/mes/mesRepair/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>
@@ -124,16 +121,15 @@ $('#dataGrid').dataGrid({
 		{header:'${text("检查人")}', name:'checkBy', index:'a.check_by', width:150, align:"center"},
 		{header:'${text("检查时间")}', name:'checkDate', index:'a.check_date', width:150, align:"center"},
 		{header:'${text("产线编号")}', name:'lineSn', index:'a.line_sn', width:150, align:"center"},
-		{header:'${text("操作")}', name:'actions', width:80, align:"center", formatter: function(val, obj, row, act){
+		{header:'${text("操作")}', name:'actions', width:120, align:"center", formatter: function(val, obj, row, act){
 			var actions = [];
-			//<% if(hasPermi('mes:mesRepair:edit')){ %>
-			// 	actions.push('<a href="${ctx}/mes/mesRepair/form?id='+row.id+'" class="btnList" title="${text("编辑返工记录表")}"><i class="fa fa-pencil"></i></a>&nbsp;');
-			// 	actions.push('<a href="${ctx}/mes/mesRepair/delete?id='+row.id+'" class="btnList" title="${text("删除返工记录表")}" data-confirm="${text("确认要删除该返工记录表吗?")}"><i class="fa fa-trash-o"></i></a>&nbsp;');
-			//
-					actions.push('<a href="${ctx}/mes/mesRepair/detail?id='+row.id+'" class="btnList" title="${text("详情")}"><i class="fa fa-eye"></i></a>&nbsp;');
-
-
-				//<% } %>
+			<% if(hasPermi('mes:mesRepair:edit')){ %>
+				actions.push('<a href="${ctx}/mes/mesRepair/form?id='+row.id+'" class="btnList" title="${text("编辑返工记录表")}"><i class="fa fa-pencil"></i></a>&nbsp;');
+			<% } %>
+			actions.push('<a href="${ctx}/mes/mesRepair/detail?id='+row.id+'" class="btnList" title="${text("详情")}"><i class="fa fa-eye"></i></a>&nbsp;');
+			<% if(hasPermi('mes:mesRepair:delete')){ %>
+				actions.push('<a href="${ctx}/mes/mesRepair/delete?id='+row.id+'" class="btnList" title="${text("删除返工记录")}" data-confirm="${text("确认要删除该返工记录吗?")}"><i class="fa fa-trash-o"></i></a>&nbsp;');
+			<% } %>
 			return actions.join('');
 		}}
 	],