123
This commit is contained in:
parent
20fac9d391
commit
cc44576c8c
|
|
@ -14,7 +14,7 @@ uses
|
|||
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;
|
||||
dxSkinsCore, dxSkinsDefaultPainters, dxSkinWXI;
|
||||
|
||||
type
|
||||
TfrmLabelPrint = class(TfrmBaseHelp)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<MainSource>Company.dpr</MainSource>
|
||||
<Base>True</Base>
|
||||
<Config Condition="'$(Config)'==''">Debug</Config>
|
||||
<TargetedPlatforms>38017</TargetedPlatforms>
|
||||
<TargetedPlatforms>1</TargetedPlatforms>
|
||||
<AppType>Library</AppType>
|
||||
<FrameworkType>VCL</FrameworkType>
|
||||
<ProjectVersion>19.2</ProjectVersion>
|
||||
|
|
@ -13,16 +13,6 @@
|
|||
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
|
||||
<Base>true</Base>
|
||||
</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)'!=''">
|
||||
<Base_Win32>true</Base_Win32>
|
||||
<CfgParent>Base</CfgParent>
|
||||
|
|
@ -43,24 +33,6 @@
|
|||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</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)'!=''">
|
||||
<Cfg_2_Win32>true</Cfg_2_Win32>
|
||||
<CfgParent>Cfg_2</CfgParent>
|
||||
|
|
@ -84,13 +56,6 @@
|
|||
<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>
|
||||
</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)'!=''">
|
||||
<DCC_Namespace>System.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
|
||||
<BT_BuildType>Debug</BT_BuildType>
|
||||
|
|
@ -113,17 +78,8 @@
|
|||
<DCC_Optimize>false</DCC_Optimize>
|
||||
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
|
||||
</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)'!=''">
|
||||
<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>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
|
|
@ -274,10 +230,6 @@
|
|||
</Source>
|
||||
</Delphi.Personality>
|
||||
<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="Win64">False</Platform>
|
||||
</Platforms>
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -58,5 +58,5 @@ dxSkinVisualStudio2013Dark=0
|
|||
dxSkinVisualStudio2013Light=0
|
||||
dxSkinVS2010=0
|
||||
dxSkinWhiteprint=0
|
||||
dxSkinWXI=0
|
||||
dxSkinWXI=1
|
||||
dxSkinXmas2008Blue=0
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ uses
|
|||
dxSkinSpringtime, dxSkinStardust, dxSkinSummer2008, dxSkinTheAsphaltWorld,
|
||||
dxSkinTheBezier, dxSkinValentine, dxSkinVisualStudio2013Blue,
|
||||
dxSkinVisualStudio2013Dark, dxSkinVisualStudio2013Light, dxSkinVS2010,
|
||||
dxSkinWhiteprint, dxSkinXmas2008Blue;
|
||||
dxSkinWhiteprint, dxSkinXmas2008Blue, dxCoreGraphics;
|
||||
|
||||
type
|
||||
TfrmCustInput = class(TfrmBaseInput)
|
||||
|
|
@ -638,6 +638,11 @@ begin
|
|||
Exit;
|
||||
end;
|
||||
|
||||
if CDS_LXR.IsEmpty then
|
||||
begin
|
||||
Application.MessageBox('明细数据不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
with CDS_LXR do
|
||||
begin
|
||||
|
|
@ -656,24 +661,24 @@ begin
|
|||
EnableControls;
|
||||
Exit;
|
||||
end;
|
||||
if Trim(FieldByName('Telephone').AsString) = '' then
|
||||
begin
|
||||
Application.MessageBox('联系电话不能为空!', '提示', 0);
|
||||
EnableControls;
|
||||
Exit;
|
||||
end;
|
||||
// if Trim(FieldByName('Telephone').AsString) = '' then
|
||||
// begin
|
||||
// Application.MessageBox('联系电话不能为空!', '提示', 0);
|
||||
// EnableControls;
|
||||
// Exit;
|
||||
// end;
|
||||
if Trim(FieldByName('mxaddress').AsString) = '' then
|
||||
begin
|
||||
Application.MessageBox('µØÖ·²»ÄÜΪ¿Õ!', 'Ìáʾ', 0);
|
||||
EnableControls;
|
||||
Exit;
|
||||
end;
|
||||
if Trim(FieldByName('mxarea').AsString) = '' then
|
||||
begin
|
||||
Application.MessageBox('区域不能为空!', '提示', 0);
|
||||
EnableControls;
|
||||
Exit;
|
||||
end;
|
||||
// if Trim(FieldByName('mxarea').AsString) = '' then
|
||||
// begin
|
||||
// Application.MessageBox('区域不能为空!', '提示', 0);
|
||||
// EnableControls;
|
||||
// Exit;
|
||||
// end;
|
||||
Next;
|
||||
end;
|
||||
EnableControls;
|
||||
|
|
|
|||
|
|
@ -514,13 +514,41 @@ inherited frmCustomer: TfrmCustomer
|
|||
Options.Editing = False
|
||||
Width = 163
|
||||
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
|
||||
Caption = #23458#25143#31561#32423
|
||||
DataBinding.FieldName = 'CoLevel'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 115
|
||||
Width = 130
|
||||
end
|
||||
object Tv1Column3: TcxGridDBColumn
|
||||
Caption = #30331#35760#26102#38388
|
||||
|
|
|
|||
|
|
@ -102,6 +102,10 @@ type
|
|||
Tv1Column12: TcxGridDBColumn;
|
||||
Tv1Column13: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
Tv1Column14: TcxGridDBColumn;
|
||||
Tv1Column15: TcxGridDBColumn;
|
||||
Tv1Column16: TcxGridDBColumn;
|
||||
Tv1Column17: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
|
|
@ -224,7 +228,7 @@ begin
|
|||
begin
|
||||
close;
|
||||
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 ) ');
|
||||
execsql;
|
||||
end;
|
||||
|
|
@ -240,7 +244,7 @@ var
|
|||
SqlStr, FilterStr: string;
|
||||
begin
|
||||
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
|
||||
0:
|
||||
begin
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -10,7 +10,6 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
FormStyle = fsMDIChild
|
||||
Position = poScreenCenter
|
||||
Visible = True
|
||||
ExplicitLeft = 0
|
||||
ExplicitWidth = 1556
|
||||
ExplicitHeight = 847
|
||||
PixelsPerInch = 96
|
||||
|
|
|
|||
|
|
@ -386,7 +386,7 @@ begin
|
|||
SqlStr := SqlStr + ' ELSE 1 ';
|
||||
SqlStr := SqlStr + ' END, ';
|
||||
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 + ' END, ';
|
||||
SqlStr := SqlStr + ' CASE ';
|
||||
|
|
@ -399,7 +399,7 @@ begin
|
|||
SqlStr := SqlStr + ' WHEN PATINDEX(''%[0-9]%'', C_ColorNo) > 0 THEN ';
|
||||
SqlStr := SqlStr + ' CASE ';
|
||||
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 + ' END ';
|
||||
SqlStr := SqlStr + ' ELSE ';
|
||||
|
|
|
|||
|
|
@ -133,8 +133,6 @@ inherited frmItemizedListInPut: TfrmItemizedListInPut
|
|||
Align = alClient
|
||||
PopupMenu = PopupMenu2
|
||||
TabOrder = 0
|
||||
ExplicitLeft = 2
|
||||
ExplicitTop = 5
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnMouseDown = Tv1MouseDown
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
|
|
|
|||
|
|
@ -116,7 +116,6 @@ type
|
|||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure Tv1Column8PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
private
|
||||
FSCXDH: string;
|
||||
FShowKeyid: integer;
|
||||
|
|
@ -137,6 +136,7 @@ type
|
|||
canshu1: string;
|
||||
fFlileFlag: string;
|
||||
fordtype: string;
|
||||
FSaveFlag: Boolean;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
|
|
@ -318,27 +318,27 @@ begin
|
|||
TIMNo.Text := '';
|
||||
// TIMNo.Enabled := True;
|
||||
end;
|
||||
if CopyInt = 99 then
|
||||
begin
|
||||
PState := 0;
|
||||
FTIMID := '';
|
||||
TIMNo.Text := '';
|
||||
// TIMNo.Enabled := True;
|
||||
TIMDate.Date := FDate;
|
||||
with CDS_1 do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('TIMID').Value := '';
|
||||
FieldByName('TMSId').Value := '';
|
||||
Post;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
// if CopyInt = 99 then
|
||||
// begin
|
||||
// PState := 0;
|
||||
// FTIMID := '';
|
||||
// TIMNo.Text := '';
|
||||
//// TIMNo.Enabled := True;
|
||||
// TIMDate.Date := FDate;
|
||||
// with CDS_1 do
|
||||
// begin
|
||||
// First;
|
||||
// while not Eof do
|
||||
// begin
|
||||
// Edit;
|
||||
// FieldByName('TIMID').Value := '';
|
||||
// FieldByName('TMSId').Value := '';
|
||||
// Post;
|
||||
// Next;
|
||||
// end;
|
||||
// end;
|
||||
//
|
||||
// end;
|
||||
end;
|
||||
|
||||
procedure TfrmItemizedListInPut.ZDYHelp(FButn: TcxButtonEdit; LType: string);
|
||||
|
|
@ -347,18 +347,6 @@ var
|
|||
begin
|
||||
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);
|
||||
var
|
||||
i: Integer;
|
||||
|
|
@ -409,7 +397,6 @@ begin
|
|||
// RegisterHotKey(handle, FShowKeyid, 0, VK_ADD); //+
|
||||
// RegisterHotKey(handle, FShowKeyid, 0, VK_SUBTRACT); //-
|
||||
|
||||
|
||||
end;
|
||||
|
||||
function TfrmItemizedListInPut.SaveData(): Boolean;
|
||||
|
|
@ -741,7 +728,7 @@ begin
|
|||
if SaveData() then
|
||||
begin
|
||||
Application.MessageBox('±£´æ³É¹¦£¡', 'Ìáʾ', 0);
|
||||
|
||||
FSaveFlag := True;
|
||||
// with ADOCmd do
|
||||
// begin
|
||||
// Close;
|
||||
|
|
@ -799,8 +786,18 @@ var
|
|||
MPrintJson, MTISIds: string;
|
||||
JSONObject: TJSONObject; // JSONÀà
|
||||
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;
|
||||
end;
|
||||
|
||||
MTISIds := SelCDSKey(CDS_1, ['TISId'])[0];
|
||||
with ADOQueryBaseTemp do
|
||||
begin
|
||||
|
|
@ -1012,8 +1009,16 @@ var
|
|||
MPrintJson: string;
|
||||
JSONObject: TJSONObject; // JSONÀà
|
||||
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;
|
||||
end;
|
||||
|
||||
with ADOQueryBaseTemp do
|
||||
begin
|
||||
|
|
@ -1277,7 +1282,7 @@ end;
|
|||
|
||||
procedure TfrmItemizedListInPut.Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
var
|
||||
MTISId, MQtyUnit: string;
|
||||
MTISId, MQtyUnit, maxno: string;
|
||||
AColumn: TcxGridColumn;
|
||||
begin
|
||||
AColumn := ACellViewInfo.Item as TcxGridColumn;
|
||||
|
|
@ -1310,13 +1315,18 @@ begin
|
|||
FName := CDS_1.FieldByName('C_Name').ASString;
|
||||
FColor := CDS_1.FieldByName('C_Color').ASString;
|
||||
FColorNo := CDS_1.FieldByName('C_colorNo').ASString;
|
||||
if SavesubData() then
|
||||
// if SavesubData() then
|
||||
// begin
|
||||
if Trim(FTIMID) = '' then
|
||||
begin
|
||||
if GetLSNo(ADOCmd, FTIMID, 'DD', 'Trade_ItemizedList_Main', 3, 1) = False then
|
||||
raise Exception.Create('取最大号失败!');
|
||||
end;
|
||||
try
|
||||
frmItemizedListQtyInPut := TfrmItemizedListQtyInPut.Create(Application);
|
||||
with frmItemizedListQtyInPut do
|
||||
begin
|
||||
FTIMId := Self.FTIMId;
|
||||
FTIMId := self.FTIMID;
|
||||
FTISId := MTISId;
|
||||
FQtyUnit := MQtyUnit;
|
||||
FName := Self.FName;
|
||||
|
|
@ -1349,7 +1359,7 @@ begin
|
|||
finally
|
||||
frmItemizedListQtyInPut.Free;
|
||||
end;
|
||||
end;
|
||||
// end;
|
||||
|
||||
end;
|
||||
|
||||
|
|
|
|||
|
|
@ -398,8 +398,19 @@ var
|
|||
JSONObject: TJSONObject; // JSONÀà
|
||||
begin
|
||||
FTIMID := Trim(Self.Order_Main.fieldbyname('TIMID').AsString);
|
||||
MFiltration := Trim(Self.Order_Main.fieldbyname('TIMNo').AsString);
|
||||
MPrintJson := ' {"LMType": "ItemizedListList1" ';
|
||||
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=''Èë¿â'' 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 + ' ,"PrtArgs": [ { "IsSql": false, "Filtration":" ' + MFiltration + '" }, ';
|
||||
MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" }, ';
|
||||
|
|
@ -629,12 +640,26 @@ end;
|
|||
|
||||
procedure TfrmItemizedListList.ToolButton5Click(Sender: TObject);
|
||||
var
|
||||
MFiltration: string;
|
||||
MFiltration, MTISIds: string;
|
||||
MPrintJson: string;
|
||||
JSONObject: TJSONObject; // JSONÀà
|
||||
begin
|
||||
MFiltration := SelCDSKey(Order_Main, ['TISId'])[0];
|
||||
MPrintJson := ' {"LMType": "ItemizedListList2" ';
|
||||
MTISIds := SelCDSKey(Order_Main, ['TISId'])[0];
|
||||
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 + ' ,"PrtArgs": [ { "IsSql": false, "Filtration":" ' + MFiltration + '" }, ';
|
||||
MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" }, ';
|
||||
|
|
|
|||
|
|
@ -2,33 +2,38 @@ inherited frmItemizedListQtyInPut: TfrmItemizedListQtyInPut
|
|||
Left = 67
|
||||
Top = 126
|
||||
Caption = #26126#32454#20837#24211#30331#35760
|
||||
ClientHeight = 350
|
||||
ClientWidth = 552
|
||||
ClientHeight = 379
|
||||
ClientWidth = 485
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Height = -16
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
ExplicitWidth = 568
|
||||
ExplicitHeight = 389
|
||||
ExplicitWidth = 501
|
||||
ExplicitHeight = 418
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 21
|
||||
object pnl1: TPanel [0]
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 552
|
||||
Height = 350
|
||||
Width = 485
|
||||
Height = 379
|
||||
Align = alClient
|
||||
Caption = 'pnl1'
|
||||
TabOrder = 0
|
||||
ExplicitWidth = 552
|
||||
ExplicitHeight = 350
|
||||
object cxGrid1: TcxGrid
|
||||
Tag = 2
|
||||
Left = 1
|
||||
Top = 97
|
||||
Width = 550
|
||||
Height = 252
|
||||
Top = 127
|
||||
Width = 483
|
||||
Height = 251
|
||||
Align = alClient
|
||||
PopupMenu = PopupMenu1
|
||||
TabOrder = 0
|
||||
ExplicitTop = 97
|
||||
ExplicitWidth = 550
|
||||
ExplicitHeight = 252
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnKeyDown = Tv1KeyDown
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
|
|
@ -112,8 +117,8 @@ inherited frmItemizedListQtyInPut: TfrmItemizedListQtyInPut
|
|||
Tag = 1
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 550
|
||||
Height = 30
|
||||
Width = 483
|
||||
Height = 60
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 83
|
||||
|
|
@ -130,6 +135,8 @@ inherited frmItemizedListQtyInPut: TfrmItemizedListQtyInPut
|
|||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 1
|
||||
ExplicitWidth = 550
|
||||
ExplicitHeight = 30
|
||||
object TBSave: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
|
|
@ -160,26 +167,27 @@ inherited frmItemizedListQtyInPut: TfrmItemizedListQtyInPut
|
|||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 6
|
||||
Wrap = True
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object btn4: TToolButton
|
||||
Left = 252
|
||||
Top = 0
|
||||
Left = 0
|
||||
Top = 30
|
||||
AutoSize = True
|
||||
Caption = #20445#23384#26684#24335
|
||||
ImageIndex = 16
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 339
|
||||
Top = 0
|
||||
Left = 87
|
||||
Top = 30
|
||||
AutoSize = True
|
||||
Caption = #25171#21360#26412#21333
|
||||
ImageIndex = 21
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 426
|
||||
Top = 0
|
||||
Left = 174
|
||||
Top = 30
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 7
|
||||
|
|
@ -188,11 +196,13 @@ inherited frmItemizedListQtyInPut: TfrmItemizedListQtyInPut
|
|||
end
|
||||
object pnl2: TPanel
|
||||
Left = 1
|
||||
Top = 31
|
||||
Width = 550
|
||||
Top = 61
|
||||
Width = 483
|
||||
Height = 66
|
||||
Align = alTop
|
||||
TabOrder = 2
|
||||
ExplicitTop = 31
|
||||
ExplicitWidth = 550
|
||||
object Label9: TLabel
|
||||
Left = 33
|
||||
Top = 7
|
||||
|
|
@ -314,4 +324,8 @@ inherited frmItemizedListQtyInPut: TfrmItemizedListQtyInPut
|
|||
Left = 60
|
||||
Top = 274
|
||||
end
|
||||
object ADOConnection1: TADOConnection
|
||||
Left = 248
|
||||
Top = 160
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ type
|
|||
Tv1BCIOID: TcxGridDBColumn;
|
||||
ADOQueryBatch: TADOQuery;
|
||||
Label1: TLabel;
|
||||
ADOConnection1: TADOConnection;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
|
|
@ -63,6 +64,7 @@ type
|
|||
procedure btnAddClick(Sender: TObject);
|
||||
procedure Tv1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
function SaveData(): Boolean;
|
||||
|
|
@ -352,6 +354,23 @@ begin
|
|||
Action := caFree;
|
||||
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);
|
||||
begin
|
||||
inherited;
|
||||
|
|
|
|||
|
|
@ -663,6 +663,19 @@ procedure TfrmTradeClothTotalInInput.Tv1Column6PropertiesEditValueChanged(Sender
|
|||
var
|
||||
mvalue, FFieldName: string;
|
||||
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);
|
||||
mvalue := TcxTextEdit(Sender).EditingText;
|
||||
|
||||
|
|
|
|||
|
|
@ -264,7 +264,8 @@ inherited frmTradeClothTotalInList: TfrmTradeClothTotalInList
|
|||
ParentBackground = False
|
||||
ParentColor = False
|
||||
TabOrder = 6
|
||||
ExplicitLeft = 4
|
||||
ExplicitLeft = 2
|
||||
ExplicitTop = 2
|
||||
ExplicitWidth = 1230
|
||||
ExplicitHeight = 37
|
||||
inherited lbl2: TLabel
|
||||
|
|
@ -506,6 +507,9 @@ inherited frmTradeClothTotalInList: TfrmTradeClothTotalInList
|
|||
object cxTabSheet2: TcxTabSheet
|
||||
Caption = #20135#21697#26126#32454
|
||||
ImageIndex = 1
|
||||
ExplicitTop = 0
|
||||
ExplicitWidth = 0
|
||||
ExplicitHeight = 0
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 0
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@ inherited frmTradeXinYuOutList: TfrmTradeXinYuOutList
|
|||
Top = 13
|
||||
Caption = #22823#36135#21333
|
||||
ClientHeight = 594
|
||||
ClientWidth = 1924
|
||||
ClientWidth = 1540
|
||||
Color = clBtnFace
|
||||
Font.Height = -16
|
||||
FormStyle = fsMDIChild
|
||||
Position = poScreenCenter
|
||||
Visible = True
|
||||
ExplicitWidth = 1940
|
||||
ExplicitWidth = 1556
|
||||
ExplicitHeight = 633
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 21
|
||||
|
|
@ -17,7 +17,7 @@ inherited frmTradeXinYuOutList: TfrmTradeXinYuOutList
|
|||
Tag = 1
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1924
|
||||
Width = 1540
|
||||
Height = 30
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
|
|
@ -27,6 +27,7 @@ inherited frmTradeXinYuOutList: TfrmTradeXinYuOutList
|
|||
List = True
|
||||
ShowCaptions = True
|
||||
TabOrder = 4
|
||||
ExplicitWidth = 1924
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
|
|
@ -95,13 +96,14 @@ inherited frmTradeXinYuOutList: TfrmTradeXinYuOutList
|
|||
object Panel1: TPanel [1]
|
||||
Left = 0
|
||||
Top = 30
|
||||
Width = 1924
|
||||
Width = 1540
|
||||
Height = 91
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
ParentBackground = False
|
||||
TabOrder = 5
|
||||
ExplicitWidth = 304
|
||||
object Label3: TLabel
|
||||
Left = 24
|
||||
Top = 51
|
||||
|
|
@ -165,7 +167,7 @@ inherited frmTradeXinYuOutList: TfrmTradeXinYuOutList
|
|||
inline frmFrameDateSel1: TfrmFrameDateSel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 1920
|
||||
Width = 1536
|
||||
Height = 37
|
||||
Align = alTop
|
||||
Color = clWhite
|
||||
|
|
@ -174,7 +176,7 @@ inherited frmTradeXinYuOutList: TfrmTradeXinYuOutList
|
|||
TabOrder = 4
|
||||
ExplicitLeft = 2
|
||||
ExplicitTop = 2
|
||||
ExplicitWidth = 1920
|
||||
ExplicitWidth = 300
|
||||
ExplicitHeight = 37
|
||||
inherited lbl2: TLabel
|
||||
Width = 16
|
||||
|
|
@ -187,11 +189,12 @@ inherited frmTradeXinYuOutList: TfrmTradeXinYuOutList
|
|||
object cxGrid1: TcxGrid [2]
|
||||
Left = 0
|
||||
Top = 152
|
||||
Width = 1924
|
||||
Width = 1540
|
||||
Height = 442
|
||||
Align = alClient
|
||||
PopupMenu = PM_1
|
||||
TabOrder = 3
|
||||
ExplicitWidth = 1924
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
ScrollbarAnnotations.CustomAnnotations = <>
|
||||
|
|
@ -403,7 +406,7 @@ inherited frmTradeXinYuOutList: TfrmTradeXinYuOutList
|
|||
object cxTabControl1: TcxTabControl [3]
|
||||
Left = 0
|
||||
Top = 121
|
||||
Width = 1924
|
||||
Width = 1540
|
||||
Height = 31
|
||||
Align = alTop
|
||||
TabOrder = 2
|
||||
|
|
@ -415,8 +418,9 @@ inherited frmTradeXinYuOutList: TfrmTradeXinYuOutList
|
|||
' '#24050#23436#25104' '
|
||||
' '#20840#37096' ')
|
||||
OnChange = cxTabControl1Change
|
||||
ExplicitWidth = 1924
|
||||
ClientRectBottom = 31
|
||||
ClientRectRight = 1924
|
||||
ClientRectRight = 1540
|
||||
ClientRectTop = 28
|
||||
end
|
||||
inherited loadProcess: TPanel
|
||||
|
|
|
|||
|
|
@ -45,7 +45,8 @@ uses
|
|||
U_RPFun in '..\..\..\public10\ThreeFun\Fun\U_RPFun.pas',
|
||||
U_TradeMarketQtyInPut in 'U_TradeMarketQtyInPut.pas',
|
||||
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}
|
||||
|
||||
|
|
|
|||
|
|
@ -198,6 +198,10 @@
|
|||
<Form>frmUserSel</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="U_LabelPrint2.pas">
|
||||
<Form>frmLabelPrint2</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<BuildConfiguration Include="Debug">
|
||||
<Key>Cfg_2</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
|
|
|
|||
4553
T05贸易门市管理/U_LabelPrint2.dfm
Normal file
4553
T05贸易门市管理/U_LabelPrint2.dfm
Normal file
File diff suppressed because it is too large
Load Diff
420
T05贸易门市管理/U_LabelPrint2.pas
Normal file
420
T05贸易门市管理/U_LabelPrint2.pas
Normal 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.
|
||||
|
||||
|
|
@ -767,12 +767,10 @@ inherited frmTradeMarketInPut_XY: TfrmTradeMarketInPut_XY
|
|||
end
|
||||
end
|
||||
inherited ADOQueryBaseCmd: TADOQuery
|
||||
Connection = DataLink_TradeMarket.ADOLink
|
||||
Left = 860
|
||||
Top = 157
|
||||
end
|
||||
inherited ADOQueryBaseTemp: TADOQuery
|
||||
Connection = DataLink_TradeMarket.ADOLink
|
||||
Left = 942
|
||||
Top = 157
|
||||
end
|
||||
|
|
@ -964,4 +962,8 @@ inherited frmTradeMarketInPut_XY: TfrmTradeMarketInPut_XY
|
|||
OnClick = N4Click
|
||||
end
|
||||
end
|
||||
object ADOConnection1: TADOConnection
|
||||
Left = 617
|
||||
Top = 344
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -139,6 +139,7 @@ type
|
|||
ToolButton6: TToolButton;
|
||||
TBEdit: TToolButton;
|
||||
Tv1Column23: TcxGridDBColumn;
|
||||
ADOConnection1: TADOConnection;
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(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 TBAddClick(Sender: TObject);
|
||||
procedure TBEditClick(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
private
|
||||
FSCXDH: string;
|
||||
procedure InitData();
|
||||
|
|
@ -437,17 +437,17 @@ begin
|
|||
inherited;
|
||||
OurCoName.Properties.LookupItems.Text := 'W0001';
|
||||
OurCoName.Text := '¸ñÃÀ';
|
||||
end;
|
||||
|
||||
procedure TfrmTradeMarketInPut_XY.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
with ADOQueryBaseCmd do
|
||||
try
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
close;
|
||||
sql.clear;
|
||||
SQL.add('delete from Trade_Market_Sub_Qty where TMSID not in (select TMSID from Trade_Market_Sub)');
|
||||
ExecSQL;
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
Connected := true;
|
||||
end;
|
||||
ADOQueryBaseCmd.Connection := ADOConnection1;
|
||||
ADOQueryBaseTemp.Connection := ADOConnection1;
|
||||
except
|
||||
application.MessageBox('网络连接失败!', '提示信息');
|
||||
end;
|
||||
end;
|
||||
|
||||
|
|
@ -465,7 +465,7 @@ begin
|
|||
|
||||
if Trim(canshu4) = 'ÐÂÓà' then
|
||||
// sql.Add(' and Stores=''ÐÂÓà'' ');
|
||||
sql.Add(' and mxarea=''ÐÂÓà'' ');
|
||||
sql.Add(' and stores=''新余'' ');
|
||||
|
||||
Open;
|
||||
|
||||
|
|
@ -1363,7 +1363,7 @@ begin
|
|||
begin
|
||||
FCoType := '¿Í»§';
|
||||
FStores := Trim(canshu4);
|
||||
FsqlStr := ' and mxarea = ' + QuotedStr(Trim(canshu4));
|
||||
FsqlStr := ' and stores = ' + QuotedStr(Trim(canshu4));
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
self.CustName.Hint := Trim(frmCompanySel.CDS_1.fieldbyname('CoCode').AsString);
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ implementation
|
|||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_ZDYHelp, U_LabelPrint, U_AttachmentUpload,
|
||||
U_TradeMarketInPut;
|
||||
U_TradeMarketInPut, U_LabelPrint2;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
|
|
|||
|
|
@ -266,6 +266,7 @@ inherited frmTradeMarketList_XY: TfrmTradeMarketList_XY
|
|||
Align = alClient
|
||||
PopupMenu = PM_1
|
||||
TabOrder = 3
|
||||
ExplicitLeft = 40
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnDblClick = Tv1DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
|
|
|
|||
|
|
@ -216,13 +216,16 @@ begin
|
|||
1:
|
||||
begin
|
||||
TNowc.Enabled := True;
|
||||
tbadd.Enabled := True;
|
||||
btnCopy.Enabled := True;
|
||||
end;
|
||||
|
||||
// 2:
|
||||
// begin
|
||||
2:
|
||||
begin
|
||||
// TNowc.Enabled := True;
|
||||
// btnCopy.Enabled := True;
|
||||
// end;
|
||||
tbadd.Enabled := True;
|
||||
btnCopy.Enabled := True;
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
|
|
|||
|
|
@ -2,29 +2,31 @@ inherited frmTradeMarketQtyInPut: TfrmTradeMarketQtyInPut
|
|||
Left = 67
|
||||
Top = 126
|
||||
Caption = #26126#32454#20837#24211#30331#35760
|
||||
ClientHeight = 427
|
||||
ClientWidth = 505
|
||||
ClientHeight = 372
|
||||
ClientWidth = 396
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Height = -16
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
ExplicitWidth = 521
|
||||
ExplicitHeight = 466
|
||||
ExplicitWidth = 412
|
||||
ExplicitHeight = 411
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 21
|
||||
object pnl1: TPanel [0]
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 505
|
||||
Height = 427
|
||||
Width = 396
|
||||
Height = 372
|
||||
Align = alClient
|
||||
Caption = 'pnl1'
|
||||
TabOrder = 0
|
||||
ExplicitWidth = 505
|
||||
ExplicitHeight = 427
|
||||
object tlb1: TToolBar
|
||||
Tag = 1
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 503
|
||||
Width = 394
|
||||
Height = 30
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
|
|
@ -42,6 +44,7 @@ inherited frmTradeMarketQtyInPut: TfrmTradeMarketQtyInPut
|
|||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
ExplicitWidth = 503
|
||||
object TBSave: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
|
|
@ -79,11 +82,12 @@ inherited frmTradeMarketQtyInPut: TfrmTradeMarketQtyInPut
|
|||
object pnl2: TPanel
|
||||
Left = 1
|
||||
Top = 31
|
||||
Width = 503
|
||||
Width = 394
|
||||
Height = 41
|
||||
Align = alTop
|
||||
TabOrder = 1
|
||||
Visible = False
|
||||
ExplicitWidth = 503
|
||||
object Label9: TLabel
|
||||
Left = 33
|
||||
Top = 7
|
||||
|
|
@ -129,18 +133,22 @@ inherited frmTradeMarketQtyInPut: TfrmTradeMarketQtyInPut
|
|||
object GroupBox1: TGroupBox
|
||||
Left = 1
|
||||
Top = 72
|
||||
Width = 503
|
||||
Height = 354
|
||||
Width = 394
|
||||
Height = 299
|
||||
Align = alClient
|
||||
Caption = #26126#32454#20449#24687
|
||||
TabOrder = 2
|
||||
ExplicitWidth = 503
|
||||
ExplicitHeight = 354
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 23
|
||||
Width = 499
|
||||
Height = 329
|
||||
Width = 390
|
||||
Height = 274
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
ExplicitWidth = 499
|
||||
ExplicitHeight = 329
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnDblClick = Tv1DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user