This commit is contained in:
acer 2026-05-01 20:47:16 +08:00
parent 20fac9d391
commit cc44576c8c
28 changed files with 5280 additions and 213 deletions

View File

@ -14,7 +14,7 @@ uses
RM_GridReport, RM_Dataset, Vcl.Buttons, RM_E_llPDF, RM_BarCode, RM_e_Graphic, RM_GridReport, RM_Dataset, Vcl.Buttons, RM_E_llPDF, RM_BarCode, RM_e_Graphic,
RM_e_Jpeg, RM_e_Xls, cxContainer, cxMaskEdit, cxDropDownEdit, cxMRUEdit, RM_e_Jpeg, RM_e_Xls, cxContainer, cxMaskEdit, cxDropDownEdit, cxMRUEdit,
System.Net.HttpClient, System.Net.HttpClientComponent, System.JSON, System.Net.HttpClient, System.Net.HttpClientComponent, System.JSON,
dxSkinsCore, dxSkinsDefaultPainters; dxSkinsCore, dxSkinsDefaultPainters, dxSkinWXI;
type type
TfrmLabelPrint = class(TfrmBaseHelp) TfrmLabelPrint = class(TfrmBaseHelp)

View File

@ -4,7 +4,7 @@
<MainSource>Company.dpr</MainSource> <MainSource>Company.dpr</MainSource>
<Base>True</Base> <Base>True</Base>
<Config Condition="'$(Config)'==''">Debug</Config> <Config Condition="'$(Config)'==''">Debug</Config>
<TargetedPlatforms>38017</TargetedPlatforms> <TargetedPlatforms>1</TargetedPlatforms>
<AppType>Library</AppType> <AppType>Library</AppType>
<FrameworkType>VCL</FrameworkType> <FrameworkType>VCL</FrameworkType>
<ProjectVersion>19.2</ProjectVersion> <ProjectVersion>19.2</ProjectVersion>
@ -13,16 +13,6 @@
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''"> <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
<Base>true</Base> <Base>true</Base>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Android64' and '$(Base)'=='true') or '$(Base_Android64)'!=''">
<Base_Android64>true</Base_Android64>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='iOSDevice64' and '$(Base)'=='true') or '$(Base_iOSDevice64)'!=''">
<Base_iOSDevice64>true</Base_iOSDevice64>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''"> <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
<Base_Win32>true</Base_Win32> <Base_Win32>true</Base_Win32>
<CfgParent>Base</CfgParent> <CfgParent>Base</CfgParent>
@ -43,24 +33,6 @@
<CfgParent>Base</CfgParent> <CfgParent>Base</CfgParent>
<Base>true</Base> <Base>true</Base>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Android64' and '$(Cfg_2)'=='true') or '$(Cfg_2_Android64)'!=''">
<Cfg_2_Android64>true</Cfg_2_Android64>
<CfgParent>Cfg_2</CfgParent>
<Cfg_2>true</Cfg_2>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='iOSDevice64' and '$(Cfg_2)'=='true') or '$(Cfg_2_iOSDevice64)'!=''">
<Cfg_2_iOSDevice64>true</Cfg_2_iOSDevice64>
<CfgParent>Cfg_2</CfgParent>
<Cfg_2>true</Cfg_2>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='OSX64' and '$(Cfg_2)'=='true') or '$(Cfg_2_OSX64)'!=''">
<Cfg_2_OSX64>true</Cfg_2_OSX64>
<CfgParent>Cfg_2</CfgParent>
<Cfg_2>true</Cfg_2>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''"> <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
<Cfg_2_Win32>true</Cfg_2_Win32> <Cfg_2_Win32>true</Cfg_2_Win32>
<CfgParent>Cfg_2</CfgParent> <CfgParent>Cfg_2</CfgParent>
@ -84,13 +56,6 @@
<VerInfo_Locale>2052</VerInfo_Locale> <VerInfo_Locale>2052</VerInfo_Locale>
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys> <VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Base_Android64)'!=''">
<Android_LauncherIcon192>$(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png</Android_LauncherIcon192>
<EnabledSysJars>android-support-v4.dex.jar;cloud-messaging.dex.jar;com-google-android-gms.play-services-ads-base.17.2.0.dex.jar;com-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar;com-google-android-gms.play-services-ads-lite.17.2.0.dex.jar;com-google-android-gms.play-services-ads.17.2.0.dex.jar;com-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar;com-google-android-gms.play-services-analytics.16.0.8.dex.jar;com-google-android-gms.play-services-base.16.0.1.dex.jar;com-google-android-gms.play-services-basement.16.2.0.dex.jar;com-google-android-gms.play-services-gass.17.2.0.dex.jar;com-google-android-gms.play-services-identity.16.0.0.dex.jar;com-google-android-gms.play-services-maps.16.1.0.dex.jar;com-google-android-gms.play-services-measurement-base.16.4.0.dex.jar;com-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar;com-google-android-gms.play-services-stats.16.0.1.dex.jar;com-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar;com-google-android-gms.play-services-tasks.16.0.1.dex.jar;com-google-android-gms.play-services-wallet.16.0.1.dex.jar;com-google-firebase.firebase-analytics.16.4.0.dex.jar;com-google-firebase.firebase-common.16.1.0.dex.jar;com-google-firebase.firebase-iid-interop.16.0.1.dex.jar;com-google-firebase.firebase-iid.17.1.1.dex.jar;com-google-firebase.firebase-measurement-connector.17.0.1.dex.jar;com-google-firebase.firebase-messaging.17.5.0.dex.jar;fmx.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar</EnabledSysJars>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_iOSDevice64)'!=''">
<iOS_AppStore1024>$(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_1024x1024.png</iOS_AppStore1024>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''"> <PropertyGroup Condition="'$(Base_Win32)'!=''">
<DCC_Namespace>System.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace> <DCC_Namespace>System.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
<BT_BuildType>Debug</BT_BuildType> <BT_BuildType>Debug</BT_BuildType>
@ -113,17 +78,8 @@
<DCC_Optimize>false</DCC_Optimize> <DCC_Optimize>false</DCC_Optimize>
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames> <DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Android64)'!=''">
<BT_BuildType>Debug</BT_BuildType>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_iOSDevice64)'!=''">
<BT_BuildType>Debug</BT_BuildType>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_OSX64)'!=''">
<BT_BuildType>Debug</BT_BuildType>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''"> <PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
<Debugger_HostApplication>D:\Dp10RepoV1\项目代码\D10xhGemei\A01基础公司管理\testDll.exe</Debugger_HostApplication> <Debugger_HostApplication>E:\rtgit\trade\D10xhGemei\A01基础公司管理\testDll.exe</Debugger_HostApplication>
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName)</VerInfo_Keys> <VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName)</VerInfo_Keys>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -274,10 +230,6 @@
</Source> </Source>
</Delphi.Personality> </Delphi.Personality>
<Platforms> <Platforms>
<Platform value="Android64">True</Platform>
<Platform value="iOSDevice64">True</Platform>
<Platform value="Linux64">True</Platform>
<Platform value="OSX64">True</Platform>
<Platform value="Win32">True</Platform> <Platform value="Win32">True</Platform>
<Platform value="Win64">False</Platform> <Platform value="Win64">False</Platform>
</Platforms> </Platforms>

Binary file not shown.

View File

@ -58,5 +58,5 @@ dxSkinVisualStudio2013Dark=0
dxSkinVisualStudio2013Light=0 dxSkinVisualStudio2013Light=0
dxSkinVS2010=0 dxSkinVS2010=0
dxSkinWhiteprint=0 dxSkinWhiteprint=0
dxSkinWXI=0 dxSkinWXI=1
dxSkinXmas2008Blue=0 dxSkinXmas2008Blue=0

View File

