From 5a97ea149c9f0ebeaa25d4b20c1ed3d7e58e26f8 Mon Sep 17 00:00:00 2001
From: ch <37327@LLOOCCY>
Date: 星期二, 19 七月 2022 17:01:11 +0800
Subject: [PATCH] 个饼

---
 SCM/条码打印/Gy_BarCodeBill.cs |   51 ++++++--
 BaseSet/Form1.Designer.cs  |   40 ++++++
 BaseSet/Form1.resx         |  139 +++++++++++++++++++++++
 SCM/SCM.csproj             |   25 +--
 BaseSet/BaseSet.csproj     |   31 +++++
 NETSCM/NETSCM.csproj       |   27 ++--
 SCM/公用类/ClsPub1.cs         |    2 
 7 files changed, 269 insertions(+), 46 deletions(-)

diff --git a/BaseSet/BaseSet.csproj b/BaseSet/BaseSet.csproj
index d97b7cc..d9844fc 100644
--- a/BaseSet/BaseSet.csproj
+++ b/BaseSet/BaseSet.csproj
@@ -105,6 +105,9 @@
     </Compile>
     <Compile Include="Program.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <EmbeddedResource Include="Form1.resx">
+      <DependentUpon>Form1.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="Properties\Resources.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>Resources.Designer.cs</LastGenOutput>
@@ -330,6 +333,34 @@
       <Install>false</Install>
     </BootstrapperPackage>
   </ItemGroup>
+  <ItemGroup>
+    <COMReference Include="Axgregn6Lib">
+      <Guid>{4018F953-1BFE-441E-8A04-DC8BA1FF060E}</Guid>
+      <VersionMajor>6</VersionMajor>
+      <VersionMinor>0</VersionMinor>
+      <Lcid>0</Lcid>
+      <WrapperTool>aximp</WrapperTool>
+      <Isolated>False</Isolated>
+    </COMReference>
+    <COMReference Include="gregn6Lib">
+      <Guid>{4018F953-1BFE-441E-8A04-DC8BA1FF060E}</Guid>
+      <VersionMajor>6</VersionMajor>
+      <VersionMinor>0</VersionMinor>
+      <Lcid>0</Lcid>
+      <WrapperTool>tlbimp</WrapperTool>
+      <Isolated>False</Isolated>
+      <EmbedInteropTypes>True</EmbedInteropTypes>
+    </COMReference>
+    <COMReference Include="stdole">
+      <Guid>{00020430-0000-0000-C000-000000000046}</Guid>
+      <VersionMajor>2</VersionMajor>
+      <VersionMinor>0</VersionMinor>
+      <Lcid>0</Lcid>
+      <WrapperTool>primary</WrapperTool>
+      <Isolated>False</Isolated>
+      <EmbedInteropTypes>True</EmbedInteropTypes>
+    </COMReference>
+  </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/BaseSet/Form1.Designer.cs b/BaseSet/Form1.Designer.cs
index e9d8cb0..f70553c 100644
--- a/BaseSet/Form1.Designer.cs
+++ b/BaseSet/Form1.Designer.cs
@@ -28,12 +28,50 @@
         /// </summary>
         private void InitializeComponent()
         {
-            this.components = new System.ComponentModel.Container();
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
+            this.axGRPrintViewer1 = new Axgregn6Lib.AxGRPrintViewer();
+            this.axGRDisplayViewer1 = new Axgregn6Lib.AxGRDisplayViewer();
+            ((System.ComponentModel.ISupportInitialize)(this.axGRPrintViewer1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.axGRDisplayViewer1)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // axGRPrintViewer1
+            // 
+            this.axGRPrintViewer1.Enabled = true;
+            this.axGRPrintViewer1.Location = new System.Drawing.Point(388, 192);
+            this.axGRPrintViewer1.Name = "axGRPrintViewer1";
+            this.axGRPrintViewer1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axGRPrintViewer1.OcxState")));
+            this.axGRPrintViewer1.Size = new System.Drawing.Size(8, 8);
+            this.axGRPrintViewer1.TabIndex = 0;
+            // 
+            // axGRDisplayViewer1
+            // 
+            this.axGRDisplayViewer1.Enabled = true;
+            this.axGRDisplayViewer1.Location = new System.Drawing.Point(289, 84);
+            this.axGRDisplayViewer1.Name = "axGRDisplayViewer1";
+            this.axGRDisplayViewer1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axGRDisplayViewer1.OcxState")));
+            this.axGRDisplayViewer1.Size = new System.Drawing.Size(118, 133);
+            this.axGRDisplayViewer1.TabIndex = 1;
+            // 
+            // Form1
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(601, 392);
+            this.Controls.Add(this.axGRDisplayViewer1);
+            this.Controls.Add(this.axGRPrintViewer1);
+            this.Name = "Form1";
             this.Text = "Form1";
+            ((System.ComponentModel.ISupportInitialize)(this.axGRPrintViewer1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.axGRDisplayViewer1)).EndInit();
+            this.ResumeLayout(false);
+
         }
 
         #endregion
+
+        private Axgregn6Lib.AxGRPrintViewer axGRPrintViewer1;
+        private Axgregn6Lib.AxGRDisplayViewer axGRDisplayViewer1;
     }
 }
 
