xuwei 3 年之前
父節點
當前提交
59e919e366

二進制
wwwroot/Img/hegii2.png


二進制
wwwroot/Img/top_bg_blue.png


+ 2 - 2
wwwroot/Web.config

@@ -6,9 +6,9 @@
 <configuration>
   <connectionStrings>
       <!--三水测试服务器-->
-      <add name="ConnectionString" connectionString="Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.18.32.116)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=dkmes)));User Id=hgiboss;Password=dongke" providerName="Oracle.ManagedDataAccess.Client"/>
+      <!--<add name="ConnectionString" connectionString="Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.18.32.116)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=dkmes)));User Id=hgiboss;Password=dongke" providerName="Oracle.ManagedDataAccess.Client"/>-->
 	  <!--三水测试服务器-->
-	  <!--<add name="ConnectionString" connectionString="Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.18.32.31)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=dkmes)));User Id=dkmes;Password=dongke" providerName="Oracle.ManagedDataAccess.Client"/>-->
+	  <add name="ConnectionString" connectionString="Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.18.32.116)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=dkmes)));User Id=hgiboss;Password=dongke" providerName="Oracle.ManagedDataAccess.Client"/>
   </connectionStrings>
   <appSettings>
     <!--MES服务器地址-->

+ 25 - 58
wwwroot/api/sap/prod_reckon/index.ashx

@@ -91,66 +91,33 @@ public class sap_prod_reckon_index : IHttpHandler, IReadOnlySessionState
                 }
 
                 int max_cycleday = 40;
-                //object mco = conn.ExecuteScalar("select max(t.cycleday) from tp_goods_prod_cycle t");
-                //if (mco != null && mco != DBNull.Value)
-                //{
-                //    max_cycleday = Convert.ToInt32(mco);
-                //}
+                object mco = conn.ExecuteScalar("select max(t.cycleday) from tp_goods_prod_cycle t");
+                if (mco != null && mco != DBNull.Value)
+                {
+                    max_cycleday = Convert.ToInt32(mco);
+                }
                 beginItem = begindate.AddDays(0 - max_cycleday);
-                //string sql = @"
-                //select @work@ as work, to_char(@datebegin@,'yyyy-MM-dd') as datebegin, to_char(@dateend1@,'yyyy-MM-dd') as dateend, sku, " + string.Join(",", mmss_s) + @"
-                //  from (select to_char(tt.p_date, 'yyyyMM') p_mm, tt.sap_sku sku, tt.day_num
-                //          from (select t.reckon_date + nvl(gc.cycleday, 15) p_date, t.sap_sku, t.day_num
-                //                  from t_gline_reckon_final t
-                //                  left join tp_mst_goods g
-                //                    on g.goodsid = t.goodsid
-                //                  left join tp_goods_prod_cycle gc
-                //                    on gc.goodstypeid = g.goodstypeid
-                //                   and gc.workshop = t.workshop
-                //                   and gc.crafttype = nvl(g.goods_line_type, 0)
-                //                 where t.reckon_date >= @datebegin1@
-                //                   and t.reckon_date < @dateend@
-                //                   and (@sku@ is null or @sku@ = '' or @sku@ = t.sap_sku)
-                //) tt
-                //         where tt.p_date >= @datebegin@
-                //           and tt.p_date < @dateend@) p
-                //pivot(sum(day_num)
-                //   for p_mm in(" + string.Join(",", mmss) + @"))
-                // order by sku
-                //";
-
                 string sql = @"
-                select @work@ as work, to_char(@datebegin@,'yyyy-MM-dd') as datebegin, to_char(@dateend1@,'yyyy-MM-dd') as dateend, sku, " + string.Join(",", mmss_s) + @"
-                   from (select ttt.sap_sku as sku, ttt.p_mm, round(ttt.day_num * nvl(gq.gz_quality, 1), 0) as pack_num
-                        --,to_char(nvl(gq.gz_quality, 1) * 100, 'FM990.00') || '%' gs_quality
-                          from (select tt.workshop, to_char(tt.p_date, 'yyyymm') p_mm, tt.goodsid, tt.sap_sku, sum(tt.day_num) day_num
-                                  from (select t.workshop, t.reckon_date + nvl(gc.cycleday, 15) p_date, t.sap_sku, t.day_num, t.goodsid
-                                          from t_gline_reckon_final t
-                                          left join tp_mst_goods g
-                                            on g.goodsid = t.goodsid
-                                          left join tp_goods_prod_cycle gc
-                                            on gc.goodstypeid = g.goodstypeid
-                                           and gc.workshop = t.workshop
-                                           and gc.crafttype = nvl(g.goods_line_type, 0)
-                                         where t.reckon_date >= @datebegin@ - 60
-                                           and t.reckon_date < @dateend@
-                                        --AND t.reckon_date + nvl(gc.cycleday, 15) >= @datebegin@
-                                        --AND t.reckon_date + nvl(gc.cycleday, 15) < @dateend@
-                                          and (@sku@ is null or @sku@ = '' or @sku@ = t.sap_sku)
-                                        ) tt
-                                 where tt.p_date >= @datebegin@
-                                   and tt.p_date < @dateend@
-                                 group by tt.workshop, to_char(tt.p_date, 'yyyymm'), tt.goodsid, tt.sap_sku) ttt
-                          left join tp_mst_goods_quality gq
-                            on gq.workshop = ttt.workshop
-                           and gq.goodsid = ttt.goodsid
-                          --left join tp_mst_goods gg
-                          --  on gg.goodsid = ttt.goodsid
-                     ) p
-                pivot(sum(pack_num)
-                   for p_mm in(" + string.Join(",", mmss) + @"))
-                 order by sku
-                ";
+select @work@ as work, to_char(@datebegin@,'yyyy-MM-dd') as datebegin, to_char(@dateend1@,'yyyy-MM-dd') as dateend, sku, " + string.Join(",", mmss_s) + @"
+  from (select to_char(tt.p_date, 'yyyyMM') p_mm, tt.sap_sku sku, tt.day_num
+          from (select t.reckon_date + nvl(gc.cycleday, 15) p_date, t.sap_sku, t.day_num
+                  from t_gline_reckon_final t
+                  left join tp_mst_goods g
+                    on g.goodsid = t.goodsid
+                  left join tp_goods_prod_cycle gc
+                    on gc.goodstypeid = g.goodstypeid
+                   and gc.workshop = t.workshop
+                   and gc.crafttype = nvl(g.goods_line_type, 0)
+                 where t.reckon_date >= @datebegin1@
+                   and t.reckon_date < @dateend@
+                   and (@sku@ is null or @sku@ = '' or @sku@ = t.sap_sku)
+) tt
+         where tt.p_date >= @datebegin@
+           and tt.p_date < @dateend@) p
+pivot(sum(day_num)
+   for p_mm in(" + string.Join(",", mmss) + @"))
+ order by sku
+";
 
                 List<CDAParameter> sqlPara = new List<CDAParameter>();
                 sqlPara.Add(new CDAParameter("datebegin1", beginItem));

+ 3 - 3
wwwroot/mes/main.html

@@ -10,11 +10,11 @@
 </head>
 <body class="easyui-layout">
     <!--页头-->
-    <div data-options="region:'north'" style="height:50px;background-image:url('/img/top_bg.png');background-position-y:center;">
+    <div data-options="region:'north'" style="height:50px;background-image:url('/img/top_bg_blue.png');background-position-y:center;">
         <div style="display:flex;">
             <div style="">
-                <img src="/img/logo3.png" style="height:30px;position:absolute;top:8px;left:10px;" />
-                <span style="font-size:20px;position:absolute;top:12px;left:50px;"><span style="font-weight:600;">东科软件 <font color="red">D</font>ONG<font color="red">K</font>E </span> 陶瓷-计划系统 </span>
+                <img src="/img/hegii2.png" style="height:20px;position:absolute;top:15px;left:10px;" />
+                <span style="font-size:20px;position:absolute;top:12px;left:170px;font-weight:600"> 陶瓷-计划系统 </span>
             </div>
             <div style="margin-left:auto;padding:5px;">
                 <!--<a href="javascript:$('#tree').layout();">测试</a>-->

+ 0 - 349
wwwroot/mes/pc/GroutingLine/GroutingLine.ashx