@ -31,7 +31,7 @@ uses
dxSkinSpringtime, dxSkinStardust, dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinSpringtime, dxSkinStardust, dxSkinSummer2008, dxSkinTheAsphaltWorld,
dxSkinTheBezier, dxSkinValentine, dxSkinVisualStudio2013Blue, dxSkinTheBezier, dxSkinValentine, dxSkinVisualStudio2013Blue,
dxSkinVisualStudio2013Dark, dxSkinVisualStudio2013Light, dxSkinVS2010, dxSkinVisualStudio2013Dark, dxSkinVisualStudio2013Light, dxSkinVS2010,
dxSkinWhiteprint, dxSkinXmas2008Blue; dxSkinWhiteprint, dxSkinXmas2008Blue, dxCoreGraphics;
type type
TfrmCustInput = class(TfrmBaseInput) TfrmCustInput = class(TfrmBaseInput)
@ -638,6 +638,11 @@ begin
Exit; Exit;
end; end;
if CDS_LXR.IsEmpty then
begin
Application.MessageBox('明细数据不能为空!', '提示', 0);
Exit;
end;
with CDS_LXR do with CDS_LXR do
begin begin
@ -656,24 +661,24 @@ begin
EnableControls; EnableControls;
Exit; Exit;
end; end;
if Trim(FieldByName('Telephone').AsString) = '' then // if Trim(FieldByName('Telephone').AsString) = '' then
begin // begin
Application.MessageBox('联系电话不能为空!', '提示', 0); // Application.MessageBox('联系电话不能为空!', '提示', 0);
EnableControls; // EnableControls;
Exit; // Exit;
end; // end;
if Trim(FieldByName('mxaddress').AsString) = '' then if Trim(FieldByName('mxaddress').AsString) = '' then
begin begin
Application.MessageBox('µØÖ·²»ÄÜΪ¿Õ!', 'Ìáʾ', 0); Application.MessageBox('µØÖ·²»ÄÜΪ¿Õ!', 'Ìáʾ', 0);
EnableControls; EnableControls;
Exit; Exit;
end; end;
if Trim(FieldByName('mxarea').AsString) = '' then // if Trim(FieldByName('mxarea').AsString) = '' then
begin // begin
Application.MessageBox('区域不能为空!', '提示', 0); // Application.MessageBox('区域不能为空!', '提示', 0);
EnableControls; // EnableControls;
Exit; // Exit;
end; // end;
Next; Next;
end; end;
EnableControls; EnableControls;

View File

@ -514,13 +514,41 @@ inherited frmCustomer: TfrmCustomer
Options.Editing = False Options.Editing = False
Width = 163 Width = 163
end end
object Tv1Column14: TcxGridDBColumn
Caption = #40664#35748#32852#31995#20154
DataBinding.FieldName = 'Contacts'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 120
end
object Tv1Column15: TcxGridDBColumn
Caption = #40664#35748#25163#26426#21495
DataBinding.FieldName = 'Telephone'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 120
end
object Tv1Column16: TcxGridDBColumn
Caption = #40664#35748#22320#22336
DataBinding.FieldName = 'mxaddress'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 120
end
object Tv1Column17: TcxGridDBColumn
Caption = #40664#35748#30005#35805#21495#30721
DataBinding.FieldName = 'Telephone'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 120
end
object Tv1Column2: TcxGridDBColumn object Tv1Column2: TcxGridDBColumn
Caption = #23458#25143#31561#32423 Caption = #23458#25143#31561#32423
DataBinding.FieldName = 'CoLevel' DataBinding.FieldName = 'CoLevel'
DataBinding.IsNullValueType = True DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter HeaderAlignmentHorz = taCenter
Options.Editing = False Options.Editing = False
Width = 115 Width = 130
end end
object Tv1Column3: TcxGridDBColumn object Tv1Column3: TcxGridDBColumn
Caption = #30331#35760#26102#38388 Caption = #30331#35760#26102#38388

View File

@ -102,6 +102,10 @@ type
Tv1Column12: TcxGridDBColumn; Tv1Column12: TcxGridDBColumn;
Tv1Column13: TcxGridDBColumn; Tv1Column13: TcxGridDBColumn;
cxGridLevel1: TcxGridLevel; cxGridLevel1: TcxGridLevel;
Tv1Column14: TcxGridDBColumn;
Tv1Column15: TcxGridDBColumn;
Tv1Column16: TcxGridDBColumn;
Tv1Column17: 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);
@ -224,7 +228,7 @@ begin
begin begin
close; close;
sql.Clear; sql.Clear;
sql.Add('update BS_Company SET status=''1'',Chktime=getdate(),Chker=' + quotedstr(trim(DName))); sql.Add('update BS_Company SET status=''0'',Chktime=getdate(),Chker=' + quotedstr(trim(DName)));
sql.Add('where EXISTS(select X.RTValue from [dbo].[F_Tool_SplitString](' + QuotedStr(RTValues[0]) + ','','') X where BS_Company.CoID=X.RTValue ) '); sql.Add('where EXISTS(select X.RTValue from [dbo].[F_Tool_SplitString](' + QuotedStr(RTValues[0]) + ','','') X where BS_Company.CoID=X.RTValue ) ');
execsql; execsql;
end; end;
@ -240,7 +244,7 @@ var
SqlStr, FilterStr: string; SqlStr, FilterStr: string;
begin begin
FilterStr := SGetFilters(Panel1, 1, 2); FilterStr := SGetFilters(Panel1, 1, 2);
SqlStr := ' select * from BS_Company where CoType=''¿Í»§'' and Valid=''Y'' '; SqlStr := ' select * from BS_Company A left join (select coid,Contacts,mxaddress,Telephone,PhoneNumber from BS_Company_contact where IsDefault = 1) B on A.coid = B.coid where CoType=''¿Í»§'' and Valid=''Y'' ';
case cxTabControl1.TabIndex of case cxTabControl1.TabIndex of
0: 0:
begin begin

Binary file not shown.

View File

@ -10,7 +10,6 @@ inherited frmClothInfo: TfrmClothInfo
FormStyle = fsMDIChild FormStyle = fsMDIChild
Position = poScreenCenter Position = poScreenCenter
Visible = True Visible = True
ExplicitLeft = 0
ExplicitWidth = 1556 ExplicitWidth = 1556
ExplicitHeight = 847 ExplicitHeight = 847
PixelsPerInch = 96 PixelsPerInch = 96

View File

@ -386,7 +386,7 @@ begin
SqlStr := SqlStr + ' ELSE 1 '; SqlStr := SqlStr + ' ELSE 1 ';
SqlStr := SqlStr + ' END, '; SqlStr := SqlStr + ' END, ';
SqlStr := SqlStr + ' CASE '; SqlStr := SqlStr + ' CASE ';
SqlStr := SqlStr + ' WHEN C_ColorNo NOT LIKE ''%[^0-9]%'' THEN CAST(C_ColorNo AS INT) '; SqlStr := SqlStr + ' WHEN C_ColorNo NOT LIKE ''%[^0-9]%'' THEN CAST(C_ColorNo AS decimal(18,2)) ';
SqlStr := SqlStr + ' ELSE 999999999 '; SqlStr := SqlStr + ' ELSE 999999999 ';
SqlStr := SqlStr + ' END, '; SqlStr := SqlStr + ' END, ';
SqlStr := SqlStr + ' CASE '; SqlStr := SqlStr + ' CASE ';
@ -399,7 +399,7 @@ begin
SqlStr := SqlStr + ' WHEN PATINDEX(''%[0-9]%'', C_ColorNo) > 0 THEN '; SqlStr := SqlStr + ' WHEN PATINDEX(''%[0-9]%'', C_ColorNo) > 0 THEN ';
SqlStr := SqlStr + ' CASE '; SqlStr := SqlStr + ' CASE ';
SqlStr := SqlStr + ' WHEN ISNUMERIC(SUBSTRING(C_ColorNo, PATINDEX(''%[0-9]%'', C_ColorNo), LEN(C_ColorNo))) = 1 '; SqlStr := SqlStr + ' WHEN ISNUMERIC(SUBSTRING(C_ColorNo, PATINDEX(''%[0-9]%'', C_ColorNo), LEN(C_ColorNo))) = 1 ';
SqlStr := SqlStr + ' THEN CAST(SUBSTRING(C_ColorNo, PATINDEX(''%[0-9]%'', C_ColorNo), LEN(C_ColorNo)) AS INT) '; SqlStr := SqlStr + ' THEN CAST(SUBSTRING(C_ColorNo, PATINDEX(''%[0-9]%'', C_ColorNo), LEN(C_ColorNo)) AS decimal(18,2)) ';
SqlStr := SqlStr + ' ELSE 0 '; SqlStr := SqlStr + ' ELSE 0 ';
SqlStr := SqlStr + ' END '; SqlStr := SqlStr + ' END ';
SqlStr := SqlStr + ' ELSE '; SqlStr := SqlStr + ' ELSE ';

