忠帅 张 2 лет назад
Родитель
Сommit
7b3201d041

+ 91 - 81
DK.Client/SystemModule/F_MST_1601.Designer.cs

@@ -33,15 +33,15 @@ namespace Dongke.IBOSS.PRD.Client.SystemModule
 			System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
 			System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
 			System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
+			System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
+			System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
+			System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
+			System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
 			System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
 			System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
 			System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
 			System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
 			System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
-			System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
-			System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
-			System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
-			System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
 			this.tsrOperate = new Dongke.IBOSS.PRD.Basics.BaseControls.C_ToolStrip();
 			this.tsbtnAdd = new System.Windows.Forms.ToolStripButton();
 			this.tsbtnEdit = new System.Windows.Forms.ToolStripButton();
@@ -63,6 +63,13 @@ namespace Dongke.IBOSS.PRD.Client.SystemModule
 			this.dgvOrder = new System.Windows.Forms.TabControl();
 			this.tabPage1 = new System.Windows.Forms.TabPage();
 			this.dgvRpt = new Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView();
+			this.ORDERSCODES = new System.Windows.Forms.DataGridViewTextBoxColumn();
+			this.f_num = new System.Windows.Forms.DataGridViewTextBoxColumn();
+			this.g1goodscode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+			this.d_num = new System.Windows.Forms.DataGridViewTextBoxColumn();
+			this.GOODSCODE = new System.Windows.Forms.DataGridViewTextBoxColumn();
+			this.g_num = new System.Windows.Forms.DataGridViewTextBoxColumn();
+			this.VALUEFLAG = new System.Windows.Forms.DataGridViewTextBoxColumn();
 			this.tabPage2 = new System.Windows.Forms.TabPage();
 			this.dgvRpt2 = new Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView();
 			this.ORDERSDETAILID = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -72,13 +79,7 @@ namespace Dongke.IBOSS.PRD.Client.SystemModule
 			this.PRODUCTMODEL = new System.Windows.Forms.DataGridViewTextBoxColumn();
 			this.BARCODE = new System.Windows.Forms.DataGridViewTextBoxColumn();
 			this.ENTRUCKINGCODE = new System.Windows.Forms.DataGridViewTextBoxColumn();
-			this.ORDERSCODES = new System.Windows.Forms.DataGridViewTextBoxColumn();
-			this.f_num = new System.Windows.Forms.DataGridViewTextBoxColumn();
-			this.g1goodscode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-			this.d_num = new System.Windows.Forms.DataGridViewTextBoxColumn();
-			this.GOODSCODE = new System.Windows.Forms.DataGridViewTextBoxColumn();
-			this.g_num = new System.Windows.Forms.DataGridViewTextBoxColumn();
-			this.VALUEFLAG = new System.Windows.Forms.DataGridViewTextBoxColumn();
+			this.NUMBERS = new System.Windows.Forms.DataGridViewTextBoxColumn();
 			this.tsrOperate.SuspendLayout();
 			this.gbxCondition.SuspendLayout();
 			this.dgvOrder.SuspendLayout();
@@ -416,6 +417,70 @@ namespace Dongke.IBOSS.PRD.Client.SystemModule
 			this.dgvRpt.TotalSumColumns = null;
 			this.dgvRpt.ViewRowFilter = "";
 			// 
