Просмотр исходного кода

产品追溯,增加注浆日期

chenxy 2 лет назад
Родитель
Сommit
4033daae87

+ 1 - 1
wwwroot/mes/pc/glineplanmold/glineplanmold_add.html

@@ -69,7 +69,7 @@
                     <div class="w-field"><input class="easyui-textbox" id="GROUTINGMOULDCODE" name="GROUTINGMOULDCODE" data-options="required:true,prompt:'请填写...',tipPosition:'top'" style="width:100%;height:32px;"></div>
                 </div>
                 <div class="w-div">
-                    <div class="w-fieldname">产品型号:</div>
+                    <div class="w-fieldname">产品编码:</div>
                     <div class="w-field"><input class="easyui-combobox" id="GOODSID" name="GOODSID" data-options="required:true,prompt:'',tipPosition:'top',url:'../../list.ashx?m=getgoods&select=1',method:'get',valueField:'GOODSID',textField:'GOODSCODE',panelHeight:'300px',editable:'true',limitToList:true,onSelect:goodSelecct,onChange:gschange" style="width:100%;height:32px;"></div>
                 </div>
                 <div class="w-div">

+ 1 - 1
wwwroot/mes/pc/glineplanmold/glineplanmold_edit.html

@@ -69,7 +69,7 @@
                     <div class="w-field"><input class="easyui-textbox" id="GROUTINGMOULDCODE" disabled="disabled" name="GROUTINGMOULDCODE" data-options="required:true,prompt:'请填写模具...',tipPosition:'top'" style="width:100%;height:32px;"></div>
                 </div>
                 <div class="w-div">
-                    <div class="w-fieldname">产品型号:</div>
+                    <div class="w-fieldname">产品编码:</div>
                     <div class="w-field"><input class="easyui-combobox" id="GOODSID" name="GOODSID" data-options="required:true,prompt:'',tipPosition:'top',url:'../../list.ashx?m=getgoods&select=1',method:'get',valueField:'GOODSID',textField:'GOODSCODE',panelHeight:'300px',editable:'true',limitToList:true,onSelect:goodSelecct,onChange:gschange" style="width:100%;height:32px;"></div>
                 </div>
                 <div class="w-div">

+ 2 - 2
wwwroot/mes/pc/glineplanmold/glineplanmold_index.html

@@ -51,7 +51,7 @@
                         <input class="easyui-textbox" id="groutinglinecode" name="groutinglinecode" data-options="required:false,prompt:'',tipPosition:'top'" style="width: 120px; height: 32px;">
                         模具编号:
                         <input class="easyui-textbox" id="GROUTINGMOULDCODE" name="GROUTINGMOULDCODE" data-options="required:false,prompt:'',tipPosition:'top'" style="width: 120px; height: 32px;">
-                        产品型号
+                        产品编码
                         <input class="easyui-combobox" id="GOODSID" name="GOODSID" data-options="prompt:'',tipPosition:'top',url:'../../list.ashx?m=getgoods&select=1',method:'get',valueField:'GOODSID',textField:'GOODSCODE',panelHeight:'300px',editable:'true',limitToList:true,multiple:true" style="width: 150px; height: 32px;">
                         物料编码:
                         <input class="easyui-textbox" id="sap_sku" name="sap_sku" data-options="required:false,prompt:'',tipPosition:'top'" style="width: 120px; height: 32px;">
@@ -73,7 +73,7 @@
                     <th data-options="field:'WORKSHOP',title:'车间',align:'center',sortable:false,"></th>
                     <th data-options="field:'GROUTINGLINECODE',title:'成型线',align:'center',sortable:false"></th>
                     <th data-options="field:'GROUTINGMOULDCODE',title:'模具编号',align:'center',sortable:false,"></th>
-                    <th data-options="field:'GOODSCODE',title:'产品型号',align:'center',sortable:false,"></th>
+                    <th data-options="field:'GOODSCODE',title:'产品编码',align:'center',sortable:false,"></th>
                     <th data-options="field:'SAP_SKU',title:'物料编码',align:'center',sortable:false,"></th>
                     <th data-options="field:'STD_COUNT',title:'标准次数',align:'center',sortable:false,"></th>
                     <th data-options="field:'DAY_GROUTING_NUM',title:'日注浆次数',align:'center',sortable:false,"></th>

+ 28 - 11
wwwroot/mes/pc/materielquery/rpt.ashx

@@ -133,23 +133,30 @@ public class rpt : IHttpHandler, IReadOnlySessionState
 
                 string datebeginMasterS = context.Request["datebeginMasterS"];
                 string datebeginMasterD = context.Request["datebeginMasterD"];
+                string datebeginMasterG = context.Request["datebeginMasterG"];
+                string dateendMasterG = context.Request["dateendMasterG"];
                 string goodstypecode = context.Request["goodstypecode"];
                 List<CDAParameter> sqlPara = new List<CDAParameter>();
 
-                string sqlStr = @"SELECT  t.fhtime         AS 交接时间
+                string sqlStr = @"SELECT  to_char(gdd.groutingdate,'yyyy-mm-dd') as 注浆日期
+                                              ,t.fhtime         AS 交接时间
                                               ,gt.goodstypename AS 产品类型
-                                              ,g.goodscode      AS 产品型号
+                                              ,g.goodscode      AS 产品编码
                                               ,g.goodsname      AS 产品名称
-                                              ,t.barcode        AS 产品条码
-                                              ,k.workshop || '车间' as 车间
-                                          FROM tp_pm_finishedproduct t
+                                              ,gdd.barcode      AS 产品条码
+                                              ,gl.workshop || '车间' as 车间
+                                          FROM tp_pm_groutingdailydetail gdd
+                                          left join tp_pm_finishedproduct t on t.groutingdailydetailid = gdd.groutingdailydetailid
+                                         inner join tp_pc_groutingline gl ON gl.groutinglineid = gdd.groutinglineid
                                          INNER JOIN tp_mst_goods g
