This commit is contained in:
DESKTOP-E401PHE\Administrator 2025-11-04 09:31:01 +08:00
parent a26334784d
commit a06184b1b8

View File

@ -11,21 +11,20 @@ uses
cxGrid, DBClient, ADODB, cxGridCustomPopupMenu, cxGridPopupMenu, cxCheckBox, cxGrid, DBClient, ADODB, cxGridCustomPopupMenu, cxGridPopupMenu, cxCheckBox,
IdFTP, ShellAPI, strutils, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, IdFTP, ShellAPI, strutils, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator,
RM_Common, RM_Class, RM_GridReport, RM_e_Xls, RM_System, RM_Dataset, Menus, RM_Common, RM_Class, RM_GridReport, RM_e_Xls, RM_System, RM_Dataset, Menus,
MovePanel, cxContainer, cxTextEdit, cxCurrencyEdit, dxSkinsCore, MovePanel, cxContainer, cxTextEdit, cxCurrencyEdit, dxSkinsCore, dxSkinBlack,
dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom,
dxSkinDarkRoom, dxSkinDarkSide, dxSkinDevExpressDarkStyle, dxSkinDarkSide, dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans, dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky, dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black, dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink, dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue, dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, dxSkinOffice2013LightGray,
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin, dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic,
dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus, dxSkinSharp, dxSkinSharpPlus, dxSkinSilver, dxSkinSpringTime, dxSkinStardust,
dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008, dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinsDefaultPainters,
dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, dxSkinValentine, dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue,
dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue, dxSkinscxPCPainter; dxSkinscxPCPainter;
type type
TfrmBpkclist = class(TForm) TfrmBpkclist = class(TForm)
@ -184,8 +183,6 @@ type
procedure Button1Click(Sender: TObject); procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject); procedure Button2Click(Sender: TObject);
procedure ToolButton3Click(Sender: TObject); procedure ToolButton3Click(Sender: TObject);
private private
procedure InitGrid(); procedure InitGrid();
procedure InitSub(); procedure InitSub();
@ -244,7 +241,7 @@ begin
end; end;
end; end;
if CRType.Items.Count > 0 then if CRType.Items.Count > 0 then
CRType.ItemIndex := 0; CRType.ItemIndex := 0;
end; end;
procedure TfrmBpkclist.InitGrid(); procedure TfrmBpkclist.InitGrid();
@ -294,7 +291,7 @@ begin
SCreateCDS20(ADOQueryYck, CDS_Yck); SCreateCDS20(ADOQueryYck, CDS_Yck);
SInitCDSData20(ADOQueryYck, CDS_Yck); SInitCDSData20(ADOQueryYck, CDS_Yck);
finally finally
end; end;
end; end;
procedure TfrmBpkclist.FormClose(Sender: TObject; var Action: TCloseAction); procedure TfrmBpkclist.FormClose(Sender: TObject; var Action: TCloseAction);
@ -384,7 +381,7 @@ begin
sqlstr := ''; sqlstr := '';
i := 0; i := 0;
MovePanel2.Visible := True; MovePanel2.Visible := True;
with CDS_Main do with CDS_Main do
begin begin
First; First;
while CDS_Main.Locate('SSel', true, []) do while CDS_Main.Locate('SSel', true, []) do
@ -464,7 +461,7 @@ begin
MovePanel2.Visible := False; MovePanel2.Visible := False;
end; end;
//begin //begin
// if CDS_Main.IsEmpty then // if CDS_Main.IsEmpty then
// Exit; // Exit;
// TcxGridToExcel(self.Caption, cxgrid1); // TcxGridToExcel(self.Caption, cxgrid1);
@ -539,7 +536,7 @@ begin
end; end;
procedure TfrmBpkclist.N1Click(Sender: TObject); procedure TfrmBpkclist.N1Click(Sender: TObject);
begin begin
SelOKNo(CDS_Main, True); SelOKNo(CDS_Main, True);
end; end;
@ -574,15 +571,17 @@ begin
if CDS_Main.FieldByName('SSel').AsBoolean = True then if CDS_Main.FieldByName('SSel').AsBoolean = True then
begin begin
with ADOQueryCmd do with ADOQueryCmd do
begin begin
Close; Close;
sql.Clear; sql.Clear;
sql.Add('Update CP_inout Set DRCKNO=''' + trim(Edit1.Text) + ''' '); sql.Add('Update CP_inout Set DRCKNO=''' + trim(Edit1.Text) + ''' ');
sql.Add('where P_CodeName=''' + Trim(CDS_Main.fieldbyname('P_CodeName').AsString) + ''''); sql.Add('where P_CodeName=''' + Trim(CDS_Main.fieldbyname('P_CodeName').AsString) + '''');
sql.Add('and P_Code=''' + Trim(CDS_Main.fieldbyname('P_Code').AsString) + ''''); sql.Add('and P_Code=''' + Trim(CDS_Main.fieldbyname('P_Code').AsString) + '''');
sql.Add('and DRCKNO=''' + Trim(CDS_Main.fieldbyname('DRCKNO').AsString) + ''''); sql.Add('and DRCKNO=''' + Trim(CDS_Main.fieldbyname('DRCKNO').AsString) + '''');
sql.Add('and DRCKName=''' + Trim(CDS_Main.fieldbyname('DRCKName').AsString) + ''''); sql.Add('and DRCKName=''' + Trim(CDS_Main.fieldbyname('DRCKName').AsString) + '''');
// sql.add('where AA.P_CodeName='FAIRY' and AA.P_Code='1505-C' and isnull(DRCKNO,'')='101' and isnull(DRCKName,'')='¹¤³§³ÉÒ²Ö''); sql.Add('and mainid=''' + Trim(CDS_Main.fieldbyname('mainid').AsString) + '''');
sql.Add('and subid=''' + Trim(CDS_Main.fieldbyname('subid').AsString) + '''');
// sql.add('where AA.P_CodeName='FAIRY' and AA.P_Code='1505-C' and isnull(DRCKNO,'')='101' and isnull(DRCKName,'')='¹¤³§³ÉÒ²Ö'');
ExecSQL; ExecSQL;
end; end;
end; end;
@ -664,6 +663,5 @@ begin
Panel2.Visible := true; Panel2.Visible := true;
end; end;
end. end.