diff --git a/A00通用窗体/U_CompanySel.dfm b/A00通用窗体/U_CompanySel.dfm index 1cb13bd..07c4f23 100644 --- a/A00通用窗体/U_CompanySel.dfm +++ b/A00通用窗体/U_CompanySel.dfm @@ -10,7 +10,6 @@ inherited frmCompanySel: TfrmCompanySel Font.Name = #23435#20307 Position = poScreenCenter OnClose = FormClose - ExplicitLeft = -42 ExplicitWidth = 909 ExplicitHeight = 597 PixelsPerInch = 96 @@ -22,6 +21,7 @@ inherited frmCompanySel: TfrmCompanySel Height = 476 Align = alClient TabOrder = 0 + ExplicitTop = 76 object TV1: TcxGridDBTableView OnDblClick = TV1DblClick Navigator.Buttons.CustomButtons = <> @@ -60,6 +60,13 @@ inherited frmCompanySel: TfrmCompanySel HeaderAlignmentHorz = taCenter Width = 159 end + object TV1Saleser: TcxGridDBColumn + Caption = #19994#21153#21592 + DataBinding.FieldName = 'Saleser' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 119 + end object TV1Column4: TcxGridDBColumn Caption = #23458#25143#22320#22336 DataBinding.FieldName = 'CoAddress' @@ -135,15 +142,47 @@ inherited frmCompanySel: TfrmCompanySel Height = 12 Caption = #21517#31216 end + object Label2: TLabel + Left = 200 + Top = 17 + Width = 24 + Height = 12 + Caption = #31616#31216 + end + object Label3: TLabel + Left = 382 + Top = 17 + Width = 36 + Height = 12 + Caption = #19994#21153#21592 + end object CoName: TEdit Tag = 2 - Left = 53 + Left = 46 Top = 12 - Width = 169 + Width = 140 Height = 20 TabOrder = 0 OnChange = CoNameChange end + object CoAbbrName: TEdit + Tag = 2 + Left = 228 + Top = 12 + Width = 140 + Height = 20 + TabOrder = 1 + OnChange = CoNameChange + end + object Saleser: TEdit + Tag = 2 + Left = 422 + Top = 12 + Width = 140 + Height = 20 + TabOrder = 2 + OnChange = CoNameChange + end end inherited ADOQueryBaseCmd: TADOQuery Connection = ADOConnection1 diff --git a/A00通用窗体/U_CompanySel.pas b/A00通用窗体/U_CompanySel.pas index b046570..7c3883e 100644 --- a/A00通用窗体/U_CompanySel.pas +++ b/A00通用窗体/U_CompanySel.pas @@ -52,6 +52,11 @@ type cxBlue: TcxStyle; SHuangSeCu: TcxStyle; TV1Column4: TcxGridDBColumn; + TV1Saleser: TcxGridDBColumn; + Label2: TLabel; + CoAbbrName: TEdit; + Label3: TLabel; + Saleser: TEdit; procedure FormCreate(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormShow(Sender: TObject); diff --git a/A00通用窗体/U_TatClothInfoSel.dfm b/A00通用窗体/U_TatClothInfoSel.dfm index fcc2c9e..1dc90a8 100644 --- a/A00通用窗体/U_TatClothInfoSel.dfm +++ b/A00通用窗体/U_TatClothInfoSel.dfm @@ -2,24 +2,23 @@ inherited frmTatClothInfoSel: TfrmTatClothInfoSel Left = 372 Top = 106 Caption = #20135#21697#20449#24687#36873#25321 - ClientHeight = 634 - ClientWidth = 1485 + ClientHeight = 629 + ClientWidth = 1509 Color = clWhite Font.Charset = GB2312_CHARSET Font.Height = -12 Font.Name = #23435#20307 Position = poScreenCenter OnClose = FormClose - ExplicitLeft = -304 - ExplicitWidth = 1501 - ExplicitHeight = 673 + ExplicitWidth = 1525 + ExplicitHeight = 668 PixelsPerInch = 96 TextHeight = 12 object ToolBar1: TToolBar [0] Tag = 1 Left = 0 Top = 0 - Width = 1485 + Width = 1509 Height = 38 AutoSize = True ButtonHeight = 38 @@ -37,16 +36,17 @@ inherited frmTatClothInfoSel: TfrmTatClothInfoSel ParentFont = False ShowCaptions = True TabOrder = 0 + ExplicitTop = 5 object ToolButton1: TToolButton Left = 0 Top = 0 AutoSize = True - Caption = #36873#25321 + Caption = #36873#25321#23436#25104 ImageIndex = 12 OnClick = ToolButton1Click end object TBSave: TToolButton - Left = 71 + Left = 95 Top = 0 AutoSize = True Caption = #20445#23384#26684#24335 @@ -55,7 +55,7 @@ inherited frmTatClothInfoSel: TfrmTatClothInfoSel OnClick = TBSaveClick end object TBClose: TToolButton - Left = 166 + Left = 190 Top = 0 AutoSize = True Caption = #20851#38381 @@ -67,7 +67,7 @@ inherited frmTatClothInfoSel: TfrmTatClothInfoSel Left = 0 Top = 82 Width = 216 - Height = 552 + Height = 547 Align = alLeft Bands = < item @@ -85,6 +85,7 @@ inherited frmTatClothInfoSel: TfrmTatClothInfoSel ScrollbarAnnotations.CustomAnnotations = <> TabOrder = 1 OnDblClick = cxDBTreeList1DblClick + ExplicitHeight = 552 object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn DataBinding.FieldName = 'CTName' Width = 210 @@ -98,24 +99,24 @@ inherited frmTatClothInfoSel: TfrmTatClothInfoSel object Panel3: TPanel [2] Left = 216 Top = 82 - Width = 1269 - Height = 552 + Width = 1293 + Height = 547 Align = alClient BevelInner = bvRaised BevelOuter = bvLowered Caption = 'Panel3' TabOrder = 2 + ExplicitWidth = 1269 + ExplicitHeight = 552 object cxGrid1: TcxGrid Left = 2 Top = 42 - Width = 1265 - Height = 314 - Align = alClient + Width = 642 + Height = 309 + Align = alLeft TabOrder = 0 ExplicitLeft = 6 - ExplicitHeight = 508 object Tv1: TcxGridDBTableView - OnDblClick = Tv1DblClick Navigator.Buttons.CustomButtons = <> Navigator.Buttons.Delete.Enabled = False Navigator.Buttons.Delete.Visible = False @@ -131,13 +132,13 @@ inherited frmTatClothInfoSel: TfrmTatClothInfoSel OptionsData.Deleting = False OptionsData.DeletingConfirmation = False OptionsView.GroupByBox = False - object v1SSel: TcxGridDBColumn + object Tv1SSel: TcxGridDBColumn Caption = #36873#25321 DataBinding.FieldName = 'SSel' DataBinding.IsNullValueType = True PropertiesClassName = 'TcxCheckBoxProperties' HeaderAlignmentHorz = taCenter - Width = 39 + Width = 38 end object v1Column12: TcxGridDBColumn Caption = #31867#21035 @@ -187,21 +188,24 @@ inherited frmTatClothInfoSel: TfrmTatClothInfoSel object Panel7: TPanel Left = 2 Top = 2 - Width = 1265 + Width = 1289 Height = 40 Align = alTop BevelOuter = bvNone TabOrder = 1 + ExplicitWidth = 1265 object Panel4: TPanel Left = 0 Top = 0 - Width = 1265 + Width = 1289 Height = 40 Align = alClient AutoSize = True TabOrder = 0 + ExplicitLeft = 4 + ExplicitTop = -6 DesignSize = ( - 1265 + 1289 40) object Label14: TLabel Left = 19 @@ -297,14 +301,15 @@ inherited frmTatClothInfoSel: TfrmTatClothInfoSel end object cxGrid3: TcxGrid Left = 2 - Top = 356 - Width = 1265 + Top = 351 + Width = 1289 Height = 194 Align = alBottom TabOrder = 2 - ExplicitLeft = 6 - ExplicitTop = 362 + ExplicitLeft = -50 + ExplicitTop = 357 object TV3: TcxGridDBTableView + OnDblClick = TV3DblClick Navigator.Buttons.CustomButtons = <> Navigator.Buttons.Delete.Enabled = False Navigator.Buttons.Delete.Visible = False @@ -319,21 +324,12 @@ inherited frmTatClothInfoSel: TfrmTatClothInfoSel OptionsData.Deleting = False OptionsData.DeletingConfirmation = False OptionsView.GroupByBox = False - object TV3Column1: TcxGridDBColumn - Caption = #36873#25321 - DataBinding.FieldName = 'ssel' - DataBinding.IsNullValueType = True - PropertiesClassName = 'TcxCheckBoxProperties' - Properties.ImmediatePost = True - Properties.NullStyle = nssUnchecked - HeaderAlignmentHorz = taCenter - Width = 68 - end object cxGridDBColumn1: TcxGridDBColumn Caption = #38376#24133 DataBinding.FieldName = 'C_MXMF' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 179 end end @@ -341,16 +337,94 @@ inherited frmTatClothInfoSel: TfrmTatClothInfoSel GridView = TV3 end end + object cxGrid2: TcxGrid + Left = 644 + Top = 42 + Width = 647 + Height = 309 + Align = alClient + PopupMenu = PM_1 + TabOrder = 3 + ExplicitLeft = 650 + ExplicitTop = 48 + object Tv2: TcxGridDBTableView + Navigator.Buttons.CustomButtons = <> + Navigator.Buttons.Delete.Enabled = False + Navigator.Buttons.Delete.Visible = False + ScrollbarAnnotations.CustomAnnotations = <> + DataController.DataSource = DS_2 + DataController.Filter.AutoDataSetFilter = True + DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost] + DataController.Summary.DefaultGroupSummaryItems = <> + DataController.Summary.FooterSummaryItems = <> + DataController.Summary.SummaryGroups = <> + OptionsCustomize.ColumnFiltering = False + OptionsData.Deleting = False + OptionsData.DeletingConfirmation = False + OptionsView.GroupByBox = False + object cxGridDBColumn3: TcxGridDBColumn + Caption = #31867#21035 + DataBinding.FieldName = 'CTName' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 70 + end + object cxGridDBColumn4: TcxGridDBColumn + Caption = #20135#21697#32534#21495 + DataBinding.FieldName = 'C_Code' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 92 + end + object cxGridDBColumn5: TcxGridDBColumn + Caption = #20135#21697#21517#31216 + DataBinding.FieldName = 'C_Name' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 96 + end + object cxGridDBColumn6: TcxGridDBColumn + Caption = #38376#24133 + DataBinding.FieldName = 'C_MXMF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 66 + end + object cxGridDBColumn7: TcxGridDBColumn + Caption = #20811#37325 + DataBinding.FieldName = 'C_GramWeight' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 81 + end + object Tv2C_Color: TcxGridDBColumn + Caption = #39068#33394 + DataBinding.FieldName = 'C_Color' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end + end + object cxGridLevel2: TcxGridLevel + GridView = Tv2 + end + end end object Panel1: TPanel [3] Left = 0 Top = 38 - Width = 1485 + Width = 1509 Height = 44 Align = alTop BevelInner = bvRaised BevelOuter = bvLowered TabOrder = 3 + ExplicitTop = 34 object Label3: TLabel Left = 42 Top = 15 @@ -4871,4 +4945,23 @@ inherited frmTatClothInfoSel: TfrmTatClothInfoSel Left = 1003 Top = 508 end + object CDS_2: TClientDataSet + Aggregates = <> + Params = <> + Left = 1104 + Top = 210 + end + object DS_2: TDataSource + DataSet = CDS_2 + Left = 1232 + Top = 226 + end + object PM_1: TPopupMenu + Left = 1136 + Top = 274 + object N1: TMenuItem + Caption = #21024#38500 + OnClick = N1Click + end + end end diff --git a/A00通用窗体/U_TatClothInfoSel.pas b/A00通用窗体/U_TatClothInfoSel.pas index 617a33a..7f8ff20 100644 --- a/A00通用窗体/U_TatClothInfoSel.pas +++ b/A00通用窗体/U_TatClothInfoSel.pas @@ -12,7 +12,7 @@ uses cxLookAndFeelPainters, dxSkinsCore, dxSkinsDefaultPainters, cxNavigator, dxDateRanges, dxBarBuiltInMenu, System.ImageList, U_BaseInput, cxTL, cxMaskEdit, cxTLdxBarBuiltInMenu, cxCheckBox, cxInplaceContainer, cxDBTL, - cxTLData, math, dxScrollbarAnnotations; + cxTLData, math, dxScrollbarAnnotations, Vcl.Menus; type TfrmTatClothInfoSel = class(TfrmBaseHelp) @@ -36,7 +36,6 @@ type Panel3: TPanel; cxGrid1: TcxGrid; Tv1: TcxGridDBTableView; - v1SSel: TcxGridDBColumn; v1Column12: TcxGridDBColumn; v1CYNo: TcxGridDBColumn; v1Column9: TcxGridDBColumn; @@ -78,16 +77,28 @@ type TV3: TcxGridDBTableView; cxGridDBColumn1: TcxGridDBColumn; cxGridLevel1: TcxGridLevel; - TV3Column1: TcxGridDBColumn; CDS_Sub: TClientDataSet; DataSource3: TDataSource; + cxGrid2: TcxGrid; + Tv2: TcxGridDBTableView; + cxGridDBColumn3: TcxGridDBColumn; + cxGridDBColumn4: TcxGridDBColumn; + cxGridDBColumn5: TcxGridDBColumn; + cxGridDBColumn6: TcxGridDBColumn; + cxGridDBColumn7: TcxGridDBColumn; + cxGridLevel2: TcxGridLevel; + CDS_2: TClientDataSet; + DS_2: TDataSource; + PM_1: TPopupMenu; + N1: TMenuItem; + Tv1SSel: TcxGridDBColumn; + Tv2C_Color: TcxGridDBColumn; procedure FormCreate(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormShow(Sender: TObject); procedure ToolButton1Click(Sender: TObject); procedure FormDestroy(Sender: TObject); procedure TBSaveClick(Sender: TObject); - procedure TV1DblClick(Sender: TObject); procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure TCBNOR1Change(Sender: TObject); @@ -95,10 +106,13 @@ type procedure TBCloseClick(Sender: TObject); procedure cxDBTreeList1DblClick(Sender: TObject); procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean); + procedure N1Click(Sender: TObject); + procedure TV3DblClick(Sender: TObject); private CurrentPage, RecordsNumber: Integer; procedure InitGrid(); procedure InitTree(); + procedure InitGrid2(); { Private declarations } public FCoType: string; @@ -132,6 +146,15 @@ begin cxDBTreeList1.Items[0].Expand(false); end; +procedure TfrmTatClothInfoSel.N1Click(Sender: TObject); +begin + if CDS_2.IsEmpty then + begin + Exit; + end; + CDS_2.Delete; +end; + procedure TfrmTatClothInfoSel.FormCreate(Sender: TObject); begin inherited; @@ -251,6 +274,32 @@ begin end; + +procedure TfrmTatClothInfoSel.InitGrid2(); +begin + + try + ADOQueryMain.DisableControls; + + with ADOQueryMain do + begin + Close; + sql.Clear; + sql.Add(' select A.*,C_MXMF=cast('''' as varchar(30)),CTName =cast('''' as varchar(30)) from BS_Cloth_Info A where 1=2 '); + Open; + end; + SCreateCDS(ADOQueryMain, CDS_2); + SInitCDSData(ADOQueryMain, CDS_2); + + + finally + ADOQueryMain.EnableControls; + + end; + +end; + + procedure TfrmTatClothInfoSel.FormShow(Sender: TObject); begin inherited; @@ -262,6 +311,7 @@ begin InitTree(); InitGrid(); + InitGrid2(); end; procedure TfrmTatClothInfoSel.TBCloseClick(Sender: TObject); @@ -291,10 +341,7 @@ begin ModalResult := 1; end; -procedure TfrmTatClothInfoSel.TV1DblClick(Sender: TObject); -begin - ModalResult := 1; -end; + procedure TfrmTatClothInfoSel.Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean); begin @@ -310,6 +357,21 @@ begin SInitCDSData(ADOQueryCmd, CDS_sub); end; +procedure TfrmTatClothInfoSel.TV3DblClick(Sender: TObject); +begin + with CDS_2 do + begin + Append; + FieldByName('CTName').AsString := CDS_1.FieldByName('CTName').AsString; + FieldByName('C_Code').AsString := CDS_1.FieldByName('C_Code').AsString; + FieldByName('C_Name').AsString := CDS_1.FieldByName('C_Name').AsString; + FieldByName('C_Color').AsString := CDS_1.FieldByName('C_Color').AsString; + FieldByName('C_GramWeight').AsString := CDS_1.FieldByName('C_GramWeight').AsString; + FieldByName('C_MXMF').AsString := CDS_Sub.FieldByName('C_MXMF').AsString; + post; + end; +end; + procedure TfrmTatClothInfoSel.FormDestroy(Sender: TObject); begin inherited; diff --git a/A01基础公司管理/Company.dproj.local b/A01基础公司管理/Company.dproj.local index 37510d8..0a48f90 100644 --- a/A01基础公司管理/Company.dproj.local +++ b/A01基础公司管理/Company.dproj.local @@ -13,17 +13,17 @@ 1899/12/30 00:00:00.000.744,D:\Dp10Repo\项目代码\鹏华\客户供应商管理(Company.dll)\U_Customer.pas=D:\Dp10Repo\项目代码\鹏华\客户供应商管理(Company.dll)\U_Company.pas 1899/12/30 00:00:00.000.967,D:\Dp10Repo\项目代码\鹏华\客户供应商管理(Company.dll)\U_FactoryInput.pas=D:\Dp10Repo\项目代码\鹏华\客户供应商管理(Company.dll)\U_CustInput.pas 1899/12/30 00:00:00.000.033,D:\Dp10Repo\项目代码\瑜量\客户供应商管理(Company.dll)\U_YGSel.pas=D:\Dp10Repo\项目代码\瑜量\客户供应商管理(Company.dll)\U_ZDYHelp.pas - 1899/12/30 00:00:00.000.294,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LbaelMapSet.pas - 1899/12/30 00:00:00.000.956,=D:\Dp10Repo\项目代码\RTBasics\A01基础公司管理\U_EmployeeList.pas - 1899/12/30 00:00:00.000.342,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_AttachmentUpload.pas + 1899/12/30 00:00:00.000.333,=D:\Dp10Repo\public10\design\U_BaseHelp.pas 1899/12/30 00:00:00.000.435,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelMapSet.pas + 1899/12/30 00:00:00.000.342,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_AttachmentUpload.pas + 1899/12/30 00:00:00.000.294,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LbaelMapSet.pas 1899/12/30 00:00:00.000.531,=D:\Dp10Repo\public10\ThreeFun\Fun\U_CompressionFun.pas 1899/12/30 00:00:00.000.076,D:\Dp10Repo\项目代码\RTBasics\A01基础公司管理\U_ZdyAttachGYS.pas= 1899/12/30 00:00:00.000.921,D:\Dp10Repo\项目代码\鹏华\员工管理(StaffManage.dll)\U_CompanySel.pas=D:\Dp10Repo\项目代码\鹏华\客户供应商管理(Company.dll)\U_Company.pas 1899/12/30 00:00:00.000.525,=D:\Dp10Repo\项目代码\RTBasics\A01基础公司管理\U_BankList.pas 1899/12/30 00:00:00.000.430,D:\Dp10Repo\项目代码\恒燕\A01基础公司管理\U_wechatSel.dfm=D:\Dp10Repo\项目代码\恒燕\A00通用窗体\U_UserSel.dfm 1899/12/30 00:00:00.000.368,=D:\Dp10Repo\项目代码\恒燕\A00通用窗体\U_UserSel.pas - 1899/12/30 00:00:00.000.333,=D:\Dp10Repo\public10\design\U_BaseHelp.pas + 1899/12/30 00:00:00.000.956,=D:\Dp10Repo\项目代码\RTBasics\A01基础公司管理\U_EmployeeList.pas diff --git a/A01基础公司管理/Company.res b/A01基础公司管理/Company.res index b3d7ee7..543f942 100644 Binary files a/A01基础公司管理/Company.res and b/A01基础公司管理/Company.res differ diff --git a/A01基础公司管理/U_CustInput.dfm b/A01基础公司管理/U_CustInput.dfm index 429bace..3c59368 100644 --- a/A01基础公司管理/U_CustInput.dfm +++ b/A01基础公司管理/U_CustInput.dfm @@ -283,24 +283,6 @@ object frmCustInput: TfrmCustInput Font.Style = [] ParentFont = False TabOrder = 6 - OnBtnUpClick = cocountryBtnUpClick - OnBtnDnClick = cocountryBtnDnClick - end - object CoBusinessType: TBtnEditC - Tag = 2 - Left = 742 - Top = 31 - Width = 140 - Height = 20 - Hint = 'CoBusinessType/'#23458#25143#31867#22411 - Font.Charset = GB2312_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = #23435#20307 - Font.Style = [] - ParentFont = False - TabOrder = 7 - OnBtnUpClick = cocountryBtnUpClick OnBtnDnClick = cocountryBtnDnClick end object ParentCoName: TBtnEditC @@ -316,7 +298,7 @@ object frmCustInput: TfrmCustInput Font.Style = [] ParentFont = False ReadOnly = True - TabOrder = 8 + TabOrder = 7 OnBtnUpClick = ParentCoNameBtnUpClick OnBtnDnClick = cocountryBtnDnClick end @@ -332,7 +314,7 @@ object frmCustInput: TfrmCustInput Font.Name = #23435#20307 Font.Style = [] ParentFont = False - TabOrder = 9 + TabOrder = 8 OnBtnUpClick = SaleserBtnUpClick OnBtnDnClick = cocountryBtnDnClick end @@ -341,7 +323,7 @@ object frmCustInput: TfrmCustInput Left = 71 Top = 224 Width = 140 - Height = 22 + Height = 20 Hint = 'khdept/'#37096#38376 Font.Charset = GB2312_CHARSET Font.Color = clWindowText @@ -349,10 +331,20 @@ object frmCustInput: TfrmCustInput Font.Name = #23435#20307 Font.Style = [] ParentFont = False - TabOrder = 10 - OnBtnUpClick = cocountryBtnUpClick + TabOrder = 9 OnBtnDnClick = cocountryBtnDnClick end + object CoBusinessType: TComboBox + Tag = 2 + Left = 742 + Top = 28 + Width = 145 + Height = 22 + TabOrder = 10 + Items.Strings = ( + #32463#38144#21830 + #21152#24037#21378) + end end object Panel1: TPanel Left = 0 @@ -420,6 +412,7 @@ object frmCustInput: TfrmCustInput Align = alClient BorderStyle = cxcbsNone TabOrder = 1 + ExplicitLeft = 0 object TV2: TcxGridDBTableView Navigator.Buttons.CustomButtons = <> Navigator.Buttons.Delete.Enabled = False @@ -479,15 +472,6 @@ object frmCustInput: TfrmCustInput HeaderAlignmentHorz = taCenter Width = 86 end - object cxGridDBColumn7: TcxGridDBColumn - Caption = #25163#26426#21495 - DataBinding.FieldName = 'PhoneNumber' - DataBinding.IsNullValueType = True - PropertiesClassName = 'TcxTextEditProperties' - Properties.CharCase = ecUpperCase - HeaderAlignmentHorz = taCenter - Width = 109 - end object cxGridDBColumn8: TcxGridDBColumn DataBinding.FieldName = 'EMAIL' DataBinding.IsNullValueType = True diff --git a/A01基础公司管理/U_CustInput.pas b/A01基础公司管理/U_CustInput.pas index 0b3329e..6873c79 100644 --- a/A01基础公司管理/U_CustInput.pas +++ b/A01基础公司管理/U_CustInput.pas @@ -51,7 +51,6 @@ type cxGridDBColumn3: TcxGridDBColumn; cxGridDBColumn5: TcxGridDBColumn; cxGridDBColumn6: TcxGridDBColumn; - cxGridDBColumn7: TcxGridDBColumn; cxGridDBColumn8: TcxGridDBColumn; cxGridLevel2: TcxGridLevel; Label10: TLabel; @@ -59,13 +58,13 @@ type TV2Column2: TcxGridDBColumn; cocountry: TBtnEditC; Label3: TLabel; - CoBusinessType: TBtnEditC; Label5: TLabel; ParentCoName: TBtnEditC; Label9: TLabel; Saleser: TBtnEditC; Label11: TLabel; dept: TBtnEditC; + CoBusinessType: TComboBox; procedure FormDestroy(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure TBCloseClick(Sender: TObject); @@ -76,7 +75,7 @@ type procedure ToolButton7Click(Sender: TObject); procedure ToolButton2Click(Sender: TObject); procedure cocountryBtnDnClick(Sender: TObject); - procedure cocountryBtnUpClick(Sender: TObject); +// procedure cocountryBtnUpClick(Sender: TObject); procedure ParentCoNameBtnUpClick(Sender: TObject); procedure SaleserBtnUpClick(Sender: TObject); private @@ -161,28 +160,28 @@ begin TBtnEditC(Sender).TxtCode := ''; end; -procedure TfrmCustInput.cocountryBtnUpClick(Sender: TObject); -var - fsj: string; - FWZ: Integer; -begin - fsj := Trim(TEdit(Sender).Hint); - FWZ := Pos('/', fsj); - try - frmZDYHelp := TfrmZDYHelp.Create(Application); - with frmZDYHelp do - begin - flag := Copy(fsj, 1, FWZ - 1); - flagname := Copy(fsj, FWZ + 1, Length(fsj) - FWZ); - if ShowModal = 1 then - begin - TEdit(Sender).Text := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString); - end; - end; - finally - frmZDYHelp.Free; - end; -end; +//procedure TfrmCustInput.cocountryBtnUpClick(Sender: TObject); +//var +// fsj: string; +// FWZ: Integer; +//begin +// fsj := Trim(TEdit(Sender).Hint); +// FWZ := Pos('/', fsj); +// try +// frmZDYHelp := TfrmZDYHelp.Create(Application); +// with frmZDYHelp do +// begin +// flag := Copy(fsj, 1, FWZ - 1); +// flagname := Copy(fsj, FWZ + 1, Length(fsj) - FWZ); +// if ShowModal = 1 then +// begin +// TEdit(Sender).Text := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString); +// end; +// end; +// finally +// frmZDYHelp.Free; +// end; +//end; procedure TfrmCustInput.FormClose(Sender: TObject; var Action: TCloseAction); begin diff --git a/A01基础公司管理/U_Customer.dfm b/A01基础公司管理/U_Customer.dfm index 1c0d553..b1e3b30 100644 --- a/A01基础公司管理/U_Customer.dfm +++ b/A01基础公司管理/U_Customer.dfm @@ -7,7 +7,7 @@ inherited frmCustomer: TfrmCustomer FormStyle = fsMDIChild Position = poScreenCenter Visible = True - ExplicitLeft = -185 + ExplicitLeft = -515 ExplicitWidth = 1382 ExplicitHeight = 650 PixelsPerInch = 96 @@ -154,7 +154,6 @@ inherited frmCustomer: TfrmCustomer Color = clWhite ParentBackground = False TabOrder = 1 - ExplicitTop = 32 object Label3: TLabel Left = 190 Top = 13 @@ -248,6 +247,8 @@ inherited frmCustomer: TfrmCustomer Height = 309 Align = alClient TabOrder = 2 + ExplicitLeft = 1 + ExplicitTop = 94 object Tv1: TcxGridDBTableView Navigator.Buttons.CustomButtons = <> Navigator.Buttons.Delete.Enabled = False @@ -329,6 +330,20 @@ inherited frmCustomer: TfrmCustomer Options.Editing = False Width = 80 end + object Tv1Contacts: TcxGridDBColumn + Caption = #32852#31995#20154 + DataBinding.FieldName = 'Contacts' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end + object Tv1Telephone: TcxGridDBColumn + Caption = #32852#31995#30005#35805 + DataBinding.FieldName = 'Telephone' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end object v2Column1: TcxGridDBColumn Caption = #22791#27880 DataBinding.FieldName = 'Note' @@ -421,6 +436,8 @@ inherited frmCustomer: TfrmCustomer Height = 201 Align = alClient TabOrder = 0 + ExplicitLeft = 2 + ExplicitTop = 6 object Tv2: TcxGridDBTableView Navigator.Buttons.CustomButtons = <> Navigator.Buttons.Delete.Enabled = False @@ -481,15 +498,6 @@ inherited frmCustomer: TfrmCustomer HeaderAlignmentHorz = taCenter Width = 99 end - object cxGridDBColumn5: TcxGridDBColumn - Caption = #25163#26426#21495 - DataBinding.FieldName = 'PhoneNumber' - DataBinding.IsNullValueType = True - PropertiesClassName = 'TcxTextEditProperties' - Properties.CharCase = ecUpperCase - HeaderAlignmentHorz = taCenter - Width = 102 - end object Tv2Column1: TcxGridDBColumn Caption = 'EMAIL' DataBinding.FieldName = 'Email' diff --git a/A01基础公司管理/U_Customer.pas b/A01基础公司管理/U_Customer.pas index 672143e..4d7dcc9 100644 --- a/A01基础公司管理/U_Customer.pas +++ b/A01基础公司管理/U_Customer.pas @@ -67,7 +67,6 @@ type cxGridDBColumn1: TcxGridDBColumn; cxGridDBColumn2: TcxGridDBColumn; cxGridDBColumn4: TcxGridDBColumn; - cxGridDBColumn5: TcxGridDBColumn; Tv2Column1: TcxGridDBColumn; v3Column2: TcxGridDBColumn; cxGridLevel2: TcxGridLevel; @@ -88,6 +87,8 @@ type Label5: TLabel; dept: TEdit; Tv1Column8: TcxGridDBColumn; + Tv1Contacts: TcxGridDBColumn; + Tv1Telephone: TcxGridDBColumn; procedure FormDestroy(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure TBCloseClick(Sender: TObject); @@ -205,8 +206,10 @@ begin Filtered := False; Close; SQL.Clear; - sql.Add(' select * from BS_Company '); - sql.Add(' where 1=1 ' + (WSql)); + sql.Add(' select A.* '); + sql.Add(',Contacts = (select top 1 Contacts from Bs_Company_contact X where A.CoID = X.CoID) '); + sql.Add(',Telephone = (select top 1 Telephone from Bs_Company_contact X where A.CoID = X.CoID) '); + sql.Add(' from BS_Company A where 1=1 ' + (WSql)); sql.Add(' and CoType=''ͻ'' and Valid=''Y'' '); if Trim(FAuthority) = '¼' then diff --git a/A01基础公司管理/U_GetDllForm.pas b/A01基础公司管理/U_GetDllForm.pas index c5acd33..176ad72 100644 --- a/A01基础公司管理/U_GetDllForm.pas +++ b/A01基础公司管理/U_GetDllForm.pas @@ -71,10 +71,11 @@ begin if trim(DataBaseStr) = '' then begin - server := '101.132.143.144,7781'; - dtbase := 'HENGYANData'; - user := 'rtsa'; - pswd := 'rightsoft@5740'; + server := '106.15.78.45,7781'; + pswd := 'rightsoft@2222'; + + dtbase := 'xiangyingszdata'; + user := 'xiangyingsa'; DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server; // Parameters1 := '¼'; diff --git a/A01基础公司管理/testDll.res b/A01基础公司管理/testDll.res index 2465ca0..e116c48 100644 Binary files a/A01基础公司管理/testDll.res and b/A01基础公司管理/testDll.res differ diff --git a/A02基础产品管理/ClothInfo.dproj.local b/A02基础产品管理/ClothInfo.dproj.local index 59aae6e..dda3c87 100644 --- a/A02基础产品管理/ClothInfo.dproj.local +++ b/A02基础产品管理/ClothInfo.dproj.local @@ -1,49 +1,49 @@  - 1899/12/30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.dfm - 1899/12/30 00:00:00.000.832,=D:\Dp10Repo\public10\design\U_BaseHelp.pas + 1899/12/30 00:00:00.000.431,D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo.dfm=D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo_Tat.dfm 1899/12/30 00:00:00.000.048,=D:\Dp10Repo\public10\design\U_BaseList.pas 1899/12/30 00:00:00.000.135,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ZDYHelp.pas= - 1899/12/30 00:00:00.000.431,D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo_Tat.pas=D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo.pas - 1899/12/30 00:00:00.000.844,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_AttachmentUpload.pas - 1899/12/30 00:00:00.000.716,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ProcessSel.pas - 1899/12/30 00:00:00.000.814,=D:\Dp10Repo\public10\ThreeFun\Fun\uSZHN_JSON.pas - 1899/12/30 00:00:00.000.743,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelPrint.pas + 1899/12/30 00:00:00.000.754,D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo_Tat.pas=D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_TatClothInfo.pas + 1899/12/30 00:00:00.000.939,=D:\Dp10Repo\public10\design\U_BaseInput.pas + 1899/12/30 00:00:00.000.832,=D:\Dp10Repo\public10\design\U_BaseHelp.pas + 1899/12/30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas 1899/12/30 00:00:00.000.975,=D:\Dp10Repo\public10\ThreeFun\Fun\U_CompressionFun.pas 1899/12/30 00:00:00.000.873,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LbaelMapSet.pas - 1899/12/30 00:00:00.000.583,=D:\Dp10Repo\public10\design\U_BaseDataLink.pas + 1899/12/30 00:00:00.000.844,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_AttachmentUpload.pas + 1899/12/30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.dfm 1899/12/30 00:00:00.000.339,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas 1899/12/30 00:00:00.000.518,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas 1899/12/30 00:00:00.000.503,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas - 1899/12/30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas - 1899/12/30 00:00:00.000.149,=D:\Dp10Repo\public10\ThreeFun\Form\U_ZDYHelp.pas - 1899/12/30 00:00:00.000.939,=D:\Dp10Repo\public10\design\U_BaseInput.pas - 1899/12/30 00:00:00.000.305,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_KnitClothInfoSel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas - 1899/12/30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm + 1899/12/30 00:00:00.000.305,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_KnitClothInfoSel.pas + 1899/12/30 00:00:00.000.290,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_TatClothInfoSel.pas + 1899/12/30 00:00:00.000.583,=D:\Dp10Repo\public10\design\U_BaseDataLink.pas + 1899/12/30 00:00:00.000.290,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_TatClothInfoSel.dfm + 1899/12/30 00:00:00.000.305,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_KnitClothInfoSel.dfm 1899/12/30 00:00:00.000.493,=D:\Dp10Repo\项目代码\RTBasics\A00通用模板\Unit1.pas 1899/12/30 00:00:00.000.187,D:\Dp10Repo\项目代码\RTBasics\A00通用模板\Unit1.pas= - 1899/12/30 00:00:00.000.290,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_TatClothInfoSel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.dfm + 1899/12/30 00:00:00.000.149,=D:\Dp10Repo\public10\ThreeFun\Form\U_ZDYHelp.pas + 1899/12/30 00:00:00.000.487,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ZDYHelpSel.pas= 1899/12/30 00:00:00.000.228,=D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo.pas - 1899/12/30 00:00:00.000.086,=D:\Dp10Repo\public10\design\U_cxGridCustomCss.pas + 1899/12/30 00:00:00.000.123,=D:\Dp10Repo\public10\design\U_globalVar.pas 1899/12/30 00:00:00.000.736,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ModuleNote.pas= 1899/12/30 00:00:00.000.178,=D:\Dp10Repo\public10\design\U_WindowFormdesign.pas - 1899/12/30 00:00:00.000.754,D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_TatClothInfo.pas=D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo_Tat.pas - 1899/12/30 00:00:00.000.123,=D:\Dp10Repo\public10\design\U_globalVar.pas - 1899/12/30 00:00:00.000.290,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_TatClothInfoSel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas + 1899/12/30 00:00:00.000.340,=D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_CloInfoFileUp.pas + 1899/12/30 00:00:00.000.431,D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo.pas=D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo_Tat.pas 1899/12/30 00:00:00.000.217,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelMapSet.pas - 1899/12/30 00:00:00.000.754,D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_TatClothInfo.dfm=D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo_Tat.dfm + 1899/12/30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm 1899/12/30 00:00:00.000.015,=D:\Dp10Repo\public10\ThreeFun\Fun\U_RTFun.pas 1899/12/30 00:00:00.000.504,=D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothType.pas - 1899/12/30 00:00:00.000.305,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_KnitClothInfoSel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.dfm + 1899/12/30 00:00:00.000.086,=D:\Dp10Repo\public10\design\U_cxGridCustomCss.pas + 1899/12/30 00:00:00.000.754,D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo_Tat.dfm=D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_TatClothInfo.dfm + 1899/12/30 00:00:00.000.814,=D:\Dp10Repo\public10\ThreeFun\Fun\uSZHN_JSON.pas 1899/12/30 00:00:00.000.092,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_EmployeeSel.pas - 1899/12/30 00:00:00.000.431,D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo_Tat.dfm=D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo.dfm + 1899/12/30 00:00:00.000.716,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ProcessSel.pas 1899/12/30 00:00:00.000.472,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_YarnInfoSel.pas - 1899/12/30 00:00:00.000.487,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ZDYHelpSel.pas= + 1899/12/30 00:00:00.000.743,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelPrint.pas + 1899/12/30 00:00:00.000.806,D:\Dp10Repo\项目代码\RTBasics\A00通用模板\ClothInfo.dproj=D:\Dp10Repo\项目代码\RTBasics\A00通用模板\InformationBase.dproj + 1899/12/30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas 1899/12/30 00:00:00.000.734,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas - 1899/12/30 00:00:00.000.340,=D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_CloInfoFileUp.pas - 1899/12/30 00:00:00.000.806,D:\Dp10Repo\项目代码\RTBasics\A00通用模板\InformationBase.dproj=D:\Dp10Repo\项目代码\RTBasics\A00通用模板\ClothInfo.dproj - 1899/12/30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.pas 1899/12/30 00:00:00.000.630,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas 1899/12/30 00:00:00.000.422,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas diff --git a/A02基础产品管理/ClothInfo.identcache b/A02基础产品管理/ClothInfo.identcache index e28d2d3..4d70262 100644 Binary files a/A02基础产品管理/ClothInfo.identcache and b/A02基础产品管理/ClothInfo.identcache differ diff --git a/A02基础产品管理/U_ClothInfo.dfm b/A02基础产品管理/U_ClothInfo.dfm index 428f086..18b7aa2 100644 --- a/A02基础产品管理/U_ClothInfo.dfm +++ b/A02基础产品管理/U_ClothInfo.dfm @@ -322,6 +322,8 @@ inherited frmClothInfo: TfrmClothInfo Align = alClient PopupMenu = PM_1 TabOrder = 0 + ExplicitLeft = 6 + ExplicitTop = 41 object Tv1: TcxGridDBTableView Navigator.Buttons.CustomButtons = <> Navigator.Buttons.Delete.Enabled = False @@ -432,15 +434,6 @@ inherited frmClothInfo: TfrmClothInfo HeaderAlignmentHorz = taCenter Width = 58 end - object v1Column11: TcxGridDBColumn - Caption = #22270#29255 - DataBinding.FieldName = 'IsImg' - DataBinding.IsNullValueType = True - PropertiesClassName = 'TcxCheckBoxProperties' - HeaderAlignmentHorz = taCenter - Options.Editing = False - Width = 57 - end object Tv1Column5: TcxGridDBColumn Caption = #22635#21333#20154 DataBinding.FieldName = 'filler' @@ -473,6 +466,14 @@ inherited frmClothInfo: TfrmClothInfo Options.Editing = False Width = 66 end + object Tv1Column4: TcxGridDBColumn + Caption = #22270#29255 + DataBinding.FieldName = 'IsImg' + DataBinding.IsNullValueType = True + PropertiesClassName = 'TcxCheckBoxProperties' + HeaderAlignmentHorz = taCenter + Width = 80 + end end object cxGrid1Level1: TcxGridLevel GridView = Tv1 diff --git a/A02基础产品管理/U_ClothInfo.pas b/A02基础产品管理/U_ClothInfo.pas index 261a68a..544506a 100644 --- a/A02基础产品管理/U_ClothInfo.pas +++ b/A02基础产品管理/U_ClothInfo.pas @@ -83,7 +83,6 @@ type PM_1: TPopupMenu; N1: TMenuItem; N2: TMenuItem; - v1Column11: TcxGridDBColumn; Panel7: TPanel; Panel4: TPanel; Label14: TLabel; @@ -118,6 +117,7 @@ type ToolButton3: TToolButton; Tv1Column3: TcxGridDBColumn; Tv1Column8: TcxGridDBColumn; + Tv1Column4: TcxGridDBColumn; procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure TBCloseClick(Sender: TObject); procedure TBDelClick(Sender: TObject); diff --git a/A02基础产品管理/U_TatClothInfo.dfm b/A02基础产品管理/U_TatClothInfo.dfm index 780de3e..437d147 100644 --- a/A02基础产品管理/U_TatClothInfo.dfm +++ b/A02基础产品管理/U_TatClothInfo.dfm @@ -7,8 +7,6 @@ inherited frmTatClothInfo: TfrmTatClothInfo FormStyle = fsMDIChild Position = poScreenCenter Visible = True - ExplicitLeft = -280 - ExplicitTop = -17 ExplicitWidth = 1460 ExplicitHeight = 741 PixelsPerInch = 96 @@ -324,6 +322,8 @@ inherited frmTatClothInfo: TfrmTatClothInfo Align = alClient PopupMenu = PM_1 TabOrder = 0 + ExplicitLeft = 6 + ExplicitTop = 39 object Tv1: TcxGridDBTableView Navigator.Buttons.CustomButtons = <> Navigator.Buttons.Delete.Enabled = False @@ -424,34 +424,25 @@ inherited frmTatClothInfo: TfrmTatClothInfo Width = 68 end object Tv1Column8: TcxGridDBColumn - Caption = #24223#24067#31859#25968 + Caption = #24223#24067#31859#25968'(<)' DataBinding.FieldName = 'fbmeter' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter - Width = 69 + Width = 97 end object Tv1Column10: TcxGridDBColumn - Caption = #23567#21367#31859#25968 + Caption = #23567#21367#31859#25968'(<)' DataBinding.FieldName = 'XJMETER' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter - Width = 67 + Width = 102 end object Tv1Column12: TcxGridDBColumn - Caption = #27425#24067#20010#25968 + Caption = #27425#24067#20010#25968'(>=)' DataBinding.FieldName = 'CBGS' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter - Width = 70 - end - object v1Column11: TcxGridDBColumn - Caption = #22270#29255 - DataBinding.FieldName = 'IsImg' - DataBinding.IsNullValueType = True - PropertiesClassName = 'TcxCheckBoxProperties' - HeaderAlignmentHorz = taCenter - Options.Editing = False - Width = 57 + Width = 86 end object Tv1Column5: TcxGridDBColumn Caption = #22635#21333#20154 @@ -506,6 +497,8 @@ inherited frmTatClothInfo: TfrmTatClothInfo Align = alClient AutoSize = True TabOrder = 0 + ExplicitLeft = 4 + ExplicitTop = -6 DesignSize = ( 1212 40) @@ -625,10 +618,6 @@ inherited frmTatClothInfo: TfrmTatClothInfo Align = alClient Caption = #26679#21697#32553#30053#22270#65288#21452#20987#22270#29255#26597#30475#21407#22270#65289 TabOrder = 0 - ExplicitLeft = 1 - ExplicitTop = 42 - ExplicitWidth = 1208 - ExplicitHeight = 160 object ScrollBox1: TScrollBox Left = 2 Top = 14 @@ -638,9 +627,6 @@ inherited frmTatClothInfo: TfrmTatClothInfo BevelInner = bvLowered BorderStyle = bsNone TabOrder = 0 - ExplicitTop = 15 - ExplicitWidth = 1204 - ExplicitHeight = 144 end end object cxGrid3: TcxGrid diff --git a/A02基础产品管理/U_TatClothInfo.pas b/A02基础产品管理/U_TatClothInfo.pas index 083a456..c61aba7 100644 --- a/A02基础产品管理/U_TatClothInfo.pas +++ b/A02基础产品管理/U_TatClothInfo.pas @@ -82,7 +82,6 @@ type PM_1: TPopupMenu; N1: TMenuItem; N2: TMenuItem; - v1Column11: TcxGridDBColumn; Panel7: TPanel; Panel4: TPanel; Label14: TLabel; diff --git a/A02基础产品管理/testDll.identcache b/A02基础产品管理/testDll.identcache index 9285699..8b7250c 100644 Binary files a/A02基础产品管理/testDll.identcache and b/A02基础产品管理/testDll.identcache differ diff --git a/B02基础纱线仓库/ProjectGroup1.groupproj.local b/B02基础纱线仓库/ProjectGroup1.groupproj.local index 181e97c..b82c00e 100644 --- a/B02基础纱线仓库/ProjectGroup1.groupproj.local +++ b/B02基础纱线仓库/ProjectGroup1.groupproj.local @@ -2,6 +2,6 @@ - + diff --git a/B02基础纱线仓库/U_YarnInfoInPut.dfm b/B02基础纱线仓库/U_YarnInfoInPut.dfm index fa1595e..c9a14fe 100644 --- a/B02基础纱线仓库/U_YarnInfoInPut.dfm +++ b/B02基础纱线仓库/U_YarnInfoInPut.dfm @@ -17,9 +17,9 @@ inherited frmYarnInfoInPut: TfrmYarnInfoInPut Height = 425 Align = alClient TabOrder = 0 - ExplicitTop = 30 object Tv1: TcxGridDBTableView Navigator.Buttons.CustomButtons = <> + ScrollbarAnnotations.CustomAnnotations = <> DataController.DataSource = DataSource3 DataController.Summary.DefaultGroupSummaryItems = <> DataController.Summary.FooterSummaryItems = < @@ -48,6 +48,7 @@ inherited frmYarnInfoInPut: TfrmYarnInfoInPut object VC_Type: TcxGridDBColumn Caption = #31867#22411 DataBinding.FieldName = 'Y_Type' + DataBinding.IsNullValueType = True PropertiesClassName = 'TcxComboBoxProperties' HeaderAlignmentHorz = taCenter Width = 78 @@ -55,12 +56,14 @@ inherited frmYarnInfoInPut: TfrmYarnInfoInPut object v1Column2: TcxGridDBColumn Caption = #21697#29260 DataBinding.FieldName = 'Brand' + DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter Width = 100 end object v1Column18: TcxGridDBColumn Caption = #37319#36141#21152#24037#21512#21516#21495 DataBinding.FieldName = 'ConNo' + DataBinding.IsNullValueType = True PropertiesClassName = 'TcxButtonEditProperties' Properties.Buttons = < item @@ -76,6 +79,7 @@ inherited frmYarnInfoInPut: TfrmYarnInfoInPut object v1Column15: TcxGridDBColumn Caption = #21697#29260 DataBinding.FieldName = 'SXPinPai' + DataBinding.IsNullValueType = True PropertiesClassName = 'TcxButtonEditProperties' Properties.Buttons = < item @@ -90,12 +94,14 @@ inherited frmYarnInfoInPut: TfrmYarnInfoInPut object v1SPName: TcxGridDBColumn Caption = #21697#21517 DataBinding.FieldName = 'Y_Name' + DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter Width = 101 end object v1SPSpec: TcxGridDBColumn Caption = #35268#26684 DataBinding.FieldName = 'Y_Spec' + DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter HeaderGlyphAlignmentHorz = taCenter Width = 116 @@ -103,6 +109,7 @@ inherited frmYarnInfoInPut: TfrmYarnInfoInPut object v1Column1: TcxGridDBColumn Caption = #25209#21495 DataBinding.FieldName = 'BatchNo' + DataBinding.IsNullValueType = True Visible = False HeaderAlignmentHorz = taCenter VisibleForCustomization = False @@ -111,12 +118,14 @@ inherited frmYarnInfoInPut: TfrmYarnInfoInPut object v1QtyUnit: TcxGridDBColumn Caption = #25104#20998 DataBinding.FieldName = 'Y_Composition' + DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter Width = 96 end object v1Column10: TcxGridDBColumn Caption = #36816#36153 DataBinding.FieldName = 'YunFei' + DataBinding.IsNullValueType = True Visible = False HeaderAlignmentHorz = taCenter VisibleForCustomization = False @@ -125,18 +134,21 @@ inherited frmYarnInfoInPut: TfrmYarnInfoInPut object Tv1Column1: TcxGridDBColumn Caption = #39068#33394 DataBinding.FieldName = 'Y_Color' + DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter Width = 70 end object v1Column3: TcxGridDBColumn Caption = 'D'#25968 DataBinding.FieldName = 'Denier' + DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter Width = 55 end object v1Column12: TcxGridDBColumn Caption = #22791#27880 DataBinding.FieldName = 'Note' + DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter Width = 118 end diff --git a/B02基础纱线仓库/U_YarnInfoInPut.pas b/B02基础纱线仓库/U_YarnInfoInPut.pas index 3334feb..9af559e 100644 --- a/B02基础纱线仓库/U_YarnInfoInPut.pas +++ b/B02基础纱线仓库/U_YarnInfoInPut.pas @@ -11,7 +11,7 @@ uses cxGridPopupMenu, ADODB, DBClient, cxButtonEdit, cxTextEdit, StdCtrls, ExtCtrls, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxSkinsCore, dxSkinsDefaultPainters, dxDateRanges, dxBarBuiltInMenu, U_BaseInput, - U_BaseList, System.ImageList, Vcl.ImgList; + U_BaseList, System.ImageList, Vcl.ImgList, dxScrollbarAnnotations; type TfrmYarnInfoInPut = class(TfrmBaseInput) diff --git a/B02基础纱线仓库/U_YarnInfoList.dfm b/B02基础纱线仓库/U_YarnInfoList.dfm index e722bda..1337a5f 100644 --- a/B02基础纱线仓库/U_YarnInfoList.dfm +++ b/B02基础纱线仓库/U_YarnInfoList.dfm @@ -171,7 +171,6 @@ inherited frmYarnInfoList: TfrmYarnInfoList Height = 475 Align = alClient TabOrder = 2 - ExplicitTop = 87 object Tv1: TcxGridDBTableView Navigator.Buttons.CustomButtons = <> ScrollbarAnnotations.CustomAnnotations = <> diff --git a/B02基础纱线仓库/YarnStk.dproj.local b/B02基础纱线仓库/YarnStk.dproj.local index 7960494..5d31b15 100644 --- a/B02基础纱线仓库/YarnStk.dproj.local +++ b/B02基础纱线仓库/YarnStk.dproj.local @@ -1,90 +1,62 @@  - 1899-12-30 00:00:00.000.844,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_AttachmentUpload.pas - 1899-12-30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.dfm - 1899-12-30 00:00:00.000.975,=D:\Dp10Repo\public10\ThreeFun\Fun\U_CompressionFun.pas - 1899-12-30 00:00:00.000.511,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_YarnPurchasePlanSel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothPurchasePlanSel.dfm - 1899-12-30 00:00:00.000.832,=D:\Dp10Repo\public10\design\U_BaseHelp.pas - 1899-12-30 00:00:00.000.065,D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnPurchasePlanPut.dfm=D:\Dp10Repo\项目代码\RTBasics\B04采购计划管理\U_ClothPurchasePlanPut.dfm - 1899-12-30 00:00:00.000.471,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_PictureUpload.pas - 1899-12-30 00:00:00.000.487,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ZDYHelpSel.pas= - 1899-12-30 00:00:00.000.147,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_YarnInfoSel.pas - 1899-12-30 00:00:00.000.687,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_YarnInfoSel.pas - 1899-12-30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas - 1899-12-30 00:00:00.000.111,=D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnWeighing.pas - 1899-12-30 00:00:00.000.716,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ProcessSel.pas - 1899-12-30 00:00:00.000.493,=D:\Dp10Repo\项目代码\RTBasics\A00通用模板\Unit1.pas - 1899-12-30 00:00:00.000.976,D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnPurchasePlanList.pas=D:\Dp10Repo\项目代码\RTBasics\B04采购计划管理\U_ClothPurchasePlanList.pas - 1899-12-30 00:00:00.000.079,=D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnPurchasePlanList.pas - 1899-12-30 00:00:00.000.339,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas - 1899-12-30 00:00:00.000.983,D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\Unit1.pas= - 1899-12-30 00:00:00.000.149,=D:\Dp10Repo\public10\ThreeFun\Form\U_ZDYHelp.pas - 1899-12-30 00:00:00.000.878,D:\Dp10Repo\项目代码\RTBasics\B04采购计划管理\U_ClothPurchasePlanPut.pas= - 1899-12-30 00:00:00.000.135,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ZDYHelp.pas= - 1899-12-30 00:00:00.000.800,=D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_CPSelBig.pas - 1899-12-30 00:00:00.000.048,=D:\Dp10Repo\public10\design\U_BaseList.pas - 1899-12-30 00:00:00.000.939,=D:\Dp10Repo\public10\design\U_BaseInput.pas - 1899-12-30 00:00:00.000.065,D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnPurchasePlanPut.pas=D:\Dp10Repo\项目代码\RTBasics\B04采购计划管理\U_ClothPurchasePlanPut.pas - 1899-12-30 00:00:00.000.267,=D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnPurchasePlanPut.pas - 1899-12-30 00:00:00.000.086,=D:\Dp10Repo\public10\design\U_cxGridCustomCss.pas - 1899-12-30 00:00:00.000.224,D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnPurchasePlanSel.pas= - 1899-12-30 00:00:00.000.123,=D:\Dp10Repo\public10\design\U_globalVar.pas - 1899-12-30 00:00:00.000.907,D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\InformationBase.dproj=D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\YarnStk.dproj - 1899-12-30 00:00:00.000.736,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ModuleNote.pas= - 1899-12-30 00:00:00.000.178,=D:\Dp10Repo\public10\design\U_WindowFormdesign.pas - 1899-12-30 00:00:00.000.796,=D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnStkList.pas - 1899-12-30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm - 1899-12-30 00:00:00.000.224,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelMapSet.pas - 1899-12-30 00:00:00.000.339,=D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnInEdit.pas - 1899-12-30 00:00:00.000.015,=D:\Dp10Repo\public10\ThreeFun\Fun\U_RTFun.pas - 1899-12-30 00:00:00.000.517,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_YarnInfoSel.dfm=D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnPurchasePlanSel.dfm - 1899-12-30 00:00:00.000.803,=D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnInfoList.pas - 1899-12-30 00:00:00.000.976,D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnPurchasePlanList.dfm=D:\Dp10Repo\项目代码\RTBasics\B04采购计划管理\U_ClothPurchasePlanList.dfm - 1899-12-30 00:00:00.000.935,D:\Dp10Repo\项目代码\RTBasics\B04采购计划管理\U_ClothPurchasePlanList.pas= - 1899-12-30 00:00:00.000.674,=D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_testdll.pas - 1899-12-30 00:00:00.000.630,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas - 1899-12-30 00:00:00.000.517,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_YarnInfoSel.pas=D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnPurchasePlanSel.pas - 1899-12-30 00:00:00.000.092,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_EmployeeSel.pas - 1899-12-30 00:00:00.000.425,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelPrint.pas - 1899-12-30 00:00:00.000.422,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas - 1899-12-30 00:00:00.000.864,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_YarnPurchasePlanSel.pas - 1899-12-30 00:00:00.000.534,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_YarnPurchasePlanSel.pas - 1899-12-30 00:00:00.000.511,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_YarnPurchasePlanSel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothPurchasePlanSel.pas - 1899-12-30 00:00:00.000.734,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas - 1899-12-30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas - 2025-04-11 13:34:13.341,=D:\Dp10Repo\public10\ThreeFun\Fun\uSZHN_JSON.pas + 1899/12/30 00:00:00.000.907,D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\YarnStk.dproj=D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\InformationBase.dproj + 1899/12/30 00:00:00.000.832,=D:\Dp10Repo\public10\design\U_BaseHelp.pas + 1899/12/30 00:00:00.000.844,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_AttachmentUpload.pas + 1899/12/30 00:00:00.000.135,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ZDYHelp.pas= + 1899/12/30 00:00:00.000.511,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothPurchasePlanSel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_YarnPurchasePlanSel.pas + 1899/12/30 00:00:00.000.048,=D:\Dp10Repo\public10\design\U_BaseList.pas + 1899/12/30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.dfm + 1899/12/30 00:00:00.000.864,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_YarnPurchasePlanSel.pas + 1899/12/30 00:00:00.000.425,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelPrint.pas + 1899/12/30 00:00:00.000.092,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_EmployeeSel.pas + 1899/12/30 00:00:00.000.975,=D:\Dp10Repo\public10\ThreeFun\Fun\U_CompressionFun.pas + 1899/12/30 00:00:00.000.341,=D:\Dp10Repo\public10\ThreeFun\Fun\uSZHN_JSON.pas + 1899/12/30 00:00:00.000.534,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_YarnPurchasePlanSel.pas + 1899/12/30 00:00:00.000.149,=D:\Dp10Repo\public10\ThreeFun\Form\U_ZDYHelp.pas + 1899/12/30 00:00:00.000.079,=D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnPurchasePlanList.pas + 1899/12/30 00:00:00.000.493,=D:\Dp10Repo\项目代码\RTBasics\A00通用模板\Unit1.pas + 1899/12/30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas + 1899/12/30 00:00:00.000.339,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas + 1899/12/30 00:00:00.000.983,D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\Unit1.pas= + 1899/12/30 00:00:00.000.065,D:\Dp10Repo\项目代码\RTBasics\B04采购计划管理\U_ClothPurchasePlanPut.dfm=D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnPurchasePlanPut.dfm + 1899/12/30 00:00:00.000.939,=D:\Dp10Repo\public10\design\U_BaseInput.pas + 1899/12/30 00:00:00.000.267,=D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnPurchasePlanPut.pas + 1899/12/30 00:00:00.000.800,=D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_CPSelBig.pas + 1899/12/30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm + 1899/12/30 00:00:00.000.065,D:\Dp10Repo\项目代码\RTBasics\B04采购计划管理\U_ClothPurchasePlanPut.pas=D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnPurchasePlanPut.pas + 1899/12/30 00:00:00.000.878,D:\Dp10Repo\项目代码\RTBasics\B04采购计划管理\U_ClothPurchasePlanPut.pas= + 1899/12/30 00:00:00.000.716,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ProcessSel.pas + 1899/12/30 00:00:00.000.123,=D:\Dp10Repo\public10\design\U_globalVar.pas + 1899/12/30 00:00:00.000.517,D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnPurchasePlanSel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_YarnInfoSel.pas + 1899/12/30 00:00:00.000.224,D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnPurchasePlanSel.pas= + 1899/12/30 00:00:00.000.976,D:\Dp10Repo\项目代码\RTBasics\B04采购计划管理\U_ClothPurchasePlanList.dfm=D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnPurchasePlanList.dfm + 1899/12/30 00:00:00.000.178,=D:\Dp10Repo\public10\design\U_WindowFormdesign.pas + 1899/12/30 00:00:00.000.736,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ModuleNote.pas= + 1899/12/30 00:00:00.000.086,=D:\Dp10Repo\public10\design\U_cxGridCustomCss.pas + 1899/12/30 00:00:00.000.803,=D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnInfoList.pas + 1899/12/30 00:00:00.000.224,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelMapSet.pas + 1899/12/30 00:00:00.000.339,=D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnInEdit.pas + 1899/12/30 00:00:00.000.517,D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnPurchasePlanSel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_YarnInfoSel.dfm + 1899/12/30 00:00:00.000.015,=D:\Dp10Repo\public10\ThreeFun\Fun\U_RTFun.pas + 1899/12/30 00:00:00.000.796,=D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnStkList.pas + 1899/12/30 00:00:00.000.487,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ZDYHelpSel.pas= + 1899/12/30 00:00:00.000.511,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothPurchasePlanSel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_YarnPurchasePlanSel.dfm + 1899/12/30 00:00:00.000.674,=D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_testdll.pas + 1899/12/30 00:00:00.000.111,=D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnWeighing.pas + 1899/12/30 00:00:00.000.687,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_YarnInfoSel.pas + 1899/12/30 00:00:00.000.147,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_YarnInfoSel.pas + 1899/12/30 00:00:00.000.935,D:\Dp10Repo\项目代码\RTBasics\B04采购计划管理\U_ClothPurchasePlanList.pas= + 1899/12/30 00:00:00.000.630,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas + 1899/12/30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.pas + 1899/12/30 00:00:00.000.471,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_PictureUpload.pas + 1899/12/30 00:00:00.000.976,D:\Dp10Repo\项目代码\RTBasics\B04采购计划管理\U_ClothPurchasePlanList.pas=D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnPurchasePlanList.pas + 1899/12/30 00:00:00.000.734,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas + 1899/12/30 00:00:00.000.422,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/B02基础纱线仓库/YarnStk.identcache b/B02基础纱线仓库/YarnStk.identcache index d53a510..2f400d0 100644 Binary files a/B02基础纱线仓库/YarnStk.identcache and b/B02基础纱线仓库/YarnStk.identcache differ diff --git a/B02基础纱线仓库/YarnStk.res b/B02基础纱线仓库/YarnStk.res index 357e4ee..704ad5b 100644 Binary files a/B02基础纱线仓库/YarnStk.res and b/B02基础纱线仓库/YarnStk.res differ diff --git a/B02基础纱线仓库/testDll.identcache b/B02基础纱线仓库/testDll.identcache index 0d9d4de..5682fcf 100644 Binary files a/B02基础纱线仓库/testDll.identcache and b/B02基础纱线仓库/testDll.identcache differ diff --git a/B02基础纱线仓库/testDll.res b/B02基础纱线仓库/testDll.res index 2465ca0..e116c48 100644 Binary files a/B02基础纱线仓库/testDll.res and b/B02基础纱线仓库/testDll.res differ diff --git a/E01梭织生产计划/TatPlan.dproj.local b/E01梭织生产计划/TatPlan.dproj.local index 71f0fcb..cdb14d0 100644 --- a/E01梭织生产计划/TatPlan.dproj.local +++ b/E01梭织生产计划/TatPlan.dproj.local @@ -1,49 +1,49 @@  - 1899/12/30 00:00:00.000.844,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_AttachmentUpload.pas 1899/12/30 00:00:00.000.832,=D:\Dp10Repo\public10\design\U_BaseHelp.pas - 1899/12/30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.dfm - 1899/12/30 00:00:00.000.452,D:\Dp10Repo\项目代码\RTBasics\E01梭织生产计划\TatPlan.dproj=D:\Dp10Repo\项目代码\RTBasics\E01梭织生产计划\InformationBase.dproj + 1899/12/30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.dfm 1899/12/30 00:00:00.000.048,=D:\Dp10Repo\public10\design\U_BaseList.pas - 1899/12/30 00:00:00.000.827,=D:\Dp10Repo\项目代码\千圣\E01梭织生产计划\U_TatPlanMachHistoryList.pas - 1899/12/30 00:00:00.000.487,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ZDYHelpSel.pas= - 1899/12/30 00:00:00.000.092,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_EmployeeSel.pas - 1899/12/30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas - 1899/12/30 00:00:00.000.975,=D:\Dp10Repo\public10\ThreeFun\Fun\U_CompressionFun.pas - 1899/12/30 00:00:00.000.873,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LbaelMapSet.pas - 1899/12/30 00:00:00.000.709,=D:\Dp10Repo\项目代码\RTBasics\E01梭织生产计划\U_PlanWBList.pas - 1899/12/30 00:00:00.000.149,=D:\Dp10Repo\public10\ThreeFun\Form\U_ZDYHelp.pas - 1899/12/30 00:00:00.000.561,=D:\Dp10Repo\项目代码\RTBasics\E01梭织生产计划\U_TatCardInPut.pas - 1899/12/30 00:00:00.000.812,D:\Dp10Repo\项目代码\RTBasics\E01梭织生产计划\U_TatWBCardInPut.pas=D:\Dp10Repo\项目代码\RTBasics\E01梭织生产计划\U_PlanWBList.pas - 1899/12/30 00:00:00.000.339,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas - 1899/12/30 00:00:00.000.779,=D:\Dp10Repo\项目代码\千圣\E01梭织生产计划\U_TatPlanMachInput.pas 1899/12/30 00:00:00.000.189,=D:\Dp10Repo\项目代码\千圣\E01梭织生产计划\U_TatOutputList.pas 1899/12/30 00:00:00.000.135,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ZDYHelp.pas= + 1899/12/30 00:00:00.000.873,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LbaelMapSet.pas + 1899/12/30 00:00:00.000.637,=D:\Dp10Repo\public10\ThreeFun\Fun\uSZHN_JSON.pas + 1899/12/30 00:00:00.000.555,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_YarnInfoSel.pas + 1899/12/30 00:00:00.000.975,=D:\Dp10Repo\public10\ThreeFun\Fun\U_CompressionFun.pas + 1899/12/30 00:00:00.000.827,=D:\Dp10Repo\项目代码\千圣\E01梭织生产计划\U_TatPlanMachHistoryList.pas + 1899/12/30 00:00:00.000.844,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_AttachmentUpload.pas + 1899/12/30 00:00:00.000.812,D:\Dp10Repo\项目代码\RTBasics\E01梭织生产计划\U_PlanWBList.pas=D:\Dp10Repo\项目代码\RTBasics\E01梭织生产计划\U_TatWBCardInPut.pas + 1899/12/30 00:00:00.000.149,=D:\Dp10Repo\public10\ThreeFun\Form\U_ZDYHelp.pas + 1899/12/30 00:00:00.000.561,=D:\Dp10Repo\项目代码\RTBasics\E01梭织生产计划\U_TatCardInPut.pas + 1899/12/30 00:00:00.000.339,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas + 1899/12/30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas + 1899/12/30 00:00:00.000.709,=D:\Dp10Repo\项目代码\RTBasics\E01梭织生产计划\U_PlanWBList.pas 1899/12/30 00:00:00.000.552,=D:\Dp10Repo\项目代码\RTBasics\E01梭织生产计划\U_TatPlanCard.pas 1899/12/30 00:00:00.000.939,=D:\Dp10Repo\public10\design\U_BaseInput.pas + 1899/12/30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm + 1899/12/30 00:00:00.000.779,=D:\Dp10Repo\项目代码\千圣\E01梭织生产计划\U_TatPlanMachInput.pas 1899/12/30 00:00:00.000.493,=D:\Dp10Repo\项目代码\RTBasics\A00通用模板\Unit1.pas 1899/12/30 00:00:00.000.716,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ProcessSel.pas - 1899/12/30 00:00:00.000.079,=D:\Dp10Repo\项目代码\千圣\E01梭织生产计划\U_WBSpecEditSel.pas 1899/12/30 00:00:00.000.736,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ModuleNote.pas= 1899/12/30 00:00:00.000.178,=D:\Dp10Repo\public10\design\U_WindowFormdesign.pas 1899/12/30 00:00:00.000.297,=D:\Dp10Repo\项目代码\千圣\E01梭织生产计划\U_YarnStkSel.pas 1899/12/30 00:00:00.000.806,=D:\Dp10Repo\项目代码\千圣\E01梭织生产计划\U_WBSpecInPut.pas - 1899/12/30 00:00:00.000.086,=D:\Dp10Repo\public10\design\U_cxGridCustomCss.pas + 1899/12/30 00:00:00.000.467,=D:\Dp10Repo\项目代码\RTBasics\E00梭织通用窗体\U_TatPlanSel.pas + 1899/12/30 00:00:00.000.079,=D:\Dp10Repo\项目代码\千圣\E01梭织生产计划\U_WBSpecEditSel.pas 1899/12/30 00:00:00.000.125,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_TatClothInfoSel.pas - 1899/12/30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm 1899/12/30 00:00:00.000.306,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelMapSet.pas 1899/12/30 00:00:00.000.015,=D:\Dp10Repo\public10\ThreeFun\Fun\U_RTFun.pas + 1899/12/30 00:00:00.000.086,=D:\Dp10Repo\public10\design\U_cxGridCustomCss.pas 1899/12/30 00:00:00.000.123,=D:\Dp10Repo\public10\design\U_globalVar.pas 1899/12/30 00:00:00.000.806,D:\Dp10Repo\项目代码\RTBasics\E01梭织生产计划\Unit1.pas= + 1899/12/30 00:00:00.000.092,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_EmployeeSel.pas + 1899/12/30 00:00:00.000.487,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ZDYHelpSel.pas= 1899/12/30 00:00:00.000.354,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelPrint.pas 1899/12/30 00:00:00.000.695,=D:\Dp10Repo\项目代码\千圣\E01梭织生产计划\U_TatPlanMachList.pas - 1899/12/30 00:00:00.000.637,=D:\Dp10Repo\public10\ThreeFun\Fun\uSZHN_JSON.pas - 1899/12/30 00:00:00.000.555,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_YarnInfoSel.pas + 1899/12/30 00:00:00.000.812,D:\Dp10Repo\项目代码\RTBasics\E01梭织生产计划\U_PlanWBList.dfm=D:\Dp10Repo\项目代码\RTBasics\E01梭织生产计划\U_TatWBCardInPut.dfm + 1899/12/30 00:00:00.000.452,D:\Dp10Repo\项目代码\RTBasics\E01梭织生产计划\InformationBase.dproj=D:\Dp10Repo\项目代码\RTBasics\E01梭织生产计划\TatPlan.dproj + 1899/12/30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.pas 1899/12/30 00:00:00.000.630,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas - 1899/12/30 00:00:00.000.467,=D:\Dp10Repo\项目代码\RTBasics\E00梭织通用窗体\U_TatPlanSel.pas - 1899/12/30 00:00:00.000.812,D:\Dp10Repo\项目代码\RTBasics\E01梭织生产计划\U_TatWBCardInPut.dfm=D:\Dp10Repo\项目代码\RTBasics\E01梭织生产计划\U_PlanWBList.dfm - 1899/12/30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas 1899/12/30 00:00:00.000.734,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas 1899/12/30 00:00:00.000.422,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas diff --git a/E03梭织坯布检验/TatInsp.dpr b/E03梭织坯布检验/TatInsp.dpr index 46f05f7..6a7e9a8 100644 --- a/E03梭织坯布检验/TatInsp.dpr +++ b/E03梭织坯布检验/TatInsp.dpr @@ -31,7 +31,8 @@ uses uSZHN_JSON in '..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas', U_BaseDataLink in '..\..\..\public10\design\U_BaseDataLink.pas' {BaseDataLink: TDataModule}, U_TatMachCutHZList in 'U_TatMachCutHZList.pas' {frmTatMachCutHZList}, - U_TatClothInspHZList in 'U_TatClothInspHZList.pas' {frmTatClothInspHZList}; + U_TatClothInspHZList in 'U_TatClothInspHZList.pas' {frmTatClothInspHZList}, + U_TatInspSHHZ in 'U_TatInspSHHZ.pas' {frmTatInspSHHZ}; {$R *.res} diff --git a/E03梭织坯布检验/TatInsp.dproj b/E03梭织坯布检验/TatInsp.dproj index 19d72b6..907c76d 100644 --- a/E03梭织坯布检验/TatInsp.dproj +++ b/E03梭织坯布检验/TatInsp.dproj @@ -163,6 +163,10 @@
frmTatClothInspHZList
dfm + +
frmTatInspSHHZ
+ dfm +
Cfg_2 Base diff --git a/E03梭织坯布检验/TatInsp.dproj.local b/E03梭织坯布检验/TatInsp.dproj.local index cd98722..ac18d26 100644 --- a/E03梭织坯布检验/TatInsp.dproj.local +++ b/E03梭织坯布检验/TatInsp.dproj.local @@ -24,12 +24,12 @@ 1899/12/30 00:00:00.000.135,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ZDYHelp.pas= 1899/12/30 00:00:00.000.939,=D:\Dp10Repo\public10\design\U_BaseInput.pas 1899/12/30 00:00:00.000.292,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelPrint.pas - 1899/12/30 00:00:00.000.909,=D:\Dp10Repo\项目代码\RTBasics\F05染色检验\U_DyeClothInspList.pas + 1899/12/30 00:00:00.000.015,=D:\Dp10Repo\public10\ThreeFun\Fun\U_RTFun.pas 1899/12/30 00:00:00.000.293,D:\Dp10Repo\项目代码\RTBasics\E02梭织坯布检验\U_TatMachInsp.pas=D:\Dp10Repo\项目代码\RTBasics\E02梭织坯布检验\U_KnitMachInsp.pas 1899/12/30 00:00:00.000.532,=D:\Dp10Repo\项目代码\RTBasics\F05染色检验\U_DyeMachInsp.pas 1899/12/30 00:00:00.000.995,=D:\Dp10Repo\项目代码\RTBasics\E02梭织坯布检验\U_TatClothInspList.pas 1899/12/30 00:00:00.000.178,=D:\Dp10Repo\public10\design\U_WindowFormdesign.pas - 1899/12/30 00:00:00.000.015,=D:\Dp10Repo\public10\ThreeFun\Fun\U_RTFun.pas + 1899/12/30 00:00:00.000.909,=D:\Dp10Repo\项目代码\RTBasics\F05染色检验\U_DyeClothInspList.pas 1899/12/30 00:00:00.000.963,D:\Dp10Repo\项目代码\RTBasics\D02针织检验\U_KnitMachInsp.pas=D:\Dp10Repo\项目代码\RTBasics\D02针织检验\U_DyeMachInsp.pas 1899/12/30 00:00:00.000.099,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelMapSet.pas 1899/12/30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm @@ -42,10 +42,11 @@ 1899/12/30 00:00:00.000.017,D:\Dp10Repo\项目代码\RTBasics\D02针织检验\KnitInsp.dproj=D:\Dp10Repo\项目代码\RTBasics\D02针织检验\DyeInsp.dproj 1899/12/30 00:00:00.000.123,=D:\Dp10Repo\public10\design\U_globalVar.pas 1899/12/30 00:00:00.000.086,=D:\Dp10Repo\public10\design\U_cxGridCustomCss.pas - 1899/12/30 00:00:00.000.293,D:\Dp10Repo\项目代码\RTBasics\E02梭织坯布检验\U_TatMachInsp.dfm=D:\Dp10Repo\项目代码\RTBasics\E02梭织坯布检验\U_KnitMachInsp.dfm 1899/12/30 00:00:00.000.736,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ModuleNote.pas= + 1899/12/30 00:00:00.000.293,D:\Dp10Repo\项目代码\RTBasics\E02梭织坯布检验\U_TatMachInsp.dfm=D:\Dp10Repo\项目代码\RTBasics\E02梭织坯布检验\U_KnitMachInsp.dfm 2025/11/24 13:58:34.000.809,=D:\Dp10Repo\项目代码\D10szXIANGYING\E03梭织坯布检验\U_TatMachCutHZList.pas 2025/11/24 15:19:14.000.013,=D:\Dp10Repo\项目代码\D10szXIANGYING\E03梭织坯布检验\U_TatClothInspHZList.pas + 2025/12/19 14:11:54.000.060,=D:\Dp10Repo\项目代码\D10szXIANGYING\E03梭织坯布检验\U_TatInspSHHZ.pas @@ -98,5 +99,7 @@ + +
diff --git a/E03梭织坯布检验/TatInsp.identcache b/E03梭织坯布检验/TatInsp.identcache index 3fced4d..6e55e2b 100644 Binary files a/E03梭织坯布检验/TatInsp.identcache and b/E03梭织坯布检验/TatInsp.identcache differ diff --git a/E03梭织坯布检验/TatInspFile.INI b/E03梭织坯布检验/TatInspFile.INI index 1fb6487..dbe8927 100644 --- a/E03梭织坯布检验/TatInspFile.INI +++ b/E03梭织坯布检验/TatInspFile.INI @@ -7,7 +7,7 @@ Dllļ= Dllļ=0 λ=0 -ǩ= +ǩ=2 =1 =100 =1 @@ -15,3 +15,4 @@ Сλ=1 Сλ=1 Сλ=0 +=2 diff --git a/E03梭织坯布检验/U_GetDllForm.pas b/E03梭织坯布检验/U_GetDllForm.pas index f56cd3a..e88a72d 100644 --- a/E03梭织坯布检验/U_GetDllForm.pas +++ b/E03梭织坯布检验/U_GetDllForm.pas @@ -16,7 +16,7 @@ implementation uses U_DataLink, U_iniParam, U_TatMachInsp, U_TatClothInspList, U_LabelPrint, - U_TatMachCutHZList,U_TatClothInspHZList; + U_TatMachCutHZList, U_TatClothInspHZList,U_TatInspSHHZ; ///////////////////////////////////////////////////////////////// // ˵:ȡDllеô // @@ -175,6 +175,18 @@ begin end; end; + 411: //Ļ + begin + with TfrmTatInspSHHZ.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10)) do // + begin + fFormID := FormID; + FormStyle := mstyle; + WindowState := mstate; + BorderStyle := mborderstyle; + mnewHandle := Handle; + end; + end; + 10000: begin for i := 0 to application.MainForm.MDIChildCount - 1 do diff --git a/E03梭织坯布检验/U_TatClothInspHZList.dfm b/E03梭织坯布检验/U_TatClothInspHZList.dfm index 7893966..c225742 100644 --- a/E03梭织坯布检验/U_TatClothInspHZList.dfm +++ b/E03梭织坯布检验/U_TatClothInspHZList.dfm @@ -254,8 +254,8 @@ inherited frmTatClothInspHZList: TfrmTatClothInspHZList ParentFont = False PopupMenu = PM_1 TabOrder = 2 - ExplicitTop = 103 object Tv1: TcxGridDBTableView + OnDblClick = Tv1DblClick Navigator.Buttons.CustomButtons = <> ScrollbarAnnotations.CustomAnnotations = <> DataController.DataSource = DS_1 @@ -364,27 +364,21 @@ inherited frmTatClothInspHZList: TfrmTatClothInspHZList end item Kind = skSum - Column = Tv1Column19 end item Kind = skSum - Column = Tv1YDpf end item Kind = skSum - Column = Tv1xjPF end item Kind = skSum - Column = Tv1edpf end item Kind = skSum - Column = Tv1cspf end item Kind = skSum - Column = Tv1fqPF end item Kind = skSum @@ -396,7 +390,6 @@ inherited frmTatClothInspHZList: TfrmTatClothInspHZList end item Kind = skSum - Column = Tv1FBPF end> DataController.Summary.SummaryGroups = <> OptionsCustomize.ColumnFiltering = False @@ -429,15 +422,14 @@ inherited frmTatClothInspHZList: TfrmTatClothInspHZList DataBinding.FieldName = 'DXMF' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter - Options.CellMerging = True - Width = 72 - OnCompareRowValuesForCellMerging = Tv1DXMFCompareRowValuesForCellMerging + Width = 80 end object Tv1dxmeter: TcxGridDBColumn Caption = #23450#22411#31859#25968 DataBinding.FieldName = 'dxmeter' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Options.CellMerging = True Width = 80 OnCompareRowValuesForCellMerging = Tv1dxmeterCompareRowValuesForCellMerging @@ -447,6 +439,7 @@ inherited frmTatClothInspHZList: TfrmTatClothInspHZList DataBinding.FieldName = 'Carno' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Options.CellMerging = True Width = 90 OnCompareRowValuesForCellMerging = Tv1CarnoCompareRowValuesForCellMerging @@ -456,6 +449,7 @@ inherited frmTatClothInspHZList: TfrmTatClothInspHZList DataBinding.FieldName = 'pcid' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Options.CellMerging = True Width = 68 OnCompareRowValuesForCellMerging = Tv1PCIDCompareRowValuesForCellMerging @@ -465,6 +459,7 @@ inherited frmTatClothInspHZList: TfrmTatClothInspHZList DataBinding.FieldName = 'CIMachNo' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Options.CellMerging = True Width = 80 OnCompareRowValuesForCellMerging = Tv1CIMachNoCompareRowValuesForCellMerging @@ -474,6 +469,7 @@ inherited frmTatClothInspHZList: TfrmTatClothInspHZList DataBinding.FieldName = 'BCIOID' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Options.CellMerging = True Width = 80 OnCompareRowValuesForCellMerging = Tv1BCIOIDCompareRowValuesForCellMerging @@ -486,6 +482,7 @@ inherited frmTatClothInspHZList: TfrmTatClothInspHZList Properties.DecimalPlaces = 2 Properties.DisplayFormat = '0.00%' HeaderAlignmentHorz = taCenter + Options.Editing = False Options.CellMerging = True Width = 90 OnCompareRowValuesForCellMerging = Tv1qgSLCompareRowValuesForCellMerging @@ -495,6 +492,7 @@ inherited frmTatClothInspHZList: TfrmTatClothInspHZList DataBinding.FieldName = 'qgMeter' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Options.CellMerging = True Width = 90 OnCompareRowValuesForCellMerging = Tv1qgMeterCompareRowValuesForCellMerging @@ -506,6 +504,7 @@ inherited frmTatClothInspHZList: TfrmTatClothInspHZList PropertiesClassName = 'TcxCurrencyEditProperties' Properties.DisplayFormat = '0.0%' HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 90 end object Tv1Column21: TcxGridDBColumn @@ -515,13 +514,7 @@ inherited frmTatClothInspHZList: TfrmTatClothInspHZList PropertiesClassName = 'TcxCurrencyEditProperties' Properties.DisplayFormat = '0.0%' HeaderAlignmentHorz = taCenter - Width = 90 - end - object Tv1Column22: TcxGridDBColumn - Caption = #20999#21106#38376#24133 - DataBinding.FieldName = 'C_width' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 90 end object Tv1issp: TcxGridDBColumn @@ -529,6 +522,7 @@ inherited frmTatClothInspHZList: TfrmTatClothInspHZList DataBinding.FieldName = 'issp' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Options.CellMerging = True Width = 80 OnCompareRowValuesForCellMerging = Tv1isspCompareRowValuesForCellMerging @@ -538,6 +532,7 @@ inherited frmTatClothInspHZList: TfrmTatClothInspHZList DataBinding.FieldName = 'C_GramWeight' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 66 end object Tv1Column6: TcxGridDBColumn @@ -545,6 +540,7 @@ inherited frmTatClothInspHZList: TfrmTatClothInspHZList DataBinding.FieldName = 'YDJs' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 74 end object Tv1Column1: TcxGridDBColumn @@ -552,13 +548,7 @@ inherited frmTatClothInspHZList: TfrmTatClothInspHZList DataBinding.FieldName = 'Ydqty' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter - Width = 80 - end - object Tv1YDpf: TcxGridDBColumn - Caption = #20248#31561#24179#26041 - DataBinding.FieldName = 'YDpf' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end object Tv1Column9: TcxGridDBColumn @@ -566,6 +556,7 @@ inherited frmTatClothInspHZList: TfrmTatClothInspHZList DataBinding.FieldName = 'xjJS' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end object Tv1Column10: TcxGridDBColumn @@ -573,13 +564,7 @@ inherited frmTatClothInspHZList: TfrmTatClothInspHZList DataBinding.FieldName = 'xjqty' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter - Width = 80 - end - object Tv1xjPF: TcxGridDBColumn - Caption = #23567#21367#24179#26041 - DataBinding.FieldName = 'xjPF' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end object Tv1Column7: TcxGridDBColumn @@ -587,6 +572,7 @@ inherited frmTatClothInspHZList: TfrmTatClothInspHZList DataBinding.FieldName = 'edJS' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end object Tv1Column8: TcxGridDBColumn @@ -594,13 +580,7 @@ inherited frmTatClothInspHZList: TfrmTatClothInspHZList DataBinding.FieldName = 'edqty' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter - Width = 80 - end - object Tv1edpf: TcxGridDBColumn - Caption = #20108#31561#24179#26041 - DataBinding.FieldName = 'edpf' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end object Tv1Column17: TcxGridDBColumn @@ -608,6 +588,7 @@ inherited frmTatClothInspHZList: TfrmTatClothInspHZList DataBinding.FieldName = 'csJS' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end object Tv1Column18: TcxGridDBColumn @@ -615,13 +596,7 @@ inherited frmTatClothInspHZList: TfrmTatClothInspHZList DataBinding.FieldName = 'csqty' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter - Width = 80 - end - object Tv1cspf: TcxGridDBColumn - Caption = #27979#35797#24179#26041 - DataBinding.FieldName = 'cspf' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end object Tv1Column13: TcxGridDBColumn @@ -629,6 +604,7 @@ inherited frmTatClothInspHZList: TfrmTatClothInspHZList DataBinding.FieldName = 'fqJS' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end object Tv1Column14: TcxGridDBColumn @@ -636,13 +612,7 @@ inherited frmTatClothInspHZList: TfrmTatClothInspHZList DataBinding.FieldName = 'fqqty' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter - Width = 80 - end - object Tv1fqPF: TcxGridDBColumn - Caption = #20998#20999#24179#26041 - DataBinding.FieldName = 'fqPF' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end object Tv1fbJS: TcxGridDBColumn @@ -650,6 +620,7 @@ inherited frmTatClothInspHZList: TfrmTatClothInspHZList DataBinding.FieldName = 'fbJS' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end object Tv1fbqty: TcxGridDBColumn @@ -657,22 +628,9 @@ inherited frmTatClothInspHZList: TfrmTatClothInspHZList DataBinding.FieldName = 'fbqty' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end - object Tv1FBPF: TcxGridDBColumn - Caption = #24223#24067#24179#26041 - DataBinding.FieldName = 'FBPF' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 80 - end - object Tv1Column19: TcxGridDBColumn - Caption = #25439#32791#24179#26041 - DataBinding.FieldName = 'SHpf' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 71 - end object Tv1Column15: TcxGridDBColumn DataBinding.FieldName = 'meterall' DataBinding.IsNullValueType = True @@ -749,5 +707,13 @@ inherited frmTatClothInspHZList: TfrmTatClothInspHZList Caption = #20840#24323 OnClick = PM11Click end + object N2: TMenuItem + Caption = #22797#21046 + OnClick = N2Click + end + object N3: TMenuItem + Caption = #22797#21046#27880#33050 + OnClick = N3Click + end end end diff --git a/E03梭织坯布检验/U_TatClothInspHZList.pas b/E03梭织坯布检验/U_TatClothInspHZList.pas index 29e933c..1d5c50b 100644 --- a/E03梭织坯布检验/U_TatClothInspHZList.pas +++ b/E03梭织坯布检验/U_TatClothInspHZList.pas @@ -44,7 +44,6 @@ type Tv1: TcxGridDBTableView; v1Column22: TcxGridDBColumn; Tv1C_Name: TcxGridDBColumn; - Tv1DXMF: TcxGridDBColumn; Tv1Column4: TcxGridDBColumn; Tv1PCID: TcxGridDBColumn; Tv1Column6: TcxGridDBColumn; @@ -57,7 +56,6 @@ type Tv1Column14: TcxGridDBColumn; Tv1Column17: TcxGridDBColumn; Tv1Column18: TcxGridDBColumn; - Tv1Column19: TcxGridDBColumn; cxGrid1Level1: TcxGridLevel; Tv1dxmeter: TcxGridDBColumn; Tv1Carno: TcxGridDBColumn; @@ -65,7 +63,6 @@ type Tv1qgMeter: TcxGridDBColumn; Tv1Column20: TcxGridDBColumn; Tv1Column21: TcxGridDBColumn; - Tv1Column22: TcxGridDBColumn; Tv1fbJS: TcxGridDBColumn; Tv1fbqty: TcxGridDBColumn; Tv1CIMachNo: TcxGridDBColumn; @@ -78,13 +75,10 @@ type C_GramWeight: TEdit; Tv1Column15: TcxGridDBColumn; Tv1Column23: TcxGridDBColumn; - Tv1YDpf: TcxGridDBColumn; - Tv1edpf: TcxGridDBColumn; - Tv1xjPF: TcxGridDBColumn; - Tv1cspf: TcxGridDBColumn; - Tv1fqPF: TcxGridDBColumn; - Tv1FBPF: TcxGridDBColumn; Tv1issp: TcxGridDBColumn; + N2: TMenuItem; + N3: TMenuItem; + Tv1DXMF: TcxGridDBColumn; procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormCreate(Sender: TObject); procedure TBRafreshClick(Sender: TObject); @@ -118,11 +112,16 @@ type procedure Tv1qgSLCompareRowValuesForCellMerging(Sender: TcxGridColumn; ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; const AValue1: Variant; ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; const AValue2: Variant; var AAreEqual: Boolean); procedure Tv1qgMeterCompareRowValuesForCellMerging(Sender: TcxGridColumn; ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; const AValue1: Variant; ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; const AValue2: Variant; var AAreEqual: Boolean); procedure Tv1isspCompareRowValuesForCellMerging(Sender: TcxGridColumn; ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; const AValue1: Variant; ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; const AValue2: Variant; var AAreEqual: Boolean); + procedure N2Click(Sender: TObject); + procedure N3Click(Sender: TObject); + procedure Tv1DblClick(Sender: TObject); + private CurrentPage, RecordsNumber: Integer; lstCust: TStringList; procedure InitGrid(); procedure SetStatus(); + procedure CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); { Private declarations } public canshu1: string; @@ -132,7 +131,7 @@ type implementation uses - U_DataLink, U_RTFun, U_LabelPrint; + U_DataLink, U_RTFun, U_LabelPrint, U_TatInspSHHZ, U_TatClothInspHZList2; {$R *.dfm} @@ -173,14 +172,131 @@ begin try ADOQueryMain.DisableControls; +// with ADOQueryMain do +// begin +// Filtered := False; +// Close; +// sql.Clear; +// sql.Add('select * from ( '); +// sql.Add('select A.C_NAME, A.C_width,A.C_GramWeight,A.pcid,A.Carno,A.dxmeter,issp=isnull(A.issp,'''') '); +// sql.Add(' ,maX(B.C_Width) AS DXMF,A.CIMachNo,A.BCIOID '); +//// sql.Add(' ,CAST(isNull(A.dxmeter,''1'') AS DECIMAL(18,2)) '); +// +//// SQL.Add(' ,qgMeter=sum(meter+SHMeter)/ISNULL(NULLIF(MAX(ISNULL(B.C_WidthNum, 1)), 0), 1) '); +// +// sql.Add(' ,meterall=(select sum(meter+SHMeter) FROM Tat_Cloth_Inspect X WHERE X.pcid = A.pcid and X.BCIOID = A.BCIOID and X.GRADE<>''ѭ'' and X.CIMachNo=A.CIMachNo )'); +// sql.Add(' ,C_Widthall= ISNULL(NULLIF(MAX(ISNULL(B.C_WidthNum, 1)), 0), 1) '); +// +// SQL.Add(' ,qgMeter=(select sum(meter+SHMeter) FROM Tat_Cloth_Inspect X WHERE X.pcid = A.pcid and X.BCIOID = A.BCIOID and X.GRADE<>''ѭ'' and X.CIMachNo=A.CIMachNo )/ISNULL(NULLIF(MAX(ISNULL(B.C_WidthNum, 1)), 0), 1) '); +// +//// SQL.Add(' ,qgSL = ROUND((select sum(meter+SHMeter) FROM Tat_Cloth_Inspect X WHERE X.pcid = A.pcid and X.BCIOID = A.BCIOID and X.GRADE<>''ѭ'' and X.CIMachNo=A.CIMachNo )*100 '); +//// sql.Add(' / ISNULL(NULLIF(MAX(ISNULL(B.C_WidthNum, 1)), 0), 1)/CAST(ISNULL(NULLIF(A.dxmeter, ''''), 1) AS DECIMAL(18,2)) , 2) '); +// +// SQL.Add(' ,qgSL = ROUND((CAST(ISNULL(NULLIF(A.dxmeter, ''''), 1) AS DECIMAL(18,2)) - (select sum(meter+SHMeter) FROM Tat_Cloth_Inspect X WHERE X.pcid = A.pcid and X.GRADE<>''ѭ'' and X.CIMachNo=A.CIMachNo )'); +// SQL.Add(' /ISNULL(NULLIF(MAX(ISNULL(B.C_WidthNum, 1)), 0), 1) )*100 '); +// sql.Add(' /CAST(ISNULL(NULLIF(A.dxmeter, ''''), 1) AS DECIMAL(18,2)) , 3) '); +// +// SQL.Add(',SHpf=SUM(CASE WHEN ISNUMERIC(A.SHMETER) = 1 AND ISNUMERIC(A.C_WIDTH) = 1 '); +// SQL.Add(' THEN CAST(A.SHMETER AS DECIMAL(18,2))/100 * CAST(A.C_WIDTH AS DECIMAL(18,2)) '); +// SQL.Add(' ELSE 0 END)'); +// +// SQL.Add(',SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN 1 ELSE 0 END )AS YDJS'); +// SQL.Add(',SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN A.meter ELSE 0 END )AS Ydqty'); +// SQL.Add(',YDpf=SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN A.meter ELSE 0 END )*A.C_Width/100 '); +// +// SQL.Add(',SUM(CASE WHEN A.GRADE=''Ʒ'' THEN 1 ELSE 0 END )AS edJS'); +// SQL.Add(',SUM(CASE WHEN A.GRADE=''Ʒ'' THEN A.meter ELSE 0 END )AS edqty'); +// SQL.Add(',edpf=SUM(CASE WHEN A.GRADE=''Ʒ'' THEN A.meter ELSE 0 END )*A.C_Width/100 '); +// +// SQL.Add(',SUM(CASE WHEN A.GRADE=''С'' THEN 1 ELSE 0 END )AS xjJS'); +// SQL.Add(',SUM(CASE WHEN A.GRADE=''С'' THEN A.meter ELSE 0 END )AS xjqty'); +// SQL.Add(',xjpf=SUM(CASE WHEN A.GRADE=''С'' THEN A.meter ELSE 0 END )*A.C_Width/100 '); +// +// SQL.Add(',SUM(CASE WHEN (A.GRADE=''ϲ'' and A.meter>0) THEN 1 ELSE 0 END )AS fbJS'); +// SQL.Add(',SUM(CASE WHEN A.GRADE=''ϲ'' THEN A.meter ELSE 0 END )AS fbqty'); +// SQL.Add(',fbpf=SUM(CASE WHEN A.GRADE=''ϲ'' THEN A.meter ELSE 0 END )*A.C_Width/100 '); +// +// SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END )AS fqJS'); +// SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN A.meter ELSE 0 END )AS fqqty'); +// SQL.Add(',fqpf=SUM(CASE WHEN A.GRADE='''' THEN A.meter ELSE 0 END )*A.C_Width/100 '); +// +//// SQL.Add(',SUM(CASE WHEN A.GRADE=''ѭ'' THEN 1 ELSE 0 END )AS xhJS'); +//// SQL.Add(',SUM(CASE WHEN A.GRADE=''ѭ'' THEN A.meter ELSE 0 END )AS xhqty'); +// SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END )AS csJS'); +// SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN A.meter ELSE 0 END )AS csqty'); +// SQL.Add(',cspf=SUM(CASE WHEN A.GRADE='''' THEN A.meter ELSE 0 END )*A.C_Width/100 '); +// +// +// // ŵֶ - ŵȾ/(ŵȾ+С+Ⱦ+Ծ+о+ϲ(ųΪ0)) +// SQL.Add(',YDRate=CAST('); +// SQL.Add(' CASE '); +// SQL.Add(' WHEN (SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN 1 ELSE 0 END) + '); // YDJS +// SQL.Add(' SUM(CASE WHEN A.GRADE=''С'' THEN 1 ELSE 0 END) + '); // xjJS +// SQL.Add(' SUM(CASE WHEN A.GRADE=''Ʒ'' THEN 1 ELSE 0 END) + '); // edJS +// SQL.Add(' SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END) + '); // csJS +// SQL.Add(' SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END) + '); // fqJS +// SQL.Add(' SUM(CASE WHEN (A.GRADE=''ϲ'' and A.meter>0) THEN 1 ELSE 0 END)) = 0 '); // fbJSųΪ0 +// SQL.Add(' THEN 0 '); +// SQL.Add(' ELSE '); +// SQL.Add(' CAST(SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN 1 ELSE 0 END)*100 AS DECIMAL(18,4)) / '); // ӣYDJS +// SQL.Add(' CAST((SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN 1 ELSE 0 END) + '); // YDJS +// SQL.Add(' SUM(CASE WHEN A.GRADE=''С'' THEN 1 ELSE 0 END) + '); // xjJS +// SQL.Add(' SUM(CASE WHEN A.GRADE=''Ʒ'' THEN 1 ELSE 0 END) + '); // edJS +// SQL.Add(' SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END) + '); // csJS +// SQL.Add(' SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END) + '); // fqJS +// SQL.Add(' SUM(CASE WHEN (A.GRADE=''ϲ'' and A.meter>0) THEN 1 ELSE 0 END)) AS DECIMAL(18,4)) '); // fbJS +// SQL.Add(' END '); +// SQL.Add('AS DECIMAL(18,4)) '); +// +// // ŵֶ - ŵȾ/(ŵȾ+С+Ⱦ+Ծ+о+ϲ(ųΪ0)) +// SQL.Add(',FBRate=CAST('); +// SQL.Add(' CASE '); +// SQL.Add(' WHEN (SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN 1 ELSE 0 END) + '); // YDJS +// SQL.Add(' SUM(CASE WHEN A.GRADE=''С'' THEN 1 ELSE 0 END) + '); // xjJS +// SQL.Add(' SUM(CASE WHEN A.GRADE=''Ʒ'' THEN 1 ELSE 0 END) + '); // edJS +// SQL.Add(' SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END) + '); // csJS +// SQL.Add(' SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END) + '); // fqJS +// SQL.Add(' SUM(CASE WHEN (A.GRADE=''ϲ'' and A.meter>0) THEN 1 ELSE 0 END)) = 0 '); // fbJSųΪ0 +// SQL.Add(' THEN 0 '); +// SQL.Add(' ELSE '); +// SQL.Add(' CAST(SUM(CASE WHEN (A.GRADE=''ϲ'' and A.meter>0) THEN 1 ELSE 0 END)*100 AS DECIMAL(18,4)) / '); // ӣYDJS +// SQL.Add(' CAST((SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN 1 ELSE 0 END) + '); // YDJS +// SQL.Add(' SUM(CASE WHEN A.GRADE=''С'' THEN 1 ELSE 0 END) + '); // xjJS +// SQL.Add(' SUM(CASE WHEN A.GRADE=''Ʒ'' THEN 1 ELSE 0 END) + '); // edJS +// SQL.Add(' SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END) + '); // csJS +// SQL.Add(' SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END) + '); // fqJS +// SQL.Add(' SUM(CASE WHEN (A.GRADE=''ϲ'' and A.meter>0) THEN 1 ELSE 0 END)) AS DECIMAL(18,4)) '); // fbJS +// SQL.Add(' END '); +// SQL.Add('AS DECIMAL(18,4)) '); +// +// SQL.Add('from Tat_Cloth_Inspect A '); +// SQL.Add(' left join BS_Cloth_IO B on A.BCIOID = B.BCIOID '); +// SQL.Add(' where (A.BEFOREC_WIDTH='''' OR A.BEFOREC_WIDTH is null) '); +// SQL.Add(' and (NOT EXISTS (select * from BS_Cloth_IO_mx X WHERE X.BCIOID = A.BCIOID and X.C_MXSHWidth is not NULL)) '); +// SQL.Add(' and A.GRADE<>''ѭ'' '); +// SQL.Add(' and A.Carno<>'''' and A.Carno is not NULL '); +// +// SQL.Add(WSql1); +// +// sql.Add(' group by A.C_NAME, A.C_width,A.C_GramWeight,A.pcid,A.Carno,A.dxmeter'); +// sql.Add(' ,A.CIMachNo,A.BCIOID,isnull(A.issp,'''')'); +// +// sql.add(' ) T where 1=1 '); +// SQL.Add(WSql); +// sql.Add(' Order By T.Carno,T.pcid,ISNULL(CAST(NULLIF(dxmeter, '''') AS DECIMAL), 0),BCIOID '); +//// showmessage(sql.text); +// Open; +// end; + + with ADOQueryMain do begin Filtered := False; Close; sql.Clear; sql.Add('select * from ( '); - sql.Add('select A.C_NAME, A.C_width,A.C_GramWeight,A.pcid,A.Carno,A.dxmeter,A.issp '); - sql.Add(' ,maX(B.C_Width) AS DXMF,A.CIMachNo,A.BCIOID '); + sql.Add('select A.C_NAME,A.C_GramWeight,A.pcid,A.Carno,A.BCIOID,A.dxmeter,issp=isnull(A.issp,'''') '); + sql.Add(',maX(B.C_Width) AS DXMF,A.CIMachNo '); // sql.Add(' ,CAST(isNull(A.dxmeter,''1'') AS DECIMAL(18,2)) '); // SQL.Add(' ,qgMeter=sum(meter+SHMeter)/ISNULL(NULLIF(MAX(ISNULL(B.C_WidthNum, 1)), 0), 1) '); @@ -197,35 +313,35 @@ begin SQL.Add(' /ISNULL(NULLIF(MAX(ISNULL(B.C_WidthNum, 1)), 0), 1) )*100 '); sql.Add(' /CAST(ISNULL(NULLIF(A.dxmeter, ''''), 1) AS DECIMAL(18,2)) , 3) '); - SQL.Add(',SHpf=SUM(CASE WHEN ISNUMERIC(A.SHMETER) = 1 AND ISNUMERIC(A.C_WIDTH) = 1 '); - SQL.Add(' THEN CAST(A.SHMETER AS DECIMAL(18,2))/100 * CAST(A.C_WIDTH AS DECIMAL(18,2)) '); - SQL.Add(' ELSE 0 END)'); +// SQL.Add(',SHpf=SUM(CASE WHEN ISNUMERIC(A.SHMETER) = 1 AND ISNUMERIC(A.C_WIDTH) = 1 '); +// SQL.Add(' THEN CAST(A.SHMETER AS DECIMAL(18,2))/100 * CAST(A.C_WIDTH AS DECIMAL(18,2)) '); +// SQL.Add(' ELSE 0 END)'); SQL.Add(',SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN 1 ELSE 0 END )AS YDJS'); SQL.Add(',SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN A.meter ELSE 0 END )AS Ydqty'); - SQL.Add(',YDpf=SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN A.meter ELSE 0 END )*A.C_Width/100 '); +// SQL.Add(',YDpf=SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN A.meter ELSE 0 END )*A.C_Width/100 '); SQL.Add(',SUM(CASE WHEN A.GRADE=''Ʒ'' THEN 1 ELSE 0 END )AS edJS'); SQL.Add(',SUM(CASE WHEN A.GRADE=''Ʒ'' THEN A.meter ELSE 0 END )AS edqty'); - SQL.Add(',edpf=SUM(CASE WHEN A.GRADE=''Ʒ'' THEN A.meter ELSE 0 END )*A.C_Width/100 '); +// SQL.Add(',edpf=SUM(CASE WHEN A.GRADE=''Ʒ'' THEN A.meter ELSE 0 END )*A.C_Width/100 '); SQL.Add(',SUM(CASE WHEN A.GRADE=''С'' THEN 1 ELSE 0 END )AS xjJS'); SQL.Add(',SUM(CASE WHEN A.GRADE=''С'' THEN A.meter ELSE 0 END )AS xjqty'); - SQL.Add(',xjpf=SUM(CASE WHEN A.GRADE=''С'' THEN A.meter ELSE 0 END )*A.C_Width/100 '); +// SQL.Add(',xjpf=SUM(CASE WHEN A.GRADE=''С'' THEN A.meter ELSE 0 END )*A.C_Width/100 '); SQL.Add(',SUM(CASE WHEN (A.GRADE=''ϲ'' and A.meter>0) THEN 1 ELSE 0 END )AS fbJS'); SQL.Add(',SUM(CASE WHEN A.GRADE=''ϲ'' THEN A.meter ELSE 0 END )AS fbqty'); - SQL.Add(',fbpf=SUM(CASE WHEN A.GRADE=''ϲ'' THEN A.meter ELSE 0 END )*A.C_Width/100 '); +// SQL.Add(',fbpf=SUM(CASE WHEN A.GRADE=''ϲ'' THEN A.meter ELSE 0 END )*A.C_Width/100 '); SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END )AS fqJS'); SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN A.meter ELSE 0 END )AS fqqty'); - SQL.Add(',fqpf=SUM(CASE WHEN A.GRADE='''' THEN A.meter ELSE 0 END )*A.C_Width/100 '); +// SQL.Add(',fqpf=SUM(CASE WHEN A.GRADE='''' THEN A.meter ELSE 0 END )*A.C_Width/100 '); // SQL.Add(',SUM(CASE WHEN A.GRADE=''ѭ'' THEN 1 ELSE 0 END )AS xhJS'); // SQL.Add(',SUM(CASE WHEN A.GRADE=''ѭ'' THEN A.meter ELSE 0 END )AS xhqty'); SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END )AS csJS'); SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN A.meter ELSE 0 END )AS csqty'); - SQL.Add(',cspf=SUM(CASE WHEN A.GRADE='''' THEN A.meter ELSE 0 END )*A.C_Width/100 '); +// SQL.Add(',cspf=SUM(CASE WHEN A.GRADE='''' THEN A.meter ELSE 0 END )*A.C_Width/100 '); // ŵֶ - ŵȾ/(ŵȾ+С+Ⱦ+Ծ+о+ϲ(ųΪ0)) @@ -279,12 +395,12 @@ begin SQL.Add(WSql1); - sql.Add(' group by A.C_NAME, A.C_width,A.C_GramWeight,A.pcid,A.Carno,A.dxmeter'); - sql.Add(' ,A.CIMachNo,A.BCIOID,A.issp'); + sql.Add(' group by A.C_NAME,A.C_GramWeight,A.pcid,A.BCIOID,A.Carno,A.dxmeter'); + sql.Add(' ,A.CIMachNo,isnull(A.issp,'''')'); sql.add(' ) T where 1=1 '); SQL.Add(WSql); - sql.Add(' Order By T.Carno,T.pcid,BCIOID'); + sql.Add(' Order By T.Carno,T.pcid,ISNULL(CAST(NULLIF(dxmeter, '''') AS DECIMAL), 0) '); // showmessage(sql.text); Open; end; @@ -367,7 +483,14 @@ procedure TfrmTatClothInspHZList.TBExportClick(Sender: TObject); begin if ADOQueryMain.IsEmpty then exit; + with CDS_1 do + begin + Filtered := false; + Filter := ' ssel = 1'; + Filtered := true; + end; TcxGridToExcel(Self.Caption, cxGrid1); + InitGrid(); end; procedure TfrmTatClothInspHZList.orderNoKeyPress(Sender: TObject; var Key: Char); @@ -459,10 +582,10 @@ begin // exit; // end; - if (ARow1.Values[Tv1DXMF.Index] = ARow2.Values[Tv1DXMF.Index]) and (ARow1.Values[Tv1DXMF.Index] <> NULL) and (ARow2.Values[Tv1DXMF.Index] <> NULL) then - AAreEqual := True - else - AAreEqual := False; +// if (ARow1.Values[Tv1DXMF.Index] = ARow2.Values[Tv1DXMF.Index]) and (ARow1.Values[Tv1DXMF.Index] <> NULL) and (ARow2.Values[Tv1DXMF.Index] <> NULL) then +// AAreEqual := True +// else +// AAreEqual := False; end; @@ -575,6 +698,34 @@ begin lstCust.Clear; end; +procedure TfrmTatClothInspHZList.Tv1DblClick(Sender: TObject); +begin + if CDS_1.IsEmpty then + Exit; + try + frmTatClothInspHZList2 := TfrmTatClothInspHZList2.Create(Application); + with frmTatClothInspHZList2 do + begin + + fEndDateTime := self.EndDate.DateTime; + fBegDateTime := Self.BegDate.DateTime; + + + fC_Name := Self.CDS_1.FieldByName('C_Name').AsString; + fissp := Self.CDS_1.FieldByName('issp').AsString; + fCarno := Self.CDS_1.FieldByName('Carno').AsString; + fpcid := Self.CDS_1.FieldByName('pcid').AsString; + if ShowModal = 1 then + begin + + end; + end; + finally + frmTatClothInspHZList2.Free; + end; +end; + + procedure TfrmTatClothInspHZList.Tv1dxmeterCompareRowValuesForCellMerging(Sender: TcxGridColumn; ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; const AValue1: Variant; ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; const AValue2: Variant; var AAreEqual: Boolean); begin if (ARow1.Values[Tv1PCID.Index] <> ARow2.Values[Tv1PCID.Index]) or (ARow1.Values[Tv1PCID.Index] = NULL) or (ARow2.Values[Tv1PCID.Index] = NULL) then @@ -639,6 +790,36 @@ begin SelOKNo(CDS_1, true); end; +procedure TfrmTatClothInspHZList.N2Click(Sender: TObject); +begin + Clipboard.SetTextBuf(PChar(Trim(CDS_1.fieldbyname(TV1.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString))); + +end; + +procedure TfrmTatClothInspHZList.N3Click(Sender: TObject); +begin + CopyColumnSummaryToClipboard(TV1.Controller.FocusedColumn); +end; + +procedure TfrmTatClothInspHZList.CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); +var + AView: TcxGridDBTableView; + SummaryIndex: Integer; + SummaryText: string; +begin + AView := Tv1; + + // ָеĻ + SummaryIndex := AView.DataController.Summary.FooterSummaryItems.IndexOfItemLink(AColumn); + if SummaryIndex <> -1 then + begin + SummaryText := AView.DataController.Summary.FooterSummaryTexts[SummaryIndex]; + Clipboard.AsText := SummaryText; + end + else + ShowMessage('δҵеĻ'); +end; + procedure TfrmTatClothInspHZList.ToolButton2Click(Sender: TObject); var WSql: string; diff --git a/E03梭织坯布检验/U_TatClothInspHZList2.dfm b/E03梭织坯布检验/U_TatClothInspHZList2.dfm new file mode 100644 index 0000000..ffe0db6 --- /dev/null +++ b/E03梭织坯布检验/U_TatClothInspHZList2.dfm @@ -0,0 +1,791 @@ +inherited frmTatClothInspHZList2: TfrmTatClothInspHZList2 + Left = 184 + Top = 138 + Caption = #26816#39564#20449#24687#27719#24635'2' + ClientHeight = 600 + ClientWidth = 1540 + Position = poScreenCenter + WindowState = wsMaximized + ExplicitWidth = 1556 + ExplicitHeight = 639 + PixelsPerInch = 96 + TextHeight = 13 + object ToolBar1: TToolBar [0] + Tag = 1 + Left = 0 + Top = 0 + Width = 1540 + Height = 30 + AutoSize = True + ButtonHeight = 30 + ButtonWidth = 83 + Caption = 'ToolBar1' + Color = clWhite + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [] + Images = DataLink_TatInsp.cxImageList_bar + List = True + ParentColor = False + ParentFont = False + ShowCaptions = True + TabOrder = 0 + object TBRafresh: TToolButton + Left = 0 + Top = 0 + AutoSize = True + Caption = #21047#26032 + ImageIndex = 1 + OnClick = TBRafreshClick + end + object TBExport: TToolButton + Left = 63 + Top = 0 + AutoSize = True + Caption = #23548#20986 + ImageIndex = 20 + OnClick = TBExportClick + end + object ToolButton4: TToolButton + Left = 126 + Top = 0 + AutoSize = True + Caption = #20445#23384#26684#24335 + ImageIndex = 16 + OnClick = ToolButton4Click + end + object TBClose: TToolButton + Left = 213 + Top = 0 + AutoSize = True + Caption = #20851#38381 + ImageIndex = 7 + OnClick = TBCloseClick + end + end + object Panel1: TPanel [1] + Left = 0 + Top = 30 + Width = 1540 + Height = 67 + Align = alTop + BevelInner = bvRaised + BevelOuter = bvLowered + Color = clWhite + ParentBackground = False + TabOrder = 1 + object Label2: TLabel + Left = 70 + Top = 36 + Width = 12 + Height = 13 + Caption = #33267 + end + object Label5: TLabel + Left = 190 + Top = 10 + Width = 52 + Height = 12 + Hint = '0' + Caption = #20135#21697#21517#31216 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object Label1: TLabel + Left = 358 + Top = 10 + Width = 26 + Height = 12 + Hint = '0' + Caption = #38376#24133 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object Label3: TLabel + Left = 190 + Top = 36 + Width = 52 + Height = 12 + Hint = '0' + Caption = #27969#36716#21345#21495 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object Label4: TLabel + Left = 358 + Top = 36 + Width = 26 + Height = 12 + Hint = '0' + Caption = #20811#37325 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object BegDate: TDateTimePicker + Left = 88 + Top = 6 + Width = 87 + Height = 20 + Date = 40768.000000000000000000 + Time = 0.458268587972270300 + TabOrder = 1 + end + object EndDate: TDateTimePicker + Left = 88 + Top = 32 + Width = 87 + Height = 20 + Date = 40768.000000000000000000 + Time = 0.458268587972270300 + TabOrder = 2 + end + object begtime: TDateTimePicker + Left = 137 + Top = 132 + Width = 55 + Height = 20 + Date = 39780.000000000000000000 + Format = 'HH:mm' + Time = 39780.000000000000000000 + Kind = dtkTime + TabOrder = 3 + end + object endTime: TDateTimePicker + Left = 137 + Top = 156 + Width = 55 + Height = 20 + Date = 39780.000000000000000000 + Format = 'HH:mm' + Time = 0.999317129630071600 + Kind = dtkTime + TabOrder = 4 + end + object IsJYTime: TCheckBox + Left = 14 + Top = 8 + Width = 73 + Height = 17 + Caption = #26597#35810#26085#26399 + Checked = True + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + State = cbChecked + TabOrder = 0 + OnClick = IsJYTimeClick + end + object C_Name: TEdit + Tag = 2 + Left = 245 + Top = 6 + Width = 100 + Height = 21 + Hint = '0' + TabOrder = 5 + OnKeyPress = C_NameKeyPress + end + object C_width: TEdit + Tag = 2 + Left = 384 + Top = 6 + Width = 100 + Height = 21 + Hint = '0' + TabOrder = 6 + OnKeyPress = C_NameKeyPress + end + object pcid: TEdit + Tag = 2 + Left = 245 + Top = 32 + Width = 100 + Height = 21 + Hint = '0' + TabOrder = 7 + OnKeyPress = C_NameKeyPress + end + object C_GramWeight: TEdit + Tag = 2 + Left = 384 + Top = 32 + Width = 100 + Height = 21 + Hint = '0' + TabOrder = 8 + OnKeyPress = C_NameKeyPress + end + end + object cxGrid1: TcxGrid [2] + Left = 0 + Top = 97 + Width = 1540 + Height = 503 + Align = alClient + BorderStyle = cxcbsNone + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [] + Images = DataLink_TatInsp.cxImageList_bar + ParentFont = False + PopupMenu = PM_1 + TabOrder = 2 + object Tv1: TcxGridDBTableView + Navigator.Buttons.CustomButtons = <> + ScrollbarAnnotations.CustomAnnotations = <> + DataController.DataSource = DS_1 + DataController.Filter.AutoDataSetFilter = True + DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost] + DataController.Summary.DefaultGroupSummaryItems = <> + DataController.Summary.FooterSummaryItems = < + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skCount + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Format = #26816#39564#31995#25968'=#.##' + Kind = skAverage + end + item + Format = #25442#31639#31995#25968'=#.##' + Kind = skAverage + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + Column = Tv1Column6 + end + item + Kind = skSum + Column = Tv1Column1 + end + item + Kind = skSum + Column = Tv1Column7 + end + item + Kind = skSum + Column = Tv1Column8 + end + item + Kind = skSum + Column = Tv1Column9 + end + item + Kind = skSum + Column = Tv1Column10 + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + Column = Tv1Column13 + end + item + Kind = skSum + Column = Tv1Column14 + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + Column = Tv1Column17 + end + item + Kind = skSum + Column = Tv1Column18 + end + item + Kind = skSum + Column = Tv1Column19 + end + item + Kind = skSum + Column = Tv1YDpf + end + item + Kind = skSum + Column = Tv1xjPF + end + item + Kind = skSum + Column = Tv1edpf + end + item + Kind = skSum + Column = Tv1cspf + end + item + Kind = skSum + Column = Tv1fqPF + end + item + Kind = skSum + Column = Tv1fbJS + end + item + Kind = skSum + Column = Tv1fbqty + end + item + Kind = skSum + Column = Tv1FBPF + end> + DataController.Summary.SummaryGroups = <> + OptionsCustomize.ColumnFiltering = False + OptionsView.Footer = True + OptionsView.GroupByBox = False + OptionsView.IndicatorWidth = 30 + object v1Column22: TcxGridDBColumn + Caption = #36873#25321 + DataBinding.FieldName = 'SSel' + DataBinding.IsNullValueType = True + PropertiesClassName = 'TcxCheckBoxProperties' + Properties.ImmediatePost = True + Properties.NullStyle = nssUnchecked + HeaderAlignmentHorz = taCenter + Options.Sorting = False + Width = 66 + end + object Tv1C_Name: TcxGridDBColumn + Caption = #20135#21697#21517#31216 + DataBinding.FieldName = 'C_Name' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Options.CellMerging = True + Width = 66 + OnCompareRowValuesForCellMerging = Tv1C_NameCompareRowValuesForCellMerging + end + object Tv1DXMF: TcxGridDBColumn + Caption = #23450#22411#38376#24133 + DataBinding.FieldName = 'DXMF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Options.CellMerging = True + Width = 72 + OnCompareRowValuesForCellMerging = Tv1DXMFCompareRowValuesForCellMerging + end + object Tv1dxmeter: TcxGridDBColumn + Caption = #23450#22411#31859#25968 + DataBinding.FieldName = 'dxmeter' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Options.CellMerging = True + Width = 80 + OnCompareRowValuesForCellMerging = Tv1dxmeterCompareRowValuesForCellMerging + end + object Tv1Carno: TcxGridDBColumn + Caption = #26426#21488#21495 + DataBinding.FieldName = 'Carno' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Options.CellMerging = True + Width = 90 + OnCompareRowValuesForCellMerging = Tv1CarnoCompareRowValuesForCellMerging + end + object Tv1PCID: TcxGridDBColumn + Caption = #27969#36716#21345#21495 + DataBinding.FieldName = 'pcid' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Options.CellMerging = True + Width = 68 + OnCompareRowValuesForCellMerging = Tv1PCIDCompareRowValuesForCellMerging + end + object Tv1CIMachNo: TcxGridDBColumn + Caption = #20998#20999#26426#21488 + DataBinding.FieldName = 'CIMachNo' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Options.CellMerging = True + Width = 80 + OnCompareRowValuesForCellMerging = Tv1CIMachNoCompareRowValuesForCellMerging + end + object Tv1BCIOID: TcxGridDBColumn + Caption = #20998#20999#21333#21495 + DataBinding.FieldName = 'BCIOID' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Options.CellMerging = True + Width = 80 + OnCompareRowValuesForCellMerging = Tv1BCIOIDCompareRowValuesForCellMerging + end + object Tv1qgSL: TcxGridDBColumn + Caption = #20999#21106#32553#29575 + DataBinding.FieldName = 'qgSL' + DataBinding.IsNullValueType = True + PropertiesClassName = 'TcxCurrencyEditProperties' + Properties.DecimalPlaces = 2 + Properties.DisplayFormat = '0.00%' + HeaderAlignmentHorz = taCenter + Options.Editing = False + Options.CellMerging = True + Width = 90 + OnCompareRowValuesForCellMerging = Tv1qgSLCompareRowValuesForCellMerging + end + object Tv1qgMeter: TcxGridDBColumn + Caption = #20999#21106#31859#25968 + DataBinding.FieldName = 'qgMeter' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Options.CellMerging = True + Width = 90 + OnCompareRowValuesForCellMerging = Tv1qgMeterCompareRowValuesForCellMerging + end + object Tv1Column20: TcxGridDBColumn + Caption = #20248#31561#29575 + DataBinding.FieldName = 'YDRate' + DataBinding.IsNullValueType = True + PropertiesClassName = 'TcxCurrencyEditProperties' + Properties.DisplayFormat = '0.0%' + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 90 + end + object Tv1Column21: TcxGridDBColumn + Caption = #24223#24067#29575 + DataBinding.FieldName = 'FBRate' + DataBinding.IsNullValueType = True + PropertiesClassName = 'TcxCurrencyEditProperties' + Properties.DisplayFormat = '0.0%' + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 90 + end + object Tv1Column22: TcxGridDBColumn + Caption = #20999#21106#38376#24133 + DataBinding.FieldName = 'C_width' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 90 + end + object Tv1issp: TcxGridDBColumn + Caption = #21452#21943 + DataBinding.FieldName = 'issp' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Options.CellMerging = True + Width = 80 + OnCompareRowValuesForCellMerging = Tv1isspCompareRowValuesForCellMerging + end + object Tv1Column4: TcxGridDBColumn + Caption = #20811#37325 + DataBinding.FieldName = 'C_GramWeight' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 66 + end + object Tv1Column6: TcxGridDBColumn + Caption = #20248#31561#21367#25968 + DataBinding.FieldName = 'YDJs' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 74 + end + object Tv1Column1: TcxGridDBColumn + Caption = #20248#31561#31859#25968 + DataBinding.FieldName = 'Ydqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1YDpf: TcxGridDBColumn + Caption = #20248#31561#24179#26041 + DataBinding.FieldName = 'YDpf' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1Column9: TcxGridDBColumn + Caption = #23567#21367#21367#25968 + DataBinding.FieldName = 'xjJS' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1Column10: TcxGridDBColumn + Caption = #23567#21367#31859#25968 + DataBinding.FieldName = 'xjqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1xjPF: TcxGridDBColumn + Caption = #23567#21367#24179#26041 + DataBinding.FieldName = 'xjPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1Column7: TcxGridDBColumn + Caption = #20108#31561#21367#25968 + DataBinding.FieldName = 'edJS' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1Column8: TcxGridDBColumn + Caption = #20108#31561#31859#25968 + DataBinding.FieldName = 'edqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1edpf: TcxGridDBColumn + Caption = #20108#31561#24179#26041 + DataBinding.FieldName = 'edpf' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1Column17: TcxGridDBColumn + Caption = #27979#35797#21367#25968 + DataBinding.FieldName = 'csJS' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1Column18: TcxGridDBColumn + Caption = #27979#35797#31859#25968 + DataBinding.FieldName = 'csqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1cspf: TcxGridDBColumn + Caption = #27979#35797#24179#26041 + DataBinding.FieldName = 'cspf' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1Column13: TcxGridDBColumn + Caption = #20998#20999#21367#25968 + DataBinding.FieldName = 'fqJS' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1Column14: TcxGridDBColumn + Caption = #20998#20999#31859#25968 + DataBinding.FieldName = 'fqqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1fqPF: TcxGridDBColumn + Caption = #20998#20999#24179#26041 + DataBinding.FieldName = 'fqPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1fbJS: TcxGridDBColumn + Caption = #24223#24067#21367#25968 + DataBinding.FieldName = 'fbJS' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1fbqty: TcxGridDBColumn + Caption = #24223#24067#31859#25968 + DataBinding.FieldName = 'fbqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1FBPF: TcxGridDBColumn + Caption = #24223#24067#24179#26041 + DataBinding.FieldName = 'FBPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1Column19: TcxGridDBColumn + Caption = #25439#32791#24179#26041 + DataBinding.FieldName = 'SHpf' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 71 + end + object Tv1Column15: TcxGridDBColumn + DataBinding.FieldName = 'meterall' + DataBinding.IsNullValueType = True + Visible = False + end + object Tv1Column23: TcxGridDBColumn + DataBinding.FieldName = 'C_Widthall' + DataBinding.IsNullValueType = True + Visible = False + end + end + object cxGrid1Level1: TcxGridLevel + GridView = Tv1 + end + end + inherited ADOQueryBaseCmd: TADOQuery + Connection = DataLink_TatInsp.ADOLink + Left = 553 + Top = 200 + end + inherited ADOQueryBaseTemp: TADOQuery + Connection = DataLink_TatInsp.ADOLink + Left = 425 + Top = 201 + end + object ADOQueryCmd: TADOQuery + Connection = DataLink_TatInsp.ADOLink + CommandTimeout = 600 + Parameters = <> + Left = 148 + Top = 280 + end + object ADOQueryMain: TADOQuery + Connection = DataLink_TatInsp.ADOLink + LockType = ltReadOnly + Parameters = <> + Left = 252 + Top = 260 + end + object ADOQueryTemp: TADOQuery + Connection = DataLink_TatInsp.ADOLink + LockType = ltReadOnly + CommandTimeout = 600 + Parameters = <> + Left = 112 + Top = 204 + end + object DS_1: TDataSource + DataSet = CDS_1 + Left = 828 + Top = 284 + end + object GPM_1: TcxGridPopupMenu + Grid = cxGrid1 + PopupMenus = <> + Left = 728 + Top = 288 + end + object CDS_1: TClientDataSet + Aggregates = <> + Params = <> + BeforeOpen = CDS_1BeforeOpen + Left = 776 + Top = 284 + end + object PM_1: TPopupMenu + Left = 560 + Top = 384 + object N1: TMenuItem + Caption = #20840#36873 + OnClick = N1Click + end + object PM11: TMenuItem + Caption = #20840#24323 + OnClick = PM11Click + end + object N2: TMenuItem + Caption = #22797#21046 + OnClick = N2Click + end + object N3: TMenuItem + Caption = #22797#21046#27880#33050 + OnClick = N3Click + end + end +end diff --git a/E03梭织坯布检验/U_TatClothInspHZList2.pas b/E03梭织坯布检验/U_TatClothInspHZList2.pas new file mode 100644 index 0000000..fc456ed --- /dev/null +++ b/E03梭织坯布检验/U_TatClothInspHZList2.pas @@ -0,0 +1,866 @@ +unit U_TatClothInspHZList2; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage, + cxEdit, DB, cxDBData, cxGridCustomTableView, cxGridTableView, + cxGridBandedTableView, cxGridDBBandedTableView, cxGridLevel, cxClasses, + cxControls, cxGridCustomView, cxGridDBTableView, cxGrid, StdCtrls, ComCtrls, + ExtCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, ADODB, DBClient, + cxDropDownEdit, cxCheckBox, RM_Common, RM_Class, RM_e_Xls, RM_Dataset, + RM_System, RM_GridReport, Menus, cxCalendar, MovePanel, Math, Clipbrd, + U_BaseInput, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, cxTextEdit, + dxSkinsCore, dxSkinsDefaultPainters, dxDateRanges, dxBarBuiltInMenu, + U_BaseList, cxPC, System.StrUtils, dxScrollbarAnnotations, cxCurrencyEdit, + System.ImageList, Vcl.ImgList; + +type + TfrmTatClothInspHZList2 = class(TfrmBaseInput) + ToolBar1: TToolBar; + TBRafresh: TToolButton; + TBExport: TToolButton; + TBClose: TToolButton; + Panel1: TPanel; + ADOQueryCmd: TADOQuery; + ADOQueryMain: TADOQuery; + ADOQueryTemp: TADOQuery; + DS_1: TDataSource; + GPM_1: TcxGridPopupMenu; + Label2: TLabel; + BegDate: TDateTimePicker; + EndDate: TDateTimePicker; + CDS_1: TClientDataSet; + begtime: TDateTimePicker; + endTime: TDateTimePicker; + IsJYTime: TCheckBox; + ToolButton4: TToolButton; + Label5: TLabel; + C_Name: TEdit; + PM_1: TPopupMenu; + PM11: TMenuItem; + N1: TMenuItem; + cxGrid1: TcxGrid; + Tv1: TcxGridDBTableView; + v1Column22: TcxGridDBColumn; + Tv1C_Name: TcxGridDBColumn; + Tv1DXMF: TcxGridDBColumn; + Tv1Column4: TcxGridDBColumn; + Tv1PCID: TcxGridDBColumn; + Tv1Column6: TcxGridDBColumn; + Tv1Column1: TcxGridDBColumn; + Tv1Column7: TcxGridDBColumn; + Tv1Column8: TcxGridDBColumn; + Tv1Column9: TcxGridDBColumn; + Tv1Column10: TcxGridDBColumn; + Tv1Column13: TcxGridDBColumn; + Tv1Column14: TcxGridDBColumn; + Tv1Column17: TcxGridDBColumn; + Tv1Column18: TcxGridDBColumn; + Tv1Column19: TcxGridDBColumn; + cxGrid1Level1: TcxGridLevel; + Tv1dxmeter: TcxGridDBColumn; + Tv1Carno: TcxGridDBColumn; + Tv1qgSL: TcxGridDBColumn; + Tv1qgMeter: TcxGridDBColumn; + Tv1Column20: TcxGridDBColumn; + Tv1Column21: TcxGridDBColumn; + Tv1Column22: TcxGridDBColumn; + Tv1fbJS: TcxGridDBColumn; + Tv1fbqty: TcxGridDBColumn; + Tv1CIMachNo: TcxGridDBColumn; + Tv1BCIOID: TcxGridDBColumn; + Label1: TLabel; + C_width: TEdit; + Label3: TLabel; + pcid: TEdit; + Label4: TLabel; + C_GramWeight: TEdit; + Tv1Column15: TcxGridDBColumn; + Tv1Column23: TcxGridDBColumn; + Tv1YDpf: TcxGridDBColumn; + Tv1edpf: TcxGridDBColumn; + Tv1xjPF: TcxGridDBColumn; + Tv1cspf: TcxGridDBColumn; + Tv1fqPF: TcxGridDBColumn; + Tv1FBPF: TcxGridDBColumn; + Tv1issp: TcxGridDBColumn; + N2: TMenuItem; + N3: TMenuItem; + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure TBRafreshClick(Sender: TObject); + procedure ConNoMChange(Sender: TObject); + procedure TBCloseClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure TBExportClick(Sender: TObject); + procedure orderNoKeyPress(Sender: TObject; var Key: Char); + procedure BTNPClick(Sender: TObject); + procedure BTLPClick(Sender: TObject); + procedure TCBNORChange(Sender: TObject); + procedure JYTypeChange(Sender: TObject); + procedure ToolButton2Click(Sender: TObject); + procedure cxPageControl1Change(Sender: TObject); + procedure CDS_1BeforeOpen(DataSet: TDataSet); + procedure Tv1DataControllerFilterBeforeChange(Sender: TcxDBDataFilterCriteria; ADataSet: TDataSet; const AFilterText: string); + + procedure Tv1TcxGridDBDataControllerTcxDataSummaryFooterSummaryItems6GetText(Sender: TcxDataSummaryItem; const AValue: Variant; AIsFooter: Boolean; var AText: string); + procedure ToolButton4Click(Sender: TObject); + procedure PM11Click(Sender: TObject); + procedure N1Click(Sender: TObject); + procedure IsJYTimeClick(Sender: TObject); + procedure C_NameKeyPress(Sender: TObject; var Key: Char); + procedure Tv1PCIDCompareRowValuesForCellMerging(Sender: TcxGridColumn; ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; const AValue1: Variant; ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; const AValue2: Variant; var AAreEqual: Boolean); + procedure Tv1C_NameCompareRowValuesForCellMerging(Sender: TcxGridColumn; ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; const AValue1: Variant; ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; const AValue2: Variant; var AAreEqual: Boolean); + procedure Tv1DXMFCompareRowValuesForCellMerging(Sender: TcxGridColumn; ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; const AValue1: Variant; ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; const AValue2: Variant; var AAreEqual: Boolean); + procedure Tv1dxmeterCompareRowValuesForCellMerging(Sender: TcxGridColumn; ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; const AValue1: Variant; ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; const AValue2: Variant; var AAreEqual: Boolean); + procedure Tv1CarnoCompareRowValuesForCellMerging(Sender: TcxGridColumn; ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; const AValue1: Variant; ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; const AValue2: Variant; var AAreEqual: Boolean); + procedure Tv1CIMachNoCompareRowValuesForCellMerging(Sender: TcxGridColumn; ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; const AValue1: Variant; ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; const AValue2: Variant; var AAreEqual: Boolean); + procedure Tv1BCIOIDCompareRowValuesForCellMerging(Sender: TcxGridColumn; ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; const AValue1: Variant; ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; const AValue2: Variant; var AAreEqual: Boolean); + procedure Tv1qgSLCompareRowValuesForCellMerging(Sender: TcxGridColumn; ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; const AValue1: Variant; ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; const AValue2: Variant; var AAreEqual: Boolean); + procedure Tv1qgMeterCompareRowValuesForCellMerging(Sender: TcxGridColumn; ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; const AValue1: Variant; ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; const AValue2: Variant; var AAreEqual: Boolean); + procedure Tv1isspCompareRowValuesForCellMerging(Sender: TcxGridColumn; ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; const AValue1: Variant; ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; const AValue2: Variant; var AAreEqual: Boolean); + procedure N2Click(Sender: TObject); + procedure N3Click(Sender: TObject); + + private + CurrentPage, RecordsNumber: Integer; + lstCust: TStringList; + procedure InitGrid(); + procedure SetStatus(); + procedure CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); + { Private declarations } + public + fC_Name, fissp, fCarno, fpcid: string; + fEndDateTime,fBegDateTime : TDateTime; + + { Public declarations } + end; + +var + frmTatClothInspHZList2: TfrmTatClothInspHZList2; + +implementation + +uses + U_DataLink, U_RTFun, U_LabelPrint, U_TatInspSHHZ; + +{$R *.dfm} + +procedure TfrmTatClothInspHZList2.SetStatus(); +begin + +end; + +procedure TfrmTatClothInspHZList2.FormClose(Sender: TObject; var Action: TCloseAction); +begin + inherited; + FreeAndNil(lstCust); + Action := caFree; +end; + +procedure TfrmTatClothInspHZList2.FormCreate(Sender: TObject); +begin + inherited; + lstCust := TStringList.Create; + EndDate.DateTime := SGetServerDateTime(ADOQueryTemp); + BegDate.DateTime := EndDate.DateTime - 20; +end; + +procedure TfrmTatClothInspHZList2.InitGrid(); +var + WSql, WSql1: string; +begin + + WSql := SGetFilters(Panel1, 1, 2); + if Trim(WSql) <> '' then + WSql := ' and ' + WSql; + if IsJYTime.Checked then + begin + WSql1 := ' and A.FillTime>=' + quotedstr(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)); + WSql1 := WSql1 + ' and A.FillTime<' + quotedstr(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1)); + end; + + try + ADOQueryMain.DisableControls; + +// with ADOQueryMain do +// begin +// Filtered := False; +// Close; +// sql.Clear; +// sql.Add('select * from ( '); +// sql.Add('select A.C_NAME, A.C_width,A.C_GramWeight,A.pcid,A.Carno,A.dxmeter,issp=isnull(A.issp,'''') '); +// sql.Add(' ,maX(B.C_Width) AS DXMF,A.CIMachNo,A.BCIOID '); +//// sql.Add(' ,CAST(isNull(A.dxmeter,''1'') AS DECIMAL(18,2)) '); +// +//// SQL.Add(' ,qgMeter=sum(meter+SHMeter)/ISNULL(NULLIF(MAX(ISNULL(B.C_WidthNum, 1)), 0), 1) '); +// +// sql.Add(' ,meterall=(select sum(meter+SHMeter) FROM Tat_Cloth_Inspect X WHERE X.pcid = A.pcid and X.BCIOID = A.BCIOID and X.GRADE<>''ѭ'' and X.CIMachNo=A.CIMachNo )'); +// sql.Add(' ,C_Widthall= ISNULL(NULLIF(MAX(ISNULL(B.C_WidthNum, 1)), 0), 1) '); +// +// SQL.Add(' ,qgMeter=(select sum(meter+SHMeter) FROM Tat_Cloth_Inspect X WHERE X.pcid = A.pcid and X.BCIOID = A.BCIOID and X.GRADE<>''ѭ'' and X.CIMachNo=A.CIMachNo )/ISNULL(NULLIF(MAX(ISNULL(B.C_WidthNum, 1)), 0), 1) '); +// +//// SQL.Add(' ,qgSL = ROUND((select sum(meter+SHMeter) FROM Tat_Cloth_Inspect X WHERE X.pcid = A.pcid and X.BCIOID = A.BCIOID and X.GRADE<>''ѭ'' and X.CIMachNo=A.CIMachNo )*100 '); +//// sql.Add(' / ISNULL(NULLIF(MAX(ISNULL(B.C_WidthNum, 1)), 0), 1)/CAST(ISNULL(NULLIF(A.dxmeter, ''''), 1) AS DECIMAL(18,2)) , 2) '); +// +// SQL.Add(' ,qgSL = ROUND((CAST(ISNULL(NULLIF(A.dxmeter, ''''), 1) AS DECIMAL(18,2)) - (select sum(meter+SHMeter) FROM Tat_Cloth_Inspect X WHERE X.pcid = A.pcid and X.GRADE<>''ѭ'' and X.CIMachNo=A.CIMachNo )'); +// SQL.Add(' /ISNULL(NULLIF(MAX(ISNULL(B.C_WidthNum, 1)), 0), 1) )*100 '); +// sql.Add(' /CAST(ISNULL(NULLIF(A.dxmeter, ''''), 1) AS DECIMAL(18,2)) , 3) '); +// +// SQL.Add(',SHpf=SUM(CASE WHEN ISNUMERIC(A.SHMETER) = 1 AND ISNUMERIC(A.C_WIDTH) = 1 '); +// SQL.Add(' THEN CAST(A.SHMETER AS DECIMAL(18,2))/100 * CAST(A.C_WIDTH AS DECIMAL(18,2)) '); +// SQL.Add(' ELSE 0 END)'); +// +// SQL.Add(',SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN 1 ELSE 0 END )AS YDJS'); +// SQL.Add(',SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN A.meter ELSE 0 END )AS Ydqty'); +// SQL.Add(',YDpf=SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN A.meter ELSE 0 END )*A.C_Width/100 '); +// +// SQL.Add(',SUM(CASE WHEN A.GRADE=''Ʒ'' THEN 1 ELSE 0 END )AS edJS'); +// SQL.Add(',SUM(CASE WHEN A.GRADE=''Ʒ'' THEN A.meter ELSE 0 END )AS edqty'); +// SQL.Add(',edpf=SUM(CASE WHEN A.GRADE=''Ʒ'' THEN A.meter ELSE 0 END )*A.C_Width/100 '); +// +// SQL.Add(',SUM(CASE WHEN A.GRADE=''С'' THEN 1 ELSE 0 END )AS xjJS'); +// SQL.Add(',SUM(CASE WHEN A.GRADE=''С'' THEN A.meter ELSE 0 END )AS xjqty'); +// SQL.Add(',xjpf=SUM(CASE WHEN A.GRADE=''С'' THEN A.meter ELSE 0 END )*A.C_Width/100 '); +// +// SQL.Add(',SUM(CASE WHEN (A.GRADE=''ϲ'' and A.meter>0) THEN 1 ELSE 0 END )AS fbJS'); +// SQL.Add(',SUM(CASE WHEN A.GRADE=''ϲ'' THEN A.meter ELSE 0 END )AS fbqty'); +// SQL.Add(',fbpf=SUM(CASE WHEN A.GRADE=''ϲ'' THEN A.meter ELSE 0 END )*A.C_Width/100 '); +// +// SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END )AS fqJS'); +// SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN A.meter ELSE 0 END )AS fqqty'); +// SQL.Add(',fqpf=SUM(CASE WHEN A.GRADE='''' THEN A.meter ELSE 0 END )*A.C_Width/100 '); +// +//// SQL.Add(',SUM(CASE WHEN A.GRADE=''ѭ'' THEN 1 ELSE 0 END )AS xhJS'); +//// SQL.Add(',SUM(CASE WHEN A.GRADE=''ѭ'' THEN A.meter ELSE 0 END )AS xhqty'); +// SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END )AS csJS'); +// SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN A.meter ELSE 0 END )AS csqty'); +// SQL.Add(',cspf=SUM(CASE WHEN A.GRADE='''' THEN A.meter ELSE 0 END )*A.C_Width/100 '); +// +// +// // ŵֶ - ŵȾ/(ŵȾ+С+Ⱦ+Ծ+о+ϲ(ųΪ0)) +// SQL.Add(',YDRate=CAST('); +// SQL.Add(' CASE '); +// SQL.Add(' WHEN (SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN 1 ELSE 0 END) + '); // YDJS +// SQL.Add(' SUM(CASE WHEN A.GRADE=''С'' THEN 1 ELSE 0 END) + '); // xjJS +// SQL.Add(' SUM(CASE WHEN A.GRADE=''Ʒ'' THEN 1 ELSE 0 END) + '); // edJS +// SQL.Add(' SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END) + '); // csJS +// SQL.Add(' SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END) + '); // fqJS +// SQL.Add(' SUM(CASE WHEN (A.GRADE=''ϲ'' and A.meter>0) THEN 1 ELSE 0 END)) = 0 '); // fbJSųΪ0 +// SQL.Add(' THEN 0 '); +// SQL.Add(' ELSE '); +// SQL.Add(' CAST(SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN 1 ELSE 0 END)*100 AS DECIMAL(18,4)) / '); // ӣYDJS +// SQL.Add(' CAST((SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN 1 ELSE 0 END) + '); // YDJS +// SQL.Add(' SUM(CASE WHEN A.GRADE=''С'' THEN 1 ELSE 0 END) + '); // xjJS +// SQL.Add(' SUM(CASE WHEN A.GRADE=''Ʒ'' THEN 1 ELSE 0 END) + '); // edJS +// SQL.Add(' SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END) + '); // csJS +// SQL.Add(' SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END) + '); // fqJS +// SQL.Add(' SUM(CASE WHEN (A.GRADE=''ϲ'' and A.meter>0) THEN 1 ELSE 0 END)) AS DECIMAL(18,4)) '); // fbJS +// SQL.Add(' END '); +// SQL.Add('AS DECIMAL(18,4)) '); +// +// // ŵֶ - ŵȾ/(ŵȾ+С+Ⱦ+Ծ+о+ϲ(ųΪ0)) +// SQL.Add(',FBRate=CAST('); +// SQL.Add(' CASE '); +// SQL.Add(' WHEN (SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN 1 ELSE 0 END) + '); // YDJS +// SQL.Add(' SUM(CASE WHEN A.GRADE=''С'' THEN 1 ELSE 0 END) + '); // xjJS +// SQL.Add(' SUM(CASE WHEN A.GRADE=''Ʒ'' THEN 1 ELSE 0 END) + '); // edJS +// SQL.Add(' SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END) + '); // csJS +// SQL.Add(' SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END) + '); // fqJS +// SQL.Add(' SUM(CASE WHEN (A.GRADE=''ϲ'' and A.meter>0) THEN 1 ELSE 0 END)) = 0 '); // fbJSųΪ0 +// SQL.Add(' THEN 0 '); +// SQL.Add(' ELSE '); +// SQL.Add(' CAST(SUM(CASE WHEN (A.GRADE=''ϲ'' and A.meter>0) THEN 1 ELSE 0 END)*100 AS DECIMAL(18,4)) / '); // ӣYDJS +// SQL.Add(' CAST((SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN 1 ELSE 0 END) + '); // YDJS +// SQL.Add(' SUM(CASE WHEN A.GRADE=''С'' THEN 1 ELSE 0 END) + '); // xjJS +// SQL.Add(' SUM(CASE WHEN A.GRADE=''Ʒ'' THEN 1 ELSE 0 END) + '); // edJS +// SQL.Add(' SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END) + '); // csJS +// SQL.Add(' SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END) + '); // fqJS +// SQL.Add(' SUM(CASE WHEN (A.GRADE=''ϲ'' and A.meter>0) THEN 1 ELSE 0 END)) AS DECIMAL(18,4)) '); // fbJS +// SQL.Add(' END '); +// SQL.Add('AS DECIMAL(18,4)) '); +// +// SQL.Add('from Tat_Cloth_Inspect A '); +// SQL.Add(' left join BS_Cloth_IO B on A.BCIOID = B.BCIOID '); +// SQL.Add(' where (A.BEFOREC_WIDTH='''' OR A.BEFOREC_WIDTH is null) '); +// SQL.Add(' and (NOT EXISTS (select * from BS_Cloth_IO_mx X WHERE X.BCIOID = A.BCIOID and X.C_MXSHWidth is not NULL)) '); +// SQL.Add(' and A.GRADE<>''ѭ'' '); +// SQL.Add(' and A.Carno<>'''' and A.Carno is not NULL '); +// +// SQL.Add(WSql1); +// +// sql.Add(' group by A.C_NAME, A.C_width,A.C_GramWeight,A.pcid,A.Carno,A.dxmeter'); +// sql.Add(' ,A.CIMachNo,A.BCIOID,isnull(A.issp,'''')'); +// +// sql.add(' ) T where 1=1 '); +// SQL.Add(WSql); +// sql.Add(' Order By T.Carno,T.pcid,ISNULL(CAST(NULLIF(dxmeter, '''') AS DECIMAL), 0),BCIOID '); +//// showmessage(sql.text); +// Open; +// end; + + + with ADOQueryMain do + begin + Filtered := False; + Close; + sql.Clear; + sql.Add('select * from ( '); + sql.Add('select A.C_NAME, A.C_width,A.C_GramWeight,A.pcid,A.Carno,A.dxmeter,issp=isnull(A.issp,'''') '); + sql.Add(' ,maX(B.C_Width) AS DXMF,A.CIMachNo,A.BCIOID '); +// sql.Add(' ,CAST(isNull(A.dxmeter,''1'') AS DECIMAL(18,2)) '); + +// SQL.Add(' ,qgMeter=sum(meter+SHMeter)/ISNULL(NULLIF(MAX(ISNULL(B.C_WidthNum, 1)), 0), 1) '); + + sql.Add(' ,meterall=(select sum(meter+SHMeter) FROM Tat_Cloth_Inspect X WHERE X.pcid = A.pcid and X.BCIOID = A.BCIOID and X.GRADE<>''ѭ'' and X.CIMachNo=A.CIMachNo )'); + sql.Add(' ,C_Widthall= ISNULL(NULLIF(MAX(ISNULL(B.C_WidthNum, 1)), 0), 1) '); + + SQL.Add(' ,qgMeter=(select sum(meter+SHMeter) FROM Tat_Cloth_Inspect X WHERE X.pcid = A.pcid and X.BCIOID = A.BCIOID and X.GRADE<>''ѭ'' and X.CIMachNo=A.CIMachNo )/ISNULL(NULLIF(MAX(ISNULL(B.C_WidthNum, 1)), 0), 1) '); + +// SQL.Add(' ,qgSL = ROUND((select sum(meter+SHMeter) FROM Tat_Cloth_Inspect X WHERE X.pcid = A.pcid and X.BCIOID = A.BCIOID and X.GRADE<>''ѭ'' and X.CIMachNo=A.CIMachNo )*100 '); +// sql.Add(' / ISNULL(NULLIF(MAX(ISNULL(B.C_WidthNum, 1)), 0), 1)/CAST(ISNULL(NULLIF(A.dxmeter, ''''), 1) AS DECIMAL(18,2)) , 2) '); + + SQL.Add(' ,qgSL = ROUND((CAST(ISNULL(NULLIF(A.dxmeter, ''''), 1) AS DECIMAL(18,2)) - (select sum(meter+SHMeter) FROM Tat_Cloth_Inspect X WHERE X.pcid = A.pcid and X.GRADE<>''ѭ'' and X.CIMachNo=A.CIMachNo )'); + SQL.Add(' /ISNULL(NULLIF(MAX(ISNULL(B.C_WidthNum, 1)), 0), 1) )*100 '); + sql.Add(' /CAST(ISNULL(NULLIF(A.dxmeter, ''''), 1) AS DECIMAL(18,2)) , 3) '); + + SQL.Add(',SHpf=SUM(CASE WHEN ISNUMERIC(A.SHMETER) = 1 AND ISNUMERIC(A.C_WIDTH) = 1 '); + SQL.Add(' THEN CAST(A.SHMETER AS DECIMAL(18,2))/100 * CAST(A.C_WIDTH AS DECIMAL(18,2)) '); + SQL.Add(' ELSE 0 END)'); + + SQL.Add(',SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN 1 ELSE 0 END )AS YDJS'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN A.meter ELSE 0 END )AS Ydqty'); + SQL.Add(',YDpf=SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN A.meter ELSE 0 END )*A.C_Width/100 '); + + SQL.Add(',SUM(CASE WHEN A.GRADE=''Ʒ'' THEN 1 ELSE 0 END )AS edJS'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''Ʒ'' THEN A.meter ELSE 0 END )AS edqty'); + SQL.Add(',edpf=SUM(CASE WHEN A.GRADE=''Ʒ'' THEN A.meter ELSE 0 END )*A.C_Width/100 '); + + SQL.Add(',SUM(CASE WHEN A.GRADE=''С'' THEN 1 ELSE 0 END )AS xjJS'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''С'' THEN A.meter ELSE 0 END )AS xjqty'); + SQL.Add(',xjpf=SUM(CASE WHEN A.GRADE=''С'' THEN A.meter ELSE 0 END )*A.C_Width/100 '); + + SQL.Add(',SUM(CASE WHEN (A.GRADE=''ϲ'' and A.meter>0) THEN 1 ELSE 0 END )AS fbJS'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''ϲ'' THEN A.meter ELSE 0 END )AS fbqty'); + SQL.Add(',fbpf=SUM(CASE WHEN A.GRADE=''ϲ'' THEN A.meter ELSE 0 END )*A.C_Width/100 '); + + SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END )AS fqJS'); + SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN A.meter ELSE 0 END )AS fqqty'); + SQL.Add(',fqpf=SUM(CASE WHEN A.GRADE='''' THEN A.meter ELSE 0 END )*A.C_Width/100 '); + +// SQL.Add(',SUM(CASE WHEN A.GRADE=''ѭ'' THEN 1 ELSE 0 END )AS xhJS'); +// SQL.Add(',SUM(CASE WHEN A.GRADE=''ѭ'' THEN A.meter ELSE 0 END )AS xhqty'); + SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END )AS csJS'); + SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN A.meter ELSE 0 END )AS csqty'); + SQL.Add(',cspf=SUM(CASE WHEN A.GRADE='''' THEN A.meter ELSE 0 END )*A.C_Width/100 '); + + + // ŵֶ - ŵȾ/(ŵȾ+С+Ⱦ+Ծ+о+ϲ(ųΪ0)) + SQL.Add(',YDRate=CAST('); + SQL.Add(' CASE '); + SQL.Add(' WHEN (SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN 1 ELSE 0 END) + '); // YDJS + SQL.Add(' SUM(CASE WHEN A.GRADE=''С'' THEN 1 ELSE 0 END) + '); // xjJS + SQL.Add(' SUM(CASE WHEN A.GRADE=''Ʒ'' THEN 1 ELSE 0 END) + '); // edJS + SQL.Add(' SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END) + '); // csJS + SQL.Add(' SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END) + '); // fqJS + SQL.Add(' SUM(CASE WHEN (A.GRADE=''ϲ'' and A.meter>0) THEN 1 ELSE 0 END)) = 0 '); // fbJSųΪ0 + SQL.Add(' THEN 0 '); + SQL.Add(' ELSE '); + SQL.Add(' CAST(SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN 1 ELSE 0 END)*100 AS DECIMAL(18,4)) / '); // ӣYDJS + SQL.Add(' CAST((SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN 1 ELSE 0 END) + '); // YDJS + SQL.Add(' SUM(CASE WHEN A.GRADE=''С'' THEN 1 ELSE 0 END) + '); // xjJS + SQL.Add(' SUM(CASE WHEN A.GRADE=''Ʒ'' THEN 1 ELSE 0 END) + '); // edJS + SQL.Add(' SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END) + '); // csJS + SQL.Add(' SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END) + '); // fqJS + SQL.Add(' SUM(CASE WHEN (A.GRADE=''ϲ'' and A.meter>0) THEN 1 ELSE 0 END)) AS DECIMAL(18,4)) '); // fbJS + SQL.Add(' END '); + SQL.Add('AS DECIMAL(18,4)) '); + + // ŵֶ - ŵȾ/(ŵȾ+С+Ⱦ+Ծ+о+ϲ(ųΪ0)) + SQL.Add(',FBRate=CAST('); + SQL.Add(' CASE '); + SQL.Add(' WHEN (SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN 1 ELSE 0 END) + '); // YDJS + SQL.Add(' SUM(CASE WHEN A.GRADE=''С'' THEN 1 ELSE 0 END) + '); // xjJS + SQL.Add(' SUM(CASE WHEN A.GRADE=''Ʒ'' THEN 1 ELSE 0 END) + '); // edJS + SQL.Add(' SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END) + '); // csJS + SQL.Add(' SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END) + '); // fqJS + SQL.Add(' SUM(CASE WHEN (A.GRADE=''ϲ'' and A.meter>0) THEN 1 ELSE 0 END)) = 0 '); // fbJSųΪ0 + SQL.Add(' THEN 0 '); + SQL.Add(' ELSE '); + SQL.Add(' CAST(SUM(CASE WHEN (A.GRADE=''ϲ'' and A.meter>0) THEN 1 ELSE 0 END)*100 AS DECIMAL(18,4)) / '); // ӣYDJS + SQL.Add(' CAST((SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN 1 ELSE 0 END) + '); // YDJS + SQL.Add(' SUM(CASE WHEN A.GRADE=''С'' THEN 1 ELSE 0 END) + '); // xjJS + SQL.Add(' SUM(CASE WHEN A.GRADE=''Ʒ'' THEN 1 ELSE 0 END) + '); // edJS + SQL.Add(' SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END) + '); // csJS + SQL.Add(' SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END) + '); // fqJS + SQL.Add(' SUM(CASE WHEN (A.GRADE=''ϲ'' and A.meter>0) THEN 1 ELSE 0 END)) AS DECIMAL(18,4)) '); // fbJS + SQL.Add(' END '); + SQL.Add('AS DECIMAL(18,4)) '); + + SQL.Add('from Tat_Cloth_Inspect A '); + SQL.Add(' left join BS_Cloth_IO B on A.BCIOID = B.BCIOID '); + SQL.Add(' where (A.BEFOREC_WIDTH='''' OR A.BEFOREC_WIDTH is null) '); + SQL.Add(' and (NOT EXISTS (select * from BS_Cloth_IO_mx X WHERE X.BCIOID = A.BCIOID and X.C_MXSHWidth is not NULL)) '); + SQL.Add(' and A.GRADE<>''ѭ'' '); + SQL.Add(' and A.C_Name= ' + QuotedStr(Trim(fC_Name))); + SQL.Add(' and A.Carno= ' + QuotedStr(Trim(fCarno))); + SQL.Add(' and A.pcid= ' + QuotedStr(Trim(fpcid))); + SQL.Add(' and isnull(A.issp,'''') = ' + QuotedStr(Trim(fissp))); + + SQL.Add(WSql1); + + sql.Add(' group by A.C_NAME, A.C_width,A.C_GramWeight,A.pcid,A.Carno,A.dxmeter'); + sql.Add(' ,A.CIMachNo,A.BCIOID,isnull(A.issp,'''')'); + + sql.add(' ) T where 1=1 '); + SQL.Add(WSql); + sql.Add(' Order By T.Carno,T.pcid,ISNULL(CAST(NULLIF(dxmeter, '''') AS DECIMAL), 0),BCIOID '); +// showmessage(sql.text); + Open; + end; + SCreateCDS(ADOQueryMain, CDS_1); + SInitCDSData(ADOQueryMain, CDS_1); + + finally + ADOQueryMain.EnableControls; + TV1.DataController.Filter.Clear; + end; + +end; + +procedure TfrmTatClothInspHZList2.IsJYTimeClick(Sender: TObject); +begin + inherited; + InitGrid(); +end; + +procedure TfrmTatClothInspHZList2.TBRafreshClick(Sender: TObject); +begin + CurrentPage := 1; + InitGrid(); +end; + +procedure TfrmTatClothInspHZList2.CDS_1BeforeOpen(DataSet: TDataSet); +begin + + lstCust.Clear; +end; + +procedure TfrmTatClothInspHZList2.ConNoMChange(Sender: TObject); +begin + if ADOQueryMain.Active then + begin + SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2)); + end; +end; + +procedure TfrmTatClothInspHZList2.cxPageControl1Change(Sender: TObject); +begin + CurrentPage := 1; + SetStatus(); + InitGrid(); +end; + +procedure TfrmTatClothInspHZList2.C_NameKeyPress(Sender: TObject; var Key: Char); +begin + inherited; + if Key = #13 then + begin + InitGrid(); + end; +end; + +procedure TfrmTatClothInspHZList2.TBCloseClick(Sender: TObject); +begin + + Close; +end; + +procedure TfrmTatClothInspHZList2.FormShow(Sender: TObject); +begin + inherited; + + ReadCxGrid(trim(self.Caption) + 'Tv1', Tv1, 'Ϣ2'); + CurrentPage := 1; + RecordsNumber := 500; + + SetStatus(); + + BegDate.DateTime := fBegDateTime; + EndDate.DateTime := fEndDateTime; + InitGrid(); + +end; + +procedure TfrmTatClothInspHZList2.TBExportClick(Sender: TObject); +begin + if ADOQueryMain.IsEmpty then + exit; + with CDS_1 do + begin + Filtered := false; + Filter := ' ssel = 1'; + Filtered := true; + end; + TcxGridToExcel(Self.Caption, cxGrid1); + InitGrid(); +end; + +procedure TfrmTatClothInspHZList2.orderNoKeyPress(Sender: TObject; var Key: Char); +begin + if Key = #13 then + begin + CurrentPage := 1; + InitGrid(); + end; +end; + +procedure TfrmTatClothInspHZList2.PM11Click(Sender: TObject); +begin + SelOKNo(CDS_1, false); +end; + +procedure TfrmTatClothInspHZList2.Tv1PCIDCompareRowValuesForCellMerging(Sender: TcxGridColumn; ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; const AValue1: Variant; ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; const AValue2: Variant; var AAreEqual: Boolean); +begin +// if (ARow1.Values[Tv1issp.Index] <> ARow2.Values[Tv1issp.Index]) or (ARow1.Values[Tv1issp.Index] = NULL) or (ARow2.Values[Tv1issp.Index] = NULL) then +// begin +// AAreEqual := False; +// exit; +// end; + + if (ARow1.Values[Tv1PCID.Index] = ARow2.Values[Tv1PCID.Index]) and (ARow1.Values[Tv1PCID.Index] <> NULL) then + AAreEqual := True + else + AAreEqual := False; + +end; + +procedure TfrmTatClothInspHZList2.Tv1qgMeterCompareRowValuesForCellMerging(Sender: TcxGridColumn; ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; const AValue1: Variant; ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; const AValue2: Variant; var AAreEqual: Boolean); +begin + + if (ARow1.Values[Tv1PCID.Index] <> ARow2.Values[Tv1PCID.Index]) or (ARow1.Values[Tv1PCID.Index] = NULL) or (ARow2.Values[Tv1PCID.Index] = NULL) then + begin + AAreEqual := False; + exit; + end; +// if (ARow1.Values[Tv1issp.Index] <> ARow2.Values[Tv1issp.Index]) or (ARow1.Values[Tv1issp.Index] = NULL) or (ARow2.Values[Tv1issp.Index] = NULL) then +// begin +// AAreEqual := False; +// exit; +// end; + + if (ARow1.Values[Tv1qgMeter.Index] = ARow2.Values[Tv1qgMeter.Index]) and (ARow1.Values[Tv1qgMeter.Index] <> NULL) and (ARow2.Values[Tv1qgMeter.Index] <> NULL) then + AAreEqual := True + else + AAreEqual := False; + +end; + +procedure TfrmTatClothInspHZList2.Tv1qgSLCompareRowValuesForCellMerging(Sender: TcxGridColumn; ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; const AValue1: Variant; ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; const AValue2: Variant; var AAreEqual: Boolean); +begin + + if (ARow1.Values[Tv1PCID.Index] <> ARow2.Values[Tv1PCID.Index]) or (ARow1.Values[Tv1PCID.Index] = NULL) or (ARow2.Values[Tv1PCID.Index] = NULL) then + begin + AAreEqual := False; + exit; + end; + +// if (ARow1.Values[Tv1issp.Index] <> ARow2.Values[Tv1issp.Index]) or (ARow1.Values[Tv1issp.Index] = NULL) or (ARow2.Values[Tv1issp.Index] = NULL) then +// begin +// AAreEqual := False; +// exit; +// end; + if (ARow1.Values[Tv1qgSL.Index] = ARow2.Values[Tv1qgSL.Index]) and (ARow1.Values[Tv1qgSL.Index] <> NULL) and (ARow2.Values[Tv1qgSL.Index] <> NULL) then + AAreEqual := True + else + AAreEqual := False; + +end; + +procedure TfrmTatClothInspHZList2.Tv1DXMFCompareRowValuesForCellMerging(Sender: TcxGridColumn; ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; const AValue1: Variant; ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; const AValue2: Variant; var AAreEqual: Boolean); +begin + if (ARow1.Values[Tv1PCID.Index] <> ARow2.Values[Tv1PCID.Index]) or (ARow1.Values[Tv1PCID.Index] = NULL) or (ARow2.Values[Tv1PCID.Index] = NULL) then + begin + AAreEqual := False; + exit; + end; +// if (ARow1.Values[Tv1C_Name.Index] <> ARow2.Values[Tv1C_Name.Index]) or (ARow1.Values[Tv1C_Name.Index] = NULL) or (ARow2.Values[Tv1C_Name.Index] = NULL) then +// begin +// AAreEqual := False; +// exit; +// end; +// if (ARow1.Values[Tv1issp.Index] <> ARow2.Values[Tv1issp.Index]) or (ARow1.Values[Tv1issp.Index] = NULL) or (ARow2.Values[Tv1issp.Index] = NULL) then +// begin +// AAreEqual := False; +// exit; +// end; + + if (ARow1.Values[Tv1DXMF.Index] = ARow2.Values[Tv1DXMF.Index]) and (ARow1.Values[Tv1DXMF.Index] <> NULL) and (ARow2.Values[Tv1DXMF.Index] <> NULL) then + AAreEqual := True + else + AAreEqual := False; + +end; + +procedure TfrmTatClothInspHZList2.Tv1isspCompareRowValuesForCellMerging(Sender: TcxGridColumn; ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; const AValue1: Variant; ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; const AValue2: Variant; var AAreEqual: Boolean); +begin + if (ARow1.Values[Tv1PCID.Index] <> ARow2.Values[Tv1PCID.Index]) or (ARow1.Values[Tv1PCID.Index] = NULL) or (ARow2.Values[Tv1PCID.Index] = NULL) then + begin + AAreEqual := False; + exit; + end; + + if (ARow1.Values[Tv1issp.Index] = ARow2.Values[Tv1issp.Index]) and (ARow1.Values[Tv1issp.Index] <> NULL) and (ARow2.Values[Tv1issp.Index] <> NULL) then + AAreEqual := True + else + AAreEqual := False; + +end; + +procedure TfrmTatClothInspHZList2.Tv1BCIOIDCompareRowValuesForCellMerging(Sender: TcxGridColumn; ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; const AValue1: Variant; ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; const AValue2: Variant; var AAreEqual: Boolean); +begin + + if (ARow1.Values[Tv1PCID.Index] <> ARow2.Values[Tv1PCID.Index]) or (ARow1.Values[Tv1PCID.Index] = NULL) or (ARow2.Values[Tv1PCID.Index] = NULL) then + begin + AAreEqual := False; + exit; + end; + +// if (ARow1.Values[Tv1issp.Index] <> ARow2.Values[Tv1issp.Index]) or (ARow1.Values[Tv1issp.Index] = NULL) or (ARow2.Values[Tv1issp.Index] = NULL) then +// begin +// AAreEqual := False; +// exit; +// end; + + if (ARow1.Values[Tv1BCIOID.Index] = ARow2.Values[Tv1BCIOID.Index]) and (ARow1.Values[Tv1BCIOID.Index] <> NULL) and (ARow2.Values[Tv1BCIOID.Index] <> NULL) then + AAreEqual := True + else + AAreEqual := False; +end; + +procedure TfrmTatClothInspHZList2.Tv1CarnoCompareRowValuesForCellMerging(Sender: TcxGridColumn; ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; const AValue1: Variant; ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; const AValue2: Variant; var AAreEqual: Boolean); +begin + if (ARow1.Values[Tv1PCID.Index] <> ARow2.Values[Tv1PCID.Index]) or (ARow1.Values[Tv1PCID.Index] = NULL) or (ARow2.Values[Tv1PCID.Index] = NULL) then + begin + AAreEqual := False; + exit; + end; +// if (ARow1.Values[Tv1C_Name.Index] <> ARow2.Values[Tv1C_Name.Index]) or (ARow1.Values[Tv1C_Name.Index] = NULL) or (ARow2.Values[Tv1C_Name.Index] = NULL) then +// begin +// AAreEqual := False; +// exit; +// end; +// if (ARow1.Values[Tv1issp.Index] <> ARow2.Values[Tv1issp.Index]) or (ARow1.Values[Tv1issp.Index] = NULL) or (ARow2.Values[Tv1issp.Index] = NULL) then +// begin +// AAreEqual := False; +// exit; +// end; + + if (ARow1.Values[Tv1Carno.Index] = ARow2.Values[Tv1Carno.Index]) and (ARow1.Values[Tv1Carno.Index] <> NULL) and (ARow2.Values[Tv1Carno.Index] <> NULL) then + AAreEqual := True + else + AAreEqual := False; + +end; + +procedure TfrmTatClothInspHZList2.Tv1CIMachNoCompareRowValuesForCellMerging(Sender: TcxGridColumn; ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; const AValue1: Variant; ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; const AValue2: Variant; var AAreEqual: Boolean); +begin + + if (ARow1.Values[Tv1PCID.Index] <> ARow2.Values[Tv1PCID.Index]) or (ARow1.Values[Tv1PCID.Index] = NULL) or (ARow2.Values[Tv1PCID.Index] = NULL) then + begin + AAreEqual := False; + exit; + end; +// if (ARow1.Values[Tv1issp.Index] <> ARow2.Values[Tv1issp.Index]) or (ARow1.Values[Tv1issp.Index] = NULL) or (ARow2.Values[Tv1issp.Index] = NULL) then +// begin +// AAreEqual := False; +// exit; +// end; + + if (ARow1.Values[Tv1CIMachNo.Index] = ARow2.Values[Tv1CIMachNo.Index]) and (ARow1.Values[Tv1CIMachNo.Index] <> NULL) and (ARow2.Values[Tv1CIMachNo.Index] <> NULL) then + AAreEqual := True + else + AAreEqual := False; + +end; + +procedure TfrmTatClothInspHZList2.Tv1C_NameCompareRowValuesForCellMerging(Sender: TcxGridColumn; ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; const AValue1: Variant; ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; const AValue2: Variant; var AAreEqual: Boolean); +begin + + if (ARow1.Values[Tv1PCID.Index] <> ARow2.Values[Tv1PCID.Index]) or (ARow1.Values[Tv1PCID.Index] = NULL) or (ARow2.Values[Tv1PCID.Index] = NULL) then + begin + AAreEqual := False; + exit; + end; + +// if (ARow1.Values[Tv1issp.Index] <> ARow2.Values[Tv1issp.Index]) or (ARow1.Values[Tv1issp.Index] = NULL) or (ARow2.Values[Tv1issp.Index] = NULL) then +// begin +// AAreEqual := False; +// exit; +// end; + + if (ARow1.Values[Tv1C_Name.Index] = ARow2.Values[Tv1C_Name.Index]) and (ARow1.Values[Tv1C_Name.Index] <> NULL) and (ARow2.Values[Tv1C_Name.Index] <> NULL) then + AAreEqual := True + else + AAreEqual := False; + +end; + +procedure TfrmTatClothInspHZList2.Tv1DataControllerFilterBeforeChange(Sender: TcxDBDataFilterCriteria; ADataSet: TDataSet; const AFilterText: string); +begin + lstCust.Clear; +end; + +procedure TfrmTatClothInspHZList2.Tv1dxmeterCompareRowValuesForCellMerging(Sender: TcxGridColumn; ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties; const AValue1: Variant; ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties; const AValue2: Variant; var AAreEqual: Boolean); +begin + if (ARow1.Values[Tv1PCID.Index] <> ARow2.Values[Tv1PCID.Index]) or (ARow1.Values[Tv1PCID.Index] = NULL) or (ARow2.Values[Tv1PCID.Index] = NULL) then + begin + AAreEqual := False; + exit; + end; +// if (ARow1.Values[Tv1C_Name.Index] <> ARow2.Values[Tv1C_Name.Index]) or (ARow1.Values[Tv1C_Name.Index] = NULL) or (ARow2.Values[Tv1C_Name.Index] = NULL) then +// begin +// AAreEqual := False; +// exit; +// end; +// if (ARow1.Values[Tv1issp.Index] <> ARow2.Values[Tv1issp.Index]) or (ARow1.Values[Tv1issp.Index] = NULL) or (ARow2.Values[Tv1issp.Index] = NULL) then +// begin +// AAreEqual := False; +// exit; +// end; + + if (ARow1.Values[Tv1dxmeter.Index] = ARow2.Values[Tv1dxmeter.Index]) and (ARow1.Values[Tv1dxmeter.Index] <> NULL) and (ARow2.Values[Tv1dxmeter.Index] <> NULL) then + AAreEqual := True + else + AAreEqual := False; + +end; + +procedure TfrmTatClothInspHZList2.Tv1TcxGridDBDataControllerTcxDataSummaryFooterSummaryItems6GetText(Sender: TcxDataSummaryItem; const AValue: Variant; AIsFooter: Boolean; var AText: string); +begin + if lstCust <> nil then + AText := IntToStr(lstCust.Count); +end; + +procedure TfrmTatClothInspHZList2.BTNPClick(Sender: TObject); +begin + if CurrentPage < CDS_1.FieldByName('TotalCount').AsInteger / RecordsNumber then + CurrentPage := CurrentPage + 1; + InitGrid(); +end; + +procedure TfrmTatClothInspHZList2.BTLPClick(Sender: TObject); +begin + if CurrentPage > 1 then + CurrentPage := CurrentPage - 1; + InitGrid(); +end; + +procedure TfrmTatClothInspHZList2.TCBNORChange(Sender: TObject); +begin + + CurrentPage := 1; + InitGrid(); +end; + +procedure TfrmTatClothInspHZList2.JYTypeChange(Sender: TObject); +begin + CurrentPage := 1; + InitGrid(); +end; + +procedure TfrmTatClothInspHZList2.N1Click(Sender: TObject); +begin + + SelOKNo(CDS_1, true); +end; + +procedure TfrmTatClothInspHZList2.N2Click(Sender: TObject); +begin + Clipboard.SetTextBuf(PChar(Trim(CDS_1.fieldbyname(TV1.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString))); + +end; + +procedure TfrmTatClothInspHZList2.N3Click(Sender: TObject); +begin + CopyColumnSummaryToClipboard(TV1.Controller.FocusedColumn); +end; + +procedure TfrmTatClothInspHZList2.CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); +var + AView: TcxGridDBTableView; + SummaryIndex: Integer; + SummaryText: string; +begin + AView := Tv1; + + // ָеĻ + SummaryIndex := AView.DataController.Summary.FooterSummaryItems.IndexOfItemLink(AColumn); + if SummaryIndex <> -1 then + begin + SummaryText := AView.DataController.Summary.FooterSummaryTexts[SummaryIndex]; + Clipboard.AsText := SummaryText; + end + else + ShowMessage('δҵеĻ'); +end; + +procedure TfrmTatClothInspHZList2.ToolButton2Click(Sender: TObject); +var + WSql: string; +begin + if CDS_1.IsEmpty then + Exit; + if not CDS_1.Locate('SSel', True, []) then + begin + Application.MessageBox('ûѡ!', 'ʾ', 0); + Exit; + end; + WSql := ''; + CDS_1.DisableControls; + with CDS_1 do + begin + First; + while not Eof do + begin + if CDS_1.fieldbyname('SSel').AsBoolean then + begin + if WSql <> '' then + begin + WSql := WSql + ',' + QuotedStr(Trim(CDS_1.fieldbyname('CIID').AsString)); + end + else + begin + WSql := QuotedStr(Trim(CDS_1.fieldbyname('CIID').AsString)); + end; + end; + Next; + end; + end; + CDS_1.Locate('SSel', True, []); + CDS_1.EnableControls; + try + frmLabelPrint := TfrmLabelPrint.Create(Application); + with frmLabelPrint do + begin + FLMType := 'TradeClothStk'; + FFiltration1 := WSql; + if ShowModal = 1 then + begin + + end; + end; + finally + frmLabelPrint.Free; + end; +end; + +procedure TfrmTatClothInspHZList2.ToolButton4Click(Sender: TObject); +begin + WriteCxGrid(trim(self.Caption) + 'Tv1', Tv1, 'Ϣ2'); +end; + +end. + diff --git a/E03梭织坯布检验/U_TatClothInspList.dfm b/E03梭织坯布检验/U_TatClothInspList.dfm index a04abb9..0805119 100644 --- a/E03梭织坯布检验/U_TatClothInspList.dfm +++ b/E03梭织坯布检验/U_TatClothInspList.dfm @@ -20,7 +20,6 @@ inherited frmTatClothInspList: TfrmTatClothInspList AutoSize = True BorderStyle = bsSingle TabOrder = 1 - ExplicitTop = 101 DesignSize = ( 1463 24) @@ -649,7 +648,6 @@ inherited frmTatClothInspList: TfrmTatClothInspList ' '#27491#24335#25968#25454' ' ' '#21024#38500#25968#25454' ') OnChange = cxTabControl1Change - ExplicitTop = 136 ClientRectBottom = 445 ClientRectLeft = 2 ClientRectRight = 1465 @@ -669,7 +667,6 @@ inherited frmTatClothInspList: TfrmTatClothInspList ParentFont = False PopupMenu = PM_1 TabOrder = 0 - ExplicitLeft = 3 object Tv1: TcxGridDBTableView OnMouseUp = Tv1MouseUp Navigator.Buttons.CustomButtons = <> @@ -1400,5 +1397,9 @@ inherited frmTatClothInspList: TfrmTatClothInspList Caption = #22797#21046 OnClick = N1Click end + object N2: TMenuItem + Caption = #22797#21046#27880#33050 + OnClick = N2Click + end end end diff --git a/E03梭织坯布检验/U_TatClothInspList.pas b/E03梭织坯布检验/U_TatClothInspList.pas index dc9c5f1..2bb94d9 100644 --- a/E03梭织坯布检验/U_TatClothInspList.pas +++ b/E03梭织坯布检验/U_TatClothInspList.pas @@ -143,6 +143,7 @@ type Tv1C_MXSHWidth: TcxGridDBColumn; stkInsert: TToolButton; Tv1ISSP: TcxGridDBColumn; + N2: TMenuItem; procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormCreate(Sender: TObject); procedure TBCloseClick(Sender: TObject); @@ -181,6 +182,7 @@ type procedure cxTabControl1Change(Sender: TObject); procedure ToolButton3Click(Sender: TObject); procedure stkInsertClick(Sender: TObject); + procedure N2Click(Sender: TObject); private DQdate: TDateTime; FLeft, FTop: Integer; @@ -189,6 +191,7 @@ type function Savedata(): Boolean; procedure SetStatus(); procedure PrintCKMDG(MRKOrdID: string); + procedure CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); { Private declarations } public FFInt: Integer; @@ -268,7 +271,14 @@ procedure TfrmTatClothInspList.TBExportClick(Sender: TObject); begin if ADOQueryMain.IsEmpty then Exit; - TcxGridToExcel(self.Caption, cxgrid1); + with Order_Main do + begin + Filtered := false; + Filter := ' ssel = 1'; + Filtered := true; + end; + TcxGridToExcel(Self.Caption, cxGrid1); + InitGrid(); end; procedure TfrmTatClothInspList.PrintCKMDG(MRKOrdID: string); @@ -1224,6 +1234,30 @@ begin end; +procedure TfrmTatClothInspList.N2Click(Sender: TObject); +begin + CopyColumnSummaryToClipboard(TV1.Controller.FocusedColumn); +end; + +procedure TfrmTatClothInspList.CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); +var + AView: TcxGridDBTableView; + SummaryIndex: Integer; + SummaryText: string; +begin + AView := Tv1; + + // ָеĻ + SummaryIndex := AView.DataController.Summary.FooterSummaryItems.IndexOfItemLink(AColumn); + if SummaryIndex <> -1 then + begin + SummaryText := AView.DataController.Summary.FooterSummaryTexts[SummaryIndex]; + Clipboard.AsText := SummaryText; + end + else + ShowMessage('δҵеĻ'); +end; + procedure TfrmTatClothInspList.RKOrdIDKeyPress(Sender: TObject; var Key: Char); begin if Key = #13 then diff --git a/E03梭织坯布检验/U_TatInspSHHZ.dfm b/E03梭织坯布检验/U_TatInspSHHZ.dfm new file mode 100644 index 0000000..f2fa503 --- /dev/null +++ b/E03梭织坯布检验/U_TatInspSHHZ.dfm @@ -0,0 +1,682 @@ +inherited frmTatInspSHHZ: TfrmTatInspSHHZ + Left = 184 + Top = 138 + Caption = #25439#32791#27719#24635#21015#34920 + ClientHeight = 600 + ClientWidth = 1540 + Position = poDesigned + Visible = True + WindowState = wsMaximized + ExplicitWidth = 1556 + ExplicitHeight = 639 + PixelsPerInch = 96 + TextHeight = 12 + object ToolBar1: TToolBar [0] + Tag = 1 + Left = 0 + Top = 0 + Width = 1540 + Height = 38 + AutoSize = True + ButtonHeight = 38 + ButtonWidth = 91 + Caption = 'ToolBar1' + Color = clWhite + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [] + Images = DataLink_TatInsp.ImageList_new32 + List = True + ParentColor = False + ParentFont = False + ShowCaptions = True + TabOrder = 0 + object TBRafresh: TToolButton + Left = 0 + Top = 0 + AutoSize = True + Caption = #21047#26032 + ImageIndex = 1 + OnClick = TBRafreshClick + end + object TBExport: TToolButton + Left = 71 + Top = 0 + AutoSize = True + Caption = #23548#20986 + ImageIndex = 20 + OnClick = TBExportClick + end + object ToolButton4: TToolButton + Left = 142 + Top = 0 + AutoSize = True + Caption = #20445#23384#26684#24335 + ImageIndex = 16 + OnClick = ToolButton4Click + end + object TBClose: TToolButton + Left = 237 + Top = 0 + AutoSize = True + Caption = #20851#38381 + ImageIndex = 7 + OnClick = TBCloseClick + end + end + object Panel1: TPanel [1] + Left = 0 + Top = 38 + Width = 1540 + Height = 67 + Align = alTop + BevelInner = bvRaised + BevelOuter = bvLowered + Color = clWhite + ParentBackground = False + TabOrder = 1 + object Label2: TLabel + Left = 70 + Top = 36 + Width = 12 + Height = 12 + Caption = #33267 + end + object Label5: TLabel + Left = 190 + Top = 10 + Width = 39 + Height = 12 + Hint = '0' + Caption = #20135#21697#21517 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object label11: TLabel + Left = 363 + Top = 10 + Width = 26 + Height = 12 + Hint = '0' + Caption = #20811#37325 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object label12: TLabel + Left = 190 + Top = 35 + Width = 52 + Height = 12 + Hint = '0' + Caption = #27969#36716#21345#21495 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object BegDate: TDateTimePicker + Left = 88 + Top = 6 + Width = 87 + Height = 20 + Date = 40768.000000000000000000 + Time = 0.458268587972270300 + TabOrder = 1 + end + object EndDate: TDateTimePicker + Left = 88 + Top = 32 + Width = 87 + Height = 20 + Date = 40768.000000000000000000 + Time = 0.458268587972270300 + TabOrder = 2 + end + object begtime: TDateTimePicker + Left = 137 + Top = 132 + Width = 55 + Height = 20 + Date = 39780.000000000000000000 + Format = 'HH:mm' + Time = 39780.000000000000000000 + Kind = dtkTime + TabOrder = 3 + end + object endTime: TDateTimePicker + Left = 137 + Top = 156 + Width = 55 + Height = 20 + Date = 39780.000000000000000000 + Format = 'HH:mm' + Time = 0.999317129630071600 + Kind = dtkTime + TabOrder = 4 + end + object IsJYTime: TCheckBox + Left = 14 + Top = 8 + Width = 73 + Height = 17 + Caption = #26597#35810#26085#26399 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + TabOrder = 0 + OnClick = IsJYTimeClick + end + object C_Name: TEdit + Tag = 2 + Left = 242 + Top = 6 + Width = 100 + Height = 20 + Hint = '0' + TabOrder = 5 + OnKeyPress = C_NameKeyPress + end + object C_GramWeight: TEdit + Tag = 2 + Left = 395 + Top = 6 + Width = 100 + Height = 20 + Hint = '0' + TabOrder = 6 + OnKeyPress = C_NameKeyPress + end + object PCId: TEdit + Tag = 2 + Left = 242 + Top = 32 + Width = 100 + Height = 20 + Hint = '0' + TabOrder = 7 + OnKeyPress = C_NameKeyPress + end + end + object Panel2: TPanel [2] + Left = 0 + Top = 105 + Width = 1540 + Height = 495 + Align = alClient + TabOrder = 2 + ExplicitTop = 96 + object cxGrid1: TcxGrid + Left = 1 + Top = 1 + Width = 1538 + Height = 493 + Align = alClient + BorderStyle = cxcbsNone + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [] + ParentFont = False + PopupMenu = PM_1 + TabOrder = 0 + object Tv1: TcxGridDBTableView + OnDblClick = Tv1DblClick + Navigator.Buttons.CustomButtons = <> + ScrollbarAnnotations.CustomAnnotations = <> + DataController.DataSource = DS_1 + DataController.Filter.AutoDataSetFilter = True + DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost] + DataController.Summary.DefaultGroupSummaryItems = <> + DataController.Summary.FooterSummaryItems = < + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skCount + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Format = #26816#39564#31995#25968'=#.##' + Kind = skAverage + end + item + Format = #25442#31639#31995#25968'=#.##' + Kind = skAverage + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + Column = Tv1SH_TD1 + end + item + Kind = skSum + Column = Tv1SH_ZW2 + end + item + Kind = skSum + Column = Tv1SH_JT3 + end + item + Kind = skSum + Column = Tv1SH_LTY4 + end + item + Kind = skSum + Column = Tv1SH_DZ5 + end + item + Kind = skSum + Column = Tv1SH_DJ6 + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + Column = Tv1SH_HD7 + end + item + Kind = skSum + Column = Tv1SH_DS8 + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + Column = Tv1SH_HB9 + end + item + Kind = skSum + Column = Tv1SH_SCZ10 + end + item + Kind = skSum + end + item + Kind = skSum + Column = Tv1SH_BB11 + end + item + Kind = skSum + Column = Tv1SH_ZW12 + end + item + Kind = skSum + Column = Tv1SH_HY13 + end + item + Kind = skSum + Column = Tv1SH_DPB14 + end + item + Kind = skSum + Column = Tv1SH_GJ15 + end + item + Kind = skSum + Column = Tv1SH_YS16 + end + item + Kind = skSum + Column = Tv1SH_KZ17 + end + item + Kind = skSum + Column = Tv1SH_SC18 + end + item + Kind = skSum + Column = Tv1SH_XY19 + end + item + Kind = skSum + Column = Tv1SH_YD20 + end + item + Kind = skSum + Column = Tv1SH_PD21 + end> + DataController.Summary.SummaryGroups = <> + OptionsCustomize.ColumnFiltering = False + OptionsView.Footer = True + OptionsView.GroupByBox = False + OptionsView.IndicatorWidth = 30 + Styles.IncSearch = DataLink_TatInsp.SHuangSe + Styles.Footer = DataLink_TatInsp.Default + Styles.Header = DataLink_TatInsp.Default + Styles.Inactive = DataLink_TatInsp.SHuangSe + Styles.Selection = DataLink_TatInsp.SHuangSe + object v1Column22: TcxGridDBColumn + Caption = #36873#25321 + DataBinding.FieldName = 'SSel' + DataBinding.IsNullValueType = True + PropertiesClassName = 'TcxCheckBoxProperties' + Properties.ImmediatePost = True + Properties.NullStyle = nssUnchecked + HeaderAlignmentHorz = taCenter + Options.Sorting = False + Width = 66 + end + object Tv1Column3: TcxGridDBColumn + Caption = #21697#21517 + DataBinding.FieldName = 'C_Name' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 66 + end + object Tv1issp: TcxGridDBColumn + Caption = #21452#21943 + DataBinding.FieldName = 'issp' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1Column4: TcxGridDBColumn + Caption = #20811#37325 + DataBinding.FieldName = 'C_GramWeight' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 66 + end + object Tv1SH_TD1: TcxGridDBColumn + Caption = #35843#20992 + DataBinding.FieldName = 'SH_TD1' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 74 + end + object Tv1SH_ZW2: TcxGridDBColumn + Caption = #33039#27745 + DataBinding.FieldName = 'SH_ZW2' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_JT3: TcxGridDBColumn + Caption = #25509#22836 + DataBinding.FieldName = 'SH_JT3' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_LTY4: TcxGridDBColumn + Caption = #34013#26465#21360 + DataBinding.FieldName = 'SH_LTY4' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_DZ5: TcxGridDBColumn + Caption = #26723#23376 + DataBinding.FieldName = 'SH_DZ5' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_DJ6: TcxGridDBColumn + Caption = #26029#32463 + DataBinding.FieldName = 'SH_DJ6' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_HD7: TcxGridDBColumn + Caption = #40657#28857 + DataBinding.FieldName = 'SH_HD7' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_DS8: TcxGridDBColumn + Caption = #26029#19997 + DataBinding.FieldName = 'SH_DS8' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_HB9: TcxGridDBColumn + Caption = #40644#26001 + DataBinding.FieldName = 'SH_HB9' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_SCZ10: TcxGridDBColumn + Caption = #27515#34411#23376 + DataBinding.FieldName = 'SH_SCZ10' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_BB11: TcxGridDBColumn + Caption = #30333#26001 + DataBinding.FieldName = 'SH_BB11' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_ZW12: TcxGridDBColumn + Caption = #30385#32441 + DataBinding.FieldName = 'SH_ZW12' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_HY13: TcxGridDBColumn + Caption = #40644#21360 + DataBinding.FieldName = 'SH_HY13' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_DPB14: TcxGridDBColumn + Caption = #22823#30772#36793 + DataBinding.FieldName = 'SH_DPB14' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_GJ15: TcxGridDBColumn + Caption = #24178#27974 + DataBinding.FieldName = 'SH_GJ15' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_YS16: TcxGridDBColumn + Caption = #27833#19997 + DataBinding.FieldName = 'SH_YS16' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_KZ17: TcxGridDBColumn + Caption = #31354#32455 + DataBinding.FieldName = 'SH_KZ17' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_SC18: TcxGridDBColumn + Caption = #33394#24046 + DataBinding.FieldName = 'SH_SC18' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_XY19: TcxGridDBColumn + Caption = #32483#21360 + DataBinding.FieldName = 'SH_XY19' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_YD20: TcxGridDBColumn + Caption = #27833#28857 + DataBinding.FieldName = 'SH_YD20' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_PD21: TcxGridDBColumn + Caption = #30772#27934 + DataBinding.FieldName = 'SH_PD21' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + end + object cxGrid1Level1: TcxGridLevel + GridView = Tv1 + end + end + end + inherited ADOQueryBaseCmd: TADOQuery + Connection = DataLink_TatInsp.ADOLink + Left = 553 + Top = 200 + end + inherited ADOQueryBaseTemp: TADOQuery + Connection = DataLink_TatInsp.ADOLink + Left = 425 + Top = 201 + end + object ADOQueryCmd: TADOQuery + Connection = DataLink_TatInsp.ADOLink + CommandTimeout = 600 + Parameters = <> + Left = 148 + Top = 280 + end + object ADOQueryMain: TADOQuery + Connection = DataLink_TatInsp.ADOLink + LockType = ltReadOnly + Parameters = <> + Left = 252 + Top = 260 + end + object ADOQueryTemp: TADOQuery + Connection = DataLink_TatInsp.ADOLink + LockType = ltReadOnly + CommandTimeout = 600 + Parameters = <> + Left = 112 + Top = 204 + end + object DS_1: TDataSource + DataSet = CDS_1 + Left = 708 + Top = 156 + end + object GPM_1: TcxGridPopupMenu + Grid = cxGrid1 + PopupMenus = <> + Left = 608 + Top = 136 + end + object CDS_1: TClientDataSet + Aggregates = <> + Params = <> + BeforeOpen = CDS_1BeforeOpen + Left = 552 + Top = 140 + end + object PM_1: TPopupMenu + Left = 368 + Top = 248 + object N1: TMenuItem + Caption = #20840#36873 + OnClick = N1Click + end + object PM11: TMenuItem + Caption = #20840#24323 + OnClick = PM11Click + end + object N2: TMenuItem + Caption = #22797#21046 + OnClick = N2Click + end + object N3: TMenuItem + Caption = #22797#21046#27880#33050 + OnClick = N3Click + end + end +end diff --git a/E03梭织坯布检验/U_TatInspSHHZ.pas b/E03梭织坯布检验/U_TatInspSHHZ.pas new file mode 100644 index 0000000..2f60da7 --- /dev/null +++ b/E03梭织坯布检验/U_TatInspSHHZ.pas @@ -0,0 +1,429 @@ +unit U_TatInspSHHZ; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage, + cxEdit, DB, cxDBData, cxGridCustomTableView, cxGridTableView, + cxGridBandedTableView, cxGridDBBandedTableView, cxGridLevel, cxClasses, + cxControls, cxGridCustomView, cxGridDBTableView, cxGrid, StdCtrls, ComCtrls, + ExtCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, ADODB, DBClient, + cxDropDownEdit, cxCheckBox, RM_Common, RM_Class, RM_e_Xls, RM_Dataset, + RM_System, RM_GridReport, Menus, cxCalendar, MovePanel, Math, Clipbrd, + cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, cxTextEdit, dxSkinsCore, + dxSkinsDefaultPainters, dxDateRanges, dxBarBuiltInMenu, cxPC, System.StrUtils, + dxScrollbarAnnotations, U_BaseList, System.ImageList, Vcl.ImgList, U_BaseInput; + +type + TfrmTatInspSHHZ = class(TfrmBaseList) + ToolBar1: TToolBar; + TBRafresh: TToolButton; + TBExport: TToolButton; + TBClose: TToolButton; + Panel1: TPanel; + ADOQueryCmd: TADOQuery; + ADOQueryMain: TADOQuery; + ADOQueryTemp: TADOQuery; + DS_1: TDataSource; + GPM_1: TcxGridPopupMenu; + Label2: TLabel; + BegDate: TDateTimePicker; + EndDate: TDateTimePicker; + CDS_1: TClientDataSet; + begtime: TDateTimePicker; + endTime: TDateTimePicker; + IsJYTime: TCheckBox; + ToolButton4: TToolButton; + Label5: TLabel; + C_Name: TEdit; + PM_1: TPopupMenu; + PM11: TMenuItem; + N1: TMenuItem; + C_GramWeight: TEdit; + label12: TLabel; + PCId: TEdit; + label11: TLabel; + Panel2: TPanel; + cxGrid1: TcxGrid; + Tv1: TcxGridDBTableView; + v1Column22: TcxGridDBColumn; + Tv1Column3: TcxGridDBColumn; + Tv1issp: TcxGridDBColumn; + Tv1Column4: TcxGridDBColumn; + Tv1SH_TD1: TcxGridDBColumn; + Tv1SH_ZW2: TcxGridDBColumn; + Tv1SH_JT3: TcxGridDBColumn; + Tv1SH_LTY4: TcxGridDBColumn; + Tv1SH_DZ5: TcxGridDBColumn; + Tv1SH_DJ6: TcxGridDBColumn; + Tv1SH_HD7: TcxGridDBColumn; + Tv1SH_DS8: TcxGridDBColumn; + Tv1SH_HB9: TcxGridDBColumn; + Tv1SH_SCZ10: TcxGridDBColumn; + cxGrid1Level1: TcxGridLevel; + N2: TMenuItem; + Tv1SH_BB11: TcxGridDBColumn; + Tv1SH_ZW12: TcxGridDBColumn; + Tv1SH_HY13: TcxGridDBColumn; + Tv1SH_DPB14: TcxGridDBColumn; + Tv1SH_GJ15: TcxGridDBColumn; + Tv1SH_YS16: TcxGridDBColumn; + Tv1SH_KZ17: TcxGridDBColumn; + Tv1SH_SC18: TcxGridDBColumn; + Tv1SH_XY19: TcxGridDBColumn; + Tv1SH_YD20: TcxGridDBColumn; + Tv1SH_PD21: TcxGridDBColumn; + N3: TMenuItem; + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure TBRafreshClick(Sender: TObject); + procedure ConNoMChange(Sender: TObject); + procedure TBCloseClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure TBExportClick(Sender: TObject); + procedure orderNoKeyPress(Sender: TObject; var Key: Char); + procedure BTNPClick(Sender: TObject); + procedure BTLPClick(Sender: TObject); + procedure TCBNORChange(Sender: TObject); + procedure JYTypeChange(Sender: TObject); + procedure ToolButton2Click(Sender: TObject); + procedure cxPageControl1Change(Sender: TObject); + procedure CDS_1BeforeOpen(DataSet: TDataSet); + procedure Tv1DataControllerFilterBeforeChange(Sender: TcxDBDataFilterCriteria; ADataSet: TDataSet; const AFilterText: string); + + procedure Tv1TcxGridDBDataControllerTcxDataSummaryFooterSummaryItems6GetText(Sender: TcxDataSummaryItem; const AValue: Variant; AIsFooter: Boolean; var AText: string); + procedure ToolButton4Click(Sender: TObject); + procedure PM11Click(Sender: TObject); + procedure N1Click(Sender: TObject); + procedure IsJYTimeClick(Sender: TObject); + procedure C_NameKeyPress(Sender: TObject; var Key: Char); + procedure N2Click(Sender: TObject); + procedure N3Click(Sender: TObject); + procedure Tv1DblClick(Sender: TObject); + + private + CurrentPage, RecordsNumber: Integer; + lstCust: TStringList; + procedure InitGrid(); + procedure SetStatus(); + procedure CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); + + { Private declarations } + public + canshu1: string; + { Public declarations } + end; + +implementation + +uses + U_DataLink, U_RTFun, U_LabelPrint, U_TatInspSHHZ2; + +{$R *.dfm} + +procedure TfrmTatInspSHHZ.SetStatus(); +begin + +end; + +procedure TfrmTatInspSHHZ.FormClose(Sender: TObject; var Action: TCloseAction); +begin + inherited; + FreeAndNil(lstCust); + Action := caFree; +end; + +procedure TfrmTatInspSHHZ.FormCreate(Sender: TObject); +begin + inherited; + lstCust := TStringList.Create; + EndDate.DateTime := SGetServerDateTime(ADOQueryTemp); + BegDate.DateTime := EndDate.DateTime - 20; +end; + +procedure TfrmTatInspSHHZ.InitGrid(); +var + WSql: string; +begin + + WSql := SGetFilters(Panel1, 1, 2); + if Trim(WSql) <> '' then + WSql := ' and ' + WSql; + if IsJYTime.Checked then + begin + WSql := WSql + ' and A.Filltime>=' + quotedstr(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)); + WSql := WSql + ' and A.Filltime<' + quotedstr(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1)); + end; + + try + ADOQueryMain.DisableControls; + + with ADOQueryMain do + begin + Filtered := False; + Close; + sql.Clear; + sql.Add(' ExEC P_Tat_Cloth_SHHZ '); + sql.Add(' @wsql = ' + quotedStr(WSql)); +// showmessage(sql.text); + Open; + end; + SCreateCDS(ADOQueryMain, CDS_1); + SInitCDSData(ADOQueryMain, CDS_1); + + finally + ADOQueryMain.EnableControls; + TV1.DataController.Filter.Clear; + end; + +end; + +procedure TfrmTatInspSHHZ.IsJYTimeClick(Sender: TObject); +begin + inherited; + InitGrid(); +end; + +procedure TfrmTatInspSHHZ.TBRafreshClick(Sender: TObject); +begin + CurrentPage := 1; + InitGrid(); +end; + +procedure TfrmTatInspSHHZ.CDS_1BeforeOpen(DataSet: TDataSet); +begin + + lstCust.Clear; +end; + +procedure TfrmTatInspSHHZ.ConNoMChange(Sender: TObject); +begin + if ADOQueryMain.Active then + begin + SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2)); + end; +end; + +procedure TfrmTatInspSHHZ.cxPageControl1Change(Sender: TObject); +begin + CurrentPage := 1; + SetStatus(); + InitGrid(); +end; + +procedure TfrmTatInspSHHZ.C_NameKeyPress(Sender: TObject; var Key: Char); +begin + inherited; + if Key = #13 then + begin + InitGrid(); + end; +end; + +procedure TfrmTatInspSHHZ.TBCloseClick(Sender: TObject); +begin + + Close; +end; + +procedure TfrmTatInspSHHZ.FormShow(Sender: TObject); +begin + inherited; + +// ReadCxGrid(trim(self.Caption) + 'Tv1', Tv1, 'Ļб'); + + CurrentPage := 1; + RecordsNumber := 500; + + SetStatus(); + InitGrid(); +end; + +procedure TfrmTatInspSHHZ.TBExportClick(Sender: TObject); +begin + if ADOQueryMain.IsEmpty then + exit; + with CDS_1 do + begin + Filtered := false; + Filter := ' ssel = 1'; + Filtered := true; + end; + TcxGridToExcel(Self.Caption, cxGrid1); + InitGrid(); +end; + +procedure TfrmTatInspSHHZ.orderNoKeyPress(Sender: TObject; var Key: Char); +begin + if Key = #13 then + begin + CurrentPage := 1; + InitGrid(); + end; +end; + +procedure TfrmTatInspSHHZ.PM11Click(Sender: TObject); +begin + SelOKNo(CDS_1, false); +end; + +procedure TfrmTatInspSHHZ.Tv1DataControllerFilterBeforeChange(Sender: TcxDBDataFilterCriteria; ADataSet: TDataSet; const AFilterText: string); +begin + lstCust.Clear; +end; + +procedure TfrmTatInspSHHZ.Tv1DblClick(Sender: TObject); +begin + if CDS_1.IsEmpty then + Exit; + try + frmTatInspSHHZ2 := TfrmTatInspSHHZ2.Create(Application); + with frmTatInspSHHZ2 do + begin + + fEndDateTime := self.EndDate.DateTime; + fBegDateTime := Self.BegDate.DateTime; +// +// + fC_Name := Self.CDS_1.FieldByName('C_Name').AsString; + fissp := Self.CDS_1.FieldByName('issp').AsString; + fC_GramWeight := Self.CDS_1.FieldByName('C_GramWeight').AsString; +// fpcid := Self.CDS_1.FieldByName('pcid').AsString; + if ShowModal = 1 then + begin + + end; + end; + finally + frmTatInspSHHZ2.Free; + end; +end; + +procedure TfrmTatInspSHHZ.Tv1TcxGridDBDataControllerTcxDataSummaryFooterSummaryItems6GetText(Sender: TcxDataSummaryItem; const AValue: Variant; AIsFooter: Boolean; var AText: string); +begin + if lstCust <> nil then + AText := IntToStr(lstCust.Count); +end; + +procedure TfrmTatInspSHHZ.BTNPClick(Sender: TObject); +begin + if CurrentPage < CDS_1.FieldByName('TotalCount').AsInteger / RecordsNumber then + CurrentPage := CurrentPage + 1; + InitGrid(); +end; + +procedure TfrmTatInspSHHZ.BTLPClick(Sender: TObject); +begin + if CurrentPage > 1 then + CurrentPage := CurrentPage - 1; + InitGrid(); +end; + +procedure TfrmTatInspSHHZ.TCBNORChange(Sender: TObject); +begin + + CurrentPage := 1; + InitGrid(); +end; + +procedure TfrmTatInspSHHZ.JYTypeChange(Sender: TObject); +begin + CurrentPage := 1; + InitGrid(); +end; + +procedure TfrmTatInspSHHZ.N1Click(Sender: TObject); +begin + + SelOKNo(CDS_1, true); +end; + +procedure TfrmTatInspSHHZ.N2Click(Sender: TObject); +begin + Clipboard.SetTextBuf(PChar(Trim(CDS_1.fieldbyname(TV1.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString))); + +end; + +procedure TfrmTatInspSHHZ.N3Click(Sender: TObject); +begin + CopyColumnSummaryToClipboard(TV1.Controller.FocusedColumn); + +end; + +procedure TfrmTatInspSHHZ.CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); +var + AView: TcxGridDBTableView; + SummaryIndex: Integer; + SummaryText: string; +begin + AView := Tv1; + + // ָеĻ + SummaryIndex := AView.DataController.Summary.FooterSummaryItems.IndexOfItemLink(AColumn); + if SummaryIndex <> -1 then + begin + SummaryText := AView.DataController.Summary.FooterSummaryTexts[SummaryIndex]; + Clipboard.AsText := SummaryText; + end + else + ShowMessage('δҵеĻ'); +end; + +procedure TfrmTatInspSHHZ.ToolButton2Click(Sender: TObject); +var + WSql: string; +begin + if CDS_1.IsEmpty then + Exit; + if not CDS_1.Locate('SSel', True, []) then + begin + Application.MessageBox('ûѡ!', 'ʾ', 0); + Exit; + end; + WSql := ''; + CDS_1.DisableControls; + with CDS_1 do + begin + First; + while not Eof do + begin + if CDS_1.fieldbyname('SSel').AsBoolean then + begin + if WSql <> '' then + begin + WSql := WSql + ',' + QuotedStr(Trim(CDS_1.fieldbyname('CIID').AsString)); + end + else + begin + WSql := QuotedStr(Trim(CDS_1.fieldbyname('CIID').AsString)); + end; + end; + Next; + end; + end; + CDS_1.Locate('SSel', True, []); + CDS_1.EnableControls; + try + frmLabelPrint := TfrmLabelPrint.Create(Application); + with frmLabelPrint do + begin + FLMType := 'TradeClothStk'; + FFiltration1 := WSql; + if ShowModal = 1 then + begin + + end; + end; + finally + frmLabelPrint.Free; + end; +end; + +procedure TfrmTatInspSHHZ.ToolButton4Click(Sender: TObject); +begin + WriteCxGrid(trim(self.Caption) + 'Tv1', Tv1, 'Ļб'); +end; + +end. + diff --git a/E03梭织坯布检验/U_TatInspSHHZ2.dfm b/E03梭织坯布检验/U_TatInspSHHZ2.dfm new file mode 100644 index 0000000..8bd54bb --- /dev/null +++ b/E03梭织坯布检验/U_TatInspSHHZ2.dfm @@ -0,0 +1,642 @@ +inherited frmTatInspSHHZ2: TfrmTatInspSHHZ2 + Left = 184 + Top = 138 + Caption = #25439#32791#27719#24635#21015#34920'2' + ClientHeight = 600 + ClientWidth = 1540 + Position = poDesigned + WindowState = wsMaximized + ExplicitWidth = 1556 + ExplicitHeight = 639 + PixelsPerInch = 96 + TextHeight = 13 + object ToolBar1: TToolBar [0] + Tag = 1 + Left = 0 + Top = 0 + Width = 1540 + Height = 38 + AutoSize = True + ButtonHeight = 38 + ButtonWidth = 91 + Caption = 'ToolBar1' + Color = clWhite + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [] + Images = DataLink_TatInsp.ImageList_new32 + List = True + ParentColor = False + ParentFont = False + ShowCaptions = True + TabOrder = 0 + object TBRafresh: TToolButton + Left = 0 + Top = 0 + AutoSize = True + Caption = #21047#26032 + ImageIndex = 1 + OnClick = TBRafreshClick + end + object TBExport: TToolButton + Left = 71 + Top = 0 + AutoSize = True + Caption = #23548#20986 + ImageIndex = 20 + OnClick = TBExportClick + end + object ToolButton4: TToolButton + Left = 142 + Top = 0 + AutoSize = True + Caption = #20445#23384#26684#24335 + ImageIndex = 16 + OnClick = ToolButton4Click + end + object TBClose: TToolButton + Left = 237 + Top = 0 + AutoSize = True + Caption = #20851#38381 + ImageIndex = 7 + OnClick = TBCloseClick + end + end + object Panel1: TPanel [1] + Left = 0 + Top = 38 + Width = 1540 + Height = 67 + Align = alTop + BevelInner = bvRaised + BevelOuter = bvLowered + Color = clWhite + ParentBackground = False + TabOrder = 1 + ExplicitLeft = -1 + ExplicitTop = 33 + object Label2: TLabel + Left = 70 + Top = 36 + Width = 12 + Height = 13 + Caption = #33267 + end + object label12: TLabel + Left = 185 + Top = 9 + Width = 52 + Height = 12 + Hint = '0' + Caption = #27969#36716#21345#21495 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object BegDate: TDateTimePicker + Left = 88 + Top = 6 + Width = 87 + Height = 20 + Date = 40768.000000000000000000 + Time = 0.458268587972270300 + TabOrder = 1 + end + object EndDate: TDateTimePicker + Left = 88 + Top = 32 + Width = 87 + Height = 20 + Date = 40768.000000000000000000 + Time = 0.458268587972270300 + TabOrder = 2 + end + object begtime: TDateTimePicker + Left = 137 + Top = 132 + Width = 55 + Height = 20 + Date = 39780.000000000000000000 + Format = 'HH:mm' + Time = 39780.000000000000000000 + Kind = dtkTime + TabOrder = 3 + end + object endTime: TDateTimePicker + Left = 137 + Top = 156 + Width = 55 + Height = 20 + Date = 39780.000000000000000000 + Format = 'HH:mm' + Time = 0.999317129630071600 + Kind = dtkTime + TabOrder = 4 + end + object IsJYTime: TCheckBox + Left = 14 + Top = 8 + Width = 73 + Height = 17 + Caption = #26597#35810#26085#26399 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + TabOrder = 0 + OnClick = IsJYTimeClick + end + object PCId: TEdit + Tag = 2 + Left = 237 + Top = 6 + Width = 100 + Height = 21 + Hint = '0' + TabOrder = 5 + OnKeyPress = C_NameKeyPress + end + end + object Panel2: TPanel [2] + Left = 0 + Top = 105 + Width = 1540 + Height = 495 + Align = alClient + TabOrder = 2 + object cxGrid1: TcxGrid + Left = 1 + Top = 1 + Width = 1538 + Height = 493 + Align = alClient + BorderStyle = cxcbsNone + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [] + ParentFont = False + PopupMenu = PM_1 + TabOrder = 0 + ExplicitLeft = 0 + ExplicitTop = 6 + object Tv1: TcxGridDBTableView + Navigator.Buttons.CustomButtons = <> + ScrollbarAnnotations.CustomAnnotations = <> + DataController.DataSource = DS_1 + DataController.Filter.AutoDataSetFilter = True + DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost] + DataController.Summary.DefaultGroupSummaryItems = <> + DataController.Summary.FooterSummaryItems = < + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skCount + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Format = #26816#39564#31995#25968'=#.##' + Kind = skAverage + end + item + Format = #25442#31639#31995#25968'=#.##' + Kind = skAverage + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + Column = Tv1SH_TD1 + end + item + Kind = skSum + Column = Tv1SH_ZW2 + end + item + Kind = skSum + Column = Tv1SH_JT3 + end + item + Kind = skSum + Column = Tv1SH_LTY4 + end + item + Kind = skSum + Column = Tv1SH_DZ5 + end + item + Kind = skSum + Column = Tv1SH_DJ6 + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + Column = Tv1SH_HD7 + end + item + Kind = skSum + Column = Tv1SH_DS8 + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + Column = Tv1SH_HB9 + end + item + Kind = skSum + Column = Tv1SH_SCZ10 + end + item + Kind = skSum + end + item + Kind = skSum + Column = Tv1SH_BB11 + end + item + Kind = skSum + Column = Tv1SH_ZW12 + end + item + Kind = skSum + Column = Tv1SH_HY13 + end + item + Kind = skSum + Column = Tv1SH_DPB14 + end + item + Kind = skSum + Column = Tv1SH_GJ15 + end + item + Kind = skSum + Column = Tv1SH_YS16 + end + item + Kind = skSum + Column = Tv1SH_KZ17 + end + item + Kind = skSum + Column = Tv1SH_SC18 + end + item + Kind = skSum + Column = Tv1SH_XY19 + end + item + Kind = skSum + Column = Tv1SH_YD20 + end + item + Kind = skSum + Column = Tv1SH_PD21 + end> + DataController.Summary.SummaryGroups = <> + OptionsCustomize.ColumnFiltering = False + OptionsView.Footer = True + OptionsView.GroupByBox = False + OptionsView.IndicatorWidth = 30 + Styles.IncSearch = DataLink_TatInsp.SHuangSe + Styles.Footer = DataLink_TatInsp.Default + Styles.Header = DataLink_TatInsp.Default + Styles.Inactive = DataLink_TatInsp.SHuangSe + Styles.Selection = DataLink_TatInsp.SHuangSe + object v1Column22: TcxGridDBColumn + Caption = #36873#25321 + DataBinding.FieldName = 'SSel' + DataBinding.IsNullValueType = True + PropertiesClassName = 'TcxCheckBoxProperties' + Properties.ImmediatePost = True + Properties.NullStyle = nssUnchecked + HeaderAlignmentHorz = taCenter + Options.Sorting = False + Width = 66 + end + object Tv1Column3: TcxGridDBColumn + Caption = #21697#21517 + DataBinding.FieldName = 'C_Name' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 66 + end + object Tv1issp: TcxGridDBColumn + Caption = #21452#21943 + DataBinding.FieldName = 'issp' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1PCId: TcxGridDBColumn + Caption = #27969#36716#21345#21495 + DataBinding.FieldName = 'PCId' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end + object Tv1Column4: TcxGridDBColumn + Caption = #20811#37325 + DataBinding.FieldName = 'C_GramWeight' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 66 + end + object Tv1SH_TD1: TcxGridDBColumn + Caption = #35843#20992 + DataBinding.FieldName = 'SH_TD1' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 74 + end + object Tv1SH_ZW2: TcxGridDBColumn + Caption = #33039#27745 + DataBinding.FieldName = 'SH_ZW2' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_JT3: TcxGridDBColumn + Caption = #25509#22836 + DataBinding.FieldName = 'SH_JT3' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_LTY4: TcxGridDBColumn + Caption = #34013#26465#21360 + DataBinding.FieldName = 'SH_LTY4' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_DZ5: TcxGridDBColumn + Caption = #26723#23376 + DataBinding.FieldName = 'SH_DZ5' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_DJ6: TcxGridDBColumn + Caption = #26029#32463 + DataBinding.FieldName = 'SH_DJ6' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_HD7: TcxGridDBColumn + Caption = #40657#28857 + DataBinding.FieldName = 'SH_HD7' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_DS8: TcxGridDBColumn + Caption = #26029#19997 + DataBinding.FieldName = 'SH_DS8' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_HB9: TcxGridDBColumn + Caption = #40644#26001 + DataBinding.FieldName = 'SH_HB9' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_SCZ10: TcxGridDBColumn + Caption = #27515#34411#23376 + DataBinding.FieldName = 'SH_SCZ10' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_BB11: TcxGridDBColumn + Caption = #30333#26001 + DataBinding.FieldName = 'SH_BB11' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_ZW12: TcxGridDBColumn + Caption = #30385#32441 + DataBinding.FieldName = 'SH_ZW12' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_HY13: TcxGridDBColumn + Caption = #40644#21360 + DataBinding.FieldName = 'SH_HY13' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_DPB14: TcxGridDBColumn + Caption = #22823#30772#36793 + DataBinding.FieldName = 'SH_DPB14' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_GJ15: TcxGridDBColumn + Caption = #24178#27974 + DataBinding.FieldName = 'SH_GJ15' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_YS16: TcxGridDBColumn + Caption = #27833#19997 + DataBinding.FieldName = 'SH_YS16' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_KZ17: TcxGridDBColumn + Caption = #31354#32455 + DataBinding.FieldName = 'SH_KZ17' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_SC18: TcxGridDBColumn + Caption = #33394#24046 + DataBinding.FieldName = 'SH_SC18' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_XY19: TcxGridDBColumn + Caption = #32483#21360 + DataBinding.FieldName = 'SH_XY19' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_YD20: TcxGridDBColumn + Caption = #27833#28857 + DataBinding.FieldName = 'SH_YD20' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1SH_PD21: TcxGridDBColumn + Caption = #30772#27934 + DataBinding.FieldName = 'SH_PD21' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + end + object cxGrid1Level1: TcxGridLevel + GridView = Tv1 + end + end + end + inherited ADOQueryBaseCmd: TADOQuery + Connection = DataLink_TatInsp.ADOLink + Left = 553 + Top = 200 + end + inherited ADOQueryBaseTemp: TADOQuery + Connection = DataLink_TatInsp.ADOLink + Left = 425 + Top = 201 + end + object ADOQueryCmd: TADOQuery + Connection = DataLink_TatInsp.ADOLink + CommandTimeout = 600 + Parameters = <> + Left = 148 + Top = 280 + end + object ADOQueryMain: TADOQuery + Connection = DataLink_TatInsp.ADOLink + LockType = ltReadOnly + Parameters = <> + Left = 252 + Top = 260 + end + object ADOQueryTemp: TADOQuery + Connection = DataLink_TatInsp.ADOLink + LockType = ltReadOnly + CommandTimeout = 600 + Parameters = <> + Left = 112 + Top = 204 + end + object DS_1: TDataSource + DataSet = CDS_1 + Left = 708 + Top = 156 + end + object GPM_1: TcxGridPopupMenu + Grid = cxGrid1 + PopupMenus = <> + Left = 608 + Top = 136 + end + object CDS_1: TClientDataSet + Aggregates = <> + Params = <> + BeforeOpen = CDS_1BeforeOpen + Left = 552 + Top = 140 + end + object PM_1: TPopupMenu + Left = 368 + Top = 248 + object N1: TMenuItem + Caption = #20840#36873 + OnClick = N1Click + end + object PM11: TMenuItem + Caption = #20840#24323 + OnClick = PM11Click + end + object N2: TMenuItem + Caption = #22797#21046 + OnClick = N2Click + end + object N3: TMenuItem + Caption = #22797#21046#27880#33050 + OnClick = N3Click + end + end +end diff --git a/E03梭织坯布检验/U_TatInspSHHZ2.pas b/E03梭织坯布检验/U_TatInspSHHZ2.pas new file mode 100644 index 0000000..7b1151b --- /dev/null +++ b/E03梭织坯布检验/U_TatInspSHHZ2.pas @@ -0,0 +1,413 @@ +unit U_TatInspSHHZ2; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage, + cxEdit, DB, cxDBData, cxGridCustomTableView, cxGridTableView, + cxGridBandedTableView, cxGridDBBandedTableView, cxGridLevel, cxClasses, + cxControls, cxGridCustomView, cxGridDBTableView, cxGrid, StdCtrls, ComCtrls, + ExtCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, ADODB, DBClient, + cxDropDownEdit, cxCheckBox, RM_Common, RM_Class, RM_e_Xls, RM_Dataset, + RM_System, RM_GridReport, Menus, cxCalendar, MovePanel, Math, Clipbrd, + cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, cxTextEdit, dxSkinsCore, + dxSkinsDefaultPainters, dxDateRanges, dxBarBuiltInMenu, cxPC, System.StrUtils, + dxScrollbarAnnotations, U_BaseList, System.ImageList, Vcl.ImgList, U_BaseInput; + +type + TfrmTatInspSHHZ2 = class(TfrmBaseInput) + ToolBar1: TToolBar; + TBRafresh: TToolButton; + TBExport: TToolButton; + TBClose: TToolButton; + Panel1: TPanel; + ADOQueryCmd: TADOQuery; + ADOQueryMain: TADOQuery; + ADOQueryTemp: TADOQuery; + DS_1: TDataSource; + GPM_1: TcxGridPopupMenu; + Label2: TLabel; + BegDate: TDateTimePicker; + EndDate: TDateTimePicker; + CDS_1: TClientDataSet; + begtime: TDateTimePicker; + endTime: TDateTimePicker; + IsJYTime: TCheckBox; + ToolButton4: TToolButton; + PM_1: TPopupMenu; + PM11: TMenuItem; + N1: TMenuItem; + label12: TLabel; + PCId: TEdit; + Panel2: TPanel; + cxGrid1: TcxGrid; + Tv1: TcxGridDBTableView; + v1Column22: TcxGridDBColumn; + Tv1Column3: TcxGridDBColumn; + Tv1issp: TcxGridDBColumn; + Tv1Column4: TcxGridDBColumn; + Tv1SH_TD1: TcxGridDBColumn; + Tv1SH_ZW2: TcxGridDBColumn; + Tv1SH_JT3: TcxGridDBColumn; + Tv1SH_LTY4: TcxGridDBColumn; + Tv1SH_DZ5: TcxGridDBColumn; + Tv1SH_DJ6: TcxGridDBColumn; + Tv1SH_HD7: TcxGridDBColumn; + Tv1SH_DS8: TcxGridDBColumn; + Tv1SH_HB9: TcxGridDBColumn; + Tv1SH_SCZ10: TcxGridDBColumn; + cxGrid1Level1: TcxGridLevel; + N2: TMenuItem; + Tv1SH_BB11: TcxGridDBColumn; + Tv1SH_ZW12: TcxGridDBColumn; + Tv1SH_HY13: TcxGridDBColumn; + Tv1SH_DPB14: TcxGridDBColumn; + Tv1SH_GJ15: TcxGridDBColumn; + Tv1SH_YS16: TcxGridDBColumn; + Tv1SH_KZ17: TcxGridDBColumn; + Tv1SH_SC18: TcxGridDBColumn; + Tv1SH_XY19: TcxGridDBColumn; + Tv1SH_YD20: TcxGridDBColumn; + Tv1SH_PD21: TcxGridDBColumn; + N3: TMenuItem; + Tv1PCId: TcxGridDBColumn; + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure TBRafreshClick(Sender: TObject); + procedure ConNoMChange(Sender: TObject); + procedure TBCloseClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure TBExportClick(Sender: TObject); + procedure orderNoKeyPress(Sender: TObject; var Key: Char); + procedure BTNPClick(Sender: TObject); + procedure BTLPClick(Sender: TObject); + procedure TCBNORChange(Sender: TObject); + procedure JYTypeChange(Sender: TObject); + procedure ToolButton2Click(Sender: TObject); + procedure cxPageControl1Change(Sender: TObject); + procedure CDS_1BeforeOpen(DataSet: TDataSet); + procedure Tv1DataControllerFilterBeforeChange(Sender: TcxDBDataFilterCriteria; ADataSet: TDataSet; const AFilterText: string); + + procedure Tv1TcxGridDBDataControllerTcxDataSummaryFooterSummaryItems6GetText(Sender: TcxDataSummaryItem; const AValue: Variant; AIsFooter: Boolean; var AText: string); + procedure ToolButton4Click(Sender: TObject); + procedure PM11Click(Sender: TObject); + procedure N1Click(Sender: TObject); + procedure IsJYTimeClick(Sender: TObject); + procedure C_NameKeyPress(Sender: TObject; var Key: Char); + procedure N2Click(Sender: TObject); + procedure N3Click(Sender: TObject); + + private + CurrentPage, RecordsNumber: Integer; + lstCust: TStringList; + procedure InitGrid(); + procedure SetStatus(); + procedure CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); + + { Private declarations } + public + fC_Name,fissp,fC_GramWeight : string; + fEndDateTime,fBegDateTime : TDateTime; + { Public declarations } + end; + +var + frmTatInspSHHZ2: TfrmTatInspSHHZ2; + +implementation + +uses + U_DataLink, U_RTFun, U_LabelPrint; + +{$R *.dfm} + +procedure TfrmTatInspSHHZ2.SetStatus(); +begin + +end; + +procedure TfrmTatInspSHHZ2.FormClose(Sender: TObject; var Action: TCloseAction); +begin + inherited; + FreeAndNil(lstCust); + Action := caFree; +end; + +procedure TfrmTatInspSHHZ2.FormCreate(Sender: TObject); +begin + inherited; + lstCust := TStringList.Create; + EndDate.DateTime := SGetServerDateTime(ADOQueryTemp); + BegDate.DateTime := EndDate.DateTime - 20; +end; + +procedure TfrmTatInspSHHZ2.InitGrid(); +var + WSql: string; + WSql1: string; +begin + + WSql := SGetFilters(Panel1, 1, 2); + if Trim(WSql) <> '' then + WSql := ' and ' + WSql; + if IsJYTime.Checked then + begin + WSql := WSql + ' and A.Filltime>=' + quotedstr(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)); + WSql := WSql + ' and A.Filltime<' + quotedstr(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1)); + end; + + WSql1 := ' and A.C_Name = ' + QuotedStr(Trim(fC_Name)); + WSql1 := WSql1 + ' and isnull(A.issp,'''') = ' + QuotedStr(Trim(fissp)); + WSql1 := WSql1 + ' and A.C_GramWeight = ' + QuotedStr(Trim(fC_GramWeight)); + + try + ADOQueryMain.DisableControls; + + with ADOQueryMain do + begin + Filtered := False; + Close; + sql.Clear; + + sql.Add(' ExEC P_Tat_Cloth_SHHZ2 '); + sql.Add(' @wsql = ' + quotedStr(WSql)); + sql.Add(' ,@wsql1 = ' + quotedStr(WSql1)); + +// showmessage(sql.text); + Open; + end; + SCreateCDS(ADOQueryMain, CDS_1); + SInitCDSData(ADOQueryMain, CDS_1); + + finally + ADOQueryMain.EnableControls; + TV1.DataController.Filter.Clear; + end; + +end; + +procedure TfrmTatInspSHHZ2.IsJYTimeClick(Sender: TObject); +begin + inherited; + InitGrid(); +end; + +procedure TfrmTatInspSHHZ2.TBRafreshClick(Sender: TObject); +begin + CurrentPage := 1; + InitGrid(); +end; + +procedure TfrmTatInspSHHZ2.CDS_1BeforeOpen(DataSet: TDataSet); +begin + + lstCust.Clear; +end; + +procedure TfrmTatInspSHHZ2.ConNoMChange(Sender: TObject); +begin + if ADOQueryMain.Active then + begin + SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2)); + end; +end; + +procedure TfrmTatInspSHHZ2.cxPageControl1Change(Sender: TObject); +begin + CurrentPage := 1; + SetStatus(); + InitGrid(); +end; + +procedure TfrmTatInspSHHZ2.C_NameKeyPress(Sender: TObject; var Key: Char); +begin + inherited; + if Key = #13 then + begin + InitGrid(); + end; +end; + +procedure TfrmTatInspSHHZ2.TBCloseClick(Sender: TObject); +begin + + Close; +end; + +procedure TfrmTatInspSHHZ2.FormShow(Sender: TObject); +begin + inherited; + + ReadCxGrid(trim(self.Caption) + 'Tv1', Tv1, 'Ļб2'); + + CurrentPage := 1; + RecordsNumber := 500; + + BegDate.DateTime := fBegDateTime; + EndDate.DateTime := fEndDateTime; + + SetStatus(); + InitGrid(); +end; + +procedure TfrmTatInspSHHZ2.TBExportClick(Sender: TObject); +begin + if ADOQueryMain.IsEmpty then + exit; + with CDS_1 do + begin + Filtered := false; + Filter := ' ssel = 1'; + Filtered := true; + end; + TcxGridToExcel(Self.Caption, cxGrid1); + InitGrid(); +end; + +procedure TfrmTatInspSHHZ2.orderNoKeyPress(Sender: TObject; var Key: Char); +begin + if Key = #13 then + begin + CurrentPage := 1; + InitGrid(); + end; +end; + +procedure TfrmTatInspSHHZ2.PM11Click(Sender: TObject); +begin + SelOKNo(CDS_1, false); +end; + +procedure TfrmTatInspSHHZ2.Tv1DataControllerFilterBeforeChange(Sender: TcxDBDataFilterCriteria; ADataSet: TDataSet; const AFilterText: string); +begin + lstCust.Clear; +end; + +procedure TfrmTatInspSHHZ2.Tv1TcxGridDBDataControllerTcxDataSummaryFooterSummaryItems6GetText(Sender: TcxDataSummaryItem; const AValue: Variant; AIsFooter: Boolean; var AText: string); +begin + if lstCust <> nil then + AText := IntToStr(lstCust.Count); +end; + +procedure TfrmTatInspSHHZ2.BTNPClick(Sender: TObject); +begin + if CurrentPage < CDS_1.FieldByName('TotalCount').AsInteger / RecordsNumber then + CurrentPage := CurrentPage + 1; + InitGrid(); +end; + +procedure TfrmTatInspSHHZ2.BTLPClick(Sender: TObject); +begin + if CurrentPage > 1 then + CurrentPage := CurrentPage - 1; + InitGrid(); +end; + +procedure TfrmTatInspSHHZ2.TCBNORChange(Sender: TObject); +begin + + CurrentPage := 1; + InitGrid(); +end; + +procedure TfrmTatInspSHHZ2.JYTypeChange(Sender: TObject); +begin + CurrentPage := 1; + InitGrid(); +end; + +procedure TfrmTatInspSHHZ2.N1Click(Sender: TObject); +begin + + SelOKNo(CDS_1, true); +end; + +procedure TfrmTatInspSHHZ2.N2Click(Sender: TObject); +begin + Clipboard.SetTextBuf(PChar(Trim(CDS_1.fieldbyname(TV1.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString))); + +end; + +procedure TfrmTatInspSHHZ2.N3Click(Sender: TObject); +begin + CopyColumnSummaryToClipboard(TV1.Controller.FocusedColumn); + +end; + +procedure TfrmTatInspSHHZ2.CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); +var + AView: TcxGridDBTableView; + SummaryIndex: Integer; + SummaryText: string; +begin + AView := Tv1; + + // ָеĻ + SummaryIndex := AView.DataController.Summary.FooterSummaryItems.IndexOfItemLink(AColumn); + if SummaryIndex <> -1 then + begin + SummaryText := AView.DataController.Summary.FooterSummaryTexts[SummaryIndex]; + Clipboard.AsText := SummaryText; + end + else + ShowMessage('δҵеĻ'); +end; + +procedure TfrmTatInspSHHZ2.ToolButton2Click(Sender: TObject); +var + WSql: string; +begin + if CDS_1.IsEmpty then + Exit; + if not CDS_1.Locate('SSel', True, []) then + begin + Application.MessageBox('ûѡ!', 'ʾ', 0); + Exit; + end; + WSql := ''; + CDS_1.DisableControls; + with CDS_1 do + begin + First; + while not Eof do + begin + if CDS_1.fieldbyname('SSel').AsBoolean then + begin + if WSql <> '' then + begin + WSql := WSql + ',' + QuotedStr(Trim(CDS_1.fieldbyname('CIID').AsString)); + end + else + begin + WSql := QuotedStr(Trim(CDS_1.fieldbyname('CIID').AsString)); + end; + end; + Next; + end; + end; + CDS_1.Locate('SSel', True, []); + CDS_1.EnableControls; + try + frmLabelPrint := TfrmLabelPrint.Create(Application); + with frmLabelPrint do + begin + FLMType := 'TradeClothStk'; + FFiltration1 := WSql; + if ShowModal = 1 then + begin + + end; + end; + finally + frmLabelPrint.Free; + end; +end; + +procedure TfrmTatInspSHHZ2.ToolButton4Click(Sender: TObject); +begin + WriteCxGrid(trim(self.Caption) + 'Tv1', Tv1, 'Ļб2'); +end; + +end. + diff --git a/E03梭织坯布检验/U_TatMachCutHZList.dfm b/E03梭织坯布检验/U_TatMachCutHZList.dfm index ed8c81b..ac290b2 100644 --- a/E03梭织坯布检验/U_TatMachCutHZList.dfm +++ b/E03梭织坯布检验/U_TatMachCutHZList.dfm @@ -7,6 +7,7 @@ inherited frmTatMachCutHZList: TfrmTatMachCutHZList FormStyle = fsMDIChild Position = poScreenCenter Visible = True + ExplicitLeft = -466 ExplicitWidth = 1556 ExplicitHeight = 639 PixelsPerInch = 96 @@ -33,7 +34,6 @@ inherited frmTatMachCutHZList: TfrmTatMachCutHZList ParentFont = False ShowCaptions = True TabOrder = 0 - ExplicitTop = 2 object TBRafresh: TToolButton Left = 0 Top = 0 @@ -78,7 +78,6 @@ inherited frmTatMachCutHZList: TfrmTatMachCutHZList Color = clWhite ParentBackground = False TabOrder = 1 - ExplicitTop = 36 object Label2: TLabel Left = 70 Top = 36 @@ -540,5 +539,13 @@ inherited frmTatMachCutHZList: TfrmTatMachCutHZList Caption = #20840#24323 OnClick = PM11Click end + object N2: TMenuItem + Caption = #22797#21046 + OnClick = N2Click + end + object N3: TMenuItem + Caption = #22797#21046#27880#33050 + OnClick = N3Click + end end end diff --git a/E03梭织坯布检验/U_TatMachCutHZList.pas b/E03梭织坯布检验/U_TatMachCutHZList.pas index d8594b6..31dfaf7 100644 --- a/E03梭织坯布检验/U_TatMachCutHZList.pas +++ b/E03梭织坯布检验/U_TatMachCutHZList.pas @@ -63,6 +63,8 @@ type Tv1qgMeter: TcxGridDBColumn; Tv1qgMeterGQ: TcxGridDBColumn; Tv1qgMeterAll: TcxGridDBColumn; + N2: TMenuItem; + N3: TMenuItem; procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormCreate(Sender: TObject); procedure TBRafreshClick(Sender: TObject); @@ -86,11 +88,14 @@ type procedure N1Click(Sender: TObject); procedure IsJYTimeClick(Sender: TObject); procedure CarnoKeyPress(Sender: TObject; var Key: Char); + procedure N2Click(Sender: TObject); + procedure N3Click(Sender: TObject); private CurrentPage, RecordsNumber: Integer; lstCust: TStringList; procedure InitGrid(); procedure SetStatus(); + procedure CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); { Private declarations } public canshu1: string; @@ -270,7 +275,14 @@ procedure TfrmTatMachCutHZList.TBExportClick(Sender: TObject); begin if ADOQueryMain.IsEmpty then exit; + with CDS_1 do + begin + Filtered := false; + Filter := ' ssel = 1'; + Filtered := true; + end; TcxGridToExcel(Self.Caption, cxGrid1); + InitGrid(); end; procedure TfrmTatMachCutHZList.orderNoKeyPress(Sender: TObject; var Key: Char); @@ -331,6 +343,37 @@ begin SelOKNo(CDS_1, true); end; +procedure TfrmTatMachCutHZList.N2Click(Sender: TObject); +begin + Clipboard.SetTextBuf(PChar(Trim(CDS_1.fieldbyname(TV1.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString))); + +end; + +procedure TfrmTatMachCutHZList.N3Click(Sender: TObject); +begin + CopyColumnSummaryToClipboard(TV1.Controller.FocusedColumn); +end; + + +procedure TfrmTatMachCutHZList.CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); +var + AView: TcxGridDBTableView; + SummaryIndex: Integer; + SummaryText: string; +begin + AView := Tv1; + + // ָеĻ + SummaryIndex := AView.DataController.Summary.FooterSummaryItems.IndexOfItemLink(AColumn); + if SummaryIndex <> -1 then + begin + SummaryText := AView.DataController.Summary.FooterSummaryTexts[SummaryIndex]; + Clipboard.AsText := SummaryText; + end + else + ShowMessage('δҵеĻ'); +end; + procedure TfrmTatMachCutHZList.ToolButton2Click(Sender: TObject); var WSql: string; diff --git a/E03梭织坯布检验/U_TatMachInsp.dfm b/E03梭织坯布检验/U_TatMachInsp.dfm index 3a51c7a..1a855dd 100644 --- a/E03梭织坯布检验/U_TatMachInsp.dfm +++ b/E03梭织坯布检验/U_TatMachInsp.dfm @@ -7,6 +7,7 @@ FormStyle = fsMDIChild Position = poScreenCenter Visible = True + ExplicitLeft = -689 ExplicitWidth = 1556 ExplicitHeight = 823 PixelsPerInch = 96 @@ -5595,16 +5596,14 @@ end object ComboBox1: TComboBox Left = 138 - Top = 92 + Top = 89 Width = 43 Height = 28 - Style = csDropDownList Font.Charset = ANSI_CHARSET Font.Color = clWindowText Font.Height = -20 Font.Name = #23435#20307 Font.Style = [fsBold] - ItemIndex = 1 ParentFont = False TabOrder = 2 Text = '2' @@ -6195,6 +6194,7 @@ ThreadPrepareReport = True InitialZoom = pzDefault PreviewButtons = [rmpbZoom, rmpbLoad, rmpbSave, rmpbPrint, rmpbFind, rmpbPageSetup, rmpbExit, rmpbExport, rmpbNavigator] + DefaultCopies = 2 DefaultCollate = False ShowPrintDialog = False SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\' diff --git a/E03梭织坯布检验/U_TatMachInsp.pas b/E03梭织坯布检验/U_TatMachInsp.pas index 7ba486f..1c07e3c 100644 --- a/E03梭织坯布检验/U_TatMachInsp.pas +++ b/E03梭织坯布检验/U_TatMachInsp.pas @@ -4504,7 +4504,9 @@ begin flag := 'WFBCD'; flagname := 'õ'; fnote := True; + fnote1 := True; V1Note.Caption := 'Ӣ'; + V1Note1.Caption := 'õȼ'; if ShowModal = 1 then begin Self.InitCDPanel(); diff --git a/E04梭织坯布仓库/TatClothStk.dpr b/E04梭织坯布仓库/TatClothStk.dpr index b7f1a84..9857566 100644 --- a/E04梭织坯布仓库/TatClothStk.dpr +++ b/E04梭织坯布仓库/TatClothStk.dpr @@ -33,7 +33,13 @@ uses U_TatClothStkHZListSEL in 'U_TatClothStkHZListSEL.pas' {frmTatClothStkHZListSEL}, U_TatClothInfoSel in '..\A00ͨô\U_TatClothInfoSel.pas' {frmTatClothInfoSel}, uSZHN_JSON in '..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas', - U_BaseDataLink in '..\..\..\public10\design\U_BaseDataLink.pas' {BaseDataLink: TDataModule}; + U_BaseDataLink in '..\..\..\public10\design\U_BaseDataLink.pas' {BaseDataLink: TDataModule}, + U_TatClothStkHZList2 in 'U_TatClothStkHZList2.pas' {frmTatClothStkHZList2}, + U_TatClothRKHZList2 in 'U_TatClothRKHZList2.pas' {frmTatClothRKHZList2}, + U_TatClothEDCDLook in 'U_TatClothEDCDLook.pas' {frmTatClothEDCDLook}, + U_TatClothStkHZList3 in 'U_TatClothStkHZList3.pas' {frmTatClothStkHZList3}, + U_TatClothCKHZList3 in 'U_TatClothCKHZList3.pas' {frmTatClothCKHZList3}, + U_TatClothCRStkHZList in 'U_TatClothCRStkHZList.pas' {frmTatClothCRStkHZList}; {$R *.res} diff --git a/E04梭织坯布仓库/TatClothStk.dproj b/E04梭织坯布仓库/TatClothStk.dproj index 054f0ed..dc23cfa 100644 --- a/E04梭织坯布仓库/TatClothStk.dproj +++ b/E04梭织坯布仓库/TatClothStk.dproj @@ -171,6 +171,30 @@ dfm TDataModule + +
frmTatClothStkHZList2
+ dfm +
+ +
frmTatClothRKHZList2
+ dfm +
+ +
frmTatClothEDCDLook
+ dfm +
+ +
frmTatClothStkHZList3
+ dfm +
+ +
frmTatClothCKHZList3
+ dfm +
+ +
frmTatClothCRStkHZList
+ dfm +
Cfg_2 Base diff --git a/E04梭织坯布仓库/TatClothStk.dproj.local b/E04梭织坯布仓库/TatClothStk.dproj.local index e5b9c53..57b931b 100644 --- a/E04梭织坯布仓库/TatClothStk.dproj.local +++ b/E04梭织坯布仓库/TatClothStk.dproj.local @@ -1,71 +1,77 @@  - 1899/12/30 00:00:00.000.630,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas - 1899/12/30 00:00:00.000.422,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas - 1899/12/30 00:00:00.000.734,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas - 1899/12/30 00:00:00.000.393,D:\Dp10Repo\项目代码\恒燕\E04梭织坯布仓库\U_TatClothStkHZListSEL.pas=D:\Dp10Repo\项目代码\恒燕\E04梭织坯布仓库\U_TatClothStkHZList.pas - 1899/12/30 00:00:00.000.716,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ProcessSel.pas 1899/12/30 00:00:00.000.782,=D:\Dp10Repo\public10\ThreeFun\Fun\uSZHN_JSON.pas + 1899/12/30 00:00:00.000.471,D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\U_DyeDRList.dfm=D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatDRList.dfm 1899/12/30 00:00:00.000.092,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_EmployeeSel.pas - 1899/12/30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas - 1899/12/30 00:00:00.000.930,=D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatClothInList.pas - 1899/12/30 00:00:00.000.339,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas - 1899/12/30 00:00:00.000.663,D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_KnitDRList.pas=D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatDRList.pas - 1899/12/30 00:00:00.000.463,D:\Dp10Repo\项目代码\恒燕\E04梭织坯布仓库\U_TatClothStkHZList.pas=D:\Dp10Repo\项目代码\恒燕\E04梭织坯布仓库\U_TatClothStkList.pas + 1899/12/30 00:00:00.000.463,D:\Dp10Repo\项目代码\恒燕\E04梭织坯布仓库\U_TatClothStkList.pas=D:\Dp10Repo\项目代码\恒燕\E04梭织坯布仓库\U_TatClothStkHZList.pas + 1899/12/30 00:00:00.000.875,D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\U_DyeDRList.pas= + 1899/12/30 00:00:00.000.390,D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatDRtInPut.dfm=D:\Dp10Repo\项目代码\RTBasics\H05涂层成品仓库\U_CoatDRtInPut.dfm + 1899/12/30 00:00:00.000.538,D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatDRtInPut.dfm=D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_KnitDRtInPut.dfm + 1899/12/30 00:00:00.000.716,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ProcessSel.pas + 1899/12/30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.pas 1899/12/30 00:00:00.000.506,=D:\Dp10Repo\项目代码\RTBasics\E00梭织通用窗体\U_TatPlanSel.pas 1899/12/30 00:00:00.000.123,=D:\Dp10Repo\public10\design\U_globalVar.pas - 1899/12/30 00:00:00.000.659,D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatClothDROutEdit.dfm=D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\U_DyeClothDROutEdit.dfm - 1899/12/30 00:00:00.000.538,D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_KnitDRtInPut.dfm=D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatDRtInPut.dfm - 1899/12/30 00:00:00.000.390,D:\Dp10Repo\项目代码\RTBasics\H05涂层成品仓库\U_CoatDRtInPut.dfm=D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatDRtInPut.dfm - 1899/12/30 00:00:00.000.538,D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_KnitDRtInPut.pas=D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatDRtInPut.pas - 1899/12/30 00:00:00.000.999,=D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatClothStkList.pas - 1899/12/30 00:00:00.000.752,D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_KnitPlanSel.pas= - 1899/12/30 00:00:00.000.939,=D:\Dp10Repo\public10\design\U_BaseDataLink.pas - 1899/12/30 00:00:00.000.471,D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatDRList.dfm=D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\U_DyeDRList.dfm - 1899/12/30 00:00:00.000.463,D:\Dp10Repo\项目代码\恒燕\E04梭织坯布仓库\U_TatClothStkHZList.dfm=D:\Dp10Repo\项目代码\恒燕\E04梭织坯布仓库\U_TatClothStkList.dfm + 1899/12/30 00:00:00.000.930,=D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatClothInList.pas + 1899/12/30 00:00:00.000.339,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas + 1899/12/30 00:00:00.000.630,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas + 1899/12/30 00:00:00.000.734,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas + 1899/12/30 00:00:00.000.422,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas + 1899/12/30 00:00:00.000.094,D:\Dp10Repo\项目代码\RTBasics\E03梭织坯布仓库\TatClothStk.dproj=D:\Dp10Repo\项目代码\RTBasics\E03梭织坯布仓库\KnitClothStk.dproj + 1899/12/30 00:00:00.000.663,D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatDRList.dfm=D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_KnitDRList.dfm + 1899/12/30 00:00:00.000.393,D:\Dp10Repo\项目代码\恒燕\E04梭织坯布仓库\U_TatClothStkHZList.dfm=D:\Dp10Repo\项目代码\恒燕\E04梭织坯布仓库\U_TatClothStkHZListSEL.dfm 1899/12/30 00:00:00.000.376,=D:\Dp10Repo\项目代码\RTBasics\D03针织成品仓库\U_KnitDRtInPut.pas - 1899/12/30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.dfm + 1899/12/30 00:00:00.000.999,=D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatClothStkList.pas + 1899/12/30 00:00:00.000.390,D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatDRtInPut.pas=D:\Dp10Repo\项目代码\RTBasics\H05涂层成品仓库\U_CoatDRtInPut.pas + 1899/12/30 00:00:00.000.538,D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatDRtInPut.pas=D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_KnitDRtInPut.pas + 1899/12/30 00:00:00.000.939,=D:\Dp10Repo\public10\design\U_BaseDataLink.pas + 1899/12/30 00:00:00.000.720,D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatDRList.dfm=D:\Dp10Repo\项目代码\RTBasics\H05涂层成品仓库\U_CoatDRList.dfm + 1899/12/30 00:00:00.000.752,D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_KnitPlanSel.pas= + 1899/12/30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.dfm 1899/12/30 00:00:00.000.057,=D:\Dp10Repo\项目代码\RTBasics\D03针织成品仓库\U_KnitDRList.pas 1899/12/30 00:00:00.000.680,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LbaelMapSet.pas - 1899/12/30 00:00:00.000.875,D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\U_DyeDRList.pas= + 1899/12/30 00:00:00.000.471,D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\U_DyeDRList.pas=D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatDRList.pas 1899/12/30 00:00:00.000.939,=D:\Dp10Repo\public10\design\U_BaseInput.pas 1899/12/30 00:00:00.000.135,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ZDYHelp.pas= 1899/12/30 00:00:00.000.048,=D:\Dp10Repo\public10\design\U_BaseList.pas 1899/12/30 00:00:00.000.832,=D:\Dp10Repo\public10\design\U_BaseHelp.pas - 1899/12/30 00:00:00.000.094,D:\Dp10Repo\项目代码\RTBasics\E03梭织坯布仓库\KnitClothStk.dproj=D:\Dp10Repo\项目代码\RTBasics\E03梭织坯布仓库\TatClothStk.dproj + 1899/12/30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas 1899/12/30 00:00:00.000.187,D:\Dp10Repo\项目代码\RTBasics\H05涂层成品仓库\U_CoatDRtInPut.pas= - 1899/12/30 00:00:00.000.390,D:\Dp10Repo\项目代码\RTBasics\H05涂层成品仓库\U_CoatDRtInPut.pas=D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatDRtInPut.pas + 1899/12/30 00:00:00.000.463,D:\Dp10Repo\项目代码\恒燕\E04梭织坯布仓库\U_TatClothStkList.dfm=D:\Dp10Repo\项目代码\恒燕\E04梭织坯布仓库\U_TatClothStkHZList.dfm + 1899/12/30 00:00:00.000.720,D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatDRList.pas=D:\Dp10Repo\项目代码\RTBasics\H05涂层成品仓库\U_CoatDRList.pas 1899/12/30 00:00:00.000.439,=D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatDRList.pas - 1899/12/30 00:00:00.000.471,D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatDRList.pas=D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\U_DyeDRList.pas - 1899/12/30 00:00:00.000.393,D:\Dp10Repo\项目代码\恒燕\E04梭织坯布仓库\U_TatClothStkHZListSEL.dfm=D:\Dp10Repo\项目代码\恒燕\E04梭织坯布仓库\U_TatClothStkHZList.dfm - 1899/12/30 00:00:00.000.442,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelPrint.pas + 1899/12/30 00:00:00.000.411,D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\U_DyeClothDROutEdit.pas= + 1899/12/30 00:00:00.000.659,D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\U_DyeClothDROutEdit.pas=D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatClothDROutEdit.pas 1899/12/30 00:00:00.000.487,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ZDYHelpSel.pas= - 1899/12/30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas + 1899/12/30 00:00:00.000.442,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelPrint.pas + 1899/12/30 00:00:00.000.086,=D:\Dp10Repo\public10\design\U_cxGridCustomCss.pas 1899/12/30 00:00:00.000.015,=D:\Dp10Repo\public10\ThreeFun\Fun\U_RTFun.pas 1899/12/30 00:00:00.000.189,=D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatClothOutEdit.pas - 1899/12/30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm 1899/12/30 00:00:00.000.231,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelMapSet.pas - 1899/12/30 00:00:00.000.178,=D:\Dp10Repo\public10\design\U_WindowFormdesign.pas + 1899/12/30 00:00:00.000.663,D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatDRList.pas=D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_KnitDRList.pas 1899/12/30 00:00:00.000.736,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ModuleNote.pas= + 1899/12/30 00:00:00.000.178,=D:\Dp10Repo\public10\design\U_WindowFormdesign.pas 1899/12/30 00:00:00.000.038,D:\Dp10Repo\项目代码\RTBasics\D03针织成品仓库\Unit1.pas= - 1899/12/30 00:00:00.000.086,=D:\Dp10Repo\public10\design\U_cxGridCustomCss.pas - 1899/12/30 00:00:00.000.720,D:\Dp10Repo\项目代码\RTBasics\H05涂层成品仓库\U_CoatDRList.dfm=D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatDRList.dfm - 1899/12/30 00:00:00.000.378,D:\Dp10Repo\项目代码\RTBasics\H05涂层成品仓库\U_CoatDRList.pas= - 1899/12/30 00:00:00.000.720,D:\Dp10Repo\项目代码\RTBasics\H05涂层成品仓库\U_CoatDRList.pas=D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatDRList.pas - 1899/12/30 00:00:00.000.844,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_AttachmentUpload.pas - 1899/12/30 00:00:00.000.149,=D:\Dp10Repo\public10\ThreeFun\Form\U_ZDYHelp.pas + 1899/12/30 00:00:00.000.669,=D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatClothInEdit.pas 1899/12/30 00:00:00.000.493,=D:\Dp10Repo\项目代码\RTBasics\A00通用模板\Unit1.pas + 1899/12/30 00:00:00.000.149,=D:\Dp10Repo\public10\ThreeFun\Form\U_ZDYHelp.pas + 1899/12/30 00:00:00.000.659,D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\U_DyeClothDROutEdit.dfm=D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatClothDROutEdit.dfm 1899/12/30 00:00:00.000.132,=D:\Dp10Repo\项目代码\RTBasics\D03针织成品仓库\U_KnitPlanSel.pas - 1899/12/30 00:00:00.000.663,D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_KnitDRList.dfm=D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatDRList.dfm + 1899/12/30 00:00:00.000.822,D:\Dp10Repo\项目代码\RTBasics\D03针织成品仓库\KnitClothStk.dproj=D:\Dp10Repo\项目代码\RTBasics\D03针织成品仓库\InformationBase.dproj + 1899/12/30 00:00:00.000.378,D:\Dp10Repo\项目代码\RTBasics\H05涂层成品仓库\U_CoatDRList.pas= + 1899/12/30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm + 1899/12/30 00:00:00.000.267,=D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatClothDROutEdit.pas 1899/12/30 00:00:00.000.231,=D:\Dp10Repo\项目代码\恒燕\A00通用窗体\U_TatClothInfoSel.pas 1899/12/30 00:00:00.000.813,=D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatClothOutList.pas - 1899/12/30 00:00:00.000.669,=D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatClothInEdit.pas - 1899/12/30 00:00:00.000.411,D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\U_DyeClothDROutEdit.pas= - 1899/12/30 00:00:00.000.822,D:\Dp10Repo\项目代码\RTBasics\D03针织成品仓库\InformationBase.dproj=D:\Dp10Repo\项目代码\RTBasics\D03针织成品仓库\KnitClothStk.dproj + 1899/12/30 00:00:00.000.393,D:\Dp10Repo\项目代码\恒燕\E04梭织坯布仓库\U_TatClothStkHZList.pas=D:\Dp10Repo\项目代码\恒燕\E04梭织坯布仓库\U_TatClothStkHZListSEL.pas + 1899/12/30 00:00:00.000.844,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_AttachmentUpload.pas 1899/12/30 00:00:00.000.975,=D:\Dp10Repo\public10\ThreeFun\Fun\U_CompressionFun.pas - 1899/12/30 00:00:00.000.267,=D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatClothDROutEdit.pas - 1899/12/30 00:00:00.000.659,D:\Dp10Repo\项目代码\RTBasics\E04梭织坯布仓库\U_TatClothDROutEdit.pas=D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\U_DyeClothDROutEdit.pas + 2025/12/19 11:28:25.000.554,=D:\Dp10Repo\项目代码\D10szXIANGYING\E04梭织坯布仓库\U_TatClothStkHZList2.pas + 2025/12/30 09:28:30.000.231,=D:\Dp10Repo\项目代码\D10szXIANGYING\E04梭织坯布仓库\U_TatClothRKHZList2.pas + 2025/12/30 14:40:41.000.157,=D:\Dp10Repo\项目代码\D10szXIANGYING\E04梭织坯布仓库\U_TatClothEDCDLook.pas + 2026/01/05 09:38:54.000.740,=D:\Dp10Repo\项目代码\D10szXIANGYING\E04梭织坯布仓库\U_TatClothStkHZList3.pas + 2026/01/05 09:39:04.000.732,=D:\Dp10Repo\项目代码\D10szXIANGYING\E04梭织坯布仓库\U_TatClothCKHZList3.pas + 2026/01/10 09:26:48.000.337,=D:\Dp10Repo\项目代码\D10szXIANGYING\E04梭织坯布仓库\U_TatClothCRStkHZList.pas @@ -123,5 +129,17 @@ + + + + + + + + + + + + diff --git a/E04梭织坯布仓库/TatClothStk.identcache b/E04梭织坯布仓库/TatClothStk.identcache index d88f2a3..8b062cc 100644 Binary files a/E04梭织坯布仓库/TatClothStk.identcache and b/E04梭织坯布仓库/TatClothStk.identcache differ diff --git a/E04梭织坯布仓库/U_DataLink.dfm b/E04梭织坯布仓库/U_DataLink.dfm index cf39ad8..f3bd9c7 100644 --- a/E04梭织坯布仓库/U_DataLink.dfm +++ b/E04梭织坯布仓库/U_DataLink.dfm @@ -1,4 +1,5 @@ inherited DataLink_TatClothStk: TDataLink_TatClothStk + OldCreateOrder = True OnDestroy = DataModuleDestroy Height = 349 Width = 482 diff --git a/E04梭织坯布仓库/U_GetDllForm.pas b/E04梭织坯布仓库/U_GetDllForm.pas index ef2ca5e..218e770 100644 --- a/E04梭织坯布仓库/U_GetDllForm.pas +++ b/E04梭织坯布仓库/U_GetDllForm.pas @@ -18,7 +18,7 @@ uses U_DataLink, U_iniParam, U_TatClothInEdit, U_TatClothInList, U_TatDRList, U_TatClothDROutEdit, U_TatClothOutEdit, U_TatClothOutList, U_TatClothStkList, U_TatClothStkHZList, U_TatClothCKHZList, U_TatClothRKHZList, - U_TatClothStkListPH; + U_TatClothStkListPH, U_TatClothCRStkHZList; ///////////////////////////////////////////////////////////////// // ˵:ȡDllеô // @@ -80,6 +80,8 @@ begin DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server; // Parameters1 := 'ѯ'; Parameters1 := ''; +// Parameters1 := 'ҵ'; +// Parameters1 := ''; Parameters2 := ''; end else @@ -256,6 +258,17 @@ begin mnewHandle := Handle; end; end; + 511: //ͳƻ + begin + with TfrmTatClothCRStkHZList.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10)) do // + begin + fFormID := FormID; + FormStyle := mstyle; + WindowState := mstate; + BorderStyle := mborderstyle; + mnewHandle := Handle; + end; + end; 10000: begin diff --git a/E04梭织坯布仓库/U_TatClothCKHZList.dfm b/E04梭织坯布仓库/U_TatClothCKHZList.dfm index 93770d7..3212b0c 100644 --- a/E04梭织坯布仓库/U_TatClothCKHZList.dfm +++ b/E04梭织坯布仓库/U_TatClothCKHZList.dfm @@ -271,10 +271,11 @@ inherited frmTatClothCKHZList: TfrmTatClothCKHZList Align = alClient Font.Charset = GB2312_CHARSET Font.Color = clWindowText - Font.Height = -16 - Font.Name = #24494#36719#38597#40657 - Font.Style = [] + Font.Height = -19 + Font.Name = #23435#20307 + Font.Style = [fsBold] ParentFont = False + Style = tsFlatButtons TabOrder = 2 object TabSheet1: TTabSheet Caption = #26377#20986#24211#21333#20986#24211 @@ -282,7 +283,7 @@ inherited frmTatClothCKHZList: TfrmTatClothCKHZList Left = 0 Top = 0 Width = 1532 - Height = 459 + Height = 457 Align = alClient BorderStyle = cxcbsNone Font.Charset = GB2312_CHARSET @@ -294,6 +295,7 @@ inherited frmTatClothCKHZList: TfrmTatClothCKHZList PopupMenu = PM_1 TabOrder = 0 object Tv1: TcxGridDBTableView + OnDblClick = Tv1DblClick Navigator.Buttons.CustomButtons = <> ScrollbarAnnotations.CustomAnnotations = <> DataController.DataSource = DS_1 @@ -349,6 +351,13 @@ inherited frmTatClothCKHZList: TfrmTatClothCKHZList end item Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + Column = Tv1NetWeight end> DataController.Summary.SummaryGroups = <> OptionsCustomize.ColumnFiltering = False @@ -371,25 +380,12 @@ inherited frmTatClothCKHZList: TfrmTatClothCKHZList Options.Sorting = False Width = 66 end - object Tv1IOTime: TcxGridDBColumn - Caption = #20986#24211#26102#38388 - DataBinding.FieldName = 'IOTime' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 100 - end - object Tv1DRMID: TcxGridDBColumn - Caption = #21457#36135#30003#35831 - DataBinding.FieldName = 'DRMID' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 92 - end object Tv1ToCoName: TcxGridDBColumn Caption = #23458#25143 - DataBinding.FieldName = 'ToCoName' + DataBinding.FieldName = 'CoName' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end object Tv1Column3: TcxGridDBColumn @@ -405,20 +401,15 @@ inherited frmTatClothCKHZList: TfrmTatClothCKHZList DataBinding.FieldName = 'issp' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end - object Tv1C_Width: TcxGridDBColumn - Caption = #38376#24133 - DataBinding.FieldName = 'C_Width' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 90 - end object Tv1C_GramWeight: TcxGridDBColumn Caption = #20811#37325 DataBinding.FieldName = 'C_GramWeight' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 90 end object v1Column23: TcxGridDBColumn @@ -442,13 +433,7 @@ inherited frmTatClothCKHZList: TfrmTatClothCKHZList DataBinding.FieldName = 'NetWeight' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter - Width = 80 - end - object Tv1PF: TcxGridDBColumn - Caption = #24179#26041 - DataBinding.FieldName = 'PF' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end end @@ -464,7 +449,7 @@ inherited frmTatClothCKHZList: TfrmTatClothCKHZList Left = 0 Top = 0 Width = 1532 - Height = 459 + Height = 457 Align = alClient BorderStyle = cxcbsNone Font.Charset = GB2312_CHARSET @@ -473,9 +458,10 @@ inherited frmTatClothCKHZList: TfrmTatClothCKHZList Font.Name = #23435#20307 Font.Style = [] ParentFont = False - PopupMenu = PM_1 + PopupMenu = PM_2 TabOrder = 0 object Tv2: TcxGridDBTableView + OnDblClick = Tv2DblClick Navigator.Buttons.CustomButtons = <> ScrollbarAnnotations.CustomAnnotations = <> DataController.DataSource = DS_2 @@ -553,20 +539,6 @@ inherited frmTatClothCKHZList: TfrmTatClothCKHZList Options.Sorting = False Width = 66 end - object cxGridDBColumn2: TcxGridDBColumn - Caption = #20986#24211#26102#38388 - DataBinding.FieldName = 'IOTime' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 100 - end - object cxGridDBColumn3: TcxGridDBColumn - Caption = #20986#24211#31867#22411 - DataBinding.FieldName = 'IOType' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 92 - end object cxGridDBColumn5: TcxGridDBColumn Caption = #21697#21517 DataBinding.FieldName = 'C_Name' @@ -580,20 +552,15 @@ inherited frmTatClothCKHZList: TfrmTatClothCKHZList DataBinding.FieldName = 'issp' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end - object cxGridDBColumn6: TcxGridDBColumn - Caption = #38376#24133 - DataBinding.FieldName = 'C_Width' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 90 - end object cxGridDBColumn7: TcxGridDBColumn Caption = #20811#37325 DataBinding.FieldName = 'C_GramWeight' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 90 end object cxGridDBColumn8: TcxGridDBColumn @@ -617,13 +584,7 @@ inherited frmTatClothCKHZList: TfrmTatClothCKHZList DataBinding.FieldName = 'NetWeight' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter - Width = 80 - end - object cxGridDBColumn11: TcxGridDBColumn - Caption = #24179#26041 - DataBinding.FieldName = 'PF' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end end @@ -694,6 +655,14 @@ inherited frmTatClothCKHZList: TfrmTatClothCKHZList Caption = #20840#24323 OnClick = PM11Click end + object N2: TMenuItem + Caption = #22797#21046 + OnClick = N2Click + end + object N3: TMenuItem + Caption = #22797#21046#27880#33050 + OnClick = N3Click + end end object CDS_2: TClientDataSet Aggregates = <> @@ -713,4 +682,24 @@ inherited frmTatClothCKHZList: TfrmTatClothCKHZList Left = 488 Top = 392 end + object PM_2: TPopupMenu + Left = 424 + Top = 272 + object MenuItem1: TMenuItem + Caption = #20840#36873 + OnClick = MenuItem1Click + end + object MenuItem2: TMenuItem + Caption = #20840#24323 + OnClick = MenuItem2Click + end + object MenuItem3: TMenuItem + Caption = #22797#21046 + OnClick = MenuItem3Click + end + object MenuItem4: TMenuItem + Caption = #22797#21046#27880#33050 + OnClick = MenuItem4Click + end + end end diff --git a/E04梭织坯布仓库/U_TatClothCKHZList.pas b/E04梭织坯布仓库/U_TatClothCKHZList.pas index ed0b178..71c66cd 100644 --- a/E04梭织坯布仓库/U_TatClothCKHZList.pas +++ b/E04梭织坯布仓库/U_TatClothCKHZList.pas @@ -54,28 +54,20 @@ type cxGrid1: TcxGrid; Tv1: TcxGridDBTableView; v1Column22: TcxGridDBColumn; - Tv1IOTime: TcxGridDBColumn; - Tv1DRMID: TcxGridDBColumn; Tv1Column3: TcxGridDBColumn; - Tv1C_Width: TcxGridDBColumn; Tv1C_GramWeight: TcxGridDBColumn; v1Column23: TcxGridDBColumn; v1Column10: TcxGridDBColumn; Tv1NetWeight: TcxGridDBColumn; - Tv1PF: TcxGridDBColumn; cxGrid1Level1: TcxGridLevel; cxGrid2: TcxGrid; Tv2: TcxGridDBTableView; cxGridDBColumn1: TcxGridDBColumn; - cxGridDBColumn2: TcxGridDBColumn; - cxGridDBColumn3: TcxGridDBColumn; cxGridDBColumn5: TcxGridDBColumn; - cxGridDBColumn6: TcxGridDBColumn; cxGridDBColumn7: TcxGridDBColumn; cxGridDBColumn8: TcxGridDBColumn; cxGridDBColumn9: TcxGridDBColumn; cxGridDBColumn10: TcxGridDBColumn; - cxGridDBColumn11: TcxGridDBColumn; cxGridLevel1: TcxGridLevel; CDS_2: TClientDataSet; DS_2: TDataSource; @@ -83,6 +75,13 @@ type Tv1ToCoName: TcxGridDBColumn; Tv1issp: TcxGridDBColumn; Tv2issp: TcxGridDBColumn; + N2: TMenuItem; + N3: TMenuItem; + PM_2: TPopupMenu; + MenuItem1: TMenuItem; + MenuItem2: TMenuItem; + MenuItem3: TMenuItem; + MenuItem4: TMenuItem; procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormCreate(Sender: TObject); procedure TBRafreshClick(Sender: TObject); @@ -107,12 +106,22 @@ type procedure IsJYTimeClick(Sender: TObject); procedure C_NameKeyPress(Sender: TObject; var Key: Char); procedure cxTabControl1Change(Sender: TObject); + procedure N2Click(Sender: TObject); + procedure N3Click(Sender: TObject); + procedure MenuItem4Click(Sender: TObject); + procedure MenuItem3Click(Sender: TObject); + procedure MenuItem2Click(Sender: TObject); + procedure MenuItem1Click(Sender: TObject); + procedure Tv1DblClick(Sender: TObject); + procedure Tv2DblClick(Sender: TObject); private CurrentPage, RecordsNumber: Integer; lstCust: TStringList; procedure InitGrid(); procedure SetStatus(); procedure InitGrid2(); + procedure CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); + procedure CopyColumnSummaryToClipboard2(AColumn: TcxGridColumn); { Private declarations } public canshu1: string; @@ -122,7 +131,7 @@ type implementation uses - U_DataLink, U_RTFun, U_LabelPrint; + U_DataLink, U_RTFun, U_LabelPrint, U_TatClothCKHZList2,U_TatClothCKHZList3; {$R *.dfm} @@ -169,17 +178,22 @@ begin Close; sql.Clear; - sql.Add('SELECT A.C_CODE,A.C_Name,A.C_Width,A.C_GramWeight,A.IONO as DRMID '); - sql.Add(',ToCoName=max(B.ToCoName),ioTime=min(ioTime) '); + sql.Add('SELECT A.C_CODE,A.C_Name,A.C_GramWeight'); + sql.Add(',B.ToCoID '); + sql.Add(',COName = (select COName from BS_Company X where X.CoID = B.ToCoID)'); sql.Add(' ,js = count(*),Meter=sum(A.meter),NetWeight = sum(A.NetWeight) '); - sql.Add(',pf = CAST(A.C_Width AS DECIMAL(18,2))/100*sum(A.meter) '); - SQL.Add(',A.issp'); +// sql.Add(',pf = CAST(A.C_Width AS DECIMAL(18,2))/100*sum(A.meter) '); + SQL.Add(',issp=isnull(A.issp,'''') '); sql.Add(' FROM V_Tat_Cloth_IO A '); sql.Add(' left JOIN Tat_Cloth_DR_Main B on A.IONo = B.DRMID '); sql.Add(' where A.IONo LIKE ''RSG%'' and A.IOFlag = '''' '); sql.Add(WSql); - SQL.Add(' group by A.C_CODE ,A.C_Width,A.C_GramWeight,A.IONO,A.C_Name,A.issp'); - SQL.Add(' order by A.IONO,A.C_CODE ,A.C_Width,A.C_GramWeight'); + if canshu1 = 'ҵ' then + begin + sql.Add(' and EXISTS ( select * from BS_Company X where X.COID = B.ToCoID and X.Saleser = ' + quotedStr(Trim(DName)) + ')'); + end; + SQL.Add(' group by A.C_CODE ,A.C_GramWeight,A.C_Name,isnull(A.issp,''''),B.ToCoID'); + SQL.Add(' order by A.C_CODE ,A.C_GramWeight'); // showmessage(sql.text); Open; @@ -194,7 +208,6 @@ begin end; - procedure TfrmTatClothCKHZList.InitGrid2(); var WSql: string; @@ -217,20 +230,18 @@ begin Filtered := False; Close; sql.Clear; - sql.Add('SELECT A.C_CODE,A.C_Name,A.C_Width,A.C_GramWeight,DRMID = '''' '); - sql.Add(',ioTime=min(ioTime),ioType=max(A.ioType) '); - sql.Add(' ,js = count(*),Meter=sum(A.meter),NetWeight = sum(A.NetWeight) '); - sql.Add(',pf = CAST(A.C_Width AS DECIMAL(18,2))/100*sum(A.meter) '); - sql.Add(' ,issp = max(issp) '); + sql.Add('SELECT A.C_CODE,A.C_Name,A.C_GramWeight,DRMID = '''' '); +// sql.Add(',ioType=max(A.ioType) '); + sql.Add(' ,js = count(*),Meter=sum(A.meter),NetWeight = sum(A.NetWeight) '); + sql.Add(' ,ISNULL(A.issp, '''') as issp '); sql.Add(' FROM V_Tat_Cloth_IO A '); // sql.Add(' left JOIN Tat_Cloth_DR_Main B on A.IONo = B.DRMID '); sql.Add(' where A.IONo not LIKE ''RSG%'' and A.IOFlag = '''' '); sql.Add(WSql); - SQL.Add(' group by A.C_CODE ,A.C_Width,A.C_GramWeight,A.C_Name,A.issp'); - SQL.Add(' order By A.C_CODE ,A.C_Width,A.C_GramWeight'); + SQL.Add(' group by A.C_CODE ,A.C_GramWeight,A.C_Name,ISNULL(A.issp, '''')'); + SQL.Add(' order By A.C_CODE ,A.C_GramWeight'); // SQL.Add(' order by B.DRMID'); - // showmessage(sql.text); Open; end; @@ -319,7 +330,14 @@ procedure TfrmTatClothCKHZList.TBExportClick(Sender: TObject); begin if ADOQueryMain.IsEmpty then exit; + with CDS_1 do + begin + Filtered := false; + Filter := ' ssel = 1'; + Filtered := true; + end; TcxGridToExcel(Self.Caption, cxGrid1); + InitGrid(); end; procedure TfrmTatClothCKHZList.orderNoKeyPress(Sender: TObject; var Key: Char); @@ -341,12 +359,65 @@ begin lstCust.Clear; end; +procedure TfrmTatClothCKHZList.Tv1DblClick(Sender: TObject); +begin + if CDS_1.IsEmpty then + Exit; + try + frmTatClothCKHZList2 := TfrmTatClothCKHZList2.Create(Application); + with frmTatClothCKHZList2 do + begin + + fEndDateTime := self.EndDate.DateTime; + fBegDateTime := Self.BegDate.DateTime; + +// fDRMID := Self.CDS_1.FieldByName('DRMID').AsString; + fToCoID := Self.CDS_1.FieldByName('ToCoID').AsString; + fC_Name := Self.CDS_1.FieldByName('C_Name').AsString; + fissp := Self.CDS_1.FieldByName('issp').AsString; +// fioType := Self.CDS_1.FieldByName('ioType').AsString; + if ShowModal = 1 then + begin + + end; + end; + finally + frmTatClothCKHZList2.Free; + end; +end; + procedure TfrmTatClothCKHZList.Tv1TcxGridDBDataControllerTcxDataSummaryFooterSummaryItems6GetText(Sender: TcxDataSummaryItem; const AValue: Variant; AIsFooter: Boolean; var AText: string); begin if lstCust <> nil then AText := IntToStr(lstCust.Count); end; +procedure TfrmTatClothCKHZList.Tv2DblClick(Sender: TObject); +begin + if CDS_2.IsEmpty then + Exit; + try + frmTatClothCKHZList3 := TfrmTatClothCKHZList3.Create(Application); + with frmTatClothCKHZList3 do + begin + + fEndDateTime := self.EndDate.DateTime; + fBegDateTime := Self.BegDate.DateTime; + + fC_Name := Self.CDS_2.FieldByName('C_Name').AsString; + fissp := Self.CDS_2.FieldByName('issp').AsString; +// fioType := Self.CDS_1.FieldByName('ioType').AsString; + if ShowModal = 1 then + begin + + end; + end; + finally + frmTatClothCKHZList3.Free; + end; +end; + + procedure TfrmTatClothCKHZList.BTNPClick(Sender: TObject); begin if CurrentPage < CDS_1.FieldByName('TotalCount').AsInteger / RecordsNumber then @@ -374,12 +445,83 @@ begin InitGrid(); end; -procedure TfrmTatClothCKHZList.N1Click(Sender: TObject); +procedure TfrmTatClothCKHZList.MenuItem1Click(Sender: TObject); begin + SelOKNo(CDS_2, true); +end; + +procedure TfrmTatClothCKHZList.MenuItem2Click(Sender: TObject); +begin + SelOKNo(CDS_2, false); + +end; + +procedure TfrmTatClothCKHZList.MenuItem3Click(Sender: TObject); +begin + Clipboard.SetTextBuf(PChar(Trim(CDS_2.fieldbyname(TV2.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString))); +end; + +procedure TfrmTatClothCKHZList.MenuItem4Click(Sender: TObject); +begin + + CopyColumnSummaryToClipboard2(TV2.Controller.FocusedColumn); +end; + +procedure TfrmTatClothCKHZList.N1Click(Sender: TObject); +begin SelOKNo(CDS_1, true); end; +procedure TfrmTatClothCKHZList.N2Click(Sender: TObject); +begin + Clipboard.SetTextBuf(PChar(Trim(CDS_1.fieldbyname(TV1.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString))); +end; + +procedure TfrmTatClothCKHZList.N3Click(Sender: TObject); +begin + CopyColumnSummaryToClipboard(TV1.Controller.FocusedColumn); + +end; + +procedure TfrmTatClothCKHZList.CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); +var + AView: TcxGridDBTableView; + SummaryIndex: Integer; + SummaryText: string; +begin + AView := Tv1; + + // ָеĻ + SummaryIndex := AView.DataController.Summary.FooterSummaryItems.IndexOfItemLink(AColumn); + if SummaryIndex <> -1 then + begin + SummaryText := AView.DataController.Summary.FooterSummaryTexts[SummaryIndex]; + Clipboard.AsText := SummaryText; + end + else + ShowMessage('δҵеĻ'); +end; + +procedure TfrmTatClothCKHZList.CopyColumnSummaryToClipboard2(AColumn: TcxGridColumn); +var + AView: TcxGridDBTableView; + SummaryIndex: Integer; + SummaryText: string; +begin + AView := Tv2; + + // ָеĻ + SummaryIndex := AView.DataController.Summary.FooterSummaryItems.IndexOfItemLink(AColumn); + if SummaryIndex <> -1 then + begin + SummaryText := AView.DataController.Summary.FooterSummaryTexts[SummaryIndex]; + Clipboard.AsText := SummaryText; + end + else + ShowMessage('δҵеĻ'); +end; + procedure TfrmTatClothCKHZList.ToolButton2Click(Sender: TObject); var WSql: string; diff --git a/E04梭织坯布仓库/U_TatClothCKHZList2.dfm b/E04梭织坯布仓库/U_TatClothCKHZList2.dfm new file mode 100644 index 0000000..01a5e51 --- /dev/null +++ b/E04梭织坯布仓库/U_TatClothCKHZList2.dfm @@ -0,0 +1,432 @@ +inherited frmTatClothCKHZList2: TfrmTatClothCKHZList2 + Left = 184 + Top = 138 + Caption = #25104#21697#20986#24211#27719#24635#21015#34920'2' + ClientHeight = 600 + ClientWidth = 1540 + Position = poScreenCenter + WindowState = wsMaximized + ExplicitWidth = 1556 + ExplicitHeight = 639 + PixelsPerInch = 96 + TextHeight = 13 + object ToolBar1: TToolBar [0] + Tag = 1 + Left = 0 + Top = 0 + Width = 1540 + Height = 38 + AutoSize = True + ButtonHeight = 38 + ButtonWidth = 91 + Caption = 'ToolBar1' + Color = clWhite + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [] + Images = DataLink_TatClothStk.ImageList_new32 + List = True + ParentColor = False + ParentFont = False + ShowCaptions = True + TabOrder = 0 + object TBRafresh: TToolButton + Left = 0 + Top = 0 + AutoSize = True + Caption = #21047#26032 + ImageIndex = 1 + OnClick = TBRafreshClick + end + object TBExport: TToolButton + Left = 71 + Top = 0 + AutoSize = True + Caption = #23548#20986 + ImageIndex = 20 + OnClick = TBExportClick + end + object ToolButton4: TToolButton + Left = 142 + Top = 0 + AutoSize = True + Caption = #20445#23384#26684#24335 + ImageIndex = 16 + OnClick = ToolButton4Click + end + object TBClose: TToolButton + Left = 237 + Top = 0 + AutoSize = True + Caption = #20851#38381 + ImageIndex = 7 + OnClick = TBCloseClick + end + end + object Panel1: TPanel [1] + Left = 0 + Top = 38 + Width = 1540 + Height = 67 + Align = alTop + BevelInner = bvRaised + BevelOuter = bvLowered + Color = clWhite + ParentBackground = False + TabOrder = 1 + object Label2: TLabel + Left = 70 + Top = 36 + Width = 12 + Height = 13 + Caption = #33267 + end + object Label1: TLabel + Left = 206 + Top = 10 + Width = 26 + Height = 12 + Hint = '0' + Caption = #38376#24133 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object BegDate: TDateTimePicker + Left = 88 + Top = 6 + Width = 87 + Height = 20 + Date = 40768.000000000000000000 + Time = 0.458268587972270300 + TabOrder = 1 + end + object EndDate: TDateTimePicker + Left = 88 + Top = 32 + Width = 87 + Height = 20 + Date = 40768.000000000000000000 + Time = 0.458268587972270300 + TabOrder = 2 + end + object begtime: TDateTimePicker + Left = 137 + Top = 132 + Width = 55 + Height = 20 + Date = 39780.000000000000000000 + Format = 'HH:mm' + Time = 39780.000000000000000000 + Kind = dtkTime + TabOrder = 3 + end + object endTime: TDateTimePicker + Left = 137 + Top = 156 + Width = 55 + Height = 20 + Date = 39780.000000000000000000 + Format = 'HH:mm' + Time = 0.999317129630071600 + Kind = dtkTime + TabOrder = 4 + end + object IsJYTime: TCheckBox + Left = 14 + Top = 8 + Width = 73 + Height = 17 + Caption = #26597#35810#26085#26399 + Checked = True + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + State = cbChecked + TabOrder = 0 + OnClick = IsJYTimeClick + end + object C_Width: TEdit + Tag = 2 + Left = 238 + Top = 6 + Width = 100 + Height = 21 + Hint = '0' + TabOrder = 5 + OnKeyPress = C_NameKeyPress + end + end + object cxGrid1: TcxGrid [2] + Left = 0 + Top = 105 + Width = 1540 + Height = 495 + Align = alClient + BorderStyle = cxcbsNone + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -21 + Font.Name = #23435#20307 + Font.Style = [] + ParentFont = False + PopupMenu = PM_1 + TabOrder = 2 + object Tv1: TcxGridDBTableView + Navigator.Buttons.CustomButtons = <> + ScrollbarAnnotations.CustomAnnotations = <> + DataController.DataSource = DS_1 + DataController.Filter.AutoDataSetFilter = True + DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost] + DataController.Summary.DefaultGroupSummaryItems = <> + DataController.Summary.FooterSummaryItems = < + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skCount + end + item + Kind = skSum + Column = v1Column10 + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Format = #26816#39564#31995#25968'=#.##' + Kind = skAverage + end + item + Format = #25442#31639#31995#25968'=#.##' + Kind = skAverage + end + item + Kind = skSum + Column = v1Column23 + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + Column = Tv1PF + end + item + Kind = skSum + Column = Tv1NetWeight + end> + DataController.Summary.SummaryGroups = <> + OptionsCustomize.ColumnFiltering = False + OptionsView.Footer = True + OptionsView.GroupByBox = False + OptionsView.IndicatorWidth = 30 + Styles.IncSearch = DataLink_TatClothStk.SHuangSe + Styles.Footer = DataLink_TatClothStk.Default + Styles.Header = DataLink_TatClothStk.Default + Styles.Inactive = DataLink_TatClothStk.SHuangSe + Styles.Selection = DataLink_TatClothStk.SHuangSe + object v1Column22: TcxGridDBColumn + Caption = #36873#25321 + DataBinding.FieldName = 'SSel' + DataBinding.IsNullValueType = True + PropertiesClassName = 'TcxCheckBoxProperties' + Properties.ImmediatePost = True + Properties.NullStyle = nssUnchecked + HeaderAlignmentHorz = taCenter + Options.Sorting = False + Width = 66 + end + object Tv1IOTime: TcxGridDBColumn + Caption = #20986#24211#26102#38388 + DataBinding.FieldName = 'IOTime' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 100 + end + object Tv1DRMID: TcxGridDBColumn + Caption = #21457#36135#30003#35831 + DataBinding.FieldName = 'DRMID' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 92 + end + object Tv1ToCoName: TcxGridDBColumn + Caption = #23458#25143 + DataBinding.FieldName = 'CoName' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1Column3: TcxGridDBColumn + Caption = #21697#21517 + DataBinding.FieldName = 'C_Name' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 67 + end + object Tv1C_Width: TcxGridDBColumn + Caption = #38376#24133 + DataBinding.FieldName = 'C_Width' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1issp: TcxGridDBColumn + Caption = #21452#21943 + DataBinding.FieldName = 'issp' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1C_GramWeight: TcxGridDBColumn + Caption = #20811#37325 + DataBinding.FieldName = 'C_GramWeight' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 90 + end + object v1Column23: TcxGridDBColumn + Caption = #21367#25968 + DataBinding.FieldName = 'js' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 66 + end + object v1Column10: TcxGridDBColumn + Caption = #31859#25968 + DataBinding.FieldName = 'Meter' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 66 + end + object Tv1NetWeight: TcxGridDBColumn + Caption = #20844#26020 + DataBinding.FieldName = 'NetWeight' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1PF: TcxGridDBColumn + Caption = #24179#26041 + DataBinding.FieldName = 'PF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + end + object cxGrid1Level1: TcxGridLevel + GridView = Tv1 + end + end + inherited ADOQueryBaseCmd: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + Left = 561 + Top = 208 + end + inherited ADOQueryBaseTemp: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + Left = 425 + Top = 201 + end + object ADOQueryCmd: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + CommandTimeout = 600 + Parameters = <> + Left = 148 + Top = 280 + end + object ADOQueryMain: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + LockType = ltReadOnly + Parameters = <> + Left = 252 + Top = 260 + end + object ADOQueryTemp: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + LockType = ltReadOnly + CommandTimeout = 600 + Parameters = <> + Left = 112 + Top = 204 + end + object DS_1: TDataSource + DataSet = CDS_1 + Left = 828 + Top = 284 + end + object GPM_1: TcxGridPopupMenu + Grid = cxGrid1 + PopupMenus = <> + Left = 728 + Top = 288 + end + object CDS_1: TClientDataSet + Aggregates = <> + Params = <> + BeforeOpen = CDS_1BeforeOpen + Left = 776 + Top = 284 + end + object PM_1: TPopupMenu + Left = 560 + Top = 384 + object N1: TMenuItem + Caption = #20840#36873 + OnClick = N1Click + end + object PM11: TMenuItem + Caption = #20840#24323 + OnClick = PM11Click + end + object N2: TMenuItem + Caption = #22797#21046 + OnClick = N2Click + end + object N3: TMenuItem + Caption = #22797#21046#27880#33050 + OnClick = N3Click + end + end +end diff --git a/E04梭织坯布仓库/U_TatClothCKHZList2.pas b/E04梭织坯布仓库/U_TatClothCKHZList2.pas new file mode 100644 index 0000000..83c9772 --- /dev/null +++ b/E04梭织坯布仓库/U_TatClothCKHZList2.pas @@ -0,0 +1,418 @@ +unit U_TatClothCKHZList2; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage, + cxEdit, DB, cxDBData, cxGridCustomTableView, cxGridTableView, + cxGridBandedTableView, cxGridDBBandedTableView, cxGridLevel, cxClasses, + cxControls, cxGridCustomView, cxGridDBTableView, cxGrid, StdCtrls, ComCtrls, + ExtCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, ADODB, DBClient, + cxDropDownEdit, cxCheckBox, RM_Common, RM_Class, RM_e_Xls, RM_Dataset, + RM_System, RM_GridReport, Menus, cxCalendar, MovePanel, Math, Clipbrd, + cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, cxTextEdit, dxSkinsCore, + dxSkinsDefaultPainters, dxDateRanges, dxBarBuiltInMenu, U_BaseInput, cxPC, + System.StrUtils, dxScrollbarAnnotations, U_BaseList, System.ImageList, + Vcl.ImgList; + +type + TfrmTatClothCKHZList2 = class(TfrmBaseInput) + ToolBar1: TToolBar; + TBRafresh: TToolButton; + TBExport: TToolButton; + TBClose: TToolButton; + Panel1: TPanel; + ADOQueryCmd: TADOQuery; + ADOQueryMain: TADOQuery; + ADOQueryTemp: TADOQuery; + DS_1: TDataSource; + GPM_1: TcxGridPopupMenu; + Label2: TLabel; + BegDate: TDateTimePicker; + EndDate: TDateTimePicker; + CDS_1: TClientDataSet; + begtime: TDateTimePicker; + endTime: TDateTimePicker; + IsJYTime: TCheckBox; + ToolButton4: TToolButton; + PM_1: TPopupMenu; + PM11: TMenuItem; + N1: TMenuItem; + Label1: TLabel; + C_Width: TEdit; + N2: TMenuItem; + N3: TMenuItem; + cxGrid1: TcxGrid; + Tv1: TcxGridDBTableView; + v1Column22: TcxGridDBColumn; + Tv1IOTime: TcxGridDBColumn; + Tv1DRMID: TcxGridDBColumn; + Tv1ToCoName: TcxGridDBColumn; + Tv1Column3: TcxGridDBColumn; + Tv1issp: TcxGridDBColumn; + Tv1C_GramWeight: TcxGridDBColumn; + v1Column23: TcxGridDBColumn; + v1Column10: TcxGridDBColumn; + Tv1NetWeight: TcxGridDBColumn; + Tv1PF: TcxGridDBColumn; + cxGrid1Level1: TcxGridLevel; + Tv1C_Width: TcxGridDBColumn; + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure TBRafreshClick(Sender: TObject); + procedure ConNoMChange(Sender: TObject); + procedure TBCloseClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure TBExportClick(Sender: TObject); + procedure orderNoKeyPress(Sender: TObject; var Key: Char); + procedure BTNPClick(Sender: TObject); + procedure BTLPClick(Sender: TObject); + procedure TCBNORChange(Sender: TObject); + procedure JYTypeChange(Sender: TObject); + procedure ToolButton2Click(Sender: TObject); + procedure cxPageControl1Change(Sender: TObject); + procedure CDS_1BeforeOpen(DataSet: TDataSet); + procedure Tv1DataControllerFilterBeforeChange(Sender: TcxDBDataFilterCriteria; ADataSet: TDataSet; const AFilterText: string); + + procedure Tv1TcxGridDBDataControllerTcxDataSummaryFooterSummaryItems6GetText(Sender: TcxDataSummaryItem; const AValue: Variant; AIsFooter: Boolean; var AText: string); + procedure ToolButton4Click(Sender: TObject); + procedure PM11Click(Sender: TObject); + procedure N1Click(Sender: TObject); + procedure IsJYTimeClick(Sender: TObject); + procedure C_NameKeyPress(Sender: TObject; var Key: Char); + procedure IOTypeChange(Sender: TObject); + procedure N2Click(Sender: TObject); + procedure N3Click(Sender: TObject); + private + CurrentPage, RecordsNumber: Integer; + lstCust: TStringList; + procedure InitGrid(); + procedure SetStatus(); + procedure CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); + { Private declarations } + public + fDRMID: string; + fissp: string; + fC_Name: string; + fioType: string; + fToCoID: string; + fEndDateTime,fBegDateTime : TDateTime; + + { Public declarations } + end; + +var + frmTatClothCKHZList2: TfrmTatClothCKHZList2; + +implementation + +uses + U_DataLink, U_RTFun, U_LabelPrint; + +{$R *.dfm} + +procedure TfrmTatClothCKHZList2.SetStatus(); +begin + +end; + +procedure TfrmTatClothCKHZList2.FormClose(Sender: TObject; var Action: TCloseAction); +begin + inherited; + FreeAndNil(lstCust); + Action := caFree; +end; + +procedure TfrmTatClothCKHZList2.FormCreate(Sender: TObject); +begin + inherited; + lstCust := TStringList.Create; + EndDate.DateTime := SGetServerDateTime(ADOQueryTemp); + BegDate.DateTime := EndDate.DateTime - 20; +end; + +procedure TfrmTatClothCKHZList2.InitGrid(); +var + WSql: string; +begin + + WSql := SGetFilters(Panel1, 1, 2); + if Trim(WSql) <> '' then + WSql := ' and ' + WSql; + if IsJYTime.Checked then + begin + WSql := WSql + ' and A.IOTime>=' + quotedstr(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)); + WSql := WSql + ' and A.IOTime<' + quotedstr(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1)); + end; + + try + ADOQueryMain.DisableControls; + + with ADOQueryMain do + begin + Filtered := False; + Close; + sql.Clear; + + sql.Add('SELECT A.C_CODE,A.C_Name,A.C_width,A.C_GramWeight,A.IONO as DRMID'); + sql.Add(',CAST(ioTime AS DATE) as ioTime '); + sql.Add(', (SELECT COName FROM BS_Company X WHERE X.CoID = B.ToCoID) as COName'); + sql.Add(' ,COUNT(*) as js, SUM(A.meter) as Meter,SUM(A.NetWeight) as NetWeight '); + sql.Add(', CAST(A.C_Width AS DECIMAL(18,2))/100 * SUM(A.meter) as pf'); + SQL.Add(',ISNULL(A.issp, '''') as issp '); + sql.Add(' FROM V_Tat_Cloth_IO A '); + sql.Add(' left JOIN Tat_Cloth_DR_Main B on A.IONo = B.DRMID '); + sql.Add(' where A.IONo LIKE ''RSG%'' and A.IOFlag = '''' '); +// sql.Add(' and (select COName from BS_Company X where X.CoAbbrName = max(B.ToCoName))= ' + QuotedStr(Trim(fconame))); + sql.Add(' and A.C_Name = ' + QuotedStr(Trim(fC_Name))); + sql.Add(' and B.ToCoID = ' + QuotedStr(Trim(fToCoID))); + sql.Add(' and isnull(A.issp,'''') = ' + QuotedStr(Trim(fissp))); + sql.Add(WSql); + + SQL.Add(' group by A.C_CODE,A.C_width,A.C_GramWeight,A.IONO,A.C_Name,isnull(A.issp,''''),B.ToCoID,CAST(ioTime AS DATE)'); +// sql.Add(' HAVING(select COName from BS_Company X where X.CoAbbrName = max(B.ToCoName))= ' + QuotedStr(Trim(fconame))); + SQL.Add(' order by A.IONO,A.C_CODE,CAST(A.C_width AS INT),A.C_GramWeight,CAST(ioTime AS DATE)'); + +// showmessage(sql.text); + Open; + end; + SCreateCDS(ADOQueryMain, CDS_1); + SInitCDSData(ADOQueryMain, CDS_1); + + finally + ADOQueryMain.EnableControls; + TV1.DataController.Filter.Clear; + end; + +end; + +procedure TfrmTatClothCKHZList2.IOTypeChange(Sender: TObject); +begin + + InitGrid(); +end; + +procedure TfrmTatClothCKHZList2.IsJYTimeClick(Sender: TObject); +begin + inherited; + InitGrid(); +end; + +procedure TfrmTatClothCKHZList2.TBRafreshClick(Sender: TObject); +begin + CurrentPage := 1; + InitGrid(); +end; + +procedure TfrmTatClothCKHZList2.CDS_1BeforeOpen(DataSet: TDataSet); +begin + + lstCust.Clear; +end; + +procedure TfrmTatClothCKHZList2.ConNoMChange(Sender: TObject); +begin + if ADOQueryMain.Active then + begin + SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2)); + end; +end; + +procedure TfrmTatClothCKHZList2.cxPageControl1Change(Sender: TObject); +begin + CurrentPage := 1; + SetStatus(); + InitGrid(); +end; + +procedure TfrmTatClothCKHZList2.C_NameKeyPress(Sender: TObject; var Key: Char); +begin + inherited; + if Key = #13 then + begin + InitGrid(); + end; +end; + +procedure TfrmTatClothCKHZList2.TBCloseClick(Sender: TObject); +begin + + Close; +end; + +procedure TfrmTatClothCKHZList2.FormShow(Sender: TObject); +begin + inherited; + + ReadCxGrid(trim(self.Caption) + 'Tv1', Tv1, 'Ʒ2'); + CurrentPage := 1; + RecordsNumber := 500; +// canshu1 := Trim(Self.fParameters1); + + EndDate.DateTime := fEndDateTime; + BegDate.DateTime := fBegDateTime; + SetStatus(); + + InitGrid(); + +end; + +procedure TfrmTatClothCKHZList2.TBExportClick(Sender: TObject); +begin + if ADOQueryMain.IsEmpty then + exit; + with CDS_1 do + begin + Filtered := false; + Filter := ' ssel = 1'; + Filtered := true; + end; + TcxGridToExcel(Self.Caption, cxGrid1); + InitGrid(); +end; + +procedure TfrmTatClothCKHZList2.orderNoKeyPress(Sender: TObject; var Key: Char); +begin + if Key = #13 then + begin + CurrentPage := 1; + InitGrid(); + end; +end; + +procedure TfrmTatClothCKHZList2.PM11Click(Sender: TObject); +begin + SelOKNo(CDS_1, false); +end; + +procedure TfrmTatClothCKHZList2.Tv1DataControllerFilterBeforeChange(Sender: TcxDBDataFilterCriteria; ADataSet: TDataSet; const AFilterText: string); +begin + lstCust.Clear; +end; + +procedure TfrmTatClothCKHZList2.Tv1TcxGridDBDataControllerTcxDataSummaryFooterSummaryItems6GetText(Sender: TcxDataSummaryItem; const AValue: Variant; AIsFooter: Boolean; var AText: string); +begin + if lstCust <> nil then + AText := IntToStr(lstCust.Count); +end; + +procedure TfrmTatClothCKHZList2.BTNPClick(Sender: TObject); +begin + if CurrentPage < CDS_1.FieldByName('TotalCount').AsInteger / RecordsNumber then + CurrentPage := CurrentPage + 1; + InitGrid(); +end; + +procedure TfrmTatClothCKHZList2.BTLPClick(Sender: TObject); +begin + if CurrentPage > 1 then + CurrentPage := CurrentPage - 1; + InitGrid(); +end; + +procedure TfrmTatClothCKHZList2.TCBNORChange(Sender: TObject); +begin + + CurrentPage := 1; + InitGrid(); +end; + +procedure TfrmTatClothCKHZList2.JYTypeChange(Sender: TObject); +begin + CurrentPage := 1; + InitGrid(); +end; + +procedure TfrmTatClothCKHZList2.N1Click(Sender: TObject); +begin + + SelOKNo(CDS_1, true); +end; + +procedure TfrmTatClothCKHZList2.N2Click(Sender: TObject); +begin + Clipboard.SetTextBuf(PChar(Trim(CDS_1.fieldbyname(TV1.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString))); +end; + +procedure TfrmTatClothCKHZList2.N3Click(Sender: TObject); +begin + CopyColumnSummaryToClipboard(TV1.Controller.FocusedColumn); +end; + +procedure TfrmTatClothCKHZList2.CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); +var + AView: TcxGridDBTableView; + SummaryIndex: Integer; + SummaryText: string; +begin + AView := Tv1; + + // ָеĻ + SummaryIndex := AView.DataController.Summary.FooterSummaryItems.IndexOfItemLink(AColumn); + if SummaryIndex <> -1 then + begin + SummaryText := AView.DataController.Summary.FooterSummaryTexts[SummaryIndex]; + Clipboard.AsText := SummaryText; + end + else + ShowMessage('δҵеĻ'); +end; + +procedure TfrmTatClothCKHZList2.ToolButton2Click(Sender: TObject); +var + WSql: string; +begin + if CDS_1.IsEmpty then + Exit; + if not CDS_1.Locate('SSel', True, []) then + begin + Application.MessageBox('ûѡ!', 'ʾ', 0); + Exit; + end; + WSql := ''; + CDS_1.DisableControls; + with CDS_1 do + begin + First; + while not Eof do + begin + if CDS_1.fieldbyname('SSel').AsBoolean then + begin + if WSql <> '' then + begin + WSql := WSql + ',' + QuotedStr(Trim(CDS_1.fieldbyname('CIID').AsString)); + end + else + begin + WSql := QuotedStr(Trim(CDS_1.fieldbyname('CIID').AsString)); + end; + end; + Next; + end; + end; + CDS_1.Locate('SSel', True, []); + CDS_1.EnableControls; + try + frmLabelPrint := TfrmLabelPrint.Create(Application); + with frmLabelPrint do + begin + FLMType := 'TradeClothStk'; + FFiltration1 := WSql; + if ShowModal = 1 then + begin + + end; + end; + finally + frmLabelPrint.Free; + end; +end; + +procedure TfrmTatClothCKHZList2.ToolButton4Click(Sender: TObject); +begin + WriteCxGrid(trim(self.Caption) + 'Tv1', Tv1, 'Ʒ2'); +end; + +end. + diff --git a/E04梭织坯布仓库/U_TatClothCKHZList3.dfm b/E04梭织坯布仓库/U_TatClothCKHZList3.dfm new file mode 100644 index 0000000..6bb0d02 --- /dev/null +++ b/E04梭织坯布仓库/U_TatClothCKHZList3.dfm @@ -0,0 +1,424 @@ +inherited frmTatClothCKHZList3: TfrmTatClothCKHZList3 + Left = 184 + Top = 138 + Caption = #25104#21697#20986#24211#27719#24635#21015#34920'3' + ClientHeight = 600 + ClientWidth = 1540 + Position = poScreenCenter + WindowState = wsMaximized + ExplicitWidth = 1556 + ExplicitHeight = 639 + PixelsPerInch = 96 + TextHeight = 13 + object ToolBar1: TToolBar [0] + Tag = 1 + Left = 0 + Top = 0 + Width = 1540 + Height = 38 + AutoSize = True + ButtonHeight = 38 + ButtonWidth = 91 + Caption = 'ToolBar1' + Color = clWhite + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [] + Images = DataLink_TatClothStk.ImageList_new32 + List = True + ParentColor = False + ParentFont = False + ShowCaptions = True + TabOrder = 0 + object TBRafresh: TToolButton + Left = 0 + Top = 0 + AutoSize = True + Caption = #21047#26032 + ImageIndex = 1 + OnClick = TBRafreshClick + end + object TBExport: TToolButton + Left = 71 + Top = 0 + AutoSize = True + Caption = #23548#20986 + ImageIndex = 20 + OnClick = TBExportClick + end + object ToolButton4: TToolButton + Left = 142 + Top = 0 + AutoSize = True + Caption = #20445#23384#26684#24335 + ImageIndex = 16 + OnClick = ToolButton4Click + end + object TBClose: TToolButton + Left = 237 + Top = 0 + AutoSize = True + Caption = #20851#38381 + ImageIndex = 7 + OnClick = TBCloseClick + end + end + object Panel1: TPanel [1] + Left = 0 + Top = 38 + Width = 1540 + Height = 67 + Align = alTop + BevelInner = bvRaised + BevelOuter = bvLowered + Color = clWhite + ParentBackground = False + TabOrder = 1 + object Label2: TLabel + Left = 70 + Top = 36 + Width = 12 + Height = 13 + Caption = #33267 + end + object Label1: TLabel + Left = 206 + Top = 10 + Width = 26 + Height = 12 + Hint = '0' + Caption = #38376#24133 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object BegDate: TDateTimePicker + Left = 88 + Top = 6 + Width = 87 + Height = 20 + Date = 40768.000000000000000000 + Time = 0.458268587972270300 + TabOrder = 1 + end + object EndDate: TDateTimePicker + Left = 88 + Top = 32 + Width = 87 + Height = 20 + Date = 40768.000000000000000000 + Time = 0.458268587972270300 + TabOrder = 2 + end + object begtime: TDateTimePicker + Left = 137 + Top = 132 + Width = 55 + Height = 20 + Date = 39780.000000000000000000 + Format = 'HH:mm' + Time = 39780.000000000000000000 + Kind = dtkTime + TabOrder = 3 + end + object endTime: TDateTimePicker + Left = 137 + Top = 156 + Width = 55 + Height = 20 + Date = 39780.000000000000000000 + Format = 'HH:mm' + Time = 0.999317129630071600 + Kind = dtkTime + TabOrder = 4 + end + object IsJYTime: TCheckBox + Left = 14 + Top = 8 + Width = 73 + Height = 17 + Caption = #26597#35810#26085#26399 + Checked = True + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + State = cbChecked + TabOrder = 0 + OnClick = IsJYTimeClick + end + object C_Width: TEdit + Tag = 2 + Left = 238 + Top = 6 + Width = 100 + Height = 21 + Hint = '0' + TabOrder = 5 + OnKeyPress = C_NameKeyPress + end + end + object cxGrid2: TcxGrid [2] + Left = 0 + Top = 105 + Width = 1540 + Height = 495 + Align = alClient + BorderStyle = cxcbsNone + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -21 + Font.Name = #23435#20307 + Font.Style = [] + ParentFont = False + PopupMenu = PM_1 + TabOrder = 2 + object Tv2: TcxGridDBTableView + Navigator.Buttons.CustomButtons = <> + ScrollbarAnnotations.CustomAnnotations = <> + DataController.DataSource = DS_1 + DataController.Filter.AutoDataSetFilter = True + DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost] + DataController.Summary.DefaultGroupSummaryItems = <> + DataController.Summary.FooterSummaryItems = < + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skCount + end + item + Kind = skSum + Column = cxGridDBColumn9 + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Format = #26816#39564#31995#25968'=#.##' + Kind = skAverage + end + item + Format = #25442#31639#31995#25968'=#.##' + Kind = skAverage + end + item + Kind = skSum + Column = cxGridDBColumn8 + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + Column = cxGridDBColumn10 + end + item + Kind = skSum + Column = cxGridDBColumn11 + end> + DataController.Summary.SummaryGroups = <> + OptionsCustomize.ColumnFiltering = False + OptionsView.Footer = True + OptionsView.GroupByBox = False + OptionsView.IndicatorWidth = 30 + Styles.IncSearch = DataLink_TatClothStk.SHuangSe + Styles.Footer = DataLink_TatClothStk.Default + Styles.Header = DataLink_TatClothStk.Default + Styles.Inactive = DataLink_TatClothStk.SHuangSe + Styles.Selection = DataLink_TatClothStk.SHuangSe + object cxGridDBColumn1: TcxGridDBColumn + Caption = #36873#25321 + DataBinding.FieldName = 'SSel' + DataBinding.IsNullValueType = True + PropertiesClassName = 'TcxCheckBoxProperties' + Properties.ImmediatePost = True + Properties.NullStyle = nssUnchecked + HeaderAlignmentHorz = taCenter + Options.Sorting = False + Width = 66 + end + object cxGridDBColumn2: TcxGridDBColumn + Caption = #20986#24211#26102#38388 + DataBinding.FieldName = 'IOTime' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 100 + end + object cxGridDBColumn3: TcxGridDBColumn + Caption = #20986#24211#31867#22411 + DataBinding.FieldName = 'IOType' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 92 + end + object cxGridDBColumn5: TcxGridDBColumn + Caption = #21697#21517 + DataBinding.FieldName = 'C_Name' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 66 + end + object Tv2issp: TcxGridDBColumn + Caption = #21452#21943 + DataBinding.FieldName = 'issp' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn6: TcxGridDBColumn + Caption = #38376#24133 + DataBinding.FieldName = 'C_Width' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 90 + end + object cxGridDBColumn7: TcxGridDBColumn + Caption = #20811#37325 + DataBinding.FieldName = 'C_GramWeight' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 90 + end + object cxGridDBColumn8: TcxGridDBColumn + Caption = #21367#25968 + DataBinding.FieldName = 'js' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 66 + end + object cxGridDBColumn9: TcxGridDBColumn + Caption = #31859#25968 + DataBinding.FieldName = 'Meter' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 66 + end + object cxGridDBColumn10: TcxGridDBColumn + Caption = #20844#26020 + DataBinding.FieldName = 'NetWeight' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn11: TcxGridDBColumn + Caption = #24179#26041 + DataBinding.FieldName = 'PF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + end + object cxGridLevel1: TcxGridLevel + GridView = Tv2 + end + end + inherited ADOQueryBaseCmd: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + Left = 561 + Top = 208 + end + inherited ADOQueryBaseTemp: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + Left = 425 + Top = 201 + end + object ADOQueryCmd: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + CommandTimeout = 600 + Parameters = <> + Left = 148 + Top = 280 + end + object ADOQueryMain: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + LockType = ltReadOnly + Parameters = <> + Left = 252 + Top = 260 + end + object ADOQueryTemp: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + LockType = ltReadOnly + CommandTimeout = 600 + Parameters = <> + Left = 112 + Top = 204 + end + object DS_1: TDataSource + DataSet = CDS_1 + Left = 828 + Top = 284 + end + object GPM_1: TcxGridPopupMenu + Grid = cxGrid2 + PopupMenus = <> + Left = 728 + Top = 288 + end + object CDS_1: TClientDataSet + Aggregates = <> + Params = <> + BeforeOpen = CDS_1BeforeOpen + Left = 776 + Top = 284 + end + object PM_1: TPopupMenu + Left = 560 + Top = 384 + object N1: TMenuItem + Caption = #20840#36873 + OnClick = N1Click + end + object PM11: TMenuItem + Caption = #20840#24323 + OnClick = PM11Click + end + object N2: TMenuItem + Caption = #22797#21046 + OnClick = N2Click + end + object N3: TMenuItem + Caption = #22797#21046#27880#33050 + OnClick = N3Click + end + end +end diff --git a/E04梭织坯布仓库/U_TatClothCKHZList3.pas b/E04梭织坯布仓库/U_TatClothCKHZList3.pas new file mode 100644 index 0000000..2c732d8 --- /dev/null +++ b/E04梭织坯布仓库/U_TatClothCKHZList3.pas @@ -0,0 +1,410 @@ +unit U_TatClothCKHZList3; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage, + cxEdit, DB, cxDBData, cxGridCustomTableView, cxGridTableView, + cxGridBandedTableView, cxGridDBBandedTableView, cxGridLevel, cxClasses, + cxControls, cxGridCustomView, cxGridDBTableView, cxGrid, StdCtrls, ComCtrls, + ExtCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, ADODB, DBClient, + cxDropDownEdit, cxCheckBox, RM_Common, RM_Class, RM_e_Xls, RM_Dataset, + RM_System, RM_GridReport, Menus, cxCalendar, MovePanel, Math, Clipbrd, + cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, cxTextEdit, dxSkinsCore, + dxSkinsDefaultPainters, dxDateRanges, dxBarBuiltInMenu, U_BaseInput, cxPC, + System.StrUtils, dxScrollbarAnnotations, U_BaseList, System.ImageList, + Vcl.ImgList; + +type + TfrmTatClothCKHZList3 = class(TfrmBaseInput) + ToolBar1: TToolBar; + TBRafresh: TToolButton; + TBExport: TToolButton; + TBClose: TToolButton; + Panel1: TPanel; + ADOQueryCmd: TADOQuery; + ADOQueryMain: TADOQuery; + ADOQueryTemp: TADOQuery; + DS_1: TDataSource; + GPM_1: TcxGridPopupMenu; + Label2: TLabel; + BegDate: TDateTimePicker; + EndDate: TDateTimePicker; + CDS_1: TClientDataSet; + begtime: TDateTimePicker; + endTime: TDateTimePicker; + IsJYTime: TCheckBox; + ToolButton4: TToolButton; + PM_1: TPopupMenu; + PM11: TMenuItem; + N1: TMenuItem; + Label1: TLabel; + C_Width: TEdit; + N2: TMenuItem; + N3: TMenuItem; + cxGrid2: TcxGrid; + Tv2: TcxGridDBTableView; + cxGridDBColumn1: TcxGridDBColumn; + cxGridDBColumn2: TcxGridDBColumn; + cxGridDBColumn3: TcxGridDBColumn; + cxGridDBColumn5: TcxGridDBColumn; + Tv2issp: TcxGridDBColumn; + cxGridDBColumn6: TcxGridDBColumn; + cxGridDBColumn7: TcxGridDBColumn; + cxGridDBColumn8: TcxGridDBColumn; + cxGridDBColumn9: TcxGridDBColumn; + cxGridDBColumn10: TcxGridDBColumn; + cxGridDBColumn11: TcxGridDBColumn; + cxGridLevel1: TcxGridLevel; + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure TBRafreshClick(Sender: TObject); + procedure ConNoMChange(Sender: TObject); + procedure TBCloseClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure TBExportClick(Sender: TObject); + procedure orderNoKeyPress(Sender: TObject; var Key: Char); + procedure BTNPClick(Sender: TObject); + procedure BTLPClick(Sender: TObject); + procedure TCBNORChange(Sender: TObject); + procedure JYTypeChange(Sender: TObject); + procedure ToolButton2Click(Sender: TObject); + procedure cxPageControl1Change(Sender: TObject); + procedure CDS_1BeforeOpen(DataSet: TDataSet); + procedure Tv1DataControllerFilterBeforeChange(Sender: TcxDBDataFilterCriteria; ADataSet: TDataSet; const AFilterText: string); + + procedure Tv1TcxGridDBDataControllerTcxDataSummaryFooterSummaryItems6GetText(Sender: TcxDataSummaryItem; const AValue: Variant; AIsFooter: Boolean; var AText: string); + procedure ToolButton4Click(Sender: TObject); + procedure PM11Click(Sender: TObject); + procedure N1Click(Sender: TObject); + procedure IsJYTimeClick(Sender: TObject); + procedure C_NameKeyPress(Sender: TObject; var Key: Char); + procedure IOTypeChange(Sender: TObject); + procedure N2Click(Sender: TObject); + procedure N3Click(Sender: TObject); + private + CurrentPage, RecordsNumber: Integer; + lstCust: TStringList; + procedure InitGrid(); + procedure SetStatus(); + procedure CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); + { Private declarations } + public + + fissp: string; + fC_Name: string; + fioType: string; + fEndDateTime,fBegDateTime : TDateTime; + + { Public declarations } + end; + +var + frmTatClothCKHZList3: TfrmTatClothCKHZList3; + +implementation + +uses + U_DataLink, U_RTFun, U_LabelPrint; + +{$R *.dfm} + +procedure TfrmTatClothCKHZList3.SetStatus(); +begin + +end; + +procedure TfrmTatClothCKHZList3.FormClose(Sender: TObject; var Action: TCloseAction); +begin + inherited; + FreeAndNil(lstCust); + Action := caFree; +end; + +procedure TfrmTatClothCKHZList3.FormCreate(Sender: TObject); +begin + inherited; + lstCust := TStringList.Create; + EndDate.DateTime := SGetServerDateTime(ADOQueryTemp); + BegDate.DateTime := EndDate.DateTime - 20; +end; + +procedure TfrmTatClothCKHZList3.InitGrid(); +var + WSql: string; +begin + + WSql := SGetFilters(Panel1, 1, 2); + if Trim(WSql) <> '' then + WSql := ' and ' + WSql; + if IsJYTime.Checked then + begin + WSql := WSql + ' and A.IOTime>=' + quotedstr(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)); + WSql := WSql + ' and A.IOTime<' + quotedstr(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1)); + end; + + try + ADOQueryMain.DisableControls; + + with ADOQueryMain do + begin + Filtered := False; + Close; + sql.Clear; + + sql.Add('SELECT A.C_CODE,A.C_Name,A.C_width,A.C_GramWeight,A.IOType '); + sql.Add(' ,ioTime=CAST(ioTime AS DATE) '); + sql.Add(' ,js = count(*),Meter=sum(A.meter),NetWeight = sum(A.NetWeight) '); + sql.Add(' ,pf = CAST(A.C_Width AS DECIMAL(18,2))/100*sum(A.meter) '); + SQL.Add(',issp=isnull(A.issp,'''') '); + sql.Add(' FROM V_Tat_Cloth_IO A '); + sql.Add(' where A.IONo not LIKE ''RSG%'' and A.IOFlag = '''' '); + sql.Add(' and A.C_Name = ' + QuotedStr(Trim(fC_Name))); +// sql.Add(' and isnull(A.issp,'''') = ' + QuotedStr(Trim(fissp))); + sql.Add(WSql); + SQL.Add(' group by A.C_CODE,A.C_width,A.C_GramWeight,A.IOType,A.C_Name,isnull(A.issp,''''),CAST(ioTime AS DATE)'); + SQL.Add(' order by A.C_Name,CAST(A.C_width AS INT),A.C_GramWeight,A.IOType,CAST(ioTime AS DATE)'); + +// showmessage(sql.text); + Open; + end; + SCreateCDS(ADOQueryMain, CDS_1); + SInitCDSData(ADOQueryMain, CDS_1); + + finally + ADOQueryMain.EnableControls; + TV2.DataController.Filter.Clear; + end; + +end; + +procedure TfrmTatClothCKHZList3.IOTypeChange(Sender: TObject); +begin + + InitGrid(); +end; + +procedure TfrmTatClothCKHZList3.IsJYTimeClick(Sender: TObject); +begin + inherited; + InitGrid(); +end; + +procedure TfrmTatClothCKHZList3.TBRafreshClick(Sender: TObject); +begin + CurrentPage := 1; + InitGrid(); +end; + +procedure TfrmTatClothCKHZList3.CDS_1BeforeOpen(DataSet: TDataSet); +begin + + lstCust.Clear; +end; + +procedure TfrmTatClothCKHZList3.ConNoMChange(Sender: TObject); +begin + if ADOQueryMain.Active then + begin + SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2)); + end; +end; + +procedure TfrmTatClothCKHZList3.cxPageControl1Change(Sender: TObject); +begin + CurrentPage := 1; + SetStatus(); + InitGrid(); +end; + +procedure TfrmTatClothCKHZList3.C_NameKeyPress(Sender: TObject; var Key: Char); +begin + inherited; + if Key = #13 then + begin + InitGrid(); + end; +end; + +procedure TfrmTatClothCKHZList3.TBCloseClick(Sender: TObject); +begin + + Close; +end; + +procedure TfrmTatClothCKHZList3.FormShow(Sender: TObject); +begin + inherited; + + ReadCxGrid(trim(self.Caption) + 'Tv2', Tv2, 'Ʒ3'); + CurrentPage := 1; + RecordsNumber := 500; +// canshu1 := Trim(Self.fParameters1); + + EndDate.DateTime := fEndDateTime; + BegDate.DateTime := fBegDateTime; + SetStatus(); + + InitGrid(); + +end; + +procedure TfrmTatClothCKHZList3.TBExportClick(Sender: TObject); +begin + if ADOQueryMain.IsEmpty then + exit; + with CDS_1 do + begin + Filtered := false; + Filter := ' ssel = 1'; + Filtered := true; + end; + TcxGridToExcel(Self.Caption, cxGrid2); + InitGrid(); +end; + +procedure TfrmTatClothCKHZList3.orderNoKeyPress(Sender: TObject; var Key: Char); +begin + if Key = #13 then + begin + CurrentPage := 1; + InitGrid(); + end; +end; + +procedure TfrmTatClothCKHZList3.PM11Click(Sender: TObject); +begin + SelOKNo(CDS_1, false); +end; + +procedure TfrmTatClothCKHZList3.Tv1DataControllerFilterBeforeChange(Sender: TcxDBDataFilterCriteria; ADataSet: TDataSet; const AFilterText: string); +begin + lstCust.Clear; +end; + +procedure TfrmTatClothCKHZList3.Tv1TcxGridDBDataControllerTcxDataSummaryFooterSummaryItems6GetText(Sender: TcxDataSummaryItem; const AValue: Variant; AIsFooter: Boolean; var AText: string); +begin + if lstCust <> nil then + AText := IntToStr(lstCust.Count); +end; + +procedure TfrmTatClothCKHZList3.BTNPClick(Sender: TObject); +begin + if CurrentPage < CDS_1.FieldByName('TotalCount').AsInteger / RecordsNumber then + CurrentPage := CurrentPage + 1; + InitGrid(); +end; + +procedure TfrmTatClothCKHZList3.BTLPClick(Sender: TObject); +begin + if CurrentPage > 1 then + CurrentPage := CurrentPage - 1; + InitGrid(); +end; + +procedure TfrmTatClothCKHZList3.TCBNORChange(Sender: TObject); +begin + + CurrentPage := 1; + InitGrid(); +end; + +procedure TfrmTatClothCKHZList3.JYTypeChange(Sender: TObject); +begin + CurrentPage := 1; + InitGrid(); +end; + +procedure TfrmTatClothCKHZList3.N1Click(Sender: TObject); +begin + + SelOKNo(CDS_1, true); +end; + +procedure TfrmTatClothCKHZList3.N2Click(Sender: TObject); +begin + Clipboard.SetTextBuf(PChar(Trim(CDS_1.fieldbyname(TV2.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString))); +end; + +procedure TfrmTatClothCKHZList3.N3Click(Sender: TObject); +begin + CopyColumnSummaryToClipboard(TV2.Controller.FocusedColumn); +end; + +procedure TfrmTatClothCKHZList3.CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); +var + AView: TcxGridDBTableView; + SummaryIndex: Integer; + SummaryText: string; +begin + AView := Tv2; + + // ָеĻ + SummaryIndex := AView.DataController.Summary.FooterSummaryItems.IndexOfItemLink(AColumn); + if SummaryIndex <> -1 then + begin + SummaryText := AView.DataController.Summary.FooterSummaryTexts[SummaryIndex]; + Clipboard.AsText := SummaryText; + end + else + ShowMessage('δҵеĻ'); +end; + +procedure TfrmTatClothCKHZList3.ToolButton2Click(Sender: TObject); +var + WSql: string; +begin + if CDS_1.IsEmpty then + Exit; + if not CDS_1.Locate('SSel', True, []) then + begin + Application.MessageBox('ûѡ!', 'ʾ', 0); + Exit; + end; + WSql := ''; + CDS_1.DisableControls; + with CDS_1 do + begin + First; + while not Eof do + begin + if CDS_1.fieldbyname('SSel').AsBoolean then + begin + if WSql <> '' then + begin + WSql := WSql + ',' + QuotedStr(Trim(CDS_1.fieldbyname('CIID').AsString)); + end + else + begin + WSql := QuotedStr(Trim(CDS_1.fieldbyname('CIID').AsString)); + end; + end; + Next; + end; + end; + CDS_1.Locate('SSel', True, []); + CDS_1.EnableControls; + try + frmLabelPrint := TfrmLabelPrint.Create(Application); + with frmLabelPrint do + begin + FLMType := 'TradeClothStk'; + FFiltration1 := WSql; + if ShowModal = 1 then + begin + + end; + end; + finally + frmLabelPrint.Free; + end; +end; + +procedure TfrmTatClothCKHZList3.ToolButton4Click(Sender: TObject); +begin + WriteCxGrid(trim(self.Caption) + 'Tv2', Tv2, 'Ʒ3'); +end; + +end. + diff --git a/E04梭织坯布仓库/U_TatClothCRStkHZList.dfm b/E04梭织坯布仓库/U_TatClothCRStkHZList.dfm new file mode 100644 index 0000000..2d0fa8c --- /dev/null +++ b/E04梭织坯布仓库/U_TatClothCRStkHZList.dfm @@ -0,0 +1,594 @@ +inherited frmTatClothCRStkHZList: TfrmTatClothCRStkHZList + Left = 184 + Top = 138 + Caption = #25104#21697#20986#20837#24211#23384#27719#24635#21015#34920'1' + ClientHeight = 600 + ClientWidth = 1540 + FormStyle = fsMDIChild + Position = poScreenCenter + Visible = True + ExplicitWidth = 1556 + ExplicitHeight = 639 + PixelsPerInch = 96 + TextHeight = 12 + object ToolBar1: TToolBar [0] + Tag = 1 + Left = 0 + Top = 0 + Width = 1540 + Height = 38 + AutoSize = True + ButtonHeight = 38 + ButtonWidth = 91 + Caption = 'ToolBar1' + Color = clWhite + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [] + Images = DataLink_TatClothStk.ImageList_new32 + List = True + ParentColor = False + ParentFont = False + ShowCaptions = True + TabOrder = 0 + ExplicitLeft = -1 + object TBRafresh: TToolButton + Left = 0 + Top = 0 + AutoSize = True + Caption = #21047#26032 + ImageIndex = 1 + OnClick = TBRafreshClick + end + object TBExport: TToolButton + Left = 71 + Top = 0 + AutoSize = True + Caption = #23548#20986 + ImageIndex = 20 + OnClick = TBExportClick + end + object ToolButton4: TToolButton + Left = 142 + Top = 0 + AutoSize = True + Caption = #20445#23384#26684#24335 + ImageIndex = 16 + OnClick = ToolButton4Click + end + object TBClose: TToolButton + Left = 237 + Top = 0 + AutoSize = True + Caption = #20851#38381 + ImageIndex = 7 + OnClick = TBCloseClick + end + end + object Panel1: TPanel [1] + Left = 0 + Top = 38 + Width = 1540 + Height = 67 + Align = alTop + BevelInner = bvRaised + BevelOuter = bvLowered + Color = clWhite + ParentBackground = False + TabOrder = 1 + ExplicitLeft = 1 + ExplicitTop = 33 + object Label2: TLabel + Left = 70 + Top = 36 + Width = 12 + Height = 12 + Caption = #33267 + end + object Label5: TLabel + Left = 190 + Top = 9 + Width = 39 + Height = 12 + Hint = '0' + Caption = #20135#21697#21517 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object label11: TLabel + Left = 358 + Top = 9 + Width = 26 + Height = 12 + Hint = '0' + Caption = #38376#24133 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object Label1: TLabel + Left = 538 + Top = 9 + Width = 48 + Height = 17 + Caption = #26597#35810#26085#26399 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #24494#36719#38597#40657 + Font.Style = [fsBold] + ParentFont = False + end + object Label3: TLabel + Left = 30 + Top = 9 + Width = 52 + Height = 12 + Hint = '0' + Caption = #26597#35810#26085#26399 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object BegDate: TDateTimePicker + Left = 88 + Top = 6 + Width = 87 + Height = 20 + Date = 40768.000000000000000000 + Time = 0.458268587972270300 + TabOrder = 0 + end + object EndDate: TDateTimePicker + Left = 88 + Top = 32 + Width = 87 + Height = 20 + Date = 40768.000000000000000000 + Time = 0.458268587972270300 + TabOrder = 1 + end + object begtime: TDateTimePicker + Left = 137 + Top = 132 + Width = 55 + Height = 20 + Date = 39780.000000000000000000 + Format = 'HH:mm' + Time = 39780.000000000000000000 + Kind = dtkTime + TabOrder = 2 + end + object endTime: TDateTimePicker + Left = 137 + Top = 156 + Width = 55 + Height = 20 + Date = 39780.000000000000000000 + Format = 'HH:mm' + Time = 0.999317129630071600 + Kind = dtkTime + TabOrder = 3 + end + object C_Name: TEdit + Tag = 2 + Left = 237 + Top = 6 + Width = 100 + Height = 20 + Hint = '0' + TabOrder = 4 + OnKeyPress = C_NameKeyPress + end + object C_Width: TEdit + Tag = 2 + Left = 390 + Top = 6 + Width = 100 + Height = 20 + Hint = '0' + TabOrder = 5 + OnKeyPress = C_NameKeyPress + end + object dayDate: TDateTimePicker + Left = 592 + Top = 6 + Width = 87 + Height = 20 + Date = 40768.000000000000000000 + Time = 0.458268587972270300 + TabOrder = 6 + end + end + object Panel2: TPanel [2] + Left = 0 + Top = 105 + Width = 1540 + Height = 495 + Align = alClient + TabOrder = 2 + object cxGrid1: TcxGrid + Left = 1 + Top = 1 + Width = 1538 + Height = 493 + Align = alClient + BorderStyle = cxcbsNone + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [] + ParentFont = False + PopupMenu = PM_1 + TabOrder = 0 + ExplicitLeft = 2 + ExplicitTop = 6 + object cxGrid1DBBandedTableView1: TcxGridDBBandedTableView + Navigator.Buttons.CustomButtons = <> + ScrollbarAnnotations.CustomAnnotations = <> + DataController.Summary.DefaultGroupSummaryItems = <> + DataController.Summary.FooterSummaryItems = <> + DataController.Summary.SummaryGroups = <> + Bands = < + item + end> + end + object Tv1: TcxGridDBBandedTableView + Navigator.Buttons.CustomButtons = <> + ScrollbarAnnotations.CustomAnnotations = <> + DataController.DataSource = DS_1 + DataController.Summary.DefaultGroupSummaryItems = <> + DataController.Summary.FooterSummaryItems = < + item + Kind = skSum + Column = Tv1Column16 + end + item + Kind = skSum + Column = Tv1Column6 + end + item + Kind = skSum + Column = Tv1Column17 + end + item + Kind = skSum + Column = Tv1Column14 + end + item + Kind = skSum + Column = Tv1Column5 + end + item + Kind = skSum + Column = Tv1Column3 + end + item + Kind = skSum + Column = Tv1Column7 + end + item + Kind = skSum + Column = Tv1Column4 + end + item + Kind = skSum + Column = Tv1Column8 + end + item + Kind = skSum + Column = Tv1Column9 + end + item + Kind = skSum + Column = Tv1Column10 + end + item + Kind = skSum + Column = Tv1Column13 + end + item + Kind = skSum + Column = Tv1Column12 + end + item + Kind = skSum + Column = Tv1Column11 + end + item + Kind = skSum + Column = Tv1Column15 + end> + DataController.Summary.SummaryGroups = <> + OptionsView.Footer = True + OptionsView.GroupByBox = False + Styles.Header = DataLink_TatClothStk.Default + Bands = < + item + Caption = #22383#24067#20449#24687 + end + item + Caption = #26412#26399#25910#20837 + end + item + Caption = #26412#26399#21457#20986 + end + item + Caption = #24211#23384 + end + item + Caption = #26085#25910#20837 + end + item + Caption = #26085#21457#20986 + end> + object Tv1Column1: TcxGridDBBandedColumn + Caption = #21697#21517 + DataBinding.FieldName = 'C_Name' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + Position.BandIndex = 0 + Position.ColIndex = 0 + Position.RowIndex = 0 + end + object Tv1Column3: TcxGridDBBandedColumn + Caption = #24179#26041#25968 + DataBinding.FieldName = 'BQOutPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + Position.BandIndex = 2 + Position.ColIndex = 2 + Position.RowIndex = 0 + end + object Tv1Column4: TcxGridDBBandedColumn + Caption = #31859#25968 + DataBinding.FieldName = 'OldStkmeter' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + Position.BandIndex = 3 + Position.ColIndex = 1 + Position.RowIndex = 0 + end + object Tv1Column5: TcxGridDBBandedColumn + Caption = #31859#25968 + DataBinding.FieldName = 'BQOutmeter' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + Position.BandIndex = 2 + Position.ColIndex = 1 + Position.RowIndex = 0 + end + object Tv1Column7: TcxGridDBBandedColumn + Caption = #21367#25968 + DataBinding.FieldName = 'OldStkPiece' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + Position.BandIndex = 3 + Position.ColIndex = 0 + Position.RowIndex = 0 + end + object Tv1Column8: TcxGridDBBandedColumn + Caption = #24179#26041#25968 + DataBinding.FieldName = 'OldStkPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + Position.BandIndex = 3 + Position.ColIndex = 2 + Position.RowIndex = 0 + end + object Tv1Column9: TcxGridDBBandedColumn + Caption = #20837#24211#21367#25968 + DataBinding.FieldName = 'DayInPiece' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + Position.BandIndex = 4 + Position.ColIndex = 0 + Position.RowIndex = 0 + end + object Tv1Column10: TcxGridDBBandedColumn + Caption = #20837#24211#31859#25968 + DataBinding.FieldName = 'DayInmeter' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + Position.BandIndex = 4 + Position.ColIndex = 1 + Position.RowIndex = 0 + end + object Tv1Column11: TcxGridDBBandedColumn + Caption = #20986#24211#31859#25968 + DataBinding.FieldName = 'DayOutmeter' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + Position.BandIndex = 5 + Position.ColIndex = 1 + Position.RowIndex = 0 + end + object Tv1Column12: TcxGridDBBandedColumn + Caption = #20986#24211#21367#25968 + DataBinding.FieldName = 'DayOutPiece' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + Position.BandIndex = 5 + Position.ColIndex = 0 + Position.RowIndex = 0 + end + object Tv1Column13: TcxGridDBBandedColumn + Caption = #20986#24211#24179#26041#25968 + DataBinding.FieldName = 'DayInPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + Position.BandIndex = 4 + Position.ColIndex = 2 + Position.RowIndex = 0 + end + object Tv1Column14: TcxGridDBBandedColumn + Caption = #21367#25968 + DataBinding.FieldName = 'BQOutPiece' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + Position.BandIndex = 2 + Position.ColIndex = 0 + Position.RowIndex = 0 + end + object Tv1Column15: TcxGridDBBandedColumn + Caption = #20986#24211#24179#26041#25968 + DataBinding.FieldName = 'DayOutPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + Position.BandIndex = 5 + Position.ColIndex = 2 + Position.RowIndex = 0 + end + object Tv1Column16: TcxGridDBBandedColumn + Caption = #21367#25968 + DataBinding.FieldName = 'BQInPiece' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + Position.BandIndex = 1 + Position.ColIndex = 0 + Position.RowIndex = 0 + end + object Tv1Column17: TcxGridDBBandedColumn + Caption = #24179#26041#25968 + DataBinding.FieldName = 'BQInPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + Position.BandIndex = 1 + Position.ColIndex = 2 + Position.RowIndex = 0 + end + object Tv1Column6: TcxGridDBBandedColumn + Caption = #31859#25968 + DataBinding.FieldName = 'BQInmeter' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + Position.BandIndex = 1 + Position.ColIndex = 1 + Position.RowIndex = 0 + end + object Tv1Column2: TcxGridDBBandedColumn + Caption = #38376#24133 + DataBinding.FieldName = 'C_Width' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + Position.BandIndex = 0 + Position.ColIndex = 1 + Position.RowIndex = 0 + end + object Tv1CIssp: TcxGridDBBandedColumn + Caption = #21452#21943 + DataBinding.FieldName = 'Issp' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + Position.BandIndex = 0 + Position.ColIndex = 2 + Position.RowIndex = 0 + end + end + object cxGrid1Level1: TcxGridLevel + GridView = Tv1 + end + end + end + inherited ADOQueryBaseCmd: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + Left = 553 + Top = 200 + end + inherited ADOQueryBaseTemp: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + Left = 425 + Top = 201 + end + object ADOQueryCmd: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + CommandTimeout = 600 + Parameters = <> + Left = 148 + Top = 280 + end + object ADOQueryMain: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + LockType = ltReadOnly + Parameters = <> + Left = 252 + Top = 260 + end + object ADOQueryTemp: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + LockType = ltReadOnly + CommandTimeout = 600 + Parameters = <> + Left = 112 + Top = 204 + end + object DS_1: TDataSource + DataSet = CDS_1 + Left = 740 + Top = 252 + end + object GPM_1: TcxGridPopupMenu + Grid = cxGrid1 + PopupMenus = <> + Left = 552 + Top = 272 + end + object CDS_1: TClientDataSet + Aggregates = <> + Params = <> + BeforeOpen = CDS_1BeforeOpen + Left = 632 + Top = 244 + end + object PM_1: TPopupMenu + Left = 368 + Top = 248 + object N1: TMenuItem + Caption = #20840#36873 + OnClick = N1Click + end + object PM11: TMenuItem + Caption = #20840#24323 + OnClick = PM11Click + end + object N2: TMenuItem + Caption = #22797#21046 + OnClick = N2Click + end + object N3: TMenuItem + Caption = #22797#21046#27880#33050 + OnClick = N3Click + end + end +end diff --git a/E04梭织坯布仓库/U_TatClothCRStkHZList.pas b/E04梭织坯布仓库/U_TatClothCRStkHZList.pas new file mode 100644 index 0000000..608cd56 --- /dev/null +++ b/E04梭织坯布仓库/U_TatClothCRStkHZList.pas @@ -0,0 +1,431 @@ +unit U_TatClothCRStkHZList; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage, + cxEdit, DB, cxDBData, cxGridCustomTableView, cxGridTableView, + cxGridBandedTableView, cxGridDBBandedTableView, cxGridLevel, cxClasses, + cxControls, cxGridCustomView, cxGridDBTableView, cxGrid, StdCtrls, ComCtrls, + ExtCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, ADODB, DBClient, + cxDropDownEdit, cxCheckBox, RM_Common, RM_Class, RM_e_Xls, RM_Dataset, + RM_System, RM_GridReport, Menus, cxCalendar, MovePanel, Math, Clipbrd, + cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, cxTextEdit, dxSkinsCore, + dxSkinsDefaultPainters, dxDateRanges, dxBarBuiltInMenu, U_BaseList, cxPC, + System.StrUtils, dxScrollbarAnnotations; + +type + TfrmTatClothCRStkHZList = class(TfrmBaseList) + ToolBar1: TToolBar; + TBRafresh: TToolButton; + TBExport: TToolButton; + TBClose: TToolButton; + Panel1: TPanel; + ADOQueryCmd: TADOQuery; + ADOQueryMain: TADOQuery; + ADOQueryTemp: TADOQuery; + DS_1: TDataSource; + GPM_1: TcxGridPopupMenu; + Label2: TLabel; + BegDate: TDateTimePicker; + EndDate: TDateTimePicker; + CDS_1: TClientDataSet; + begtime: TDateTimePicker; + endTime: TDateTimePicker; + ToolButton4: TToolButton; + Label5: TLabel; + C_Name: TEdit; + PM_1: TPopupMenu; + PM11: TMenuItem; + N1: TMenuItem; + C_Width: TEdit; + label11: TLabel; + Panel2: TPanel; + N2: TMenuItem; + N3: TMenuItem; + Label1: TLabel; + dayDate: TDateTimePicker; + Label3: TLabel; + cxGrid1: TcxGrid; + cxGrid1Level1: TcxGridLevel; + cxGrid1DBBandedTableView1: TcxGridDBBandedTableView; + Tv1: TcxGridDBBandedTableView; + Tv1Column1: TcxGridDBBandedColumn; + Tv1Column3: TcxGridDBBandedColumn; + Tv1Column4: TcxGridDBBandedColumn; + Tv1Column5: TcxGridDBBandedColumn; + Tv1Column7: TcxGridDBBandedColumn; + Tv1Column8: TcxGridDBBandedColumn; + Tv1Column9: TcxGridDBBandedColumn; + Tv1Column10: TcxGridDBBandedColumn; + Tv1Column11: TcxGridDBBandedColumn; + Tv1Column12: TcxGridDBBandedColumn; + Tv1Column13: TcxGridDBBandedColumn; + Tv1Column14: TcxGridDBBandedColumn; + Tv1Column15: TcxGridDBBandedColumn; + Tv1Column16: TcxGridDBBandedColumn; + Tv1Column17: TcxGridDBBandedColumn; + Tv1Column6: TcxGridDBBandedColumn; + Tv1Column2: TcxGridDBBandedColumn; + Tv1CIssp: TcxGridDBBandedColumn; + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure TBRafreshClick(Sender: TObject); + procedure ConNoMChange(Sender: TObject); + procedure TBCloseClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure TBExportClick(Sender: TObject); + procedure orderNoKeyPress(Sender: TObject; var Key: Char); + procedure BTNPClick(Sender: TObject); + procedure BTLPClick(Sender: TObject); + procedure TCBNORChange(Sender: TObject); + procedure JYTypeChange(Sender: TObject); + procedure ToolButton2Click(Sender: TObject); + procedure cxPageControl1Change(Sender: TObject); + procedure CDS_1BeforeOpen(DataSet: TDataSet); + procedure Tv1DataControllerFilterBeforeChange(Sender: TcxDBDataFilterCriteria; ADataSet: TDataSet; const AFilterText: string); + + procedure Tv1TcxGridDBDataControllerTcxDataSummaryFooterSummaryItems6GetText(Sender: TcxDataSummaryItem; const AValue: Variant; AIsFooter: Boolean; var AText: string); + procedure ToolButton4Click(Sender: TObject); + procedure PM11Click(Sender: TObject); + procedure N1Click(Sender: TObject); + procedure IsJYTimeClick(Sender: TObject); + procedure C_NameKeyPress(Sender: TObject; var Key: Char); + + procedure N2Click(Sender: TObject); + procedure Tv1DblClick(Sender: TObject); + procedure N3Click(Sender: TObject); + private + CurrentPage, RecordsNumber: Integer; + lstCust: TStringList; + procedure InitGrid(); + procedure SetStatus(); + procedure CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); + + { Private declarations } + public + canshu1: string; + { Public declarations } + end; + +implementation + +uses + U_DataLink, U_RTFun, U_LabelPrint, U_TatClothStkHZList2; + +{$R *.dfm} + +procedure TfrmTatClothCRStkHZList.SetStatus(); +begin + +end; + +procedure TfrmTatClothCRStkHZList.FormClose(Sender: TObject; var Action: TCloseAction); +begin + inherited; + FreeAndNil(lstCust); + Action := caFree; +end; + +procedure TfrmTatClothCRStkHZList.FormCreate(Sender: TObject); +begin + inherited; + lstCust := TStringList.Create; + EndDate.DateTime := SGetServerDateTime(ADOQueryTemp); + BegDate.DateTime := EndDate.DateTime - 20; + DayDate.Date := SGetServerDate(ADOQueryTemp); +end; + +procedure TfrmTatClothCRStkHZList.InitGrid(); +var + WSql: string; +begin + + WSql := SGetFilters(Panel1, 1, 2); + if Trim(WSql) <> '' then + WSql := ' and ' + WSql; +// if IsJYTime.Checked then +// begin +// WSql := WSql + ' and IOTime>=' + quotedstr(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)); +// WSql := WSql + ' and IOTime<' + quotedstr(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1)); +// end; + + try + ADOQueryMain.DisableControls; + + with ADOQueryMain do + begin + Filtered := False; + Close; + sql.Clear; + + sql.Add(' exec P_Tat_Cloth_PSC '); + SQL.Add(' @Begdate='+QuotedStr(Trim(FormatDateTime('yyyy-mm-dd', BegDate.Date)))); + SQL.Add(' ,@Enddate='+QuotedStr(Trim(FormatDateTime('yyyy-mm-dd', EndDate.Date)))); + SQL.Add(' ,@dayDate='+QuotedStr(Trim(FormatDateTime('yyyy-mm-dd', dayDate.Date)))); + SQL.Add(' ,@WSql='+QuotedStr(Trim(WSql))); + +// showmessage(sql.text); + Open; + end; + SCreateCDS(ADOQueryMain, CDS_1); + SInitCDSData(ADOQueryMain, CDS_1); + + finally + ADOQueryMain.EnableControls; + TV1.DataController.Filter.Clear; + end; + +end; + + + +procedure TfrmTatClothCRStkHZList.IsJYTimeClick(Sender: TObject); +begin + inherited; + InitGrid(); +end; + +procedure TfrmTatClothCRStkHZList.TBRafreshClick(Sender: TObject); +begin + CurrentPage := 1; + InitGrid(); +end; + +procedure TfrmTatClothCRStkHZList.CDS_1BeforeOpen(DataSet: TDataSet); +begin + + lstCust.Clear; +end; + +procedure TfrmTatClothCRStkHZList.ConNoMChange(Sender: TObject); +begin + if ADOQueryMain.Active then + begin + SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2)); + end; +end; + +procedure TfrmTatClothCRStkHZList.cxPageControl1Change(Sender: TObject); +begin + CurrentPage := 1; + SetStatus(); + InitGrid(); +end; + +procedure TfrmTatClothCRStkHZList.C_NameKeyPress(Sender: TObject; var Key: Char); +begin + inherited; + if Key = #13 then + begin + InitGrid(); + end; +end; + +procedure TfrmTatClothCRStkHZList.TBCloseClick(Sender: TObject); +begin + + Close; +end; + +procedure TfrmTatClothCRStkHZList.FormShow(Sender: TObject); +begin + inherited; + + ReadCxBandedGrid(trim(self.Caption) + 'Tv1', Tv1, 'Ʒб1'); + +// Tv1Column2.SortOrder := soNone; + + CurrentPage := 1; + RecordsNumber := 500; + canshu1 := Trim(Self.fParameters1); + + SetStatus(); + InitGrid(); +end; + +procedure TfrmTatClothCRStkHZList.TBExportClick(Sender: TObject); +begin + if ADOQueryMain.IsEmpty then + exit; + + with CDS_1 do + begin + Filtered := false; + Filter := ' ssel = 1'; + Filtered := true; + end; + TcxGridToExcel(Self.Caption, cxGrid1); + InitGrid(); + +end; + +procedure TfrmTatClothCRStkHZList.orderNoKeyPress(Sender: TObject; var Key: Char); +begin + if Key = #13 then + begin + CurrentPage := 1; + InitGrid(); + end; +end; + +procedure TfrmTatClothCRStkHZList.PM11Click(Sender: TObject); +begin + SelOKNo(CDS_1, false); +end; + +procedure TfrmTatClothCRStkHZList.Tv1DataControllerFilterBeforeChange(Sender: TcxDBDataFilterCriteria; ADataSet: TDataSet; const AFilterText: string); +begin + lstCust.Clear; +end; + +procedure TfrmTatClothCRStkHZList.Tv1DblClick(Sender: TObject); +begin + if CDS_1.IsEmpty then + Exit; + try + frmTatClothStkHZList2 := TfrmTatClothStkHZList2.Create(Application); + with frmTatClothStkHZList2 do + begin + + fC_Name := Self.CDS_1.FieldByName('C_Name').AsString; + fissp := Self.CDS_1.FieldByName('issp').AsString; + if ShowModal = 1 then + begin + + end; + end; + finally + frmTatClothStkHZList2.Free; + end; +end; + +procedure TfrmTatClothCRStkHZList.Tv1TcxGridDBDataControllerTcxDataSummaryFooterSummaryItems6GetText(Sender: TcxDataSummaryItem; const AValue: Variant; AIsFooter: Boolean; var AText: string); +begin + if lstCust <> nil then + AText := IntToStr(lstCust.Count); +end; + +procedure TfrmTatClothCRStkHZList.BTNPClick(Sender: TObject); +begin + if CurrentPage < CDS_1.FieldByName('TotalCount').AsInteger / RecordsNumber then + CurrentPage := CurrentPage + 1; + InitGrid(); +end; + +procedure TfrmTatClothCRStkHZList.BTLPClick(Sender: TObject); +begin + if CurrentPage > 1 then + CurrentPage := CurrentPage - 1; + InitGrid(); +end; + +procedure TfrmTatClothCRStkHZList.TCBNORChange(Sender: TObject); +begin + + CurrentPage := 1; + InitGrid(); +end; + +procedure TfrmTatClothCRStkHZList.JYTypeChange(Sender: TObject); +begin + CurrentPage := 1; + InitGrid(); +end; + +procedure TfrmTatClothCRStkHZList.N1Click(Sender: TObject); +begin + + SelOKNo(CDS_1, true); +end; + +procedure TfrmTatClothCRStkHZList.N2Click(Sender: TObject); +begin + Clipboard.SetTextBuf(PChar(Trim(CDS_1.fieldbyname(TV1.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString))); + +end; + +procedure TfrmTatClothCRStkHZList.N3Click(Sender: TObject); +begin + + CopyColumnSummaryToClipboard(TV1.Controller.FocusedColumn); +end; + +procedure TfrmTatClothCRStkHZList.CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); +var + AView: TcxGridBandedTableView; + SummaryIndex: Integer; + SummaryText: string; +begin + AView := Tv1; + + // ָеĻ + SummaryIndex := AView.DataController.Summary.FooterSummaryItems.IndexOfItemLink(AColumn); + if SummaryIndex <> -1 then + begin + SummaryText := AView.DataController.Summary.FooterSummaryTexts[SummaryIndex]; + Clipboard.AsText := SummaryText; + end + else + ShowMessage('δҵеĻ'); +end; + +procedure TfrmTatClothCRStkHZList.ToolButton2Click(Sender: TObject); +var + WSql: string; +begin + if CDS_1.IsEmpty then + Exit; + if not CDS_1.Locate('SSel', True, []) then + begin + Application.MessageBox('ûѡ!', 'ʾ', 0); + Exit; + end; + WSql := ''; + CDS_1.DisableControls; + with CDS_1 do + begin + First; + while not Eof do + begin + if CDS_1.fieldbyname('SSel').AsBoolean then + begin + if WSql <> '' then + begin + WSql := WSql + ',' + QuotedStr(Trim(CDS_1.fieldbyname('CIID').AsString)); + end + else + begin + WSql := QuotedStr(Trim(CDS_1.fieldbyname('CIID').AsString)); + end; + end; + Next; + end; + end; + CDS_1.Locate('SSel', True, []); + CDS_1.EnableControls; + try + frmLabelPrint := TfrmLabelPrint.Create(Application); + with frmLabelPrint do + begin + FLMType := 'TradeClothStk'; + FFiltration1 := WSql; + if ShowModal = 1 then + begin + + end; + end; + finally + frmLabelPrint.Free; + end; +end; + +procedure TfrmTatClothCRStkHZList.ToolButton4Click(Sender: TObject); +begin + WriteCxBandedGrid(trim(self.Caption) + 'Tv1', Tv1, 'Ʒб1'); + +end; + +end. + diff --git a/E04梭织坯布仓库/U_TatClothEDCDLook.dfm b/E04梭织坯布仓库/U_TatClothEDCDLook.dfm new file mode 100644 index 0000000..76c30a9 --- /dev/null +++ b/E04梭织坯布仓库/U_TatClothEDCDLook.dfm @@ -0,0 +1,635 @@ +inherited frmTatClothEDCDLook: TfrmTatClothEDCDLook + Left = 184 + Top = 138 + Caption = #20108#31561#30133#28857#27719#24635#21015#34920 + ClientHeight = 600 + ClientWidth = 1540 + Position = poDesigned + WindowState = wsMaximized + ExplicitWidth = 1556 + ExplicitHeight = 639 + PixelsPerInch = 96 + TextHeight = 13 + object ToolBar1: TToolBar [0] + Tag = 1 + Left = 0 + Top = 0 + Width = 1540 + Height = 38 + AutoSize = True + ButtonHeight = 38 + ButtonWidth = 91 + Caption = 'ToolBar1' + Color = clWhite + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [] + Images = DataLink_TatClothStk.ImageList_new32 + List = True + ParentColor = False + ParentFont = False + ShowCaptions = True + TabOrder = 0 + object TBRafresh: TToolButton + Left = 0 + Top = 0 + AutoSize = True + Caption = #21047#26032 + ImageIndex = 1 + OnClick = TBRafreshClick + end + object TBExport: TToolButton + Left = 71 + Top = 0 + AutoSize = True + Caption = #23548#20986 + ImageIndex = 20 + OnClick = TBExportClick + end + object ToolButton4: TToolButton + Left = 142 + Top = 0 + AutoSize = True + Caption = #20445#23384#26684#24335 + ImageIndex = 16 + OnClick = ToolButton4Click + end + object TBClose: TToolButton + Left = 237 + Top = 0 + AutoSize = True + Caption = #20851#38381 + ImageIndex = 7 + OnClick = TBCloseClick + end + end + object Panel1: TPanel [1] + Left = 0 + Top = 38 + Width = 1540 + Height = 67 + Align = alTop + BevelInner = bvRaised + BevelOuter = bvLowered + Color = clWhite + ParentBackground = False + TabOrder = 1 + object Label2: TLabel + Left = 70 + Top = 36 + Width = 12 + Height = 13 + Caption = #33267 + end + object Label5: TLabel + Left = 190 + Top = 10 + Width = 39 + Height = 12 + Hint = '0' + Caption = #20135#21697#21517 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object label11: TLabel + Left = 358 + Top = 10 + Width = 26 + Height = 12 + Hint = '0' + Caption = #20811#37325 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object label12: TLabel + Left = 190 + Top = 35 + Width = 26 + Height = 12 + Hint = '0' + Caption = #38376#24133 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object BegDate: TDateTimePicker + Left = 88 + Top = 6 + Width = 87 + Height = 20 + Date = 40768.000000000000000000 + Time = 0.458268587972270300 + TabOrder = 1 + end + object EndDate: TDateTimePicker + Left = 88 + Top = 32 + Width = 87 + Height = 20 + Date = 40768.000000000000000000 + Time = 0.458268587972270300 + TabOrder = 2 + end + object begtime: TDateTimePicker + Left = 137 + Top = 132 + Width = 55 + Height = 20 + Date = 39780.000000000000000000 + Format = 'HH:mm' + Time = 39780.000000000000000000 + Kind = dtkTime + TabOrder = 3 + end + object endTime: TDateTimePicker + Left = 137 + Top = 156 + Width = 55 + Height = 20 + Date = 39780.000000000000000000 + Format = 'HH:mm' + Time = 0.999317129630071600 + Kind = dtkTime + TabOrder = 4 + end + object IsJYTime: TCheckBox + Left = 14 + Top = 8 + Width = 73 + Height = 17 + Caption = #26597#35810#26085#26399 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + TabOrder = 0 + OnClick = IsJYTimeClick + end + object C_Name: TEdit + Tag = 2 + Left = 237 + Top = 6 + Width = 100 + Height = 21 + Hint = '0' + TabOrder = 5 + OnKeyPress = C_NameKeyPress + end + object C_GramWeight: TEdit + Tag = 2 + Left = 390 + Top = 6 + Width = 100 + Height = 21 + Hint = '0' + TabOrder = 6 + OnKeyPress = C_NameKeyPress + end + object C_width: TEdit + Tag = 2 + Left = 237 + Top = 32 + Width = 100 + Height = 21 + Hint = '0' + TabOrder = 7 + OnKeyPress = C_NameKeyPress + end + end + object Panel2: TPanel [2] + Left = 0 + Top = 105 + Width = 1540 + Height = 495 + Align = alClient + TabOrder = 2 + object cxGrid2: TcxGrid + Left = 1 + Top = 1 + Width = 1538 + Height = 493 + Align = alClient + BorderStyle = cxcbsNone + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [] + ParentFont = False + PopupMenu = PM_1 + TabOrder = 0 + object Tv2: TcxGridDBTableView + Navigator.Buttons.CustomButtons = <> + ScrollbarAnnotations.CustomAnnotations = <> + DataController.DataSource = DS_2 + DataController.Filter.AutoDataSetFilter = True + DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost] + DataController.Summary.DefaultGroupSummaryItems = <> + DataController.Summary.FooterSummaryItems = < + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skCount + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Format = #26816#39564#31995#25968'=#.##' + Kind = skAverage + end + item + Format = #25442#31639#31995#25968'=#.##' + Kind = skAverage + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + Column = cxGridDBColumn6 + end + item + Kind = skSum + Column = cxGridDBColumn7 + end + item + Kind = skSum + Column = cxGridDBColumn9 + end + item + Kind = skSum + Column = cxGridDBColumn10 + end + item + Kind = skSum + Column = cxGridDBColumn12 + end + item + Kind = skSum + Column = cxGridDBColumn13 + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + Column = cxGridDBColumn15 + end + item + Kind = skSum + Column = cxGridDBColumn16 + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + Column = cxGridDBColumn18 + end + item + Kind = skSum + Column = cxGridDBColumn19 + end + item + Kind = skSum + Column = cxGridDBColumn21 + end + item + Kind = skSum + Column = cxGridDBColumn14 + end + item + Kind = skSum + Column = cxGridDBColumn11 + end + item + Kind = skSum + Column = cxGridDBColumn8 + end + item + Kind = skSum + Column = cxGridDBColumn17 + end + item + Kind = skSum + Column = cxGridDBColumn20 + end> + DataController.Summary.SummaryGroups = <> + OptionsCustomize.ColumnFiltering = False + OptionsView.Footer = True + OptionsView.GroupByBox = False + OptionsView.IndicatorWidth = 30 + Styles.IncSearch = DataLink_TatClothStk.SHuangSe + Styles.Footer = DataLink_TatClothStk.Default + Styles.Header = DataLink_TatClothStk.Default + Styles.Inactive = DataLink_TatClothStk.SHuangSe + Styles.Selection = DataLink_TatClothStk.SHuangSe + object cxGridDBColumn1: TcxGridDBColumn + Caption = #36873#25321 + DataBinding.FieldName = 'SSel' + DataBinding.IsNullValueType = True + PropertiesClassName = 'TcxCheckBoxProperties' + Properties.ImmediatePost = True + Properties.NullStyle = nssUnchecked + HeaderAlignmentHorz = taCenter + Options.Sorting = False + Width = 66 + end + object cxGridDBColumn2: TcxGridDBColumn + Caption = #21697#21517 + DataBinding.FieldName = 'C_Name' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 66 + end + object cxGridDBColumn3: TcxGridDBColumn + Caption = #21452#21943 + DataBinding.FieldName = 'issp' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn4: TcxGridDBColumn + Caption = #38376#24133 + DataBinding.FieldName = 'C_width' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 72 + end + object cxGridDBColumn5: TcxGridDBColumn + Caption = #20811#37325 + DataBinding.FieldName = 'C_GramWeight' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 66 + end + object cxGridDBColumn6: TcxGridDBColumn + Caption = #20248#31561#21367#25968 + DataBinding.FieldName = 'YDJs' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 74 + end + object cxGridDBColumn7: TcxGridDBColumn + Caption = #20248#31561#31859#25968 + DataBinding.FieldName = 'Ydqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn8: TcxGridDBColumn + Caption = #20248#31561#24179#26041 + DataBinding.FieldName = 'YdPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn9: TcxGridDBColumn + Caption = #20108#31561#21367#25968 + DataBinding.FieldName = 'edJS' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn10: TcxGridDBColumn + Caption = #20108#31561#31859#25968 + DataBinding.FieldName = 'edqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn11: TcxGridDBColumn + Caption = #20108#31561#24179#26041 + DataBinding.FieldName = 'edPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn12: TcxGridDBColumn + Caption = #23567#21367#21367#25968 + DataBinding.FieldName = 'xjJS' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn13: TcxGridDBColumn + Caption = #23567#21367#25968#37327 + DataBinding.FieldName = 'xjqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn14: TcxGridDBColumn + Caption = #23567#21367#24179#26041 + DataBinding.FieldName = 'xjPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn15: TcxGridDBColumn + Caption = #20998#20999#21367#25968 + DataBinding.FieldName = 'fqJS' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn16: TcxGridDBColumn + Caption = #20998#20999#24067#25968#37327 + DataBinding.FieldName = 'fqqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn17: TcxGridDBColumn + Caption = #20998#20999#24179#26041 + DataBinding.FieldName = 'fqPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn18: TcxGridDBColumn + Caption = #27979#35797#21367#25968 + DataBinding.FieldName = 'csJS' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn19: TcxGridDBColumn + Caption = #27979#35797#25968#37327 + DataBinding.FieldName = 'csqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn20: TcxGridDBColumn + Caption = #27979#35797#24179#26041 + DataBinding.FieldName = 'csPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn21: TcxGridDBColumn + Caption = #24179#26041 + DataBinding.FieldName = 'pf' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 71 + end + end + object cxGridLevel1: TcxGridLevel + GridView = Tv2 + end + end + end + inherited ADOQueryBaseCmd: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + Left = 553 + Top = 200 + end + inherited ADOQueryBaseTemp: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + Left = 425 + Top = 201 + end + object ADOQueryCmd: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + CommandTimeout = 600 + Parameters = <> + Left = 148 + Top = 280 + end + object ADOQueryMain: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + LockType = ltReadOnly + Parameters = <> + Left = 252 + Top = 260 + end + object ADOQueryTemp: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + LockType = ltReadOnly + CommandTimeout = 600 + Parameters = <> + Left = 112 + Top = 204 + end + object DS_1: TDataSource + DataSet = CDS_1 + Left = 708 + Top = 156 + end + object GPM_1: TcxGridPopupMenu + Grid = cxGrid2 + PopupMenus = <> + Left = 608 + Top = 136 + end + object CDS_1: TClientDataSet + Aggregates = <> + Params = <> + BeforeOpen = CDS_1BeforeOpen + Left = 552 + Top = 140 + end + object PM_1: TPopupMenu + Left = 368 + Top = 248 + object N1: TMenuItem + Caption = #20840#36873 + OnClick = N1Click + end + object PM11: TMenuItem + Caption = #20840#24323 + OnClick = PM11Click + end + object N2: TMenuItem + Caption = #22797#21046 + OnClick = N2Click + end + object N3: TMenuItem + Caption = #22797#21046#27880#33050 + OnClick = N3Click + end + end + object CDS_2: TClientDataSet + Aggregates = <> + Params = <> + BeforeOpen = CDS_1BeforeOpen + Left = 552 + Top = 276 + end + object DS_2: TDataSource + DataSet = CDS_2 + Left = 708 + Top = 292 + end +end diff --git a/E04梭织坯布仓库/U_TatClothEDCDLook.pas b/E04梭织坯布仓库/U_TatClothEDCDLook.pas new file mode 100644 index 0000000..8111ed0 --- /dev/null +++ b/E04梭织坯布仓库/U_TatClothEDCDLook.pas @@ -0,0 +1,420 @@ +unit U_TatClothEDCDLook; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage, + cxEdit, DB, cxDBData, cxGridCustomTableView, cxGridTableView, + cxGridBandedTableView, cxGridDBBandedTableView, cxGridLevel, cxClasses, + cxControls, cxGridCustomView, cxGridDBTableView, cxGrid, StdCtrls, ComCtrls, + ExtCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, ADODB, DBClient, + cxDropDownEdit, cxCheckBox, RM_Common, RM_Class, RM_e_Xls, RM_Dataset, + RM_System, RM_GridReport, Menus, cxCalendar, MovePanel, Math, Clipbrd, + cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, cxTextEdit, dxSkinsCore, + dxSkinsDefaultPainters, dxDateRanges, dxBarBuiltInMenu, U_BaseInput, cxPC, + System.StrUtils, dxScrollbarAnnotations, U_BaseList, System.ImageList, + Vcl.ImgList; + +type + TfrmTatClothEDCDLook = class(TfrmBaseInput) + ToolBar1: TToolBar; + TBRafresh: TToolButton; + TBExport: TToolButton; + TBClose: TToolButton; + Panel1: TPanel; + ADOQueryCmd: TADOQuery; + ADOQueryMain: TADOQuery; + ADOQueryTemp: TADOQuery; + DS_1: TDataSource; + GPM_1: TcxGridPopupMenu; + Label2: TLabel; + BegDate: TDateTimePicker; + EndDate: TDateTimePicker; + CDS_1: TClientDataSet; + begtime: TDateTimePicker; + endTime: TDateTimePicker; + IsJYTime: TCheckBox; + ToolButton4: TToolButton; + Label5: TLabel; + C_Name: TEdit; + PM_1: TPopupMenu; + PM11: TMenuItem; + N1: TMenuItem; + C_GramWeight: TEdit; + label12: TLabel; + C_width: TEdit; + label11: TLabel; + Panel2: TPanel; + cxGrid2: TcxGrid; + Tv2: TcxGridDBTableView; + cxGridDBColumn1: TcxGridDBColumn; + cxGridDBColumn2: TcxGridDBColumn; + cxGridDBColumn3: TcxGridDBColumn; + cxGridDBColumn4: TcxGridDBColumn; + cxGridDBColumn5: TcxGridDBColumn; + cxGridDBColumn6: TcxGridDBColumn; + cxGridDBColumn7: TcxGridDBColumn; + cxGridDBColumn8: TcxGridDBColumn; + cxGridDBColumn9: TcxGridDBColumn; + cxGridDBColumn10: TcxGridDBColumn; + cxGridDBColumn11: TcxGridDBColumn; + cxGridDBColumn12: TcxGridDBColumn; + cxGridDBColumn13: TcxGridDBColumn; + cxGridDBColumn14: TcxGridDBColumn; + cxGridDBColumn15: TcxGridDBColumn; + cxGridDBColumn16: TcxGridDBColumn; + cxGridDBColumn17: TcxGridDBColumn; + cxGridDBColumn18: TcxGridDBColumn; + cxGridDBColumn19: TcxGridDBColumn; + cxGridDBColumn20: TcxGridDBColumn; + cxGridDBColumn21: TcxGridDBColumn; + cxGridLevel1: TcxGridLevel; + CDS_2: TClientDataSet; + DS_2: TDataSource; + N2: TMenuItem; + N3: TMenuItem; + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure TBRafreshClick(Sender: TObject); + procedure ConNoMChange(Sender: TObject); + procedure TBCloseClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure TBExportClick(Sender: TObject); + procedure orderNoKeyPress(Sender: TObject; var Key: Char); + procedure BTNPClick(Sender: TObject); + procedure BTLPClick(Sender: TObject); + procedure TCBNORChange(Sender: TObject); + procedure JYTypeChange(Sender: TObject); + procedure ToolButton2Click(Sender: TObject); + procedure cxPageControl1Change(Sender: TObject); + procedure CDS_1BeforeOpen(DataSet: TDataSet); + procedure Tv1DataControllerFilterBeforeChange(Sender: TcxDBDataFilterCriteria; ADataSet: TDataSet; const AFilterText: string); + + procedure Tv1TcxGridDBDataControllerTcxDataSummaryFooterSummaryItems6GetText(Sender: TcxDataSummaryItem; const AValue: Variant; AIsFooter: Boolean; var AText: string); + procedure ToolButton4Click(Sender: TObject); + procedure PM11Click(Sender: TObject); + procedure N1Click(Sender: TObject); + procedure IsJYTimeClick(Sender: TObject); + procedure C_NameKeyPress(Sender: TObject; var Key: Char); + procedure N2Click(Sender: TObject); + procedure N3Click(Sender: TObject); + private + CurrentPage, RecordsNumber: Integer; + lstCust: TStringList; + procedure InitGrid(); + procedure SetStatus(); + procedure CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); + + { Private declarations } + public + fC_Name: string; + fissp : string; + { Public declarations } + end; + +var + frmTatClothEDCDLook: TfrmTatClothEDCDLook; + +implementation + +uses + U_DataLink, U_RTFun, U_LabelPrint; + +{$R *.dfm} + +procedure TfrmTatClothEDCDLook.SetStatus(); +begin + +end; + +procedure TfrmTatClothEDCDLook.FormClose(Sender: TObject; var Action: TCloseAction); +begin + inherited; + FreeAndNil(lstCust); + Action := caFree; +end; + +procedure TfrmTatClothEDCDLook.FormCreate(Sender: TObject); +begin + inherited; + lstCust := TStringList.Create; + EndDate.DateTime := SGetServerDateTime(ADOQueryTemp); + BegDate.DateTime := EndDate.DateTime - 20; +end; + +procedure TfrmTatClothEDCDLook.InitGrid(); +var + WSql: string; +begin + + WSql := SGetFilters(Panel1, 1, 2); + if Trim(WSql) <> '' then + WSql := ' and ' + WSql; + if IsJYTime.Checked then + begin + WSql := WSql + ' and IOTime>=' + quotedstr(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)); + WSql := WSql + ' and IOTime<' + quotedstr(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1)); + end; + + try + ADOQueryMain.DisableControls; + + with ADOQueryMain do + begin + Filtered := False; + Close; + sql.Clear; + + sql.Add('select A.C_NAME, A.C_width,A.C_GramWeight '); + + + SQL.Add('from V_TatClothEDCD A where 1=1 and C_NAME = ' + QuotedStr(Trim(fC_Name))); + if fissp <> '' then + begin + SQL.Add(' and issp = ''˫''' ); + end + else + begin + SQL.Add(' and issp <> ''˫'' ' ); + end; + + + + SQL.Add(WSql); + sql.Add(' group by A.C_NAME, A.C_width,A.C_GramWeight,isnull(A.issp,'''') '); + SQL.Add(' order by A.C_NAME, A.C_width,A.C_GramWeight'); + +// showmessage(sql.text); + Open; + end; + SCreateCDS(ADOQueryMain, CDS_2); + SInitCDSData(ADOQueryMain, CDS_2); + + finally + ADOQueryMain.EnableControls; + TV2.DataController.Filter.Clear; + end; + +end; + +procedure TfrmTatClothEDCDLook.IsJYTimeClick(Sender: TObject); +begin + inherited; + InitGrid(); +end; + +procedure TfrmTatClothEDCDLook.TBRafreshClick(Sender: TObject); +begin + CurrentPage := 1; + InitGrid(); +end; + +procedure TfrmTatClothEDCDLook.CDS_1BeforeOpen(DataSet: TDataSet); +begin + + lstCust.Clear; +end; + +procedure TfrmTatClothEDCDLook.ConNoMChange(Sender: TObject); +begin + if ADOQueryMain.Active then + begin + SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2)); + end; +end; + +procedure TfrmTatClothEDCDLook.cxPageControl1Change(Sender: TObject); +begin + CurrentPage := 1; + SetStatus(); + InitGrid(); +end; + +procedure TfrmTatClothEDCDLook.C_NameKeyPress(Sender: TObject; var Key: Char); +begin + inherited; + if Key = #13 then + begin + InitGrid(); + end; +end; + +procedure TfrmTatClothEDCDLook.TBCloseClick(Sender: TObject); +begin + + Close; +end; + +procedure TfrmTatClothEDCDLook.FormShow(Sender: TObject); +begin + inherited; + ReadCxGrid(trim(self.Caption) + 'Tv2', Tv2, 'Ʒ'); + CurrentPage := 1; + RecordsNumber := 500; + + SetStatus(); + InitGrid(); +end; + +procedure TfrmTatClothEDCDLook.TBExportClick(Sender: TObject); +begin + if ADOQueryMain.IsEmpty then + exit; + with CDS_2 do + begin + Filtered := false; + Filter := ' ssel = 1'; + Filtered := true; + end; + TcxGridToExcel(Self.Caption, cxGrid2); + InitGrid(); +end; + +procedure TfrmTatClothEDCDLook.orderNoKeyPress(Sender: TObject; var Key: Char); +begin + if Key = #13 then + begin + CurrentPage := 1; + InitGrid(); + end; +end; + +procedure TfrmTatClothEDCDLook.PM11Click(Sender: TObject); +begin + SelOKNo(CDS_2, false); +end; + +procedure TfrmTatClothEDCDLook.Tv1DataControllerFilterBeforeChange(Sender: TcxDBDataFilterCriteria; ADataSet: TDataSet; const AFilterText: string); +begin + lstCust.Clear; +end; + +procedure TfrmTatClothEDCDLook.Tv1TcxGridDBDataControllerTcxDataSummaryFooterSummaryItems6GetText(Sender: TcxDataSummaryItem; const AValue: Variant; AIsFooter: Boolean; var AText: string); +begin + if lstCust <> nil then + AText := IntToStr(lstCust.Count); +end; + +procedure TfrmTatClothEDCDLook.BTNPClick(Sender: TObject); +begin + if CurrentPage < CDS_1.FieldByName('TotalCount').AsInteger / RecordsNumber then + CurrentPage := CurrentPage + 1; + InitGrid(); +end; + +procedure TfrmTatClothEDCDLook.BTLPClick(Sender: TObject); +begin + if CurrentPage > 1 then + CurrentPage := CurrentPage - 1; + InitGrid(); +end; + +procedure TfrmTatClothEDCDLook.TCBNORChange(Sender: TObject); +begin + + CurrentPage := 1; + InitGrid(); +end; + +procedure TfrmTatClothEDCDLook.JYTypeChange(Sender: TObject); +begin + CurrentPage := 1; + InitGrid(); +end; + +procedure TfrmTatClothEDCDLook.N1Click(Sender: TObject); +begin + + SelOKNo(CDS_2, true); +end; + +procedure TfrmTatClothEDCDLook.N2Click(Sender: TObject); +begin + Clipboard.SetTextBuf(PChar(Trim(CDS_2.fieldbyname(TV2.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString))); + +end; + +procedure TfrmTatClothEDCDLook.N3Click(Sender: TObject); +begin + + CopyColumnSummaryToClipboard(TV2.Controller.FocusedColumn); +end; + +procedure TfrmTatClothEDCDLook.CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); +var + AView: TcxGridDBTableView; + SummaryIndex: Integer; + SummaryText: string; +begin + AView := Tv2; + + // ָеĻ + SummaryIndex := AView.DataController.Summary.FooterSummaryItems.IndexOfItemLink(AColumn); + if SummaryIndex <> -1 then + begin + SummaryText := AView.DataController.Summary.FooterSummaryTexts[SummaryIndex]; + Clipboard.AsText := SummaryText; + end + else + ShowMessage('δҵеĻ'); +end; + +procedure TfrmTatClothEDCDLook.ToolButton2Click(Sender: TObject); +var + WSql: string; +begin + if CDS_1.IsEmpty then + Exit; + if not CDS_1.Locate('SSel', True, []) then + begin + Application.MessageBox('ûѡ!', 'ʾ', 0); + Exit; + end; + WSql := ''; + CDS_1.DisableControls; + with CDS_1 do + begin + First; + while not Eof do + begin + if CDS_1.fieldbyname('SSel').AsBoolean then + begin + if WSql <> '' then + begin + WSql := WSql + ',' + QuotedStr(Trim(CDS_1.fieldbyname('CIID').AsString)); + end + else + begin + WSql := QuotedStr(Trim(CDS_1.fieldbyname('CIID').AsString)); + end; + end; + Next; + end; + end; + CDS_1.Locate('SSel', True, []); + CDS_1.EnableControls; + try + frmLabelPrint := TfrmLabelPrint.Create(Application); + with frmLabelPrint do + begin + FLMType := 'TradeClothStk'; + FFiltration1 := WSql; + if ShowModal = 1 then + begin + + end; + end; + finally + frmLabelPrint.Free; + end; +end; + +procedure TfrmTatClothEDCDLook.ToolButton4Click(Sender: TObject); +begin + + WriteCxGrid(trim(self.Caption) + 'Tv2', Tv2, 'Ʒ'); +end; + +end. + diff --git a/E04梭织坯布仓库/U_TatClothInList.dfm b/E04梭织坯布仓库/U_TatClothInList.dfm index ae65ae1..b45c100 100644 --- a/E04梭织坯布仓库/U_TatClothInList.dfm +++ b/E04梭织坯布仓库/U_TatClothInList.dfm @@ -222,7 +222,7 @@ inherited frmTatClothInList: TfrmTatClothInList ParentFont = False end object Label1: TLabel - Left = 847 + Left = 843 Top = 10 Width = 39 Height = 12 @@ -236,7 +236,7 @@ inherited frmTatClothInList: TfrmTatClothInList ParentFont = False end object Label4: TLabel - Left = 847 + Left = 843 Top = 36 Width = 26 Height = 12 @@ -250,7 +250,7 @@ inherited frmTatClothInList: TfrmTatClothInList ParentFont = False end object Label8: TLabel - Left = 1012 + Left = 1008 Top = 9 Width = 52 Height = 12 @@ -263,6 +263,20 @@ inherited frmTatClothInList: TfrmTatClothInList Font.Style = [fsBold] ParentFont = False end + object Label6: TLabel + Left = 1008 + Top = 36 + Width = 26 + Height = 12 + Hint = '0' + Caption = #31561#32423 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end object BegDate: TDateTimePicker Left = 88 Top = 6 @@ -341,7 +355,7 @@ inherited frmTatClothInList: TfrmTatClothInList end object STKID: TEdit Tag = 2 - Left = 716 + Left = 712 Top = 32 Width = 100 Height = 20 @@ -371,7 +385,7 @@ inherited frmTatClothInList: TfrmTatClothInList end object jyg: TEdit Tag = 2 - Left = 716 + Left = 712 Top = 6 Width = 100 Height = 20 @@ -401,7 +415,7 @@ inherited frmTatClothInList: TfrmTatClothInList end object carno: TEdit Tag = 1 - Left = 892 + Left = 882 Top = 6 Width = 100 Height = 20 @@ -411,7 +425,7 @@ inherited frmTatClothInList: TfrmTatClothInList end object dept: TEdit Tag = 2 - Left = 892 + Left = 882 Top = 32 Width = 100 Height = 20 @@ -421,7 +435,7 @@ inherited frmTatClothInList: TfrmTatClothInList end object IOType: TComboBox Tag = 1 - Left = 1070 + Left = 1061 Top = 6 Width = 100 Height = 20 @@ -433,6 +447,16 @@ inherited frmTatClothInList: TfrmTatClothInList #38144#21806#20986#24211 #26399#21021#20837#24211) end + object Grade: TEdit + Tag = 2 + Left = 1061 + Top = 32 + Width = 100 + Height = 20 + Hint = '0' + TabOrder = 16 + OnKeyPress = carnoKeyPress + end end object Panel6: TPanel [2] Left = 0 @@ -828,6 +852,13 @@ inherited frmTatClothInList: TfrmTatClothInList Options.Editing = False Width = 66 end + object Tv1FlawList: TcxGridDBColumn + Caption = #30133#28857#24773#20917 + DataBinding.FieldName = 'FlawList' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end object v1Column46: TcxGridDBColumn Caption = #26816#39564#26426#21488 DataBinding.FieldName = 'CIMachNo' @@ -986,5 +1017,9 @@ inherited frmTatClothInList: TfrmTatClothInList Caption = #22797#21046 OnClick = N2Click end + object N3: TMenuItem + Caption = #22797#21046#27880#33050 + OnClick = N3Click + end end end diff --git a/E04梭织坯布仓库/U_TatClothInList.pas b/E04梭织坯布仓库/U_TatClothInList.pas index 67f1d41..241bd4e 100644 --- a/E04梭织坯布仓库/U_TatClothInList.pas +++ b/E04梭织坯布仓库/U_TatClothInList.pas @@ -110,6 +110,10 @@ type IOType: TComboBox; Label8: TLabel; Tv1issp: TcxGridDBColumn; + Tv1FlawList: TcxGridDBColumn; + Label6: TLabel; + Grade: TEdit; + N3: TMenuItem; procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormCreate(Sender: TObject); procedure TBRafreshClick(Sender: TObject); @@ -136,11 +140,13 @@ type procedure N2Click(Sender: TObject); procedure carnoKeyPress(Sender: TObject; var Key: Char); procedure IOTypeChange(Sender: TObject); + procedure N3Click(Sender: TObject); private CurrentPage, RecordsNumber: Integer; lstCust: TStringList; procedure InitGrid(); procedure SetStatus(); + procedure CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); { Private declarations } public canshu1, canshu2, FWorkshop: string; @@ -276,7 +282,14 @@ procedure TfrmTatClothInList.TBExportClick(Sender: TObject); begin if ADOQueryMain.IsEmpty then exit; + with CDS_1 do + begin + Filtered := false; + Filter := ' ssel = 1'; + Filtered := true; + end; TcxGridToExcel(Self.Caption, cxGrid1); + InitGrid(); end; procedure TfrmTatClothInList.orderNoKeyPress(Sender: TObject; var Key: Char); @@ -449,6 +462,30 @@ begin Clipboard.SetTextBuf(PChar(Trim(CDS_1.fieldbyname(TV1.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString))); end; +procedure TfrmTatClothInList.N3Click(Sender: TObject); +begin + CopyColumnSummaryToClipboard(TV1.Controller.FocusedColumn); +end; + +procedure TfrmTatClothInList.CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); +var + AView: TcxGridDBTableView; + SummaryIndex: Integer; + SummaryText: string; +begin + AView := Tv1; + + // ָеĻ + SummaryIndex := AView.DataController.Summary.FooterSummaryItems.IndexOfItemLink(AColumn); + if SummaryIndex <> -1 then + begin + SummaryText := AView.DataController.Summary.FooterSummaryTexts[SummaryIndex]; + Clipboard.AsText := SummaryText; + end + else + ShowMessage('δҵеĻ'); +end; + procedure TfrmTatClothInList.ToolButton1Click(Sender: TObject); begin if CDS_1.IsEmpty then diff --git a/E04梭织坯布仓库/U_TatClothOutList.dfm b/E04梭织坯布仓库/U_TatClothOutList.dfm index 01b867a..2e60c2d 100644 --- a/E04梭织坯布仓库/U_TatClothOutList.dfm +++ b/E04梭织坯布仓库/U_TatClothOutList.dfm @@ -138,7 +138,7 @@ inherited frmTatClothOutList: TfrmTatClothOutList ParentFont = False end object Label7: TLabel - Left = 525 + Left = 522 Top = 10 Width = 26 Height = 12 @@ -152,7 +152,7 @@ inherited frmTatClothOutList: TfrmTatClothOutList ParentFont = False end object Label10: TLabel - Left = 671 + Left = 668 Top = 36 Width = 39 Height = 12 @@ -180,7 +180,7 @@ inherited frmTatClothOutList: TfrmTatClothOutList ParentFont = False end object Label20: TLabel - Left = 525 + Left = 522 Top = 36 Width = 26 Height = 12 @@ -208,7 +208,7 @@ inherited frmTatClothOutList: TfrmTatClothOutList ParentFont = False end object Label1: TLabel - Left = 671 + Left = 668 Top = 10 Width = 39 Height = 12 @@ -222,7 +222,7 @@ inherited frmTatClothOutList: TfrmTatClothOutList ParentFont = False end object Label4: TLabel - Left = 831 + Left = 828 Top = 10 Width = 39 Height = 12 @@ -236,7 +236,7 @@ inherited frmTatClothOutList: TfrmTatClothOutList ParentFont = False end object Label6: TLabel - Left = 831 + Left = 828 Top = 36 Width = 26 Height = 12 @@ -249,6 +249,48 @@ inherited frmTatClothOutList: TfrmTatClothOutList Font.Style = [fsBold] ParentFont = False end + object Label8: TLabel + Left = 988 + Top = 10 + Width = 26 + Height = 12 + Hint = '0' + Caption = #38376#24133 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object Label9: TLabel + Left = 988 + Top = 36 + Width = 26 + Height = 12 + Hint = '0' + Caption = #20811#37325 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object Label11: TLabel + Left = 1133 + Top = 10 + Width = 52 + Height = 12 + Hint = '0' + Caption = #20986#24211#21333#21495 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end object BegDate: TDateTimePicker Left = 88 Top = 6 @@ -317,7 +359,7 @@ inherited frmTatClothOutList: TfrmTatClothOutList end object conNO: TEdit Tag = 2 - Left = 409 + Left = 406 Top = 6 Width = 100 Height = 20 @@ -327,7 +369,7 @@ inherited frmTatClothOutList: TfrmTatClothOutList end object STKID: TEdit Tag = 2 - Left = 711 + Left = 708 Top = 32 Width = 100 Height = 20 @@ -337,7 +379,7 @@ inherited frmTatClothOutList: TfrmTatClothOutList end object C_Name: TEdit Tag = 2 - Left = 409 + Left = 406 Top = 32 Width = 100 Height = 20 @@ -347,7 +389,7 @@ inherited frmTatClothOutList: TfrmTatClothOutList end object C_Color: TEdit Tag = 2 - Left = 553 + Left = 550 Top = 6 Width = 100 Height = 20 @@ -357,7 +399,7 @@ inherited frmTatClothOutList: TfrmTatClothOutList end object C_Pattern: TEdit Tag = 2 - Left = 553 + Left = 550 Top = 32 Width = 100 Height = 20 @@ -377,7 +419,7 @@ inherited frmTatClothOutList: TfrmTatClothOutList end object jyg: TEdit Tag = 2 - Left = 711 + Left = 708 Top = 6 Width = 100 Height = 20 @@ -387,7 +429,7 @@ inherited frmTatClothOutList: TfrmTatClothOutList end object carno: TEdit Tag = 1 - Left = 871 + Left = 868 Top = 6 Width = 100 Height = 20 @@ -397,7 +439,7 @@ inherited frmTatClothOutList: TfrmTatClothOutList end object dept: TEdit Tag = 2 - Left = 871 + Left = 868 Top = 32 Width = 100 Height = 20 @@ -405,6 +447,36 @@ inherited frmTatClothOutList: TfrmTatClothOutList TabOrder = 14 OnKeyPress = orderNoKeyPress end + object C_Width: TEdit + Tag = 2 + Left = 1018 + Top = 6 + Width = 100 + Height = 20 + Hint = '0' + TabOrder = 15 + OnKeyPress = orderNoKeyPress + end + object C_GramWeight: TEdit + Tag = 2 + Left = 1018 + Top = 32 + Width = 100 + Height = 20 + Hint = '0' + TabOrder = 16 + OnKeyPress = orderNoKeyPress + end + object IONO: TEdit + Tag = 2 + Left = 1189 + Top = 6 + Width = 100 + Height = 20 + Hint = '0' + TabOrder = 17 + OnKeyPress = orderNoKeyPress + end end object Panel6: TPanel [2] Tag = 2 @@ -937,5 +1009,9 @@ inherited frmTatClothOutList: TfrmTatClothOutList Caption = #22797#21046 OnClick = N3Click end + object N4: TMenuItem + Caption = #22797#21046#27880#33050 + OnClick = N4Click + end end end diff --git a/E04梭织坯布仓库/U_TatClothOutList.pas b/E04梭织坯布仓库/U_TatClothOutList.pas index b94a816..f128f55 100644 --- a/E04梭织坯布仓库/U_TatClothOutList.pas +++ b/E04梭织坯布仓库/U_TatClothOutList.pas @@ -105,6 +105,13 @@ type Label6: TLabel; dept: TEdit; Tv1issp: TcxGridDBColumn; + Label8: TLabel; + Label9: TLabel; + C_Width: TEdit; + C_GramWeight: TEdit; + Label11: TLabel; + IONO: TEdit; + N4: TMenuItem; procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormCreate(Sender: TObject); procedure TBRafreshClick(Sender: TObject); @@ -130,11 +137,13 @@ type procedure N1Click(Sender: TObject); procedure ToolButton1Click(Sender: TObject); procedure N3Click(Sender: TObject); + procedure N4Click(Sender: TObject); private CurrentPage, RecordsNumber: Integer; lstCust: TStringList; procedure InitGrid(); procedure SetStatus(); + procedure CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); { Private declarations } public canshu1, canshu2, FWorkshop: string; @@ -267,7 +276,14 @@ procedure TfrmTatClothOutList.TBExportClick(Sender: TObject); begin if ADOQueryMain.IsEmpty then exit; + with CDS_1 do + begin + Filtered := false; + Filter := ' ssel = 1'; + Filtered := true; + end; TcxGridToExcel(Self.Caption, cxGrid1); + InitGrid(); end; procedure TfrmTatClothOutList.orderNoKeyPress(Sender: TObject; var Key: Char); @@ -459,6 +475,30 @@ begin Clipboard.SetTextBuf(PChar(Trim(CDS_1.fieldbyname(TV1.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString))); end; +procedure TfrmTatClothOutList.N4Click(Sender: TObject); +begin + CopyColumnSummaryToClipboard(TV1.Controller.FocusedColumn); +end; + +procedure TfrmTatClothOutList.CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); +var + AView: TcxGridDBTableView; + SummaryIndex: Integer; + SummaryText: string; +begin + AView := Tv1; + + // ָеĻ + SummaryIndex := AView.DataController.Summary.FooterSummaryItems.IndexOfItemLink(AColumn); + if SummaryIndex <> -1 then + begin + SummaryText := AView.DataController.Summary.FooterSummaryTexts[SummaryIndex]; + Clipboard.AsText := SummaryText; + end + else + ShowMessage('δҵеĻ'); +end; + procedure TfrmTatClothOutList.ToolButton1Click(Sender: TObject); begin if CDS_1.IsEmpty then diff --git a/E04梭织坯布仓库/U_TatClothRKHZList.dfm b/E04梭织坯布仓库/U_TatClothRKHZList.dfm index 896b5aa..8a5524a 100644 --- a/E04梭织坯布仓库/U_TatClothRKHZList.dfm +++ b/E04梭织坯布仓库/U_TatClothRKHZList.dfm @@ -281,7 +281,9 @@ inherited frmTatClothRKHZList: TfrmTatClothRKHZList ParentFont = False PopupMenu = PM_1 TabOrder = 2 + ExplicitTop = 111 object Tv1: TcxGridDBTableView + OnDblClick = Tv1DblClick Navigator.Buttons.CustomButtons = <> ScrollbarAnnotations.CustomAnnotations = <> DataController.DataSource = DS_1 @@ -379,6 +381,26 @@ inherited frmTatClothRKHZList: TfrmTatClothRKHZList item Kind = skSum Column = Tv1Column19 + end + item + Kind = skSum + Column = Tv1xjPF + end + item + Kind = skSum + Column = Tv1fqPF + end + item + Kind = skSum + Column = Tv1csPF + end + item + Kind = skSum + Column = Tv1edPF + end + item + Kind = skSum + Column = Tv1YdPF end> DataController.Summary.SummaryGroups = <> OptionsCustomize.ColumnFiltering = False @@ -414,6 +436,7 @@ inherited frmTatClothRKHZList: TfrmTatClothRKHZList DataBinding.FieldName = 'issp' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end object Tv1IOType: TcxGridDBColumn @@ -421,34 +444,23 @@ inherited frmTatClothRKHZList: TfrmTatClothRKHZList DataBinding.FieldName = 'IOType' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end - object Tv1Column2: TcxGridDBColumn - Caption = #38376#24133 - DataBinding.FieldName = 'C_width' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 72 - end object Tv1Column4: TcxGridDBColumn Caption = #20811#37325 DataBinding.FieldName = 'C_GramWeight' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 66 end - object Tv1Column5: TcxGridDBColumn - Caption = #27969#36716#21345#21495 - DataBinding.FieldName = 'pcid' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 68 - end object Tv1Column6: TcxGridDBColumn Caption = #20248#31561#21367#25968 DataBinding.FieldName = 'YDJs' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 74 end object Tv1Column1: TcxGridDBColumn @@ -456,6 +468,7 @@ inherited frmTatClothRKHZList: TfrmTatClothRKHZList DataBinding.FieldName = 'Ydqty' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end object Tv1YdPF: TcxGridDBColumn @@ -463,6 +476,7 @@ inherited frmTatClothRKHZList: TfrmTatClothRKHZList DataBinding.FieldName = 'YdPF' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end object Tv1Column7: TcxGridDBColumn @@ -470,6 +484,7 @@ inherited frmTatClothRKHZList: TfrmTatClothRKHZList DataBinding.FieldName = 'edJS' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end object Tv1Column8: TcxGridDBColumn @@ -477,6 +492,7 @@ inherited frmTatClothRKHZList: TfrmTatClothRKHZList DataBinding.FieldName = 'edqty' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end object Tv1edPF: TcxGridDBColumn @@ -484,6 +500,7 @@ inherited frmTatClothRKHZList: TfrmTatClothRKHZList DataBinding.FieldName = 'edPF' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end object Tv1Column9: TcxGridDBColumn @@ -491,6 +508,7 @@ inherited frmTatClothRKHZList: TfrmTatClothRKHZList DataBinding.FieldName = 'xjJS' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end object Tv1Column10: TcxGridDBColumn @@ -498,6 +516,7 @@ inherited frmTatClothRKHZList: TfrmTatClothRKHZList DataBinding.FieldName = 'xjqty' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end object Tv1xjPF: TcxGridDBColumn @@ -505,6 +524,7 @@ inherited frmTatClothRKHZList: TfrmTatClothRKHZList DataBinding.FieldName = 'xjPF' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end object Tv1Column13: TcxGridDBColumn @@ -512,6 +532,7 @@ inherited frmTatClothRKHZList: TfrmTatClothRKHZList DataBinding.FieldName = 'fqJS' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end object Tv1Column14: TcxGridDBColumn @@ -519,6 +540,7 @@ inherited frmTatClothRKHZList: TfrmTatClothRKHZList DataBinding.FieldName = 'fqqty' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end object Tv1fqPF: TcxGridDBColumn @@ -526,6 +548,7 @@ inherited frmTatClothRKHZList: TfrmTatClothRKHZList DataBinding.FieldName = 'fqPF' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end object Tv1Column17: TcxGridDBColumn @@ -533,6 +556,7 @@ inherited frmTatClothRKHZList: TfrmTatClothRKHZList DataBinding.FieldName = 'csJS' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end object Tv1Column18: TcxGridDBColumn @@ -540,6 +564,7 @@ inherited frmTatClothRKHZList: TfrmTatClothRKHZList DataBinding.FieldName = 'csqty' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end object Tv1csPF: TcxGridDBColumn @@ -547,6 +572,7 @@ inherited frmTatClothRKHZList: TfrmTatClothRKHZList DataBinding.FieldName = 'csPF' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 80 end object Tv1Column19: TcxGridDBColumn @@ -554,6 +580,7 @@ inherited frmTatClothRKHZList: TfrmTatClothRKHZList DataBinding.FieldName = 'pf' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter + Options.Editing = False Width = 71 end end @@ -622,5 +649,13 @@ inherited frmTatClothRKHZList: TfrmTatClothRKHZList Caption = #20840#24323 OnClick = PM11Click end + object N2: TMenuItem + Caption = #22797#21046 + OnClick = N2Click + end + object N3: TMenuItem + Caption = #22797#21046#27880#33050 + OnClick = N3Click + end end end diff --git a/E04梭织坯布仓库/U_TatClothRKHZList.pas b/E04梭织坯布仓库/U_TatClothRKHZList.pas index 5ad4fe3..39a69d5 100644 --- a/E04梭织坯布仓库/U_TatClothRKHZList.pas +++ b/E04梭织坯布仓库/U_TatClothRKHZList.pas @@ -45,9 +45,7 @@ type PM_1: TPopupMenu; PM11: TMenuItem; N1: TMenuItem; - Tv1Column2: TcxGridDBColumn; Tv1Column4: TcxGridDBColumn; - Tv1Column5: TcxGridDBColumn; Tv1Column6: TcxGridDBColumn; Tv1Column1: TcxGridDBColumn; Tv1Column7: TcxGridDBColumn; @@ -74,6 +72,8 @@ type Tv1xjPF: TcxGridDBColumn; Tv1fqPF: TcxGridDBColumn; Tv1csPF: TcxGridDBColumn; + N2: TMenuItem; + N3: TMenuItem; procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormCreate(Sender: TObject); procedure TBRafreshClick(Sender: TObject); @@ -98,11 +98,15 @@ type procedure IsJYTimeClick(Sender: TObject); procedure C_NameKeyPress(Sender: TObject; var Key: Char); procedure IOTypeChange(Sender: TObject); + procedure N2Click(Sender: TObject); + procedure N3Click(Sender: TObject); + procedure Tv1DblClick(Sender: TObject); private CurrentPage, RecordsNumber: Integer; lstCust: TStringList; procedure InitGrid(); procedure SetStatus(); + procedure CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); { Private declarations } public canshu1: string; @@ -112,7 +116,7 @@ type implementation uses - U_DataLink, U_RTFun, U_LabelPrint; + U_DataLink, U_RTFun, U_LabelPrint, U_TatClothRKHZList2; {$R *.dfm} @@ -159,7 +163,8 @@ begin Close; sql.Clear; - sql.Add('select C_NAME, C_width,C_GramWeight,pcid,max(IOType) as IOType '); +// sql.Add('select C_NAME, C_width,C_GramWeight,pcid,max(IOType) as IOType '); + sql.Add('select C_NAME,C_GramWeight,IOType '); SQL.Add(',pf=SUM(meter/100*CAST(C_WIDTH AS DECIMAL(18,2)))'); SQL.Add(',SUM(CASE WHEN GRADE=''ŵƷ'' THEN 1 ELSE 0 END )AS YDJS'); SQL.Add(',SUM(CASE WHEN GRADE=''ŵƷ'' THEN meter ELSE 0 END )AS Ydqty'); @@ -187,11 +192,13 @@ begin SQL.Add(',SUM(CASE WHEN GRADE='''' THEN meter ELSE 0 END )AS csqty'); SQL.Add(',SUM(CASE WHEN GRADE='''' THEN meter/100*CAST(C_WIDTH AS DECIMAL(18,2)) ELSE 0 END )AS csPF'); - sql.Add(',max(issp) as issp '); + sql.Add(',issp=isnull(A.issp,'''') '); SQL.Add('from V_Tat_Cloth_IO A where (A.IOFlag = '''' ) ' + WSql); - sql.Add('group by C_NAME, C_width,C_GramWeight,pcid,issp'); - sql.Add('Order by C_NAME, C_width,C_GramWeight '); +// sql.Add('group by C_NAME, C_width,C_GramWeight,pcid,isnull(A.issp,'''')'); + sql.Add('group by C_NAME, IOType,C_GramWeight,isnull(A.issp,'''')'); +// sql.Add('Order by C_NAME, C_width,C_GramWeight '); + sql.Add('Order by C_NAME, IOType,C_GramWeight '); // showmessage(sql.text); Open; end; @@ -280,7 +287,14 @@ procedure TfrmTatClothRKHZList.TBExportClick(Sender: TObject); begin if ADOQueryMain.IsEmpty then exit; + with CDS_1 do + begin + Filtered := false; + Filter := ' ssel = 1'; + Filtered := true; + end; TcxGridToExcel(Self.Caption, cxGrid1); + InitGrid(); end; procedure TfrmTatClothRKHZList.orderNoKeyPress(Sender: TObject; var Key: Char); @@ -302,6 +316,28 @@ begin lstCust.Clear; end; +procedure TfrmTatClothRKHZList.Tv1DblClick(Sender: TObject); +begin + if CDS_1.IsEmpty then + Exit; + try + frmTatClothRKHZList2 := TfrmTatClothRKHZList2.Create(Application); + with frmTatClothRKHZList2 do + begin + + fC_Name := Self.CDS_1.FieldByName('C_Name').AsString; + fissp := Self.CDS_1.FieldByName('issp').AsString; + fioType := Self.CDS_1.FieldByName('ioType').AsString; + if ShowModal = 1 then + begin + + end; + end; + finally + frmTatClothRKHZList2.Free; + end; +end; + procedure TfrmTatClothRKHZList.Tv1TcxGridDBDataControllerTcxDataSummaryFooterSummaryItems6GetText(Sender: TcxDataSummaryItem; const AValue: Variant; AIsFooter: Boolean; var AText: string); begin if lstCust <> nil then @@ -341,6 +377,35 @@ begin SelOKNo(CDS_1, true); end; +procedure TfrmTatClothRKHZList.N2Click(Sender: TObject); +begin + Clipboard.SetTextBuf(PChar(Trim(CDS_1.fieldbyname(TV1.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString))); +end; + +procedure TfrmTatClothRKHZList.N3Click(Sender: TObject); +begin + CopyColumnSummaryToClipboard(TV1.Controller.FocusedColumn); +end; + +procedure TfrmTatClothRKHZList.CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); +var + AView: TcxGridDBTableView; + SummaryIndex: Integer; + SummaryText: string; +begin + AView := Tv1; + + // ָеĻ + SummaryIndex := AView.DataController.Summary.FooterSummaryItems.IndexOfItemLink(AColumn); + if SummaryIndex <> -1 then + begin + SummaryText := AView.DataController.Summary.FooterSummaryTexts[SummaryIndex]; + Clipboard.AsText := SummaryText; + end + else + ShowMessage('δҵеĻ'); +end; + procedure TfrmTatClothRKHZList.ToolButton2Click(Sender: TObject); var WSql: string; diff --git a/E04梭织坯布仓库/U_TatClothRKHZList2.dfm b/E04梭织坯布仓库/U_TatClothRKHZList2.dfm new file mode 100644 index 0000000..3e2da22 --- /dev/null +++ b/E04梭织坯布仓库/U_TatClothRKHZList2.dfm @@ -0,0 +1,676 @@ +inherited frmTatClothRKHZList2: TfrmTatClothRKHZList2 + Left = 184 + Top = 138 + Caption = #25104#21697#20837#24211#27719#24635#21015#34920'2' + ClientHeight = 600 + ClientWidth = 1540 + Position = poScreenCenter + WindowState = wsMaximized + ExplicitWidth = 1556 + ExplicitHeight = 639 + PixelsPerInch = 96 + TextHeight = 13 + object ToolBar1: TToolBar [0] + Tag = 1 + Left = 0 + Top = 0 + Width = 1540 + Height = 38 + AutoSize = True + ButtonHeight = 38 + ButtonWidth = 91 + Caption = 'ToolBar1' + Color = clWhite + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [] + Images = DataLink_TatClothStk.ImageList_new32 + List = True + ParentColor = False + ParentFont = False + ShowCaptions = True + TabOrder = 0 + object TBRafresh: TToolButton + Left = 0 + Top = 0 + AutoSize = True + Caption = #21047#26032 + ImageIndex = 1 + OnClick = TBRafreshClick + end + object TBExport: TToolButton + Left = 71 + Top = 0 + AutoSize = True + Caption = #23548#20986 + ImageIndex = 20 + OnClick = TBExportClick + end + object ToolButton4: TToolButton + Left = 142 + Top = 0 + AutoSize = True + Caption = #20445#23384#26684#24335 + ImageIndex = 16 + OnClick = ToolButton4Click + end + object TBClose: TToolButton + Left = 237 + Top = 0 + AutoSize = True + Caption = #20851#38381 + ImageIndex = 7 + OnClick = TBCloseClick + end + end + object Panel1: TPanel [1] + Left = 0 + Top = 38 + Width = 1540 + Height = 67 + Align = alTop + BevelInner = bvRaised + BevelOuter = bvLowered + Color = clWhite + ParentBackground = False + TabOrder = 1 + ExplicitTop = 32 + object Label2: TLabel + Left = 70 + Top = 36 + Width = 12 + Height = 13 + Caption = #33267 + end + object Label5: TLabel + Left = 190 + Top = 10 + Width = 39 + Height = 12 + Hint = '0' + Caption = #20135#21697#21517 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object Label1: TLabel + Left = 358 + Top = 10 + Width = 26 + Height = 12 + Hint = '0' + Caption = #38376#24133 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object Label3: TLabel + Left = 190 + Top = 36 + Width = 26 + Height = 12 + Hint = '0' + Caption = #20811#37325 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object Label4: TLabel + Left = 534 + Top = 10 + Width = 52 + Height = 12 + Hint = '0' + Caption = #20837#24211#31867#22411 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object Label6: TLabel + Left = 358 + Top = 36 + Width = 52 + Height = 12 + Hint = '0' + Caption = #27969#36716#21345#21495 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object BegDate: TDateTimePicker + Left = 88 + Top = 6 + Width = 87 + Height = 20 + Date = 40768.000000000000000000 + Time = 0.458268587972270300 + TabOrder = 1 + end + object EndDate: TDateTimePicker + Left = 88 + Top = 32 + Width = 87 + Height = 20 + Date = 40768.000000000000000000 + Time = 0.458268587972270300 + TabOrder = 2 + end + object begtime: TDateTimePicker + Left = 137 + Top = 132 + Width = 55 + Height = 20 + Date = 39780.000000000000000000 + Format = 'HH:mm' + Time = 39780.000000000000000000 + Kind = dtkTime + TabOrder = 3 + end + object endTime: TDateTimePicker + Left = 137 + Top = 156 + Width = 55 + Height = 20 + Date = 39780.000000000000000000 + Format = 'HH:mm' + Time = 0.999317129630071600 + Kind = dtkTime + TabOrder = 4 + end + object IsJYTime: TCheckBox + Left = 14 + Top = 8 + Width = 73 + Height = 17 + Caption = #26597#35810#26085#26399 + Checked = True + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + State = cbChecked + TabOrder = 0 + OnClick = IsJYTimeClick + end + object C_Name: TEdit + Tag = 2 + Left = 237 + Top = 6 + Width = 100 + Height = 21 + Hint = '0' + TabOrder = 5 + OnKeyPress = C_NameKeyPress + end + object C_Width: TEdit + Tag = 2 + Left = 415 + Top = 6 + Width = 100 + Height = 21 + Hint = '0' + TabOrder = 6 + OnKeyPress = C_NameKeyPress + end + object C_GramWeight: TEdit + Tag = 2 + Left = 237 + Top = 32 + Width = 100 + Height = 21 + Hint = '0' + TabOrder = 7 + OnKeyPress = C_NameKeyPress + end + object IOType: TComboBox + Tag = 2 + Left = 591 + Top = 6 + Width = 100 + Height = 21 + TabOrder = 8 + OnChange = IOTypeChange + Items.Strings = ( + #26816#39564#20837#24211 + #26399#21021#20837#24211 + #27979#35797#20837#24211 + #36864#36135#20837#24211) + end + object PCID: TEdit + Tag = 2 + Left = 415 + Top = 32 + Width = 100 + Height = 21 + Hint = '0' + TabOrder = 9 + OnKeyPress = C_NameKeyPress + end + end + object cxGrid1: TcxGrid [2] + Left = 0 + Top = 105 + Width = 1540 + Height = 495 + Align = alClient + BorderStyle = cxcbsNone + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [] + ParentFont = False + PopupMenu = PM_1 + TabOrder = 2 + ExplicitTop = 111 + object Tv1: TcxGridDBTableView + Navigator.Buttons.CustomButtons = <> + ScrollbarAnnotations.CustomAnnotations = <> + DataController.DataSource = DS_1 + DataController.Filter.AutoDataSetFilter = True + DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost] + DataController.Summary.DefaultGroupSummaryItems = <> + DataController.Summary.FooterSummaryItems = < + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skCount + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Format = #26816#39564#31995#25968'=#.##' + Kind = skAverage + end + item + Format = #25442#31639#31995#25968'=#.##' + Kind = skAverage + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + Column = Tv1Column6 + end + item + Kind = skSum + Column = Tv1Column1 + end + item + Kind = skSum + Column = Tv1Column7 + end + item + Kind = skSum + Column = Tv1Column8 + end + item + Kind = skSum + Column = Tv1Column9 + end + item + Kind = skSum + Column = Tv1Column10 + end + item + Kind = skSum + Column = Tv1Column13 + end + item + Kind = skSum + Column = Tv1Column14 + end + item + Kind = skSum + Column = Tv1Column17 + end + item + Kind = skSum + Column = Tv1Column18 + end + item + Kind = skSum + Column = Tv1Column19 + end + item + Kind = skSum + Column = Tv1xjPF + end + item + Kind = skSum + Column = Tv1fqPF + end + item + Kind = skSum + Column = Tv1csPF + end + item + Kind = skSum + Column = Tv1edPF + end + item + Kind = skSum + Column = Tv1YdPF + end> + DataController.Summary.SummaryGroups = <> + OptionsCustomize.ColumnFiltering = False + OptionsView.Footer = True + OptionsView.GroupByBox = False + OptionsView.IndicatorWidth = 30 + Styles.IncSearch = DataLink_TatClothStk.SHuangSe + Styles.Footer = DataLink_TatClothStk.Default + Styles.Header = DataLink_TatClothStk.Default + Styles.Inactive = DataLink_TatClothStk.SHuangSe + Styles.Selection = DataLink_TatClothStk.SHuangSe + object v1Column22: TcxGridDBColumn + Caption = #36873#25321 + DataBinding.FieldName = 'SSel' + DataBinding.IsNullValueType = True + PropertiesClassName = 'TcxCheckBoxProperties' + Properties.ImmediatePost = True + Properties.NullStyle = nssUnchecked + HeaderAlignmentHorz = taCenter + Options.Sorting = False + Width = 66 + end + object Tv1Column3: TcxGridDBColumn + Caption = #21697#21517 + DataBinding.FieldName = 'C_Name' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 66 + end + object Tv1Column2: TcxGridDBColumn + Caption = #38376#24133 + DataBinding.FieldName = 'C_width' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 72 + end + object Tv1issp: TcxGridDBColumn + Caption = #21452#21943 + DataBinding.FieldName = 'issp' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1IOType: TcxGridDBColumn + Caption = #20837#24211#31867#22411 + DataBinding.FieldName = 'IOType' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1Column4: TcxGridDBColumn + Caption = #20811#37325 + DataBinding.FieldName = 'C_GramWeight' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 66 + end + object Tv1Column5: TcxGridDBColumn + Caption = #27969#36716#21345#21495 + DataBinding.FieldName = 'pcid' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 68 + end + object Tv1Column6: TcxGridDBColumn + Caption = #20248#31561#21367#25968 + DataBinding.FieldName = 'YDJs' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 74 + end + object Tv1Column1: TcxGridDBColumn + Caption = #20248#31561#31859#25968 + DataBinding.FieldName = 'Ydqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1YdPF: TcxGridDBColumn + Caption = #20248#31561#24179#26041 + DataBinding.FieldName = 'YdPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1Column7: TcxGridDBColumn + Caption = #20108#31561#21367#25968 + DataBinding.FieldName = 'edJS' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1Column8: TcxGridDBColumn + Caption = #20108#31561#31859#25968 + DataBinding.FieldName = 'edqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1edPF: TcxGridDBColumn + Caption = #20108#31561#24179#26041 + DataBinding.FieldName = 'edPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1Column9: TcxGridDBColumn + Caption = #23567#21367#21367#25968 + DataBinding.FieldName = 'xjJS' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1Column10: TcxGridDBColumn + Caption = #23567#21367#25968#37327 + DataBinding.FieldName = 'xjqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1xjPF: TcxGridDBColumn + Caption = #23567#21367#24179#26041 + DataBinding.FieldName = 'xjPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1Column13: TcxGridDBColumn + Caption = #20998#20999#21367#25968 + DataBinding.FieldName = 'fqJS' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1Column14: TcxGridDBColumn + Caption = #20998#20999#24067#25968#37327 + DataBinding.FieldName = 'fqqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1fqPF: TcxGridDBColumn + Caption = #20998#20999#24179#26041 + DataBinding.FieldName = 'fqPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1Column17: TcxGridDBColumn + Caption = #27979#35797#21367#25968 + DataBinding.FieldName = 'csJS' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1Column18: TcxGridDBColumn + Caption = #27979#35797#25968#37327 + DataBinding.FieldName = 'csqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1csPF: TcxGridDBColumn + Caption = #27979#35797#24179#26041 + DataBinding.FieldName = 'csPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object Tv1Column19: TcxGridDBColumn + Caption = #24179#26041 + DataBinding.FieldName = 'pf' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 71 + end + end + object cxGrid1Level1: TcxGridLevel + GridView = Tv1 + end + end + inherited ADOQueryBaseCmd: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + Left = 561 + Top = 208 + end + inherited ADOQueryBaseTemp: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + Left = 425 + Top = 201 + end + object ADOQueryCmd: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + CommandTimeout = 600 + Parameters = <> + Left = 148 + Top = 280 + end + object ADOQueryMain: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + LockType = ltReadOnly + Parameters = <> + Left = 252 + Top = 260 + end + object ADOQueryTemp: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + LockType = ltReadOnly + CommandTimeout = 600 + Parameters = <> + Left = 112 + Top = 204 + end + object DS_1: TDataSource + DataSet = CDS_1 + Left = 828 + Top = 284 + end + object GPM_1: TcxGridPopupMenu + Grid = cxGrid1 + PopupMenus = <> + Left = 728 + Top = 288 + end + object CDS_1: TClientDataSet + Aggregates = <> + Params = <> + BeforeOpen = CDS_1BeforeOpen + Left = 776 + Top = 284 + end + object PM_1: TPopupMenu + Left = 560 + Top = 384 + object N1: TMenuItem + Caption = #20840#36873 + OnClick = N1Click + end + object PM11: TMenuItem + Caption = #20840#24323 + OnClick = PM11Click + end + object N2: TMenuItem + Caption = #22797#21046 + OnClick = N2Click + end + object N3: TMenuItem + Caption = #22797#21046#27880#33050 + OnClick = N3Click + end + end +end diff --git a/E04梭织坯布仓库/U_TatClothRKHZList2.pas b/E04梭织坯布仓库/U_TatClothRKHZList2.pas new file mode 100644 index 0000000..736e71b --- /dev/null +++ b/E04梭织坯布仓库/U_TatClothRKHZList2.pas @@ -0,0 +1,460 @@ +unit U_TatClothRKHZList2; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage, + cxEdit, DB, cxDBData, cxGridCustomTableView, cxGridTableView, + cxGridBandedTableView, cxGridDBBandedTableView, cxGridLevel, cxClasses, + cxControls, cxGridCustomView, cxGridDBTableView, cxGrid, StdCtrls, ComCtrls, + ExtCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, ADODB, DBClient, + cxDropDownEdit, cxCheckBox, RM_Common, RM_Class, RM_e_Xls, RM_Dataset, + RM_System, RM_GridReport, Menus, cxCalendar, MovePanel, Math, Clipbrd, + cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, cxTextEdit, dxSkinsCore, + dxSkinsDefaultPainters, dxDateRanges, dxBarBuiltInMenu, U_BaseInput, cxPC, + System.StrUtils, dxScrollbarAnnotations, U_BaseList, System.ImageList, + Vcl.ImgList; +type + TfrmTatClothRKHZList2 = class(TfrmBaseInput) + ToolBar1: TToolBar; + TBRafresh: TToolButton; + TBExport: TToolButton; + TBClose: TToolButton; + Panel1: TPanel; + ADOQueryCmd: TADOQuery; + ADOQueryMain: TADOQuery; + ADOQueryTemp: TADOQuery; + DS_1: TDataSource; + GPM_1: TcxGridPopupMenu; + Label2: TLabel; + BegDate: TDateTimePicker; + EndDate: TDateTimePicker; + CDS_1: TClientDataSet; + begtime: TDateTimePicker; + endTime: TDateTimePicker; + IsJYTime: TCheckBox; + ToolButton4: TToolButton; + cxGrid1: TcxGrid; + Tv1: TcxGridDBTableView; + v1Column22: TcxGridDBColumn; + Tv1Column3: TcxGridDBColumn; + cxGrid1Level1: TcxGridLevel; + Label5: TLabel; + C_Name: TEdit; + PM_1: TPopupMenu; + PM11: TMenuItem; + N1: TMenuItem; + Tv1Column2: TcxGridDBColumn; + Tv1Column4: TcxGridDBColumn; + Tv1Column5: TcxGridDBColumn; + Tv1Column6: TcxGridDBColumn; + Tv1Column1: TcxGridDBColumn; + Tv1Column7: TcxGridDBColumn; + Tv1Column8: TcxGridDBColumn; + Tv1Column9: TcxGridDBColumn; + Tv1Column10: TcxGridDBColumn; + Tv1Column13: TcxGridDBColumn; + Tv1Column14: TcxGridDBColumn; + Tv1Column17: TcxGridDBColumn; + Tv1Column18: TcxGridDBColumn; + Tv1Column19: TcxGridDBColumn; + Label1: TLabel; + C_Width: TEdit; + Label3: TLabel; + C_GramWeight: TEdit; + Tv1IOType: TcxGridDBColumn; + IOType: TComboBox; + Label4: TLabel; + Label6: TLabel; + PCID: TEdit; + Tv1issp: TcxGridDBColumn; + Tv1YdPF: TcxGridDBColumn; + Tv1edPF: TcxGridDBColumn; + Tv1xjPF: TcxGridDBColumn; + Tv1fqPF: TcxGridDBColumn; + Tv1csPF: TcxGridDBColumn; + N2: TMenuItem; + N3: TMenuItem; + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure TBRafreshClick(Sender: TObject); + procedure ConNoMChange(Sender: TObject); + procedure TBCloseClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure TBExportClick(Sender: TObject); + procedure orderNoKeyPress(Sender: TObject; var Key: Char); + procedure BTNPClick(Sender: TObject); + procedure BTLPClick(Sender: TObject); + procedure TCBNORChange(Sender: TObject); + procedure JYTypeChange(Sender: TObject); + procedure ToolButton2Click(Sender: TObject); + procedure cxPageControl1Change(Sender: TObject); + procedure CDS_1BeforeOpen(DataSet: TDataSet); + procedure Tv1DataControllerFilterBeforeChange(Sender: TcxDBDataFilterCriteria; ADataSet: TDataSet; const AFilterText: string); + + procedure Tv1TcxGridDBDataControllerTcxDataSummaryFooterSummaryItems6GetText(Sender: TcxDataSummaryItem; const AValue: Variant; AIsFooter: Boolean; var AText: string); + procedure ToolButton4Click(Sender: TObject); + procedure PM11Click(Sender: TObject); + procedure N1Click(Sender: TObject); + procedure IsJYTimeClick(Sender: TObject); + procedure C_NameKeyPress(Sender: TObject; var Key: Char); + procedure IOTypeChange(Sender: TObject); + procedure N2Click(Sender: TObject); + procedure N3Click(Sender: TObject); + private + CurrentPage, RecordsNumber: Integer; + lstCust: TStringList; + procedure InitGrid(); + procedure SetStatus(); + procedure CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); + { Private declarations } + public + fissp : string; + fC_Name: string; + fioType : string; + { Public declarations } + end; + +var + frmTatClothRKHZList2: TfrmTatClothRKHZList2; + +implementation + +uses + U_DataLink, U_RTFun, U_LabelPrint; + +{$R *.dfm} + +procedure TfrmTatClothRKHZList2.SetStatus(); +begin + +end; + +procedure TfrmTatClothRKHZList2.FormClose(Sender: TObject; var Action: TCloseAction); +begin + inherited; + FreeAndNil(lstCust); + Action := caFree; +end; + +procedure TfrmTatClothRKHZList2.FormCreate(Sender: TObject); +begin + inherited; + lstCust := TStringList.Create; + EndDate.DateTime := SGetServerDateTime(ADOQueryTemp); + BegDate.DateTime := EndDate.DateTime - 20; +end; + +procedure TfrmTatClothRKHZList2.InitGrid(); +var + WSql: string; +begin + + WSql := SGetFilters(Panel1, 1, 2); + if Trim(WSql) <> '' then + WSql := ' and ' + WSql; + if IsJYTime.Checked then + begin + WSql := WSql + ' and IOTime>=' + quotedstr(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)); + WSql := WSql + ' and IOTime<' + quotedstr(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1)); + end; + + try + ADOQueryMain.DisableControls; + + with ADOQueryMain do + begin + Filtered := False; + Close; + sql.Clear; + +// sql.Add('select C_NAME, C_width,C_GramWeight,pcid,max(IOType) as IOType '); + sql.Add('select C_NAME,C_GramWeight,pcid,iotype,C_WIDTH '); + SQL.Add(',pf=SUM(meter/100*CAST(C_WIDTH AS DECIMAL(18,2)))'); + SQL.Add(',SUM(CASE WHEN GRADE=''ŵƷ'' THEN 1 ELSE 0 END )AS YDJS'); + SQL.Add(',SUM(CASE WHEN GRADE=''ŵƷ'' THEN meter ELSE 0 END )AS Ydqty'); + SQL.Add(',SUM(CASE WHEN GRADE=''ŵƷ'' THEN meter/100*CAST(C_WIDTH AS DECIMAL(18,2)) ELSE 0 END )AS YdPF'); + + SQL.Add(',SUM(CASE WHEN GRADE=''Ʒ'' THEN 1 ELSE 0 END )AS edJS'); + SQL.Add(',SUM(CASE WHEN GRADE=''Ʒ'' THEN meter ELSE 0 END )AS edqty'); + SQL.Add(',SUM(CASE WHEN GRADE=''Ʒ'' THEN meter/100*CAST(C_WIDTH AS DECIMAL(18,2)) ELSE 0 END )AS edPF'); + + SQL.Add(',SUM(CASE WHEN GRADE=''С'' THEN 1 ELSE 0 END )AS xjJS'); + SQL.Add(',SUM(CASE WHEN GRADE=''С'' THEN meter ELSE 0 END )AS xjqty'); + SQL.Add(',SUM(CASE WHEN GRADE=''С'' THEN meter/100*CAST(C_WIDTH AS DECIMAL(18,2)) ELSE 0 END )AS xjPF'); + + SQL.Add(',SUM(CASE WHEN GRADE=''ϲ'' THEN 1 ELSE 0 END )AS fbJS'); + SQL.Add(',SUM(CASE WHEN GRADE=''ϲ'' THEN meter ELSE 0 END )AS fbqty'); + SQL.Add(',SUM(CASE WHEN GRADE=''ϲ'' THEN meter/100*CAST(C_WIDTH AS DECIMAL(18,2)) ELSE 0 END )AS fbPF'); + + SQL.Add(',SUM(CASE WHEN GRADE='''' THEN 1 ELSE 0 END )AS fqJS'); + SQL.Add(',SUM(CASE WHEN GRADE='''' THEN meter ELSE 0 END )AS fqqty'); + SQL.Add(',SUM(CASE WHEN GRADE='''' THEN meter/100*CAST(C_WIDTH AS DECIMAL(18,2)) ELSE 0 END )AS fqPF'); + + SQL.Add(',SUM(CASE WHEN GRADE=''ѭ'' THEN 1 ELSE 0 END )AS xhJS'); + SQL.Add(',SUM(CASE WHEN GRADE=''ѭ'' THEN meter ELSE 0 END )AS xhqty'); + SQL.Add(',SUM(CASE WHEN GRADE='''' THEN 1 ELSE 0 END )AS csJS'); + SQL.Add(',SUM(CASE WHEN GRADE='''' THEN meter ELSE 0 END )AS csqty'); + SQL.Add(',SUM(CASE WHEN GRADE='''' THEN meter/100*CAST(C_WIDTH AS DECIMAL(18,2)) ELSE 0 END )AS csPF'); + + sql.Add(',issp=isnull(A.issp,'''') '); + SQL.Add('from V_Tat_Cloth_IO A where (A.IOFlag = '''' ) ' + WSql); + sql.Add(' and C_NAME=' + QuotedStr(Trim(fC_Name))); + sql.Add(' and ioType=' + QuotedStr(Trim(fioType))); + + if fissp <> '' then + begin + SQL.Add(' and isnull(issp,'''') = ''˫''' ); + end + else + begin + SQL.Add(' and isnull(issp,'''') <> ''˫'' ' ); + end; + + sql.Add('group by C_NAME, C_width,C_GramWeight,IOType,pcid,isnull(A.issp,'''')'); +// sql.Add('group by C_NAME, IOType,C_GramWeight,pcid,isnull(A.issp,'''')'); + sql.Add('Order by C_NAME, C_width,pcid,C_GramWeight '); +// sql.Add('Order by C_NAME, IOType,C_GramWeight '); +// showmessage(sql.text); + Open; + end; + SCreateCDS(ADOQueryMain, CDS_1); + SInitCDSData(ADOQueryMain, CDS_1); + + finally + ADOQueryMain.EnableControls; + TV1.DataController.Filter.Clear; + end; + +end; + +procedure TfrmTatClothRKHZList2.IOTypeChange(Sender: TObject); +begin + + InitGrid(); +end; + +procedure TfrmTatClothRKHZList2.IsJYTimeClick(Sender: TObject); +begin + inherited; + InitGrid(); +end; + +procedure TfrmTatClothRKHZList2.TBRafreshClick(Sender: TObject); +begin + CurrentPage := 1; + InitGrid(); +end; + +procedure TfrmTatClothRKHZList2.CDS_1BeforeOpen(DataSet: TDataSet); +begin + + lstCust.Clear; +end; + +procedure TfrmTatClothRKHZList2.ConNoMChange(Sender: TObject); +begin + if ADOQueryMain.Active then + begin + SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2)); + end; +end; + +procedure TfrmTatClothRKHZList2.cxPageControl1Change(Sender: TObject); +begin + CurrentPage := 1; + SetStatus(); + InitGrid(); +end; + +procedure TfrmTatClothRKHZList2.C_NameKeyPress(Sender: TObject; var Key: Char); +begin + inherited; + if Key = #13 then + begin + InitGrid(); + end; +end; + +procedure TfrmTatClothRKHZList2.TBCloseClick(Sender: TObject); +begin + + Close; +end; + +procedure TfrmTatClothRKHZList2.FormShow(Sender: TObject); +begin + inherited; + + ReadCxGrid(trim(self.Caption) + 'Tv1', Tv1, 'Ʒ2'); + CurrentPage := 1; + RecordsNumber := 500; +// canshu1 := Trim(Self.fParameters1); + + EndDate.DateTime := SGetServerDate(ADOQueryTemp); + BegDate.DateTime := EndDate.DateTime; + SetStatus(); + + InitGrid(); + +end; + +procedure TfrmTatClothRKHZList2.TBExportClick(Sender: TObject); +begin + if ADOQueryMain.IsEmpty then + exit; + with CDS_1 do + begin + Filtered := false; + Filter := ' ssel = 1'; + Filtered := true; + end; + TcxGridToExcel(Self.Caption, cxGrid1); + InitGrid(); +end; + +procedure TfrmTatClothRKHZList2.orderNoKeyPress(Sender: TObject; var Key: Char); +begin + if Key = #13 then + begin + CurrentPage := 1; + InitGrid(); + end; +end; + +procedure TfrmTatClothRKHZList2.PM11Click(Sender: TObject); +begin + SelOKNo(CDS_1, false); +end; + +procedure TfrmTatClothRKHZList2.Tv1DataControllerFilterBeforeChange(Sender: TcxDBDataFilterCriteria; ADataSet: TDataSet; const AFilterText: string); +begin + lstCust.Clear; +end; + +procedure TfrmTatClothRKHZList2.Tv1TcxGridDBDataControllerTcxDataSummaryFooterSummaryItems6GetText(Sender: TcxDataSummaryItem; const AValue: Variant; AIsFooter: Boolean; var AText: string); +begin + if lstCust <> nil then + AText := IntToStr(lstCust.Count); +end; + +procedure TfrmTatClothRKHZList2.BTNPClick(Sender: TObject); +begin + if CurrentPage < CDS_1.FieldByName('TotalCount').AsInteger / RecordsNumber then + CurrentPage := CurrentPage + 1; + InitGrid(); +end; + +procedure TfrmTatClothRKHZList2.BTLPClick(Sender: TObject); +begin + if CurrentPage > 1 then + CurrentPage := CurrentPage - 1; + InitGrid(); +end; + +procedure TfrmTatClothRKHZList2.TCBNORChange(Sender: TObject); +begin + + CurrentPage := 1; + InitGrid(); +end; + +procedure TfrmTatClothRKHZList2.JYTypeChange(Sender: TObject); +begin + CurrentPage := 1; + InitGrid(); +end; + +procedure TfrmTatClothRKHZList2.N1Click(Sender: TObject); +begin + + SelOKNo(CDS_1, true); +end; + +procedure TfrmTatClothRKHZList2.N2Click(Sender: TObject); +begin + Clipboard.SetTextBuf(PChar(Trim(CDS_1.fieldbyname(TV1.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString))); +end; + +procedure TfrmTatClothRKHZList2.N3Click(Sender: TObject); +begin + CopyColumnSummaryToClipboard(TV1.Controller.FocusedColumn); +end; + +procedure TfrmTatClothRKHZList2.CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); +var + AView: TcxGridDBTableView; + SummaryIndex: Integer; + SummaryText: string; +begin + AView := Tv1; + + // ָеĻ + SummaryIndex := AView.DataController.Summary.FooterSummaryItems.IndexOfItemLink(AColumn); + if SummaryIndex <> -1 then + begin + SummaryText := AView.DataController.Summary.FooterSummaryTexts[SummaryIndex]; + Clipboard.AsText := SummaryText; + end + else + ShowMessage('δҵеĻ'); +end; + +procedure TfrmTatClothRKHZList2.ToolButton2Click(Sender: TObject); +var + WSql: string; +begin + if CDS_1.IsEmpty then + Exit; + if not CDS_1.Locate('SSel', True, []) then + begin + Application.MessageBox('ûѡ!', 'ʾ', 0); + Exit; + end; + WSql := ''; + CDS_1.DisableControls; + with CDS_1 do + begin + First; + while not Eof do + begin + if CDS_1.fieldbyname('SSel').AsBoolean then + begin + if WSql <> '' then + begin + WSql := WSql + ',' + QuotedStr(Trim(CDS_1.fieldbyname('CIID').AsString)); + end + else + begin + WSql := QuotedStr(Trim(CDS_1.fieldbyname('CIID').AsString)); + end; + end; + Next; + end; + end; + CDS_1.Locate('SSel', True, []); + CDS_1.EnableControls; + try + frmLabelPrint := TfrmLabelPrint.Create(Application); + with frmLabelPrint do + begin + FLMType := 'TradeClothStk'; + FFiltration1 := WSql; + if ShowModal = 1 then + begin + + end; + end; + finally + frmLabelPrint.Free; + end; +end; + +procedure TfrmTatClothRKHZList2.ToolButton4Click(Sender: TObject); +begin + WriteCxGrid(trim(self.Caption) + 'Tv1', Tv1, 'Ʒ2'); +end; + +end. + diff --git a/E04梭织坯布仓库/U_TatClothStkHZList.dfm b/E04梭织坯布仓库/U_TatClothStkHZList.dfm index bd3e3e8..c2eac1d 100644 --- a/E04梭织坯布仓库/U_TatClothStkHZList.dfm +++ b/E04梭织坯布仓库/U_TatClothStkHZList.dfm @@ -1,7 +1,7 @@ inherited frmTatClothStkHZList: TfrmTatClothStkHZList Left = 184 Top = 138 - Caption = #25104#21697#24211#23384#27719#24635#21015#34920 + Caption = #25104#21697#24211#23384#27719#24635#21015#34920'1' ClientHeight = 600 ClientWidth = 1540 FormStyle = fsMDIChild @@ -19,7 +19,7 @@ inherited frmTatClothStkHZList: TfrmTatClothStkHZList Height = 38 AutoSize = True ButtonHeight = 38 - ButtonWidth = 91 + ButtonWidth = 115 Caption = 'ToolBar1' Color = clWhite Font.Charset = GB2312_CHARSET @@ -33,7 +33,6 @@ inherited frmTatClothStkHZList: TfrmTatClothStkHZList ParentFont = False ShowCaptions = True TabOrder = 0 - ExplicitTop = 2 object TBRafresh: TToolButton Left = 0 Top = 0 @@ -50,16 +49,23 @@ inherited frmTatClothStkHZList: TfrmTatClothStkHZList ImageIndex = 20 OnClick = TBExportClick end - object ToolButton4: TToolButton + object ToolButton1: TToolButton Left = 142 Top = 0 AutoSize = True + Caption = #20108#31561#27719#24635#26597#30475 + ImageIndex = 8 + end + object ToolButton4: TToolButton + Left = 261 + Top = 0 + AutoSize = True Caption = #20445#23384#26684#24335 ImageIndex = 16 OnClick = ToolButton4Click end object TBClose: TToolButton - Left = 237 + Left = 356 Top = 0 AutoSize = True Caption = #20851#38381 @@ -78,7 +84,6 @@ inherited frmTatClothStkHZList: TfrmTatClothStkHZList Color = clWhite ParentBackground = False TabOrder = 1 - ExplicitTop = 32 object Label2: TLabel Left = 70 Top = 36 @@ -114,20 +119,6 @@ inherited frmTatClothStkHZList: TfrmTatClothStkHZList Font.Style = [fsBold] ParentFont = False end - object label12: TLabel - Left = 190 - Top = 35 - Width = 26 - Height = 12 - Hint = '0' - Caption = #38376#24133 - Font.Charset = GB2312_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = #23435#20307 - Font.Style = [fsBold] - ParentFont = False - end object BegDate: TDateTimePicker Left = 88 Top = 6 @@ -203,309 +194,342 @@ inherited frmTatClothStkHZList: TfrmTatClothStkHZList TabOrder = 6 OnKeyPress = C_NameKeyPress end - object C_width: TEdit - Tag = 2 - Left = 237 - Top = 32 - Width = 100 - Height = 20 - Hint = '0' - TabOrder = 7 - OnKeyPress = C_NameKeyPress - end end - object cxGrid1: TcxGrid [2] + object Panel2: TPanel [2] Left = 0 Top = 105 Width = 1540 Height = 495 Align = alClient - BorderStyle = cxcbsNone - Font.Charset = GB2312_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = #23435#20307 - Font.Style = [] - ParentFont = False - PopupMenu = PM_1 TabOrder = 2 ExplicitTop = 111 - object Tv1: TcxGridDBTableView - Navigator.Buttons.CustomButtons = <> - ScrollbarAnnotations.CustomAnnotations = <> - DataController.DataSource = DS_1 - DataController.Filter.AutoDataSetFilter = True - DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost] - DataController.Summary.DefaultGroupSummaryItems = <> - DataController.Summary.FooterSummaryItems = < - item - Kind = skSum + object cxGrid1: TcxGrid + Left = 1 + Top = 1 + Width = 1538 + Height = 493 + Align = alClient + BorderStyle = cxcbsNone + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [] + ParentFont = False + PopupMenu = PM_1 + TabOrder = 0 + object Tv1: TcxGridDBTableView + OnDblClick = Tv1DblClick + Navigator.Buttons.CustomButtons = <> + ScrollbarAnnotations.CustomAnnotations = <> + DataController.DataSource = DS_1 + DataController.Filter.AutoDataSetFilter = True + DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost] + DataController.Summary.DefaultGroupSummaryItems = <> + DataController.Summary.FooterSummaryItems = < + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skCount + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Format = #26816#39564#31995#25968'=#.##' + Kind = skAverage + end + item + Format = #25442#31639#31995#25968'=#.##' + Kind = skAverage + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + Column = Tv1Column6 + end + item + Kind = skSum + Column = Tv1Column1 + end + item + Kind = skSum + Column = Tv1Column7 + end + item + Kind = skSum + Column = Tv1Column8 + end + item + Kind = skSum + Column = Tv1Column9 + end + item + Kind = skSum + Column = Tv1Column10 + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + Column = Tv1Column13 + end + item + Kind = skSum + Column = Tv1Column14 + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + Column = Tv1Column17 + end + item + Kind = skSum + Column = Tv1Column18 + end + item + Kind = skSum + end + item + Kind = skSum + Column = Tv1YdPF + end + item + Kind = skSum + Column = Tv1edPF + end + item + Kind = skSum + Column = Tv1xjPF + end + item + Kind = skSum + Column = Tv1fqPF + end + item + Kind = skSum + Column = Tv1csPF + end + item + Kind = skSum + Column = Tv1pf + end> + DataController.Summary.SummaryGroups = <> + OptionsCustomize.ColumnFiltering = False + OptionsView.Footer = True + OptionsView.GroupByBox = False + OptionsView.IndicatorWidth = 30 + Styles.IncSearch = DataLink_TatClothStk.SHuangSe + Styles.Footer = DataLink_TatClothStk.Default + Styles.Header = DataLink_TatClothStk.Default + Styles.Inactive = DataLink_TatClothStk.SHuangSe + Styles.Selection = DataLink_TatClothStk.SHuangSe + object v1Column22: TcxGridDBColumn + Caption = #36873#25321 + DataBinding.FieldName = 'SSel' + DataBinding.IsNullValueType = True + PropertiesClassName = 'TcxCheckBoxProperties' + Properties.ImmediatePost = True + Properties.NullStyle = nssUnchecked + HeaderAlignmentHorz = taCenter + Options.Sorting = False + Width = 66 end - item - Kind = skSum + object Tv1Column3: TcxGridDBColumn + Caption = #21697#21517 + DataBinding.FieldName = 'C_Name' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 66 end - item - Kind = skCount + object Tv1issp: TcxGridDBColumn + Caption = #21452#21943 + DataBinding.FieldName = 'issp' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 end - item - Kind = skSum + object Tv1Column4: TcxGridDBColumn + Caption = #20811#37325 + DataBinding.FieldName = 'C_GramWeight' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 66 end - item - Kind = skSum + object Tv1Column6: TcxGridDBColumn + Caption = #20248#31561#21367#25968 + DataBinding.FieldName = 'YDJs' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 74 end - item - Kind = skSum + object Tv1Column1: TcxGridDBColumn + Caption = #20248#31561#31859#25968 + DataBinding.FieldName = 'Ydqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 end - item - Kind = skSum + object Tv1YdPF: TcxGridDBColumn + Caption = #20248#31561#24179#26041 + DataBinding.FieldName = 'YdPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 end - item - Kind = skSum + object Tv1Column7: TcxGridDBColumn + Caption = #20108#31561#21367#25968 + DataBinding.FieldName = 'edJS' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 end - item - Kind = skSum + object Tv1Column8: TcxGridDBColumn + Caption = #20108#31561#31859#25968 + DataBinding.FieldName = 'edqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 end - item - Format = #26816#39564#31995#25968'=#.##' - Kind = skAverage + object Tv1edPF: TcxGridDBColumn + Caption = #20108#31561#24179#26041 + DataBinding.FieldName = 'edPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 end - item - Format = #25442#31639#31995#25968'=#.##' - Kind = skAverage + object Tv1Column9: TcxGridDBColumn + Caption = #23567#21367#21367#25968 + DataBinding.FieldName = 'xjJS' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 end - item - Kind = skSum + object Tv1Column10: TcxGridDBColumn + Caption = #23567#21367#25968#37327 + DataBinding.FieldName = 'xjqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 end - item - Kind = skSum + object Tv1xjPF: TcxGridDBColumn + Caption = #23567#21367#24179#26041 + DataBinding.FieldName = 'xjPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 end - item - Kind = skSum + object Tv1Column13: TcxGridDBColumn + Caption = #20998#20999#21367#25968 + DataBinding.FieldName = 'fqJS' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 end - item - Kind = skSum + object Tv1Column14: TcxGridDBColumn + Caption = #20998#20999#24067#25968#37327 + DataBinding.FieldName = 'fqqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 end - item - Kind = skSum - Column = Tv1Column6 + object Tv1fqPF: TcxGridDBColumn + Caption = #20998#20999#24179#26041 + DataBinding.FieldName = 'fqPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 end - item - Kind = skSum - Column = Tv1Column1 + object Tv1Column17: TcxGridDBColumn + Caption = #27979#35797#21367#25968 + DataBinding.FieldName = 'csJS' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 end - item - Kind = skSum - Column = Tv1Column7 + object Tv1Column18: TcxGridDBColumn + Caption = #27979#35797#25968#37327 + DataBinding.FieldName = 'csqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 end - item - Kind = skSum - Column = Tv1Column8 + object Tv1csPF: TcxGridDBColumn + Caption = #27979#35797#24179#26041 + DataBinding.FieldName = 'csPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 end - item - Kind = skSum - Column = Tv1Column9 + object Tv1pf: TcxGridDBColumn + Caption = #24179#26041 + DataBinding.FieldName = 'pf' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 end - item - Kind = skSum - Column = Tv1Column10 - end - item - Kind = skSum - end - item - Kind = skSum - end - item - Kind = skSum - Column = Tv1Column13 - end - item - Kind = skSum - Column = Tv1Column14 - end - item - Kind = skSum - end - item - Kind = skSum - end - item - Kind = skSum - Column = Tv1Column17 - end - item - Kind = skSum - Column = Tv1Column18 - end - item - Kind = skSum - Column = Tv1Column19 - end> - DataController.Summary.SummaryGroups = <> - OptionsCustomize.ColumnFiltering = False - OptionsView.Footer = True - OptionsView.GroupByBox = False - OptionsView.IndicatorWidth = 30 - Styles.IncSearch = DataLink_TatClothStk.SHuangSe - Styles.Footer = DataLink_TatClothStk.Default - Styles.Header = DataLink_TatClothStk.Default - Styles.Inactive = DataLink_TatClothStk.SHuangSe - Styles.Selection = DataLink_TatClothStk.SHuangSe - object v1Column22: TcxGridDBColumn - Caption = #36873#25321 - DataBinding.FieldName = 'SSel' - DataBinding.IsNullValueType = True - PropertiesClassName = 'TcxCheckBoxProperties' - Properties.ImmediatePost = True - Properties.NullStyle = nssUnchecked - HeaderAlignmentHorz = taCenter - Options.Sorting = False - Width = 66 end - object Tv1Column3: TcxGridDBColumn - Caption = #21697#21517 - DataBinding.FieldName = 'C_Name' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Options.Editing = False - Width = 66 + object cxGrid1Level1: TcxGridLevel + GridView = Tv1 end - object Tv1issp: TcxGridDBColumn - Caption = #21452#21943 - DataBinding.FieldName = 'issp' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 80 - end - object Tv1Column2: TcxGridDBColumn - Caption = #38376#24133 - DataBinding.FieldName = 'C_width' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 72 - end - object Tv1Column4: TcxGridDBColumn - Caption = #20811#37325 - DataBinding.FieldName = 'C_GramWeight' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 66 - end - object Tv1Column6: TcxGridDBColumn - Caption = #20248#31561#21367#25968 - DataBinding.FieldName = 'YDJs' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 74 - end - object Tv1Column1: TcxGridDBColumn - Caption = #20248#31561#31859#25968 - DataBinding.FieldName = 'Ydqty' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 80 - end - object Tv1Column5: TcxGridDBColumn - Caption = #20248#31561#24179#26041 - DataBinding.FieldName = 'YdPF' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 80 - end - object Tv1Column7: TcxGridDBColumn - Caption = #20108#31561#21367#25968 - DataBinding.FieldName = 'edJS' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 80 - end - object Tv1Column8: TcxGridDBColumn - Caption = #20108#31561#31859#25968 - DataBinding.FieldName = 'edqty' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 80 - end - object Tv1Column11: TcxGridDBColumn - Caption = #20108#31561#24179#26041 - DataBinding.FieldName = 'edPF' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 80 - end - object Tv1Column9: TcxGridDBColumn - Caption = #23567#21367#21367#25968 - DataBinding.FieldName = 'xjJS' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 80 - end - object Tv1Column10: TcxGridDBColumn - Caption = #23567#21367#25968#37327 - DataBinding.FieldName = 'xjqty' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 80 - end - object Tv1Column12: TcxGridDBColumn - Caption = #23567#21367#24179#26041 - DataBinding.FieldName = 'xjPF' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 80 - end - object Tv1Column13: TcxGridDBColumn - Caption = #20998#20999#21367#25968 - DataBinding.FieldName = 'fqJS' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 80 - end - object Tv1Column14: TcxGridDBColumn - Caption = #20998#20999#24067#25968#37327 - DataBinding.FieldName = 'fqqty' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 80 - end - object Tv1Column15: TcxGridDBColumn - Caption = #20998#20999#24179#26041 - DataBinding.FieldName = 'fqPF' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 80 - end - object Tv1Column17: TcxGridDBColumn - Caption = #27979#35797#21367#25968 - DataBinding.FieldName = 'csJS' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 80 - end - object Tv1Column18: TcxGridDBColumn - Caption = #27979#35797#25968#37327 - DataBinding.FieldName = 'csqty' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 80 - end - object Tv1Column16: TcxGridDBColumn - Caption = #27979#35797#24179#26041 - DataBinding.FieldName = 'csPF' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 80 - end - object Tv1Column19: TcxGridDBColumn - Caption = #24179#26041 - DataBinding.FieldName = 'pf' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 71 - end - end - object cxGrid1Level1: TcxGridLevel - GridView = Tv1 end end inherited ADOQueryBaseCmd: TADOQuery @@ -542,25 +566,25 @@ inherited frmTatClothStkHZList: TfrmTatClothStkHZList end object DS_1: TDataSource DataSet = CDS_1 - Left = 828 - Top = 284 + Left = 708 + Top = 156 end object GPM_1: TcxGridPopupMenu Grid = cxGrid1 PopupMenus = <> - Left = 728 - Top = 288 + Left = 608 + Top = 136 end object CDS_1: TClientDataSet Aggregates = <> Params = <> BeforeOpen = CDS_1BeforeOpen - Left = 776 - Top = 284 + Left = 552 + Top = 140 end object PM_1: TPopupMenu - Left = 560 - Top = 384 + Left = 368 + Top = 248 object N1: TMenuItem Caption = #20840#36873 OnClick = N1Click @@ -569,5 +593,13 @@ inherited frmTatClothStkHZList: TfrmTatClothStkHZList Caption = #20840#24323 OnClick = PM11Click end + object N2: TMenuItem + Caption = #22797#21046 + OnClick = N2Click + end + object N3: TMenuItem + Caption = #22797#21046#27880#33050 + OnClick = N3Click + end end end diff --git a/E04梭织坯布仓库/U_TatClothStkHZList.pas b/E04梭织坯布仓库/U_TatClothStkHZList.pas index 998d57f..22885f6 100644 --- a/E04梭织坯布仓库/U_TatClothStkHZList.pas +++ b/E04梭织坯布仓库/U_TatClothStkHZList.pas @@ -40,11 +40,14 @@ type PM_1: TPopupMenu; PM11: TMenuItem; N1: TMenuItem; + C_GramWeight: TEdit; + label11: TLabel; + Panel2: TPanel; cxGrid1: TcxGrid; Tv1: TcxGridDBTableView; v1Column22: TcxGridDBColumn; Tv1Column3: TcxGridDBColumn; - Tv1Column2: TcxGridDBColumn; + Tv1issp: TcxGridDBColumn; Tv1Column4: TcxGridDBColumn; Tv1Column6: TcxGridDBColumn; Tv1Column1: TcxGridDBColumn; @@ -56,18 +59,16 @@ type Tv1Column14: TcxGridDBColumn; Tv1Column17: TcxGridDBColumn; Tv1Column18: TcxGridDBColumn; - Tv1Column19: TcxGridDBColumn; cxGrid1Level1: TcxGridLevel; - C_GramWeight: TEdit; - label12: TLabel; - C_width: TEdit; - label11: TLabel; - Tv1Column5: TcxGridDBColumn; - Tv1Column11: TcxGridDBColumn; - Tv1Column12: TcxGridDBColumn; - Tv1Column15: TcxGridDBColumn; - Tv1Column16: TcxGridDBColumn; - Tv1issp: TcxGridDBColumn; + N2: TMenuItem; + Tv1pf: TcxGridDBColumn; + Tv1YdPF: TcxGridDBColumn; + Tv1edPF: TcxGridDBColumn; + Tv1xjPF: TcxGridDBColumn; + Tv1fqPF: TcxGridDBColumn; + Tv1csPF: TcxGridDBColumn; + N3: TMenuItem; + ToolButton1: TToolButton; procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormCreate(Sender: TObject); procedure TBRafreshClick(Sender: TObject); @@ -91,11 +92,17 @@ type procedure N1Click(Sender: TObject); procedure IsJYTimeClick(Sender: TObject); procedure C_NameKeyPress(Sender: TObject; var Key: Char); + + procedure N2Click(Sender: TObject); + procedure Tv1DblClick(Sender: TObject); + procedure N3Click(Sender: TObject); private CurrentPage, RecordsNumber: Integer; lstCust: TStringList; procedure InitGrid(); procedure SetStatus(); + procedure CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); + { Private declarations } public canshu1: string; @@ -105,7 +112,7 @@ type implementation uses - U_DataLink, U_RTFun, U_LabelPrint; + U_DataLink, U_RTFun, U_LabelPrint, U_TatClothStkHZList2; {$R *.dfm} @@ -152,7 +159,7 @@ begin Close; sql.Clear; - sql.Add('select A.C_NAME, A.C_width,A.C_GramWeight '); + sql.Add('select A.C_NAME ,A.C_GramWeight'); SQL.Add(',pf=SUM(A.meter/100*CAST(A.C_WIDTH AS DECIMAL(18,2)))'); SQL.Add(',SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN 1 ELSE 0 END )AS YDJS'); SQL.Add(',SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN A.meter ELSE 0 END )AS Ydqty'); @@ -174,12 +181,12 @@ begin SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END )AS csJS'); SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN A.meter ELSE 0 END )AS csqty'); SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN A.meter/100*CAST(A.C_WIDTH AS DECIMAL(18,2)) ELSE 0 END )AS csPF'); - sql.Add(', A.issp '); + sql.Add(', issp=isnull(A.issp,'''') '); SQL.Add('from V_Tat_Cloth_stk A where 1=1 ' + WSql); - sql.Add(' group by A.C_NAME, A.C_width,A.C_GramWeight,issp'); - SQL.Add(' order by A.C_NAME, A.C_width,A.C_GramWeight'); + sql.Add(' group by A.C_NAME,A.C_GramWeight,isnull(A.issp,'''') '); + SQL.Add(' order by A.C_NAME,A.C_GramWeight,isnull(A.issp,'''') '); // showmessage(sql.text); Open; @@ -194,6 +201,8 @@ begin end; + + procedure TfrmTatClothStkHZList.IsJYTimeClick(Sender: TObject); begin inherited; @@ -247,6 +256,7 @@ begin inherited; ReadCxGrid(trim(self.Caption) + 'Tv1', Tv1, 'Ʒ'); + CurrentPage := 1; RecordsNumber := 500; canshu1 := Trim(Self.fParameters1); @@ -259,7 +269,16 @@ procedure TfrmTatClothStkHZList.TBExportClick(Sender: TObject); begin if ADOQueryMain.IsEmpty then exit; + + with CDS_1 do + begin + Filtered := false; + Filter := ' ssel = 1'; + Filtered := true; + end; TcxGridToExcel(Self.Caption, cxGrid1); + InitGrid(); + end; procedure TfrmTatClothStkHZList.orderNoKeyPress(Sender: TObject; var Key: Char); @@ -281,6 +300,27 @@ begin lstCust.Clear; end; +procedure TfrmTatClothStkHZList.Tv1DblClick(Sender: TObject); +begin + if CDS_1.IsEmpty then + Exit; + try + frmTatClothStkHZList2 := TfrmTatClothStkHZList2.Create(Application); + with frmTatClothStkHZList2 do + begin + + fC_Name := Self.CDS_1.FieldByName('C_Name').AsString; + fissp := Self.CDS_1.FieldByName('issp').AsString; + if ShowModal = 1 then + begin + + end; + end; + finally + frmTatClothStkHZList2.Free; + end; +end; + procedure TfrmTatClothStkHZList.Tv1TcxGridDBDataControllerTcxDataSummaryFooterSummaryItems6GetText(Sender: TcxDataSummaryItem; const AValue: Variant; AIsFooter: Boolean; var AText: string); begin if lstCust <> nil then @@ -320,6 +360,37 @@ begin SelOKNo(CDS_1, true); end; +procedure TfrmTatClothStkHZList.N2Click(Sender: TObject); +begin + Clipboard.SetTextBuf(PChar(Trim(CDS_1.fieldbyname(TV1.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString))); + +end; + +procedure TfrmTatClothStkHZList.N3Click(Sender: TObject); +begin + + CopyColumnSummaryToClipboard(TV1.Controller.FocusedColumn); +end; + +procedure TfrmTatClothStkHZList.CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); +var + AView: TcxGridDBTableView; + SummaryIndex: Integer; + SummaryText: string; +begin + AView := Tv1; + + // ָеĻ + SummaryIndex := AView.DataController.Summary.FooterSummaryItems.IndexOfItemLink(AColumn); + if SummaryIndex <> -1 then + begin + SummaryText := AView.DataController.Summary.FooterSummaryTexts[SummaryIndex]; + Clipboard.AsText := SummaryText; + end + else + ShowMessage('δҵеĻ'); +end; + procedure TfrmTatClothStkHZList.ToolButton2Click(Sender: TObject); var WSql: string; @@ -373,6 +444,7 @@ end; procedure TfrmTatClothStkHZList.ToolButton4Click(Sender: TObject); begin WriteCxGrid(trim(self.Caption) + 'Tv1', Tv1, 'Ʒ'); + end; end. diff --git a/E04梭织坯布仓库/U_TatClothStkHZList2.dfm b/E04梭织坯布仓库/U_TatClothStkHZList2.dfm new file mode 100644 index 0000000..a11d722 --- /dev/null +++ b/E04梭织坯布仓库/U_TatClothStkHZList2.dfm @@ -0,0 +1,635 @@ +inherited frmTatClothStkHZList2: TfrmTatClothStkHZList2 + Left = 184 + Top = 138 + Caption = #25104#21697#24211#23384#27719#24635#21015#34920'2' + ClientHeight = 600 + ClientWidth = 1540 + Position = poDesigned + WindowState = wsMaximized + ExplicitWidth = 1556 + ExplicitHeight = 639 + PixelsPerInch = 96 + TextHeight = 13 + object ToolBar1: TToolBar [0] + Tag = 1 + Left = 0 + Top = 0 + Width = 1540 + Height = 38 + AutoSize = True + ButtonHeight = 38 + ButtonWidth = 91 + Caption = 'ToolBar1' + Color = clWhite + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [] + Images = DataLink_TatClothStk.ImageList_new32 + List = True + ParentColor = False + ParentFont = False + ShowCaptions = True + TabOrder = 0 + object TBRafresh: TToolButton + Left = 0 + Top = 0 + AutoSize = True + Caption = #21047#26032 + ImageIndex = 1 + OnClick = TBRafreshClick + end + object TBExport: TToolButton + Left = 71 + Top = 0 + AutoSize = True + Caption = #23548#20986 + ImageIndex = 20 + OnClick = TBExportClick + end + object ToolButton4: TToolButton + Left = 142 + Top = 0 + AutoSize = True + Caption = #20445#23384#26684#24335 + ImageIndex = 16 + OnClick = ToolButton4Click + end + object TBClose: TToolButton + Left = 237 + Top = 0 + AutoSize = True + Caption = #20851#38381 + ImageIndex = 7 + OnClick = TBCloseClick + end + end + object Panel1: TPanel [1] + Left = 0 + Top = 38 + Width = 1540 + Height = 67 + Align = alTop + BevelInner = bvRaised + BevelOuter = bvLowered + Color = clWhite + ParentBackground = False + TabOrder = 1 + object Label2: TLabel + Left = 70 + Top = 36 + Width = 12 + Height = 13 + Caption = #33267 + end + object Label5: TLabel + Left = 190 + Top = 10 + Width = 39 + Height = 12 + Hint = '0' + Caption = #20135#21697#21517 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object label11: TLabel + Left = 358 + Top = 10 + Width = 26 + Height = 12 + Hint = '0' + Caption = #20811#37325 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object label12: TLabel + Left = 190 + Top = 35 + Width = 26 + Height = 12 + Hint = '0' + Caption = #38376#24133 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object BegDate: TDateTimePicker + Left = 88 + Top = 6 + Width = 87 + Height = 20 + Date = 40768.000000000000000000 + Time = 0.458268587972270300 + TabOrder = 1 + end + object EndDate: TDateTimePicker + Left = 88 + Top = 32 + Width = 87 + Height = 20 + Date = 40768.000000000000000000 + Time = 0.458268587972270300 + TabOrder = 2 + end + object begtime: TDateTimePicker + Left = 137 + Top = 132 + Width = 55 + Height = 20 + Date = 39780.000000000000000000 + Format = 'HH:mm' + Time = 39780.000000000000000000 + Kind = dtkTime + TabOrder = 3 + end + object endTime: TDateTimePicker + Left = 137 + Top = 156 + Width = 55 + Height = 20 + Date = 39780.000000000000000000 + Format = 'HH:mm' + Time = 0.999317129630071600 + Kind = dtkTime + TabOrder = 4 + end + object IsJYTime: TCheckBox + Left = 14 + Top = 8 + Width = 73 + Height = 17 + Caption = #26597#35810#26085#26399 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + TabOrder = 0 + OnClick = IsJYTimeClick + end + object C_Name: TEdit + Tag = 2 + Left = 237 + Top = 6 + Width = 100 + Height = 21 + Hint = '0' + TabOrder = 5 + OnKeyPress = C_NameKeyPress + end + object C_GramWeight: TEdit + Tag = 2 + Left = 390 + Top = 6 + Width = 100 + Height = 21 + Hint = '0' + TabOrder = 6 + OnKeyPress = C_NameKeyPress + end + object C_width: TEdit + Tag = 2 + Left = 237 + Top = 32 + Width = 100 + Height = 21 + Hint = '0' + TabOrder = 7 + OnKeyPress = C_NameKeyPress + end + end + object Panel2: TPanel [2] + Left = 0 + Top = 105 + Width = 1540 + Height = 495 + Align = alClient + TabOrder = 2 + object cxGrid2: TcxGrid + Left = 1 + Top = 1 + Width = 1538 + Height = 493 + Align = alClient + BorderStyle = cxcbsNone + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [] + ParentFont = False + PopupMenu = PM_1 + TabOrder = 0 + object Tv2: TcxGridDBTableView + Navigator.Buttons.CustomButtons = <> + ScrollbarAnnotations.CustomAnnotations = <> + DataController.DataSource = DS_2 + DataController.Filter.AutoDataSetFilter = True + DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost] + DataController.Summary.DefaultGroupSummaryItems = <> + DataController.Summary.FooterSummaryItems = < + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skCount + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Format = #26816#39564#31995#25968'=#.##' + Kind = skAverage + end + item + Format = #25442#31639#31995#25968'=#.##' + Kind = skAverage + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + Column = cxGridDBColumn6 + end + item + Kind = skSum + Column = cxGridDBColumn7 + end + item + Kind = skSum + Column = cxGridDBColumn9 + end + item + Kind = skSum + Column = cxGridDBColumn10 + end + item + Kind = skSum + Column = cxGridDBColumn12 + end + item + Kind = skSum + Column = cxGridDBColumn13 + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + Column = cxGridDBColumn15 + end + item + Kind = skSum + Column = cxGridDBColumn16 + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + Column = cxGridDBColumn18 + end + item + Kind = skSum + Column = cxGridDBColumn19 + end + item + Kind = skSum + Column = cxGridDBColumn21 + end + item + Kind = skSum + Column = cxGridDBColumn14 + end + item + Kind = skSum + Column = cxGridDBColumn11 + end + item + Kind = skSum + Column = cxGridDBColumn8 + end + item + Kind = skSum + Column = cxGridDBColumn17 + end + item + Kind = skSum + Column = cxGridDBColumn20 + end> + DataController.Summary.SummaryGroups = <> + OptionsCustomize.ColumnFiltering = False + OptionsView.Footer = True + OptionsView.GroupByBox = False + OptionsView.IndicatorWidth = 30 + Styles.IncSearch = DataLink_TatClothStk.SHuangSe + Styles.Footer = DataLink_TatClothStk.Default + Styles.Header = DataLink_TatClothStk.Default + Styles.Inactive = DataLink_TatClothStk.SHuangSe + Styles.Selection = DataLink_TatClothStk.SHuangSe + object cxGridDBColumn1: TcxGridDBColumn + Caption = #36873#25321 + DataBinding.FieldName = 'SSel' + DataBinding.IsNullValueType = True + PropertiesClassName = 'TcxCheckBoxProperties' + Properties.ImmediatePost = True + Properties.NullStyle = nssUnchecked + HeaderAlignmentHorz = taCenter + Options.Sorting = False + Width = 66 + end + object cxGridDBColumn2: TcxGridDBColumn + Caption = #21697#21517 + DataBinding.FieldName = 'C_Name' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 66 + end + object cxGridDBColumn3: TcxGridDBColumn + Caption = #21452#21943 + DataBinding.FieldName = 'issp' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn4: TcxGridDBColumn + Caption = #38376#24133 + DataBinding.FieldName = 'C_width' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 72 + end + object cxGridDBColumn5: TcxGridDBColumn + Caption = #20811#37325 + DataBinding.FieldName = 'C_GramWeight' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 66 + end + object cxGridDBColumn6: TcxGridDBColumn + Caption = #20248#31561#21367#25968 + DataBinding.FieldName = 'YDJs' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 74 + end + object cxGridDBColumn7: TcxGridDBColumn + Caption = #20248#31561#31859#25968 + DataBinding.FieldName = 'Ydqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn8: TcxGridDBColumn + Caption = #20248#31561#24179#26041 + DataBinding.FieldName = 'YdPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn9: TcxGridDBColumn + Caption = #20108#31561#21367#25968 + DataBinding.FieldName = 'edJS' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn10: TcxGridDBColumn + Caption = #20108#31561#31859#25968 + DataBinding.FieldName = 'edqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn11: TcxGridDBColumn + Caption = #20108#31561#24179#26041 + DataBinding.FieldName = 'edPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn12: TcxGridDBColumn + Caption = #23567#21367#21367#25968 + DataBinding.FieldName = 'xjJS' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn13: TcxGridDBColumn + Caption = #23567#21367#25968#37327 + DataBinding.FieldName = 'xjqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn14: TcxGridDBColumn + Caption = #23567#21367#24179#26041 + DataBinding.FieldName = 'xjPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn15: TcxGridDBColumn + Caption = #20998#20999#21367#25968 + DataBinding.FieldName = 'fqJS' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn16: TcxGridDBColumn + Caption = #20998#20999#24067#25968#37327 + DataBinding.FieldName = 'fqqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn17: TcxGridDBColumn + Caption = #20998#20999#24179#26041 + DataBinding.FieldName = 'fqPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn18: TcxGridDBColumn + Caption = #27979#35797#21367#25968 + DataBinding.FieldName = 'csJS' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn19: TcxGridDBColumn + Caption = #27979#35797#25968#37327 + DataBinding.FieldName = 'csqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn20: TcxGridDBColumn + Caption = #27979#35797#24179#26041 + DataBinding.FieldName = 'csPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object cxGridDBColumn21: TcxGridDBColumn + Caption = #24179#26041 + DataBinding.FieldName = 'pf' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 71 + end + end + object cxGridLevel1: TcxGridLevel + GridView = Tv2 + end + end + end + inherited ADOQueryBaseCmd: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + Left = 553 + Top = 200 + end + inherited ADOQueryBaseTemp: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + Left = 425 + Top = 201 + end + object ADOQueryCmd: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + CommandTimeout = 600 + Parameters = <> + Left = 148 + Top = 280 + end + object ADOQueryMain: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + LockType = ltReadOnly + Parameters = <> + Left = 252 + Top = 260 + end + object ADOQueryTemp: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + LockType = ltReadOnly + CommandTimeout = 600 + Parameters = <> + Left = 112 + Top = 204 + end + object DS_1: TDataSource + DataSet = CDS_1 + Left = 708 + Top = 156 + end + object GPM_1: TcxGridPopupMenu + Grid = cxGrid2 + PopupMenus = <> + Left = 608 + Top = 136 + end + object CDS_1: TClientDataSet + Aggregates = <> + Params = <> + BeforeOpen = CDS_1BeforeOpen + Left = 552 + Top = 140 + end + object PM_1: TPopupMenu + Left = 368 + Top = 248 + object N1: TMenuItem + Caption = #20840#36873 + OnClick = N1Click + end + object PM11: TMenuItem + Caption = #20840#24323 + OnClick = PM11Click + end + object N2: TMenuItem + Caption = #22797#21046 + OnClick = N2Click + end + object N3: TMenuItem + Caption = #22797#21046#27880#33050 + OnClick = N3Click + end + end + object CDS_2: TClientDataSet + Aggregates = <> + Params = <> + BeforeOpen = CDS_1BeforeOpen + Left = 552 + Top = 276 + end + object DS_2: TDataSource + DataSet = CDS_2 + Left = 708 + Top = 292 + end +end diff --git a/E04梭织坯布仓库/U_TatClothStkHZList2.pas b/E04梭织坯布仓库/U_TatClothStkHZList2.pas new file mode 100644 index 0000000..36b6a64 --- /dev/null +++ b/E04梭织坯布仓库/U_TatClothStkHZList2.pas @@ -0,0 +1,441 @@ +unit U_TatClothStkHZList2; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage, + cxEdit, DB, cxDBData, cxGridCustomTableView, cxGridTableView, + cxGridBandedTableView, cxGridDBBandedTableView, cxGridLevel, cxClasses, + cxControls, cxGridCustomView, cxGridDBTableView, cxGrid, StdCtrls, ComCtrls, + ExtCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, ADODB, DBClient, + cxDropDownEdit, cxCheckBox, RM_Common, RM_Class, RM_e_Xls, RM_Dataset, + RM_System, RM_GridReport, Menus, cxCalendar, MovePanel, Math, Clipbrd, + cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, cxTextEdit, dxSkinsCore, + dxSkinsDefaultPainters, dxDateRanges, dxBarBuiltInMenu, U_BaseInput, cxPC, + System.StrUtils, dxScrollbarAnnotations, U_BaseList, System.ImageList, + Vcl.ImgList; + +type + TfrmTatClothStkHZList2 = class(TfrmBaseInput) + ToolBar1: TToolBar; + TBRafresh: TToolButton; + TBExport: TToolButton; + TBClose: TToolButton; + Panel1: TPanel; + ADOQueryCmd: TADOQuery; + ADOQueryMain: TADOQuery; + ADOQueryTemp: TADOQuery; + DS_1: TDataSource; + GPM_1: TcxGridPopupMenu; + Label2: TLabel; + BegDate: TDateTimePicker; + EndDate: TDateTimePicker; + CDS_1: TClientDataSet; + begtime: TDateTimePicker; + endTime: TDateTimePicker; + IsJYTime: TCheckBox; + ToolButton4: TToolButton; + Label5: TLabel; + C_Name: TEdit; + PM_1: TPopupMenu; + PM11: TMenuItem; + N1: TMenuItem; + C_GramWeight: TEdit; + label12: TLabel; + C_width: TEdit; + label11: TLabel; + Panel2: TPanel; + cxGrid2: TcxGrid; + Tv2: TcxGridDBTableView; + cxGridDBColumn1: TcxGridDBColumn; + cxGridDBColumn2: TcxGridDBColumn; + cxGridDBColumn3: TcxGridDBColumn; + cxGridDBColumn4: TcxGridDBColumn; + cxGridDBColumn5: TcxGridDBColumn; + cxGridDBColumn6: TcxGridDBColumn; + cxGridDBColumn7: TcxGridDBColumn; + cxGridDBColumn8: TcxGridDBColumn; + cxGridDBColumn9: TcxGridDBColumn; + cxGridDBColumn10: TcxGridDBColumn; + cxGridDBColumn11: TcxGridDBColumn; + cxGridDBColumn12: TcxGridDBColumn; + cxGridDBColumn13: TcxGridDBColumn; + cxGridDBColumn14: TcxGridDBColumn; + cxGridDBColumn15: TcxGridDBColumn; + cxGridDBColumn16: TcxGridDBColumn; + cxGridDBColumn17: TcxGridDBColumn; + cxGridDBColumn18: TcxGridDBColumn; + cxGridDBColumn19: TcxGridDBColumn; + cxGridDBColumn20: TcxGridDBColumn; + cxGridDBColumn21: TcxGridDBColumn; + cxGridLevel1: TcxGridLevel; + CDS_2: TClientDataSet; + DS_2: TDataSource; + N2: TMenuItem; + N3: TMenuItem; + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure TBRafreshClick(Sender: TObject); + procedure ConNoMChange(Sender: TObject); + procedure TBCloseClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure TBExportClick(Sender: TObject); + procedure orderNoKeyPress(Sender: TObject; var Key: Char); + procedure BTNPClick(Sender: TObject); + procedure BTLPClick(Sender: TObject); + procedure TCBNORChange(Sender: TObject); + procedure JYTypeChange(Sender: TObject); + procedure ToolButton2Click(Sender: TObject); + procedure cxPageControl1Change(Sender: TObject); + procedure CDS_1BeforeOpen(DataSet: TDataSet); + procedure Tv1DataControllerFilterBeforeChange(Sender: TcxDBDataFilterCriteria; ADataSet: TDataSet; const AFilterText: string); + + procedure Tv1TcxGridDBDataControllerTcxDataSummaryFooterSummaryItems6GetText(Sender: TcxDataSummaryItem; const AValue: Variant; AIsFooter: Boolean; var AText: string); + procedure ToolButton4Click(Sender: TObject); + procedure PM11Click(Sender: TObject); + procedure N1Click(Sender: TObject); + procedure IsJYTimeClick(Sender: TObject); + procedure C_NameKeyPress(Sender: TObject; var Key: Char); + procedure N2Click(Sender: TObject); + procedure N3Click(Sender: TObject); + private + CurrentPage, RecordsNumber: Integer; + lstCust: TStringList; + procedure InitGrid(); + procedure SetStatus(); + procedure CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); + + { Private declarations } + public + fC_Name: string; + fissp : string; + { Public declarations } + end; + +var + frmTatClothStkHZList2: TfrmTatClothStkHZList2; + +implementation + +uses + U_DataLink, U_RTFun, U_LabelPrint; + +{$R *.dfm} + +procedure TfrmTatClothStkHZList2.SetStatus(); +begin + +end; + +procedure TfrmTatClothStkHZList2.FormClose(Sender: TObject; var Action: TCloseAction); +begin + inherited; + FreeAndNil(lstCust); + Action := caFree; +end; + +procedure TfrmTatClothStkHZList2.FormCreate(Sender: TObject); +begin + inherited; + lstCust := TStringList.Create; + EndDate.DateTime := SGetServerDateTime(ADOQueryTemp); + BegDate.DateTime := EndDate.DateTime - 20; +end; + +procedure TfrmTatClothStkHZList2.InitGrid(); +var + WSql: string; +begin + + WSql := SGetFilters(Panel1, 1, 2); + if Trim(WSql) <> '' then + WSql := ' and ' + WSql; + if IsJYTime.Checked then + begin + WSql := WSql + ' and IOTime>=' + quotedstr(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)); + WSql := WSql + ' and IOTime<' + quotedstr(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1)); + end; + + try + ADOQueryMain.DisableControls; + + with ADOQueryMain do + begin + Filtered := False; + Close; + sql.Clear; + + sql.Add('select A.C_NAME, A.C_width,A.C_GramWeight '); + SQL.Add(',pf=SUM(A.meter/100*CAST(A.C_WIDTH AS DECIMAL(18,2)))'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN 1 ELSE 0 END )AS YDJS'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN A.meter ELSE 0 END )AS Ydqty'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN A.meter/100*CAST(A.C_WIDTH AS DECIMAL(18,2)) ELSE 0 END )AS YdPF'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''Ʒ'' THEN 1 ELSE 0 END )AS edJS'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''Ʒ'' THEN A.meter ELSE 0 END )AS edqty'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''Ʒ'' THEN A.meter/100*CAST(A.C_WIDTH AS DECIMAL(18,2)) ELSE 0 END )AS edPF'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''С'' THEN 1 ELSE 0 END )AS xjJS'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''С'' THEN A.meter ELSE 0 END )AS xjqty'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''С'' THEN A.meter/100*CAST(A.C_WIDTH AS DECIMAL(18,2)) ELSE 0 END )AS xjPF'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''ϲ'' THEN 1 ELSE 0 END )AS fbJS'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''ϲ'' THEN A.meter ELSE 0 END )AS fbqty'); +// SQL.Add(',SUM(CASE WHEN GRADE=''ϲ'' THEN meter/100*CAST(C_WIDTH AS DECIMAL(18,2)) ELSE 0 END )AS fbPF'); + SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END )AS fqJS'); + SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN A.meter ELSE 0 END )AS fqqty'); + SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN A.meter/100*CAST(A.C_WIDTH AS DECIMAL(18,2)) ELSE 0 END )AS fqPF'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''ѭ'' THEN 1 ELSE 0 END )AS xhJS'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''ѭ'' THEN A.meter ELSE 0 END )AS xhqty'); + SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END )AS csJS'); + SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN A.meter ELSE 0 END )AS csqty'); + SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN A.meter/100*CAST(A.C_WIDTH AS DECIMAL(18,2)) ELSE 0 END )AS csPF'); + sql.Add(', issp=isnull(A.issp,'''') '); + + SQL.Add('from V_Tat_Cloth_stk A where 1=1 and C_NAME=' + QuotedStr(Trim(fC_Name))); + if fissp <> '' then + begin + SQL.Add(' and isnull(issp,'''') = ''˫''' ); + end + else + begin + SQL.Add(' and isnull(issp,'''') <> ''˫'' ' ); + end; + + + + SQL.Add(WSql); + sql.Add(' group by A.C_NAME, A.C_width,A.C_GramWeight,isnull(A.issp,'''') '); + SQL.Add(' order by A.C_NAME, CAST(A.C_Width AS DECIMAL(10,2)),A.C_GramWeight'); + +// showmessage(sql.text); + Open; + end; + SCreateCDS(ADOQueryMain, CDS_2); + SInitCDSData(ADOQueryMain, CDS_2); + + finally + ADOQueryMain.EnableControls; + TV2.DataController.Filter.Clear; + end; + +end; + +procedure TfrmTatClothStkHZList2.IsJYTimeClick(Sender: TObject); +begin + inherited; + InitGrid(); +end; + +procedure TfrmTatClothStkHZList2.TBRafreshClick(Sender: TObject); +begin + CurrentPage := 1; + InitGrid(); +end; + +procedure TfrmTatClothStkHZList2.CDS_1BeforeOpen(DataSet: TDataSet); +begin + + lstCust.Clear; +end; + +procedure TfrmTatClothStkHZList2.ConNoMChange(Sender: TObject); +begin + if ADOQueryMain.Active then + begin + SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2)); + end; +end; + +procedure TfrmTatClothStkHZList2.cxPageControl1Change(Sender: TObject); +begin + CurrentPage := 1; + SetStatus(); + InitGrid(); +end; + +procedure TfrmTatClothStkHZList2.C_NameKeyPress(Sender: TObject; var Key: Char); +begin + inherited; + if Key = #13 then + begin + InitGrid(); + end; +end; + +procedure TfrmTatClothStkHZList2.TBCloseClick(Sender: TObject); +begin + + Close; +end; + +procedure TfrmTatClothStkHZList2.FormShow(Sender: TObject); +begin + inherited; + ReadCxGrid(trim(self.Caption) + 'Tv2', Tv2, 'Ʒ2'); + CurrentPage := 1; + RecordsNumber := 500; + + SetStatus(); + InitGrid(); +end; + +procedure TfrmTatClothStkHZList2.TBExportClick(Sender: TObject); +begin + if ADOQueryMain.IsEmpty then + exit; + with CDS_2 do + begin + Filtered := false; + Filter := ' ssel = 1'; + Filtered := true; + end; + TcxGridToExcel(Self.Caption, cxGrid2); + InitGrid(); +end; + +procedure TfrmTatClothStkHZList2.orderNoKeyPress(Sender: TObject; var Key: Char); +begin + if Key = #13 then + begin + CurrentPage := 1; + InitGrid(); + end; +end; + +procedure TfrmTatClothStkHZList2.PM11Click(Sender: TObject); +begin + SelOKNo(CDS_2, false); +end; + +procedure TfrmTatClothStkHZList2.Tv1DataControllerFilterBeforeChange(Sender: TcxDBDataFilterCriteria; ADataSet: TDataSet; const AFilterText: string); +begin + lstCust.Clear; +end; + +procedure TfrmTatClothStkHZList2.Tv1TcxGridDBDataControllerTcxDataSummaryFooterSummaryItems6GetText(Sender: TcxDataSummaryItem; const AValue: Variant; AIsFooter: Boolean; var AText: string); +begin + if lstCust <> nil then + AText := IntToStr(lstCust.Count); +end; + +procedure TfrmTatClothStkHZList2.BTNPClick(Sender: TObject); +begin + if CurrentPage < CDS_1.FieldByName('TotalCount').AsInteger / RecordsNumber then + CurrentPage := CurrentPage + 1; + InitGrid(); +end; + +procedure TfrmTatClothStkHZList2.BTLPClick(Sender: TObject); +begin + if CurrentPage > 1 then + CurrentPage := CurrentPage - 1; + InitGrid(); +end; + +procedure TfrmTatClothStkHZList2.TCBNORChange(Sender: TObject); +begin + + CurrentPage := 1; + InitGrid(); +end; + +procedure TfrmTatClothStkHZList2.JYTypeChange(Sender: TObject); +begin + CurrentPage := 1; + InitGrid(); +end; + +procedure TfrmTatClothStkHZList2.N1Click(Sender: TObject); +begin + + SelOKNo(CDS_2, true); +end; + +procedure TfrmTatClothStkHZList2.N2Click(Sender: TObject); +begin + Clipboard.SetTextBuf(PChar(Trim(CDS_2.fieldbyname(TV2.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString))); + +end; + +procedure TfrmTatClothStkHZList2.N3Click(Sender: TObject); +begin + + CopyColumnSummaryToClipboard(TV2.Controller.FocusedColumn); +end; + +procedure TfrmTatClothStkHZList2.CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); +var + AView: TcxGridDBTableView; + SummaryIndex: Integer; + SummaryText: string; +begin + AView := Tv2; + + // ָеĻ + SummaryIndex := AView.DataController.Summary.FooterSummaryItems.IndexOfItemLink(AColumn); + if SummaryIndex <> -1 then + begin + SummaryText := AView.DataController.Summary.FooterSummaryTexts[SummaryIndex]; + Clipboard.AsText := SummaryText; + end + else + ShowMessage('δҵеĻ'); +end; + +procedure TfrmTatClothStkHZList2.ToolButton2Click(Sender: TObject); +var + WSql: string; +begin + if CDS_1.IsEmpty then + Exit; + if not CDS_1.Locate('SSel', True, []) then + begin + Application.MessageBox('ûѡ!', 'ʾ', 0); + Exit; + end; + WSql := ''; + CDS_1.DisableControls; + with CDS_1 do + begin + First; + while not Eof do + begin + if CDS_1.fieldbyname('SSel').AsBoolean then + begin + if WSql <> '' then + begin + WSql := WSql + ',' + QuotedStr(Trim(CDS_1.fieldbyname('CIID').AsString)); + end + else + begin + WSql := QuotedStr(Trim(CDS_1.fieldbyname('CIID').AsString)); + end; + end; + Next; + end; + end; + CDS_1.Locate('SSel', True, []); + CDS_1.EnableControls; + try + frmLabelPrint := TfrmLabelPrint.Create(Application); + with frmLabelPrint do + begin + FLMType := 'TradeClothStk'; + FFiltration1 := WSql; + if ShowModal = 1 then + begin + + end; + end; + finally + frmLabelPrint.Free; + end; +end; + +procedure TfrmTatClothStkHZList2.ToolButton4Click(Sender: TObject); +begin + + WriteCxGrid(trim(self.Caption) + 'Tv2', Tv2, 'Ʒ2'); +end; + +end. + diff --git a/E04梭织坯布仓库/U_TatClothStkHZList3.dfm b/E04梭织坯布仓库/U_TatClothStkHZList3.dfm new file mode 100644 index 0000000..55dd619 --- /dev/null +++ b/E04梭织坯布仓库/U_TatClothStkHZList3.dfm @@ -0,0 +1,853 @@ +inherited frmTatClothStkHZList3: TfrmTatClothStkHZList3 + Left = 184 + Top = 138 + Caption = #25104#21697#24211#23384#27719#24635#21015#34920 + ClientHeight = 600 + ClientWidth = 1540 + Position = poDesigned + Visible = True + ExplicitWidth = 1556 + ExplicitHeight = 639 + PixelsPerInch = 96 + TextHeight = 12 + object ToolBar1: TToolBar [0] + Tag = 1 + Left = 0 + Top = 0 + Width = 1540 + Height = 38 + AutoSize = True + ButtonHeight = 38 + ButtonWidth = 91 + Caption = 'ToolBar1' + Color = clWhite + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [] + Images = DataLink_TatClothStk.ImageList_new32 + List = True + ParentColor = False + ParentFont = False + ShowCaptions = True + TabOrder = 0 + ExplicitLeft = -1 + object TBRafresh: TToolButton + Left = 0 + Top = 0 + AutoSize = True + Caption = #21047#26032 + ImageIndex = 1 + OnClick = TBRafreshClick + end + object TBExport: TToolButton + Left = 71 + Top = 0 + AutoSize = True + Caption = #23548#20986 + ImageIndex = 20 + OnClick = TBExportClick + end + object ToolButton4: TToolButton + Left = 142 + Top = 0 + AutoSize = True + Caption = #20445#23384#26684#24335 + ImageIndex = 16 + OnClick = ToolButton4Click + end + object TBClose: TToolButton + Left = 237 + Top = 0 + AutoSize = True + Caption = #20851#38381 + ImageIndex = 7 + OnClick = TBCloseClick + end + end + object Panel1: TPanel [1] + Left = 0 + Top = 38 + Width = 1540 + Height = 67 + Align = alTop + BevelInner = bvRaised + BevelOuter = bvLowered + Color = clWhite + ParentBackground = False + TabOrder = 1 + object Label2: TLabel + Left = 70 + Top = 36 + Width = 12 + Height = 12 + Caption = #33267 + end + object Label5: TLabel + Left = 190 + Top = 10 + Width = 39 + Height = 12 + Hint = '0' + Caption = #20135#21697#21517 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object label11: TLabel + Left = 358 + Top = 10 + Width = 26 + Height = 12 + Hint = '0' + Caption = #20811#37325 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object label12: TLabel + Left = 190 + Top = 35 + Width = 26 + Height = 12 + Hint = '0' + Caption = #38376#24133 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object BegDate: TDateTimePicker + Left = 88 + Top = 6 + Width = 87 + Height = 20 + Date = 40768.000000000000000000 + Time = 0.458268587972270300 + TabOrder = 1 + end + object EndDate: TDateTimePicker + Left = 88 + Top = 32 + Width = 87 + Height = 20 + Date = 40768.000000000000000000 + Time = 0.458268587972270300 + TabOrder = 2 + end + object begtime: TDateTimePicker + Left = 137 + Top = 132 + Width = 55 + Height = 20 + Date = 39780.000000000000000000 + Format = 'HH:mm' + Time = 39780.000000000000000000 + Kind = dtkTime + TabOrder = 3 + end + object endTime: TDateTimePicker + Left = 137 + Top = 156 + Width = 55 + Height = 20 + Date = 39780.000000000000000000 + Format = 'HH:mm' + Time = 0.999317129630071600 + Kind = dtkTime + TabOrder = 4 + end + object IsJYTime: TCheckBox + Left = 14 + Top = 8 + Width = 73 + Height = 17 + Caption = #26597#35810#26085#26399 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + TabOrder = 0 + OnClick = IsJYTimeClick + end + object C_Name: TEdit + Tag = 2 + Left = 237 + Top = 6 + Width = 100 + Height = 20 + Hint = '0' + TabOrder = 5 + OnKeyPress = C_NameKeyPress + end + object C_GramWeight: TEdit + Tag = 2 + Left = 390 + Top = 6 + Width = 100 + Height = 20 + Hint = '0' + TabOrder = 6 + OnKeyPress = C_NameKeyPress + end + object C_width: TEdit + Tag = 2 + Left = 237 + Top = 32 + Width = 100 + Height = 20 + Hint = '0' + TabOrder = 7 + OnKeyPress = C_NameKeyPress + end + end + object Panel2: TPanel [2] + Left = 0 + Top = 105 + Width = 1540 + Height = 495 + Align = alClient + TabOrder = 2 + object cxGrid1: TcxGrid + Left = 1 + Top = 1 + Width = 1538 + Height = 256 + Align = alTop + BorderStyle = cxcbsNone + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [] + ParentFont = False + PopupMenu = PM_2 + TabOrder = 0 + ExplicitTop = 6 + object Tv1: TcxGridDBTableView + Navigator.Buttons.CustomButtons = <> + ScrollbarAnnotations.CustomAnnotations = <> + OnFocusedRecordChanged = Tv1FocusedRecordChanged + DataController.DataSource = DS_1 + DataController.Filter.AutoDataSetFilter = True + DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost] + DataController.Summary.DefaultGroupSummaryItems = <> + DataController.Summary.FooterSummaryItems = < + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skCount + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Format = #26816#39564#31995#25968'=#.##' + Kind = skAverage + end + item + Format = #25442#31639#31995#25968'=#.##' + Kind = skAverage + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + Column = Tv1Column6 + end + item + Kind = skSum + Column = Tv1Column1 + end + item + Kind = skSum + Column = Tv1Column7 + end + item + Kind = skSum + Column = Tv1Column8 + end + item + Kind = skSum + Column = Tv1Column9 + end + item + Kind = skSum + Column = Tv1Column10 + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + Column = Tv1Column13 + end + item + Kind = skSum + Column = Tv1Column14 + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + Column = Tv1Column17 + end + item + Kind = skSum + Column = Tv1Column18 + end + item + Kind = skSum + end> + DataController.Summary.SummaryGroups = <> + OptionsCustomize.ColumnFiltering = False + OptionsView.Footer = True + OptionsView.GroupByBox = False + OptionsView.IndicatorWidth = 30 + Styles.IncSearch = DataLink_TatClothStk.SHuangSe + Styles.Footer = DataLink_TatClothStk.Default + Styles.Header = DataLink_TatClothStk.Default + Styles.Inactive = DataLink_TatClothStk.SHuangSe + Styles.Selection = DataLink_TatClothStk.SHuangSe + object v1Column22: TcxGridDBColumn + Caption = #36873#25321 + DataBinding.FieldName = 'SSel' + DataBinding.IsNullValueType = True + PropertiesClassName = 'TcxCheckBoxProperties' + Properties.ImmediatePost = True + Properties.NullStyle = nssUnchecked + HeaderAlignmentHorz = taCenter + Options.Sorting = False + Width = 66 + end + object Tv1Column3: TcxGridDBColumn + Caption = #21697#21517 + DataBinding.FieldName = 'C_Name' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 66 + end + object Tv1issp: TcxGridDBColumn + Caption = #21452#21943 + DataBinding.FieldName = 'issp' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end + object Tv1Column4: TcxGridDBColumn + Caption = #20811#37325 + DataBinding.FieldName = 'C_GramWeight' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 66 + end + object Tv1Column6: TcxGridDBColumn + Caption = #20248#31561#21367#25968 + DataBinding.FieldName = 'YDJs' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 74 + end + object Tv1Column1: TcxGridDBColumn + Caption = #20248#31561#31859#25968 + DataBinding.FieldName = 'Ydqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end + object Tv1Column7: TcxGridDBColumn + Caption = #20108#31561#21367#25968 + DataBinding.FieldName = 'edJS' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end + object Tv1Column8: TcxGridDBColumn + Caption = #20108#31561#31859#25968 + DataBinding.FieldName = 'edqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end + object Tv1Column9: TcxGridDBColumn + Caption = #23567#21367#21367#25968 + DataBinding.FieldName = 'xjJS' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end + object Tv1Column10: TcxGridDBColumn + Caption = #23567#21367#25968#37327 + DataBinding.FieldName = 'xjqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end + object Tv1Column13: TcxGridDBColumn + Caption = #20998#20999#21367#25968 + DataBinding.FieldName = 'fqJS' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end + object Tv1Column14: TcxGridDBColumn + Caption = #20998#20999#24067#25968#37327 + DataBinding.FieldName = 'fqqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end + object Tv1Column17: TcxGridDBColumn + Caption = #27979#35797#21367#25968 + DataBinding.FieldName = 'csJS' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end + object Tv1Column18: TcxGridDBColumn + Caption = #27979#35797#25968#37327 + DataBinding.FieldName = 'csqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end + end + object cxGrid1Level1: TcxGridLevel + GridView = Tv1 + end + end + object cxGrid2: TcxGrid + Left = 1 + Top = 257 + Width = 1538 + Height = 237 + Align = alClient + BorderStyle = cxcbsNone + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [] + ParentFont = False + PopupMenu = PM_2 + TabOrder = 1 + object Tv2: TcxGridDBTableView + Navigator.Buttons.CustomButtons = <> + ScrollbarAnnotations.CustomAnnotations = <> + DataController.DataSource = DS_2 + DataController.Filter.AutoDataSetFilter = True + DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost] + DataController.Summary.DefaultGroupSummaryItems = <> + DataController.Summary.FooterSummaryItems = < + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skCount + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Format = #26816#39564#31995#25968'=#.##' + Kind = skAverage + end + item + Format = #25442#31639#31995#25968'=#.##' + Kind = skAverage + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + Column = cxGridDBColumn6 + end + item + Kind = skSum + Column = cxGridDBColumn7 + end + item + Kind = skSum + Column = cxGridDBColumn9 + end + item + Kind = skSum + Column = cxGridDBColumn10 + end + item + Kind = skSum + Column = cxGridDBColumn12 + end + item + Kind = skSum + Column = cxGridDBColumn13 + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + Column = cxGridDBColumn15 + end + item + Kind = skSum + Column = cxGridDBColumn16 + end + item + Kind = skSum + end + item + Kind = skSum + end + item + Kind = skSum + Column = cxGridDBColumn18 + end + item + Kind = skSum + Column = cxGridDBColumn19 + end + item + Kind = skSum + Column = cxGridDBColumn21 + end> + DataController.Summary.SummaryGroups = <> + OptionsCustomize.ColumnFiltering = False + OptionsView.Footer = True + OptionsView.GroupByBox = False + OptionsView.IndicatorWidth = 30 + Styles.IncSearch = DataLink_TatClothStk.SHuangSe + Styles.Footer = DataLink_TatClothStk.Default + Styles.Header = DataLink_TatClothStk.Default + Styles.Inactive = DataLink_TatClothStk.SHuangSe + Styles.Selection = DataLink_TatClothStk.SHuangSe + object cxGridDBColumn1: TcxGridDBColumn + Caption = #36873#25321 + DataBinding.FieldName = 'SSel' + DataBinding.IsNullValueType = True + PropertiesClassName = 'TcxCheckBoxProperties' + Properties.ImmediatePost = True + Properties.NullStyle = nssUnchecked + HeaderAlignmentHorz = taCenter + Options.Sorting = False + Width = 66 + end + object cxGridDBColumn2: TcxGridDBColumn + Caption = #21697#21517 + DataBinding.FieldName = 'C_Name' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 66 + end + object cxGridDBColumn3: TcxGridDBColumn + Caption = #21452#21943 + DataBinding.FieldName = 'issp' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end + object cxGridDBColumn4: TcxGridDBColumn + Caption = #38376#24133 + DataBinding.FieldName = 'C_width' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 72 + end + object cxGridDBColumn5: TcxGridDBColumn + Caption = #20811#37325 + DataBinding.FieldName = 'C_GramWeight' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 66 + end + object cxGridDBColumn6: TcxGridDBColumn + Caption = #20248#31561#21367#25968 + DataBinding.FieldName = 'YDJs' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 74 + end + object cxGridDBColumn7: TcxGridDBColumn + Caption = #20248#31561#31859#25968 + DataBinding.FieldName = 'Ydqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end + object cxGridDBColumn8: TcxGridDBColumn + Caption = #20248#31561#24179#26041 + DataBinding.FieldName = 'YdPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end + object cxGridDBColumn9: TcxGridDBColumn + Caption = #20108#31561#21367#25968 + DataBinding.FieldName = 'edJS' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end + object cxGridDBColumn10: TcxGridDBColumn + Caption = #20108#31561#31859#25968 + DataBinding.FieldName = 'edqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end + object cxGridDBColumn11: TcxGridDBColumn + Caption = #20108#31561#24179#26041 + DataBinding.FieldName = 'edPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end + object cxGridDBColumn12: TcxGridDBColumn + Caption = #23567#21367#21367#25968 + DataBinding.FieldName = 'xjJS' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end + object cxGridDBColumn13: TcxGridDBColumn + Caption = #23567#21367#25968#37327 + DataBinding.FieldName = 'xjqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end + object cxGridDBColumn14: TcxGridDBColumn + Caption = #23567#21367#24179#26041 + DataBinding.FieldName = 'xjPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end + object cxGridDBColumn15: TcxGridDBColumn + Caption = #20998#20999#21367#25968 + DataBinding.FieldName = 'fqJS' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end + object cxGridDBColumn16: TcxGridDBColumn + Caption = #20998#20999#24067#25968#37327 + DataBinding.FieldName = 'fqqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end + object cxGridDBColumn17: TcxGridDBColumn + Caption = #20998#20999#24179#26041 + DataBinding.FieldName = 'fqPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end + object cxGridDBColumn18: TcxGridDBColumn + Caption = #27979#35797#21367#25968 + DataBinding.FieldName = 'csJS' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end + object cxGridDBColumn19: TcxGridDBColumn + Caption = #27979#35797#25968#37327 + DataBinding.FieldName = 'csqty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end + object cxGridDBColumn20: TcxGridDBColumn + Caption = #27979#35797#24179#26041 + DataBinding.FieldName = 'csPF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end + object cxGridDBColumn21: TcxGridDBColumn + Caption = #24179#26041 + DataBinding.FieldName = 'pf' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 71 + end + end + object cxGridLevel1: TcxGridLevel + GridView = Tv2 + end + end + end + inherited ADOQueryBaseCmd: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + Left = 553 + Top = 200 + end + inherited ADOQueryBaseTemp: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + Left = 425 + Top = 201 + end + object ADOQueryCmd: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + CommandTimeout = 600 + Parameters = <> + Left = 148 + Top = 280 + end + object ADOQueryMain: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + LockType = ltReadOnly + Parameters = <> + Left = 252 + Top = 260 + end + object ADOQueryTemp: TADOQuery + Connection = DataLink_TatClothStk.ADOLink + LockType = ltReadOnly + CommandTimeout = 600 + Parameters = <> + Left = 112 + Top = 204 + end + object DS_1: TDataSource + DataSet = CDS_1 + Left = 708 + Top = 156 + end + object GPM_1: TcxGridPopupMenu + Grid = cxGrid1 + PopupMenus = <> + Left = 608 + Top = 136 + end + object CDS_1: TClientDataSet + Aggregates = <> + Params = <> + BeforeOpen = CDS_1BeforeOpen + Left = 552 + Top = 140 + end + object PM_1: TPopupMenu + Left = 368 + Top = 248 + object N1: TMenuItem + Caption = #20840#36873 + OnClick = N1Click + end + object PM11: TMenuItem + Caption = #20840#24323 + OnClick = PM11Click + end + object N2: TMenuItem + Caption = #22797#21046 + OnClick = N2Click + end + end + object CDS_2: TClientDataSet + Aggregates = <> + Params = <> + BeforeOpen = CDS_1BeforeOpen + Left = 552 + Top = 276 + end + object DS_2: TDataSource + DataSet = CDS_2 + Left = 708 + Top = 292 + end + object GPM_2: TcxGridPopupMenu + Grid = cxGrid2 + PopupMenus = <> + Left = 784 + Top = 144 + end + object PM_2: TPopupMenu + Left = 408 + Top = 401 + object N3: TMenuItem + Caption = #22797#21046 + OnClick = N3Click + end + end +end diff --git a/E04梭织坯布仓库/U_TatClothStkHZList3.pas b/E04梭织坯布仓库/U_TatClothStkHZList3.pas new file mode 100644 index 0000000..d288a4a --- /dev/null +++ b/E04梭织坯布仓库/U_TatClothStkHZList3.pas @@ -0,0 +1,497 @@ +unit U_TatClothStkHZList3; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage, + cxEdit, DB, cxDBData, cxGridCustomTableView, cxGridTableView, + cxGridBandedTableView, cxGridDBBandedTableView, cxGridLevel, cxClasses, + cxControls, cxGridCustomView, cxGridDBTableView, cxGrid, StdCtrls, ComCtrls, + ExtCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, ADODB, DBClient, + cxDropDownEdit, cxCheckBox, RM_Common, RM_Class, RM_e_Xls, RM_Dataset, + RM_System, RM_GridReport, Menus, cxCalendar, MovePanel, Math, Clipbrd, + cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, cxTextEdit, dxSkinsCore, + dxSkinsDefaultPainters, dxDateRanges, dxBarBuiltInMenu, U_BaseInput, cxPC, + System.StrUtils, dxScrollbarAnnotations, U_BaseList; + +type + TfrmTatClothStkHZList3 = class(TfrmBaseInput) + ToolBar1: TToolBar; + TBRafresh: TToolButton; + TBExport: TToolButton; + TBClose: TToolButton; + Panel1: TPanel; + ADOQueryCmd: TADOQuery; + ADOQueryMain: TADOQuery; + ADOQueryTemp: TADOQuery; + DS_1: TDataSource; + GPM_1: TcxGridPopupMenu; + Label2: TLabel; + BegDate: TDateTimePicker; + EndDate: TDateTimePicker; + CDS_1: TClientDataSet; + begtime: TDateTimePicker; + endTime: TDateTimePicker; + IsJYTime: TCheckBox; + ToolButton4: TToolButton; + Label5: TLabel; + C_Name: TEdit; + PM_1: TPopupMenu; + PM11: TMenuItem; + N1: TMenuItem; + C_GramWeight: TEdit; + label12: TLabel; + C_width: TEdit; + label11: TLabel; + Panel2: TPanel; + cxGrid1: TcxGrid; + Tv1: TcxGridDBTableView; + v1Column22: TcxGridDBColumn; + Tv1Column3: TcxGridDBColumn; + Tv1issp: TcxGridDBColumn; + Tv1Column4: TcxGridDBColumn; + Tv1Column6: TcxGridDBColumn; + Tv1Column1: TcxGridDBColumn; + Tv1Column7: TcxGridDBColumn; + Tv1Column8: TcxGridDBColumn; + Tv1Column9: TcxGridDBColumn; + Tv1Column10: TcxGridDBColumn; + Tv1Column13: TcxGridDBColumn; + Tv1Column14: TcxGridDBColumn; + Tv1Column17: TcxGridDBColumn; + Tv1Column18: TcxGridDBColumn; + cxGrid1Level1: TcxGridLevel; + cxGrid2: TcxGrid; + Tv2: TcxGridDBTableView; + cxGridDBColumn1: TcxGridDBColumn; + cxGridDBColumn2: TcxGridDBColumn; + cxGridDBColumn3: TcxGridDBColumn; + cxGridDBColumn4: TcxGridDBColumn; + cxGridDBColumn5: TcxGridDBColumn; + cxGridDBColumn6: TcxGridDBColumn; + cxGridDBColumn7: TcxGridDBColumn; + cxGridDBColumn8: TcxGridDBColumn; + cxGridDBColumn9: TcxGridDBColumn; + cxGridDBColumn10: TcxGridDBColumn; + cxGridDBColumn11: TcxGridDBColumn; + cxGridDBColumn12: TcxGridDBColumn; + cxGridDBColumn13: TcxGridDBColumn; + cxGridDBColumn14: TcxGridDBColumn; + cxGridDBColumn15: TcxGridDBColumn; + cxGridDBColumn16: TcxGridDBColumn; + cxGridDBColumn17: TcxGridDBColumn; + cxGridDBColumn18: TcxGridDBColumn; + cxGridDBColumn19: TcxGridDBColumn; + cxGridDBColumn20: TcxGridDBColumn; + cxGridDBColumn21: TcxGridDBColumn; + cxGridLevel1: TcxGridLevel; + CDS_2: TClientDataSet; + DS_2: TDataSource; + GPM_2: TcxGridPopupMenu; + N2: TMenuItem; + PM_2: TPopupMenu; + N3: TMenuItem; + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure TBRafreshClick(Sender: TObject); + procedure ConNoMChange(Sender: TObject); + procedure TBCloseClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure TBExportClick(Sender: TObject); + procedure orderNoKeyPress(Sender: TObject; var Key: Char); + procedure BTNPClick(Sender: TObject); + procedure BTLPClick(Sender: TObject); + procedure TCBNORChange(Sender: TObject); + procedure JYTypeChange(Sender: TObject); + procedure ToolButton2Click(Sender: TObject); + procedure cxPageControl1Change(Sender: TObject); + procedure CDS_1BeforeOpen(DataSet: TDataSet); + procedure Tv1DataControllerFilterBeforeChange(Sender: TcxDBDataFilterCriteria; ADataSet: TDataSet; const AFilterText: string); + + procedure Tv1TcxGridDBDataControllerTcxDataSummaryFooterSummaryItems6GetText(Sender: TcxDataSummaryItem; const AValue: Variant; AIsFooter: Boolean; var AText: string); + procedure ToolButton4Click(Sender: TObject); + procedure PM11Click(Sender: TObject); + procedure N1Click(Sender: TObject); + procedure IsJYTimeClick(Sender: TObject); + procedure C_NameKeyPress(Sender: TObject; var Key: Char); + procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; + APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; + ANewItemRecordFocusingChanged: Boolean); + procedure N2Click(Sender: TObject); + procedure N3Click(Sender: TObject); + private + CurrentPage, RecordsNumber: Integer; + lstCust: TStringList; + procedure InitGrid(); + procedure SetStatus(); + procedure InitGrid2(); + { Private declarations } + public + canshu1: string; + { Public declarations } + end; + +implementation + +uses + U_DataLink, U_RTFun, U_LabelPrint; + +{$R *.dfm} + +procedure TfrmTatClothStkHZList3.SetStatus(); +begin + +end; + +procedure TfrmTatClothStkHZList3.FormClose(Sender: TObject; var Action: TCloseAction); +begin + inherited; + FreeAndNil(lstCust); + Action := caFree; +end; + +procedure TfrmTatClothStkHZList3.FormCreate(Sender: TObject); +begin + inherited; + lstCust := TStringList.Create; + EndDate.DateTime := SGetServerDateTime(ADOQueryTemp); + BegDate.DateTime := EndDate.DateTime - 20; +end; + +procedure TfrmTatClothStkHZList3.InitGrid(); +var + WSql: string; +begin + + WSql := SGetFilters(Panel1, 1, 2); + if Trim(WSql) <> '' then + WSql := ' and ' + WSql; + if IsJYTime.Checked then + begin + WSql := WSql + ' and IOTime>=' + quotedstr(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)); + WSql := WSql + ' and IOTime<' + quotedstr(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1)); + end; + + try + ADOQueryMain.DisableControls; + + with ADOQueryMain do + begin + Filtered := False; + Close; + sql.Clear; + + sql.Add('select A.C_NAME ,A.C_GramWeight'); +// SQL.Add(',pf=SUM(A.meter/100*CAST(A.C_WIDTH AS DECIMAL(18,2)))'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN 1 ELSE 0 END )AS YDJS'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN A.meter ELSE 0 END )AS Ydqty'); +// SQL.Add(',SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN A.meter/100*CAST(A.C_WIDTH AS DECIMAL(18,2)) ELSE 0 END )AS YdPF'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''Ʒ'' THEN 1 ELSE 0 END )AS edJS'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''Ʒ'' THEN A.meter ELSE 0 END )AS edqty'); +// SQL.Add(',SUM(CASE WHEN A.GRADE=''Ʒ'' THEN A.meter/100*CAST(A.C_WIDTH AS DECIMAL(18,2)) ELSE 0 END )AS edPF'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''С'' THEN 1 ELSE 0 END )AS xjJS'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''С'' THEN A.meter ELSE 0 END )AS xjqty'); +// SQL.Add(',SUM(CASE WHEN A.GRADE=''С'' THEN A.meter/100*CAST(A.C_WIDTH AS DECIMAL(18,2)) ELSE 0 END )AS xjPF'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''ϲ'' THEN 1 ELSE 0 END )AS fbJS'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''ϲ'' THEN A.meter ELSE 0 END )AS fbqty'); +// SQL.Add(',SUM(CASE WHEN GRADE=''ϲ'' THEN meter/100*CAST(C_WIDTH AS DECIMAL(18,2)) ELSE 0 END )AS fbPF'); + SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END )AS fqJS'); + SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN A.meter ELSE 0 END )AS fqqty'); +// SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN A.meter/100*CAST(A.C_WIDTH AS DECIMAL(18,2)) ELSE 0 END )AS fqPF'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''ѭ'' THEN 1 ELSE 0 END )AS xhJS'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''ѭ'' THEN A.meter ELSE 0 END )AS xhqty'); + SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END )AS csJS'); + SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN A.meter ELSE 0 END )AS csqty'); +// SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN A.meter/100*CAST(A.C_WIDTH AS DECIMAL(18,2)) ELSE 0 END )AS csPF'); + sql.Add(', issp=isnull(A.issp,'''') '); + + SQL.Add('from V_Tat_Cloth_stk A where 1=1 ' + WSql); + + sql.Add(' group by A.C_NAME,A.C_GramWeight,isnull(A.issp,'''') '); + SQL.Add(' order by A.C_NAME,A.C_GramWeight,isnull(A.issp,'''') '); + +// showmessage(sql.text); + Open; + end; + SCreateCDS(ADOQueryMain, CDS_1); + SInitCDSData(ADOQueryMain, CDS_1); + + finally + ADOQueryMain.EnableControls; + TV1.DataController.Filter.Clear; + end; + +end; + +procedure TfrmTatClothStkHZList3.InitGrid2(); +var + WSql: string; +begin + + WSql := SGetFilters(Panel1, 1, 2); + if Trim(WSql) <> '' then + WSql := ' and ' + WSql; + if IsJYTime.Checked then + begin + WSql := WSql + ' and IOTime>=' + quotedstr(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)); + WSql := WSql + ' and IOTime<' + quotedstr(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1)); + end; + + try + ADOQueryMain.DisableControls; + + with ADOQueryMain do + begin + Filtered := False; + Close; + sql.Clear; + + sql.Add('select A.C_NAME, A.C_width,A.C_GramWeight '); + SQL.Add(',pf=SUM(A.meter/100*CAST(A.C_WIDTH AS DECIMAL(18,2)))'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN 1 ELSE 0 END )AS YDJS'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN A.meter ELSE 0 END )AS Ydqty'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''ŵƷ'' THEN A.meter/100*CAST(A.C_WIDTH AS DECIMAL(18,2)) ELSE 0 END )AS YdPF'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''Ʒ'' THEN 1 ELSE 0 END )AS edJS'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''Ʒ'' THEN A.meter ELSE 0 END )AS edqty'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''Ʒ'' THEN A.meter/100*CAST(A.C_WIDTH AS DECIMAL(18,2)) ELSE 0 END )AS edPF'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''С'' THEN 1 ELSE 0 END )AS xjJS'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''С'' THEN A.meter ELSE 0 END )AS xjqty'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''С'' THEN A.meter/100*CAST(A.C_WIDTH AS DECIMAL(18,2)) ELSE 0 END )AS xjPF'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''ϲ'' THEN 1 ELSE 0 END )AS fbJS'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''ϲ'' THEN A.meter ELSE 0 END )AS fbqty'); +// SQL.Add(',SUM(CASE WHEN GRADE=''ϲ'' THEN meter/100*CAST(C_WIDTH AS DECIMAL(18,2)) ELSE 0 END )AS fbPF'); + SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END )AS fqJS'); + SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN A.meter ELSE 0 END )AS fqqty'); + SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN A.meter/100*CAST(A.C_WIDTH AS DECIMAL(18,2)) ELSE 0 END )AS fqPF'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''ѭ'' THEN 1 ELSE 0 END )AS xhJS'); + SQL.Add(',SUM(CASE WHEN A.GRADE=''ѭ'' THEN A.meter ELSE 0 END )AS xhqty'); + SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN 1 ELSE 0 END )AS csJS'); + SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN A.meter ELSE 0 END )AS csqty'); + SQL.Add(',SUM(CASE WHEN A.GRADE='''' THEN A.meter/100*CAST(A.C_WIDTH AS DECIMAL(18,2)) ELSE 0 END )AS csPF'); + sql.Add(', issp=isnull(A.issp,'''') '); + + SQL.Add('from V_Tat_Cloth_stk A where 1=1 and C_NAME=' +QuotedStr(Trim(CDS_1.FieldByName('C_NAME').AsString)) ); + SQL.Add( WSql); + sql.Add(' group by A.C_NAME, A.C_width,A.C_GramWeight,isnull(A.issp,'''') '); + SQL.Add(' order by A.C_NAME, A.C_width,A.C_GramWeight'); + +// showmessage(sql.text); + Open; + end; + SCreateCDS(ADOQueryMain, CDS_2); + SInitCDSData(ADOQueryMain, CDS_2); + + finally + ADOQueryMain.EnableControls; + TV1.DataController.Filter.Clear; + end; + +end; + +procedure TfrmTatClothStkHZList3.IsJYTimeClick(Sender: TObject); +begin + inherited; + InitGrid(); +end; + +procedure TfrmTatClothStkHZList3.TBRafreshClick(Sender: TObject); +begin + CurrentPage := 1; + InitGrid(); +end; + +procedure TfrmTatClothStkHZList3.CDS_1BeforeOpen(DataSet: TDataSet); +begin + + lstCust.Clear; +end; + +procedure TfrmTatClothStkHZList3.ConNoMChange(Sender: TObject); +begin + if ADOQueryMain.Active then + begin + SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2)); + end; +end; + +procedure TfrmTatClothStkHZList3.cxPageControl1Change(Sender: TObject); +begin + CurrentPage := 1; + SetStatus(); + InitGrid(); +end; + +procedure TfrmTatClothStkHZList3.C_NameKeyPress(Sender: TObject; var Key: Char); +begin + inherited; + if Key = #13 then + begin + InitGrid(); + end; +end; + +procedure TfrmTatClothStkHZList3.TBCloseClick(Sender: TObject); +begin + + Close; +end; + +procedure TfrmTatClothStkHZList3.FormShow(Sender: TObject); +begin + inherited; + + ReadCxGrid(trim(self.Caption) + 'Tv1', Tv1, 'Ʒ'); + ReadCxGrid(trim(self.Caption) + 'Tv2', Tv2, 'Ʒ'); + CurrentPage := 1; + RecordsNumber := 500; + + + SetStatus(); + InitGrid(); +end; + +procedure TfrmTatClothStkHZList3.TBExportClick(Sender: TObject); +begin + if ADOQueryMain.IsEmpty then + exit; + TcxGridToExcel(Self.Caption, cxGrid1); +end; + +procedure TfrmTatClothStkHZList3.orderNoKeyPress(Sender: TObject; var Key: Char); +begin + if Key = #13 then + begin + CurrentPage := 1; + InitGrid(); + end; +end; + +procedure TfrmTatClothStkHZList3.PM11Click(Sender: TObject); +begin + SelOKNo(CDS_1, false); +end; + +procedure TfrmTatClothStkHZList3.Tv1DataControllerFilterBeforeChange(Sender: TcxDBDataFilterCriteria; ADataSet: TDataSet; const AFilterText: string); +begin + lstCust.Clear; +end; + +procedure TfrmTatClothStkHZList3.Tv1FocusedRecordChanged( + Sender: TcxCustomGridTableView; APrevFocusedRecord, + AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean); +begin + InitGrid2(); + +end; + +procedure TfrmTatClothStkHZList3.Tv1TcxGridDBDataControllerTcxDataSummaryFooterSummaryItems6GetText(Sender: TcxDataSummaryItem; const AValue: Variant; AIsFooter: Boolean; var AText: string); +begin + if lstCust <> nil then + AText := IntToStr(lstCust.Count); +end; + +procedure TfrmTatClothStkHZList3.BTNPClick(Sender: TObject); +begin + if CurrentPage < CDS_1.FieldByName('TotalCount').AsInteger / RecordsNumber then + CurrentPage := CurrentPage + 1; + InitGrid(); +end; + +procedure TfrmTatClothStkHZList3.BTLPClick(Sender: TObject); +begin + if CurrentPage > 1 then + CurrentPage := CurrentPage - 1; + InitGrid(); +end; + +procedure TfrmTatClothStkHZList3.TCBNORChange(Sender: TObject); +begin + + CurrentPage := 1; + InitGrid(); +end; + +procedure TfrmTatClothStkHZList3.JYTypeChange(Sender: TObject); +begin + CurrentPage := 1; + InitGrid(); +end; + +procedure TfrmTatClothStkHZList3.N1Click(Sender: TObject); +begin + + SelOKNo(CDS_1, true); +end; + +procedure TfrmTatClothStkHZList3.N2Click(Sender: TObject); +begin + Clipboard.SetTextBuf(PChar(Trim(CDS_1.fieldbyname(TV1.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString))); + +end; + +procedure TfrmTatClothStkHZList3.N3Click(Sender: TObject); +begin + Clipboard.SetTextBuf(PChar(Trim(CDS_2.fieldbyname(TV2.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString))); + + +end; + +procedure TfrmTatClothStkHZList3.ToolButton2Click(Sender: TObject); +var + WSql: string; +begin + if CDS_1.IsEmpty then + Exit; + if not CDS_1.Locate('SSel', True, []) then + begin + Application.MessageBox('ûѡ!', 'ʾ', 0); + Exit; + end; + WSql := ''; + CDS_1.DisableControls; + with CDS_1 do + begin + First; + while not Eof do + begin + if CDS_1.fieldbyname('SSel').AsBoolean then + begin + if WSql <> '' then + begin + WSql := WSql + ',' + QuotedStr(Trim(CDS_1.fieldbyname('CIID').AsString)); + end + else + begin + WSql := QuotedStr(Trim(CDS_1.fieldbyname('CIID').AsString)); + end; + end; + Next; + end; + end; + CDS_1.Locate('SSel', True, []); + CDS_1.EnableControls; + try + frmLabelPrint := TfrmLabelPrint.Create(Application); + with frmLabelPrint do + begin + FLMType := 'TradeClothStk'; + FFiltration1 := WSql; + if ShowModal = 1 then + begin + + end; + end; + finally + frmLabelPrint.Free; + end; +end; + +procedure TfrmTatClothStkHZList3.ToolButton4Click(Sender: TObject); +begin + WriteCxGrid(trim(self.Caption) + 'Tv1', Tv1, 'Ʒ'); + WriteCxGrid(trim(self.Caption) + 'Tv2', Tv2, 'Ʒ'); +end; + +end. + diff --git a/E04梭织坯布仓库/U_TatClothStkList.dfm b/E04梭织坯布仓库/U_TatClothStkList.dfm index 67d1c9d..97edd94 100644 --- a/E04梭织坯布仓库/U_TatClothStkList.dfm +++ b/E04梭织坯布仓库/U_TatClothStkList.dfm @@ -7,6 +7,7 @@ inherited frmTatClothStkList: TfrmTatClothStkList FormStyle = fsMDIChild Position = poScreenCenter Visible = True + ExplicitTop = -14 ExplicitWidth = 1556 ExplicitHeight = 639 PixelsPerInch = 96 @@ -218,6 +219,48 @@ inherited frmTatClothStkList: TfrmTatClothStkList Font.Style = [fsBold] ParentFont = False end + object Label4: TLabel + Left = 975 + Top = 36 + Width = 26 + Height = 12 + Hint = '1' + Caption = #20811#37325 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object Label6: TLabel + Left = 975 + Top = 10 + Width = 26 + Height = 12 + Hint = '0' + Caption = #38376#24133 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object Label8: TLabel + Left = 829 + Top = 36 + Width = 26 + Height = 12 + Hint = '0' + Caption = #31561#32423 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end object BegDate: TDateTimePicker Left = 88 Top = 6 @@ -362,6 +405,36 @@ inherited frmTatClothStkList: TfrmTatClothStkList TabOrder = 13 OnKeyPress = orderNoKeyPress end + object C_GramWeight: TEdit + Tag = 2 + Left = 1002 + Top = 32 + Width = 100 + Height = 20 + Hint = '1' + TabOrder = 14 + OnKeyPress = orderNoKeyPress + end + object C_Width: TEdit + Tag = 2 + Left = 1002 + Top = 6 + Width = 100 + Height = 20 + Hint = '0' + TabOrder = 15 + OnKeyPress = orderNoKeyPress + end + object Grade: TEdit + Tag = 2 + Left = 857 + Top = 32 + Width = 100 + Height = 20 + Hint = '0' + TabOrder = 16 + OnKeyPress = orderNoKeyPress + end end object Panel6: TPanel [2] Left = 0 @@ -480,6 +553,7 @@ inherited frmTatClothStkList: TfrmTatClothStkList ParentFont = False PopupMenu = PM_1 TabOrder = 3 + ExplicitTop = 133 object Tv1: TcxGridDBTableView Navigator.Buttons.CustomButtons = <> ScrollbarAnnotations.CustomAnnotations = <> @@ -540,6 +614,10 @@ inherited frmTatClothStkList: TfrmTatClothStkList end item Kind = skSum + end + item + Kind = skSum + Column = Tv1PF end> DataController.Summary.SummaryGroups = <> OptionsCustomize.ColumnFiltering = False @@ -690,6 +768,13 @@ inherited frmTatClothStkList: TfrmTatClothStkList Options.Editing = False Width = 66 end + object Tv1PF: TcxGridDBColumn + Caption = #24179#26041 + DataBinding.FieldName = 'PF' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 78 + end object v1Column8: TcxGridDBColumn Caption = #27611#37325 DataBinding.FieldName = 'GrossWeight' @@ -862,5 +947,13 @@ inherited frmTatClothStkList: TfrmTatClothStkList Caption = #20840#24323 OnClick = PM11Click end + object N2: TMenuItem + Caption = #22797#21046 + OnClick = N2Click + end + object N3: TMenuItem + Caption = #22797#21046#27880#33050 + OnClick = N3Click + end end end diff --git a/E04梭织坯布仓库/U_TatClothStkList.pas b/E04梭织坯布仓库/U_TatClothStkList.pas index d26ef9e..0bcbb57 100644 --- a/E04梭织坯布仓库/U_TatClothStkList.pas +++ b/E04梭织坯布仓库/U_TatClothStkList.pas @@ -96,6 +96,15 @@ type Label1: TLabel; dept: TEdit; Tv1issp: TcxGridDBColumn; + Label4: TLabel; + Label6: TLabel; + Label8: TLabel; + C_GramWeight: TEdit; + C_Width: TEdit; + Grade: TEdit; + Tv1PF: TcxGridDBColumn; + N2: TMenuItem; + N3: TMenuItem; procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormCreate(Sender: TObject); procedure TBRafreshClick(Sender: TObject); @@ -117,11 +126,14 @@ type procedure ToolButton4Click(Sender: TObject); procedure PM11Click(Sender: TObject); procedure N1Click(Sender: TObject); + procedure N2Click(Sender: TObject); + procedure N3Click(Sender: TObject); private CurrentPage, RecordsNumber: Integer; lstCust: TStringList; procedure InitGrid(); procedure SetStatus(); + procedure CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); { Private declarations } public canshu1: string; @@ -256,7 +268,15 @@ procedure TfrmTatClothStkList.TBExportClick(Sender: TObject); begin if ADOQueryMain.IsEmpty then exit; + with CDS_1 do + begin + Filtered := false; + Filter := ' ssel = 1'; + Filtered := true; + end; TcxGridToExcel(Self.Caption, cxGrid1); + InitGrid(); + end; procedure TfrmTatClothStkList.orderNoKeyPress(Sender: TObject; var Key: Char); @@ -335,6 +355,38 @@ begin SelOKNo(CDS_1, true); end; +procedure TfrmTatClothStkList.N2Click(Sender: TObject); +begin + Clipboard.SetTextBuf(PChar(Trim(CDS_1.fieldbyname(TV1.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString))); + +end; + +procedure TfrmTatClothStkList.N3Click(Sender: TObject); +begin + CopyColumnSummaryToClipboard(TV1.Controller.FocusedColumn); + +end; + + +procedure TfrmTatClothStkList.CopyColumnSummaryToClipboard(AColumn: TcxGridColumn); +var + AView: TcxGridDBTableView; + SummaryIndex: Integer; + SummaryText: string; +begin + AView := Tv1; + + // ָеĻ + SummaryIndex := AView.DataController.Summary.FooterSummaryItems.IndexOfItemLink(AColumn); + if SummaryIndex <> -1 then + begin + SummaryText := AView.DataController.Summary.FooterSummaryTexts[SummaryIndex]; + Clipboard.AsText := SummaryText; + end + else + ShowMessage('δҵеĻ'); +end; + procedure TfrmTatClothStkList.ToolButton2Click(Sender: TObject); var WSql: string; diff --git a/E04梭织坯布仓库/U_TatClothStkListPH.dfm b/E04梭织坯布仓库/U_TatClothStkListPH.dfm index ec19a01..ed29f40 100644 --- a/E04梭织坯布仓库/U_TatClothStkListPH.dfm +++ b/E04梭织坯布仓库/U_TatClothStkListPH.dfm @@ -33,6 +33,7 @@ inherited frmTatClothStkListPH: TfrmTatClothStkListPH ParentFont = False ShowCaptions = True TabOrder = 0 + ExplicitTop = 2 object TBRafresh: TToolButton Left = 0 Top = 0 @@ -117,6 +118,7 @@ inherited frmTatClothStkListPH: TfrmTatClothStkListPH Color = clWhite ParentBackground = False TabOrder = 1 + ExplicitTop = 41 object Label2: TLabel Left = 70 Top = 36 @@ -316,7 +318,7 @@ inherited frmTatClothStkListPH: TfrmTatClothStkListPH Top = 8 Width = 73 Height = 17 - Caption = #26597#35810#26085#26399 + Caption = #20837#24211#26085#26399 Font.Charset = GB2312_CHARSET Font.Color = clWindowText Font.Height = -12 @@ -467,6 +469,7 @@ inherited frmTatClothStkListPH: TfrmTatClothStkListPH AutoSize = True BorderStyle = bsSingle TabOrder = 2 + ExplicitTop = 99 DesignSize = ( 1536 23) @@ -541,17 +544,15 @@ inherited frmTatClothStkListPH: TfrmTatClothStkListPH Top = 1 Width = 78 Height = 20 - Style = csDropDownList Anchors = [akLeft] Font.Charset = GB2312_CHARSET Font.Color = clWindowText Font.Height = -12 Font.Name = #23435#20307 - Font.Style = [fsBold] - ItemIndex = 0 + Font.Style = [] ParentFont = False TabOrder = 2 - Text = '500' + Text = '1000' OnChange = TCBNORChange Items.Strings = ( '500' diff --git a/E04梭织坯布仓库/U_TatClothStkListPH.pas b/E04梭织坯布仓库/U_TatClothStkListPH.pas index d4b1373..46959c3 100644 --- a/E04梭织坯布仓库/U_TatClothStkListPH.pas +++ b/E04梭织坯布仓库/U_TatClothStkListPH.pas @@ -16,7 +16,7 @@ uses System.StrUtils, dxScrollbarAnnotations; type - TfrmTatClothStkListPH = class(TfrmBaseList) + TfrmTatClothStkListPH = class(TfrmBaseList) ToolBar1: TToolBar; TBRafresh: TToolButton; TBExport: TToolButton; @@ -270,7 +270,7 @@ begin ReadCxGrid(trim(self.Caption) + 'Tv1', Tv1, 'Ʒб'); CurrentPage := 1; - RecordsNumber := 500; + RecordsNumber := 1000; canshu1 := Trim(Self.fParameters1); canshu2 := Trim(Self.fParameters2); SetStatus(); @@ -469,6 +469,7 @@ begin end; CDS_1.Locate('SSel', True, []); CDS_1.EnableControls; +// ShowMessage(WSql); try frmLabelPrint := TfrmLabelPrint.Create(Application); with frmLabelPrint do diff --git a/E04梭织坯布仓库/U_TatClothStkListsel.dfm b/E04梭织坯布仓库/U_TatClothStkListsel.dfm index ed921de..9fe0b7d 100644 --- a/E04梭织坯布仓库/U_TatClothStkListsel.dfm +++ b/E04梭织坯布仓库/U_TatClothStkListsel.dfm @@ -8,7 +8,7 @@ inherited frmTatClothStkListsel: TfrmTatClothStkListsel ExplicitWidth = 1556 ExplicitHeight = 639 PixelsPerInch = 96 - TextHeight = 12 + TextHeight = 13 object ToolBar1: TToolBar [0] Tag = 1 Left = 0 @@ -87,7 +87,7 @@ inherited frmTatClothStkListsel: TfrmTatClothStkListsel Left = 70 Top = 36 Width = 12 - Height = 12 + Height = 13 Caption = #33267 end object Label3: TLabel @@ -261,7 +261,7 @@ inherited frmTatClothStkListsel: TfrmTatClothStkListsel Left = 248 Top = 6 Width = 100 - Height = 20 + Height = 21 Hint = '0' TabOrder = 5 OnKeyPress = orderNoKeyPress @@ -271,63 +271,70 @@ inherited frmTatClothStkListsel: TfrmTatClothStkListsel Left = 409 Top = 6 Width = 100 - Height = 20 + Height = 21 Hint = '0' TabOrder = 6 + OnKeyPress = orderNoKeyPress end object STKID: TEdit Tag = 2 Left = 711 Top = 32 Width = 100 - Height = 20 + Height = 21 Hint = '1' TabOrder = 7 + OnKeyPress = orderNoKeyPress end object C_Name: TEdit Tag = 2 Left = 409 Top = 32 Width = 100 - Height = 20 + Height = 21 Hint = '0' TabOrder = 8 + OnKeyPress = orderNoKeyPress end object C_Color: TEdit Tag = 2 Left = 553 Top = 6 Width = 100 - Height = 20 + Height = 21 Hint = '0' TabOrder = 9 + OnKeyPress = orderNoKeyPress end object jyg: TEdit Tag = 2 Left = 711 Top = 6 Width = 100 - Height = 20 + Height = 21 Hint = '0' TabOrder = 10 + OnKeyPress = orderNoKeyPress end object C_Pattern: TEdit Tag = 2 Left = 553 Top = 32 Width = 100 - Height = 20 + Height = 21 Hint = '0' TabOrder = 11 + OnKeyPress = orderNoKeyPress end object C_Code: TEdit Tag = 2 Left = 248 Top = 32 Width = 100 - Height = 20 + Height = 21 Hint = '0' TabOrder = 12 + OnKeyPress = orderNoKeyPress end end object Panel6: TPanel [2] diff --git a/E04梭织坯布仓库/U_TatClothStkListsel.pas b/E04梭织坯布仓库/U_TatClothStkListsel.pas index 959c63a..875c7fc 100644 --- a/E04梭织坯布仓库/U_TatClothStkListsel.pas +++ b/E04梭织坯布仓库/U_TatClothStkListsel.pas @@ -13,7 +13,8 @@ uses RM_System, RM_GridReport, Menus, cxCalendar, MovePanel, Math, Clipbrd, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, cxTextEdit, dxSkinsCore, dxSkinsDefaultPainters, dxDateRanges, dxBarBuiltInMenu, U_Basehelp, cxPC, - System.StrUtils, dxScrollbarAnnotations, U_BaseList; + System.StrUtils, dxScrollbarAnnotations, U_BaseList, System.ImageList, + Vcl.ImgList; type TfrmTatClothStkListsel = class(TfrmBasehelp) diff --git a/E04梭织坯布仓库/U_TatDRList.dfm b/E04梭织坯布仓库/U_TatDRList.dfm index 9a06b1e..a4fe636 100644 --- a/E04梭织坯布仓库/U_TatDRList.dfm +++ b/E04梭织坯布仓库/U_TatDRList.dfm @@ -156,16 +156,24 @@ inherited frmTatDRList: TfrmTatDRList ImageIndex = 11 OnClick = btnWCCXClick end - object ToolButton4: TToolButton + object TbAddressCopy: TToolButton Left = 332 Top = 38 AutoSize = True + Caption = #22320#22336#22797#21046 + ImageIndex = 13 + OnClick = TbAddressCopyClick + end + object ToolButton4: TToolButton + Left = 427 + Top = 38 + AutoSize = True Caption = #38468#20214 ImageIndex = 19 OnClick = ToolButton4Click end object TBExport: TToolButton - Left = 403 + Left = 498 Top = 38 AutoSize = True Caption = #23548#20986 @@ -173,7 +181,7 @@ inherited frmTatDRList: TfrmTatDRList OnClick = TBExportClick end object ToolButton7: TToolButton - Left = 474 + Left = 569 Top = 38 AutoSize = True Caption = #19968#38190#21457#36135 @@ -181,7 +189,7 @@ inherited frmTatDRList: TfrmTatDRList OnClick = ToolButton7Click end object ToolButton6: TToolButton - Left = 569 + Left = 664 Top = 38 AutoSize = True Caption = #20445#23384#26684#24335 @@ -189,13 +197,29 @@ inherited frmTatDRList: TfrmTatDRList OnClick = ToolButton6Click end object TBClose: TToolButton - Left = 664 + Left = 759 Top = 38 AutoSize = True Caption = #20851#38381 ImageIndex = 7 OnClick = TBCloseClick end + object ToolButton8: TToolButton + Left = 830 + Top = 38 + AutoSize = True + Caption = #36135#26410#21457#20840 + ImageIndex = 8 + OnClick = ToolButton8Click + end + object TbUndoVisible: TToolButton + Left = 925 + Top = 38 + AutoSize = True + Caption = #25764#38144#26174#31034 + ImageIndex = 18 + OnClick = TbUndoVisibleClick + end end object cxGrid1: TcxGrid [1] Left = 0 @@ -205,9 +229,11 @@ inherited frmTatDRList: TfrmTatDRList Align = alClient PopupMenu = PM_1 TabOrder = 3 + ExplicitTop = 144 object Tv1: TcxGridDBTableView Navigator.Buttons.CustomButtons = <> ScrollbarAnnotations.CustomAnnotations = <> + OnCustomDrawCell = Tv1CustomDrawCell OnFocusedRecordChanged = Tv1FocusedRecordChanged DataController.DataSource = DataSource1 DataController.Filter.AutoDataSetFilter = True @@ -277,6 +303,24 @@ inherited frmTatDRList: TfrmTatDRList HeaderAlignmentHorz = taCenter Width = 49 end + object Tv1OverTime: TcxGridDBColumn + Caption = #21457#36135#29366#24577 + DataBinding.FieldName = 'OverTime' + DataBinding.IsNullValueType = True + PropertiesClassName = 'TcxTextEditProperties' + OnCustomDrawCell = Tv1OverTimeCustomDrawCell + HeaderAlignmentHorz = taCenter + Styles.OnGetContentStyle = Tv1FlagStylesGetContentStyle + Width = 80 + end + object Tv1CheckEdit: TcxGridDBColumn + Caption = #23457#26680#20462#25913 + DataBinding.FieldName = 'CheckEdit' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Styles.OnGetContentStyle = Tv1CheckEditStylesGetContentStyle + Width = 80 + end object v1Column8: TcxGridDBColumn Caption = #30003#35831#21333#21495 DataBinding.FieldName = 'DRMID' @@ -304,7 +348,7 @@ inherited frmTatDRList: TfrmTatDRList Options.Editing = False Width = 69 end - object v1Column10: TcxGridDBColumn + object Tv1ToCoName: TcxGridDBColumn Caption = #23458#25143 DataBinding.FieldName = 'ToCoName' DataBinding.IsNullValueType = True @@ -312,6 +356,27 @@ inherited frmTatDRList: TfrmTatDRList Options.Editing = False Width = 124 end + object Tv1CoName: TcxGridDBColumn + Caption = #23458#25143 + DataBinding.FieldName = 'CoName' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 139 + end + object Tv1Saleser: TcxGridDBColumn + Caption = #19994#21153#21592 + DataBinding.FieldName = 'Saleser' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end + object Tv1Contacts: TcxGridDBColumn + Caption = #32852#31995#20154 + DataBinding.FieldName = 'Contacts' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end object Tv1Telephone: TcxGridDBColumn Caption = #32852#31995#30005#35805 DataBinding.FieldName = 'Telephone' @@ -353,13 +418,6 @@ inherited frmTatDRList: TfrmTatDRList Options.Editing = False Width = 70 end - object Tv1Column1: TcxGridDBColumn - Caption = #25910#36135#21333#20301 - DataBinding.FieldName = 'shdanwei' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 154 - end object Tv1CoAddress: TcxGridDBColumn Caption = #25910#36135#22320#22336 DataBinding.FieldName = 'CoAddress' @@ -402,7 +460,7 @@ inherited frmTatDRList: TfrmTatDRList HeaderAlignmentHorz = taCenter Width = 70 end - object Tv1Column7: TcxGridDBColumn + object Tv1sselJS: TcxGridDBColumn DataBinding.FieldName = 'sselJS' DataBinding.IsNullValueType = True Visible = False @@ -425,8 +483,9 @@ inherited frmTatDRList: TfrmTatDRList Color = clWhite ParentBackground = False TabOrder = 1 + ExplicitTop = 82 object Label4: TLabel - Left = 464 + Left = 520 Top = 15 Width = 48 Height = 12 @@ -485,7 +544,7 @@ inherited frmTatDRList: TfrmTatDRList Caption = '-' end object Label1: TLabel - Left = 286 + Left = 343 Top = 15 Width = 48 Height = 12 @@ -498,7 +557,7 @@ inherited frmTatDRList: TfrmTatDRList ParentFont = False end object Label3: TLabel - Left = 658 + Left = 714 Top = 15 Width = 48 Height = 12 @@ -511,7 +570,7 @@ inherited frmTatDRList: TfrmTatDRList ParentFont = False end object Label5: TLabel - Left = 870 + Left = 938 Top = 15 Width = 54 Height = 12 @@ -524,7 +583,7 @@ inherited frmTatDRList: TfrmTatDRList ParentFont = False end object SSelJS: TLabel - Left = 927 + Left = 995 Top = 6 Width = 12 Height = 24 @@ -557,7 +616,7 @@ inherited frmTatDRList: TfrmTatDRList end object ToCoName: TEdit Tag = 2 - Left = 518 + Left = 574 Top = 11 Width = 115 Height = 20 @@ -603,7 +662,7 @@ inherited frmTatDRList: TfrmTatDRList end object DRMID: TEdit Tag = 2 - Left = 341 + Left = 397 Top = 11 Width = 99 Height = 20 @@ -612,13 +671,23 @@ inherited frmTatDRList: TfrmTatDRList end object shdanwei: TEdit Tag = 2 - Left = 712 + Left = 768 Top = 11 Width = 115 Height = 20 TabOrder = 8 OnChange = ToCoNameChange end + object TbNowDay: TcxButton + Left = 267 + Top = 9 + Width = 61 + Height = 25 + Caption = #26412#26085 + LookAndFeel.NativeStyle = True + TabOrder = 9 + OnClick = TbNowDayClick + end end object cxTabControl1: TcxTabControl [3] Left = 0 @@ -656,7 +725,6 @@ inherited frmTatDRList: TfrmTatDRList Height = 222 Align = alBottom TabOrder = 5 - ExplicitTop = 370 object TV2: TcxGridDBTableView Navigator.Buttons.CustomButtons = <> ScrollbarAnnotations.CustomAnnotations = <> @@ -760,11 +828,20 @@ inherited frmTatDRList: TfrmTatDRList HeaderAlignmentHorz = taCenter Width = 66 end + object TV2PFPrice: TcxGridDBColumn + Caption = #24179#26041#21333#20215 + DataBinding.FieldName = 'PFPrice' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end object TV2Column1: TcxGridDBColumn Caption = #25968#37327#21333#20301 DataBinding.FieldName = 'QtyUnit' DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter Options.Editing = False + Width = 80 end object TV2Column2: TcxGridDBColumn Caption = #21457#36135#21305#25968 @@ -906,6 +983,10 @@ inherited frmTatDRList: TfrmTatDRList Caption = #20840#24323 OnClick = PM11Click end + object N2: TMenuItem + Caption = #22797#21046 + OnClick = N2Click + end end object cxGridPopupMenu2: TcxGridPopupMenu Grid = cxGrid2 diff --git a/E04梭织坯布仓库/U_TatDRList.pas b/E04梭织坯布仓库/U_TatDRList.pas index a1d4f76..d008228 100644 --- a/E04梭织坯布仓库/U_TatDRList.pas +++ b/E04梭织坯布仓库/U_TatDRList.pas @@ -1,4 +1,4 @@ -unit U_TatDRList; +unit U_TatDRList; interface @@ -11,9 +11,9 @@ uses cxGrid, DBClient, cxCheckBox, cxCalendar, cxSplitter, RM_Dataset, RM_System, RM_Common, RM_Class, RM_GridReport, RM_e_Xls, Menus, cxPC, cxButtonEdit, cxDropDownEdit, cxTextEdit, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, - dxBarBuiltInMenu, dxSkinsCore, dxSkinsDefaultPainters, U_BaseList, + dxBarBuiltInMenu, dxSkinsCore, dxSkinsDefaultPainters, U_BaseList, Clipbrd, dxDateRanges, dxScrollbarAnnotations, IdBaseComponent, IdComponent, - IdTCPConnection, IdTCPClient, IdHTTP; + IdTCPConnection, IdTCPClient, IdHTTP, cxButtons; type TfrmTatDRList = class(TfrmBaseList) @@ -62,7 +62,7 @@ type v1Column17: TcxGridDBColumn; v1Column1: TcxGridDBColumn; v1Column7: TcxGridDBColumn; - v1Column10: TcxGridDBColumn; + Tv1ToCoName: TcxGridDBColumn; v1Column27: TcxGridDBColumn; btnWC: TToolButton; btnWCCX: TToolButton; @@ -82,7 +82,6 @@ type TV2Column3: TcxGridDBColumn; Label3: TLabel; shdanwei: TEdit; - Tv1Column1: TcxGridDBColumn; ToolButton2: TToolButton; IdHTTP1: TIdHTTP; ToolButton3: TToolButton; @@ -105,13 +104,24 @@ type Tv1CoAddress: TcxGridDBColumn; Label5: TLabel; SSelJS: TLabel; - Tv1Column7: TcxGridDBColumn; + Tv1sselJS: TcxGridDBColumn; PM_1: TPopupMenu; N1: TMenuItem; PM11: TMenuItem; Tv1Telephone: TcxGridDBColumn; cxGridPopupMenu2: TcxGridPopupMenu; TV2issp: TcxGridDBColumn; + N2: TMenuItem; + Tv1Contacts: TcxGridDBColumn; + TbAddressCopy: TToolButton; + Tv1OverTime: TcxGridDBColumn; + Tv1CheckEdit: TcxGridDBColumn; + Tv1CoName: TcxGridDBColumn; + ToolButton8: TToolButton; + TbUndoVisible: TToolButton; + TV2PFPrice: TcxGridDBColumn; + Tv1Saleser: TcxGridDBColumn; + TbNowDay: TcxButton; //RMllPDFExport1: TRMllPDFExport; procedure FormDestroy(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); @@ -146,12 +156,24 @@ type procedure v1Column4PropertiesChange(Sender: TObject); procedure N1Click(Sender: TObject); procedure PM11Click(Sender: TObject); + procedure N2Click(Sender: TObject); + procedure TbAddressCopyClick(Sender: TObject); + procedure Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); + procedure Tv1CheckEditStylesGetContentStyle(Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; var AStyle: TcxStyle); + procedure Tv1FlagStylesGetContentStyle(Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; var AStyle: TcxStyle); + procedure ToolButton8Click(Sender: TObject); + procedure Tv1OverTimeCustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); + procedure TbUndoVisibleClick(Sender: TObject); + procedure TbNowDayClick(Sender: TObject); + private + fcxGridStyleFlag: Boolean; procedure InitGrid(); procedure InitSubGrid(); procedure InitForm(); procedure SetStatus(); function DelData(): Boolean; + { Private declarations } public FFInt: Integer; @@ -180,8 +202,13 @@ begin ToolButton5.Enabled := False; TbGoodsEdit.Enabled := False; + TBEdit.Enabled := False; + + Tv1ToCoName.Visible := False; + Tv1CoName.Visible := False; + TBDel.Enabled := False; - if CANSHU1 = 'ѯ' then + if CANSHU1 = '查询' then begin ToolButton1.Enabled := True; TBPrint.Enabled := True; @@ -192,19 +219,26 @@ begin TbGoodsEdit.Enabled := True; TBAdd.Enabled := True; - TBEdit.Enabled := True; + + Tv1ToCoName.Visible := True; + TV2PFPrice.Visible := False; // TBDel.Enabled := True; case cxTabControl1.TabIndex of + 0: + begin + TBEdit.Enabled := True; + end; 1: begin - btnWC.Enabled := true; + TBEdit.Enabled := True; end; end; end; - if canshu1 = '' then + if canshu1 = '管理' then begin + Tv1CoName.Visible := True; case cxTabControl1.TabIndex of 0: begin @@ -213,12 +247,16 @@ begin tchk.Enabled := true; TBDel.Enabled := True; + + TBEdit.Enabled := True; end; 1: begin Tnochk.Enabled := true; btnWC.Enabled := true; TBDel.Enabled := True; + + TBEdit.Enabled := True; end; 2: begin @@ -230,18 +268,64 @@ begin end; end; end - else if canshu1 = '¼' then + else if canshu1 = '录入' then begin + + Tv1ToCoName.Visible := True; case cxTabControl1.TabIndex of + 0: + begin + TBEdit.Enabled := True; + end; 1: begin - + TBEdit.Enabled := True; btnWC.Enabled := true; // TBDel.Enabled := True; end; end; end; + + if canshu1 = '财务' then + begin + TBAdd.Enabled := False; + TBPrint.Enabled := False; + ToolButton2.Enabled := False; + TbAddressCopy.Enabled := False; + ToolButton8.Enabled := False; + TbUndoVisible.Enabled := False; + +// Tv1CoName.Visible := True; +// case cxTabControl1.TabIndex of +// 0: +// begin +// ToolButton3.Enabled := true; +//// TbGoodsEdit.Enabled := True; +// tchk.Enabled := true; +// +// TBDel.Enabled := True; +// +// TBEdit.Enabled := True; +// end; +// 1: +// begin +// Tnochk.Enabled := true; +// btnWC.Enabled := true; +// TBDel.Enabled := True; +// +// TBEdit.Enabled := True; +// end; +// 2: +// begin +// btnWCCX.Enabled := true; +// end; +// 3: +// begin +// ToolButton5.Enabled := true; +// end; +// end; + end end; procedure TfrmTatDRList.FormDestroy(Sender: TObject); @@ -273,10 +357,8 @@ begin Filtered := False; Close; sql.Clear; - Sql.Add(' select A.*,B.CoAddress '); - Sql.Add(', sselJS=(select isnull(sum(Piece), 0) from Tat_Cloth_DR_Sub X where X.DRMID=A.DRMID ) '); - Sql.Add(', Telephone=(select Telephone from Bs_Company_contact X where X.CoID=A.ToCoID ) '); - sql.Add(' from Tat_Cloth_DR_Main A left join BS_Company B on A.ToCoID = B.COID where 1=1'); + Sql.Add(' select A.* '); + sql.Add(' from V_TatDRList A where 1=1'); if CheckBox1.Checked then begin sql.Add(' and A.Filltime>=''' + FormatDateTime('yyyy-MM-dd', begdate.DateTime) + ''' '); @@ -305,7 +387,7 @@ begin end; end; - if Trim(canshu1) = '¼' then + if Trim(canshu1) = '录入' then begin sql.Add(' and isnull(A.Filler,'''')=''' + Trim(DName) + ''''); end; @@ -327,8 +409,8 @@ end; procedure TfrmTatDRList.InitForm(); begin - ReadCxGrid(trim(self.Caption) + 'Tv1', Tv1, ''); - ReadCxGrid(trim(self.Caption) + 'Tv2', Tv2, ''); + ReadCxGrid(trim(self.Caption) + 'Tv1', Tv1, '发货管理'); + ReadCxGrid(trim(self.Caption) + 'Tv2', Tv2, '发货管理'); EndDate.DateTime := SGetServerDate(ADOQueryTemp); BegDate.DateTime := EndDate.DateTime - 60; @@ -351,7 +433,7 @@ begin Exit; // if cxTabControl1.TabIndex <> 0 then // Exit; -// if Trim(canshu1) <> '' then +// if Trim(canshu1) <> '管理' then // begin // with ADOQueryTemp do @@ -367,12 +449,12 @@ begin // // if ADOQueryTemp.ISEMPTY = True then // begin -// Application.MessageBox('ܲ˵!', 'ʾ', 0); +// Application.MessageBox('不能操作他人的数据!', '提示', 0); // Exit; // end; if Trim(Order_Main.fieldbyname('Filler').AsString) <> Trim(DName) then begin - Application.MessageBox('ܲ˵!', 'ʾ', 0); + Application.MessageBox('不能操作他人的数据!', '提示', 0); Exit; end; // end; @@ -386,7 +468,7 @@ begin // end; // if Trim(ADOQueryTemp.fieldbyname('YSID').AsString) <> '' then // begin -// Application.MessageBox('Ӧ˿޸!', 'ʾ', 0); +// Application.MessageBox('已生成应收账款不能修改数据!', '提示', 0); // Exit; // end; try @@ -394,6 +476,8 @@ begin with frmTatDRtInPut do begin PState := 1; + canshu1 := self.canshu1; + isCheck := cxTabControl1.TabIndex; Tv1Volume.Options.Editing := False; Tv1ApplicationReaon.Options.Editing := False; FDRMID := Trim(Self.Order_Main.fieldbyname('DRMID').AsString); @@ -413,11 +497,11 @@ begin Exit; if (cxTabControl1.TabIndex <> 0) and (cxTabControl1.TabIndex <> 1) then Exit; -// if canshu1 <> '' then +// if canshu1 <> '管理' then // begin // if Trim(Order_Main.fieldbyname('Filler').AsString) <> Trim(DName) then // begin -// Application.MessageBox('ܲ˵!', 'ʾ', 0); +// Application.MessageBox('不能操作他人的数据!', '提示', 0); // Exit; // end; // end; @@ -426,13 +510,13 @@ begin begin Close; sql.Clear; - sql.Add(' select * from Tat_Cloth_IO where ioflag='''' '); + sql.Add(' select * from Tat_Cloth_IO where ioflag=''出库'' '); sql.add(' and IONo=''' + Trim(Order_Main.fieldbyname('DRMID').AsString) + ''''); Open; end; if ADOQueryTemp.IsEmpty = False then begin - Application.MessageBox('ݲɾ!', 'ʾ', 0); + Application.MessageBox('出库数据不能删除!', '提示', 0); exit; end; @@ -440,17 +524,17 @@ begin begin Close; sql.Clear; - sql.Add(' select * from Tat_Cloth_IO where ioflag='''' '); + sql.Add(' select * from Tat_Cloth_IO where ioflag=''待出库'' '); sql.add(' and IONo=''' + Trim(Order_Main.fieldbyname('DRMID').AsString) + ''''); Open; end; if ADOQueryTemp.IsEmpty = False then begin - Application.MessageBox('ݲɾ!', 'ʾ', 0); + Application.MessageBox('待出库数据不能删除!', '提示', 0); exit; end; - if Application.MessageBox('ȷҪɾ', 'ʾ', 32 + 4) <> IDYES then + if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then Exit; if DelData() then begin @@ -467,7 +551,7 @@ begin frmTatDRtInPut := TfrmTatDRtInPut.Create(Application); with frmTatDRtInPut do begin - PState := 2; ///޸ + PState := 2; ///配货修改 FDRMID := Trim(Self.Order_Main.fieldbyname('DRMID').AsString); canshu1 := self.canshu1; @@ -497,6 +581,13 @@ begin end; end; +procedure TfrmTatDRList.TbNowDayClick(Sender: TObject); +begin + BegDate.Date := strToDate(FormatDateTime('yyyy-MM-dd', SGetServerDate(ADOQueryCmd))); + EndDate.Date := strToDate(FormatDateTime('yyyy-MM-dd', SGetServerDate(ADOQueryCmd))); + InitGrid(); +end; + function TfrmTatDRList.DelData(): Boolean; begin @@ -537,7 +628,7 @@ begin except ADOQueryCmd.Connection.RollbackTrans; Result := False; - Application.MessageBox('ɾ쳣', 'ʾ', 0); + Application.MessageBox('数据删除异常!', '提示', 0); end; end; @@ -545,7 +636,14 @@ procedure TfrmTatDRList.TBExportClick(Sender: TObject); begin if ADOQueryMain.IsEmpty then Exit; -// SelExportData(Tv1, ADOQueryMain, 'б'); + with Order_Main do + begin + Filtered := false; + Filter := ' ssel = 1'; + Filtered := true; + end; + TcxGridToExcel(Self.Caption, cxGrid1); + InitGrid(); end; procedure TfrmTatDRList.TBPrintClick(Sender: TObject); @@ -574,6 +672,16 @@ begin InitGrid(); end; +procedure TfrmTatDRList.TbUndoVisibleClick(Sender: TObject); +begin + with Order_Main do + begin + Edit; + FieldByName('OverTime').Value := ''; + post; + end; +end; + procedure TfrmTatDRList.TBAddClick(Sender: TObject); var maxno: string; @@ -583,6 +691,7 @@ begin with frmTatDRtInPut do begin PState := 0; + isCheck := 0; FDRMID := ''; canshu1 := self.canshu1; if ShowModal = 1 then @@ -595,12 +704,54 @@ begin end; end; +//procedure TfrmTatDRList.TbAddressCopyClick(Sender: TObject); +//var +// CopyValue : string; +//begin +// if Order_Main.IsEmpty then +// begin +// Exit; +// end; +// +// if not Order_Main.Active then +// begin +// Application.MessageBox('未选中记录!','提示信息',MB_OK); +// end; +// +// CopyValue := Order_Main.FieldByName('Contacts').AsString + ' ' ; +// CopyValue := CopyValue + Order_Main.FieldByName('Telephone').AsString + #13; +// CopyValue := CopyValue + Order_Main.FieldByName('CoAddress').AsString; +// Clipboard.SetTextBuf(PChar(Trim(CopyValue))); +//end; +procedure TfrmTatDRList.TbAddressCopyClick(Sender: TObject); +var + CopyValue: string; + MsgLabel: TLabel; +begin + if Order_Main.IsEmpty or not Order_Main.Active then + begin + Application.MessageBox('未选中记录!', '提示信息', MB_OK); + Exit; + end; + + CopyValue := Order_Main.FieldByName('Contacts').AsString + ' '; + CopyValue := CopyValue + Order_Main.FieldByName('Telephone').AsString + #13; + CopyValue := CopyValue + Order_Main.FieldByName('CoAddress').AsString; + + Clipboard.AsText := Trim(CopyValue); +// MessageDlg('地址信息已成功复制到剪贴板!', mtInformation, [mbOK], 0); + + +end; + procedure TfrmTatDRList.FormShow(Sender: TObject); begin inherited; + fcxGridStyleFlag := False; canshu1 := self.fParameters1; InitForm(); SetStatus(); + end; procedure TfrmTatDRList.CheckBox1Click(Sender: TObject); @@ -626,6 +777,7 @@ begin ToolBar2.Visible := False; TBSave.Visible := False; ScrollBox1.Enabled := False; + canshu1 := self.canshu1; Tv1.OptionsSelection.CellSelect := False; if ShowModal = 1 then begin @@ -665,6 +817,12 @@ begin exit; if cxTabControl1.TabIndex <> 0 then exit; + + if Order_Main.Locate('ssel', True, []) = false then + begin + Application.MessageBox('请先选择数据!', '提示信息', MB_OK); + exit; + end; try with Order_Main do begin @@ -691,9 +849,9 @@ begin InitGrid(); InitSubGrid(); - application.MessageBox('ȡɹ', 'ʾϢ'); + application.MessageBox('取消成功!', '提示信息'); except - application.MessageBox('ȡʧܣ', 'ʾϢ', 0); + application.MessageBox('取消失败!', '提示信息', 0); end; end; @@ -705,10 +863,10 @@ begin frmAttachmentUpload := TfrmAttachmentUpload.Create(Application); with frmAttachmentUpload do begin - if Trim(canshu1) <> 'ѯ' then + if Trim(canshu1) <> '查询' then FEditAuthority := True; fkeyNO := Trim(Self.Order_Main.fieldbyname('DRMID').AsString); - fType := ''; + fType := '发货申请'; if ShowModal = 1 then begin @@ -726,6 +884,12 @@ begin exit; if cxTabControl1.TabIndex <> 3 then exit; + + if Order_Main.Locate('ssel', True, []) = false then + begin + Application.MessageBox('请先选择数据!', '提示信息', MB_OK); + exit; + end; try with Order_Main do begin @@ -752,9 +916,9 @@ begin InitGrid(); InitSubGrid(); - application.MessageBox('ȡɹ', 'ʾϢ'); + application.MessageBox('撤销取消成功!', '提示信息'); except - application.MessageBox('ȡʧܣ', 'ʾϢ', 0); + application.MessageBox('撤销取消失败!', '提示信息', 0); end; end; @@ -773,6 +937,13 @@ begin exit; if cxTabControl1.TabIndex <> 0 then exit; + + if Order_Main.Locate('ssel', True, []) = false then + begin + Application.MessageBox('请先选择数据!', '提示信息', MB_OK); + exit; + end; + try with Order_Main do begin @@ -801,9 +972,9 @@ begin InitGrid(); InitSubGrid(); - application.MessageBox('˳ɹ', 'ʾϢ'); + application.MessageBox('审核成功!', '提示信息'); except - application.MessageBox('ʧܣ', 'ʾϢ', 0); + application.MessageBox('审核失败!', '提示信息', 0); end; end; @@ -839,6 +1010,11 @@ begin SSelJS.Caption := CurrToStr(msumJS); end; +procedure TfrmTatDRList.N2Click(Sender: TObject); +begin + Clipboard.SetTextBuf(PChar(Trim(Order_Main.fieldbyname(TV1.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString))); +end; + procedure TfrmTatDRList.PM11Click(Sender: TObject); begin SelOKNo(Order_Main, false); @@ -851,6 +1027,11 @@ begin exit; if cxTabControl1.TabIndex <> 1 then exit; + if Order_Main.Locate('ssel', True, []) = false then + begin + Application.MessageBox('请先选择数据!', '提示信息', MB_OK); + exit; + end; try with Order_Main do begin @@ -875,9 +1056,9 @@ begin EnableControls; end; InitGrid(); - application.MessageBox('ɹ', 'ʾϢ'); + application.MessageBox('撤销成功!', '提示信息'); except - application.MessageBox('ʧܣ', 'ʾϢ', 0); + application.MessageBox('撤销失败!', '提示信息', 0); end; end; @@ -891,6 +1072,12 @@ procedure TfrmTatDRList.btnWCCXClick(Sender: TObject); begin if Order_Main.IsEmpty then exit; + + if Order_Main.Locate('ssel', True, []) = false then + begin + Application.MessageBox('请先选择数据!', '提示信息', MB_OK); + exit; + end; try with Order_Main do begin @@ -909,7 +1096,7 @@ begin end; if ADOQueryTemp.FieldByName('intReturn').AsInteger = -1 then begin - Application.MessageBox(PChar(ADOQueryTemp.fieldbyname('ShowMsg').AsString), 'ʾ', 0); + Application.MessageBox(PChar(ADOQueryTemp.fieldbyname('ShowMsg').AsString), '提示', 0); exit; end; @@ -929,16 +1116,16 @@ begin end; InitGrid(); InitSubGrid(); - application.MessageBox('ɹ', 'ʾϢ'); + application.MessageBox('操作成功!', '提示信息'); except - application.MessageBox('ʧܣ', 'ʾϢ', 0); + application.MessageBox('操作失败!', '提示信息', 0); end; end; procedure TfrmTatDRList.ToolButton6Click(Sender: TObject); begin - WriteCxGrid(trim(self.Caption) + 'Tv1', Tv1, ''); - WriteCxGrid(trim(self.Caption) + 'Tv2', Tv2, ''); + WriteCxGrid(trim(self.Caption) + 'Tv1', Tv1, '发货管理'); + WriteCxGrid(trim(self.Caption) + 'Tv2', Tv2, '发货管理'); end; procedure TfrmTatDRList.ToolButton7Click(Sender: TObject); @@ -957,18 +1144,18 @@ begin sql.add('where IsStocking=''1'''); sql.Add('and STKID IN (SELECT STKID FROM Tat_Cloth_IO F '); SQL.Add('where iono=' + quotedstr(trim(Order_Main.fieldbyname('DRMID').AsString))); - sql.add('and ioflag='''')'); + sql.add('and ioflag=''待出库'')'); - sql.Add('update Tat_Cloth_Inspect SET CIIOFlag=''ѳ'' '); + sql.Add('update Tat_Cloth_Inspect SET CIIOFlag=''已出库'' '); // sql.Add('where iono=' + quotedstr(trim(Order_Main.fieldbyname('DRMID').AsString))); sql.add('where '); sql.Add(' ciid IN (SELECT STKID FROM Tat_Cloth_IO F '); SQL.Add('where iono=' + quotedstr(trim(Order_Main.fieldbyname('DRMID').AsString))); - sql.add('and ioflag='''')'); + sql.add('and ioflag=''待出库'')'); - sql.Add('update Tat_Cloth_IO SET ioflag='''',iotime=getdate() '); + sql.Add('update Tat_Cloth_IO SET ioflag=''出库'',iotime=getdate() '); sql.Add('where iono=' + quotedstr(trim(Order_Main.fieldbyname('DRMID').AsString))); - sql.add('and ioflag='''''); + sql.add('and ioflag=''待出库'''); execsql; end; with ADOQueryCmd do @@ -986,18 +1173,53 @@ begin end; InitGrid(); InitSubGrid(); - application.MessageBox('ɹ', 'ʾϢ'); + application.MessageBox('操作成功!', '提示信息'); except - application.MessageBox('ʧܣ', 'ʾϢ', 0); + application.MessageBox('操作失败!', '提示信息', 0); end; end; +procedure TfrmTatDRList.ToolButton8Click(Sender: TObject); +begin + with ADOQueryCmd do + begin + Close; + SQL.Clear; + SQL.Add(' SELECT 1 FROM Tat_Cloth_DR_Sub X WHERE X.DRMID=' + quotedStr(Trim(Order_Main.FieldByName('DRMID').asString))); + sql.Add(' AND isnull(X.Piece,0) > isnull(X.DlyPiece,0)'); + SQL.Add(' AND CONVERT(date, ' + quotedStr(Trim(Order_Main.FieldByName('DlyDate').asString)) + ') < CONVERT(date, GETDATE())'); + Open; + end; + + if not ADOQueryCmd.IsEmpty then + begin + with Order_Main do + begin + Edit; + FieldByName('OverTime').asString := '未发完'; + post; + end; + end + else + begin + Application.MessageBox('已发完!', '提示信息', MB_OK); + Exit; + end; + +end; + procedure TfrmTatDRList.btnWCClick(Sender: TObject); var str: string; begin if Order_Main.IsEmpty then exit; + + if Order_Main.Locate('ssel', True, []) = false then + begin + Application.MessageBox('请先选择数据!', '提示信息', MB_OK); + exit; + end; try with Order_Main do begin @@ -1016,14 +1238,21 @@ begin end; if ADOQueryTemp.FieldByName('TT').AsInteger = 0 then begin - application.MessageBox('Ϊ0ɣ', 'ʾϢ'); + application.MessageBox('发货数量为0,不能完成!', '提示信息'); EnableControls; exit; end; if ADOQueryTemp.FieldByName('TT').AsInteger < ADOQueryTemp.FieldByName('T1').AsInteger then begin - if InputQuery('뱸ע', 'ע', str) then + if InputQuery('输入备注', '备注', str) then begin + + if Trim(str) = '' then + begin + ShowMessage('备注不能为空!'); + Exit; // 或者使用 Exit; 来退出当前过程 + end; + with ADOQueryCmd do begin Close; @@ -1062,9 +1291,30 @@ begin end; InitGrid(); InitSubGrid(); - application.MessageBox('ɹ', 'ʾϢ'); + application.MessageBox('操作成功!', '提示信息'); except - application.MessageBox('ʧܣ', 'ʾϢ', 0); + application.MessageBox('操作失败!', '提示信息', 0); + end; +end; + +procedure TfrmTatDRList.Tv1CheckEditStylesGetContentStyle(Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; var AStyle: TcxStyle); +var + GroupValue: string; +// ColorValue: Integer; + I: Integer; +begin + if (ARecord <> nil) and (ARecord is TcxGridDataRow) then + begin + GroupValue := VarToStr(ARecord.Values[Tv1CheckEdit.Index]); + if (GroupValue <> '') and (GroupValue <> null) then + begin +// ColorValue := StrToInt(GroupValue); + AStyle := TcxStyle.Create(nil); + if GroupValue = '已改单' then + AStyle.Color := $0090FFFF; + AStyle.TextColor := clBlack; + end; + end; end; @@ -1108,26 +1358,88 @@ begin tv1.Controller.EditingController.ShowEdit(); end; +procedure TfrmTatDRList.Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); +var + FLAG: Variant; +begin +// FLAG := AViewInfo.GridRecord.Values[TcxGridDBTableView(Sender).GetColumnByFieldName('FLAG').Index]; +// if FLAG = 1 then // 未排入计划单 +// begin +// ACanvas.Brush.Color := $00CCCCFF; // 浅红色背景 +// ACanvas.Font.Color := clRed; +// ACanvas.Font.Style := [fsBold]; +// end; +end; + +procedure TfrmTatDRList.Tv1FlagStylesGetContentStyle(Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; var AStyle: TcxStyle); +var + GroupValue: string; +// ColorValue: Integer; + I: Integer; +begin + +// if not fcxGridStyleFlag then +// begin +// Exit; +// end; +// +// if (ARecord <> nil) and (ARecord is TcxGridDataRow) then +// begin +// GroupValue := VarToStr(ARecord.Values[Tv1OverTime.Index]); +// if (GroupValue <> '') and (GroupValue <> null) then +// begin +//// ColorValue := StrToInt(GroupValue); +// AStyle := TcxStyle.Create(nil); +// if GroupValue = '已超期' then +// AStyle.Color := $00CCCCFF; +// AStyle.TextColor := clBlack; +// end; +// +// end; +end; + procedure TfrmTatDRList.Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean); begin InitSubGrid(); end; +procedure TfrmTatDRList.Tv1OverTimeCustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); +//单格子 +var + FLAG: string; +begin +// id := TV1.GetColumnByFieldName('OverTime').Index; //;-TV1.GroupedItemCount; +// if AViewInfo.GridRecord.Values[tv1.GetColumnByFieldName('OverTime').Index] = 1 then +// ACanvas.BRUSH.Color := clAqua; +// if AViewInfo.GridRecord.Values[id] = 1 then +// begin +// ACanvas.Brush.Color := clRed; +// end; + + FLAG := AViewInfo.GridRecord.Values[TcxGridDBTableView(Sender).GetColumnByFieldName('OverTime').Index]; + if FLAG = '未发完' then // 未排入计划单 + begin + ACanvas.Brush.Color := $00CCCCFF; // 浅红色背景 + ACanvas.Font.Color := clRed; + ACanvas.Font.Style := [fsBold]; + end; +end; + procedure TfrmTatDRList.v1Column4PropertiesChange(Sender: TObject); var mDRMIDList: string; TotalPiece: Variant; - mDRMID: string; //λ + mDRMID: string; //定位作用 begin // mDRMIDList := ''; - // 浱ǰ¼ BCIID + // 保存当前记录的 BCIID // if not Order_Main.IsEmpty then // mDRMID := Trim(Order_Main.FieldByName('DRMID').AsString) // else // mDRMID := ''; // // try -// // ȷݼ״̬ +// // 确保数据集状态正常 // Order_Main.DisableControls; // try // Order_Main.First; @@ -1146,7 +1458,7 @@ begin // Order_Main.EnableControls; // end; // -// // ûѡκμ¼ +// // 如果没有选择任何记录 // if mDRMIDList = '' then // begin // @@ -1156,7 +1468,7 @@ begin // Exit; // end; // -// // ִвѯ +// // 执行查询 // with ADOQueryCmd do // begin // Close; @@ -1164,16 +1476,16 @@ begin // SQL.Add('select isnull(sum(Piece), 0) as sselJS from Tat_Cloth_DR_Sub'); // SQL.Add('where DRMID in (' + mDRMIDList + ')'); // -// // ʱʾSQL +// // 调试时可以显示SQL语句 //// ShowMessage('SQL: ' + SQL.Text); // // Open; // -// // ȫķʽ +// // 处理结果(更安全的方式) // if not IsEmpty then // begin // TotalPiece := FieldByName('sselJS').Value; -// // NULLֵͿֵ +// // 处理NULL值和空值 // if VarIsNull(TotalPiece) or VarIsEmpty(TotalPiece) then // sselJS.Caption := '0' // else @@ -1186,7 +1498,7 @@ begin // end; // // -// // Զλԭ¼ +// // 最后尝试定位回原记录 // if mDRMID <> '' then // Order_Main.Locate('DRMID', mDRMID, []); //// sselJS.Text := '0'; @@ -1194,9 +1506,9 @@ begin // except // on E: Exception do // begin -// // ¼Ϣ +// // 记录错误信息 // sselJS.Caption := '0'; -// ShowMessage('ѯʧ: ' + E.Message + #13#10 + 'SQL: ' + ADOQueryCmd.SQL.Text); +// ShowMessage('查询失败: ' + E.Message + #13#10 + 'SQL语句: ' + ADOQueryCmd.SQL.Text); // end; // end; @@ -1204,7 +1516,7 @@ begin try mDRMID := Trim(Order_Main.FieldByName('DRMID').AsString); - // ȷݼ״̬ + // 确保数据集状态正常 Order_Main.DisableControls; // with ADOQueryCmd do // begin @@ -1215,7 +1527,7 @@ begin // Open; // end; - // ûѡκμ¼ + // 如果没有选择任何记录 if Order_Main.IsEmpty then exit; @@ -1232,9 +1544,9 @@ begin except on E: Exception do begin - // ¼Ϣ + // 记录错误信息 sselJS.Caption := '0'; - ShowMessage('ѯʧ: ' + E.Message + #13#10 + 'SQL: ' + ADOQueryCmd.SQL.Text); + ShowMessage('查询失败: ' + E.Message + #13#10 + 'SQL语句: ' + ADOQueryCmd.SQL.Text); end; end; end; diff --git a/E04梭织坯布仓库/U_TatDRtInPut.dfm b/E04梭织坯布仓库/U_TatDRtInPut.dfm index a8b41ba..4bc2c87 100644 --- a/E04梭织坯布仓库/U_TatDRtInPut.dfm +++ b/E04梭织坯布仓库/U_TatDRtInPut.dfm @@ -3,7 +3,7 @@ object frmTatDRtInPut: TfrmTatDRtInPut Top = 139 Caption = #21457#36135#30003#35831#24405#20837 ClientHeight = 644 - ClientWidth = 1252 + ClientWidth = 1264 Color = clWhite Font.Charset = GB2312_CHARSET Font.Color = clWindowText @@ -19,7 +19,7 @@ object frmTatDRtInPut: TfrmTatDRtInPut Tag = 1 Left = 0 Top = 0 - Width = 1252 + Width = 1264 Height = 38 AutoSize = True ButtonHeight = 38 @@ -77,7 +77,7 @@ object frmTatDRtInPut: TfrmTatDRtInPut object ScrollBox1: TScrollBox Left = 0 Top = 38 - Width = 1252 + Width = 1264 Height = 99 Align = alTop BevelInner = bvNone @@ -152,19 +152,6 @@ object frmTatDRtInPut: TfrmTatDRtInPut Font.Style = [fsBold] ParentFont = False end - object Label3: TLabel - Left = 873 - Top = 13 - Width = 65 - Height = 12 - Caption = #25910#36135#21333#20301#65306 - Font.Charset = GB2312_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = #23435#20307 - Font.Style = [fsBold] - ParentFont = False - end object Label4: TLabel Left = 31 Top = 43 @@ -275,23 +262,13 @@ object frmTatDRtInPut: TfrmTatDRtInPut 'Y' 'Kg') end - object SHDANWEI: TBtnEditC - Tag = 1 - Left = 936 - Top = 9 - Width = 138 - Height = 20 - TabOrder = 5 - OnBtnUpClick = SHDANWEIBtnUpClick - OnBtnDnClick = SHDANWEIBtnDnClick - end object Seal: TEdit Tag = 1 Left = 96 Top = 40 Width = 132 Height = 18 - TabOrder = 6 + TabOrder = 5 end object tube: TEdit Tag = 1 @@ -299,7 +276,7 @@ object frmTatDRtInPut: TfrmTatDRtInPut Top = 40 Width = 132 Height = 18 - TabOrder = 7 + TabOrder = 6 end object Packaging: TEdit Tag = 1 @@ -307,7 +284,7 @@ object frmTatDRtInPut: TfrmTatDRtInPut Top = 40 Width = 132 Height = 18 - TabOrder = 8 + TabOrder = 7 end object ToCoID: TEdit Tag = 1 @@ -315,7 +292,7 @@ object frmTatDRtInPut: TfrmTatDRtInPut Top = 35 Width = 96 Height = 18 - TabOrder = 9 + TabOrder = 8 Visible = False end end @@ -323,7 +300,7 @@ object frmTatDRtInPut: TfrmTatDRtInPut Tag = 1 Left = 0 Top = 137 - Width = 1252 + Width = 1264 Height = 38 AutoSize = True ButtonHeight = 38 @@ -389,7 +366,7 @@ object frmTatDRtInPut: TfrmTatDRtInPut object cxGrid1: TcxGrid Left = 0 Top = 175 - Width = 1252 + Width = 1264 Height = 469 Align = alClient TabOrder = 3 @@ -500,6 +477,13 @@ object frmTatDRtInPut: TfrmTatDRtInPut HeaderAlignmentHorz = taCenter Width = 71 end + object Tv1PFPrice: TcxGridDBColumn + Caption = #24179#26041#21333#20215 + DataBinding.FieldName = 'PFPrice' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end object Tv1Volume: TcxGridDBColumn Caption = #37197#36135#30003#35831#21367#25968 DataBinding.FieldName = 'Volume' @@ -542,14 +526,14 @@ object frmTatDRtInPut: TfrmTatDRtInPut end object DataSource1: TDataSource DataSet = Order_Sub - Left = 684 - Top = 276 + Left = 604 + Top = 308 end object Order_Sub: TClientDataSet Aggregates = <> Params = <> - Left = 596 - Top = 284 + Left = 628 + Top = 378 end object ADOQuery1: TADOQuery Connection = DataLink_TatClothStk.ADOLink diff --git a/E04梭织坯布仓库/U_TatDRtInPut.pas b/E04梭织坯布仓库/U_TatDRtInPut.pas index 502d374..558fdb2 100644 --- a/E04梭织坯布仓库/U_TatDRtInPut.pas +++ b/E04梭织坯布仓库/U_TatDRtInPut.pas @@ -49,8 +49,6 @@ type ToolButton4: TToolButton; Label27: TLabel; QtyUnit: TComboBox; - Label3: TLabel; - SHDANWEI: TBtnEditC; ToolButton5: TToolButton; ToolButton6: TToolButton; Tv1C_code: TcxGridDBColumn; @@ -70,6 +68,7 @@ type Label7: TLabel; ToCoID: TEdit; Tv1issp: TcxGridDBColumn; + Tv1PFPrice: TcxGridDBColumn; procedure TBCloseClick(Sender: TObject); procedure FormShow(Sender: TObject); procedure TBSaveClick(Sender: TObject); @@ -97,6 +96,7 @@ type public PState, CopyInt: Integer; FDRMID, canshu1: string; + isCheck: Integer; /////////ж޸Dz״̬ { Public declarations } end; @@ -198,7 +198,7 @@ end; procedure TfrmTatDRtInPut.SHDANWEIBtnDnClick(Sender: TObject); begin - SHDANWEI.Text := ''; +// SHDANWEI.Text := ''; end; procedure TfrmTatDRtInPut.SHDANWEIBtnUpClick(Sender: TObject); @@ -212,7 +212,7 @@ begin flagname := 'ջλ'; if ShowModal = 1 then begin - SHDANWEI.text := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString); +// SHDANWEI.text := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString); end; end; @@ -228,6 +228,11 @@ begin readCxGrid(trim(self.Caption), Tv1, ''); + if canshu1 = 'ѯ' then + begin + Tv1PFPrice.Visible := false; + end; + InitData(); end; @@ -409,7 +414,15 @@ begin end; RTSetsavedata(ADOCmd, 'Tat_Cloth_DR_Main', ScrollBox1, 1); FieldByName('DRMID').Value := Trim(MaxMid); - FieldByName('Status').Value := '0'; + if isCheck <> 1 then + begin + FieldByName('Status').Value := '0'; + end; + + if isCheck = 1 then ///޸ + begin + FieldByName('CheckEdit').Value := 'Ѹĵ'; + end; Post; end; ///////////////// ///////////////// @@ -499,6 +512,21 @@ begin end; // ShowMessage(Order_Sub.FieldByName('Piece').AsString); C_NumHB(); +///////////////////////////////////////ԭ//////////////////// + Order_Sub.First; + while not Order_Sub.Eof do + begin + if (Order_Sub.FieldByName('Volume').AsString <> '') and (not Order_Sub.FieldByName('Volume').isnull) then + begin + if ((Order_Sub.FieldByName('ApplicationReaon').AsString = '') or (Order_Sub.FieldByName('ApplicationReaon').isnull)) then + begin + Application.MessageBox('дԭ', 'ʾϢ', MB_OK); + Exit; + end; + end; + Order_Sub.Next; + end; + if SaveData() then begin Application.MessageBox('ɹ', 'ʾ', 0); @@ -641,22 +669,23 @@ begin begin if ShowModal = 1 then begin - while cds_sub.locate('SSel', true, []) do +// while cds_sub.locate('SSel', true, []) do + CDS_2.First; + while not CDS_2.Eof do begin with Self.Order_Sub do begin Append; - FieldByName('C_Code').Value := frmTatClothInfoSel.CDS_1.fieldbyname('C_Code').Value; - FieldByName('C_Name').Value := frmTatClothInfoSel.CDS_1.fieldbyname('C_Name').Value; + FieldByName('C_Code').Value := frmTatClothInfoSel.cds_2.fieldbyname('C_Code').Value; + FieldByName('C_Name').Value := frmTatClothInfoSel.cds_2.fieldbyname('C_Name').Value; // FieldByName('C_Spec').Value := frmTatClothInfoSel.CDS_1.fieldbyname('C_Spec').Value; - FieldByName('C_Width').Value := frmTatClothInfoSel.cds_sub.fieldbyname('C_MXMF').Value; - FieldByName('C_GramWeight').Value := frmTatClothInfoSel.CDS_1.fieldbyname('C_GramWeight').Value; - FieldByName('C_Color').Value := frmTatClothInfoSel.CDS_1.fieldbyname('C_Color').Value; + FieldByName('C_Width').Value := frmTatClothInfoSel.cds_2.fieldbyname('C_MXMF').Value; + FieldByName('C_GramWeight').Value := frmTatClothInfoSel.cds_2.fieldbyname('C_GramWeight').Value; + FieldByName('C_Color').Value := frmTatClothInfoSel.cds_2.fieldbyname('C_Color').Value; // FieldByName('C_ColorNo').Value := frmTatClothInfoSel.CDS_1.fieldbyname('C_ColorNo').Value; // FieldByName('C_Pattern').Value := frmTatClothInfoSel.CDS_1.fieldbyname('C_Pattern').Value; end; - cds_sub.Edit; - cds_sub.fieldbyname('SSel').value := false; + cds_2.Next; end; end; diff --git a/E04梭织坯布仓库/testDll.identcache b/E04梭织坯布仓库/testDll.identcache index 39d5501..9b95189 100644 Binary files a/E04梭织坯布仓库/testDll.identcache and b/E04梭织坯布仓库/testDll.identcache differ