diff --git a/A00通用窗体/U_LabelPrint.dfm b/A00通用窗体/U_LabelPrint.dfm index 710d88e..f941e48 100644 --- a/A00通用窗体/U_LabelPrint.dfm +++ b/A00通用窗体/U_LabelPrint.dfm @@ -84,8 +84,8 @@ inherited frmLabelPrint: TfrmLabelPrint TabOrder = 0 end object cbbLab: TcxMRUEdit - Left = 25 - Top = 24 + Left = 26 + Top = 27 ParentFont = False Properties.DropDownListStyle = lsFixedList Properties.ImmediatePost = True diff --git a/A01基础公司管理/Company.dproj b/A01基础公司管理/Company.dproj index f768744..de5714a 100644 --- a/A01基础公司管理/Company.dproj +++ b/A01基础公司管理/Company.dproj @@ -123,7 +123,7 @@ Debug - D:\Dp10RepoV1\项目代码\d10myxushang\A01基础公司管理\testDll.exe + D:\Dp10RepoV1\项目代码\D10xhGemei\A01基础公司管理\testDll.exe CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName) diff --git a/A01基础公司管理/U_CustInput.dfm b/A01基础公司管理/U_CustInput.dfm index 806539e..fbcafef 100644 --- a/A01基础公司管理/U_CustInput.dfm +++ b/A01基础公司管理/U_CustInput.dfm @@ -67,6 +67,7 @@ inherited frmCustInput: TfrmCustInput Ctl3D = False ParentCtl3D = False TabOrder = 1 + ExplicitTop = 31 object Label2: TLabel Left = 17 Top = 12 @@ -83,41 +84,42 @@ inherited frmCustInput: TfrmCustInput end object Label7: TLabel Left = 17 - Top = 157 + Top = 127 Width = 32 Height = 21 Caption = #22791#27880 end object Label1: TLabel - Left = 304 - Top = 12 + Left = 315 + Top = 10 Width = 32 Height = 21 Caption = #31616#31216 end object Label4: TLabel Left = 17 - Top = 124 + Top = 85 Width = 32 Height = 21 - Caption = #22320#22336 + Caption = #21306#22495 end object Label8: TLabel - Left = 297 - Top = 87 + Left = 949 + Top = 180 Width = 32 Height = 21 Caption = #22269#23478 + Visible = False end object Label10: TLabel - Left = 597 + Left = 605 Top = 49 Width = 32 Height = 21 Caption = #31561#32423 end object Label3: TLabel - Left = 597 + Left = 605 Top = 12 Width = 32 Height = 21 @@ -131,15 +133,16 @@ inherited frmCustInput: TfrmCustInput Caption = #21697#29260#21830 end object Label9: TLabel - Left = 17 - Top = 87 + Left = 915 + Top = 196 Width = 16 Height = 21 Caption = #27954 + Visible = False end object Label11: TLabel - Left = 558 - Top = 87 + Left = 565 + Top = 85 Width = 71 Height = 21 Caption = #22320#21306'/'#22478#24066 @@ -152,31 +155,38 @@ inherited frmCustInput: TfrmCustInput Caption = #26376#32467#26041#24335 end object lbl2: TLabel - Left = 861 - Top = 87 + Left = 854 + Top = 83 Width = 64 Height = 21 Caption = #19994#21153#21592#65306 end object lblSalesId: TLabel - Left = 869 - Top = 188 + Left = 921 + Top = 250 Width = 80 Height = 21 Caption = #19994#21153#32534#21495#65306 Visible = False end + object Label13: TLabel + Left = 852 + Top = 128 + Width = 80 + Height = 21 + Caption = #27424#27454#39069#24230#65306 + end object CoName: TcxTextEdit Tag = 2 Left = 55 - Top = 43 + Top = 44 TabOrder = 1 - Width = 487 + Width = 500 end object CoAbbrName: TcxTextEdit Tag = 2 - Left = 342 - Top = 6 + Left = 353 + Top = 4 TabOrder = 2 Width = 200 end @@ -190,7 +200,7 @@ inherited frmCustInput: TfrmCustInput end object CoBusinessType: TcxButtonEdit Tag = 2 - Left = 637 + Left = 645 Top = 6 Hint = 'CoBusinessType/'#23458#25143#31867#22411 Properties.Buttons = < @@ -207,8 +217,8 @@ inherited frmCustInput: TfrmCustInput end object cocountry: TcxButtonEdit Tag = 2 - Left = 335 - Top = 80 + Left = 987 + Top = 173 Hint = 'CoCountry/'#22269#23478 Properties.Buttons = < item @@ -219,12 +229,13 @@ inherited frmCustInput: TfrmCustInput Properties.OnButtonClick = BuyNamePropertiesButtonClick Style.ButtonStyle = btsDefault TabOrder = 4 + Visible = False OnDblClick = CoBusinessTypeDblClick Width = 200 end object CoLevel: TcxComboBox Tag = 2 - Left = 636 + Left = 644 Top = 43 Properties.Items.Strings = ( 'A' @@ -237,7 +248,7 @@ inherited frmCustInput: TfrmCustInput object ParentCoName: TcxButtonEdit Tag = 2 Left = 927 - Top = 8 + Top = 7 Hint = 'CoBusinessType/'#23458#25143#31867#22411 Properties.Buttons = < item @@ -251,25 +262,18 @@ inherited frmCustInput: TfrmCustInput OnDblClick = CoBusinessTypeDblClick Width = 200 end - object CoAddress: TcxTextEdit - Tag = 2 - Left = 55 - Top = 118 - TabOrder = 7 - Width = 780 - end object CoNote: TcxMemo Tag = 2 Left = 55 - Top = 157 - TabOrder = 8 + Top = 127 + TabOrder = 7 Height = 77 Width = 780 end object Continent: TcxButtonEdit Tag = 2 - Left = 55 - Top = 81 + Left = 935 + Top = 208 Hint = 'Continent/'#27954 Properties.Buttons = < item @@ -279,32 +283,33 @@ inherited frmCustInput: TfrmCustInput Properties.ReadOnly = True Properties.OnButtonClick = BuyNamePropertiesButtonClick Style.ButtonStyle = btsDefault + TabOrder = 8 + Visible = False + OnDblClick = CoBusinessTypeDblClick + Width = 200 + end + object Coarea: TcxButtonEdit + Tag = 2 + Left = 643 + Top = 78 + Hint = 'Coarea/'#22320#21306 + Properties.Buttons = < + item + Default = True + Kind = bkEllipsis + end> + Properties.ReadOnly = True + Properties.OnButtonClick = BuyNamePropertiesButtonClick + Style.ButtonStyle = btsDefault TabOrder = 9 OnDblClick = CoBusinessTypeDblClick - Width = 200 - end - object Coarea: TcxButtonEdit - Tag = 2 - Left = 636 - Top = 80 - Hint = 'Coarea/'#22320#21306 - Properties.Buttons = < - item - Default = True - Kind = bkEllipsis - end> - Properties.ReadOnly = True - Properties.OnButtonClick = BuyNamePropertiesButtonClick - Style.ButtonStyle = btsDefault - TabOrder = 10 - OnDblClick = CoBusinessTypeDblClick OnKeyPress = CoareaKeyPress Width = 200 end object PayMentMonth: TcxComboBox Tag = 2 Left = 927 - Top = 43 + Top = 44 Properties.DropDownListStyle = lsFixedList Properties.Items.Strings = ( '' @@ -312,13 +317,13 @@ inherited frmCustInput: TfrmCustInput #27425#27425#26376'25'#21495 #27425#26376'30'#21495 #27425#27425#26376'30'#21495) - TabOrder = 11 + TabOrder = 10 Width = 200 end object Saleser: TcxButtonEdit Tag = 2 - Left = 924 - Top = 82 + Left = 927 + Top = 80 Properties.Buttons = < item Default = True @@ -327,18 +332,42 @@ inherited frmCustInput: TfrmCustInput Properties.ReadOnly = True Properties.OnButtonClick = SaleserButtonClick Style.ButtonStyle = btsDefault - TabOrder = 12 + TabOrder = 11 OnDblClick = SaleserDblClick Width = 200 end object SalesId: TcxTextEdit Tag = 2 - Left = 950 - Top = 185 - TabOrder = 13 + Left = 1002 + Top = 247 + TabOrder = 12 Visible = False Width = 125 end + object AMOUNTOWED: TcxTextEdit + Tag = 2 + Left = 926 + Top = 125 + TabOrder = 13 + Width = 125 + end + object area: TcxMRUEdit + Left = 55 + Top = 86 + Hint = 'area/'#21306#22495 + ParentFont = False + Properties.ImmediatePost = True + Properties.ReadOnly = False + Properties.OnButtonClick = areaPropertiesButtonClick + Style.Font.Charset = GB2312_CHARSET + Style.Font.Color = clWindowText + Style.Font.Height = -16 + Style.Font.Name = #23435#20307 + Style.Font.Style = [] + Style.IsFontAssigned = True + TabOrder = 14 + Width = 501 + end end object Panel1: TPanel [2] Left = 0 @@ -406,6 +435,7 @@ inherited frmCustInput: TfrmCustInput Align = alClient BorderStyle = cxcbsNone TabOrder = 1 + ExplicitTop = 32 object TV2: TcxGridDBTableView Navigator.Buttons.CustomButtons = <> Navigator.Buttons.Delete.Enabled = False @@ -484,6 +514,13 @@ inherited frmCustInput: TfrmCustInput HeaderAlignmentHorz = taCenter Width = 66 end + object TV2Column1: TcxGridDBColumn + Caption = #22320#22336 + DataBinding.FieldName = 'mxaddress' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 186 + end end object cxGridLevel2: TcxGridLevel GridView = TV2 diff --git a/A01基础公司管理/U_CustInput.pas b/A01基础公司管理/U_CustInput.pas index 413c7d0..d9826a2 100644 --- a/A01基础公司管理/U_CustInput.pas +++ b/A01基础公司管理/U_CustInput.pas @@ -15,7 +15,7 @@ uses cxTextEdit, cxDropDownEdit, BtnEdit, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxDateRanges, dxBarBuiltInMenu, U_BaseInput, System.ImageList, Vcl.ImgList, cxContainer, cxMemo, dxScrollbarAnnotations, dxSkinsCore, - dxSkinsDefaultPainters, cxImageList; + dxSkinsDefaultPainters, cxImageList, cxMRUEdit; type TfrmCustInput = class(TfrmBaseInput) @@ -62,7 +62,6 @@ type CoLevel: TcxComboBox; ParentCoName: TcxButtonEdit; ToolButton1: TToolButton; - CoAddress: TcxTextEdit; CoNote: TcxMemo; Label9: TLabel; Continent: TcxButtonEdit; @@ -84,6 +83,10 @@ type ToolButton8: TToolButton; ClientDataSet1: TClientDataSet; DataSource1: TDataSource; + TV2Column1: TcxGridDBColumn; + Label13: TLabel; + AMOUNTOWED: TcxTextEdit; + area: TcxMRUEdit; procedure FormDestroy(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure TBCloseClick(Sender: TObject); @@ -101,6 +104,7 @@ type procedure SaleserDblClick(Sender: TObject); procedure ToolButton8Click(Sender: TObject); procedure ToolButton4Click(Sender: TObject); + procedure areaPropertiesButtonClick(Sender: TObject); private { Private declarations } procedure InitGrid(); @@ -134,6 +138,7 @@ begin end; SCSHData(ADOQueryMain, ScrollBox1, 2); ParentCoName.Properties.LookupItems.Text := ADOQueryMain.FieldByName('ParentCoCode').AsString; + area.Text := ADOQueryMain.FieldByName('area').AsString; with ADOQueryMain do begin Filtered := False; @@ -165,6 +170,30 @@ begin frmCustInput := nil; end; +procedure TfrmCustInput.areaPropertiesButtonClick(Sender: TObject); +var + fsj: string; + FWZ: Integer; +begin + fsj := Trim(TcxButtonEdit(Sender).Hint); + FWZ := Pos('/', fsj); + try + frmZDYHelp := TfrmZDYHelp.Create(Application); + with frmZDYHelp do + begin + MainType := 'Cust'; + flag := Copy(fsj, 1, FWZ - 1); + flagname := Copy(fsj, FWZ + 1, Length(fsj) - FWZ); + if ShowModal = 1 then + begin + TcxButtonEdit(Sender).Text := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString); + end; + end; + finally + frmZDYHelp.Free; + end; +end; + procedure TfrmCustInput.BuyNamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer); var fsj: string; @@ -258,6 +287,27 @@ var begin inherited; ReadCxGrid(trim(self.caption) + 'Tv2', Tv2, 'ͻ'); + with ADOQueryTemp do + begin + close; + sql.Clear; + sql.Add('select * from KH_ZDY where type=''area'''); + + Open; + if isEmpty then + begin + exit; + end; + area.Properties.LookupItems.Clear; + while not Eof do + begin + + area.Properties.LookupItems.Add(Trim(fieldByName('zdyName').AsString)); + Next; + end; + + area.ItemIndex := -1; + end; InitGrid(); // if trim(FCOID) = '' then // begin @@ -271,6 +321,8 @@ begin // CoCode.Text := trim(ADOQueryTemp.FieldByName('NewCoCode').asstring); // end; //˵ҲҪ޸ı棬޸ݣֻܸ + + with ADOQueryTemp do begin Close; @@ -278,10 +330,12 @@ begin sql.Add(' select * from BS_Company where CoId=' + quotedstr(FCoId)); Open; end; + if trim(ADOQueryTemp.FieldByName('Status').asstring) = '1' then begin ScrollBox1.Enabled := False; end; + end; procedure TfrmCustInput.SaleserDblClick(Sender: TObject); @@ -350,6 +404,7 @@ begin FieldByName('Edittime').Value := SGetServerDateTime(ADOQueryTemp); end; FieldByName('COID').Value := Trim(MaxId); + FieldByName('area').Value := Trim(area.Text); RTSetsavedata(ADOQueryCmd, 'BS_Company', ScrollBox1, 2); FieldByName('CoType').Value := 'ͻ'; FieldByName('ParentCoCode').Value := ParentCoName.Properties.LookupItems.Text; diff --git a/A01基础公司管理/U_Customer.dfm b/A01基础公司管理/U_Customer.dfm index 05f954d..2d679f8 100644 --- a/A01基础公司管理/U_Customer.dfm +++ b/A01基础公司管理/U_Customer.dfm @@ -165,7 +165,7 @@ inherited frmCustomer: TfrmCustomer Top = 20 Width = 32 Height = 21 - Caption = #22269#23478 + Caption = #21306#22495 end object Label5: TLabel Left = 342 @@ -174,13 +174,6 @@ inherited frmCustomer: TfrmCustomer Height = 21 Caption = #31616#31216 end - object Label6: TLabel - Left = 838 - Top = 20 - Width = 32 - Height = 21 - Caption = #22320#21306 - end object CoName: TcxTextEdit Tag = 2 Left = 218 @@ -208,7 +201,7 @@ inherited frmCustomer: TfrmCustomer OnKeyPress = CoCodeKeyPress Width = 120 end - object cocountry: TcxTextEdit + object area: TcxTextEdit Tag = 2 Left = 714 Top = 16 @@ -226,15 +219,6 @@ inherited frmCustomer: TfrmCustomer OnKeyPress = CoCodeKeyPress Width = 120 end - object Coarea: TcxTextEdit - Tag = 2 - Left = 874 - Top = 16 - Properties.OnChange = CoCodePropertiesChange - TabOrder = 5 - OnKeyPress = CoCodeKeyPress - Width = 120 - end end object cxGrid1: TcxGrid [2] Left = 0 @@ -330,8 +314,8 @@ inherited frmCustomer: TfrmCustomer Width = 163 end object v2Column3: TcxGridDBColumn - Caption = #22269#23478 - DataBinding.FieldName = 'cocountry' + Caption = #21306#22495 + DataBinding.FieldName = 'area' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter Options.Editing = False @@ -400,14 +384,6 @@ inherited frmCustomer: TfrmCustomer Options.Editing = False Width = 66 end - object Tv1Column9: TcxGridDBColumn - Caption = #27954 - DataBinding.FieldName = 'Continent' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Options.Editing = False - Width = 78 - end object Tv1Column8: TcxGridDBColumn Caption = #22320#21306 DataBinding.FieldName = 'Coarea' @@ -525,6 +501,13 @@ inherited frmCustomer: TfrmCustomer Options.Editing = False Width = 169 end + object Tv2Column2: TcxGridDBColumn + Caption = #22320#22336 + DataBinding.FieldName = 'mxaddress' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 77 + end end object cxGridLevel2: TcxGridLevel GridView = Tv2 diff --git a/A01基础公司管理/U_Customer.pas b/A01基础公司管理/U_Customer.pas index e2888be..e5fdf51 100644 --- a/A01基础公司管理/U_Customer.pas +++ b/A01基础公司管理/U_Customer.pas @@ -49,7 +49,7 @@ type btnEdit: TToolButton; Label2: TLabel; Saleser: TcxTextEdit; - cocountry: TcxTextEdit; + area: TcxTextEdit; Label4: TLabel; v2Column15: TcxGridDBColumn; CDS_2: TClientDataSet; @@ -84,12 +84,9 @@ type Tv1Column1: TcxGridDBColumn; ToolButton2: TToolButton; Tv1Column8: TcxGridDBColumn; - Tv1Column9: TcxGridDBColumn; Tv1Column10: TcxGridDBColumn; Label5: TLabel; CoAbbrName: TcxTextEdit; - Label6: TLabel; - Coarea: TcxTextEdit; PopupMenu1: TPopupMenu; N1: TMenuItem; N2: TMenuItem; @@ -100,6 +97,7 @@ type Tv3: TcxGridDBTableView; cxGridDBColumn6: TcxGridDBColumn; cxGridLevel3: TcxGridLevel; + Tv2Column2: TcxGridDBColumn; procedure FormDestroy(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure TBCloseClick(Sender: TObject); diff --git a/A01基础公司管理/U_GetDllForm.pas b/A01基础公司管理/U_GetDllForm.pas index c984391..0663a63 100644 --- a/A01基础公司管理/U_GetDllForm.pas +++ b/A01基础公司管理/U_GetDllForm.pas @@ -72,7 +72,7 @@ begin if trim(DataBaseStr) = '' then begin server := '101.132.143.144,7781'; - dtbase := 'xushangData'; + dtbase := 'gemeiData'; user := 'rtsa'; pswd := 'rightsoft@5740'; DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server; diff --git a/A02基础产品管理/U_ClothInfo.dfm b/A02基础产品管理/U_ClothInfo.dfm index 4e23467..e528d24 100644 --- a/A02基础产品管理/U_ClothInfo.dfm +++ b/A02基础产品管理/U_ClothInfo.dfm @@ -2,33 +2,31 @@ inherited frmClothInfo: TfrmClothInfo Left = 117 Top = 154 Caption = #20135#21697#26723#26696 - ClientHeight = 926 - ClientWidth = 1855 + ClientHeight = 845 + ClientWidth = 1540 Color = clBtnFace Font.Charset = ANSI_CHARSET Font.Height = -16 FormStyle = fsMDIChild Position = poScreenCenter Visible = True - ExplicitWidth = 1871 - ExplicitHeight = 965 + ExplicitWidth = 1556 + ExplicitHeight = 884 PixelsPerInch = 96 TextHeight = 21 object ToolBar1: TToolBar [0] Tag = 1 Left = 0 Top = 0 - Width = 1855 + Width = 1540 Height = 30 AutoSize = True ButtonHeight = 30 ButtonWidth = 99 Caption = 'ToolBar1' - Color = clBtnFace DisabledImages = DataLink_ClothInfo.cxImageList_bar Images = DataLink_ClothInfo.cxImageList_bar List = True - ParentColor = True ShowCaptions = True TabOrder = 3 object TBRafresh: TToolButton @@ -156,14 +154,14 @@ inherited frmClothInfo: TfrmClothInfo Left = 220 Top = 145 Width = 8 - Height = 781 + Height = 700 HotZoneClassName = 'TcxMediaPlayer9Style' Control = Panel5 end object Panel1: TPanel [2] Left = 0 Top = 30 - Width = 1855 + Width = 1540 Height = 115 Align = alTop BevelInner = bvRaised @@ -174,26 +172,14 @@ inherited frmClothInfo: TfrmClothInfo object Label11: TLabel Left = 1072 Top = 107 - Width = 7 - Height = 12 - Font.Charset = GB2312_CHARSET - Font.Color = clBlue - Font.Height = -12 - Font.Name = #23435#20307 - Font.Style = [fsBold] - ParentFont = True + Width = 5 + Height = 21 end object Label12: TLabel Left = 626 Top = 107 - Width = 7 - Height = 12 - Font.Charset = GB2312_CHARSET - Font.Color = clRed - Font.Height = -12 - Font.Name = #23435#20307 - Font.Style = [fsBold] - ParentFont = True + Width = 5 + Height = 21 end object Label3: TLabel Left = 553 @@ -384,13 +370,6 @@ inherited frmClothInfo: TfrmClothInfo BevelInner = bvRaised BevelOuter = bvLowered Caption = #27491#22312#26597#35810#25968#25454#65292#35831#31245#21518#12290#12290#12290 - Color = clBtnFace - Font.Charset = GB2312_CHARSET - Font.Color = clRed - Font.Height = -12 - Font.Name = #23435#20307 - Font.Style = [fsBold] - ParentFont = True TabOrder = 5 Visible = False end @@ -398,7 +377,7 @@ inherited frmClothInfo: TfrmClothInfo Left = 0 Top = 145 Width = 220 - Height = 781 + Height = 700 Align = alLeft BevelInner = bvRaised BevelOuter = bvLowered @@ -407,7 +386,7 @@ inherited frmClothInfo: TfrmClothInfo Left = 2 Top = 2 Width = 216 - Height = 777 + Height = 696 Align = alClient Bands = < item @@ -439,8 +418,8 @@ inherited frmClothInfo: TfrmClothInfo object Panel3: TPanel [5] Left = 228 Top = 145 - Width = 1627 - Height = 781 + Width = 1312 + Height = 700 Align = alClient BevelInner = bvRaised BevelOuter = bvLowered @@ -449,7 +428,7 @@ inherited frmClothInfo: TfrmClothInfo object Panel7: TPanel Left = 2 Top = 2 - Width = 1623 + Width = 1308 Height = 40 Align = alTop BevelOuter = bvNone @@ -457,14 +436,14 @@ inherited frmClothInfo: TfrmClothInfo object Panel4: TPanel Left = 0 Top = 0 - Width = 1623 + Width = 1308 Height = 40 Align = alClient AutoSize = True ParentColor = True TabOrder = 0 DesignSize = ( - 1623 + 1308 40) object Label14: TLabel Left = 21 @@ -530,8 +509,8 @@ inherited frmClothInfo: TfrmClothInfo end object Panel9: TPanel Left = 2 - Top = 574 - Width = 1623 + Top = 493 + Width = 1308 Height = 205 Align = alBottom Caption = 'Panel9' @@ -539,7 +518,7 @@ inherited frmClothInfo: TfrmClothInfo object Panel10: TPanel Left = 1 Top = 1 - Width = 1621 + Width = 1306 Height = 203 Align = alClient Caption = 'Panel9' @@ -547,7 +526,7 @@ inherited frmClothInfo: TfrmClothInfo object GroupBox1: TGroupBox Left = 606 Top = 1 - Width = 1014 + Width = 699 Height = 201 Align = alClient Caption = #26679#21697#32553#30053#22270#65288#21452#20987#22270#29255#26597#30475#21407#22270#65289 @@ -555,7 +534,7 @@ inherited frmClothInfo: TfrmClothInfo object ScrollBox1: TScrollBox Left = 2 Top = 23 - Width = 1010 + Width = 695 Height = 176 Align = alClient BevelInner = bvLowered @@ -633,8 +612,8 @@ inherited frmClothInfo: TfrmClothInfo object cxGrid1: TcxGrid Left = 2 Top = 42 - Width = 1623 - Height = 532 + Width = 1308 + Height = 451 Align = alClient PopupMenu = PM_1 TabOrder = 2 @@ -879,10 +858,10 @@ inherited frmClothInfo: TfrmClothInfo ExplicitTop = 338 end inherited cxProgressBar2: TcxProgressBar - Left = 959 - Top = 515 - ExplicitLeft = 959 - ExplicitTop = 515 + Left = 687 + Top = 343 + ExplicitLeft = 687 + ExplicitTop = 343 ExplicitHeight = 29 end inherited ADOQueryBaseCmd: TADOQuery diff --git a/A02基础产品管理/U_ClothInfoInput.dfm b/A02基础产品管理/U_ClothInfoInput.dfm index dd9b285..891dbe6 100644 --- a/A02基础产品管理/U_ClothInfoInput.dfm +++ b/A02基础产品管理/U_ClothInfoInput.dfm @@ -91,14 +91,14 @@ object frmClothInfoInput: TfrmClothInfoInput end object Label15: TLabel Left = 37 - Top = 94 + Top = 95 Width = 64 Height = 21 Caption = #26377#25928#38376#24133 end object Label22: TLabel - Left = 421 - Top = 94 + Left = 420 + Top = 56 Width = 64 Height = 21 Caption = #25104#21697#20811#37325 @@ -119,99 +119,104 @@ object frmClothInfoInput: TfrmClothInfoInput Visible = False end object Label7: TLabel - Left = 37 - Top = 132 + Left = 385 + Top = 462 Width = 64 Height = 21 Caption = #20013#25991#25104#20998 + Visible = False end object Label6: TLabel Left = 37 - Top = 169 + Top = 133 Width = 32 Height = 21 Caption = #35268#26684 end object Label9: TLabel - Left = 37 - Top = 402 + Left = 39 + Top = 287 Width = 32 Height = 21 Caption = #22791#27880 end object Label11: TLabel - Left = 37 - Top = 242 + Left = 364 + Top = 465 Width = 32 Height = 21 Caption = #24067#31181 + Visible = False end object Label10: TLabel - Left = 421 - Top = 132 + Left = 386 + Top = 463 Width = 64 Height = 21 Caption = #33521#25991#25104#20998 + Visible = False end object Label12: TLabel - Left = 37 - Top = 279 + Left = 364 + Top = 502 Width = 64 Height = 21 Caption = #32433#32447#24418#24577 + Visible = False end object Label16: TLabel - Left = 421 - Top = 242 + Left = 420 + Top = 170 Width = 32 Height = 21 Caption = #24037#33402 end object Label18: TLabel Left = 37 - Top = 316 + Top = 210 Width = 80 Height = 21 Caption = #20379#24212#21830#20195#21495 end object Label19: TLabel - Left = 421 - Top = 316 + Left = 420 + Top = 246 Width = 48 Height = 21 Caption = #20379#24212#21830 end object Label21: TLabel - Left = 421 - Top = 56 + Left = 389 + Top = 453 Width = 64 Height = 21 Caption = #33521#25991#21697#21517 + Visible = False end object Label23: TLabel - Left = 421 - Top = 279 + Left = 420 + Top = 208 Width = 64 Height = 21 Caption = #26579#33394#26041#24335 end object Label2: TLabel Left = 37 - Top = 353 + Top = 249 Width = 64 Height = 21 Caption = #26631#20934#25253#20215 end object Label8: TLabel Left = 37 - Top = 205 + Top = 172 Width = 64 Height = 21 Caption = #37197#36135#31995#25968 end object Label13: TLabel - Left = 421 - Top = 205 + Left = 420 + Top = 132 Width = 64 Height = 21 Caption = #37197#39069#38480#21046 @@ -224,8 +229,8 @@ object frmClothInfoInput: TfrmClothInfoInput Caption = '%' end object Label20: TLabel - Left = 421 - Top = 169 + Left = 420 + Top = 94 Width = 32 Height = 21 Caption = #24211#20301 @@ -236,6 +241,7 @@ object frmClothInfoInput: TfrmClothInfoInput Width = 41 Height = 21 Caption = #21697#21517'1' + Visible = False end object Label24: TLabel Left = 433 @@ -243,6 +249,7 @@ object frmClothInfoInput: TfrmClothInfoInput Width = 41 Height = 21 Caption = #21697#21517'2' + Visible = False end object C_Code: TcxTextEdit Tag = 2 @@ -256,7 +263,7 @@ object frmClothInfoInput: TfrmClothInfoInput object C_Name: TcxTextEdit Tag = 2 Left = 507 - Top = 12 + Top = 13 TabOrder = 1 OnKeyPress = CYColorKeyPress Width = 234 @@ -272,7 +279,7 @@ object frmClothInfoInput: TfrmClothInfoInput object C_GramWeight: TcxButtonEdit Tag = 2 Left = 507 - Top = 88 + Top = 51 Hint = 'C_GramWeight/'#20811#37325 Properties.Buttons = < item @@ -288,8 +295,8 @@ object frmClothInfoInput: TfrmClothInfoInput end object C_Composition: TcxButtonEdit Tag = 2 - Left = 119 - Top = 126 + Left = 467 + Top = 456 Hint = 'C_Composition/'#25104#20998 Properties.Buttons = < item @@ -300,13 +307,14 @@ object frmClothInfoInput: TfrmClothInfoInput Properties.OnButtonClick = C_WidthPropertiesButtonClick Style.ButtonStyle = btsDefault TabOrder = 4 + Visible = False OnDblClick = C_GramWeightDblClick Width = 234 end object C_Spec: TcxButtonEdit Tag = 2 Left = 119 - Top = 163 + Top = 128 Hint = 'C_Spec/'#35268#26684 Properties.Buttons = < item @@ -333,13 +341,14 @@ object frmClothInfoInput: TfrmClothInfoInput Properties.OnButtonClick = C_FromNamePropertiesButtonClick Style.ButtonStyle = btsDefault TabOrder = 6 + Visible = False OnDblClick = C_GramWeightDblClick Width = 234 end object C_Width: TcxButtonEdit Tag = 2 Left = 119 - Top = 88 + Top = 91 Hint = 'C_Width/'#38376#24133 Properties.Buttons = < item @@ -356,7 +365,7 @@ object frmClothInfoInput: TfrmClothInfoInput object C_Pattern: TcxButtonEdit Tag = 2 Left = 119 - Top = 50 + Top = 52 Hint = 'C_Pattern/'#33457#22411 Properties.Buttons = < item @@ -373,23 +382,24 @@ object frmClothInfoInput: TfrmClothInfoInput object CINote: TcxMemo Tag = 2 Left = 119 - Top = 384 + Top = 283 TabOrder = 9 Height = 57 Width = 622 end object GC_Name: TcxTextEdit Tag = 2 - Left = 119 - Top = 236 + Left = 446 + Top = 459 TabOrder = 10 + Visible = False OnKeyPress = CYColorKeyPress Width = 234 end object C_EComposition: TcxButtonEdit Tag = 2 - Left = 507 - Top = 126 + Left = 472 + Top = 457 Hint = 'C_EComposition/'#25104#20998 Properties.Buttons = < item @@ -400,21 +410,23 @@ object frmClothInfoInput: TfrmClothInfoInput Properties.OnButtonClick = C_WidthPropertiesButtonClick Style.ButtonStyle = btsDefault TabOrder = 11 + Visible = False OnDblClick = C_GramWeightDblClick Width = 234 end object C_YarnSpec: TcxTextEdit Tag = 2 - Left = 119 - Top = 273 + Left = 446 + Top = 496 TabOrder = 12 + Visible = False OnKeyPress = CYColorKeyPress Width = 234 end object CraftCode: TcxTextEdit Tag = 2 Left = 507 - Top = 236 + Top = 167 TabOrder = 13 OnKeyPress = CYColorKeyPress Width = 234 @@ -422,7 +434,7 @@ object frmClothInfoInput: TfrmClothInfoInput object FtyNo: TcxTextEdit Tag = 2 Left = 119 - Top = 310 + Top = 206 TabOrder = 14 OnKeyPress = CYColorKeyPress Width = 234 @@ -430,39 +442,42 @@ object frmClothInfoInput: TfrmClothInfoInput object FtyName: TcxTextEdit Tag = 2 Left = 507 - Top = 310 + Top = 244 TabOrder = 15 OnKeyPress = CYColorKeyPress Width = 234 end object C_EName: TcxTextEdit Tag = 2 - Left = 507 - Top = 50 + Left = 475 + Top = 447 TabOrder = 16 + Visible = False OnKeyPress = CYColorKeyPress Width = 234 end object DyeingMethod: TcxTextEdit Tag = 2 Left = 507 - Top = 273 + Top = 206 TabOrder = 17 OnKeyPress = CYColorKeyPress Width = 234 end object CostPrice: TcxCurrencyEdit Tag = 2 - Left = 119 - Top = 347 + Left = 120 + Top = 242 + EditValue = 0.000000000000000000 Properties.AssignedValues.DisplayFormat = True + Properties.OnEditValueChanged = CostPricePropertiesEditValueChanged TabOrder = 18 Width = 234 end object distributionCoefficient: TcxCurrencyEdit Tag = 2 Left = 119 - Top = 199 + Top = 167 Properties.AssignedValues.DisplayFormat = True TabOrder = 19 Width = 234 @@ -470,29 +485,12 @@ object frmClothInfoInput: TfrmClothInfoInput object quota: TcxCurrencyEdit Tag = 2 Left = 507 - Top = 199 + Top = 129 EditValue = 10.000000000000000000 Properties.AssignedValues.DisplayFormat = True TabOrder = 20 Width = 210 end - object StkPosition: TcxButtonEdit - Tag = 2 - Left = 507 - Top = 163 - Hint = 'StkPosition/'#24211#20301 - Properties.Buttons = < - item - Default = True - Kind = bkEllipsis - end> - Properties.ReadOnly = False - Properties.OnButtonClick = C_WidthPropertiesButtonClick - Style.ButtonStyle = btsDefault - TabOrder = 21 - OnDblClick = C_GramWeightDblClick - Width = 234 - end object C_FromName2: TcxButtonEdit Tag = 7 Left = 505 @@ -505,10 +503,28 @@ object frmClothInfoInput: TfrmClothInfoInput Properties.ReadOnly = False Properties.OnButtonClick = C_FromName2PropertiesButtonClick Style.ButtonStyle = btsDefault - TabOrder = 22 + TabOrder = 21 + Visible = False OnDblClick = C_GramWeightDblClick Width = 234 end + object StkPosition: TcxMRUEdit + Left = 511 + Top = 96 + Hint = 'StkPosition/'#24211#20301 + ParentFont = False + Properties.ImmediatePost = True + Properties.ReadOnly = False + Properties.OnButtonClick = StkPositionPropertiesButtonClick + Style.Font.Charset = GB2312_CHARSET + Style.Font.Color = clWindowText + Style.Font.Height = -16 + Style.Font.Name = #23435#20307 + Style.Font.Style = [] + Style.IsFontAssigned = True + TabOrder = 22 + Width = 233 + end end object Panel1: TPanel Left = 751 @@ -580,7 +596,7 @@ object frmClothInfoInput: TfrmClothInfoInput DataBinding.FieldName = 'C_Color' DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter - Width = 55 + Width = 54 end object TV1Column2: TcxGridDBColumn Caption = #33394#21495 @@ -589,20 +605,6 @@ object frmClothInfoInput: TfrmClothInfoInput HeaderAlignmentHorz = taCenter Width = 80 end - object TV1Column3: TcxGridDBColumn - Caption = #33457#22411 - DataBinding.FieldName = 'C_Pattern' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 77 - end - object TV1Column4: TcxGridDBColumn - Caption = #27454#21495 - DataBinding.FieldName = 'C_StyleNo' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 103 - end object TV1Column5: TcxGridDBColumn Caption = #28014#21160#20215 DataBinding.FieldName = 'floatPrice' @@ -620,6 +622,20 @@ object frmClothInfoInput: TfrmClothInfoInput Options.Editing = False Width = 94 end + object TV1Column3: TcxGridDBColumn + Caption = #20215#26684#19978#38480'(%)' + DataBinding.FieldName = 'MAXPRICE' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 106 + end + object TV1Column4: TcxGridDBColumn + Caption = #20215#26684#19979#38480'(%)' + DataBinding.FieldName = 'MinPRICE' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 100 + end end object cxGridLevel2: TcxGridLevel GridView = TV1 diff --git a/A02基础产品管理/U_ClothInfoInput.pas b/A02基础产品管理/U_ClothInfoInput.pas index bd9cddd..cee2603 100644 --- a/A02基础产品管理/U_ClothInfoInput.pas +++ b/A02基础产品管理/U_ClothInfoInput.pas @@ -11,7 +11,7 @@ uses cxButtonEdit, StdCtrls, ExtCtrls, cxCurrencyEdit, BtnEdit, U_BaseList, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxDateRanges, dxBarBuiltInMenu, cxCheckBox, cxDropDownEdit, cxContainer, cxMaskEdit, - dxScrollbarAnnotations, cxMemo, dxSkinsCore, dxSkinsDefaultPainters; + dxScrollbarAnnotations, cxMemo, dxSkinsCore, dxSkinsDefaultPainters, cxMRUEdit; type TfrmClothInfoInput = class(TForm) @@ -64,8 +64,6 @@ type TV1: TcxGridDBTableView; TV1Column1: TcxGridDBColumn; TV1Column2: TcxGridDBColumn; - TV1Column3: TcxGridDBColumn; - TV1Column4: TcxGridDBColumn; cxGridLevel2: TcxGridLevel; DS_1: TDataSource; CDS_1: TClientDataSet; @@ -79,12 +77,14 @@ type Label13: TLabel; Label14: TLabel; Label20: TLabel; - StkPosition: TcxButtonEdit; TV1Column5: TcxGridDBColumn; TV1Column6: TcxGridDBColumn; C_FromName2: TcxButtonEdit; Label17: TLabel; Label24: TLabel; + TV1Column3: TcxGridDBColumn; + TV1Column4: TcxGridDBColumn; + StkPosition: TcxMRUEdit; procedure FormShow(Sender: TObject); procedure TBCloseClick(Sender: TObject); procedure ToolButton1Click(Sender: TObject); @@ -99,6 +99,8 @@ type procedure TV1Column5PropertiesEditValueChanged(Sender: TObject); procedure C_WidthPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer); procedure C_FromName2PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer); + procedure CostPricePropertiesEditValueChanged(Sender: TObject); + procedure StkPositionPropertiesButtonClick(Sender: TObject); private canshu1: string; Fint: Integer; @@ -130,6 +132,29 @@ begin C_Name.Text := Trim(C_FromName.Text) + '+' + Trim(C_FromName2.Text); end; +procedure TfrmClothInfoInput.StkPositionPropertiesButtonClick(Sender: TObject); +var + fsj: string; + FWZ: Integer; +begin + fsj := Trim(TcxmruEdit(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 + TcxmruEdit(Sender).Text := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString); + end; + end; + finally + frmZDYHelp.Free; + end; +end; + procedure TfrmClothInfoInput.InitGrid1(); begin with ADOQueryTemp do @@ -156,6 +181,7 @@ begin end; SCSHData(ADOQueryTemp, ScrollBox1, 2); + StkPosition.Text := ADOQueryTemp.FieldByName('StkPosition').AsString; // SCSHData(ADOQueryTemp, ScrollBox1, 0); C_FromName.Properties.LookupItems.Text := Trim(ADOQueryTemp.fieldbyname('FromBCIID').AsString); // C_FromName.Text := Trim(ADOQueryTemp.fieldbyname('C_FromName').AsString); // @@ -257,9 +283,29 @@ end; procedure TfrmClothInfoInput.FormShow(Sender: TObject); begin readCxGrid(self.Caption + 'TV1', Tv1, 'Ʒ'); + with ADOQueryTemp do + begin + close; + sql.Clear; + sql.Add('select * from KH_ZDY where type=''StkPosition'''); - InitGrid(); + Open; + if isEmpty then + begin + exit; + end; + StkPosition.Properties.LookupItems.Clear; + while not Eof do + begin + + StkPosition.Properties.LookupItems.Add(Trim(fieldByName('zdyName').AsString)); + Next; + end; + + StkPosition.ItemIndex := -1; + end; InitGrid1(); + InitGrid(); if TypeInt = 1 then begin @@ -338,6 +384,8 @@ begin FieldByName('EDITTIME').Value := SGetServerDateTime(ADOQueryTemp); end; FieldByName('BCIID').Value := Trim(MaxBCIID); + + FieldByName('StkPosition').Value := Trim(StkPosition.text); if trim(C_Code.Text) = '' then C_Code.Text := Trim(MaxBCIID); RTSetsavedata(ADOQueryCmd, 'BS_Cloth_Info', ScrollBox1, 2); @@ -461,16 +509,17 @@ begin sql.Clear; sql.Add('select count(BCISID) as AA from BS_Cloth_Info_Sub where BCIID=''' + Trim(MaxBCIID) + ''''); sql.Add(' group by C_Color,C_ColorNo having count(BCISID)>1'); +// ShowMessage(sql.Text); Open; - if FieldByName('AA').AsInteger > 1 then - begin - ADOQueryCmd.Connection.RollbackTrans; - Result := False; - Application.MessageBox('ɫɫظ', 'ʾ', 0); - Exit; - end; - end; + end; + if StrToFloatDef(ADOQueryTemp.fieldbyname('AA').asstring, 1) > 1 then + begin + ADOQueryCmd.Connection.RollbackTrans; + Result := False; + Application.MessageBox('ɫɫظ', 'ʾ', 0); + Exit; + end; ////////////////////////// ӱ ////////////////////////// /// /// @@ -487,6 +536,7 @@ begin // end; FBCIID := MaxBCIID; + InitGrid1(); Result := True; except Result := False; @@ -526,14 +576,14 @@ begin Application.MessageBox('Ʒ!', 'ʾ', 0); Exit; end; - if CDS_1.Locate('C_Color', null, []) = True then - begin - Application.MessageBox('ɫ!', 'ʾ', 0); - Exit; - end; +// if CDS_1.Locate('C_Color', null, []) = True then +// begin +// Application.MessageBox('ɫ!', 'ʾ', 0); +// Exit; +// end; if CDS_1.Locate('C_ColorNo', null, []) = True then begin - Application.MessageBox('ɫ!', 'ʾ', 0); + Application.MessageBox('ɫ!', 'ʾ', 0); Exit; end; setName(); @@ -554,22 +604,25 @@ var maxno: string; begin - if GetLSNo(ADOQueryCmd, maxno, 'YS', 'BS_Cloth_Info_Sub', 4, 1) = False then - begin - Application.MessageBox('ȡʧ!', 'ʾ', 0); - Exit; - end; +// if GetLSNo(ADOQueryCmd, maxno, 'YS', 'BS_Cloth_Info_Sub', 4, 1) = False then +// begin +// Application.MessageBox('ȡʧ!', 'ʾ', 0); +// Exit; +// end; CopyAddRow(Tv1, CDS_1); with CDS_1 do begin Edit; - fieldbyname('BCISID').Value := trim(maxno); + fieldbyname('BCISID').Value := NULL; fieldbyname('floatPrice').Value := 0; + fieldbyname('referencePrice').value := StrToFloatDef(CostPrice.Text, 0); Post; end; +// TV1Column5PropertiesEditValueChanged(Sender); + end; procedure TfrmClothInfoInput.ToolButton4Click(Sender: TObject); @@ -594,6 +647,37 @@ begin end; +procedure TfrmClothInfoInput.CostPricePropertiesEditValueChanged(Sender: TObject); +var + mvalue, FFieldName: string; + MCostPrice, MfloatPrice: Double; +begin + with CDS_1 do + begin + + First; + while not eof do + begin + + with CDS_1 do + begin + MCostPrice := StrToFloatDef(CostPrice.Text, 0); + MfloatPrice := Fieldbyname('floatPrice').AsFloat; + end; + + with CDS_1 do + begin + Edit; + FieldByName('referencePrice').Value := MfloatPrice + MCostPrice; + Post; + end; + tv1.Controller.EditingController.ShowEdit(); + next; + end; + + end; +end; + procedure TfrmClothInfoInput.CYColorKeyPress(Sender: TObject; var Key: Char); begin if Key = #13 then diff --git a/T02贸易汇总仓库/U_TradeClothTotalInInput1.dfm b/T02贸易汇总仓库/U_TradeClothTotalInInput1.dfm index 6bdf217..0d3ac85 100644 --- a/T02贸易汇总仓库/U_TradeClothTotalInInput1.dfm +++ b/T02贸易汇总仓库/U_TradeClothTotalInInput1.dfm @@ -20,7 +20,7 @@ inherited frmTradeClothTotalInInput1: TfrmTradeClothTotalInInput1 Height = 30 AutoSize = True ButtonHeight = 30 - ButtonWidth = 59 + ButtonWidth = 119 Caption = 'ToolBar1' Color = clSkyBlue Font.Charset = GB2312_CHARSET @@ -42,10 +42,18 @@ inherited frmTradeClothTotalInInput1: TfrmTradeClothTotalInInput1 ImageIndex = 16 OnClick = TBSaveClick end - object TBClose: TToolButton + object ToolButton1: TToolButton Left = 63 Top = 0 AutoSize = True + Caption = #28165#31354#24182#37325#26032#21462#21495 + ImageIndex = 3 + OnClick = ToolButton1Click + end + object TBClose: TToolButton + Left = 186 + Top = 0 + AutoSize = True Caption = #20851#38381 ImageIndex = 7 OnClick = TBCloseClick @@ -58,6 +66,7 @@ inherited frmTradeClothTotalInInput1: TfrmTradeClothTotalInInput1 Height = 495 Align = alLeft TabOrder = 1 + ExplicitTop = 31 object Label12: TLabel Left = 271 Top = 20 @@ -213,7 +222,7 @@ inherited frmTradeClothTotalInInput1: TfrmTradeClothTotalInInput1 Top = 406 Width = 64 Height = 21 - Caption = #20986#24211#21333#21495 + Caption = #20837#24211#21333#21495 Visible = False end object IOType: TcxComboBox @@ -398,6 +407,8 @@ inherited frmTradeClothTotalInInput1: TfrmTradeClothTotalInInput1 Align = alClient PopupMenu = PopupMenu1 TabOrder = 0 + ExplicitLeft = 4 + ExplicitTop = 71 object Tv1: TcxGridDBTableView Navigator.Buttons.CustomButtons = <> ScrollbarAnnotations.CustomAnnotations = <> @@ -508,19 +519,28 @@ inherited frmTradeClothTotalInInput1: TfrmTradeClothTotalInInput1 ImageIndex = 6 OnClick = TBDelClick end - object btn4: TToolButton + object ToolButton2: TToolButton Left = 189 Top = 0 AutoSize = True + Caption = #25171#21360#26412#21333 + ImageIndex = 21 + OnClick = ToolButton2Click + end + object btn4: TToolButton + Left = 276 + Top = 0 + AutoSize = True Caption = #20445#23384#26684#24335 ImageIndex = 16 OnClick = ToolButton1Click end object btn2: TToolButton - Left = 276 + Left = 363 Top = 0 Caption = 'btn2' ImageIndex = 17 + Visible = False OnClick = btn2Click end end diff --git a/T02贸易汇总仓库/U_TradeClothTotalInInput1.pas b/T02贸易汇总仓库/U_TradeClothTotalInInput1.pas index 7ea0dc2..c711dd1 100644 --- a/T02贸易汇总仓库/U_TradeClothTotalInInput1.pas +++ b/T02贸易汇总仓库/U_TradeClothTotalInInput1.pas @@ -87,6 +87,8 @@ type PopupMenu1: TPopupMenu; N1: TMenuItem; btn2: TToolButton; + ToolButton1: TToolButton; + ToolButton2: TToolButton; procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure TBAddClick(Sender: TObject); procedure TBCloseClick(Sender: TObject); @@ -110,6 +112,7 @@ type procedure btndaoruClick(Sender: TObject); procedure N1Click(Sender: TObject); procedure btn2Click(Sender: TObject); + procedure ToolButton2Click(Sender: TObject); private { Private declarations } function SaveCKData(): Boolean; @@ -127,7 +130,8 @@ var implementation uses - U_DataLink, U_RTFun, U_ZDYHelp, U_CompanySel, U_TradePlanSel, U_ClothInfoSel; + U_DataLink, U_RTFun, U_ZDYHelp, U_CompanySel, U_TradePlanSel, U_ClothInfoSel, + U_RPFun; {$R *.dfm} @@ -870,7 +874,75 @@ end; procedure TfrmTradeClothTotalInInput1.ToolButton1Click(Sender: TObject); begin - WriteCxGrid(FSTKName + 'Ǽ', Tv1, 'ó׻ֿܲ'); + if CDS_Sub.Locate('BCIOID', '', []) = True then + begin + Application.MessageBox('δȱ!', 'ʾ', 0); + Exit; + end; + if CDS_Sub.Locate('BCIOID', null, []) = True then + begin + Application.MessageBox('δȱ!', 'ʾ', 0); + Exit; + end; + + BCIONO.Text := ''; + + with ADOQueryTemp do + begin + Close; + sql.Clear; + sql.Add(' select A.* '); + sql.Add(' from BS_Cloth_IO A'); + sql.Add(' where 1<>1'); + Open; + end; + SCSHData(ADOQueryTemp, Panel1, 0); + SCreateCDS(ADOQueryTemp, CDS_Sub); + SInitCDSData(ADOQueryTemp, CDS_Sub); +end; + +procedure TfrmTradeClothTotalInInput1.ToolButton2Click(Sender: TObject); +var + MFiltration: string; + MPrintJson: string; +begin + if CDS_sub.IsEmpty then + Exit; + + if CDS_Sub.Locate('BCIOID', '', []) = True then + begin + Application.MessageBox('δȱ!', 'ʾ', 0); + Exit; + end; + if CDS_Sub.Locate('BCIOID', null, []) = True then + begin + Application.MessageBox('δȱ!', 'ʾ', 0); + Exit; + end; + MFiltration := ''; + with CDS_sub do + begin + + First; + while not eof do + begin + + MFiltration := MFiltration + ',' + CDS_sub.FieldByName('BCIOID').AsString; + + next; + end; + + end; +// MFiltration:= +// MFiltration := SelCDSKey(CDS_sub, ['BCIOID'])[0]; + MPrintJson := ' {"LMType": "TradeFinishClothInPrt1" '; + MPrintJson := MPrintJson + ' ,"PreviewPrint": true '; + MPrintJson := MPrintJson + ' ,"PrtArgs": [ { "IsSql": false, "Filtration":" ' + MFiltration + '" }, '; + MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" }, '; + MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" }, '; + MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" }, '; + MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" } ] } '; + FromPrintFr3(Application, PChar(DConString), PChar(MPrintJson)); end; procedure TfrmTradeClothTotalInInput1.Tv1Column16PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer); diff --git a/T02贸易汇总仓库/U_TradeClothTotalInList.dfm b/T02贸易汇总仓库/U_TradeClothTotalInList.dfm index a83ad36..b579913 100644 --- a/T02贸易汇总仓库/U_TradeClothTotalInList.dfm +++ b/T02贸易汇总仓库/U_TradeClothTotalInList.dfm @@ -3,12 +3,12 @@ inherited frmTradeClothTotalInList: TfrmTradeClothTotalInList Top = 111 Caption = #38754#26009#20837#24211#21015#34920 ClientHeight = 554 - ClientWidth = 1968 + ClientWidth = 1540 Color = clBtnFace Font.Height = -16 FormStyle = fsMDIChild Visible = True - ExplicitWidth = 1984 + ExplicitWidth = 1556 ExplicitHeight = 593 PixelsPerInch = 96 TextHeight = 21 @@ -16,7 +16,7 @@ inherited frmTradeClothTotalInList: TfrmTradeClothTotalInList Tag = 1 Left = 0 Top = 0 - Width = 1968 + Width = 1540 Height = 30 AutoSize = True ButtonHeight = 30 @@ -121,7 +121,7 @@ inherited frmTradeClothTotalInList: TfrmTradeClothTotalInList object Panel1: TPanel [1] Left = 0 Top = 30 - Width = 1968 + Width = 1540 Height = 119 Align = alTop BevelInner = bvRaised @@ -270,7 +270,7 @@ inherited frmTradeClothTotalInList: TfrmTradeClothTotalInList inline frmFrameDateSel1: TfrmFrameDateSel Left = 2 Top = 2 - Width = 1964 + Width = 1536 Height = 37 Align = alTop Color = clWhite @@ -279,7 +279,7 @@ inherited frmTradeClothTotalInList: TfrmTradeClothTotalInList TabOrder = 6 ExplicitLeft = 2 ExplicitTop = 2 - ExplicitWidth = 1964 + ExplicitWidth = 1536 ExplicitHeight = 37 inherited lbl2: TLabel Width = 16 @@ -359,11 +359,12 @@ inherited frmTradeClothTotalInList: TfrmTradeClothTotalInList object cxGrid1: TcxGrid [2] Left = 0 Top = 149 - Width = 1968 + Width = 1540 Height = 405 Align = alClient PopupMenu = PopupMenu1 TabOrder = 2 + ExplicitTop = 150 object Tv1: TcxGridDBTableView Navigator.Buttons.CustomButtons = <> ScrollbarAnnotations.CustomAnnotations = <>