+			// ORDERSCODES
+			// 
+			this.ORDERSCODES.DataPropertyName = "ORDERSCODE";
+			dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+			dataGridViewCellStyle3.Format = "N0";
+			this.ORDERSCODES.DefaultCellStyle = dataGridViewCellStyle3;
+			this.ORDERSCODES.HeaderText = "订单号";
+			this.ORDERSCODES.Name = "ORDERSCODES";
+			this.ORDERSCODES.ReadOnly = true;
+			// 
+			// f_num
+			// 
+			this.f_num.DataPropertyName = "ORDERSNAME";
+			dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+			dataGridViewCellStyle4.Format = "N0";
+			this.f_num.DefaultCellStyle = dataGridViewCellStyle4;
+			this.f_num.HeaderText = "订单名称";
+			this.f_num.Name = "f_num";
+			this.f_num.ReadOnly = true;
+			// 
+			// g1goodscode
+			// 
+			this.g1goodscode.DataPropertyName = "CUSTOMERCODE";
+			this.g1goodscode.HeaderText = "客户编码";
+			this.g1goodscode.Name = "g1goodscode";
+			this.g1goodscode.ReadOnly = true;
+			this.g1goodscode.Visible = false;
+			// 
+			// d_num
+			// 
+			this.d_num.DataPropertyName = "LAYOUTCODE";
+			dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+			dataGridViewCellStyle5.Format = "N0";
+			this.d_num.DefaultCellStyle = dataGridViewCellStyle5;
+			this.d_num.HeaderText = "版面编码";
+			this.d_num.Name = "d_num";
+			this.d_num.ReadOnly = true;
+			this.d_num.Visible = false;
+			// 
+			// GOODSCODE
+			// 
+			this.GOODSCODE.DataPropertyName = "GOODSCODE";
+			dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+			dataGridViewCellStyle6.Format = "N0";
+			this.GOODSCODE.DefaultCellStyle = dataGridViewCellStyle6;
+			this.GOODSCODE.HeaderText = "产品型号";
+			this.GOODSCODE.Name = "GOODSCODE";
+			this.GOODSCODE.ReadOnly = true;
+			this.GOODSCODE.Visible = false;
+			// 
+			// g_num
+			// 
+			this.g_num.DataPropertyName = "NUMBERS";
+			this.g_num.HeaderText = "数量";
+			this.g_num.Name = "g_num";
+			this.g_num.ReadOnly = true;
+			// 
+			// VALUEFLAG
+			// 
+			this.VALUEFLAG.DataPropertyName = "VALUEFLAG";
+			this.VALUEFLAG.HeaderText = "有效标识";
+			this.VALUEFLAG.Name = "VALUEFLAG";
+			this.VALUEFLAG.ReadOnly = true;
+			// 
 			// tabPage2
 			// 
 			this.tabPage2.Controls.Add(this.dgvRpt2);
@@ -459,7 +524,8 @@ namespace Dongke.IBOSS.PRD.Client.SystemModule
             this.LAYOUTNAME,
             this.PRODUCTMODEL,
             this.BARCODE,
-            this.ENTRUCKINGCODE});
+            this.ENTRUCKINGCODE,
+            this.NUMBERS});
 			this.dgvRpt2.ColumnTreeView = null;
 			this.dgvRpt2.ContextMenuVisible = ((Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView.ContextMenuVisibleFlags)((Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView.ContextMenuVisibleFlags.Refine | Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView.ContextMenuVisibleFlags.FileOut)));
 			this.dgvRpt2.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -553,69 +619,12 @@ namespace Dongke.IBOSS.PRD.Client.SystemModule
 			this.ENTRUCKINGCODE.Name = "ENTRUCKINGCODE";
 			this.ENTRUCKINGCODE.ReadOnly = true;
 			// 
-			// ORDERSCODES
+			// NUMBERS
 			// 
-			this.ORDERSCODES.DataPropertyName = "ORDERSCODE";
-			dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-			dataGridViewCellStyle3.Format = "N0";
-			this.ORDERSCODES.DefaultCellStyle = dataGridViewCellStyle3;
-			this.ORDERSCODES.HeaderText = "订单号";
-			this.ORDERSCODES.Name = "ORDERSCODES";
-			this.ORDERSCODES.ReadOnly = true;
-			// 
-			// f_num
-			// 
-			this.f_num.DataPropertyName = "ORDERSNAME";
-			dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-			dataGridViewCellStyle4.Format = "N0";
-			this.f_num.DefaultCellStyle = dataGridViewCellStyle4;
-			this.f_num.HeaderText = "订单名称";
-			this.f_num.Name = "f_num";
-			this.f_num.ReadOnly = true;
-			// 
-			// g1goodscode
-			// 
-			this.g1goodscode.DataPropertyName = "CUSTOMERCODE";
-			this.g1goodscode.HeaderText = "客户编码";
-			this.g1goodscode.Name = "g1goodscode";
-			this.g1goodscode.ReadOnly = true;
-			this.g1goodscode.Visible = false;
-			// 
-			// d_num
-			// 
-			this.d_num.DataPropertyName = "LAYOUTCODE";
-			dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-			dataGridViewCellStyle5.Format = "N0";
-			this.d_num.DefaultCellStyle = dataGridViewCellStyle5;
-			this.d_num.HeaderText = "版面编码";
-			this.d_num.Name = "d_num";
-			this.d_num.ReadOnly = true;
-			this.d_num.Visible = false;
-			// 
-			// GOODSCODE
-			// 
-			this.GOODSCODE.DataPropertyName = "GOODSCODE";
-			dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-			dataGridViewCellStyle6.Format = "N0";
-			this.GOODSCODE.DefaultCellStyle = dataGridViewCellStyle6;
-			this.GOODSCODE.HeaderText = "产品型号";
-			this.GOODSCODE.Name = "GOODSCODE";
-			this.GOODSCODE.ReadOnly = true;
-			this.GOODSCODE.Visible = false;
-			// 
-			// g_num
-			// 
-			this.g_num.DataPropertyName = "NUMBERS";
-			this.g_num.HeaderText = "数量";
-			this.g_num.Name = "g_num";
-			this.g_num.ReadOnly = true;
-			// 
-			// VALUEFLAG
-			// 
-			this.VALUEFLAG.DataPropertyName = "VALUEFLAG";
-			this.VALUEFLAG.HeaderText = "有效标识";
-			this.VALUEFLAG.Name = "VALUEFLAG";
-			this.VALUEFLAG.ReadOnly = true;
+			this.NUMBERS.DataPropertyName = "NUMBERS";
+			this.NUMBERS.HeaderText = "数量";
+			this.NUMBERS.Name = "NUMBERS";
+			this.NUMBERS.ReadOnly = true;
 			// 
 			// F_MST_1601
 			// 
