فهرست منبع

产品跟踪表

姜永辉 10 ماه پیش
والد
کامیت
6906bd4c11
2فایلهای تغییر یافته به همراه37 افزوده شده و 29 حذف شده
  1. 15 6
      wwwroot/mes/rpt/rpt042/rpt.ashx
  2. 22 23
      wwwroot/mes/rpt/rpt042/rpt_index.html

+ 15 - 6
wwwroot/mes/rpt/rpt042/rpt.ashx

@@ -21,7 +21,7 @@ public class rpt : IHttpHandler, IReadOnlySessionState
             int accountId = (context.Session["accountId"] is object) ?
                Convert.ToInt32(context.Session["accountId"]) : 1;
 
-            if (context.Request["m"].ToString() == "master" && context.Request["BARCODE"]!="")
+            if (context.Request["m"].ToString() == "master" && context.Request["BARCODE"] != "")
             {
 
                 //获取查询条件
@@ -32,11 +32,20 @@ public class rpt : IHttpHandler, IReadOnlySessionState
                 sqlPara.Add(new CDAParameter("out_result1", DataType.Cursor, ParameterDirection.Output));
                 DataSet data = conn.ExecuteSPDataset("PRO_RPT_GetGoodsFollowingData", sqlPara.ToArray());
                 int ttt = int.Parse(context.Request["dt"]);
-                var dt = data.Tables[ttt];
-                //获取分页数据    
-                int total = 0; 
-                string jsonStr = new JsonResult(dt) { total = total }.ToJson();
-                context.Response.Write(jsonStr);
+                if (data.Tables != null && data.Tables.Count > 0)
+                {
+                    var dt = data.Tables[ttt];
+                    //获取分页数据    
+                    int total = 0;
+                    string jsonStr = new JsonResult(dt) { total = total }.ToJson();
+                    context.Response.Write(jsonStr);
+                }
+                else
+                {
+                    string jsonStr = new JsonResult(new DataTable()) { total = 0 }.ToJson();
+                    context.Response.Write(jsonStr);
+                }
+
             }
         }
     }

+ 22 - 23
wwwroot/mes/rpt/rpt042/rpt_index.html

@@ -22,7 +22,7 @@
 				<form id="ffMaster">
 					<div style="padding-top:10px">
 						产品条码:
-						<input class="easyui-textbox" id="BARCODE" name="BARCODE" data-options="required:false,prompt:'',tipPosition:'top',  panelHeight:'300px',editable:'true'" style="width:120px;height:32px;">
+						<input class="easyui-textbox" id="BARCODE" name="BARCODE" data-options="required:true,prompt:'产品条码必须填写!',tipPosition:'top',  panelHeight:'300px',editable:'true'" style="width:120px;height:32px;">
 
 						<a href="javascript:void(0)" id="btnSearchSubmit" title="清空" class="easyui-linkbutton" plain="false" onclick="$('#ffMaster').form('clear')">清空</a>
 						<a href="javascript:void(0)" id="btnSearchSubmit" title="搜索" class="easyui-linkbutton" plain="false" onclick="tbSearchSubmit()">搜索</a>
@@ -39,18 +39,18 @@
 					   data-options="toolbar: '#tb',method:'get',border:false,singleSelect:true,fit:true,fitColumns:true">
 					<thead>
 						<tr>
