From abe0a716aba51906d52e36f17ff02a340dc49937 Mon Sep 17 00:00:00 2001
From: zzr99 <1940172413@qq.com>
Date: 星期二, 19 四月 2022 10:32:16 +0800
Subject: [PATCH] 标准工时+标准工时导入

---
 PlanM/ClassDiagram1.cd                              |    2 
 PlanM/数据导入/Gy_StdWorkTimes_RoutingBill.cs           |  322 +++++++++++++++++
 BaseSet/公用资料/其他基础资料/Gy_StdWorkTimesList.cs          |   37 -
 BaseSet/公用资料/其他基础资料/Gy_StdWorkTimesList.Designer.cs |   90 ++--
 PlanM/数据导入/Gy_StdWorkTimes_RoutingBill.resx         |    5 
 LMES/ClsShowMod.cs                                  |   14 
 BaseSet/公用资料/其他基础资料/Gy_StdWorkTimesList.resx        |   86 ++--
 BaseSet/公用资料/其他基础资料/Gy_StdWorkTimes.cs              |  145 +++----
 Model/基础资料/其他基础资料/ClsGy_StdWorkTimes_Model.cs       |    4 
 PlanM/数据导入/Gy_StdWorkTimes_RoutingBill.Designer.cs  |  179 +++++++++
 WebAPI/Controllers/Kf_EntrustInBillController.cs    |  139 +++++++
 DAL/基础资料/其他基础资料/ClsGy_StdWorkTimes_Ctl.cs           |    1 
 PlanM/数据导入/Gy_DataIn_RoutingBill.resx               |    3 
 BaseSet/公用资料/其他基础资料/Gy_StdWorkTimes.Designer.cs     |   30 +
 PlanM/PlanM.csproj                                  |   22 
 15 files changed, 873 insertions(+), 206 deletions(-)

diff --git "a/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimes.Designer.cs" "b/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimes.Designer.cs"
index 7fcc134..2300b7d 100644
--- "a/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimes.Designer.cs"
+++ "b/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimes.Designer.cs"
@@ -87,12 +87,14 @@
             this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
             this.bclk = new System.Windows.Forms.ToolStripButton();
             this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
+            this.grdMain1 = new System.Windows.Forms.DataGridView();
             this.P1.SuspendLayout();
             this.gbUp.SuspendLayout();
             this.panel2.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.grdMain)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.grdSum)).BeginInit();
             this.Tool.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.grdMain1)).BeginInit();
             this.SuspendLayout();
             // 
             // P1
@@ -383,6 +385,7 @@
             // timer1
             // 
             this.timer1.Enabled = true;
+            this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
             // 
             // panel2
             // 
@@ -744,11 +747,36 @@
             this.toolStripSeparator7.Name = "toolStripSeparator7";
             this.toolStripSeparator7.Size = new System.Drawing.Size(6, 62);
             // 
+            // grdMain1
+            // 
+            this.grdMain1.AllowUserToAddRows = false;
+            this.grdMain1.AllowUserToDeleteRows = false;
+            this.grdMain1.BackgroundColor = System.Drawing.Color.WhiteSmoke;
+            this.grdMain1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.grdMain1.ClipboardCopyMode = System.Windows.Forms.DataGridViewClipboardCopyMode.Disable;
+            this.grdMain1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.grdMain1.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.grdMain1.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+            this.grdMain1.Location = new System.Drawing.Point(52, 291);
+            this.grdMain1.Margin = new System.Windows.Forms.Padding(4);
+            this.grdMain1.Name = "grdMain1";
+            this.grdMain1.ReadOnly = true;
+            this.grdMain1.RowHeadersWidth = 30;
+            this.grdMain1.RowTemplate.Height = 23;
+            this.grdMain1.Size = new System.Drawing.Size(1109, 497);
+            this.grdMain1.TabIndex = 59;
+            this.grdMain1.RowHeadersWidthChanged += new System.EventHandler(this.grdMain_RowHeadersWidthChanged);
+            this.grdMain1.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.grdMain_CellEndEdit);
+            this.grdMain1.CellLeave += new System.Windows.Forms.DataGridViewCellEventHandler(this.grdMain_CellLeave);
+            this.grdMain1.EditingControlShowing += new System.Windows.Forms.DataGridViewEditingControlShowingEventHandler(this.grdMain_EditingControlShowing);
+            this.grdMain1.Scroll += new System.Windows.Forms.ScrollEventHandler(this.grdMain_Scroll);
+            // 
             // Gy_StdWorkTimes
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1216, 928);
+            this.Controls.Add(this.grdMain1);
             this.Controls.Add(this.P1);
             this.Controls.Add(this.panel3);
             this.Controls.Add(this.panel2);
@@ -773,6 +801,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.grdSum)).EndInit();
             this.Tool.ResumeLayout(false);
             this.Tool.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.grdMain1)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -835,5 +864,6 @@
         private System.Windows.Forms.Label label12;
         private System.Windows.Forms.Label label10;
         private System.Windows.Forms.Label label9;
+        private System.Windows.Forms.DataGridView grdMain1;
     }
 }
\ No newline at end of file
diff --git "a/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimes.cs" "b/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimes.cs"
index fd7b77f..e3a5aae 100644
--- "a/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimes.cs"
+++ "b/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimes.cs"
@@ -58,12 +58,12 @@
         private void bclk_Click(object sender, EventArgs e)
         {
             //淇濆瓨鍒楀
-            DBUtility.Xt_BaseBillFun.SaveGrid(grdMain, this.Name);
+            DBUtility.Xt_BaseBillFun.SaveGrid(grdMain1, this.Name);
         }
 
         private void mrlk_Click(object sender, EventArgs e)
         {
-            DBUtility.Xt_BaseBillFun.DefaultGridView(grdMain, this.Name);
+            DBUtility.Xt_BaseBillFun.DefaultGridView(grdMain1, this.Name);
         }
        
         //娓呯┖鐣岄潰
@@ -184,7 +184,7 @@
         {
             //鎵撳嵃鍒濆鍖�    
             oSumGrid.NoCol = HSnoCol;
-            oSumGrid.ogrdMain = grdMain;
+            oSumGrid.ogrdMain = grdMain1;
             oSumGrid.oGridsum = grdSum;
             lblCaption.Text = ModName;
             this.Text = ModName;
@@ -406,39 +406,39 @@
             foreach (Model.ClsGy_StdWorkTimes_Model oSub in BillNew.DetailColl)
             {
                 //
-                if (i >= grdMain.RowCount - 1)
-                    grdMain.Rows.Add();
-                grdMain.Rows[i].Cells[HTagCol].Value = "*";
-                grdMain.Rows[i].Cells[HMaterIDCol].Value = oSub.HMaterID.ToString();
+                if (i >= grdMain1.RowCount - 1)
+                    grdMain1.Rows.Add();
+                grdMain1.Rows[i].Cells[HTagCol].Value = "*";
+                grdMain1.Rows[i].Cells[HMaterIDCol].Value = oSub.HMaterID.ToString();
                 if (oMater.GetInfoByID(oSub.HMaterID))
                 {
-                    grdMain.Rows[i].Cells[HMaterNumberCol].Value = oMater.omodel.HNumber;
-                    grdMain.Rows[i].Cells[HMaterNameCol].Value = oMater.omodel.HName;
-                    grdMain.Rows[i].Cells[HMaterModelCol].Value = oMater.omodel.HModel;
+                    grdMain1.Rows[i].Cells[HMaterNumberCol].Value = oMater.omodel.HNumber;
+                    grdMain1.Rows[i].Cells[HMaterNameCol].Value = oMater.omodel.HName;
+                    grdMain1.Rows[i].Cells[HMaterModelCol].Value = oMater.omodel.HModel;
                 }
                 else
                 {
-                    grdMain.Rows[i].Cells[HMaterNumberCol].Value = "";
-                    grdMain.Rows[i].Cells[HMaterNameCol].Value = "";
-                    grdMain.Rows[i].Cells[HMaterModelCol].Value = "";
+                    grdMain1.Rows[i].Cells[HMaterNumberCol].Value = "";
+                    grdMain1.Rows[i].Cells[HMaterNameCol].Value = "";
+                    grdMain1.Rows[i].Cells[HMaterModelCol].Value = "";
                 }
-                grdMain.Rows[i].Cells[HProcIDCol].Value = oSub.HProcID.ToString();
+                grdMain1.Rows[i].Cells[HProcIDCol].Value = oSub.HProcID.ToString();
                 if (oProc.GetInfoByID(oSub.HProcID))
                 {
-                    grdMain.Rows[i].Cells[HProcNumberCol].Value = oProc.omodel.HNumber;
-                    grdMain.Rows[i].Cells[HProcNameCol].Value = oProc.omodel.HName;
+                    grdMain1.Rows[i].Cells[HProcNumberCol].Value = oProc.omodel.HNumber;
+                    grdMain1.Rows[i].Cells[HProcNameCol].Value = oProc.omodel.HName;
                 }
                 else
                 {
-                    grdMain.Rows[i].Cells[HProcNumberCol].Value = "";
-                    grdMain.Rows[i].Cells[HProcNameCol].Value = "";
+                    grdMain1.Rows[i].Cells[HProcNumberCol].Value = "";
+                    grdMain1.Rows[i].Cells[HProcNameCol].Value = "";
                 }
                 
-                grdMain.Rows[i].Cells[HStdWorkTimes].Value = oSub.HStdWorkTimes.ToString();
-                grdMain.Rows[i].Cells[HUpperlimit].Value = oSub.HUpperlimit.ToString();
-                grdMain.Rows[i].Cells[HLowerlimit].Value = oSub.HLowerlimit.ToString();
-                grdMain.Rows[i].Cells[HUSEORGID].Value = oSub.HUSEORGID.ToString();
-                grdMain.Rows[i].Cells[HRemarkCol].Value = oSub.HRemark;
+                grdMain1.Rows[i].Cells[HStdWorkTimes].Value = oSub.HStdWorkTimes.ToString();
+                grdMain1.Rows[i].Cells[HUpperlimit].Value = oSub.HUpperlimit.ToString();
+                grdMain1.Rows[i].Cells[HLowerlimit].Value = oSub.HLowerlimit.ToString();
+                grdMain1.Rows[i].Cells[HUSEORGID].Value = oSub.HUSEORGID.ToString();
+                grdMain1.Rows[i].Cells[HRemarkCol].Value = oSub.HRemark;
                 i = i + 1;
             }
             //GRID鍏佽鍒锋柊
@@ -463,20 +463,15 @@
 
             //鏄庣粏琛ㄦ槸鍚︿负闆惰
             bool b = false;
-            for (int i = 0; i < grdMain.RowCount; i++)
-            {
-                if (!IsNullRow(i))
-                {
-                    b = true;
-                    break;
-                }
-            }
-            if (b == false)
+            if (!IsNullRow(0))
             {
                 MessageBox.Show("琛ㄤ綋鏄庣粏琛屼笉瀛樺湪锛佽褰曞叆锛�", "鎻愮ず");
                 return false;
             }
-            return true;
+            else
+            {
+                return true;
+            }
         }
         //淇濆瓨鍗曟嵁
         private bool Sub_SaveBill()