@@ -1,349 +0,0 @@
-<%@ WebHandler Language="C#" Class="GroutingLine" %>
-
-using System;
-using System.Web;
-using System.Web.SessionState;
-using System.Data;
-using System.Text;
-using System.Collections;
-using System.Collections.Generic;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
-using Curtain.DataAccess;
-using DK.XuWei.WebMes;
-
-public class GroutingLine : IHttpHandler, IReadOnlySessionState
-{
-
-    public void ProcessRequest(HttpContext context)
-    {
-        context.Response.ContentType = "text/plain";
-        using (IDataAccess conn = DataAccess.Create())
-        {
-            //主表
-            if (context.Request["m"].ToString() == "0")
-            {
-                int page = HttpContext.Current.Request["page"] is object ? Convert.ToInt32(HttpContext.Current.Request["page"]) : 1;
-                int rows = HttpContext.Current.Request["rows"] is object ? Convert.ToInt32(HttpContext.Current.Request["rows"]) : 10;
-                string sqlStr = @"SELECT 
-                                  ginfo.GROUTINGLINEID
-                                  ,ginfo.GROUTINGLINECODE
-                                  ,ginfo.GROUTINGLINENAME
-                                  ,case when ginfo.workshop is not null then ginfo.workshop ||'车间' else '' end  workshop
-                                  ,ginfo.BUILDINGNO
-                                  ,ginfo.Floorno
-                                  ,ginfo.GROUTINGLINENO
-                                  ,ginfo.MOULDQUANTITY
-                                  ,case when  ginfo.HIGHPRESSUREFLAG = 0 then '否' else '是' end  as HIGHPRESSUREFLAG
-                                  ,to_char(ginfo.BEGINUSEDDATE,'yyyy-mm-dd') BEGINUSEDDATE
-                                  ,to_char(ginfo.ENDUSEDDATE,'yyyy-mm-dd') ENDUSEDDATE
-                                  ,ginfo.remarks
-                                  ,CASE
-                                       WHEN ginfo.testflag = 0 THEN
-                                        '普通线 '
-                                       WHEN ginfo.testflag = 1 THEN
-                                        '试验线 '
-                                   END AS testflagname
-                                  ,case when  ginfo.valueflag=1 then '有效' else '无效' end as  valueflag2
-                                  ,gtype.gmouldtypename
-                                  ,gtype.canmanytimes
-                                  ,guser.usercode
-                                  ,guser.username
-                                  ,status.gmouldstatusname
-                                  ,nvl2(muser.usercode, muser.username || ' [ '|| muser.usercode || ' ] ', NULL) AS monitornamecode
-                                  ,muser.usercode monitorcode 
-
-                                  ,(SELECT wmsys.wm_concat(to_char(tp_mst_user.usercode))
-                                      FROM tp_pc_groutinguser
-                                     INNER JOIN tp_mst_user
-                                        ON tp_pc_groutinguser.userid = tp_mst_user.userid
-                                     WHERE tp_pc_groutinguser.groutinglineid = ginfo.groutinglineid) AS usercodelist 
-                                  ,(SELECT wmsys.wm_concat(DISTINCT to_char(tp_mst_goods.goodscode))
-                                      FROM tp_pc_groutinglinedetail
-                                     INNER JOIN tp_mst_goods
-                                        ON tp_pc_groutinglinedetail.goodsid = tp_mst_goods.goodsid
-                                     WHERE tp_pc_groutinglinedetail.groutinglineid = ginfo.groutinglineid
-                                       AND tp_pc_groutinglinedetail.valueflag = 1) AS gooscodelist
-                                  ,(SELECT wmsys.wm_concat(to_char(tp_hr_staff.staffname || '[' || (tp_mst_user.usercode) || ']'))
-                                      FROM tp_pc_groutinguser
-                                     INNER JOIN tp_mst_user
-                                        ON tp_pc_groutinguser.userid = tp_mst_user.userid
-                                     INNER JOIN tp_mst_userstaff
-                                        ON tp_mst_user.userid = tp_mst_userstaff.userid
-                                     INNER JOIN tp_hr_staff
-                                        ON tp_mst_userstaff.staffid = tp_hr_staff.staffid
-                                     WHERE tp_pc_groutinguser.groutinglineid = ginfo.groutinglineid) AS staffcodelist 
-
-                              FROM tp_pc_groutingline ginfo 
-                              LEFT JOIN tp_mst_gmouldtype gtype
-                                ON ginfo.gmouldtypeid = gtype.gmouldtypeid 
-                              LEFT JOIN tp_mst_user guser
-                                ON ginfo.userid = guser.userid 
-                              LEFT JOIN tp_sys_gmouldstatus status
-                                ON ginfo.gmouldstatus = status.gmouldstatusid 
-                              LEFT JOIN tp_mst_user muser
-                                ON muser.userid = ginfo.monitorid 
-                             WHERE ginfo.accountid = 1
-                               and ginfo.valueflag='1'";
-
-                //sqlStr+=@" AND (@testflags@ IS NULL OR instr(',' || @testflags@ || ',', ',' || ginfo.testflag || ',') > 0)
-                //               AND (@groutinglineid@ IS NULL OR ginfo.groutinglineid = @groutinglineid@)
-                //               AND (@groutinglineids@ IS NULL OR
-                //                   instr(',' || @groutinglineids@ || ',', ',' || ginfo.groutinglineid || ',') > 0)
-                //               AND (@buildingno@ IS NULL OR instr(ginfo.buildingno, @buildingno@) > 0)
-                //               AND (@floorno@ IS NULL OR instr(ginfo.floorno, @floorno@) > 0)
-                //               AND (@groutinglineno@ IS NULL OR instr(ginfo.groutinglineno, @groutinglineno@) > 0)
-                //               AND (@groutinglinecode@ IS NULL OR instr(ginfo.groutinglinecode, @groutinglinecode@) > 0)
-                //               AND (@groutinglinename@ IS NULL OR instr(ginfo.groutinglinename, @groutinglinename@) > 0)
-                //               AND (@gmouldtypeid@ IS NULL OR ginfo.gmouldtypeid = @gmouldtypeid@)
-                //               AND (@gmouldstatus@ IS NULL OR ginfo.gmouldstatus = @gmouldstatus@)
-                //               AND (@remarks@ IS NULL OR instr(ginfo.remarks, @remarks@) > 0)
-                //               AND ((@valueflag@ = 'a' AND ginfo.valueflag IN ('1', '2')) OR
-                //                   (@valueflag2@ <> 'a' AND ginfo.valueflag = @valueflag2@))
-                //               AND (@beginuseddatestart@ IS NULL OR ginfo.beginuseddate >= @beginuseddatestart@)
-                //               AND (@beginuseddateend@ IS NULL OR ginfo.beginuseddate <= @beginuseddateend@)
-                //               AND (@enduseddatestart@ IS NULL OR ginfo.enduseddate >= @enduseddatestart@)
-                //               AND (@enduseddateend@ IS NULL OR ginfo.enduseddate <= @enduseddateend@)
-                //               AND (@usercode@ IS NULL OR (instr((SELECT wmsys.wm_concat(to_char(tp_mst_user.usercode))
-                //                                                  FROM tp_pc_groutinguser
-                //                                                  LEFT JOIN tp_mst_user
-                //                                                    ON tp_pc_groutinguser.userid = tp_mst_user.userid
-                //                                                 WHERE tp_pc_groutinguser.groutinglineid = ginfo.groutinglineid)
-                //                                               ,@usercode@) > 0))
-                //               AND (@purviewtype@ IS NULL OR EXISTS
-                //                    (SELECT purviewid
-                //                       FROM tp_mst_userpurview
-                //                      WHERE purviewtype = @purviewtype@
-                //                        AND userid = @userid@
-                //                        AND (purviewid = -1 OR purviewid = ginfo.groutinglineid)))
-                //             ORDER BY ginfo.groutinglinecode";
-
-                List<CDAParameter> sqlPara = new List<CDAParameter>();
-                sqlPara.Add(new CDAParameter("AccountID", 1));
-                //sqlPara.Add(new CDAParameter("AccountID", int.Parse(context.Session["accountId"].ToString())));
-                //成型线id
-                sqlPara.Add(new CDAParameter("GroutingLineID", context.Request["GroutingLineID"], DataType.Int32));
-                sqlPara.Add(new CDAParameter("GroutingLineIDS", context.Request["GroutingLineIDS"]));
-                //楼号
-                if (!string.IsNullOrEmpty(context.Request["workshopMaster"] + ""))
-                {
-                    sqlStr += " AND (@workshopMaster@ IS NULL OR ginfo.workshop = @workshopMaster@)";
-                    sqlPara.Add(new CDAParameter("workshopMaster", context.Request["workshopMaster"]));
-                }
-                //楼号
-                if (!string.IsNullOrEmpty(context.Request["BUILDINGNO"] + ""))
-                {
-                    sqlStr += " AND (@BuildingNo@ IS NULL OR instr(ginfo.buildingno, @BuildingNo@) > 0)";
-                    sqlPara.Add(new CDAParameter("BuildingNo", context.Request["BUILDINGNO"]));
-                }
-
-                //层号
-                if (!string.IsNullOrEmpty(context.Request["FLOORNO"] + ""))
-                {
-                    sqlStr += " AND (@FloorNo@ IS NULL OR instr(ginfo.floorno, @FloorNo@) > 0)";
-                    sqlPara.Add(new CDAParameter("FloorNo", context.Request["FLOORNO"]));
-                }
-
-                //线号
-                if (!string.IsNullOrEmpty(context.Request["GroutingLineNo"] + ""))
-                {
-                    sqlStr += " AND (@GroutingLineNo@ IS NULL OR instr(ginfo.groutinglineno, @GroutingLineNo@) > 0)";
-                    sqlPara.Add(new CDAParameter("GroutingLineNo", context.Request["GROUTINGLINENO"]));
-                }
-
-                //成型线编码
-                if (!string.IsNullOrEmpty(context.Request["GROUTINGLINECODE"] + ""))
-                {
-                    sqlStr += " AND (@GroutingLineCode@ IS NULL OR instr(ginfo.groutinglinecode, @GroutingLineCode@) > 0)";
-                    sqlPara.Add(new CDAParameter("GroutingLineCode", context.Request["GROUTINGLINECODE"]));
-                }
-
-                //成型线名称
-                if (!string.IsNullOrEmpty(context.Request["GROUTINGLINENAME"] + ""))
-                {
-                    sqlStr += " AND (@GroutingLineName@ IS NULL OR instr(ginfo.groutinglinename, @GroutingLineName@) > 0)";
-                    sqlPara.Add(new CDAParameter("GroutingLineName", context.Request["GROUTINGLINENAME"]));
-                }
-                //成型线类型
-                string MOULDTYPEID = context.Request["MOULDTYPEID[]"];
-                if (string.IsNullOrEmpty(MOULDTYPEID))
-                {
-                    MOULDTYPEID = context.Request["MOULDTYPEID"];
-                }
-                if (!string.IsNullOrEmpty(MOULDTYPEID))
-                {
-                    sqlStr += " and ginfo.gmouldtypeid in (" + MOULDTYPEID + ")";
-                }
-                //成型线类别
-                string TestFlags = context.Request["TestFlags[]"];
-                if(string.IsNullOrEmpty(TestFlags))
-                {
-                    TestFlags = context.Request["TestFlags"];
-                }
-                if (!string.IsNullOrEmpty(TestFlags))
-                {
-                    sqlStr += " and ginfo.testflag in (" + TestFlags + ")";
-                }
-
-                //开始时间
-                if (!string.IsNullOrEmpty(context.Request["BEGINUSEDDATE"] + ""))
-                {
-                    sqlStr += " AND (@BeginUsedDateStart@ IS NULL OR ginfo.beginuseddate >= @BeginUsedDateStart@)";
-                    sqlPara.Add(new CDAParameter("BeginUsedDateStart", Convert.ToDateTime(context.Request["BEGINUSEDDATE"]), DataType.Date));
-                }
-
-                if (!string.IsNullOrEmpty(context.Request["BEGINUSEDDATEEND"] + ""))
-                {
-                    sqlStr += "AND (@BeginUsedDateEnd@ IS NULL OR ginfo.beginuseddate <= @BeginUsedDateEnd@)";
-                    sqlPara.Add(new CDAParameter("BeginUsedDateEnd", Convert.ToDateTime(context.Request["BEGINUSEDDATEEND"]), DataType.Date));
-                }
-
-                //结束时间
-                if (!string.IsNullOrEmpty(context.Request["ENDUSEDDATE"] + ""))
-                {
-                    sqlStr += " AND (@EndUsedDateStart@ IS NULL OR ginfo.enduseddate >= @EndUsedDateStart@)";
-                    sqlPara.Add(new CDAParameter("EndUsedDateStart", Convert.ToDateTime(context.Request["ENDUSEDDATE"]), DataType.Date));
-                }
-
-                if (!string.IsNullOrEmpty(context.Request["ENDUSEDDATEEND"] + ""))
-                {
-                    sqlStr += " AND (@EndUsedDateEnd@ IS NULL OR ginfo.enduseddate <= @EndUsedDateEnd@)";
-                    sqlPara.Add(new CDAParameter("EndUsedDateEnd", Convert.ToDateTime(context.Request["ENDUSEDDATEEND"]), DataType.Date));
-                }
-
-                //成型线状态
-                string MouldStatus = context.Request["MouldStatus[]"];
-                if (string.IsNullOrEmpty(MouldStatus))
-                {
-                    MouldStatus = context.Request["MouldStatus"];
-                }
-                if (!string.IsNullOrEmpty(MouldStatus))
-                {
-                    sqlStr += " AND ginfo.gmouldstatus in (" + MouldStatus + ")";
-
-                }
-                //备注
-                if (!string.IsNullOrEmpty(context.Request["REMARKS"] + ""))
-                {
-                    sqlStr += " AND (@remarks@ IS NULL OR instr(ginfo.remarks, @remarks@) > 0)";
-                    sqlPara.Add(new CDAParameter("remarks", context.Request["REMARKS"]));
-
-                }
-
-
-                //有效标识
-                sqlPara.Add(new CDAParameter("ValueFlag2", null));
-                sqlPara.Add(new CDAParameter("UserId", null));
-                sqlPara.Add(new CDAParameter("PurviewType", null));
-                sqlPara.Add(new CDAParameter("DailyTime", null));
-                sqlPara.Add(new CDAParameter("BindBarCodeflag", null));
-                sqlPara.Add(new CDAParameter("BindBarCodeTime", null));
-                sqlPara.Add(new CDAParameter("BindBarCodeTimeEnd", null));
-                sqlPara.Add(new CDAParameter("rs_result", DataType.Cursor, ParameterDirection.Output));
-                sqlPara.Add(new CDAParameter("UserCode", null));
-                sqlPara.Add(new CDAParameter("TestFlags", null));
-                sqlStr += " ORDER BY ginfo.groutinglinecode";
-                try
-                {
-                    //调用获取符合条件的成型线信息
-                    JsonResult data = Easyui.ExecuteJsonResult(conn, sqlStr, sqlPara);
-                    context.Response.Write(data.ToJson());
-                    //int total = 0;
-                    //DataTable dt = conn.ExecuteDatatable(sqlStr, sqlPara.ToArray());
-                    //context.Response.Write(new JsonResult(dt) { total = total }.ToJson());
-                }
-                catch (Exception ex)
-                {
-
-                    throw ex;
-                }
-
-            }
-            if (context.Request["m"].ToString() == "1")
-            {
-                string GROUTINGLINEID = context.Request["GROUTINGLINEID"];
-                string sqlStr = @"SELECT 
-                                  detail.Groutingmouldcode
-                                  ,detail.STANDARDGROUTINGCOUNT
-                                  ,detail.GROUTINGCOUNT
-                                  --,detail.BEGINUSEDDATE
-                                  --,detail.ENDUSEDDATE
-                                  ,to_char(detail.BEGINUSEDDATE,'yyyy-mm-dd') BEGINUSEDDATE
-                                  ,to_char(detail.ENDUSEDDATE,'yyyy-mm-dd') ENDUSEDDATE
-                                  ,m.mouldbarcode
-                                  ,line.gmouldstatus
-                                  ,decode(line.gmouldstatus, '0', '停用', '1', '正常', '4', '变产') AS linegmouldstatus
-                                  ,status.gmouldstatusname
-                                  ,goods.goodsname
-                                  ,goods.goodscode
-                                  ,goods.goodsspecification
-                                  ,line.groutinglinecode
-                                  ,line.groutinglinename
-                                  ,users.usercode
-                                  ,detail.remarks AS rreasonremarks
-                                  ,gmr.remarks AS recordremarks
-                                  ,m.testmouldflag
-                              FROM tp_pc_groutinglinedetail detail
-                             INNER JOIN tp_sys_gmouldstatus status
-                                ON status.gmouldstatusid = detail.gmouldstatus
-                             INNER JOIN tp_mst_goods goods
-                                ON goods.goodsid = detail.goodsid
-                             INNER JOIN tp_pc_groutingline line
-                                ON detail.groutinglineid = line.groutinglineid
-                              LEFT JOIN tp_mst_user users
-                                ON line.userid = users.userid
-                              LEFT JOIN tp_pc_mould m
-                                ON detail.mouldsource = '1'
-                               --AND ((detail.mouldid IS NOT NULL AND m.mouldid = detail.mouldid) OR
-                               --    (detail.mouldcode = m.mouldcode))
-                                 and m.mouldid = detail.mouldid
-                              LEFT JOIN tp_pc_gmouldrecord gmr
-                                ON gmr.gmouldrecordid = detail.lastgmouldrecordid
-                             WHERE detail.valueflag = 1
-                               AND line.accountid = 1
-                               and detail.GROUTINGLINEID =@GROUTINGLINEID@
-                            ";
-                List<CDAParameter> sqlPara = new List<CDAParameter>();
-                sqlPara.Add(new CDAParameter("GROUTINGLINEID", GROUTINGLINEID));
-                try
-                {
-                    //调用获取符合条件的成型线信息
-                    JsonResult data = Easyui.ExecuteJsonResult(conn, sqlStr, sqlPara);
-                    context.Response.Write(data.ToJson());
-                    //int total = 0;
-                    //DataTable dt = conn.ExecuteDatatable(sqlStr, sqlPara.ToArray());
-                    //context.Response.Write(new JsonResult(dt).ToJson());
-                }
-                catch (Exception ex)
-                {
-
-                    throw ex;
-                }
-            }
-            if (context.Request["m"].ToString() == "2")
-            {
-                string sqlStr = @"SELECT 
-                                  gmouldtypeid
-                                  ,gmouldtypecode
-                                  ,gmouldtypename
-                                  ,canmanytimes
-                              FROM tp_mst_gmouldtype
-                             WHERE valueflag = 1
-                               AND accountid = @AccountID@";
-                List<CDAParameter> sqlPara = new List<CDAParameter>();
-                sqlPara.Add(new CDAParameter("AccountID", 1));
-                DataTable dt = conn.ExecuteDatatable(sqlStr, sqlPara.ToArray());
-                context.Response.Write(dt.ToJson());
-            }
-        }
-    }
-
-    public bool IsReusable
-    {
-        get
-        {
-            return false;
-        }
-    }
-
-}

+ 0 - 249
wwwroot/mes/pc/GroutingLine/GroutingLine_index.html

