This commit is contained in:
DESKTOP-E401PHE\Administrator 2025-07-18 16:18:14 +08:00
parent 8625d20e95
commit 9ff30f3ceb
6 changed files with 312 additions and 110 deletions

View File

@ -14,8 +14,8 @@
重量下限=0 重量下限=0
重量上限=222 重量上限=222
米数小数位=0 米数小数位=0
码数小数位=1 码数小数位=0
重量小数位=1 重量小数位=0
自定义字母键1=A 自定义字母键1=A
自定义字母键2=- 自定义字母键2=-

View File

@ -454,7 +454,8 @@
#26080#38656#36716#25442 #26080#38656#36716#25442
#38271#24230#36716#20844#26020 #38271#24230#36716#20844#26020
#20928#37325#36716#38271#24230 #20928#37325#36716#38271#24230
#27611#37325#36716#38271#24230) #27611#37325#36716#38271#24230
'')
Properties.OnChange = lblRuleConversionPropertiesChange Properties.OnChange = lblRuleConversionPropertiesChange
Style.Font.Charset = ANSI_CHARSET Style.Font.Charset = ANSI_CHARSET
Style.Font.Color = clWindowText Style.Font.Color = clWindowText
@ -521,13 +522,13 @@
Width = 149 Width = 149
end end
object C_Pattern: TcxTextEdit object C_Pattern: TcxTextEdit
Left = 8561 Left = 10000
Top = 10000 Top = 10000
ParentFont = False ParentFont = False
Properties.ReadOnly = True Properties.ReadOnly = True
Style.HotTrack = False Style.HotTrack = False
Style.TransparentBorder = False Style.TransparentBorder = False
TabOrder = 39 TabOrder = 51
Visible = False Visible = False
Width = 124 Width = 124
end end
@ -545,7 +546,7 @@
Style.HotTrack = False Style.HotTrack = False
Style.TransparentBorder = False Style.TransparentBorder = False
Style.IsFontAssigned = True Style.IsFontAssigned = True
TabOrder = 40 TabOrder = 39
Text = '100' Text = '100'
Visible = False Visible = False
OnClick = edtScanEnter OnClick = edtScanEnter
@ -559,7 +560,7 @@
Properties.ReadOnly = True Properties.ReadOnly = True
Style.HotTrack = False Style.HotTrack = False
Style.TransparentBorder = False Style.TransparentBorder = False
TabOrder = 41 TabOrder = 40
Visible = False Visible = False
Width = 168 Width = 168
end end
@ -584,7 +585,7 @@
Properties.ReadOnly = True Properties.ReadOnly = True
Style.HotTrack = False Style.HotTrack = False
Style.TransparentBorder = False Style.TransparentBorder = False
TabOrder = 42 TabOrder = 41
Visible = False Visible = False
OnClick = edtScanEnter OnClick = edtScanEnter
Width = 121 Width = 121
@ -594,7 +595,7 @@
Top = 10000 Top = 10000
Style.HotTrack = False Style.HotTrack = False
Style.TransparentBorder = False Style.TransparentBorder = False
TabOrder = 43 TabOrder = 42
Visible = False Visible = False
OnClick = edtScanEnter OnClick = edtScanEnter
Width = 121 Width = 121
@ -605,7 +606,7 @@
ParentFont = False ParentFont = False
Style.HotTrack = False Style.HotTrack = False
Style.TransparentBorder = False Style.TransparentBorder = False
TabOrder = 44 TabOrder = 43
Visible = False Visible = False
OnClick = edtScanEnter OnClick = edtScanEnter
Width = 121 Width = 121
@ -616,7 +617,7 @@
ParentFont = False ParentFont = False
Style.HotTrack = False Style.HotTrack = False
Style.TransparentBorder = False Style.TransparentBorder = False
TabOrder = 45 TabOrder = 44
Visible = False Visible = False
OnClick = edtScanEnter OnClick = edtScanEnter
Width = 121 Width = 121
@ -626,7 +627,7 @@
Top = 10000 Top = 10000
Style.HotTrack = False Style.HotTrack = False
Style.TransparentBorder = False Style.TransparentBorder = False
TabOrder = 46 TabOrder = 45
Visible = False Visible = False
OnClick = edtScanEnter OnClick = edtScanEnter
Width = 121 Width = 121
@ -636,7 +637,7 @@
Top = 10000 Top = 10000
Style.HotTrack = False Style.HotTrack = False
Style.TransparentBorder = False Style.TransparentBorder = False
TabOrder = 47 TabOrder = 46
Visible = False Visible = False
OnClick = edtScanEnter OnClick = edtScanEnter
Width = 121 Width = 121
@ -653,7 +654,7 @@
Font.Name = #24494#36719#38597#40657 Font.Name = #24494#36719#38597#40657
Font.Style = [fsBold] Font.Style = [fsBold]
ParentFont = False ParentFont = False
TabOrder = 48 TabOrder = 47
Visible = False Visible = False
OnClick = bt_printmdClick OnClick = bt_printmdClick
end end
@ -662,7 +663,7 @@
Top = 10000 Top = 10000
Style.HotTrack = False Style.HotTrack = False
Style.TransparentBorder = False Style.TransparentBorder = False
TabOrder = 49 TabOrder = 48
Visible = False Visible = False
OnClick = edtScanEnter OnClick = edtScanEnter
Width = 121 Width = 121
@ -672,7 +673,7 @@
Top = 10000 Top = 10000
Style.HotTrack = False Style.HotTrack = False
Style.TransparentBorder = False Style.TransparentBorder = False
TabOrder = 50 TabOrder = 49
Visible = False Visible = False
OnClick = edtScanEnter OnClick = edtScanEnter
Width = 121 Width = 121
@ -682,7 +683,7 @@
Top = 10000 Top = 10000
Style.HotTrack = False Style.HotTrack = False
Style.TransparentBorder = False Style.TransparentBorder = False
TabOrder = 51 TabOrder = 50
Visible = False Visible = False
OnClick = edtScanEnter OnClick = edtScanEnter
Width = 121 Width = 121
@ -778,7 +779,7 @@
SizeOptions.SizableVert = True SizeOptions.SizableVert = True
AllowRemove = False AllowRemove = False
Hidden = True Hidden = True
ItemIndex = 4 ItemIndex = 2
Padding.Left = -15 Padding.Left = -15
Padding.Top = -5 Padding.Top = -5
Padding.AssignedValues = [lpavLeft, lpavTop] Padding.AssignedValues = [lpavLeft, lpavTop]
@ -797,7 +798,7 @@
SizeOptions.Width = 697 SizeOptions.Width = 697
AllowRemove = False AllowRemove = False
Hidden = True Hidden = True
ItemIndex = 3 ItemIndex = 4
LayoutDirection = ldHorizontal LayoutDirection = ldHorizontal
Padding.Bottom = -10 Padding.Bottom = -10
Padding.Top = -10 Padding.Top = -10
@ -2353,7 +2354,11 @@
OnClick = FrameKeyBoard1SpeedButton1Click OnClick = FrameKeyBoard1SpeedButton1Click
end end
inherited SpeedButton5: TSpeedButton inherited SpeedButton5: TSpeedButton
Left = 58
Top = 59
OnClick = FrameKeyBoard1SpeedButton1Click OnClick = FrameKeyBoard1SpeedButton1Click
ExplicitLeft = 58
ExplicitTop = 59
end end
inherited SpeedButton8: TSpeedButton inherited SpeedButton8: TSpeedButton
OnClick = FrameKeyBoard1SpeedButton1Click OnClick = FrameKeyBoard1SpeedButton1Click

