~
This commit is contained in:
parent
07fc581124
commit
a527b963f4
|
|
@ -352,7 +352,7 @@ type
|
|||
{ Private declarations }
|
||||
FInt, PState, PrintInt, SCInitGrid, FState, FCK: Integer;
|
||||
FColumn, FBanZu, FAPID, FMainId, FSubId, FFFMJID: string;
|
||||
FJZ, FJC, FDC: Double;
|
||||
FJZ, FJC, FDC, Fmachi: Double;
|
||||
fRollType, fRollType1, fbaotype, fbaosx: string;
|
||||
isCommopen, IsJsMessage: boolean;
|
||||
MValue, FCDName, MggCDFalg: string;
|
||||
|
|
@ -1097,7 +1097,9 @@ begin
|
|||
end
|
||||
else
|
||||
begin
|
||||
FieldByName('MJLen').Value := StrToFloatdef(trim(MJLen.Text), 0) + fjc;
|
||||
// FieldByName('MJLen').Value := StrToFloatdef(trim(MJLen.Text), 0) + fjc;
|
||||
FieldByName('MJLen').Value := format('%.' + trim(fxsws) + 'f', [StrToFloatdef(trim(MJLen.Text), 0) * Fmachi + fjc]);
|
||||
|
||||
end;
|
||||
|
||||
FieldByName('MJQty1').Value := StrToFloatdef(trim(MJQty1.Text), 0);
|
||||
|
|
@ -2466,21 +2468,21 @@ begin
|
|||
if TryStrToFloat(MJQty4.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]);
|
||||
mz := StrToFloat(MJQty4.Text) + StrToFloat(MJQty3.Text);
|
||||
MJMaoZ.Text := format('%.' + trim(fxsws1) + 'f', [mz]);
|
||||
|
||||
end
|
||||
else
|
||||
begin
|
||||
// MJQty4.Text := MJMaoZ.Text;
|
||||
MJMaoZ.Text := MJQty4.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]);
|
||||
// mz := StrToFloat(MJQty4.Text) + StrToFloat(MJQty3.Text);
|
||||
// MJMaoZ.Text := format('%.' + trim(fxsws1) + 'f', [mz]);
|
||||
//
|
||||
// end
|
||||
// else
|
||||
// begin
|
||||
//// MJQty4.Text := MJMaoZ.Text;
|
||||
// MJMaoZ.Text := MJQty4.Text;
|
||||
// end;
|
||||
|
||||
if Edit11.Text = '' then
|
||||
begin
|
||||
|
|
@ -2502,6 +2504,33 @@ 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 Edit11.Text <> '' then
|
||||
begin
|
||||
if (strtofloatdef(trim(kmxs.Text), 0) <> 0) and (strtofloatdef(trim(MJMaoZ.Text), 0) <> 0) then
|
||||
begin
|
||||
MJLen.Text := format('%.' + trim(fxsws) + 'f', [(strtofloatdef(trim(MJMaoZ.Text), 0) + fjZ) * strtofloatdef(trim(kmxs.Text), 0)])
|
||||
end;
|
||||
end;
|
||||
// if (strtofloatdef(trim(kmxs.Text), 0) = 0) then
|
||||
// begin
|
||||
// if Trim(MJMaoZ.Text) = '' then
|
||||
// begin
|
||||
// MJQty4.Text := '';
|
||||
// Exit;
|
||||
// end;
|
||||
// if TryStrToFloat(MJMaoZ.Text, FReal) = False then
|
||||
// Exit;
|
||||
// if Trim(MJQty3.Text) <> '' then
|
||||
// begin
|
||||
// if TryStrToFloat(MJQty3.Text, FReal) = False then
|
||||
|
|
@ -2513,13 +2542,7 @@ begin
|
|||
// 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
|
||||
begin
|
||||
MJLen.Text := format('%.' + trim(fxsws) + 'f', [(strtofloatdef(trim(MJMaoZ.Text), 0) + fjZ) * strtofloatdef(trim(kmxs.Text), 0)])
|
||||
end;
|
||||
end;
|
||||
// end;
|
||||
|
||||
end;
|
||||
|
||||
|
|
@ -2592,6 +2615,7 @@ begin
|
|||
FSubId := Trim(ADOTmp.fieldbyname('SubId').AsString);
|
||||
FJZ := ADOTmp.fieldbyname('jiazhong').AsFloat;
|
||||
FJC := ADOTmp.fieldbyname('jiachang').AsFloat;
|
||||
Fmachi := ADOTmp.fieldbyname('machi').asfloat;
|
||||
FDC := StrToFloatDef(ADOTmp.fieldbyname('DC').asstring, 0);
|
||||
fbaotype := Trim(ADOTmp.fieldbyname('baotype').AsString);
|
||||
fbaosx := Trim(ADOTmp.fieldbyname('baosx').AsString);
|
||||
|
|
|
|||
|
|
@ -129,16 +129,24 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet
|
|||
Wrap = True
|
||||
OnClick = ToolButton5Click
|
||||
end
|
||||
object ToolButton6: TToolButton
|
||||
object ToolButton16: TToolButton
|
||||
Left = 0
|
||||
Top = 30
|
||||
AutoSize = True
|
||||
Caption = ' '#30721#23610' '
|
||||
ImageIndex = 54
|
||||
OnClick = ToolButton16Click
|
||||
end
|
||||
object ToolButton6: TToolButton
|
||||
Left = 81
|
||||
Top = 30
|
||||
AutoSize = True
|
||||
Caption = #38271#24230#20301#25968
|
||||
ImageIndex = 60
|
||||
OnClick = ToolButton6Click
|
||||
end
|
||||
object ToolButton9: TToolButton
|
||||
Left = 87
|
||||
Left = 168
|
||||
Top = 30
|
||||
AutoSize = True
|
||||
Caption = #37325#37327#20301#25968
|
||||
|
|
@ -146,7 +154,7 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet
|
|||
OnClick = ToolButton9Click
|
||||
end
|
||||
object ToolButton13: TToolButton
|
||||
Left = 174
|
||||
Left = 255
|
||||
Top = 30
|
||||
AutoSize = True
|
||||
Caption = #27599#21253#21367#25968
|
||||
|
|
@ -154,7 +162,7 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet
|
|||
OnClick = ToolButton13Click
|
||||
end
|
||||
object ToolButton14: TToolButton
|
||||
Left = 261
|
||||
Left = 342
|
||||
Top = 30
|
||||
AutoSize = True
|
||||
Caption = #27599#21367#38271#24230
|
||||
|
|
@ -162,7 +170,7 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet
|
|||
OnClick = ToolButton14Click
|
||||
end
|
||||
object ToolButton7: TToolButton
|
||||
Left = 348
|
||||
Left = 429
|
||||
Top = 30
|
||||
AutoSize = True
|
||||
Caption = #39044#35272#21367#26631#31614
|
||||
|
|
@ -170,14 +178,14 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet
|
|||
OnClick = ToolButton7Click
|
||||
end
|
||||
object ToolButton15: TToolButton
|
||||
Left = 447
|
||||
Left = 528
|
||||
Top = 30
|
||||
Caption = #39044#35272#20013#25991#26631#31614
|
||||
ImageIndex = 57
|
||||
OnClick = ToolButton15Click
|
||||
end
|
||||
object ToolButton8: TToolButton
|
||||
Left = 554
|
||||
Left = 635
|
||||
Top = 30
|
||||
AutoSize = True
|
||||
Caption = #39044#35272#21253#26631#31614
|
||||
|
|
@ -185,7 +193,7 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet
|
|||
OnClick = ToolButton8Click
|
||||
end
|
||||
object PiZhong: TEdit
|
||||
Left = 653
|
||||
Left = 734
|
||||
Top = 30
|
||||
Width = 121
|
||||
Height = 30
|
||||
|
|
@ -198,7 +206,7 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet
|
|||
TabOrder = 0
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 774
|
||||
Left = 855
|
||||
Top = 30
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
|
|
@ -680,6 +688,12 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet
|
|||
Properties.OnEditValueChanged = Tv1Column5PropertiesEditValueChanged
|
||||
Width = 60
|
||||
end
|
||||
object Tv1Column6: TcxGridDBColumn
|
||||
Caption = #30721#23610
|
||||
DataBinding.FieldName = 'machi'
|
||||
HeaderAlignmentHorz = taRightJustify
|
||||
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)
|
||||
|
|
@ -117,6 +131,8 @@ type
|
|||
ToolButton13: TToolButton;
|
||||
ToolButton14: TToolButton;
|
||||
ToolButton15: TToolButton;
|
||||
ToolButton16: TToolButton;
|
||||
Tv1Column6: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
|
|
@ -153,6 +169,7 @@ type
|
|||
procedure Tv1Column2PropertiesEditValueChanged(Sender: TObject);
|
||||
procedure Tv1Column5PropertiesEditValueChanged(Sender: TObject);
|
||||
procedure ToolButton15Click(Sender: TObject);
|
||||
procedure ToolButton16Click(Sender: TObject);
|
||||
private
|
||||
DQdate: TDateTime;
|
||||
procedure InitGrid();
|
||||
|
|
@ -1554,5 +1571,70 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmProductOrderLBNameSet.ToolButton16Click(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_Sub Set machi=' + Trim(PiZhong.Text));
|
||||
sql.Add(' where Subid=''' + Trim(Order_Main.fieldbyname('Subid').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with Order_Main do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('machi').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