From 6bdaaf1b9a9b62f155cd5dabe072d848bbab97e1 Mon Sep 17 00:00:00 2001
From: funa <1559646174@qq.com>
Date: Wed, 4 Nov 2026 17:22:39 +0800
Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=90=8C=20=E5=9D=AF=E5=B8=83?=
=?UTF-8?q?=E4=BB=93=E5=BA=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
B01基础合同管理/U_GetDllForm.pas | 2 +-
B01基础合同管理/U_SalesConInPut.pas | 4 +-
B01基础合同管理/U_SalesContractList.pas | 10 +-
E04梭织坯布仓库/TatClothStk.dpr | 3 +-
E04梭织坯布仓库/TatClothStk.dproj | 4 +
E04梭织坯布仓库/U_GetDllForm.pas | 14 +-
E04梭织坯布仓库/U_TatClothJXCList.dfm | 366 ++++++++++++++++++++++++
E04梭织坯布仓库/U_TatClothJXCList.pas | 182 ++++++++++++
8 files changed, 575 insertions(+), 10 deletions(-)
create mode 100644 E04梭织坯布仓库/U_TatClothJXCList.dfm
create mode 100644 E04梭织坯布仓库/U_TatClothJXCList.pas
diff --git a/B01基础合同管理/U_GetDllForm.pas b/B01基础合同管理/U_GetDllForm.pas
index 38741d8..8e432bd 100644
--- a/B01基础合同管理/U_GetDllForm.pas
+++ b/B01基础合同管理/U_GetDllForm.pas
@@ -75,7 +75,7 @@ begin
pswd := 'right,.soft@2377';
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
// Parameters1 := '¼Èë';
- Parameters1 := '¹ÜÀí';
+ Parameters1 := '¼Èë';
end
else
diff --git a/B01基础合同管理/U_SalesConInPut.pas b/B01基础合同管理/U_SalesConInPut.pas
index aeaa736..657f899 100644
--- a/B01基础合同管理/U_SalesConInPut.pas
+++ b/B01基础合同管理/U_SalesConInPut.pas
@@ -883,8 +883,8 @@ begin
with frmCompanySel do
begin
FCoType := '¿ͻ§';
- if Self.FAuthority = '¼Èë' then
- FAuthority := 'Àíµ¥ҵÎñ';
+// if Self.FAuthority = '¼Èë' then
+// FAuthority := 'Àíµ¥ҵÎñ';
if ShowModal = 1 then
begin
self.BuyName.TxtCode := Trim(frmCompanySel.CDS_1.fieldbyname('CoCode').AsString);
diff --git a/B01基础合同管理/U_SalesContractList.pas b/B01基础合同管理/U_SalesContractList.pas
index 2b63c54..77a7c2e 100644
--- a/B01基础合同管理/U_SalesContractList.pas
+++ b/B01基础合同管理/U_SalesContractList.pas
@@ -409,11 +409,11 @@ begin
sql.Add(' from BS_Contract_Main A ) AA ');
sql.Add('where 1=1 ' + (WSql));
sql.Add(' and AA.ConType in (''ÄÚÏú'',''ÍâÏú'') ');
-
- if Trim(FAuthority) = '¼Èë' then
- begin
- sql.Add(' and ( SalesId=' + quotedstr(trim(DCode)) + ' or exists (select * from [dbo].[F_Tool_SplitString](TallyId,'','') X where X.RTValue =' + quotedstr(trim(DCode)) + '))');
- end;
+//
+// if Trim(FAuthority) = '¼Èë' then
+// begin
+// sql.Add(' and ( SalesId=' + quotedstr(trim(DCode)) + ' or exists (select * from [dbo].[F_Tool_SplitString](TallyId,'','') X where X.RTValue =' + quotedstr(trim(DCode)) + '))');
+// end;
case cxTabControl1.TabIndex of
0:
diff --git a/E04梭织坯布仓库/TatClothStk.dpr b/E04梭织坯布仓库/TatClothStk.dpr
index df4bd41..ddd4fb7 100644
--- a/E04梭织坯布仓库/TatClothStk.dpr
+++ b/E04梭织坯布仓库/TatClothStk.dpr
@@ -33,7 +33,8 @@ uses
U_TatClothStkHZListSEL in 'U_TatClothStkHZListSEL.pas' {frmTatClothStkHZListSEL},
U_TatClothInfoSel in '..\A00ͨÓô°Ìå\U_TatClothInfoSel.pas' {frmTatClothInfoSel},
U_SalesContractSel in '..\A00ͨÓô°Ìå\U_SalesContractSel.pas' {frmSalesContractSel},
- uSZHN_JSON in '..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas';
+ uSZHN_JSON in '..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas',
+ U_TatClothJXCList in 'U_TatClothJXCList.pas' {frmTatClothJXCList};
{$R *.res}
diff --git a/E04梭织坯布仓库/TatClothStk.dproj b/E04梭织坯布仓库/TatClothStk.dproj
index 2d1f4ec..43f4e32 100644
--- a/E04梭织坯布仓库/TatClothStk.dproj
+++ b/E04梭织坯布仓库/TatClothStk.dproj
@@ -169,6 +169,10 @@
+
+
+ dfm
+
Cfg_2
Base
diff --git a/E04梭织坯布仓库/U_GetDllForm.pas b/E04梭织坯布仓库/U_GetDllForm.pas
index d453800..6b7d5a9 100644
--- a/E04梭织坯布仓库/U_GetDllForm.pas
+++ b/E04梭织坯布仓库/U_GetDllForm.pas
@@ -17,7 +17,7 @@ implementation
uses
U_DataLink, U_iniParam, U_TatClothInEdit, U_TatClothInList, U_TatDRList,
U_TatClothDROutEdit, U_TatClothOutEdit, U_TatClothOutList, U_TatClothStkList,
- U_TatClothStkHZList, U_TatClothCKHZList, U_TatClothRKHZList;
+ U_TatClothStkHZList, U_TatClothCKHZList, U_TatClothRKHZList, U_TatClothJXCList;
/////////////////////////////////////////////////////////////////
// ¹¦ÄÜ˵Ã÷:ȡDllÖеô°Ìå //
@@ -244,6 +244,18 @@ begin
end;
end;
+ 888: //Å÷²¼½øÏú´æ
+ begin
+ with TfrmTatClothJXCList.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10)) do //
+ begin
+ fFormID := FormID;
+ FormStyle := mstyle;
+ WindowState := mstate;
+ BorderStyle := mborderstyle;
+ mnewHandle := Handle;
+ end;
+ end;
+
10000:
begin
for i := 0 to application.MainForm.MDIChildCount - 1 do
diff --git a/E04梭织坯布仓库/U_TatClothJXCList.dfm b/E04梭织坯布仓库/U_TatClothJXCList.dfm
new file mode 100644
index 0000000..d66dac3
--- /dev/null
+++ b/E04梭织坯布仓库/U_TatClothJXCList.dfm
@@ -0,0 +1,366 @@
+inherited frmTatClothJXCList: TfrmTatClothJXCList
+ Left = 184
+ Top = 138
+ Caption = #22383#24067#36827#38144#23384
+ ClientHeight = 600
+ ClientWidth = 1540
+ FormStyle = fsMDIChild
+ Position = poScreenCenter
+ Visible = True
+ ExplicitWidth = 1556
+ ExplicitHeight = 639
+ PixelsPerInch = 96
+ TextHeight = 12
+ object ToolBar1: TToolBar [0]
+ Tag = 1
+ Left = 0
+ Top = 0
+ Width = 1540
+ Height = 38
+ AutoSize = True
+ ButtonHeight = 38
+ ButtonWidth = 91
+ Caption = 'ToolBar1'
+ Color = clWhite
+ Font.Charset = GB2312_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -12
+ Font.Name = #23435#20307
+ Font.Style = []
+ Images = DataLink_TatClothStk.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 TBExport: TToolButton
+ Left = 71
+ Top = 0
+ AutoSize = True
+ Caption = #23548#20986
+ ImageIndex = 20
+ OnClick = TBExportClick
+ end
+ object ToolButton4: TToolButton
+ Left = 142
+ Top = 0
+ AutoSize = True
+ Caption = #20445#23384#26684#24335
+ ImageIndex = 16
+ OnClick = ToolButton4Click
+ end
+ object TBClose: TToolButton
+ Left = 237
+ Top = 0
+ AutoSize = True
+ Caption = #20851#38381
+ ImageIndex = 7
+ OnClick = TBCloseClick
+ end
+ end
+ object Panel1: TPanel [1]
+ Left = 0
+ Top = 38
+ Width = 1540
+ Height = 67
+ Align = alTop
+ BevelInner = bvRaised
+ BevelOuter = bvLowered
+ Color = clWhite
+ ParentBackground = False
+ TabOrder = 1
+ object Label2: TLabel
+ Left = 70
+ Top = 36
+ Width = 12
+ Height = 12
+ Caption = #33267
+ end
+ object Label5: TLabel
+ Left = 190
+ Top = 10
+ Width = 52
+ Height = 12
+ Hint = '0'
+ Caption = #20135#21697#21517#31216
+ Font.Charset = GB2312_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -12
+ Font.Name = #23435#20307
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object Label1: TLabel
+ Left = 190
+ Top = 36
+ Width = 26
+ Height = 12
+ Hint = '0'
+ Caption = #23458#25143
+ Font.Charset = GB2312_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -12
+ Font.Name = #23435#20307
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object BegDate: TDateTimePicker
+ Left = 88
+ Top = 6
+ Width = 87
+ Height = 20
+ Date = 40768.000000000000000000
+ Time = 0.458268587972270300
+ TabOrder = 1
+ end
+ object EndDate: TDateTimePicker
+ Left = 88
+ Top = 32
+ Width = 87
+ Height = 20
+ Date = 40768.000000000000000000
+ Time = 0.458268587972270300
+ TabOrder = 2
+ end
+ object IsJYTime: TCheckBox
+ Left = 14
+ Top = 8
+ Width = 73
+ Height = 17
+ Caption = #26597#35810#26085#26399
+ Font.Charset = GB2312_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -12
+ Font.Name = #23435#20307
+ Font.Style = [fsBold]
+ ParentFont = False
+ TabOrder = 0
+ OnClick = IsJYTimeClick
+ end
+ object C_Name: TEdit
+ Tag = 2
+ Left = 250
+ Top = 6
+ Width = 100
+ Height = 20
+ Hint = '0'
+ TabOrder = 3
+ OnKeyPress = FilterEditKeyPress
+ end
+ object ContractBuyName: TEdit
+ Tag = 2
+ Left = 250
+ Top = 32
+ Width = 100
+ Height = 20
+ Hint = '0'
+ TabOrder = 4
+ OnKeyPress = FilterEditKeyPress
+ end
+ end
+ object cxGrid1: TcxGrid [2]
+ Left = 0
+ Top = 105
+ Width = 1540
+ Height = 495
+ Align = alClient
+ BorderStyle = cxcbsNone
+ Font.Charset = GB2312_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -12
+ Font.Name = #23435#20307
+ Font.Style = []
+ ParentFont = False
+ TabOrder = 2
+ object Tv1: TcxGridDBTableView
+ Navigator.Buttons.CustomButtons = <>
+ ScrollbarAnnotations.CustomAnnotations = <>
+ DataController.DataSource = DS_1
+ DataController.Filter.AutoDataSetFilter = True
+ DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
+ DataController.Summary.DefaultGroupSummaryItems = <>
+ DataController.Summary.FooterSummaryItems = <
+ item
+ Kind = skSum
+ Column = Tv1InJS
+ end
+ item
+ Kind = skSum
+ Column = Tv1InMeter
+ end
+ item
+ Kind = skSum
+ Column = Tv1InYardage
+ end
+ item
+ Kind = skSum
+ Column = Tv1OutJS
+ end
+ item
+ Kind = skSum
+ Column = Tv1OutMeter
+ end
+ item
+ Kind = skSum
+ Column = Tv1OutYardage
+ end
+ item
+ Kind = skSum
+ Column = Tv1StkJS
+ end
+ item
+ Kind = skSum
+ Column = Tv1StkMeter
+ end
+ item
+ Kind = skSum
+ Column = Tv1StkYardage
+ end>
+ DataController.Summary.SummaryGroups = <>
+ OptionsCustomize.ColumnFiltering = False
+ OptionsView.Footer = True
+ OptionsView.GroupByBox = False
+ OptionsView.IndicatorWidth = 30
+ Styles.IncSearch = DataLink_TatClothStk.SHuangSe
+ Styles.Footer = DataLink_TatClothStk.Default
+ Styles.Header = DataLink_TatClothStk.Default
+ Styles.Inactive = DataLink_TatClothStk.SHuangSe
+ Styles.Selection = DataLink_TatClothStk.SHuangSe
+ object Tv1ContractBuyName: TcxGridDBColumn
+ Caption = #23458#25143
+ DataBinding.FieldName = 'ContractBuyName'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Editing = False
+ Width = 110
+ end
+ object Tv1CName: TcxGridDBColumn
+ Caption = #20135#21697#21517#31216
+ DataBinding.FieldName = 'C_Name'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Editing = False
+ Width = 150
+ end
+ object Tv1InJS: TcxGridDBColumn
+ Caption = #20837#24211#21367#25968
+ DataBinding.FieldName = 'InJS'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Editing = False
+ Width = 66
+ end
+ object Tv1InMeter: TcxGridDBColumn
+ Caption = #20837#24211#31859#25968
+ DataBinding.FieldName = 'InMeter'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Editing = False
+ Width = 70
+ end
+ object Tv1InYardage: TcxGridDBColumn
+ Caption = #20837#24211#30721#25968
+ DataBinding.FieldName = 'InYardage'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Editing = False
+ Width = 70
+ end
+ object Tv1OutJS: TcxGridDBColumn
+ Caption = #20986#24211#21367#25968
+ DataBinding.FieldName = 'OutJS'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Editing = False
+ Width = 66
+ end
+ object Tv1OutMeter: TcxGridDBColumn
+ Caption = #20986#24211#31859#25968
+ DataBinding.FieldName = 'OutMeter'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Editing = False
+ Width = 70
+ end
+ object Tv1OutYardage: TcxGridDBColumn
+ Caption = #20986#24211#30721#25968
+ DataBinding.FieldName = 'OutYardage'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Editing = False
+ Width = 70
+ end
+ object Tv1StkJS: TcxGridDBColumn
+ Caption = #24211#23384#21367#25968
+ DataBinding.FieldName = 'StkJS'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Editing = False
+ Width = 66
+ end
+ object Tv1StkMeter: TcxGridDBColumn
+ Caption = #24211#23384#31859#25968
+ DataBinding.FieldName = 'StkMeter'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Editing = False
+ Width = 70
+ end
+ object Tv1StkYardage: TcxGridDBColumn
+ Caption = #24211#23384#30721#25968
+ DataBinding.FieldName = 'StkYardage'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Editing = False
+ Width = 70
+ end
+ end
+ object cxGrid1Level1: TcxGridLevel
+ GridView = Tv1
+ end
+ end
+ inherited ADOQueryBaseCmd: TADOQuery
+ Connection = DataLink_TatClothStk.ADOLink
+ Left = 553
+ Top = 200
+ end
+ inherited ADOQueryBaseTemp: TADOQuery
+ Connection = DataLink_TatClothStk.ADOLink
+ Left = 425
+ Top = 201
+ end
+ object ADOQueryMain: TADOQuery
+ Connection = DataLink_TatClothStk.ADOLink
+ LockType = ltReadOnly
+ Parameters = <>
+ Left = 252
+ Top = 260
+ end
+ object ADOQueryTemp: TADOQuery
+ Connection = DataLink_TatClothStk.ADOLink
+ LockType = ltReadOnly
+ CommandTimeout = 600
+ Parameters = <>
+ Left = 112
+ Top = 204
+ end
+ object DS_1: TDataSource
+ DataSet = CDS_1
+ Left = 828
+ Top = 284
+ end
+ object CDS_1: TClientDataSet
+ Aggregates = <>
+ Params = <>
+ Left = 776
+ Top = 284
+ end
+end
diff --git a/E04梭织坯布仓库/U_TatClothJXCList.pas b/E04梭织坯布仓库/U_TatClothJXCList.pas
new file mode 100644
index 0000000..c83ff58
--- /dev/null
+++ b/E04梭织坯布仓库/U_TatClothJXCList.pas
@@ -0,0 +1,182 @@
+unit U_TatClothJXCList;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
+ cxEdit, DB, cxDBData, cxGridCustomTableView, cxGridTableView,
+ cxGridCustomView, cxGridDBTableView, cxGridLevel, cxClasses, cxControls,
+ cxGrid, StdCtrls, ComCtrls, ExtCtrls, ToolWin, ADODB, DBClient,
+ cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxSkinsCore,
+ dxScrollbarAnnotations, U_BaseList, dxSkinWXI, dxDateRanges;
+
+type
+ TfrmTatClothJXCList = class(TfrmBaseList)
+ ToolBar1: TToolBar;
+ TBRafresh: TToolButton;
+ TBExport: TToolButton;
+ ToolButton4: TToolButton;
+ TBClose: TToolButton;
+ Panel1: TPanel;
+ Label2: TLabel;
+ Label5: TLabel;
+ Label1: TLabel;
+ BegDate: TDateTimePicker;
+ EndDate: TDateTimePicker;
+ IsJYTime: TCheckBox;
+ C_Name: TEdit;
+ ContractBuyName: TEdit;
+ cxGrid1: TcxGrid;
+ Tv1: TcxGridDBTableView;
+ Tv1ContractBuyName: TcxGridDBColumn;
+ Tv1CName: TcxGridDBColumn;
+ Tv1InJS: TcxGridDBColumn;
+ Tv1InMeter: TcxGridDBColumn;
+ Tv1InYardage: TcxGridDBColumn;
+ Tv1OutJS: TcxGridDBColumn;
+ Tv1OutMeter: TcxGridDBColumn;
+ Tv1OutYardage: TcxGridDBColumn;
+ Tv1StkJS: TcxGridDBColumn;
+ Tv1StkMeter: TcxGridDBColumn;
+ Tv1StkYardage: TcxGridDBColumn;
+ cxGrid1Level1: TcxGridLevel;
+ ADOQueryMain: TADOQuery;
+ ADOQueryTemp: TADOQuery;
+ DS_1: TDataSource;
+ CDS_1: TClientDataSet;
+ procedure FormClose(Sender: TObject; var Action: TCloseAction);
+ procedure FormCreate(Sender: TObject);
+ procedure FormShow(Sender: TObject);
+ procedure TBRafreshClick(Sender: TObject);
+ procedure TBExportClick(Sender: TObject);
+ procedure TBCloseClick(Sender: TObject);
+ procedure ToolButton4Click(Sender: TObject);
+ procedure IsJYTimeClick(Sender: TObject);
+ procedure FilterEditKeyPress(Sender: TObject; var Key: Char);
+ private
+ procedure InitGrid();
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+implementation
+
+uses
+ U_DataLink, U_RTFun;
+
+{$R *.dfm}
+
+procedure TfrmTatClothJXCList.FormClose(Sender: TObject; var Action: TCloseAction);
+begin
+ inherited;
+ Action := caFree;
+end;
+
+procedure TfrmTatClothJXCList.FormCreate(Sender: TObject);
+begin
+ inherited;
+ EndDate.DateTime := SGetServerDateTime(ADOQueryTemp);
+ BegDate.DateTime := EndDate.DateTime - 20;
+end;
+
+procedure TfrmTatClothJXCList.InitGrid();
+var
+ WSql, mDateSql: string;
+begin
+ //³öÈë¿âͳ¼ÆV_Tat_Cloth_IO(°´²éѯÈÕÆÚ), µ±ǰ¿â´æͳ¼ÆV_Tat_Cloth_Stk(²»ÊÜÈÕÆÚÏÞÖÆ)
+ WSql := SGetFilters(Panel1, 1, 2);
+ if Trim(WSql) <> '' then
+ WSql := ' and ' + WSql;
+ mDateSql := '';
+ if IsJYTime.Checked then
+ begin
+ mDateSql := ' and IOTime>=' + QuotedStr(FormatDateTime('yyyy-MM-dd', BegDate.DateTime));
+ mDateSql := mDateSql + ' and IOTime<' + QuotedStr(FormatDateTime('yyyy-MM-dd', EndDate.DateTime + 1));
+ end;
+
+ try
+ ADOQueryMain.DisableControls;
+ with ADOQueryMain do
+ begin
+ Filtered := False;
+ Close;
+ sql.Clear;
+ sql.Add('select isnull(A.ContractBuyName,B.ContractBuyName) as ContractBuyName,');
+ sql.Add('isnull(A.C_Name,B.C_Name) as C_Name,');
+ sql.Add('isnull(A.InJS,0) as InJS,isnull(A.InMeter,0) as InMeter,isnull(A.InYardage,0) as InYardage,');
+ sql.Add('isnull(A.OutJS,0) as OutJS,isnull(A.OutMeter,0) as OutMeter,isnull(A.OutYardage,0) as OutYardage,');
+ sql.Add('isnull(B.StkJS,0) as StkJS,isnull(B.StkMeter,0) as StkMeter,isnull(B.StkYardage,0) as StkYardage');
+ sql.Add('from (select ContractBuyName,C_Name,');
+ sql.Add('sum(case when IOFlag=''Èë¿â'' then 1 else 0 end) as InJS,');
+ sql.Add('sum(case when IOFlag=''Èë¿â'' then isnull(Meter,0) else 0 end) as InMeter,');
+ sql.Add('sum(case when IOFlag=''Èë¿â'' then isnull(Yardage,0) else 0 end) as InYardage,');
+ sql.Add('sum(case when IOFlag=''³ö¿â'' then 1 else 0 end) as OutJS,');
+ sql.Add('sum(case when IOFlag=''³ö¿â'' then isnull(Meter,0) else 0 end) as OutMeter,');
+ sql.Add('sum(case when IOFlag=''³ö¿â'' then isnull(Yardage,0) else 0 end) as OutYardage');
+ sql.Add('from V_Tat_Cloth_IO where 1=1' + mDateSql + WSql);
+ sql.Add('group by ContractBuyName,C_Name) A');
+ sql.Add('full outer join');
+ sql.Add('(select ContractBuyName,C_Name,count(*) as StkJS,');
+ sql.Add('sum(isnull(StkMeter,0)) as StkMeter,sum(isnull(StkYardage,0)) as StkYardage');
+ sql.Add('from V_Tat_Cloth_Stk where 1=1' + WSql);
+ sql.Add('group by ContractBuyName,C_Name) B');
+ sql.Add('on isnull(A.ContractBuyName,'''')=isnull(B.ContractBuyName,'''')');
+ sql.Add('and isnull(A.C_Name,'''')=isnull(B.C_Name,'''')');
+ sql.Add('order by 1,2');
+// showmessage(sql.text);
+ Open;
+ end;
+ SCreateCDS(ADOQueryMain, CDS_1);
+ SInitCDSData(ADOQueryMain, CDS_1);
+ finally
+ ADOQueryMain.EnableControls;
+ Tv1.DataController.Filter.Clear;
+ end;
+end;
+
+procedure TfrmTatClothJXCList.FormShow(Sender: TObject);
+begin
+ inherited;
+ ReadCxGrid(trim(self.Caption) + 'Tv1', Tv1, '³ÉƷ²ֿâ');
+ InitGrid();
+end;
+
+procedure TfrmTatClothJXCList.TBRafreshClick(Sender: TObject);
+begin
+ InitGrid();
+end;
+
+procedure TfrmTatClothJXCList.TBExportClick(Sender: TObject);
+begin
+ if ADOQueryMain.IsEmpty then
+ exit;
+ TcxGridToExcel(Self.Caption, cxGrid1);
+end;
+
+procedure TfrmTatClothJXCList.TBCloseClick(Sender: TObject);
+begin
+ Close;
+end;
+
+procedure TfrmTatClothJXCList.ToolButton4Click(Sender: TObject);
+begin
+ WriteCxGrid(trim(self.Caption) + 'Tv1', Tv1, '³ÉƷ²ֿâ');
+end;
+
+procedure TfrmTatClothJXCList.IsJYTimeClick(Sender: TObject);
+begin
+ inherited;
+ InitGrid();
+end;
+
+procedure TfrmTatClothJXCList.FilterEditKeyPress(Sender: TObject; var Key: Char);
+begin
+ if Key = #13 then
+ begin
+ InitGrid();
+ end;
+end;
+
+end.