diff --git a/应收应付/U_DataLink.pas b/应收应付/U_DataLink.pas index aaadab2..8290cd3 100644 --- a/应收应付/U_DataLink.pas +++ b/应收应付/U_DataLink.pas @@ -4,7 +4,21 @@ interface uses SysUtils, Classes, DB, ADODB, ImgList, Controls, cxStyles, cxLookAndFeels, - Windows,Messages,forms,OleCtnrs,DateUtils, cxClasses; + Windows,Messages,forms,OleCtnrs,DateUtils, cxClasses, dxSkinsCore, + dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee, + dxSkinDarkRoom, dxSkinDarkSide, dxSkinDevExpressDarkStyle, + dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans, + dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky, + dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis, + dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black, + dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink, + dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue, + dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, + dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin, + dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus, + dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008, + dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, dxSkinValentine, + dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue; var DConString:String; {ȫַ} server, dtbase, user, pswd: String; {ݿӲ} diff --git a/应收应付/U_GetDllForm.pas b/应收应付/U_GetDllForm.pas index 04ed77c..d0090c0 100644 --- a/应收应付/U_GetDllForm.pas +++ b/应收应付/U_GetDllForm.pas @@ -1,25 +1,24 @@ - unit U_GetDllForm; -interface -uses - Windows,Messages,forms,OleCtnrs,DateUtils,SysUtils,ADODB,ActiveX,dxCore; -function GetDllForm(App:Tapplication; FormH:hwnd; FormID:integer; - Language: integer; WinStyle:integer; - GCode: Pchar; GName: Pchar; DataBase:Pchar;Title:PChar; - Parameters1:PChar;Parameters2:PChar;Parameters3:PChar;Parameters4:PChar; - Parameters5:PChar;Parameters6:PChar;Parameters7:PChar;Parameters8:PChar; - Parameters9:PChar;Parameters10:PChar;DataBaseStr:PChar):hwnd;export;stdcall; -function ConnData():Boolean; +interface + +uses + Windows, Messages, forms, OleCtnrs, DateUtils, SysUtils, ADODB, ActiveX, + dxCore; + +function GetDllForm(App: Tapplication; FormH: hwnd; FormID: integer; Language: integer; WinStyle: integer; GCode: Pchar; GName: Pchar; DataBase: Pchar; Title: PChar; Parameters1: PChar; Parameters2: PChar; Parameters3: PChar; Parameters4: PChar; Parameters5: PChar; Parameters6: PChar; Parameters7: PChar; Parameters8: PChar; Parameters9: PChar; Parameters10: PChar; DataBaseStr: PChar): hwnd; export; stdcall; + +function ConnData(): Boolean; implementation + uses - U_DataLink,U_Fun,U_YFCR,U_FKCR, - U_YFFKList,U_YSCR,U_SKCR,U_YSSKList,U_ProductOrderCost,U_YFFP,U_YSFP - ,U_YFCRLZ,U_YSCRLZ,U_YSHZMX,U_YFCRYCL,U_YSCROL,U_SKCROLJ,U_YSHZMXOLJ - ,U_SKCRLZ,U_YSHZMXDL,U_FKCRLZ,U_YSHZMXView,U_YFCRLZView,U_YFCRLZQty, - U_YSCRJZC,U_YSCR_Gd,U_SKCR_Gd,U_YFZDList_MX,U_YSZDList_MX,U_YFMXlist,U_YSMXlist, - U_YKHXList,U_FDINVOICE,U_FPINVOICE_TJ; + U_DataLink, U_Fun, U_YFCR, U_FKCR, U_YFFKList, U_YSCR, U_SKCR, U_YSSKList, + U_ProductOrderCost, U_YFFP, U_YSFP, U_YFCRLZ, U_YSCRLZ, U_YSHZMX, U_YFCRYCL, + U_YSCROL, U_SKCROLJ, U_YSHZMXOLJ, U_SKCRLZ, U_YSHZMXDL, U_FKCRLZ, U_YSHZMXView, + U_YFCRLZView, U_YFCRLZQty, U_YSCRJZC, U_YSCR_Gd, U_SKCR_Gd, U_YFZDList_MX, + U_YSYGGJList, U_YSZDList_MX, U_YFMXlist, U_YSMXlist, U_YKHXList, U_FDINVOICE, + U_FPINVOICE_TJ; ///////////////////////////////////////////////////////////////// // ˵:ȡDllеô // @@ -29,56 +28,48 @@ uses // Language>>; // // WinStyle>>ͣ // ///////////////////////////////////////////////////////////////// -function GetDllForm(App:Tapplication; FormH:hwnd; FormID:integer; - Language: integer; WinStyle:integer; - GCode: Pchar; GName: Pchar; DataBase:Pchar;Title:PChar; - Parameters1:PChar;Parameters2:PChar;Parameters3:PChar;Parameters4:PChar; - Parameters5:PChar;Parameters6:PChar;Parameters7:PChar;Parameters8:PChar; - Parameters9:PChar;Parameters10:PChar; - DataBaseStr:PChar):hwnd; - +function GetDllForm(App: Tapplication; FormH: hwnd; FormID: integer; Language: integer; WinStyle: integer; GCode: Pchar; GName: Pchar; DataBase: Pchar; Title: PChar; Parameters1: PChar; Parameters2: PChar; Parameters3: PChar; Parameters4: PChar; Parameters5: PChar; Parameters6: PChar; Parameters7: PChar; Parameters8: PChar; Parameters9: PChar; Parameters10: PChar; DataBaseStr: PChar): hwnd; var mnewHandle: hwnd; mstyle: TFormStyle; // 0:Ӵ; 1ͨ mstate: TWindowState; mborderstyle: TFormBorderStyle; begin - mNewHandle:=0; - DName:=GName; - DCode:=GCode; - DdataBase:=DataBase; - DTitCaption:=Title; - DParameters1:=Parameters1; - DParameters2:=Parameters2; - DParameters3:=Parameters3; - DParameters4:=Parameters4; - DParameters5:=Parameters5; - DParameters6:=Parameters6; - DParameters7:=Parameters7; - DParameters8:=Parameters8; - DParameters9:=Parameters9; - DParameters10:=Parameters10; + mnewHandle := 0; + DName := GName; + DCode := GCode; + DdataBase := DataBase; + DTitCaption := Title; + DParameters1 := Parameters1; + DParameters2 := Parameters2; + DParameters3 := Parameters3; + DParameters4 := Parameters4; + DParameters5 := Parameters5; + DParameters6 := Parameters6; + DParameters7 := Parameters7; + DParameters8 := Parameters8; + DParameters9 := Parameters9; + DParameters10 := Parameters10; + MainApplication := App; + DCurHandle := FormH; + IsDelphiLanguage := Language; - MainApplication:=App; - DCurHandle:=FormH; - IsDelphiLanguage:= Language; - - Application:=TApplication(App); - DCurHandle:=0; + Application := TApplication(App); + DCurHandle := 0; //ֵַ - SetLength(server, 255); - SetLength(dtbase, 255); - SetLength(user, 255); - SetLength(pswd, 255); - + SetLength(server, 255); + SetLength(dtbase, 255); + SetLength(user, 255); + SetLength(pswd, 255); + server := '139.224.12.182,7781'; // 122.224.36.142,7781 dtbase := 'aidengdata'; //jinzhicaidata user := 'aidengsa'; pswd := 'rightsoft@3203'; - + DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server; if trim(DataBaseStr) <> '' then DConString := DataBaseStr; @@ -96,28 +87,28 @@ begin //DParameters9:='̨֧ͷ'; //DParameters8:='FactoryNo1Name'; //DParameters10:='P_YSSK_ListTT'; - if not ConnData() then - begin - result:=0; - exit; - end; + if not ConnData() then + begin + result := 0; + exit; + end; { if IsINIFile() then ReadINIFile() else WriteINIFile ;} // 崰 ״̬ - if WinStyle=0 then - begin - mstyle := fsMDIChild ; - mstate := wsMaximized ; - mborderstyle := bsSizeable; - end - else - begin - mstyle := fsNormal ; - mstate := wsNormal ; - mborderstyle := bsSizeable; - end; + if WinStyle = 0 then + begin + mstyle := fsMDIChild; + mstate := wsMaximized; + mborderstyle := bsSizeable; + end + else + begin + mstyle := fsNormal; + mstate := wsNormal; + mborderstyle := bsSizeable; + end; //////////////////// { GetSWLDZ('192.168.1.246'); if IpCall<>0 then @@ -134,692 +125,715 @@ begin end; } ///////////////////// //ģ鴰 - case FormId of - 1: //ӦǼ - begin - if frmYFCR=nil then - begin - frmYFCR:= TfrmYFCR.Create(application.MainForm); - with frmYFCR do - begin - caption:=Trim(Title); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; + case FormID of + 1: //ӦǼ + begin + if frmYFCR = nil then + begin + frmYFCR := TfrmYFCR.Create(application.MainForm); + with frmYFCR do + begin + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; //show; - end; - end - else - frmYFCR.BringToFront; + end; + end + else + frmYFCR.BringToFront; // - mNewHandle:=frmYFCR.Handle; + mnewHandle := frmYFCR.Handle; - end ; - 15: //ӦǼ Ⱦ ӹ - begin - if frmYFCRLZ=nil then - begin - frmYFCRLZ:= TfrmYFCRLZ.Create(application.MainForm); - with frmYFCRLZ do - begin - caption:=Trim(Title); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; + end; + 221: //Ա۶˵ + begin + if frmYSYGGJList = nil then + begin + frmYSYGGJList := TfrmYSYGGJList.Create(application.MainForm); + with frmYSYGGJList do + begin + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; //show; - end; - end - else - frmYFCRLZ.BringToFront; + end; + end + else + frmYSYGGJList.BringToFront; // - mNewHandle:=frmYFCRLZ.Handle; + mnewHandle := frmYSYGGJList.Handle; - end ; - 12: //ӦǼ ԭϲֿ - begin - if frmYFCRYCL=nil then - begin - frmYFCRYCL:= TfrmYFCRYCL.Create(application.MainForm); - with frmYFCRYCL do - begin - caption:=Trim(Title); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; + end; + 15: //ӦǼ Ⱦ ӹ + begin + if frmYFCRLZ = nil then + begin + frmYFCRLZ := TfrmYFCRLZ.Create(application.MainForm); + with frmYFCRLZ do + begin + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; //show; - end; - end - else - frmYFCRYCL.BringToFront; + end; + end + else + frmYFCRLZ.BringToFront; // - mNewHandle:=frmYFCRYCL.Handle; + mnewHandle := frmYFCRLZ.Handle; - end ; - 11: //ӦǼ ԭϲֿ - begin - if frmYFCRLZQty=nil then - begin - frmYFCRLZQty:= TfrmYFCRLZQty.Create(application.MainForm); - with frmYFCRLZQty do - begin - caption:=Trim(Title); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; + end; + 12: //ӦǼ ԭϲֿ + begin + if frmYFCRYCL = nil then + begin + frmYFCRYCL := TfrmYFCRYCL.Create(application.MainForm); + with frmYFCRYCL do + begin + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; //show; - end; - end - else - frmYFCRLZQty.BringToFront; + end; + end + else + frmYFCRYCL.BringToFront; // - mNewHandle:=frmYFCRLZQty.Handle; + mnewHandle := frmYFCRYCL.Handle; - end ; - 13: //ӦǼ Ⱦ ӹѲѯ - begin - if frmYFCRLZView=nil then - begin - frmYFCRLZView:= TfrmYFCRLZView.Create(application.MainForm); - with frmYFCRLZView do - begin - caption:=Trim(Title); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; + end; + 11: //ӦǼ ԭϲֿ + begin + if frmYFCRLZQty = nil then + begin + frmYFCRLZQty := TfrmYFCRLZQty.Create(application.MainForm); + with frmYFCRLZQty do + begin + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; //show; - end; - end - else - frmYFCRLZView.BringToFront; + end; + end + else + frmYFCRLZQty.BringToFront; // - mNewHandle:=frmYFCRLZView.Handle; + mnewHandle := frmYFCRLZQty.Handle; - end ; - 2: //Ǽ - begin - if frmFKCR=nil then - begin - frmFKCR:= TfrmFKCR.Create(application.MainForm); - with frmFKCR do - begin - caption:=Trim(Title); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; + end; + 13: //ӦǼ Ⱦ ӹѲѯ + begin + if frmYFCRLZView = nil then + begin + frmYFCRLZView := TfrmYFCRLZView.Create(application.MainForm); + with frmYFCRLZView do + begin + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; //show; - end; - end - else - frmFKCR.BringToFront; + end; + end + else + frmYFCRLZView.BringToFront; // - mNewHandle:=frmFKCR.Handle; + mnewHandle := frmYFCRLZView.Handle; - end ; - 21: //Ǽ(·չ ̨ͷ) - begin - if frmFKCRLZ=nil then - begin - frmFKCRLZ:= TfrmFKCRLZ.Create(application.MainForm); - with frmFKCRLZ do - begin - caption:=Trim(Title); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; + end; + 2: //Ǽ + begin + if frmFKCR = nil then + begin + frmFKCR := TfrmFKCR.Create(application.MainForm); + with frmFKCR do + begin + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; //show; - end; - end - else - frmFKCRLZ.BringToFront; + end; + end + else + frmFKCR.BringToFront; // - mNewHandle:=frmFKCRLZ.Handle; + mnewHandle := frmFKCR.Handle; - end ; - 3: //Ӧͳ - begin - if frmYFFKList=nil then - begin - frmYFFKList:= TfrmYFFKList.Create(application.MainForm); - with frmYFFKList do - begin - caption:=Trim(Title); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; + end; + 21: //Ǽ(·չ ̨ͷ) + begin + if frmFKCRLZ = nil then + begin + frmFKCRLZ := TfrmFKCRLZ.Create(application.MainForm); + with frmFKCRLZ do + begin + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; //show; - end; - end - else - frmYFFKList.BringToFront; + end; + end + else + frmFKCRLZ.BringToFront; // - mNewHandle:=frmYFFKList.Handle; + mnewHandle := frmFKCRLZ.Handle; - end ; - 31: //Ӧϸ˵ - begin - if frmYFZDList_MX=nil then - begin - frmYFZDList_MX:= TfrmYFZDList_MX.Create(application.MainForm); - with frmYFZDList_MX do - begin - caption:=Trim(Title); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; + end; + 3: //Ӧͳ + begin + if frmYFFKList = nil then + begin + frmYFFKList := TfrmYFFKList.Create(application.MainForm); + with frmYFFKList do + begin + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; //show; - end; - end - else - frmYFZDList_MX.BringToFront; + end; + end + else + frmYFFKList.BringToFront; // - mNewHandle:=frmYFZDList_MX.Handle; + mnewHandle := frmYFFKList.Handle; - end ; - 4: //ӦտǼ - begin - if frmYSCR=nil then - begin - frmYSCR:= TfrmYSCR.Create(application.MainForm); - with frmYSCR do - begin - caption:=Trim(Title); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; + end; + 31: //Ӧϸ˵ + begin + if frmYFZDList_MX = nil then + begin + frmYFZDList_MX := TfrmYFZDList_MX.Create(application.MainForm); + with frmYFZDList_MX do + begin + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; //show; - end; - end - else - frmYSCR.BringToFront; + end; + end + else + frmYFZDList_MX.BringToFront; // - mNewHandle:=frmYSCR.Handle; + mnewHandle := frmYFZDList_MX.Handle; - end ; - 41: //ӦտǼ - begin - if frmYSCRLZ=nil then - begin - frmYSCRLZ:= TfrmYSCRLZ.Create(application.MainForm); - with frmYSCRLZ do - begin - caption:=Trim(Title); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; + end; + 4: //ӦտǼ + begin + if frmYSCR = nil then + begin + frmYSCR := TfrmYSCR.Create(application.MainForm); + with frmYSCR do + begin + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; //show; - end; - end - else - frmYSCRLZ.BringToFront; + end; + end + else + frmYSCR.BringToFront; // - mNewHandle:=frmYSCRLZ.Handle; + mnewHandle := frmYSCR.Handle; - end ; - 42: //ӦտǼ - begin - if frmYSCROL=nil then - begin - frmYSCROL:= TfrmYSCROL.Create(application.MainForm); - with frmYSCROL do - begin - caption:=Trim(Title); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; + end; + 41: //ӦտǼ + begin + if frmYSCRLZ = nil then + begin + frmYSCRLZ := TfrmYSCRLZ.Create(application.MainForm); + with frmYSCRLZ do + begin + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; //show; - end; - end - else - frmYSCROL.BringToFront; + end; + end + else + frmYSCRLZ.BringToFront; // - mNewHandle:=frmYSCROL.Handle; + mnewHandle := frmYSCRLZ.Handle; - end ; - 43: //ӦտǼ(֯) - begin - if frmYSCRJZC=nil then - begin - frmYSCRJZC:= TfrmYSCRJZC.Create(application.MainForm); - with frmYSCRJZC do - begin - caption:=Trim(Title); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; + end; + 42: //ӦտǼ + begin + if frmYSCROL = nil then + begin + frmYSCROL := TfrmYSCROL.Create(application.MainForm); + with frmYSCROL do + begin + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; //show; - end; - end - else - frmYSCRJZC.BringToFront; + end; + end + else + frmYSCROL.BringToFront; // - mNewHandle:=frmYSCRJZC.Handle; + mnewHandle := frmYSCROL.Handle; - end ; - 44: //ӦտǼ(㶫) - begin - if frmYSCR_Gd=nil then - begin - frmYSCR_Gd:= TfrmYSCR_Gd.Create(application.MainForm); - with frmYSCR_Gd do - begin - caption:=Trim(Title); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; + end; + 43: //ӦտǼ(֯) + begin + if frmYSCRJZC = nil then + begin + frmYSCRJZC := TfrmYSCRJZC.Create(application.MainForm); + with frmYSCRJZC do + begin + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; //show; - end; - end - else - frmYSCR_Gd.BringToFront; + end; + end + else + frmYSCRJZC.BringToFront; // - mNewHandle:=frmYSCR_Gd.Handle; + mnewHandle := frmYSCRJZC.Handle; - end ; - 5: //տǼ - begin - if frmSKCR=nil then - begin - frmSKCR:= TfrmSKCR.Create(application.MainForm); - with frmSKCR do - begin - caption:=Trim(Title); + end; + 44: //ӦտǼ(㶫) + begin + if frmYSCR_Gd = nil then + begin + frmYSCR_Gd := TfrmYSCR_Gd.Create(application.MainForm); + with frmYSCR_Gd do + begin + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; + //show; + end; + end + else + frmYSCR_Gd.BringToFront; + // + mnewHandle := frmYSCR_Gd.Handle; + + end; + 5: //տǼ + begin + if frmSKCR = nil then + begin + frmSKCR := TfrmSKCR.Create(application.MainForm); + with frmSKCR do + begin + caption := Trim(Title); // IsHx:=1; - IsHx:=strtointdef(database,0); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; + IsHx := strtointdef(DataBase, 0); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; //show; - end; - end - else - frmSKCR.BringToFront; + end; + end + else + frmSKCR.BringToFront; // - mNewHandle:=frmSKCR.Handle; + mnewHandle := frmSKCR.Handle; - end ; - 51: //տǼ - begin - if frmSKCROLJ=nil then - begin - frmSKCROLJ:= TfrmSKCROLJ.Create(application.MainForm); - with frmSKCROLJ do - begin - caption:=Trim(Title); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; - //show; - end; - end - else - frmSKCROLJ.BringToFront; - // - mNewHandle:=frmSKCROLJ.Handle; - - end ; - 52: //տǼ(·չ) - begin - if frmSKCRLZ=nil then - begin - frmSKCRLZ:= TfrmSKCRLZ.Create(application.MainForm); - with frmSKCRLZ do - begin - caption:=Trim(Title); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; - //show; - end; - end - else - frmSKCRLZ.BringToFront; - // - mNewHandle:=frmSKCRLZ.Handle; - - end ; - 54: //տǼ(㶫) - begin - if frmSKCR_Gd=nil then - begin - frmSKCR_Gd:= TfrmSKCR_Gd.Create(application.MainForm); - with frmSKCR_Gd do - begin - caption:=Trim(Title); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; - //show; - end; - end - else - frmSKCR_Gd.BringToFront; - // - mNewHandle:=frmSKCR_Gd.Handle; - - end ; - 6: //Ӧտտͳ - begin - if frmYSSKList=nil then - begin - frmYSSKList:= TfrmYSSKList.Create(application.MainForm); - with frmYSSKList do - begin - caption:=Trim(Title); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; - //show; - end; - end - else - frmYSSKList.BringToFront; - // - mNewHandle:=frmYSSKList.Handle; - - end ; - 61: //Ӧտտͳ - begin - if frmYSZDList_MX=nil then - begin - frmYSZDList_MX:= TfrmYSZDList_MX.Create(application.MainForm); - with frmYSZDList_MX do - begin - caption:=Trim(Title); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; - //show; - end; - end - else - frmYSZDList_MX.BringToFront; - // - mNewHandle:=frmYSZDList_MX.Handle; - - end ; - 7: //ͳƲѯ - begin - if frmProductOrderCost=nil then - begin - frmProductOrderCost:= TfrmProductOrderCost.Create(application.MainForm); - with frmProductOrderCost do - begin - caption:=Trim(Title); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; - //show; - end; - end - else - frmProductOrderCost.BringToFront; - // - mNewHandle:=frmProductOrderCost.Handle; - - end; - - 8: //ƱǼ - begin - if frmYFFP=nil then - begin - frmYFFP:= TfrmYFFP.Create(application.MainForm); - with frmYFFP do - begin - caption:=Trim(Title); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; - //show; - end; - end - else - frmYFFP.BringToFront; - // - mNewHandle:=frmYFFP.Handle; - - end; - 81: //ƱǼ - begin - if frmYSFP=nil then - begin - frmYSFP:= TfrmYSFP.Create(application.MainForm); - with frmYSFP do - begin - caption:=Trim(Title); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; - //show; - end; - end - else - frmYSFP.BringToFront; - // - mNewHandle:=frmYSFP.Handle; - - end; - 9: - begin - if frmYKHXList=nil then - begin - frmYKHXList:= TfrmYKHXList.Create(application.MainForm); - with frmYKHXList do - begin - caption:=Trim(Title); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; - //show; - end; - end - else - frmYKHXList.BringToFront; - // - mNewHandle:=frmYKHXList.Handle; - - end; - 10: //Ӧ˿ϸ - begin - if frmYSHZMX=nil then - begin - frmYSHZMX:= TfrmYSHZMX.Create(application.MainForm); - with frmYSHZMX do - begin - caption:=Trim(Title); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; - //show; - end; - end - else - frmYSHZMX.BringToFront; - // - mNewHandle:=frmYSHZMX.Handle; - - end; - - 102: //Ӧ˿ϸ() - begin - if frmYSHZMXDL=nil then - begin - frmYSHZMXDL:= TfrmYSHZMXDL.Create(application.MainForm); - with frmYSHZMXDL do - begin - caption:=Trim(Title); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; - //show; - end; - end - else - frmYSHZMXDL.BringToFront; - // - mNewHandle:=frmYSHZMXDL.Handle; - - end; - 103: //Ӧ˿ϸѯ - begin - if frmYSHZMXView=nil then - begin - frmYSHZMXView:= TfrmYSHZMXView.Create(application.MainForm); - with frmYSHZMXView do - begin - caption:=Trim(Title); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; - //show; - end; - end - else - frmYSHZMXView.BringToFront; - // - mNewHandle:=frmYSHZMXView.Handle; - - end; - 101: //Ӧ˿ϸOLJ - begin - if frmYSHZMXOLJ=nil then - begin - frmYSHZMXOLJ:= TfrmYSHZMXOLJ.Create(application.MainForm); - with frmYSHZMXOLJ do - begin - caption:=Trim(Title); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; - //show; - end; - end - else - frmYSHZMXOLJ.BringToFront; - // - mNewHandle:=frmYSHZMXOLJ.Handle; - - end; - 20: //Ӧ˿ϸOLJ + end; + 51: //տǼ begin - if frmYFMXlist=nil then - begin - frmYFMXlist:= TfrmYFMXlist.Create(application.MainForm); - with frmYFMXlist do - begin - caption:=Trim(Title); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; - //show; - end; - end - else - frmYFMXlist.BringToFront; + if frmSKCROLJ = nil then + begin + frmSKCROLJ := TfrmSKCROLJ.Create(application.MainForm); + with frmSKCROLJ do + begin + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; + //show; + end; + end + else + frmSKCROLJ.BringToFront; // - mNewHandle:=frmYFMXlist.Handle; + mnewHandle := frmSKCROLJ.Handle; - end; - 201: //Ӧ˿ϸOLJ + end; + 52: //տǼ(·չ) begin - if frmYSMXlist=nil then - begin - frmYSMXlist:= TfrmYSMXlist.Create(application.MainForm); - with frmYSMXlist do - begin - caption:=Trim(Title); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; + if frmSKCRLZ = nil then + begin + frmSKCRLZ := TfrmSKCRLZ.Create(application.MainForm); + with frmSKCRLZ do + begin + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; //show; - end; - end - else - frmYSMXlist.BringToFront; + end; + end + else + frmSKCRLZ.BringToFront; // - mNewHandle:=frmYSMXlist.Handle; + mnewHandle := frmSKCRLZ.Handle; - end; - 202: //Ʊ - begin - if frmFDINVOICE=nil then - begin - frmFDINVOICE:= TfrmFDINVOICE.Create(application.MainForm); - with frmFDINVOICE do - begin - fInvoiceFlag:='1'; - fInvoiceFlag:=trim(Parameters1); - caption:=Trim(Title); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; + end; + 54: //տǼ(㶫) + begin + if frmSKCR_Gd = nil then + begin + frmSKCR_Gd := TfrmSKCR_Gd.Create(application.MainForm); + with frmSKCR_Gd do + begin + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; //show; - end; - end - else - frmFDINVOICE.BringToFront; + end; + end + else + frmSKCR_Gd.BringToFront; // - mNewHandle:=frmFDINVOICE.Handle; - end; + mnewHandle := frmSKCR_Gd.Handle; - 203: //ƱͳƲѯ - begin - if frmFPInvoice_TJ=nil then - begin - frmFPInvoice_TJ:= TfrmFPInvoice_TJ.Create(application.MainForm); - with frmFPInvoice_TJ do - begin - fInvoiceFlag:='1'; - fInvoiceFlag:=trim(Parameters1); - caption:=Trim(Title); - FormStyle := mstyle ; - windowState := mstate ; - BorderStyle := mborderstyle; + end; + 6: //Ӧտտͳ + begin + if frmYSSKList = nil then + begin + frmYSSKList := TfrmYSSKList.Create(application.MainForm); + with frmYSSKList do + begin + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; //show; - end; - end - else - frmFPInvoice_TJ.BringToFront; + end; + end + else + frmYSSKList.BringToFront; // - mNewHandle:=frmFPInvoice_TJ.Handle; - end; - end ; // end case + mnewHandle := frmYSSKList.Handle; - Result:= mnewHandle; + end; + 61: //Ӧտտͳ + begin + if frmYSZDList_MX = nil then + begin + frmYSZDList_MX := TfrmYSZDList_MX.Create(application.MainForm); + with frmYSZDList_MX do + begin + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; + //show; + end; + end + else + frmYSZDList_MX.BringToFront; + // + mnewHandle := frmYSZDList_MX.Handle; + + end; + 7: //ͳƲѯ + begin + if frmProductOrderCost = nil then + begin + frmProductOrderCost := TfrmProductOrderCost.Create(application.MainForm); + with frmProductOrderCost do + begin + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; + //show; + end; + end + else + frmProductOrderCost.BringToFront; + // + mnewHandle := frmProductOrderCost.Handle; + + end; + + 8: //ƱǼ + begin + if frmYFFP = nil then + begin + frmYFFP := TfrmYFFP.Create(application.MainForm); + with frmYFFP do + begin + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; + //show; + end; + end + else + frmYFFP.BringToFront; + // + mnewHandle := frmYFFP.Handle; + + end; + 81: //ƱǼ + begin + if frmYSFP = nil then + begin + frmYSFP := TfrmYSFP.Create(application.MainForm); + with frmYSFP do + begin + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; + //show; + end; + end + else + frmYSFP.BringToFront; + // + mnewHandle := frmYSFP.Handle; + + end; + 9: + begin + if frmYKHXList = nil then + begin + frmYKHXList := TfrmYKHXList.Create(application.MainForm); + with frmYKHXList do + begin + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; + //show; + end; + end + else + frmYKHXList.BringToFront; + // + mnewHandle := frmYKHXList.Handle; + + end; + 10: //Ӧ˿ϸ + begin + if frmYSHZMX = nil then + begin + frmYSHZMX := TfrmYSHZMX.Create(application.MainForm); + with frmYSHZMX do + begin + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; + //show; + end; + end + else + frmYSHZMX.BringToFront; + // + mnewHandle := frmYSHZMX.Handle; + + end; + + 102: //Ӧ˿ϸ() + begin + if frmYSHZMXDL = nil then + begin + frmYSHZMXDL := TfrmYSHZMXDL.Create(application.MainForm); + with frmYSHZMXDL do + begin + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; + //show; + end; + end + else + frmYSHZMXDL.BringToFront; + // + mnewHandle := frmYSHZMXDL.Handle; + + end; + 103: //Ӧ˿ϸѯ + begin + if frmYSHZMXView = nil then + begin + frmYSHZMXView := TfrmYSHZMXView.Create(application.MainForm); + with frmYSHZMXView do + begin + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; + //show; + end; + end + else + frmYSHZMXView.BringToFront; + // + mnewHandle := frmYSHZMXView.Handle; + + end; + 101: //Ӧ˿ϸOLJ + begin + if frmYSHZMXOLJ = nil then + begin + frmYSHZMXOLJ := TfrmYSHZMXOLJ.Create(application.MainForm); + with frmYSHZMXOLJ do + begin + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; + //show; + end; + end + else + frmYSHZMXOLJ.BringToFront; + // + mnewHandle := frmYSHZMXOLJ.Handle; + + end; + 20: //Ӧ˿ϸOLJ + begin + if frmYFMXlist = nil then + begin + frmYFMXlist := TfrmYFMXlist.Create(application.MainForm); + with frmYFMXlist do + begin + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; + //show; + end; + end + else + frmYFMXlist.BringToFront; + // + mnewHandle := frmYFMXlist.Handle; + + end; + 201: //Ӧ˿ϸOLJ + begin + if frmYSMXlist = nil then + begin + frmYSMXlist := TfrmYSMXlist.Create(application.MainForm); + with frmYSMXlist do + begin + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; + //show; + end; + end + else + frmYSMXlist.BringToFront; + // + mnewHandle := frmYSMXlist.Handle; + + end; + 202: //Ʊ + begin + if frmFDINVOICE = nil then + begin + frmFDINVOICE := TfrmFDINVOICE.Create(application.MainForm); + with frmFDINVOICE do + begin + fInvoiceFlag := '1'; + fInvoiceFlag := trim(Parameters1); + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; + //show; + end; + end + else + frmFDINVOICE.BringToFront; + // + mnewHandle := frmFDINVOICE.Handle; + end; + + 203: //ƱͳƲѯ + begin + if frmFPInvoice_TJ = nil then + begin + frmFPInvoice_TJ := TfrmFPInvoice_TJ.Create(application.MainForm); + with frmFPInvoice_TJ do + begin + fInvoiceFlag := '1'; + fInvoiceFlag := trim(Parameters1); + caption := Trim(Title); + FormStyle := mstyle; + windowState := mstate; + BorderStyle := mborderstyle; + //show; + end; + end + else + frmFPInvoice_TJ.BringToFront; + // + mnewHandle := frmFPInvoice_TJ.Handle; + end; + end; // end case + + Result := mnewHandle; // NewDllApp:=Application ; end; //=========================================================== //ݿӳ //=========================================================== -function ConnData():Boolean; + +function ConnData(): Boolean; begin - if not Assigned(DataLink_YSYF) then - DataLink_YSYF:=TDataLink_YSYF.Create(Application); - Try + if not Assigned(DataLink_YSYF) then + DataLink_YSYF := TDataLink_YSYF.Create(Application); + try with DataLink_YSYF.ADOLink do begin //if not Connected then begin - Connected:=false; - ConnectionString:=DConString; - LoginPrompt:=false; - Connected:=true; + Connected := false; + ConnectionString := DConString; + LoginPrompt := false; + Connected := true; end; end; - Result:=true; - Except - Result:=false; - application.MessageBox('ݿʧܣ','',mb_Ok+ MB_ICONERROR); + Result := true; + except + Result := false; + application.MessageBox('ݿʧܣ', '', mb_Ok + MB_ICONERROR); end; end; + initialization CoInitialize(nil); dxUnitsLoader.Initialize; -finalization - DataLink_YSYF.Free; - application:=NewDllApp; - dxUnitsLoader.Finalize; +finalization + DataLink_YSYF.Free; + application := NewDllApp; + dxUnitsLoader.Finalize; + end. diff --git a/应收应付/U_YFCR.pas b/应收应付/U_YFCR.pas index ae53c9d..c30c5f9 100644 --- a/应收应付/U_YFCR.pas +++ b/应收应付/U_YFCR.pas @@ -13,7 +13,21 @@ uses RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit, cxTextEdit, cxPC, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, - dxBarBuiltInMenu, cxContainer, cxImage, cxDBEdit; + dxBarBuiltInMenu, cxContainer, cxImage, cxDBEdit, dxSkinsCore, + dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee, + dxSkinDarkRoom, dxSkinDarkSide, dxSkinDevExpressDarkStyle, + dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans, + dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky, + dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis, + dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black, + dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink, + dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue, + dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, + dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin, + dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus, + dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008, + dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, dxSkinValentine, + dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue, dxSkinscxPCPainter; type TfrmYFCR = class(TForm) @@ -1355,8 +1369,8 @@ end; procedure TfrmYFCR.ToolButton6Click(Sender: TObject); begin - frmCKJYList := TfrmCKJYList.create(self); - with frmCKJYList do + frmYSYGGJList := TfrmYSYGGJList.create(self); + with frmYSYGGJList do begin show; end; diff --git a/应收应付/U_YSYGGJList.dfm b/应收应付/U_YSYGGJList.dfm index e87aef9..b0d4eff 100644 --- a/应收应付/U_YSYGGJList.dfm +++ b/应收应付/U_YSYGGJList.dfm @@ -1,4 +1,4 @@ -object frmCKJYList: TfrmCKJYList +object frmYSYGGJList: TfrmYSYGGJList Left = 403 Top = 314 Width = 1333 diff --git a/应收应付/U_YSYGGJList.pas b/应收应付/U_YSYGGJList.pas index 190dc8a..5e048f6 100644 --- a/应收应付/U_YSYGGJList.pas +++ b/应收应付/U_YSYGGJList.pas @@ -27,7 +27,7 @@ uses dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue, dxSkinscxPCPainter; type - TfrmCKJYList = class(TForm) + TfrmYSYGGJList = class(TForm) ToolBar1: TToolBar; TBRafresh: TToolButton; TBFind: TToolButton; @@ -113,7 +113,7 @@ type end; var - frmCKJYList: TfrmCKJYList; + frmYSYGGJList: TfrmYSYGGJList; implementation @@ -122,24 +122,24 @@ uses {$R *.dfm} -procedure TfrmCKJYList.FormDestroy(Sender: TObject); +procedure TfrmYSYGGJList.FormDestroy(Sender: TObject); begin - frmCKJYList := nil; + frmYSYGGJList := nil; end; -procedure TfrmCKJYList.FormClose(Sender: TObject; var Action: TCloseAction); +procedure TfrmYSYGGJList.FormClose(Sender: TObject; var Action: TCloseAction); begin Action := caFree; end; -procedure TfrmCKJYList.FormCreate(Sender: TObject); +procedure TfrmYSYGGJList.FormCreate(Sender: TObject); begin //cxGrid1.Align:=alClient; BegDate.DateTime := SGetServerDateTime(ADOQueryTemp)-30; EndDate.DateTime := SGetServerDateTime(ADOQueryTemp) end; -procedure TfrmCKJYList.InitGrid(); +procedure TfrmYSYGGJList.InitGrid(); begin try ADOQueryMain.DisableControls; @@ -167,7 +167,7 @@ begin end; end; -procedure TfrmCKJYList.TBRafreshClick(Sender: TObject); +procedure TfrmYSYGGJList.TBRafreshClick(Sender: TObject); begin //BegDate.SetFocus; MovePanel2.Visible := True; @@ -176,7 +176,7 @@ begin MovePanel2.Visible := False; end; -procedure TfrmCKJYList.ConNoMChange(Sender: TObject); +procedure TfrmYSYGGJList.ConNoMChange(Sender: TObject); begin if ADOQueryMain.Active then begin @@ -184,13 +184,13 @@ begin end; end; -procedure TfrmCKJYList.TBCloseClick(Sender: TObject); +procedure TfrmYSYGGJList.TBCloseClick(Sender: TObject); begin WriteCxGrid(self.Caption + tv1.Name, Tv1, 'Ʒֿ1'); Close; end; -procedure TfrmCKJYList.FormShow(Sender: TObject); +procedure TfrmYSYGGJList.FormShow(Sender: TObject); begin ReadCxGrid(self.Caption + tv1.Name, Tv1, 'Ʒֿ1'); @@ -205,14 +205,14 @@ begin //InitGrid(); end; -procedure TfrmCKJYList.TBExportClick(Sender: TObject); +procedure TfrmYSYGGJList.TBExportClick(Sender: TObject); begin if ADOQueryMain.IsEmpty then exit; TcxGridToExcel('б', cxGrid2); end; -procedure TfrmCKJYList.TBFindClick(Sender: TObject); +procedure TfrmYSYGGJList.TBFindClick(Sender: TObject); begin if ADOQueryMain.Active then begin @@ -222,12 +222,12 @@ begin end; end; -procedure TfrmCKJYList.MPRTCodeNameChange(Sender: TObject); +procedure TfrmYSYGGJList.MPRTCodeNameChange(Sender: TObject); begin TBFind.Click; end; -procedure TfrmCKJYList.v1Column5PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer); +procedure TfrmYSYGGJList.v1Column5PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer); begin try frmZDYHelp := TfrmZDYHelp.Create(Application); @@ -257,18 +257,18 @@ begin end; end; -procedure TfrmCKJYList.PRTColorChange(Sender: TObject); +procedure TfrmYSYGGJList.PRTColorChange(Sender: TObject); begin TBFind.Click; end; -procedure TfrmCKJYList.Tv1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); +procedure TfrmYSYGGJList.Tv1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin FLeft := X; FTop := Y; end; -procedure TfrmCKJYList.Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean); +procedure TfrmYSYGGJList.Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean); begin Panel4.Left := FLeft; Panel4.Top := FTop + 110; @@ -278,12 +278,12 @@ begin application.ProcessMessages; end; -procedure TfrmCKJYList.Image2Click(Sender: TObject); +procedure TfrmYSYGGJList.Image2Click(Sender: TObject); begin Panel4.Visible := False; end; -procedure TfrmCKJYList.cxTabControl1Change(Sender: TObject); +procedure TfrmYSYGGJList.cxTabControl1Change(Sender: TObject); begin TBRafresh.Click; end; diff --git a/艾登贸易管理/TradeManage.dof b/艾登贸易管理/TradeManage.dof index 9181ffa..16f07ce 100644 --- a/艾登贸易管理/TradeManage.dof +++ b/艾登贸易管理/TradeManage.dof @@ -101,7 +101,7 @@ DebugSourceDirs= UsePackages=0 [Parameters] RunParams= -HostApplication=D:\Ŀ\Ŀ\\ó׹\testDll.exe +HostApplication=D:\Dp7Repo\Ŀ\D7FZaideng\ó׹\testDll.exe Launcher= UseLauncher=0 DebugCWD= diff --git a/艾登贸易管理/U_BpkclistZSD.dfm b/艾登贸易管理/U_BpkclistZSD.dfm new file mode 100644 index 0000000..44ecd85 --- /dev/null +++ b/艾登贸易管理/U_BpkclistZSD.dfm @@ -0,0 +1,521 @@ +object frmBpkclistZSD: TfrmBpkclistZSD + Left = 378 + Top = 334 + Width = 1416 + Height = 588 + Caption = #24211#23384#20449#24687#34920 + Color = clBtnFace + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [] + OldCreateOrder = False + WindowState = wsMaximized + OnClose = FormClose + OnCreate = FormCreate + OnDestroy = FormDestroy + OnShow = FormShow + PixelsPerInch = 96 + TextHeight = 12 + object ToolBar1: TToolBar + Left = 0 + Top = 0 + Width = 1400 + AutoSize = True + ButtonHeight = 30 + ButtonWidth = 59 + Caption = 'ToolBar1' + Color = clSkyBlue + Flat = True + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [] + Images = DataLink_TradeManage.ThreeImgList + List = True + ParentColor = False + ParentFont = False + ShowCaptions = True + TabOrder = 0 + object TBRafresh: TToolButton + Left = 0 + Top = 0 + AutoSize = True + Caption = #26597#35810 + ImageIndex = 2 + OnClick = TBRafreshClick + end + object TOk: TToolButton + Left = 63 + Top = 0 + AutoSize = True + Caption = #30830#23450 + ImageIndex = 41 + Visible = False + OnClick = TOkClick + end + object TBExport: TToolButton + Left = 126 + Top = 0 + AutoSize = True + Caption = #23548#20986 + ImageIndex = 75 + OnClick = TBExportClick + end + object TBPrint: TToolButton + Left = 189 + Top = 0 + AutoSize = True + Caption = #25171#21360 + ImageIndex = 12 + Visible = False + OnClick = TBPrintClick + end + object TBClose: TToolButton + Left = 252 + Top = 0 + AutoSize = True + Caption = #20851#38381 + ImageIndex = 55 + OnClick = TBCloseClick + end + end + object Panel1: TPanel + Left = 0 + Top = 32 + Width = 1400 + Height = 65 + Align = alTop + BevelInner = bvRaised + BevelOuter = bvLowered + Color = clSkyBlue + TabOrder = 1 + object Label1: TLabel + Left = 23 + Top = 15 + Width = 52 + Height = 12 + Caption = #20837#24211#26085#26399 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object Label2: TLabel + Left = 64 + Top = 40 + Width = 13 + Height = 12 + Caption = #33267 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object Label3: TLabel + Left = 228 + Top = 40 + Width = 52 + Height = 12 + Caption = #20135#21697#21517#31216 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object Label4: TLabel + Left = 440 + Top = 40 + Width = 39 + Height = 12 + Caption = #21152#24037#21378 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object Label5: TLabel + Left = 228 + Top = 16 + Width = 52 + Height = 12 + Caption = #20837#24211#31867#22411 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object Label6: TLabel + Left = 288 + Top = 72 + Width = 24 + Height = 12 + Caption = #20179#24211 + end + object Label7: TLabel + Left = 440 + Top = 16 + Width = 39 + Height = 12 + Caption = #20379#24212#21830 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object Label8: TLabel + Left = 616 + Top = 16 + Width = 26 + Height = 12 + Caption = #32568#21495 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object BegDate: TDateTimePicker + Left = 76 + Top = 11 + Width = 100 + Height = 20 + Date = 40675.464742650460000000 + Format = 'yyyy-MM-dd' + Time = 40675.464742650460000000 + ShowCheckbox = True + TabOrder = 0 + end + object EndDate: TDateTimePicker + Left = 76 + Top = 35 + Width = 100 + Height = 20 + Date = 40675.464761099540000000 + Format = 'yyyy-MM-dd' + Time = 40675.464761099540000000 + ShowCheckbox = True + TabOrder = 1 + end + object P_CodeName: TEdit + Tag = 2 + Left = 284 + Top = 36 + Width = 100 + Height = 20 + TabOrder = 2 + OnChange = P_CodeNameChange + end + object factoryName: TEdit + Tag = 2 + Left = 484 + Top = 36 + Width = 100 + Height = 20 + TabOrder = 3 + OnChange = P_CodeNameChange + end + object CRType: TComboBox + Tag = 2 + Left = 284 + Top = 12 + Width = 100 + Height = 20 + Style = csDropDownList + ItemHeight = 12 + ItemIndex = 0 + TabOrder = 4 + OnChange = P_CodeNameChange + Items.Strings = ( + '' + #29983#20135#20837#24211) + end + object CheckBox1: TCheckBox + Left = 772 + Top = 12 + Width = 97 + Height = 17 + Caption = #21547#24211#23384#20026#38646 + Font.Charset = GB2312_CHARSET + Font.Color = clRed + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + TabOrder = 5 + end + object ckName: TComboBox + Left = 320 + Top = 68 + Width = 100 + Height = 20 + Style = csDropDownList + ItemHeight = 12 + ItemIndex = 0 + TabOrder = 6 + Text = #26679#21697#20179#24211 + Items.Strings = ( + #26679#21697#20179#24211) + end + object cust: TEdit + Tag = 2 + Left = 484 + Top = 12 + Width = 100 + Height = 20 + TabOrder = 7 + OnChange = P_CodeNameChange + end + object gangNO: TEdit + Tag = 2 + Left = 648 + Top = 12 + Width = 100 + Height = 20 + TabOrder = 8 + OnChange = P_CodeNameChange + end + end + object cxGrid1: TcxGrid + Left = 0 + Top = 97 + Width = 1400 + Height = 316 + Align = alTop + TabOrder = 2 + object Tv1: TcxGridDBTableView + Navigator.Buttons.CustomButtons = <> + DataController.DataSource = DataSource1 + DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost] + DataController.Summary.DefaultGroupSummaryItems = < + item + Format = 'C_Code' + Column = v1P_CodeName + end> + DataController.Summary.FooterSummaryItems = < + item + Kind = skSum + Column = v1RollNum + end + item + Kind = skSum + Column = v1Qty + end> + DataController.Summary.SummaryGroups = <> + OptionsBehavior.FocusCellOnTab = True + OptionsBehavior.GoToNextCellOnEnter = True + OptionsBehavior.FocusCellOnCycle = True + OptionsCustomize.ColumnFiltering = False + OptionsView.Footer = True + OptionsView.GroupByBox = False + OptionsView.Indicator = True + Styles.Header = DataLink_TradeManage.Default + object v1Ssel: TcxGridDBColumn + Caption = #36873#25321 + DataBinding.FieldName = 'Ssel' + PropertiesClassName = 'TcxCheckBoxProperties' + Properties.ImmediatePost = True + Properties.NullStyle = nssUnchecked + Visible = False + HeaderAlignmentHorz = taCenter + end + object v1Column2: TcxGridDBColumn + Caption = #20379#24212#21830 + DataBinding.FieldName = 'cust' + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object v1Column3: TcxGridDBColumn + Caption = #21152#24037#21378 + DataBinding.FieldName = 'factoryName' + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 80 + end + object v1CRTime: TcxGridDBColumn + Caption = #20837#24211#26085#26399 + DataBinding.FieldName = 'CRTime' + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 71 + end + object v1CRType: TcxGridDBColumn + Caption = #20837#24211#31867#22411 + DataBinding.FieldName = 'CRType' + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 79 + end + object v1MJID: TcxGridDBColumn + Caption = #21367#26465#30721 + DataBinding.FieldName = 'MJID' + Visible = False + HeaderAlignmentHorz = taCenter + Options.Editing = False + VisibleForCustomization = False + Width = 60 + end + object v1MJXH: TcxGridDBColumn + Caption = #21367#21495 + DataBinding.FieldName = 'MJXH' + Visible = False + HeaderAlignmentHorz = taCenter + Options.Editing = False + VisibleForCustomization = False + Width = 60 + end + object v1P_CodeName: TcxGridDBColumn + Caption = #20135#21697#21517#31216 + DataBinding.FieldName = 'P_CodeName' + PropertiesClassName = 'TcxButtonEditProperties' + Properties.Buttons = < + item + Default = True + Kind = bkEllipsis + end> + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 90 + end + object v1P_SPEC: TcxGridDBColumn + Caption = #35268#26684#22411#21495 + DataBinding.FieldName = 'P_SPEC' + HeaderAlignmentHorz = taCenter + Options.Editing = False + Options.Sorting = False + Width = 90 + end + object v1Column1: TcxGridDBColumn + Caption = #39068#33394 + DataBinding.FieldName = 'P_Color' + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 60 + end + object v1Column4: TcxGridDBColumn + Caption = #32568#21495 + DataBinding.FieldName = 'gangNo' + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 60 + end + object v1P_MF: TcxGridDBColumn + Caption = #38376#24133'(cm)' + DataBinding.FieldName = 'P_MF' + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 90 + end + object v1P_KZ: TcxGridDBColumn + Caption = #20811#37325'(g/'#13217')' + DataBinding.FieldName = 'P_KZ' + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 90 + end + object v1CPType: TcxGridDBColumn + Caption = #31561#32423 + DataBinding.FieldName = 'CPType' + Visible = False + HeaderAlignmentHorz = taCenter + Options.Editing = False + VisibleForCustomization = False + Width = 60 + end + object v1RollNum: TcxGridDBColumn + Caption = #21305#25968 + DataBinding.FieldName = 'RollNum' + HeaderAlignmentHorz = taCenter + Options.Editing = False + Styles.Content = DataLink_TradeManage.FontBlue + Styles.Footer = DataLink_TradeManage.FontBlue + Styles.Header = DataLink_TradeManage.FontBlue + Width = 59 + end + object v1Qty: TcxGridDBColumn + Caption = #25968#37327 + DataBinding.FieldName = 'Qty' + HeaderAlignmentHorz = taCenter + Options.Editing = False + Styles.Content = DataLink_TradeManage.FontBlue + Styles.Footer = DataLink_TradeManage.FontBlue + Styles.Header = DataLink_TradeManage.FontBlue + Width = 59 + end + object v1QtyUnit: TcxGridDBColumn + Caption = #25968#37327#21333#20301 + DataBinding.FieldName = 'QtyUnit' + PropertiesClassName = 'TcxComboBoxProperties' + Properties.DropDownListStyle = lsFixedList + Properties.Items.Strings = ( + 'M' + 'Kg') + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 90 + end + object v1Note: TcxGridDBColumn + Caption = #22791#27880 + DataBinding.FieldName = 'Note' + Visible = False + HeaderAlignmentHorz = taCenter + Options.Editing = False + Width = 90 + end + object Tv1Column1: TcxGridDBColumn + Caption = #39044#25187#38500#25968#37327 + DataBinding.FieldName = 'PreBPqty' + HeaderAlignmentHorz = taCenter + Width = 100 + end + end + object cxGrid1Level1: TcxGridLevel + GridView = Tv1 + end + end + object ADOQueryCmd: TADOQuery + Connection = DataLink_TradeManage.ADOLink + Parameters = <> + Left = 680 + Top = 8 + end + object ADOQueryTmp: TADOQuery + Connection = DataLink_TradeManage.ADOLink + Parameters = <> + Left = 536 + Top = 4 + end + object DataSource1: TDataSource + DataSet = CDS_Main + Left = 576 + Top = 1 + end + object CDS_Main: TClientDataSet + Aggregates = <> + Params = <> + Left = 612 + Top = 5 + end + object cxGridPopupMenu1: TcxGridPopupMenu + Grid = cxGrid1 + PopupMenus = <> + Left = 504 + Top = 12 + end +end diff --git a/艾登贸易管理/U_BpkclistZSD.pas b/艾登贸易管理/U_BpkclistZSD.pas new file mode 100644 index 0000000..8cdf152 --- /dev/null +++ b/艾登贸易管理/U_BpkclistZSD.pas @@ -0,0 +1,264 @@ +unit U_BpkclistZSD; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, ComCtrls, ToolWin, StdCtrls, ExtCtrls, cxStyles, cxCustomData, + cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, + cxButtonEdit, cxDropDownEdit, cxGridLevel, cxGridCustomTableView, + cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView, + cxGrid, DBClient, ADODB, cxGridCustomPopupMenu, cxGridPopupMenu, cxCheckBox, + cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxSkinsCore, dxSkinBlack, + dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom, + dxSkinDarkSide, dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy, + dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian, + dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis, + dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black, + dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink, + dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue, + dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, dxSkinOffice2013LightGray, + dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic, + dxSkinSharp, dxSkinSharpPlus, dxSkinSilver, dxSkinSpringTime, dxSkinStardust, + dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, + dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue, + dxSkinscxPCPainter; + +type + TfrmBpkclistZSD = class(TForm) + ToolBar1: TToolBar; + TBRafresh: TToolButton; + TBExport: TToolButton; + TBPrint: TToolButton; + TBClose: TToolButton; + Panel1: TPanel; + Label1: TLabel; + BegDate: TDateTimePicker; + EndDate: TDateTimePicker; + cxGrid1: TcxGrid; + Tv1: TcxGridDBTableView; + v1P_CodeName: TcxGridDBColumn; + v1P_SPEC: TcxGridDBColumn; + v1P_MF: TcxGridDBColumn; + v1P_KZ: TcxGridDBColumn; + v1RollNum: TcxGridDBColumn; + v1Qty: TcxGridDBColumn; + v1QtyUnit: TcxGridDBColumn; + v1Note: TcxGridDBColumn; + cxGrid1Level1: TcxGridLevel; + v1CRType: TcxGridDBColumn; + v1CRTime: TcxGridDBColumn; + Label2: TLabel; + Label3: TLabel; + Label4: TLabel; + P_CodeName: TEdit; + factoryName: TEdit; + CRType: TComboBox; + Label5: TLabel; + ADOQueryCmd: TADOQuery; + ADOQueryTmp: TADOQuery; + DataSource1: TDataSource; + CDS_Main: TClientDataSet; + cxGridPopupMenu1: TcxGridPopupMenu; + TOk: TToolButton; + v1Ssel: TcxGridDBColumn; + CheckBox1: TCheckBox; + v1MJID: TcxGridDBColumn; + v1MJXH: TcxGridDBColumn; + v1CPType: TcxGridDBColumn; + ckName: TComboBox; + Label6: TLabel; + v1Column1: TcxGridDBColumn; + v1Column2: TcxGridDBColumn; + v1Column3: TcxGridDBColumn; + cust: TEdit; + Label7: TLabel; + gangNO: TEdit; + Label8: TLabel; + v1Column4: TcxGridDBColumn; + Tv1Column1: TcxGridDBColumn; + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormDestroy(Sender: TObject); + procedure P_CodeNameChange(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure TBCloseClick(Sender: TObject); + procedure TBRafreshClick(Sender: TObject); + procedure TBPrintClick(Sender: TObject); + procedure TBExportClick(Sender: TObject); + procedure TOkClick(Sender: TObject); + private + procedure InitGrid(); + procedure SetComboBox(); + { Private declarations } + public + fType: integer; + fCKName, FMainid: string; + + { Public declarations } + end; + +var + frmBpkclistZSD: TfrmBpkclistZSD; + +implementation + +uses + U_DataLink, U_Fun10, U_ZDYHelp; //, U_BpRk +{$R *.dfm} + +procedure TfrmBpkclistZSD.SetComboBox(); +begin + ckName.Items.Clear; + with adoQueryTmp do + begin + close; + sql.Clear; + sql.Add('select * from KH_ZDY where Type=''BPCK'' '); + if trim(fCKName) <> '' then + sql.Add('and zdyName=' + quotedstr(trim(fCKName))); + open; + while not eof do + begin + ckName.Items.Add(trim(fieldbyname('zdyName').AsString)); + next; + end; + end; + if ckName.Items.Count > 0 then + ckName.ItemIndex := 0; + + CRType.Items.Clear; + CRType.Items.Add(''); + with adoQueryTmp do + begin + close; + sql.Clear; + sql.Add('select * from KH_ZDY where Type=''BPRKTYPE'''); + if trim(fCKName) <> '' then + sql.Add('and note=' + quotedstr(trim(fCKName))); + open; + while not eof do + begin + CRType.Items.Add(trim(fieldbyname('zdyName').AsString)); + next; + end; + end; + if CRType.Items.Count > 0 then + CRType.ItemIndex := 0; +end; + +procedure TfrmBpkclistZSD.InitGrid(); +begin + try + with adoqueryTmp do + begin + close; + sql.Clear; +// sql.Add('select A.*,B.cust,B.factoryName from BP_KC A'); +// sql.Add('inner join BP_inout B on B.KCID=A.KCID and B.CRFlag='''' '); +// sql.Add('where 1=1'); sum(([dbo].[Get_ShuZi](defstr3)) sum((cast(ISNULL(defstr2,0) as float)) +// SQL.Add('SELECT count(A.mxid) as RollNum,sum(A.kcqty2) as qty,B.cust,B.factoryName,B.CRTime,B.CRType,B.P_CodeName,B.P_SPEC,B.P_Color,B.gangNo,B.P_KZ,B.P_MF,B.QtyUnit,B.ckName '); +// SQL.Add(',PreBPqty=(select sum(([dbo].[Get_ShuZi](defstr2))*(isnull(prtorderqty,0))) from JYOrder_Sub X inner join KH_Zdy_CPCB M on M.ZdyCode=X.PRTCode left join JYOrder_Main N on N.mainid=X.mainid '); +// SQL.Add(' where M.defstr1=B.P_CodeName and M.CBColor=X.prtcolor and left(SOrddefstr5,1)=''A'' and N.Status=''0'')'); // M.CBColor in (B.P_Color) +// SQL.Add('+(select sum(([dbo].[Get_ShuZi](defstr3))*(isnull(prtorderqty,0)))from JYOrder_Sub X inner join KH_Zdy_CPCB M on M.ZdyCode=X.PRTCode left join JYOrder_Main N on N.mainid=X.mainid '); +// SQL.Add(' where M.defstr1=B.P_CodeName and M.CBColor=X.prtcolor and left(SOrddefstr5,1)=''C'' and N.Status=''0'' )'); //and M.CBColor=B.P_Color +// sql.Add('FROM CK_SXPB_CRMX A inner join BP_InOut B on A.crnos=B.crnos '); +// sql.Add(' where A.crzt='''' '); +// SQL.Add('and exists(select crnoS from BP_KC d where D.crnos=A.crnos)'); +// if begdate.Checked then +// sql.Add('and B.CRTime>=''' + formatdateTime('yyyy-MM-dd', begdate.Date) + ''' '); +// if enddate.Checked then +// sql.Add('and B.CRTime<''' + formatdateTime('yyyy-MM-dd', enddate.Date + 1) + ''' '); +//// if not CheckBox1.Checked then +//// sql.Add('and (A.RollNum<>0 or A.qty<>0 ) '); +// if trim(FckName) <> '' then +// sql.Add('and B.ckName=' + quotedstr(trim(FckName))); +// sql.Add(' GROUP BY A.crnoS,B.cust,B.factoryName,B.CRTime,B.CRType,B.P_CodeName,B.P_SPEC,B.P_Color,B.gangNo,B.P_KZ,B.P_MF,B.QtyUnit,B.ckName '); + sql.Add('exec P_Get_BPKC_ZSD '); + sql.Add('@mainid=''' + Trim(FMainid) + ''' '); +// ShowMessage(SQL.text); + open; + end; + SCreateCDS20(adoqueryTmp, CDS_Main); + SInitCDSData20(adoqueryTmp, CDS_Main); + finally + end; +end; + +procedure TfrmBpkclistZSD.FormClose(Sender: TObject; var Action: TCloseAction); +begin + writeCxGrid(self.Caption, Tv1, 'ƥֿ'); + if fType = 10 then + Action := cahide + else + Action := cafree; +end; + +procedure TfrmBpkclistZSD.FormDestroy(Sender: TObject); +begin + frmBpkclistZSD := nil; +end; + +procedure TfrmBpkclistZSD.P_CodeNameChange(Sender: TObject); +begin + if ADOQueryTmp.Active = False then + Exit; + SDofilter(ADOQueryTmp, SGetFilters(Panel1, 1, 2)); + SCreateCDS20(ADOQueryTmp, CDS_Main); + SInitCDSData20(ADOQueryTmp, CDS_Main); +end; + +procedure TfrmBpkclistZSD.FormShow(Sender: TObject); +begin + if fType = 10 then + begin + TOk.Visible := true; + v1Ssel.Visible := true; + end; + readCxGrid(self.Caption, Tv1, 'ƥֿ'); + SetComboBox(); + InitGrid(); +end; + +procedure TfrmBpkclistZSD.FormCreate(Sender: TObject); +begin + BegDate.Date := DServerDate - 7; + EndDate.Date := DServerDate; + cxGrid1.Align := alclient; + +end; + +procedure TfrmBpkclistZSD.TBCloseClick(Sender: TObject); +begin + close; +end; + +procedure TfrmBpkclistZSD.TBRafreshClick(Sender: TObject); +begin + + initGrid(); +end; + +procedure TfrmBpkclistZSD.TBPrintClick(Sender: TObject); +begin + if CDS_Main.IsEmpty then + Exit; + TcxGridToExcel(self.Caption, cxgrid1); +end; + +procedure TfrmBpkclistZSD.TBExportClick(Sender: TObject); +begin + if CDS_Main.IsEmpty then + Exit; + TcxGridToExcel(self.Caption, cxgrid1); +end; + +procedure TfrmBpkclistZSD.TOkClick(Sender: TObject); +begin + if CDS_Main.IsEmpty then + Exit; + ModalResult := 1; +end; + +end. + diff --git a/艾登贸易管理/U_ProductOrderNewList.dfm b/艾登贸易管理/U_ProductOrderNewList.dfm index 9c81dde..4495c90 100644 --- a/艾登贸易管理/U_ProductOrderNewList.dfm +++ b/艾登贸易管理/U_ProductOrderNewList.dfm @@ -244,6 +244,14 @@ object frmProductOrderNewList: TfrmProductOrderNewList ImageIndex = 57 OnClick = TnochkClick end + object ToolButton9: TToolButton + Left = 909 + Top = 30 + AutoSize = True + Caption = #26597#30475#36741#26009#24211#23384 + ImageIndex = 9 + OnClick = ToolButton9Click + end end object Panel1: TPanel Left = 0 @@ -478,6 +486,7 @@ object frmProductOrderNewList: TfrmProductOrderNewList object Tv1: TcxGridDBTableView Navigator.Buttons.CustomButtons = <> OnCellDblClick = Tv1CellDblClick + OnCustomDrawCell = Tv1CustomDrawCell OnFocusedRecordChanged = Tv1FocusedRecordChanged DataController.DataSource = DataSource1 DataController.Filter.AutoDataSetFilter = True @@ -631,6 +640,11 @@ object frmProductOrderNewList: TfrmProductOrderNewList HeaderAlignmentHorz = taCenter Width = 60 end + object Tv1Column5: TcxGridDBColumn + DataBinding.FieldName = 'MLKCStatus' + HeaderAlignmentHorz = taCenter + Width = 20 + end end object cxGrid1Level1: TcxGridLevel GridView = Tv1 diff --git a/艾登贸易管理/U_ProductOrderNewList.pas b/艾登贸易管理/U_ProductOrderNewList.pas index b4af4c7..ea47ff7 100644 --- a/艾登贸易管理/U_ProductOrderNewList.pas +++ b/艾登贸易管理/U_ProductOrderNewList.pas @@ -177,6 +177,8 @@ type ToolButton14: TToolButton; Tchk: TToolButton; Tnochk: TToolButton; + ToolButton9: TToolButton; + Tv1Column5: TcxGridDBColumn; procedure FormDestroy(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormCreate(Sender: TObject); @@ -227,6 +229,8 @@ type procedure ToolButton14Click(Sender: TObject); procedure TchkClick(Sender: TObject); procedure TnochkClick(Sender: TObject); + procedure ToolButton9Click(Sender: TObject); + procedure Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); private DQdate: TDateTime; procedure InitGrid(); @@ -252,7 +256,8 @@ var implementation uses - U_DataLink, U_OrderInPut, U_Fun, U_LabelList, U_LabelListts, U_FjList_RZ; + U_DataLink, U_OrderInPut, U_Fun, U_LabelList, U_LabelListts, U_FjList_RZ, + U_BpkclistZSD; {$R *.dfm} procedure TfrmProductOrderNewList.SetStatus(); @@ -1910,5 +1915,28 @@ begin end; end; +procedure TfrmProductOrderNewList.ToolButton9Click(Sender: TObject); +begin + try + frmBpkclistZSD := TfrmBpkclistZSD.Create(Application); + with frmBpkclistZSD do + begin + FMainid := Trim(Order_Main.fieldbyname('Mainid').AsString); + if ShowModal = 1 then + begin +// InitGrid(); + end; + end; + finally + frmBpkclistZSD.Free; + end; +end; + +procedure TfrmProductOrderNewList.Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); +begin + if AViewInfo.GridRecord.Values[tv1.GetColumnByFieldName('MLKCStatus').Index] = '2' then + ACanvas.Brush.Color := clRed; +end; + end.