@@ -498,21 +493,21 @@
             //
             //鏄庣粏绫昏祴鍊�
             BillNew.DetailColl = new List<Model.ClsGy_StdWorkTimes_Model>();
-            for (i = 0; i <= grdMain.RowCount - 1; i++)
+            for (i = 0; i <= grdMain1.RowCount - 1; i++)
             {
-                if (DBUtility.ClsPub.isLong(grdMain.Rows[i].Cells[HMaterIDCol].Value) != 0 && DBUtility.ClsPub.isLong(grdMain.Rows[i].Cells[HProcIDCol].Value) != 0)
+                if (DBUtility.ClsPub.isLong(grdMain1.Rows[i].Cells[HMaterIDCol].Value) != 0 && DBUtility.ClsPub.isLong(grdMain1.Rows[i].Cells[HProcIDCol].Value) != 0)
                 {
                     Model.ClsGy_StdWorkTimes_Model oSub = new Model.ClsGy_StdWorkTimes_Model();
-                    oSub.HMaterID = ClsPub.isLong(grdMain.Rows[i].Cells[HMaterIDCol].Value);
-                    oSub.HProcID = ClsPub.isLong(grdMain.Rows[i].Cells[HProcIDCol].Value);
-                    oSub.HStdWorkTimes = ClsPub.isDoule(grdMain.Rows[i].Cells[HStdWorkTimes].Value);
-                    oSub.HUpperlimit = ClsPub.isDoule(grdMain.Rows[i].Cells[HUpperlimit].Value);
-                    oSub.HLowerlimit = ClsPub.isDoule(grdMain.Rows[i].Cells[HLowerlimit].Value);
+                    oSub.HMaterID = ClsPub.isLong(grdMain1.Rows[i].Cells[HMaterIDCol].Value);
+                    oSub.HProcID = ClsPub.isLong(grdMain1.Rows[i].Cells[HProcIDCol].Value);
+                    oSub.HStdWorkTimes = ClsPub.isDoule(grdMain1.Rows[i].Cells[HStdWorkTimes].Value);
+                    oSub.HUpperlimit = ClsPub.isDoule(grdMain1.Rows[i].Cells[HUpperlimit].Value);
+                    oSub.HLowerlimit = ClsPub.isDoule(grdMain1.Rows[i].Cells[HLowerlimit].Value);
                     oSub.HUSEORGID = ClsPub.HOrgID;
-                    oSub.HStopflag = true;
+                    oSub.HStopflag = false;
                     oSub.HMaker = ClsPub.CurUserName;
                     oSub.HMakeDate = DateTime.Today.ToString();
-                    oSub.HRemark = ClsPub.isStrNull(grdMain.Rows[i].Cells[HRemarkCol].Value);
+                    oSub.HRemark = ClsPub.isStrNull(grdMain1.Rows[i].Cells[HRemarkCol].Value);
                     BillNew.DetailColl.Add(oSub);
                 }
             }
@@ -568,28 +563,28 @@
         //鍒濆鍖朑RID
         private void initGrid()
         {
-            grdMain.ColumnCount = 22;                       //鎬诲垪鏁�
-            DBUtility.Xt_BaseBillFun.initGridFst(grdMain, this.Name);
+            grdMain1.ColumnCount = 22;                       //鎬诲垪鏁�
+            DBUtility.Xt_BaseBillFun.initGridFst(grdMain1, this.Name);
             //
-            grdMain.Columns[HMaterIDCol].HeaderText = "鐗╂枡ID";
-            grdMain.Columns[HMaterNumberCol].HeaderText = "鐗╂枡浠g爜";
-            grdMain.Columns[HMaterNameCol].HeaderText = "鐗╂枡鍚嶇О";
-            grdMain.Columns[HMaterModelCol].HeaderText = "瑙勬牸鍨嬪彿";
-            grdMain.Columns[HProcIDCol].HeaderText = "宸ュ簭ID";
-            grdMain.Columns[HProcNumberCol].HeaderText = "宸ュ簭浠g爜";
-            grdMain.Columns[HProcNameCol].HeaderText = "宸ュ簭鍚嶇О";
+            grdMain1.Columns[HMaterIDCol].HeaderText = "鐗╂枡ID";
+            grdMain1.Columns[HMaterNumberCol].HeaderText = "鐗╂枡浠g爜";
+            grdMain1.Columns[HMaterNameCol].HeaderText = "鐗╂枡鍚嶇О";
+            grdMain1.Columns[HMaterModelCol].HeaderText = "瑙勬牸鍨嬪彿";
+            grdMain1.Columns[HProcIDCol].HeaderText = "宸ュ簭ID";
+            grdMain1.Columns[HProcNumberCol].HeaderText = "宸ュ簭浠g爜";
+            grdMain1.Columns[HProcNameCol].HeaderText = "宸ュ簭鍚嶇О";
 
-            grdMain.Columns[HStdWorkTimes].HeaderText = "鏍囧噯宸ユ椂";
-            grdMain.Columns[HUpperlimit].HeaderText = "涓婇檺姣斾緥";
-            grdMain.Columns[HLowerlimit].HeaderText = "涓嬮檺姣斾緥";
-            grdMain.Columns[HUSEORGID].HeaderText = "缁勭粐ID";
-            grdMain.Columns[HRemarkCol].HeaderText = "澶囨敞";
+            grdMain1.Columns[HStdWorkTimes].HeaderText = "鏍囧噯宸ユ椂";
+            grdMain1.Columns[HUpperlimit].HeaderText = "涓婇檺姣斾緥";
+            grdMain1.Columns[HLowerlimit].HeaderText = "涓嬮檺姣斾緥";
+            grdMain1.Columns[HUSEORGID].HeaderText = "缁勭粐ID";
+            grdMain1.Columns[HRemarkCol].HeaderText = "澶囨敞";
             //
             //闅愯棌鍒�
-            grdMain.Columns[HTagCol].Visible = false;
-            grdMain.Columns[HProcIDCol].Visible = false;
-            grdMain.Columns[HMaterIDCol].Visible = false;
-            grdMain.Columns[HUSEORGID].Visible = false;
+            grdMain1.Columns[HTagCol].Visible = false;
+            grdMain1.Columns[HProcIDCol].Visible = false;
+            grdMain1.Columns[HMaterIDCol].Visible = false;
+            grdMain1.Columns[HUSEORGID].Visible = false;
             //鍙紪杈戝垪
             string sAllowCol = HMaterNumberCol.ToString() +
                             "," + HProcNumberCol.ToString() +
@@ -664,7 +659,7 @@
         //鏄惁鏄┖琛�
         private bool IsNullRow(int Row)
         {
-            if (ClsPub.isInt(grdMain.Rows[Row].Cells[HMaterIDCol].Value) == 0)
+            if (ClsPub.isInt(grdMain1.Rows[Row].Cells[HMaterIDCol].Value) == 0)
             {
                 return true;
             }
@@ -708,26 +703,26 @@
                         {
                             case HMaterNumberCol:
                                 //BLL.ClsBaseSelect_K3.SetGridByMater_K3(grdMain, sRow, HMaterIDCol, HMaterNumberCol, HMaterNameCol, HMaterModelCol, 0, 0, 0);
-                                BLL.ClsBaseSelect_InterFace.SetGridByMater(grdMain, sRow, HMaterIDCol, HMaterNumberCol, HMaterNameCol, HMaterModelCol, 0, 0, 0);
+                                BLL.ClsBaseSelect_InterFace.SetGridByMater(grdMain1, sRow, HMaterIDCol, HMaterNumberCol, HMaterNameCol, HMaterModelCol, 0, 0, 0);
                                 if (rbHSelectCus.Checked)
                                 {
-                                    grdMain.Rows[sRow].Cells[HProcIDCol].Value = txtHProcID.Tag.ToString();
-                                    grdMain.Rows[sRow].Cells[HProcNameCol].Value = txtHProcName.Text.Trim();
-                                    grdMain.Rows[sRow].Cells[HProcNumberCol].Value = txtHProcID.Text.Trim();
+                                    grdMain1.Rows[sRow].Cells[HProcIDCol].Value = txtHProcID.Tag.ToString();
+                                    grdMain1.Rows[sRow].Cells[HProcNameCol].Value = txtHProcName.Text.Trim();
+                                    grdMain1.Rows[sRow].Cells[HProcNumberCol].Value = txtHProcID.Text.Trim();
                                 }
-                                oEdit.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[sRow].Cells[HMaterNumberCol].Value);
+                                oEdit.Text = DBUtility.ClsPub.isStrNull(grdMain1.Rows[sRow].Cells[HMaterNumberCol].Value);
                                 break;
                             case HProcNumberCol:
                                 //BLL.ClsBaseSelect.SetGridByProc(grdMain, sRow, HProcIDCol, HProcNumberCol, HProcNameCol);
-                                BLL.ClsBaseSelect_InterFace.SetGridByProc(grdMain, sRow, HProcIDCol, HProcNumberCol, HProcNameCol);
+                                BLL.ClsBaseSelect_InterFace.SetGridByProc(grdMain1, sRow, HProcIDCol, HProcNumberCol, HProcNameCol);
                                 if (rbHSelectMater.Checked)
                                 {
-                                    grdMain.Rows[sRow].Cells[HMaterIDCol].Value = txtHMaterID.Tag.ToString();
-                                    grdMain.Rows[sRow].Cells[HMaterNumberCol].Value = txtHMaterID.Text.Trim();
-                                    grdMain.Rows[sRow].Cells[HMaterNameCol].Value = txtHMaterName.Text.Trim();
-                                    grdMain.Rows[sRow].Cells[HMaterModelCol].Value = txtHMaterModel.Text.Trim();
+                                    grdMain1.Rows[sRow].Cells[HMaterIDCol].Value = txtHMaterID.Tag.ToString();
+                                    grdMain1.Rows[sRow].Cells[HMaterNumberCol].Value = txtHMaterID.Text.Trim();
+                                    grdMain1.Rows[sRow].Cells[HMaterNameCol].Value = txtHMaterName.Text.Trim();
+                                    grdMain1.Rows[sRow].Cells[HMaterModelCol].Value = txtHMaterModel.Text.Trim();
                                 }
-                                oEdit.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[sRow].Cells[HProcNumberCol].Value);
+                                oEdit.Text = DBUtility.ClsPub.isStrNull(grdMain1.Rows[sRow].Cells[HProcNumberCol].Value);
                                 break;
                             default:
                                 break;
@@ -745,7 +740,7 @@
         DataGridViewTextBoxEditingControl EditingControl;
         private void grdMain_CellBeginEdit(object sender, DataGridViewCellCancelEventArgs e)
         {
-            int i = grdMain.CurrentCell.ColumnIndex;
+            int i = grdMain1.CurrentCell.ColumnIndex;
             if (DBUtility.Xt_BaseBillFun.AllowEdit(grdStatus, oSumGrid, i))
             {
                 e.Cancel = true;
@@ -783,7 +778,7 @@
 
         private void grdMain_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
         {
-            if (grdMain.CurrentCell != null)
+            if (grdMain1.CurrentCell != null)
             {
                 if (e.Control is DataGridViewTextBoxEditingControl)
                 {
@@ -797,7 +792,7 @@
         private void EditingControl_KeyDown(object sender, KeyEventArgs e)
         {
             //涓氬姟澶勭悊 
-            Sub_GridKey(e.KeyValue, grdMain.CurrentRow.Index, grdMain.CurrentCell.ColumnIndex, EditingControl);
+            Sub_GridKey(e.KeyValue, grdMain1.CurrentRow.Index, grdMain1.CurrentCell.ColumnIndex, EditingControl);
         }
 
         private void grdMain_RowHeadersWidthChanged(object sender, EventArgs e)
diff --git "a/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimesList.Designer.cs" "b/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimesList.Designer.cs"
index a1e024f..3fd7de9 100644
--- "a/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimesList.Designer.cs"
+++ "b/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimesList.Designer.cs"
@@ -31,7 +31,7 @@
         {
             this.components = new System.ComponentModel.Container();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Gy_StdWorkTimesList));
-            System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("椤圭洰");
+            System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("椤圭洰");
             this.tabPage1 = new System.Windows.Forms.TabPage();
             this.grdMain = new System.Windows.Forms.DataGridView();
             this.fsh = new System.Windows.Forms.ToolStripButton();
@@ -51,6 +51,8 @@
             this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
             this.yl = new System.Windows.Forms.ToolStripButton();
             this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
+            this.gs = new System.Windows.Forms.ToolStripButton();
+            this.wl = new System.Windows.Forms.ToolStripButton();
             this.xz = new System.Windows.Forms.ToolStripButton();
             this.xg = new System.Windows.Forms.ToolStripButton();
             this.sc = new System.Windows.Forms.ToolStripButton();
@@ -62,8 +64,6 @@
             this.mrlk = new System.Windows.Forms.ToolStripButton();
             this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
             this.bclk = new System.Windows.Forms.ToolStripButton();
-            this.wl = new System.Windows.Forms.ToolStripButton();
-            this.gs = new System.Windows.Forms.ToolStripButton();
             this.tabPage1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.grdMain)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
@@ -118,6 +118,7 @@
             this.fsh.Text = "鍙嶅";
             this.fsh.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
             this.fsh.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
+            this.fsh.Click += new System.EventHandler(this.fsh_Click);
             // 
             // toolStripSeparator3
             // 
@@ -136,6 +137,7 @@
             this.tc.Text = "閫�鍑�";
             this.tc.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
             this.tc.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
+            this.tc.Click += new System.EventHandler(this.tc_Click);
             // 
             // toolStripSeparator5
             // 
@@ -186,13 +188,13 @@
             this.tv.Location = new System.Drawing.Point(0, 24);
             this.tv.Margin = new System.Windows.Forms.Padding(4);
             this.tv.Name = "tv";
-            treeNode2.ForeColor = System.Drawing.Color.Black;
-            treeNode2.Name = "tjbb";
-            treeNode2.NodeFont = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            treeNode2.StateImageKey = "鏂囦欢澶�1.ico";
-            treeNode2.Text = "椤圭洰";
+            treeNode1.ForeColor = System.Drawing.Color.Black;
+            treeNode1.Name = "tjbb";
+            treeNode1.NodeFont = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            treeNode1.StateImageKey = "鏂囦欢澶�1.ico";
+            treeNode1.Text = "椤圭洰";
             this.tv.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
-            treeNode2});
+            treeNode1});
             this.tv.SelectedImageIndex = 1;
             this.tv.Size = new System.Drawing.Size(195, 595);
             this.tv.TabIndex = 16;
