diff --git a/B01基础å�ˆå�Œç®¡ç�†/U_SalesConInPut.dfm b/B01基础å�ˆå�Œç®¡ç�†/U_SalesConInPut.dfm index 7c5e9cd..9fe000f 100644 --- a/B01基础å�ˆå�Œç®¡ç�†/U_SalesConInPut.dfm +++ b/B01基础å�ˆå�Œç®¡ç�†/U_SalesConInPut.dfm @@ -612,6 +612,7 @@ inherited frmSalesConInPut: TfrmSalesConInPut StyleDisabled.LookAndFeel.NativeStyle = True StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True + StyleReadOnly.LookAndFeel.NativeStyle = True TabOrder = 17 OnDblClick = cxDBImage1DblClick Height = 281 @@ -831,7 +832,7 @@ inherited frmSalesConInPut: TfrmSalesConInPut Default = True Kind = bkEllipsis end> - Properties.ReadOnly = False + Properties.ReadOnly = True Properties.OnButtonClick = v1Column10PropertiesButtonClick HeaderAlignmentHorz = taCenter Width = 77 @@ -943,9 +944,8 @@ inherited frmSalesConInPut: TfrmSalesConInPut PropertiesClassName = 'TcxComboBoxProperties' Properties.DropDownListStyle = lsEditFixedList Properties.Items.Strings = ( - 'Kg' 'M' - 'Y') + #21305) HeaderAlignmentHorz = taCenter Width = 58 end diff --git a/B01基础å�ˆå�Œç®¡ç�†/U_SalesConInPut.pas b/B01基础å�ˆå�Œç®¡ç�†/U_SalesConInPut.pas index 4bf503f..3a80446 100644 --- a/B01基础å�ˆå�Œç®¡ç�†/U_SalesConInPut.pas +++ b/B01基础å�ˆå�Œç®¡ç�†/U_SalesConInPut.pas @@ -284,10 +284,10 @@ begin raise Exception.Create('Æ·Ãû²»ÄÜΪ¿Õ£¡'); if Order_Sub.Locate('C_Name', '', []) then raise Exception.Create('Æ·Ãû²»ÄÜΪ¿Õ£¡'); - if Order_Sub.Locate('C_Color', null, []) then - raise Exception.Create('ÑÕÉ«²»ÄÜΪ¿Õ£¡'); - if Order_Sub.Locate('C_Color', '', []) then - raise Exception.Create('ÑÕÉ«²»ÄÜΪ¿Õ£¡'); +// if Order_Sub.Locate('C_Color', null, []) then +// raise Exception.Create('ÑÕÉ«²»ÄÜΪ¿Õ£¡'); +// if Order_Sub.Locate('C_Color', '', []) then +// raise Exception.Create('ÑÕÉ«²»ÄÜΪ¿Õ£¡'); // if Order_Sub.Locate('C_MF', null, []) then // raise Exception.Create('ÃÅ·ù²»ÄÜΪ¿Õ£¡'); // if Order_Sub.Locate('C_MF', '', []) then @@ -824,6 +824,7 @@ begin FieldByName('ConSId').Value := maxno; FieldByName('C_Color').Value := ''; FieldByName('ConQty').Value := null; + FieldByName('ConUnit').Value := 'M'; Post; end; SetXH(); diff --git a/B01基础å�ˆå�Œç®¡ç�†/testDll.res b/B01基础å�ˆå�Œç®¡ç�†/testDll.res index 2465ca0..e116c48 100644 Binary files a/B01基础å�ˆå�Œç®¡ç�†/testDll.res and b/B01基础å�ˆå�Œç®¡ç�†/testDll.res differ diff --git a/E03梭织å�¯å¸ƒæ£€éªŒ/TatInsp.dpr b/E03梭织å�¯å¸ƒæ£€éªŒ/TatInsp.dpr index bf88f02..ace7c99 100644 --- a/E03梭织å�¯å¸ƒæ£€éªŒ/TatInsp.dpr +++ b/E03梭织å�¯å¸ƒæ£€éªŒ/TatInsp.dpr @@ -24,6 +24,7 @@ uses U_CompanySel in '..\A00ͨÓô°Ìå\U_CompanySel.pas' {frmCompanySel}, U_EmployeeSel in '..\A00ͨÓô°Ìå\U_EmployeeSel.pas' {frmEmployeeSel}, U_TatMachInsp in 'U_TatMachInsp.pas' {frmTatMachInsp}, + U_TatConSel in 'U_TatConSel.pas' {frmTatConSel}, U_TatClothInspList in 'U_TatClothInspList.pas' {frmTatClothInspList}, U_LabelMapSet in '..\A00ͨÓô°Ìå\U_LabelMapSet.pas' {frmLabelMapSet}, U_LabelPrint in '..\A00ͨÓô°Ìå\U_LabelPrint.pas' {frmLabelPrint}, diff --git a/E03梭织å�¯å¸ƒæ£€éªŒ/U_TatClothInspList.pas b/E03梭织å�¯å¸ƒæ£€éªŒ/U_TatClothInspList.pas index 60fb8d5..217131f 100644 --- a/E03梭织å�¯å¸ƒæ£€éªŒ/U_TatClothInspList.pas +++ b/E03梭织å�¯å¸ƒæ£€éªŒ/U_TatClothInspList.pas @@ -338,13 +338,13 @@ begin begin Close; sql.Clear; - sql.Add('select * from Tat_Cloth_IO where IOFlag=''Èë¿â'' and StkId=''' + Trim(Order_Main.fieldbyname('CIID').AsString) + ''''); + sql.Add('select * from Tat_Cloth_IO where IOFlag=''³ö¿â'' and StkId=''' + Trim(Order_Main.fieldbyname('CIID').AsString) + ''''); Open; end; if ADOQueryTemp.IsEmpty = False then begin Order_Main.EnableControls; - Application.MessageBox('ÒѲúÉúÈë¿âÊý¾Ý²»Äܱ༭!', 'Ìáʾ', 0); + Application.MessageBox('ÒѲúÉú³ö¿âÊý¾Ý²»Äܱ༭!', 'Ìáʾ', 0); Exit; end; try @@ -354,7 +354,8 @@ begin CIID.Text := Trim(Self.Order_Main.fieldbyname('CIID').AsString); if ShowModal = 1 then begin - + CurrentPage := 1; + InitGrid(); end; end; finally diff --git a/E03梭织å�¯å¸ƒæ£€éªŒ/U_TatConSel.dfm b/E03梭织å�¯å¸ƒæ£€éªŒ/U_TatConSel.dfm new file mode 100644 index 0000000..698d085 --- /dev/null +++ b/E03梭织å�¯å¸ƒæ£€éªŒ/U_TatConSel.dfm @@ -0,0 +1,393 @@ +inherited frmTatConSel: TfrmTatConSel + Left = 300 + Top = 160 + Caption = #36873#25321#21512#21516 + ClientHeight = 600 + ClientWidth = 1180 + Color = clWhite + Position = poScreenCenter + ExplicitWidth = 1196 + ExplicitHeight = 639 + PixelsPerInch = 96 + TextHeight = 13 + object ToolBar1: TToolBar [0] + Tag = 1 + Left = 0 + Top = 0 + Width = 1180 + Height = 38 + AutoSize = True + ButtonHeight = 38 + ButtonWidth = 91 + Caption = 'ToolBar1' + Color = clSkyBlue + DisabledImages = DataLink_TatInsp.ImageList_new32 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [] + Images = DataLink_TatInsp.ImageList_new32 + List = True + ParentColor = False + ParentFont = False + ShowCaptions = True + TabOrder = 0 + object TBRafresh: TToolButton + Left = 0 + Top = 0 + AutoSize = True + Caption = #21047#26032 + ImageIndex = 1 + OnClick = TBRafreshClick + end + object TBFind: TToolButton + Left = 71 + Top = 0 + AutoSize = True + Caption = #36807#28388 + ImageIndex = 0 + OnClick = TBFindClick + end + object TBOK: TToolButton + Left = 142 + Top = 0 + AutoSize = True + Caption = #30830#35748 + ImageIndex = 12 + OnClick = TBOKClick + end + object TBSave: TToolButton + Left = 213 + Top = 0 + AutoSize = True + Caption = #20445#23384#26684#24335 + ImageIndex = 16 + OnClick = TBSaveClick + end + object TBClose: TToolButton + Left = 308 + Top = 0 + AutoSize = True + Caption = #20851#38381 + ImageIndex = 7 + OnClick = TBCloseClick + end + end + object cxGrid1: TcxGrid [1] + Left = 0 + Top = 81 + Width = 1180 + Height = 519 + Align = alClient + TabOrder = 2 + object Tv1: TcxGridDBTableView + OnDblClick = Tv1DblClick + Navigator.Buttons.CustomButtons = <> + ScrollbarAnnotations.CustomAnnotations = <> + DataController.DataSource = DS_1 + DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost] + DataController.Summary.DefaultGroupSummaryItems = <> + DataController.Summary.FooterSummaryItems = <> + DataController.Summary.SummaryGroups = <> + OptionsCustomize.ColumnFiltering = False + OptionsView.GroupByBox = False + OptionsView.IndicatorWidth = 30 + Styles.IncSearch = DataLink_TatInsp.SHuangSe + Styles.Header = DataLink_TatInsp.Default + Styles.Inactive = DataLink_TatInsp.SHuangSe + Styles.Selection = DataLink_TatInsp.SHuangSe + object v1ConNo: TcxGridDBColumn + Caption = #21512#21516#21495 + DataBinding.FieldName = 'ConNo' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Focusing = False + Width = 110 + end + object v1ConDate: TcxGridDBColumn + Caption = #19979#21333#26085#26399 + DataBinding.FieldName = 'ConDate' + DataBinding.IsNullValueType = True + PropertiesClassName = 'TcxDateEditProperties' + Properties.ShowTime = False + HeaderAlignmentHorz = taCenter + Options.Focusing = False + Width = 85 + end + object v1BuyName: TcxGridDBColumn + Caption = #23458#25143 + DataBinding.FieldName = 'BuyName' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Focusing = False + Width = 150 + end + object v1Saleser: TcxGridDBColumn + Caption = #19994#21153#21592 + DataBinding.FieldName = 'Saleser' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Focusing = False + Width = 70 + end + object v1SerialNo: TcxGridDBColumn + Caption = #24207#21495 + DataBinding.FieldName = 'SerialNo' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Focusing = False + Width = 45 + end + object v1C_Code: TcxGridDBColumn + Caption = #20135#21697#32534#21495 + DataBinding.FieldName = 'C_Code' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Focusing = False + Width = 100 + end + object v1C_Name: TcxGridDBColumn + Caption = #20135#21697#21517#31216 + DataBinding.FieldName = 'C_Name' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Focusing = False + Width = 150 + end + object v1C_Spec: TcxGridDBColumn + Caption = #35268#26684 + DataBinding.FieldName = 'C_Spec' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Focusing = False + Width = 140 + end + object v1C_Color: TcxGridDBColumn + Caption = #39068#33394 + DataBinding.FieldName = 'C_Color' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Focusing = False + Width = 80 + end + object v1C_ColorNo: TcxGridDBColumn + Caption = #33394#21495 + DataBinding.FieldName = 'C_ColorNo' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Focusing = False + Width = 80 + end + object v1C_StyleNo: TcxGridDBColumn + Caption = #27454#21495 + DataBinding.FieldName = 'C_StyleNo' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Focusing = False + Width = 70 + end + object v1C_Pattern: TcxGridDBColumn + Caption = #33457#22411 + DataBinding.FieldName = 'C_Pattern' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Focusing = False + Width = 70 + end + object v1C_Width: TcxGridDBColumn + Caption = #38376#24133 + DataBinding.FieldName = 'C_Width' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Focusing = False + Width = 60 + end + object v1C_GramWeight: TcxGridDBColumn + Caption = #20811#37325 + DataBinding.FieldName = 'C_GramWeight' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Focusing = False + Width = 60 + end + object v1ConQty: TcxGridDBColumn + Caption = #25968#37327 + DataBinding.FieldName = 'ConQty' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Focusing = False + Width = 70 + end + object v1ConUnit: TcxGridDBColumn + Caption = #21333#20301 + DataBinding.FieldName = 'ConUnit' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Focusing = False + Width = 45 + end + object v1ConPrice: TcxGridDBColumn + Caption = #21333#20215 + DataBinding.FieldName = 'ConPrice' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Focusing = False + Width = 70 + end + object v1ConTotalAmount: TcxGridDBColumn + Caption = #37329#39069 + DataBinding.FieldName = 'ConTotalAmount' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Focusing = False + Width = 80 + end + object v1ConSNote: TcxGridDBColumn + Caption = #22791#27880 + DataBinding.FieldName = 'ConSNote' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Options.Focusing = False + Width = 120 + end + end + object cxGrid1Level1: TcxGridLevel + GridView = Tv1 + end + end + object Panel1: TPanel [2] + Left = 0 + Top = 38 + Width = 1180 + Height = 43 + Align = alTop + BevelInner = bvRaised + BevelOuter = bvLowered + Color = clWhite + ParentBackground = False + TabOrder = 1 + object Label1: TLabel + Left = 8 + Top = 15 + Width = 36 + Height = 12 + Caption = #21512#21516#21495 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [] + ParentFont = False + end + object Label2: TLabel + Left = 200 + Top = 15 + Width = 24 + Height = 12 + Caption = #23458#25143 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [] + ParentFont = False + end + object Label3: TLabel + Left = 396 + Top = 15 + Width = 48 + Height = 12 + Caption = #20135#21697#32534#21495 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [] + ParentFont = False + end + object Label4: TLabel + Left = 576 + Top = 15 + Width = 48 + Height = 12 + Caption = #20135#21697#21517#31216 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [] + ParentFont = False + end + object ConNo: TEdit + Tag = 2 + Left = 56 + Top = 11 + Width = 130 + Height = 21 + TabOrder = 0 + OnChange = FilterChange + end + object BuyName: TEdit + Tag = 2 + Left = 232 + Top = 11 + Width = 150 + Height = 21 + TabOrder = 1 + OnChange = FilterChange + end + object C_Code: TEdit + Tag = 2 + Left = 452 + Top = 11 + Width = 110 + Height = 21 + TabOrder = 2 + OnChange = FilterChange + end + object C_Name: TEdit + Tag = 2 + Left = 632 + Top = 11 + Width = 140 + Height = 21 + TabOrder = 3 + OnChange = FilterChange + end + end + inherited ADOQueryBaseCmd: TADOQuery + Connection = DataLink_TatInsp.ADOLink + Left = 73 + Top = 400 + end + inherited ADOQueryBaseTemp: TADOQuery + Connection = DataLink_TatInsp.ADOLink + Left = 73 + Top = 448 + end + object ADOQueryMain: TADOQuery + Connection = DataLink_TatInsp.ADOLink + LockType = ltReadOnly + Parameters = <> + Left = 200 + Top = 400 + end + object CDS_1: TClientDataSet + Aggregates = <> + Params = <> + Left = 264 + Top = 400 + end + object DS_1: TDataSource + DataSet = CDS_1 + Left = 328 + Top = 400 + end + object GPM_1: TcxGridPopupMenu + Grid = cxGrid1 + PopupMenus = <> + Left = 400 + Top = 400 + end +end diff --git a/E03梭织å�¯å¸ƒæ£€éªŒ/U_TatConSel.pas b/E03梭织å�¯å¸ƒæ£€éªŒ/U_TatConSel.pas new file mode 100644 index 0000000..483b001 --- /dev/null +++ b/E03梭织å�¯å¸ƒæ£€éªŒ/U_TatConSel.pas @@ -0,0 +1,179 @@ +unit U_TatConSel; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData, + cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ADODB, + cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxClasses, cxControls, + cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridDBTableView, + cxGrid, DBClient, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, + dxBarBuiltInMenu, dxSkinsCore, dxSkinsDefaultPainters, U_BaseHelp, + dxDateRanges, System.ImageList, Vcl.ImgList, dxSkinWXI, + dxScrollbarAnnotations, cxCalendar; + +type + TfrmTatConSel = class(TfrmBaseHelp) + ToolBar1: TToolBar; + TBRafresh: TToolButton; + TBFind: TToolButton; + TBOK: TToolButton; + TBSave: TToolButton; + TBClose: TToolButton; + Panel1: TPanel; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + Label4: TLabel; + ConNo: TEdit; + BuyName: TEdit; + C_Code: TEdit; + C_Name: TEdit; + cxGrid1: TcxGrid; + Tv1: TcxGridDBTableView; + v1ConNo: TcxGridDBColumn; + v1ConDate: TcxGridDBColumn; + v1BuyName: TcxGridDBColumn; + v1Saleser: TcxGridDBColumn; + v1SerialNo: TcxGridDBColumn; + v1C_Code: TcxGridDBColumn; + v1C_Name: TcxGridDBColumn; + v1C_Spec: TcxGridDBColumn; + v1C_Color: TcxGridDBColumn; + v1C_ColorNo: TcxGridDBColumn; + v1C_StyleNo: TcxGridDBColumn; + v1C_Pattern: TcxGridDBColumn; + v1C_Width: TcxGridDBColumn; + v1C_GramWeight: TcxGridDBColumn; + v1ConQty: TcxGridDBColumn; + v1ConUnit: TcxGridDBColumn; + v1ConPrice: TcxGridDBColumn; + v1ConTotalAmount: TcxGridDBColumn; + v1ConSNote: TcxGridDBColumn; + cxGrid1Level1: TcxGridLevel; + ADOQueryMain: TADOQuery; + DS_1: TDataSource; + CDS_1: TClientDataSet; + GPM_1: TcxGridPopupMenu; + procedure FormDestroy(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormShow(Sender: TObject); + procedure TBRafreshClick(Sender: TObject); + procedure TBFindClick(Sender: TObject); + procedure TBOKClick(Sender: TObject); + procedure TBSaveClick(Sender: TObject); + procedure TBCloseClick(Sender: TObject); + procedure Tv1DblClick(Sender: TObject); + procedure FilterChange(Sender: TObject); + private + procedure InitGrid(); + { Private declarations } + public + { Public declarations } + end; + +var + frmTatConSel: TfrmTatConSel; + +implementation + +uses + U_DataLink, U_RTFun; + +{$R *.dfm} + +procedure TfrmTatConSel.InitGrid(); +begin + try + ADOQueryMain.DisableControls; + with ADOQueryMain do + begin + Close; + Filtered := False; + sql.Clear; + sql.Add(' select A.ConMId,A.ConNo,A.ConDate,A.BuyName,A.Saleser,'); + sql.Add(' B.ConSId,B.SerialNo,B.C_Code,B.C_Name,B.C_Spec,B.C_Color,B.C_ColorNo,'); + sql.Add(' B.C_StyleNo,B.C_Pattern,B.C_Width,B.C_GramWeight,'); + sql.Add(' B.ConQty,B.ConUnit,B.ConPrice,B.ConTotalAmount,B.ConSNote '); + sql.Add(' from BS_Contract_Main A inner join BS_Contract_Sub B on A.ConMId=B.ConMId '); + sql.Add(' where isnull(A.status,''0'')=''9'' '); + sql.Add(' and A.ConType in (''ÄÚÏú'',''ÍâÏú'') '); + sql.Add(' order by A.ConDate desc,A.ConNo,B.SerialNo '); + Open; + end; + SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2)); + SCreateCDS(ADOQueryMain, CDS_1); + SInitCDSData(ADOQueryMain, CDS_1); + finally + ADOQueryMain.EnableControls; + end; +end; + +procedure TfrmTatConSel.FormDestroy(Sender: TObject); +begin + inherited; + frmTatConSel := nil; +end; + +procedure TfrmTatConSel.FormClose(Sender: TObject; var Action: TCloseAction); +begin + inherited; + Action := caHide; +end; + +procedure TfrmTatConSel.FormShow(Sender: TObject); +begin + inherited; + ReadCxGrid(Trim(Self.Caption) + 'Tv1', Tv1, 'óÒ×¼ìÑé¹ÜÀí'); + InitGrid(); +end; + +procedure TfrmTatConSel.TBRafreshClick(Sender: TObject); +begin + InitGrid(); +end; + +procedure TfrmTatConSel.TBFindClick(Sender: TObject); +begin + if ADOQueryMain.Active = False then + Exit; + SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2)); + SCreateCDS(ADOQueryMain, CDS_1); + SInitCDSData(ADOQueryMain, CDS_1); +end; + +procedure TfrmTatConSel.TBOKClick(Sender: TObject); +begin + if CDS_1.IsEmpty then + Exit; + ModalResult := 1; +end; + +procedure TfrmTatConSel.TBSaveClick(Sender: TObject); +begin + WriteCxGrid(Trim(Self.Caption) + 'Tv1', Tv1, 'óÒ×¼ìÑé¹ÜÀí'); +end; + +procedure TfrmTatConSel.TBCloseClick(Sender: TObject); +begin + Close; +end; + +procedure TfrmTatConSel.Tv1DblClick(Sender: TObject); +begin + if CDS_1.IsEmpty then + Exit; + ModalResult := 1; +end; + +procedure TfrmTatConSel.FilterChange(Sender: TObject); +begin + if ADOQueryMain.Active = False then + Exit; + SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2)); + SCreateCDS(ADOQueryMain, CDS_1); + SInitCDSData(ADOQueryMain, CDS_1); +end; + +end. diff --git a/E03梭织å�¯å¸ƒæ£€éªŒ/U_TatInspEdit.dfm b/E03梭织å�¯å¸ƒæ£€éªŒ/U_TatInspEdit.dfm index 7d6de7f..da13f07 100644 --- a/E03梭织å�¯å¸ƒæ£€éªŒ/U_TatInspEdit.dfm +++ b/E03梭织å�¯å¸ƒæ£€éªŒ/U_TatInspEdit.dfm @@ -224,8 +224,9 @@ object frmTatInspEdit: TfrmTatInspEdit Columns = 3 ItemIndex = 0 Items.Strings = ( - #27491#21697 - #27425#21697) + 'A'#21697 + 'B'#21697 + 'C'#21697) TabOrder = 0 end object MJQty1: TEdit @@ -267,6 +268,7 @@ object frmTatInspEdit: TfrmTatInspEdit object TV1: TcxGridDBTableView Navigator.Buttons.CustomButtons = <> ScrollbarAnnotations.CustomAnnotations = <> + DataController.DataSource = DataSource1 DataController.Filter.AutoDataSetFilter = True DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost] DataController.Summary.DefaultGroupSummaryItems = <> @@ -285,7 +287,6 @@ object frmTatInspEdit: TfrmTatInspEdit end> DataController.Summary.SummaryGroups = <> OptionsCustomize.ColumnFiltering = False - OptionsSelection.CellSelect = False OptionsView.Footer = True OptionsView.GroupByBox = False Styles.Footer = DataLink_TatInsp.Default @@ -318,7 +319,7 @@ object frmTatInspEdit: TfrmTatInspEdit DataBinding.FieldName = 'CIFbeg' DataBinding.IsNullValueType = True PropertiesClassName = 'TcxTextEditProperties' - Properties.OnEditValueChanged = cxGridDBColumn3PropertiesEditValueChanged + Properties.OnEditValueChanged = tv2CDWZPropertiesEditValueChanged HeaderAlignmentHorz = taCenter HeaderGlyphAlignmentHorz = taCenter Options.Sorting = False @@ -328,6 +329,8 @@ object frmTatInspEdit: TfrmTatInspEdit Caption = #20301#32622#27490 DataBinding.FieldName = 'CIFend' DataBinding.IsNullValueType = True + PropertiesClassName = 'TcxTextEditProperties' + Properties.OnEditValueChanged = cxGridDBColumn3PropertiesEditValueChanged HeaderAlignmentHorz = taCenter HeaderGlyphAlignmentHorz = taCenter Width = 79 diff --git a/E03梭织å�¯å¸ƒæ£€éªŒ/U_TatInspEdit.pas b/E03梭织å�¯å¸ƒæ£€éªŒ/U_TatInspEdit.pas index 6f43c82..01b5285 100644 --- a/E03梭织å�¯å¸ƒæ£€éªŒ/U_TatInspEdit.pas +++ b/E03梭织å�¯å¸ƒæ£€éªŒ/U_TatInspEdit.pas @@ -110,19 +110,20 @@ begin Meter.Text := Trim(ADOTmp.fieldbyname('Meter').AsString); Yardage.Text := Trim(ADOTmp.fieldbyname('Yardage').AsString); - if Trim(Trim(ADOTmp.fieldbyname('Grade').AsString)) = 'ÕýÆ·' then + RadioGroup1.ItemIndex := RadioGroup1.Items.IndexOf(Trim(ADOTmp.fieldbyname('Grade').AsString)); + if RadioGroup1.ItemIndex < 0 then begin - RadioGroup1.ItemIndex := 0 - end - else if Trim(Trim(ADOTmp.fieldbyname('Grade').AsString)) = '´ÎÆ·' then - begin - RadioGroup1.ItemIndex := 1; + if Trim(ADOTmp.fieldbyname('Grade').AsString) = 'ÕýÆ·' then + RadioGroup1.ItemIndex := 0 + else if Trim(ADOTmp.fieldbyname('Grade').AsString) = '´ÎÆ·' then + RadioGroup1.ItemIndex := 2; end; with ADOTmp do begin Close; sql.Clear; SQL.Add('select * from Tat_Cloth_Inspect_Flaw A where A.CIID=''' + Trim(CIID.Text) + ''''); + Open; end; Label2.Caption := Trim(CIID.Text); @@ -149,7 +150,7 @@ begin CIFEnd := Trim(Order_MJ.fieldbyname('CIFEnd').AsString); if (Trim(CIFbeg) <> '') and (Trim(CIFEnd) <> '') then begin - if TryStrToFloat(CIFbeg, FFReal) and TryStrToFloat(CIFbeg, FFReal) then + if TryStrToFloat(CIFbeg, FFReal) and TryStrToFloat(CIFEnd, FFReal) then begin if StrToFloat(CIFEnd) < StrToFloat(CIFbeg) then begin @@ -159,7 +160,7 @@ begin with Order_MJ do begin Edit; - FieldByName('CDQty').Value := StrToFloat(CIFEnd) - StrToFloat(CIFbeg); + FieldByName('CIFQty').Value := StrToFloat(CIFEnd) - StrToFloat(CIFbeg); Post; end; end @@ -197,7 +198,7 @@ begin CIFEnd := Trim(Order_MJ.fieldbyname('CIFEnd').AsString); if (Trim(CIFbeg) <> '') and (Trim(CIFEnd) <> '') then begin - if TryStrToFloat(CIFbeg, FFReal) and TryStrToFloat(CIFbeg, FFReal) then + if TryStrToFloat(CIFbeg, FFReal) and TryStrToFloat(CIFEnd, FFReal) then begin if StrToFloat(CIFEnd) < StrToFloat(CIFbeg) then begin @@ -275,7 +276,6 @@ end; function TfrmTatInspEdit.SaveData(): Boolean; var maxno: string; - FFreal: Double; begin try ADOCmd.Connection.BeginTrans; @@ -335,14 +335,9 @@ begin sql.Add(',Meter=' + FloatToStr(Strtofloatdef(Meter.Text, 0))); sql.Add(',Yardage=' + FloatToStr(Strtofloatdef(Yardage.Text, 0))); - if RadioGroup1.ItemIndex = 0 then - begin - sql.Add(',Grade=''ÕýÆ·'' '); - end - else if RadioGroup1.ItemIndex = 1 then - begin - sql.Add(',Grade=''´ÎÆ·'' '); - end; + if RadioGroup1.ItemIndex < 0 then + raise Exception.Create(pchar('ÇëÑ¡ÔñµÈ¼¶£¡')); + sql.Add(',Grade=' + QuotedStr(Trim(RadioGroup1.Items[RadioGroup1.ItemIndex]))); sql.Add(' where CIID=''' + Trim(Label2.Caption) + ''''); ExecSQL; end; @@ -377,6 +372,20 @@ begin end; ////////////////// ¸üнø¶È ////////////////// /// + with ADOCmd do + begin + Close; + sql.Clear; + sql.Add('insert into SY_SysLog(operor,opertime,Model,acction,opevent,result) values( '); + sql.Add(' ' + quotedstr(trim(DName))); + sql.Add(',getdate() '); + sql.Add(',' + quotedstr('¼ìÑéÐÅÏ¢¹ÜÀí')); + sql.Add(',' + quotedstr('Ð޸ļìÑéÊý¾Ý')); + sql.Add(',' + quotedstr(Trim(Label2.Caption) + ' Ã×:' + Trim(Meter.Text) + ' ¾»ÖØ:' + Trim(NetWeight.Text))); + sql.Add(',' + quotedstr('³É¹¦')); + sql.Add(')'); + ExecSQL; + end; ADOCmd.Connection.CommitTrans; Result := True; except diff --git a/E03梭织å�¯å¸ƒæ£€éªŒ/U_TatMachInsp.dfm b/E03梭织å�¯å¸ƒæ£€éªŒ/U_TatMachInsp.dfm index 4489a85..39331ff 100644 --- a/E03梭织å�¯å¸ƒæ£€éªŒ/U_TatMachInsp.dfm +++ b/E03梭织å�¯å¸ƒæ£€éªŒ/U_TatMachInsp.dfm @@ -7,7 +7,6 @@ FormStyle = fsMDIChild Position = poScreenCenter Visible = True - ExplicitTop = -137 ExplicitWidth = 1556 ExplicitHeight = 807 PixelsPerInch = 96 @@ -23,9 +22,9 @@ TabOrder = 2 object Panel2: TPanel Left = 1 - Top = 171 + Top = 203 Width = 487 - Height = 596 + Height = 564 Align = alClient BevelInner = bvRaised BevelOuter = bvLowered @@ -888,14 +887,14 @@ Left = 1 Top = 1 Width = 487 - Height = 170 + Height = 202 Align = alTop Color = clWhite ParentBackground = False TabOrder = 1 object Label14: TLabel Left = 480 - Top = 189 + Top = 241 Width = 51 Height = 19 Caption = #35746#21333#21495 @@ -922,8 +921,8 @@ Visible = False end object Label24: TLabel - Left = 413 - Top = 210 + Left = 398 + Top = 271 Width = 51 Height = 19 Caption = #26426#20462#65306 @@ -951,8 +950,8 @@ WordWrap = True end object Label1: TLabel - Left = 203 - Top = 192 + Left = 201 + Top = 260 Width = 84 Height = 24 Caption = #25195#25551#20837#21475 @@ -965,8 +964,8 @@ Visible = False end object Label13: TLabel - Left = 413 - Top = 179 + Left = 398 + Top = 241 Width = 51 Height = 19 Caption = #25209#21495#65306 @@ -980,7 +979,7 @@ end object Label29: TLabel Left = 187 - Top = 206 + Top = 295 Width = 51 Height = 19 Caption = #35268#26684#65306 @@ -993,8 +992,8 @@ Visible = False end object Label30: TLabel - Left = -13 - Top = 204 + Left = 5 + Top = 279 Width = 51 Height = 19 Caption = #38376#24133#65306 @@ -1008,7 +1007,7 @@ end object Label32: TLabel Left = 187 - Top = 177 + Top = 270 Width = 51 Height = 19 Caption = #20811#37325#65306 @@ -1021,8 +1020,8 @@ Visible = False end object Label31: TLabel - Left = -13 - Top = 176 + Left = 8 + Top = 295 Width = 51 Height = 19 Caption = #32534#21495#65306 @@ -1036,7 +1035,7 @@ end object Label50: TLabel Left = 5 - Top = 88 + Top = 132 Width = 75 Height = 29 Caption = #26426#21488#21495 @@ -1049,7 +1048,7 @@ end object Label58: TLabel Left = 8 - Top = 134 + Top = 167 Width = 84 Height = 24 Caption = #32463#32433#25209#21495 @@ -1062,7 +1061,7 @@ end object Label59: TLabel Left = 230 - Top = 134 + Top = 167 Width = 84 Height = 24 Caption = #32428#32433#25209#21495 @@ -1104,8 +1103,8 @@ Visible = False end object Repairer: TEdit - Left = 462 - Top = 207 + Left = 455 + Top = 271 Width = 144 Height = 24 Font.Charset = ANSI_CHARSET @@ -1135,8 +1134,8 @@ OnClick = CIFBegClick end object edtScan: TEdit - Left = 289 - Top = 190 + Left = 291 + Top = 266 Width = 185 Height = 27 Font.Charset = GB2312_CHARSET @@ -1151,8 +1150,8 @@ OnKeyPress = edtScanKeyPress end object BatchNo: TEdit - Left = 462 - Top = 177 + Left = 446 + Top = 241 Width = 341 Height = 24 Font.Charset = ANSI_CHARSET @@ -1167,7 +1166,7 @@ end object SPEC: TEdit Left = 230 - Top = 204 + Top = 290 Width = 144 Height = 24 Font.Charset = ANSI_CHARSET @@ -1182,7 +1181,7 @@ end object Button5: TButton Left = 380 - Top = 176 + Top = 249 Width = 230 Height = 62 Caption = #36873' '#25321' '#20135' '#21697 @@ -1213,7 +1212,7 @@ end object Button9: TButton Left = 334 - Top = 77 + Top = 113 Width = 130 Height = 45 Caption = #36873#25321#26426#21488 @@ -1227,8 +1226,8 @@ OnClick = Button9Click end object carno: TEdit - Left = 85 - Top = 91 + Left = 86 + Top = 122 Width = 242 Height = 29 Font.Charset = ANSI_CHARSET @@ -1257,7 +1256,7 @@ end object C_LongitudeBatchNo: TEdit Left = 98 - Top = 132 + Top = 164 Width = 114 Height = 32 Enabled = False @@ -1273,7 +1272,7 @@ end object C_LatitudeBatchNo: TEdit Left = 320 - Top = 132 + Top = 164 Width = 122 Height = 32 Enabled = False @@ -1287,6 +1286,21 @@ TabOrder = 13 OnChange = KZChange end + object BtnCon: TButton + Left = 334 + Top = 62 + Width = 130 + Height = 45 + Caption = #36873#25321#21512#21516 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -24 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + TabOrder = 14 + OnClick = BtnConClick + end end end object ScrollBox1: TScrollBox [1] diff --git a/E03梭织å�¯å¸ƒæ£€éªŒ/U_TatMachInsp.pas b/E03梭织å�¯å¸ƒæ£€éªŒ/U_TatMachInsp.pas index 060ff80..094a201 100644 --- a/E03梭织å�¯å¸ƒæ£€éªŒ/U_TatMachInsp.pas +++ b/E03梭织å�¯å¸ƒæ£€éªŒ/U_TatMachInsp.pas @@ -345,6 +345,7 @@ type C_LatitudeBatchNo: TEdit; Label58: TLabel; Label59: TLabel; + BtnCon: TButton; procedure FormDestroy(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormShow(Sender: TObject); @@ -411,6 +412,7 @@ type procedure InputWeightChange(Sender: TObject); procedure KZChange(Sender: TObject); procedure edtMaxClick(Sender: TObject); + procedure BtnConClick(Sender: TObject); private { Private declarations } FCIID, FOperationStatus, FCIFName, FWorkshop: string; @@ -458,7 +460,7 @@ implementation uses U_DataLink, U_RTFun, U_ZDYHelp, U_iniParam, U_EmployeeSel, U_TatClothInfoSel, - U_SCPersonColor, U_SCPersonColor5; + U_SCPersonColor, U_SCPersonColor5, U_TatConSel; {$R *.dfm} procedure TfrmTatMachInsp.CalcInputLenByWeightKZ; @@ -2071,6 +2073,67 @@ begin Label14.Caption := '¶©µ¥ºÅ'; end; +procedure TfrmTatMachInsp.BtnConClick(Sender: TObject); +begin + try + frmTatConSel := TfrmTatConSel.Create(Self); + if frmTatConSel.ShowModal = 1 then + begin + with frmTatConSel.CDS_1 do + begin + ClearGlobal(); + FOperationStatus := '²¼Æ±'; + FConNo := Trim(FieldByName('ConNo').AsString); + FConMId := Trim(FieldByName('ConMId').AsString); + FConSId := Trim(FieldByName('ConSId').AsString); + FC_Code := Trim(FieldByName('C_Code').AsString); + FC_Name := Trim(FieldByName('C_Name').AsString); + FC_Spec := Trim(FieldByName('C_Spec').AsString); + FC_Color := Trim(FieldByName('C_Color').AsString); + FC_ColorNo := Trim(FieldByName('C_ColorNo').AsString); + FC_StyleNo := Trim(FieldByName('C_StyleNo').AsString); + FC_Width := Trim(FieldByName('C_Width').AsString); + FC_GramWeight := Trim(FieldByName('C_GramWeight').AsString); + FC_Pattern := Trim(FieldByName('C_Pattern').AsString); + + Code.Text := FC_Code; + CodeName.Text := FC_Name; + SPEC.Text := FC_Spec; + MF.Text := FC_Width; + KZ.Text := FC_GramWeight; + Coefficient.Text := '0'; + Label14.Caption := Trim(FieldByName('ConNo').AsString); + + with ADOTmp do + begin + Close; + SQL.Clear; + SQL.Add('SELECT * FROM Bs_Cloth_Info WHERE C_Code = ' + QuotedStr(FC_Code)); + Open; + end; + if not ADOTmp.IsEmpty then + begin + C_LongitudeBatchNo.Text := Trim(ADOTmp.FieldByName('C_LongitudeBatchNo').AsString); + C_LatitudeBatchNo.Text := Trim(ADOTmp.FieldByName('C_LatitudeBatchNo').AsString); + end + else + begin + C_LongitudeBatchNo.Text := ''; + C_LatitudeBatchNo.Text := ''; + end; + + SetDdetails(); + InitJYGrid(); + InitCDGrid(''); + InputLen.SetFocus; + CIFBegClick(InputLen); + end; + end; + finally + frmTatConSel.Free; + end; +end; + procedure TfrmTatMachInsp.Button1Click(Sender: TObject); var mvalue: Double; diff --git a/E04梭织å�¯å¸ƒä»“库/U_TatDRtInPut.dfm b/E04梭织å�¯å¸ƒä»“库/U_TatDRtInPut.dfm index 2ad6149..98085e1 100644 --- a/E04梭织å�¯å¸ƒä»“库/U_TatDRtInPut.dfm +++ b/E04梭织å�¯å¸ƒä»“库/U_TatDRtInPut.dfm @@ -204,11 +204,12 @@ object frmTatDRtInPut: TfrmTatDRtInPut Width = 96 Height = 20 Style = csDropDownList + ItemIndex = 0 TabOrder = 4 + Text = 'M' Items.Strings = ( 'M' - 'Y' - 'Kg') + #21305) end object SHDANWEI: TBtnEditC Tag = 1 diff --git a/E04梭织å�¯å¸ƒä»“库/U_TatDRtInPut.pas b/E04梭织å�¯å¸ƒä»“库/U_TatDRtInPut.pas index 82f548d..4a27100 100644 --- a/E04梭织å�¯å¸ƒä»“库/U_TatDRtInPut.pas +++ b/E04梭织å�¯å¸ƒä»“库/U_TatDRtInPut.pas @@ -126,6 +126,10 @@ begin end; SCreateCDS(ADOQuery1, Order_Sub); SInitCDSData(ADOQuery1, Order_Sub); + if QtyUnit.Items.IndexOf(Trim(Order_Sub.FieldByName('QtyUnit').AsString)) >= 0 then + QtyUnit.ItemIndex := QtyUnit.Items.IndexOf(Trim(Order_Sub.FieldByName('QtyUnit').AsString)) + else + QtyUnit.Text := Trim(Order_Sub.FieldByName('QtyUnit').AsString); with ADOQuery1 do begin