@@ -1,249 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <meta charset="utf-8" />
-    <meta name="keywords" content="dongke,mes,ibossmes">
-    <meta name="description" content="制造企业生产过程执行管理系统">
-    <meta name="author" content="xuwei">
-    <title>东科软件</title>
-    <script src="/plugins/xeasyui/xeasyui.min.js"></script>
-    <link href="/plugins/xeasyui/toolbar.min.css" rel="stylesheet" />
-</head>
-<body class="easyui-layout">
-
-    <div id="toolbarLayout" data-options="border:false,region:'north',title:'',iconCls:'icon-grid'">
-        <!--工具条-->
-        <div id="tb" class="i-toolbar">
-            <a href="javascript:void(0)" style="display:none" id="btnInsertMaster" title="添加" class="easyui-linkbutton" iconcls="icon-add" plain="true" onclick="tbMasterAdd()">添加</a>
-            <a href="javascript:void(0)" style="display:none" id="btnUpdateMaster" title="编辑" class="easyui-linkbutton" iconcls="icon-edit" plain="true" onclick="tbMasterEdit()">修改</a>
-            <a href="javascript:void(0)" style="display:none" id="btnDeleteMaster" title="删除" class="easyui-linkbutton" iconcls="icon-remove" plain="true" onclick="tbMasterDelete()">删除</a>
-            <a href="javascript:void(0)" style="display:none" id="btnCheckboxMaster" title="显示复选框" class="easyui-linkbutton" iconcls="icon-ok" plain="true" toggle="true" onclick="tbMasterCheck()">复选</a>
-            <a href="javascript:void(0)" id="btnSearchMaster" title="搜索" class="easyui-linkbutton" iconcls="icon-search" plain="true" toggle="true" onclick="tbMasterSearch()">搜索</a>
-            <a href="javascript:void(0)" style="display:none" id="btnExportMaster" title="导出" class="easyui-linkbutton" iconcls="icon-excel" plain="true" onclick="tbMasterExport()">导出</a>
-            <a href="javascript:void(0)" id="btnReloadMaster" title="刷新" class="easyui-linkbutton" iconcls="icon-reload" plain="true" onclick="tbMasterReload()">刷新</a>
-            <div id="tbSearchDivMaster" padding:10px;">
-                <form id="ffMaster">
-                    <div>
-                        车间:
-                        <input class="easyui-combobox" id="workshopMaster" name="workshopMaster" 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-textbox" id="BUILDINGNO" name="BUILDINGNO" data-options="required:false,prompt:'',tipPosition:'top'" style="width: 120px; height: 32px;">
-                        楼层:
-                        <input class="easyui-textbox" id="FLOORNO" name="FLOORNO" data-options="required:false,prompt:'',tipPosition:'top'" style="width: 120px; height: 32px;">
-                        线号:
-                        <input class="easyui-textbox" id="GROUTINGLINENO" name="GROUTINGLINENO" data-options="required:false,prompt:'',tipPosition:'top'" style="width: 120px; height: 32px;">
-                        成型线编码:
-                        <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="GROUTINGLINENAME" name="GROUTINGLINENAME" data-options="required:false,prompt:'',tipPosition:'top'" style="width: 120px; height: 32px;">
-                        <!--成型工号:
-    <input class="easyui-textbox" id="USERCODE" name="USERCODE" data-options="required:false,prompt:'',tipPosition:'top'" style="width: 120px; height: 32px;">-->
-                    </div>
-                    <div style="padding-top:10px;">
-                        成型线类型:
-                        <input class="easyui-combobox" id="MOULDTYPEID" name="MOULDTYPEID" data-options="required:false,prompt:'',tipPosition:'top',url:'GroutingLine.ashx?m=2',method:'get',valueField:'GMOULDTYPEID',textField:'GMOULDTYPENAME',panelHeight:'300px',editable:'true',multiple:true,limitToList:true" style="width:120px;height:32px;">
-                        成型线类别:
-                        <input class="easyui-combobox" id="TestFlags" name="TestFlags" data-options="required:false,valueField:'value',textField:'text',editable:true,multiple:true,
-                               data:[{'text': '试验线', 'value': '1'},{'text': '生产线', 'value': '0'}]"
-                               style=" width: 160px; height: 32px;">
-                        成型线状态:
-                        <input class="easyui-combobox" id="MouldStatus" name="MouldStatus" data-options="required:false,valueField:'value',textField:'text',editable:true,multiple:true,
-                               data:[{'text': '停用', 'value': '0'},{'text': '正常', 'value': '1'},{'text':'变产','value':'4'}]"
-                               style=" width: 160px; height: 32px;">
-                        <!--有效标识:
-                        <input class="easyui-combobox" id="ValueFlag2" name="ValueFlag2" data-options="required:false,valueField:'value',textField:'text',editable:true,multiple:true,
-                               data:[{'text': '有效', 'value': '1'},{'text': '无效 ', 'value': '0'}]"
-                               style=" width: 160px; height: 32px;">-->
-                        备注:
-                        <input class="easyui-textbox" id="REMARKS" name="REMARKS" data-options="required:false,prompt:'',tipPosition:'top'" style="width: 120px; height: 32px;">
-                    </div>
-                    <div style="padding-top:10px;">
-                        开始日期:
-                        <input class="easyui-datebox" id="BEGINUSEDDATE" name="BEGINUSEDDATE" data-options="required:false,prompt:'',tipPosition:'top'" style="width:150px; height:32px;">
-                        -
-                        <input class="easyui-datebox" id="BEGINUSEDDATEEND" name="BEGINUSEDDATEEND" data-options="required:false,prompt:'',tipPosition:'top'" style="width: 150px; height: 32px;">
-                        结束日期:
-                        <input class="easyui-datebox" id="ENDUSEDDATE" name="ENDUSEDDATE" data-options="required:false,prompt:'',tipPosition:'top'" style="width: 150px; height: 32px;">
-                        -
-                        <input class="easyui-datebox" id="ENDUSEDDATEEND" name="ENDUSEDDATEEND" data-options="required:false,prompt:'',tipPosition:'top'" style="width: 150px; 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="tbMasterSearchSubmit()">搜索</a>
-                    </div>
-                </form>
-            </div>
-        </div>
-    </div>
-
-    <div class="easyui-layout" id="tableLayout" data-options="border:false,region:'center',split:true,title:'',iconCls:'icon-grid'" title="East" style="width:100%;">
-
-        <div data-options="region:'north ',title:''" style="width:100%; height: 50%">
-            <div id="tableTabs" class="easyui-tabs" data-options="border:false,region:'east',split:true" style="width:100%; height: 100%">
-                <!--表格-->
-                <div title="成型线">
-                    <table id="dgMaster" style="width:100%;" data-options="method:'get',border:false,fit:true,fitColumns:true,">
-                        <thead>
-                            <tr>
-                                <th data-options="field:'GROUTINGLINEID',title:'SID',width:220,align:'left',checkbox:true,hidden:true"></th>
-                                <th data-options="field:'WORKSHOP',title:'车间',align:'center',sortable:false"></th>
-                                <th data-options="field:'BUILDINGNO',title:'楼号',align:'center',sortable:false"></th>
-                                <th data-options="field:'FLOORNO',title:'楼层',align:'center',sortable:false"></th>
-                                <th data-options="field:'GROUTINGLINENO',title:'线号',align:'center',sortable:false"></th>
-                                <th data-options="field:'GROUTINGLINECODE',title:'成型线编码',align:'center',sortable:false"></th>
-                                <th data-options="field:'GROUTINGLINENAME',title:'成型线名称',align:'center',sortable:false"></th>
-                                <th data-options="field:'MOULDQUANTITY',title:'模具个数',align:'center',sortable:false"></th>
-                                <th data-options="field:'GMOULDTYPENAME',title:'成型线类型',align:'center',sortable:false"></th>
-                                <th data-options="field:'TESTFLAGNAME',title:'成型线类别',align:'center',sortable:false"></th>
-                                <!--<th data-options="field:'HIGHPRESSUREFLAG',title:'高压注浆',align:'center',sortable:false"></th>-->
-                                <!--<th data-options="field:'MONITORCODE',title:'成型班长',align:'center',sortable:false"></th>-->
-    <th data-options="field:'USERCODELIST',title:'成型工号',align:'center',sortable:false"></th>
-    <th data-options="field:'STAFFCODELIST',title:'员工姓名',align:'center',sortable:false"></th>
-    <th data-options="field:'GOOSCODELIST',title:'产品编码',align:'center',sortable:false"></th>
-                                <th data-options="field:'BEGINUSEDDATE',title:'开始使用日期',align:'center',sortable:false"></th>
-                                <th data-options="field:'ENDUSEDDATE',title:'结束使用日期',align:'center',sortable:false"></th>
-                                <th data-options="field:'GMOULDSTATUSNAME',title:'成型线状态',align:'center',sortable:false"></th>
-                                <!--<th data-options="field:'VALUEFLAG2',title:'有效标识',align:'center',sortable:false"></th>-->
-                                <th data-options="field:'REMARKS',title:'备注',align:'center',sortable:false"></th>
-                            </tr>
-                        </thead>
-                    </table>
-                </div>
-
-            </div>
-        </div>
-        <div data-options="region:'south',title:''" style="width:100%; height: 50%">
-            <div id="tableTabs1" class="easyui-tabs" data-options="border:false,region:'east',split:true" style="width:100%; height: 100%">
-                <div title="模具">
-                    <table id="dgDetail" data-options="toolbar: '#tbDetail',showFooter:false">
-                        <thead>
-                            <tr>
-                                <th data-options="field:'GROUTINGMOULDCODE',title:'模具编号',align:'center',sortable:false"></th>
-                                <th data-options="field:'MOULDBARCODE',title:'模具条码',align:'center',sortable:false"></th>
-                                <th data-options="field:'GOODSCODE',title:'产品编码',align:'center',sortable:false"></th>
-                                <th data-options="field:'GOODSNAME',title:'产品名称',align:'center',sortable:false"></th>
-                                <!--<th data-options="field:'GOODSSPECIFICATION',title:'产品规格',align:'center',sortable:false"></th>-->
-                                <th data-options="field:'STANDARDGROUTINGCOUNT',title:'标准注浆次数',align:'center',sortable:false"></th>
-                                <th data-options="field:'GROUTINGCOUNT',title:'注浆次数',align:'center',sortable:false"></th>
-                                <th data-options="field:'GMOULDSTATUSNAME',title:'模具状态',align:'center',sortable:false"></th>
-                                <th data-options="field:'BEGINUSEDDATE',title:'开始使用日期',align:'center',sortable:false"></th>
-                                <th data-options="field:'ENDUSEDDATE',title:'结束使用日期',align:'center',sortable:false"></th>
-                                <th data-options="field:'RREASONREMARKS',title:'备注',align:'center',sortable:false"></th>
-                                <th data-options="field:'RECORDREMARKS',title:'操作备注',align:'center',sortable:false"></th>
-                                <!--<th data-options="field:'TESTMOULDFLAG',title:'实验标识',align:'center',sortable:false"></th>-->
-                            </tr>
-                        </thead>
-                    </table>
-                </div>
-            </div>
-        </div>
-
-    </div>
-
-
-
-
-
-
-
-
-    <script type="text/javascript">
-
-        $(document).ready(function () {
-            $("#MouldStatus").combobox("select", '1')
-        });
-        
-        //加载完成
-        $(function () {
-            $("#MouldStatus").combobox("select", '1')
-            //加载表格数据
-            tbMasterSearchSubmit();
-        });
-
-        //搜索按钮
-        function tbMasterSearch() {
-            $('#tbSearchDivMaster').toggle();
-            $('#dgMaster').datagrid('resize');
-        }
-
-        //搜索提交
-        function tbMasterSearchSubmit() {
-            $('#dgMaster').datagridLoad({
-                title: '',
-                idField: 'SID',
-                queryParams: $('#ffMaster').serializeJson(),
-                url: 'GroutingLine.ashx?m=0',
-                columnMenu: '#btnColumnMenu',
-                columnMoving: false,
-                onSelect: LoadDataGridDetail
-            });
-        }
-
-        //加载子表数据
-        function LoadDataGridDetail(index, row) {
-            if (row["GROUTINGLINEID"] != null) {
-                var id = row['GROUTINGLINEID'];
-                //加载子表数据
-                $('#dgDetail').datagridLoad({
-                    title: '',
-                    idField: 'SID',
-                    queryParams: { "GROUTINGLINEID": id },
-                    url: 'GroutingLine.ashx?m=1',
-                    columnMenu: '#btnColumnMenu',
-                    columnMoving: false
-                });
-            }
-            else {
-                // $('#dgDetail').datagrid('loadData', { total: 0, rows: [] });
-                var item = $('#dgDetail').datagrid('getRows');
-                for (var i = item.length - 1; i >= 0; i--) {
-                    var index = $('#dgDetail').datagrid('getRowIndex', item[i]);
-                    $('#dgDetail').datagrid('deleteRow', index);
-                }
-            }
-        }
-
-        //查询子表数据
-        function getDataGridDetail() {
-            $('#dgDetail').datagridLoad({
-                title: '',
-                idField: 'SID',
-                queryParams: $('#ffDetail').serializeJson(),
-                url: 'glineplanstop.ashx?m=d',
-                columnMenu: '#btnColumnMenu',
-                columnMoving: false
-            });
-        }
-
-        //导出
-        function tbMasterExport() {
-            //加载表头
-            var fields = $('#dgMaster').datagrid('getColumnFields');
-            var headers = [];
-            for (var i = 0; i < fields.length; i++) {
-                headers.push($('#dgMaster').datagrid('getColumnOption', fields[i])['title']);
-                //headers.push(fields[i]);
-            }
-            $('#dgMaster').datagridExport({
-                headers: headers,
-                fileName: '导出数据(成型停工计划).xls',
-                workSheet: '导出数据(成型停工计划)'
-            });
-        }
-
-        //刷新
-        function tbMasterReload() {
-            tbMasterSearchSubmit();
-        }
-
-        //表格双击
-        function dgMasterDblclickrow(rowIndex, rowData) {
-            tbMasterDetail();
-        }
-
-        function formatterTrueFalse(value, row, index) { return value == 'True' ? '是' : '否'; }
-        function stylerTrueFalse(value, row, index) { return value == 'True' ? 'color:black' : 'color:red'; }
-
-    </script>
-</body>
-</html>

+ 15 - 14
wwwroot/mes/pc/glineplanstop/glineplanstop_index.html

@@ -14,26 +14,16 @@
     <div id="toolbarLayout" data-options="border:false,region:'north',title:'',iconCls:'icon-grid'">
         <!--工具条-->
         <div id="tb" class="i-toolbar">
-            <a href="javascript:void(0)" id="btnInsertMaster" title="添加" class="easyui-linkbutton" iconcls="icon-add" plain="true" onclick="tbMasterAdd()">添加</a>
-            <a href="javascript:void(0)" id="btnUpdateMaster" title="编辑" class="easyui-linkbutton" iconcls="icon-edit" plain="true" onclick="tbMasterEdit()">修改</a>
-            <a href="javascript:void(0)" id="btnDeleteMaster" title="删除" class="easyui-linkbutton" iconcls="icon-remove" plain="true" onclick="tbMasterDelete()">删除</a>
+            <a href="javascript:void(0)" style="display:none" id="btnInsertMaster" title="添加" class="easyui-linkbutton" iconcls="icon-add" plain="true" onclick="tbMasterAdd()">添加</a>
+            <a href="javascript:void(0)" style="display:none" id="btnUpdateMaster" title="编辑" class="easyui-linkbutton" iconcls="icon-edit" plain="true" onclick="tbMasterEdit()">修改</a>
+            <a href="javascript:void(0)" style="display:none" id="btnDeleteMaster" title="删除" class="easyui-linkbutton" iconcls="icon-remove" plain="true" onclick="tbMasterDelete()">删除</a>
             <a href="javascript:void(0)" style="display:none" id="btnCheckboxMaster" title="显示复选框" class="easyui-linkbutton" iconcls="icon-ok" plain="true" toggle="true" onclick="tbMasterCheck()">复选</a>
-            <a href="javascript:void(0)" style="display:none" id="btnSearchMaster" title="搜索" class="easyui-linkbutton" iconcls="icon-search" plain="true" toggle="true" onclick="tbMasterSearch()">搜索</a>
+            <a href="javascript:void(0)" id="btnSearchMaster" title="搜索" class="easyui-linkbutton" iconcls="icon-search" plain="true" toggle="true" onclick="tbMasterSearch()">搜索</a>
             <a href="javascript:void(0)" style="display:none" id="btnExportMaster" title="导出" class="easyui-linkbutton" iconcls="icon-excel" plain="true" onclick="tbMasterExport()">导出</a>
             <a href="javascript:void(0)" id="btnReloadMaster" title="刷新" class="easyui-linkbutton" iconcls="icon-reload" plain="true" onclick="tbMasterReload()">刷新</a>
             <div id="tbSearchDivMaster" padding:10px;">
                 <form id="ffMaster">
                     <div>
-                        停工开始日期:
-                        <input class="easyui-datebox" id="datebeginMasterS" name="datebeginMasterS" data-options="required:false,prompt:'',tipPosition:'top'" style="width:150px; height:32px;">
-                        -
-                        <input class="easyui-datebox" id="datebeginMasterD" name="datebeginMasterD" data-options="required:false,prompt:'',tipPosition:'top'" style="width: 150px; height: 32px;">
-                        停工结束日期:
-                        <input class="easyui-datebox" id="dateendMasterS" name="dateendMasterS" data-options="required:false,prompt:'',tipPosition:'top'" style="width: 150px; height: 32px;">
-                        -
-                        <input class="easyui-datebox" id="dateendMasterD" name="dateendMasterD" data-options="required:false,prompt:'',tipPosition:'top'" style="width: 150px; height: 32px;">
-                    </div>
-                    <div style="padding-top:10px;">
                         计划单号:
                         <input class="easyui-textbox" id="STOP_CODE" name="STOP_CODE" data-options="required:false,prompt:'',tipPosition:'top'" style="width: 120px; height: 32px;">
                         车间:
@@ -46,6 +36,17 @@
                         <input class="easyui-combobox" id="STOP_REASON_ID" name="STOP_REASON_ID" data-options="required:false,prompt:'',tipPosition:'top',url:'../../list.ashx?m=getStopReason',method:'get',valueField:'DICTIONARYID',textField:'DICTIONARYVALUE',panelHeight:'300px',editable:'true',multiple:true,limitToList:true" style="width:120px;height:32px;">
                         创建者:
                         <input class="easyui-textbox" id="CREATEUSER" name="CREATEUSER" data-options="required:false,prompt:'',tipPosition:'top'" style="width: 120px; height: 32px;">
+
+                    </div>
+                    <div style="padding-top:10px;">
+                        停工开始日期:
+                        <input class="easyui-datebox" id="datebeginMasterS" name="datebeginMasterS" data-options="required:false,prompt:'',tipPosition:'top'" style="width:150px; height:32px;">
+                        -
+                        <input class="easyui-datebox" id="datebeginMasterD" name="datebeginMasterD" data-options="required:false,prompt:'',tipPosition:'top'" style="width: 150px; height: 32px;">
+                        停工结束日期:
+                        <input class="easyui-datebox" id="dateendMasterS" name="dateendMasterS" data-options="required:false,prompt:'',tipPosition:'top'" style="width: 150px; height: 32px;">
+                        -
+                        <input class="easyui-datebox" id="dateendMasterD" name="dateendMasterD" data-options="required:false,prompt:'',tipPosition:'top'" style="width: 150px; 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="tbMasterSearchSubmit()">搜索</a>
                     </div>

