From 0fd7f552d345c2988ad704dbfeace766428ab47b Mon Sep 17 00:00:00 2001
From: 杨乐 <yang.le.192@qq.com>
Date: 星期二, 28 十二月 2021 14:38:41 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/工资管理/Gy_ClassTimePrjSubController.cs |   37 ++++++-
 WarM/条码打印/Sc_ICMOToBarCode.cs                           |  157 +++++++++++++++++++++---------
 WarM/条码打印/Sc_ICMOToBarCode.designer.cs                  |   85 +++++++++++-----
 WebAPI/Controllers/SellOutController.cs                 |    1 
 WebAPI/Controllers/MoveStockBillController.cs           |    9 +
 WebAPI/WebServer.cs                                     |    5 +
 6 files changed, 211 insertions(+), 83 deletions(-)

diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Sc_ICMOToBarCode.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Sc_ICMOToBarCode.cs"
index 657158f..29ed5b8 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Sc_ICMOToBarCode.cs"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Sc_ICMOToBarCode.cs"
@@ -57,6 +57,9 @@
             //}
             string HICMOBillNo = "";
             HICMOBillNo = txtHICMOBillNo.Text.Trim().ToString();
+            //閿�鍞鍗曞彿
+            string HSeOrderBillNo = "";
+            HICMOBillNo = txtHSeOrderBillNo.Text.Trim().ToString();
             //鐗╂枡
             //if (txtHMaterID.Text.Trim() != "")
             //{
@@ -98,7 +101,7 @@
             //杩囨护鏉′欢
 
             //