-                                            ON g.goodsid = t.goodsid
-                                         INNER JOIN tp_mst_kiln k
+                                            ON g.goodsid = gdd.goodsid
+                                          left JOIN tp_mst_kiln k
                                             ON k.kilnid = t.kilnid
                                          INNER JOIN tp_mst_goodstype gt
                                             ON gt.goodstypeid = g.goodstypeid
-                                          where 1=1 
+                                          where gdd.valueflag = '1'
+                               AND gdd.groutingflag = '1'
+                               AND gdd.barcode IS NOT NULL 
                                         AND (INSTR(GT.GOODSTYPECODE,'{GOODSTYPECODE}') = 1 OR '{GOODSTYPECODE}' IS NULL) ".Replace("{GOODSTYPECODE}", goodstypecode);
                 if (!string.IsNullOrEmpty(datebeginMasterS))
                 {
@@ -159,13 +166,23 @@ public class rpt : IHttpHandler, IReadOnlySessionState
                 if (!string.IsNullOrEmpty(datebeginMasterD))
                 {
                     sqlStr += " and t.fhtime <@datebeginMasterD@ ";
-                    sqlPara.Add(new CDAParameter("datebeginMasterD", Convert.ToDateTime(datebeginMasterD).AddDays(1), DataType.Date));
+                    sqlPara.Add(new CDAParameter("datebeginMasterD", Convert.ToDateTime(datebeginMasterD).AddSeconds(1), DataType.Date));
+                }
+                if (!string.IsNullOrEmpty(datebeginMasterG))
+                {
+                    sqlStr += " and gdd.groutingdate >=@datebeginMasterG@ ";
+                    sqlPara.Add(new CDAParameter("datebeginMasterG", datebeginMasterG, DataType.Date));
+                }
+                if (!string.IsNullOrEmpty(dateendMasterG))
+                {
+                    sqlStr += " and gdd.groutingdate <@dateendMasterG@ ";
+                    sqlPara.Add(new CDAParameter("dateendMasterG", Convert.ToDateTime(dateendMasterG).AddDays(1), DataType.Date));
                 }
                 if (!string.IsNullOrEmpty(workshop))
                 {
-                    sqlStr += " AND k.workshop in (" + workshop + ")";
+                    sqlStr += " AND gl.workshop in (" + workshop + ")";
                 }
-                    sqlStr += " order by fhtime desc, barcode ";
+                    sqlStr += " order by gdd.groutingdate desc, t.fhtime desc, gdd.barcode ";
                 try
                 {
                     JsonResult data = Easyui.ExecuteJsonResult(conn, sqlStr, sqlPara);

+ 11 - 2
wwwroot/mes/pc/materielquery/rpt_index.html

@@ -24,6 +24,9 @@
                         <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-datebox" id="datebeginMasterG" name="datebeginMasterG" data-options="required:false,prompt:'',tipPosition:'top'" style="width:120px; height:32px;">
+                        - <input class="easyui-datebox" id="dateendMasterG" name="dateendMasterG" data-options="required:false,prompt:'',tipPosition:'top'" style="width:120px; 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'}]"
@@ -47,10 +50,11 @@
                        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>
                             <th data-options="field:'产品名称',title:'产品名称',align:'center',sortable:false"></th>
                             <th data-options="field:'产品条码',title:'产品条码',align:'center',sortable:false"></th>
                         </tr>
@@ -110,10 +114,15 @@
         $(document).ready(function () {
             var ctime = new Date();
             var beginDate = ctime.getFullYear() + "-" + (ctime.getMonth() + 1) + "-" + ctime.getDate() + " 00:00:00";
-            var endDate = ctime.getFullYear() + "-" + (ctime.getMonth() + 1) + "-" + (ctime.getDate() + 1) + " 00:00:00";
+            var endDate = ctime.getFullYear() + "-" + (ctime.getMonth() + 1) + "-" + (ctime.getDate()) + " 23:59:59";
             $("#datebeginMasterS").datetimebox("setValue", beginDate);
             $("#datebeginMasterD").datetimebox("setValue", endDate);
 
+            //var beginDate = ctime.getFullYear() + "-" + (ctime.getMonth() + 1) + "-" + ctime.getDate();
+            //var endDate = ctime.getFullYear() + "-" + (ctime.getMonth() + 1) + "-" + ctime.getDate();
+            //$("#datebeginMasterG").datebox("setValue", beginDate);
+            //$("#dateendMasterG").datebox("setValue", endDate);
+
             tbSearchSubmit();
 
         });

+ 1 - 1
wwwroot/mes/pc/mouldDailyPlan/mouldDailyPlan_index.html

@@ -63,7 +63,7 @@
                             <th data-options="field:'PLANDATE',title:'计划日期',align:'center',sortable:false"></th>
                             <th data-options="field:'WORKSHOP',title:'车间',align:'center',sortable:false"></th>
                             <th data-options="field:'GROUTINGLINECODE',title:'成型线',align:'center',sortable:false"></th>
-                            <th data-options="field:'GOODSNAME',title:'产品型号',align:'center',sortable:false"></th>
+                            <th data-options="field:'GOODSNAME',title:'产品名称',align:'center',sortable:false"></th>
                             <th data-options="field:'SKU_CODE',title:'物料编码',align:'center',sortable:false"></th>
                             <th data-options="field:'PLAN_QTY',title:'计划数量',align:'center',sortable:false"></th>
                             <th data-options="field:'MAKE_QTY',title:'生产数量',align:'center',sortable:false"></th>