@@ -241,6 +243,7 @@
             this.sh.Text = "瀹℃牳";
             this.sh.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
             this.sh.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
+            this.sh.Click += new System.EventHandler(this.sh_Click);
             // 
             // toolStripSeparator9
             // 
@@ -316,6 +319,39 @@
             this.toolStripSeparator6.Name = "toolStripSeparator6";
             this.toolStripSeparator6.Size = new System.Drawing.Size(6, 62);
             // 
+            // gs
+            // 
+            this.gs.AutoSize = false;
+            this.gs.Image = ((System.Drawing.Image)(resources.GetObject("gs.Image")));
+            this.gs.ImageAlign = System.Drawing.ContentAlignment.BottomCenter;
+            this.gs.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+            this.gs.ImageTransparentColor = System.Drawing.Color.White;
+            this.gs.Name = "gs";
+            this.gs.Size = new System.Drawing.Size(35, 47);
+            this.gs.Text = "宸ュ簭";
+            this.gs.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
+            this.gs.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
+            this.gs.ToolTipText = "宸ユ椂";
+            this.gs.Click += new System.EventHandler(this.gs_Click);
+            this.gs.LocationChanged += new System.EventHandler(this.gs_Click);
+            // 
+            // wl
+            // 
+            this.wl.AutoSize = false;
+            this.wl.Checked = true;
+            this.wl.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.wl.ForeColor = System.Drawing.SystemColors.ControlText;
+            this.wl.Image = ((System.Drawing.Image)(resources.GetObject("wl.Image")));
+            this.wl.ImageAlign = System.Drawing.ContentAlignment.BottomCenter;
+            this.wl.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+            this.wl.ImageTransparentColor = System.Drawing.Color.White;
+            this.wl.Name = "wl";
+            this.wl.Size = new System.Drawing.Size(35, 47);
+            this.wl.Text = "鐗╂枡";
+            this.wl.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
+            this.wl.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
+            this.wl.Click += new System.EventHandler(this.wl_Click);
+            // 
             // xz
             // 
             this.xz.AutoSize = false;
@@ -329,6 +365,7 @@
             this.xz.Text = "鏂板";
             this.xz.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
             this.xz.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
+            this.xz.Click += new System.EventHandler(this.xz_Click);
             // 
             // xg
             // 
@@ -342,6 +379,7 @@
             this.xg.Text = "淇敼";
             this.xg.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
             this.xg.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
+            this.xg.Click += new System.EventHandler(this.xg_Click);
             // 
             // sc
             // 
@@ -355,6 +393,7 @@
             this.sc.Text = "鍒犻櫎";
             this.sc.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
             this.sc.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
+            this.sc.Click += new System.EventHandler(this.sc_Click);
             // 
             // toolStripSeparator2
             // 
@@ -373,6 +412,7 @@
             this.cx.Text = "鏌ヨ";
             this.cx.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
             this.cx.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
+            this.cx.Click += new System.EventHandler(this.cx_Click);
             // 
             // xs
             // 
@@ -386,6 +426,7 @@
             this.xs.Text = "鍒锋柊";
             this.xs.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
             this.xs.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
+            this.xs.Click += new System.EventHandler(this.xs_Click);
             // 
             // toolStripSeparator1
             // 
@@ -429,37 +470,6 @@
             this.bclk.Text = "淇濆瓨鍒楀";
             this.bclk.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
             this.bclk.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
-            // 
-            // wl
-            // 
-            this.wl.AutoSize = false;
-            this.wl.Checked = true;
-            this.wl.CheckState = System.Windows.Forms.CheckState.Checked;
-            this.wl.ForeColor = System.Drawing.SystemColors.ControlText;
-            this.wl.Image = ((System.Drawing.Image)(resources.GetObject("wl.Image")));
-            this.wl.ImageAlign = System.Drawing.ContentAlignment.BottomCenter;
-            this.wl.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
-            this.wl.ImageTransparentColor = System.Drawing.Color.White;
-            this.wl.Name = "wl";
-            this.wl.Size = new System.Drawing.Size(35, 47);
-            this.wl.Text = "鐗╂枡";
-            this.wl.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
-            this.wl.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
-            // 
-            // gs
-            // 
-            this.gs.AutoSize = false;
-            this.gs.Image = ((System.Drawing.Image)(resources.GetObject("gs.Image")));
-            this.gs.ImageAlign = System.Drawing.ContentAlignment.BottomCenter;
-            this.gs.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
-            this.gs.ImageTransparentColor = System.Drawing.Color.White;
-            this.gs.Name = "gs";
-            this.gs.Size = new System.Drawing.Size(35, 47);
-            this.gs.Text = "宸ュ簭";
-            this.gs.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
-            this.gs.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
-            this.gs.ToolTipText = "宸ユ椂";
-            this.gs.LocationChanged += new System.EventHandler(this.gs_Click);
             // 
             // Gy_StdWorkTimesList
             // 
diff --git "a/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimesList.cs" "b/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimesList.cs"
index 5c8a9e7..3fbc841 100644
--- "a/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimesList.cs"
+++ "b/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimesList.cs"
@@ -266,28 +266,21 @@
                 HParentID = sr[0].ToString();
             }
             //杩囨护鏉′欢
-            if (frmCondition.SqlStr.Trim().Length == 0)
+            if (HParentID == "" || HParentID == "鐗╂枡璧勬枡" || HParentID == "宸ュ簭璧勬枡")
             {
-                if (HParentID == "" || HParentID == "鐗╂枡璧勬枡" || HParentID == "宸ュ簭璧勬枡")
-                {
-                    sSql = "Select top 10000 * from " + ViewName + " order by  HItemID Desc";
-                }
-                else
-                {
-                    if (wl.Checked == false)
-                    {
-                        sSql = "Select top 10000 * from " + ViewName + " where 宸ュ簭浠g爜 like '%" + HParentID.ToString() + "%' order by HItemID Desc" ;
-                    }
-                    else
-                    {
-                        sSql = "Select top 10000 * from " + ViewName + " where 鐗╂枡浠g爜 like '%" + HParentID.ToString() + "%' order by HItemID Desc ";
-                    }
-
-                }
+                sSql = "Select top 10000 * from " + ViewName + " order by  HItemID Desc";
             }
             else
             {
-                sSql = frmCondition.SqlStr + sWhere + " order by  HItemID Desc";
+                if (wl.Checked == false)
+                {
+                    sSql = "Select top 10000 * from " + ViewName + " where 宸ュ簭浠g爜 like '%" + HParentID.ToString() + "%' order by HItemID Desc";
+                }
+                else
+                {
+                    sSql = "Select top 10000 * from " + ViewName + " where 鐗╂枡浠g爜 like '%" + HParentID.ToString() + "%' order by HItemID Desc ";
+                }
+
             }
             //鎵цSQL
             DSet = SubCn.RunProcReturn(sSql, ViewName);
@@ -310,12 +303,12 @@
             oSumGrid.BuildTotalCols(sT);
             //  
             //鍐荤粨