View File

@ -133,8 +133,6 @@ inherited frmItemizedListInPut: TfrmItemizedListInPut
Align = alClient Align = alClient
PopupMenu = PopupMenu2 PopupMenu = PopupMenu2
TabOrder = 0 TabOrder = 0
ExplicitLeft = 2
ExplicitTop = 5
object Tv1: TcxGridDBTableView object Tv1: TcxGridDBTableView
OnMouseDown = Tv1MouseDown OnMouseDown = Tv1MouseDown
Navigator.Buttons.CustomButtons = <> Navigator.Buttons.CustomButtons = <>

View File

@ -116,7 +116,6 @@ type
procedure ToolButton1Click(Sender: TObject); procedure ToolButton1Click(Sender: TObject);
procedure Tv1Column8PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer); procedure Tv1Column8PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean); procedure Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
procedure FormDestroy(Sender: TObject);
private private
FSCXDH: string; FSCXDH: string;
FShowKeyid: integer; FShowKeyid: integer;
@ -137,6 +136,7 @@ type
canshu1: string; canshu1: string;
fFlileFlag: string; fFlileFlag: string;
fordtype: string; fordtype: string;
FSaveFlag: Boolean;
{ Public declarations } { Public declarations }
end; end;
@ -318,27 +318,27 @@ begin
TIMNo.Text := ''; TIMNo.Text := '';
// TIMNo.Enabled := True; // TIMNo.Enabled := True;
end; end;
if CopyInt = 99 then // if CopyInt = 99 then
begin // begin
PState := 0; // PState := 0;
FTIMID := ''; // FTIMID := '';
TIMNo.Text := ''; // TIMNo.Text := '';
// TIMNo.Enabled := True; //// TIMNo.Enabled := True;
TIMDate.Date := FDate; // TIMDate.Date := FDate;
with CDS_1 do // with CDS_1 do
begin // begin
First; // First;
while not Eof do // while not Eof do
begin // begin
Edit; // Edit;
FieldByName('TIMID').Value := ''; // FieldByName('TIMID').Value := '';
FieldByName('TMSId').Value := ''; // FieldByName('TMSId').Value := '';
Post; // Post;
Next; // Next;
end; // end;
end; // end;
//
end; // end;
end; end;
procedure TfrmItemizedListInPut.ZDYHelp(FButn: TcxButtonEdit; LType: string); procedure TfrmItemizedListInPut.ZDYHelp(FButn: TcxButtonEdit; LType: string);
@ -347,18 +347,6 @@ var
begin begin
end; end;
procedure TfrmItemizedListInPut.FormDestroy(Sender: TObject);
begin
inherited;
with ADOQueryBaseCmd do
begin
close;
sql.clear;
SQL.add('delete from Bs_Cloth_IO where tisid not in (select tisid from Trade_ItemizedList_Sub) and STKName = ''óÒײ¼Æ¥'' ');
ExecSQL;
end;
end;
procedure TfrmItemizedListInPut.FormShow(Sender: TObject); procedure TfrmItemizedListInPut.FormShow(Sender: TObject);
var var
i: Integer; i: Integer;
@ -409,7 +397,6 @@ begin
// RegisterHotKey(handle, FShowKeyid, 0, VK_ADD); //+ // RegisterHotKey(handle, FShowKeyid, 0, VK_ADD); //+
// RegisterHotKey(handle, FShowKeyid, 0, VK_SUBTRACT); //- // RegisterHotKey(handle, FShowKeyid, 0, VK_SUBTRACT); //-
end; end;
function TfrmItemizedListInPut.SaveData(): Boolean; function TfrmItemizedListInPut.SaveData(): Boolean;
@ -741,7 +728,7 @@ begin
if SaveData() then if SaveData() then
begin begin
Application.MessageBox('±£´æ³É¹¦£¡', 'Ìáʾ', 0); Application.MessageBox('±£´æ³É¹¦£¡', 'Ìáʾ', 0);
FSaveFlag := True;
// with ADOCmd do // with ADOCmd do
// begin // begin
// Close; // Close;
@ -799,8 +786,18 @@ var
MPrintJson, MTISIds: string; MPrintJson, MTISIds: string;
JSONObject: TJSONObject; // JSONÀà JSONObject: TJSONObject; // JSONÀà
begin begin
if FTIMID = '' then // if FTIMID = '' then
// begin
// Application.MessageBox('请先点击保存再点击打印!', '提示', 0);
// Exit;
// end;
if (not FSaveFlag) and (PState = 0) then
begin
Application.MessageBox('请先点击保存再点击打印!', '提示', 0);
Exit; Exit;
end;
MTISIds := SelCDSKey(CDS_1, ['TISId'])[0]; MTISIds := SelCDSKey(CDS_1, ['TISId'])[0];
with ADOQueryBaseTemp do with ADOQueryBaseTemp do
begin begin
@ -1012,8 +1009,16 @@ var
MPrintJson: string; MPrintJson: string;
JSONObject: TJSONObject; // JSONÀà JSONObject: TJSONObject; // JSONÀà
begin begin
if FTIMID = '' then // if FTIMID = '' then
// begin
// Application.MessageBox('请先点击保存再点击打印!', '提示', 0);
// Exit;
// end;
if (not FSaveFlag) and (PState = 0) then
begin
Application.MessageBox('请先点击保存再点击打印!', '提示', 0);
Exit; Exit;
end;
with ADOQueryBaseTemp do with ADOQueryBaseTemp do
begin begin
@ -1277,7 +1282,7 @@ end;
procedure TfrmItemizedListInPut.Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean); procedure TfrmItemizedListInPut.Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
var var
MTISId, MQtyUnit: string; MTISId, MQtyUnit, maxno: string;
AColumn: TcxGridColumn; AColumn: TcxGridColumn;
begin begin
AColumn := ACellViewInfo.Item as TcxGridColumn; AColumn := ACellViewInfo.Item as TcxGridColumn;
@ -1310,46 +1315,51 @@ begin
FName := CDS_1.FieldByName('C_Name').ASString; FName := CDS_1.FieldByName('C_Name').ASString;
FColor := CDS_1.FieldByName('C_Color').ASString; FColor := CDS_1.FieldByName('C_Color').ASString;
FColorNo := CDS_1.FieldByName('C_colorNo').ASString; FColorNo := CDS_1.FieldByName('C_colorNo').ASString;
if SavesubData() then // if SavesubData() then
// begin
if Trim(FTIMID) = '' then
begin begin
try if GetLSNo(ADOCmd, FTIMID, 'DD', 'Trade_ItemizedList_Main', 3, 1) = False then
frmItemizedListQtyInPut := TfrmItemizedListQtyInPut.Create(Application); raise Exception.Create('取最大号失败!');
with frmItemizedListQtyInPut do end;
try
frmItemizedListQtyInPut := TfrmItemizedListQtyInPut.Create(Application);
with frmItemizedListQtyInPut do
begin
FTIMId := self.FTIMID;
FTISId := MTISId;
FQtyUnit := MQtyUnit;
FName := Self.FName;
FColor := Self.FColor;
FColorNo := Self.FColorNo;
if ShowModal = 1 then
begin begin
FTIMId := Self.FTIMId;
FTISId := MTISId;
FQtyUnit := MQtyUnit;
FName := Self.FName;
FColor := Self.FColor;
FColorNo := Self.FColorNo;
if ShowModal = 1 then
begin
// Self.initGrid1(Self.FTIMID); // Self.initGrid1(Self.FTIMID);
with ADOTemp do with ADOTemp do
begin begin
Close; Close;
SQL.Clear; SQL.Clear;
sql.Add('select '); sql.Add('select ');
sql.Add('SubOutQty = sum(isnull( A.Qty,0)) '); sql.Add('SubOutQty = sum(isnull( A.Qty,0)) ');
sql.Add(',SubOutPS = count(isnull( A.TISId,0)) '); sql.Add(',SubOutPS = count(isnull( A.TISId,0)) ');
sql.Add('from BS_Cloth_IO A '); sql.Add('from BS_Cloth_IO A ');
SQL.Add('where A.TISID =' + QuotedStr(CDS_1.FieldByName('TISId').AsString)); SQL.Add('where A.TISID =' + QuotedStr(CDS_1.FieldByName('TISId').AsString));
// ShowMessage(sql.Text); // ShowMessage(sql.Text);
open; open;
end; end;
with self.CDS_1 do with self.CDS_1 do
begin begin
edit; edit;
FieldByName('TISPiece').Value := ADOTemp.FieldByName('SubOutPS').Value; FieldByName('TISPiece').Value := ADOTemp.FieldByName('SubOutPS').Value;
FieldByName('TISQty').Value := ADOTemp.FieldByName('SubOutQty').Value; FieldByName('TISQty').Value := ADOTemp.FieldByName('SubOutQty').Value;
post; post;
end;
end; end;
end; end;
finally
frmItemizedListQtyInPut.Free;
end; end;
finally
frmItemizedListQtyInPut.Free;
end; end;
// end;
end; end;