@@ -667,13 +676,6 @@ namespace Dongke.IBOSS.PRD.Client.SystemModule
 		private Basics.BaseControls.C_CheckBox cbflagfalse;
 		private Basics.BaseControls.C_CheckBox cbflagtrue;
 		private Basics.BaseControls.C_Label c_Label5;
-		private System.Windows.Forms.DataGridViewTextBoxColumn ORDERSDETAILID;
-		private System.Windows.Forms.DataGridViewTextBoxColumn ORDERSCODE;
-		private System.Windows.Forms.DataGridViewTextBoxColumn CUSTOMERNAME;
-		private System.Windows.Forms.DataGridViewTextBoxColumn LAYOUTNAME;
-		private System.Windows.Forms.DataGridViewTextBoxColumn PRODUCTMODEL;
-		private System.Windows.Forms.DataGridViewTextBoxColumn BARCODE;
-		private System.Windows.Forms.DataGridViewTextBoxColumn ENTRUCKINGCODE;
 		private System.Windows.Forms.DataGridViewTextBoxColumn ORDERSCODES;
 		private System.Windows.Forms.DataGridViewTextBoxColumn f_num;
 		private System.Windows.Forms.DataGridViewTextBoxColumn g1goodscode;
@@ -681,5 +683,13 @@ namespace Dongke.IBOSS.PRD.Client.SystemModule
 		private System.Windows.Forms.DataGridViewTextBoxColumn GOODSCODE;
 		private System.Windows.Forms.DataGridViewTextBoxColumn g_num;
 		private System.Windows.Forms.DataGridViewTextBoxColumn VALUEFLAG;
+		private System.Windows.Forms.DataGridViewTextBoxColumn ORDERSDETAILID;
+		private System.Windows.Forms.DataGridViewTextBoxColumn ORDERSCODE;
+		private System.Windows.Forms.DataGridViewTextBoxColumn CUSTOMERNAME;
+		private System.Windows.Forms.DataGridViewTextBoxColumn LAYOUTNAME;
+		private System.Windows.Forms.DataGridViewTextBoxColumn PRODUCTMODEL;
+		private System.Windows.Forms.DataGridViewTextBoxColumn BARCODE;
+		private System.Windows.Forms.DataGridViewTextBoxColumn ENTRUCKINGCODE;
+		private System.Windows.Forms.DataGridViewTextBoxColumn NUMBERS;
 	}
 }

+ 3 - 1
DK.Client/SystemModule/F_MST_1601.cs

@@ -203,7 +203,9 @@ namespace Dongke.IBOSS.PRD.Client.SystemModule
 		/// <param name="e"></param>
 		private void btnClearCondition_Click(object sender, EventArgs e)
 		{
-			this.Close();
+			this.txtOrdersCode.Text = null;
+			this.txtOrdersName.Text = null;
+			this.txtProductModel.Text = null;
 		}
 
 		/// <summary>

+ 3 - 0
DK.Client/SystemModule/F_MST_1601.resx

@@ -230,4 +230,7 @@
   <metadata name="ENTRUCKINGCODE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="NUMBERS.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
 </root>