-            int FrCol = DBUtility.ClsPub.isInt(frmCondition.txtFrozenCol.Text);
-            string s = frmCondition.cmbHComplete.Text;
-            DBUtility.Xt_BaseBillFun.DisplayGrid(grdMain, this.Name, s, FrCol);
+            //int FrCol = DBUtility.ClsPub.isInt(frmCondition.txtFrozenCol.Text);
+            //string s = frmCondition.cmbHComplete.Text;
+            //DBUtility.Xt_BaseBillFun.DisplayGrid(grdMain, this.Name, s, FrCol);
             //鐢荤嚎
             //
-            Total();
+            //Total();
         }
 
         //鍚堣 new
diff --git "a/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimesList.resx" "b/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimesList.resx"
index 36db665..be46ce1 100644
--- "a/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimesList.resx"
+++ "b/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimesList.resx"
@@ -146,51 +146,51 @@
         AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
         LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
         ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACE
-        CgAAAk1TRnQBSQFMAgEBAgEAASQBAQEkAQEBEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA
+        CgAAAk1TRnQBSQFMAgEBAgEAATQBAQE0AQEBEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA
         AwABEAMAAQEBAAEgBgABEBIAgP+AAAj/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/
         AwAB/wMAAf8DAAH/AwAB/wMADf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/
-        AwAB/wMAAf8DAAH/gAAE/wEAAUEBigH/AQwBkAG5Af8BDAGQAbkB/wEMAZABuQH/AQwBkAG5Af8BDAGQ
-        AbkB/wEMAZABuQH/AQwBkAG5Af8BDAGQAbkB/wEMAZABuQH/AQwBkAG5Af8BDAGQAbkB/wEMAZABuQH/
-        AQwBkAG5Af8DAAn/AQABQQGKAf8BAAFBAYoB/wEAAUEBigH/AQABQQGKAf8BAAFBAYoB/wEAAUEBigH/
-        AQABQQGKAf8BAAFBAYoB/wEAAUEBigH/AQABQQGKAf8BAAFBAYoB/wEAAUEBigH/AwAB/wMAAf+AAAT/
-        AQABQQGKAf8B0QH2Av8BUwHaAfQB/wFIAdMB8QH/AT0BywHvAf8BMwHEAe0B/wEpAb4B6wH/AR8BuAHo
-        Af8BEwGwAecB/wEJAakB5AH/AQABowHiAf8BAAGeAeAB/wEAAZoB3wH/AQwBkAG5Af8DAAn/AQABQQGK
-        Af8B0QH2Av8BKAG+AesB/wEiAbkB6QH/ARoBtAHnAf8BEgGwAeYB/wELAasB5AH/AQQBpwHjAf8BAAGi
-        AeEB/wEAAZ8B4QH/AQwBkAG5Af8BAAFBAYoB/wMAAf8DAAH/gAAE/wEAAUEBigH/AdEB9gL/AVkB3gH1
-        Af8BTgHWAfMB/wFEAdAB8QH/ATkByQHuAf8BLwHCAewB/wEkAbwB6gH/ARoBtAHnAf8BDwGtAeUB/wEF
-        AaYB4wH/AQABoQHhAf8BAAGdAeAB/wEMAZABuQH/AwAF/wEAAUEBigH/AdEB9gL/ATMBxQHuAf8BLQHB
-        AesB/wEmAbwB6wH/AR4BtwHoAf8BFwGyAecB/wEPAa4B5QH/AQgBqQHkAf8BAQGlAeIB/wEAAaEB4QH/
-        AQwBkAG5Af8DAAH/AQABQQGKAf8DAAH/gAAE/wEAAUEBigH/AdEB9gL/AYEB4QH3Af8BVQHaAfQB/wFK
-        AdQB8gH/AT8BzAHvAf8BNQHGAe4B/wErAcAB6wH/ASABuQHpAf8BFgGyAeYB/wELAasB5QH/AQEBpQHi
-        Af8BAAGfAeEB/wEMAZABuQH/AwAF/wEAAUEBigH/AdEB9gL/ATgByAHuAf8BMQHEAewB/wEqAb8B6wH/
-        ASMBuwHqAf8BHAG2AegB/wEUAbAB5wH/AQ0BrAHlAf8BBgGnAeMB/wEAAaMB4gH/AQABQQGKAf8DAAH/
-        AQABQQGKAf8DAAH/gAAE/wEAAUEBigH/AdEB9gL/AYYB5QH3Af8BWwHfAfUB/wFQAdgB8wH/AUYB0QHx
-        Af8BOwHKAe8B/wExAcQB7QH/AScBvQHqAf8BHAG2AegB/wERAa8B5QH/AQYBqAHjAf8BAAGiAeEB/wEM
-        AZABuQH/AwAB/wEAAUEBigH/AdEB9gL/AUQBzwHxAf8BPQHLAe8B/wE1AccB7gH/AS8BwgHsAf8BKAG9
-        AeoB/wEgAbkB6QH/ARkBtAHnAf8BEgGwAeYB/wEKAaoB5QH/AQwBkAG5Af8DAAH/AQwBkAG5Af8BDAGQ
-        AbkB/wMAAf+AAAT/AQABQQGKAf8B0QH2Av8BjAHoAfkB/wGDAeIB9wH/AVcB3AH1Af8BTQHVAfIB/wFB
-        Ac4B8AH/ATcByAHuAf8BLQHBAewB/wEjAboB6gH/ARcBswHnAf8BDQGsAeUB/wEDAaYB4wH/AQwBkAG5
-        Af8DAAH/AQABQQGKAf8B0QH2Av8BSQHTAfIB/wFBAc4B8AH/AToBygHuAf8BMwHFAe0B/wEtAcEB6wH/
-        ASUBvAHqAf8BHgG3AegB/wEWAbIB5gH/AQ8BrgHlAf8BDAGQAbkB/wMAAf8BDAGQAbkB/wEMAZABuQH/
-        AwAB/4AABP8BAAFBAYoB/wHRAfYC/wGQAesB+QH/AYgB5gH4Af8BXQHgAfYB/wFTAdkB8wH/AUgB0wHy
-        Af8BPQHLAe8B/wEzAcUB7QH/ASkBvgHrAf8BHwG4AekB/wETAbAB5gH/AQgBqQHkAf8BDAGQAbkB/wMA
-        Af8BAAFBAYoB/wEAAUEBigH/AQABQQGKAf8BAAFBAYoB/wEAAUEBigH/AQABQQGKAf8BAAFBAYoB/wEA
-        AUEBigH/AQABQQGKAf8BAAFBAYoB/wEAAUEBigH/AQABQQGKAf8BDAGQAbkB/wE6AckB7gH/AQwBkAG5
-        Af8DAAH/gAAE/wEAAUEBigH/AdEB9gL/AZMB7QH6Af8BjQHpAfkB/wGFAeQB9wH/AVoB3gH1Af8BTgHW
-        AfMB/wFEAc8B8QH/ATkByQHvAf8BLwHCAewB/wElAbsB6QH/ARoBtQHnAf8BDwGtAeYB/wEMAZABuQH/
-        AwAF/wEAAUEBigH/AdEB9gL/AZEB7AH6Af8BjQHpAfkB/wGKAecB+AH/AYYB5AH4Af8BgAHhAfcB/wFa
-        Ad0B9QH/AVQB2gHzAf8BTgHXAfMB/wFJAdMB8QH/AUMBzwHxAf8BPQHLAe8B/wEMAZABuQH/AwAB/4AA
-        BP8BAAFBAYoB/wHRAfYC/wHRAfYC/wHRAfYC/wHRAfYC/wHRAfYC/wHRAfYC/wHRAfYC/wHRAfYC/wHR
-        AfYC/wHRAfYC/wHRAfYC/wHRAfYC/wEMAZABuQH/AwAF/wEAAUEBigH/AdEB9gL/AZMB7QH6Af8BkAHr
-        AfkB/wGMAekB+QH/AYgB5gH4Af8BhAHjAfcB/wFdAeAB9gH/AVgB3AH1Af8B0QH2Av8B0QH2Av8B0QH2
-        Av8B0QH2Av8BDAGQAbkB/wMAAf+AAAT/AQABQQGKAf8BHwGoAdMB/wEfAagB0wH/AR8BqAHTAf8BHwGo
-        AdMB/wEfAagB0wH/AR8BqAHTAf8BHwGoAdMB/wEAAUEBigH/AQABQQGKAf8BAAFBAYoB/wEAAUEBigH/
-        AQABQQGKAf8BAAFBAYoJ/wEAAUEBigH/AdEB9gL/AZMB7QH6Af8BkgHsAfoB/wGPAesB+QH/AYsB6AH4
-        Af8BhwHlAfcB/wHRAfYC/wEAAUEBigH/AQABQQGKAf8BAAFBAYoB/wEAAUEBigH/AQABQQGKAf8BAAFB
-        AYoF/4AACP8BAAFBAYoB/wG4AegB9QH/Ac4D/wHOA/8BnAP/AZwD/wEAAUEBigH/AwAh/wEAAUEBigH/
-        AdEB9gL/AdEB9gL/AdEB9gL/AdEB9gL/AdEB9gL/AQABQQGKHf+AAAz/AQABQQGKAf8BAAFBAYoB/wEA
-        AUEBigH/AQABQQGKAf8BAAFBAYoB/wMAKf8BAAFBAYoB/wEAAUEBigH/AQABQQGKAf8BAAFBAYoB/wEA
-        AUEBiiH/gACA/4AAgP+AAAFCAU0BPgcAAT4DAAEoAwABQAMAARADAAEBAQABAQUAAYAXAAP/gQAL
+        AwAB/wMAAf8DAAH/gAAE/wEAAT8BigH/AQoBkAG5Af8BCgGQAbkB/wEKAZABuQH/AQoBkAG5Af8BCgGQ
+        AbkB/wEKAZABuQH/AQoBkAG5Af8BCgGQAbkB/wEKAZABuQH/AQoBkAG5Af8BCgGQAbkB/wEKAZABuQH/
+        AQoBkAG5Af8DAAn/AQABPwGKAf8BAAE/AYoB/wEAAT8BigH/AQABPwGKAf8BAAE/AYoB/wEAAT8BigH/
+        AQABPwGKAf8BAAE/AYoB/wEAAT8BigH/AQABPwGKAf8BAAE/AYoB/wEAAT8BigH/AwAB/wMAAf+AAAT/
+        AQABPwGKAf8B0QH2Av8BUQHaAfQB/wFGAdMB8QH/ATsBywHvAf8BMQHEAe0B/wEnAb4B6wH/AR0BuAHo
+        Af8BEQGwAecB/wEHAakB5AH/AQABowHiAf8BAAGeAeAB/wEAAZoB3wH/AQoBkAG5Af8DAAn/AQABPwGK
+        Af8B0QH2Av8BJgG+AesB/wEgAbkB6QH/ARgBtAHnAf8BEAGwAeYB/wEJAasB5AH/AQIBpwHjAf8BAAGi
+        AeEB/wEAAZ8B4QH/AQoBkAG5Af8BAAE/AYoB/wMAAf8DAAH/gAAE/wEAAT8BigH/AdEB9gL/AVcB3gH1
+        Af8BTAHWAfMB/wFCAdAB8QH/ATcByQHuAf8BLQHCAewB/wEiAbwB6gH/ARgBtAHnAf8BDQGtAeUB/wED
+        AaYB4wH/AQABoQHhAf8BAAGdAeAB/wEKAZABuQH/AwAF/wEAAT8BigH/AdEB9gL/ATEBxQHuAf8BKwHB
+        AesB/wEkAbwB6wH/ARwBtwHoAf8BFQGyAecB/wENAa4B5QH/AQYBqQHkAf8BAAGlAeIB/wEAAaEB4QH/
+        AQoBkAG5Af8DAAH/AQABPwGKAf8DAAH/gAAE/wEAAT8BigH/AdEB9gL/AYEB4QH3Af8BUwHaAfQB/wFI
+        AdQB8gH/AT0BzAHvAf8BMwHGAe4B/wEpAcAB6wH/AR4BuQHpAf8BFAGyAeYB/wEJAasB5QH/AQABpQHi
+        Af8BAAGfAeEB/wEKAZABuQH/AwAF/wEAAT8BigH/AdEB9gL/ATYByAHuAf8BLwHEAewB/wEoAb8B6wH/
+        ASEBuwHqAf8BGgG2AegB/wESAbAB5wH/AQsBrAHlAf8BBAGnAeMB/wEAAaMB4gH/AQABPwGKAf8DAAH/
+        AQABPwGKAf8DAAH/gAAE/wEAAT8BigH/AdEB9gL/AYYB5QH3Af8BWQHfAfUB/wFOAdgB8wH/AUQB0QHx
+        Af8BOQHKAe8B/wEvAcQB7QH/ASUBvQHqAf8BGgG2AegB/wEPAa8B5QH/AQQBqAHjAf8BAAGiAeEB/wEK
+        AZABuQH/AwAB/wEAAT8BigH/AdEB9gL/AUIBzwHxAf8BOwHLAe8B/wEzAccB7gH/AS0BwgHsAf8BJgG9
+        AeoB/wEeAbkB6QH/ARcBtAHnAf8BEAGwAeYB/wEIAaoB5QH/AQoBkAG5Af8DAAH/AQoBkAG5Af8BCgGQ
+        AbkB/wMAAf+AAAT/AQABPwGKAf8B0QH2Av8BjAHoAfkB/wGDAeIB9wH/AVUB3AH1Af8BSwHVAfIB/wE/
+        Ac4B8AH/ATUByAHuAf8BKwHBAewB/wEhAboB6gH/ARUBswHnAf8BCwGsAeUB/wEBAaYB4wH/AQoBkAG5
+        Af8DAAH/AQABPwGKAf8B0QH2Av8BRwHTAfIB/wE/Ac4B8AH/ATgBygHuAf8BMQHFAe0B/wErAcEB6wH/
+        ASMBvAHqAf8BHAG3AegB/wEUAbIB5gH/AQ0BrgHlAf8BCgGQAbkB/wMAAf8BCgGQAbkB/wEKAZABuQH/
+        AwAB/4AABP8BAAE/AYoB/wHRAfYC/wGQAesB+QH/AYgB5gH4Af8BWwHgAfYB/wFRAdkB8wH/AUYB0wHy
+        Af8BOwHLAe8B/wExAcUB7QH/AScBvgHrAf8BHQG4AekB/wERAbAB5gH/AQYBqQHkAf8BCgGQAbkB/wMA
+        Af8BAAE/AYoB/wEAAT8BigH/AQABPwGKAf8BAAE/AYoB/wEAAT8BigH/AQABPwGKAf8BAAE/AYoB/wEA
+        AT8BigH/AQABPwGKAf8BAAE/AYoB/wEAAT8BigH/AQABPwGKAf8BCgGQAbkB/wE4AckB7gH/AQoBkAG5
+        Af8DAAH/gAAE/wEAAT8BigH/AdEB9gL/AZMB7QH6Af8BjQHpAfkB/wGFAeQB9wH/AVgB3gH1Af8BTAHW
+        AfMB/wFCAc8B8QH/ATcByQHvAf8BLQHCAewB/wEjAbsB6QH/ARgBtQHnAf8BDQGtAeYB/wEKAZABuQH/
+        AwAF/wEAAT8BigH/AdEB9gL/AZEB7AH6Af8BjQHpAfkB/wGKAecB+AH/AYYB5AH4Af8BgAHhAfcB/wFY
+        Ad0B9QH/AVIB2gHzAf8BTAHXAfMB/wFHAdMB8QH/AUEBzwHxAf8BOwHLAe8B/wEKAZABuQH/AwAB/4AA
+        BP8BAAE/AYoB/wHRAfYC/wHRAfYC/wHRAfYC/wHRAfYC/wHRAfYC/wHRAfYC/wHRAfYC/wHRAfYC/wHR
+        AfYC/wHRAfYC/wHRAfYC/wHRAfYC/wEKAZABuQH/AwAF/wEAAT8BigH/AdEB9gL/AZMB7QH6Af8BkAHr
+        AfkB/wGMAekB+QH/AYgB5gH4Af8BhAHjAfcB/wFbAeAB9gH/AVYB3AH1Af8B0QH2Av8B0QH2Av8B0QH2
+        Av8B0QH2Av8BCgGQAbkB/wMAAf+AAAT/AQABPwGKAf8BHQGoAdMB/wEdAagB0wH/AR0BqAHTAf8BHQGo
+        AdMB/wEdAagB0wH/AR0BqAHTAf8BHQGoAdMB/wEAAT8BigH/AQABPwGKAf8BAAE/AYoB/wEAAT8BigH/
+        AQABPwGKAf8BAAE/AYoJ/wEAAT8BigH/AdEB9gL/AZMB7QH6Af8BkgHsAfoB/wGPAesB+QH/AYsB6AH4
+        Af8BhwHlAfcB/wHRAfYC/wEAAT8BigH/AQABPwGKAf8BAAE/AYoB/wEAAT8BigH/AQABPwGKAf8BAAE/
+        AYoF/4AACP8BAAE/AYoB/wG4AegB9QH/Ac4D/wHOA/8BnAP/AZwD/wEAAT8BigH/AwAh/wEAAT8BigH/
+        AdEB9gL/AdEB9gL/AdEB9gL/AdEB9gL/AdEB9gL/AQABPwGKHf+AAAz/AQABPwGKAf8BAAE/AYoB/wEA
+        AT8BigH/AQABPwGKAf8BAAE/AYoB/wMAKf8BAAE/AYoB/wEAAT8BigH/AQABPwGKAf8BAAE/AYoB/wEA
+        AT8BiiH/gACA/4AAgP+AAAFCAU0BPgcAAT4DAAEoAwABQAMAARADAAEBAQABAQUAAYAXAAP/gQAL
 </value>
   </data>
   <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
