资料 合同 检验
This commit is contained in:
parent
f7618b3cc2
commit
bc39968fb1
|
|
@ -17,7 +17,7 @@ inherited frmMachineManage: TfrmMachineManage
|
||||||
Height = 38
|
Height = 38
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
ButtonHeight = 38
|
ButtonHeight = 38
|
||||||
ButtonWidth = 97
|
ButtonWidth = 98
|
||||||
Caption = 'ToolBar1'
|
Caption = 'ToolBar1'
|
||||||
Color = clSkyBlue
|
Color = clSkyBlue
|
||||||
DisabledImages = DataLink_BaseInfo.ImageList_new32
|
DisabledImages = DataLink_BaseInfo.ImageList_new32
|
||||||
|
|
@ -93,7 +93,7 @@ inherited frmMachineManage: TfrmMachineManage
|
||||||
OnClick = tbBindProdClick
|
OnClick = tbBindProdClick
|
||||||
end
|
end
|
||||||
object tbBindProd2: TToolButton
|
object tbBindProd2: TToolButton
|
||||||
Left = 598
|
Left = 599
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #32465#23450#20135#21697'2'
|
Caption = #32465#23450#20135#21697'2'
|
||||||
|
|
@ -101,7 +101,7 @@ inherited frmMachineManage: TfrmMachineManage
|
||||||
OnClick = tbBindProd2Click
|
OnClick = tbBindProd2Click
|
||||||
end
|
end
|
||||||
object ToolButton3: TToolButton
|
object ToolButton3: TToolButton
|
||||||
Left = 699
|
Left = 701
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #25171#21360
|
Caption = #25171#21360
|
||||||
|
|
@ -109,15 +109,23 @@ inherited frmMachineManage: TfrmMachineManage
|
||||||
OnClick = ToolButton3Click
|
OnClick = ToolButton3Click
|
||||||
end
|
end
|
||||||
object ToolButton1: TToolButton
|
object ToolButton1: TToolButton
|
||||||
Left = 770
|
Left = 772
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #23548#20986
|
Caption = #23548#20986
|
||||||
ImageIndex = 20
|
ImageIndex = 20
|
||||||
OnClick = ToolButton1Click
|
OnClick = ToolButton1Click
|
||||||
end
|
end
|
||||||
|
object TbSaveFormat: TToolButton
|
||||||
|
Left = 843
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384#26684#24335
|
||||||
|
ImageIndex = 16
|
||||||
|
OnClick = TbSaveFormatClick
|
||||||
|
end
|
||||||
object TBClose: TToolButton
|
object TBClose: TToolButton
|
||||||
Left = 841
|
Left = 938
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #20851#38381
|
Caption = #20851#38381
|
||||||
|
|
@ -206,7 +214,7 @@ inherited frmMachineManage: TfrmMachineManage
|
||||||
Width = 140
|
Width = 140
|
||||||
end
|
end
|
||||||
object Tv2C_Name: TcxGridDBColumn
|
object Tv2C_Name: TcxGridDBColumn
|
||||||
Caption = #20135#21697#21517#31234'1'
|
Caption = #20135#21697#21517#31216'1'
|
||||||
DataBinding.FieldName = 'C_Name'
|
DataBinding.FieldName = 'C_Name'
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
|
|
@ -222,7 +230,7 @@ inherited frmMachineManage: TfrmMachineManage
|
||||||
Width = 140
|
Width = 140
|
||||||
end
|
end
|
||||||
object Tv2C_Name2: TcxGridDBColumn
|
object Tv2C_Name2: TcxGridDBColumn
|
||||||
Caption = #20135#21697#21517#31234'2'
|
Caption = #20135#21697#21517#31216'2'
|
||||||
DataBinding.FieldName = 'C_Name2'
|
DataBinding.FieldName = 'C_Name2'
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,7 @@ type
|
||||||
Tv2C_Name: TcxGridDBColumn;
|
Tv2C_Name: TcxGridDBColumn;
|
||||||
v2Column10: TcxGridDBColumn;
|
v2Column10: TcxGridDBColumn;
|
||||||
Tv2C_Name2: TcxGridDBColumn;
|
Tv2C_Name2: TcxGridDBColumn;
|
||||||
|
TbSaveFormat: TToolButton;
|
||||||
procedure FormDestroy(Sender: TObject);
|
procedure FormDestroy(Sender: TObject);
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
procedure TBCloseClick(Sender: TObject);
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
|
@ -80,6 +81,7 @@ type
|
||||||
procedure tbPauseClick(Sender: TObject);
|
procedure tbPauseClick(Sender: TObject);
|
||||||
procedure tbBindProdClick(Sender: TObject);
|
procedure tbBindProdClick(Sender: TObject);
|
||||||
procedure tbBindProd2Click(Sender: TObject);
|
procedure tbBindProd2Click(Sender: TObject);
|
||||||
|
procedure TbSaveFormatClick(Sender: TObject);
|
||||||
private
|
private
|
||||||
{ Private declarations }
|
{ Private declarations }
|
||||||
procedure BindProduct(AFieldName, ALogAction: string);
|
procedure BindProduct(AFieldName, ALogAction: string);
|
||||||
|
|
@ -167,6 +169,12 @@ begin
|
||||||
InitGrid();
|
InitGrid();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmMachineManage.TbSaveFormatClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
writeCxGrid(Trim(Self.Caption), Tv2, '机台管理');
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrmMachineManage.ToolButton2Click(Sender: TObject);
|
procedure TfrmMachineManage.ToolButton2Click(Sender: TObject);
|
||||||
var
|
var
|
||||||
sql: string;
|
sql: string;
|
||||||
|
|
@ -476,39 +484,25 @@ end;
|
||||||
|
|
||||||
procedure TfrmMachineManage.UnbindProduct(AFieldName, ALogAction: string);
|
procedure TfrmMachineManage.UnbindProduct(AFieldName, ALogAction: string);
|
||||||
var
|
var
|
||||||
MMCIDS: string;
|
MMCID, MCodeName: string;
|
||||||
begin
|
begin
|
||||||
if CDS_HZ.IsEmpty then
|
if CDS_HZ.IsEmpty then
|
||||||
Exit;
|
Exit;
|
||||||
if not CDS_HZ.Locate('SSel', True, []) then
|
|
||||||
|
//解绑针对焦点行(光标所在机台),不用勾选
|
||||||
|
MMCID := Trim(CDS_HZ.fieldbyname('MCID').AsString);
|
||||||
|
if MMCID = '' then
|
||||||
|
Exit;
|
||||||
|
|
||||||
|
MCodeName := Trim(CDS_HZ.fieldbyname(AFieldName).AsString);
|
||||||
|
if MCodeName = '' then
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
Application.MessageBox('当前焦点行没有绑定该产品,无需解绑!', '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
MMCIDS := '';
|
if Application.MessageBox(PChar('确定要解绑机台 ' + Trim(CDS_HZ.fieldbyname('MCNO').AsString)
|
||||||
CDS_HZ.DisableControls;
|
+ ' 绑定的产品 ' + MCodeName + ' 吗?'), '提示', 32 + 4) <> IDYES then
|
||||||
try
|
|
||||||
CDS_HZ.First;
|
|
||||||
while not CDS_HZ.Eof do
|
|
||||||
begin
|
|
||||||
if CDS_HZ.fieldbyname('SSel').AsBoolean then
|
|
||||||
begin
|
|
||||||
if MMCIDS <> '' then
|
|
||||||
MMCIDS := MMCIDS + ',' + QuotedStr(Trim(CDS_HZ.fieldbyname('MCID').AsString))
|
|
||||||
else
|
|
||||||
MMCIDS := QuotedStr(Trim(CDS_HZ.fieldbyname('MCID').AsString));
|
|
||||||
end;
|
|
||||||
CDS_HZ.Next;
|
|
||||||
end;
|
|
||||||
finally
|
|
||||||
CDS_HZ.EnableControls;
|
|
||||||
end;
|
|
||||||
|
|
||||||
if MMCIDS = '' then
|
|
||||||
Exit;
|
|
||||||
|
|
||||||
if Application.MessageBox(PChar('确定要' + ALogAction + '吗?'), '提示', 32 + 4) <> IDYES then
|
|
||||||
Exit;
|
Exit;
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|
@ -520,7 +514,7 @@ begin
|
||||||
SQL.Add('update BS_Machine set ' + AFieldName + '=' + QuotedStr(''));
|
SQL.Add('update BS_Machine set ' + AFieldName + '=' + QuotedStr(''));
|
||||||
SQL.Add(' , Editer=''' + Trim(DName) + '''');
|
SQL.Add(' , Editer=''' + Trim(DName) + '''');
|
||||||
SQL.Add(' , Edittime=getdate()');
|
SQL.Add(' , Edittime=getdate()');
|
||||||
SQL.Add(' where MCID in (' + MMCIDS + ')');
|
SQL.Add(' where MCID=' + QuotedStr(MMCID));
|
||||||
ExecSQL;
|
ExecSQL;
|
||||||
end;
|
end;
|
||||||
with ADOQueryCmd do
|
with ADOQueryCmd do
|
||||||
|
|
@ -532,29 +526,16 @@ begin
|
||||||
SQL.Add(',getdate() ');
|
SQL.Add(',getdate() ');
|
||||||
SQL.Add(',' + QuotedStr(Trim(self.Caption)));
|
SQL.Add(',' + QuotedStr(Trim(self.Caption)));
|
||||||
SQL.Add(',' + QuotedStr(Trim(ALogAction)));
|
SQL.Add(',' + QuotedStr(Trim(ALogAction)));
|
||||||
SQL.Add(',' + QuotedStr(Trim(MMCIDS)));
|
SQL.Add(',' + QuotedStr(Trim(MMCID + ' -> ' + MCodeName)));
|
||||||
SQL.Add(',' + QuotedStr(Trim('成功')));
|
SQL.Add(',' + QuotedStr(Trim('成功')));
|
||||||
SQL.Add(')');
|
SQL.Add(')');
|
||||||
ExecSQL;
|
ExecSQL;
|
||||||
end;
|
end;
|
||||||
ADOQueryCmd.Connection.CommitTrans;
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
|
||||||
CDS_HZ.DisableControls;
|
|
||||||
try
|
|
||||||
CDS_HZ.First;
|
|
||||||
while not CDS_HZ.Eof do
|
|
||||||
begin
|
|
||||||
if CDS_HZ.fieldbyname('SSel').AsBoolean then
|
|
||||||
begin
|
|
||||||
CDS_HZ.Edit;
|
CDS_HZ.Edit;
|
||||||
CDS_HZ.fieldbyname(AFieldName).AsString := '';
|
CDS_HZ.fieldbyname(AFieldName).AsString := '';
|
||||||
CDS_HZ.Post;
|
CDS_HZ.Post;
|
||||||
end;
|
|
||||||
CDS_HZ.Next;
|
|
||||||
end;
|
|
||||||
finally
|
|
||||||
CDS_HZ.EnableControls;
|
|
||||||
end;
|
|
||||||
InitGrid();
|
InitGrid();
|
||||||
Application.MessageBox('解绑成功!', '提示信息');
|
Application.MessageBox('解绑成功!', '提示信息');
|
||||||
except
|
except
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ inherited frmSalesConInPut: TfrmSalesConInPut
|
||||||
OldCreateOrder = True
|
OldCreateOrder = True
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
WindowState = wsMaximized
|
WindowState = wsMaximized
|
||||||
|
ExplicitLeft = -200
|
||||||
ExplicitWidth = 1522
|
ExplicitWidth = 1522
|
||||||
ExplicitHeight = 730
|
ExplicitHeight = 730
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
|
|
@ -362,6 +363,7 @@ inherited frmSalesConInPut: TfrmSalesConInPut
|
||||||
Font.Name = #23435#20307
|
Font.Name = #23435#20307
|
||||||
Font.Style = [fsBold]
|
Font.Style = [fsBold]
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
end
|
end
|
||||||
object Label23: TLabel
|
object Label23: TLabel
|
||||||
Left = 39
|
Left = 39
|
||||||
|
|
@ -614,6 +616,7 @@ inherited frmSalesConInPut: TfrmSalesConInPut
|
||||||
StyleHot.LookAndFeel.NativeStyle = True
|
StyleHot.LookAndFeel.NativeStyle = True
|
||||||
StyleReadOnly.LookAndFeel.NativeStyle = True
|
StyleReadOnly.LookAndFeel.NativeStyle = True
|
||||||
TabOrder = 17
|
TabOrder = 17
|
||||||
|
Visible = False
|
||||||
OnDblClick = cxDBImage1DblClick
|
OnDblClick = cxDBImage1DblClick
|
||||||
Height = 281
|
Height = 281
|
||||||
Width = 192
|
Width = 192
|
||||||
|
|
@ -649,6 +652,7 @@ inherited frmSalesConInPut: TfrmSalesConInPut
|
||||||
Width = 125
|
Width = 125
|
||||||
Height = 20
|
Height = 20
|
||||||
TabOrder = 20
|
TabOrder = 20
|
||||||
|
Visible = False
|
||||||
OnBtnUpClick = PackSealBtnUpClick
|
OnBtnUpClick = PackSealBtnUpClick
|
||||||
OnBtnDnClick = BuyNameBtnDnClick
|
OnBtnDnClick = BuyNameBtnDnClick
|
||||||
end
|
end
|
||||||
|
|
@ -949,6 +953,13 @@ inherited frmSalesConInPut: TfrmSalesConInPut
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Width = 58
|
Width = 58
|
||||||
end
|
end
|
||||||
|
object Tv1c_p_length: TcxGridDBColumn
|
||||||
|
Caption = #21305#38271
|
||||||
|
DataBinding.FieldName = 'c_p_length'
|
||||||
|
DataBinding.IsNullValueType = True
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
object v1PRTPrice: TcxGridDBColumn
|
object v1PRTPrice: TcxGridDBColumn
|
||||||
Caption = #21333#20215
|
Caption = #21333#20215
|
||||||
DataBinding.FieldName = 'ConPrice'
|
DataBinding.FieldName = 'ConPrice'
|
||||||
|
|
@ -991,6 +1002,7 @@ inherited frmSalesConInPut: TfrmSalesConInPut
|
||||||
Properties.ShowFocusRect = False
|
Properties.ShowFocusRect = False
|
||||||
Style.BorderStyle = ebsSingle
|
Style.BorderStyle = ebsSingle
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
|
Visible = False
|
||||||
OnDblClick = Pic_Image1DblClick
|
OnDblClick = Pic_Image1DblClick
|
||||||
Height = 257
|
Height = 257
|
||||||
Width = 217
|
Width = 217
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,7 @@ type
|
||||||
Label25: TLabel;
|
Label25: TLabel;
|
||||||
SalesId: TEdit;
|
SalesId: TEdit;
|
||||||
TallyId: TEdit;
|
TallyId: TEdit;
|
||||||
|
Tv1c_p_length: TcxGridDBColumn;
|
||||||
procedure TBCloseClick(Sender: TObject);
|
procedure TBCloseClick(Sender: TObject);
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure TBSaveClick(Sender: TObject);
|
procedure TBSaveClick(Sender: TObject);
|
||||||
|
|
|
||||||
|
|
@ -701,6 +701,7 @@ inherited frmSalesContractList: TfrmSalesContractList
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
BorderStyle = cxcbsNone
|
BorderStyle = cxcbsNone
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
|
ExplicitTop = 470
|
||||||
object TV2: TcxGridDBTableView
|
object TV2: TcxGridDBTableView
|
||||||
Navigator.Buttons.CustomButtons = <>
|
Navigator.Buttons.CustomButtons = <>
|
||||||
ScrollbarAnnotations.CustomAnnotations = <>
|
ScrollbarAnnotations.CustomAnnotations = <>
|
||||||
|
|
@ -897,6 +898,14 @@ inherited frmSalesContractList: TfrmSalesContractList
|
||||||
Options.Editing = False
|
Options.Editing = False
|
||||||
Width = 58
|
Width = 58
|
||||||
end
|
end
|
||||||
|
object TV2c_p_length: TcxGridDBColumn
|
||||||
|
Caption = #21305#38271
|
||||||
|
DataBinding.FieldName = 'c_p_length'
|
||||||
|
DataBinding.IsNullValueType = True
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
object v1PRTPrice: TcxGridDBColumn
|
object v1PRTPrice: TcxGridDBColumn
|
||||||
Caption = #21333#20215
|
Caption = #21333#20215
|
||||||
DataBinding.FieldName = 'ConPrice'
|
DataBinding.FieldName = 'ConPrice'
|
||||||
|
|
|
||||||
|
|
@ -141,6 +141,7 @@ type
|
||||||
cxGridLevel1: TcxGridLevel;
|
cxGridLevel1: TcxGridLevel;
|
||||||
N5: TMenuItem;
|
N5: TMenuItem;
|
||||||
N6: TMenuItem;
|
N6: TMenuItem;
|
||||||
|
TV2c_p_length: TcxGridDBColumn;
|
||||||
procedure FormDestroy(Sender: TObject);
|
procedure FormDestroy(Sender: TObject);
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
procedure TBCloseClick(Sender: TObject);
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,8 @@ uses
|
||||||
U_TatClothInfoSel in '..\A00通用窗体\U_TatClothInfoSel.pas' {frmTatClothInfoSel},
|
U_TatClothInfoSel in '..\A00通用窗体\U_TatClothInfoSel.pas' {frmTatClothInfoSel},
|
||||||
uSZHN_JSON in '..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas',
|
uSZHN_JSON in '..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas',
|
||||||
U_SCPersonColor5 in 'U_SCPersonColor5.pas' {frmSCPersonColor5},
|
U_SCPersonColor5 in 'U_SCPersonColor5.pas' {frmSCPersonColor5},
|
||||||
U_TatKnitterQuery in 'U_TatKnitterQuery.pas' {frmTatKnitterQuery};
|
U_TatKnitterQuery in 'U_TatKnitterQuery.pas' {frmTatKnitterQuery},
|
||||||
|
U_SCPersonColor in 'U_SCPersonColor.pas' {frmSCPersonColor};
|
||||||
|
|
||||||
{$R *.res}
|
{$R *.res}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -163,6 +163,10 @@
|
||||||
<DCCReference Include="U_TatKnitterQuery.pas">
|
<DCCReference Include="U_TatKnitterQuery.pas">
|
||||||
<Form>frmTatKnitterQuery</Form>
|
<Form>frmTatKnitterQuery</Form>
|
||||||
</DCCReference>
|
</DCCReference>
|
||||||
|
<DCCReference Include="U_SCPersonColor.pas">
|
||||||
|
<Form>frmSCPersonColor</Form>
|
||||||
|
<FormType>dfm</FormType>
|
||||||
|
</DCCReference>
|
||||||
<BuildConfiguration Include="Debug">
|
<BuildConfiguration Include="Debug">
|
||||||
<Key>Cfg_2</Key>
|
<Key>Cfg_2</Key>
|
||||||
<CfgParent>Base</CfgParent>
|
<CfgParent>Base</CfgParent>
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,9 @@
|
||||||
启用码表单位=0
|
启用码表单位=0
|
||||||
标签份数=
|
标签份数=
|
||||||
米数下限=1
|
米数下限=1
|
||||||
米数上限=100
|
米数上限=200
|
||||||
重量下限=1
|
重量下限=1
|
||||||
重量上限=100
|
重量上限=100
|
||||||
米数小数位=1
|
米数小数位=1
|
||||||
码数小数位=1
|
码数小数位=1
|
||||||
重量小数位=1
|
重量小数位=2
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,10 @@ begin
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
|
if ftype = '机台产品' then
|
||||||
|
//列出该机台绑定的产品(FlagStr传机台号),按钮Hint存产品编号
|
||||||
|
sql.Add('select AA.*,row_number () over (order by code) as keyNo from(select DISTINCT B.C_Code as code, B.C_Name as name from Bs_Machine A join Bs_Cloth_Info B on B.C_Code in (A.C_CodeName, A.C_CodeName2) where A.MCNO=' + QuotedStr(Trim(FlagStr)) + ')AA')
|
||||||
|
else
|
||||||
sql.Add('select AA.*,row_number () over (order by name) as keyNo from(select DISTINCT MCNO as name from Bs_Machine where ISNULL(Status,0)=5 )AA');
|
sql.Add('select AA.*,row_number () over (order by name) as keyNo from(select DISTINCT MCNO as name from Bs_Machine where ISNULL(Status,0)=5 )AA');
|
||||||
// showmessage(sql.text);
|
// showmessage(sql.text);
|
||||||
Open;
|
Open;
|
||||||
|
|
@ -104,6 +108,12 @@ begin
|
||||||
begin
|
begin
|
||||||
// application.MessageBox(pchar(CDS_Kuang.FieldByName('ZDYName').AsString), 'ÌáʾÐÅÏ¢', 0);
|
// application.MessageBox(pchar(CDS_Kuang.FieldByName('ZDYName').AsString), 'ÌáʾÐÅÏ¢', 0);
|
||||||
TSpeedButton(Controls[i]).Visible := True;
|
TSpeedButton(Controls[i]).Visible := True;
|
||||||
|
if ftype = '机台产品' then
|
||||||
|
begin
|
||||||
|
TSpeedButton(Controls[i]).Caption := Trim(ADOTmp.FieldByName('name').AsString);
|
||||||
|
TSpeedButton(Controls[i]).Hint := Trim(ADOTmp.FieldByName('code').AsString);
|
||||||
|
end
|
||||||
|
else
|
||||||
TSpeedButton(Controls[i]).Caption := Trim(ADOTmp.FieldByName('name').AsString);
|
TSpeedButton(Controls[i]).Caption := Trim(ADOTmp.FieldByName('name').AsString);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
@ -162,6 +172,10 @@ end;
|
||||||
|
|
||||||
procedure TfrmSCPersonColor.btn1Click(Sender: TObject);
|
procedure TfrmSCPersonColor.btn1Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
|
//机台产品模式下按钮Hint存的是产品编号,其余模式返回按钮文字
|
||||||
|
if Trim(TSpeedButton(Sender).Hint) <> '' then
|
||||||
|
FName := Trim(TSpeedButton(Sender).Hint)
|
||||||
|
else
|
||||||
FName := Trim(TSpeedButton(Sender).Caption);
|
FName := Trim(TSpeedButton(Sender).Caption);
|
||||||
ModalResult := 1;
|
ModalResult := 1;
|
||||||
end;
|
end;
|
||||||
|
|
|
||||||
|
|
@ -2925,10 +2925,6 @@
|
||||||
object 查看: TcxTabSheet
|
object 查看: TcxTabSheet
|
||||||
Caption = #26597#30475
|
Caption = #26597#30475
|
||||||
ImageIndex = 1
|
ImageIndex = 1
|
||||||
ExplicitLeft = 0
|
|
||||||
ExplicitTop = 0
|
|
||||||
ExplicitWidth = 0
|
|
||||||
ExplicitHeight = 0
|
|
||||||
object cxGrid1: TcxGrid
|
object cxGrid1: TcxGrid
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
|
|
|
||||||
|
|
@ -455,6 +455,7 @@ type
|
||||||
procedure AllocWeaverMeter(AIdx: Integer);
|
procedure AllocWeaverMeter(AIdx: Integer);
|
||||||
function RoundUpToHalf(AValue: Double): Double; //decimal 0.1-0.4 -> 0.5, 0.6-0.9 -> next integer
|
function RoundUpToHalf(AValue: Double): Double; //decimal 0.1-0.4 -> 0.5, 0.6-0.9 -> next integer
|
||||||
function FormatQty2(AValue: Double): string;
|
function FormatQty2(AValue: Double): string;
|
||||||
|
function SelBoundProduct(AMCNO: string): string; //弹出选择机台绑定的产品,返回产品编号
|
||||||
public
|
public
|
||||||
fmanage: string;
|
fmanage: string;
|
||||||
fFlileFlag: string;
|
fFlileFlag: string;
|
||||||
|
|
@ -506,7 +507,8 @@ begin
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
InputLen.Text := FormatFloat('0.##', (W + AW) / KZValue);
|
// InputLen.Text := FormatFloat('0.##', (W + AW) / KZValue);
|
||||||
|
InputLen.Text := FormatFloat('0.#', RoundUpToHalf(RoundFloat((W + AW) / KZValue, 1)));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmTatMachInsp.SetINIFile();
|
procedure TfrmTatMachInsp.SetINIFile();
|
||||||
|
|
@ -1385,7 +1387,8 @@ begin
|
||||||
if (trim(edtMaBiao.Text) = '¡Ì') then
|
if (trim(edtMaBiao.Text) = '¡Ì') then
|
||||||
begin
|
begin
|
||||||
// InputLen.Text := format('%.1f', [i1 / 100000]);
|
// InputLen.Text := format('%.1f', [i1 / 100000]);
|
||||||
MLen := Format('%.1f', [i1 / 100000]);
|
// MLen := Format('%.1f', [i1 / 100000]);
|
||||||
|
MLen := FormatFloat('0.#', RoundUpToHalf(RoundFloat(i1 / 100000, 1)));
|
||||||
if Trim(edtMax.Text) = '¡Ì' then
|
if Trim(edtMax.Text) = '¡Ì' then
|
||||||
begin
|
begin
|
||||||
code_table_length.Text := MLen;
|
code_table_length.Text := MLen;
|
||||||
|
|
@ -2798,9 +2801,29 @@ begin
|
||||||
// Panel7.Visible := True;
|
// Panel7.Visible := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TfrmTatMachInsp.SelBoundProduct(AMCNO: string): string;
|
||||||
|
var
|
||||||
|
frm, OldFrm: TfrmSCPersonColor;
|
||||||
|
begin
|
||||||
|
Result := '';
|
||||||
|
OldFrm := frmSCPersonColor;
|
||||||
|
frm := TfrmSCPersonColor.Create(Self);
|
||||||
|
try
|
||||||
|
frm.FType := '机台产品';
|
||||||
|
frm.FlagStr := Trim(AMCNO);
|
||||||
|
frm.Caption := '请选择带入的产品';
|
||||||
|
if frm.ShowModal = 1 then
|
||||||
|
Result := Trim(frm.FName);
|
||||||
|
finally
|
||||||
|
frm.Free;
|
||||||
|
//还原全局变量:FormDestroy会把它置nil,外层with frmSCPersonColor的finally还在用它
|
||||||
|
frmSCPersonColor := OldFrm;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrmTatMachInsp.Button9Click(Sender: TObject);
|
procedure TfrmTatMachInsp.Button9Click(Sender: TObject);
|
||||||
var
|
var
|
||||||
MCode: string;
|
MCode, MCode2: string;
|
||||||
begin
|
begin
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|
@ -2812,17 +2835,34 @@ begin
|
||||||
begin
|
begin
|
||||||
carno.text := trim(fname);
|
carno.text := trim(fname);
|
||||||
|
|
||||||
//带出机台绑定的产品信息,有值直接覆盖
|
//带出机台绑定的产品信息,有值直接覆盖;绑定两个产品时让用户选择带入哪个
|
||||||
MCode := '';
|
MCode := '';
|
||||||
|
MCode2 := '';
|
||||||
with Self.ADOTmp do
|
with Self.ADOTmp do
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
SQL.Clear;
|
SQL.Clear;
|
||||||
SQL.Add('SELECT C_CodeName FROM Bs_Machine WHERE MCNO=' + QuotedStr(Trim(fname)));
|
SQL.Add('SELECT A.C_CodeName, ISNULL(B.C_Name,'''') AS C_Name, ');
|
||||||
|
SQL.Add(' A.C_CodeName2, ISNULL(C.C_Name,'''') AS C_Name2 ');
|
||||||
|
SQL.Add('FROM Bs_Machine A ');
|
||||||
|
SQL.Add('LEFT JOIN Bs_Cloth_Info B ON B.C_Code = A.C_CodeName ');
|
||||||
|
SQL.Add('LEFT JOIN Bs_Cloth_Info C ON C.C_Code = A.C_CodeName2 ');
|
||||||
|
SQL.Add('WHERE A.MCNO=' + QuotedStr(Trim(fname)));
|
||||||
Open;
|
Open;
|
||||||
if not IsEmpty then
|
if not IsEmpty then
|
||||||
|
begin
|
||||||
MCode := Trim(FieldByName('C_CodeName').AsString);
|
MCode := Trim(FieldByName('C_CodeName').AsString);
|
||||||
|
MCode2 := Trim(FieldByName('C_CodeName2').AsString);
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
//只在产品2绑定时,同样直接带入
|
||||||
|
if (MCode = '') and (MCode2 <> '') then
|
||||||
|
MCode := MCode2;
|
||||||
|
|
||||||
|
//两个产品都绑定时弹出大按钮选择窗,点选哪个带入哪个,取消则不带入
|
||||||
|
if (MCode <> '') and (MCode2 <> '') then
|
||||||
|
MCode := SelBoundProduct(Trim(fname));
|
||||||
|
|
||||||
if MCode <> '' then
|
if MCode <> '' then
|
||||||
begin
|
begin
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user