-            DSet = SubCn.RunProcReturn("exec h_p_KSTMSC '" + HICMOBillNo + "' , '" + HMaterName + "' , '" + HSourceName + "' ,'" + HEmpName + "' ,'" + HBeginDate + "', '" + HEndDate + "'", "h_p_KSTMSC", ref DBUtility.ClsPub.sExeReturnInfo);
+            DSet = SubCn.RunProcReturn("exec h_p_KSTMSC '" + HSeOrderBillNo + "' ,'" + HICMOBillNo + "' , '" + HMaterName + "' , '" + HSourceName + "' ,'" + HEmpName + "' ,'" + HBeginDate + "', '" + HEndDate + "'", "h_p_KSTMSC", ref DBUtility.ClsPub.sExeReturnInfo);
             //鐢熸垚棣栬鏍囬
             if (DSet == null)
             {
@@ -757,6 +760,97 @@
 
         private void button4_Click(object sender, EventArgs e)
         {
+            //1.鑾峰彇鐣岄潰涓婇潰鏁寸鏁伴噺妗嗚緭鍏ョ殑鏁伴噺 璧嬪�肩粰鍙橀噺  骞跺埛鏂扮綉鏍�
+            double HBarCodeQty = 0;
+            double HZXQty = 0;
+            HZXQty = ClsPub.isDoule(txtHZXQty.Text);
+            if (HZXQty ==0)
+            {
+                MessageBox.Show("璇疯緭鍏ユ暣绠辨暟閲忥紒");
+                return;
+            }
+            Display();
+            //2.鑾峰彇缃戞牸閫変腑琛岀墿鏂橧D
+            int a = grdMain.CurrentRow.Index;
+            long HMaterID = 0;
+            HMaterID = DBUtility.ClsPub.isLong(grdMain.Rows[a].Cells[Fun_GetCol("HMaterID")].Value);
+                if (HMaterID == 0)
+                {
+                    MessageBox.Show("娌℃湁閫変腑浠讳綍璁板綍锛�");
+                    return;
+                }
+            //3.瀹氫箟鏄惁缁勬墭鐨勫彉閲�
+            int Mul = 0;
+            //4.鏍规嵁鍗曟嵁绫诲瀷鑾峰彇鏈鏉$爜涓诲唴鐮丠InterID
+            HInterID = DBUtility.ClsPub.CreateBillID_Prod(ModName, ref DBUtility.ClsPub.sExeReturnInfo);
+            //5.浠庣綉鏍肩涓�琛屽惊鐜嚦鏈�鍚庝竴琛�  鍒ゆ柇I琛岀殑鐗╂枡鍐呯爜涓嶮鏄惁涓�鑷达紱濡傛灉涓嶄竴鑷村垯寰幆涓嬩竴琛岋紱
+            for (int i = 0; i < grdMain.Rows.Count; i++)
+            {
+                long HGrdMaterID = 0;
+                HGrdMaterID = DBUtility.ClsPub.isLong(grdMain.Rows[grdMain.Rows[i].Index].Cells[Fun_GetCol("HMaterID")].Value);
+                if (HMaterID == HGrdMaterID)
+                {
+                    double HDDQty = 0;
+                    HDDQty = DBUtility.ClsPub.isDoule(grdMain.Rows[grdMain.Rows[i].Index].Cells[Fun_GetCol("璁㈠崟鏁伴噺")].Value);
+                    if (HDDQty >= HZXQty)
+                    {
+                        HBarCodeQty = HZXQty;
+                        this.Sub_SaveBill();
+                        Display();
+                        Mul = Mul + 1;
+                        break;
+                    }
+                    else if(HDDQty < HZXQty)
+                    {
+                        HBarCodeQty = HDDQty;
+                        HZXQty = HZXQty - HDDQty;
+                        this.Sub_SaveBill();
+                        Mul = Mul + 1;
+                    }
+                }
+            }
+
+
+            //3.鍏堝垽鏂墿鏂欐槸鍚︿竴鑷�  濡傛灉涓�鑷村紑濮嬪惊鐜綉鏍�
+            for (int i = 0; i < grdMain.Rows.Count; i++)
+            {
+                //long HGrdMaterID = 0;
+                //HGrdMaterID = DBUtility.ClsPub.isLong(grdMain.Rows[grdMain.Rows[i].Index].Cells[Fun_GetCol("HMaterID")].Value);
+                //if (HGrdMaterID == HMaterID)
+                //{
+                //    double HDDQty = 0;
+                //    HDDQty = DBUtility.ClsPub.isDoule(grdMain.Rows[grdMain.Rows[i].Index].Cells[Fun_GetCol("璁㈠崟鏁伴噺")].Value);
+                //    //濡傛灉寰幆鐨勮琛岃褰曠殑璁㈠崟鏁伴噺宸茬粡澶т簬绛変簬鏈瑁呯鏁伴噺  鍒欑洿鎺ョ敓鎴愬敮涓�鐮�  骞朵笖鍒锋柊缃戞牸  鍒锋柊鏉$爜淇℃伅椤�
+                //    if (HDDQty >= HZXQty)
+                //    {
+                //        double HBarCodeQty = 0;
+                //        HBarCodeQty = HZXQty;
+                //        this.Sub_SaveBill();
+                //        Display();
+                //    }
+                //    //濡傛灉鏀硅璁板綍璁㈠崟鏁伴噺灏忎簬鏈瑁呯鏁伴噺 鍒欑户缁惊鐜�  璧扮敓鎴愭墭鏉$爜鏂规硶
+                //    else  
+                //    {
+                //        //鏌ュ嚭绗﹀悎鏉′欢鐨勯�変腑杩欐潯鏁伴噺璺熻绠辨暟閲忕殑宸紓鍊�
+                //        double HCYQty = 0;
+                //        HCYQty = HZXQty - DBUtility.ClsPub.isLong(grdMain.Rows[grdMain.Rows[i].Index].Cells[Fun_GetCol("璁㈠崟鏁伴噺")].Value);
+
+                //    }
+
+                //}
+                //else
+                //{
+                   
+                //}
+            }
+
+
+
+           
+        }
+
+        private void Sub_SaveBill()
+        {
             HInterID = DBUtility.ClsPub.CreateBillID_Prod(ModName, ref DBUtility.ClsPub.sExeReturnInfo);
             string HMaterNumber = "";
             string HBatchNo = "";
@@ -769,8 +863,8 @@
             DataSet Ds;
             int LSH = 0;                //娴佹按鍙�
             string LSH2 = "";           //娴佹按鍙疯浆鎹㈡垚瀛楃
-            double HSumQty = 0;         //浜у搧鏁伴噺
-            double HMinQty = 0;         //鏈�灏忓寘瑁呮暟
+            double HZXQty = 0;         //瑁呯鏁伴噺
+            double HDDQty = 0;         //璁㈠崟鏁伴噺
             double HBQty = 0;         //绠辨暟
             int k = 0;
             int n = 0;                  //鍚屼竴鎵圭敓鎴愭潯鐮佷腑鐨勭鍑犳潯
@@ -788,23 +882,11 @@
                 HDay = "0" + ClsPub.isDate(HDate).Day.ToString();
                 HDay = HDay.Substring(HDay.Length - 2, 2);
                 HOrgNumber = ClsPub.HOrgNumber;
-                //绠辨暟鍒�=鏁伴噺/鏈�灏忓寘瑁呮暟
-                //double sMoney = 0;
-                //if ((DBUtility.ClsPub.isLong(grdMain.SelectedRows[j].Cells[Fun_GetCol("HMiniQty")].Value) == 0))
-                //{
-                //    sMoney = 0;
-                //}
-                //else
-                //{
-                //    sMoney = ClsPub.isDoule(grdMain.SelectedRows[j].Cells[Fun_GetCol("HQty")].Value) / ClsPub.isDoule(grdMain.SelectedRows[j].Cells[Fun_GetCol("HMiniQty")].Value);
-                //}
-                //sMoney = Math.Ceiling(sMoney);
-                //grdMain.SelectedRows[j].Cells[Fun_GetCol("HBQty")].Value = sMoney;
 
 
-                HBQty = HBQty + ClsPub.isInt(txtHBQty.Text);
-                HMinQty = ClsPub.isDoule(txtHMiniQty.Text);
-                HSumQty = ClsPub.isDoule(txtHICMOQty.Text);
+                //HBQty = HBQty + ClsPub.isInt(txtHBQty.Text);
+                HZXQty = ClsPub.isDoule(txtHZXQty.Text);
+                HDDQty = DBUtility.ClsPub.isDoule(grdMain.Rows[grdMain.SelectedRows[j].Index].Cells[Fun_GetCol("璁㈠崟鏁伴噺")].Value);
 
 
                 if (cmbHBarCodeType.Text == "鍞竴鏉$爜")
@@ -818,27 +900,7 @@
                     TM = HOrgNumber + HMaterNumber + HBatchNo;
                 }
                 n = 0;
-                for (int i = k; i < HBQty; i++)
-                {
-                    if (HSumQty - HMinQty > 0)
-                    {
-                        WeiShu = "";
-                        HSumQty = HSumQty - HMinQty;
-                    }
-                    else
-                    {
-                        if (HSumQty == HMinQty)
-                        {
-                            WeiShu = "";
-                        }
-                        else
-                        {
-                            WeiShu = "灏炬暟";
-                        }
-                        HMinQty = HSumQty;
-                    }
-                    //
-                    LSH = LSH + 1;
+                   
                     LSH2 = LSH.ToString();
                     while (LSH2.Length < LSHlen)  //濡傛灉娴佹按鍙峰皬浜�6浣嶆暟鍓嶉潰琛�0
                     {
@@ -857,7 +919,7 @@
                     string HWei = "";      //灏炬暟
                     string HBarCode = "";
                     string HBarCodeType = "";
-                    Int64 HMaterID = 0;
+                    Int64 HMaterID1 = 0;
                     Int64 HAuxPropID = 0;
                     Int64 HUnitID = 0;
                     double HQty2 = 0;
@@ -891,10 +953,10 @@
                         HWei = WeiShu;
                         HBarCode = TM;
                         HBarCodeType = ClsPub.isStrNull(cmbHBarCodeType.Text);
-                        HMaterID = ClsPub.isLong(grdMain.SelectedRows[j].Cells[Fun_GetCol("HMaterID")].Value);
+                        HMaterID1 = ClsPub.isLong(grdMain.SelectedRows[j].Cells[Fun_GetCol("HMaterID")].Value);
                         HAuxPropID = 0;
                         HUnitID = 0;
-                        HQty2 = HMinQty;
+                        HQty2 = HZXQty;
                         HBatchNo2 = ClsPub.isStrNull(grdMain.SelectedRows[j].Cells[Fun_GetCol("鎵规")].Value);
                         HSourceInterID = 0;
                         HSourceEntryID = 0;
@@ -925,7 +987,7 @@
                                             ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID " +
                                             ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo " +
                                             ") values ("
-                                            + "'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HQty2.ToString()
+                                            + "'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID1.ToString() + "," + HUnitID.ToString() + "," + HQty2.ToString()
                                             + ",'" + HBatchNo2 + "'," + HSupID.ToString() + "," + HGroupID.ToString() + ",'" + ClsPub.CurUserName + "',getdate()," + HPrintQty.ToString() + "," + HQty2.ToString()
                                             + ", " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HWei + "'"
                                             + ", " + HBarcodeQtys.ToString() + "," + HBarcodeNo.ToString() + "," + HDeptID.ToString() + "," + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HRemark + "'"
@@ -943,10 +1005,9 @@
                         oCn.RollBack();
                         MessageBox.Show("鏉$爜鐢熸垚澶辫触锛�" + e1.Message);
                     }
-
-                }
             }
         }