diff --git "a/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_StdWorkTimes_Ctl.cs" "b/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_StdWorkTimes_Ctl.cs"
index 3f42556..1a94969 100644
--- "a/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_StdWorkTimes_Ctl.cs"
+++ "b/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_StdWorkTimes_Ctl.cs"
@@ -11,6 +11,7 @@
         SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
         //鍘熶唬鐮� 鐢ㄤ簬 鏇挎崲瀛愰」鐩�
         public string HOldNumber;
+        public Model.ClsGy_StdWorkTimes_Model omodel = new Model.ClsGy_StdWorkTimes_Model();
         public List<Model.ClsGy_StdWorkTimes_Model> DetailColl = new List<Model.ClsGy_StdWorkTimes_Model>();
 
         //鍙嶅鏍�
diff --git a/LMES/ClsShowMod.cs b/LMES/ClsShowMod.cs
index e779c9b..3c10a04 100644
--- a/LMES/ClsShowMod.cs
+++ b/LMES/ClsShowMod.cs
@@ -25,6 +25,7 @@
 using Kanban;
 using Demo;
 using ProM.委外管理;
+using BaseSet.公用资料.其他基础资料;
 
 namespace LMES
 {
@@ -6692,6 +6693,13 @@
                 //MessageBox.Show("gnsy:"+gnsy + "gnmc:"+ gnmc);
                 switch (gnsy.ToLower())
                 {
+                    case "gy_stdworktimeslist":
+                        //权限
+                        Gy_StdWorkTimesList oGy_StdWorkTimesList = new Gy_StdWorkTimesList();
+                        oGy_StdWorkTimesList.MdiParent = oMain;
+                        oGy_StdWorkTimesList.Show();
+                        oMainForm.AddTabPage(oGy_StdWorkTimesList);
+                        break;
                     case "gy_dotcheck"://点检项目
                         Gy_DotCheck oGy_DotCheck = new Gy_DotCheck();
                         oGy_DotCheck.MdiParent = oMain;
@@ -8078,6 +8086,12 @@
                         oGy_DataIn_ProcessPrice.Show();
                         oMainForm.AddTabPage(oGy_DataIn_ProcessPrice);
                         break;
+                    case "gy_stdworktimes_routingbill":
+                        Gy_StdWorkTimes_RoutingBill oGy_StdWorkTimes_RoutingBill = new Gy_StdWorkTimes_RoutingBill();
+                        oGy_StdWorkTimes_RoutingBill.MdiParent = oMain;
+                        oGy_StdWorkTimes_RoutingBill.Show();
+                        oMainForm.AddTabPage(oGy_StdWorkTimes_RoutingBill);
+                        break;
                     case "gy_datain_process":
                         Gy_DataIn_Process oGy_DataIn_Process = new Gy_DataIn_Process();
                         oGy_DataIn_Process.MdiParent = oMain;
diff --git "a/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_StdWorkTimes_Model.cs" "b/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_StdWorkTimes_Model.cs"
index 61c6b37..77270c0 100644
--- "a/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_StdWorkTimes_Model.cs"
+++ "b/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_StdWorkTimes_Model.cs"
@@ -16,7 +16,11 @@
         public string HRemark;
         public long HUSEORGID;       //缁勭粐ID
         public long HProcID; //宸ュ簭ID
+        public string HProcNum; //宸ュ簭ID
+        public string HProcName; //宸ュ簭ID
         public long HMaterID;    //鐗╂枡ID
+        public string HMaterNum; //宸ュ簭ID
+        public string HMaterName; //宸ュ簭ID
         public double HStdWorkTimes;    //鏍囧噯宸ユ椂
         public double HUpperlimit;  //涓婇檺姣斾緥
         public double HLowerlimit;	//涓嬮檺姣斾緥
diff --git a/PlanM/ClassDiagram1.cd b/PlanM/ClassDiagram1.cd
new file mode 100644
index 0000000..7b89419
--- /dev/null
+++ b/PlanM/ClassDiagram1.cd
@@ -0,0 +1,2 @@
+锘�<?xml version="1.0" encoding="utf-8"?>
+<ClassDiagram /> 
\ No newline at end of file
diff --git a/PlanM/PlanM.csproj b/PlanM/PlanM.csproj
index 0a55294..0bf7d26 100644
--- a/PlanM/PlanM.csproj
+++ b/PlanM/PlanM.csproj
@@ -183,17 +183,17 @@
     <Compile Include="鏁版嵁瀵煎叆\Gy_DataIn_RoutingBill.designer.cs">
       <DependentUpon>Gy_DataIn_RoutingBill.cs</DependentUpon>
     </Compile>
+    <Compile Include="鏁版嵁瀵煎叆\Gy_StdWorkTimes_RoutingBill.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="鏁版嵁瀵煎叆\Gy_StdWorkTimes_RoutingBill.designer.cs">
+      <DependentUpon>Gy_StdWorkTimes_RoutingBill.cs</DependentUpon>
+    </Compile>
     <Compile Include="鏁版嵁瀵煎叆\Gy_DataIn_RoutingBill_New.cs">
       <SubType>Form</SubType>
     </Compile>
     <Compile Include="鏁版嵁瀵煎叆\Gy_DataIn_RoutingBill_New.designer.cs">
       <DependentUpon>Gy_DataIn_RoutingBill_New.cs</DependentUpon>
-    </Compile>
-    <Compile Include="鏁版嵁瀵煎叆\Gy_StdWorkTimes_RoutingBill.cs">
-      <SubType>Form</SubType>
-    </Compile>
-    <Compile Include="鏁版嵁瀵煎叆\Gy_StdWorkTimes_RoutingBill.Designer.cs">
-      <DependentUpon>Gy_StdWorkTimes_RoutingBill.cs</DependentUpon>
     </Compile>
     <Compile Include="璁″垝绠$悊\Gy_ICBomBill.cs">
       <SubType>Form</SubType>
@@ -287,12 +287,13 @@
       <DependentUpon>Gy_DataIn_RoutingBill.cs</DependentUpon>
       <SubType>Designer</SubType>
     </EmbeddedResource>
+    <EmbeddedResource Include="鏁版嵁瀵煎叆\Gy_StdWorkTimes_RoutingBill.resx">
+      <DependentUpon>Gy_StdWorkTimes_RoutingBill.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
     <EmbeddedResource Include="鏁版嵁瀵煎叆\Gy_DataIn_RoutingBill_New.resx">
       <DependentUpon>Gy_DataIn_RoutingBill_New.cs</DependentUpon>
       <SubType>Designer</SubType>
-    </EmbeddedResource>
-    <EmbeddedResource Include="鏁版嵁瀵煎叆\Gy_StdWorkTimes_RoutingBill.resx">
-      <DependentUpon>Gy_StdWorkTimes_RoutingBill.cs</DependentUpon>
     </EmbeddedResource>
     <EmbeddedResource Include="璁″垝绠$悊\Gy_ICBomBill.resx">
       <DependentUpon>Gy_ICBomBill.cs</DependentUpon>
@@ -360,6 +361,9 @@
       <Name>SQLHelper</Name>
     </ProjectReference>
   </ItemGroup>
+  <ItemGroup>
+    <None Include="ClassDiagram1.cd" />
+  </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
diff --git "a/PlanM/\346\225\260\346\215\256\345\257\274\345\205\245/Gy_DataIn_RoutingBill.resx" "b/PlanM/\346\225\260\346\215\256\345\257\274\345\205\245/Gy_DataIn_RoutingBill.resx"
index d55421f..228ea52 100644
--- "a/PlanM/\346\225\260\346\215\256\345\257\274\345\205\245/Gy_DataIn_RoutingBill.resx"
+++ "b/PlanM/\346\225\260\346\215\256\345\257\274\345\205\245/Gy_DataIn_RoutingBill.resx"
@@ -120,4 +120,7 @@
   <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>17, 17</value>
   </metadata>
+  <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>25</value>
+  </metadata>
 </root>
\ No newline at end of file
diff --git "a/PlanM/\346\225\260\346\215\256\345\257\274\345\205\245/Gy_StdWorkTimes_RoutingBill.Designer.cs" "b/PlanM/\346\225\260\346\215\256\345\257\274\345\205\245/Gy_StdWorkTimes_RoutingBill.Designer.cs"
index 0094fff..3eea509 100644
--- "a/PlanM/\346\225\260\346\215\256\345\257\274\345\205\245/Gy_StdWorkTimes_RoutingBill.Designer.cs"
+++ "b/PlanM/\346\225\260\346\215\256\345\257\274\345\205\245/Gy_StdWorkTimes_RoutingBill.Designer.cs"
@@ -1,17 +1,16 @@
-锘�
-namespace PlanM.鏁版嵁瀵煎叆
+namespace PlanM
 {
     partial class Gy_StdWorkTimes_RoutingBill
     {
         /// <summary>
-        /// Required designer variable.
+        /// 必需的设计器变量。
         /// </summary>
         private System.ComponentModel.IContainer components = null;
 
         /// <summary>
-        /// Clean up any resources being used.
+        /// 清理所有正在使用的资源。
         /// </summary>
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
         protected override void Dispose(bool disposing)
         {
             if (disposing && (components != null))
@@ -21,27 +20,183 @@
             base.Dispose(disposing);
         }
 
-        #region Windows Form Designer generated code
+        #region Windows 窗体设计器生成的代码
 
         /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
+        /// 设计器支持所需的方法 - 不要
+        /// 使用代码编辑器修改此方法的内容。
         /// </summary>
         private void InitializeComponent()
         {
+            this.label1 = new System.Windows.Forms.Label();
+            this.cmbHYear = new System.Windows.Forms.ComboBox();
+            this.cmbHPeriod = new System.Windows.Forms.ComboBox();
+            this.label2 = new System.Windows.Forms.Label();
+            this.checkadd = new System.Windows.Forms.CheckBox();
+            this.txtHSheetName = new System.Windows.Forms.TextBox();
+            this.label3 = new System.Windows.Forms.Label();
+            this.pPic.SuspendLayout();
+            this.panel1.SuspendLayout();
             this.SuspendLayout();
+            // 
+            // pPic
+            // 
+            this.pPic.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.pPic.Size = new System.Drawing.Size(1544, 56);
+            // 
+            // panel1
+            // 
+            this.panel1.Controls.Add(this.label3);
+            this.panel1.Controls.Add(this.txtHSheetName);
+            this.panel1.Controls.Add(this.checkadd);
+            this.panel1.Controls.Add(this.cmbHPeriod);
+            this.panel1.Controls.Add(this.label2);
+            this.panel1.Controls.Add(this.cmbHYear);
+            this.panel1.Controls.Add(this.label1);
+            this.panel1.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.panel1.Size = new System.Drawing.Size(1544, 52);
+            this.panel1.Controls.SetChildIndex(this.cmdHPath, 0);
+            this.panel1.Controls.SetChildIndex(this.label4, 0);
+            this.panel1.Controls.SetChildIndex(this.txtHPath, 0);
+            this.panel1.Controls.SetChildIndex(this.label1, 0);
+            this.panel1.Controls.SetChildIndex(this.cmbHYear, 0);
+            this.panel1.Controls.SetChildIndex(this.label2, 0);
+            this.panel1.Controls.SetChildIndex(this.cmbHPeriod, 0);
+            this.panel1.Controls.SetChildIndex(this.checkadd, 0);
+            this.panel1.Controls.SetChildIndex(this.txtHSheetName, 0);
+            this.panel1.Controls.SetChildIndex(this.label3, 0);
+            // 
+            // lblCaption
+            // 
+            this.lblCaption.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
+            this.lblCaption.Size = new System.Drawing.Size(160, 24);
+            this.lblCaption.Text = "数据导入模块";
+            // 
+            // cmdHPath
+            // 
+            this.cmdHPath.Location = new System.Drawing.Point(1043, 9);
+            this.cmdHPath.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            // 
+            // txtHPath
+            // 
+            this.txtHPath.Location = new System.Drawing.Point(615, 4);
+            this.txtHPath.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.txtHPath.Size = new System.Drawing.Size(419, 39);
+            // 
+            // label4
+            // 
+            this.label4.Location = new System.Drawing.Point(520, 15);
+            this.label4.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(35, 11);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(67, 15);
+            this.label1.TabIndex = 104;
+            this.label1.Text = "会计年:";
+            // 
+            // cmbHYear
+            // 
+            this.cmbHYear.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cmbHYear.FormattingEnabled = true;
+            this.cmbHYear.Location = new System.Drawing.Point(112, 10);
+            this.cmbHYear.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.cmbHYear.Name = "cmbHYear";
+            this.cmbHYear.Size = new System.Drawing.Size(124, 23);
+            this.cmbHYear.TabIndex = 105;
+            // 
+            // cmbHPeriod
+            // 
+            this.cmbHPeriod.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cmbHPeriod.FormattingEnabled = true;
+            this.cmbHPeriod.Items.AddRange(new object[] {
+            "1",
+            "2",
+            "3",
+            "4",
+            "5",
+            "6",
+            "7",
+            "8",
+            "9",
+            "10",
+            "11",
+            "12"});
+            this.cmbHPeriod.Location = new System.Drawing.Point(359, 12);
+            this.cmbHPeriod.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.cmbHPeriod.Name = "cmbHPeriod";
+            this.cmbHPeriod.Size = new System.Drawing.Size(112, 23);
+            this.cmbHPeriod.TabIndex = 107;
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Location = new System.Drawing.Point(264, 12);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(82, 15);
+            this.label2.TabIndex = 106;
+            this.label2.Text = "会计期间:";
+            // 
+            // checkadd
+            // 
+            this.checkadd.AutoSize = true;
+            this.checkadd.Checked = true;
+            this.checkadd.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.checkadd.Location = new System.Drawing.Point(1447, 12);
+            this.checkadd.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.checkadd.Name = "checkadd";
+            this.checkadd.Size = new System.Drawing.Size(59, 19);
+            this.checkadd.TabIndex = 108;
+            this.checkadd.Text = "追加";
+            this.checkadd.UseVisualStyleBackColor = true;
+            // 
+            // txtHSheetName
+            // 
+            this.txtHSheetName.Location = new System.Drawing.Point(1265, 11);
+            this.txtHSheetName.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.txtHSheetName.Name = "txtHSheetName";
+            this.txtHSheetName.Size = new System.Drawing.Size(132, 25);
+            this.txtHSheetName.TabIndex = 109;
+            this.txtHSheetName.Text = "Sheet1";
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Location = new System.Drawing.Point(1203, 12);
+            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(52, 15);
+            this.label3.TabIndex = 110;
+            this.label3.Text = "工作簿";
             // 
             // Gy_StdWorkTimes_RoutingBill
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1170, 712);
+            this.ClientSize = new System.Drawing.Size(1544, 789);
+            this.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
             this.Name = "Gy_StdWorkTimes_RoutingBill";
-            this.Text = "鏍囧噯宸ユ椂鏁版嵁瀵煎叆";
+            this.Text = "数据导入模块";
+            this.Load += new System.EventHandler(this.Gy_StdWorkTimes_RoutingBill_Load);
+            this.pPic.ResumeLayout(false);
+            this.pPic.PerformLayout();
+            this.panel1.ResumeLayout(false);
+            this.panel1.PerformLayout();
             this.ResumeLayout(false);
 
         }
 
         #endregion
+
+        private System.Windows.Forms.ComboBox cmbHPeriod;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.ComboBox cmbHYear;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.CheckBox checkadd;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.TextBox txtHSheetName;
     }
-}
\ No newline at end of file
+}
diff --git "a/PlanM/\346\225\260\346\215\256\345\257\274\345\205\245/Gy_StdWorkTimes_RoutingBill.cs" "b/PlanM/\346\225\260\346\215\256\345\257\274\345\205\245/Gy_StdWorkTimes_RoutingBill.cs"
index 40db531..34ac451 100644
--- "a/PlanM/\346\225\260\346\215\256\345\257\274\345\205\245/Gy_StdWorkTimes_RoutingBill.cs"
+++ "b/PlanM/\346\225\260\346\215\256\345\257\274\345\205\245/Gy_StdWorkTimes_RoutingBill.cs"
@@ -1,19 +1,333 @@
-锘縰sing System;
+using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
 using System.Drawing;