diff --git a/BaseSet/Form1.resx b/BaseSet/Form1.resx
new file mode 100644
index 0000000..44b3341
--- /dev/null
+++ b/BaseSet/Form1.resx
@@ -0,0 +1,139 @@
+锘�<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <data name="axGRPrintViewer1.OcxState" mimetype="application/x-microsoft.net.object.binary.base64">
+    <value>
+        AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
+        LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFTeXN0
+        ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAATwAAAAIB
+        AAAAAQAAAAAAAAAAAAAAADoAAAAACQAAAwABAAAAAgADAAIAAgACAGQACwABAAsAAQADAAMAAAADAAEA
+        AAALAAEACwAAAAsAAQAAAAAACw==
+</value>
+  </data>
+  <data name="axGRDisplayViewer1.OcxState" mimetype="application/x-microsoft.net.object.binary.base64">
+    <value>
+        AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
+        LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFTeXN0
+        ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAiQAAAAIB
+        AAAAAQAAAAAAAAAAAAAAAHQAAAAACQAAAwABAAAACwABAAsAAQACAAAAAgAAAAIAAAACAAAAAgAAAAsA
+        AAALAAAACwAAAAsAAQALAAAACwAAAAsAAAALAAEACwABAAsAAQATAAUAAIATAA0AAIATAA4AAIALAAAA
+        CwABAAsAAQALAAEAAAAAAAs=
+</value>
+  </data>
+</root>
\ No newline at end of file
diff --git a/NETSCM/NETSCM.csproj b/NETSCM/NETSCM.csproj
index 73aa818..12cded2 100644
--- a/NETSCM/NETSCM.csproj
+++ b/NETSCM/NETSCM.csproj
@@ -61,25 +61,22 @@
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\DLL\DBUtility.dll</HintPath>
     </Reference>
-    <Reference Include="Interop.Excel, Version=1.5.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\..\..\鐩涘▉鍥介檯\鐩涘▉婧愪唬鐮�20180829\鐩涘▉婧愪唬鐮乗NETERP\bin\x86\Debug\Interop.Excel.dll</HintPath>
+    <Reference Include="Interop.Excel">
+      <HintPath>..\DLL\Interop.Excel.dll</HintPath>
+      <EmbedInteropTypes>True</EmbedInteropTypes>
     </Reference>
-    <Reference Include="NPOI, Version=2.1.3.1, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\SCM\bin\x86\Debug\NPOI.dll</HintPath>
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="NPOI">
+      <HintPath>..\DLL\NPOI.dll</HintPath>
     </Reference>
-    <Reference Include="NPOI.OOXML, Version=2.1.3.1, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\SCM\bin\x86\Debug\NPOI.OOXML.dll</HintPath>
+    <Reference Include="NPOI.OOXML">
+      <HintPath>..\DLL\NPOI.OOXML.dll</HintPath>
     </Reference>
-    <Reference Include="NPOI.OpenXml4Net, Version=2.1.3.1, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\SCM\bin\x86\Debug\NPOI.OpenXml4Net.dll</HintPath>
+    <Reference Include="NPOI.OpenXml4Net">
+      <HintPath>..\DLL\NPOI.OpenXml4Net.dll</HintPath>
     </Reference>