+
 
 
         private void DisplayTM()
@@ -1197,9 +1258,9 @@
 
             for (int i = 0; i < grdMain.SelectedRows.Count; i++)
             {
-                txtHICMOQty.Text = DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("璁㈠崟鏁伴噺")].Value);
+                txtHZXQty.Text = DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("璁㈠崟鏁伴噺")].Value);
             }
-            HICMOQty = DBUtility.ClsPub.isDoule(txtHICMOQty.Text.Trim());
+            HICMOQty = DBUtility.ClsPub.isDoule(txtHZXQty.Text.Trim());
             HMiniQty = DBUtility.ClsPub.isDoule(txtHMiniQty.Text.Trim());
             if (HMiniQty == 0)
             {
@@ -1293,7 +1354,7 @@
             txtHEmpID.Text = "";
             txtHICMOBillNo.Text = "";
             txtHICMOBillNo1.Text = "";
-            txtHICMOQty.Text = "";
+            txtHZXQty.Text = "";
             txtHMaterID.Text = "";
             txtHMaterID1.Text = "";
             txtHMiniQty.Text = "";
diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Sc_ICMOToBarCode.designer.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Sc_ICMOToBarCode.designer.cs"
index 2d48dc9..8001f74 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Sc_ICMOToBarCode.designer.cs"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Sc_ICMOToBarCode.designer.cs"
@@ -81,12 +81,14 @@
             this.cmdHMaterID1 = new System.Windows.Forms.Button();
             this.grdSub = new System.Windows.Forms.DataGridView();
             this.button1 = new System.Windows.Forms.Button();
-            this.璁㈠崟鏁伴噺 = new System.Windows.Forms.Label();
-            this.txtHICMOQty = new System.Windows.Forms.TextBox();
+            this.鏁寸鏁伴噺 = new System.Windows.Forms.Label();
+            this.txtHZXQty = new System.Windows.Forms.TextBox();
             this.tabControl1 = new System.Windows.Forms.TabControl();
             this.tabPage1 = new System.Windows.Forms.TabPage();
             this.tabPage2 = new System.Windows.Forms.TabPage();
             this.grdList = new System.Windows.Forms.DataGridView();
+            this.txtHSeOrderBillNo = new System.Windows.Forms.TextBox();
+            this.label9 = new System.Windows.Forms.Label();
             this.Tool.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.grdMain)).BeginInit();
             this.gbUp.SuspendLayout();