-using System.Linq;
 using System.Text;
 using System.Windows.Forms;
+using Pub_Class;
+using SQLHelper;
 
-namespace PlanM.鏁版嵁瀵煎叆
+namespace PlanM
 {
-    public partial class Gy_StdWorkTimes_RoutingBill : Form
+    public partial class Gy_StdWorkTimes_RoutingBill : BLL.Gy_DataInTmp
     {
         public Gy_StdWorkTimes_RoutingBill()
         {
             InitializeComponent();
         }
+        public int HItemID =0;
+        public int HMaker = 0;      //制单人
+        public int HMakeDate = 0; //制单日期
+        public int HChecker = 0; //审核人
+        public int HCheckDate = 0; //审核日期
+        public int HStopflag = 0;
+        public int HRemark = 0;
+        public int HUSEORGName = 0;       //组织ID
+        public int HProcName = 0; //
+        public int HMaterName = 0;    //物料ID
+        public int HProcNum = 0; //
+        public int HMaterNum = 0;    //物料ID
+        public int HStdWorkTimes = 0;    //标准工时
+        public int HUpperlimit = 0;  //上限比例
+        public int HLowerlimit = 0;	//下限比例
+
+        //public int HMaterNumberCol = 0;             //产品代码
+        //public int HWorkTypeNameCol = 0;           //工种
+        //public int HProcNameCol = 0;           //工序
+        //public int HWorkCenterNameCol = 0;        //工作中心
+        //public int HProcMulNameCol = 0;           //工段
+        //public int HWorkCenterName_SCol = 0;           //产线
+        //public int HWorkQtyCol = 0;          //产能
+        //public int HSubStdEmpQtyCol = 0;          //人数
+        //public int HWorkQty_SCol = 0;          //产线产能
+        //public int HSubStdEmpQty_SCol = 0;          //产线人数
+
+        //public int HMouldNoCol = 0;          //模具编号
+        //public int HChangeMouldCol = 0;          //换模时间
+        //public int HPackStdCol = 0;          //周转箱标准
+        //public int HPackCol = 0;          //周转箱
+        //public int HPutAreaCol = 0;          //暂放区
+        ////
+        //public int HMyWorkDaysCol = 0;          //生产周期
+        //public int HMyFixWorkDaysCol = 0;          //固定生产天数
+
+        //public int HBeginDayQtyCol = 6;     //开工固天
+        //public int HBeginFixQtyCol = 7;     //开工余量 
+        //public int HFixPriceCol = 8;        //定额 小时工资
+        //public int HProcPriceCol = 9;       //工价
+        //public int HProcTypeCol = 0;          //工序类型
+        //
+        public const int HBeginRow = 2;         //有效数据,开始行数
+        // 
+        //DAL.ClsGy_RoutingBill;
+        public DAL.ClsGy_Process_View oProcHlp = new DAL.ClsGy_Process_View();
+        public DAL.ClsGy_StdWorkTimes_Ctl BillNew = new DAL.ClsGy_StdWorkTimes_Ctl();
+        DAL.ClsIF_Material_View oMaterHlp = new DAL.ClsIF_Material_View();
+        //DAL.ClsGy_WorkType_View oWorkType = new DAL.ClsGy_WorkType_View();
+        long j = -1;
+        int c = 0;
+
+        public override bool OpenExcelData()
+        {
+            base.sSheetName = txtHSheetName.Text;
+            return base.OpenExcelData();
+        } 
+
+        /// <summary>
+        ///  初始化界面
+        /// </summary>
+        public override void initData()
+        {
+            base.initData();
+            base.sSheetName = txtHSheetName.Text ; 
+            base.ModRightName = "Gy_StdWorkTimes_RoutingBill";
+            base.ModRightNameCheck = base.ModRightName + base.ModRightNameCheck;
+            base.ModRightNameClose = base.ModRightName + base.ModRightNameClose;
+            base.ModRightNameDelete = base.ModRightName + base.ModRightNameDelete;
+            base.ModRightNameEdit = base.ModRightName + base.ModRightNameEdit;
+            base.ModRightNameMoney = base.ModRightName + base.ModRightNameMoney;
+            base.ModRightNameQty = base.ModRightName + base.ModRightNameQty;
+            base.ModCaption = "标准工时导入";
+            this.Text = base.ModCaption;
+            lblCaption.Text = base.ModCaption;
+            //
+            DBUtility.Gy_BaseFun.SetComboxYear(cmbHYear);
+            DBUtility.Gy_BaseFun.SetComboxPeriod(cmbHPeriod);
+            //
+        }
+        //导入
+        public override void Sub_DataIn()
+        {
+            string hnumber = "";
+                                    //
+            HStdWorkTimes = DBUtility.Gy_BaseFun.Fun_GetCol("标准工时", grdMain);
+            HProcNum = DBUtility.Gy_BaseFun.Fun_GetCol("工序代码", grdMain);
+            HProcName = DBUtility.Gy_BaseFun.Fun_GetCol("工序", grdMain);
+            HMaterNum = DBUtility.Gy_BaseFun.Fun_GetCol("物料代码", grdMain);
+            HMaterName = DBUtility.Gy_BaseFun.Fun_GetCol("物料", grdMain);
+            HUpperlimit = DBUtility.Gy_BaseFun.Fun_GetCol("上线比例", grdMain);
+            HLowerlimit = DBUtility.Gy_BaseFun.Fun_GetCol("下线比例", grdMain);
+            HUSEORGName = DBUtility.Gy_BaseFun.Fun_GetCol("组织", grdMain);
+            HMaker = DBUtility.Gy_BaseFun.Fun_GetCol("制单人", grdMain);
+            HMakeDate = DBUtility.Gy_BaseFun.Fun_GetCol("制单日期", grdMain);
+
+            //没有找到列
+            if (HStdWorkTimes == -1)
+            {
+                MessageBox.Show("没有找到【标准工时】的标题", "提示");
+                return;
+            }
+            if (HProcName == -1)
+            {
+                MessageBox.Show("没有找到【工序】的标题", "提示");
+                return;
+            }
+            if (HMaterName == -1)
+            {
+                MessageBox.Show("没有找到【物料】的标题", "提示");
+                return;
+            }
+            if (HUpperlimit == -1)
+            {
+                MessageBox.Show("没有找到【上线比例】的标题", "提示");
+                return;
+            }
+            if (HLowerlimit == -1)
+            {
+                MessageBox.Show("没有找到【下线比例】的标题", "提示");
+                return;
+            }
+            if (HUSEORGName == -1)
+            {
+                MessageBox.Show("没有找到【组织】的标题", "提示");
+                return;
+            }
+            if (HMaker == -1)
+            {
+                MessageBox.Show("没有找到【制单人】的标题", "提示");
+                return;
+            }
+            if (HMakeDate == -1)
+            {
+                MessageBox.Show("没有找到【制单日期】的标题", "提示");
+                return;
+            }
+            //
+            if (!Checkdata())
+            {
+                return;
+            }
+            if (grdMain.Rows.Count > 0)
+            { 
+                hnumber = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HMaterNum].Value);
+                BillNew.omodel.HMakeDate =  (DateTime.Today.Date).ToString();
+                BillNew.omodel.HUSEORGID =  DBUtility.ClsPub.HOrgID;
+                BillNew.omodel.HStopflag = false;
+                BillNew.DetailColl.Clear();
+            } 
+            for (int i = 0; i <= grdMain.Rows.Count - 1; i++)
+            {
+                if (DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HProcNum].Value) != "" && DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HMaterNum].Value) != "")
+                {
+                    //写入类
+                    if (WriteClass(i))
+                    {
+                        //保存记录
+                        if (!BillNew.AddNew())
+                        {
+                            MessageBox.Show("导入失败!原因:" + DBUtility.ClsPub.sExeReturnInfo, "提示");
+                            return;
+                        }
+                    }
+                }
+                else
+                {
+                    MessageBox.Show("工序代码或物料代码为空!原因:" + DBUtility.ClsPub.sExeReturnInfo, "提示");
+                    return;
+                }
+            }
+            MessageBox.Show("导入完毕");
+            grdMain.DataSource = null;
+        }
+
+        //写入类 从控件
+        private bool WriteClass(int row)
+        {
+            string sHNumber = "";
+            string sHNamePoc = "";
+            string HStopflag = "";
+            string HUSEORGID = "";
+            //string sHNumberWorkType = "";
+            string HStdWorkTimes = "";
+            string HUpperlimit="";  //上限比例
+            string HLowerlimit="";  //下限比例
+
+            int HMaterNum = DBUtility.Gy_BaseFun.Fun_GetCol("产品代码", grdMain);
+            int sMaterNameCol = DBUtility.Gy_BaseFun.Fun_GetCol("产品名称", grdMain);
+            int sModelCol = DBUtility.Gy_BaseFun.Fun_GetCol("规格型号", grdMain);
+            int HProcNum = DBUtility.Gy_BaseFun.Fun_GetCol("工序代码", grdMain);
+            int sProcNameCol = DBUtility.Gy_BaseFun.Fun_GetCol("工序", grdMain);
+            int sSourceNumberCol = DBUtility.Gy_BaseFun.Fun_GetCol("资源代码", grdMain);
+            int sSourceNameCol = DBUtility.Gy_BaseFun.Fun_GetCol("生产资源", grdMain);
+            int sPriceCol = DBUtility.Gy_BaseFun.Fun_GetCol("单价", grdMain);
+            //long HItemID = 0; 
+            //
+            sHNumber = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[HMaterNum].Value);
+            sHNamePoc = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[HProcNum].Value);
+            //
+            //
+            HStopflag = DBUtility.ClsPub.isBool(grdMain.Rows[row].Cells[HStopflag].Value).ToString();
+            HUSEORGID = DBUtility.ClsPub.HOrgID.ToString();
+            HStdWorkTimes = DBUtility.ClsPub.isSingle(grdMain.Rows[row].Cells[HStdWorkTimes].Value).ToString();
+            HUpperlimit = DBUtility.ClsPub.isSingle(grdMain.Rows[row].Cells[HUpperlimit].Value).ToString();
+            HLowerlimit = DBUtility.ClsPub.isSingle(grdMain.Rows[row].Cells[HLowerlimit].Value).ToString();
+
+            //判断是否允许 保存
+            if (!DBUtility.ClsPub.AllowNumber(sHNumber))
+            {
+                MessageBox.Show("产品代码中不能出现连续‘.’并且首位末位不能为‘.’!", "提示");
+                return false;
+            }
+            if (!DBUtility.ClsPub.AllowNumber(sHNamePoc))
+            {
+                MessageBox.Show("工序代码中不能出现连续‘.’并且首位末位不能为‘.’!", "提示");
+                return false;
+            }
+
+            Model.ClsGy_StdWorkTimes_Model oSub = new Model.ClsGy_StdWorkTimes_Model();
+
+            //得到工序内码
+            if (oProcHlp.GetInfoByName(sHNamePoc))
+            {
+                oSub.HProcID = oProcHlp.omodel.HItemID;
+            }
+            //得到物料内码
+            if (oMaterHlp.GetInfoByName(sHNumber))
+            {
+                oSub.HMaterID = oMaterHlp.omodel.HItemID;
+            }
+
+
+            //写入信息
+            oSub.HEntryID = j;
+
+            oSub.HMaker = DBUtility.ClsPub.CurUserName;
+            oSub.HMakeDate = (DateTime.Today.Date).ToString();
+            oSub.HStdWorkTimes = double.Parse(HStdWorkTimes);
+            oSub.HRemark = "";
+            oSub.HUpperlimit = double.Parse(HUpperlimit);
+            oSub.HLowerlimit = double.Parse(HLowerlimit);
+            oSub.HStopflag = bool.Parse(HStopflag);
+
+
+            BillNew.DetailColl.Add(oSub);
+            return true;
+        }
+
+        //检查物料
+        private bool Checkdata()
+        {
+            bool b = false;
+            string sErrMsg = "";
+            string sMsg = "";
+            for (int i = 0; i <= grdMain.Rows.Count - 1; i++)
+            {
+                string sHNumber = "";
+                string sHNamePoc = "";
+
+                //
+                sHNumber = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HMaterNum].Value);
+                sHNamePoc = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HProcNum].Value);
+                if (sHNumber != "")
+                {
+                    // 
+                    //审核代码是否合理
+                    if (!DBUtility.ClsPub.AllowNumber(sHNumber))
+                    {
+                        MessageBox.Show("物料代码中不能出现连续‘.’并且首位末位不能为‘.’!", "提示");
+                        return false;
+                    }
+                    //得到物料内码
+                    int j = i + HBeginRow;
+                    if (!oMaterHlp.GetInfoByNumber(sHNumber))
+                    {
+                        sMsg = "[" + sHNumber + "]物料不存在";
+                        if (sErrMsg.Contains(sMsg) == false)
+                        {
+                            sErrMsg = sErrMsg + "[" + sHNumber + "]物料不存在\r\n";
+                        }
+                        b = true;
+                    }
+                    //得到工序内码
+                    if (!oProcHlp.GetInfoByName(sHNamePoc))
+                    {
+                        sMsg = "[" + sHNamePoc + "]工序不存在";
+                        if (sErrMsg.Contains(sMsg) == false)
+                        {
+                            sErrMsg = sErrMsg + "[" + sHNamePoc + "]工序不存在\r\n";
+                        }
+                        b = true;
+                    }
+                }
+            }
+            if (b == true)
+            {
+                Pub_Control.ErrMsgBox oMsgbox = new Pub_Control.ErrMsgBox();
+                oMsgbox.txtHErrMsg.Text = sErrMsg;
+                oMsgbox.ShowDialog();
+                return false;
+            }
+            else
+            {
+                return true;
+            }
+        }
+
+        private void Gy_StdWorkTimes_RoutingBill_Load(object sender, EventArgs e)
+        {
+
+        }
     }
 }
