产品 检验

This commit is contained in:
funa 2026-09-28 17:25:53 +08:00
parent 6f6a2fda89
commit 093744eaa9
7 changed files with 77 additions and 12 deletions

View File

@ -7,6 +7,7 @@ inherited frmTatClothInfo: TfrmTatClothInfo
FormStyle = fsMDIChild
Position = poScreenCenter
Visible = True
ExplicitLeft = -271
ExplicitWidth = 1460
ExplicitHeight = 741
PixelsPerInch = 96
@ -346,8 +347,6 @@ inherited frmTatClothInfo: TfrmTatClothInfo
Align = alClient
PopupMenu = PM_1
TabOrder = 0
ExplicitTop = 42
ExplicitHeight = 370
object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
Navigator.Buttons.Delete.Enabled = False
@ -552,7 +551,6 @@ inherited frmTatClothInfo: TfrmTatClothInfo
Align = alTop
BevelOuter = bvNone
TabOrder = 1
ExplicitTop = 2
object Panel4: TPanel
Left = 0
Top = 0

View File

@ -24,7 +24,7 @@ object frmTatClothInfoInput: TfrmTatClothInfoInput
Height = 38
AutoSize = True
ButtonHeight = 38
ButtonWidth = 75
ButtonWidth = 91
Caption = 'ToolBar1'
Color = clWhite
DisabledImages = DataLink_ClothInfo.ImageList_new32
@ -50,10 +50,18 @@ object frmTatClothInfoInput: TfrmTatClothInfoInput
ImageIndex = 22
OnClick = ToolButton6Click
end
object TBClose: TToolButton
object ToolButton9: TToolButton
Left = 142
Top = 0
AutoSize = True
Caption = #20445#23384#26684#24335
ImageIndex = 16
OnClick = ToolButton9Click
end
object TBClose: TToolButton
Left = 237
Top = 0
AutoSize = True
Caption = #20851#38381
ImageIndex = 7
OnClick = TBCloseClick
@ -72,8 +80,6 @@ object frmTatClothInfoInput: TfrmTatClothInfoInput
ParentColor = False
ParentCtl3D = False
TabOrder = 1
ExplicitLeft = -8
ExplicitTop = 32
object Label1: TLabel
Left = 31
Top = 11

View File

@ -223,6 +223,7 @@ type
C_LatitudeBatchNo: TEdit;
Label14: TLabel;
Label16: TLabel;
ToolButton9: TToolButton;
procedure FormShow(Sender: TObject);
procedure TBCloseClick(Sender: TObject);
procedure ToolButton1Click(Sender: TObject);
@ -242,6 +243,7 @@ type
procedure ToolButton8Click(Sender: TObject);
procedure Edit1KeyPress(Sender: TObject; var Key: Char);
procedure Button1Click(Sender: TObject);
procedure ToolButton9Click(Sender: TObject);
private
canshu1: string;
Fint: Integer;
@ -397,6 +399,9 @@ end;
procedure TfrmTatClothInfoInput.FormShow(Sender: TObject);
begin
inherited;
ReadCxGrid(self.Caption + 'TV1', Tv1, '¾­É´Åä±È');
ReadCxGrid(self.Caption + 'TV2', Tv2, 'γɴÅä±È');
InitGrid();
if CopyInt = 1 then
begin
@ -985,5 +990,13 @@ begin
CALCYarnQty();
end;
procedure TfrmTatClothInfoInput.ToolButton9Click(Sender: TObject);
begin
inherited;
WriteCxGrid(self.Caption + 'TV1', Tv1, '¾­É´Åä±È');
WriteCxGrid(self.Caption + 'TV2', Tv2, 'γɴÅä±È');
end;
end.

View File