@@ -342,6 +344,8 @@
             // gbUp
             // 
             this.gbUp.BackColor = System.Drawing.Color.Transparent;
+            this.gbUp.Controls.Add(this.txtHSeOrderBillNo);
+            this.gbUp.Controls.Add(this.label9);
             this.gbUp.Controls.Add(this.cmbHBarCodeType);
             this.gbUp.Controls.Add(this.label8);
             this.gbUp.Controls.Add(this.cmdHSaveBill);
@@ -373,7 +377,7 @@
             this.cmbHBarCodeType.Items.AddRange(new object[] {
             "鍞竴鏉$爜",
             "鎵规鏉$爜"});
-            this.cmbHBarCodeType.Location = new System.Drawing.Point(826, 75);
+            this.cmbHBarCodeType.Location = new System.Drawing.Point(871, 77);
             this.cmbHBarCodeType.Margin = new System.Windows.Forms.Padding(2);
             this.cmbHBarCodeType.Name = "cmbHBarCodeType";
             this.cmbHBarCodeType.Size = new System.Drawing.Size(140, 28);
@@ -384,7 +388,7 @@
             this.label8.AutoSize = true;
             this.label8.Font = new System.Drawing.Font("瀹嬩綋", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label8.ForeColor = System.Drawing.Color.Black;
-            this.label8.Location = new System.Drawing.Point(748, 82);
+            this.label8.Location = new System.Drawing.Point(793, 84);
             this.label8.Name = "label8";
             this.label8.Size = new System.Drawing.Size(72, 16);
             this.label8.TabIndex = 138;
@@ -394,7 +398,7 @@
             // 
             this.cmdHSaveBill.BackColor = System.Drawing.Color.White;
             this.cmdHSaveBill.Font = new System.Drawing.Font("瀹嬩綋", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.cmdHSaveBill.Location = new System.Drawing.Point(1010, 66);
+            this.cmdHSaveBill.Location = new System.Drawing.Point(1026, 66);
             this.cmdHSaveBill.Margin = new System.Windows.Forms.Padding(2);
             this.cmdHSaveBill.Name = "cmdHSaveBill";
             this.cmdHSaveBill.Size = new System.Drawing.Size(112, 50);
@@ -407,10 +411,10 @@
             // 
             this.dtpHEndDate.Font = new System.Drawing.Font("瀹嬩綋", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.dtpHEndDate.Format = System.Windows.Forms.DateTimePickerFormat.Short;
-            this.dtpHEndDate.Location = new System.Drawing.Point(478, 75);
+            this.dtpHEndDate.Location = new System.Drawing.Point(602, 76);
             this.dtpHEndDate.Margin = new System.Windows.Forms.Padding(2);
             this.dtpHEndDate.Name = "dtpHEndDate";
-            this.dtpHEndDate.Size = new System.Drawing.Size(213, 30);
+            this.dtpHEndDate.Size = new System.Drawing.Size(154, 30);
             this.dtpHEndDate.TabIndex = 102;
             // 
             // label5
@@ -418,7 +422,7 @@
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("瀹嬩綋", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label5.ForeColor = System.Drawing.Color.Black;
-            this.label5.Location = new System.Drawing.Point(399, 83);
+            this.label5.Location = new System.Drawing.Point(523, 84);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(72, 16);
             this.label5.TabIndex = 101;
@@ -428,10 +432,10 @@
             // 
             this.dtpHBeginDate.Font = new System.Drawing.Font("瀹嬩綋", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.dtpHBeginDate.Format = System.Windows.Forms.DateTimePickerFormat.Short;
-            this.dtpHBeginDate.Location = new System.Drawing.Point(112, 77);
+            this.dtpHBeginDate.Location = new System.Drawing.Point(336, 77);
             this.dtpHBeginDate.Margin = new System.Windows.Forms.Padding(2);
             this.dtpHBeginDate.Name = "dtpHBeginDate";
-            this.dtpHBeginDate.Size = new System.Drawing.Size(213, 30);
+            this.dtpHBeginDate.Size = new System.Drawing.Size(154, 30);
             this.dtpHBeginDate.TabIndex = 100;
             // 
             // label6
@@ -439,7 +443,7 @@
             this.label6.AutoSize = true;
             this.label6.Font = new System.Drawing.Font("瀹嬩綋", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label6.ForeColor = System.Drawing.Color.Black;
-            this.label6.Location = new System.Drawing.Point(33, 85);
+            this.label6.Location = new System.Drawing.Point(257, 85);
             this.label6.Name = "label6";
             this.label6.Size = new System.Drawing.Size(72, 16);
             this.label6.TabIndex = 99;
@@ -674,23 +678,23 @@
             this.button1.UseVisualStyleBackColor = false;
             this.button1.Click += new System.EventHandler(this.button1_Click);
             // 
-            // 璁㈠崟鏁伴噺
+            // 鏁寸鏁伴噺
             // 
-            this.璁㈠崟鏁伴噺.AutoSize = true;
-            this.璁㈠崟鏁伴噺.Font = new System.Drawing.Font("瀹嬩綋", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.璁㈠崟鏁伴噺.Location = new System.Drawing.Point(900, 190);
-            this.璁㈠崟鏁伴噺.Name = "璁㈠崟鏁伴噺";
-            this.璁㈠崟鏁伴噺.Size = new System.Drawing.Size(120, 27);
-            this.璁㈠崟鏁伴噺.TabIndex = 148;
-            this.璁㈠崟鏁伴噺.Text = "璁㈠崟鏁伴噺";
+            this.鏁寸鏁伴噺.AutoSize = true;
+            this.鏁寸鏁伴噺.Font = new System.Drawing.Font("瀹嬩綋", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.鏁寸鏁伴噺.Location = new System.Drawing.Point(900, 190);
+            this.鏁寸鏁伴噺.Name = "鏁寸鏁伴噺";
+            this.鏁寸鏁伴噺.Size = new System.Drawing.Size(120, 27);
+            this.鏁寸鏁伴噺.TabIndex = 148;
+            this.鏁寸鏁伴噺.Text = "鏁寸鏁伴噺";
             // 
-            // txtHICMOQty
+            // txtHZXQty
             // 
-            this.txtHICMOQty.Location = new System.Drawing.Point(900, 221);
-            this.txtHICMOQty.Multiline = true;
-            this.txtHICMOQty.Name = "txtHICMOQty";
-            this.txtHICMOQty.Size = new System.Drawing.Size(112, 42);
-            this.txtHICMOQty.TabIndex = 147;
+            this.txtHZXQty.Location = new System.Drawing.Point(900, 221);
+            this.txtHZXQty.Multiline = true;
+            this.txtHZXQty.Name = "txtHZXQty";
+            this.txtHZXQty.Size = new System.Drawing.Size(112, 42);
+            this.txtHZXQty.TabIndex = 147;
             // 
             // tabControl1
             // 
@@ -738,6 +742,27 @@
             this.grdList.Size = new System.Drawing.Size(866, 269);
             this.grdList.TabIndex = 20;
             // 
+            // txtHSeOrderBillNo
+            // 
+            this.txtHSeOrderBillNo.Font = new System.Drawing.Font("瀹嬩綋", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txtHSeOrderBillNo.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+            this.txtHSeOrderBillNo.Location = new System.Drawing.Point(112, 79);
+            this.txtHSeOrderBillNo.Name = "txtHSeOrderBillNo";
+            this.txtHSeOrderBillNo.ReadOnly = true;
+            this.txtHSeOrderBillNo.Size = new System.Drawing.Size(123, 30);
+            this.txtHSeOrderBillNo.TabIndex = 141;
+            // 
+            // label9
+            // 
+            this.label9.AutoSize = true;
+            this.label9.Font = new System.Drawing.Font("瀹嬩綋", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label9.ForeColor = System.Drawing.Color.Black;
+            this.label9.Location = new System.Drawing.Point(19, 85);
+            this.label9.Name = "label9";
+            this.label9.Size = new System.Drawing.Size(88, 16);
+            this.label9.TabIndex = 140;
+            this.label9.Text = "閿�鍞鍗曞彿";
+            // 
             // Sc_ICMOToBarCode
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -745,8 +770,8 @@
             this.BackColor = System.Drawing.SystemColors.ActiveCaption;
             this.ClientSize = new System.Drawing.Size(1172, 869);
             this.Controls.Add(this.tabControl1);
-            this.Controls.Add(this.璁㈠崟鏁伴噺);
-            this.Controls.Add(this.txtHICMOQty);
+            this.Controls.Add(this.鏁寸鏁伴噺);
+            this.Controls.Add(this.txtHZXQty);
             this.Controls.Add(this.button1);
             this.Controls.Add(this.grdSub);
             this.Controls.Add(this.groupBox1);
@@ -831,12 +856,14 @@
         private System.Windows.Forms.Button cmdHMaterID1;
         private System.Windows.Forms.DataGridView grdSub;
         private System.Windows.Forms.Button button1;
-        private System.Windows.Forms.Label 璁㈠崟鏁伴噺;
-        private System.Windows.Forms.TextBox txtHICMOQty;
+        private System.Windows.Forms.Label 鏁寸鏁伴噺;
+        private System.Windows.Forms.TextBox txtHZXQty;
         private System.Windows.Forms.TabControl tabControl1;
         private System.Windows.Forms.TabPage tabPage1;
         private System.Windows.Forms.TabPage tabPage2;
         private System.Windows.Forms.DataGridView grdList;
         private System.Windows.Forms.ToolStripButton cz;
+        private System.Windows.Forms.TextBox txtHSeOrderBillNo;
+        private System.Windows.Forms.Label label9;
     }
 }
\ No newline at end of file
diff --git a/WebAPI/Controllers/MoveStockBillController.cs b/WebAPI/Controllers/MoveStockBillController.cs
index dae3db8..dea99db 100644
--- a/WebAPI/Controllers/MoveStockBillController.cs
+++ b/WebAPI/Controllers/MoveStockBillController.cs
@@ -605,7 +605,14 @@
                 // DataSet ds = new DataSet();
                 // WebServer webserver = new WebServer();
                 string sWhere = " Where 鍗曟嵁鍙� like '%" + HSourceBillNo.Trim() + "%'";
-                ds = webserver.GetSc_PPBomBillList(sWhere);
+                if (HSourceBillType == "3720")
+                {
+                    ds = webserver.GetSc_PPBomBillList(sWhere);
+                }
+                else if (HSourceBillType == "1243")
+                {
+                    ds = webserver.GetKf_MoveStockRequestBillList(sWhere);
+                }
                 if (ds == null || ds.Tables[0].Rows.Count <= 0)
                 {
 
diff --git a/WebAPI/Controllers/SellOutController.cs b/WebAPI/Controllers/SellOutController.cs
index 3e0e9a6..93914fa 100644
--- a/WebAPI/Controllers/SellOutController.cs
+++ b/WebAPI/Controllers/SellOutController.cs
@@ -535,6 +535,7 @@
                 websLsmain.HEmpID = lsmain[0].HEmpID;
                 websLsmain.HRemark = lsmain[0].HRemark;
                 websLsmain.HMaker = lsmain[0].HMaker;
+                websLsmain.HKeeperID= lsmain[0].HKeeperID;
 
                 if (webserver.set_SaveSellOutBill_New(websLsmain, sSourceBillType, ref DBUtility.ClsPub.sErrInfo))
                 {
diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Gy_ClassTimePrjSubController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Gy_ClassTimePrjSubController.cs"
index c3d376f..f7ec5a2 100644
--- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Gy_ClassTimePrjSubController.cs"
+++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Gy_ClassTimePrjSubController.cs"
@@ -142,7 +142,7 @@
                 string HNumber = list[0].HNumber;
                 string HName = list[0].HName;
                 string HMaker = list[0].HMaker;
-            
+
                 //淇濆瓨
                 //淇濆瓨瀹屾瘯鍚庡鐞�
                 if (HInterID == 0)
@@ -158,7 +158,8 @@
                     //淇敼涓婄骇涓洪潪鏈骇浠g爜
                     oCN.Commit();
                 }
-                else { 
+                else
+                {
                     //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
                     oCN.BeginTran();
                     //涓昏〃
@@ -205,7 +206,7 @@
             DataSet ds1;
             try
             {
-               
+
                 SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                 if (string.IsNullOrWhiteSpace(HItemID))
                 {
@@ -236,8 +237,34 @@
         }
 
 
+        /// <summary>
+        /// 淇濆瓨鎸夐挳
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("Gy_ClassTimePrjSub/ModifyByID")]
+        [HttpPost]
+        public object Calc(string HEntryID, string HYear, string HPeriod)
+        {
+            try
+            {
+                oCN.RunProcReturn("exec h_p_Pay_GetAvgMoney " + HYear.ToString() + "," + HPeriod.ToString() + "," + HEntryID.ToString(), "pjgz");
 
-
-
+                objJsonResult.code = "0";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+                objJsonResult.data = 1;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                oCN.RollBack();
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.Message;
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
     }
 }
\ No newline at end of file
diff --git a/WebAPI/WebServer.cs b/WebAPI/WebServer.cs
index 3785002..196ef0d 100644
--- a/WebAPI/WebServer.cs
+++ b/WebAPI/WebServer.cs
@@ -1994,6 +1994,11 @@
             DAL.Cls_S_IF_ProductInBill_Lite dal = new DAL.Cls_S_IF_ProductInBill_Lite();
             return dal.DisSourceBillList(sWhere);
         }
+        public DataSet GetKf_MoveStockRequestBillList(string sWhere)
+        {
+            DAL.Cls_S_IF_MoveStockRequestBill_Lite dal = new DAL.Cls_S_IF_MoveStockRequestBill_Lite();
+            return dal.DisSourceBillList(sWhere);
+        }
         #endregion
 
         #region 鍏朵粬鍏ュ簱锛堢孩瀛楋級   *

--
Gitblit v1.9.1