+ 0 - 9
wwwroot/mes/pc/glinereckonprod/glinereckonprod.ashx

@@ -107,7 +107,6 @@ public class glinereckonprod : IHttpHandler, IReadOnlySessionState
                         }
                         dataStr += "'A" + beginItem.Year.ToString() + "-" + beginItem.Month.ToString().PadLeft(2, '0') + "' AS \"A" + beginItem.Year.ToString() + "-" + beginItem.Month.ToString() + "\",";
                         dataStr += "'B" + beginItem.Year.ToString() + "-" + beginItem.Month.ToString().PadLeft(2, '0') + "' AS \"B" + beginItem.Year.ToString() + "-" + beginItem.Month.ToString() + "\",";
-                        dataStr += "'D" + beginItem.Year.ToString() + "-" + beginItem.Month.ToString().PadLeft(2, '0') + "' AS \"D" + beginItem.Year.ToString() + "-" + beginItem.Month.ToString() + "\",";
                         dataStr += "'C" + beginItem.Year.ToString() + "-" + beginItem.Month.ToString().PadLeft(2, '0') + "' AS \"C" + beginItem.Year.ToString() + "-" + beginItem.Month.ToString() + "\"";
                         if (i < month)
                         {
@@ -136,8 +135,6 @@ public class glinereckonprod : IHttpHandler, IReadOnlySessionState
                                                             'A'
                                                            WHEN 2 THEN
                                                             'B'
-                                                           WHEN 4 THEN
-                                                            'D'
                                                            ELSE
                                                             'C'
                                                        END || to_char(t.reckon_month, 'yyyy-mm') reckon_month
@@ -217,7 +214,6 @@ public class glinereckonprod : IHttpHandler, IReadOnlySessionState
                         }
                         dataStr += "'A" + beginItem.Year.ToString() + "-" + beginItem.Month.ToString().PadLeft(2, '0') + "' AS \"A" + beginItem.Year.ToString() + "-" + beginItem.Month.ToString() + "\",";
                         dataStr += "'B" + beginItem.Year.ToString() + "-" + beginItem.Month.ToString().PadLeft(2, '0') + "' AS \"B" + beginItem.Year.ToString() + "-" + beginItem.Month.ToString() + "\",";
-                        dataStr += "'D" + beginItem.Year.ToString() + "-" + beginItem.Month.ToString().PadLeft(2, '0') + "' AS \"D" + beginItem.Year.ToString() + "-" + beginItem.Month.ToString() + "\",";
                         dataStr += "'C" + beginItem.Year.ToString() + "-" + beginItem.Month.ToString().PadLeft(2, '0') + "' AS \"C" + beginItem.Year.ToString() + "-" + beginItem.Month.ToString() + "\"";
                         if (i < month)
                         {
@@ -246,8 +242,6 @@ public class glinereckonprod : IHttpHandler, IReadOnlySessionState
                                                             'A'
                                                            WHEN 2 THEN
                                                             'B'
-                                                           WHEN 4 THEN
-                                                            'D'
                                                            ELSE
                                                             'C'
                                                        END || to_char(t.reckon_month, 'yyyy-mm') reckon_month
@@ -332,7 +326,6 @@ public class glinereckonprod : IHttpHandler, IReadOnlySessionState
                         }
                         dataStr += "'A" + beginItem.Year.ToString() + "-" + beginItem.Month.ToString().PadLeft(2, '0') + "' AS \"A" + beginItem.Year.ToString() + "-" + beginItem.Month.ToString() + "\",";
                         dataStr += "'B" + beginItem.Year.ToString() + "-" + beginItem.Month.ToString().PadLeft(2, '0') + "' AS \"B" + beginItem.Year.ToString() + "-" + beginItem.Month.ToString() + "\",";