-    <Reference Include="NPOI.OpenXmlFormats, Version=2.1.3.1, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\SCM\bin\x86\Debug\NPOI.OpenXmlFormats.dll</HintPath>
+    <Reference Include="NPOI.OpenXmlFormats">
+      <HintPath>..\DLL\NPOI.OpenXmlFormats.dll</HintPath>
     </Reference>
     <Reference Include="Pub_Class, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86">
       <SpecificVersion>False</SpecificVersion>
diff --git a/SCM/SCM.csproj b/SCM/SCM.csproj
index 077161e..6e5da6d 100644
--- a/SCM/SCM.csproj
+++ b/SCM/SCM.csproj
@@ -74,25 +74,22 @@
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\DLL\DBUtility.dll</HintPath>
     </Reference>
-    <Reference Include="Interop.Excel, Version=1.5.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
+    <Reference Include="Interop.Excel">
       <HintPath>..\DLL\Interop.Excel.dll</HintPath>
+      <EmbedInteropTypes>True</EmbedInteropTypes>
     </Reference>
-    <Reference Include="NPOI, Version=2.1.3.1, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\..\..\APS\MES婧愪唬鐮乗NETERP\bin\x86\Debug\NPOI.dll</HintPath>
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="NPOI">
+      <HintPath>..\DLL\NPOI.dll</HintPath>
     </Reference>
-    <Reference Include="NPOI.OOXML, Version=2.1.3.1, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\..\..\APS\MES婧愪唬鐮乗NETERP\bin\x86\Debug\NPOI.OOXML.dll</HintPath>
+    <Reference Include="NPOI.OOXML">
+      <HintPath>..\DLL\NPOI.OOXML.dll</HintPath>
     </Reference>
-    <Reference Include="NPOI.OpenXml4Net, Version=2.1.3.1, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\..\..\APS\MES婧愪唬鐮乗NETERP\bin\x86\Debug\NPOI.OpenXml4Net.dll</HintPath>
+    <Reference Include="NPOI.OpenXml4Net">
+      <HintPath>..\DLL\NPOI.OpenXml4Net.dll</HintPath>
     </Reference>
-    <Reference Include="NPOI.OpenXmlFormats, Version=2.1.3.1, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\..\..\APS\MES婧愪唬鐮乗NETERP\bin\x86\Debug\NPOI.OpenXmlFormats.dll</HintPath>
+    <Reference Include="NPOI.OpenXmlFormats">
+      <HintPath>..\DLL\NPOI.OpenXmlFormats.dll</HintPath>
     </Reference>
     <Reference Include="Pub_Class, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86">
       <SpecificVersion>False</SpecificVersion>
diff --git "a/SCM/\345\205\254\347\224\250\347\261\273/ClsPub1.cs" "b/SCM/\345\205\254\347\224\250\347\261\273/ClsPub1.cs"
index e26538e..4a828e2 100644
--- "a/SCM/\345\205\254\347\224\250\347\261\273/ClsPub1.cs"
+++ "b/SCM/\345\205\254\347\224\250\347\261\273/ClsPub1.cs"
@@ -25,7 +25,7 @@
         //public static string WEBSURL = "http://60.190.50.86:5050/WEBS_CE/WebService1.asmx";           //椋為緳
         //public static string WEBSURL = "http://192.192.192.13/WMSWEBS/WebService1.asmx";              //鍗撳姏
         //public static string WEBSURL = "http://120.195.29.36:1230/WEBS-WMS/WebService1.asmx";         //姹熻嫃榫欎酣
-        //public static string WEBSURL = "http://60.191.27.141:8090/WEBS-WMS/WebService1.asmx";         //妫シ
+        public static string WEBSURL = "http://60.191.27.141:8090/WEBS-WMS/WebService1.asmx";         //妫シ
         //public static string WEBSURL = "http://192.168.63.195/WEBS-WMS/WebService1.asmx";
         //public static string WEBSURL = "http://192.168.2.18/WEBS-WMS/WebService1.asmx";              //鍏徃鍙板紡鏈�
         //public static string WEBSURL = "http://192.168.0.107/WEBS-WMS/WebService1.asmx";              //瀹�
diff --git "a/SCM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs" "b/SCM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs"
index 8e50856..f46c25b 100644
--- "a/SCM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs"
+++ "b/SCM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs"
@@ -1702,13 +1702,15 @@
                     string HDate = "";          //鏃ユ湡
                     string sCaseNoNumber = "";  //绠卞彿鍓嶇紑
                     int sCaseNo = 0;            //绠卞彿
+                    string sMaterNumber = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HMaterNumberCol].Value);
+                    string sAuxItemName = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HAuxPropNameCol].Value);
                     sHGroupID = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HGroupIDCol].Value);
                     sHBatchNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HBatchNoCol].Value);
-                    HDate = dtpHDate.Value.ToShortDateString();
+                    HDate = SetDateStr(dtpHDate.Value );
                     sCaseNo = ClsPub.isInt(txtHCaseNo.Text) + grdSub.Rows.Count - 1;
 
-                    //绠卞彿鍓嶇紑 = 鐝粍ID + 鎵规 + 鏃ユ湡
-                    sCaseNoNumber = sHGroupID + sHBatchNo + HDate;
+                    //绠卞彿鍓嶇紑 = 鐝粍ID + 鎵规 + 鏃ユ湡 + 鐗╂枡浠g爜 + 杈呭姪灞炴��
+                    sCaseNoNumber = sHGroupID + sHBatchNo + HDate + sMaterNumber + sAuxItemName;
                     oWeb.getRunProc("Exec h_p_WMS_SetBarCodeNoByEmp  '" + sCaseNoNumber + "'," + sCaseNo, ref DBUtility.ClsPub.sExeReturnInfo);
                 }
 
@@ -1861,10 +1863,7 @@
                     }
                 }
                 //
-                if (CampanyName == "妫シ") //绯荤粺鍙傛暟  瀹㈡埛瀹氬埗鍖栧悕绉�
-                {
-                    oWeb.getRunProc("exec h_p_WMS_BarCodeBackToOtherInRepuest  " + HInterID.ToString() + "", ref DBUtility.ClsPub.sExeReturnInfo);
-                }
+                
                 //
                 oWeb.Timeout = 200000;
                 if (oWeb.getRunProcByMul_Back(sSQLMul, ref DBUtility.ClsPub.sExeReturnInfo))
@@ -1889,6 +1888,10 @@
                     grdSub.RowCount = 0;
                     grdSub.RowCount = 20;
                 }
+                if (CampanyName == "妫シ") //绯荤粺鍙傛暟  瀹㈡埛瀹氬埗鍖栧悕绉�
+                {
+                    oWeb.getRunProc("exec h_p_WMS_BarCodeBackToOtherInRepuest  " + HInterID.ToString() + "", ref DBUtility.ClsPub.sExeReturnInfo);
+                }
                 tabControl1.SelectedIndex = 2;
             }
             catch (Exception e)
@@ -1902,6 +1905,17 @@
 
         #endregion 
 
+
+        public string SetDateStr(DateTime sDateTime)
+        {
+            string sDate = sDateTime.ToShortDateString();
+            string sYear = ClsPub.isDate(sDate).Year.ToString().Substring(2, 2);
+            string sPeriod = "0" + ClsPub.isDate(sDate).Month.ToString();
+            sPeriod = sPeriod.Substring(sPeriod.Length - 2, 2);
+            string sDay = "0" + ClsPub.isDate(sDate).Day.ToString();
+            sDay = sDay.Substring(sDay.Length - 2, 2);
+            return sYear+ sPeriod+ sDay;
+        }
 
         #region 绐椾綋澶勭悊鏂规硶
         //鍒濆鍖朑RID
@@ -2872,12 +2886,14 @@
                         string HBatchNo = "";   //鎵规
                         string HDate = "";      //鏃ユ湡
                         string sCaseNoNumber = "";      //绠卞彿鍓嶇紑