+ 28 - 34
DK.Service/SystemModuleLogic/SystemModuleLogicPartial.cs

@@ -1998,18 +1998,17 @@ namespace Dongke.IBOSS.PRD.Service.SystemModuleLogic
 			{
 				conn = ClsDbFactory.CreateDBConnection(DataBaseType.ORACLE, DataManager.ConnectionString);
 
-				string sqlString = @"
-										SELECT
-											ORDERSCODE,
-											ORDERSNAME,
-											GOODSCODE,
-											NUMBERS,
+				string sqlString = @"SELECT
+											ord.ORDERSCODE,
+											ord.ORDERSNAME,
+											'' AS GOODSCODE,
+											ord.NUMBERS,
 											CASE
-											WHEN VALUEFLAG = 1 THEN
+											WHEN ord.VALUEFLAG = 1 THEN
 												'是' ELSE '否'
 											END AS VALUEFLAG
 										FROM
-											TP_PC_ORDERINFORMATION 
+											TP_PC_ORDERINFORMATION  ord
 										WHERE
 											1 = 1";
 				if (!string.IsNullOrEmpty(cre.Properties["ORDERSCODE"].ToString()))
@@ -2062,40 +2061,35 @@ namespace Dongke.IBOSS.PRD.Service.SystemModuleLogic
 			{
 				conn = ClsDbFactory.CreateDBConnection(DataBaseType.ORACLE, DataManager.ConnectionString);
 
-				string sqlString = @"
-										SELECT 
-											S.ORDERSDETAILID,
-											S.ORDERSCODE,
-											S.GOODSCODE,
-											S.BARCODE,
-											S.	LAYOUTCODE,
-											l.	LAYOUTNAME,
-											S.	CUSTOMERCODE,
-											c.	CUSTOMERNAME,
-											CASE
-											WHEN S.VALUEFLAG = 1 THEN
-												'是' ELSE '否'
-											END AS VALUEFLAGT,
-											E.ENTRUCKINGCODE
-										FROM
-											TP_PC_ORDERINFORMATIONDETAILS  S
-											LEFT JOIN TP_PM_ENTRUCKINGDETAIL E ON S.BARCODE = E.BARCODE 
-											LEFT JOIN TP_PC_CUSTOMERINFORMATION c ON S.CUSTOMERCODE = c.CUSTOMERCODE 
-											LEFT JOIN TP_PC_LAYOUTINFORMATION l ON S.LAYOUTCODE = l.LAYOUTCODE 
-											AND		  E.DoFunction IN (1,3)
-										WHERE
-											1 =1";
+				string sqlString = @"SELECT
+												DISTINCT
+												ord.ORDERSDETAILID,
+												ord.ORDERSID,
+												ORD.ORDERSCODE,
+												cus.CUSTOMERCODE,
+												cus.CUSTOMERNAME,
+												lay.LAYOUTCODE,
+												lay.LAYOUTNAME,
+												ord.GOODSCODE,
+												ord.BARCODE,
+												ord.ENTRUCKINGCODE,
+												ord.NUMBERS
+												FROM 
+												TP_PC_ORDERINFORMATIONDETAILS ord
+												inner JOIN TP_PC_CUSTOMERINFORMATION cus on cus.CUSTOMERCODE=ord.CUSTOMERCODE
+												inner JOIN TP_PC_LAYOUTINFORMATION lay on lay.LAYOUTCODE=ord.LAYOUTCODE
+												WHERE 1=1";
 				if (!string.IsNullOrEmpty(cre.Properties["ORDERCODE"].ToString()))
 				{
-					sqlString += " AND S.ORDERSCODE like : ORDERSCODE";
+					sqlString += " AND ord.ORDERSCODE like : ORDERSCODE";
 				}
 				if (!string.IsNullOrEmpty(cre.Properties["GOODSCODE"].ToString()))
 				{
-					sqlString += " AND S.GOODSCODE like : GOODSCODE";
+					sqlString += " AND ord.GOODSCODE like : GOODSCODE";
 				}
 				if (!string.IsNullOrEmpty(cre.Properties["VALUEFLAG"].ToString()))
 				{
-					sqlString += " AND S.VALUEFLAG = : VALUEFLAG";
+					sqlString += " AND ord.VALUEFLAG = : VALUEFLAG";
 				}
 
 				OracleParameter[] paras = new OracleParameter[]{