diff --git a/A05基础资料管�/U_MachineManage.dfm b/A05基础资料管�/U_MachineManage.dfm
index 5eba3d2..8d17fc3 100644
--- a/A05基础资料管�/U_MachineManage.dfm
+++ b/A05基础资料管�/U_MachineManage.dfm
@@ -17,7 +17,7 @@ inherited frmMachineManage: TfrmMachineManage
Height = 38
AutoSize = True
ButtonHeight = 38
- ButtonWidth = 97
+ ButtonWidth = 98
Caption = 'ToolBar1'
Color = clSkyBlue
DisabledImages = DataLink_BaseInfo.ImageList_new32
@@ -93,7 +93,7 @@ inherited frmMachineManage: TfrmMachineManage
OnClick = tbBindProdClick
end
object tbBindProd2: TToolButton
- Left = 598
+ Left = 599
Top = 0
AutoSize = True
Caption = #32465#23450#20135#21697'2'
@@ -101,7 +101,7 @@ inherited frmMachineManage: TfrmMachineManage
OnClick = tbBindProd2Click
end
object ToolButton3: TToolButton
- Left = 699
+ Left = 701
Top = 0
AutoSize = True
Caption = #25171#21360
@@ -109,15 +109,23 @@ inherited frmMachineManage: TfrmMachineManage
OnClick = ToolButton3Click
end
object ToolButton1: TToolButton
- Left = 770
+ Left = 772
Top = 0
AutoSize = True
Caption = #23548#20986
ImageIndex = 20
OnClick = ToolButton1Click
end
+ object TbSaveFormat: TToolButton
+ Left = 843
+ Top = 0
+ AutoSize = True
+ Caption = #20445#23384#26684#24335
+ ImageIndex = 16
+ OnClick = TbSaveFormatClick
+ end
object TBClose: TToolButton
- Left = 841
+ Left = 938
Top = 0
AutoSize = True
Caption = #20851#38381
@@ -206,7 +214,7 @@ inherited frmMachineManage: TfrmMachineManage
Width = 140
end
object Tv2C_Name: TcxGridDBColumn
- Caption = #20135#21697#21517#31234'1'
+ Caption = #20135#21697#21517#31216'1'
DataBinding.FieldName = 'C_Name'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
@@ -222,7 +230,7 @@ inherited frmMachineManage: TfrmMachineManage
Width = 140
end
object Tv2C_Name2: TcxGridDBColumn
- Caption = #20135#21697#21517#31234'2'
+ Caption = #20135#21697#21517#31216'2'
DataBinding.FieldName = 'C_Name2'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
diff --git a/A05基础资料管�/U_MachineManage.pas b/A05基础资料管�/U_MachineManage.pas
index 0af4354..b1d7bd8 100644
--- a/A05基础资料管�/U_MachineManage.pas
+++ b/A05基础资料管�/U_MachineManage.pas
@@ -56,6 +56,7 @@ type
Tv2C_Name: TcxGridDBColumn;
v2Column10: TcxGridDBColumn;
Tv2C_Name2: TcxGridDBColumn;
+ TbSaveFormat: TToolButton;
procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBCloseClick(Sender: TObject);
@@ -80,6 +81,7 @@ type
procedure tbPauseClick(Sender: TObject);
procedure tbBindProdClick(Sender: TObject);
procedure tbBindProd2Click(Sender: TObject);
+ procedure TbSaveFormatClick(Sender: TObject);
private
{ Private declarations }
procedure BindProduct(AFieldName, ALogAction: string);
@@ -167,6 +169,12 @@ begin
InitGrid();
end;
+procedure TfrmMachineManage.TbSaveFormatClick(Sender: TObject);
+begin
+ inherited;
+ writeCxGrid(Trim(Self.Caption), Tv2, '»ų́¹ÜÀí');
+end;
+
procedure TfrmMachineManage.ToolButton2Click(Sender: TObject);
var
sql: string;
@@ -476,39 +484,25 @@ end;
procedure TfrmMachineManage.UnbindProduct(AFieldName, ALogAction: string);
var
- MMCIDS: string;
+ MMCID, MCodeName: string;
begin
if CDS_HZ.IsEmpty then
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
- Application.MessageBox('ûÓÐÑ¡ÔñÊý¾Ý!', 'Ìáʾ', 0);
+ Application.MessageBox('µ±Ç°½¹µãÐÐûÓа󶨸òúÆ·£¬ÎÞÐè½â°ó£¡', 'Ìáʾ', 0);
Exit;
end;
- MMCIDS := '';
- CDS_HZ.DisableControls;
- 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
+ if Application.MessageBox(PChar('È·¶¨Òª½â°ó»ų́ ' + Trim(CDS_HZ.fieldbyname('MCNO').AsString)
+ + ' °ó¶¨µÄ²úÆ· ' + MCodeName + ' Âð£¿'), 'Ìáʾ', 32 + 4) <> IDYES then
Exit;
try
@@ -520,7 +514,7 @@ begin
SQL.Add('update BS_Machine set ' + AFieldName + '=' + QuotedStr(''));
SQL.Add(' , Editer=''' + Trim(DName) + '''');
SQL.Add(' , Edittime=getdate()');
- SQL.Add(' where MCID in (' + MMCIDS + ')');
+ SQL.Add(' where MCID=' + QuotedStr(MMCID));
ExecSQL;
end;
with ADOQueryCmd do
@@ -532,29 +526,16 @@ begin
SQL.Add(',getdate() ');
SQL.Add(',' + QuotedStr(Trim(self.Caption)));
SQL.Add(',' + QuotedStr(Trim(ALogAction)));
- SQL.Add(',' + QuotedStr(Trim(MMCIDS)));
+ SQL.Add(',' + QuotedStr(Trim(MMCID + ' -> ' + MCodeName)));
SQL.Add(',' + QuotedStr(Trim('³É¹¦')));
SQL.Add(')');
ExecSQL;
end;
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.fieldbyname(AFieldName).AsString := '';
- CDS_HZ.Post;
- end;
- CDS_HZ.Next;
- end;
- finally
- CDS_HZ.EnableControls;
- end;
+ CDS_HZ.Edit;
+ CDS_HZ.fieldbyname(AFieldName).AsString := '';
+ CDS_HZ.Post;
InitGrid();
Application.MessageBox('½â°ó³É¹¦£¡', 'ÌáʾÐÅÏ¢');
except
diff --git a/B01基础��管�/U_SalesConInPut.dfm b/B01基础��管�/U_SalesConInPut.dfm
index 9fe000f..b13a4f7 100644
--- a/B01基础��管�/U_SalesConInPut.dfm
+++ b/B01基础��管�/U_SalesConInPut.dfm
@@ -11,6 +11,7 @@ inherited frmSalesConInPut: TfrmSalesConInPut
OldCreateOrder = True
Position = poScreenCenter
WindowState = wsMaximized
+ ExplicitLeft = -200
ExplicitWidth = 1522
ExplicitHeight = 730
PixelsPerInch = 96
@@ -362,6 +363,7 @@ inherited frmSalesConInPut: TfrmSalesConInPut
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
+ Visible = False
end
object Label23: TLabel
Left = 39
@@ -614,6 +616,7 @@ inherited frmSalesConInPut: TfrmSalesConInPut
StyleHot.LookAndFeel.NativeStyle = True
StyleReadOnly.LookAndFeel.NativeStyle = True
TabOrder = 17
+ Visible = False
OnDblClick = cxDBImage1DblClick
Height = 281
Width = 192
@@ -649,6 +652,7 @@ inherited frmSalesConInPut: TfrmSalesConInPut
Width = 125
Height = 20
TabOrder = 20
+ Visible = False
OnBtnUpClick = PackSealBtnUpClick
OnBtnDnClick = BuyNameBtnDnClick
end
@@ -949,6 +953,13 @@ inherited frmSalesConInPut: TfrmSalesConInPut
HeaderAlignmentHorz = taCenter
Width = 58
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
Caption = #21333#20215
DataBinding.FieldName = 'ConPrice'
@@ -991,6 +1002,7 @@ inherited frmSalesConInPut: TfrmSalesConInPut
Properties.ShowFocusRect = False
Style.BorderStyle = ebsSingle
TabOrder = 4
+ Visible = False
OnDblClick = Pic_Image1DblClick
Height = 257
Width = 217
diff --git a/B01基础��管�/U_SalesConInPut.pas b/B01基础��管�/U_SalesConInPut.pas
index 3a80446..02639b9 100644
--- a/B01基础��管�/U_SalesConInPut.pas
+++ b/B01基础��管�/U_SalesConInPut.pas
@@ -131,6 +131,7 @@ type
Label25: TLabel;
SalesId: TEdit;
TallyId: TEdit;
+ Tv1c_p_length: TcxGridDBColumn;
procedure TBCloseClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure TBSaveClick(Sender: TObject);
diff --git a/B01基础��管�/U_SalesContractList.dfm b/B01基础��管�/U_SalesContractList.dfm
index 9f8d58c..e5ed243 100644
--- a/B01基础��管�/U_SalesContractList.dfm
+++ b/B01基础��管�/U_SalesContractList.dfm
@@ -701,6 +701,7 @@ inherited frmSalesContractList: TfrmSalesContractList
Align = alBottom
BorderStyle = cxcbsNone
TabOrder = 5
+ ExplicitTop = 470
object TV2: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
@@ -897,6 +898,14 @@ inherited frmSalesContractList: TfrmSalesContractList
Options.Editing = False
Width = 58
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
Caption = #21333#20215
DataBinding.FieldName = 'ConPrice'
diff --git a/B01基础��管�/U_SalesContractList.pas b/B01基础��管�/U_SalesContractList.pas
index a616bc1..2b63c54 100644
--- a/B01基础��管�/U_SalesContractList.pas
+++ b/B01基础��管�/U_SalesContractList.pas
@@ -141,6 +141,7 @@ type
cxGridLevel1: TcxGridLevel;
N5: TMenuItem;
N6: TMenuItem;
+ TV2c_p_length: TcxGridDBColumn;
procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBCloseClick(Sender: TObject);
diff --git a/E03æ¢ç»‡å�¯å¸ƒæ£€éªŒ/TatInsp.dpr b/E03æ¢ç»‡å�¯å¸ƒæ£€éªŒ/TatInsp.dpr
index 1b03898..d857567 100644
--- a/E03æ¢ç»‡å�¯å¸ƒæ£€éªŒ/TatInsp.dpr
+++ b/E03æ¢ç»‡å�¯å¸ƒæ£€éªŒ/TatInsp.dpr
@@ -32,7 +32,8 @@ uses
U_TatClothInfoSel in '..\A00ͨÓô°Ìå\U_TatClothInfoSel.pas' {frmTatClothInfoSel},
uSZHN_JSON in '..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas',
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}
diff --git a/E03æ¢ç»‡å�¯å¸ƒæ£€éªŒ/TatInsp.dproj b/E03æ¢ç»‡å�¯å¸ƒæ£€éªŒ/TatInsp.dproj
index 0b569b3..f99d3cf 100644
--- a/E03æ¢ç»‡å�¯å¸ƒæ£€éªŒ/TatInsp.dproj
+++ b/E03æ¢ç»‡å�¯å¸ƒæ£€éªŒ/TatInsp.dproj
@@ -163,6 +163,10 @@
+
+
+ dfm
+
Cfg_2
Base
diff --git a/E03æ¢ç»‡å�¯å¸ƒæ£€éªŒ/TatInspFile.INI b/E03æ¢ç»‡å�¯å¸ƒæ£€éªŒ/TatInspFile.INI
index 8c041bb..3fd1a13 100644
--- a/E03æ¢ç»‡å�¯å¸ƒæ£€éªŒ/TatInspFile.INI
+++ b/E03æ¢ç»‡å�¯å¸ƒæ£€éªŒ/TatInspFile.INI
@@ -9,9 +9,9 @@
ÆôÓÃÂë±íµ¥Î»=0
±êÇ©·ÝÊý=
Ã×ÊýÏÂÏÞ=1
-Ã×ÊýÉÏÏÞ=100
+Ã×ÊýÉÏÏÞ=200
ÖØÁ¿ÏÂÏÞ=1
ÖØÁ¿ÉÏÏÞ=100
Ã×ÊýСÊýλ=1
ÂëÊýСÊýλ=1
-ÖØÁ¿Ð¡Êýλ=1
+ÖØÁ¿Ð¡Êýλ=2
diff --git a/E03æ¢ç»‡å�¯å¸ƒæ£€éªŒ/U_SCPersonColor.pas b/E03æ¢ç»‡å�¯å¸ƒæ£€éªŒ/U_SCPersonColor.pas
index 18e6548..b69d215 100644
--- a/E03æ¢ç»‡å�¯å¸ƒæ£€éªŒ/U_SCPersonColor.pas
+++ b/E03æ¢ç»‡å�¯å¸ƒæ£€éªŒ/U_SCPersonColor.pas
@@ -83,7 +83,11 @@ begin
begin
Close;
sql.Clear;
- 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');
+ 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');
// showmessage(sql.text);
Open;
end;
@@ -104,7 +108,13 @@ begin
begin
// application.MessageBox(pchar(CDS_Kuang.FieldByName('ZDYName').AsString), 'ÌáʾÐÅÏ¢', 0);
TSpeedButton(Controls[i]).Visible := True;
- TSpeedButton(Controls[i]).Caption := Trim(ADOTmp.FieldByName('name').AsString);
+ 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);
end
else
begin
@@ -162,7 +172,11 @@ end;
procedure TfrmSCPersonColor.btn1Click(Sender: TObject);
begin
- FName := Trim(TSpeedButton(Sender).Caption);
+ //»ų́²úƷģʽϰ´Å¥Hint´æµÄÊDzúÆ·±àºÅ£¬ÆäÓàģʽ·µ»Ø°´Å¥ÎÄ×Ö
+ if Trim(TSpeedButton(Sender).Hint) <> '' then
+ FName := Trim(TSpeedButton(Sender).Hint)
+ else
+ FName := Trim(TSpeedButton(Sender).Caption);
ModalResult := 1;
end;
diff --git a/E03æ¢ç»‡å�¯å¸ƒæ£€éªŒ/U_TatMachInsp.dfm b/E03æ¢ç»‡å�¯å¸ƒæ£€éªŒ/U_TatMachInsp.dfm
index 7385864..f16949a 100644
--- a/E03æ¢ç»‡å�¯å¸ƒæ£€éªŒ/U_TatMachInsp.dfm
+++ b/E03æ¢ç»‡å�¯å¸ƒæ£€éªŒ/U_TatMachInsp.dfm
@@ -2925,10 +2925,6 @@
object 查看: TcxTabSheet
Caption = #26597#30475
ImageIndex = 1
- ExplicitLeft = 0
- ExplicitTop = 0
- ExplicitWidth = 0
- ExplicitHeight = 0
object cxGrid1: TcxGrid
Left = 0
Top = 0
diff --git a/E03æ¢ç»‡å�¯å¸ƒæ£€éªŒ/U_TatMachInsp.pas b/E03æ¢ç»‡å�¯å¸ƒæ£€éªŒ/U_TatMachInsp.pas
index fae8bf3..b5d55ff 100644
--- a/E03æ¢ç»‡å�¯å¸ƒæ£€éªŒ/U_TatMachInsp.pas
+++ b/E03æ¢ç»‡å�¯å¸ƒæ£€éªŒ/U_TatMachInsp.pas
@@ -455,6 +455,7 @@ type
procedure AllocWeaverMeter(AIdx: 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 SelBoundProduct(AMCNO: string): string; //µ¯³öÑ¡Ôñ»ų́°ó¶¨µÄ²úÆ·£¬·µ»Ø²úÆ·±àºÅ
public
fmanage: string;
fFlileFlag: string;
@@ -506,7 +507,8 @@ begin
Exit;
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;
procedure TfrmTatMachInsp.SetINIFile();
@@ -1385,7 +1387,8 @@ begin
if (trim(edtMaBiao.Text) = '¡Ì') then
begin
// 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
begin
code_table_length.Text := MLen;
@@ -2798,9 +2801,29 @@ begin
// Panel7.Visible := True;
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);
var
- MCode: string;
+ MCode, MCode2: string;
begin
try
@@ -2812,18 +2835,35 @@ begin
begin
carno.text := trim(fname);
- //´ø³ö»ų́°ó¶¨µÄ²úÆ·ÐÅÏ¢£¬ÓÐÖµÖ±½Ó¸²¸Ç
+ //´ø³ö»ų́°ó¶¨µÄ²úÆ·ÐÅÏ¢£¬ÓÐÖµÖ±½Ó¸²¸Ç£»°ó¶¨Á½¸ö²úƷʱÈÃÓû§Ñ¡Ôñ´øÈëÄĸö
MCode := '';
+ MCode2 := '';
with Self.ADOTmp do
begin
Close;
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;
if not IsEmpty then
+ begin
MCode := Trim(FieldByName('C_CodeName').AsString);
+ MCode2 := Trim(FieldByName('C_CodeName2').AsString);
+ end;
end;
+ //Ö»ÔÚ²úÆ·2°ó¶¨Ê±£¬Í¬ÑùÖ±½Ó´øÈë
+ if (MCode = '') and (MCode2 <> '') then
+ MCode := MCode2;
+
+ //Á½¸ö²úÆ·¶¼°ó¶¨Ê±µ¯³ö´ó°´Å¥Ñ¡Ôñ´°£¬µãÑ¡Äĸö´øÈëÄĸö£¬È¡ÏûÔò²»´øÈë
+ if (MCode <> '') and (MCode2 <> '') then
+ MCode := SelBoundProduct(Trim(fname));
+
if MCode <> '' then
begin
with Self.ADOTmp do