+
diff --git "a/PlanM/\346\225\260\346\215\256\345\257\274\345\205\245/Gy_StdWorkTimes_RoutingBill.resx" "b/PlanM/\346\225\260\346\215\256\345\257\274\345\205\245/Gy_StdWorkTimes_RoutingBill.resx"
index 1af7de1..d55421f 100644
--- "a/PlanM/\346\225\260\346\215\256\345\257\274\345\205\245/Gy_StdWorkTimes_RoutingBill.resx"
+++ "b/PlanM/\346\225\260\346\215\256\345\257\274\345\205\245/Gy_StdWorkTimes_RoutingBill.resx"
@@ -1,4 +1,4 @@
-锘�<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <root>
   <!-- 
     Microsoft ResX Schema 
@@ -117,4 +117,7 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
 </root>
\ No newline at end of file
diff --git a/WebAPI/Controllers/Kf_EntrustInBillController.cs b/WebAPI/Controllers/Kf_EntrustInBillController.cs
index a3059f5..807dcc9 100644
--- a/WebAPI/Controllers/Kf_EntrustInBillController.cs
+++ b/WebAPI/Controllers/Kf_EntrustInBillController.cs
@@ -44,6 +44,7 @@
         private JsonResult objJsonResult = new JsonResult();
         public WebS.WebService1 oWebs = new WebS.WebService1();
         public WebS.ClsKf_ICStockBill_WMS WebSoBar = new WebS.ClsKf_ICStockBill_WMS();