-                        dataStr += "'D" + beginItem.Year.ToString() + "-" + beginItem.Month.ToString().PadLeft(2, '0') + "' AS \"D" + beginItem.Year.ToString() + "-" + beginItem.Month.ToString() + "\",";
                         dataStr += "'C" + beginItem.Year.ToString() + "-" + beginItem.Month.ToString().PadLeft(2, '0') + "' AS \"C" + beginItem.Year.ToString() + "-" + beginItem.Month.ToString() + "\"";
                         if (i < month)
                         {
@@ -362,8 +355,6 @@ public class glinereckonprod : IHttpHandler, IReadOnlySessionState
                                                             'A'
                                                            WHEN 2 THEN
                                                             'B'
-                                                           WHEN 4 THEN
-                                                            'D'
                                                            ELSE
                                                             'C'
                                                        END || to_char(t.reckon_month, 'yyyy-mm') reckon_month

+ 30 - 62
wwwroot/mes/pc/glinereckonprod/glinereckonprod_index.html

@@ -25,13 +25,13 @@
                         <input class="easyui-datebox" id="datebeginMasterS" name="datebeginMasterS" data-options="required:false,prompt:'',tipPosition:'top'" style="width:165px; height:32px;">
                         -
                         <input class="easyui-datebox" id="datebeginMasterD" name="datebeginMasterD" data-options="required:false,prompt:'',tipPosition:'top'" style="width:165px; height:32px;">
-                        <!--结束时间:
+                        结束时间:
                         <input class="easyui-datebox" id="dateendMasterS" name="dateendMasterS" data-options="required:false,prompt:'',tipPosition:'top'" style="width:165px; height:32px;">
                         -
-                        <input class="easyui-datebox" id="dateendMasterD" name="dateendMasterD" data-options="required:false,prompt:'',tipPosition:'top'" style="width:165px; height:32px;">-->
+                        <input class="easyui-datebox" id="dateendMasterD" name="dateendMasterD" data-options="required:false,prompt:'',tipPosition:'top'" style="width:165px; height:32px;">
 
-                    <!--</div>
-                    <div style="padding-top:10px;">-->
+                    </div>
+                    <div style="padding-top:10px;">
                         车间:
                         <input class="easyui-combobox" id="workshopMaster" name="workshopMaster" 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'}]"
@@ -113,7 +113,7 @@
                             <th data-options="field:'GROUTINGLINECODE',title:'成型线',align:'center',sortable:false"></th>
                             <th data-options="field:'RECKON_DATE',title:'预测日',align:'center',sortable:false"></th>
                             <th data-options="field:'SAP_SKU',title:'物料编码',align:'center',sortable:false"></th>
-                            <th data-options="field:'FROM_TYPE',title:'计划分类',align:'center',sortable:false"></th>
+                            <th data-options="field:'FROM_TYPE',title:'分类',align:'center',sortable:false"></th>
                             <th data-options="field:'RECKON_NUM',title:'计划产出',align:'center',sortable:false"></th>
                             <th data-options="field:'FROM_CODE',title:'分类单号',align:'center',sortable:false"></th>
                             <th data-options="field:'GROUTINGMOULDCODE',title:'模具编号',align:'center',sortable:false,hidden:true"></th>
@@ -175,9 +175,6 @@
                 if (field.search("C") != -1) {
                     t6 = 3;
                 }
-                if (field.search("D") != -1) {
-                    t6 = 4;
-                }
                 $('#DataGrid4').datagridLoad({
                     idField: 'SID',
                     //queryParams: param,
@@ -216,9 +213,6 @@
                 if (field.search("C") != -1) {
                     t7 = 3;
                 }
-                if (field.search("D") != -1) {
-                    t7 = 4;
-                }
                 $('#DataGrid4').datagridLoad({
                     idField: 'SID',
                     //queryParams: param,
@@ -256,9 +250,6 @@
                 if (field.search("C") != -1) {
                     t7 = 3;
                 }
-                if (field.search("D") != -1) {
-                    t7 = 4;
-                }
                 $('#DataGrid4').datagridLoad({
                     idField: 'SID',
                     //queryParams: param,
@@ -339,26 +330,20 @@
                     pgColumns[0].push(gs);
                 }
                 var s = {
-                    field: val, title: val, colspan: 4,
+                    field: val, title: val, colspan: 3,
                     styler: function (value, row, index) {
                         return 'color:#00BBFF;text-decoration:underline;';
                     }, sortable: false, align: 'center'
                 }
                 pgColumns[0].push(s);
                 var d1 = {
-                    field: 'A' + val, title: '模产',
-                    styler: function (value, row, index) {
-                        return 'color:#00BBFF;text-decoration:underline;';
-                    }, sortable: false, align: 'center'
-                }
-                var d4 = {
-                    field: 'D' + val, title: '停产',
+                    field: 'A' + val, title: '模具',
                     styler: function (value, row, index) {
                         return 'color:#00BBFF;text-decoration:underline;';
                     }, sortable: false, align: 'center'
                 }
                 var d2 = {
-                    field: 'B' + val, title: '调产',
+                    field: 'B' + val, title: '计划',
                     styler: function (value, row, index) {
                         return 'color:#00BBFF;text-decoration:underline;';
                     }, sortable: false, align: 'center'
@@ -370,7 +355,6 @@
                     }, sortable: false, align: 'center'
                 }
                 spanColumns.push(d1);
-                spanColumns.push(d4);
                 spanColumns.push(d2);
                 spanColumns.push(d3);
 
@@ -390,55 +374,47 @@
 
             //加载子表2
             var pgColumns1 = [[
-                { field: 'RECKONID', title: 'RECKONID', sortable: false, rowspan: 2, hidden: true, align: 'center' },
+                { field: 'RECKONID', title: 'RECKONID',  sortable: false, rowspan: 2, hidden: true, align: 'center' },
                 { field: 'GROUTINGMOULDCODE', title: 'GROUTINGMOULDCODE', rowspan: 2, sortable: false, hidden: true, align: 'center' },
-                { field: '车间', title: '车间', resizable: true, rowspan: 2, align: 'center' },
+                { field: '车间', title: '车间',  resizable: true, rowspan: 2, align: 'center' },
                 { field: '物料编码', title: '物料编码', rowspan: 2, resizable: true, align: 'center' },
                 { field: '产品编码', title: '产品编码', rowspan: 2, resizable: true, align: 'center' },
-                { field: '产品名称', title: '产品名称', rowspan: 2, resizable: true, align: 'center' },
-                { field: '工艺类型', title: '工艺类型', rowspan: 2, resizable: true, align: 'center' },
+                { field: '产品名称', title: '产品名称',  rowspan: 2,resizable: true, align: 'center' },
+                { field: '工艺类型', title: '工艺类型',  rowspan: 2, resizable: true, align: 'center' },
             ]];
             var spanColumns2 = [];
             $.each(months, function (i, val) {
                 month = new Date(t1).getMonth() + 1;
                 month = new Date(t1).getFullYear() + "-" + month
                 if (val == month) {
-                    gs = { field: "G" + month, title: month + "(完成)", rowspan: 2, sortable: false, align: 'center' };
+                    gs = { field: "G" + month, title: month + "(完成)", rowspan: 2, width: '150', sortable: false, align: 'center' };
                     pgColumns1[0].push(gs);
                 }
                 var s = {
-                    field: val, title: val, colspan: 4, styler: function (value, row, index) {
+                    field: val, title: val, colspan: 3, styler: function (value, row, index) {
                         return 'color:#00BBFF;text-decoration:underline;';
-                    }, sortable: false, align: 'center'
-                }
+                    },sortable: false, align: 'center' }
                 pgColumns1[0].push(s);
-                //  pgColumns[0].push(s);
+              //  pgColumns[0].push(s);
                 var d1 = {
-                    field: 'A' + val, title: '模产',
-                    styler: function (value, row, index) {
-                        return 'color:#00BBFF;text-decoration:underline;';
-                    }, sortable: false, align: 'center'
-                }
-                var d4 = {
-                    field: 'D' + val, title: '停产',
+                    field: 'A' + val, title: '模具', width: '150',
                     styler: function (value, row, index) {
                         return 'color:#00BBFF;text-decoration:underline;';
                     }, sortable: false, align: 'center'
                 }
                 var d2 = {
-                    field: 'B' + val, title: '调产',
+                    field: 'B' + val, title: '计划', width: '150',
                     styler: function (value, row, index) {
                         return 'color:#00BBFF;text-decoration:underline;';
                     }, sortable: false, align: 'center'
                 }
                 var d3 = {
-                    field: 'C' + val, title: '合计',
+                    field: 'C' +val, title: '合计', width: '150',
                     styler: function (value, row, index) {
                         return 'color:#00BBFF;text-decoration:underline;';
                     }, sortable: false, align: 'center'
                 }
                 spanColumns2.push(d1);
-                spanColumns2.push(d4);
                 spanColumns2.push(d2);
                 spanColumns2.push(d3);
             });
@@ -456,14 +432,14 @@
 
             //加载子表3
             var pgColumns2 = [[
-                { field: 'RECKONID', title: 'RECKONID', rowspan: 2, sortable: false, hidden: true, align: 'center' },
-                { field: 'GROUTINGMOULDCODE', title: 'GROUTINGMOULDCODE', rowspan: 2, sortable: false, hidden: true, align: 'center' },
+                { field: 'RECKONID', title: 'RECKONID',  rowspan: 2,sortable: false, hidden: true, align: 'center' },
+                { field: 'GROUTINGMOULDCODE', title: 'GROUTINGMOULDCODE', rowspan: 2,  sortable: false, hidden: true, align: 'center' },
                 { field: '车间', title: '车间', rowspan: 2, resizable: true, align: 'center' },
-                { field: '成型线', title: '成型线', rowspan: 2, resizable: true, align: 'center' },
+                { field: '成型线', title: '成型线',  rowspan: 2, resizable: true, align: 'center' },
                 { field: '物料编码', title: '物料编码', rowspan: 2, resizable: true, align: 'center' },
                 { field: '产品编码', title: '产品编码', rowspan: 2, resizable: true, align: 'center' },
-                { field: '产品名称', title: '产品名称', rowspan: 2, resizable: true, align: 'center' },
-                { field: '工艺类型', title: '工艺类型', rowspan: 2, resizable: true, align: 'center' },
+                { field: '产品名称', title: '产品名称',rowspan: 2, resizable: true, align: 'center' },
+                { field: '工艺类型', title: '工艺类型',  rowspan: 2, resizable: true, align: 'center' },
             ]];
             var spanColumns3 = [];
             $.each(months, function (i, val) {
@@ -474,38 +450,30 @@
                     pgColumns2[0].push(gs);
                 }
                 var s = {
-                    field: val, title: val, colspan: 4, styler: function (value, row, index) {
+                    field: val, title: val,  colspan: 3, styler: function (value, row, index) {
                         return 'color:#00BBFF;text-decoration:underline;';
-                    }, sortable: false, align: 'center'
-                }
+                    },sortable: false, align: 'center' }
                 pgColumns2[0].push(s);
-                //  pgColumns[0].push(s);
+              //  pgColumns[0].push(s);
                 var d1 = {
-                    field: 'A' + val, title: '模产',
-                    styler: function (value, row, index) {
-                        return 'color:#00BBFF;text-decoration:underline;';
-                    }, sortable: false, align: 'center'
-                }
-                var d4 = {
-                    field: 'D' + val, title: '停产',
+                    field: 'A' + val, title:'模具',
                     styler: function (value, row, index) {
                         return 'color:#00BBFF;text-decoration:underline;';
                     }, sortable: false, align: 'center'
                 }
                 var d2 = {
-                    field: 'B' + val, title: '调产',
+                    field: 'B' + val, title: '计划',
                     styler: function (value, row, index) {
                         return 'color:#00BBFF;text-decoration:underline;';
                     }, sortable: false, align: 'center'
                 }
                 var d3 = {
-                    field: 'C' + val, title: '合计',
+                    field: 'C'+val, title: '合计',
                     styler: function (value, row, index) {
                         return 'color:#00BBFF;text-decoration:underline;';
                     }, sortable: false, align: 'center'
                 }
                 spanColumns3.push(d1);
-                spanColumns3.push(d4);
                 spanColumns3.push(d2);
                 spanColumns3.push(d3);
             });

+ 0 - 275
wwwroot/mes/pc/goodsquality/goodsquality.ashx

@@ -1,275 +0,0 @@
-<%@ WebHandler Language="C#" Class="goodsquality" %>
-
-using System;
-using System.Web;
-using System.Web.SessionState;
-using System.Data;
-using System.Text;
-using System.Collections;
-using System.Collections.Generic;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
-using Curtain.DataAccess;
-using DK.XuWei.WebMes;
-
-public class goodsquality : IHttpHandler, IReadOnlySessionState
-{
-
-    public void ProcessRequest(HttpContext context)
-    {
-        context.Response.ContentType = "text/plain";
-        using (IDataAccess conn = DataAccess.Create())
-        {
-            //主表
-            if (context.Request["m"].ToString() == "0")
-            {
-                //车间
-                string workshopMaster = context.Request["workshopMaster[]"];
-                if (string.IsNullOrEmpty(workshopMaster))
-                {
-                    workshopMaster = context.Request["workshopMaster"];
-                }
-                //产品型号
-                string GOODSID = context.Request["GOODSID[]"];
-                if (string.IsNullOrEmpty(GOODSID))
-                {
-                    GOODSID = context.Request["GOODSID"];
-                }
-                string sqlStr = @"SELECT gq.workshop || '车间' AS 车间
-                                      ,gq.sap_sku AS 物料编码
-                                      ,gq.workshop
-                                      ,gq.goodsid
-                                      ,mg.goodscode AS 产品编码
-                                      ,mg.goodsname AS 产品名称
-                                      ,to_char(nvl(gq.gh_quality, 1) * 100, 'FM990.00') || '%'  AS 半成品质量
-                                      ,to_char(nvl(gq.gs_quality, 1) * 100, 'FM990.00') || '%'  AS 烧成质量
-                                      ,to_char(nvl(gq.gz_quality , 1) * 100, 'FM990.00') || '%'  AS 整体质量
-                                      ,gq.remarks AS 备注
-                                  FROM tp_mst_goods_quality gq
-                                 INNER JOIN tp_mst_goods mg
-                                    ON gq.goodsid = mg.goodsid
-                                 WHERE gq.accountid = @accountid@";
-                List<CDAParameter> sqlPara = new List<CDAParameter>();
-                sqlPara.Add(new CDAParameter("accountid", 1));
-                if (!string.IsNullOrEmpty(workshopMaster))
-                {
-                    sqlStr += " and gq.workshop in (" + workshopMaster + ")";
-                }
-                if (!string.IsNullOrEmpty(GOODSID))
-                {
-                    sqlStr += " and gq.GOODSID in (" + GOODSID + ")";
-                }
-                sqlStr += " order by gq.workshop,gq.sap_sku,mg.goodscode";
-                try
-                {
-                    JsonResult data = Easyui.ExecuteJsonResult(conn, sqlStr, sqlPara);
-                    context.Response.Write(data.ToJson());
-                }
-                catch (Exception ex)
-                {
-
-                    throw;
-                }
-            }
-            //新建 
-            if (context.Request["m"].ToString() == "1")
-            {
-                // 车间
-                string WORKSHOP = context.Request["WORKSHOP"];
-                // 产品型号
-                string GOODSID = context.Request["GOODSID"];
-                // 物料编码
-                string SAP_SKU = context.Request["SAP_SKU"];
-                // 半成品质量
-                string GH_QUALITY = context.Request["GH_QUALITY"];
-                // 烧成质量
-                string GS_QUALITY = context.Request["GS_QUALITY"];
-                // 整体质量
-                decimal GZ_QUALITY = Convert.ToDecimal(GH_QUALITY) * Convert.ToDecimal(GS_QUALITY);
-                // 备注
-                string REMARKS = context.Request["REMARKS"];
-                //校验是否已存在
-                //校验重复
-                string sqlString = @"SELECT 1
-                                      FROM tp_mst_goods_quality
-                                     WHERE valueflag = 1
-                                       AND sap_sku = @sap_sku@
-                                       AND workshop = @workshop@
-                                       AND goodsid = @goodsid@";
-                List<CDAParameter> sqlPara = new List<CDAParameter>();
-                sqlPara.Add(new CDAParameter("accountid", context.Session["accountId"].ToString()));
-                sqlPara.Add(new CDAParameter("sap_sku", SAP_SKU));
-                sqlPara.Add(new CDAParameter("workshop", WORKSHOP));
-                sqlPara.Add(new CDAParameter("goodsid", GOODSID));
-                DataTable dtcheck = conn.ExecuteDatatable(sqlString, sqlPara.ToArray());
-                if (dtcheck.Rows.Count > 0)
-                {
-                    //编辑
-                    string sqlStr = @" UPDATE tp_mst_goods_quality
-                                    SET gh_quality = @gh_quality@
-                                       ,gs_quality = @gs_quality@
-                                       ,gz_quality = @gz_quality@
-                                       ,remarks    = @remarks@
-                                       ,updatetime = sysdate
-                                       ,updateuserid =@userid@
-                                  WHERE workshop = @workshop@
-                                    AND sap_sku = @sap_sku@
-                                    AND goodsid = @goodsid@";
-                    sqlPara.Add(new CDAParameter("gh_quality", GH_QUALITY));
-                    sqlPara.Add(new CDAParameter("gs_quality", GS_QUALITY));
-                    sqlPara.Add(new CDAParameter("gz_quality", GZ_QUALITY));
-                    sqlPara.Add(new CDAParameter("remarks", REMARKS));
-                    sqlPara.Add(new CDAParameter("userid", HttpContext.Current.Session["userId"]));
-                    int detailCount = conn.ExecuteNonQuery(sqlStr, sqlPara.ToArray());
-                    if (detailCount > 0)
-                    {
-                        context.Response.Write(new JsonResult(JsonStatus.success).ToJson());
-                        return;
-                    }
-                }
-                else
-                {
-                    //新建
-                    string sqlStr = @" INSERT INTO tp_mst_goods_quality
-                                                     (workshop
-                                                     ,goodsid
-                                                     ,sap_sku
-                                                     ,gh_quality
-                                                     ,gs_quality
-                                                     ,gz_quality
-                                                     ,remarks
-                                                     ,accountid
-                                                     ,createuserid
-                                                     ,createtime
-                                                     ,updateuserid
-                                                     ,updatetime)
-                                                 VALUES
-                                                     (@workshop@
-                                                     ,@goodsid@
-                                                     ,@sap_sku@
-                                                     ,@gh_quality@
-                                                     ,@gs_quality@
-                                                     ,@gz_quality@
-                                                     ,@remarks@
-                                                     ,@accountid@
-                                                     ,@createuserid@
-                                                     ,sysdate
-                                                     ,@updateuserid@
-                                                     ,sysdate)";
-                    sqlPara.Add(new CDAParameter("gh_quality", GH_QUALITY));
-                    sqlPara.Add(new CDAParameter("gs_quality", GS_QUALITY));
-                    sqlPara.Add(new CDAParameter("gz_quality", GZ_QUALITY));
-                    sqlPara.Add(new CDAParameter("remarks", REMARKS));
-                    sqlPara.Add(new CDAParameter("createuserid", HttpContext.Current.Session["userId"]));
-                    sqlPara.Add(new CDAParameter("updateuserid", HttpContext.Current.Session["userId"]));
-                    try
-                    {
-                        int detailCount = conn.ExecuteNonQuery(sqlStr, sqlPara.ToArray());
-                        if (detailCount > 0)
-                        {
-                            context.Response.Write(new JsonResult(JsonStatus.success).ToJson());
-                            return;
-                        }
-                    }
-                    catch (Exception ex)
-                    {
-
-                        throw;
-                    }
-
-                }
-            }
-            //查询编辑数据
-            if (context.Request["m"].ToString() == "2")
-            {
-                // 车间
-                string WORKSHOP = context.Request["WORKSHOP"];
-                // 产品型号
-                string GOODSID = context.Request["GOODSID"];
-                // 物料编码
-                string SAP_SKU = context.Request["SAP_SKU"];
-                string sqlStr = @"SELECT gq.workshop
-                                          ,gq.sap_sku 
-                                          ,gq.goodsid
-                                          ,gq.gh_quality 
-                                          ,gq.gs_quality 
-                                          ,gq.gz_quality 
-                                          ,gq.remarks 
-                                      FROM tp_mst_goods_quality gq
-                                     INNER JOIN tp_mst_goods mg
-                                        ON gq.goodsid = mg.goodsid
-                                     WHERE gq.workshop = @workshop@
-                                        AND gq.sap_sku = @sap_sku@
-                                        AND gq.goodsid = @goodsid@";
-                List<CDAParameter> sqlPara = new List<CDAParameter>();
-                sqlPara.Add(new CDAParameter("sap_sku", SAP_SKU));
-                sqlPara.Add(new CDAParameter("workshop", WORKSHOP));
-                sqlPara.Add(new CDAParameter("goodsid", GOODSID));
-                try
-                {
-                    DataTable dt = conn.ExecuteDatatable(sqlStr, sqlPara.ToArray());
-                    context.Response.Write(new JsonResult(dt) { total = 0 }.ToJson());
-                }
-                catch (Exception ex)
-                {
-                    throw;
-                }
-            }
-            //编辑
-            if (context.Request["m"].ToString() == "3")
-            {
-                // 车间
-                string WORKSHOP = context.Request["WORKSHOP"];
-                // 产品型号
-                string GOODSID = context.Request["GOODSID"];
-                // 物料编码
-                string SAP_SKU = context.Request["SAP_SKU"];
-                // 半成品质量
-                string GH_QUALITY = context.Request["GH_QUALITY"];
-                // 烧成质量
-                string GS_QUALITY = context.Request["GS_QUALITY"];
-                // 整体质量
-                decimal GZ_QUALITY = Convert.ToDecimal(GH_QUALITY) * Convert.ToDecimal(GS_QUALITY);
-                // 备注
-                string REMARKS = context.Request["REMARKS"];
-
-                //编辑
-                string sqlStr = @" UPDATE tp_mst_goods_quality
-                                    SET gh_quality = @gh_quality@
-                                       ,gs_quality = @gs_quality@
-                                       ,gz_quality = @gz_quality@
-                                       ,remarks    = @remarks@
-                                       ,updatetime = sysdate
-                                       ,updateuserid =@userid@
-                                  WHERE workshop = @workshop@
-                                    AND sap_sku = @sap_sku@
-                                    AND goodsid = @goodsid@";
-                List<CDAParameter> sqlPara = new List<CDAParameter>();
-                sqlPara.Add(new CDAParameter("accountid", context.Session["accountId"].ToString()));
-                sqlPara.Add(new CDAParameter("sap_sku", SAP_SKU));
-                sqlPara.Add(new CDAParameter("workshop", WORKSHOP));
-                sqlPara.Add(new CDAParameter("goodsid", GOODSID));
-                sqlPara.Add(new CDAParameter("gh_quality", GH_QUALITY));
-                sqlPara.Add(new CDAParameter("gs_quality", GS_QUALITY));
-                sqlPara.Add(new CDAParameter("gz_quality", GZ_QUALITY));
-                sqlPara.Add(new CDAParameter("remarks", REMARKS));
-                sqlPara.Add(new CDAParameter("userid", HttpContext.Current.Session["userId"]));
-                int detailCount = conn.ExecuteNonQuery(sqlStr, sqlPara.ToArray());
-                if (detailCount > 0)
-                {
-                    context.Response.Write(new JsonResult(JsonStatus.success).ToJson());
-                    return;
-                }
-            }
-        }
-    }
-
-    public bool IsReusable
-    {
-        get
-        {
-            return false;
-        }
-    }
-
-}

+ 0 - 96
wwwroot/mes/pc/goodsquality/goodsquality_add.html

@@ -1,96 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <meta charset="utf-8" />
-    <meta name="keywords" content="dongke,mes,ibossmes">
-    <meta name="description" content="制造企业生产过程执行管理系统">
-    <meta name="author" content="xuwei">
-    <title>东科软件</title>
-    <link rel="shortcut icon" href="/img/logo.png" />
-    <link rel="bookmark" href="/img/logo.png" />
-    <link rel="stylesheet" type="text/css" href="/plugins/easyui/themes/dongke/easyui.css">
-    <link rel="stylesheet" type="text/css" href="/plugins/easyui/themes/icon.css">
-    <link rel="stylesheet" type="text/css" href="/plugins/xeasyui/xuwell.css">
-    <script type="text/javascript" src="/plugins/easyui/jquery.min.js"></script>
-    <script type="text/javascript" src="/plugins/easyui/jquery.easyui.min.js"></script>
-    <script type="text/javascript" src="/plugins/easyui/locale/easyui-lang-zh_CN.js"></script>
-    <script type="text/javascript" src="/plugins/xeasyui/xuwell.js"></script>
-</head>
-<body class="easyui-layout">
-    <div data-options="region:'center',plain:true,border:false">
-        <form id="goodsqualityForm" method="post" class="w-form">
-            <div class="w-div">
-                <div class="w-fieldbar" onclick="$('#goodsqualityMore1').toggle()" style="cursor:pointer;"></div>
-            </div>
-            <div id="goodsqualityMore1" style="display:block;">
-                <div class="w-div">
-                    <div class="w-fieldname">SID:</div>
-                    <div class="w-field"><input disabled class="easyui-textbox" id="SID" name="SID" data-options="required:false,prompt:'请填写SID...',tipPosition:'top'" style="width:100%;height:32px;"></div>
-                </div>
-            </div>
-            <div class="w-div">
-                <div class="w-fieldbar" onclick="$('#goodsqualityMore2').toggle()" style="cursor:pointer;"></div>
-            </div>
-            <div id="goodsqualityMore2" style="display:block;">
-                <div class="w-div">
-                    <div class="w-fieldname">车间:</div>
-                    <div class="w-field">
-                        <input class="easyui-combobox" id="WORKSHOP" name="WORKSHOP" data-options="required:true,valueField:'value',tipPosition:'top',textField:'text',editable:true,
-                               data:[{'text': '1车间', 'value': '1'},{'text': '2车间', 'value': '2'},{'text': '3车间', 'value': '3'}]"
-                               style=" width: 100%; height: 32px;">
-                    </div>
-                </div>
-                <div class="w-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" style="width:100%;height:32px;"></div>
-                </div>
-                <div class="w-div">
-                    <div class="w-fieldname">物料编码:</div>
-                    <div class="w-field"><input class="easyui-textbox" id="SAP_SKU" name="SAP_SKU" 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-field"><input class="easyui-numberbox" id="GH_QUALITY" name="GH_QUALITY" data-options="required:true,max:1,precision:4,prompt:'请填写半成品质量...',tipPosition:'top'" style="width:100%;height:32px;"></div>
-                </div>
-                <div class="w-div">
-                    <div class="w-fieldname">烧成质量:</div>
-                    <div class="w-field"><input class="easyui-numberbox" id="GS_QUALITY" name="GS_QUALITY" data-options="required:true,max:1,precision:4,prompt:'请填写烧成质量...',tipPosition:'top'" style="width:100%;height:32px;"></div>
-                </div>
-                <div class="w-div">
-                    <div class="w-fieldname">备注:</div>
-                    <div class="w-field"><input class="easyui-textbox" id="REMARKS" name="REMARKS" data-options="required:false,prompt:'请填写备注...',tipPosition:'top'" style="width:100%;height:32px;"></div>
-                </div>
-            </div>
-        </form>
-    </div>
-    <div data-options="region:'south',border:false" class="w-bar">
-        <a href="javascript:void(0)" id="goodsqualityButtonSave" class="easyui-linkbutton" data-options="iconCls:'icon-save'" onclick="goodsqualityButtonSubmit_Click()">保存</a>
-        <a href="javascript:void(0)" id="goodsqualityButtonClose" class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" onclick="goodsqualityButtonCancel_Click()">关闭</a>
-    </div>
-    <script type="text/javascript">
-
-        $(function () {
-            //$('#goodsqualityForm').formLoad({
-            //    url: 'goodsquality.ashx?m=1'
-            //});
-            $('#goodsqualityMore1').toggle();
-            $('#GH_QUALITY').numberbox('setValue', 1);
-            $('#GS_QUALITY').numberbox('setValue', 1);
-        });
-
-        //保存
-        function goodsqualityButtonSubmit_Click() {
-            $.dialog.save({
-                formid: 'goodsqualityForm',
-                datagridid: 'goodsqualityDatagrid',
-                url: 'goodsquality.ashx?m=1'
-            });
-        }
-
-        function goodsqualityButtonCancel_Click() {
-            $.dialog.close();
-        }
-
-    </script>
-</body>
-</html>

+ 0 - 94
wwwroot/mes/pc/goodsquality/goodsquality_edit.html

@@ -1,94 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <meta charset="utf-8" />
-    <meta name="keywords" content="dongke,mes,ibossmes">
-    <meta name="description" content="制造企业生产过程执行管理系统">
-    <meta name="author" content="xuwei">
-    <title>东科软件</title>
-    <link rel="shortcut icon" href="/img/logo.png" />
-    <link rel="bookmark" href="/img/logo.png" />
-    <link rel="stylesheet" type="text/css" href="/plugins/easyui/themes/dongke/easyui.css">
-    <link rel="stylesheet" type="text/css" href="/plugins/easyui/themes/icon.css">
-    <link rel="stylesheet" type="text/css" href="/plugins/xeasyui/xuwell.css">
-    <script type="text/javascript" src="/plugins/easyui/jquery.min.js"></script>
-    <script type="text/javascript" src="/plugins/easyui/jquery.easyui.min.js"></script>
-    <script type="text/javascript" src="/plugins/easyui/locale/easyui-lang-zh_CN.js"></script>
-    <script type="text/javascript" src="/plugins/xeasyui/xuwell.js"></script>
-</head>
-<body class="easyui-layout">
-    <div data-options="region:'center',plain:true,border:false">
-        <form id="goodsqualityForm" method="post" class="w-form">
-            <div class="w-div">
-                <div class="w-fieldbar" onclick="$('#goodsqualityMore1').toggle()" style="cursor:pointer;"></div>
-            </div>
-            <div id="goodsqualityMore1" style="display:block;">
-                <div class="w-div">
-                    <div class="w-fieldname">SID:</div>
-                    <div class="w-field"><input disabled class="easyui-textbox" id="SID" name="SID" data-options="required:false,prompt:'请填写SID...',tipPosition:'top'" style="width:100%;height:32px;"></div>
-                </div>
-            </div>
-            <div class="w-div">
-                <div class="w-fieldbar" onclick="$('#goodsqualityMore2').toggle()" style="cursor:pointer;"></div>
-            </div>
-            <div id="goodsqualityMore2" style="display:block;">
-                <div class="w-div">
-                    <div class="w-fieldname">车间:</div>
-                    <div class="w-field">
-                        <input class="easyui-combobox" readonly="readonly" id="WORKSHOP" name="WORKSHOP" data-options="required:true,tipPosition:'top',valueField:'value',textField:'text',editable:true,
-                               data:[{'text': '1车间', 'value': '1'},{'text': '2车间', 'value': '2'},{'text': '3车间', 'value': '3'}]"
-                               style=" width: 100%; height: 32px;">
-                    </div>
-                </div>
-                <div class="w-div">
-                    <div class="w-fieldname">产品型号:</div>
-                    <div class="w-field"><input class="easyui-combobox" readonly="readonly" 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" style="width:100%;height:32px;"></div>
-                </div>
-                <div class="w-div">
-                    <div class="w-fieldname">物料编码:</div>
-                    <div class="w-field"><input class="easyui-textbox" readonly="readonly" id="SAP_SKU" name="SAP_SKU" 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-field"><input class="easyui-numberbox" id="GH_QUALITY" name="GH_QUALITY" data-options="required:true,max:1,precision:4,prompt:'请填写半成品质量...',tipPosition:'top'" style="width:100%;height:32px;"></div>
-                </div>
-                <div class="w-div">
-                    <div class="w-fieldname">烧成质量:</div>
-                    <div class="w-field"><input class="easyui-numberbox" id="GS_QUALITY" name="GS_QUALITY" data-options="required:true,max:1,precision:4,prompt:'请填写烧成质量...',tipPosition:'top'" style="width:100%;height:32px;"></div>
-                </div>
-                <div class="w-div">
-                    <div class="w-fieldname">备注:</div>
-                    <div class="w-field"><input class="easyui-textbox" id="REMARKS" name="REMARKS" data-options="required:false,prompt:'请填写备注...',tipPosition:'top'" style="width:100%;height:32px;"></div>
-                </div>
-            </div>
-        </form>
-    </div>
-    <div data-options="region:'south',border:false" class="w-bar">
-        <a href="javascript:void(0)" id="goodsqualityButtonSave" class="easyui-linkbutton" data-options="iconCls:'icon-save'" onclick="goodsqualityButtonSubmit_Click()">保存</a>
-        <a href="javascript:void(0)" id="goodsqualityButtonClose" class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" onclick="goodsqualityButtonCancel_Click()">关闭</a>
-    </div>
-    <script type="text/javascript">
-
-        $(function () {
-            $('#goodsqualityForm').formLoad({
-                url: 'goodsquality.ashx?m=2'
-            });
-            $('#goodsqualityMore1').toggle();
-        });
-
-        //保存
-        function goodsqualityButtonSubmit_Click() {
-            $.dialog.save({
-                formid: 'goodsqualityForm',
-                datagridid: 'goodsqualityDatagrid',
-                url: 'goodsquality.ashx?m=3'
-            });
-        }
-
-        function goodsqualityButtonCancel_Click() {
-            $.dialog.close();
-        }
-
-    </script>
-</body>
-</html>

+ 0 - 155
wwwroot/mes/pc/goodsquality/goodsquality_index.html

@@ -1,155 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <meta charset="utf-8" />
-    <meta name="keywords" content="dongke,mes,ibossmes">
-    <meta name="description" content="制造企业生产过程执行管理系统">
-    <meta name="author" content="xuwei">
-    <title>东科软件</title>
-    <link rel="shortcut icon" href="/img/logo.png" />
-    <link rel="bookmark" href="/img/logo.png" />
-    <link rel="stylesheet" type="text/css" href="/plugins/easyui/themes/dongke/easyui.css">
-    <link rel="stylesheet" type="text/css" href="/plugins/easyui/themes/icon.css">
-    <link rel="stylesheet" type="text/css" href="/plugins/xeasyui/xuwell.css">
-    <script type="text/javascript" src="/plugins/easyui/jquery.min.js"></script>
-    <script type="text/javascript" src="/plugins/easyui/jquery.easyui.min.js"></script>
-    <script type="text/javascript" src="/plugins/easyui/locale/easyui-lang-zh_CN.js"></script>
-    <script type="text/javascript" src="/plugins/xeasyui/xuwell.js"></script>
-    <link href="/plugins/xeasyui/toolbar.min.css" rel="stylesheet" />
-</head>
-<body class="easyui-layout">
-    <div data-options="region:'center',plain:true,border:false">
-        <!--工具条-->
-        <div id="goodsqualityToolbar" class="i-toolbar">
-            <a href="javascript:void(0)" id="goodsqualityButtonInsert" title="添加" class="easyui-linkbutton" iconcls="icon-add" plain="true" onclick="goodsqualityButtonInsert_Click()">添加</a>
-            <a href="javascript:void(0)" id="goodsqualityButtonUpdate" title="编辑" class="easyui-linkbutton" iconcls="icon-edit" plain="true" onclick="goodsqualityButtonUpdate_Click()">修改</a>
-            <a href="javascript:void(0)" id="goodsqualityButtonSearch" title="搜索" class="easyui-linkbutton" iconcls="icon-search" plain="true" toggle="true" onclick="goodsqualityButtonSearch_Click()">搜索</a>
-            <a href="javascript:void(0)" id="goodsqualityButtonExport" title="导出" class="easyui-linkbutton" iconcls="icon-excel" plain="true" onclick="goodsqualityButtonExport_Click()">导出</a>
-            <a href="javascript:void(0)" id="goodsqualityButtonReload" title="刷新" class="easyui-linkbutton" iconcls="icon-reload" plain="true" onclick="goodsqualityButtonReload_Click()">刷新</a>
-            <div id="goodsqualitySearchDiv" style="display:block; padding: 10px;">
-                <form id="goodsqualityForm">
-                    <div>
-                        车间:
-                        <input class="easyui-combobox" id="workshopMaster" name="workshopMaster" 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-combobox" id="GOODSID" name="GOODSID" data-options="required:false,prompt:'',tipPosition:'top',url:'../../list.ashx?m=getgoods&select=1',method:'get',valueField:'GOODSID',textField:'GOODSCODE',panelHeight:'300px',editable:'true',multiple:true,limitToList:true" style="width:120px;height:32px;">
-                        <a href="javascript:void(0)" id="goodsqualityButtonSearchReset" title="清空" class="easyui-linkbutton" plain="false" onclick="$('#goodsqualityForm').form('clear')">清空</a>
-                        <a href="javascript:void(0)" id="goodsqualityButtonSearchSubmit" title="搜索" class="easyui-linkbutton" plain="false" onclick="goodsqualityButtonSearchSubmit_Click()">搜索</a>
-                    </div>
-                </form>
-            </div>
-        </div>
-
-        <!--表格-->
-        <table id="goodsqualityDatagrid" data-options="toolbar: '#goodsqualityToolbar',showFooter:false">
-            <thead>
-                <tr>
-                    <th data-options="field:'SID',title:'SID',width:220,align:'left',checkbox:true,hidden:true"></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>
-                    <th data-options="field:'备注',title:'备注',align:'center',sortable:false"></th>
-                    <th data-options="field:'WORKSHOP',title:'WORKSHOP',align:'center',sortable:false,hidden:true"></th>
-                    <th data-options="field:'GOODSID',title:'GOODSID',align:'center',sortable:false,hidden:true"></th>
-                </tr>
-            </thead>
-        </table>
-    </div>
-    <script type="text/javascript">
-
-        $(document).ready(function () {
-            //var ctime = new Date();
-            //$('#ACCOUNTDATEBEGIN').datetimebox('setValue', ctime.getFullYear() + "-" + (ctime.getMonth() + 1) + "-" + ctime.getDate() + ' 00:00:00');
-            //$("#ACCOUNTDATEEND").datetimebox("setValue", ctime.getFullYear() + "-" + (ctime.getMonth() + 1) + "-" + ctime.getDate() + ' 23:59:59');
-        });
-
-        //加载完成
-        $(function () {
-            //加载按钮
-            $('#goodsqualityToolbar').buttonLoad({
-                url: 'goodsquality.ashx?m=b'
-            });
-            //加载表格数据
-            goodsqualityButtonSearchSubmit_Click();
-        });
-
-        //修改按钮
-        function goodsqualityButtonUpdate_Click() {
-            var row = $('#goodsqualityDatagrid').datagrid('getSelected');
-            var t1 = row['WORKSHOP'];
-            var t2 = row["GOODSID"];
-            var t3 = row["物料编码"];
-            $('#goodsqualityDatagrid').datagridDialog({
-                title: '修改数据',
-                width: 600,
-                height: 620,
-                url: 'goodsquality_edit.html?WORKSHOP=' + t1 + '&GOODSID=' + t2 + '&SAP_SKU='+t3,
-                requireSelect: true
-            });
-        }
-        //新建
-        function goodsqualityButtonInsert_Click(){
-            $('#goodsqualityDatagrid').datagridDialog({
-                title: '添加数据',
-                width: 600,
-                height: 620,
-                url: 'goodsquality_add.html'
-            });
-        }
-
-        //搜索按钮
-        function goodsqualityButtonSearch_Click() {
-            $('#goodsqualitySearchDiv').toggle();
-            $('#goodsqualityDatagrid').datagrid('resize');
-        }
-
-        //搜索提交
-        function goodsqualityButtonSearchSubmit_Click() {
-            $('#goodsqualityDatagrid').datagridLoad({
-                title: '',
-                idField: 'SID',
-                queryParams: $('#goodsqualityForm').serializeJson(),
-                url: 'goodsquality.ashx?m=0',
-                columnMoving: false
-            });
-        }
-
-        //导出
-        function goodsqualityButtonExport_Click() {
-            //加载表头
-            var fields = $('#goodsqualityDatagrid').datagrid('getColumnFields');
-            var headers = [];
-            for (var i = 0; i < fields.length; i++) {
-                headers.push($('#goodsqualityDatagrid').datagrid('getColumnOption', fields[i])['title']);
-                //headers.push(fields[i]);
-            }
-            $('#goodsqualityDatagrid').datagridExport({
-                headers: headers,
-                fileName: '导出数据(产品质量系数).xls',
-                workSheet: '导出数据(产品质量系数)'
-            });
-        }
-
-        //刷新
-        function goodsqualityButtonReload_Click() {
-            goodsqualityButtonSearchSubmit_Click();
-        }
-
-        //帮助
-        function goodsqualityButtonHelp_Click() {
-            $('#goodsqualityDatagrid').datagridDialog({
-                title: '帮助',
-                width: 640,
-                height: 480,
-                url: 'goodsquality_help.html'
-            });
-        }
-    </script>
-</body>
-</html>

+ 2 - 8
wwwroot/mes/pc/mouldDailyPlan/mouldDailyPlan.ashx

@@ -31,11 +31,6 @@ public class mouldDailyPlan : IHttpHandler, IReadOnlySessionState
                 {
                     workshop = context.Request["workshopMaster"];
                 }
-                string T_FLAG = context.Request["T_FLAG[]"];//成型线类型
-                if (string.IsNullOrEmpty(T_FLAG))
-                {
-                    T_FLAG = context.Request["T_FLAG"];
-                }
                 string complete = context.Request["complete[]"];
                 if (string.IsNullOrEmpty(complete))
                 {
@@ -58,9 +53,8 @@ public class mouldDailyPlan : IHttpHandler, IReadOnlySessionState
                                              INNER JOIN (SELECT mdd.planid
                                                                ,SUM(mdd.make_qty) AS make_qty
                                                                ,SUM(mdd.plan_qty) AS plan_qty
-                                                           FROM tp_mould_dailyplandetail mdd" +
-                    (string.IsNullOrEmpty(T_FLAG)? "" : " where mdd.T_FLAG in ("+T_FLAG+") ") + @"
-                                                   GROUP BY mdd.planid) d
+                                                           FROM tp_mould_dailyplandetail mdd
+                                                          GROUP BY mdd.planid) d
                                                 ON md.planid = d.planid
                                                  WHERE md.valueflag = 1
                                                    AND md.accountid = @accountid@";

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

@@ -20,18 +20,18 @@
             <div id="tbSearchDiv" style="display: block; padding: 10px;">
                 <form id="ffMaster">
                     <div>
-
+                        
+                        计划名称:
+                        <input class="easyui-textbox" id="planname" name="planname" data-options="required:false,prompt:'',tipPosition:'top'" style="width: 120px; height: 32px;">
                         计划日期:
                         <input class="easyui-datebox" id="datebeginMasterS" name="datebeginMasterS" data-options="required:false,prompt:'',tipPosition:'top'" style="width:165px; height:32px;">
                         -
                         <input class="easyui-datebox" id="datebeginMasterD" name="datebeginMasterD" data-options="required:false,prompt:'',tipPosition:'top'" style="width:165px; height:32px;">
-                        计划名称:
-                        <input class="easyui-textbox" id="planname" name="planname" data-options="required:false,prompt:'',tipPosition:'top'" style="width: 120px; height: 32px;">
                         完成状态:
                         <input class="easyui-combobox" id="complete" name="complete" data-options="required:false,valueField:'value',textField:'text',editable:true,multiple:true,
                                data:[{'text': '已完成', 'value': '1'},{'text': '未完成', 'value': '2'}]"
                                style=" width: 160px; height: 32px;">
-
+                        
                     </div>
                     <div style="padding-top:10px">
                         车间:
@@ -116,7 +116,7 @@
             var endDate = ctime.getFullYear() + "-" + (ctime.getMonth() + 1) + "-" + (ctime.getDate());
             $("#datebeginMasterS").datebox("setValue", beginDate);
             $("#datebeginMasterD").datebox("setValue", endDate);
-            $("#T_FLAG").combobox("select",'0')
+            //$("#T_FLAG").combobox("select",'0')
             tbSearchSubmit();
         });
 
