Pārlūkot izejas kodu

产品追溯 增加 车间

chenxy 2 gadi atpakaļ
vecāks
revīzija
1e8a9a9aec

+ 10 - 0
wwwroot/mes/pc/materielquery/rpt.ashx

@@ -128,6 +128,9 @@ public class rpt : IHttpHandler, IReadOnlySessionState
 
             if (m == "goods")
             {
+                string workshop = context.Request["workshop[]"] is object ? context.Request["workshop[]"].ToString() : "";//车间
+                if (workshop == "" && (context.Request["workshop"] is object)) workshop = context.Request["workshop"].ToString();
+
                 string datebeginMasterS = context.Request["datebeginMasterS"];
                 string datebeginMasterD = context.Request["datebeginMasterD"];
                 string goodstypecode = context.Request["goodstypecode"];
@@ -138,9 +141,12 @@ public class rpt : IHttpHandler, IReadOnlySessionState
                                               ,g.goodscode      AS 产品型号
                                               ,g.goodsname      AS 产品名称
                                               ,t.barcode        AS 产品条码
+                                              ,k.workshop || '车间' as 车间
                                           FROM tp_pm_finishedproduct t
                                          INNER JOIN tp_mst_goods g
                                             ON g.goodsid = t.goodsid
+                                         INNER JOIN tp_mst_kiln k
+                                            ON k.kilnid = t.kilnid
                                          INNER JOIN tp_mst_goodstype gt
                                             ON gt.goodstypeid = g.goodstypeid
                                           where 1=1 
@@ -155,6 +161,10 @@ public class rpt : IHttpHandler, IReadOnlySessionState
                     sqlStr += " and t.fhtime <@datebeginMasterD@ ";
                     sqlPara.Add(new CDAParameter("datebeginMasterD", Convert.ToDateTime(datebeginMasterD).AddDays(1), DataType.Date));
                 }
+                if (!string.IsNullOrEmpty(workshop))
+                {
+                    sqlStr += " AND k.workshop in (" + workshop + ")";
+                }
                     sqlStr += " order by fhtime desc, barcode ";
                 try
                 {

+ 12 - 1
wwwroot/mes/pc/materielquery/rpt_index.html

@@ -24,7 +24,10 @@
                         <input class="easyui-datetimebox" id="datebeginMasterS" name="datebeginMasterS" data-options="required:false,prompt:'',tipPosition:'top'" style="width:165px; height:32px;">
                         -
                         <input class="easyui-datetimebox" id="datebeginMasterD" name="datebeginMasterD" data-options="required:false,prompt:'',tipPosition:'top'" style="width:165px; height:32px;">
-                        产品类型:
+                        车间:
+                        <input class="easyui-combobox" id="workshop" name="workshop" data-options="required:false,valueField:'value',textField:'text',editable:true,multiple:true,
+                               data:[{'text': '1车间', 'value': '1'},{'text': '2车间', 'value': '2'},{'text': '3车间', 'value': '3'}]"
+                               style=" width: 160px; height: 32px;">产品类型:
                         <input class="easyui-combotree" id="goodstypecode" name="goodstypecode" data-options="required:false,prompt:'',tipPosition:'top',url:'../../list.ashx?m=getGoodsType',method:'get',panelHeight:'200px',editable:true" style="width: 160px; height: 32px;"></span>
                         <span class="labelspan">产品条码<input class="easyui-textbox" id="barcode" name="barcode" data-options="required:false,prompt:'',tipPosition:'top',required:false" style="width: 120px; height: 32px;"></span>
                         <a href="javascript:void(0)" id="btnSearchSubmit" title="清空" class="easyui-linkbutton" plain="false" onclick="$('#ffMaster').form('clear')">清空</a>
@@ -43,6 +46,14 @@
                        id="DataGrid"
                        data-options="method:'get',border:false,singleSelect:true,fit:true,fitColumns:true,onDblClickRow: dgDblclickrow">
                     <thead>
+                        <tr>
+                            <th data-options="field:'交接时间',title:'交接时间',align:'center',sortable:false"></th>
+                            <th data-options="field:'车间',title:'车间',align:'center',sortable:false"></th>
+                            <th data-options="field:'产品类型',title:'产品类型',align:'center',sortable:false"></th>
+                            <th data-options="field:'产品型号',title:'产品型号',align:'center',sortable:false"></th>
+                            <th data-options="field:'产品名称',title:'产品名称',align:'center',sortable:false"></th>
+                            <th data-options="field:'产品条码',title:'产品条码',align:'center',sortable:false"></th>
+                        </tr>
                     </thead>
                 </table>
             </div>