View File

@ -368,6 +368,7 @@ type
procedure initEditPiece(); procedure initEditPiece();
procedure GetPacketNo(); procedure GetPacketNo();
procedure GetRulePacketNo(); procedure GetRulePacketNo();
procedure CheckRulePacketNo();
procedure getPlanImage(MSubID: string); procedure getPlanImage(MSubID: string);
function deletePack(packId: string): boolean; function deletePack(packId: string): boolean;
function checkPicecNo(): boolean; function checkPicecNo(): boolean;
@ -447,7 +448,32 @@ begin
Application.MessageBox('该颜色未在待检布仓库,不可以检验该颜色!', '提示信息', MB_ICONERROR); Application.MessageBox('该颜色未在待检布仓库,不可以检验该颜色!', '提示信息', MB_ICONERROR);
exit; exit;
end; end;
if ((trim(Coefficient.text) = '') and ((trim(lblRuleConversion.text) = '无需转换') or (trim(lblRuleConversion.text) = ''))) or (trim(C_Width.text) = '') or (trim(C_GramWeight.text) = '') then
begin
with ADOCmd do
begin
Close;
SQL.Clear;
SQL.Add(' select * from Trade_Cloth_Inspect A where A.mainid=''' + trim(Fmainid) + ''' ');
SQL.Add(' and A.C_Name=''' + trim(CodeName.text) + '''');
Open;
end;
if ADOCmd.IsEmpty then
begin
Application.MessageBox('该卷为第一卷,不允许克重门幅系数为空!', '提示信息', MB_ICONERROR);
exit;
end;
end;
// if (trim(Coefficient.text) <> '') and ((trim(lblRuleConversion.text) = '无需转换') or (trim(lblRuleConversion.text) = '')) then
// begin
// Application.MessageBox('系数不是空的时候,不能为无需转换!', '提示信息', MB_ICONERROR);
// exit;
// end;
if (trim(Coefficient.text) = '') and ((trim(lblRuleConversion.text) <> '无需转换') or (trim(lblRuleConversion.text) = '')) then
begin
Application.MessageBox('系数不能为空!', '提示信息', MB_ICONERROR);
exit;
end;
if CheckData('提交') = false then if CheckData('提交') = false then
exit; exit;
@ -1318,6 +1344,7 @@ begin
Close; Close;
SQL.Clear; SQL.Clear;
SQL.Add('EXEC P_Trade_Insp_Get_plan @SubID=''' + trim(MSubID) + ''''); SQL.Add('EXEC P_Trade_Insp_Get_plan @SubID=''' + trim(MSubID) + '''');
// showmessage(sql.text);
Open; Open;
if not IsEmpty then if not IsEmpty then
@ -1366,10 +1393,10 @@ begin
FC_Color := trim(fieldbyName('C_Color').AsString); FC_Color := trim(fieldbyName('C_Color').AsString);
FC_ColorNo := trim(fieldbyName('C_ColorNo').AsString); FC_ColorNo := trim(fieldbyName('C_ColorNo').AsString);
FC_EColor := trim(fieldbyName('C_EColor').AsString); FC_EColor := trim(fieldbyName('C_EColor').AsString);
FC_Width := trim(fieldbyName('C_Width').AsString); // FC_Width := trim(fieldbyName('C_Width').AsString);
FC_GramWeight := trim(fieldbyName('C_GramWeight').AsString); // FC_GramWeight := trim(fieldbyName('C_GramWeight').AsString);
C_width.Text := FC_Width; // C_width.Text := FC_Width;
C_GramWeight.Text := FC_GramWeight; // C_GramWeight.Text := FC_GramWeight;
FC_Pattern := trim(fieldbyName('C_Pattern').AsString); FC_Pattern := trim(fieldbyName('C_Pattern').AsString);
C_Pattern.Text := trim(fieldbyName('C_Pattern').AsString); C_Pattern.Text := trim(fieldbyName('C_Pattern').AsString);
customStrField1.Text := trim(fieldbyName('PO').AsString); customStrField1.Text := trim(fieldbyName('PO').AsString);
@ -1437,9 +1464,7 @@ begin
cds_params.Post; cds_params.Post;
// //
// BatchNO.Text := trim(fieldbyName('batchNo').AsString); // BatchNO.Text := trim(fieldbyName('batchNo').AsString);
// Coefficient.Text := trim(fieldbyName('Coefficient').AsString);
Coefficient.Text := trim(fieldbyName('Coefficient').AsString);
// 转换系数 // 转换系数
lblRuleConversion.ItemIndex := lblRuleConversion.Properties.Items.IndexOf(fieldbyName('RuleConversion').AsString); lblRuleConversion.ItemIndex := lblRuleConversion.Properties.Items.IndexOf(fieldbyName('RuleConversion').AsString);
@ -1490,6 +1515,32 @@ begin
application.MessageBox('输入的条码错误,请检查!', '警告信息'); application.MessageBox('输入的条码错误,请检查!', '警告信息');
end; end;
end; end;
with ADOQueryBaseTemp do
begin
Close;
SQL.Clear;
SQL.Add('EXEC P_Trade_Insp_Get_WFKZ @SubID=''' + trim(FSubId) + '''');
// showmessage(sql.text);
Open;
if not IsEmpty then
begin
FC_Width := trim(fieldbyName('C_Width').AsString);
FC_GramWeight := trim(fieldbyName('C_GramWeight').AsString);
C_width.Text := FC_Width;
C_GramWeight.Text := FC_GramWeight;
Coefficient.Text := trim(fieldbyName('Coefficient').AsString);
lblRuleConversion.Text := trim(fieldbyName('lblRuleConversion').AsString);
end
else
begin
C_width.Text := '';
C_GramWeight.Text := '';
Coefficient.Text := '';
lblRuleConversion.Text := '';
end;
end;
with ADOQueryBaseCmd do with ADOQueryBaseCmd do
begin begin
Close; Close;
@ -1629,10 +1680,83 @@ begin
if CDS_3.FieldByName('ssel').AsBoolean = True then if CDS_3.FieldByName('ssel').AsBoolean = True then
begin begin
FCXPacketCIID := FCXPacketCIID + ',' + trim(cds_3.fieldbyName('CIID').AsString); FCXPacketCIID := FCXPacketCIID + ',' + trim(cds_3.fieldbyName('CIID').AsString);
end; end;
Next; Next;
end; end;
with ADOQueryBaseCmd do
begin
close;
sql.clear;
sql.add('select top 1 isnull(PacketNo,0) PacketNo from Trade_Cloth_Inspect ');
SQL.Add('where EXISTS(select X.RTValue from [dbo].[F_Tool_SplitString](' + QuotedStr(FCXPacketCIID) + ','','') X where Trade_Cloth_Inspect.CIID=X.RTValue ) ');
sql.add(' order by PacketNo desc');
// showmessage(SQL.text);
Open;
end;
if ADOQueryBaseCmd.fieldbyName('PacketNo').asfloat > 0 then
begin
Application.MessageBox('请先撤销打包之后,再重新打包!', '提示', 0);
exit;
end;
// CheckRulePacketNo();
// GetRulePacketNo(); 判断最大包号
try
if FRulePackNo = '按缸号生成' then
begin
with ADOQueryBaseTemp do
begin
Close;
SQL.Clear;
SQL.Add('select * from Trade_Cloth_Inspect X ');
sql.Add('where X.mainID=''' + Trim(FMainId) + ''' and X.subid=''' + Trim(FSubId) + ''' and X.PacketNo=''' + Trim(edtPacketNo.text) + ''' and X.c_color=' + quotedstr(Trim(FC_Color)) + ' and isnull(X.BatchNO,'''')=' + quotedstr(Trim(BatchNO.Text)));
Open;
end;
end
else if FRulePackNo = '按订单生成' then
begin
with ADOQueryBaseTemp do
begin
Close;
SQL.Clear;
SQL.Add('select * from Trade_Cloth_Inspect X ');
SQL.Add('where X.mainID=''' + Trim(FMainId) + ''' and X.PacketNo=''' + Trim(edtPacketNo.text) + ''' and OrderNo=' + QuotedStr(trim(OrderNo.Text)));
Open;
end;
end
else if FRulePackNo = '按颜色生成' then
begin
with ADOQueryBaseTemp do
begin
Close;
SQL.Clear;
SQL.Add('select * from Trade_Cloth_Inspect X ');
sql.Add('where X.mainID=''' + Trim(FMainId) + ''' and X.subid=''' + Trim(FSubId) + ''' and X.PacketNo=''' + Trim(edtPacketNo.text) + ''' and X.c_color=' + quotedstr(Trim(FC_Color)));
Open;
end;
end
else
begin
with ADOQueryBaseTemp do
begin
Close;
SQL.Clear;
SQL.Add('select * from Trade_Cloth_Inspect X ');
SQL.Add('where X.mainID=''' + Trim(FMainId) + ''' and X.PacketNo=''' + Trim(edtPacketNo.text) + ''' and OrderNo=' + QuotedStr(trim(OrderNo.Text)));
Open;
end;
end;
if not ADOQueryBaseTemp.IsEmpty then
begin
Application.MessageBox('该包号已经存在,请重新输入!', '提示', 0);
exit;
end;
except
end;
if GetLSNo(ADOQueryBaseTemp, MPacketId, 'BI', 'Trade_Cloth_Inspect', 4, 1) = false then if GetLSNo(ADOQueryBaseTemp, MPacketId, 'BI', 'Trade_Cloth_Inspect', 4, 1) = false then
begin begin
Application.MessageBox('取包条码最大号失败!', '提示', 0); Application.MessageBox('取包条码最大号失败!', '提示', 0);
@ -2218,7 +2342,7 @@ begin
Application.MessageBox('取包条码最大号失败!', '提示', 0); Application.MessageBox('取包条码最大号失败!', '提示', 0);
exit; exit;
end; end;
GetRulePacketNo();
try try
ADOQueryBaseCmd.Connection.BeginTrans; ADOQueryBaseCmd.Connection.BeginTrans;
with ADOQueryBaseCmd do with ADOQueryBaseCmd do
@ -2717,7 +2841,7 @@ begin
//自定义输入1 //自定义输入1
fieldbyName('customStrField1').value := trim(customStrField1.Text); fieldbyName('customStrField1').value := trim(customStrField1.Text);
fieldbyName('customStrField2').value := trim(customStrField2.Text); fieldbyName('customStrField2').value := trim(customStrField2.Text);
fieldbyName('lblRuleConversion').value := trim(lblRuleConversion.Text);
//拼匹 //拼匹
if FieldList.FieldByName('unitPieces') <> nil then if FieldList.FieldByName('unitPieces') <> nil then
fieldbyName('unitPieces').value := funitPiecesStr; fieldbyName('unitPieces').value := funitPiecesStr;
@ -3149,11 +3273,28 @@ begin
end end
else else
InputLen.Text := format('%.' + trim(FMPlace) + 'f', [i1 / 100000 / 0.9144]); InputLen.Text := format('%.' + trim(FMPlace) + 'f', [i1 / 100000 / 0.9144]);
// if frameBads1.cxCheck_len.Checked and (trim(InputLen.Text) <> '') then
// begin
// frameBads1.CIFBeg.Text := trim(InputLen.Text);
// frameBads1.CIFEnd.SetFocus;
// end
// else
// begin
// frameBads1.CIFBeg.Text := ''
// end;
end end
else else
begin begin
InputLen.Text := format('%.' + trim(FMPlace) + 'f', [i1 / 100000]); InputLen.Text := format('%.' + trim(FMPlace) + 'f', [i1 / 100000]);
// if frameBads1.cxCheck_len.Checked and (trim(InputLen.Text) <> '') then
// begin
// frameBads1.CIFBeg.Text := trim(InputLen.Text);
// frameBads1.CIFEnd.SetFocus;
// end
// else
// begin
// frameBads1.CIFBeg.Text := ''
// end;
if i2 = 0 then if i2 = 0 then
begin begin
SetUnit('M'); SetUnit('M');
@ -3332,6 +3473,69 @@ begin
end; end;
procedure TfrmMachRollMain.CheckRulePacketNo();
var
mMaxPacketNo: string;
begin
try
if FRulePackNo = '按缸号生成' then
begin
with ADOQueryBaseTemp do
begin
Close;
SQL.Clear;
SQL.Add('select * from Trade_Cloth_Inspect X ');
sql.Add('where X.mainID=''' + Trim(FMainId) + ''' and X.subid=''' + Trim(FSubId) + ''' and X.c_color=' + quotedstr(Trim(FC_Color)) + ' and isnull(X.BatchNO,'''')=' + quotedstr(Trim(BatchNO.Text)));
Open;
end;
end
else if FRulePackNo = '按订单生成' then
begin
with ADOQueryBaseTemp do
begin
Close;
SQL.Clear;
SQL.Add('select * from Trade_Cloth_Inspect X ');
SQL.Add('where X.mainID=''' + Trim(FMainId) + ''' and OrderNo=' + QuotedStr(trim(OrderNo.Text)));
Open;
end;
end
else if FRulePackNo = '按颜色生成' then
begin
with ADOQueryBaseTemp do
begin
Close;
SQL.Clear;
SQL.Add('select * from Trade_Cloth_Inspect X ');
sql.Add('where X.mainID=''' + Trim(FMainId) + ''' and X.subid=''' + Trim(FSubId) + ''' and X.c_color=' + quotedstr(Trim(FC_Color)));
Open;
end;
end
else
begin
with ADOQueryBaseTemp do
begin
Close;
SQL.Clear;
SQL.Add('select * from Trade_Cloth_Inspect X ');
SQL.Add('where X.mainID=''' + Trim(FMainId) + ''' and OrderNo=' + QuotedStr(trim(OrderNo.Text)));
Open;
end;
end;
// mMaxPacketNo := trim(ADOQueryBaseTemp.fieldbyName('MaxPacketNo').AsString);
// if mMaxPacketNo = '' then
// mMaxPacketNo := '1';
//
// edtPacketNo.Text := mMaxPacketNo;
except
end;
end;
procedure TfrmMachRollMain.getPlanImage(MSubID: string); procedure TfrmMachRollMain.getPlanImage(MSubID: string);
begin begin
with ADOQueryImage do with ADOQueryImage do

View File

@ -55,7 +55,6 @@ object frmParamSet: TfrmParamSet
inherited cxGroupBox1: TcxGroupBox inherited cxGroupBox1: TcxGroupBox
Style.Font.Charset = GB2312_CHARSET Style.Font.Charset = GB2312_CHARSET
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitTop = 2
ExplicitWidth = 771 ExplicitWidth = 771
Width = 771 Width = 771
inherited Label34: TLabel inherited Label34: TLabel

View File

@ -4,10 +4,9 @@ interface
uses uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
System.Classes, Vcl.Graphics, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, U_frameParam, cxGraphics, cxControls, U_frameParam, cxGraphics, cxControls, cxLookAndFeels, cxLookAndFeelPainters,
cxLookAndFeels, cxLookAndFeelPainters, cxGeometry, cxGeometry, dxFramedControl, Vcl.Menus, Vcl.StdCtrls, cxButtons, dxPanel,
dxFramedControl, Vcl.Menus, Vcl.StdCtrls, cxButtons, dxPanel,
Vcl.Touch.Keyboard, Vcl.ExtCtrls, Data.DB, Datasnap.DBClient, dxSkinsCore; Vcl.Touch.Keyboard, Vcl.ExtCtrls, Data.DB, Datasnap.DBClient, dxSkinsCore;
type type
@ -36,6 +35,7 @@ var
frmParamSet: TfrmParamSet; frmParamSet: TfrmParamSet;
implementation implementation
uses uses
U_iniparam; U_iniparam;
{$R *.dfm} {$R *.dfm}
@ -48,58 +48,57 @@ begin
with FrameParam1 do with FrameParam1 do
begin begin
if Trim(edtChen.Text) = '£' then if Trim(edtChen.Text) = '£' then
cds_params.fieldByName('chen').Value:='1' cds_params.fieldByName('chen').Value := '1'
else else
cds_params.fieldByName('chen').Value:='0'; cds_params.fieldByName('chen').Value := '0';
if Trim(edtMaBiao.Text) = '£' then if Trim(edtMaBiao.Text) = '£' then
cds_params.fieldByName('mabiao').Value:='1' cds_params.fieldByName('mabiao').Value := '1'
else else
cds_params.fieldByName('mabiao').Value:='0'; cds_params.fieldByName('mabiao').Value := '0';
if Trim(edtMBDW.Text) = '£' then if Trim(edtMBDW.Text) = '£' then
cds_params.fieldByName('mbunit').Value:='1' cds_params.fieldByName('mbunit').Value := '1'
else else
cds_params.fieldByName('mbunit').Value:='0'; cds_params.fieldByName('mbunit').Value := '0';
// //
cds_params.fieldByName('weightRule').Value:=weightRule.ItemIndex ; cds_params.fieldByName('weightRule').Value := weightRule.ItemIndex;
// 놔笭 // 놔笭
cds_params.fieldByName('outPage').Value:=outPage.Text ; cds_params.fieldByName('outPage').Value := outPage.Text;
cds_params.fieldByName('labNumber').Value:=StrToIntDef(labNumber.Text ,1); cds_params.fieldByName('labNumber').Value := StrToIntDef(labNumber.Text, 1);
// //
cds_params.fieldByName('MinLen').Value:=StrToIntDef(Trim(MinLen.Text) ,0); cds_params.fieldByName('MinLen').Value := StrToIntDef(Trim(MinLen.Text), 0);
cds_params.fieldByName('MaxLen').Value:=StrToIntDef(Trim(MaxLen.Text) ,100); cds_params.fieldByName('MaxLen').Value := StrToIntDef(Trim(MaxLen.Text), 100);
cds_params.fieldByName('MinWeight').Value:=StrToIntDef(Trim(MinWeight.Text) ,0); cds_params.fieldByName('MinWeight').Value := StrToIntDef(Trim(MinWeight.Text), 0);
cds_params.fieldByName('MaxWeight').Value:=StrToIntDef(Trim(MaxWeight.Text) ,100); cds_params.fieldByName('MaxWeight').Value := StrToIntDef(Trim(MaxWeight.Text), 100);
cds_params.fieldByName('MPlace').Value := StrToIntDef(Trim(MPlace.Text), 1);
cds_params.fieldByName('YPlace').Value := StrToIntDef(Trim(YPlace.Text), 1);
cds_params.fieldByName('KgPlace').Value := StrToIntDef(Trim(KgPlace.Text), 1);
cds_params.fieldByName('MPlace').Value:=StrToIntDef(Trim(MPlace.Text) ,1); cds_params.fieldByName('BeginPieceNo').Value := StrToIntDef(Trim(BeginPieceNo.Text), 1);
cds_params.fieldByName('YPlace').Value:=StrToIntDef(Trim(YPlace.Text) ,1); cds_params.fieldByName('EndPieceNo').Value := StrToIntDef(Trim(EndPieceNo.Text), 1);
cds_params.fieldByName('KgPlace').Value:=StrToIntDef(Trim(KgPlace.Text) ,1);
cds_params.fieldByName('BeginPieceNo').Value:=StrToIntDef(Trim(BeginPieceNo.Text) ,1);
cds_params.fieldByName('EndPieceNo').Value:=StrToIntDef(Trim(EndPieceNo.Text) ,1);
// 댔관 // 댔관
cds_params.fieldByName('dabao').Value:= trim(edtdabao.Text); cds_params.fieldByName('dabao').Value := trim(edtdabao.Text);
cds_params.fieldByName('packRolls').Value:=StrToIntDef(Trim(packRolls.Text) ,2); cds_params.fieldByName('packRolls').Value := StrToIntDef(Trim(packRolls.Text), 2);
cds_params.fieldByName('packnoMake').Value:= packnoMake.Text; cds_params.fieldByName('packnoMake').Value := packnoMake.Text;
cds_params.fieldByName('packPostAction').Value:=trim( packPrintAction.Text); cds_params.fieldByName('packPostAction').Value := trim(packPrintAction.Text);
cds_params.fieldByName('packlabNumber').Value:=StrToIntDef(packlabNumber.Text ,0); cds_params.fieldByName('packlabNumber').Value := StrToIntDef(packlabNumber.Text, 0);
cds_params.fieldByName('packPrintPreview').value:=packPrintPreview.checked; cds_params.fieldByName('packPrintPreview').value := packPrintPreview.checked;
// //
cds_params.fieldByName('rollnoMake').Value:= rollnoMake.Text; cds_params.fieldByName('rollnoMake').Value := rollnoMake.Text;
cds_params.fieldByName('AddwetPresent').Value:=StrToFloatDef(Trim(AddwetPresent.Text) ,0); cds_params.fieldByName('AddwetPresent').Value := StrToFloatDef(Trim(AddwetPresent.Text), 0);
cds_params.fieldByName('AddLenPresent').Value:=StrToFloatDef(Trim(AddLenPresent.Text) ,0); cds_params.fieldByName('AddLenPresent').Value := StrToFloatDef(Trim(AddLenPresent.Text), 0);
gPresentNumFlag:=presentNumFlag.itemIndex; gPresentNumFlag := presentNumFlag.itemIndex;
end; end;
cds_params.Post; cds_params.Post;
@ -142,62 +141,55 @@ begin
edtMBDW.Text := ''; edtMBDW.Text := '';
// //
weightRule.ItemIndex :=cds_params.fieldByName('weightRule').AsInteger; weightRule.ItemIndex := cds_params.fieldByName('weightRule').AsInteger;
// 놔笭 // 놔笭
outPage.Text := Trim(cds_params.fieldByName('outPage').AsString); outPage.Text := Trim(cds_params.fieldByName('outPage').AsString);
labNumber.ItemIndex := labNumber.Items.IndexOf labNumber.ItemIndex := labNumber.Items.IndexOf(cds_params.fieldByName('labNumber').AsString);
(cds_params.fieldByName('labNumber').AsString);
// //
MinLen.Text := cds_params.fieldByName('MinLen').AsString; MinLen.Text := cds_params.fieldByName('MinLen').AsString;
MaxLen.Text := cds_params.fieldByName('MaxLen').AsString; MaxLen.Text := cds_params.fieldByName('MaxLen').AsString;
MinWeight.Text := cds_params.fieldByName('MinWeight').AsString; MinWeight.Text := cds_params.fieldByName('MinWeight').AsString;
MaxWeight.Text := cds_params.fieldByName('MaxWeight').AsString; MaxWeight.Text := cds_params.fieldByName('MaxWeight').AsString;
if cds_params.fieldByName('BeginPieceNo').AsString<>'0' then if cds_params.fieldByName('BeginPieceNo').AsString <> '0' then
BeginPieceNo.Text := cds_params.fieldByName('BeginPieceNo').AsString; BeginPieceNo.Text := cds_params.fieldByName('BeginPieceNo').AsString;
if cds_params.fieldByName('EndPieceNo').AsString<>'0' then if cds_params.fieldByName('EndPieceNo').AsString <> '0' then
EndPieceNo.Text := cds_params.fieldByName('EndPieceNo').AsString; EndPieceNo.Text := cds_params.fieldByName('EndPieceNo').AsString;
MPlace.Text := cds_params.fieldByName('MPlace').AsString; MPlace.Text := cds_params.fieldByName('MPlace').AsString;
YPlace.Text := cds_params.fieldByName('YPlace').AsString; YPlace.Text := cds_params.fieldByName('YPlace').AsString;
KgPlace.Text := cds_params.fieldByName('KgPlace').AsString; KgPlace.Text := cds_params.fieldByName('KgPlace').AsString;
AddwetPresent.Text :='';// cds_params.fieldByName('AddwetPresent').AsString; AddwetPresent.Text := ''; // cds_params.fieldByName('AddwetPresent').AsString;
AddLenPresent.Text :='';// cds_params.fieldByName('AddLenPresent').AsString; AddLenPresent.Text := ''; // cds_params.fieldByName('AddLenPresent').AsString;
// 댔관 // 댔관
edtdabao.Text := cds_params.fieldByName('dabao').AsString; edtdabao.Text := cds_params.fieldByName('dabao').AsString;
if cds_params.fieldByName('packRolls').AsInteger>0 then if cds_params.fieldByName('packRolls').AsInteger > 0 then
packRolls.Text := cds_params.fieldByName('packRolls').AsString; packRolls.Text := cds_params.fieldByName('packRolls').AsString;
packPrintPreview.checked:= cds_params.fieldByName('packPrintPreview').AsBoolean; packPrintPreview.checked := cds_params.fieldByName('packPrintPreview').AsBoolean;
packlabNumber.ItemIndex := packlabNumber.Properties.Items.IndexOf packlabNumber.ItemIndex := packlabNumber.Properties.Items.IndexOf(cds_params.fieldByName('packlabNumber').AsString);
(cds_params.fieldByName('packlabNumber').AsString);
// //
packnoMake.ItemIndex := packnoMake.Properties.Items.IndexOf // packnoMake.ItemIndex := packnoMake.Properties.Items.IndexOf
(cds_params.fieldByName('packnoMake').AsString); // (cds_params.fieldByName('packnoMake').AsString);
packnoMake.text := 'ÊÖ¶¯';
//댔丹관뵀 //댔丹관뵀
packPrintAction.ItemIndex := packPrintAction.Properties.Items.IndexOf packPrintAction.ItemIndex := packPrintAction.Properties.Items.IndexOf(cds_params.fieldByName('packPostAction').AsString);
(cds_params.fieldByName('packPostAction').AsString);
if packPrintAction.ItemIndex=-1 then if packPrintAction.ItemIndex = -1 then
packPrintAction.ItemIndex:=1; packPrintAction.ItemIndex := 1;
if packnoMake.ItemIndex =-1 then // if packnoMake.ItemIndex =-1 then
packnoMake.ItemIndex :=0; // packnoMake.ItemIndex :=0;
//
rollnoMake.ItemIndex := rollnoMake.Properties.Items.IndexOf(cds_params.fieldByName('rollnoMake').AsString);
if rollnoMake.ItemIndex = -1 then
rollnoMake.ItemIndex := 0;
// //
rollnoMake.ItemIndex := rollnoMake.Properties.Items.IndexOf presentNumFlag.itemIndex := gPresentNumFlag;
(cds_params.fieldByName('rollnoMake').AsString);
if rollnoMake.ItemIndex =-1 then
rollnoMake.ItemIndex :=0;
//
presentNumFlag.itemIndex:=gPresentNumFlag;
end; end;
end; end;
@ -206,26 +198,27 @@ end;
procedure TfrmParamSet.FrameParam1BeginPieceNoPropertiesChange(Sender: TObject); procedure TfrmParamSet.FrameParam1BeginPieceNoPropertiesChange(Sender: TObject);
begin begin
if (StrToIntDef(Trim(FrameParam1.BeginPieceNo.Text),0)>0) OR (StrToIntDef(Trim(FrameParam1.EndPieceNo.Text),0)>0) then if (StrToIntDef(Trim(FrameParam1.BeginPieceNo.Text), 0) > 0) or (StrToIntDef(Trim(FrameParam1.EndPieceNo.Text), 0) > 0) then
begin begin
FrameParam1.rollnoMake.ItemIndex:=1; FrameParam1.rollnoMake.ItemIndex := 1;
end end
else else
begin begin
FrameParam1.rollnoMake.ItemIndex:=0; FrameParam1.rollnoMake.ItemIndex := 0;
end; end;
end; end;
procedure TfrmParamSet.FrameParam1EndPieceNoPropertiesChange(Sender: TObject); procedure TfrmParamSet.FrameParam1EndPieceNoPropertiesChange(Sender: TObject);
begin begin
if ( StrToIntDef(Trim(FrameParam1.EndPieceNo.Text),0)>0) or (StrToIntDef(Trim(FrameParam1.BeginPieceNo.Text),0)>0) then if (StrToIntDef(Trim(FrameParam1.EndPieceNo.Text), 0) > 0) or (StrToIntDef(Trim(FrameParam1.BeginPieceNo.Text), 0) > 0) then
begin begin
FrameParam1.rollnoMake.ItemIndex:=1; FrameParam1.rollnoMake.ItemIndex := 1;
end end
else else
begin begin
FrameParam1.rollnoMake.ItemIndex:=0; FrameParam1.rollnoMake.ItemIndex := 0;
end; end;
end; end;
end. end.

View File

@ -211,6 +211,7 @@ object frameBads: TframeBads
Top = 54 Top = 54
Caption = #38271#24230 Caption = #38271#24230
ParentFont = False ParentFont = False
State = cbsChecked
Style.HotTrack = False Style.HotTrack = False
Style.TransparentBorder = False Style.TransparentBorder = False
TabOrder = 3 TabOrder = 3