View File

@ -398,8 +398,19 @@ var
JSONObject: TJSONObject; // JSONÀà JSONObject: TJSONObject; // JSONÀà
begin begin
FTIMID := Trim(Self.Order_Main.fieldbyname('TIMID').AsString); FTIMID := Trim(Self.Order_Main.fieldbyname('TIMID').AsString);
MFiltration := Trim(Self.Order_Main.fieldbyname('TIMNo').AsString); with ADOQueryTemp do
MPrintJson := ' {"LMType": "ItemizedListList1" '; begin
close;
sql.Clear;
sql.Add(' select Filtration= SUBSTRING(CAST((select distinct '','' +A.BCIOID from BS_Cloth_IO A ');
sql.Add(' where A.IOFlag=''Èë¿â'' and TIMID= ' + quotedstr(Trim(FTIMID)));
sql.Add(' for xml path('''') ) AS VARCHAR(max)) , 2, 8000)');
open;
end;
MFiltration := Trim(ADOQueryTemp.FieldByName('Filtration').AsString);
// MFiltration := Trim(Self.Order_Main.fieldbyname('TIMNo').AsString);
MPrintJson := ' {"LMType": "TradeFinishClothInPrt1" ';
MPrintJson := MPrintJson + ' ,"PreviewPrint": true '; MPrintJson := MPrintJson + ' ,"PreviewPrint": true ';
MPrintJson := MPrintJson + ' ,"PrtArgs": [ { "IsSql": false, "Filtration":" ' + MFiltration + '" }, '; MPrintJson := MPrintJson + ' ,"PrtArgs": [ { "IsSql": false, "Filtration":" ' + MFiltration + '" }, ';
MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" }, '; MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" }, ';
@ -629,12 +640,26 @@ end;
procedure TfrmItemizedListList.ToolButton5Click(Sender: TObject); procedure TfrmItemizedListList.ToolButton5Click(Sender: TObject);
var var
MFiltration: string; MFiltration, MTISIds: string;
MPrintJson: string; MPrintJson: string;
JSONObject: TJSONObject; // JSONÀà JSONObject: TJSONObject; // JSONÀà
begin begin
MFiltration := SelCDSKey(Order_Main, ['TISId'])[0]; MTISIds := SelCDSKey(Order_Main, ['TISId'])[0];
MPrintJson := ' {"LMType": "ItemizedListList2" '; with ADOQueryTemp do
begin
close;
sql.Clear;
sql.Add(' select Filtration= SUBSTRING(CAST((select distinct '','' +A.BCIOID from BS_Cloth_IO A ');
sql.Add(' where A.IOFlag=''Èë¿â'' ');
sql.Add(' and exists(SELECT * from [dbo].[F_Tool_SplitString](' + quotedstr(MTISIds) + ','','') SP where SP.RTValue=A.TISId ) ');
sql.Add(' for xml path('''') ) AS VARCHAR(max)) , 2, 8000)');
open;
end;
MFiltration := Trim(ADOQueryTemp.FieldByName('Filtration').AsString);
// MFiltration := SelCDSKey(Order_Main, ['TISId'])[0];
MPrintJson := ' {"LMType": "TradeFinishClothInPrt1" ';
MPrintJson := MPrintJson + ' ,"PreviewPrint": true '; MPrintJson := MPrintJson + ' ,"PreviewPrint": true ';
MPrintJson := MPrintJson + ' ,"PrtArgs": [ { "IsSql": false, "Filtration":" ' + MFiltration + '" }, '; MPrintJson := MPrintJson + ' ,"PrtArgs": [ { "IsSql": false, "Filtration":" ' + MFiltration + '" }, ';
MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" }, '; MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" }, ';

View File

@ -2,33 +2,38 @@ inherited frmItemizedListQtyInPut: TfrmItemizedListQtyInPut
Left = 67 Left = 67
Top = 126 Top = 126
Caption = #26126#32454#20837#24211#30331#35760 Caption = #26126#32454#20837#24211#30331#35760
ClientHeight = 350 ClientHeight = 379
ClientWidth = 552 ClientWidth = 485
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
Font.Height = -16 Font.Height = -16
Position = poScreenCenter Position = poScreenCenter
OnClose = FormClose OnClose = FormClose
ExplicitWidth = 568 ExplicitWidth = 501
ExplicitHeight = 389 ExplicitHeight = 418
PixelsPerInch = 96 PixelsPerInch = 96
TextHeight = 21 TextHeight = 21
object pnl1: TPanel [0] object pnl1: TPanel [0]
Left = 0 Left = 0
Top = 0 Top = 0
Width = 552 Width = 485
Height = 350 Height = 379
Align = alClient Align = alClient
Caption = 'pnl1' Caption = 'pnl1'
TabOrder = 0 TabOrder = 0
ExplicitWidth = 552
ExplicitHeight = 350
object cxGrid1: TcxGrid object cxGrid1: TcxGrid
Tag = 2 Tag = 2
Left = 1 Left = 1
Top = 97 Top = 127
Width = 550 Width = 483
Height = 252 Height = 251
Align = alClient Align = alClient
PopupMenu = PopupMenu1 PopupMenu = PopupMenu1
TabOrder = 0 TabOrder = 0
ExplicitTop = 97
ExplicitWidth = 550
ExplicitHeight = 252
object Tv1: TcxGridDBTableView object Tv1: TcxGridDBTableView
OnKeyDown = Tv1KeyDown OnKeyDown = Tv1KeyDown
Navigator.Buttons.CustomButtons = <> Navigator.Buttons.CustomButtons = <>
@ -112,8 +117,8 @@ inherited frmItemizedListQtyInPut: TfrmItemizedListQtyInPut
Tag = 1 Tag = 1
Left = 1 Left = 1
Top = 1 Top = 1
Width = 550 Width = 483
Height = 30 Height = 60
AutoSize = True AutoSize = True
ButtonHeight = 30 ButtonHeight = 30
ButtonWidth = 83 ButtonWidth = 83
@ -130,6 +135,8 @@ inherited frmItemizedListQtyInPut: TfrmItemizedListQtyInPut
ParentFont = False ParentFont = False
ShowCaptions = True ShowCaptions = True
TabOrder = 1 TabOrder = 1
ExplicitWidth = 550
ExplicitHeight = 30
object TBSave: TToolButton object TBSave: TToolButton
Left = 0 Left = 0
Top = 0 Top = 0
@ -160,26 +167,27 @@ inherited frmItemizedListQtyInPut: TfrmItemizedListQtyInPut
AutoSize = True AutoSize = True
Caption = #21024#38500 Caption = #21024#38500
ImageIndex = 6 ImageIndex = 6
Wrap = True
OnClick = TBDelClick OnClick = TBDelClick
end end
object btn4: TToolButton object btn4: TToolButton
Left = 252 Left = 0
Top = 0 Top = 30
AutoSize = True AutoSize = True
Caption = #20445#23384#26684#24335 Caption = #20445#23384#26684#24335
ImageIndex = 16 ImageIndex = 16
end end
object ToolButton2: TToolButton object ToolButton2: TToolButton
Left = 339 Left = 87
Top = 0 Top = 30
AutoSize = True AutoSize = True
Caption = #25171#21360#26412#21333 Caption = #25171#21360#26412#21333
ImageIndex = 21 ImageIndex = 21
OnClick = ToolButton2Click OnClick = ToolButton2Click
end end
object TBClose: TToolButton object TBClose: TToolButton
Left = 426 Left = 174
Top = 0 Top = 30
AutoSize = True AutoSize = True
Caption = #20851#38381 Caption = #20851#38381
ImageIndex = 7 ImageIndex = 7
@ -188,11 +196,13 @@ inherited frmItemizedListQtyInPut: TfrmItemizedListQtyInPut
end end
object pnl2: TPanel object pnl2: TPanel
Left = 1 Left = 1
Top = 31 Top = 61
Width = 550 Width = 483
Height = 66 Height = 66
Align = alTop Align = alTop
TabOrder = 2 TabOrder = 2
ExplicitTop = 31
ExplicitWidth = 550
object Label9: TLabel object Label9: TLabel
Left = 33 Left = 33
Top = 7 Top = 7
@ -314,4 +324,8 @@ inherited frmItemizedListQtyInPut: TfrmItemizedListQtyInPut
Left = 60 Left = 60
Top = 274 Top = 274
end end
object ADOConnection1: TADOConnection
Left = 248
Top = 160
end
end end