@@ -131,10 +131,10 @@
         function LoadDataGridDetail(index, row) {
             //加载子表1
             var sid = row["SID"];
-            var param = $('#ffMaster').serializeJson();
+           // var param = $('#ffMaster').serializeJson();
             $('#DataGrid1').datagridLoad({
                 idField: 'SID',
-                queryParams: param,
+            //    queryParams: param,
                 url: 'mouldDailyPlan.ashx?m=1&sid=' + sid,
                 fixWidth: 180,
                 mergeWidth: 180,

+ 7 - 8
wwwroot/mes/pc/mouldcodewarning/mouldcodewarning.ashx

@@ -47,14 +47,14 @@ public class mouldcodewarning : IHttpHandler, IReadOnlySessionState
                 }
                 //物料编码
                 string sap_sku = context.Request["sap_sku"];
-                string sqlStr = @"select tttt.workshop, tttt.groutinglinecode, tttt.goodscode, tttt.goodsname, tttt.materialcode, tttt.day_grouting_num, tttt. gcount, tttt.scount, tttt.unused_num, to_char(tttt.deaddate,'YYYY-MM-DD') deaddate
+                string sqlStr = @"select tttt.*
                               from (select ttt.*
-                                          ,case
+                                          ,to_char( case
                                               when ttt.unused_num > 0 then
                                                trunc(sysdate) + ceil(ttt.unused_num / ttt.day_grouting_num)
                                               else
                                                trunc(sysdate)
-                                            end  deaddate
+                                            end,'YYYY-MM-DD') deaddate
                                       from (select tt.workshop, tt.groutinglinecode, tt.goodscode, tt.goodsname, tt.materialcode, tt.day_grouting_num, count(tt.groutingmouldcode) gcount, round(avg(tt.scount)) scount, round(avg(tt.unused_num)) unused_num
                                               from (select gl.workshop || '车间' as workshop
                                                           ,gl.groutinglinecode
@@ -202,15 +202,14 @@ public class mouldcodewarning : IHttpHandler, IReadOnlySessionState
                     sap_sku = MATERIALCODEDB;
                 }
 
-                string sqlStr = @"select tttt.workshop, tttt.groutinglinecode, tttt.groutingmouldcode, tttt.goodscode, tttt.goodsname, tttt.materialcode, tttt.day_grouting_num, tttt.scount, tttt.unused_num, to_char(tttt.deaddate,'YYYY-MM-DD') deaddate
-                                        
-                                        from (select ttt.*
-                                                      ,case
+                string sqlStr = @"select tttt.*
+                                          from (select ttt.*
+                                                      ,to_char( case
                                                           when ttt.unused_num > 0 then
                                                            trunc(sysdate) + ceil(ttt.unused_num / ttt.day_grouting_num)
                                                           else
                                                            trunc(sysdate)
-                                                        end deaddate
+                                                        end ,'YYYY-MM-DD') deaddate
                                                   from (select tt.workshop
                                                               ,tt.groutinglinecode
                                                               ,tt.goodscode

+ 0 - 3
wwwroot/mes/pc/packdailyplan/packdailyplan.ashx

@@ -51,7 +51,6 @@ public class packdailyplan : IHttpHandler, IReadOnlySessionState
                                      INNER JOIN tp_mst_user mu
                                         ON mu.userid = dp.createuserid
                                      INNER JOIN (SELECT dpd.planid
-                                     --,SUM(dpd.out_qty) AS out_qty
                                      ,SUM(dpd.make_qty) AS make_qty
                                      ,SUM(dpd.plan_qty) AS plan_qty
                                       FROM tp_pack_dailyplandetail dpd
@@ -114,8 +113,6 @@ public class packdailyplan : IHttpHandler, IReadOnlySessionState
                                           ,dpd.sku_code
                                           ,dpd.plan_qty
                                           ,dpd.MAKE_QTY
-                                          ,dpd.out_qty
-                                          ,to_char(dpd.gs_quality * 100, 'FM990.00') || '%' gs_quality
                                           ,dpd.workshop || '车间' as workshop
                                           ,dpd.remarks
                                            ,case when dpd.plan_qty = 0 then '100%' else to_char(round(dpd.make_qty / dpd.plan_qty, 4) * 100, 'fm9999999990.00') || '%' end AS hasmake

+ 6 - 8
wwwroot/mes/pc/packdailyplan/packdailyplan_index.html

@@ -20,20 +20,20 @@
             <div id="tbSearchDiv" style="display: block; padding: 10px;">
                 <form id="ffMaster">
                     <div>
+                        车间:
+                        <input class="easyui-combobox" id="workshopMaster" name="workshopMaster" 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-textbox" id="planname" name="planname" data-options="required:false,prompt:'',tipPosition:'top'" style="width: 120px; height: 32px;">
                         计划日期:
                         <input class="easyui-datebox" id="datebeginMasterS" name="datebeginMasterS" data-options="required:false,prompt:'',tipPosition:'top'" style="width:165px; height:32px;">
                         -
                         <input class="easyui-datebox" id="datebeginMasterD" name="datebeginMasterD" data-options="required:false,prompt:'',tipPosition:'top'" style="width:165px; height:32px;">
-                        计划名称:
-                        <input class="easyui-textbox" id="planname" name="planname" data-options="required:false,prompt:'',tipPosition:'top'" style="width: 120px; height: 32px;">
                         完成状态:
                         <input class="easyui-combobox" id="complete" name="complete" data-options="required:false,valueField:'value',textField:'text',editable:true,multiple:true,
                                data:[{'text': '已完成', 'value': '1'},{'text': '未完成', 'value': '2'}]"
                                style=" width: 160px; height: 32px;">
-                        车间:
-                        <input class="easyui-combobox" id="workshopMaster" name="workshopMaster" 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;">
                         <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>
                     </div>
@@ -77,8 +77,6 @@
                             <th data-options="field:'GOODSCODE',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:'OUT_QTY',title:'预计出窑数量',align:'center',sortable:false"></th>
-                            <th data-options="field:'GS_QUALITY',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>
                             <th data-options="field:'HASMAKE',title:'完成率',align:'center',sortable:false"></th>

+ 33 - 128
wwwroot/mes/pc/rollingforecast/rollingforecast.ashx

@@ -44,10 +44,6 @@ public class rollingforecast : IHttpHandler, IReadOnlySessionState
                 DateTime dateBegin = Convert.ToDateTime(context.Request["datebeginMasterS"]);
                 //结束时间
                 DateTime dateEnd = Convert.ToDateTime(context.Request["datebeginMasterD"]);
-
-                DateTime begindate = new DateTime(dateBegin.Year, dateBegin.Month, 1);
-                DateTime enddate = new DateTime(dateEnd.Year, dateEnd.Month, 1).AddMonths(1);
-
                 string dataStr = string.Empty;
                 int month = (dateEnd.Year - dateBegin.Year) * 12 + (dateEnd.Month - dateBegin.Month);
                 DateTime beginItem = dateBegin;
@@ -70,31 +66,29 @@ public class rollingforecast : IHttpHandler, IReadOnlySessionState
                 }
                 string sqlStr = @"SELECT *
                                           FROM (SELECT CASE
-                                                           WHEN ttt.workshop IS NOT NULL THEN
-                                                            ttt.workshop || '车间'
+                                                           WHEN tt.workshop IS NOT NULL THEN
+                                                            tt.workshop || '车间'
                                                            ELSE
                                                             NULL
                                                        END AS 车间
-                                                      ,ttt.sap_sku   AS 物料编码
-                                                      ,gg.goodscode AS 产品编码
-                                                      ,gg.goodsname AS 产品名称
-                                                      ,CASE gg.goods_line_type
+                                                      ,tt.sap_sku   AS 物料编码
+                                                      ,tt.goodscode AS 产品编码
+                                                      ,tt.goodsname AS 产品名称
+                                                      ,CASE tt.goods_line_type
                                                            WHEN 1 THEN
                                                             '高压'
                                                            ELSE
                                                             '普通'
                                                        END 工艺类型
-                                                      --,to_char(tt.reckon_date + nvl(gc.cycleday, 15), 'yyyy-mm') reckon_month
-                                                      ,ttt.p_month reckon_month
-                                                      --,tt.day_num AS 预测次数
-                                                      ,round( ttt.day_num * nvl(gq.gz_quality, 1) ,0) AS 预测次数
-                                                      ,to_char(nvl(gq.gz_quality, 1) * 100, 'FM990.00') || '%' gs_quality
-                                                  FROM (select tt.workshop, to_char( tt.p_date,  'yyyy-mm') p_month, tt.goodsid, tt.sap_sku, sum(tt.day_num) day_num
-                                                    from (SELECT t.workshop
+                                                      ,to_char(tt.p_date, 'yyyy-mm') reckon_month
+                                                      ,tt.day_num AS 预测次数
+                                                  FROM (SELECT t.workshop
                                                               ,t.reckon_date + nvl(gc.cycleday, 15) p_date
                                                               ,t.sap_sku
                                                               ,t.day_num
-                                                              ,t.goodsid
+                                                              ,g.goodscode
+                                                              ,g.goodsname
+                                                              ,g.goods_line_type
                                                           FROM t_gline_reckon_final t
                                                           LEFT JOIN tp_mst_goods g
                                                             ON g.goodsid = t.goodsid
@@ -102,11 +96,8 @@ public class rollingforecast : IHttpHandler, IReadOnlySessionState
                                                             ON gc.goodstypeid = g.goodstypeid
                                                            AND gc.workshop = t.workshop
                                                            AND gc.crafttype = nvl(g.goods_line_type, 0)
-                                                         WHERE t.reckon_date >= @datebegin@ - 60
-                                                           AND t.reckon_date < @dateend@
-                                                           --AND t.reckon_date + nvl(gc.cycleday, 15) >= @datebegin@
-                                                           --AND t.reckon_date + nvl(gc.cycleday, 15) < @dateend@
-                                                        ";
+                                                         WHERE t.reckon_date >= @datebegin@ - 40
+                                                           AND t.reckon_date < @dateend@";
                 // --and (@sku@ is null or @sku@ = '' or @sku@ = t.sap_sku)
                 //--条件
                 if (!string.IsNullOrEmpty(workshop))
@@ -125,16 +116,9 @@ public class rollingforecast : IHttpHandler, IReadOnlySessionState
                 {
                     sqlStr += " and g.goods_line_type in (" + goods_line_type + ")";
                 }
-                sqlStr += @" ) tt
+                sqlStr += @"                         ) tt
                                                  WHERE tt.p_date >= @datebegin@
-                                                   AND tt.p_date < @dateend@
-                               group by tt.workshop, to_char( tt.p_date,  'yyyy-mm'), tt.goodsid, tt.sap_sku) ttt
-                         left join tp_mst_goods_quality gq
-                            on gq.workshop = ttt.workshop
-                           and gq.goodsid = ttt.goodsid 
-                                                          LEFT JOIN tp_mst_goods gg
-                                                            ON gg.goodsid = ttt.goodsid
-                                 ) p
+                                                   AND tt.p_date < @dateend@) p
                                         pivot(SUM(p.预测次数)
                                            FOR reckon_month IN({dataStr}))
                                          ORDER BY 车间
@@ -143,8 +127,8 @@ public class rollingforecast : IHttpHandler, IReadOnlySessionState
                                                  ,工艺类型".Replace("{dataStr}", dataStr);
                 List<CDAParameter> sqlPara = new List<CDAParameter>();
                 sqlPara.Add(new CDAParameter("accountid", 1));
-                sqlPara.Add(new CDAParameter("datebegin", begindate, DataType.DateTime));
-                sqlPara.Add(new CDAParameter("dateend", enddate, DataType.DateTime));
+                sqlPara.Add(new CDAParameter("datebegin", dateBegin, DataType.DateTime));
+                sqlPara.Add(new CDAParameter("dateend", dateEnd.AddDays(1), DataType.DateTime));
                 try
                 {
                     JsonResult data = Easyui.ExecuteJsonResult(conn, sqlStr, sqlPara);
@@ -196,27 +180,18 @@ public class rollingforecast : IHttpHandler, IReadOnlySessionState
                 //结束时间
                 DateTime dateEnd = Convert.ToDateTime(context.Request["datebeginMasterD"]);
 
-                DateTime begindate = new DateTime(dateBegin.Year, dateBegin.Month, 1);
-                DateTime enddate = new DateTime(dateEnd.Year, dateEnd.Month, 1).AddMonths(1);
-
                 List<CDAParameter> sqlPara = new List<CDAParameter>();
-                string sqlStr = @" SELECT decode(q.gid, 0, q.预测日期, '合计') 预测日期
+                string sqlStr = @" SELECT decode(q.gid, 15, '合计', 0, q.预测日期, '--') 预测日期
                                                   ,q.车间
                                                   ,q.物料编码
                                                   ,q.产品编码
                                                   ,q.产品名称
                                                   ,q.工艺类型
                                                   ,q.计划产出
-                                                  ,q.分类
-                                                  ,q.reckontype
-                                                  ,q.reckon_date
-                                                  ,q.goodsid
-                                                  ,q.workshop
-                                                  ,q.from_code
                                                   
                                  FROM (
                                     SELECT 
-                                      grouping_id(tt.workshop, tt.p_date,tt.sap_sku,tt.goods_line_type, tt.reckontype,tt.from_code) gid
+                                      grouping_id(tt.workshop, tt.p_date,tt.sap_sku,tt.goods_line_type) gid
                                         ,CASE
                                        WHEN tt.workshop IS NOT NULL THEN
                                         tt.workshop || '车间'
@@ -230,20 +205,10 @@ public class rollingforecast : IHttpHandler, IReadOnlySessionState
                                   ,tt.goods_line_type  as 工艺类型
                                   ,to_char(tt.p_date, 'yyyy-mm') reckon_month
                                   ,sum(tt.day_num) AS 计划产出
-                                  ,case tt.reckontype when 0 then '实际注浆' when 1 then '模具产出' when 2 then '布模计划' else '' end 分类
-                                  ,tt.workshop
-                                  ,tt.goodsid
-                                  ,tt.reckontype
-                                  ,tt.reckon_date
-                                  ,tt.from_code
                               FROM (SELECT t.workshop
                                           ,t.reckon_date + nvl(gc.cycleday, 15) p_date
-                                          ,t.reckon_date  -- 成型日期、布模计划日期
-                                          ,t.reckontype
-                                          ,mm.mold_code as from_code
                                           ,t.sap_sku
                                           ,t.day_num
-                                          ,g.goodsid
                                           ,g.goodscode
                                           ,g.goodsname
                                           ,CASE g.goods_line_type
@@ -259,7 +224,6 @@ public class rollingforecast : IHttpHandler, IReadOnlySessionState
                                         ON gc.goodstypeid = g.goodstypeid
                                        AND gc.workshop = t.workshop
                                        AND gc.crafttype = nvl(g.goods_line_type, 0)
-                                      left join t_gline_plan_mold mm on mm.moldid = t.gdd_id
                                      WHERE 1=1 ";
                 if (!string.IsNullOrEmpty(workshop))
                 {
@@ -289,14 +253,14 @@ public class rollingforecast : IHttpHandler, IReadOnlySessionState
                     DateTime monthS = Convert.ToDateTime(month + "-1");
 
                     DateTime monthD = monthS.AddMonths(1);
-                    //if(dateBegin>monthS)
-                    //{
-                    //    monthS = dateBegin;
-                    //}
-                    //if(dateEnd<monthD)
-                    //{
-                    //    monthD = dateEnd.AddDays(1);
-                    //}
+                    if(dateBegin>monthS)
+                    {
+                        monthS = dateBegin;
+                    }
+                    if(dateEnd<monthD)
+                    {
+                        monthD = dateEnd.AddDays(1);
+                    }
                     sqlStr += " WHERE tt.p_date >=@monthS@  and tt.p_date<@monthD@";
                     sqlPara.Add(new CDAParameter("monthS", monthS, DataType.DateTime));
                     sqlPara.Add(new CDAParameter("monthD", monthD, DataType.DateTime));
@@ -305,12 +269,12 @@ public class rollingforecast : IHttpHandler, IReadOnlySessionState
                 {
                     sqlStr += @" WHERE tt.p_date >= @datebegin@
                                                    AND tt.p_date < @dateend@";
-                    sqlPara.Add(new CDAParameter("datebegin", begindate, DataType.DateTime));
-                    sqlPara.Add(new CDAParameter("dateend", enddate, DataType.DateTime));
+                    sqlPara.Add(new CDAParameter("datebegin", dateBegin, DataType.DateTime));
+                    sqlPara.Add(new CDAParameter("dateend", dateEnd.AddDays(1), DataType.DateTime));
                 }
                 //  WHERE tt.p_date >= @datebegin@
-                sqlStr += @" GROUP BY GROUPING SETS((tt.workshop, tt.p_date,tt.sap_sku, tt.goodsid, tt.goodscode, tt.goodsname,tt.goods_line_type, tt.reckon_date, tt.reckontype,tt.from_code),())
-                            ORDER BY tt.p_date,tt.workshop  ,tt.sap_sku ,tt.goodsname  ,tt.goods_line_type,tt.reckontype)q";
+                sqlStr += @" GROUP BY GROUPING SETS((tt.workshop, tt.p_date,tt.sap_sku, tt.goodscode, tt.goodsname,tt.goods_line_type),())
+                            ORDER BY tt.p_date,tt.workshop  ,tt.sap_sku ,tt.goodsname  ,tt.goods_line_type)q";
                 sqlPara.Add(new CDAParameter("accountid", 1));
 
                 try
@@ -330,7 +294,7 @@ public class rollingforecast : IHttpHandler, IReadOnlySessionState
                 List<CDAParameter> sqlPara = new List<CDAParameter>();
                 sqlPara.Add(new CDAParameter("in_AccountID", int.Parse(context.Session["accountId"].ToString())));
                 //sqlPara.Add(new CDAParameter("in_AccountID", 1));
-                sqlPara.Add(new CDAParameter("in_date", DateTime.Now, DataType.DateTime));
+                sqlPara.Add(new CDAParameter("in_date", DateTime.Now,DataType.DateTime));
 
                 DataSet ds = new DataSet();
                 //直接获取不分页数据
@@ -345,65 +309,6 @@ public class rollingforecast : IHttpHandler, IReadOnlySessionState
                     throw;
                 }
             }
-            //产品条码
-            if (context.Request["m"].ToString() == "3")
-            {
-                string RECKON_DATE = context.Request["RECKON_DATE"];
-                string GOODSID = context.Request["GOODSID"];
-                string WORKSHOP = context.Request["WORKSHOP"];
-                string sqlStr = @"SELECT to_char(gdd.groutingdate, 'yyyy-mm-dd') groutingdate
-                                      ,gdd.groutinglinecode
-                                      ,gdd.groutingmouldcode
-                                      ,gdd.barcode
-
-                                      ,g.goodscode
-                                      ,g.goodsname
-                                      ,g.MATERIALCODE sku
-                                      ,nvl(gc.cycleday, 15) cycleday
-                                      ,1 num
-                                      ,'PCS' danwei
-
-                                  FROM tp_pm_groutingdailydetail gdd
-                                 INNER JOIN tp_pc_groutingline gl
-                                    ON gl.groutinglineid = gdd.groutinglineid
-                                                          LEFT JOIN tp_mst_goods g
-                                                            ON g.goodsid = gdd.goodsid
-                                                          LEFT JOIN tp_goods_prod_cycle gc
-                                                            ON gc.goodstypeid = g.goodstypeid
-                                                           AND gc.workshop = gl.workshop
-                                                           AND gc.crafttype = nvl(g.goods_line_type, 0)
-                                 WHERE gdd.valueflag = '1'
-                                   AND gdd.groutingdate = @RECKON_DATE@
-                                   AND gdd.goodsid = @GOODSID@
-                                   AND gl.workshop = @WORKSHOP@
-                                   AND gdd.groutingflag = '1'
-                                 ORDER BY gdd.groutinglinecode
-                                         ,gdd.groutingmouldcode";
-                List<CDAParameter> sqlPara = new List<CDAParameter>();
-                sqlPara.Add(new CDAParameter("in_AccountID", int.Parse(context.Session["accountId"].ToString())));
-                sqlPara.Add(new CDAParameter("RECKON_DATE", RECKON_DATE, DataType.DateTime));
-                sqlPara.Add(new CDAParameter("GOODSID", GOODSID));
-                sqlPara.Add(new CDAParameter("WORKSHOP", WORKSHOP));
-                try
-                {
-                    //JsonResult data = Easyui.ExecuteJsonResult(conn, sqlStr, sqlPara);
-                    //context.Response.Write(data.ToJson());
-                    // 合计                    
-                    DataTable data = conn.ExecuteDatatable(sqlStr, sqlPara.ToArray());
-                    DataRow dr = data.NewRow();
-                    dr["groutingdate"] = "合计";
-                    dr["num"] = data.Rows.Count;
-                    data.Rows.Add(dr);
-                    context.Response.Write(new JsonResult(data).ToJson());
-
-                }
-                catch (Exception ex)
-                {
-
-                    throw;
-                }
-            }
-
         }
     }
 

+ 17 - 128
wwwroot/mes/pc/rollingforecast/rollingforecast_index.html

@@ -59,7 +59,7 @@
             <div title="滚动预测">
                 <table class="easyui-datagrid"
                        id="DataGrid1"
-                       data-options="method:'get',border:false,singleSelect:true,fit:true,fitColumns:true,onDblClickRow: dgDblclickrow">
+                       data-options="method:'get',border:false,singleSelect:true,fit:true,fitColumns:true">
                     <thead>
                         <tr>
                             <th data-options="field:'车间',title:'车间',align:'center',sortable:false"></th>
@@ -68,42 +68,7 @@
                             <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:'FROM_CODE',title:'分类单号',align:'center',sortable:false"></th>
-
-                            <th data-options="field:'RECKONTYPE',title:'reckontype',align:'center',sortable:false,hidden:true"></th>
-                            <th data-options="field:'RECKON_DATE',title:'reckon_date',align:'center',sortable:false,hidden:true"></th>
-                            <th data-options="field:'GOODSID',title:'goodsid',align:'center',sortable:false,hidden:true"></th>
-                            <th data-options="field:'WORKSHOP',title:'workshop',align:'center',sortable:false,hidden:true"></th>
-                            <!--
-                                                <th data-options="field:'RECKONTYPE',title:'reckontype',align:'center',sortable:false,hidden:true"></th>
-                    <th data-options="field:'RECKON_DATE',title:'reckon_date',align:'center',sortable:false,hidden:true"></th>
-                    <th data-options="field:'GOODSID',title:'goodsid',align:'center',sortable:false,hidden:true"></th>
-                    <th data-options="field:'WORKSHOP',title:'workshop',align:'center',sortable:false,hidden:true"></th>
-                    <th data-options="field:'FROM_ID',title:'from_id',align:'center',sortable:false,hidden:true"></th>
-                                                -->
-                        </tr>
-                    </thead>
-                </table>
-            </div>
-            <div title="产品条码">
-                <table class="easyui-datagrid"
-                       id="DataGrid2"
-                       data-options="method:'get',border:false,singleSelect:true,fit:true,fitColumns:true">
-                    <thead>
-                        <tr>
-                            <th data-options="field:'GROUTINGDATE',title:'注浆日期',align:'center',sortable:false"></th>
-                            <th data-options="field:'CYCLEDAY',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:'BARCODE',title:'产品条码',align:'center',sortable:false"></th>
-
-                            <th data-options="field:'GOODSCODE',title:'产品编码',align:'center',sortable:false"></th>
-                            <th data-options="field:'GOODSNAME',title:'产品名称',align:'center',sortable:false"></th>
-                            <th data-options="field:'SKU',title:'物料编码',align:'center',sortable:false"></th>
-                            <th data-options="field:'NUM',title:'数量',align:'center',sortable:false"></th>
-                            <th data-options="field:'DANWEI',title:'单位',align:'center',sortable:false"></th>
+                            <th data-options="field:'计划产出',title:'计划产出',align:'center',sortable:false"></th>
                         </tr>
                     </thead>
                 </table>
@@ -113,63 +78,14 @@
     <script type="text/javascript">
 
         $(document).ready(function () {
-           
-            setDateToMonth("datebeginMasterS");
-            setDateToMonth("datebeginMasterD");
             var ctime = new Date();
-            var beginDate = ctime.getFullYear() + "-" + (ctime.getMonth() + 1);
-                //+ "-" + ctime.getDate();
-            var endDate = ctime.getFullYear() + "-" + (ctime.getMonth() + 4);
-                //+"-" + (ctime.getDate());
+            var beginDate = ctime.getFullYear() + "-" + (ctime.getMonth() + 1) + "-" + ctime.getDate();
+            var endDate = ctime.getFullYear() + "-" + (ctime.getMonth() + 4) + "-" + (ctime.getDate());
             $("#datebeginMasterS").datebox("setValue", beginDate);
             $("#datebeginMasterD").datebox("setValue", endDate);
             tbSearchSubmit();
-        });
-        function setDateToMonth(id) {
-
-            $("#"+id).datebox({
-                onShowPanel: function () {//显示日趋选择对象后再触发弹出月份层的事件,初始化时没有生成月份层
-                    span.trigger('click'); //触发click事件弹出月份层
-                    //fix 1.3.x不选择日期点击其他地方隐藏在弹出日期框显示日期面板
-                    if (p.find('div.calendar-menu').is(':hidden')) p.find('div.calendar-menu').show();
-                    if (!tds) setTimeout(function () {//延时触发获取月份对象,因为上面的事件触发和对象生成有时间间隔
-                        tds = p.find('div.calendar-menu-month-inner td');
-                        tds.click(function (e) {
-                            e.stopPropagation(); //禁止冒泡执行easyui给月份绑定的事件
-                            var year = /\d{4}/.exec(span.html())[0];//得到年份
-                            var month = parseInt($(this).attr('abbr'), 10); //月份,这里不需要+1
-                            month = month < 10 ? '0' + month : month;
-                            $("#"+id).datebox('hidePanel')//隐藏日期对象
-                                .datebox('setValue', year + '-' + month); //设置日期的值
-                        });
-                    }, 0);
-                    yearIpt.unbind();//解绑年份输入框中任何事件
-                },
-                parser: function (s) {
-                    if (!s) return new Date();
-                    var arr = s.split('-');
-                    return new Date(parseInt(arr[0], 10), parseInt(arr[1], 10) - 1, 1);
-                },
-                formatter: function (d) {
-                    return d.getFullYear() + '-' + (d.getMonth() + 1);/*getMonth返回的是0开始的,忘记了。。已修正*/
-                }
-            });
-            var p = $("#"+id).datebox('panel'), //日期选择对象
-                tds = false, //日期选择对象中月份
-                aToday = p.find('a.datebox-current'),
-                yearIpt = p.find('input.calendar-menu-year'),//年份输入框
-                //显示月份层的触发控件
-                span = aToday.length ? p.find('div.calendar-title span') ://1.3.x版本
-                    p.find('span.calendar-text'); //1.4.x版本
-            if (aToday.length) {//1.3.x版本,取消Today按钮的click事件,重新绑定新事件设置日期框为今天,防止弹出日期选择面板
-                aToday.unbind('click').click(function () {
-                    var now = new Date();
-                    now = now < 10 ? '0' + now : now;
-                    $("#"+id).datebox('hidePanel').datebox('setValue', now.getFullYear() + '-' + (now.toString() + 1));
-                });
-            }
-        };
 
+        });
 
         //明细表1双击单元格事件
         function dgDblclickcelldetail1(index, field, value, row) {
@@ -194,33 +110,7 @@
                 });
             }
         }
-        //主表双击事件
-        function dgDblclickrow(index, row) {
-            if (row["RECKONTYPE"] == "0") {
-                $("#tableTabs").tabs("select", 2);
-                LoadDataGridDetailDB(index, row);
-            }
-           
-        }
-
-        //加载产品条码
-        function LoadDataGridDetailDB(index, row) {
-            var RECKONTYPE = row["RECKONTYPE"];
-            var RECKON_DATE = row["RECKON_DATE"];
-            var GOODSID = row["GOODSID"];
-            var WORKSHOP = row["WORKSHOP"];
-            $('#DataGrid2').datagridLoad({
-                idField: 'SID',
-                queryParams: $('#ffMaster').serializeJson(),
-                url: 'rollingforecast.ashx?m=3&RECKONTYPE=' + RECKONTYPE + '&RECKON_DATE=' + RECKON_DATE + '&GOODSID=' + GOODSID + '&WORKSHOP=' + WORKSHOP,
-                fixWidth: 180,
-                mergeWidth: 180,
-                pageSize: 10,
-                splitChar: '_',
-                pagination: false
-            });
 
-        }
         //获取时间区间月份
         function getMonthBetween(start, end) {
             //初始化数组
@@ -286,7 +176,6 @@
                     { field: '产品编码', title: '产品编码', resizable: true, align: 'center' },
                     { field: '产品名称', title: '产品名称', resizable: true, align: 'center' },
                     { field: '工艺类型', title: '工艺类型', resizable: true, align: 'center' },
-                    { field: 'GS_QUALITY', title: '产品合格率', resizable: true, align: 'center' },
                 ]];
                 if ($('#ffMaster').form("validate")) {
                     var t1 = $('#datebeginMasterS').datebox("getValue");
@@ -323,18 +212,18 @@
             }
             if (index == 1) {
 
-                //if ($('#ffMaster').form("validate")) {
-                //    $('#DataGrid1').datagridLoad({
-                //        idField: 'SID',
-                //        queryParams: $('#ffMaster').serializeJson(),
-                //        url: 'rollingforecast.ashx?m=1',
-                //        pageSize: 10,
-                //        fixWidth: 210,
-                //        mergeWidth: 210,
-                //        splitChar: '_',
-                //        pagination: false
-                //    });
-                //}
+                if ($('#ffMaster').form("validate")) {
+                    $('#DataGrid1').datagridLoad({
+                        idField: 'SID',
+                        queryParams: $('#ffMaster').serializeJson(),
+                        url: 'rollingforecast.ashx?m=1',
+                        pageSize: 10,
+                        fixWidth: 210,
+                        mergeWidth: 210,
+                        splitChar: '_',
+                        pagination: false
+                    });
+                }
 
             }