-							<th data-options="field:'ROWNO',title:'序号',width:220,align:'center',checkbox:true,hidden:true">SID</th>
-							<th data-options="field:'BARCODE',title:'当前条码',width:220,align:'center',sortable:false"></th>
-							<th data-options="field:'LOGOCODENAME',title:'产品商标',width:220,align:'center',sortable:false"></th>
-							<th data-options="field:'GOODSTYPENAME',title:'产品类别',width:220,align:'center',sortable:false"></th>
-							<th data-options="field:'GOODSCODE',title:'产品编码',width:220,align:'center',sortable:false"></th>
-							<th data-options="field:'GOODSNAME',title:'产品名称',width:220,align:'center',sortable:false"></th>
-							<th data-options="field:'MATERIALCODE',title:'物料编码',width:220,align:'center',sortable:false"></th>
-							<th data-options="field:'OUTLABELCODE',title:'包装条码',width:220,align:'center',sortable:false"></th>
-							<th data-options="field:'GOODSSPECIFICATION',title:'产品规格',width:220,align:'center',sortable:false"></th>
-							<th data-options="field:'DICTIONARYALUE',title:'釉色类别',width:220,align:'center',sortable:false"></th>
-							<th data-options="field:'GROUTINGLINECODE',title:'成型线编码',width:220,align:'center',sortable:false"></th>
-							<th data-options="field:'GROUTINGMOULDCODE',title:'模具编号',width:220,align:'center',sortable:false"></th>
+							<th data-options="field:'ROWNO',title:'序号',width:20,align:'center',checkbox:true,hidden:true">SID</th>
+							<th data-options="field:'BARCODE',title:'当前条码',width:130,align:'center',sortable:false"></th>
+							<th data-options="field:'LOGOCODENAME',title:'产品商标',width:180,align:'center',sortable:false"></th>
+							<th data-options="field:'GOODSTYPENAME',title:'产品类别',width:180,align:'center',sortable:false"></th>
+							<th data-options="field:'GOODSCODE',title:'产品编码',width:180,align:'center',sortable:false"></th>
+							<th data-options="field:'GOODSNAME',title:'产品名称',width:180,align:'center',sortable:false"></th>
+							<th data-options="field:'MATERIALCODE',title:'物料编码',width:180,align:'center',sortable:false"></th>
+							<th data-options="field:'OUTLABELCODE',title:'包装条码',width:180,align:'center',sortable:false"></th>
+							<th data-options="field:'GOODSSPECIFICATION',title:'产品规格',width:180,align:'center',sortable:false"></th>
+							<th data-options="field:'DICTIONARYALUE',title:'釉色类别',width:180,align:'center',sortable:false"></th>
+							<th data-options="field:'GROUTINGLINECODE',title:'成型线编码',width:180,align:'center',sortable:false"></th>
+							<th data-options="field:'GROUTINGMOULDCODE',title:'模具编号',width:180,align:'center',sortable:false"></th>
 							<th data-options="field:'GROUTINGNUM',title:'注浆次数',width:220,align:'center',sortable:false"></th>
 							<th data-options="field:'GROUTINGUSERCODE',title:'成型工号',width:220,align:'center',sortable:false"></th>
 							<th data-options="field:'GROUTINGDATE',title:'注浆日期',width:220,align:'center',sortable:false"></th>
@@ -70,18 +70,17 @@
 			<div style="padding-top:20px; height:600px">
 				<table class="easyui-datagrid"
 					   id="DBS"
-					   data-options="toolbar: '#tb',method:'get',border:false,singleSelect:true,fit:true,fitColumns:true">
+					   data-options="toolbar: '#tb',method:'get',border:false,singleSelect:true,fit:true,fitColumns:false">
 					<thead>
 						<tr>
-							<th data-options="field:'ROWNO',title:'序号',width:220,align:'center',checkbox:true,hidden:true">SID</th>
-							<th data-options="field:'PRODUCTIONLINENAME',title:'生产线',width:220,align:'center',sortable:false"></th>
-							<th data-options="field:'PROCEDURENAME',title:'工序名称',width:220,align:'center',sortable:false"></th>
-							<th data-options="field:'USERCODE',title:'生产工号',width:220,align:'center',sortable:false"></th>
-							<th data-options="field:'ACCOUNTDATE',title:'账务日期',width:220,align:'center',sortable:false"></th>
-							<th data-options="field:'CREATETIME',title:'操作时间',width:220,align:'center',sortable:false"></th>
-							<th data-options="field:'CREATEUSERCODE',title:'操作工号',width:220,align:'center',sortable:false"></th>
-							<th data-options="field:'CREATEUSERNAME',title:'操作工号',width:220,align:'center',sortable:false"></th>
-							<th data-options="field:'GOODSLEVELNAME',title:'操作者',width:220,align:'center',sortable:false"></th>
+							<th data-options="field:'ROWNO',title:'序号',width:120,align:'center',checkbox:true,hidden:true">SID</th>
+							<th data-options="field:'PRODUCTIONLINENAME',title:'生产线',width:120,align:'center',sortable:false"></th>
+							<th data-options="field:'PROCEDURENAME',title:'工序名称',width:180,align:'center',sortable:false"></th>
+							<th data-options="field:'USERCODE',title:'生产工号',width:180,align:'center',sortable:false"></th> 
+							<th data-options="field:'CREATETIME',title:'操作时间',width:180,align:'center',sortable:false"></th>
+							<th data-options="field:'CREATEUSERCODE',title:'操作工号',width:180,align:'center',sortable:false"></th>
+							<th data-options="field:'CREATEUSERNAME',title:'操作者',width:180,align:'center',sortable:false"></th>
+							<th data-options="field:'GOODSLEVELNAME',title:'操作说明',width:290,align:'center',sortable:false"></th>
 						</tr>
 					</thead>
 				</table>