View File

@ -50,6 +50,7 @@ type
Tv1BCIOID: TcxGridDBColumn; Tv1BCIOID: TcxGridDBColumn;
ADOQueryBatch: TADOQuery; ADOQueryBatch: TADOQuery;
Label1: TLabel; Label1: TLabel;
ADOConnection1: TADOConnection;
procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormShow(Sender: TObject); procedure FormShow(Sender: TObject);
procedure TBDelClick(Sender: TObject); procedure TBDelClick(Sender: TObject);
@ -63,6 +64,7 @@ type
procedure btnAddClick(Sender: TObject); procedure btnAddClick(Sender: TObject);
procedure Tv1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); procedure Tv1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
procedure FormDestroy(Sender: TObject); procedure FormDestroy(Sender: TObject);
procedure FormCreate(Sender: TObject);
private private
{ Private declarations } { Private declarations }
function SaveData(): Boolean; function SaveData(): Boolean;
@ -352,6 +354,23 @@ begin
Action := caFree; Action := caFree;
end; end;
procedure TfrmItemizedListQtyInPut.FormCreate(Sender: TObject);
begin
inherited;
try
with ADOConnection1 do
begin
Connected := false;
ConnectionString := DConString;
Connected := true;
end;
ADOQueryBaseCmd.Connection := ADOConnection1;
ADOQueryBaseTemp.Connection := ADOConnection1;
except
application.MessageBox('网络连接失败!', '提示信息');
end;
end;
procedure TfrmItemizedListQtyInPut.FormDestroy(Sender: TObject); procedure TfrmItemizedListQtyInPut.FormDestroy(Sender: TObject);
begin begin
inherited; inherited;

View File

