~
This commit is contained in:
parent
f8ad2c4d5b
commit
333338824c
|
@ -10,7 +10,20 @@ uses
|
|||
cxControls, cxGridCustomView, cxGrid, RM_Common, RM_Class, RM_GridReport,
|
||||
RM_System, RM_Dataset, ADODB, DBClient, cxGridCustomPopupMenu, cxGridPopupMenu,
|
||||
ExtCtrls, ComCtrls, ToolWin, cxTextEdit, Buttons, cxSplitter, cxCheckBox,
|
||||
MovePanel, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, ShellAPI;
|
||||
MovePanel, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, ShellAPI,
|
||||
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
|
||||
TfrmMJManageNewFDNewSF = class(TForm)
|
||||
|
@ -316,7 +329,7 @@ type
|
|||
procedure Edit14Click(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
FInt, PState, PrintInt, SCInitGrid, FState, FCK: Integer;
|
||||
FInt, PState, PrintInt, SCInitGrid, FState, FCK, FBFS: Integer;
|
||||
FColumn, FBanZu, FAPID, FMainId, FSubId, FFFMJID: string;
|
||||
FJZ, FJC, FDC, FZZCXS: Double;
|
||||
fRollType, fRollType1, fbaotype, fbaosx: string;
|
||||
|
@ -438,7 +451,7 @@ begin
|
|||
begin
|
||||
RMVariables['QRBARCODE'] := fImagePath;
|
||||
RM2.LoadFromFile(fPrintFile);
|
||||
RM2.DefaultCopies := 1;
|
||||
RM2.DefaultCopies := FBFS;
|
||||
//RM2.ShowReport;
|
||||
RM2.printReport;
|
||||
end;
|
||||
|
@ -480,7 +493,8 @@ begin
|
|||
begin
|
||||
if trim(Edit9.Text) = '¡Ì' then
|
||||
begin
|
||||
MJMaoZ.Text := format('%.' + trim(fxsws1) + 'f', [i1 / 100000]);
|
||||
// MJMaoZ.Text := format('%.' + trim(fxsws1) + 'f', [i1 / 100000]);
|
||||
MJQty4.Text := format('%.' + trim(fxsws1) + 'f', [i1 / 100000]);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
@ -1073,7 +1087,7 @@ begin
|
|||
if (Edit14.Text <> '¡Ì') and (Edit13.Text <> '¡Ì') then
|
||||
begin
|
||||
FieldByName('MJQty4').Value := StrToFloatdef(trim(MJQty4.Text), 0) + fjZ;
|
||||
FieldByName('MJMaoZ').Value :=StrToFloatdef(trim(MJMaoZ.Text), 0)+ fjz;
|
||||
FieldByName('MJMaoZ').Value := StrToFloatdef(trim(MJMaoZ.Text), 0) + fjz;
|
||||
end;
|
||||
|
||||
if Trim(MJFK.Text) <> '' then
|
||||
|
@ -2363,7 +2377,7 @@ end;
|
|||
|
||||
procedure TfrmMJManageNewFDNewSF.MJQty4Change(Sender: TObject);
|
||||
var
|
||||
FReal: Double;
|
||||
FReal, Mz: Double;
|
||||
begin
|
||||
if Trim(MJQty4.Text) = '' then
|
||||
begin
|
||||
|
@ -2372,6 +2386,17 @@ begin
|
|||
end;
|
||||
if TryStrToFloat(MJQty4.Text, FReal) = False then
|
||||
Exit;
|
||||
if Trim(MJQty3.Text) <> '' then
|
||||
begin
|
||||
if TryStrToFloat(MJQty3.Text, FReal) = False then
|
||||
Exit;
|
||||
Mz := StrToFloat(MJQty4.Text) + StrToFloat(MJQty3.Text);
|
||||
MJMaoZ.Text := format('%.' + trim(fxsws1) + 'f', [Mz]);
|
||||
end
|
||||
else
|
||||
begin
|
||||
MJMaoZ.Text := MJQty4.Text;
|
||||
end;
|
||||
if Edit11.Text = '' then
|
||||
begin
|
||||
if (strtofloatdef(trim(kmxs.Text), 0) <> 0) and (strtofloatdef(trim(mjQty4.Text), 0) <> 0) then
|
||||
|
@ -2416,17 +2441,17 @@ begin
|
|||
end;
|
||||
if TryStrToFloat(MJMaoZ.Text, FReal) = False then
|
||||
Exit;
|
||||
if Trim(MJQty3.Text) <> '' then
|
||||
begin
|
||||
if TryStrToFloat(MJQty3.Text, FReal) = False then
|
||||
Exit;
|
||||
jz := StrToFloat(MJMaoZ.Text) - StrToFloat(MJQty3.Text);
|
||||
MJQty4.Text := format('%.' + trim(fxsws1) + 'f', [jz]);
|
||||
end
|
||||
else
|
||||
begin
|
||||
MJQty4.Text := MJMaoZ.Text;
|
||||
end;
|
||||
// if Trim(MJQty3.Text) <> '' then
|
||||
// begin
|
||||
// if TryStrToFloat(MJQty3.Text, FReal) = False then
|
||||
// Exit;
|
||||
// jz := StrToFloat(MJMaoZ.Text) - StrToFloat(MJQty3.Text);
|
||||
// MJQty4.Text := format('%.' + trim(fxsws1) + 'f', [jz]);
|
||||
// end
|
||||
// else
|
||||
// begin
|
||||
// MJQty4.Text := MJMaoZ.Text;
|
||||
// end;
|
||||
if Edit11.Text <> '' then
|
||||
begin
|
||||
if (strtofloatdef(trim(kmxs.Text), 0) <> 0) and (strtofloatdef(trim(MJMaoZ.Text), 0) <> 0) then
|
||||
|
@ -2537,6 +2562,7 @@ begin
|
|||
FDC := StrToFloatDef(ADOTmp.fieldbyname('DC').asstring, 0);
|
||||
fbaotype := Trim(ADOTmp.fieldbyname('baotype').AsString);
|
||||
fbaosx := Trim(ADOTmp.fieldbyname('baosx').AsString);
|
||||
FBFS := ADOTmp.fieldbyname('BFS').AsInteger;
|
||||
if FDC <> 0 then
|
||||
begin
|
||||
Edit12.Visible := True;
|
||||
|
@ -2993,7 +3019,7 @@ begin
|
|||
begin
|
||||
RMVariables['QRBARCODE'] := fImagePath;
|
||||
RM2.LoadFromFile(fPrintFile);
|
||||
RM2.DefaultCopies := 1;
|
||||
RM2.DefaultCopies := FBFS;
|
||||
//RM2.ShowReport;
|
||||
RM2.printReport;
|
||||
end;
|
||||
|
|
|
@ -212,6 +212,13 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet
|
|||
ImageIndex = 55
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
object ToolButton17: TToolButton
|
||||
Left = 944
|
||||
Top = 30
|
||||
Caption = #21253#26631#31614#20221#25968
|
||||
ImageIndex = 56
|
||||
OnClick = ToolButton17Click
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
|
@ -693,6 +700,12 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet
|
|||
Properties.OnEditValueChanged = Tv1Column5PropertiesEditValueChanged
|
||||
Width = 60
|
||||
end
|
||||
object Tv1Column7: TcxGridDBColumn
|
||||
Caption = #21253#26631#31614#20221#25968
|
||||
DataBinding.FieldName = 'BFS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
|
|
|
@ -10,7 +10,21 @@ uses
|
|||
cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
|
||||
cxGrid, DBClient, cxCheckBox, cxCalendar, cxSplitter, RM_Dataset, RM_System,
|
||||
RM_Common, RM_Class, RM_GridReport, RM_e_Xls, StrUtils, Menus, cxDropDownEdit,
|
||||
cxTextEdit, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator;
|
||||
cxTextEdit, 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
|
||||
TfrmProductOrderLBNameSet = class(TForm)
|
||||
|
@ -119,6 +133,8 @@ type
|
|||
ToolButton15: TToolButton;
|
||||
ToolButton16: TToolButton;
|
||||
Tv1Column6: TcxGridDBColumn;
|
||||
Tv1Column7: TcxGridDBColumn;
|
||||
ToolButton17: TToolButton;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
|
@ -156,6 +172,7 @@ type
|
|||
procedure Tv1Column5PropertiesEditValueChanged(Sender: TObject);
|
||||
procedure ToolButton15Click(Sender: TObject);
|
||||
procedure ToolButton16Click(Sender: TObject);
|
||||
procedure ToolButton17Click(Sender: TObject);
|
||||
private
|
||||
DQdate: TDateTime;
|
||||
procedure InitGrid();
|
||||
|
@ -1622,5 +1639,70 @@ begin
|
|||
|
||||
end;
|
||||
|
||||
procedure TfrmProductOrderLBNameSet.ToolButton17Click(Sender: TObject);
|
||||
var
|
||||
FPiZhong: string;
|
||||
FReal: Double;
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
exit;
|
||||
if Order_Main.Locate('SSel', True, []) = False then
|
||||
begin
|
||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if Trim(PiZhong.Text) = '' then
|
||||
begin
|
||||
Application.MessageBox('包标签不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if TryStrToFloat(PiZhong.Text, FReal) = False then
|
||||
begin
|
||||
Application.MessageBox('包标签非法数字!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
with order_Main do
|
||||
begin
|
||||
first;
|
||||
while not Eof do
|
||||
begin
|
||||
if order_Main.FieldByName('Ssel').AsBoolean = true then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update JYOrder_main Set BFS=' + Trim(PiZhong.Text));
|
||||
sql.Add(' where mainid=''' + Trim(Order_Main.fieldbyname('mainid').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with Order_Main do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('BFS').Value := PiZhong.Text;
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
next;
|
||||
end;
|
||||
end;
|
||||
CheckBox1.Checked := False;
|
||||
with Order_Main do
|
||||
begin
|
||||
DisableControls;
|
||||
first;
|
||||
while not Eof do
|
||||
begin
|
||||
edit;
|
||||
fieldbyname('Ssel').AsBoolean := False;
|
||||
post;
|
||||
next;
|
||||
end;
|
||||
first;
|
||||
EnableControls;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user