@ -91,7 +91,6 @@ object frmTatInspEdit: TfrmTatInspEdit
Color = clWhite
ParentBackground = False
TabOrder = 1
ExplicitTop = 18
object Label1: TLabel
Left = 745
Top = 55
@ -265,10 +264,9 @@ object frmTatInspEdit: TfrmTatInspEdit
Height = 344
Align = alClient
TabOrder = 2
ExplicitTop = 97
ExplicitHeight = 364
object TV1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
DataController.Filter.AutoDataSetFilter = True
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <>
@ -295,6 +293,7 @@ object frmTatInspEdit: TfrmTatInspEdit
object TV1Column1: TcxGridDBColumn
Caption = #30133#28857
DataBinding.FieldName = 'CIFName'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxButtonEditProperties'
Properties.Buttons = <
item
@ -308,6 +307,7 @@ object frmTatInspEdit: TfrmTatInspEdit
object cxGridDBColumn2: TcxGridDBColumn
Caption = #30133#28857#21517#31216
DataBinding.FieldName = 'CIFName'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Focusing = False
Options.Sorting = False
@ -316,6 +316,7 @@ object frmTatInspEdit: TfrmTatInspEdit
object cxGridDBColumn3: TcxGridDBColumn
Caption = #20301#32622#36215
DataBinding.FieldName = 'CIFbeg'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
Properties.OnEditValueChanged = cxGridDBColumn3PropertiesEditValueChanged
HeaderAlignmentHorz = taCenter
@ -326,6 +327,7 @@ object frmTatInspEdit: TfrmTatInspEdit
object cxGridDBColumn4: TcxGridDBColumn
Caption = #20301#32622#27490
DataBinding.FieldName = 'CIFend'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
HeaderGlyphAlignmentHorz = taCenter
Width = 79
@ -333,6 +335,7 @@ object frmTatInspEdit: TfrmTatInspEdit
object cxGridDBColumn5: TcxGridDBColumn
Caption = #38271#24230
DataBinding.FieldName = 'CIFQty'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
HeaderAlignmentHorz = taCenter
Options.Sorting = False
@ -341,6 +344,7 @@ object frmTatInspEdit: TfrmTatInspEdit
object cxGridDBColumn6: TcxGridDBColumn
Caption = #21407#22240
DataBinding.FieldName = 'CDReason'
DataBinding.IsNullValueType = True
Visible = False
HeaderAlignmentHorz = taCenter
Options.Sorting = False
@ -348,12 +352,14 @@ object frmTatInspEdit: TfrmTatInspEdit
end
object cxGridDBColumn7: TcxGridDBColumn
DataBinding.FieldName = 'CDQty'
DataBinding.IsNullValueType = True
Visible = False
Width = 60
end
object cxGridDBColumn8: TcxGridDBColumn
Caption = #25187#20998
DataBinding.FieldName = 'CIFPoints'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 73
@ -361,6 +367,7 @@ object frmTatInspEdit: TfrmTatInspEdit
object cxGridDBColumn9: TcxGridDBColumn
Caption = #20010#25968
DataBinding.FieldName = 'CIFNumber'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 69

View File

@ -9,7 +9,7 @@ uses
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
cxControls, cxGridCustomView, cxGrid, StdCtrls, ExtCtrls, ComCtrls, ToolWin,
cxButtonEdit, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxSkinsCore,
dxSkinsDefaultPainters, dxDateRanges;
dxSkinsDefaultPainters, dxDateRanges, dxSkinWXI, dxScrollbarAnnotations;
type
TfrmTatInspEdit = class(TForm)

View File

@ -7,6 +7,7 @@
FormStyle = fsMDIChild
Position = poScreenCenter
Visible = True
ExplicitTop = -137
ExplicitWidth = 1556
ExplicitHeight = 807
PixelsPerInch = 96
@ -2734,7 +2735,7 @@
Height = 193
Align = alBottom
TabOrder = 1
Properties.ActivePage = 查看
Properties.ActivePage = cxTabSheet1
Properties.CustomButtons.Buttons = <>
ClientRectBottom = 191
ClientRectLeft = 2
@ -2753,6 +2754,7 @@
object Tv2: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
OnCellDblClick = Tv2CellDblClick
DataController.DataSource = DS_2
DataController.Filter.AutoDataSetFilter = True
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]

View File

@ -367,6 +367,7 @@ type
procedure Button6Click(Sender: TObject);
procedure Button8Click(Sender: TObject);
procedure Tv3MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure Tv2CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
procedure edtYJClick(Sender: TObject);
procedure Pic_Image1DblClick(Sender: TObject);
procedure Tv3CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
@ -1483,6 +1484,44 @@ begin
InitCDGridCX(CDS_3.FieldByName('CIID').AsString);
end;
procedure TfrmTatMachInsp.Tv2CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
begin
if CDS_2.IsEmpty then
Exit;
if Application.MessageBox('确定要删除该条疵点数据吗?', '提示', 32 + 4) <> IDYES then
Exit;
//已保存过的疵点(CIFID非空)直接删除数据库记录
if Trim(CDS_2.fieldbyname('CIFID').AsString) <> '' then
begin
ADOCmd.Connection.BeginTrans;
try
with ADOCmd do
begin
Close;
sql.Clear;
sql.Add('delete Tat_Cloth_Inspect_Flaw where CIFID=' + quotedstr(Trim(CDS_2.fieldbyname('CIFID').AsString)));
ExecSQL;
end;
////////////////// 更新卷号疵点信息 //////////////////
with ADOCmd do
begin
Close;
sql.Clear;
sql.Add('exec P_Tat_Insp_Up @CIID=' + quotedstr(Trim(CDS_2.fieldbyname('CIID').AsString)));
sql.Add(',@InspType=' + QuotedStr('单卷修改'));
ExecSQL;
end;
////////////////// 更新卷号疵点信息 //////////////////
ADOCmd.Connection.CommitTrans;
except
ADOCmd.Connection.RollbackTrans;
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
Exit;
end;
end;
CDS_2.Delete;
end;
function TfrmTatMachInsp.SaveData(): Boolean;
var
maxno, MCIID, strsql: string;