From 19acdae3f52b4645004b6b11a6b09dcb414fb90f Mon Sep 17 00:00:00 2001 From: "DESKTOP-E401PHE\\Administrator" Date: Mon, 26 May 2025 14:27:08 +0800 Subject: [PATCH] 0526 --- .gitignore | 3 +- A02基础产品管理/ClothInfo.dpr | 3 +- A02基础产品管理/ClothInfo.dproj | 4 + A02基础产品管理/U_ClothInfoInput.dfm | 444 ++++++++++++-------- A02基础产品管理/U_ClothInfoInput.pas | 460 ++++++++++++++------- A02基础产品管理/U_Edit.dfm | 219 ++++++++++ A02基础产品管理/U_Edit.pas | 367 ++++++++++++++++ A05基础资料管理/U_PositionInPut.dfm | 16 +- A05基础资料管理/U_PositionInPut.pas | 35 ++ T02贸易汇总仓库/U_ItemizedListInPut.dfm | 16 +- T02贸易汇总仓库/U_ItemizedListInPut.pas | 31 ++ T02贸易汇总仓库/U_ItemizedListList.dfm | 72 +++- T02贸易汇总仓库/U_ItemizedListList.pas | 9 + T02贸易汇总仓库/U_ItemizedListQtyInPut.dfm | 15 +- T02贸易汇总仓库/U_ItemizedListQtyInPut.pas | 6 +- T05贸易门市管理/U_TradeMarketInPut.dfm | 139 ++++--- T05贸易门市管理/U_TradeMarketInPut.pas | 10 + T05贸易门市管理/U_TradeMarketList.dfm | 19 +- T05贸易门市管理/U_TradeMarketList.pas | 1 + 19 files changed, 1456 insertions(+), 413 deletions(-) create mode 100644 A02基础产品管理/U_Edit.dfm create mode 100644 A02基础产品管理/U_Edit.pas diff --git a/.gitignore b/.gitignore index d8c355c..9f8b65b 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,5 @@ *.~ddp *.~dpr *.identcache -*.local \ No newline at end of file +*.local +T02贸易汇总仓库.zip diff --git a/A02基础产品管理/ClothInfo.dpr b/A02基础产品管理/ClothInfo.dpr index 5b059b5..8a9c6f3 100644 --- a/A02基础产品管理/ClothInfo.dpr +++ b/A02基础产品管理/ClothInfo.dpr @@ -48,7 +48,8 @@ uses U_ClothInfoLog in 'U_ClothInfoLog.pas' {frmClothInfoLog}, uSZHN_JSON in '..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas', U_ZDYHelp in '..\..\..\public10\ThreeFun\Form\U_ZDYHelp.pas' {frmZDYHelp}, - U_CompanySel in '..\A00ͨô\U_CompanySel.pas' {frmCompanySel}; + U_CompanySel in '..\A00ͨô\U_CompanySel.pas' {frmCompanySel}, + U_Edit in 'U_Edit.pas' {frmEdit}; {$R *.res} diff --git a/A02基础产品管理/ClothInfo.dproj b/A02基础产品管理/ClothInfo.dproj index 36aaa74..e68e8a2 100644 --- a/A02基础产品管理/ClothInfo.dproj +++ b/A02基础产品管理/ClothInfo.dproj @@ -246,6 +246,10 @@
frmCompanySel
dfm + +
frmEdit
+ dfm +
Cfg_2 Base diff --git a/A02基础产品管理/U_ClothInfoInput.dfm b/A02基础产品管理/U_ClothInfoInput.dfm index 600867d..a83fa56 100644 --- a/A02基础产品管理/U_ClothInfoInput.dfm +++ b/A02基础产品管理/U_ClothInfoInput.dfm @@ -3,8 +3,8 @@ object frmClothInfoInput: TfrmClothInfoInput Top = 231 Anchors = [] Caption = #20135#21697#20449#24687#24405#20837 - ClientHeight = 676 - ClientWidth = 1284 + ClientHeight = 800 + ClientWidth = 1301 Color = clBtnFace Font.Charset = GB2312_CHARSET Font.Color = clWindowText @@ -19,7 +19,7 @@ object frmClothInfoInput: TfrmClothInfoInput object ToolBar1: TToolBar Left = 0 Top = 0 - Width = 1284 + Width = 1301 Height = 30 AutoSize = True ButtonHeight = 30 @@ -68,7 +68,7 @@ object frmClothInfoInput: TfrmClothInfoInput Left = 0 Top = 30 Width = 751 - Height = 646 + Height = 770 Align = alLeft BevelInner = bvNone BevelOuter = bvNone @@ -95,9 +95,11 @@ object frmClothInfoInput: TfrmClothInfoInput Left = 0 Top = 0 Width = 749 - Height = 385 + Height = 529 Align = alTop TabOrder = 1 + ExplicitLeft = -4 + ExplicitTop = -4 object Label1: TLabel Left = 37 Top = 18 @@ -134,8 +136,8 @@ object frmClothInfoInput: TfrmClothInfoInput Caption = #33457#22411#32534#21495 end object Label7: TLabel - Left = 385 - Top = 454 + Left = 377 + Top = 598 Width = 64 Height = 21 Caption = #20013#25991#25104#20998 @@ -156,16 +158,16 @@ object frmClothInfoInput: TfrmClothInfoInput Caption = #22791#27880 end object Label11: TLabel - Left = 364 - Top = 454 + Left = 356 + Top = 598 Width = 32 Height = 21 Caption = #24067#31181 Visible = False end object Label10: TLabel - Left = 468 - Top = 462 + Left = 460 + Top = 606 Width = 64 Height = 21 Caption = #33521#25991#25104#20998 @@ -193,8 +195,8 @@ object frmClothInfoInput: TfrmClothInfoInput Caption = #20379#24212#21830 end object Label21: TLabel - Left = 309 - Top = 454 + Left = 301 + Top = 598 Width = 64 Height = 21 Caption = #33521#25991#21697#21517 @@ -250,11 +252,11 @@ object frmClothInfoInput: TfrmClothInfoInput Caption = #20027#24067 end object Label24: TLabel - Left = 425 - Top = 347 - Width = 32 + Left = 34 + Top = 385 + Width = 41 Height = 21 - Caption = #27425#24067 + Caption = #27425#24067'1' end object Label25: TLabel Left = 37 @@ -264,13 +266,69 @@ object frmClothInfoInput: TfrmClothInfoInput Caption = #35745#20215#21333#20301 end object Label12: TLabel - Left = 363 - Top = 481 + Left = 355 + Top = 625 Width = 64 Height = 21 Caption = #32433#32447#24418#24577 Visible = False end + object Label26: TLabel + Left = 32 + Top = 421 + Width = 41 + Height = 21 + Caption = #27425#24067'2' + end + object Label27: TLabel + Left = 34 + Top = 457 + Width = 41 + Height = 21 + Caption = #27425#24067'3' + end + object Label28: TLabel + Left = 34 + Top = 492 + Width = 41 + Height = 21 + Caption = #27425#24067'4' + end + object Label29: TLabel + Left = 419 + Top = 385 + Width = 73 + Height = 21 + Caption = #21152#24037#26041#24335'1' + end + object Label30: TLabel + Left = 419 + Top = 421 + Width = 73 + Height = 21 + Caption = #21152#24037#26041#24335'2' + end + object Label31: TLabel + Left = 419 + Top = 457 + Width = 73 + Height = 21 + Caption = #21152#24037#26041#24335'3' + end + object Label32: TLabel + Left = 419 + Top = 492 + Width = 73 + Height = 21 + Caption = #21152#24037#26041#24335'4' + end + object Label33: TLabel + Left = 419 + Top = 348 + Width = 64 + Height = 21 + Caption = #21152#24037#26041#24335 + end object C_Code: TcxTextEdit Tag = 2 Left = 119 @@ -307,8 +365,8 @@ object frmClothInfoInput: TfrmClothInfoInput end object C_Composition: TcxButtonEdit Tag = 2 - Left = 467 - Top = 454 + Left = 459 + Top = 598 Hint = 'C_Composition/'#25104#20998 Properties.Buttons = < item @@ -325,8 +383,8 @@ object frmClothInfoInput: TfrmClothInfoInput end object C_Spec: TcxButtonEdit Tag = 2 - Left = 504 - Top = 91 + Left = 510 + Top = 88 Hint = 'C_Spec/'#35268#26684 Properties.Buttons = < item @@ -400,8 +458,8 @@ object frmClothInfoInput: TfrmClothInfoInput end object GC_Name: TcxTextEdit Tag = 2 - Left = 446 - Top = 454 + Left = 438 + Top = 598 TabOrder = 9 Visible = False OnKeyPress = CYColorKeyPress @@ -409,8 +467,8 @@ object frmClothInfoInput: TfrmClothInfoInput end object C_EComposition: TcxButtonEdit Tag = 2 - Left = 472 - Top = 454 + Left = 464 + Top = 598 Hint = 'C_EComposition/'#25104#20998 Properties.Buttons = < item @@ -435,8 +493,8 @@ object frmClothInfoInput: TfrmClothInfoInput end object FtyNo: TcxTextEdit Tag = 2 - Left = 81 - Top = 474 + Left = 73 + Top = 618 TabOrder = 12 Visible = False OnKeyPress = CYColorKeyPress @@ -452,8 +510,8 @@ object frmClothInfoInput: TfrmClothInfoInput end object C_EName: TcxTextEdit Tag = 2 - Left = 491 - Top = 454 + Left = 483 + Top = 598 TabOrder = 14 Visible = False OnKeyPress = CYColorKeyPress @@ -496,8 +554,8 @@ object frmClothInfoInput: TfrmClothInfoInput end object C_FromName2: TcxButtonEdit Tag = 7 - Left = 510 - Top = 343 + Left = 119 + Top = 381 Properties.Buttons = < item Default = True @@ -532,26 +590,159 @@ object frmClothInfoInput: TfrmClothInfoInput end object C_YarnSpec: TcxTextEdit Tag = 2 - Left = 364 - Top = 510 + Left = 356 + Top = 654 TabOrder = 22 Visible = False OnKeyPress = CYColorKeyPress Width = 234 end + object C_FromName3: TcxButtonEdit + Tag = 7 + Left = 119 + Top = 417 + Properties.Buttons = < + item + Default = True + Kind = bkEllipsis + end> + Properties.ReadOnly = False + Properties.OnButtonClick = C_FromName3PropertiesButtonClick + Style.ButtonStyle = btsDefault + TabOrder = 23 + OnDblClick = C_GramWeightDblClick + Width = 234 + end + object C_FromName4: TcxButtonEdit + Tag = 7 + Left = 119 + Top = 453 + Properties.Buttons = < + item + Default = True + Kind = bkEllipsis + end> + Properties.ReadOnly = False + Properties.OnButtonClick = C_FromName2PropertiesButtonClick + Style.ButtonStyle = btsDefault + TabOrder = 24 + OnDblClick = C_GramWeightDblClick + Width = 234 + end + object C_FromName5: TcxButtonEdit + Tag = 7 + Left = 119 + Top = 488 + Properties.Buttons = < + item + Default = True + Kind = bkEllipsis + end> + Properties.ReadOnly = False + Properties.OnButtonClick = C_FromName2PropertiesButtonClick + Style.ButtonStyle = btsDefault + TabOrder = 25 + OnDblClick = C_GramWeightDblClick + Width = 234 + end + object Process2: TcxButtonEdit + Tag = 7 + Left = 504 + Top = 381 + Hint = 'Process2/'#21152#24037#26041#24335'1' + Properties.Buttons = < + item + Default = True + Kind = bkEllipsis + end> + Properties.ReadOnly = False + Properties.OnButtonClick = C_WidthPropertiesButtonClick + Style.ButtonStyle = btsDefault + TabOrder = 26 + OnDblClick = C_GramWeightDblClick + Width = 234 + end + object Process3: TcxButtonEdit + Tag = 7 + Left = 504 + Top = 418 + Hint = 'Process3/'#21152#24037#26041#24335'2' + Properties.Buttons = < + item + Default = True + Kind = bkEllipsis + end> + Properties.ReadOnly = False + Properties.OnButtonClick = C_WidthPropertiesButtonClick + Style.ButtonStyle = btsDefault + TabOrder = 27 + OnDblClick = C_GramWeightDblClick + Width = 234 + end + object Process4: TcxButtonEdit + Tag = 7 + Left = 504 + Top = 453 + Hint = 'Process4/'#21152#24037#26041#24335'3' + Properties.Buttons = < + item + Default = True + Kind = bkEllipsis + end> + Properties.ReadOnly = False + Properties.OnButtonClick = C_WidthPropertiesButtonClick + Style.ButtonStyle = btsDefault + TabOrder = 28 + OnDblClick = C_GramWeightDblClick + Width = 234 + end + object Process5: TcxButtonEdit + Tag = 7 + Left = 504 + Top = 488 + Hint = 'Process5/'#21152#24037#26041#24335'4' + Properties.Buttons = < + item + Default = True + Kind = bkEllipsis + end> + Properties.ReadOnly = False + Properties.OnButtonClick = C_WidthPropertiesButtonClick + Style.ButtonStyle = btsDefault + TabOrder = 29 + OnDblClick = C_GramWeightDblClick + Width = 234 + end + object Process: TcxButtonEdit + Tag = 7 + Left = 504 + Top = 344 + Hint = 'Process/'#21152#24037#26041#24335 + Properties.Buttons = < + item + Default = True + Kind = bkEllipsis + end> + Properties.ReadOnly = False + Properties.OnButtonClick = C_WidthPropertiesButtonClick + Style.ButtonStyle = btsDefault + TabOrder = 30 + OnDblClick = C_GramWeightDblClick + Width = 234 + end end object Panel3: TPanel Left = 0 - Top = 385 + Top = 529 Width = 749 - Height = 259 + Height = 239 Align = alClient TabOrder = 2 object Panel4: TPanel Left = 1 Top = 1 Width = 395 - Height = 257 + Height = 237 Align = alLeft Caption = 'Panel4' TabOrder = 0 @@ -590,11 +781,9 @@ object frmClothInfoInput: TfrmClothInfoInput Left = 1 Top = 31 Width = 393 - Height = 225 + Height = 205 Align = alClient TabOrder = 1 - ExplicitLeft = -3 - ExplicitTop = 37 object TV2: TcxGridDBTableView Navigator.Buttons.CustomButtons = <> ScrollbarAnnotations.CustomAnnotations = <> @@ -646,12 +835,10 @@ object frmClothInfoInput: TfrmClothInfoInput Left = 396 Top = 1 Width = 352 - Height = 257 + Height = 237 Align = alClient Caption = 'Panel5' TabOrder = 1 - ExplicitLeft = 393 - ExplicitTop = 6 object ToolBar4: TToolBar Left = 1 Top = 1 @@ -687,11 +874,9 @@ object frmClothInfoInput: TfrmClothInfoInput Left = 1 Top = 31 Width = 350 - Height = 225 + Height = 205 Align = alClient TabOrder = 1 - ExplicitLeft = -2 - ExplicitTop = 37 object TV3: TcxGridDBTableView Navigator.Buttons.CustomButtons = <> ScrollbarAnnotations.CustomAnnotations = <> @@ -744,18 +929,18 @@ object frmClothInfoInput: TfrmClothInfoInput object Panel1: TPanel Left = 751 Top = 30 - Width = 533 - Height = 646 + Width = 550 + Height = 770 Align = alClient TabOrder = 2 object ToolBar2: TToolBar Left = 1 Top = 1 - Width = 531 + Width = 548 Height = 30 AutoSize = True ButtonHeight = 30 - ButtonWidth = 67 + ButtonWidth = 99 Caption = 'ToolBar1' DisabledImages = DataLink_ClothInfo.cxImageList_bar Images = DataLink_ClothInfo.cxImageList_bar @@ -786,12 +971,29 @@ object frmClothInfoInput: TfrmClothInfoInput ImageIndex = 6 OnClick = ToolButton4Click end + object ToolButton11: TToolButton + Left = 213 + Top = 0 + AutoSize = True + Caption = #23548#20837 + ImageIndex = 28 + Visible = False + OnClick = ToolButton11Click + end + object ToolButton12: TToolButton + Left = 284 + Top = 0 + AutoSize = True + Caption = #20840#37096#21024#38500 + ImageIndex = 33 + OnClick = ToolButton12Click + end end object cxGrid1: TcxGrid Left = 1 Top = 31 - Width = 531 - Height = 614 + Width = 548 + Height = 738 Align = alClient TabOrder = 1 object TV1: TcxGridDBTableView @@ -864,132 +1066,6 @@ object frmClothInfoInput: TfrmClothInfoInput GridView = TV1 end end - object Panel6: TPanel - Left = 6 - Top = 182 - Width = 523 - Height = 294 - Caption = 'Panel6' - TabOrder = 2 - Visible = False - object Panel7: TPanel - Left = 1 - Top = 1 - Width = 521 - Height = 35 - Align = alTop - Color = clGradientActiveCaption - ParentBackground = False - TabOrder = 0 - object Button1: TButton - Left = 224 - Top = 2 - Width = 91 - Height = 35 - Caption = #20445#23384#24182#20851#38381 - TabOrder = 0 - OnClick = Button1Click - end - object Button2: TButton - Left = 337 - Top = 2 - Width = 88 - Height = 35 - Caption = #20445#23384#24182#32487#32493 - TabOrder = 1 - OnClick = Button2Click - end - object Button3: TButton - Left = 447 - Top = 2 - Width = 74 - Height = 35 - Caption = #20851#38381 - TabOrder = 2 - OnClick = Button1Click - end - end - object cxGrid4: TcxGrid - Left = 1 - Top = 36 - Width = 521 - Height = 257 - Align = alClient - TabOrder = 1 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitHeight = 251 - object TV4: TcxGridDBTableView - Navigator.Buttons.CustomButtons = <> - ScrollbarAnnotations.CustomAnnotations = <> - DataController.DataSource = DS_4 - DataController.Filter.AutoDataSetFilter = True - DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost] - DataController.Summary.DefaultGroupSummaryItems = < - item - Format = 'C_Code' - end> - DataController.Summary.FooterSummaryItems = < - item - Kind = skSum - end> - DataController.Summary.SummaryGroups = <> - OptionsBehavior.FocusCellOnTab = True - OptionsBehavior.GoToNextCellOnEnter = True - OptionsBehavior.FocusCellOnCycle = True - OptionsCustomize.ColumnFiltering = False - OptionsView.GroupByBox = False - object cxGridDBColumn5: TcxGridDBColumn - Caption = #39068#33394 - DataBinding.FieldName = 'C_Color' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 54 - end - object cxGridDBColumn6: TcxGridDBColumn - Caption = #33394#21495 - DataBinding.FieldName = 'C_ColorNo' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 80 - end - object cxGridDBColumn7: TcxGridDBColumn - Caption = #28014#21160#20215 - DataBinding.FieldName = 'floatPrice' - DataBinding.IsNullValueType = True - PropertiesClassName = 'TcxTextEditProperties' - Properties.OnEditValueChanged = TV1Column5PropertiesEditValueChanged - HeaderAlignmentHorz = taCenter - Width = 68 - end - object cxGridDBColumn8: TcxGridDBColumn - Caption = #21442#32771#23450#20215 - DataBinding.FieldName = 'referencePrice' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Options.Editing = False - Width = 94 - end - object cxGridDBColumn9: TcxGridDBColumn - Caption = #20215#26684#19978#38480'(%)' - DataBinding.FieldName = 'MAXPRICE' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 106 - end - object cxGridDBColumn10: TcxGridDBColumn - Caption = #20215#26684#19979#38480'(%)' - DataBinding.FieldName = 'MinPRICE' - DataBinding.IsNullValueType = True - HeaderAlignmentHorz = taCenter - Width = 100 - end - end - object cxGridLevel4: TcxGridLevel - GridView = TV4 - end - end - end end object ADOQueryCmd: TADOQuery Connection = DataLink_ClothInfo.ADOLink @@ -1087,4 +1163,14 @@ object frmClothInfoInput: TfrmClothInfoInput Left = 690 Top = 473 end + object OpenDialog1: TOpenDialog + Left = 935 + Top = 166 + end + object CDS_LM: TClientDataSet + Aggregates = <> + Params = <> + Left = 980 + Top = 389 + end end diff --git a/A02基础产品管理/U_ClothInfoInput.pas b/A02基础产品管理/U_ClothInfoInput.pas index 10a65cb..cbf2938 100644 --- a/A02基础产品管理/U_ClothInfoInput.pas +++ b/A02基础产品管理/U_ClothInfoInput.pas @@ -11,7 +11,8 @@ uses cxButtonEdit, StdCtrls, ExtCtrls, cxCurrencyEdit, BtnEdit, U_BaseList, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxDateRanges, dxBarBuiltInMenu, cxCheckBox, cxDropDownEdit, cxContainer, cxMaskEdit, - dxScrollbarAnnotations, cxMemo, dxSkinsCore, dxSkinsDefaultPainters, cxMRUEdit; + dxScrollbarAnnotations, cxMemo, dxSkinsCore, dxSkinsDefaultPainters, cxMRUEdit, + ComObj; type TfrmClothInfoInput = class(TForm) @@ -116,24 +117,30 @@ type ADO_3: TADOQuery; DS_3: TDataSource; CDS_3: TClientDataSet; - Panel6: TPanel; - Panel7: TPanel; - cxGrid4: TcxGrid; - TV4: TcxGridDBTableView; - cxGridDBColumn5: TcxGridDBColumn; - cxGridDBColumn6: TcxGridDBColumn; - cxGridDBColumn7: TcxGridDBColumn; - cxGridDBColumn8: TcxGridDBColumn; - cxGridDBColumn9: TcxGridDBColumn; - cxGridDBColumn10: TcxGridDBColumn; - cxGridLevel4: TcxGridLevel; DS_4: TDataSource; CDS_4: TClientDataSet; - Button1: TButton; - Button2: TButton; ADO_4: TADOQuery; ToolButton10: TToolButton; - Button3: TButton; + ToolButton11: TToolButton; + OpenDialog1: TOpenDialog; + CDS_LM: TClientDataSet; + ToolButton12: TToolButton; + Label26: TLabel; + C_FromName3: TcxButtonEdit; + Label27: TLabel; + C_FromName4: TcxButtonEdit; + Label28: TLabel; + C_FromName5: TcxButtonEdit; + Label29: TLabel; + Process2: TcxButtonEdit; + Label30: TLabel; + Process3: TcxButtonEdit; + Label31: TLabel; + Process4: TcxButtonEdit; + Label32: TLabel; + Process5: TcxButtonEdit; + Label33: TLabel; + Process: TcxButtonEdit; procedure FormShow(Sender: TObject); procedure TBCloseClick(Sender: TObject); procedure ToolButton1Click(Sender: TObject); @@ -158,7 +165,11 @@ type procedure cxGridDBColumn3PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer); procedure Button1Click(Sender: TObject); procedure ToolButton10Click(Sender: TObject); - procedure Button2Click(Sender: TObject); + + procedure ToolButton11Click(Sender: TObject); + procedure ToolButton12Click(Sender: TObject); + procedure C_FromName3PropertiesButtonClick(Sender: TObject; + AButtonIndex: Integer); private canshu1: string; Fint: Integer; @@ -183,7 +194,7 @@ implementation uses U_DataLink, U_RTFun, U_iniParam, U_ZDYHelp, U_AttachmentUpload, U_ClothInfoSel, - U_CompanySel; + U_CompanySel, U_Edit; {$R *.dfm} procedure TfrmClothInfoInput.addColor(); @@ -288,6 +299,19 @@ begin C_FromName2.Properties.LookupItems.Text := Trim(ADOQueryTemp.fieldbyname('C_FromName2').AsString); // C_FromName2.Text := Trim(ADOQueryTemp.fieldbyname('C_FromName2').AsString); // + Process2.Text :=Trim(ADOQueryTemp.fieldbyname('Process2').AsString); //ӹʽ + + C_FromName3.Properties.LookupItems.Text := Trim(ADOQueryTemp.fieldbyname('C_FromName3').AsString); // + C_FromName3.Text := Trim(ADOQueryTemp.fieldbyname('C_FromName3').AsString); // + Process3.Text :=Trim(ADOQueryTemp.fieldbyname('Process3').AsString); //ӹʽ + + C_FromName4.Properties.LookupItems.Text := Trim(ADOQueryTemp.fieldbyname('C_FromName4').AsString); // + C_FromName4.Text := Trim(ADOQueryTemp.fieldbyname('C_FromName4').AsString); // + Process4.Text :=Trim(ADOQueryTemp.fieldbyname('Process4').AsString); //ӹʽ + + C_FromName5.Properties.LookupItems.Text := Trim(ADOQueryTemp.fieldbyname('C_FromName5').AsString); // + C_FromName5.Text := Trim(ADOQueryTemp.fieldbyname('C_FromName5').AsString); // + Process5.Text :=Trim(ADOQueryTemp.fieldbyname('Process5').AsString); //ӹʽ if ADOQueryTemp.fieldbyname('CJDATE').AsInteger <= 7 then begin @@ -332,6 +356,26 @@ begin end; end; +procedure TfrmClothInfoInput.C_FromName3PropertiesButtonClick(Sender: TObject; + AButtonIndex: Integer); +begin + try + frmClothInfoSel := TfrmClothInfoSel.Create(Application); + with frmClothInfoSel do + begin +// FCTType := ''; + if ShowModal = 1 then + begin + C_FromName3.Properties.LookupItems.Text := Trim(CDS_1.fieldbyname('BCIID').AsString); + C_FromName3.Text := Trim(CDS_1.fieldbyname('C_Name').AsString); + setName(); + end; + end; + finally + frmClothInfoSel.Free; + end; +end; + procedure TfrmClothInfoInput.C_FromNamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer); begin try @@ -440,6 +484,16 @@ begin qtyunit.ItemIndex := -1; end; + with CDS_LM do + begin + FieldDefs.Clear; + FieldDefs.Add('LXH', ftInteger, 0); + FieldDefs.Add('lCode', ftString, 40); + FieldDefs.Add('LName', ftString, 40); + close; + CreateDataSet; + end; + // InitGrid2(); InitGrid1(); InitGrid(); @@ -550,9 +604,11 @@ begin FieldByName('ToID').Value := Trim(MaxBCIID); FieldByName('SerialNo').Value := 1; FieldByName('FromID').Value := Trim(C_FromName.Properties.LookupItems.Text); // + FieldByName('Process').Value := Trim(Process.Text); // Post; end; end; + if Trim(C_FromName2.Properties.LookupItems.Text) <> '' then begin with ADOQueryCmd do @@ -568,9 +624,72 @@ begin FieldByName('ToID').Value := Trim(MaxBCIID); FieldByName('SerialNo').Value := 2; FieldByName('FromID').Value := Trim(C_FromName2.Properties.LookupItems.Text); // + FieldByName('Process').Value := Trim(Process2.Text); // Post; end; end; + + if Trim(C_FromName3.Properties.LookupItems.Text) <> '' then + begin + with ADOQueryCmd do + begin + Close; + SQL.Clear; + sql.Add('select * from BS_Cloth_Info_Link where 1=2'); + Open; + end; + with ADOQueryCmd do + begin + Append; + FieldByName('ToID').Value := Trim(MaxBCIID); + FieldByName('SerialNo').Value := 3; + FieldByName('FromID').Value := Trim(C_FromName3.Properties.LookupItems.Text); // + FieldByName('Process').Value := Trim(Process3.Text); // + Post; + end; + end; + + if Trim(C_FromName4.Properties.LookupItems.Text) <> '' then + begin + with ADOQueryCmd do + begin + Close; + SQL.Clear; + sql.Add('select * from BS_Cloth_Info_Link where 1=2'); + Open; + end; + with ADOQueryCmd do + begin + Append; + FieldByName('ToID').Value := Trim(MaxBCIID); + FieldByName('SerialNo').Value := 4; + FieldByName('FromID').Value := Trim(C_FromName4.Properties.LookupItems.Text); // + FieldByName('Process').Value := Trim(Process4.Text); // + Post; + end; + end; + + if Trim(C_FromName5.Properties.LookupItems.Text) <> '' then + begin + with ADOQueryCmd do + begin + Close; + SQL.Clear; + sql.Add('select * from BS_Cloth_Info_Link where 1=2'); + Open; + end; + with ADOQueryCmd do + begin + Append; + FieldByName('ToID').Value := Trim(MaxBCIID); + FieldByName('SerialNo').Value := 5; + FieldByName('FromID').Value := Trim(C_FromName5.Properties.LookupItems.Text); // + FieldByName('Process').Value := Trim(Process5.Text); // + Post; + end; + end; + + with ADOQueryTemp do begin Close; @@ -792,7 +911,7 @@ end; procedure TfrmClothInfoInput.ToolButton10Click(Sender: TObject); var - maxno: string; +// maxno: string; SqlStr: string; begin if FBCIID = '' then @@ -800,22 +919,36 @@ begin Application.MessageBox('ȱƷϢ!', 'ʾ', 0); Exit; end; + + try + frmEdit := TfrmEdit.Create(Application); + with frmEdit do + begin + FBCIID := Self.FBCIID; + FBCISID := CDS_1.FieldByName('BCISID').Value; + FPrice :=StrToFloatDef(CostPrice.Text, 0); + if ShowModal = 1 then + begin + InitGrid1(); + end; + end; + finally + frmEdit.Free; + end; // if GetLSNo(ADOQueryCmd, maxno, 'YS', 'BS_Cloth_Info_Sub', 4, 1) = False then // begin // Application.MessageBox('ȡʧ!', 'ʾ', 0); // Exit; // end; - SqlStr := 'select A.* from BS_Cloth_Info_Sub A '; - SqlStr := SqlStr + ' where A.BCIID=''' + Trim(FBCIID) + ''''; - SqlStr := SqlStr + ' ORDER BY CASE WHEN C_COLORNO NOT LIKE ''%[^0-9]%'' THEN dbo.getNum(C_Colorno) ELSE 9999999999 '; - SqlStr := SqlStr + ' END ,C_ColorNo'; - - InitCDSData(ADO_4, CDS_4, Tv4, SqlStr, '', ''); - - Panel6.Visible := True; - +// SqlStr := 'select A.* from BS_Cloth_Info_Sub A '; +// SqlStr := SqlStr + ' where A.BCIID=''' + Trim(FBCIID) + ''''; +// SqlStr := SqlStr + ' ORDER BY CASE WHEN C_COLORNO NOT LIKE ''%[^0-9]%'' THEN dbo.getNum(C_Colorno) ELSE 9999999999 '; +// SqlStr := SqlStr + ' END ,C_ColorNo'; +// +// InitCDSData(ADO_4, CDS_4, Tv4, SqlStr, '', ''); +// +// Panel6.Visible := True; // CopyAddRow(Tv4, CDS_4); - // with CDS_4 do // begin // append; @@ -825,11 +958,117 @@ begin // fieldbyname('referencePrice').value := StrToFloatDef(CostPrice.Text, 0); // Post; // end; - // TV1Column5PropertiesEditValueChanged(Sender); end; +procedure TfrmClothInfoInput.ToolButton11Click(Sender: TObject); +var + excelApp, WorkBook: Variant; + i, j, k, LX, ExcelRowCount: integer; + maxId, FCPID, FCPName, t1, t2, t3, FFID: string; +begin + + try + excelApp := CreateOleObject('Excel.Application'); + openDialog1.Filter := '*.CSV;*.xls'; + if opendialog1.Execute then + begin + WorkBook := excelApp.WorkBooks.Open(OpenDialog1.FileName); + end + else + exit; + excelApp.Visible := false; + ExcelRowCount := WorkBook.WorkSheets[1].UsedRange.Rows.Count; + except + application.MessageBox('EXCEL', 'Ϣ', MB_ICONERROR); + exit; + end; + + CDS_LM.EmptyDataSet; + + for j := 0 to Tv1.ColumnCount - 1 do + begin + with CDS_LM do + begin + Append; + FieldByName('LCode').Value := trim(Tv1.Columns[j].DataBinding.FieldName); + FieldByName('LName').Value := trim(Tv1.Columns[j].Caption); + Post; + end; + end; + + try + for i := 1 to 50 do + begin + if trim(WorkBook.WorkSheets[1].Cells[1, i].value) = '' then + continue; + if CDS_LM.Locate('LName', trim(WorkBook.WorkSheets[1].Cells[1, i].value), []) then + begin + with CDS_LM do + begin + Edit; + FieldByName('LXH').Value := i; + Post; + end; + end; + end; + except + application.MessageBox('', 'Ϣ', MB_ICONERROR); + exit; + end; + + try + for i := 2 to ExcelRowCount do + begin + with CDS_1 do + begin + Append; + CDS_LM.First; + while not CDS_LM.Eof do + begin + if CDS_LM.FieldByName('LXH').AsInteger > 0 then + CDS_1.fieldbyname(CDS_LM.FieldByName('LCode').AsString).Value := WorkBook.WorkSheets[1].Cells[i, CDS_LM.FieldByName('LXH').AsInteger].Value; + CDS_LM.Next; + end; + Post; + end; + end; + WorkBook.Close; + excelApp.Quit; + excelApp := Unassigned; + WorkBook := Unassigned; + except + WorkBook.Close; + excelApp.Quit; + excelApp := Unassigned; + WorkBook := Unassigned; + exit; + end; + +end; + +procedure TfrmClothInfoInput.ToolButton12Click(Sender: TObject); +begin + if CDS_1.IsEmpty then + Exit; + + if Application.MessageBox('ȷҪȫɾ', 'ʾ', 32 + 4) <> IDYES then + Exit; + + if Application.MessageBox('ȷϺ󼴽ȫɾǷȷ', 'ʾ', 32 + 4) <> IDYES then + Exit; + with ADOQueryCmd do + begin + Close; + sql.Clear; + sql.Add('delete from BS_Cloth_Info_Sub where BCIID=''' + Trim(FBCIID) + ''''); + ExecSQL; + end; + + CDS_1.EmptyDataSet; +end; + procedure TfrmClothInfoInput.ToolButton1Click(Sender: TObject); var MC_Code: string; @@ -845,11 +1084,11 @@ begin C_Code.Text := MC_Code; end; - if CDS_1.IsEmpty then - begin - Application.MessageBox('Ʒɫϸ!', 'ʾ', 0); - Exit; - end; +// if CDS_1.IsEmpty then +// begin +// Application.MessageBox('Ʒɫϸ!', 'ʾ', 0); +// Exit; +// end; if FCTID = 'CT2412300005' then begin @@ -889,7 +1128,8 @@ begin if SaveData() then begin Application.MessageBox('ɹ', 'ʾ', 0); - ModalResult := 1; + if not CDS_1.IsEmpty then + ModalResult := 1; end; end; @@ -900,7 +1140,6 @@ end; procedure TfrmClothInfoInput.ToolButton3Click(Sender: TObject); var - maxno: string; SqlStr: string; begin if FBCIID = '' then @@ -908,31 +1147,38 @@ 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; - SqlStr := 'select A.* from BS_Cloth_Info_Sub A '; - SqlStr := SqlStr + ' where 1<>1 '; - - InitCDSData(ADO_4, CDS_4, Tv4, SqlStr, '', ''); - - Panel6.Visible := True; - -// CopyAddRow(Tv4, CDS_4); - - with CDS_4 do - begin - append; - fieldbyname('BCIID').Value := FBCIID; - fieldbyname('BCISID').Value := maxno; - fieldbyname('floatPrice').Value := 0; - fieldbyname('referencePrice').value := StrToFloatDef(CostPrice.Text, 0); - Post; + try + frmEdit := TfrmEdit.Create(Application); + with frmEdit do + begin + FBCIID := Self.FBCIID; + FBCISID := ''; + FPrice :=StrToFloatDef(CostPrice.Text, 0); + if ShowModal = 1 then + begin + InitGrid1(); + end; + end; + finally + frmEdit.Free; end; +// SqlStr := 'select A.* from BS_Cloth_Info_Sub A '; +// SqlStr := SqlStr + ' where 1<>1 '; +// +// InitCDSData(ADO_4, CDS_4, Tv4, SqlStr, '', ''); +// Panel6.Visible := True; +// CopyAddRow(Tv4, CDS_4); +// with CDS_4 do +// begin +// append; +// fieldbyname('BCIID').Value := FBCIID; +//// fieldbyname('BCISID').Value := maxno; +// fieldbyname('floatPrice').Value := 0; +// fieldbyname('referencePrice').value := StrToFloatDef(CostPrice.Text, 0); +// Post; +// end; // TV1Column5PropertiesEditValueChanged(Sender); end; @@ -982,106 +1228,12 @@ end; procedure TfrmClothInfoInput.Button1Click(Sender: TObject); begin - CDS_4.EmptyDataSet; - Panel6.Visible:=False; + CDS_4.EmptyDataSet; +// Panel6.Visible := False; end; -procedure TfrmClothInfoInput.Button2Click(Sender: TObject); -var - maxId4 :string; -begin -try - ADOQueryCmd.Connection.BeginTrans; - - //////////////////////// ӱ ////////////////////////// - with CDS_4 do - begin - First; - while not Eof do - begin - if Trim(CDS_4.fieldbyname('BCISID').AsString) = '' then - begin - if GetLSNo(ADOQueryTemp, maxId4, 'YS', 'BS_Cloth_Info_Sub', 4, 1) = False then - begin - ADOQueryCmd.Connection.RollbackTrans; - Application.MessageBox('ȡˮʧܣ', 'ʾ', 0); - Exit; - end; - end - else - begin - maxId4 := Trim(CDS_4.fieldbyname('BCISID').AsString); - end; - - with ADOQueryCmd do - begin - Close; - SQL.Clear; - sql.Add(' select * from BS_Cloth_Info_Sub where '); - sql.Add(' BCISID=''' + Trim(maxId4) + ''''); - Open; - end; - with ADOQueryCmd do - begin - if Trim(CDS_4.fieldbyname('BCISID').AsString) = '' then - begin - Append; - FieldByName('FillID').Value := Trim(DCode); - FieldByName('Filler').Value := Trim(DName); - FieldByName('FillTime').Value := SGetServerDateTime(ADOQueryTemp); - end - else - begin - Edit; - FieldByName('EditID').Value := Trim(DCode); - FieldByName('Editer').Value := Trim(DName); - FieldByName('EditTime').Value := SGetServerDateTime(ADOQueryTemp); - end; - FieldByName('BCIID').Value := Trim(FBCIID); - FieldByName('BCISID').Value := Trim(maxId4); - RTSetSaveDataCDS(ADOQueryCmd, Tv4, CDS_4, 'BS_Cloth_Info_Sub', 0); - Post; - end; - Next; - end; - end; - with ADOQueryTemp do - begin - Close; - sql.Clear; - sql.Add('select count(BCISID) as AA from BS_Cloth_Info_Sub where BCIID=''' + Trim(FBCIID) + ''''); - sql.Add(' group by C_Color,C_ColorNo having count(BCISID)>1'); -// ShowMessage(sql.Text); - Open; - - end; - if StrToFloatDef(ADOQueryTemp.fieldbyname('AA').asstring, 1) > 1 then - begin - ADOQueryCmd.Connection.RollbackTrans; -// Result := False; - Application.MessageBox('ɫɫظ', 'ʾ', 0); - Exit; - end; -//////////////////////// ӱ ////////////////////////// - - - ADOQueryCmd.Connection.CommitTrans; - - - InitGrid1(); - ToolButton3.Click; -// Panel6.Visible:=false; -// Result := True; - except -// Result := False; - ADOQueryCmd.Connection.RollbackTrans; - InitGrid1(); - application.MessageBox(PChar(Exception(ExceptObject).Message), 'ʾϢ', 0); - end; -end; - procedure TfrmClothInfoInput.CostPricePropertiesEditValueChanged(Sender: TObject); var mvalue, FFieldName: string; diff --git a/A02基础产品管理/U_Edit.dfm b/A02基础产品管理/U_Edit.dfm new file mode 100644 index 0000000..9d334e3 --- /dev/null +++ b/A02基础产品管理/U_Edit.dfm @@ -0,0 +1,219 @@ +object frmEdit: TfrmEdit + Left = 682 + Top = 315 + Caption = #33394#21495#32500#25252 + ClientHeight = 404 + ClientWidth = 625 + Color = clWhite + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + OldCreateOrder = False + Position = poMainFormCenter + OnShow = FormShow + PixelsPerInch = 96 + TextHeight = 13 + object Panel6: TPanel + Left = 0 + Top = 30 + Width = 625 + Height = 374 + Align = alClient + Caption = 'Panel6' + TabOrder = 0 + object cxGrid4: TcxGrid + Left = 1 + Top = 1 + Width = 623 + Height = 372 + Align = alClient + PopupMenu = PopupMenu1 + TabOrder = 0 + object TV4: TcxGridDBTableView + Navigator.Buttons.CustomButtons = <> + ScrollbarAnnotations.CustomAnnotations = <> + DataController.DataSource = DS_4 + DataController.Filter.AutoDataSetFilter = True + DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost] + DataController.Summary.DefaultGroupSummaryItems = < + item + Format = 'C_Code' + end> + DataController.Summary.FooterSummaryItems = < + item + Kind = skSum + end> + DataController.Summary.SummaryGroups = <> + OptionsBehavior.FocusCellOnTab = True + OptionsBehavior.GoToNextCellOnEnter = True + OptionsBehavior.FocusCellOnCycle = True + OptionsCustomize.ColumnFiltering = False + OptionsView.GroupByBox = False + object cxGridDBColumn5: TcxGridDBColumn + Caption = #39068#33394 + DataBinding.FieldName = 'C_Color' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 54 + end + object cxGridDBColumn6: TcxGridDBColumn + Caption = #33394#21495 + DataBinding.FieldName = 'C_ColorNo' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 80 + end + object cxGridDBColumn7: TcxGridDBColumn + Caption = #28014#21160#20215 + DataBinding.FieldName = 'floatPrice' + DataBinding.IsNullValueType = True + PropertiesClassName = 'TcxTextEditProperties' + HeaderAlignmentHorz = taCenter + Width = 68 + end + object cxGridDBColumn8: TcxGridDBColumn + Caption = #21442#32771#23450#20215 + DataBinding.FieldName = 'referencePrice' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 94 + end + object cxGridDBColumn9: TcxGridDBColumn + Caption = #20215#26684#19978#38480'(%)' + DataBinding.FieldName = 'MAXPRICE' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 106 + end + object cxGridDBColumn10: TcxGridDBColumn + Caption = #20215#26684#19979#38480'(%)' + DataBinding.FieldName = 'MinPRICE' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 100 + end + end + object cxGridLevel4: TcxGridLevel + GridView = TV4 + end + end + end + object ToolBar1: TToolBar + Left = 0 + Top = 0 + Width = 625 + Height = 30 + AutoSize = True + ButtonHeight = 30 + ButtonWidth = 59 + Caption = 'ToolBar1' + DisabledImages = DataLink_ClothInfo.cxImageList_bar + Images = DataLink_ClothInfo.cxImageList_bar + List = True + ShowCaptions = True + TabOrder = 1 + object ToolButton1: TToolButton + Tag = 1 + Left = 0 + Top = 0 + AutoSize = True + Caption = #20445#23384 + ImageIndex = 16 + OnClick = ToolButton1Click + end + object ToolButton2: TToolButton + Left = 63 + Top = 0 + AutoSize = True + Caption = #22686#34892 + ImageIndex = 2 + OnClick = ToolButton2Click + end + object ToolButton3: TToolButton + Left = 126 + Top = 0 + AutoSize = True + Caption = #21024#34892 + ImageIndex = 6 + OnClick = ToolButton3Click + end + object TBClose: TToolButton + Left = 189 + Top = 0 + AutoSize = True + Caption = #20851#38381 + ImageIndex = 7 + OnClick = TBCloseClick + end + object ToolButton4: TToolButton + Left = 252 + Top = 0 + AutoSize = True + Caption = #23548#20837 + ImageIndex = 28 + OnClick = ToolButton4Click + end + end + object ADOQueryMain: TADOQuery + Connection = DataLink_ClothInfo.ADOLink + LockType = ltReadOnly + Parameters = <> + Left = 301 + Top = 165 + end + object ADOQueryTemp: TADOQuery + Connection = DataLink_ClothInfo.ADOLink + LockType = ltReadOnly + Parameters = <> + Left = 205 + Top = 165 + end + object ADOQueryCmd: TADOQuery + Connection = DataLink_ClothInfo.ADOLink + Parameters = <> + Left = 109 + Top = 165 + end + object DS_4: TDataSource + DataSet = CDS_4 + Left = 166 + Top = 251 + end + object CDS_4: TClientDataSet + Aggregates = <> + Params = <> + Left = 214 + Top = 253 + end + object ADO_4: TADOQuery + Connection = DataLink_ClothInfo.ADOLink + Parameters = <> + Left = 109 + Top = 261 + end + object PopupMenu1: TPopupMenu + Left = 336 + Top = 254 + object N1: TMenuItem + Caption = #28155#21152 + OnClick = N1Click + end + object N2: TMenuItem + Caption = #21024#38500 + OnClick = N2Click + end + end + object CDS_LM: TClientDataSet + Aggregates = <> + Params = <> + Left = 262 + Top = 309 + end + object OpenDialog1: TOpenDialog + Left = 416 + Top = 166 + end +end diff --git a/A02基础产品管理/U_Edit.pas b/A02基础产品管理/U_Edit.pas new file mode 100644 index 0000000..40cabe5 --- /dev/null +++ b/A02基础产品管理/U_Edit.pas @@ -0,0 +1,367 @@ +unit U_Edit; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, ExtCtrls, DB, ADODB, cxGraphics, cxControls, cxLookAndFeels, + cxLookAndFeelPainters, dxSkinsCore, dxSkinsDefaultPainters, cxStyles, + cxCustomData, cxFilter, cxData, cxDataStorage, cxEdit, cxNavigator, + dxDateRanges, dxScrollbarAnnotations, cxDBData, cxTextEdit, cxGridLevel, + cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses, + cxGridCustomView, cxGrid, Vcl.ToolWin, Vcl.ComCtrls, Datasnap.DBClient, + Vcl.Menus, ComObj; + +type + TfrmEdit = class(TForm) + ADOQueryMain: TADOQuery; + ADOQueryTemp: TADOQuery; + ADOQueryCmd: TADOQuery; + Panel6: TPanel; + cxGrid4: TcxGrid; + TV4: TcxGridDBTableView; + cxGridDBColumn5: TcxGridDBColumn; + cxGridDBColumn6: TcxGridDBColumn; + cxGridDBColumn7: TcxGridDBColumn; + cxGridDBColumn8: TcxGridDBColumn; + cxGridDBColumn9: TcxGridDBColumn; + cxGridDBColumn10: TcxGridDBColumn; + cxGridLevel4: TcxGridLevel; + DS_4: TDataSource; + CDS_4: TClientDataSet; + ToolBar1: TToolBar; + ToolButton1: TToolButton; + TBClose: TToolButton; + ADO_4: TADOQuery; + PopupMenu1: TPopupMenu; + N1: TMenuItem; + N2: TMenuItem; + ToolButton2: TToolButton; + ToolButton3: TToolButton; + ToolButton4: TToolButton; + CDS_LM: TClientDataSet; + OpenDialog1: TOpenDialog; + procedure Button2Click(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure TBCloseClick(Sender: TObject); + function SaveData(): Boolean; + procedure ToolButton1Click(Sender: TObject); + procedure N1Click(Sender: TObject); + procedure N2Click(Sender: TObject); + procedure ToolButton2Click(Sender: TObject); + procedure ToolButton3Click(Sender: TObject); + procedure ToolButton4Click(Sender: TObject); + private + { Private declarations } + public + FBCIID, FBCISID: string; + FPrice: double; + { Public declarations } + end; + +var + frmEdit: TfrmEdit; + +implementation + +uses + U_DataLink, U_RTFun; + +{$R *.dfm} + +procedure TfrmEdit.Button2Click(Sender: TObject); +begin + Close; +end; + +procedure TfrmEdit.FormShow(Sender: TObject); +var + SqlStr: string; +begin + + SqlStr := 'select A.* from BS_Cloth_Info_Sub A '; + if FBCISID = '' then + begin + SqlStr := SqlStr + ' where 1<>1'; + end + else + begin + SqlStr := SqlStr + ' where A.BCIID=''' + Trim(FBCIID) + ''''; + end; + SqlStr := SqlStr + ' ORDER BY CASE WHEN C_COLORNO NOT LIKE ''%[^0-9]%'' THEN dbo.getNum(C_Colorno) ELSE 9999999999 '; + SqlStr := SqlStr + ' END ,C_ColorNo'; + + InitCDSData(ADO_4, CDS_4, Tv4, SqlStr, '', ''); + + with CDS_LM do + begin + FieldDefs.Clear; + FieldDefs.Add('LXH', ftInteger, 0); + FieldDefs.Add('lCode', ftString, 40); + FieldDefs.Add('LName', ftString, 40); + close; + CreateDataSet; + end; +end; + +procedure TfrmEdit.N1Click(Sender: TObject); +begin + with CDS_4 do + begin + append; + fieldbyname('BCIID').Value := FBCIID; +// fieldbyname('BCISID').Value := maxno; + fieldbyname('floatPrice').Value := 0; + fieldbyname('referencePrice').value := FPrice; + Post; + end; +end; + +procedure TfrmEdit.N2Click(Sender: TObject); +begin + if CDS_4.IsEmpty then + Exit; + + if Trim(CDS_4.fieldbyname('BCISID').AsString) <> '' then + begin + if Application.MessageBox('ȷҪɾ', 'ʾ', 32 + 4) <> IDYES then + Exit; + with ADOQueryCmd do + begin + Close; + sql.Clear; + sql.Add('delete BS_Cloth_Info_Sub where BCISID=''' + Trim(CDS_4.fieldbyname('BCISID').AsString) + ''''); + ExecSQL; + end; + end; + CDS_4.Delete; +end; + +procedure TfrmEdit.TBCloseClick(Sender: TObject); +begin + Close; +end; + +procedure TfrmEdit.ToolButton1Click(Sender: TObject); +begin + ToolBar1.SetFocus; + if SaveData() then + begin + Application.MessageBox('ɹ', 'ʾ', 0); + if not CDS_4.IsEmpty then + ModalResult := 1; + end; +end; + +procedure TfrmEdit.ToolButton2Click(Sender: TObject); +begin + with CDS_4 do + begin + append; + fieldbyname('BCIID').Value := FBCIID; +// fieldbyname('BCISID').Value := maxno; + fieldbyname('floatPrice').Value := 0; + fieldbyname('referencePrice').value := FPrice; + Post; + end; +end; + +procedure TfrmEdit.ToolButton3Click(Sender: TObject); +begin + if CDS_4.IsEmpty then + Exit; + + if Trim(CDS_4.fieldbyname('BCISID').AsString) <> '' then + begin + if Application.MessageBox('ȷҪɾ', 'ʾ', 32 + 4) <> IDYES then + Exit; + with ADOQueryCmd do + begin + Close; + sql.Clear; + sql.Add('delete BS_Cloth_Info_Sub where BCISID=''' + Trim(CDS_4.fieldbyname('BCISID').AsString) + ''''); + ExecSQL; + end; + end; + CDS_4.Delete; +end; + +procedure TfrmEdit.ToolButton4Click(Sender: TObject); +var + excelApp, WorkBook: Variant; + i, j, k, LX, ExcelRowCount: integer; + maxId, FCPID, FCPName, t1, t2, t3, FFID: string; +begin + + try + excelApp := CreateOleObject('Excel.Application'); + openDialog1.Filter := '*.CSV;*.xls'; + if opendialog1.Execute then + begin + WorkBook := excelApp.WorkBooks.Open(OpenDialog1.FileName); + end + else + exit; + excelApp.Visible := false; + ExcelRowCount := WorkBook.WorkSheets[1].UsedRange.Rows.Count; + except + application.MessageBox('EXCEL', 'Ϣ', MB_ICONERROR); + exit; + end; + + CDS_LM.EmptyDataSet; + + for j := 0 to Tv4.ColumnCount - 1 do + begin + with CDS_LM do + begin + Append; + FieldByName('LCode').Value := trim(Tv4.Columns[j].DataBinding.FieldName); + FieldByName('LName').Value := trim(Tv4.Columns[j].Caption); + Post; + end; + end; + + try + for i := 1 to 50 do + begin + if trim(WorkBook.WorkSheets[1].Cells[1, i].value) = '' then + continue; + if CDS_LM.Locate('LName', trim(WorkBook.WorkSheets[1].Cells[1, i].value), []) then + begin + with CDS_LM do + begin + Edit; + FieldByName('LXH').Value := i; + Post; + end; + end; + end; + except + application.MessageBox('', 'Ϣ', MB_ICONERROR); + exit; + end; + + try + for i := 2 to ExcelRowCount do + begin + with CDS_4 do + begin + Append; + CDS_LM.First; + while not CDS_LM.Eof do + begin + if CDS_LM.FieldByName('LXH').AsInteger > 0 then + CDS_4.fieldbyname(CDS_LM.FieldByName('LCode').AsString).Value := WorkBook.WorkSheets[1].Cells[i, CDS_LM.FieldByName('LXH').AsInteger].Value; + CDS_LM.Next; + end; + Post; + end; + end; + WorkBook.Close; + excelApp.Quit; + excelApp := Unassigned; + WorkBook := Unassigned; + except + WorkBook.Close; + excelApp.Quit; + excelApp := Unassigned; + WorkBook := Unassigned; + exit; + end; + +end; + +function TfrmEdit.SaveData(): Boolean; +var + maxId4: string; +begin + try + ADOQueryCmd.Connection.BeginTrans; + + + + //////////////////////// ӱ ////////////////////////// + with CDS_4 do + begin + First; + while not Eof do + begin + if Trim(CDS_4.fieldbyname('BCISID').AsString) = '' then + begin + if GetLSNo(ADOQueryTemp, maxId4, 'YS', 'BS_Cloth_Info_Sub', 4, 1) = False then + begin + ADOQueryCmd.Connection.RollbackTrans; + Application.MessageBox('ȡˮʧܣ', 'ʾ', 0); + Exit; + end; + end + else + begin + maxId4 := Trim(CDS_4.fieldbyname('BCISID').AsString); + end; + + with ADOQueryCmd do + begin + Close; + SQL.Clear; + sql.Add(' select * from BS_Cloth_Info_Sub where '); + sql.Add(' BCISID=''' + Trim(maxId4) + ''''); + Open; + end; + with ADOQueryCmd do + begin + if Trim(CDS_4.fieldbyname('BCISID').AsString) = '' then + begin + Append; + FieldByName('FillID').Value := Trim(DCode); + FieldByName('Filler').Value := Trim(DName); + FieldByName('FillTime').Value := SGetServerDateTime(ADOQueryTemp); + end + else + begin + Edit; + FieldByName('EditID').Value := Trim(DCode); + FieldByName('Editer').Value := Trim(DName); + FieldByName('EditTime').Value := SGetServerDateTime(ADOQueryTemp); + end; + FieldByName('BCIID').Value := Trim(FBCIID); + FieldByName('BCISID').Value := Trim(maxId4); + RTSetSaveDataCDS(ADOQueryCmd, Tv4, CDS_4, 'BS_Cloth_Info_Sub', 0); + Post; + end; + Next; + end; + end; + with ADOQueryTemp do + begin + Close; + sql.Clear; + sql.Add('select count(BCISID) as AA from BS_Cloth_Info_Sub where BCIID=''' + Trim(FBCIID) + ''''); + sql.Add(' group by C_Color,C_ColorNo having count(BCISID)>1'); +// ShowMessage(sql.Text); + Open; + + end; + if StrToFloatDef(ADOQueryTemp.fieldbyname('AA').asstring, 1) > 1 then + begin + ADOQueryCmd.Connection.RollbackTrans; +// Result := False; + Application.MessageBox('ɫɫظ', 'ʾ', 0); + Exit; + end; +//////////////////////// ӱ ////////////////////////// + + + ADOQueryCmd.Connection.CommitTrans; + + Result := True; + except + Result := False; + ADOQueryCmd.Connection.RollbackTrans; + application.MessageBox(PChar(Exception(ExceptObject).Message), 'ʾϢ', 0); + end; +end; + +end. + diff --git a/A05基础资料管理/U_PositionInPut.dfm b/A05基础资料管理/U_PositionInPut.dfm index a7e9ab5..e4ea37d 100644 --- a/A05基础资料管理/U_PositionInPut.dfm +++ b/A05基础资料管理/U_PositionInPut.dfm @@ -18,7 +18,7 @@ inherited frmPositionInPut: TfrmPositionInPut Height = 254 Align = alClient TabOrder = 0 - ExplicitTop = 80 + ExplicitTop = 85 object Tv1: TcxGridDBTableView Navigator.Buttons.CustomButtons = <> ScrollbarAnnotations.CustomAnnotations = <> @@ -268,4 +268,18 @@ inherited frmPositionInPut: TfrmPositionInPut Left = 302 Top = 239 end + object ADOQuery1: TADOQuery + Connection = DataLink_BaseInfo.ADOLink + LockType = ltReadOnly + Parameters = <> + Left = 112 + Top = 104 + end + object ADOQuery2: TADOQuery + Connection = DataLink_BaseInfo.ADOLink + LockType = ltReadOnly + Parameters = <> + Left = 176 + Top = 112 + end end diff --git a/A05基础资料管理/U_PositionInPut.pas b/A05基础资料管理/U_PositionInPut.pas index 7e0070f..7605ad5 100644 --- a/A05基础资料管理/U_PositionInPut.pas +++ b/A05基础资料管理/U_PositionInPut.pas @@ -46,6 +46,8 @@ type OpenDialog1: TOpenDialog; ToolButton2: TToolButton; Tv1Column2: TcxGridDBColumn; + ADOQuery1: TADOQuery; + ADOQuery2: TADOQuery; procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure TBAddClick(Sender: TObject); procedure TBCloseClick(Sender: TObject); @@ -121,11 +123,43 @@ begin begin if GetLSNo(ADOQueryCmd, MaxNo, 'M', 'BS_Position', 4, 1) = False then raise Exception.Create('ȡʧܣ'); + with ADOQuery1 do + begin + Close; + sql.Clear; + sql.Add('select count(*) as AA from BS_Position where POSNO=''' + Trim(CDS_Sub.FieldByName('POSNO').ASString) + ''''); + Open; + if FieldByName('AA').AsInteger > 0 then + begin + ADOQueryCmd.Connection.RollbackTrans; + Result := False; + Application.MessageBox('ظ', 'ʾ', 0); + CDS_Sub.EnableControls; + Exit; + end; + end; + + with ADOQuery2 do + begin + Close; + sql.Clear; + sql.Add('select count(*) as KW from BS_Position where POSName=''' + Trim(CDS_Sub.FieldByName('POSName').ASString) + ''''); + Open; + if FieldByName('KW').AsInteger > 0 then + begin + ADOQueryCmd.Connection.RollbackTrans; + Result := False; + Application.MessageBox('λظ', 'ʾ', 0); + CDS_Sub.EnableControls; + Exit; + end; + end; end else begin MaxNo := Trim(MWBID); end; + with ADOQueryCmd do begin Close; @@ -161,6 +195,7 @@ begin end; end; CDS_Sub.EnableControls; + ADOQueryCmd.Connection.CommitTrans; Result := True; except diff --git a/T02贸易汇总仓库/U_ItemizedListInPut.dfm b/T02贸易汇总仓库/U_ItemizedListInPut.dfm index 57c27e1..4387d9a 100644 --- a/T02贸易汇总仓库/U_ItemizedListInPut.dfm +++ b/T02贸易汇总仓库/U_ItemizedListInPut.dfm @@ -133,8 +133,6 @@ inherited frmItemizedListInPut: TfrmItemizedListInPut Align = alClient PopupMenu = PopupMenu2 TabOrder = 0 - ExplicitLeft = 2 - ExplicitTop = 5 object Tv1: TcxGridDBTableView OnDblClick = Tv1DblClick OnMouseDown = Tv1MouseDown @@ -312,12 +310,13 @@ inherited frmItemizedListInPut: TfrmItemizedListInPut Caption = #21333#20301 DataBinding.FieldName = 'TISUnit' DataBinding.IsNullValueType = True - PropertiesClassName = 'TcxComboBoxProperties' - Properties.DropDownListStyle = lsEditFixedList - Properties.Items.Strings = ( - 'M' - 'Y' - 'Kg') + PropertiesClassName = 'TcxButtonEditProperties' + Properties.Buttons = < + item + Default = True + Kind = bkEllipsis + end> + Properties.OnButtonClick = Tv1Column8PropertiesButtonClick HeaderAlignmentHorz = taCenter Width = 55 end @@ -354,7 +353,6 @@ inherited frmItemizedListInPut: TfrmItemizedListInPut Ctl3D = False ParentCtl3D = False TabOrder = 3 - ExplicitTop = 36 object Label3: TLabel Left = 377 Top = 11 diff --git a/T02贸易汇总仓库/U_ItemizedListInPut.pas b/T02贸易汇总仓库/U_ItemizedListInPut.pas index 28bf687..0004219 100644 --- a/T02贸易汇总仓库/U_ItemizedListInPut.pas +++ b/T02贸易汇总仓库/U_ItemizedListInPut.pas @@ -113,6 +113,7 @@ type procedure ToolButton5Click(Sender: TObject); procedure Tv1Column6PropertiesEditValueChanged(Sender: TObject); procedure ToolButton1Click(Sender: TObject); + procedure Tv1Column8PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer); private FSCXDH: string; FShowKeyid: integer; @@ -127,6 +128,7 @@ type public PState, CopyInt, PriceFlag: Integer; FTIMID, FFTMMID, FTMMNo, MTMSId: string; + FName, FColor, FColorNo: string; FXS: Integer; canshu1: string; fFlileFlag: string; @@ -1242,9 +1244,32 @@ begin end; +procedure TfrmItemizedListInPut.Tv1Column8PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer); +begin + try + frmZDYHelp := TfrmZDYHelp.Create(Application); + with frmZDYHelp do + begin + flag := 'qtyunit'; + flagname := 'λ'; + if ShowModal = 1 then + begin + CDS_1.Edit; + CDS_1.fieldbyname('TISUnit').Value := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString); + // Order_Sub.fieldbyname('PRTCode').Value:=Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString); + CDS_1.Post; + end; + end; + finally + frmZDYHelp.Free; + end; + tv1.Controller.EditingController.ShowEdit(); +end; + procedure TfrmItemizedListInPut.Tv1DblClick(Sender: TObject); var MTISId, MQtyUnit: string; + begin if Trim(CDS_1.FieldByName('TISUnit').AsString) = '' then begin @@ -1253,6 +1278,9 @@ begin end; MTISId := Trim(Self.CDS_1.FieldByName('TISId').AsString); MQtyUnit := Trim(Self.CDS_1.FieldByName('TISUnit').AsString); + FName := CDS_1.FieldByName('C_Name').ASString; + FColor := CDS_1.FieldByName('C_Color').ASString; + FColorNo := CDS_1.FieldByName('C_colorNo').ASString; if SaveData() then begin @@ -1263,6 +1291,9 @@ begin FTIMId := Self.FTIMId; FTISId := MTISId; FQtyUnit := MQtyUnit; + FName := Self.FName; + FColor := Self.FColor; + FColorNo := Self.FColorNo; if ShowModal = 1 then begin Self.initGrid1(Self.FTIMID); diff --git a/T02贸易汇总仓库/U_ItemizedListList.dfm b/T02贸易汇总仓库/U_ItemizedListList.dfm index fdb226e..d52413b 100644 --- a/T02贸易汇总仓库/U_ItemizedListList.dfm +++ b/T02贸易汇总仓库/U_ItemizedListList.dfm @@ -148,10 +148,38 @@ inherited frmItemizedListList: TfrmItemizedListList Height = 21 Caption = #23545#26041#21333#20301 end + object Label4: TLabel + Left = 416 + Top = 51 + Width = 64 + Height = 21 + Caption = #33394#24067#21517#31216 + end + object Label5: TLabel + Left = 632 + Top = 51 + Width = 32 + Height = 21 + Caption = #39068#33394 + end + object Label6: TLabel + Left = 822 + Top = 51 + Width = 32 + Height = 21 + Caption = #33394#21495 + end + object Label2: TLabel + Left = 1014 + Top = 51 + Width = 32 + Height = 21 + Caption = #32568#21495 + end object TIMNo: TcxTextEdit Tag = 2 Left = 76 - Top = 45 + Top = 47 TabOrder = 0 OnKeyPress = TIMNoKeyPress Width = 120 @@ -159,7 +187,7 @@ inherited frmItemizedListList: TfrmItemizedListList object OOPCoName: TcxTextEdit Tag = 2 Left = 268 - Top = 45 + Top = 47 TabOrder = 1 OnKeyPress = TIMNoKeyPress Width = 120 @@ -185,6 +213,38 @@ inherited frmItemizedListList: TfrmItemizedListList ExplicitHeight = 21 end end + object C_Name: TcxTextEdit + Tag = 2 + Left = 486 + Top = 47 + TabOrder = 3 + OnKeyPress = TIMNoKeyPress + Width = 120 + end + object C_Color: TcxTextEdit + Tag = 2 + Left = 676 + Top = 47 + TabOrder = 4 + OnKeyPress = TIMNoKeyPress + Width = 120 + end + object C_ColorNo: TcxTextEdit + Tag = 2 + Left = 868 + Top = 47 + TabOrder = 5 + OnKeyPress = TIMNoKeyPress + Width = 120 + end + object FtyPCId: TcxTextEdit + Tag = 2 + Left = 1060 + Top = 47 + TabOrder = 6 + OnKeyPress = TIMNoKeyPress + Width = 120 + end end object cxTabControl1: TcxTabControl [2] Left = 0 @@ -488,6 +548,13 @@ inherited frmItemizedListList: TfrmItemizedListList Options.Editing = False Width = 66 end + object TV1Column16: TcxGridDBColumn + Caption = #24405#20837#20154 + DataBinding.FieldName = 'Filler' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 66 + end end object cxGridLevel1: TcxGridLevel GridView = TV1 @@ -596,6 +663,7 @@ inherited frmItemizedListList: TfrmItemizedListList Top = 307 end object GPM_3: TcxGridPopupMenu + Grid = cxGrid1 PopupMenus = <> Left = 691 Top = 401 diff --git a/T02贸易汇总仓库/U_ItemizedListList.pas b/T02贸易汇总仓库/U_ItemizedListList.pas index 30dfe6a..26d4245 100644 --- a/T02贸易汇总仓库/U_ItemizedListList.pas +++ b/T02贸易汇总仓库/U_ItemizedListList.pas @@ -85,6 +85,15 @@ type TV1Column13: TcxGridDBColumn; TV1Column14: TcxGridDBColumn; TV1Column15: TcxGridDBColumn; + TV1Column16: TcxGridDBColumn; + Label4: TLabel; + C_Name: TcxTextEdit; + Label5: TLabel; + Label6: TLabel; + C_Color: TcxTextEdit; + C_ColorNo: TcxTextEdit; + Label2: TLabel; + FtyPCId: TcxTextEdit; procedure FormDestroy(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormCreate(Sender: TObject); diff --git a/T02贸易汇总仓库/U_ItemizedListQtyInPut.dfm b/T02贸易汇总仓库/U_ItemizedListQtyInPut.dfm index be36590..23e0a7d 100644 --- a/T02贸易汇总仓库/U_ItemizedListQtyInPut.dfm +++ b/T02贸易汇总仓库/U_ItemizedListQtyInPut.dfm @@ -29,6 +29,8 @@ inherited frmItemizedListQtyInPut: TfrmItemizedListQtyInPut Align = alClient PopupMenu = PopupMenu1 TabOrder = 0 + ExplicitLeft = 0 + ExplicitTop = 69 object Tv1: TcxGridDBTableView OnKeyDown = Tv1KeyDown Navigator.Buttons.CustomButtons = <> @@ -206,6 +208,18 @@ inherited frmItemizedListQtyInPut: TfrmItemizedListQtyInPut Height = 21 Caption = #25968#37327 end + object Label1: TLabel + Left = 377 + Top = 6 + Width = 5 + Height = 22 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -16 + Font.Name = #24494#36719#38597#40657 + Font.Style = [fsBold] + ParentFont = False + end object inPiece: TcxCurrencyEdit Left = 71 Top = 3 @@ -299,7 +313,6 @@ inherited frmItemizedListQtyInPut: TfrmItemizedListQtyInPut end object ADOQueryBatch: TADOQuery Connection = DataLink_TradeTotalClothStk.ADOLink - LockType = ltBatchOptimistic Parameters = <> Left = 60 Top = 274 diff --git a/T02贸易汇总仓库/U_ItemizedListQtyInPut.pas b/T02贸易汇总仓库/U_ItemizedListQtyInPut.pas index 623b04c..52f232d 100644 --- a/T02贸易汇总仓库/U_ItemizedListQtyInPut.pas +++ b/T02贸易汇总仓库/U_ItemizedListQtyInPut.pas @@ -49,6 +49,7 @@ type TBClose: TToolButton; Tv1Column1: TcxGridDBColumn; ADOQueryBatch: TADOQuery; + Label1: TLabel; procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormShow(Sender: TObject); procedure TBDelClick(Sender: TObject); @@ -70,6 +71,7 @@ type public { Public declarations } FTIMId, FTISId, FQtyUnit: string; + FName, FColor, FColorNo: string; end; var @@ -434,7 +436,7 @@ begin end; if ADOQueryBatch.FieldByName('intReturn').AsInteger = -1 then raise Exception.Create(pchar(trim(ADOQueryBatch.FieldByName('ShowMsg').AsString))); - ADOQueryBatch.UpdateBatch; +// ADOQueryBatch.UpdateBatch; ADOQueryBatch.Connection.CommitTrans; Result := True; @@ -450,7 +452,7 @@ procedure TfrmItemizedListQtyInPut.FormShow(Sender: TObject); begin inherited; ReadCxGrid('뵥Ǽ', Tv1, 'ó׻ֿܲ'); - + Label1.Caption := 'ɫƣ' + FName + ' ɫ' + FColor + ' ɫţ' + FColorNo; with CDS_LM do begin FieldDefs.Clear; diff --git a/T05贸易门市管理/U_TradeMarketInPut.dfm b/T05贸易门市管理/U_TradeMarketInPut.dfm index 857098e..029f1c2 100644 --- a/T05贸易门市管理/U_TradeMarketInPut.dfm +++ b/T05贸易门市管理/U_TradeMarketInPut.dfm @@ -8,8 +8,8 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut Font.Height = -16 Position = poMainFormCenter WindowState = wsMaximized - ExplicitWidth = 1368 - ExplicitHeight = 683 + ExplicitWidth = 1376 + ExplicitHeight = 691 PixelsPerInch = 96 TextHeight = 21 object ToolBar1: TToolBar [0] @@ -28,7 +28,6 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut List = True ShowCaptions = True TabOrder = 0 - ExplicitTop = 3 object TBSave: TToolButton Left = 0 Top = 0 @@ -57,9 +56,9 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut object ToolBar2: TToolBar [1] Tag = 1 Left = 0 - Top = 224 + Top = 225 Width = 1360 - Height = 30 + Height = 24 ButtonHeight = 30 ButtonWidth = 67 Caption = 'ToolBar1' @@ -69,6 +68,7 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut List = True ShowCaptions = True TabOrder = 1 + ExplicitTop = 391 object ToolButton1: TToolButton Left = 0 Top = 0 @@ -88,29 +88,31 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut end object Panel2: TPanel [2] Left = 0 - Top = 254 + Top = 249 Width = 1360 - Height = 398 + Height = 403 Align = alClient Caption = 'Panel2' TabOrder = 2 + ExplicitTop = 254 + ExplicitHeight = 398 object Panel3: TPanel Left = 1 Top = 1 Width = 1072 - Height = 396 + Height = 401 Align = alClient Caption = 'Panel2' TabOrder = 0 + ExplicitHeight = 396 object cxGrid1: TcxGrid Left = 1 Top = 1 Width = 1070 - Height = 394 + Height = 399 Align = alClient TabOrder = 0 - ExplicitLeft = -1 - ExplicitTop = 5 + ExplicitHeight = 394 object Tv1: TcxGridDBTableView OnMouseDown = Tv1MouseDown Navigator.Buttons.CustomButtons = <> @@ -340,10 +342,11 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut Left = 1073 Top = 1 Width = 286 - Height = 396 + Height = 401 Align = alRight Caption = 'Panel4' TabOrder = 1 + ExplicitHeight = 396 object Panel5: TPanel Left = 1 Top = 1 @@ -377,17 +380,19 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut Left = 1 Top = 42 Width = 284 - Height = 353 + Height = 358 Align = alClient Caption = #21452#20987#21024#38500#26126#32454#20449#24687 TabOrder = 1 + ExplicitHeight = 353 object cxGrid2: TcxGrid Left = 2 Top = 23 Width = 280 - Height = 328 + Height = 333 Align = alClient TabOrder = 0 + ExplicitHeight = 328 object TvMX: TcxGridDBTableView Navigator.Buttons.CustomButtons = <> Navigator.Buttons.Delete.Enabled = False @@ -451,7 +456,7 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut Left = 0 Top = 30 Width = 1360 - Height = 194 + Height = 195 Align = alTop BevelInner = bvNone BevelOuter = bvNone @@ -461,80 +466,91 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut TabOrder = 3 OnClick = ScrollBox1Click object Label3: TLabel - Left = 722 - Top = 13 + Left = 730 + Top = 70 Width = 64 Height = 21 Caption = #21046#21333#26085#26399 end object Label25: TLabel - Left = 363 - Top = 13 + Left = 352 + Top = 21 Width = 64 Height = 21 Caption = #20132#36135#26085#26399 + Visible = False end object Label1: TLabel - Left = 21 - Top = 126 + Left = 29 + Top = 119 Width = 77 Height = 21 Caption = #22791' '#27880 end object Label2: TLabel - Left = 21 - Top = 13 - Width = 48 + Left = 721 + Top = 21 + Width = 64 Height = 21 - Caption = #35746#21333#21495 + Caption = #21333#25454#32534#21495 end object Label14: TLabel - Left = 363 - Top = 49 + Left = 24 + Top = 65 Width = 72 Height = 21 Caption = #23458' '#25143 end object Label20: TLabel - Left = 21 - Top = 49 + Left = 29 + Top = 21 Width = 64 Height = 21 Caption = #32463#33829#21333#20301 + Visible = False end object Label19: TLabel - Left = 363 - Top = 87 + Left = 371 + Top = 247 Width = 80 Height = 21 Caption = #32852#31995#26041#24335#65306 + Visible = False end object Label37: TLabel - Left = 21 - Top = 87 + Left = 29 + Top = 247 Width = 80 Height = 21 Caption = #35746#21333#31867#22411#65306 + Visible = False end object Label18: TLabel - Left = 722 - Top = 49 + Left = 730 + Top = 121 Width = 64 Height = 21 Caption = #21457#36135#22320#22336 end + object Label4: TLabel + Left = 352 + Top = 66 + Width = 48 + Height = 21 + Caption = #35746#21333#21495 + end object TMMNo: TcxTextEdit Tag = 2 - Left = 114 - Top = 10 + Left = 814 + Top = 17 Enabled = False TabOrder = 0 Width = 200 end object TMMDate: TDateTimePicker Tag = 2 - Left = 806 - Top = 9 + Left = 814 + Top = 66 Width = 200 Height = 29 BevelInner = bvNone @@ -545,8 +561,8 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut end object DLYDate: TDateTimePicker Tag = 2 - Left = 461 - Top = 9 + Left = 436 + Top = 17 Width = 200 Height = 29 BevelInner = bvNone @@ -555,12 +571,13 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut Time = 0.670856296288548000 ShowCheckbox = True TabOrder = 2 + Visible = False end object OrdNote: TMemo Tag = 2 - Left = 114 - Top = 126 - Width = 894 + Left = 122 + Top = 119 + Width = 511 Height = 58 Hint = 'OrdNote/'#22791#27880 ScrollBars = ssVertical @@ -569,8 +586,8 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut end object OrdType: TComboBox Tag = 2 - Left = 114 - Top = 83 + Left = 122 + Top = 243 Width = 200 Height = 29 Style = csDropDownList @@ -580,13 +597,14 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut ParentCtl3D = False TabOrder = 4 Text = #27491#24120#21333 + Visible = False Items.Strings = ( #27491#24120#21333) end object OurCoName: TcxButtonEdit Tag = 2 - Left = 114 - Top = 45 + Left = 122 + Top = 17 Properties.Buttons = < item Default = True @@ -596,13 +614,14 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut Properties.OnButtonClick = OurCoNamePropertiesButtonClick Style.ButtonStyle = btsDefault TabOrder = 5 + Visible = False OnDblClick = OurCoNameDblClick Width = 200 end object CustName: TcxButtonEdit Tag = 2 - Left = 461 - Top = 48 + Left = 122 + Top = 64 Properties.Buttons = < item Default = True @@ -617,8 +636,8 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut end object ShippingAddress: TcxButtonEdit Tag = 2 - Left = 806 - Top = 48 + Left = 814 + Top = 120 Hint = 'ShippingAddress/'#21457#36135#22320#22336 Properties.Buttons = < item @@ -634,8 +653,8 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut end object CONTACT: TcxButtonEdit Tag = 2 - Left = 461 - Top = 83 + Left = 469 + Top = 243 Hint = 'CONTACT/'#32852#31995#26041#24335 Properties.Buttons = < item @@ -646,9 +665,17 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut Properties.OnButtonClick = ShippingAddressPropertiesButtonClick Style.ButtonStyle = btsDefault TabOrder = 8 + Visible = False OnDblClick = OurCoNameDblClick Width = 545 end + object BuyOrdNo: TcxTextEdit + Tag = 2 + Left = 436 + Top = 62 + TabOrder = 9 + Width = 200 + end end inherited ADOQueryBaseCmd: TADOQuery Connection = DataLink_TradeMarket.ADOLink @@ -770,8 +797,8 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut Connection = DataLink_TradeMarket.ADOLink LockType = ltReadOnly Parameters = <> - Left = 643 - Top = 188 + Left = 739 + Top = 204 end object ADO_RCPM: TADOQuery Connection = DataLink_TradeMarket.ADOLink diff --git a/T05贸易门市管理/U_TradeMarketInPut.pas b/T05贸易门市管理/U_TradeMarketInPut.pas index d899d38..d30ee2a 100644 --- a/T05贸易门市管理/U_TradeMarketInPut.pas +++ b/T05贸易门市管理/U_TradeMarketInPut.pas @@ -99,6 +99,8 @@ type DS_PM: TDataSource; Tv1Column12: TcxGridDBColumn; ADO_1: TADOQuery; + Label4: TLabel; + BuyOrdNo: TcxTextEdit; procedure TBCloseClick(Sender: TObject); procedure FormShow(Sender: TObject); procedure TBSaveClick(Sender: TObject); @@ -130,6 +132,7 @@ type procedure Tv1Column7PropertiesEditValueChanged(Sender: TObject); procedure Tv1Column12PropertiesEditValueChanged(Sender: TObject); procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); + procedure FormCreate(Sender: TObject); private FSCXDH: string; procedure InitData(); @@ -293,6 +296,13 @@ var begin end; +procedure TfrmTradeMarketInPut.FormCreate(Sender: TObject); +begin + inherited; + OurCoName.Properties.LookupItems.Text := 'W0001'; + OurCoName.Text := ''; +end; + procedure TfrmTradeMarketInPut.FormShow(Sender: TObject); var i: Integer; diff --git a/T05贸易门市管理/U_TradeMarketList.dfm b/T05贸易门市管理/U_TradeMarketList.dfm index ec4067a..189b629 100644 --- a/T05贸易门市管理/U_TradeMarketList.dfm +++ b/T05贸易门市管理/U_TradeMarketList.dfm @@ -9,8 +9,8 @@ inherited frmTradeMarketList: TfrmTradeMarketList FormStyle = fsMDIChild Position = poScreenCenter Visible = True - ExplicitWidth = 1548 - ExplicitHeight = 625 + ExplicitWidth = 1556 + ExplicitHeight = 633 PixelsPerInch = 96 TextHeight = 21 object ToolBar1: TToolBar [0] @@ -171,7 +171,7 @@ inherited frmTradeMarketList: TfrmTradeMarketList Top = 51 Width = 64 Height = 21 - Caption = #35745#21010#21333#21495 + Caption = #21333#25454#32534#21495 end object Label1: TLabel Left = 408 @@ -196,8 +196,8 @@ inherited frmTradeMarketList: TfrmTradeMarketList end object TMMNo: TcxTextEdit Tag = 2 - Left = 92 - Top = 47 + Left = 90 + Top = 45 TabOrder = 0 OnKeyPress = TMMNoKeyPress Width = 120 @@ -256,7 +256,6 @@ inherited frmTradeMarketList: TfrmTradeMarketList Align = alClient PopupMenu = PM_1 TabOrder = 3 - ExplicitTop = 154 object Tv1: TcxGridDBTableView Navigator.Buttons.CustomButtons = <> ScrollbarAnnotations.CustomAnnotations = <> @@ -290,6 +289,13 @@ inherited frmTradeMarketList: TfrmTradeMarketList HeaderAlignmentHorz = taCenter Width = 50 end + object Tv1Column7: TcxGridDBColumn + Caption = #21333#25454#32534#21495 + DataBinding.FieldName = 'TMMNo' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 116 + end object v1OrdDate: TcxGridDBColumn Caption = #21046#21333#26085#26399 DataBinding.FieldName = 'TMMDate' @@ -434,7 +440,6 @@ inherited frmTradeMarketList: TfrmTradeMarketList Align = alClient PopupMenu = PopupMenu2 TabOrder = 0 - ExplicitTop = -2 object TV2: TcxGridDBTableView Navigator.Buttons.CustomButtons = <> ScrollbarAnnotations.CustomAnnotations = <> diff --git a/T05贸易门市管理/U_TradeMarketList.pas b/T05贸易门市管理/U_TradeMarketList.pas index b5b857b..44a3dd7 100644 --- a/T05贸易门市管理/U_TradeMarketList.pas +++ b/T05贸易门市管理/U_TradeMarketList.pas @@ -97,6 +97,7 @@ type Tv1Column3: TcxGridDBColumn; Tv1Column5: TcxGridDBColumn; frmFrameDateSel1: TfrmFrameDateSel; + Tv1Column7: TcxGridDBColumn; procedure FormDestroy(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormCreate(Sender: TObject);