+        public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
 
         /// <summary>
         /// 濮斿鍏ュ簱/鎵潯鐮�/鐩存帴璋僿ebservice
@@ -436,5 +437,143 @@
                 return objJsonResult;
             }
         }
+
+
+        #region 濮斿鍑哄簱
+        /// <summary>
+        /// 濮斿鍑哄簱/鎻愪氦/鐩存帴璋冪敤webservice
+        /// </summary>
+        /// <returns></returns>
+        [Route("Kf_EntrustInBill/set_SaveEntrustOutBill_Json")]
+        [HttpPost]
+        public object set_SaveEntrustOutBill_Json([FromBody] JObject oMain)
+        {
+            var _value = oMain["oMain"].ToString();
+            string msg1 = _value.ToString();
+            try
+            {
+                List<Model.ClsKf_EntrustInBillMain> lsmain = new List<Model.ClsKf_EntrustInBillMain>();
+                ListModels oListModels = new ListModels();
+                lsmain = oListModels.getEntrustInBillMainByJson(msg1);
+                lsmain[0].HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
+                lsmain[0].HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));
+                lsmain[0].HBillType = "1211";
+
+                WebAPI.WebS.ClsKf_EntrustInBillMain websLsmain = new WebS.ClsKf_EntrustInBillMain();
+
+                websLsmain.HInterID = lsmain[0].HInterID;
+                websLsmain.HInnerBillNo = "";
+                websLsmain.HDate = lsmain[0].HDate;
+                websLsmain.HBillNo = lsmain[0].HBillNo;
+                websLsmain.HBillType = lsmain[0].HBillType;
+                websLsmain.HBillerID = DBUtility.ClsPub.isLong(DBUtility.ClsPub.CurUserID);
+                websLsmain.HDeptID = lsmain[0].HDeptID;
+                websLsmain.HEmpID = lsmain[0].HEmpID;
+                websLsmain.HRemark = "";
+                websLsmain.HRedBlueFlag = lsmain[0].HRedBlueFlag;
+                websLsmain.HMaker = lsmain[0].HMaker;
+                websLsmain.HSupID = lsmain[0].HSupID;
+                websLsmain.HSecManagerID = lsmain[0].HSecManagerID;
+                websLsmain.HSCWHID = lsmain[0].HSCWHID;
+                websLsmain.HKeeperID = lsmain[0].HKeeperID;
+                websLsmain.HMainSourceBillType = "1604";
+                websLsmain.HMangerID = lsmain[0].HMangerID;
+                websLsmain.HWHID = lsmain[0].HWHID;
+                websLsmain.HExplanation = lsmain[0].HExplanation;
+
+                string sSourceBillType = "1604";
+
+                if (webserver.set_SaveEntrustInBill_New(websLsmain, sSourceBillType, ref DBUtility.ClsPub.sErrInfo))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鐢熸垚濮斿鍑哄簱鍗曟垚鍔燂紒鍗曟嵁鍙蜂负锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "涓婁紶澶辫触锛�" + DBUtility.ClsPub.sErrInfo;
+                    objJsonResult.data = websLsmain;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "涓婁紶澶辫触锛佸紓甯�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        /// <summary>
+        /// 濮斿鍑哄簱 鎵弿婧愬崟锛屽皢婧愬崟淇℃伅鍐欏叆鏉$爜涓存椂琛�
+        /// </summary>
+        /// <param name="HSourceBillNo"></param>
+        /// <returns></returns>
+        [Route("Kf_EntrustInBill/GetWW_PPBomBillMainByHSourceBillNo")]
+        [HttpGet]
+        public object GetWW_PPBomBillMainByHSourceBillNo(string HSourceBillType, string HSourceBillNo, Int64 sInterID, string sBillNo)
+        {
+            try
+            {
+                string sWhere = " Where 鍗曟嵁鍙� like '%" + HSourceBillNo.Trim() + "%'";
+                if (HSourceBillType == "1604")
+                {
+                    ds = oCn.RunProcReturn("Select HBillNo,HSupID,s.HName HSupName from WW_PPBomBillMain a left join Gy_Supplier s on a.HSupID=s.HItemID Where HBillNo='" + HSourceBillNo+"'", "WW_PPBomBillMain");
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍,婧愬崟绫诲瀷鏈夐敊璇紒";
+                    objJsonResult.data = null;
+                    return objJsonResult; ;
+                }
+
+                if (ds == null || ds.Tables[0].Rows.Count <= 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                    //DBUtility.ClsPub.MessageBeep((int)DBUtility.ClsPub.BeepType.Warning);
+                }
+                else
+                {
+                    if (webserver.set_SavePonderationBillMain_Temp_Source_Fast(sInterID, sBillNo, "1211", HSourceBillNo, HSourceBillType, "钃濆瓧", ref DBUtility.ClsPub.sErrInfo))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
+                        objJsonResult.data = ds.Tables[0];
+                        return objJsonResult;
+                    }
+                    else
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍐欏叆涓存椂琛ㄥけ璐ワ紒" + DBUtility.ClsPub.sErrInfo;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+            }
+            catch (Exception ex)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
     }
 }

--
Gitblit v1.9.1