+                        string sMaterNumber = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HMaterNumberCol].Value);
+                        string sAuxItemName = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HAuxPropNameCol].Value);
                         HGroupID = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HGroupIDCol].Value);
                         HBatchNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HBatchNoCol].Value);
-                        HDate = dtpHDate.Value.ToShortDateString();
+                        HDate = SetDateStr(dtpHDate.Value);
 
-                        //绠卞彿鍓嶇紑 = 鐝粍ID + 鎵规 + 鏃ユ湡
-                        sCaseNoNumber = HGroupID + HBatchNo + HDate;
+                        //绠卞彿鍓嶇紑 = 鐝粍ID + 鎵规 + 鏃ユ湡 + 鐗╂枡浠g爜 + 杈呭姪灞炴��
+                        sCaseNoNumber = HGroupID + HBatchNo + HDate + sMaterNumber + sAuxItemName;
                         Ds = oWeb.getDataSetBySQL("exec h_p_WMS_GetMaxNo  '" + sCaseNoNumber + "'", "h_p_WMS_GetMaxNo", ref DBUtility.ClsPub.sExeReturnInfo);//鑾峰彇鏈�澶ф祦姘村彿
                         txtHCaseNo.Text = (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]) + 1).ToString();
                         txtHCaseNo.Tag = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]).ToString();
@@ -3766,12 +3782,14 @@
                     string HBatchNo = "";   //鎵规
                     string HDate = "";      //鏃ユ湡
                     string sCaseNoNumber = "";      //绠卞彿鍓嶇紑
+                    string sMaterNumber = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HMaterNumberCol].Value);
+                    string sAuxItemName = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HAuxPropNameCol].Value);
                     HGroupID = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HGroupIDCol].Value);
                     HBatchNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HBatchNoCol].Value);
-                    HDate = dtpHDate.Value.ToShortDateString();
+                    HDate = SetDateStr(dtpHDate.Value);
 
-                    //绠卞彿鍓嶇紑 = 鐝粍ID + 鎵规 + 鏃ユ湡
-                    sCaseNoNumber = HGroupID + HBatchNo + HDate;
+                    //绠卞彿鍓嶇紑 = 鐝粍ID + 鎵规 + 鏃ユ湡 + 鐗╂枡浠g爜 +杈呭姪灞炴��
+                    sCaseNoNumber = HGroupID + HBatchNo + HDate + sMaterNumber + sAuxItemName;
                     DataSet Ds = oWeb.getDataSetBySQL("exec h_p_WMS_GetMaxNo  '" + sCaseNoNumber + "'", "h_p_WMS_GetMaxNo", ref DBUtility.ClsPub.sExeReturnInfo);//鑾峰彇鏈�澶ф祦姘村彿
                     txtHCaseNo.Text = (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]) + 1).ToString();
                     txtHCaseNo.Tag = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]).ToString();
@@ -3797,12 +3815,15 @@
                     string HBatchNo = "";   //鎵规
                     string HDate = "";      //鏃ユ湡
                     string sCaseNoNumber = "";      //绠卞彿鍓嶇紑
+
+                    string sMaterNumber = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HMaterNumberCol].Value);
+                    string sAuxItemName = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HAuxPropNameCol].Value);
                     HGroupID = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HGroupIDCol].Value);
                     HBatchNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells[HBatchNoCol].Value);
-                    HDate = dtpHDate.Value.ToShortDateString();
+                    HDate = SetDateStr(dtpHDate.Value);
 
                     //绠卞彿鍓嶇紑 = 鐝粍ID + 鎵规 + 鏃ユ湡
-                    sCaseNoNumber = HGroupID + HBatchNo + HDate;
+                    sCaseNoNumber = HGroupID + HBatchNo + HDate + sMaterNumber + sAuxItemName;
                     DataSet Ds = oWeb.getDataSetBySQL("exec h_p_WMS_GetMaxNo  '" + sCaseNoNumber + "'", "h_p_WMS_GetMaxNo", ref DBUtility.ClsPub.sExeReturnInfo);//鑾峰彇鏈�澶ф祦姘村彿
                     txtHCaseNo.Text = (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]) + 1).ToString();
                     txtHCaseNo.Tag = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]).ToString();

--
Gitblit v1.9.1