@ -663,6 +663,19 @@ procedure TfrmTradeClothTotalInInput.Tv1Column6PropertiesEditValueChanged(Sender
var var
mvalue, FFieldName: string; mvalue, FFieldName: string;
begin begin
if Trim(CDS_Sub.FieldByName('C_Name').AsString) = '' then
begin
Application.MessageBox('ÇëÏÈÊäÈëÆ·Ãû!', 'Ìáʾ', 0);
//ModalResult:=1;
with CDS_Sub do
begin
Edit;
FieldByName('C_ColorNo').AsString := '';
Post;
end;
Exit;
end;
FFieldName := Trim(Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName); FFieldName := Trim(Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName);
mvalue := TcxTextEdit(Sender).EditingText; mvalue := TcxTextEdit(Sender).EditingText;

View File

@ -264,7 +264,8 @@ inherited frmTradeClothTotalInList: TfrmTradeClothTotalInList
ParentBackground = False ParentBackground = False
ParentColor = False ParentColor = False
TabOrder = 6 TabOrder = 6
ExplicitLeft = 4 ExplicitLeft = 2
ExplicitTop = 2
ExplicitWidth = 1230 ExplicitWidth = 1230
ExplicitHeight = 37 ExplicitHeight = 37
inherited lbl2: TLabel inherited lbl2: TLabel
@ -506,6 +507,9 @@ inherited frmTradeClothTotalInList: TfrmTradeClothTotalInList
object cxTabSheet2: TcxTabSheet object cxTabSheet2: TcxTabSheet
Caption = #20135#21697#26126#32454 Caption = #20135#21697#26126#32454
ImageIndex = 1 ImageIndex = 1
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
object cxGrid1: TcxGrid object cxGrid1: TcxGrid
Left = 0 Left = 0
Top = 0 Top = 0

View File

@ -3,13 +3,13 @@ inherited frmTradeXinYuOutList: TfrmTradeXinYuOutList
Top = 13 Top = 13
Caption = #22823#36135#21333 Caption = #22823#36135#21333
ClientHeight = 594 ClientHeight = 594
ClientWidth = 1924 ClientWidth = 1540
Color = clBtnFace Color = clBtnFace
Font.Height = -16 Font.Height = -16
FormStyle = fsMDIChild FormStyle = fsMDIChild
Position = poScreenCenter Position = poScreenCenter
Visible = True Visible = True
ExplicitWidth = 1940 ExplicitWidth = 1556
ExplicitHeight = 633 ExplicitHeight = 633
PixelsPerInch = 96 PixelsPerInch = 96
TextHeight = 21 TextHeight = 21
@ -17,7 +17,7 @@ inherited frmTradeXinYuOutList: TfrmTradeXinYuOutList
Tag = 1 Tag = 1
Left = 0 Left = 0
Top = 0 Top = 0
Width = 1924 Width = 1540
Height = 30 Height = 30
AutoSize = True AutoSize = True
ButtonHeight = 30 ButtonHeight = 30
@ -27,6 +27,7 @@ inherited frmTradeXinYuOutList: TfrmTradeXinYuOutList
List = True List = True
ShowCaptions = True ShowCaptions = True
TabOrder = 4 TabOrder = 4
ExplicitWidth = 1924
object TBRafresh: TToolButton object TBRafresh: TToolButton
Left = 0 Left = 0
Top = 0 Top = 0
@ -95,13 +96,14 @@ inherited frmTradeXinYuOutList: TfrmTradeXinYuOutList
object Panel1: TPanel [1] object Panel1: TPanel [1]
Left = 0 Left = 0
Top = 30 Top = 30
Width = 1924 Width = 1540
Height = 91 Height = 91
Align = alTop Align = alTop
BevelInner = bvRaised BevelInner = bvRaised
BevelOuter = bvLowered BevelOuter = bvLowered
ParentBackground = False ParentBackground = False
TabOrder = 5 TabOrder = 5
ExplicitWidth = 304
object Label3: TLabel object Label3: TLabel
Left = 24 Left = 24
Top = 51 Top = 51
@ -165,7 +167,7 @@ inherited frmTradeXinYuOutList: TfrmTradeXinYuOutList
inline frmFrameDateSel1: TfrmFrameDateSel inline frmFrameDateSel1: TfrmFrameDateSel
Left = 2 Left = 2
Top = 2 Top = 2
Width = 1920 Width = 1536
Height = 37 Height = 37
Align = alTop Align = alTop
Color = clWhite Color = clWhite
@ -174,7 +176,7 @@ inherited frmTradeXinYuOutList: TfrmTradeXinYuOutList
TabOrder = 4 TabOrder = 4
ExplicitLeft = 2 ExplicitLeft = 2
ExplicitTop = 2 ExplicitTop = 2
ExplicitWidth = 1920 ExplicitWidth = 300
ExplicitHeight = 37 ExplicitHeight = 37
inherited lbl2: TLabel inherited lbl2: TLabel
Width = 16 Width = 16
@ -187,11 +189,12 @@ inherited frmTradeXinYuOutList: TfrmTradeXinYuOutList
object cxGrid1: TcxGrid [2] object cxGrid1: TcxGrid [2]
Left = 0 Left = 0
Top = 152 Top = 152
Width = 1924 Width = 1540
Height = 442 Height = 442
Align = alClient Align = alClient
PopupMenu = PM_1 PopupMenu = PM_1
TabOrder = 3 TabOrder = 3
ExplicitWidth = 1924
object Tv1: TcxGridDBTableView object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <> Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <> ScrollbarAnnotations.CustomAnnotations = <>
@ -403,7 +406,7 @@ inherited frmTradeXinYuOutList: TfrmTradeXinYuOutList
object cxTabControl1: TcxTabControl [3] object cxTabControl1: TcxTabControl [3]
Left = 0 Left = 0
Top = 121 Top = 121
Width = 1924 Width = 1540
Height = 31 Height = 31
Align = alTop Align = alTop
TabOrder = 2 TabOrder = 2
@ -415,8 +418,9 @@ inherited frmTradeXinYuOutList: TfrmTradeXinYuOutList
' '#24050#23436#25104' ' ' '#24050#23436#25104' '
' '#20840#37096' ') ' '#20840#37096' ')
OnChange = cxTabControl1Change OnChange = cxTabControl1Change
ExplicitWidth = 1924
ClientRectBottom = 31 ClientRectBottom = 31
ClientRectRight = 1924 ClientRectRight = 1540
ClientRectTop = 28 ClientRectTop = 28
end end
inherited loadProcess: TPanel inherited loadProcess: TPanel

View File

@ -45,7 +45,8 @@ uses
U_RPFun in '..\..\..\public10\ThreeFun\Fun\U_RPFun.pas', U_RPFun in '..\..\..\public10\ThreeFun\Fun\U_RPFun.pas',
U_TradeMarketQtyInPut in 'U_TradeMarketQtyInPut.pas', U_TradeMarketQtyInPut in 'U_TradeMarketQtyInPut.pas',
U_ItemizedListQtyInPut in '..\T02óÒ×»ã×ֿܲâ\U_ItemizedListQtyInPut.pas' {frmItemizedListQtyInPut}, U_ItemizedListQtyInPut in '..\T02óÒ×»ã×ֿܲâ\U_ItemizedListQtyInPut.pas' {frmItemizedListQtyInPut},
U_UserSel in '..\A00通用窗体\U_UserSel.pas' {frmUserSel}; U_UserSel in '..\A00通用窗体\U_UserSel.pas' {frmUserSel},
U_LabelPrint2 in 'U_LabelPrint2.pas' {frmLabelPrint2};
{$R *.res} {$R *.res}

View File

@ -198,6 +198,10 @@
<Form>frmUserSel</Form> <Form>frmUserSel</Form>
<FormType>dfm</FormType> <FormType>dfm</FormType>
</DCCReference> </DCCReference>
<DCCReference Include="U_LabelPrint2.pas">
<Form>frmLabelPrint2</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>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,420 @@
unit U_LabelPrint2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Vcl.Printers, Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
cxDataStorage, cxEdit, DB, cxDBData, ToolWin, ComCtrls, U_BaseHelp,
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGridLevel,
cxClasses, cxControls, cxGridCustomView, cxGrid, DBClient, ADODB, ImgList,
StdCtrls, ExtCtrls, cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu,
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxDateRanges,
dxBarBuiltInMenu, System.ImageList, U_BaseInput, RM_Common, RM_Class,
RM_GridReport, RM_Dataset, Vcl.Buttons, RM_E_llPDF, RM_BarCode, RM_e_Graphic,
RM_e_Jpeg, RM_e_Xls, cxContainer, cxMaskEdit, cxDropDownEdit, cxMRUEdit,
System.Net.HttpClient, System.Net.HttpClientComponent, System.JSON,
dxSkinsCore, dxSkinsDefaultPainters, dxSkinWXI;
type
TfrmLabelPrint2 = class(TfrmBaseHelp)
ADOQueryTemp: TADOQuery;
ADOConnection1: TADOConnection;
Panel1: TPanel;
ImageList1: TImageList;
RMDB_1: TRMDBDataSet;
RM1: TRMGridReport;
RMDB_2: TRMDBDataSet;
CDS_Label: TClientDataSet;
ADO_1: TADOQuery;
btnShow: TSpeedButton;
ADO_2: TADOQuery;
RMDB_3: TRMDBDataSet;
ADO_3: TADOQuery;
RMXLSExport1: TRMXLSExport;
RMJPEGExport1: TRMJPEGExport;
RMBarCodeObject1: TRMBarCodeObject;
RMllPDFExport1: TRMllPDFExport;
CheckBox1: TCheckBox;
Label1: TLabel;
cbbLab: TcxMRUEdit;
CheckBox2: TCheckBox;
CheckBox3: TCheckBox;
ADOQueryCmd: TADOQuery;
ADO_While: TADOQuery;
ComboBox1: TcxComboBox;
ComboBox_Print: TcxComboBox;
btnPrint: TSpeedButton;
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormShow(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure TV1DblClick(Sender: TObject);
procedure btnPrintClick(Sender: TObject);
procedure btnShowClick(Sender: TObject);
procedure cbbLabPropertiesButtonClick(Sender: TObject);
private
procedure InitGrid();
procedure PrintLabel(MIsShow: Boolean);
procedure PrintServerLabel(MIsShow: Boolean);
function JsonGetChildValue(JsonStr, KeyName: string): string;
{ Private declarations }
public
FPreviewPrint, IsSql1, IsSql2, IsSql3: Boolean;
FLMType: string; //标签类型
FFiltration1, FFiltration2, FFiltration3: string;
FparamBlclid: string;
{ Public declarations }
end;
var
frmLabelPrint2: TfrmLabelPrint2;
implementation
uses
U_DataLink, U_RTFun, U_LabelMapSet, U_printPdf, U_LabelPrint;
{$R *.dfm}
function TfrmLabelPrint2.JsonGetChildValue(JsonStr, KeyName: string): string;
var
JSONObject: TJSONObject; // JSON类
JSONPair: TJSONPair;
i, Cloint: integer;
Z, X: string;
begin
Result := '';
JSONObject := TJSONObject.ParseJSONValue(JsonStr) as TJSONObject;
Cloint := JSONObject.Count;
for i := 0 to Cloint - 1 do
begin
JSONPair := JSONObject.Pairs[i];
Z := JSONPair.JsonString.Value;
X := JSONPair.JSONValue.Value;
if JSONPair.JsonString.Value = KeyName then
Result := JSONPair.JSONValue.Value;
end;
end;
procedure TfrmLabelPrint2.PrintServerLabel(MIsShow: Boolean);
var
MaxBLCLID, LBName: string;
WBoolean: Boolean;
HttpClient: THttpClient;
Request: TStringStream;
Response: IHTTPResponse;
ResponseString: string;
jsonArray: TJSONArray; // JSON数组变量
JSONObject: TJSONObject; // JSON类
JSONPair: TJSONPair;
JSONStr: string;
i: Integer;
Mmessage, MpdfFileId, Mcode: string;
mprintFlag, mprinter: Integer;
begin
if CDS_Label.IsEmpty then
begin
Application.MessageBox(PChar('类型' + FLMType + '没有设置标签!'), '提示', 0);
Exit;
end;
LBName := cbbLab.text;
if CDS_Label.Locate('LMName', LBName, []) then
begin
if GetLSNo(ADOQueryCmd, MaxBLCLID, 'X', 'Bs_Report_Cloud_Log', 4, 1) = False then
begin
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('取最大号失败!', '提示', 0);
Exit;
end;
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('select * from Bs_Report_Cloud_Log where 1=2');
Open;
end;
with ADOQueryCmd do
begin
Append;
FieldByName('BLCLID').Value := MaxBLCLID;
FieldByName('Filler').Value := dname;
FieldByName('LMName').Value := trim(CDS_Label.fieldbyname('LMName').AsString);
FieldByName('LMSql1').Value := trim(CDS_Label.fieldbyname('LMSql1').AsString);
FieldByName('LMSql2').Value := trim(CDS_Label.fieldbyname('LMSql2').AsString);
FieldByName('LMSql3').Value := trim(CDS_Label.fieldbyname('LMSql3').AsString);
FieldByName('Filtration1').Value := Trim(FFiltration1);
FieldByName('Filtration2').Value := Trim(FFiltration2);
FieldByName('Filtration3').Value := Trim(FFiltration3);
FieldByName('IsSql1').Value := IsSql1;
FieldByName('IsSql2').Value := IsSql2;
FieldByName('IsSql3').Value := IsSql3;
FieldByName('Sheets').Value := strtointdef(ComboBox1.Text, 1);
FieldByName('paramBlclid').Value := StrToFloatDef(FparamBlclid, 0);
Post;
end;
end;
if MIsShow then
mprintFlag := 1
else
mprintFlag := 0;
mprinter := ComboBox_Print.ItemIndex;
printPdf(Application, 1, PChar('title'), PChar(dcode), PChar(dname), PChar(MaxBLCLID), StrToIntDef(ComboBox1.Text, 1), mprintFlag, mprinter, PChar(DConString))// HttpClient := THttpClient.Create;
end;
procedure TfrmLabelPrint2.PrintLabel(MIsShow: Boolean);
var
fPrintFile, fPrintFile10, FMainID, LBName: string;
begin
if CDS_Label.IsEmpty then
begin
Application.MessageBox(PChar('类型' + FLMType + '没有设置标签!'), '提示', 0);
Exit;
end;
RMllPDFExport1.ShowDialog := CheckBox2.Checked;
RMJPEGExport1.ShowDialog := CheckBox2.Checked;
RMXLSExport1.ShowDialog := CheckBox2.Checked;
RM1.ShowPrintDialog := CheckBox1.Checked;
LBName := cbbLab.text;
ExportFtErpFile(LBName + '.rmf', ADOQueryTemp);
if CDS_Label.Locate('LMName', LBName, []) then
begin
if trim(CDS_Label.fieldbyname('LMSql1').AsString) <> '' then
begin
with ADO_1 do
begin
Close;
sql.Clear;
if IsSql1 then
begin
sql.add('exec ' + trim(CDS_Label.fieldbyname('LMSql1').AsString));
sql.add(FFiltration1);
end
else
begin
sql.add('exec ' + trim(CDS_Label.fieldbyname('LMSql1').AsString) + ' @Filtration=' + quotedstr(Trim(FFiltration1)));
end;
Open;
end;
end;
if trim(CDS_Label.fieldbyname('LMSql2').AsString) <> '' then
begin
with ADO_2 do
begin
Close;
sql.Clear;
if IsSql1 then
begin
sql.add('exec ' + trim(CDS_Label.fieldbyname('LMSql2').AsString));
sql.add(FFiltration2);
end
else
begin
sql.add('exec ' + trim(CDS_Label.fieldbyname('LMSql2').AsString) + ' @Filtration=' + quotedstr(Trim(FFiltration2)));
end;
Open;
end;
end;
if trim(CDS_Label.fieldbyname('LMSql3').AsString) <> '' then
begin
with ADO_3 do
begin
Close;
sql.Clear;
if IsSql1 then
begin
sql.add('exec ' + trim(CDS_Label.fieldbyname('LMSql3').AsString));
sql.add(FFiltration3);
end
else
begin
sql.add('exec ' + trim(CDS_Label.fieldbyname('LMSql3').AsString) + ' @Filtration=' + quotedstr(Trim(FFiltration3)));
end;
Open;
end;
end;
end;
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + LBName + '.rmf';
if FileExists(fPrintFile) then
begin
RM1.LoadFromFile(fPrintFile);
RM1.DefaultCopies := StrToIntDef(ComboBox1.Text, 1);
RMVariables['LBPrtCode'] := dcode;
RMVariables['LBPrtName'] := dname;
if MIsShow then
RM1.ShowReport
else
RM1.PrintReport;
end
else
begin
Application.MessageBox(PChar('没有找' + fPrintFile), '提示', 0);
end;
end;
procedure TfrmLabelPrint2.FormCreate(Sender: TObject);
begin
inherited;
FPreviewPrint := True;
try
with ADOConnection1 do
begin
Connected := false;
ConnectionString := DConString;
Connected := true;
end;
ADOQueryBaseCmd.Connection := ADOConnection1;
ADOQueryBaseTemp.Connection := ADOConnection1;
except
{if Application.MessageBox('网络连接失败,是否要再次连接?','提示',32+4)=IDYES then
begin
try
with ADOConnection1 do
begin
Connected:=false;
ConnectionString:=DConString;
//ConnectionString:='23242';
Connected:=true;
end;
except
end;
end; }
end;
end;
procedure TfrmLabelPrint2.btnPrintClick(Sender: TObject);
begin
if not CheckBox3.Checked then
begin
PrintLabel(False);
end
else
begin
PrintServerLabel(False);
end;
ModalResult := 1;
end;
procedure TfrmLabelPrint2.btnShowClick(Sender: TObject);
begin
if not CheckBox3.Checked then
begin
PrintLabel(true);
end
else
begin
PrintServerLabel(true);
end;
end;
procedure TfrmLabelPrint2.cbbLabPropertiesButtonClick(Sender: TObject);
begin
try
frmLabelMapSet := TfrmLabelMapSet.Create(Application);
with frmLabelMapSet do
begin
IsSql1 := self.IsSql1;
IsSql2 := self.IsSql2;
IsSql3 := self.IsSql3;
FFiltration1 := self.FFiltration1;
FFiltration2 := self.FFiltration2;
FFiltration3 := self.FFiltration3;
FLMType := self.FLMType;
if ShowModal = 1 then
begin
Self.InitGrid();
end;
end;
finally
frmLabelMapSet.Free;
end;
end;
procedure TfrmLabelPrint2.FormClose(Sender: TObject; var Action: TCloseAction);
begin
inherited;
Action := cahide;
end;
procedure TfrmLabelPrint2.InitGrid();
begin
with ADOQueryTemp do
begin
close;
sql.Clear;
sql.Add('select LMName name from BS_Label_Map where LMType=' + QuotedStr(TRIM(FLMType)));
sql.Add(' order by SerialNo ');
Open;
if isEmpty then
begin
exit;
end;
cbbLab.Properties.LookupItems.Clear;
while not Eof do
begin
cbbLab.Properties.LookupItems.Add(Trim(fieldByName('Name').AsString));
Next;
end;
cbbLab.ItemIndex := 0;
end;
with ADOQueryTemp do
begin
Filtered := False;
Close;
sql.Clear;
Sql.Add('select * from BS_Label_Map where LMType=' + QuotedStr(TRIM(FLMType)));
Open;
end;
SCreateCDS(ADOQueryTemp, CDS_Label);
SInitCDSData(ADOQueryTemp, CDS_Label);
if CDS_Label.IsEmpty then
begin
Application.MessageBox(PChar('类型' + FLMType + '没有设置标签!'), '提示', 0);
Exit;
end;
end;
procedure TfrmLabelPrint2.FormShow(Sender: TObject);
begin
inherited;
if FPreviewPrint then
RM1.PreviewButtons := [rmpbZoom, rmpbLoad, rmpbSave, rmpbPrint, rmpbFind, rmpbPageSetup, rmpbExit, rmpbSaveToXLS, rmpbExport, rmpbNavigator]
else
RM1.PreviewButtons := [rmpbZoom, rmpbLoad, rmpbSave, rmpbFind, rmpbPageSetup, rmpbExit, rmpbSaveToXLS, rmpbExport, rmpbNavigator];
if Trim(FFiltration2) = '' then
FFiltration2 := FFiltration1;
if Trim(FFiltration3) = '' then
FFiltration3 := FFiltration1;
ComboBox_Print.Properties.Items.Assign(printer.Printers);
InitGrid();
end;
procedure TfrmLabelPrint2.TV1DblClick(Sender: TObject);
begin
ModalResult := 1;
end;
procedure TfrmLabelPrint2.FormDestroy(Sender: TObject);
begin
inherited;
frmLabelPrint2 := nil;
end;
end.

View File

@ -767,12 +767,10 @@ inherited frmTradeMarketInPut_XY: TfrmTradeMarketInPut_XY
end end
end end
inherited ADOQueryBaseCmd: TADOQuery inherited ADOQueryBaseCmd: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
Left = 860 Left = 860
Top = 157 Top = 157
end end
inherited ADOQueryBaseTemp: TADOQuery inherited ADOQueryBaseTemp: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
Left = 942 Left = 942
Top = 157 Top = 157
end end
@ -964,4 +962,8 @@ inherited frmTradeMarketInPut_XY: TfrmTradeMarketInPut_XY
OnClick = N4Click OnClick = N4Click
end end
end end
object ADOConnection1: TADOConnection
Left = 617
Top = 344
end
end end

View File

@ -139,6 +139,7 @@ type
ToolButton6: TToolButton; ToolButton6: TToolButton;
TBEdit: TToolButton; TBEdit: TToolButton;
Tv1Column23: TcxGridDBColumn; Tv1Column23: TcxGridDBColumn;
ADOConnection1: TADOConnection;
procedure TBCloseClick(Sender: TObject); procedure TBCloseClick(Sender: TObject);
procedure FormShow(Sender: TObject); procedure FormShow(Sender: TObject);
procedure TBSaveClick(Sender: TObject); procedure TBSaveClick(Sender: TObject);
@ -185,7 +186,6 @@ type
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean); procedure Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
procedure TBAddClick(Sender: TObject); procedure TBAddClick(Sender: TObject);
procedure TBEditClick(Sender: TObject); procedure TBEditClick(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private private
FSCXDH: string; FSCXDH: string;
procedure InitData(); procedure InitData();
@ -437,17 +437,17 @@ begin
inherited; inherited;
OurCoName.Properties.LookupItems.Text := 'W0001'; OurCoName.Properties.LookupItems.Text := 'W0001';
OurCoName.Text := '¸ñÃÀ'; OurCoName.Text := '¸ñÃÀ';
end; try
with ADOConnection1 do
procedure TfrmTradeMarketInPut_XY.FormDestroy(Sender: TObject); begin
begin Connected := false;
inherited; ConnectionString := DConString;
with ADOQueryBaseCmd do Connected := true;
begin end;
close; ADOQueryBaseCmd.Connection := ADOConnection1;
sql.clear; ADOQueryBaseTemp.Connection := ADOConnection1;
SQL.add('delete from Trade_Market_Sub_Qty where TMSID not in (select TMSID from Trade_Market_Sub)'); except
ExecSQL; application.MessageBox('网络连接失败!', '提示信息');
end; end;
end; end;
@ -465,7 +465,7 @@ begin
if Trim(canshu4) = 'ÐÂÓà' then if Trim(canshu4) = 'ÐÂÓà' then
// sql.Add(' and Stores=''ÐÂÓà'' '); // sql.Add(' and Stores=''ÐÂÓà'' ');
sql.Add(' and mxarea=''ÐÂÓà'' '); sql.Add(' and stores=''新余'' ');
Open; Open;
@ -1363,7 +1363,7 @@ begin
begin begin
FCoType := '¿Í»§'; FCoType := '¿Í»§';
FStores := Trim(canshu4); FStores := Trim(canshu4);
FsqlStr := ' and mxarea = ' + QuotedStr(Trim(canshu4)); FsqlStr := ' and stores = ' + QuotedStr(Trim(canshu4));
if ShowModal = 1 then if ShowModal = 1 then
begin begin
self.CustName.Hint := Trim(frmCompanySel.CDS_1.fieldbyname('CoCode').AsString); self.CustName.Hint := Trim(frmCompanySel.CDS_1.fieldbyname('CoCode').AsString);

View File

@ -171,7 +171,7 @@ implementation
uses uses
U_DataLink, U_RTFun, U_ZDYHelp, U_LabelPrint, U_AttachmentUpload, U_DataLink, U_RTFun, U_ZDYHelp, U_LabelPrint, U_AttachmentUpload,
U_TradeMarketInPut; U_TradeMarketInPut, U_LabelPrint2;
{$R *.dfm} {$R *.dfm}

View File

@ -266,6 +266,7 @@ inherited frmTradeMarketList_XY: TfrmTradeMarketList_XY
Align = alClient Align = alClient
PopupMenu = PM_1 PopupMenu = PM_1
TabOrder = 3 TabOrder = 3
ExplicitLeft = 40
object Tv1: TcxGridDBTableView object Tv1: TcxGridDBTableView
OnDblClick = Tv1DblClick OnDblClick = Tv1DblClick
Navigator.Buttons.CustomButtons = <> Navigator.Buttons.CustomButtons = <>

View File

@ -216,13 +216,16 @@ begin
1: 1:
begin begin
TNowc.Enabled := True; TNowc.Enabled := True;
tbadd.Enabled := True;
btnCopy.Enabled := True;
end; end;
// 2: 2:
// begin begin
// TNowc.Enabled := True; // TNowc.Enabled := True;
// btnCopy.Enabled := True; tbadd.Enabled := True;
// end; btnCopy.Enabled := True;
end;
end; end;
end; end;
@ -263,7 +266,7 @@ procedure TfrmTradeMarketList_XY.InitGrid();
var var
SqlStr, FilterStr: string; SqlStr, FilterStr: string;
begin begin
FilterStr := SGetFilters(Panel1, 1, 2); FilterStr := SGetFilters(Panel1, 1, 2);
SqlStr := ' exec P_Trade_Market_View '; SqlStr := ' exec P_Trade_Market_View ';
SqlStr := SqlStr + ' @BegDate=' + quotedstr(Trim(FormatDateTime('yyyy-MM-dd', frmFrameDateSel1.BegDate.Date))); SqlStr := SqlStr + ' @BegDate=' + quotedstr(Trim(FormatDateTime('yyyy-MM-dd', frmFrameDateSel1.BegDate.Date)));

View File

@ -2,29 +2,31 @@ inherited frmTradeMarketQtyInPut: TfrmTradeMarketQtyInPut
Left = 67 Left = 67
Top = 126 Top = 126
Caption = #26126#32454#20837#24211#30331#35760 Caption = #26126#32454#20837#24211#30331#35760
ClientHeight = 427 ClientHeight = 372
ClientWidth = 505 ClientWidth = 396
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
Font.Height = -16 Font.Height = -16
Position = poScreenCenter Position = poScreenCenter
OnClose = FormClose OnClose = FormClose
ExplicitWidth = 521 ExplicitWidth = 412
ExplicitHeight = 466 ExplicitHeight = 411
PixelsPerInch = 96 PixelsPerInch = 96
TextHeight = 21 TextHeight = 21
object pnl1: TPanel [0] object pnl1: TPanel [0]
Left = 0 Left = 0
Top = 0 Top = 0
Width = 505 Width = 396
Height = 427 Height = 372
Align = alClient Align = alClient
Caption = 'pnl1' Caption = 'pnl1'
TabOrder = 0 TabOrder = 0
ExplicitWidth = 505
ExplicitHeight = 427
object tlb1: TToolBar object tlb1: TToolBar
Tag = 1 Tag = 1
Left = 1 Left = 1
Top = 1 Top = 1
Width = 503 Width = 394
Height = 30 Height = 30
AutoSize = True AutoSize = True
ButtonHeight = 30 ButtonHeight = 30
@ -42,6 +44,7 @@ inherited frmTradeMarketQtyInPut: TfrmTradeMarketQtyInPut
ParentFont = False ParentFont = False
ShowCaptions = True ShowCaptions = True
TabOrder = 0 TabOrder = 0
ExplicitWidth = 503
object TBSave: TToolButton object TBSave: TToolButton
Left = 0 Left = 0
Top = 0 Top = 0
@ -79,11 +82,12 @@ inherited frmTradeMarketQtyInPut: TfrmTradeMarketQtyInPut
object pnl2: TPanel object pnl2: TPanel
Left = 1 Left = 1
Top = 31 Top = 31
Width = 503 Width = 394
Height = 41 Height = 41
Align = alTop Align = alTop
TabOrder = 1 TabOrder = 1
Visible = False Visible = False
ExplicitWidth = 503
object Label9: TLabel object Label9: TLabel
Left = 33 Left = 33
Top = 7 Top = 7
@ -129,18 +133,22 @@ inherited frmTradeMarketQtyInPut: TfrmTradeMarketQtyInPut
object GroupBox1: TGroupBox object GroupBox1: TGroupBox
Left = 1 Left = 1
Top = 72 Top = 72
Width = 503 Width = 394
Height = 354 Height = 299
Align = alClient Align = alClient
Caption = #26126#32454#20449#24687 Caption = #26126#32454#20449#24687
TabOrder = 2 TabOrder = 2
ExplicitWidth = 503
ExplicitHeight = 354
object cxGrid1: TcxGrid object cxGrid1: TcxGrid
Left = 2 Left = 2
Top = 23 Top = 23
Width = 499 Width = 390
Height = 329 Height = 274
Align = alClient Align = alClient
TabOrder = 0 TabOrder = 0
ExplicitWidth = 499
ExplicitHeight = 329
object Tv1: TcxGridDBTableView object Tv1: TcxGridDBTableView
OnDblClick = Tv1DblClick OnDblClick = Tv1DblClick
Navigator.Buttons.CustomButtons = <> Navigator.Buttons.CustomButtons = <>