~
This commit is contained in:
parent
f8ad2c4d5b
commit
333338824c
|
@ -10,7 +10,20 @@ uses
|
||||||
cxControls, cxGridCustomView, cxGrid, RM_Common, RM_Class, RM_GridReport,
|
cxControls, cxGridCustomView, cxGrid, RM_Common, RM_Class, RM_GridReport,
|
||||||
RM_System, RM_Dataset, ADODB, DBClient, cxGridCustomPopupMenu, cxGridPopupMenu,
|
RM_System, RM_Dataset, ADODB, DBClient, cxGridCustomPopupMenu, cxGridPopupMenu,
|
||||||
ExtCtrls, ComCtrls, ToolWin, cxTextEdit, Buttons, cxSplitter, cxCheckBox,
|
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
|
type
|
||||||
TfrmMJManageNewFDNewSF = class(TForm)
|
TfrmMJManageNewFDNewSF = class(TForm)
|
||||||
|
@ -316,7 +329,7 @@ type
|
||||||
procedure Edit14Click(Sender: TObject);
|
procedure Edit14Click(Sender: TObject);
|
||||||
private
|
private
|
||||||
{ Private declarations }
|
{ Private declarations }
|
||||||
FInt, PState, PrintInt, SCInitGrid, FState, FCK: Integer;
|
FInt, PState, PrintInt, SCInitGrid, FState, FCK, FBFS: Integer;
|
||||||
FColumn, FBanZu, FAPID, FMainId, FSubId, FFFMJID: string;
|
FColumn, FBanZu, FAPID, FMainId, FSubId, FFFMJID: string;
|
||||||
FJZ, FJC, FDC, FZZCXS: Double;
|
FJZ, FJC, FDC, FZZCXS: Double;
|
||||||
fRollType, fRollType1, fbaotype, fbaosx: string;
|
fRollType, fRollType1, fbaotype, fbaosx: string;
|
||||||
|
@ -438,7 +451,7 @@ begin
|
||||||
begin
|
begin
|
||||||
RMVariables['QRBARCODE'] := fImagePath;
|
RMVariables['QRBARCODE'] := fImagePath;
|
||||||
RM2.LoadFromFile(fPrintFile);
|
RM2.LoadFromFile(fPrintFile);
|
||||||
RM2.DefaultCopies := 1;
|
RM2.DefaultCopies := FBFS;
|
||||||
//RM2.ShowReport;
|
//RM2.ShowReport;
|
||||||
RM2.printReport;
|
RM2.printReport;
|
||||||
end;
|
end;
|
||||||
|
@ -480,7 +493,8 @@ begin
|
||||||
begin
|
begin
|
||||||
if trim(Edit9.Text) = '¡Ì' then
|
if trim(Edit9.Text) = '¡Ì' then
|
||||||
begin
|
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;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -890,7 +904,7 @@ var
|
||||||
begin
|
begin
|
||||||
|
|
||||||
result := false;
|
result := false;
|
||||||
if PState = 1 then
|
if PState = 1 then
|
||||||
FMJID := ''
|
FMJID := ''
|
||||||
else if PState = 2 then
|
else if PState = 2 then
|
||||||
FMJID := Trim(CDS_MJID.fieldbyname('MJID').AsString)
|
FMJID := Trim(CDS_MJID.fieldbyname('MJID').AsString)
|
||||||
|
@ -1053,8 +1067,8 @@ begin
|
||||||
// FieldByName('MJLen').Value := StrToFloatdef(trim(MJLen.Text), 0) - StrToFloatdef(trim(MJQty2.Text), 0) + fjc;
|
// FieldByName('MJLen').Value := StrToFloatdef(trim(MJLen.Text), 0) - StrToFloatdef(trim(MJQty2.Text), 0) + fjc;
|
||||||
FieldByName('MJLen').Value := StrToFloatdef(trim(MJLen.Text), 0) - StrToFloatdef(trim(MJQty2.Text), 0) + fjc;
|
FieldByName('MJLen').Value := StrToFloatdef(trim(MJLen.Text), 0) - StrToFloatdef(trim(MJQty2.Text), 0) + fjc;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
FieldByName('MJQty1').Value := StrToFloatdef(trim(MJQty1.Text), 0);
|
FieldByName('MJQty1').Value := StrToFloatdef(trim(MJQty1.Text), 0);
|
||||||
FieldByName('MJQty2').Value := StrToFloatdef(trim(MJQty2.Text), 0);
|
FieldByName('MJQty2').Value := StrToFloatdef(trim(MJQty2.Text), 0);
|
||||||
|
@ -1073,7 +1087,7 @@ begin
|
||||||
if (Edit14.Text <> '¡Ì') and (Edit13.Text <> '¡Ì') then
|
if (Edit14.Text <> '¡Ì') and (Edit13.Text <> '¡Ì') then
|
||||||
begin
|
begin
|
||||||
FieldByName('MJQty4').Value := StrToFloatdef(trim(MJQty4.Text), 0) + fjZ;
|
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;
|
end;
|
||||||
|
|
||||||
if Trim(MJFK.Text) <> '' then
|
if Trim(MJFK.Text) <> '' then
|
||||||
|
@ -2363,7 +2377,7 @@ end;
|
||||||
|
|
||||||
procedure TfrmMJManageNewFDNewSF.MJQty4Change(Sender: TObject);
|
procedure TfrmMJManageNewFDNewSF.MJQty4Change(Sender: TObject);
|
||||||
var
|
var
|
||||||
FReal: Double;
|
FReal, Mz: Double;
|
||||||
begin
|
begin
|
||||||
if Trim(MJQty4.Text) = '' then
|
if Trim(MJQty4.Text) = '' then
|
||||||
begin
|
begin
|
||||||
|
@ -2372,6 +2386,17 @@ begin
|
||||||
end;
|
end;
|
||||||
if TryStrToFloat(MJQty4.Text, FReal) = False then
|
if TryStrToFloat(MJQty4.Text, FReal) = False then
|
||||||
Exit;
|
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
|
if Edit11.Text = '' then
|
||||||
begin
|
begin
|
||||||
if (strtofloatdef(trim(kmxs.Text), 0) <> 0) and (strtofloatdef(trim(mjQty4.Text), 0) <> 0) then
|
if (strtofloatdef(trim(kmxs.Text), 0) <> 0) and (strtofloatdef(trim(mjQty4.Text), 0) <> 0) then
|
||||||
|
@ -2416,17 +2441,17 @@ begin
|
||||||
end;
|
end;
|
||||||
if TryStrToFloat(MJMaoZ.Text, FReal) = False then
|
if TryStrToFloat(MJMaoZ.Text, FReal) = False then
|
||||||
Exit;
|
Exit;
|
||||||
if Trim(MJQty3.Text) <> '' then
|
// if Trim(MJQty3.Text) <> '' then
|
||||||
begin
|
// begin
|
||||||
if TryStrToFloat(MJQty3.Text, FReal) = False then
|
// if TryStrToFloat(MJQty3.Text, FReal) = False then
|
||||||
Exit;
|
// Exit;
|
||||||
jz := StrToFloat(MJMaoZ.Text) - StrToFloat(MJQty3.Text);
|
// jz := StrToFloat(MJMaoZ.Text) - StrToFloat(MJQty3.Text);
|
||||||
MJQty4.Text := format('%.' + trim(fxsws1) + 'f', [jz]);
|
// MJQty4.Text := format('%.' + trim(fxsws1) + 'f', [jz]);
|
||||||
end
|
// end
|
||||||
else
|
// else
|
||||||
begin
|
// begin
|
||||||
MJQty4.Text := MJMaoZ.Text;
|
// MJQty4.Text := MJMaoZ.Text;
|
||||||
end;
|
// end;
|
||||||
if Edit11.Text <> '' then
|
if Edit11.Text <> '' then
|
||||||
begin
|
begin
|
||||||
if (strtofloatdef(trim(kmxs.Text), 0) <> 0) and (strtofloatdef(trim(MJMaoZ.Text), 0) <> 0) then
|
if (strtofloatdef(trim(kmxs.Text), 0) <> 0) and (strtofloatdef(trim(MJMaoZ.Text), 0) <> 0) then
|
||||||
|
@ -2533,11 +2558,12 @@ begin
|
||||||
FMainId := Trim(ADOTmp.fieldbyname('MainId').AsString);
|
FMainId := Trim(ADOTmp.fieldbyname('MainId').AsString);
|
||||||
FSubId := Trim(ADOTmp.fieldbyname('SubId').AsString);
|
FSubId := Trim(ADOTmp.fieldbyname('SubId').AsString);
|
||||||
FJZ := ADOTmp.fieldbyname('jiazhong').AsFloat;
|
FJZ := ADOTmp.fieldbyname('jiazhong').AsFloat;
|
||||||
FJC := ADOTmp.fieldbyname('jiachang').AsFloat;
|
FJC := ADOTmp.fieldbyname('jiachang').AsFloat;
|
||||||
FDC := StrToFloatDef(ADOTmp.fieldbyname('DC').asstring, 0);
|
FDC := StrToFloatDef(ADOTmp.fieldbyname('DC').asstring, 0);
|
||||||
fbaotype := Trim(ADOTmp.fieldbyname('baotype').AsString);
|
fbaotype := Trim(ADOTmp.fieldbyname('baotype').AsString);
|
||||||
fbaosx := Trim(ADOTmp.fieldbyname('baosx').AsString);
|
fbaosx := Trim(ADOTmp.fieldbyname('baosx').AsString);
|
||||||
if FDC <> 0 then
|
FBFS := ADOTmp.fieldbyname('BFS').AsInteger;
|
||||||
|
if FDC <> 0 then
|
||||||
begin
|
begin
|
||||||
Edit12.Visible := True;
|
Edit12.Visible := True;
|
||||||
Label51.Visible := True;
|
Label51.Visible := True;
|
||||||
|
@ -2993,7 +3019,7 @@ begin
|
||||||
begin
|
begin
|
||||||
RMVariables['QRBARCODE'] := fImagePath;
|
RMVariables['QRBARCODE'] := fImagePath;
|
||||||
RM2.LoadFromFile(fPrintFile);
|
RM2.LoadFromFile(fPrintFile);
|
||||||
RM2.DefaultCopies := 1;
|
RM2.DefaultCopies := FBFS;
|
||||||
//RM2.ShowReport;
|
//RM2.ShowReport;
|
||||||
RM2.printReport;
|
RM2.printReport;
|
||||||
end;
|
end;
|
||||||
|
|
|
@ -212,6 +212,13 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet
|
||||||
ImageIndex = 55
|
ImageIndex = 55
|
||||||
OnClick = TBCloseClick
|
OnClick = TBCloseClick
|
||||||
end
|
end
|
||||||
|
object ToolButton17: TToolButton
|
||||||
|
Left = 944
|
||||||
|
Top = 30
|
||||||
|
Caption = #21253#26631#31614#20221#25968
|
||||||
|
ImageIndex = 56
|
||||||
|
OnClick = ToolButton17Click
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
|
@ -693,6 +700,12 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet
|
||||||
Properties.OnEditValueChanged = Tv1Column5PropertiesEditValueChanged
|
Properties.OnEditValueChanged = Tv1Column5PropertiesEditValueChanged
|
||||||
Width = 60
|
Width = 60
|
||||||
end
|
end
|
||||||
|
object Tv1Column7: TcxGridDBColumn
|
||||||
|
Caption = #21253#26631#31614#20221#25968
|
||||||
|
DataBinding.FieldName = 'BFS'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object cxGrid1Level1: TcxGridLevel
|
object cxGrid1Level1: TcxGridLevel
|
||||||
GridView = Tv1
|
GridView = Tv1
|
||||||
|
|
|
@ -10,7 +10,21 @@ uses
|
||||||
cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
|
cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
|
||||||
cxGrid, DBClient, cxCheckBox, cxCalendar, cxSplitter, RM_Dataset, RM_System,
|
cxGrid, DBClient, cxCheckBox, cxCalendar, cxSplitter, RM_Dataset, RM_System,
|
||||||
RM_Common, RM_Class, RM_GridReport, RM_e_Xls, StrUtils, Menus, cxDropDownEdit,
|
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
|
type
|
||||||
TfrmProductOrderLBNameSet = class(TForm)
|
TfrmProductOrderLBNameSet = class(TForm)
|
||||||
|
@ -119,6 +133,8 @@ type
|
||||||
ToolButton15: TToolButton;
|
ToolButton15: TToolButton;
|
||||||
ToolButton16: TToolButton;
|
ToolButton16: TToolButton;
|
||||||
Tv1Column6: TcxGridDBColumn;
|
Tv1Column6: TcxGridDBColumn;
|
||||||
|
Tv1Column7: TcxGridDBColumn;
|
||||||
|
ToolButton17: TToolButton;
|
||||||
procedure FormDestroy(Sender: TObject);
|
procedure FormDestroy(Sender: TObject);
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
|
@ -156,6 +172,7 @@ type
|
||||||
procedure Tv1Column5PropertiesEditValueChanged(Sender: TObject);
|
procedure Tv1Column5PropertiesEditValueChanged(Sender: TObject);
|
||||||
procedure ToolButton15Click(Sender: TObject);
|
procedure ToolButton15Click(Sender: TObject);
|
||||||
procedure ToolButton16Click(Sender: TObject);
|
procedure ToolButton16Click(Sender: TObject);
|
||||||
|
procedure ToolButton17Click(Sender: TObject);
|
||||||
private
|
private
|
||||||
DQdate: TDateTime;
|
DQdate: TDateTime;
|
||||||
procedure InitGrid();
|
procedure InitGrid();
|
||||||
|
@ -249,7 +266,7 @@ end;
|
||||||
|
|
||||||
procedure TfrmProductOrderLBNameSet.TBRafreshClick(Sender: TObject);
|
procedure TfrmProductOrderLBNameSet.TBRafreshClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
CheckBox1.Checked := False;
|
CheckBox1.Checked := False;
|
||||||
with Order_Main do
|
with Order_Main do
|
||||||
begin
|
begin
|
||||||
DisableControls;
|
DisableControls;
|
||||||
|
@ -1511,7 +1528,7 @@ var
|
||||||
Txt, fImagePath: string;
|
Txt, fImagePath: string;
|
||||||
Moudle: THandle;
|
Moudle: THandle;
|
||||||
Makebar: TMakebar;
|
Makebar: TMakebar;
|
||||||
Mixtext: TMixtext;
|
Mixtext: TMixtext;
|
||||||
begin
|
begin
|
||||||
if Order_Main.IsEmpty then
|
if Order_Main.IsEmpty then
|
||||||
exit;
|
exit;
|
||||||
|
@ -1603,7 +1620,72 @@ begin
|
||||||
end;
|
end;
|
||||||
next;
|
next;
|
||||||
end;
|
end;
|
||||||
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;
|
||||||
|
|
||||||
|
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;
|
CheckBox1.Checked := False;
|
||||||
with Order_Main do
|
with Order_Main do
|
||||||
begin
|
begin
|
||||||
|
|
Loading…
Reference in New Issue
Block a user