This commit is contained in:
DESKTOP-E401PHE\Administrator 2024-11-02 16:32:38 +08:00
parent bda12ab00a
commit d4c4fd0a31
54 changed files with 20879 additions and 358 deletions

View File

@ -95,6 +95,7 @@ object frmLabelMapSet: TfrmLabelMapSet
Navigator.Buttons.CustomButtons = <>
Navigator.Buttons.Delete.Enabled = False
Navigator.Buttons.Delete.Visible = False
ScrollbarAnnotations.CustomAnnotations = <>
DataController.DataSource = DS_1
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <>
@ -125,6 +126,7 @@ object frmLabelMapSet: TfrmLabelMapSet
object v2Column1: TcxGridDBColumn
Caption = #31867#22411
DataBinding.FieldName = 'LMType'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
Properties.OnEditValueChanged = v2Column8PropertiesEditValueChanged
HeaderAlignmentHorz = taCenter
@ -134,6 +136,7 @@ object frmLabelMapSet: TfrmLabelMapSet
object v2Column12: TcxGridDBColumn
Caption = #25253#34920#21517#31216
DataBinding.FieldName = 'LMName'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
Properties.OnEditValueChanged = v2Column8PropertiesEditValueChanged
HeaderAlignmentHorz = taCenter
@ -142,6 +145,7 @@ object frmLabelMapSet: TfrmLabelMapSet
object v2Column8: TcxGridDBColumn
Caption = #35843#29992#23384#20648'1'
DataBinding.FieldName = 'LMSql1'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
Properties.OnEditValueChanged = v2Column8PropertiesEditValueChanged
HeaderAlignmentHorz = taCenter
@ -150,6 +154,7 @@ object frmLabelMapSet: TfrmLabelMapSet
object Tv1Column1: TcxGridDBColumn
Caption = #35843#29992#23384#20648'2'
DataBinding.FieldName = 'LMSql2'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
Properties.OnEditValueChanged = v2Column8PropertiesEditValueChanged
HeaderAlignmentHorz = taCenter
@ -158,6 +163,7 @@ object frmLabelMapSet: TfrmLabelMapSet
object Tv1Column2: TcxGridDBColumn
Caption = #35843#29992#23384#20648'3'
DataBinding.FieldName = 'LMSql3'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
Properties.OnEditValueChanged = v2Column8PropertiesEditValueChanged
HeaderAlignmentHorz = taCenter
@ -222,6 +228,7 @@ object frmLabelMapSet: TfrmLabelMapSet
Navigator.Buttons.CustomButtons = <>
Navigator.Buttons.Delete.Enabled = False
Navigator.Buttons.Delete.Visible = False
ScrollbarAnnotations.CustomAnnotations = <>
DataController.DataSource = DS_2
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <>

View File

@ -15,7 +15,7 @@ uses
cxTextEdit, cxPC, cxCheckComboBox, cxDropDownEdit, Menus, RM_e_Xls,
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxSkinsCore,
dxSkinsDefaultPainters, dxDateRanges, dxBarBuiltInMenu, System.ImageList,
Vcl.ImgList, U_BaseHelp;
Vcl.ImgList, U_BaseHelp, dxSkinWXI, dxScrollbarAnnotations;
type
TfrmLabelMapSet = class(Tform)
@ -107,6 +107,7 @@ begin
Close;
sql.Clear;
sql.add('exec ' + trim(CDS_1.fieldbyname('LMSql1').AsString) + ' @Filtration=' + quotedstr(Trim(FFiltration1)));
// ShowMessage(sql.text);
Open;
end;
end;

View File

@ -26,8 +26,6 @@ inherited frmLabelPrint: TfrmLabelPrint
FullRepaint = False
ParentCtl3D = False
TabOrder = 0
ExplicitWidth = 299
ExplicitHeight = 257
object btnPrint: TSpeedButton
Left = 163
Top = 128
@ -44,7 +42,7 @@ inherited frmLabelPrint: TfrmLabelPrint
end
object btnShow: TSpeedButton
Left = 18
Top = 129
Top = 128
Width = 105
Height = 49
Caption = #39044#35272
@ -137,7 +135,7 @@ inherited frmLabelPrint: TfrmLabelPrint
end
object cbbLab: TcxMRUEdit
Left = 25
Top = 24
Top = 28
ParentFont = False
Properties.DropDownListStyle = lsFixedList
Properties.ImmediatePost = True

View File

@ -13,7 +13,7 @@ uses
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, RM_RichEdit;
cxMRUEdit, RM_RichEdit, dxSkinWXI;
type
TfrmLabelPrint = class(TfrmBaseHelp)

View File

@ -36,7 +36,8 @@ uses
U_PictureUpload in '..\A00通用窗体\U_PictureUpload.pas' {frmPictureUpload},
U_EmpFileUp in 'U_EmpFileUp.pas' {frmEmpFileUp},
U_CoBankSel in 'U_CoBankSel.pas' {frmCoBankSel},
U_BaseDataLink in '..\..\..\public10\design\U_BaseDataLink.pas' {BaseDataLink: TDataModule};
U_BaseDataLink in '..\..\..\public10\design\U_BaseDataLink.pas' {BaseDataLink: TDataModule},
U_FtyFileUp in 'U_FtyFileUp.pas' {frmFtyFileUp};
{$R *.res}

View File

@ -225,6 +225,10 @@
<FormType>dfm</FormType>
<DesignClass>TDataModule</DesignClass>
</DCCReference>
<DCCReference Include="U_FtyFileUp.pas">
<Form>frmFtyFileUp</Form>
<FormType>dfm</FormType>
</DCCReference>
<BuildConfiguration Include="Debug">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>

View File

@ -1,41 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<Transactions>
<Transaction>1899-12-30 00:00:00.000.481,=D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_SLT.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.212,=D:\Dp10Repo\项目代码\骉骐\A00通用窗体\U_PictureUpload.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.921,D:\Dp10Repo\项目代码\鹏华\员工管理(StaffManage.dll)\U_CompanySel.pas=D:\Dp10Repo\项目代码\鹏华\客户供应商管理(Company.dll)\U_Company.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.670,=D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_YGDJInput.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.956,=D:\Dp10Repo\项目代码\RTBasics\A01基础公司管理\U_EmployeeList.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.333,=D:\Dp10Repo\public10\design\U_BaseHelp.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.342,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_AttachmentUpload.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.167,=D:\Dp10Repo\项目代码\D10myBiaoqi\A01基础公司管理\U_BankSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.432,D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_YGDJInput.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.033,D:\Dp10Repo\项目代码\瑜量\客户供应商管理(Company.dll)\U_YGSel.dfm=D:\Dp10Repo\项目代码\瑜量\客户供应商管理(Company.dll)\U_ZDYHelp.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.967,D:\Dp10Repo\项目代码\鹏华\客户供应商管理(Company.dll)\U_FactoryInput.pas=D:\Dp10Repo\项目代码\鹏华\客户供应商管理(Company.dll)\U_CustInput.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.744,D:\Dp10Repo\项目代码\鹏华\客户供应商管理(Company.dll)\U_Customer.pas=D:\Dp10Repo\项目代码\鹏华\客户供应商管理(Company.dll)\U_Company.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.027,D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_CustInRC.pas=D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_CustInput.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.033,D:\Dp10Repo\项目代码\瑜量\客户供应商管理(Company.dll)\U_YGSel.pas=D:\Dp10Repo\项目代码\瑜量\客户供应商管理(Company.dll)\U_ZDYHelp.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.921,D:\Dp10Repo\项目代码\鹏华\员工管理(StaffManage.dll)\U_CompanySel.dfm=D:\Dp10Repo\项目代码\鹏华\客户供应商管理(Company.dll)\U_Company.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.027,D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_CustInRC.dfm=D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_CustInput.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.411,D:\Dp10Repo\项目代码\RTBasics\A01基础公司管理\U_YGSel.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.559,=D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_Emp_Input.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.525,=D:\Dp10Repo\项目代码\RTBasics\A01基础公司管理\U_BankList.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.010,D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_CustFileUp.pas=D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_EmpFileUp.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.330,=D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_CustFileUp.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.435,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelMapSet.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.433,D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_ZDYHelpSelX.pas=D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_ZDYHelpSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.076,D:\Dp10Repo\项目代码\RTBasics\A01基础公司管理\U_ZdyAttachGYS.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.560,D:\Dp10Repo\项目代码\D10myBiaoqi\A01基础公司管理\U_CoBankSel.pas=D:\Dp10Repo\项目代码\D10myBiaoqi\A01基础公司管理\U_BankSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.560,D:\Dp10Repo\项目代码\D10myBiaoqi\A01基础公司管理\U_CoBankSel.dfm=D:\Dp10Repo\项目代码\D10myBiaoqi\A01基础公司管理\U_BankSel.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.744,D:\Dp10Repo\项目代码\鹏华\客户供应商管理(Company.dll)\U_Customer.dfm=D:\Dp10Repo\项目代码\鹏华\客户供应商管理(Company.dll)\U_Company.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.531,=D:\Dp10Repo\public10\ThreeFun\Fun\U_CompressionFun.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.560,D:\Dp10Repo\项目代码\D10myBiaoqi\A01基础公司管理\U_BankSel.pas=D:\Dp10Repo\项目代码\D10myBiaoqi\A01基础公司管理\U_CoBankSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.294,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LbaelMapSet.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.328,=D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_YGRZInput.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.212,=D:\Dp10Repo\项目代码\骉骐\A00通用窗体\U_PictureUpload.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.167,=D:\Dp10Repo\项目代码\D10myBiaoqi\A01基础公司管理\U_BankSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.531,=D:\Dp10Repo\public10\ThreeFun\Fun\U_CompressionFun.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.342,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_AttachmentUpload.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.956,=D:\Dp10Repo\项目代码\RTBasics\A01基础公司管理\U_EmployeeList.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.333,=D:\Dp10Repo\public10\design\U_BaseHelp.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.560,D:\Dp10Repo\项目代码\D10myBiaoqi\A01基础公司管理\U_BankSel.dfm=D:\Dp10Repo\项目代码\D10myBiaoqi\A01基础公司管理\U_CoBankSel.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.010,D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_EmpFileUp.dfm=D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_CustFileUp.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.411,D:\Dp10Repo\项目代码\RTBasics\A01基础公司管理\U_YGSel.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.543,=D:\Dp10Repo\public10\design\U_BaseDataLink.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.967,D:\Dp10Repo\项目代码\鹏华\客户供应商管理(Company.dll)\U_CustInput.pas=D:\Dp10Repo\项目代码\鹏华\客户供应商管理(Company.dll)\U_FactoryInput.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.433,D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_ZDYHelpSel.dfm=D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_ZDYHelpSelX.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.670,=D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_YGDJInput.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.432,D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_YGDJInput.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.010,D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_EmpFileUp.pas=D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_CustFileUp.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.076,D:\Dp10Repo\项目代码\RTBasics\A01基础公司管理\U_ZdyAttachGYS.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.559,=D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_Emp_Input.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.525,=D:\Dp10Repo\项目代码\RTBasics\A01基础公司管理\U_BankList.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.330,=D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_CustFileUp.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.744,D:\Dp10Repo\项目代码\鹏华\客户供应商管理(Company.dll)\U_Company.pas=D:\Dp10Repo\项目代码\鹏华\客户供应商管理(Company.dll)\U_Customer.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.435,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelMapSet.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.033,D:\Dp10Repo\项目代码\瑜量\客户供应商管理(Company.dll)\U_ZDYHelp.dfm=D:\Dp10Repo\项目代码\瑜量\客户供应商管理(Company.dll)\U_YGSel.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.967,D:\Dp10Repo\项目代码\鹏华\客户供应商管理(Company.dll)\U_CustInput.dfm=D:\Dp10Repo\项目代码\鹏华\客户供应商管理(Company.dll)\U_FactoryInput.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.921,D:\Dp10Repo\项目代码\鹏华\客户供应商管理(Company.dll)\U_Company.pas=D:\Dp10Repo\项目代码\鹏华\员工管理(StaffManage.dll)\U_CompanySel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.921,D:\Dp10Repo\项目代码\鹏华\客户供应商管理(Company.dll)\U_Company.dfm=D:\Dp10Repo\项目代码\鹏华\员工管理(StaffManage.dll)\U_CompanySel.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.744,D:\Dp10Repo\项目代码\鹏华\客户供应商管理(Company.dll)\U_Company.dfm=D:\Dp10Repo\项目代码\鹏华\客户供应商管理(Company.dll)\U_Customer.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.433,D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_ZDYHelpSel.pas=D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_ZDYHelpSelX.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.481,=D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_SLT.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.033,D:\Dp10Repo\项目代码\瑜量\客户供应商管理(Company.dll)\U_ZDYHelp.pas=D:\Dp10Repo\项目代码\瑜量\客户供应商管理(Company.dll)\U_YGSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.027,D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_CustInput.dfm=D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_CustInRC.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.503,=D:\Dp10Repo\项目代码\D10myBiaoqi\A01基础公司管理\U_FtyFileUp.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.592,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelPrint.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.010,D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_CustFileUp.dfm=D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_EmpFileUp.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.433,D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_ZDYHelpSelX.dfm=D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_ZDYHelpSel.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.967,D:\Dp10Repo\项目代码\鹏华\客户供应商管理(Company.dll)\U_FactoryInput.dfm=D:\Dp10Repo\项目代码\鹏华\客户供应商管理(Company.dll)\U_CustInput.dfm</Transaction>
<Transaction>2024-10-17 14:14:49.543,=D:\Dp10Repo\public10\design\U_BaseDataLink.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.027,D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_CustInput.pas=D:\Dp10Repo\项目代码\骉骐\A01基础公司管理\U_CustInRC.pas</Transaction>
</Transactions>
<ProjectSortOrder AutoSort="0" SortType="0">
<File Path="android-support-v4.dex.jar"/>
@ -126,5 +127,7 @@
<File Path="U_EmpFileUp.dfm"/>
<File Path="U_CoBankSel.pas"/>
<File Path="U_CoBankSel.dfm"/>
<File Path="U_FtyFileUp.pas"/>
<File Path="U_FtyFileUp.dfm"/>
</ProjectSortOrder>
</BorlandProject>

View File

@ -1,6 +1,8 @@
[SERVER]
服务器地址=101.132.143.144
服务器地址类型=2002
服务器地址类型=576
是否自动更新=1
软件名称=睿特版本库
软件名称=骉骐贸易
登陆标题=sss
[窗口设置]
字体大小=9

View File

@ -7,8 +7,6 @@ inherited frmFactory: TfrmFactory
FormStyle = fsMDIChild
Position = poScreenCenter
Visible = True
ExplicitLeft = -224
ExplicitTop = -205
ExplicitWidth = 1382
ExplicitHeight = 840
PixelsPerInch = 96
@ -109,18 +107,27 @@ inherited frmFactory: TfrmFactory
AutoSize = True
Caption = #38468#20214
ImageIndex = 22
Visible = False
OnClick = ToolButton8Click
end
object ToolButton1: TToolButton
object ToolButton3: TToolButton
Left = 770
Top = 0
AutoSize = True
Caption = #22270#29255#19978#20256
ImageIndex = 19
OnClick = ToolButton3Click
end
object ToolButton1: TToolButton
Left = 865
Top = 0
AutoSize = True
Caption = #20445#23384#26684#24335
ImageIndex = 16
OnClick = ToolButton1Click
end
object TBClose: TToolButton
Left = 865
Left = 960
Top = 0
AutoSize = True
Caption = #20851#38381
@ -292,12 +299,12 @@ inherited frmFactory: TfrmFactory
Options.Editing = False
Width = 74
end
object Tv1Column3: TcxGridDBColumn
Caption = #38468#20214
DataBinding.FieldName = 'IsFj'
object Tv1Column4: TcxGridDBColumn
Caption = #22270#29255
DataBinding.FieldName = 'IsTp'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 38
Width = 39
end
object v2Column1: TcxGridDBColumn
Caption = #22791#27880
@ -521,6 +528,7 @@ inherited frmFactory: TfrmFactory
Navigator.Buttons.Delete.Enabled = False
Navigator.Buttons.Delete.Visible = False
ScrollbarAnnotations.CustomAnnotations = <>
OnCellDblClick = TV4CellDblClick
DataController.DataSource = DS_4
DataController.Summary.DefaultGroupSummaryItems = <>
DataController.Summary.FooterSummaryItems = <
@ -538,6 +546,7 @@ inherited frmFactory: TfrmFactory
OptionsCustomize.ColumnFiltering = False
OptionsData.Deleting = False
OptionsData.DeletingConfirmation = False
OptionsData.Editing = False
OptionsView.GroupByBox = False
Styles.Footer = DataLink_Company.Default
Styles.Header = DataLink_Company.Default

View File

@ -83,7 +83,6 @@ type
ADOQuery1: TADOQuery;
Tv2Column4: TcxGridDBColumn;
TV3Column1: TcxGridDBColumn;
Tv1Column3: TcxGridDBColumn;
cxGrid4: TcxGrid;
TV4: TcxGridDBTableView;
cxGridLevel4: TcxGridLevel;
@ -94,6 +93,8 @@ type
TV4Column2: TcxGridDBColumn;
ADOQuery2: TADOQuery;
TV3Column2: TcxGridDBColumn;
ToolButton3: TToolButton;
Tv1Column4: TcxGridDBColumn;
procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBCloseClick(Sender: TObject);
@ -117,6 +118,10 @@ type
procedure ToolButton8Click(Sender: TObject);
procedure CoCodeChange(Sender: TObject);
procedure ToolButton2Click(Sender: TObject);
procedure ToolButton3Click(Sender: TObject);
procedure TV4CellDblClick(Sender: TcxCustomGridTableView;
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
AShift: TShiftState; var AHandled: Boolean);
private
{ Private declarations }
procedure InitGrid();
@ -131,7 +136,8 @@ var
implementation
uses
U_DataLink, U_RTFun, U_ZDYHelp, U_FactoryInput, U_UserSel, U_AttachmentUpload;
U_DataLink, U_RTFun, U_ZDYHelp, U_FactoryInput, U_UserSel,
U_AttachmentUpload, U_FtyFileUp;
{$R *.dfm}
@ -207,6 +213,8 @@ begin
SQL.Clear;
sql.Add('select IsFJ=cast((case when (select COUNT(FF.WBID) from FJ_File FF');
sql.Add('where FF.TFType = ''¿Í»§'' and FF.WBID=A.CoID)=0 then 0 else 1 end) as bit ) ');
sql.Add(',IsTP=cast((case when (select COUNT(TF.WBID) from TP_File TF');
sql.Add('where TF.TFType = ''供应商'' and TF.WBID=A.CoID)=0 then 0 else 1 end) as bit ) ');
sql.Add(' ,A.* from BS_Company A');
SQL.Add(' where CoType=''¹©Ó¦ÉÌ'' ' + (WSql));
@ -345,6 +353,27 @@ begin
end;
end;
procedure TfrmFactory.ToolButton3Click(Sender: TObject);
begin
try
frmFtyFileUp := TfrmFtyFileUp.Create(Application);
with frmFtyFileUp do
begin
Code.Text := Trim(Self.CDS_1.fieldbyname('CoCode').AsString);
FBCIID := Trim(Self.CDS_1.fieldbyname('CoID').AsString);
if ShowModal = 1 then
begin
Self.InitGrid();
// Self.CDS_1.Locate('BCIID', BCIID, []);
end;
end;
finally
frmFtyFileUp.Free;
end;
// InitImage();
end;
procedure TfrmFactory.btnFindClick(Sender: TObject);
begin
if ADOQueryMain.Active then
@ -478,6 +507,47 @@ begin
tv2.Controller.EditingController.ShowEdit();
end;
procedure TfrmFactory.TV4CellDblClick(Sender: TcxCustomGridTableView;
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
AShift: TShiftState; var AHandled: Boolean);
var
IdFTP1: TIdFTP;
FPath, FFName, FileName: string;
FInt: integer;
begin
FileName := CDS_4.FieldByName('FileName').AsString;
try
IdFTP1 := TIdFTP.Create(self);
IdFTP1.Host := PicSvr;
IdFTP1.Username := 'three';
IdFTP1.Password := '641010';
IdFTP1.Connect();
except
IdFTP1.Quit;
IdFTP1.Free;
Application.MessageBox('无法连接到文件服务器,请检查!', '提示', MB_ICONWARNING);
Exit;
end;
FPath := 'D:\Right1209\';
if not DirectoryExists(ExtractFileDir(FPath)) then
CreateDir(ExtractFileDir(FPath));
FFName := Trim(FileName);
FFName := FPath + FFName;
if FileExists(FFName) then
begin
FInt := 1;
end;
if FInt <> 1 then
IdFTP1.Get(UserDataFlag + 'YP\' + FileName, pchar(FFName));
if IdFTP1.Connected then
begin
IdFTP1.Quit;
IdFTP1.Free;
end;
ShellExecute(Handle, 'open', PChar(FFName), '', '', SW_SHOWNORMAL);
end;
procedure TfrmFactory.Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
begin
with ADOQueryTemp do
@ -504,7 +574,7 @@ begin
begin
Close;
SQL.Clear;
sql.Add(' select * from FJ_File where WBID=' + quotedstr(Trim(CDS_1.FieldByName('COID').AsString)));
sql.Add(' select * from TP_File where WBID=' + quotedstr(Trim(CDS_1.FieldByName('COID').AsString)));
Open;
end;
SCreateCDS(ADOQuery2, CDS_4);

View File

@ -0,0 +1,272 @@
object frmFtyFileUp: TfrmFtyFileUp
Left = 612
Top = 236
Caption = #19978#20256#25991#20214
ClientHeight = 595
ClientWidth = 929
Color = clBtnFace
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
OldCreateOrder = False
Position = poMainFormCenter
OnCreate = FormCreate
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 12
object cxGrid7: TcxGrid
Left = 0
Top = 41
Width = 858
Height = 554
Align = alClient
TabOrder = 0
object TV7: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
OnCellDblClick = TV7CellDblClick
DataController.DataSource = DataSource1
DataController.Summary.DefaultGroupSummaryItems = <>
DataController.Summary.FooterSummaryItems = <>
DataController.Summary.SummaryGroups = <>
OptionsBehavior.GoToNextCellOnEnter = True
OptionsBehavior.FocusCellOnCycle = True
OptionsCustomize.ColumnFiltering = False
OptionsData.Editing = False
OptionsView.GroupByBox = False
OptionsView.Indicator = True
object FileName: TcxGridDBColumn
Tag = 1
Caption = #25991#20214#21517#31216
DataBinding.FieldName = 'FileName'
DataBinding.IsNullValueType = True
FooterAlignmentHorz = taCenter
HeaderAlignmentHorz = taCenter
Width = 121
end
object TV7Column1: TcxGridDBColumn
Caption = #33457#22411#21517#31216
DataBinding.FieldName = 'HXName'
DataBinding.IsNullValueType = True
Visible = False
GroupSummaryAlignment = taCenter
HeaderAlignmentHorz = taCenter
Width = 91
end
object FileDate: TcxGridDBColumn
Tag = 1
Caption = #19978#20256#26085#26399
DataBinding.FieldName = 'TFDate'
DataBinding.IsNullValueType = True
FooterAlignmentHorz = taCenter
HeaderAlignmentHorz = taCenter
Width = 104
end
end
object cxGridLevel6: TcxGridLevel
GridView = TV7
end
end
object Panel16: TPanel
Left = 190
Top = 126
Width = 138
Height = 30
BevelInner = bvRaised
Caption = #27491#22312#19978#20256#12290#12290#12290
Color = clSkyBlue
TabOrder = 1
Visible = False
end
object ToolBar6: TToolBar
Left = 858
Top = 41
Width = 71
Height = 554
Align = alRight
AutoSize = True
ButtonHeight = 38
ButtonWidth = 75
Caption = 'ToolBar1'
Images = DataLink_Company.ImageList_new32
List = True
ShowCaptions = True
TabOrder = 2
object FileUp: TToolButton
Left = 0
Top = 0
AutoSize = True
Caption = #19978#20256
ImageIndex = 2
Wrap = True
OnClick = FileUpClick
end
object FileDel: TToolButton
Left = 0
Top = 38
AutoSize = True
Caption = #21024#38500
ImageIndex = 5
Wrap = True
OnClick = FileDelClick
end
end
object Panel1: TPanel
Left = 0
Top = 0
Width = 929
Height = 41
Align = alTop
BevelInner = bvRaised
BevelOuter = bvLowered
TabOrder = 3
object Label1: TLabel
Left = 8
Top = 15
Width = 90
Height = 17
Caption = #20379#24212#21830#32534#21495
Font.Charset = GB2312_CHARSET
Font.Color = clRed
Font.Height = -17
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Image2: TImage
Left = 774
Top = 7
Width = 60
Height = 28
Visible = False
end
object Image1: TImage
Left = 861
Top = 7
Width = 60
Height = 28
Visible = False
end
object Label2: TLabel
Left = 336
Top = 14
Width = 36
Height = 17
Caption = #33457#22411
Font.Charset = GB2312_CHARSET
Font.Color = clRed
Font.Height = -17
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
Visible = False
end
object Code: TEdit
Left = 104
Top = 10
Width = 211
Height = 25
Font.Charset = GB2312_CHARSET
Font.Color = clBlue
Font.Height = -17
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
ReadOnly = True
TabOrder = 0
end
object HXName: TBtnEditC
Tag = 2
Left = 378
Top = 9
Width = 168
Height = 29
Hint = 'CYKZ/'#20811#37325
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -20
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 1
Visible = False
OnBtnUpClick = HXNameBtnUpClick
OnBtnDnClick = HXNameBtnDnClick
end
end
object ODPat: TOpenDialog
Filter =
'All (*.svg;*.jpg;*.jpeg;*.gif;*.tif;*.tiff;*.png;*.gif;*.jpg;*.j' +
'peg;*.png;*.bmp;*.ico;*.emf;*.wmf;*.tif;*.tiff)|*.svg;*.jpg;*.jp' +
'eg;*.gif;*.tif;*.tiff;*.png;*.gif;*.jpg;*.jpeg;*.png;*.bmp;*.ico' +
';*.emf;*.wmf;*.tif;*.tiff|SVG graphics from DevExpress (*.svg)|*' +
'.svg|JPEG graphics from DevExpress (*.jpg)|*.jpg|JPEG graphics f' +
'rom DevExpress (*.jpeg)|*.jpeg|GIF graphics from DevExpress (*.g' +
'if)|*.gif|TIFF graphics from DevExpress (*.tif)|*.tif|TIFF graph' +
'ics from DevExpress (*.tiff)|*.tiff|PNG graphics from DevExpress' +
' (*.png)|*.png|GIF Image (*.gif)|*.gif|JPEG Image File (*.jpg)|*' +
'.jpg|JPEG Image File (*.jpeg)|*.jpeg|Portable Network Graphics (' +
'*.png)|*.png|Bitmaps (*.bmp)|*.bmp|Icons (*.ico)|*.ico|Enhanced ' +
'Metafiles (*.emf)|*.emf|Metafiles (*.wmf)|*.wmf|TIFF Images (*.t' +
'if)|*.tif|TIFF Images (*.tiff)|*.tiff'
Options = [ofHideReadOnly, ofAllowMultiSelect, ofEnableSizing]
Left = 380
Top = 333
end
object IdFTP1: TIdFTP
ConnectTimeout = 0
NATKeepAlive.UseKeepAlive = False
NATKeepAlive.IdleTimeMS = 0
NATKeepAlive.IntervalMS = 0
ProxySettings.ProxyType = fpcmNone
ProxySettings.Port = 0
ReadTimeout = 0
Left = 261
Top = 244
end
object SaveDialog1: TSaveDialog
Filter =
'All (*.svg;*.jpg;*.jpeg;*.gif;*.tif;*.tiff;*.png;*.gif;*.jpg;*.j' +
'peg;*.png;*.bmp;*.ico;*.emf;*.wmf;*.tif;*.tiff)|*.svg;*.jpg;*.jp' +
'eg;*.gif;*.tif;*.tiff;*.png;*.gif;*.jpg;*.jpeg;*.png;*.bmp;*.ico' +
';*.emf;*.wmf;*.tif;*.tiff|SVG graphics from DevExpress (*.svg)|*' +
'.svg|JPEG graphics from DevExpress (*.jpg)|*.jpg|JPEG graphics f' +
'rom DevExpress (*.jpeg)|*.jpeg|GIF graphics from DevExpress (*.g' +
'if)|*.gif|TIFF graphics from DevExpress (*.tif)|*.tif|TIFF graph' +
'ics from DevExpress (*.tiff)|*.tiff|PNG graphics from DevExpress' +
' (*.png)|*.png|GIF Image (*.gif)|*.gif|JPEG Image File (*.jpg)|*' +
'.jpg|JPEG Image File (*.jpeg)|*.jpeg|Portable Network Graphics (' +
'*.png)|*.png|Bitmaps (*.bmp)|*.bmp|Icons (*.ico)|*.ico|Enhanced ' +
'Metafiles (*.emf)|*.emf|Metafiles (*.wmf)|*.wmf|TIFF Images (*.t' +
'if)|*.tif|TIFF Images (*.tiff)|*.tiff'
Left = 305
Top = 333
end
object ADOQueryFile: TADOQuery
Connection = DataLink_Company.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 488
Top = 144
end
object DataSource1: TDataSource
DataSet = ADOQueryFile
Left = 376
Top = 136
end
object ADOQueryCmd: TADOQuery
Connection = DataLink_Company.ADOLink
Parameters = <>
Left = 584
Top = 256
end
object ADOQueryTemp: TADOQuery
Connection = DataLink_Company.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 432
Top = 224
end
end

View File

@ -0,0 +1,425 @@
unit U_FtyFileUp;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
cxEdit, DB, cxDBData, ComCtrls, ToolWin, ExtCtrls, cxGridLevel,
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
cxControls, cxGridCustomView, cxGrid, IdBaseComponent, IdComponent,
IdTCPConnection, IdTCPClient, IdFTP, StdCtrls, ADODB, jpeg, BtnEdit, IniFiles,
strutils, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxSkinsCore,
dxSkinsDefaultPainters, dxDateRanges, IdExplicitTLSClientServerBase,
Vcl.ExtDlgs, dxSkinWXI, dxScrollbarAnnotations, ShellAPI;
type
TfrmFtyFileUp = class(TForm)
cxGrid7: TcxGrid;
TV7: TcxGridDBTableView;
FileName: TcxGridDBColumn;
FileDate: TcxGridDBColumn;
cxGridLevel6: TcxGridLevel;
Panel16: TPanel;
ToolBar6: TToolBar;
FileUp: TToolButton;
FileDel: TToolButton;
Panel1: TPanel;
Label1: TLabel;
Code: TEdit;
ODPat: TOpenDialog;
IdFTP1: TIdFTP;
SaveDialog1: TSaveDialog;
ADOQueryFile: TADOQuery;
DataSource1: TDataSource;
ADOQueryCmd: TADOQuery;
ADOQueryTemp: TADOQuery;
Image2: TImage;
Image1: TImage;
TV7Column1: TcxGridDBColumn;
Label2: TLabel;
HXName: TBtnEditC;
procedure FileUpClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FileDelClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure HXNameBtnUpClick(Sender: TObject);
procedure HXNameBtnDnClick(Sender: TObject);
procedure TV7CellDblClick(Sender: TcxCustomGridTableView;
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
AShift: TShiftState; var AHandled: Boolean);
private
lstPat: TStringList;
AJpeg: TJPEGImage;
procedure CreThumb(Image1, Image2: TImage; Width, Height: Integer);
procedure SaveImageOther(FTFID: string);
procedure ReadINIFile10();
procedure InitTP();
{ Private declarations }
public
FBCIID: string;
FWidth, FHeight:Integer
{ Public declarations }
end;
var
frmFtyFileUp: TfrmFtyFileUp;
implementation
uses
U_DataLink, U_RTFun, U_ZDYHelp;
{$R *.dfm} procedure TfrmFtyFileUp.InitTP();
begin
with ADOQueryFile do
begin
Close;
SQL.Clear;
SQL.Add('select TFID,WBID,TFDate,Files,Filler,FillTime,FileName,HXName from TP_File where WBID=''' + Trim(FBCIID) + '''');
SQL.Add(' and FileType=''GYS''');
Open;
end;
end;
procedure TfrmFtyFileUp.ReadINIFile10();
var
programIni: Tinifile; //配置文件名
FileName: string;
begin
FileName := ExtractFilePath(Paramstr(0)) + 'SYSTEMSET.INI';
programIni := Tinifile.create(FileName);
server := programIni.ReadString('SERVER', '服务器地址', '127.0.0.1');
programIni.Free;
end;
procedure TfrmFtyFileUp.FileUpClick(Sender: TObject);
var
i, j, ii: Integer;
PatFile: string;
FTPPath, FConNo, MaxNo: string;
AJpeg: TJPEGImage;
myStream: TADOBlobStream;
f: file of Byte;
size: Longint;
S: Double;
begin
if Trim(Code.Text) = '' then
begin
Application.MessageBox('编号不能为空!', '提示', 0);
Exit;
end;
// if Trim(HXName.Text) = '' then
// begin
// if Application.MessageBox('花型确认为空吗?', '提示', 32 + 4) <> IDYES then
// Exit;
// end;
lstPat.Clear;
if ODPat.Execute then
begin
lstPat.AddStrings(ODPat.Files);
end;
if lstPat.Count > 0 then
begin
try
IdFTP1.Host := PicSvr;
IdFTP1.Username := 'three';
IdFTP1.Password := '641010';
IdFTP1.Connect();
except
IdFTP1.Quit;
Application.MessageBox('无法连接到文件服务器,请检查!', '提示', MB_ICONWARNING);
Exit;
end;
end;
Panel16.Visible := True;
Panel16.Refresh;
try
AJpeg := TJpegImage.Create();
ADOQueryCmd.Connection.BeginTrans;
ii := 0;
for i := 0 to lstPat.Count - 1 do
begin
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.Add('select isnull(max(abs(cast(right(left(FileName,charindex(''.'',FileName)-1),2) as int))),0)+1 as BH from TP_File');
sql.Add('where FileType =''GYS'' and WBID=''' + trim(FBCIID) + ''' ');
open;
end;
PatFile := trim(FBCIID) + '-' + inttostr(ADOQueryTemp.fieldbyname('BH').AsInteger) + '.' + Copy(ExtractFileName(lstPat[i]), (Pos('.', ExtractFileName(lstPat[i])) + 1), (Length(ExtractFileName(lstPat[i])) - Pos('.', ExtractFileName(lstPat[i]))));
image1.Picture.LoadFromFile((lstPat[i]));
CreThumb(Image1, Image2, FWidth, FHeight);
if IdFTP1.Connected then
begin
try
IdFTP1.Put(lstPat[i], Trim(UserDataFlag + 'YP' + '\' + Trim(PatFile)));
if GetLSNo(ADOQueryCmd, MaxNo, 'YP', 'XD_File', 4, 1) = False then
raise Exception.Create('取图片最大号失败!');
with ADOQueryCmd do
begin
close;
sql.Clear;
sql.Add(' select * from TP_File where TFID=''' + Trim(MaxNo) + '''');
open;
end;
with ADOQueryCmd do
begin
if ADOQueryCmd.IsEmpty then
begin
Append;
FieldByName('Filler').Value := Trim(DName);
FieldByName('TFDate').Value := SGetServerDateTime(ADOQueryTemp);
end
else
begin
Edit;
FieldByName('Editer').Value := Trim(DName);
FieldByName('EditTime').Value := SGetServerDateTime(ADOQueryTemp);
end;
FieldByName('TFID').Value := Trim(MaxNo);
FieldByName('WBID').Value := Trim(FBCIID);
FieldByName('TFType').Value := '供应商';
FieldByName('FileType').Value := 'GYS';
FieldByName('HXName').Value := trim(HXName.Text);
FieldByName('filename').Value := Trim(PatFile);
myStream := TADOBlobStream.Create(TBlobField(ADOQueryCmd.FieldByName('FilesOther')), bmWrite);
AJpeg.Assign(Image2.Picture.Graphic);
AJpeg.SaveToStream(myStream);
myStream.Free;
Post;
end;
except
raise Exception.Create('上传图片失败!');
end;
end;
end;
ADOQueryCmd.Connection.CommitTrans;
AJpeg.Free;
except
AJpeg.Free;
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('图片上传失败!', '提示', 0);
end;
if IdFTP1.Connected then
IdFTP1.Quit;
InitTP();
Panel16.Visible := False;
if ii > 0 then
Application.MessageBox(PChar(inttostr(ii) + '个文件大于2MB上传失败'), '提示', 0);
if i > 0 then
Application.MessageBox(PChar(inttostr(i-ii) + '个文件上传成功!'), '提示', 0);
ModalResult := 1;
end;
procedure TfrmFtyFileUp.CreThumb(Image1, Image2: TImage; Width, Height: Integer);
var
Bitmap: TBitmap;
Ratio: Double;
ARect: TRect;
AHeight, AHeightOffset: Integer;
AWidth, AWidthOffset: Integer;
begin
Bitmap := TBitmap.Create;
try
Ratio := Image1.Picture.Graphic.Width / Image1.Picture.Graphic.Height;
if Ratio > 1.333 then
begin
AHeight := Round(Width / Ratio);
AHeightOffset := (Height - AHeight) div 2;
AWidth := Width;
AWidthOffset := 0;
end
else
begin
AWidth := Round(Height * Ratio);
AWidthOffset := (Width - AWidth) div 2;
AHeight := Height;
AHeightOffset := 0;
end;
Bitmap.Width := Width;
Bitmap.Height := Height;
Bitmap.Canvas.Brush.Color := clBtnFace;
Bitmap.Canvas.FillRect(Rect(0, 0, Width, Height));
ARect := Rect(AWidthOffset, AHeightOffset, AWidth + AWidthOffset, AHeight + AHeightOffset);
Bitmap.Canvas.StretchDraw(ARect, Image1.Picture.Graphic);
Image2.Picture.Assign(Bitmap);
finally
Bitmap.Free;
end;
end;
procedure TfrmFtyFileUp.SaveImageOther(FTFID: string);
var
AJpeg: TJPEGImage;
myStream: TADOBlobStream;
ImgMaxNo: string;
i, j: Integer;
PatFile: string;
FConNo, MaxNo: string;
begin
if Image2.Picture = nil then
Exit;
AJpeg := TJpegImage.Create();
with ADOQueryCmd do
begin
close;
sql.Clear;
sql.Add(' select * from TP_File where TFID=''' + Trim(FTFID) + '''');
open;
end;
with ADOQueryCmd do
begin
if Trim(FTFID) = '' then
begin
Append;
FieldByName('Filler').Value := Trim(DName);
end
else
begin
Edit;
FieldByName('Editer').Value := Trim(DName);
FieldByName('EditTime').Value := SGetServerDateTime(ADOQueryTemp);
end;
FieldByName('TFID').Value := Trim(FTFID);
FieldByName('WBID').Value := Trim(FBCIID);
FieldByName('TFType').Value := '样品';
AJpeg.Assign(Image2.Picture.Graphic);
myStream := TADOBlobStream.Create(TBlobField(ADOQueryCmd.FieldByName('FilesOther')), bmWrite);
AJpeg.Assign(Image2.Picture.Graphic);
AJpeg.SaveToStream(myStream);
myStream.Free;
Post;
end;
end;
procedure TfrmFtyFileUp.TV7CellDblClick(Sender: TcxCustomGridTableView;
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
AShift: TShiftState; var AHandled: Boolean);
var
IdFTP1: TIdFTP;
FPath, FFName, FileName: string;
FInt: integer;
begin
FileName := ADOQueryFile.FieldByName('FileName').AsString;
try
IdFTP1 := TIdFTP.Create(self);
IdFTP1.Host := PicSvr;
IdFTP1.Username := 'three';
IdFTP1.Password := '641010';
IdFTP1.Connect();
except
IdFTP1.Quit;
IdFTP1.Free;
Application.MessageBox('无法连接到文件服务器,请检查!', '提示', MB_ICONWARNING);
Exit;
end;
FPath := 'D:\Right1209\';
if not DirectoryExists(ExtractFileDir(FPath)) then
CreateDir(ExtractFileDir(FPath));
FFName := Trim(FileName);
FFName := FPath + FFName;
if FileExists(FFName) then
begin
FInt := 1;
end;
if FInt <> 1 then
IdFTP1.Get(UserDataFlag + 'YP\' + FileName, pchar(FFName));
if IdFTP1.Connected then
begin
IdFTP1.Quit;
IdFTP1.Free;
end;
ShellExecute(Handle, 'open', PChar(FFName), '', '', SW_SHOWNORMAL);
end;
procedure TfrmFtyFileUp.FormCreate(Sender: TObject);
begin
lstPat := TStringList.Create;
if FWidth = 0 then
FWidth := 160;
if FHeight = 0 then
FHeight := 120;
end;
procedure TfrmFtyFileUp.FileDelClick(Sender: TObject);
begin
with ADOQueryCmd do
begin
Close;
sql.Clear;
SQL.Add(' Delete TP_File where TFID=''' + Trim(ADOQueryFile.fieldbyname('TFID').AsString) + '''');
ExecSQL;
end;
with ADOQueryFile do
begin
Close;
SQL.Clear;
SQL.Add('select TFID,WBID,TFDate,Files,Filler,FillTime,FileName from TP_File where WBID=''' + Trim(FBCIID) + '''');
SQL.Add(' and FileType=''GYS''');
Open;
end;
// if ADOQueryFile.IsEmpty then
// begin
// with ADOQueryCmd do
// begin
// Close;
// sql.Clear;
// sql.Add('Update CP_YDang Set TPFlag=0 where FBCIID=''' + Trim(FBCIID) + '''');
// ExecSQL;
// end;
// end;
end;
procedure TfrmFtyFileUp.FormShow(Sender: TObject);
begin
with ADOQueryFile do
begin
Close;
SQL.Clear;
SQL.Add('select TFID,WBID,TFDate,Files,Filler,FillTime,FileName from TP_File where WBID=''' + Trim(FBCIID) + '''');
SQL.Add(' and FileType=''GYS''');
Open;
end;
end;
procedure TfrmFtyFileUp.HXNameBtnDnClick(Sender: TObject);
begin
TBtnEditC(Sender).Text := '';
TBtnEditC(Sender).TxtCode := '';
end;
procedure TfrmFtyFileUp.HXNameBtnUpClick(Sender: TObject);
begin
try
frmZDYHelp := TfrmZDYHelp.Create(Application);
with frmZDYHelp do
begin
flag := 'HX' + Trim(Code.Text);
flagname := '花型';
if ShowModal = 1 then
begin
TEdit(Sender).Text := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
end;
end;
finally
frmZDYHelp.Free;
end;
end;
end.

View File

@ -31,14 +31,15 @@ uses
U_BaseDataLink in '..\..\..\public10\design\U_BaseDataLink.pas' {BaseDataLink: TDataModule},
U_OtherPayableList in 'U_OtherPayableList.pas' {frmOtherPayableList},
U_OtherPayableInput in 'U_OtherPayableInput.pas' {frmOtherPayableInput},
U_handPayableList in 'U_handPayableList.pas' {frmhandPayableList},
U_HandPayableInPut in 'U_HandPayableInPut.pas' {frmHandPayableInPut},
U_ClaimsableList in 'U_ClaimsableList.pas' {frmClaimsableList},
U_ClaimsableInPut in 'U_ClaimsableInPut.pas' {frmClaimsableInPut},
U_HandPayableImport in 'U_HandPayableImport.pas' {frmHandPayableImport},
U_ProductInfoSel in '..\A00ͨÓô°Ìå\U_ProductInfoSel.pas' {frmProductInfoSel},
U_PictureUpload in '..\A00ͨÓô°Ìå\U_PictureUpload.pas' {frmPictureUpload},
U_FinFileUp in 'U_FinFileUp.pas' {frmFinFileUp},
U_PayableEdit in 'U_PayableEdit.pas' {frmPayableEdit},
U_UserSel in 'U_UserSel.pas' {frmUserSel};
U_UserSel in 'U_UserSel.pas' {frmUserSel},
U_FtyFileUp in 'U_FtyFileUp.pas' {frmFtyFileUp};
{$R *.res}

View File

@ -206,12 +206,12 @@
<Form>frmOtherPayableInput</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="U_handPayableList.pas">
<Form>frmhandPayableList</Form>
<DCCReference Include="U_ClaimsableList.pas">
<Form>frmClaimsableList</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="U_HandPayableInPut.pas">
<Form>frmHandPayableInPut</Form>
<DCCReference Include="U_ClaimsableInPut.pas">
<Form>frmClaimsableInPut</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="U_HandPayableImport.pas">
@ -238,6 +238,10 @@
<Form>frmUserSel</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="U_FtyFileUp.pas">
<Form>frmFtyFileUp</Form>
<FormType>dfm</FormType>
</DCCReference>
<BuildConfiguration Include="Debug">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>

View File

@ -8,27 +8,30 @@
<Transaction>1899-12-30 00:00:00.000.064,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LbaelMapSet.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.728,=D:\Dp10Repo\项目代码\RTBasics\A09财务通用管理\U_InvoiceOutList.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.318,=D:\Dp10Repo\项目代码\D10myBiaoqi\A00通用窗体\U_ProductInfoSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.092,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_EmployeeSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.654,D:\Dp10Repo\项目代码\D10myBiaoqi\A09财务通用管理\U_HandPayableInPut.pas=D:\Dp10Repo\项目代码\D10myBiaoqi\A09财务通用管理\U_ClaimsableInPut.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.871,D:\Dp10Repo\项目代码\RTBasics\A09财务通用管理\U_InvoiceInInPut.dfm=D:\Dp10Repo\项目代码\RTBasics\A09财务通用管理\U_InvoiceOutInPut.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.868,D:\Dp10Repo\项目代码\RTBasics\A09财务通用管理\InformationBase.dproj=D:\Dp10Repo\项目代码\RTBasics\A09财务通用管理\Financial.dproj</Transaction>
<Transaction>1899-12-30 00:00:00.000.734,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.092,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_EmployeeSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.630,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.422,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.621,D:\Dp10Repo\项目代码\RTBasics\A09财务通用管理\U_InvoiceInList.pas=D:\Dp10Repo\项目代码\RTBasics\A09财务通用管理\U_InvoiceOutList.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.135,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ZDYHelp.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.823,D:\Dp10Repo\项目代码\骉骐\A00通用窗体\U_CompanySel.dfm=D:\Dp10Repo\项目代码\骉骐\A09财务通用管理\U_CompanySel.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.753,=D:\Dp10Repo\项目代码\骉骐\T00贸易通用窗体\U_TradePlanSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.103,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_BankSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.715,=D:\Dp10Repo\public10\design\U_BaseDataLink.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.135,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ZDYHelp.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.621,D:\Dp10Repo\项目代码\RTBasics\A09财务通用管理\U_InvoiceInList.pas=D:\Dp10Repo\项目代码\RTBasics\A09财务通用管理\U_InvoiceOutList.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.939,=D:\Dp10Repo\public10\design\U_BaseInput.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.715,=D:\Dp10Repo\public10\design\U_BaseDataLink.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.103,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_BankSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.110,D:\Dp10Repo\项目代码\D10myBiaoqi\A09财务通用管理\U_handPayableList.dfm=D:\Dp10Repo\项目代码\D10myBiaoqi\A09财务通用管理\U_ClaimsableList.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.823,D:\Dp10Repo\项目代码\骉骐\A00通用窗体\U_CompanySel.dfm=D:\Dp10Repo\项目代码\骉骐\A09财务通用管理\U_CompanySel.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.095,=D:\Dp10Repo\项目代码\D10myBiaoqi\A09财务通用管理\U_HandPayableImport.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.832,=D:\Dp10Repo\public10\design\U_BaseHelp.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.552,D:\Dp10Repo\项目代码\D10myBiaoqi\A09财务通用管理\U_UserSel.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.402,=D:\Dp10Repo\项目代码\D10myBiaoqi\A09财务通用管理\U_UserSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.048,=D:\Dp10Repo\public10\design\U_BaseList.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.308,D:\Dp10Repo\项目代码\D10myBiaoqi\A09财务通用管理\U_UserSel.pas=D:\Dp10Repo\项目代码\D10myBiaoqi\A00通用窗体\U_UserSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.402,=D:\Dp10Repo\项目代码\D10myBiaoqi\A09财务通用管理\U_UserSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.552,D:\Dp10Repo\项目代码\D10myBiaoqi\A09财务通用管理\U_UserSel.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.621,D:\Dp10Repo\项目代码\RTBasics\A09财务通用管理\U_InvoiceInList.dfm=D:\Dp10Repo\项目代码\RTBasics\A09财务通用管理\U_InvoiceOutList.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.487,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ZDYHelpSel.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.672,D:\Dp10Repo\项目代码\D10myBiaoqi\A09财务通用管理\U_InvoiceInInPut.pas=D:\Dp10Repo\项目代码\D10myBiaoqi\A09财务通用管理\U_HandPayableInPut.pas</Transaction>
@ -36,6 +39,7 @@
<Transaction>1899-12-30 00:00:00.000.975,=D:\Dp10Repo\public10\ThreeFun\Fun\U_CompressionFun.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.307,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelPrint.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.061,=D:\Dp10Repo\项目代码\D10myBiaoqi\A00通用窗体\U_UserSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.110,D:\Dp10Repo\项目代码\D10myBiaoqi\A09财务通用管理\U_handPayableList.pas=D:\Dp10Repo\项目代码\D10myBiaoqi\A09财务通用管理\U_ClaimsableList.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.015,=D:\Dp10Repo\public10\ThreeFun\Fun\U_RTFun.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.040,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelMapSet.pas</Transaction>
@ -46,17 +50,18 @@
<Transaction>1899-12-30 00:00:00.000.339,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.345,=D:\Dp10Repo\项目代码\RTBasics\A09财务通用管理\U_FtyStatement.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.149,=D:\Dp10Repo\public10\ThreeFun\Form\U_ZDYHelp.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.123,=D:\Dp10Repo\public10\design\U_globalVar.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.621,D:\Dp10Repo\项目代码\RTBasics\A09财务通用管理\U_InvoiceInList.dfm=D:\Dp10Repo\项目代码\RTBasics\A09财务通用管理\U_InvoiceOutList.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.654,D:\Dp10Repo\项目代码\D10myBiaoqi\A09财务通用管理\U_HandPayableInPut.dfm=D:\Dp10Repo\项目代码\D10myBiaoqi\A09财务通用管理\U_ClaimsableInPut.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.551,D:\Dp10Repo\项目代码\D10myBiaoqi\A09财务通用管理\U_InvoiceInList.dfm=D:\Dp10Repo\项目代码\D10myBiaoqi\A09财务通用管理\U_handPayableList.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.551,D:\Dp10Repo\项目代码\D10myBiaoqi\A09财务通用管理\U_InvoiceInList.pas=D:\Dp10Repo\项目代码\D10myBiaoqi\A09财务通用管理\U_handPayableList.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.123,=D:\Dp10Repo\public10\design\U_globalVar.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.493,=D:\Dp10Repo\项目代码\RTBasics\A00通用模板\Unit1.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.308,D:\Dp10Repo\项目代码\D10myBiaoqi\A09财务通用管理\U_UserSel.dfm=D:\Dp10Repo\项目代码\D10myBiaoqi\A00通用窗体\U_UserSel.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.844,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_AttachmentUpload.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.871,D:\Dp10Repo\项目代码\RTBasics\A09财务通用管理\U_InvoiceInInPut.pas=D:\Dp10Repo\项目代码\RTBasics\A09财务通用管理\U_InvoiceOutInPut.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.487,=D:\Dp10Repo\项目代码\D10myBiaoqi\A09财务通用管理\U_OtherPayableInput.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.844,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_AttachmentUpload.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.308,D:\Dp10Repo\项目代码\D10myBiaoqi\A09财务通用管理\U_UserSel.dfm=D:\Dp10Repo\项目代码\D10myBiaoqi\A00通用窗体\U_UserSel.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.493,=D:\Dp10Repo\项目代码\RTBasics\A00通用模板\Unit1.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.646,=D:\Dp10Repo\项目代码\D10myBiaoqi\A09财务通用管理\U_PayableEdit.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.076,=D:\Dp10Repo\项目代码\RTBasics\A09财务通用管理\U_InvoiceOutInPut.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.433,=D:\Dp10Repo\项目代码\D10myBiaoqi\A09财务通用管理\U_FtyFileUp.pas</Transaction>
</Transactions>
<ProjectSortOrder AutoSort="0" SortType="0">
<File Path="android-support-v4.dex.jar"/>
@ -141,10 +146,6 @@
<File Path="U_OtherPayableList.dfm"/>
<File Path="U_OtherPayableInput.pas"/>
<File Path="U_OtherPayableInput.dfm"/>
<File Path="U_handPayableList.pas"/>
<File Path="U_handPayableList.dfm"/>
<File Path="U_HandPayableInPut.pas"/>
<File Path="U_HandPayableInPut.dfm"/>
<File Path="U_HandPayableImport.pas"/>
<File Path="U_HandPayableImport.dfm"/>
<File Path="U_FinFileUp.pas"/>
@ -153,5 +154,11 @@
<File Path="U_PayableEdit.dfm"/>
<File Path="U_UserSel.pas"/>
<File Path="U_UserSel.dfm"/>
<File Path="U_FtyFileUp.pas"/>
<File Path="U_FtyFileUp.dfm"/>
<File Path="U_ClaimsableList.pas"/>
<File Path="U_ClaimsableList.dfm"/>
<File Path="U_ClaimsableInPut.pas"/>
<File Path="U_ClaimsableInPut.dfm"/>
</ProjectSortOrder>
</BorlandProject>

View File

@ -0,0 +1,316 @@
object frmClaimsableInPut: TfrmClaimsableInPut
Left = 484
Top = 189
Caption = #32034#36180#20449#24687#24405#20837
ClientHeight = 504
ClientWidth = 1530
Color = clWhite
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
OldCreateOrder = False
Position = poDesktopCenter
OnDestroy = FormDestroy
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 12
object ToolBar1: TToolBar
Tag = 1
Left = 0
Top = 0
Width = 1530
Height = 38
AutoSize = True
ButtonHeight = 38
ButtonWidth = 91
Caption = 'ToolBar1'
DisabledImages = DataLink_Financial.ImageList_new32
Images = DataLink_Financial.ImageList_new32
List = True
ShowCaptions = True
TabOrder = 0
object TSave: TToolButton
Left = 0
Top = 0
AutoSize = True
Caption = #20445#23384
ImageIndex = 16
OnClick = TSaveClick
end
object ToolButton1: TToolButton
Left = 71
Top = 0
AutoSize = True
Caption = #22686#34892
ImageIndex = 2
OnClick = ToolButton1Click
end
object ToolButton2: TToolButton
Left = 142
Top = 0
AutoSize = True
Caption = #21024#34892
ImageIndex = 6
OnClick = ToolButton2Click
end
object ToolButton3: TToolButton
Left = 213
Top = 0
AutoSize = True
Caption = #20445#23384#26684#24335
ImageIndex = 16
OnClick = ToolButton3Click
end
object TBClose: TToolButton
Left = 308
Top = 0
AutoSize = True
Caption = #20851#38381
ImageIndex = 7
OnClick = TBCloseClick
end
end
object cxGrid1: TcxGrid
Left = 0
Top = 38
Width = 1530
Height = 466
Align = alClient
TabOrder = 1
ExplicitLeft = 376
ExplicitTop = 44
object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
Navigator.Buttons.Delete.Enabled = False
Navigator.Buttons.Delete.Visible = False
ScrollbarAnnotations.CustomAnnotations = <>
DataController.DataSource = DataSource1
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <>
DataController.Summary.FooterSummaryItems = <
item
Kind = skSum
end
item
Kind = skSum
Column = v1Money
end
item
Kind = skSum
end
item
Kind = skSum
end>
DataController.Summary.SummaryGroups = <>
OptionsBehavior.GoToNextCellOnEnter = True
OptionsCustomize.ColumnFiltering = False
OptionsData.Deleting = False
OptionsData.DeletingConfirmation = False
OptionsView.Footer = True
OptionsView.GroupByBox = False
OptionsView.Indicator = True
Styles.Footer = DataLink_Financial.Default
Styles.Header = DataLink_Financial.Default
object Tv1Column6: TcxGridDBColumn
Caption = #32034#36180#21333#21495
DataBinding.FieldName = 'FFID'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 91
end
object Tv1Column5: TcxGridDBColumn
Caption = #30003#35831#26085#26399
DataBinding.FieldName = 'FFTime'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxDateEditProperties'
HeaderAlignmentHorz = taCenter
Width = 77
end
object Tv1Column4: TcxGridDBColumn
Caption = #31867#22411
DataBinding.FieldName = 'RegType'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxComboBoxProperties'
Properties.Items.Strings = (
#23458#25143
#20379#24212#21830)
HeaderAlignmentHorz = taCenter
Width = 60
end
object Tv1Column2: TcxGridDBColumn
Caption = #23545#26041#21333#20301
DataBinding.FieldName = 'OppCoName'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxButtonEditProperties'
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
Properties.ReadOnly = True
Properties.OnButtonClick = Tv1Column2PropertiesButtonClick
HeaderAlignmentHorz = taCenter
Styles.Header = DataLink_Financial.FontBlue
Width = 82
end
object Tv1Column1: TcxGridDBColumn
Caption = #35745#21010#21333#21495
DataBinding.FieldName = 'OrderNo'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxButtonEditProperties'
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
Properties.OnButtonClick = Tv1Column1PropertiesButtonClick
HeaderAlignmentHorz = taCenter
Width = 95
end
object v1Column5: TcxGridDBColumn
Caption = #23458#25143#21333#21495
DataBinding.FieldName = 'BuyConNo'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxButtonEditProperties'
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
HeaderAlignmentHorz = taCenter
Width = 66
end
object Tv1Column8: TcxGridDBColumn
Caption = #20135#21697#32534#21495
DataBinding.FieldName = 'F_Code'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxButtonEditProperties'
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
HeaderAlignmentHorz = taCenter
Width = 72
end
object Tv1Column9: TcxGridDBColumn
Caption = #21697#21517
DataBinding.FieldName = 'F_Name'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
end
object Tv1Column10: TcxGridDBColumn
Caption = #39068#33394'/'#33457#22411
DataBinding.FieldName = 'F_Color'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 101
end
object Tv1Column11: TcxGridDBColumn
Caption = #25968#37327
DataBinding.FieldName = 'Qty'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
end
object Tv1Column12: TcxGridDBColumn
Caption = #25968#37327#21333#20301
DataBinding.FieldName = 'QtyUnit'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 69
end
object Tv1Column3: TcxGridDBColumn
Caption = #25688#35201
DataBinding.FieldName = 'FFAbstract'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxButtonEditProperties'
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
Properties.OnButtonClick = Tv1Column3PropertiesButtonClick
HeaderAlignmentHorz = taCenter
Width = 57
end
object v1Column3: TcxGridDBColumn
Caption = #36153#29992#31867#21035
DataBinding.FieldName = 'FFAbstractDL'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxButtonEditProperties'
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
Properties.OnButtonClick = v1Column3PropertiesButtonClick
HeaderAlignmentHorz = taCenter
Width = 81
end
object v1Column4: TcxGridDBColumn
Caption = #25187#27454#26041#24335
DataBinding.FieldName = 'SubExpend'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
HeaderAlignmentHorz = taCenter
Width = 80
end
object v1Money: TcxGridDBColumn
Caption = #37329#39069
DataBinding.FieldName = 'Amount'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
HeaderAlignmentHorz = taCenter
Width = 81
end
object Tv1Column13: TcxGridDBColumn
Caption = #24065#31181
DataBinding.FieldName = 'Currency'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
end
object Tv1Column7: TcxGridDBColumn
Caption = #22791#27880
DataBinding.FieldName = 'Note'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 66
end
end
object cxGridLevel1: TcxGridLevel
GridView = Tv1
end
end
object DataSource1: TDataSource
DataSet = CDS_Invoice
Left = 516
Top = 280
end
object CDS_Invoice: TClientDataSet
Aggregates = <>
Params = <>
Left = 384
Top = 268
end
object GPM_1: TcxGridPopupMenu
Grid = cxGrid1
PopupMenus = <>
Left = 280
Top = 112
end
object ADOQueryTmp: TADOQuery
Connection = DataLink_Financial.ADOLink
Parameters = <>
Left = 96
Top = 116
end
object ADOQueryCmd: TADOQuery
Connection = DataLink_Financial.ADOLink
Parameters = <>
Left = 180
Top = 116
end
end

View File

@ -0,0 +1,490 @@
unit U_ClaimsableInPut;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, ToolWin, cxStyles, cxCustomData, cxGraphics, cxFilter,
cxData, cxDataStorage, cxEdit, DB, cxDBData, cxGridLevel, cxClasses,
cxControls, cxGridCustomView, cxGridCustomTableView, cxGridTableView,
cxGridDBTableView, cxGrid, cxGridCustomPopupMenu, cxGridPopupMenu, ADODB,
DBClient, ExtCtrls, StdCtrls, BtnEdit, cxButtonEdit, cxTextEdit,
cxDropDownEdit, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, cxCalendar,
dxSkinsCore, dxSkinsDefaultPainters, dxDateRanges, dxBarBuiltInMenu, dxSkinWXI,
dxScrollbarAnnotations;
type
TfrmClaimsableInPut = class(TForm)
DataSource1: TDataSource;
CDS_Invoice: TClientDataSet;
GPM_1: TcxGridPopupMenu;
ToolBar1: TToolBar;
TSave: TToolButton;
TBClose: TToolButton;
cxGrid1: TcxGrid;
Tv1: TcxGridDBTableView;
cxGridLevel1: TcxGridLevel;
ADOQueryTmp: TADOQuery;
ADOQueryCmd: TADOQuery;
v1Column3: TcxGridDBColumn;
v1Column4: TcxGridDBColumn;
v1Column5: TcxGridDBColumn;
Tv1Column2: TcxGridDBColumn;
Tv1Column5: TcxGridDBColumn;
Tv1Column7: TcxGridDBColumn;
ToolButton1: TToolButton;
ToolButton2: TToolButton;
ToolButton3: TToolButton;
Tv1Column8: TcxGridDBColumn;
Tv1Column1: TcxGridDBColumn;
Tv1Column3: TcxGridDBColumn;
Tv1Column6: TcxGridDBColumn;
Tv1Column9: TcxGridDBColumn;
Tv1Column10: TcxGridDBColumn;
Tv1Column11: TcxGridDBColumn;
Tv1Column12: TcxGridDBColumn;
Tv1Column13: TcxGridDBColumn;
Tv1Column4: TcxGridDBColumn;
procedure TBCloseClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure TSaveClick(Sender: TObject);
procedure v1P_CodeNamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure v1P_SpecPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure v1QtyUnitPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure FormDestroy(Sender: TObject);
procedure Tv1Column2PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure Tv1Column3PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure Tv1Column6PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure ToolButton1Click(Sender: TObject);
procedure ToolButton2Click(Sender: TObject);
procedure ToolButton3Click(Sender: TObject);
procedure Tv1Column4PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure Tv1Column1PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure v1Column3PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure v1Column5PropertiesButtonClick(Sender: TObject;
AButtonIndex: Integer);
private
procedure initGrid();
procedure SaveDate();
{ Private declarations }
public
FFID: string;
fInvoiceFlag, PState: string;
{ Public declarations }
end;
var
frmClaimsableInPut: TfrmClaimsableInPut;
implementation
uses
U_RTFun, U_ZDYHelp, U_CompanySel, U_dataLink, U_ClothInfoSel,
U_TradePlanSel,U_UserSel,U_ZDYHelpFY;
{$R *.dfm}
procedure TfrmClaimsableInPut.SaveDate();
var
MaxNo: string;
begin
ADOQueryCmd.Connection.BeginTrans;
try
with CDS_Invoice do
begin
first;
while not eof do
begin
if fieldbyname('FFID').AsString = '' then
begin
if GetLSNo(ADOQueryTmp, MaxNo, 'SP', 'Finance_Flow', 4, 1) = False then
raise Exception.Create('取最大号失败!');
end
else
MaxNo := CDS_Invoice.fieldbyname('FFID').AsString;
with ADOQueryCmd do
begin
close;
sql.Clear;
sql.add('select * from Finance_Flow where FFID=' + quotedstr(Trim(MaxNo)));
open;
end;
if ADOQueryCmd.IsEmpty then
begin
ADOQueryCmd.append;
ADOQueryCmd.FieldByName('FillId').Value := Trim(DCode);
ADOQueryCmd.FieldByName('Filler').Value := Trim(DName);
ADOQueryCmd.FieldByName('status').Value := '0';
end
else
begin
ADOQueryCmd.edit;
ADOQueryCmd.FieldByName('EditId').Value := Trim(DCode);
ADOQueryCmd.FieldByName('Editer').Value := Trim(DName);
ADOQueryCmd.FieldByName('Edittime').Value := SGetServerDateTime(ADOQueryTmp);
end;
RTSetSaveDataCDS(ADOQueryCmd, Tv1, CDS_Invoice, 'Finance_Flow', 0);
ADOQueryCmd.fieldbyname('FFID').Value := MaxNo;
// ADOQueryCmd.fieldbyname('IVFlag').Value := '进项';
// ADOQueryCmd.fieldbyname('OppCoNo').Value := trim(CDS_Invoice.FieldByName('OppCoNo').AsString);
// ADOQueryCmd.fieldbyname('OppParentCoNo').Value := trim(CDS_Invoice.FieldByName('OppParentCoNo').AsString);
ADOQueryCmd.fieldbyname('OppCoNo').Value := trim(CDS_Invoice.FieldByName('OppCoNo').AsString);
ADOQueryCmd.fieldbyname('FFType').Value := '索赔登记';
ADOQueryCmd.Post;
next;
end;
end;
ADOQueryCmd.Connection.CommitTrans;
application.MessageBox('保存成功!', '提示');
Modalresult := 1;
except
ADOQueryCmd.Connection.RollbackTrans;
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
end;
end;
procedure TfrmClaimsableInPut.initGrid();
begin
with ADOQueryTmp do
begin
close;
sql.Clear;
if PState = '复制' then
begin
sql.Add('select '''' FFID,0 Amount,* from Finance_Flow where FFID=''' + trim(FFID) + '''');
end
else
begin
sql.Add('select * from Finance_Flow where FFID=''' + trim(FFID) + '''');
end;
sql.add(' and isnull(status,''0'')=''0''');
// showmessage(sql.text);
open;
end;
SCreateCDS(ADOQueryTmp, CDS_Invoice);
SInitCDSData(ADOQueryTmp, CDS_Invoice);
end;
procedure TfrmClaimsableInPut.TBCloseClick(Sender: TObject);
begin
Close;
end;
procedure TfrmClaimsableInPut.FormShow(Sender: TObject);
begin
ReadCxGrid(Self.Caption, Tv1, '财务管理');
initGrid();
end;
procedure TfrmClaimsableInPut.TSaveClick(Sender: TObject);
begin
// if CDS_Invoice.Locate('IVNo', null, []) then
// begin
// application.MessageBox('发票号不能为空', '提示');
// exit;
// end;
// if CDS_Invoice.Locate('IVType', null, []) then
// begin
// application.MessageBox('发票类型不能为空', '提示');
// exit;
// end;
// if CDS_Invoice.Locate('OurCoName', null, []) then
// begin
// application.MessageBox('我方单位不能为空', '提示');
// exit;
// end;
// if CDS_Invoice.Locate('OppCoName', null, []) then
// begin
// application.MessageBox('对方单位不能为空', '提示');
// exit;
// end;
SaveDate();
end;
procedure TfrmClaimsableInPut.v1Column3PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
begin
try
frmZDYHelpFY := TfrmZDYHelpFY.Create(Application);
with frmZDYHelpFY do
begin
MainType := '索赔登记';
flag := 'FFAbstractDL';
flagname := '费用类别';
if ShowModal = 1 then
begin
Self.CDS_Invoice.Edit;
Self.CDS_Invoice.FieldByName('FFAbstract').Value := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
Self.CDS_Invoice.FieldByName('FFAbstractDL').Value := Trim(ClientDataSet1.fieldbyname('Note2').AsString);
end;
end;
finally
frmZDYHelpFY.Free;
end;
tv1.Controller.EditingController.ShowEdit();
end;
procedure TfrmClaimsableInPut.v1Column5PropertiesButtonClick(Sender: TObject;
AButtonIndex: Integer);
begin
try
frmUserSel := TfrmUserSel.Create(Application);
with frmUserSel do
begin
// FCoType := '客户';
// if Self.FAuthority = '录入' then
// FAuthority := '理单业务';
if ShowModal = 1 then
begin
// self.BuyName.TxtCode := Trim(frmUserSel.CDS_1.fieldbyname('CoCode').AsString);
// self.BuyName.Text := Trim(frmUserSel.CDS_1.fieldbyname('CoAbbrName').AsString);
Self.CDS_Invoice.Edit;
Self.CDS_Invoice.FieldByName('Certifier').Value := Trim(CDS_1.fieldbyname('UserName').AsString);
end;
end;
finally
frmUserSel.Free;
end;
end;
procedure TfrmClaimsableInPut.v1P_CodeNamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
begin
try
frmZDYHelp := TfrmZDYHelp.Create(Application);
with frmZDYHelp do
begin
flag := 'MPRTCodeName';
flagname := '产品名称';
if ShowModal = 1 then
begin
Self.CDS_Invoice.Edit;
Self.CDS_Invoice.FieldByName('F_Name').Value := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
Self.CDS_Invoice.FieldByName('F_Code').Value := Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString);
end;
end;
finally
frmZDYHelp.Free;
end;
tv1.Controller.EditingController.ShowEdit();
end;
procedure TfrmClaimsableInPut.v1P_SpecPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
begin
try
frmZDYHelp := TfrmZDYHelp.Create(Application);
with frmZDYHelp do
begin
flag := 'P_Spec';
flagname := '成品规格';
if ShowModal = 1 then
begin
Self.CDS_Invoice.Edit;
Self.CDS_Invoice.FieldByName('P_Spec').Value := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
end;
end;
finally
frmZDYHelp.Free;
end;
end;
procedure TfrmClaimsableInPut.v1QtyUnitPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
begin
try
frmZDYHelp := TfrmZDYHelp.Create(Application);
with frmZDYHelp do
begin
flag := 'QtyUnit';
flagname := '数量单位';
if ShowModal = 1 then
begin
Self.CDS_Invoice.Edit;
Self.CDS_Invoice.FieldByName('QtyUnit').Value := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
end;
end;
finally
frmZDYHelp.Free;
end;
end;
procedure TfrmClaimsableInPut.FormDestroy(Sender: TObject);
begin
frmClaimsableInPut := nil;
end;
procedure TfrmClaimsableInPut.Tv1Column1PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
begin
try
frmTradePlanSel := TfrmTradePlanSel.Create(Application);
with frmTradePlanSel do
begin
// FMainID := MainID.Text;
if ShowModal = 1 then
begin
Self.CDS_Invoice.Edit;
Self.CDS_Invoice.FieldByName('OrderNo').Value := CDS_1.fieldbyname('OrderNo').value;
Self.CDS_Invoice.FieldByName('BuyConNo').Value := Trim(CDS_1.fieldbyname('BuyConNo').AsString);
Self.CDS_Invoice.FieldByName('F_Code').Value := Trim(CDS_1.fieldbyname('C_Code').AsString);
Self.CDS_Invoice.FieldByName('F_Name').Value := Trim(CDS_1.fieldbyname('C_Name').AsString);
//
end;
end;
finally
frmTradePlanSel.Free;
end;
end;
procedure TfrmClaimsableInPut.Tv1Column2PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
begin
if Self.CDS_Invoice.FieldByName('RegType').ASString='' then
begin
application.MessageBox('先选择类型!', '提示');
Exit;
end;
try
frmCompanySel := TfrmCompanySel.Create(Application);
with frmCompanySel do
begin
FCoType := Self.CDS_Invoice.FieldByName('RegType').ASString;
if ShowModal = 1 then
begin
Self.CDS_Invoice.Edit;
Self.CDS_Invoice.FieldByName('OppCoNo').Value := Trim(CDS_1.fieldbyname('CoCode').AsString);
Self.CDS_Invoice.FieldByName('OppCoName').Value := Trim(CDS_1.fieldbyname('CoAbbrName').AsString);
end;
end;
finally
frmCompanySel.Free;
end;
end;
procedure TfrmClaimsableInPut.Tv1Column3PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
begin
try
frmZDYHelp := TfrmZDYHelp.Create(Application);
with frmZDYHelp do
begin
MainType := '索赔登记';
flag := 'FFAbstract';
flagname := '摘要';
if ShowModal = 1 then
begin
Self.CDS_Invoice.Edit;
Self.CDS_Invoice.FieldByName('FFAbstract').Value := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
end;
end;
finally
frmZDYHelp.Free;
end;
end;
procedure TfrmClaimsableInPut.Tv1Column4PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
begin
try
frmZDYHelp := TfrmZDYHelp.Create(Application);
with frmZDYHelp do
begin
MainType := '索赔登记';
flag := 'RedType';
flagname := '类型';
if ShowModal = 1 then
begin
Self.CDS_Invoice.Edit;
Self.CDS_Invoice.FieldByName('RedType').Value := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
end;
end;
finally
frmZDYHelp.Free;
end;
end;
procedure TfrmClaimsableInPut.Tv1Column6PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
begin
try
frmCompanySel := TfrmCompanySel.Create(Application);
with frmCompanySel do
begin
FCoType := '供应商';
if ShowModal = 1 then
begin
Self.CDS_Invoice.Edit;
Self.CDS_Invoice.FieldByName('OppParentCoNo').Value := Trim(CDS_1.fieldbyname('CoCode').AsString);
Self.CDS_Invoice.FieldByName('OppParentCoName').Value := Trim(CDS_1.fieldbyname('CoAbbrName').AsString);
end;
end;
finally
frmCompanySel.Free;
end;
end;
procedure TfrmClaimsableInPut.ToolButton1Click(Sender: TObject);
begin
if CDS_Invoice.IsEmpty = False then
begin
CopyAddRowCDS(CDS_Invoice);
with CDS_Invoice do
begin
Edit;
FieldByName('FFID').Value := null;
post;
end;
end
else
begin
with CDS_Invoice do
begin
Append;
FieldByName('FFTime').Value := now();
// FieldByName('QtyUnit').Value := 'Kg';
FieldByName('Amount').Value := 0;
Post;
end;
end;
// CDS_Invoice.append;
// CDS_Invoice.FieldByName('IVDate').Value := now();
// CDS_Invoice.FieldByName('QtyUnit').Value := 'Kg';
// CDS_Invoice.FieldByName('Amount').Value := 0;
// CDS_Invoice.FieldByName('Qty').Value := 0;
// CDS_Invoice.FieldByName('tax').Value := 0;
// CDS_Invoice.FieldByName('TaxFee').Value := 0;
// CDS_Invoice.FieldByName('taxAmount').Value := 0;
// CDS_Invoice.FieldByName('Price').Value := 0;
// CDS_Invoice.FieldByName('tax').Value := 13;
// CDS_Invoice.FieldByName('Currency').Value := 'CNY';
// CDS_Invoice.Post;
end;
procedure TfrmClaimsableInPut.ToolButton2Click(Sender: TObject);
begin
if CDS_Invoice.IsEmpty then
exit;
if application.MessageBox('确定要删除吗', '提示', 1) = 2 then
exit;
with ADOQueryTmp do
begin
close;
sql.clear;
sql.add('delete from Finance_Flow where FFID=''' + trim(CDS_Invoice.fieldbyname('FFID').asstring) + ''' ');
execsql;
end;
CDS_Invoice.delete;
end;
procedure TfrmClaimsableInPut.ToolButton3Click(Sender: TObject);
begin
WriteCxGrid(Self.Caption, Tv1, '财务管理');
end;
end.

View File

@ -0,0 +1,590 @@
inherited frmClaimsableList: TfrmClaimsableList
Left = 308
Top = 202
Caption = #32034#36180#31649#29702
ClientHeight = 626
ClientWidth = 1540
FormStyle = fsMDIChild
Visible = True
ExplicitWidth = 1556
ExplicitHeight = 665
PixelsPerInch = 96
TextHeight = 12
object ToolBar1: TToolBar [0]
Tag = 1
Left = 0
Top = 0
Width = 1540
Height = 38
AutoSize = True
ButtonHeight = 38
ButtonWidth = 91
Caption = 'ToolBar1'
Color = clWhite
DisabledImages = DataLink_Financial.ImageList_new32
Images = DataLink_Financial.ImageList_new32
List = True
ParentColor = False
ShowCaptions = True
TabOrder = 0
object TBRafresh: TToolButton
Left = 0
Top = 0
AutoSize = True
Caption = #21047#26032
ImageIndex = 1
OnClick = TBRafreshClick
end
object ToolButton2: TToolButton
Left = 71
Top = 0
AutoSize = True
Caption = #36807#28388
ImageIndex = 0
OnClick = ToolButton2Click
end
object TADD: TToolButton
Left = 142
Top = 0
AutoSize = True
Caption = #26032#22686
ImageIndex = 9
OnClick = TADDClick
end
object TUPDATE: TToolButton
Left = 213
Top = 0
AutoSize = True
Caption = #20462#25913
ImageIndex = 3
OnClick = TUPDATEClick
end
object ToolButton5: TToolButton
Left = 284
Top = 0
AutoSize = True
Caption = #22797#21046
ImageIndex = 13
Visible = False
OnClick = ToolButton5Click
end
object TBDEL: TToolButton
Left = 355
Top = 0
AutoSize = True
Caption = #21024#38500
ImageIndex = 5
OnClick = TBDELClick
end
object TSel: TToolButton
Left = 426
Top = 0
AutoSize = True
Caption = #26597#30475
ImageIndex = 4
OnClick = TSelClick
end
object TCHK: TToolButton
Left = 497
Top = 0
AutoSize = True
Caption = #23457#26680
ImageIndex = 12
OnClick = TCHKClick
end
object TNOCHK: TToolButton
Left = 568
Top = 0
AutoSize = True
Caption = #25764#38144#23457#26680
ImageIndex = 11
OnClick = TNOCHKClick
end
object ToolButton7: TToolButton
Left = 663
Top = 0
AutoSize = True
Caption = #22797#26680
ImageIndex = 12
OnClick = ToolButton7Click
end
object ToolButton8: TToolButton
Left = 734
Top = 0
AutoSize = True
Caption = #25764#38144#22797#26680
ImageIndex = 11
OnClick = ToolButton8Click
end
object ToolButton9: TToolButton
Left = 829
Top = 0
AutoSize = True
Caption = #32034#36180#25171#21360
ImageIndex = 21
OnClick = ToolButton9Click
end
object ToolButton4: TToolButton
Left = 924
Top = 0
AutoSize = True
Caption = #25171#21360
ImageIndex = 21
Visible = False
OnClick = ToolButton4Click
end
object ToolButton1: TToolButton
Left = 995
Top = 0
AutoSize = True
Caption = #23548#20986
ImageIndex = 20
OnClick = ToolButton1Click
end
object ToolButton3: TToolButton
Left = 1066
Top = 0
AutoSize = True
Caption = #20445#23384#26684#24335
ImageIndex = 16
OnClick = ToolButton3Click
end
object TBClose: TToolButton
Left = 1161
Top = 0
AutoSize = True
Caption = #20851#38381
ImageIndex = 7
OnClick = TBCloseClick
end
object ToolButton6: TToolButton
Left = 1232
Top = 0
AutoSize = True
Caption = #23548#20837
ImageIndex = 17
Visible = False
OnClick = ToolButton6Click
end
end
object Panel1: TPanel [1]
Left = 0
Top = 38
Width = 1540
Height = 67
Align = alTop
BevelInner = bvRaised
BevelOuter = bvLowered
Color = clWhite
ParentBackground = False
TabOrder = 1
object Label2: TLabel
Left = 40
Top = 13
Width = 52
Height = 12
Caption = #21457#29983#26085#26399
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label6: TLabel
Left = 74
Top = 37
Width = 30
Height = 12
Caption = '-----'
end
object Label5: TLabel
Left = 214
Top = 14
Width = 52
Height = 12
Caption = #23545#26041#21333#20301
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
Visible = False
end
object Label1: TLabel
Left = 210
Top = 40
Width = 52
Height = 12
Caption = #25105#26041#21333#20301
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
Visible = False
end
object begdate: TDateTimePicker
Left = 94
Top = 9
Width = 97
Height = 20
Date = 41256.000000000000000000
Time = 0.918237847232376200
TabOrder = 0
end
object Enddate: TDateTimePicker
Left = 94
Top = 33
Width = 97
Height = 20
Date = 41256.000000000000000000
Time = 0.918237847232376200
TabOrder = 2
end
object FactoryName: TEdit
Tag = 2
Left = 266
Top = 10
Width = 89
Height = 20
TabOrder = 1
Visible = False
OnChange = IVNoChange
end
object SYRName: TEdit
Tag = 2
Left = 266
Top = 36
Width = 89
Height = 20
TabOrder = 3
Visible = False
OnChange = IVNoChange
end
end
object cxGrid1: TcxGrid [2]
Left = 0
Top = 127
Width = 1540
Height = 499
Align = alClient
PopupMenu = PopupMenu1
TabOrder = 3
ExplicitLeft = 8
ExplicitTop = 133
object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
Navigator.Buttons.Delete.Enabled = False
Navigator.Buttons.Delete.Visible = False
ScrollbarAnnotations.CustomAnnotations = <>
DataController.DataSource = DS_Invoice
DataController.Summary.DefaultGroupSummaryItems = <>
DataController.Summary.FooterSummaryItems = <
item
Kind = skSum
end
item
Kind = skSum
end
item
Kind = skSum
end
item
Kind = skSum
end
item
Kind = skSum
end
item
Kind = skSum
end
item
Kind = skSum
Column = v1Column15
end>
DataController.Summary.SummaryGroups = <>
OptionsCustomize.ColumnFiltering = False
OptionsView.Footer = True
OptionsView.GroupByBox = False
OptionsView.Indicator = True
Styles.Footer = DataLink_Financial.Default
Styles.Header = DataLink_Financial.Default
object v1Column3: TcxGridDBColumn
Caption = #36873#25321
DataBinding.FieldName = 'SSel'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxCheckBoxProperties'
HeaderAlignmentHorz = taCenter
Width = 49
end
object Tv1Column2: TcxGridDBColumn
Caption = #32034#36180#21333#21495
DataBinding.FieldName = 'FFID'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 68
end
object v1InvoiceDate: TcxGridDBColumn
Caption = #30003#35831#26085#26399
DataBinding.FieldName = 'FFTime'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 79
end
object v1Column12: TcxGridDBColumn
Caption = #31867#22411
DataBinding.FieldName = 'RegType'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
Properties.OnEditValueChanged = v1Column14PropertiesEditValueChanged
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 57
end
object v1Column2: TcxGridDBColumn
Caption = #23545#26041#21333#20301
DataBinding.FieldName = 'OppCoName'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Styles.Header = DataLink_Financial.FontBlue
Width = 83
end
object v1Column13: TcxGridDBColumn
Caption = #35745#21010#21333#21495
DataBinding.FieldName = 'OrderNo'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 63
end
object Tv1Column1: TcxGridDBColumn
Caption = #23458#25143#21333#21495
DataBinding.FieldName = 'BuyConNo'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 68
end
object v1Column19: TcxGridDBColumn
Caption = #20135#21697#32534#21495
DataBinding.FieldName = 'F_Code'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
Properties.OnEditValueChanged = v1Column14PropertiesEditValueChanged
HeaderAlignmentHorz = taCenter
Options.Editing = False
end
object Tv1Column3: TcxGridDBColumn
Caption = #21697#21517
DataBinding.FieldName = 'F_Name'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
end
object Tv1Column4: TcxGridDBColumn
Caption = #39068#33394'/'#33457#22411
DataBinding.FieldName = 'F_Color'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 94
end
object Tv1Column5: TcxGridDBColumn
Caption = #25968#37327
DataBinding.FieldName = 'Qty'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
end
object Tv1Column6: TcxGridDBColumn
Caption = #25968#37327#21333#20301
DataBinding.FieldName = 'QtyUnit'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
end
object v1Column14: TcxGridDBColumn
Caption = #25688#35201
DataBinding.FieldName = 'FFAbstract'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
Properties.OnEditValueChanged = v1Column14PropertiesEditValueChanged
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 44
end
object v1Column17: TcxGridDBColumn
Caption = #36153#29992#31867#21035
DataBinding.FieldName = 'FFAbstractDL'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 64
end
object v1Column18: TcxGridDBColumn
Caption = #25187#27454#26041#24335
DataBinding.FieldName = 'SubExpend'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
Properties.OnEditValueChanged = v1Column14PropertiesEditValueChanged
HeaderAlignmentHorz = taCenter
Options.Editing = False
end
object v1Column15: TcxGridDBColumn
Caption = #37329#39069
DataBinding.FieldName = 'Amount'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 54
end
object Tv1Column7: TcxGridDBColumn
Caption = #24065#31181
DataBinding.FieldName = 'Currency'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
end
object v1note: TcxGridDBColumn
Caption = #22791#27880
DataBinding.FieldName = 'note'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 114
end
end
object cxGridLevel1: TcxGridLevel
GridView = Tv1
end
end
object cxTabControl1: TcxTabControl [3]
Left = 0
Top = 105
Width = 1540
Height = 22
Align = alTop
TabOrder = 2
Properties.CustomButtons.Buttons = <>
Properties.Style = 9
Properties.TabIndex = 0
Properties.Tabs.Strings = (
#26410#23457#26680
#24050#23457#26680
#24050#22797#26680
#20840#37096)
OnChange = cxTabControl1Change
ClientRectBottom = 22
ClientRectRight = 1540
ClientRectTop = 19
end
inherited ADOQueryBaseCmd: TADOQuery
Connection = DataLink_Financial.ADOLink
Left = 161
Top = 264
end
inherited ADOQueryBaseTemp: TADOQuery
Connection = DataLink_Financial.ADOLink
Left = 161
Top = 201
end
object ADOQueryTemp: TADOQuery
Connection = DataLink_Financial.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 351
Top = 187
end
object ADOQueryCmd: TADOQuery
Connection = DataLink_Financial.ADOLink
Parameters = <>
Left = 388
Top = 187
end
object ADOQueryMain: TADOQuery
Connection = DataLink_Financial.ADOLink
Parameters = <>
Left = 417
Top = 189
end
object RM1: TRMGridReport
ThreadPrepareReport = True
InitialZoom = pzDefault
PreviewButtons = [rmpbZoom, rmpbLoad, rmpbSave, rmpbPrint, rmpbFind, rmpbPageSetup, rmpbExit, rmpbExport, rmpbNavigator]
DefaultCollate = False
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
PreviewOptions.RulerUnit = rmutScreenPixels
PreviewOptions.RulerVisible = False
PreviewOptions.DrawBorder = False
PreviewOptions.BorderPen.Color = clGray
PreviewOptions.BorderPen.Style = psDash
Dataset = RMDB_Main
CompressLevel = rmzcFastest
CompressThread = False
LaterBuildEvents = True
OnlyOwnerDataSet = False
Left = 468
Top = 268
ReportData = {}
end
object RMDB_Main: TRMDBDataSet
Visible = True
DataSet = ADOQueryTemp
Left = 432
Top = 268
end
object cxGridPopupMenu2: TcxGridPopupMenu
Grid = cxGrid1
PopupMenus = <>
Left = 440
Top = 324
end
object DS_Invoice: TDataSource
DataSet = CDS_Invoice
Left = 527
Top = 323
end
object CDS_Invoice: TClientDataSet
Aggregates = <>
Params = <>
Left = 488
Top = 324
end
object RMXLSExport1: TRMXLSExport
ShowAfterExport = True
ExportPrecision = 1
PagesOfSheet = 1
ExportImages = True
ExportFrames = True
ExportImageFormat = ifBMP
JPEGQuality = 0
ScaleX = 1.000000000000000000
ScaleY = 1.000000000000000000
CompressFile = False
Left = 504
Top = 268
end
object PopupMenu1: TPopupMenu
Left = 388
Top = 324
object N1: TMenuItem
Caption = #20840#36873
OnClick = N1Click
end
object N2: TMenuItem
Caption = #20840#24323
OnClick = N2Click
end
object N3: TMenuItem
Caption = #22797#21046
OnClick = N3Click
end
end
object ADOQueryPrint: TADOQuery
Connection = DataLink_Financial.ADOLink
Parameters = <>
Left = 381
Top = 269
end
end

View File

@ -0,0 +1,753 @@
unit U_ClaimsableList;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
cxTextEdit, cxDropDownEdit, cxPC, RM_e_Xls, Menus, cxLookAndFeels,
cxLookAndFeelPainters, cxNavigator, dxBarBuiltInMenu, dxSkinsCore,
dxSkinsDefaultPainters, dxDateRanges, U_BaseList, Vcl.Clipbrd, dxSkinWXI,
dxScrollbarAnnotations;
type
TfrmClaimsableList = class(TfrmBaseList)
ToolBar1: TToolBar;
TBRafresh: TToolButton;
TBClose: TToolButton;
ADOQueryTemp: TADOQuery;
ADOQueryCmd: TADOQuery;
Panel1: TPanel;
ToolButton2: TToolButton;
ADOQueryMain: TADOQuery;
ToolButton1: TToolButton;
RM1: TRMGridReport;
RMDB_Main: TRMDBDataSet;
cxGrid1: TcxGrid;
Tv1: TcxGridDBTableView;
cxGridLevel1: TcxGridLevel;
Label2: TLabel;
Label6: TLabel;
begdate: TDateTimePicker;
Enddate: TDateTimePicker;
cxGridPopupMenu2: TcxGridPopupMenu;
DS_Invoice: TDataSource;
CDS_Invoice: TClientDataSet;
TADD: TToolButton;
TUPDATE: TToolButton;
TBDEL: TToolButton;
v1InvoiceDate: TcxGridDBColumn;
v1note: TcxGridDBColumn;
Label5: TLabel;
FactoryName: TEdit;
TCHK: TToolButton;
TNOCHK: TToolButton;
cxTabControl1: TcxTabControl;
TSel: TToolButton;
v1Column2: TcxGridDBColumn;
RMXLSExport1: TRMXLSExport;
PopupMenu1: TPopupMenu;
N1: TMenuItem;
N2: TMenuItem;
ToolButton4: TToolButton;
v1Column3: TcxGridDBColumn;
ADOQueryPrint: TADOQuery;
Label1: TLabel;
SYRName: TEdit;
v1Column12: TcxGridDBColumn;
v1Column13: TcxGridDBColumn;
v1Column14: TcxGridDBColumn;
v1Column15: TcxGridDBColumn;
v1Column17: TcxGridDBColumn;
v1Column18: TcxGridDBColumn;
v1Column19: TcxGridDBColumn;
ToolButton3: TToolButton;
N3: TMenuItem;
ToolButton5: TToolButton;
Tv1Column1: TcxGridDBColumn;
ToolButton6: TToolButton;
Tv1Column2: TcxGridDBColumn;
Tv1Column3: TcxGridDBColumn;
Tv1Column4: TcxGridDBColumn;
Tv1Column5: TcxGridDBColumn;
Tv1Column6: TcxGridDBColumn;
Tv1Column7: TcxGridDBColumn;
ToolButton7: TToolButton;
ToolButton8: TToolButton;
ToolButton9: TToolButton;
procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBCloseClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure TBRafreshClick(Sender: TObject);
procedure ToolButton2Click(Sender: TObject);
procedure ToolButton1Click(Sender: TObject);
procedure IVNoChange(Sender: TObject);
procedure TADDClick(Sender: TObject);
procedure TUPDATEClick(Sender: TObject);
procedure TBDELClick(Sender: TObject);
procedure cxTabControl1Change(Sender: TObject);
procedure TCHKClick(Sender: TObject);
procedure TNOCHKClick(Sender: TObject);
procedure TSelClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure N1Click(Sender: TObject);
procedure N2Click(Sender: TObject);
procedure ToolButton4Click(Sender: TObject);
procedure v1Column14PropertiesEditValueChanged(Sender: TObject);
procedure ToolButton3Click(Sender: TObject);
procedure N3Click(Sender: TObject);
procedure ToolButton5Click(Sender: TObject);
procedure ToolButton6Click(Sender: TObject);
procedure ToolButton7Click(Sender: TObject);
procedure ToolButton8Click(Sender: TObject);
procedure ToolButton9Click(Sender: TObject);
private
{ Private declarations }
procedure InitGrid();
procedure SetStatus();
public
FZKType, canshu1, canshu2: string;
{ Public declarations }
end;
//var
// frmInvoiceXX: TfrmInvoiceXX;
implementation
uses
U_DataLink, U_RTFun, U_ZDYHelp, U_InvoiceInInPut, U_HandPayableInPut,
U_HandPayableImport, U_ClaimsableInPut,U_LabelPrint;
{$R *.dfm}
procedure TfrmClaimsableList.SetStatus();
begin
tchk.Visible := false;
tnochk.Visible := false;
TUPDATE.Visible := false;
tbdel.Visible := false;
if trim(DParameters1) <> '高权限' then
begin
case cxTabControl1.TabIndex of
0:
begin
TUPDATE.Visible := true;
tbdel.Visible := true;
TCHK.Visible := true;
end;
1:
begin
tnochk.Visible := true;
end;
2:
begin
end;
end;
end
else
begin
case cxTabControl1.TabIndex of
0:
begin
tchk.Visible := true;
TUPDATE.Visible := true;
tbdel.Visible := true;
TCHK.Visible := true;
end;
1:
begin
tnochk.Visible := true;
end;
2:
begin
end;
end;
end;
end;
procedure TfrmClaimsableList.InitGrid();
begin
try
with ADOQueryMain do
begin
Close;
SQL.Clear;
sql.Add(' select CONVERT(varchar,A.FFTime,23) FFTime,A.* from Finance_Flow A ');
sql.add(' where A.FFTime>=''' + formatdatetime('yyyy-MM-dd', begdate.datetime) + ''' ');
sql.Add(' and A.FFTime<''' + formatdateTime('yyyy-MM-dd', enddate.DateTime + 1) + ''' ');
sql.Add(' and A.FFType=''索赔登记'' ');
case cxTabControl1.TabIndex of
0:
begin
sql.add(' and isnull(A.Status,''0'')=''0''');
end;
1:
begin
sql.add(' and A.Status=''9''');
end;
2:
begin
sql.add(' and A.Status=''11''');
end;
end;
Open;
end;
SCreateCDS(ADOQueryMain, CDS_Invoice);
SInitCDSData(ADOQueryMain, CDS_Invoice);
finally
TV1.DataController.Filter.Clear;
end;
end;
procedure TfrmClaimsableList.FormDestroy(Sender: TObject);
begin
inherited;
// frmInvoiceXX := nil;
end;
procedure TfrmClaimsableList.FormClose(Sender: TObject; var Action: TCloseAction);
begin
inherited;
Action := caFree;
end;
procedure TfrmClaimsableList.TBCloseClick(Sender: TObject);
begin
Close;
end;
procedure TfrmClaimsableList.FormShow(Sender: TObject);
begin
inherited;
ReadCxGrid(self.Caption, Tv1, '财务管理');
Enddate.DateTime := SGetServerDate(ADOQueryTemp);
begdate.DateTime := Enddate.DateTime - 30;
SetStatus();
InitGrid();
end;
procedure TfrmClaimsableList.TBRafreshClick(Sender: TObject);
begin
begdate.SetFocus;
InitGrid();
end;
procedure TfrmClaimsableList.ToolButton2Click(Sender: TObject);
begin
if ADOQueryMain.Active then
begin
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
SCreateCDS(ADOQueryMain, CDS_Invoice);
SInitCDSData(ADOQueryMain, CDS_Invoice);
end;
end;
procedure TfrmClaimsableList.ToolButton3Click(Sender: TObject);
begin
WriteCxGrid(self.Caption, Tv1, '财务管理');
end;
procedure TfrmClaimsableList.ToolButton1Click(Sender: TObject);
begin
if ADOQueryMain.IsEmpty then
Exit;
TcxGridToExcel(self.Caption, cxgrid1);
end;
procedure TfrmClaimsableList.IVNoChange(Sender: TObject);
begin
ToolButton2.Click;
end;
procedure TfrmClaimsableList.TADDClick(Sender: TObject);
begin
frmClaimsableInPut := TfrmClaimsableInPut.Create(self);
with frmClaimsableInPut do
begin
FFID := '';
// FZKType := Self.FZKType;
if showmodal = 1 then
begin
initGrid();
end;
free;
end;
end;
procedure TfrmClaimsableList.TUPDATEClick(Sender: TObject);
begin
frmClaimsableInPut := TfrmClaimsableInPut.Create(self);
with frmClaimsableInPut do
begin
// IvNo.Enabled := False;
FFID := trim(Self.CDS_Invoice.fieldbyname('FFID').asstring);
if Canshu1 = '申请' then
begin
if Trim(CDS_Invoice.fieldbyname('Filler').AsString) <> Trim(DName) then
begin
Application.MessageBox('不能操作他人的数据!', '提示', 0);
Exit;
end;
end;
if showmodal = 1 then
begin
Self.initGrid();
end;
free;
end;
end;
procedure TfrmClaimsableList.TBDELClick(Sender: TObject);
begin
if CDS_Invoice.IsEmpty then
exit;
if Canshu1 = '申请' then
begin
if Trim(CDS_Invoice.fieldbyname('Filler').AsString) <> Trim(DName) then
begin
Application.MessageBox('不能操作他人的数据!', '提示', 0);
Exit;
end;
end;
if application.MessageBox('确定要删除吗?', '提示', 1) = 2 then
exit;
try
ADOQueryCmd.Connection.BeginTrans;
with ADOQueryCmd do
begin
close;
sql.Clear;
sql.add('delete from Finance_Flow where FFID=''' + trim(CDS_Invoice.fieldbyname('FFID').asstring) + ''' ');
// sql.Add('insert into SY_SysLog(operor,opertime,Model,acction,opevent,result) values( ');
// sql.Add(' ' + quotedstr(trim(DName)));
// sql.Add(',getdate() ');
// sql.Add(',' + quotedstr(trim(self.Caption)));
// sql.Add(',' + quotedstr(trim('手工删除')));
// sql.Add(',' + quotedstr(trim('发票号:' + trim(CDS_Invoice.FieldByName('ivNo').AsString))));
// sql.Add(',' + quotedstr(trim('成功')));
// sql.Add(')');
execsql;
end;
ADOQueryCmd.Connection.CommitTrans;
CDS_Invoice.Delete;
except
ADOQueryCmd.Connection.RollbackTrans;
end;
end;
procedure TfrmClaimsableList.cxTabControl1Change(Sender: TObject);
begin
SetStatus();
initGrid();
end;
procedure TfrmClaimsableList.TCHKClick(Sender: TObject);
var
MFFIDS: string;
begin
if CDS_Invoice.IsEmpty then
exit;
if not CDS_Invoice.Locate('SSel', True, []) then
begin
application.MessageBox('请选择数据', '提示');
Exit;
end;
with CDS_Invoice do
begin
// DisableControls;
while CDS_Invoice.Locate('SSel', True, []) do
begin
MFFIDS := MFFIDS + Trim(CDS_Invoice.fieldbyname('FFID').AsString) + ',';
CDS_Invoice.Delete;
end;
// EnableControls;
end;
try
with ADOQueryCmd do
begin
close;
sql.Clear;
sql.add('update Finance_Flow set Chker=''' + trim(DName) + ''',Chktime=getdate(),status=''9'' ');
sql.add('where FFType=''索赔登记'' and EXISTS (select * from [dbo].[F_Tool_SplitString]( ''' + trim(MFFIDS) + '''');
sql.add(','','') X where X.RTValue=Finance_Flow.FFID) ');
// showmessage(sql.text);
execsql;
end;
application.MessageBox('审核成功', '提示');
// InitGrid();
CDS_Invoice.delete;
except
application.MessageBox('审核失败', '提示');
end;
end;
procedure TfrmClaimsableList.TNOCHKClick(Sender: TObject);
var
MFFIDS: string;
begin
if CDS_Invoice.IsEmpty then
exit;
if not CDS_Invoice.Locate('SSel', True, []) then
begin
application.MessageBox('请选择数据', '提示');
Exit;
end;
with CDS_Invoice do
begin
// DisableControls;
while CDS_Invoice.Locate('SSel', True, []) do
begin
MFFIDS := MFFIDS + Trim(CDS_Invoice.fieldbyname('FFID').AsString) + ',';
CDS_Invoice.Delete;
end;
// EnableControls;
end;
try
with ADOQueryCmd do
begin
close;
sql.Clear;
sql.add('update Finance_Flow set Chker=null,Chktime=null,status=''0'' ');
sql.add('where FFType=''索赔登记'' and EXISTS (select * from [dbo].[F_Tool_SplitString]( ''' + trim(MFFIDS) + '''');
sql.add(','','') X where X.RTValue=Finance_Flow.FFID) ');
execsql;
end;
application.MessageBox('撤销成功', '提示');
// CDS_Invoice.delete;
except
application.MessageBox('撤销失败', '提示');
end;
end;
procedure TfrmClaimsableList.TSelClick(Sender: TObject);
begin
frmClaimsableInPut := TfrmClaimsableInPut.Create(self);
with frmClaimsableInPut do
begin
TSave.Visible := False;
FFID := trim(Self.CDS_Invoice.fieldbyname('FFID').asstring);
if showmodal = 1 then
begin
end;
end;
end;
procedure TfrmClaimsableList.FormCreate(Sender: TObject);
begin
inherited;
canshu1 := trim(DParameters1);
end;
procedure TfrmClaimsableList.N1Click(Sender: TObject);
begin
SelOKNo(CDS_Invoice, True);
end;
procedure TfrmClaimsableList.N2Click(Sender: TObject);
begin
SelOKNo(CDS_Invoice, false);
end;
procedure TfrmClaimsableList.N3Click(Sender: TObject);
begin
Clipboard.SetTextBuf(PChar(Trim(CDS_Invoice.fieldbyname(TV1.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString)));
end;
procedure TfrmClaimsableList.ToolButton4Click(Sender: TObject);
var
fPrintFile: string;
Porderno, LBName, SYRName: string;
i, j: Integer;
OrderKg: Double;
begin
if CDS_Invoice.IsEmpty then
Exit;
if CDS_Invoice.Locate('SSel', True, []) = False then
begin
Application.MessageBox('没有选择数据', '提示', 0);
Exit;
end;
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add('delete TBSubID where DName=''' + Trim(DCode) + '''');
ExecSQL;
end;
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add('SELECT * FROM TBSubID where 1=2 ');
open;
end;
CDS_Invoice.DisableControls;
try
ADOQueryCmd.Connection.BeginTrans;
with CDS_Invoice do
begin
First;
while not Eof do
begin
if Fieldbyname('Ssel').AsBoolean then
begin
ADOQueryCmd.append;
ADOQueryCmd.fieldbyname('SubId').Value := Trim(CDS_Invoice.fieldbyname('InvoiceNo').AsString);
ADOQueryCmd.fieldbyname('Dname').Value := Trim(DCode);
ADOQueryCmd.post;
end;
Next;
end;
end;
ADOQueryCmd.Connection.CommitTrans;
except
ADOQueryCmd.Connection.RollbackTrans;
end;
CDS_Invoice.EnableControls;
with ADOQueryPrint do
begin
Close;
sql.Clear;
sql.Add('exec P_View_FPTJ ' + quotedstr(Trim(DCode)));
Open;
end;
ExportFtErpFile('进项发票列表.rmf', ADOQueryTemp);
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\进项发票列表.rmf';
if FileExists(fPrintFile) then
begin
RM1.LoadFromFile(fPrintFile);
// RMVariables['SYRName']:=Trim(SYRName);
RM1.ShowReport;
end
else
begin
Application.MessageBox(PChar('没有找Report\进项发票列表.rmf'), '提示', 0);
end;
end;
procedure TfrmClaimsableList.ToolButton5Click(Sender: TObject);
begin
frmClaimsableInPut := TfrmClaimsableInPut.Create(self);
with frmClaimsableInPut do
begin
// IvNo.Enabled := False;
FFID := trim(Self.CDS_Invoice.fieldbyname('FFID').asstring);
PState := '复制';
if showmodal = 1 then
begin
Self.initGrid();
end;
free;
end;
end;
procedure TfrmClaimsableList.ToolButton6Click(Sender: TObject);
begin
try
frmHandPayableImport := TfrmHandPayableImport.Create(Application);
with frmHandPayableImport do
begin
// FCTID := Trim(Self.CDS_Tree.fieldbyname('CTID').AsString);
if ShowModal = 1 then
begin
Self.InitGrid();
end;
end;
finally
frmHandPayableImport.Free;
end;
end;
procedure TfrmClaimsableList.ToolButton7Click(Sender: TObject);
var
MFFIDS: string;
begin
if CDS_Invoice.IsEmpty then
exit;
if not CDS_Invoice.Locate('SSel', True, []) then
begin
application.MessageBox('请选择数据', '提示');
Exit;
end;
with CDS_Invoice do
begin
// DisableControls;
while CDS_Invoice.Locate('SSel', True, []) do
begin
MFFIDS := MFFIDS + Trim(CDS_Invoice.fieldbyname('FFID').AsString) + ',';
CDS_Invoice.Delete;
end;
// EnableControls;
end;
try
with ADOQueryCmd do
begin
close;
sql.Clear;
sql.add('update Finance_Flow set FChker=''' + trim(DName) + ''',FChktime=getdate(),status=''11'' ');
sql.add('where FFType=''索赔登记'' and EXISTS (select * from [dbo].[F_Tool_SplitString]( ''' + trim(MFFIDS) + '''');
sql.add(','','') X where X.RTValue=Finance_Flow.FFID) ');
// showmessage(sql.text);
execsql;
end;
application.MessageBox('复核成功', '提示');
// InitGrid();
CDS_Invoice.delete;
except
application.MessageBox('复核失败', '提示');
end;
end;
procedure TfrmClaimsableList.ToolButton8Click(Sender: TObject);
var
MFFIDS: string;
begin
if CDS_Invoice.IsEmpty then
exit;
if not CDS_Invoice.Locate('SSel', True, []) then
begin
application.MessageBox('请选择数据', '提示');
Exit;
end;
with CDS_Invoice do
begin
// DisableControls;
while CDS_Invoice.Locate('SSel', True, []) do
begin
MFFIDS := MFFIDS + Trim(CDS_Invoice.fieldbyname('FFID').AsString) + ',';
CDS_Invoice.Delete;
end;
// EnableControls;
end;
try
with ADOQueryCmd do
begin
close;
sql.Clear;
sql.add('update Finance_Flow set FChker=null,FChktime=null,status=''9'' ');
sql.add('where FFType=''索赔登记'' and EXISTS (select * from [dbo].[F_Tool_SplitString]( ''' + trim(MFFIDS) + '''');
sql.add(','','') X where X.RTValue=Finance_Flow.FFID) ');
execsql;
end;
application.MessageBox('撤销成功', '提示');
// CDS_Invoice.delete;
except
application.MessageBox('撤销失败', '提示');
end;
end;
procedure TfrmClaimsableList.ToolButton9Click(Sender: TObject);
var
WSql: string;
begin
if CDS_Invoice.IsEmpty then
Exit;
try
frmLabelPrint := TfrmLabelPrint.Create(Application);
with frmLabelPrint do
begin
FLMType := 'ClaimsPrint';
FFiltration1 := QuotedStr(Trim(Self.CDS_Invoice.fieldbyname('FFID').AsString));
if ShowModal = 1 then
begin
// Self.InitGrid();
end;
end;
finally
frmLabelPrint.Free;
end;
end;
procedure TfrmClaimsableList.v1Column14PropertiesEditValueChanged(Sender: TObject);
var
mvalue, FFieldName: string;
FQty, FPrice, FMoney, Ftax, FtaxMoney: double;
begin
FFieldName := Trim(Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName);
mvalue := TcxTextEdit(Sender).EditingText;
if Trim(mvalue) = '' then
begin
mvalue := '0';
end;
with CDS_Invoice do
begin
Edit;
FieldByName(FFieldName).Value := Trim(mvalue);
Post;
FQty := FieldbyName('Qty').AsFloat;
FtaxMoney := FieldbyName('taxMoney').AsFloat;
Ftax := FieldbyName('tax').AsFloat;
end;
if FQty <> 0 then
begin
FMoney := strtofloat(format('%.2f', [FtaxMoney / (1 + Ftax / 100)]));
FPrice := strtofloat(format('%.2f', [FMoney / FQty]));
end
else
begin
FPrice := 0;
FMoney := strtofloat(format('%.2f', [FtaxMoney / (1 + Ftax / 100)]));
end;
with CDS_Invoice do
begin
Edit;
FieldByName('Price').Value := FPrice;
FieldByName('Money').Value := FMoney;
FieldByName('TaxFee').Value := FtaxMoney - FMoney;
Post;
end;
tv1.Controller.EditingController.ShowEdit();
end;
end.

View File

@ -23,6 +23,7 @@ object frmFinFileUp: TfrmFinFileUp
Height = 554
Align = alClient
TabOrder = 0
ExplicitLeft = -3
object TV7: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
@ -122,6 +123,7 @@ object frmFinFileUp: TfrmFinFileUp
BevelInner = bvRaised
BevelOuter = bvLowered
TabOrder = 3
ExplicitTop = -6
object Label1: TLabel
Left = 8
Top = 15

View File

@ -0,0 +1,274 @@
object frmFtyFileUp: TfrmFtyFileUp
Left = 612
Top = 236
Caption = #19978#20256#25991#20214
ClientHeight = 595
ClientWidth = 929
Color = clBtnFace
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
OldCreateOrder = False
Position = poMainFormCenter
OnCreate = FormCreate
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 12
object cxGrid7: TcxGrid
Left = 0
Top = 41
Width = 858
Height = 554
Align = alClient
TabOrder = 0
ExplicitLeft = -3
object TV7: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
OnCellDblClick = TV7CellDblClick
DataController.DataSource = DataSource1
DataController.Summary.DefaultGroupSummaryItems = <>
DataController.Summary.FooterSummaryItems = <>
DataController.Summary.SummaryGroups = <>
OptionsBehavior.GoToNextCellOnEnter = True
OptionsBehavior.FocusCellOnCycle = True
OptionsCustomize.ColumnFiltering = False
OptionsData.Editing = False
OptionsView.GroupByBox = False
OptionsView.Indicator = True
object FileName: TcxGridDBColumn
Tag = 1
Caption = #25991#20214#21517#31216
DataBinding.FieldName = 'FileName'
DataBinding.IsNullValueType = True
FooterAlignmentHorz = taCenter
HeaderAlignmentHorz = taCenter
Width = 121
end
object TV7Column1: TcxGridDBColumn
Caption = #33457#22411#21517#31216
DataBinding.FieldName = 'HXName'
DataBinding.IsNullValueType = True
Visible = False
GroupSummaryAlignment = taCenter
HeaderAlignmentHorz = taCenter
Width = 91
end
object FileDate: TcxGridDBColumn
Tag = 1
Caption = #19978#20256#26085#26399
DataBinding.FieldName = 'TFDate'
DataBinding.IsNullValueType = True
FooterAlignmentHorz = taCenter
HeaderAlignmentHorz = taCenter
Width = 104
end
end
object cxGridLevel6: TcxGridLevel
GridView = TV7
end
end
object Panel16: TPanel
Left = 190
Top = 126
Width = 138
Height = 30
BevelInner = bvRaised
Caption = #27491#22312#19978#20256#12290#12290#12290
Color = clSkyBlue
TabOrder = 1
Visible = False
end
object ToolBar6: TToolBar
Left = 858
Top = 41
Width = 71
Height = 554
Align = alRight
AutoSize = True
ButtonHeight = 38
ButtonWidth = 75
Caption = 'ToolBar1'
Images = DataLink_Financial.ImageList_new32
List = True
ShowCaptions = True
TabOrder = 2
ExplicitLeft = 889
object FileUp: TToolButton
Left = 0
Top = 0
AutoSize = True
Caption = #19978#20256
ImageIndex = 2
Wrap = True
OnClick = FileUpClick
end
object FileDel: TToolButton
Left = 0
Top = 38
AutoSize = True
Caption = #21024#38500
ImageIndex = 5
Wrap = True
OnClick = FileDelClick
end
end
object Panel1: TPanel
Left = 0
Top = 0
Width = 929
Height = 41
Align = alTop
BevelInner = bvRaised
BevelOuter = bvLowered
TabOrder = 3
object Label1: TLabel
Left = 8
Top = 15
Width = 90
Height = 17
Caption = #20379#24212#21830#32534#21495
Font.Charset = GB2312_CHARSET
Font.Color = clRed
Font.Height = -17
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Image2: TImage
Left = 774
Top = 7
Width = 60
Height = 28
Visible = False
end
object Image1: TImage
Left = 861
Top = 7
Width = 60
Height = 28
Visible = False
end
object Label2: TLabel
Left = 336
Top = 14
Width = 36
Height = 17
Caption = #33457#22411
Font.Charset = GB2312_CHARSET
Font.Color = clRed
Font.Height = -17
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
Visible = False
end
object Code: TEdit
Left = 104
Top = 10
Width = 211
Height = 25
Font.Charset = GB2312_CHARSET
Font.Color = clBlue
Font.Height = -17
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
ReadOnly = True
TabOrder = 0
end
object HXName: TBtnEditC
Tag = 2
Left = 378
Top = 9
Width = 168
Height = 29
Hint = 'CYKZ/'#20811#37325
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -20
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 1
Visible = False
OnBtnUpClick = HXNameBtnUpClick
OnBtnDnClick = HXNameBtnDnClick
end
end
object ODPat: TOpenDialog
Filter =
'All (*.svg;*.jpg;*.jpeg;*.gif;*.tif;*.tiff;*.png;*.gif;*.jpg;*.j' +
'peg;*.png;*.bmp;*.ico;*.emf;*.wmf;*.tif;*.tiff)|*.svg;*.jpg;*.jp' +
'eg;*.gif;*.tif;*.tiff;*.png;*.gif;*.jpg;*.jpeg;*.png;*.bmp;*.ico' +
';*.emf;*.wmf;*.tif;*.tiff|SVG graphics from DevExpress (*.svg)|*' +
'.svg|JPEG graphics from DevExpress (*.jpg)|*.jpg|JPEG graphics f' +
'rom DevExpress (*.jpeg)|*.jpeg|GIF graphics from DevExpress (*.g' +
'if)|*.gif|TIFF graphics from DevExpress (*.tif)|*.tif|TIFF graph' +
'ics from DevExpress (*.tiff)|*.tiff|PNG graphics from DevExpress' +
' (*.png)|*.png|GIF Image (*.gif)|*.gif|JPEG Image File (*.jpg)|*' +
'.jpg|JPEG Image File (*.jpeg)|*.jpeg|Portable Network Graphics (' +
'*.png)|*.png|Bitmaps (*.bmp)|*.bmp|Icons (*.ico)|*.ico|Enhanced ' +
'Metafiles (*.emf)|*.emf|Metafiles (*.wmf)|*.wmf|TIFF Images (*.t' +
'if)|*.tif|TIFF Images (*.tiff)|*.tiff'
Options = [ofHideReadOnly, ofAllowMultiSelect, ofEnableSizing]
Left = 380
Top = 333
end
object IdFTP1: TIdFTP
ConnectTimeout = 0
NATKeepAlive.UseKeepAlive = False
NATKeepAlive.IdleTimeMS = 0
NATKeepAlive.IntervalMS = 0
ProxySettings.ProxyType = fpcmNone
ProxySettings.Port = 0
ReadTimeout = 0
Left = 261
Top = 244
end
object SaveDialog1: TSaveDialog
Filter =
'All (*.svg;*.jpg;*.jpeg;*.gif;*.tif;*.tiff;*.png;*.gif;*.jpg;*.j' +
'peg;*.png;*.bmp;*.ico;*.emf;*.wmf;*.tif;*.tiff)|*.svg;*.jpg;*.jp' +
'eg;*.gif;*.tif;*.tiff;*.png;*.gif;*.jpg;*.jpeg;*.png;*.bmp;*.ico' +
';*.emf;*.wmf;*.tif;*.tiff|SVG graphics from DevExpress (*.svg)|*' +
'.svg|JPEG graphics from DevExpress (*.jpg)|*.jpg|JPEG graphics f' +
'rom DevExpress (*.jpeg)|*.jpeg|GIF graphics from DevExpress (*.g' +
'if)|*.gif|TIFF graphics from DevExpress (*.tif)|*.tif|TIFF graph' +
'ics from DevExpress (*.tiff)|*.tiff|PNG graphics from DevExpress' +
' (*.png)|*.png|GIF Image (*.gif)|*.gif|JPEG Image File (*.jpg)|*' +
'.jpg|JPEG Image File (*.jpeg)|*.jpeg|Portable Network Graphics (' +
'*.png)|*.png|Bitmaps (*.bmp)|*.bmp|Icons (*.ico)|*.ico|Enhanced ' +
'Metafiles (*.emf)|*.emf|Metafiles (*.wmf)|*.wmf|TIFF Images (*.t' +
'if)|*.tif|TIFF Images (*.tiff)|*.tiff'
Left = 305
Top = 333
end
object ADOQueryFile: TADOQuery
Connection = DataLink_Financial.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 488
Top = 144
end
object DataSource1: TDataSource
DataSet = ADOQueryFile
Left = 376
Top = 136
end
object ADOQueryCmd: TADOQuery
Connection = DataLink_Financial.ADOLink
Parameters = <>
Left = 584
Top = 256
end
object ADOQueryTemp: TADOQuery
Connection = DataLink_Financial.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 432
Top = 224
end
end

View File

@ -0,0 +1,425 @@
unit U_FtyFileUp;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
cxEdit, DB, cxDBData, ComCtrls, ToolWin, ExtCtrls, cxGridLevel,
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
cxControls, cxGridCustomView, cxGrid, IdBaseComponent, IdComponent,
IdTCPConnection, IdTCPClient, IdFTP, StdCtrls, ADODB, jpeg, BtnEdit, IniFiles,
strutils, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxSkinsCore,
dxSkinsDefaultPainters, dxDateRanges, IdExplicitTLSClientServerBase,
Vcl.ExtDlgs, dxSkinWXI, dxScrollbarAnnotations, ShellAPI;
type
TfrmFtyFileUp = class(TForm)
cxGrid7: TcxGrid;
TV7: TcxGridDBTableView;
FileName: TcxGridDBColumn;
FileDate: TcxGridDBColumn;
cxGridLevel6: TcxGridLevel;
Panel16: TPanel;
ToolBar6: TToolBar;
FileUp: TToolButton;
FileDel: TToolButton;
Panel1: TPanel;
Label1: TLabel;
Code: TEdit;
ODPat: TOpenDialog;
IdFTP1: TIdFTP;
SaveDialog1: TSaveDialog;
ADOQueryFile: TADOQuery;
DataSource1: TDataSource;
ADOQueryCmd: TADOQuery;
ADOQueryTemp: TADOQuery;
Image2: TImage;
Image1: TImage;
TV7Column1: TcxGridDBColumn;
Label2: TLabel;
HXName: TBtnEditC;
procedure FileUpClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FileDelClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure HXNameBtnUpClick(Sender: TObject);
procedure HXNameBtnDnClick(Sender: TObject);
procedure TV7CellDblClick(Sender: TcxCustomGridTableView;
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
AShift: TShiftState; var AHandled: Boolean);
private
lstPat: TStringList;
AJpeg: TJPEGImage;
procedure CreThumb(Image1, Image2: TImage; Width, Height: Integer);
procedure SaveImageOther(FTFID: string);
procedure ReadINIFile10();
procedure InitTP();
{ Private declarations }
public
FBCIID: string;
FWidth, FHeight:Integer
{ Public declarations }
end;
var
frmFtyFileUp: TfrmFtyFileUp;
implementation
uses
U_DataLink, U_RTFun, U_ZDYHelp;
{$R *.dfm} procedure TfrmFtyFileUp.InitTP();
begin
with ADOQueryFile do
begin
Close;
SQL.Clear;
SQL.Add('select TFID,WBID,TFDate,Files,Filler,FillTime,FileName,HXName from TP_File where WBID=''' + Trim(FBCIID) + '''');
SQL.Add(' and FileType=''GYS''');
Open;
end;
end;
procedure TfrmFtyFileUp.ReadINIFile10();
var
programIni: Tinifile; //配置文件名
FileName: string;
begin
FileName := ExtractFilePath(Paramstr(0)) + 'SYSTEMSET.INI';
programIni := Tinifile.create(FileName);
server := programIni.ReadString('SERVER', '服务器地址', '127.0.0.1');
programIni.Free;
end;
procedure TfrmFtyFileUp.FileUpClick(Sender: TObject);
var
i, j, ii: Integer;
PatFile: string;
FTPPath, FConNo, MaxNo: string;
AJpeg: TJPEGImage;
myStream: TADOBlobStream;
f: file of Byte;
size: Longint;
S: Double;
begin
if Trim(Code.Text) = '' then
begin
Application.MessageBox('编号不能为空!', '提示', 0);
Exit;
end;
// if Trim(HXName.Text) = '' then
// begin
// if Application.MessageBox('花型确认为空吗?', '提示', 32 + 4) <> IDYES then
// Exit;
// end;
lstPat.Clear;
if ODPat.Execute then
begin
lstPat.AddStrings(ODPat.Files);
end;
if lstPat.Count > 0 then
begin
try
IdFTP1.Host := PicSvr;
IdFTP1.Username := 'three';
IdFTP1.Password := '641010';
IdFTP1.Connect();
except
IdFTP1.Quit;
Application.MessageBox('无法连接到文件服务器,请检查!', '提示', MB_ICONWARNING);
Exit;
end;
end;
Panel16.Visible := True;
Panel16.Refresh;
try
AJpeg := TJpegImage.Create();
ADOQueryCmd.Connection.BeginTrans;
ii := 0;
for i := 0 to lstPat.Count - 1 do
begin
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.Add('select isnull(max(abs(cast(right(left(FileName,charindex(''.'',FileName)-1),2) as int))),0)+1 as BH from TP_File');
sql.Add('where FileType =''GYS'' and WBID=''' + trim(FBCIID) + ''' ');
open;
end;
PatFile := trim(FBCIID) + '-' + inttostr(ADOQueryTemp.fieldbyname('BH').AsInteger) + '.' + Copy(ExtractFileName(lstPat[i]), (Pos('.', ExtractFileName(lstPat[i])) + 1), (Length(ExtractFileName(lstPat[i])) - Pos('.', ExtractFileName(lstPat[i]))));
image1.Picture.LoadFromFile((lstPat[i]));
CreThumb(Image1, Image2, FWidth, FHeight);
if IdFTP1.Connected then
begin
try
IdFTP1.Put(lstPat[i], Trim(UserDataFlag + 'YP' + '\' + Trim(PatFile)));
if GetLSNo(ADOQueryCmd, MaxNo, 'YP', 'XD_File', 4, 1) = False then
raise Exception.Create('取图片最大号失败!');
with ADOQueryCmd do
begin
close;
sql.Clear;
sql.Add(' select * from TP_File where TFID=''' + Trim(MaxNo) + '''');
open;
end;
with ADOQueryCmd do
begin
if ADOQueryCmd.IsEmpty then
begin
Append;
FieldByName('Filler').Value := Trim(DName);
FieldByName('TFDate').Value := SGetServerDateTime(ADOQueryTemp);
end
else
begin
Edit;
FieldByName('Editer').Value := Trim(DName);
FieldByName('EditTime').Value := SGetServerDateTime(ADOQueryTemp);
end;
FieldByName('TFID').Value := Trim(MaxNo);
FieldByName('WBID').Value := Trim(FBCIID);
FieldByName('TFType').Value := '供应商';
FieldByName('FileType').Value := 'GYS';
FieldByName('HXName').Value := trim(HXName.Text);
FieldByName('filename').Value := Trim(PatFile);
myStream := TADOBlobStream.Create(TBlobField(ADOQueryCmd.FieldByName('FilesOther')), bmWrite);
AJpeg.Assign(Image2.Picture.Graphic);
AJpeg.SaveToStream(myStream);
myStream.Free;
Post;
end;
except
raise Exception.Create('上传图片失败!');
end;
end;
end;
ADOQueryCmd.Connection.CommitTrans;
AJpeg.Free;
except
AJpeg.Free;
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('图片上传失败!', '提示', 0);
end;
if IdFTP1.Connected then
IdFTP1.Quit;
InitTP();
Panel16.Visible := False;
if ii > 0 then
Application.MessageBox(PChar(inttostr(ii) + '个文件大于2MB上传失败'), '提示', 0);
if i > 0 then
Application.MessageBox(PChar(inttostr(i-ii) + '个文件上传成功!'), '提示', 0);
ModalResult := 1;
end;
procedure TfrmFtyFileUp.CreThumb(Image1, Image2: TImage; Width, Height: Integer);
var
Bitmap: TBitmap;
Ratio: Double;
ARect: TRect;
AHeight, AHeightOffset: Integer;
AWidth, AWidthOffset: Integer;
begin
Bitmap := TBitmap.Create;
try
Ratio := Image1.Picture.Graphic.Width / Image1.Picture.Graphic.Height;
if Ratio > 1.333 then
begin
AHeight := Round(Width / Ratio);
AHeightOffset := (Height - AHeight) div 2;
AWidth := Width;
AWidthOffset := 0;
end
else
begin
AWidth := Round(Height * Ratio);
AWidthOffset := (Width - AWidth) div 2;
AHeight := Height;
AHeightOffset := 0;
end;
Bitmap.Width := Width;
Bitmap.Height := Height;
Bitmap.Canvas.Brush.Color := clBtnFace;
Bitmap.Canvas.FillRect(Rect(0, 0, Width, Height));
ARect := Rect(AWidthOffset, AHeightOffset, AWidth + AWidthOffset, AHeight + AHeightOffset);
Bitmap.Canvas.StretchDraw(ARect, Image1.Picture.Graphic);
Image2.Picture.Assign(Bitmap);
finally
Bitmap.Free;
end;
end;
procedure TfrmFtyFileUp.SaveImageOther(FTFID: string);
var
AJpeg: TJPEGImage;
myStream: TADOBlobStream;
ImgMaxNo: string;
i, j: Integer;
PatFile: string;
FConNo, MaxNo: string;
begin
if Image2.Picture = nil then
Exit;
AJpeg := TJpegImage.Create();
with ADOQueryCmd do
begin
close;
sql.Clear;
sql.Add(' select * from TP_File where TFID=''' + Trim(FTFID) + '''');
open;
end;
with ADOQueryCmd do
begin
if Trim(FTFID) = '' then
begin
Append;
FieldByName('Filler').Value := Trim(DName);
end
else
begin
Edit;
FieldByName('Editer').Value := Trim(DName);
FieldByName('EditTime').Value := SGetServerDateTime(ADOQueryTemp);
end;
FieldByName('TFID').Value := Trim(FTFID);
FieldByName('WBID').Value := Trim(FBCIID);
FieldByName('TFType').Value := '样品';
AJpeg.Assign(Image2.Picture.Graphic);
myStream := TADOBlobStream.Create(TBlobField(ADOQueryCmd.FieldByName('FilesOther')), bmWrite);
AJpeg.Assign(Image2.Picture.Graphic);
AJpeg.SaveToStream(myStream);
myStream.Free;
Post;
end;
end;
procedure TfrmFtyFileUp.TV7CellDblClick(Sender: TcxCustomGridTableView;
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
AShift: TShiftState; var AHandled: Boolean);
var
IdFTP1: TIdFTP;
FPath, FFName, FileName: string;
FInt: integer;
begin
FileName := ADOQueryFile.FieldByName('FileName').AsString;
try
IdFTP1 := TIdFTP.Create(self);
IdFTP1.Host := PicSvr;
IdFTP1.Username := 'three';
IdFTP1.Password := '641010';
IdFTP1.Connect();
except
IdFTP1.Quit;
IdFTP1.Free;
Application.MessageBox('无法连接到文件服务器,请检查!', '提示', MB_ICONWARNING);
Exit;
end;
FPath := 'D:\Right1209\';
if not DirectoryExists(ExtractFileDir(FPath)) then
CreateDir(ExtractFileDir(FPath));
FFName := Trim(FileName);
FFName := FPath + FFName;
if FileExists(FFName) then
begin
FInt := 1;
end;
if FInt <> 1 then
IdFTP1.Get(UserDataFlag + 'YP\' + FileName, pchar(FFName));
if IdFTP1.Connected then
begin
IdFTP1.Quit;
IdFTP1.Free;
end;
ShellExecute(Handle, 'open', PChar(FFName), '', '', SW_SHOWNORMAL);
end;
procedure TfrmFtyFileUp.FormCreate(Sender: TObject);
begin
lstPat := TStringList.Create;
if FWidth = 0 then
FWidth := 160;
if FHeight = 0 then
FHeight := 120;
end;
procedure TfrmFtyFileUp.FileDelClick(Sender: TObject);
begin
with ADOQueryCmd do
begin
Close;
sql.Clear;
SQL.Add(' Delete TP_File where TFID=''' + Trim(ADOQueryFile.fieldbyname('TFID').AsString) + '''');
ExecSQL;
end;
with ADOQueryFile do
begin
Close;
SQL.Clear;
SQL.Add('select TFID,WBID,TFDate,Files,Filler,FillTime,FileName from TP_File where WBID=''' + Trim(FBCIID) + '''');
SQL.Add(' and FileType=''GYS''');
Open;
end;
// if ADOQueryFile.IsEmpty then
// begin
// with ADOQueryCmd do
// begin
// Close;
// sql.Clear;
// sql.Add('Update CP_YDang Set TPFlag=0 where FBCIID=''' + Trim(FBCIID) + '''');
// ExecSQL;
// end;
// end;
end;
procedure TfrmFtyFileUp.FormShow(Sender: TObject);
begin
with ADOQueryFile do
begin
Close;
SQL.Clear;
SQL.Add('select TFID,WBID,TFDate,Files,Filler,FillTime,FileName from TP_File where WBID=''' + Trim(FBCIID) + '''');
SQL.Add(' and FileType=''GYS''');
Open;
end;
end;
procedure TfrmFtyFileUp.HXNameBtnDnClick(Sender: TObject);
begin
TBtnEditC(Sender).Text := '';
TBtnEditC(Sender).TxtCode := '';
end;
procedure TfrmFtyFileUp.HXNameBtnUpClick(Sender: TObject);
begin
try
frmZDYHelp := TfrmZDYHelp.Create(Application);
with frmZDYHelp do
begin
flag := 'HX' + Trim(Code.Text);
flagname := '花型';
if ShowModal = 1 then
begin
TEdit(Sender).Text := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
end;
end;
finally
frmZDYHelp.Free;
end;
end;
end.

View File

@ -18,7 +18,7 @@ uses
U_DataLink, U_iniParam, U_ReceivableList, U_CollectList, U_InvoiceOutList,
U_CustStatement, U_CustStatementWriteOff, U_BankFlowList, U_BankFlowTotalList,
U_PayableList, U_PayList, U_FtyStatement, U_InvoiceInList, U_ExpenseList,
U_OtherPayableList,U_handPayableList;
U_OtherPayableList,U_handPayableList,U_ClaimsableList;
/////////////////////////////////////////////////////////////////
// 功能说明:取Dll中得窗体 //
@ -223,6 +223,18 @@ begin
end;
end;
217: //手工费用登记
begin
with TfrmClaimsableList.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10)) do //
begin
fFormID := FormID;
FormStyle := mstyle;
WindowState := mstate;
BorderStyle := mborderstyle;
mnewHandle := Handle;
end;
end;
221: //付款登记
begin
with TfrmPayList.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10)) do //

View File

@ -25,7 +25,7 @@ object frmPayInput: TfrmPayInput
Height = 38
AutoSize = True
ButtonHeight = 38
ButtonWidth = 91
ButtonWidth = 115
Caption = 'ToolBar1'
Color = clWhite
DisabledImages = DataLink_Financial.ImageList_new32
@ -58,6 +58,14 @@ object frmPayInput: TfrmPayInput
ImageIndex = 8
OnClick = ToolButton1Click
end
object ToolButton2: TToolButton
Left = 237
Top = 0
AutoSize = True
Caption = #23545#26041#21333#20301#22270#29255
ImageIndex = 8
OnClick = ToolButton2Click
end
end
object ScrollBox1: TScrollBox
Left = 0

View File

@ -57,6 +57,7 @@ type
ToolButton1: TToolButton;
RegType: TComboBox;
Label6: TLabel;
ToolButton2: TToolButton;
procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBCloseClick(Sender: TObject);
@ -73,6 +74,7 @@ type
procedure FFAbstractDLBtnUpClick(Sender: TObject);
procedure OrderNoBtnUpClick(Sender: TObject);
procedure ToolButton1Click(Sender: TObject);
procedure ToolButton2Click(Sender: TObject);
private
{ Private declarations }
procedure InitGrid();
@ -89,7 +91,7 @@ implementation
uses
U_DataLink, U_RTFun, U_ZDYHelp, U_CompanySel, U_BankSel, U_ZDYHelpFY,
U_TradePlanSel, U_FinFileUp;
U_TradePlanSel, U_FinFileUp, U_FtyFileUp;
{$R *.dfm}
@ -457,6 +459,32 @@ begin
end;
end;
procedure TfrmPayInput.ToolButton2Click(Sender: TObject);
begin
try
frmFtyFileUp := TfrmFtyFileUp.Create(Application);
with frmFtyFileUp do
begin
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.Add(' select * from BS_Company where CoCode=' + quotedstr(Trim(OppCoName.TxtCode)));
Open;
end;
Code.Text := self.OppCoName.TxtCode;
FBCIID := Trim(ADOQueryTemp.fieldbyname('CoID').AsString);
if ShowModal = 1 then
begin
Self.InitGrid();
// Self.CDS_1.Locate('BCIID', BCIID, []);
end;
end;
finally
frmFtyFileUp.Free;
end;
end;
procedure TfrmPayInput.ToolButton3Click(Sender: TObject);
begin
ToolBar1.SetFocus;

View File

@ -18,7 +18,6 @@ uses
U_WindowFormdesign in '..\..\..\public10\design\U_WindowFormdesign.pas',
U_CompressionFun in '..\..\..\public10\ThreeFun\Fun\U_CompressionFun.pas',
U_RTFun in '..\..\..\public10\ThreeFun\Fun\U_RTFun.pas',
U_ZDYHelp in '..\..\..\public10\ThreeFun\Form\U_ZDYHelp.pas' {frmZDYHelp},
U_ClothInfoSel in '..\A00通用窗体\U_ClothInfoSel.pas' {frmClothInfoSel},
U_CompanySel in '..\A00通用窗体\U_CompanySel.pas' {frmCompanySel},
U_PictureUpload in '..\A00通用窗体\U_PictureUpload.pas' {frmPictureUpload},
@ -30,7 +29,10 @@ uses
U_ContractList in 'U_ContractList.pas' {frmContractList},
U_BaoguanList in 'U_BaoguanList.pas' {frmBaoguanList},
U_BaoguanInPut in 'U_BaoguanInPut.pas' {frmBaoguanInPut},
U_BaseDataLink in '..\..\..\public10\design\U_BaseDataLink.pas' {BaseDataLink: TDataModule};
U_BaseDataLink in '..\..\..\public10\design\U_BaseDataLink.pas' {BaseDataLink: TDataModule},
U_ZDYHelp_Img in 'U_ZDYHelp_Img.pas' {frmZDYHelp_Img},
U_ZDYHelp in '..\..\..\public10\ThreeFun\Form\U_ZDYHelp.pas' {frmZDYHelp},
U_QMFileUp in 'U_QMFileUp.pas' {frmQMFileUp};
{$R *.res}

View File

@ -153,10 +153,6 @@
<DCCReference Include="..\..\..\public10\design\U_WindowFormdesign.pas"/>
<DCCReference Include="..\..\..\public10\ThreeFun\Fun\U_CompressionFun.pas"/>
<DCCReference Include="..\..\..\public10\ThreeFun\Fun\U_RTFun.pas"/>
<DCCReference Include="..\..\..\public10\ThreeFun\Form\U_ZDYHelp.pas">
<Form>frmZDYHelp</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="..\A00通用窗体\U_ClothInfoSel.pas">
<Form>frmClothInfoSel</Form>
<FormType>dfm</FormType>
@ -206,6 +202,18 @@
<FormType>dfm</FormType>
<DesignClass>TDataModule</DesignClass>
</DCCReference>
<DCCReference Include="U_ZDYHelp_Img.pas">
<Form>frmZDYHelp_Img</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="..\..\..\public10\ThreeFun\Form\U_ZDYHelp.pas">
<Form>frmZDYHelp</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="U_QMFileUp.pas">
<Form>frmQMFileUp</Form>
<FormType>dfm</FormType>
</DCCReference>
<BuildConfiguration Include="Debug">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>

View File

@ -1,72 +1,78 @@
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<Transactions>
<Transaction>1899-12-30 00:00:00.000.048,=D:\Dp10Repo\public10\design\U_BaseList.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.074,D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnPurchasePlanPut.dfm=D:\Dp10Repo\项目代码\RTBasics\B01基础合同管理\U_SalesConInPut.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.359,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\PictureUpload.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.620,D:\Dp10Repo\项目代码\RTBasics\B01基础合同管理1\Contract.dproj=D:\Dp10Repo\项目代码\RTBasics\B01基础合同管理1\InformationBase.dproj</Transaction>
<Transaction>1899-12-30 00:00:00.000.009,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelMapSet.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LableMapSet.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.929,=D:\Dp10Repo\项目代码\D10myBiaoqi\B01基础合同管理\U_BGZFileUp.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.709,D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnPurchasePlanPut.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.939,=D:\Dp10Repo\public10\design\U_BaseInput.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.217,=D:\Dp10Repo\项目代码\骉骐\B01基础合同管理\U_SalesConInPutCopy.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.135,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ZDYHelp.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.048,=D:\Dp10Repo\public10\design\U_BaseList.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.844,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_AttachmentUpload.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.950,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_AttachmentUpload.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.556,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_AttachmentUpload.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.444,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LbaelMapSet.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.975,=D:\Dp10Repo\public10\ThreeFun\Fun\U_CompressionFun.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.621,D:\Dp10Repo\项目代码\D10myBiaoqi\B01基础合同管理\U_ZDYHelp_Img.pas=D:\Dp10Repo\public10\ThreeFun\Form\U_ZDYHelp.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.620,D:\Dp10Repo\项目代码\RTBasics\B01基础合同管理1\Contract.dproj=D:\Dp10Repo\项目代码\RTBasics\B01基础合同管理1\InformationBase.dproj</Transaction>
<Transaction>1899-12-30 00:00:00.000.009,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelMapSet.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LableMapSet.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.114,=D:\Dp10Repo\项目代码\骉骐\B01基础合同管理\U_ContractList.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.832,=D:\Dp10Repo\public10\design\U_BaseHelp.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.074,D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnPurchasePlanPut.dfm=D:\Dp10Repo\项目代码\RTBasics\B01基础合同管理\U_SalesConInPut.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.844,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_AttachmentUpload.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.709,D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnPurchasePlanPut.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.872,=D:\Dp10Repo\public10\design\U_BaseDataLink.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.806,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LableMapSet.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LbaelMapSet.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.634,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelPrint.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.149,=D:\Dp10Repo\public10\ThreeFun\Form\U_ZDYHelp.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.526,=D:\Dp10Repo\项目代码\RTBasics\B01基础合同管理\U_SalesContractList.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.695,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_UserSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.621,D:\Dp10Repo\项目代码\D10myBiaoqi\B01基础合同管理\U_ZDYHelp_Img.dfm=D:\Dp10Repo\public10\ThreeFun\Form\U_ZDYHelp.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.564,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.325,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.339,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.272,D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnPurchasePlanList.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.806,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LableMapSet.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LbaelMapSet.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.700,D:\Dp10Repo\项目代码\D10myBiaoqi\B01基础合同管理\U_QMFileUp.pas=D:\Dp10Repo\项目代码\D10myBiaoqi\B01基础合同管理\U_BGZFileUp.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.074,D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnPurchasePlanPut.pas=D:\Dp10Repo\项目代码\RTBasics\B01基础合同管理\U_SalesConInPut.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.695,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_UserSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.526,=D:\Dp10Repo\项目代码\RTBasics\B01基础合同管理\U_SalesContractList.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.493,=D:\Dp10Repo\项目代码\RTBasics\A00通用模板\Unit1.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.149,=D:\Dp10Repo\public10\ThreeFun\Form\U_ZDYHelp.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.345,=D:\Dp10Repo\public10\ThreeFun\Form\U_ZDYHelp.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.726,D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnPurchasePlanList.pas=D:\Dp10Repo\项目代码\RTBasics\B01基础合同管理\U_SalesContractList.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.875,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_PictureUpload.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\PictureUpload.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.272,D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnPurchasePlanList.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.726,D:\Dp10Repo\项目代码\RTBasics\B02基础纱线仓库\U_YarnPurchasePlanList.dfm=D:\Dp10Repo\项目代码\RTBasics\B01基础合同管理\U_SalesContractList.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.736,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ModuleNote.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.178,=D:\Dp10Repo\public10\design\U_WindowFormdesign.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.123,=D:\Dp10Repo\public10\design\U_globalVar.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.875,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_PictureUpload.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\PictureUpload.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.519,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_PictureUpload.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.242,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_PictureUpload.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.582,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_PictureUpload.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.520,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_PictureUpload.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.519,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_PictureUpload.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.348,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelMapSet.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.428,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelMapSet.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.522,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelMapSet.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.009,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelMapSet.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LableMapSet.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.123,=D:\Dp10Repo\public10\design\U_globalVar.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.700,D:\Dp10Repo\项目代码\D10myBiaoqi\B01基础合同管理\U_QMFileUp.dfm=D:\Dp10Repo\项目代码\D10myBiaoqi\B01基础合同管理\U_BGZFileUp.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.348,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelMapSet.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.024,=D:\Dp10Repo\项目代码\RTBasics\B01基础合同管理\U_SalesConInPut.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.086,=D:\Dp10Repo\public10\design\U_cxGridCustomCss.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.015,=D:\Dp10Repo\public10\ThreeFun\Fun\U_RTFun.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.067,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelPrint.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.603,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelPrint.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.634,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelPrint.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.634,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelPrint.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.425,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelPrint.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.067,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelPrint.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.603,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelPrint.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.875,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_PictureUpload.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\PictureUpload.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.975,=D:\Dp10Repo\public10\ThreeFun\Fun\U_CompressionFun.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.487,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ZDYHelpSel.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.716,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ProcessSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.609,=D:\Dp10Repo\项目代码\D10myBiaoqi\B01基础合同管理\U_BaoguanList.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.875,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_PictureUpload.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\PictureUpload.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.441,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.569,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.734,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.630,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.422,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.441,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.575,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_EmployeeSel.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.092,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_EmployeeSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.322,=D:\Dp10Repo\项目代码\D10myBiaoqi\B01基础合同管理\U_BaoguanInPut.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.630,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.569,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas=</Transaction>
</Transactions>
<ProjectSortOrder AutoSort="0" SortType="0">
<File Path="android-support-v4.dex.jar"/>
@ -99,23 +105,25 @@
<File Path="google-play-licensing.dex.jar"/>
<File Path="..\..\D10myBiaoqi"/>
<File Path="..\A00通用窗体"/>
<File Path="..\A00通用窗体\U_LabelMapSet.pas"/>
<File Path="..\A00通用窗体\U_LabelMapSet.dfm"/>
<File Path="..\A00通用窗体\U_AttachmentUpload.pas"/>
<File Path="..\A00通用窗体\U_AttachmentUpload.dfm"/>
<File Path="..\A00通用窗体\U_ClothInfoSel.pas"/>
<File Path="..\A00通用窗体\U_ClothInfoSel.dfm"/>
<File Path="..\A00通用窗体\U_CompanySel.pas"/>
<File Path="..\A00通用窗体\U_CompanySel.dfm"/>
<File Path="..\A00通用窗体\U_LabelMapSet.pas"/>
<File Path="..\A00通用窗体\U_LabelMapSet.dfm"/>
<File Path="..\A00通用窗体\U_LabelPrint.pas"/>
<File Path="..\A00通用窗体\U_LabelPrint.dfm"/>
<File Path="..\A00通用窗体\U_PictureUpload.pas"/>
<File Path="..\A00通用窗体\U_PictureUpload.dfm"/>
<File Path="..\A00通用窗体\U_UserSel.pas"/>
<File Path="..\A00通用窗体\U_UserSel.dfm"/>
<File Path="..\A00通用窗体\U_AttachmentUpload.pas"/>
<File Path="..\A00通用窗体\U_AttachmentUpload.dfm"/>
<File Path="..\A00通用窗体\U_LabelPrint.pas"/>
<File Path="..\A00通用窗体\U_LabelPrint.dfm"/>
<File Path="D:\Dp10Repo"/>
<File Path="..\..\..\public10"/>
<File Path="..\..\..\public10\design"/>
<File Path="..\..\..\public10\design\U_BaseDataLink.pas"/>
<File Path="..\..\..\public10\design\U_BaseDataLink.dfm"/>
<File Path="..\..\..\public10\design\U_BaseHelp.pas"/>
<File Path="..\..\..\public10\design\U_BaseHelp.dfm"/>
<File Path="..\..\..\public10\design\U_BaseInput.pas"/>
@ -125,8 +133,6 @@
<File Path="..\..\..\public10\design\U_cxGridCustomCss.pas"/>
<File Path="..\..\..\public10\design\U_globalVar.pas"/>
<File Path="..\..\..\public10\design\U_WindowFormdesign.pas"/>
<File Path="..\..\..\public10\design\U_BaseDataLink.pas"/>
<File Path="..\..\..\public10\design\U_BaseDataLink.dfm"/>
<File Path="..\..\..\public10\ThreeFun"/>
<File Path="..\..\..\public10\ThreeFun\Form"/>
<File Path="..\..\..\public10\ThreeFun\Form\U_ZDYHelp.pas"/>
@ -146,5 +152,9 @@
<File Path="U_BaoguanList.dfm"/>
<File Path="U_BaoguanInPut.pas"/>
<File Path="U_BaoguanInPut.dfm"/>
<File Path="U_ZDYHelp_Img.pas"/>
<File Path="U_ZDYHelp_Img.dfm"/>
<File Path="U_QMFileUp.pas"/>
<File Path="U_QMFileUp.dfm"/>
</ProjectSortOrder>
</BorlandProject>

View File

@ -0,0 +1,274 @@
object frmBGZFileUp: TfrmBGZFileUp
Left = 612
Top = 236
Caption = #19978#20256#25991#20214
ClientHeight = 595
ClientWidth = 929
Color = clBtnFace
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
OldCreateOrder = False
Position = poMainFormCenter
OnCreate = FormCreate
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 12
object cxGrid7: TcxGrid
Left = 0
Top = 41
Width = 858
Height = 554
Align = alClient
TabOrder = 0
object TV7: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
OnCellDblClick = TV7CellDblClick
DataController.DataSource = DataSource1
DataController.Summary.DefaultGroupSummaryItems = <>
DataController.Summary.FooterSummaryItems = <>
DataController.Summary.SummaryGroups = <>
OptionsBehavior.GoToNextCellOnEnter = True
OptionsBehavior.FocusCellOnCycle = True
OptionsCustomize.ColumnFiltering = False
OptionsData.Editing = False
OptionsView.GroupByBox = False
OptionsView.Indicator = True
object FileName: TcxGridDBColumn
Tag = 1
Caption = #25991#20214#21517#31216
DataBinding.FieldName = 'FileName'
DataBinding.IsNullValueType = True
FooterAlignmentHorz = taCenter
HeaderAlignmentHorz = taCenter
Width = 121
end
object TV7Column1: TcxGridDBColumn
Caption = #33457#22411#21517#31216
DataBinding.FieldName = 'HXName'
DataBinding.IsNullValueType = True
Visible = False
GroupSummaryAlignment = taCenter
HeaderAlignmentHorz = taCenter
Width = 91
end
object FileDate: TcxGridDBColumn
Tag = 1
Caption = #19978#20256#26085#26399
DataBinding.FieldName = 'TFDate'
DataBinding.IsNullValueType = True
FooterAlignmentHorz = taCenter
HeaderAlignmentHorz = taCenter
Width = 104
end
end
object cxGridLevel6: TcxGridLevel
GridView = TV7
end
end
object Panel16: TPanel
Left = 190
Top = 126
Width = 138
Height = 30
BevelInner = bvRaised
Caption = #27491#22312#19978#20256#12290#12290#12290
Color = clSkyBlue
TabOrder = 1
Visible = False
end
object ToolBar6: TToolBar
Left = 858
Top = 41
Width = 71
Height = 554
Align = alRight
AutoSize = True
ButtonHeight = 38
ButtonWidth = 75
Caption = 'ToolBar1'
Images = DataLink_Contract.ImageList_new32
List = True
ShowCaptions = True
TabOrder = 2
ExplicitLeft = 889
object FileUp: TToolButton
Left = 0
Top = 0
AutoSize = True
Caption = #19978#20256
ImageIndex = 2
Wrap = True
OnClick = FileUpClick
end
object FileDel: TToolButton
Left = 0
Top = 38
AutoSize = True
Caption = #21024#38500
ImageIndex = 5
Wrap = True
OnClick = FileDelClick
end
end
object Panel1: TPanel
Left = 0
Top = 0
Width = 929
Height = 41
Align = alTop
BevelInner = bvRaised
BevelOuter = bvLowered
TabOrder = 3
Visible = False
object Label1: TLabel
Left = 8
Top = 15
Width = 90
Height = 17
Caption = #20379#24212#21830#32534#21495
Font.Charset = GB2312_CHARSET
Font.Color = clRed
Font.Height = -17
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Image2: TImage
Left = 774
Top = 7
Width = 60
Height = 28
Visible = False
end
object Image1: TImage
Left = 861
Top = 7
Width = 60
Height = 28
Visible = False
end
object Label2: TLabel
Left = 336
Top = 14
Width = 36
Height = 17
Caption = #33457#22411
Font.Charset = GB2312_CHARSET
Font.Color = clRed
Font.Height = -17
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
Visible = False
end
object Code: TEdit
Left = 104
Top = 10
Width = 211
Height = 25
Font.Charset = GB2312_CHARSET
Font.Color = clBlue
Font.Height = -17
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
ReadOnly = True
TabOrder = 0
end
object HXName: TBtnEditC
Tag = 2
Left = 378
Top = 9
Width = 168
Height = 29
Hint = 'CYKZ/'#20811#37325
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -20
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 1
Visible = False
OnBtnUpClick = HXNameBtnUpClick
OnBtnDnClick = HXNameBtnDnClick
end
end
object ODPat: TOpenDialog
Filter =
'All (*.svg;*.jpg;*.jpeg;*.gif;*.tif;*.tiff;*.png;*.gif;*.jpg;*.j' +
'peg;*.png;*.bmp;*.ico;*.emf;*.wmf;*.tif;*.tiff)|*.svg;*.jpg;*.jp' +
'eg;*.gif;*.tif;*.tiff;*.png;*.gif;*.jpg;*.jpeg;*.png;*.bmp;*.ico' +
';*.emf;*.wmf;*.tif;*.tiff|SVG graphics from DevExpress (*.svg)|*' +
'.svg|JPEG graphics from DevExpress (*.jpg)|*.jpg|JPEG graphics f' +
'rom DevExpress (*.jpeg)|*.jpeg|GIF graphics from DevExpress (*.g' +
'if)|*.gif|TIFF graphics from DevExpress (*.tif)|*.tif|TIFF graph' +
'ics from DevExpress (*.tiff)|*.tiff|PNG graphics from DevExpress' +
' (*.png)|*.png|GIF Image (*.gif)|*.gif|JPEG Image File (*.jpg)|*' +
'.jpg|JPEG Image File (*.jpeg)|*.jpeg|Portable Network Graphics (' +
'*.png)|*.png|Bitmaps (*.bmp)|*.bmp|Icons (*.ico)|*.ico|Enhanced ' +
'Metafiles (*.emf)|*.emf|Metafiles (*.wmf)|*.wmf|TIFF Images (*.t' +
'if)|*.tif|TIFF Images (*.tiff)|*.tiff'
Options = [ofHideReadOnly, ofAllowMultiSelect, ofEnableSizing]
Left = 380
Top = 333
end
object IdFTP1: TIdFTP
ConnectTimeout = 0
NATKeepAlive.UseKeepAlive = False
NATKeepAlive.IdleTimeMS = 0
NATKeepAlive.IntervalMS = 0
ProxySettings.ProxyType = fpcmNone
ProxySettings.Port = 0
ReadTimeout = 0
Left = 261
Top = 244
end
object SaveDialog1: TSaveDialog
Filter =
'All (*.svg;*.jpg;*.jpeg;*.gif;*.tif;*.tiff;*.png;*.gif;*.jpg;*.j' +
'peg;*.png;*.bmp;*.ico;*.emf;*.wmf;*.tif;*.tiff)|*.svg;*.jpg;*.jp' +
'eg;*.gif;*.tif;*.tiff;*.png;*.gif;*.jpg;*.jpeg;*.png;*.bmp;*.ico' +
';*.emf;*.wmf;*.tif;*.tiff|SVG graphics from DevExpress (*.svg)|*' +
'.svg|JPEG graphics from DevExpress (*.jpg)|*.jpg|JPEG graphics f' +
'rom DevExpress (*.jpeg)|*.jpeg|GIF graphics from DevExpress (*.g' +
'if)|*.gif|TIFF graphics from DevExpress (*.tif)|*.tif|TIFF graph' +
'ics from DevExpress (*.tiff)|*.tiff|PNG graphics from DevExpress' +
' (*.png)|*.png|GIF Image (*.gif)|*.gif|JPEG Image File (*.jpg)|*' +
'.jpg|JPEG Image File (*.jpeg)|*.jpeg|Portable Network Graphics (' +
'*.png)|*.png|Bitmaps (*.bmp)|*.bmp|Icons (*.ico)|*.ico|Enhanced ' +
'Metafiles (*.emf)|*.emf|Metafiles (*.wmf)|*.wmf|TIFF Images (*.t' +
'if)|*.tif|TIFF Images (*.tiff)|*.tiff'
Left = 305
Top = 333
end
object ADOQueryFile: TADOQuery
Connection = DataLink_Contract.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 488
Top = 144
end
object DataSource1: TDataSource
DataSet = ADOQueryFile
Left = 376
Top = 136
end
object ADOQueryCmd: TADOQuery
Connection = DataLink_Contract.ADOLink
Parameters = <>
Left = 584
Top = 256
end
object ADOQueryTemp: TADOQuery
Connection = DataLink_Contract.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 432
Top = 224
end
end

View File

@ -0,0 +1,425 @@
unit U_BGZFileUp;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
cxEdit, DB, cxDBData, ComCtrls, ToolWin, ExtCtrls, cxGridLevel,
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
cxControls, cxGridCustomView, cxGrid, IdBaseComponent, IdComponent,
IdTCPConnection, IdTCPClient, IdFTP, StdCtrls, ADODB, jpeg, BtnEdit, IniFiles,
strutils, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxSkinsCore,
dxSkinsDefaultPainters, dxDateRanges, IdExplicitTLSClientServerBase,
Vcl.ExtDlgs, dxSkinWXI, dxScrollbarAnnotations, ShellAPI;
type
TfrmBGZFileUp = class(TForm)
cxGrid7: TcxGrid;
TV7: TcxGridDBTableView;
FileName: TcxGridDBColumn;
FileDate: TcxGridDBColumn;
cxGridLevel6: TcxGridLevel;
Panel16: TPanel;
ToolBar6: TToolBar;
FileUp: TToolButton;
FileDel: TToolButton;
Panel1: TPanel;
Label1: TLabel;
Code: TEdit;
ODPat: TOpenDialog;
IdFTP1: TIdFTP;
SaveDialog1: TSaveDialog;
ADOQueryFile: TADOQuery;
DataSource1: TDataSource;
ADOQueryCmd: TADOQuery;
ADOQueryTemp: TADOQuery;
Image2: TImage;
Image1: TImage;
TV7Column1: TcxGridDBColumn;
Label2: TLabel;
HXName: TBtnEditC;
procedure FileUpClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FileDelClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure HXNameBtnUpClick(Sender: TObject);
procedure HXNameBtnDnClick(Sender: TObject);
procedure TV7CellDblClick(Sender: TcxCustomGridTableView;
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
AShift: TShiftState; var AHandled: Boolean);
private
lstPat: TStringList;
AJpeg: TJPEGImage;
procedure CreThumb(Image1, Image2: TImage; Width, Height: Integer);
procedure SaveImageOther(FTFID: string);
procedure ReadINIFile10();
procedure InitTP();
{ Private declarations }
public
FBCIID: string;
FWidth, FHeight:Integer
{ Public declarations }
end;
var
frmBGZFileUp: TfrmBGZFileUp;
implementation
uses
U_DataLink, U_RTFun, U_ZDYHelp;
{$R *.dfm} procedure TfrmBGZFileUp.InitTP();
begin
with ADOQueryFile do
begin
Close;
SQL.Clear;
SQL.Add('select TFID,WBID,TFDate,Files,Filler,FillTime,FileName,HXName from TP_File where WBID=''' + Trim(FBCIID) + '''');
SQL.Add(' and FileType=''BGZ''');
Open;
end;
end;
procedure TfrmBGZFileUp.ReadINIFile10();
var
programIni: Tinifile; //配置文件名
FileName: string;
begin
FileName := ExtractFilePath(Paramstr(0)) + 'SYSTEMSET.INI';
programIni := Tinifile.create(FileName);
server := programIni.ReadString('SERVER', '服务器地址', '127.0.0.1');
programIni.Free;
end;
procedure TfrmBGZFileUp.FileUpClick(Sender: TObject);
var
i, j, ii: Integer;
PatFile: string;
FTPPath, FConNo, MaxNo: string;
AJpeg: TJPEGImage;
myStream: TADOBlobStream;
f: file of Byte;
size: Longint;
S: Double;
begin
// if Trim(Code.Text) = '' then
// begin
// Application.MessageBox('编号不能为空!', '提示', 0);
// Exit;
// end;
// if Trim(HXName.Text) = '' then
// begin
// if Application.MessageBox('花型确认为空吗?', '提示', 32 + 4) <> IDYES then
// Exit;
// end;
lstPat.Clear;
if ODPat.Execute then
begin
lstPat.AddStrings(ODPat.Files);
end;
if lstPat.Count > 0 then
begin
try
IdFTP1.Host := PicSvr;
IdFTP1.Username := 'three';
IdFTP1.Password := '641010';
IdFTP1.Connect();
except
IdFTP1.Quit;
Application.MessageBox('无法连接到文件服务器,请检查!', '提示', MB_ICONWARNING);
Exit;
end;
end;
Panel16.Visible := True;
Panel16.Refresh;
try
AJpeg := TJpegImage.Create();
ADOQueryCmd.Connection.BeginTrans;
ii := 0;
for i := 0 to lstPat.Count - 1 do
begin
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.Add('select isnull(max(abs(cast(right(left(FileName,charindex(''.'',FileName)-1),2) as int))),0)+1 as BH from TP_File');
sql.Add('where FileType =''BGZ'' and WBID=''' + trim(FBCIID) + ''' ');
open;
end;
PatFile := trim(FBCIID) + '-' + inttostr(ADOQueryTemp.fieldbyname('BH').AsInteger) + '.' + Copy(ExtractFileName(lstPat[i]), (Pos('.', ExtractFileName(lstPat[i])) + 1), (Length(ExtractFileName(lstPat[i])) - Pos('.', ExtractFileName(lstPat[i]))));
image1.Picture.LoadFromFile((lstPat[i]));
CreThumb(Image1, Image2, FWidth, FHeight);
if IdFTP1.Connected then
begin
try
IdFTP1.Put(lstPat[i], Trim(UserDataFlag + 'YP' + '\' + Trim(PatFile)));
if GetLSNo(ADOQueryCmd, MaxNo, 'YP', 'XD_File', 4, 1) = False then
raise Exception.Create('取图片最大号失败!');
with ADOQueryCmd do
begin
close;
sql.Clear;
sql.Add(' select * from TP_File where TFID=''' + Trim(MaxNo) + '''');
open;
end;
with ADOQueryCmd do
begin
if ADOQueryCmd.IsEmpty then
begin
Append;
FieldByName('Filler').Value := Trim(DName);
FieldByName('TFDate').Value := SGetServerDateTime(ADOQueryTemp);
end
else
begin
Edit;
FieldByName('Editer').Value := Trim(DName);
FieldByName('EditTime').Value := SGetServerDateTime(ADOQueryTemp);
end;
FieldByName('TFID').Value := Trim(MaxNo);
FieldByName('WBID').Value := Trim(FBCIID);
FieldByName('TFType').Value := '报关章';
FieldByName('FileType').Value := 'BGZ';
FieldByName('HXName').Value := trim(HXName.Text);
FieldByName('filename').Value := Trim(PatFile);
myStream := TADOBlobStream.Create(TBlobField(ADOQueryCmd.FieldByName('FilesOther')), bmWrite);
AJpeg.Assign(Image2.Picture.Graphic);
AJpeg.SaveToStream(myStream);
myStream.Free;
Post;
end;
except
raise Exception.Create('上传图片失败!');
end;
end;
end;
ADOQueryCmd.Connection.CommitTrans;
AJpeg.Free;
except
AJpeg.Free;
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('图片上传失败!', '提示', 0);
end;
if IdFTP1.Connected then
IdFTP1.Quit;
InitTP();
Panel16.Visible := False;
if ii > 0 then
Application.MessageBox(PChar(inttostr(ii) + '个文件大于2MB上传失败'), '提示', 0);
if i > 0 then
Application.MessageBox(PChar(inttostr(i-ii) + '个文件上传成功!'), '提示', 0);
ModalResult := 1;
end;
procedure TfrmBGZFileUp.CreThumb(Image1, Image2: TImage; Width, Height: Integer);
var
Bitmap: TBitmap;
Ratio: Double;
ARect: TRect;
AHeight, AHeightOffset: Integer;
AWidth, AWidthOffset: Integer;
begin
Bitmap := TBitmap.Create;
try
Ratio := Image1.Picture.Graphic.Width / Image1.Picture.Graphic.Height;
if Ratio > 1.333 then
begin
AHeight := Round(Width / Ratio);
AHeightOffset := (Height - AHeight) div 2;
AWidth := Width;
AWidthOffset := 0;
end
else
begin
AWidth := Round(Height * Ratio);
AWidthOffset := (Width - AWidth) div 2;
AHeight := Height;
AHeightOffset := 0;
end;
Bitmap.Width := Width;
Bitmap.Height := Height;
Bitmap.Canvas.Brush.Color := clBtnFace;
Bitmap.Canvas.FillRect(Rect(0, 0, Width, Height));
ARect := Rect(AWidthOffset, AHeightOffset, AWidth + AWidthOffset, AHeight + AHeightOffset);
Bitmap.Canvas.StretchDraw(ARect, Image1.Picture.Graphic);
Image2.Picture.Assign(Bitmap);
finally
Bitmap.Free;
end;
end;
procedure TfrmBGZFileUp.SaveImageOther(FTFID: string);
var
AJpeg: TJPEGImage;
myStream: TADOBlobStream;
ImgMaxNo: string;
i, j: Integer;
PatFile: string;
FConNo, MaxNo: string;
begin
if Image2.Picture = nil then
Exit;
AJpeg := TJpegImage.Create();
with ADOQueryCmd do
begin
close;
sql.Clear;
sql.Add(' select * from TP_File where TFID=''' + Trim(FTFID) + '''');
open;
end;
with ADOQueryCmd do
begin
if Trim(FTFID) = '' then
begin
Append;
FieldByName('Filler').Value := Trim(DName);
end
else
begin
Edit;
FieldByName('Editer').Value := Trim(DName);
FieldByName('EditTime').Value := SGetServerDateTime(ADOQueryTemp);
end;
FieldByName('TFID').Value := Trim(FTFID);
FieldByName('WBID').Value := Trim(FBCIID);
FieldByName('TFType').Value := '样品';
AJpeg.Assign(Image2.Picture.Graphic);
myStream := TADOBlobStream.Create(TBlobField(ADOQueryCmd.FieldByName('FilesOther')), bmWrite);
AJpeg.Assign(Image2.Picture.Graphic);
AJpeg.SaveToStream(myStream);
myStream.Free;
Post;
end;
end;
procedure TfrmBGZFileUp.TV7CellDblClick(Sender: TcxCustomGridTableView;
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
AShift: TShiftState; var AHandled: Boolean);
var
IdFTP1: TIdFTP;
FPath, FFName, FileName: string;
FInt: integer;
begin
FileName := ADOQueryFile.FieldByName('FileName').AsString;
try
IdFTP1 := TIdFTP.Create(self);
IdFTP1.Host := PicSvr;
IdFTP1.Username := 'three';
IdFTP1.Password := '641010';
IdFTP1.Connect();
except
IdFTP1.Quit;
IdFTP1.Free;
Application.MessageBox('无法连接到文件服务器,请检查!', '提示', MB_ICONWARNING);
Exit;
end;
FPath := 'D:\Right1209\';
if not DirectoryExists(ExtractFileDir(FPath)) then
CreateDir(ExtractFileDir(FPath));
FFName := Trim(FileName);
FFName := FPath + FFName;
if FileExists(FFName) then
begin
FInt := 1;
end;
if FInt <> 1 then
IdFTP1.Get(UserDataFlag + 'YP\' + FileName, pchar(FFName));
if IdFTP1.Connected then
begin
IdFTP1.Quit;
IdFTP1.Free;
end;
ShellExecute(Handle, 'open', PChar(FFName), '', '', SW_SHOWNORMAL);
end;
procedure TfrmBGZFileUp.FormCreate(Sender: TObject);
begin
lstPat := TStringList.Create;
if FWidth = 0 then
FWidth := 160;
if FHeight = 0 then
FHeight := 120;
end;
procedure TfrmBGZFileUp.FileDelClick(Sender: TObject);
begin
with ADOQueryCmd do
begin
Close;
sql.Clear;
SQL.Add(' Delete TP_File where TFID=''' + Trim(ADOQueryFile.fieldbyname('TFID').AsString) + '''');
ExecSQL;
end;
with ADOQueryFile do
begin
Close;
SQL.Clear;
SQL.Add('select TFID,WBID,TFDate,Files,Filler,FillTime,FileName from TP_File where WBID=''' + Trim(FBCIID) + '''');
SQL.Add(' and FileType=''BGZ''');
Open;
end;
// if ADOQueryFile.IsEmpty then
// begin
// with ADOQueryCmd do
// begin
// Close;
// sql.Clear;
// sql.Add('Update CP_YDang Set TPFlag=0 where FBCIID=''' + Trim(FBCIID) + '''');
// ExecSQL;
// end;
// end;
end;
procedure TfrmBGZFileUp.FormShow(Sender: TObject);
begin
with ADOQueryFile do
begin
Close;
SQL.Clear;
SQL.Add('select TFID,WBID,TFDate,Files,Filler,FillTime,FileName from TP_File where WBID=''' + Trim(FBCIID) + '''');
SQL.Add(' and FileType=''BGZ''');
Open;
end;
end;
procedure TfrmBGZFileUp.HXNameBtnDnClick(Sender: TObject);
begin
TBtnEditC(Sender).Text := '';
TBtnEditC(Sender).TxtCode := '';
end;
procedure TfrmBGZFileUp.HXNameBtnUpClick(Sender: TObject);
begin
try
frmZDYHelp := TfrmZDYHelp.Create(Application);
with frmZDYHelp do
begin
flag := 'HX' + Trim(Code.Text);
flagname := '花型';
if ShowModal = 1 then
begin
TEdit(Sender).Text := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
end;
end;
finally
frmZDYHelp.Free;
end;
end;
end.

View File

@ -11,7 +11,6 @@ inherited frmBaoguanInPut: TfrmBaoguanInPut
OldCreateOrder = True
Position = poScreenCenter
WindowState = wsMaximized
ExplicitLeft = -362
ExplicitWidth = 1533
ExplicitHeight = 734
PixelsPerInch = 96
@ -78,8 +77,6 @@ inherited frmBaoguanInPut: TfrmBaoguanInPut
ParentCtl3D = False
ParentFont = False
TabOrder = 1
ExplicitLeft = 1
ExplicitTop = 44
object Label10: TLabel
Left = 925
Top = 30
@ -525,6 +522,7 @@ inherited frmBaoguanInPut: TfrmBaoguanInPut
Height = 20
Hint = 'CKS/'#20986#21475#21830
TabOrder = 1
OnBtnUpClick = CKSBtnUpClick
OnBtnDnClick = CKSBtnDnClick
end
object FPNO: TEdit
@ -603,11 +601,12 @@ inherited frmBaoguanInPut: TfrmBaoguanInPut
object ChuyunG: TBtnEditC
Tag = 2
Left = 108
Top = 145
Top = 141
Width = 110
Height = 20
Hint = 'ChuYunG/'#20986#36816#28207
TabOrder = 9
OnBtnUpClick = QiYunBtnUpClick
OnBtnDnClick = CKSBtnDnClick
end
object BZType: TBtnEditC
@ -629,6 +628,7 @@ inherited frmBaoguanInPut: TfrmBaoguanInPut
Height = 20
Hint = 'MYType/'#36152#26131#26041#24335
TabOrder = 11
OnBtnUpClick = QiYunBtnUpClick
OnBtnDnClick = CKSBtnDnClick
end
object SBDate: TDateTimePicker
@ -678,11 +678,13 @@ inherited frmBaoguanInPut: TfrmBaoguanInPut
end
object CustName: TBtnEditC
Tag = 2
Left = 767
Left = 772
Top = 265
Width = 336
Height = 20
Hint = 'CustName/'#23458#25143#21517#31216
TabOrder = 16
OnBtnUpClick = QiYunBtnUpClick
OnBtnDnClick = CKSBtnDnClick
end
object ZZMDG: TBtnEditC
@ -698,7 +700,7 @@ inherited frmBaoguanInPut: TfrmBaoguanInPut
end
object DPNo: TEdit
Tag = 2
Left = 108
Left = 109
Top = 65
Width = 317
Height = 18
@ -823,7 +825,7 @@ inherited frmBaoguanInPut: TfrmBaoguanInPut
end
object DaohuoG: TBtnEditC
Tag = 2
Left = 316
Left = 315
Top = 141
Width = 110
Height = 20
@ -902,8 +904,6 @@ inherited frmBaoguanInPut: TfrmBaoguanInPut
Align = alClient
BorderStyle = cxcbsNone
TabOrder = 1
ExplicitLeft = 2
ExplicitTop = 45
object TV2: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
@ -978,6 +978,13 @@ inherited frmBaoguanInPut: TfrmBaoguanInPut
Caption = #20135#21697#21517#31216
DataBinding.FieldName = 'C_Name'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxButtonEditProperties'
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
Properties.OnButtonClick = cxGridDBColumn2PropertiesButtonClick
HeaderAlignmentHorz = taCenter
Styles.Header = DataLink_Contract.FontBlue
Width = 70
@ -997,15 +1004,6 @@ inherited frmBaoguanInPut: TfrmBaoguanInPut
Styles.Header = DataLink_Contract.FontBlue
Width = 89
end
object v1Column5: TcxGridDBColumn
Caption = #35268#26684
DataBinding.FieldName = 'C_Spec'
DataBinding.IsNullValueType = True
Visible = False
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 60
end
object cxGridDBColumn4: TcxGridDBColumn
Caption = #25104#20998
DataBinding.FieldName = 'C_Composition'
@ -1014,40 +1012,6 @@ inherited frmBaoguanInPut: TfrmBaoguanInPut
Styles.Header = DataLink_Contract.FontBlue
Width = 70
end
object cxGridDBColumn6: TcxGridDBColumn
Caption = #33394#21495
DataBinding.FieldName = 'C_ColorNo'
DataBinding.IsNullValueType = True
Visible = False
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 57
end
object cxGridDBColumn7: TcxGridDBColumn
Caption = #27454#21495
DataBinding.FieldName = 'C_StyleNo'
DataBinding.IsNullValueType = True
Visible = False
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 77
end
object cxGridDBColumn8: TcxGridDBColumn
Caption = #33457#22411
DataBinding.FieldName = 'C_Pattern'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxButtonEditProperties'
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
Properties.ReadOnly = True
Visible = False
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 70
end
object TV2Column15: TcxGridDBColumn
Caption = #38376#24133
DataBinding.FieldName = 'C_Width'
@ -1167,8 +1131,10 @@ inherited frmBaoguanInPut: TfrmBaoguanInPut
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxComboBoxProperties'
Properties.Items.Strings = (
#21253
#24102)
'BALES'
'ROLLS'
'CTNS'
'PKGS')
HeaderAlignmentHorz = taCenter
Styles.Header = DataLink_Contract.FontBlue
Width = 77
@ -1197,6 +1163,12 @@ inherited frmBaoguanInPut: TfrmBaoguanInPut
Styles.Header = DataLink_Contract.FontBlue
Width = 77
end
object TV2Column16: TcxGridDBColumn
Caption = #32452#32455#32467#26500
DataBinding.FieldName = 'ZZJG'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
end
object TV2Column11: TcxGridDBColumn
Caption = #25240#31639#31859#25968
DataBinding.FieldName = 'ZSQty'

View File

@ -60,11 +60,7 @@ type
VC_SCSCode: TcxGridDBColumn;
cxGridDBColumn2: TcxGridDBColumn;
cxGridDBColumn3: TcxGridDBColumn;
v1Column5: TcxGridDBColumn;
cxGridDBColumn4: TcxGridDBColumn;
cxGridDBColumn6: TcxGridDBColumn;
cxGridDBColumn7: TcxGridDBColumn;
cxGridDBColumn8: TcxGridDBColumn;
v1Column7: TcxGridDBColumn;
v1PRTOrderQty: TcxGridDBColumn;
v1OrderUnit: TcxGridDBColumn;
@ -148,6 +144,7 @@ type
Label23: TLabel;
JHType: TBtnEditC;
TV2Column15: TcxGridDBColumn;
TV2Column16: TcxGridDBColumn;
procedure TBCloseClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure TBSaveClick(Sender: TObject);
@ -174,6 +171,8 @@ type
procedure ToolButton2Click(Sender: TObject);
procedure YunFeeKeyPress(Sender: TObject; var Key: Char);
procedure BaoFeeKeyPress(Sender: TObject; var Key: Char);
procedure cxGridDBColumn2PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure CKSBtnUpClick(Sender: TObject);
// procedure PBPriceKeyPress(Sender: TObject; var Key: Char);
// procedure Button1Click(Sender: TObject);
private
@ -210,7 +209,8 @@ var
implementation
uses
U_DataLink, U_RTFun, U_ZDYHelp, U_CompanySel, U_ClothInfoSel, U_PictureUpload;
U_DataLink, U_RTFun, U_ZDYHelp, U_CompanySel, U_ClothInfoSel, U_PictureUpload,
U_ZDYHelp_Img;
{$R *.dfm}
function TfrmBaoguanInPut.GetLSNo1(ADOQueryTmp: TADOQuery; var mMaxNo: string; mFlag: string; mTable: string; mlen: Integer; mtype: Integer = 0): Boolean;
@ -772,8 +772,8 @@ begin
if BG_Sub.IsEmpty then
raise Exception.Create('明细不能为空!');
if BG_Sub.Locate('C_Code', null, []) then
raise Exception.Create('产品编号不能为空!');
// if BG_Sub.Locate('C_Code', null, []) then
// raise Exception.Create('产品编号不能为空!');
if BG_Sub.Locate('C_Name', null, []) then
raise Exception.Create('品名不能为空!');
if BG_Sub.Locate('C_EName', '', []) then
@ -877,7 +877,7 @@ begin
PState := '新增';
FBGMId := '';
FPDate.DateTime := SGetServerDateTime(ADOTemp);
with BG_Sub do
begin
First;
@ -1269,15 +1269,15 @@ begin
Post;
end;
// with ADOCmd do
// begin
// Close;
// sql.Clear;
// sql.Add('select * from BaoGuan_Main where ConNo=''' + Trim(ConNo.Text) + '''');
// Open;
// end;
// if ADOCmd.RecordCount > 1 then
// raise Exception.Create('合同号重复!');
with ADOCmd do
begin
Close;
sql.Clear;
sql.Add('select * from BaoGuan_Main where FPNo=''' + Trim(FPNo.Text) + '''');
Open;
end;
if ADOCmd.RecordCount > 1 then
raise Exception.Create('发票号重复!');
FBGMId := Trim(maxno);
//////////////// 保存主表 //////////////////////
@ -1386,8 +1386,6 @@ begin
Post;
end;
tv2.Controller.EditingController.ShowEdit();
end;
@ -1443,30 +1441,30 @@ begin
Exit;
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
Exit;
while BG_Sub.Locate('SSel', True, []) do
begin
with ADOTemp do
begin
Close;
sql.Clear;
sql.Add('select * from Trade_Plan_Sub where ConSId=''' + Trim(BG_Sub.fieldbyname('ConSId').AsString) + '''');
open;
end;
if ADOTemp.IsEmpty = false then
begin
exit;
application.MessageBox('该明细已经在生产!', '提示信息');
end;
if Trim(BG_Sub.fieldbyname('ConSId').AsString) <> '' then
// while BG_Sub.Locate('SSel', True, []) do
// begin
// with ADOTemp do
// begin
// Close;
// sql.Clear;
// sql.Add('select * from Trade_Plan_Sub where ConSId=''' + Trim(BG_Sub.fieldbyname('ConSId').AsString) + '''');
// open;
// end;
// if ADOTemp.IsEmpty = false then
// begin
// exit;
// application.MessageBox('该明细已经在生产!', '提示信息');
// end;
if Trim(BG_Sub.fieldbyname('BGSId').AsString) <> '' then
begin
with ADOCmd do
begin
Close;
sql.Clear;
sql.Add('delete BS_Contract_Sub where ConSId=''' + Trim(BG_Sub.fieldbyname('ConSId').AsString) + '''');
sql.Add('delete BaoGuan_Sub where BGSId=''' + Trim(BG_Sub.fieldbyname('BGSId').AsString) + '''');
ExecSQL;
end;
end;
// end;
BG_Sub.Delete;
end;
@ -1514,6 +1512,49 @@ begin
LookImage(Qry_ImgHX.fieldbyname(TcxDBImage(Sender).Hint).asstring);
end;
procedure TfrmBaoguanInPut.cxGridDBColumn2PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
begin
try
frmZDYHelp := TfrmZDYHelp.Create(Application);
with frmZDYHelp do
begin
flag := 'BGName';
flagname := '报关品名';
if ShowModal = 1 then
begin
with Self.BG_Sub do
begin
Edit;
FieldByName('C_Name').Value := Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
end;
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.Add('select Top 1 * from BaoGuan_Sub where C_Name=''' + Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZDYName').AsString) + '''');
sql.add(' and isnull(HSNO,'''')<>'''' ');
sql.Add(' order by SFillTime desc');
Open;
end;
with Self.BG_Sub do
begin
Edit;
FieldByName('HSNO').Value := Trim(ADOQueryTemp.fieldbyname('HSNO').asstring);
FieldByName('C_EName').Value := Trim(ADOQueryTemp.fieldbyname('C_EName').asstring);
FieldByName('C_Composition').Value := Trim(ADOQueryTemp.fieldbyname('C_Composition').asstring);
FieldByName('ZZFF').Value := Trim(ADOQueryTemp.fieldbyname('ZZFF').asstring);
FieldByName('RZType').Value := Trim(ADOQueryTemp.fieldbyname('RZType').asstring);
FieldByName('BGUnit').Value := Trim(ADOQueryTemp.fieldbyname('BGUnit').asstring);
end;
end;
end;
finally
frmZDYHelp.Free;
end;
end;
procedure TfrmBaoguanInPut.ExchangeRateKeyPress(Sender: TObject; var Key: Char);
begin
if not (((Key >= '0') and (Key <= '9')) or (Key = '.') or (Key = #8)) then
@ -1648,6 +1689,39 @@ begin
TBtnEditC(Sender).TxtCode := '';
end;
procedure TfrmBaoguanInPut.CKSBtnUpClick(Sender: TObject);
var
fsj: string;
FWZ: Integer;
begin
fsj := Trim(TEdit(Sender).Hint);
FWZ := Pos('/', fsj);
try
frmZDYHelp_Img := TfrmZDYHelp_Img.Create(Application);
with frmZDYHelp_Img do
begin
flag := Copy(fsj, 1, FWZ - 1);
flagname := Copy(fsj, FWZ + 1, Length(fsj) - FWZ);
MainType := '报关管理';
if ShowModal = 1 then
begin
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.Add('select Top 1 * from BaoGuan_Main where CKS=''' + Trim(ClientDataSet1.fieldbyname('ZDYName').AsString) + '''');
sql.Add(' order by FillTime desc');
Open;
end;
DPNO.Text := ADOQueryTemp.fieldbyname('DPNO').ASString;
TEdit(Sender).Text := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
end;
end;
finally
frmZDYHelp_Img.Free;
end;
end;
procedure TfrmBaoguanInPut.v1Column4PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
begin
try

View File

@ -693,12 +693,11 @@ inherited frmBaoguanList: TfrmBaoguanList
TabOrder = 2
Properties.CustomButtons.Buttons = <>
Properties.Style = 9
Properties.TabIndex = 4
Properties.TabIndex = 0
Properties.Tabs.Strings = (
#26410#25552#20132
#24050#25552#20132
#24050#23457#26680
#24050#23436#25104
#24050#21462#28040
#20840#37096)
OnChange = cxTabControl1Change

View File

@ -196,7 +196,8 @@ type
implementation
uses
U_DataLink, U_SalesConInPut, U_RTFun, U_AttachmentUpload, U_LabelPrint,U_BaoguanInPut;
U_DataLink, U_SalesConInPut, U_RTFun, U_AttachmentUpload, U_LabelPrint,
U_BaoguanInPut;
{$R *.dfm}
@ -302,14 +303,14 @@ begin
2:
begin
// tbedit.Enabled := True;
btnWC.Enabled := True;
// btnWC.Enabled := True;
tnochk.Enabled := True;
end;
// 3:
// begin
// btnWCCX.Enabled := True;
// end;
3:
begin
btnWCCX.Enabled := True;
end;
4:
begin
TNoqx.Enabled := True;
end;
@ -339,13 +340,13 @@ begin
begin
// tbedit.Enabled := True;
tnochk.Enabled := True;
btnWC.Enabled := True;
// btnWC.Enabled := True;
end;
// 3:
// begin
// btnWCCX.Enabled := True;
// end;
3:
begin
btnWCCX.Enabled := True;
end;
4:
begin
TNoqx.Enabled := true;
end;
@ -442,11 +443,11 @@ begin
begin
sql.Add(' and isnull(A.status,''0'')=''9''');
end;
// 3:
// begin
// sql.Add(' and isnull(A.status,''0'')=''10''');
// end;
3:
begin
sql.Add(' and isnull(A.status,''0'')=''10''');
end;
4:
begin
sql.Add(' and isnull(A.status,''0'')=''-1''');
end;
@ -483,8 +484,8 @@ begin
frmLabelPrint := TfrmLabelPrint.Create(Application);
with frmLabelPrint do
begin
FLMType := 'SalesConPrint';
FFiltration1 := QuotedStr(Trim(Self.CDS_1.fieldbyname('BGMID').AsString));
FLMType := 'BaoGuanPrint';
FFiltration1 := Trim(Self.CDS_1.fieldbyname('BGMID').AsString);
if ShowModal = 1 then
begin
// Self.InitGrid();
@ -709,8 +710,8 @@ begin
begin
Close;
sql.Clear;
sql.Add(' exec P_BS_Contract_SetStatus ');
sql.Add(' @ConMIDS=' + QuotedStr(MBGMIDS));
sql.Add(' exec P_BaoGuan_SetStatus ');
sql.Add(' @BGMIDS=' + QuotedStr(MBGMIDS));
sql.Add(',@Operation=''完成'' ');
Sql.Add(',@DCode=' + quotedstr(Trim(DCode)));
Sql.Add(',@DName=' + quotedstr(Trim(DName)));
@ -719,8 +720,8 @@ begin
sql.Add(' ' + quotedstr(trim(DName)));
sql.Add(',getdate() ');
sql.Add(',' + quotedstr(trim(self.Caption)));
sql.Add(',' + quotedstr(trim('合同完成')));
sql.Add(',' + quotedstr(trim('合同ID' + trim(MBGMIDS))));
sql.Add(',' + quotedstr(trim('报关单完成')));
sql.Add(',' + quotedstr(trim('报关单ID' + trim(MBGMIDS))));
sql.Add(',' + quotedstr(trim('成功')));
sql.Add(')');
open;
@ -779,8 +780,8 @@ begin
begin
Close;
sql.Clear;
sql.Add(' exec P_BS_Contract_SetStatus ');
sql.Add(' @ConMIDS=' + QuotedStr(MBGMIDS));
sql.Add(' exec P_BaoGuan_SetStatus ');
sql.Add(' @BGMIDS=' + QuotedStr(MBGMIDS));
sql.Add(',@Operation=''审核'' ');
Sql.Add(',@DCode=' + quotedstr(Trim(DCode)));
Sql.Add(',@DName=' + quotedstr(Trim(DName)));
@ -789,8 +790,8 @@ begin
sql.Add(' ' + quotedstr(trim(DName)));
sql.Add(',getdate() ');
sql.Add(',' + quotedstr(trim(self.Caption)));
sql.Add(',' + quotedstr(trim('合同审核')));
sql.Add(',' + quotedstr(trim('合同ID' + trim(MBGMIDS))));
sql.Add(',' + quotedstr(trim('报关单审核')));
sql.Add(',' + quotedstr(trim('报关单ID' + trim(MBGMIDS))));
sql.Add(',' + quotedstr(trim('成功')));
sql.Add(')');
open;
@ -840,8 +841,8 @@ begin
begin
Close;
sql.Clear;
sql.Add(' exec P_BS_Contract_SetStatus ');
sql.Add(' @ConMIDS=' + QuotedStr(MBGMIDS));
sql.Add(' exec P_BaoGuan_SetStatus ');
sql.Add(' @BGMIDS=' + QuotedStr(MBGMIDS));
sql.Add(',@Operation=''撤销审核'' ');
Sql.Add(',@DCode=' + quotedstr(Trim(DCode)));
Sql.Add(',@DName=' + quotedstr(Trim(DName)));
@ -850,8 +851,8 @@ begin
sql.Add(' ' + quotedstr(trim(DName)));
sql.Add(',getdate() ');
sql.Add(',' + quotedstr(trim(self.Caption)));
sql.Add(',' + quotedstr(trim('合同撤销审核')));
sql.Add(',' + quotedstr(trim('合同ID' + trim(MBGMIDS))));
sql.Add(',' + quotedstr(trim('报关单撤销审核')));
sql.Add(',' + quotedstr(trim('报关单ID' + trim(MBGMIDS))));
sql.Add(',' + quotedstr(trim('成功')));
sql.Add(')');
open;
@ -887,35 +888,36 @@ var
begin
if CDS_1.IsEmpty then
exit;
if not CDS_1.Locate('SSel', True, []) then
begin
application.MessageBox('请选择数据', '提示');
Exit;
end;
with CDS_1 do
begin
DisableControls;
First;
MBGMIDS := '';
while not eof do
begin
if fieldbyname('SSel').AsBoolean then
begin
MBGMIDS := MBGMIDS + trim(fieldbyname('BGMID').AsString) + ',';
end;
next;
end;
MBGMIDS := copy(MBGMIDS, 1, Length(MBGMIDS) - 1);
EnableControls;
end;
MBGMIDS := MBGMIDS + CDS_1.fieldbyname('BGMID').AsString + ',';
// if not CDS_1.Locate('SSel', True, []) then
// begin
// application.MessageBox('请选择数据', '提示');
// Exit;
// end;
// with CDS_1 do
// begin
// DisableControls;
// First;
// MConMIDS := '';
// while not eof do
// begin
// if fieldbyname('SSel').AsBoolean then
// begin
// MConMIDS := MConMIDS + trim(fieldbyname('ConMID').AsString) + ',';
// end;
// next;
// end;
// MConMIDS := copy(MConMIDS, 1, Length(MConMIDS) - 1);
// EnableControls;
// end;
try
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add(' exec P_BS_Contract_SetStatus ');
sql.Add(' @ConMIDS=' + QuotedStr(MBGMIDS));
sql.Add(' exec P_BaoGuan_SetStatus ');
sql.Add(' @BGMIDS=' + QuotedStr(MBGMIDS));
sql.Add(',@Operation=''取消'' ');
Sql.Add(',@DCode=' + quotedstr(Trim(DCode)));
Sql.Add(',@DName=' + quotedstr(Trim(DName)));
@ -924,8 +926,8 @@ begin
sql.Add(' ' + quotedstr(trim(DName)));
sql.Add(',getdate() ');
sql.Add(',' + quotedstr(trim(self.Caption)));
sql.Add(',' + quotedstr(trim('合同取消')));
sql.Add(',' + quotedstr(trim('合同ID' + trim(MBGMIDS))));
sql.Add(',' + quotedstr(trim('报关单取消')));
sql.Add(',' + quotedstr(trim('报关单ID' + trim(MBGMIDS))));
sql.Add(',' + quotedstr(trim('成功')));
sql.Add(')');
open;
@ -947,48 +949,48 @@ var
begin
if CDS_1.IsEmpty then
exit;
if not CDS_1.Locate('SSel', True, []) then
begin
application.MessageBox('请选择数据', '提示');
Exit;
end;
with CDS_1 do
begin
DisableControls;
First;
MBGMIDS := '';
while not eof do
begin
if fieldbyname('SSel').AsBoolean then
begin
MBGMIDS := MBGMIDS + trim(fieldbyname('BGMID').AsString) + ',';
end;
next;
end;
MBGMIDS := copy(MBGMIDS, 1, Length(MBGMIDS) - 1);
EnableControls;
end;
MBGMIDS := MBGMIDS + CDS_1.fieldbyname('BGMID').AsString + ',';
// if not CDS_1.Locate('SSel', True, []) then
// begin
// application.MessageBox('请选择数据', '提示');
// Exit;
// end;
// with CDS_1 do
// begin
// DisableControls;
// First;
// MConMIDS := '';
// while not eof do
// begin
// if fieldbyname('SSel').AsBoolean then
// begin
// MConMIDS := MConMIDS + trim(fieldbyname('ConMID').AsString) + ',';
// end;
// next;
// end;
// MConMIDS := copy(MConMIDS, 1, Length(MConMIDS) - 1);
// EnableControls;
// end;
try
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add(' exec P_BaoGuan_SetStatus ');
sql.Add(' @BGMIDS=' + QuotedStr(MBGMIDS));
sql.Add(',@Operation=''撤销取消'' ');
Sql.Add(',@DCode=' + quotedstr(Trim(DCode)));
Sql.Add(',@DName=' + quotedstr(Trim(DName)));
sql.Add('insert into SY_SysLog(operor,opertime,Model,acction,opevent,result) values( ');
sql.Add(' ' + quotedstr(trim(DName)));
sql.Add(',getdate() ');
sql.Add(',' + quotedstr(trim(self.Caption)));
sql.Add(',' + quotedstr(trim('合同撤销取消')));
sql.Add(',' + quotedstr(trim('合同ID' + trim(MBGMIDS))));
sql.Add(',' + quotedstr(trim('报关单取消')));
sql.Add(',' + quotedstr(trim('报关单ID' + trim(MBGMIDS))));
sql.Add(',' + quotedstr(trim('成功')));
sql.Add(')');
sql.Add(' exec P_BS_Contract_SetStatus ');
sql.Add(' @ConMIDS=' + QuotedStr(MBGMIDS));
sql.Add(',@Operation=''撤销取消'' ');
Sql.Add(',@DCode=' + quotedstr(Trim(DCode)));
Sql.Add(',@DName=' + quotedstr(Trim(DName)));
// ShowMessage(sql.Text);
open;
end;
if ADOQueryCmd.FieldByName('intReturn').AsInteger = -1 then
@ -1062,8 +1064,8 @@ begin
begin
Close;
sql.Clear;
sql.Add(' exec P_BS_Contract_SetStatus ');
sql.Add(' @ConMIDS=' + QuotedStr(MBGMIDS));
sql.Add(' exec P_BaoGuan_SetStatus ');
sql.Add(' @BGMIDS=' + QuotedStr(MBGMIDS));
sql.Add(',@Operation=''撤销完成'' ');
Sql.Add(',@DCode=' + quotedstr(Trim(DCode)));
Sql.Add(',@DName=' + quotedstr(Trim(DName)));
@ -1072,8 +1074,8 @@ begin
sql.Add(' ' + quotedstr(trim(DName)));
sql.Add(',getdate() ');
sql.Add(',' + quotedstr(trim(self.Caption)));
sql.Add(',' + quotedstr(trim('合同撤销完成')));
sql.Add(',' + quotedstr(trim('合同ID' + trim(MBGMIDS))));
sql.Add(',' + quotedstr(trim('报关单撤销完成')));
sql.Add(',' + quotedstr(trim('报关单ID' + trim(MBGMIDS))));
sql.Add(',' + quotedstr(trim('成功')));
sql.Add(')');
open;
@ -1136,8 +1138,8 @@ begin
begin
Close;
sql.Clear;
sql.Add(' exec P_BS_Contract_SetStatus ');
sql.Add(' @ConMIDS=' + QuotedStr(MBGMIDS));
sql.Add(' exec P_BaoGuan_SetStatus ');
sql.Add(' @BGMIDS=' + QuotedStr(MBGMIDS));
sql.Add(',@Operation=''提交'' ');
Sql.Add(',@DCode=' + quotedstr(Trim(DCode)));
Sql.Add(',@DName=' + quotedstr(Trim(DName)));
@ -1146,8 +1148,8 @@ begin
sql.Add(' ' + quotedstr(trim(DName)));
sql.Add(',getdate() ');
sql.Add(',' + quotedstr(trim(self.Caption)));
sql.Add(',' + quotedstr(trim('内销合同提交')));
sql.Add(',' + quotedstr(trim('合同ID' + trim(MBGMIDS))));
sql.Add(',' + quotedstr(trim('报关单提交')));
sql.Add(',' + quotedstr(trim('报关单ID' + trim(MBGMIDS))));
sql.Add(',' + quotedstr(trim('成功')));
sql.Add(')');
open;
@ -1196,8 +1198,8 @@ begin
begin
Close;
sql.Clear;
sql.Add(' exec P_BS_Contract_SetStatus ');
sql.Add(' @ConMIDS=' + QuotedStr(MBGMIDS));
sql.Add(' exec P_BaoGuan_SetStatus ');
sql.Add(' @BGMIDS=' + QuotedStr(MBGMIDS));
sql.Add(',@Operation=''撤销提交'' ');
Sql.Add(',@DCode=' + quotedstr(Trim(DCode)));
Sql.Add(',@DName=' + quotedstr(Trim(DName)));
@ -1206,8 +1208,8 @@ begin
sql.Add(' ' + quotedstr(trim(DName)));
sql.Add(',getdate() ');
sql.Add(',' + quotedstr(trim(self.Caption)));
sql.Add(',' + quotedstr(trim('内销合同撤销提交')));
sql.Add(',' + quotedstr(trim('合同ID' + trim(MBGMIDS))));
sql.Add(',' + quotedstr(trim('报关单撤销提交')));
sql.Add(',' + quotedstr(trim('报关单ID' + trim(MBGMIDS))));
sql.Add(',' + quotedstr(trim('成功')));
sql.Add(')');
open;

View File

@ -6,7 +6,6 @@ inherited frmContractList: TfrmContractList
ClientWidth = 1525
FormStyle = fsMDIChild
Visible = True
ExplicitLeft = -9
ExplicitWidth = 1541
ExplicitHeight = 775
PixelsPerInch = 96
@ -217,7 +216,6 @@ inherited frmContractList: TfrmContractList
Align = alClient
PopupMenu = pm1
TabOrder = 3
ExplicitTop = 161
object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
@ -532,6 +530,13 @@ inherited frmContractList: TfrmContractList
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
end
object Tv1Column26: TcxGridDBColumn
Caption = #21033#28070#29575
DataBinding.FieldName = 'ProfitRate'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 61
end
object Tv1Column24: TcxGridDBColumn
Caption = #23567#21333#36153
DataBinding.FieldName = 'XDPrice'

View File

@ -145,6 +145,7 @@ type
Tv1Column23: TcxGridDBColumn;
ToolButton4: TToolButton;
Tv1Column24: TcxGridDBColumn;
Tv1Column26: TcxGridDBColumn;
procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBCloseClick(Sender: TObject);

View File

@ -75,8 +75,8 @@ begin
pswd := 'rightsoft@5740';
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
Parameters1 := '录入';
// Parameters1 := '管理';
// Parameters1 := '录入';
Parameters1 := '管理';
DName :='admin';
DCode :='006';
end

View File

@ -0,0 +1,273 @@
object frmQMFileUp: TfrmQMFileUp
Left = 612
Top = 236
Caption = #19978#20256#25991#20214
ClientHeight = 595
ClientWidth = 929
Color = clBtnFace
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
OldCreateOrder = False
Position = poMainFormCenter
OnCreate = FormCreate
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 12
object cxGrid7: TcxGrid
Left = 0
Top = 41
Width = 858
Height = 554
Align = alClient
TabOrder = 0
object TV7: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
OnCellDblClick = TV7CellDblClick
DataController.DataSource = DataSource1
DataController.Summary.DefaultGroupSummaryItems = <>
DataController.Summary.FooterSummaryItems = <>
DataController.Summary.SummaryGroups = <>
OptionsBehavior.GoToNextCellOnEnter = True
OptionsBehavior.FocusCellOnCycle = True
OptionsCustomize.ColumnFiltering = False
OptionsData.Editing = False
OptionsView.GroupByBox = False
OptionsView.Indicator = True
object FileName: TcxGridDBColumn
Tag = 1
Caption = #25991#20214#21517#31216
DataBinding.FieldName = 'FileName'
DataBinding.IsNullValueType = True
FooterAlignmentHorz = taCenter
HeaderAlignmentHorz = taCenter
Width = 121
end
object TV7Column1: TcxGridDBColumn
Caption = #33457#22411#21517#31216
DataBinding.FieldName = 'HXName'
DataBinding.IsNullValueType = True
Visible = False
GroupSummaryAlignment = taCenter
HeaderAlignmentHorz = taCenter
Width = 91
end
object FileDate: TcxGridDBColumn
Tag = 1
Caption = #19978#20256#26085#26399
DataBinding.FieldName = 'TFDate'
DataBinding.IsNullValueType = True
FooterAlignmentHorz = taCenter
HeaderAlignmentHorz = taCenter
Width = 104
end
end
object cxGridLevel6: TcxGridLevel
GridView = TV7
end
end
object Panel16: TPanel
Left = 190
Top = 126
Width = 138
Height = 30
BevelInner = bvRaised
Caption = #27491#22312#19978#20256#12290#12290#12290
Color = clSkyBlue
TabOrder = 1
Visible = False
end
object ToolBar6: TToolBar
Left = 858
Top = 41
Width = 71
Height = 554
Align = alRight
AutoSize = True
ButtonHeight = 38
ButtonWidth = 75
Caption = 'ToolBar1'
Images = DataLink_Contract.ImageList_new32
List = True
ShowCaptions = True
TabOrder = 2
object FileUp: TToolButton
Left = 0
Top = 0
AutoSize = True
Caption = #19978#20256
ImageIndex = 2
Wrap = True
OnClick = FileUpClick
end
object FileDel: TToolButton
Left = 0
Top = 38
AutoSize = True
Caption = #21024#38500
ImageIndex = 5
Wrap = True
OnClick = FileDelClick
end
end
object Panel1: TPanel
Left = 0
Top = 0
Width = 929
Height = 41
Align = alTop
BevelInner = bvRaised
BevelOuter = bvLowered
TabOrder = 3
Visible = False
object Label1: TLabel
Left = 8
Top = 15
Width = 90
Height = 17
Caption = #20379#24212#21830#32534#21495
Font.Charset = GB2312_CHARSET
Font.Color = clRed
Font.Height = -17
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Image2: TImage
Left = 774
Top = 7
Width = 60
Height = 28
Visible = False
end
object Image1: TImage
Left = 861
Top = 7
Width = 60
Height = 28
Visible = False
end
object Label2: TLabel
Left = 336
Top = 14
Width = 36
Height = 17
Caption = #33457#22411
Font.Charset = GB2312_CHARSET
Font.Color = clRed
Font.Height = -17
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
Visible = False
end
object Code: TEdit
Left = 104
Top = 10
Width = 211
Height = 25
Font.Charset = GB2312_CHARSET
Font.Color = clBlue
Font.Height = -17
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
ReadOnly = True
TabOrder = 0
end
object HXName: TBtnEditC
Tag = 2
Left = 378
Top = 9
Width = 168
Height = 29
Hint = 'CYKZ/'#20811#37325
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -20
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 1
Visible = False
OnBtnUpClick = HXNameBtnUpClick
OnBtnDnClick = HXNameBtnDnClick
end
end
object ODPat: TOpenDialog
Filter =
'All (*.svg;*.jpg;*.jpeg;*.gif;*.tif;*.tiff;*.png;*.gif;*.jpg;*.j' +
'peg;*.png;*.bmp;*.ico;*.emf;*.wmf;*.tif;*.tiff)|*.svg;*.jpg;*.jp' +
'eg;*.gif;*.tif;*.tiff;*.png;*.gif;*.jpg;*.jpeg;*.png;*.bmp;*.ico' +
';*.emf;*.wmf;*.tif;*.tiff|SVG graphics from DevExpress (*.svg)|*' +
'.svg|JPEG graphics from DevExpress (*.jpg)|*.jpg|JPEG graphics f' +
'rom DevExpress (*.jpeg)|*.jpeg|GIF graphics from DevExpress (*.g' +
'if)|*.gif|TIFF graphics from DevExpress (*.tif)|*.tif|TIFF graph' +
'ics from DevExpress (*.tiff)|*.tiff|PNG graphics from DevExpress' +
' (*.png)|*.png|GIF Image (*.gif)|*.gif|JPEG Image File (*.jpg)|*' +
'.jpg|JPEG Image File (*.jpeg)|*.jpeg|Portable Network Graphics (' +
'*.png)|*.png|Bitmaps (*.bmp)|*.bmp|Icons (*.ico)|*.ico|Enhanced ' +
'Metafiles (*.emf)|*.emf|Metafiles (*.wmf)|*.wmf|TIFF Images (*.t' +
'if)|*.tif|TIFF Images (*.tiff)|*.tiff'
Options = [ofHideReadOnly, ofAllowMultiSelect, ofEnableSizing]
Left = 380
Top = 333
end
object IdFTP1: TIdFTP
ConnectTimeout = 0
NATKeepAlive.UseKeepAlive = False
NATKeepAlive.IdleTimeMS = 0
NATKeepAlive.IntervalMS = 0
ProxySettings.ProxyType = fpcmNone
ProxySettings.Port = 0
ReadTimeout = 0
Left = 261
Top = 244
end
object SaveDialog1: TSaveDialog
Filter =
'All (*.svg;*.jpg;*.jpeg;*.gif;*.tif;*.tiff;*.png;*.gif;*.jpg;*.j' +
'peg;*.png;*.bmp;*.ico;*.emf;*.wmf;*.tif;*.tiff)|*.svg;*.jpg;*.jp' +
'eg;*.gif;*.tif;*.tiff;*.png;*.gif;*.jpg;*.jpeg;*.png;*.bmp;*.ico' +
';*.emf;*.wmf;*.tif;*.tiff|SVG graphics from DevExpress (*.svg)|*' +
'.svg|JPEG graphics from DevExpress (*.jpg)|*.jpg|JPEG graphics f' +
'rom DevExpress (*.jpeg)|*.jpeg|GIF graphics from DevExpress (*.g' +
'if)|*.gif|TIFF graphics from DevExpress (*.tif)|*.tif|TIFF graph' +
'ics from DevExpress (*.tiff)|*.tiff|PNG graphics from DevExpress' +
' (*.png)|*.png|GIF Image (*.gif)|*.gif|JPEG Image File (*.jpg)|*' +
'.jpg|JPEG Image File (*.jpeg)|*.jpeg|Portable Network Graphics (' +
'*.png)|*.png|Bitmaps (*.bmp)|*.bmp|Icons (*.ico)|*.ico|Enhanced ' +
'Metafiles (*.emf)|*.emf|Metafiles (*.wmf)|*.wmf|TIFF Images (*.t' +
'if)|*.tif|TIFF Images (*.tiff)|*.tiff'
Left = 305
Top = 333
end
object ADOQueryFile: TADOQuery
Connection = DataLink_Contract.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 488
Top = 144
end
object DataSource1: TDataSource
DataSet = ADOQueryFile
Left = 376
Top = 136
end
object ADOQueryCmd: TADOQuery
Connection = DataLink_Contract.ADOLink
Parameters = <>
Left = 584
Top = 256
end
object ADOQueryTemp: TADOQuery
Connection = DataLink_Contract.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 432
Top = 224
end
end

View File

@ -0,0 +1,425 @@
unit U_QMFileUp;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
cxEdit, DB, cxDBData, ComCtrls, ToolWin, ExtCtrls, cxGridLevel,
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
cxControls, cxGridCustomView, cxGrid, IdBaseComponent, IdComponent,
IdTCPConnection, IdTCPClient, IdFTP, StdCtrls, ADODB, jpeg, BtnEdit, IniFiles,
strutils, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxSkinsCore,
dxSkinsDefaultPainters, dxDateRanges, IdExplicitTLSClientServerBase,
Vcl.ExtDlgs, dxSkinWXI, dxScrollbarAnnotations, ShellAPI;
type
TfrmQMFileUp = class(TForm)
cxGrid7: TcxGrid;
TV7: TcxGridDBTableView;
FileName: TcxGridDBColumn;
FileDate: TcxGridDBColumn;
cxGridLevel6: TcxGridLevel;
Panel16: TPanel;
ToolBar6: TToolBar;
FileUp: TToolButton;
FileDel: TToolButton;
Panel1: TPanel;
Label1: TLabel;
Code: TEdit;
ODPat: TOpenDialog;
IdFTP1: TIdFTP;
SaveDialog1: TSaveDialog;
ADOQueryFile: TADOQuery;
DataSource1: TDataSource;
ADOQueryCmd: TADOQuery;
ADOQueryTemp: TADOQuery;
Image2: TImage;
Image1: TImage;
TV7Column1: TcxGridDBColumn;
Label2: TLabel;
HXName: TBtnEditC;
procedure FileUpClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FileDelClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure HXNameBtnUpClick(Sender: TObject);
procedure HXNameBtnDnClick(Sender: TObject);
procedure TV7CellDblClick(Sender: TcxCustomGridTableView;
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
AShift: TShiftState; var AHandled: Boolean);
private
lstPat: TStringList;
AJpeg: TJPEGImage;
procedure CreThumb(Image1, Image2: TImage; Width, Height: Integer);
procedure SaveImageOther(FTFID: string);
procedure ReadINIFile10();
procedure InitTP();
{ Private declarations }
public
FBCIID: string;
FWidth, FHeight:Integer
{ Public declarations }
end;
var
frmQMFileUp: TfrmQMFileUp;
implementation
uses
U_DataLink, U_RTFun, U_ZDYHelp;
{$R *.dfm} procedure TfrmQMFileUp.InitTP();
begin
with ADOQueryFile do
begin
Close;
SQL.Clear;
SQL.Add('select TFID,WBID,TFDate,Files,Filler,FillTime,FileName,HXName from TP_File where WBID=''' + Trim(FBCIID) + '''');
SQL.Add(' and FileType=''QM''');
Open;
end;
end;
procedure TfrmQMFileUp.ReadINIFile10();
var
programIni: Tinifile; //配置文件名
FileName: string;
begin
FileName := ExtractFilePath(Paramstr(0)) + 'SYSTEMSET.INI';
programIni := Tinifile.create(FileName);
server := programIni.ReadString('SERVER', '服务器地址', '127.0.0.1');
programIni.Free;
end;
procedure TfrmQMFileUp.FileUpClick(Sender: TObject);
var
i, j, ii: Integer;
PatFile: string;
FTPPath, FConNo, MaxNo: string;
AJpeg: TJPEGImage;
myStream: TADOBlobStream;
f: file of Byte;
size: Longint;
S: Double;
begin
// if Trim(Code.Text) = '' then
// begin
// Application.MessageBox('编号不能为空!', '提示', 0);
// Exit;
// end;
// if Trim(HXName.Text) = '' then
// begin
// if Application.MessageBox('花型确认为空吗?', '提示', 32 + 4) <> IDYES then
// Exit;
// end;
lstPat.Clear;
if ODPat.Execute then
begin
lstPat.AddStrings(ODPat.Files);
end;
if lstPat.Count > 0 then
begin
try
IdFTP1.Host := PicSvr;
IdFTP1.Username := 'three';
IdFTP1.Password := '641010';
IdFTP1.Connect();
except
IdFTP1.Quit;
Application.MessageBox('无法连接到文件服务器,请检查!', '提示', MB_ICONWARNING);
Exit;
end;
end;
Panel16.Visible := True;
Panel16.Refresh;
try
AJpeg := TJpegImage.Create();
ADOQueryCmd.Connection.BeginTrans;
ii := 0;
for i := 0 to lstPat.Count - 1 do
begin
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.Add('select isnull(max(abs(cast(right(left(FileName,charindex(''.'',FileName)-1),2) as int))),0)+1 as BH from TP_File');
sql.Add('where FileType =''QM'' and WBID=''' + trim(FBCIID) + ''' ');
open;
end;
PatFile := trim(FBCIID) + '-' + inttostr(ADOQueryTemp.fieldbyname('BH').AsInteger) + '.' + Copy(ExtractFileName(lstPat[i]), (Pos('.', ExtractFileName(lstPat[i])) + 1), (Length(ExtractFileName(lstPat[i])) - Pos('.', ExtractFileName(lstPat[i]))));
image1.Picture.LoadFromFile((lstPat[i]));
CreThumb(Image1, Image2, FWidth, FHeight);
if IdFTP1.Connected then
begin
try
IdFTP1.Put(lstPat[i], Trim(UserDataFlag + 'YP' + '\' + Trim(PatFile)));
if GetLSNo(ADOQueryCmd, MaxNo, 'YP', 'XD_File', 4, 1) = False then
raise Exception.Create('取图片最大号失败!');
with ADOQueryCmd do
begin
close;
sql.Clear;
sql.Add(' select * from TP_File where TFID=''' + Trim(MaxNo) + '''');
open;
end;
with ADOQueryCmd do
begin
if ADOQueryCmd.IsEmpty then
begin
Append;
FieldByName('Filler').Value := Trim(DName);
FieldByName('TFDate').Value := SGetServerDateTime(ADOQueryTemp);
end
else
begin
Edit;
FieldByName('Editer').Value := Trim(DName);
FieldByName('EditTime').Value := SGetServerDateTime(ADOQueryTemp);
end;
FieldByName('TFID').Value := Trim(MaxNo);
FieldByName('WBID').Value := Trim(FBCIID);
FieldByName('TFType').Value := '签名';
FieldByName('FileType').Value := 'QM';
FieldByName('HXName').Value := trim(HXName.Text);
FieldByName('filename').Value := Trim(PatFile);
myStream := TADOBlobStream.Create(TBlobField(ADOQueryCmd.FieldByName('FilesOther')), bmWrite);
AJpeg.Assign(Image2.Picture.Graphic);
AJpeg.SaveToStream(myStream);
myStream.Free;
Post;
end;
except
raise Exception.Create('上传图片失败!');
end;
end;
end;
ADOQueryCmd.Connection.CommitTrans;
AJpeg.Free;
except
AJpeg.Free;
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('图片上传失败!', '提示', 0);
end;
if IdFTP1.Connected then
IdFTP1.Quit;
InitTP();
Panel16.Visible := False;
if ii > 0 then
Application.MessageBox(PChar(inttostr(ii) + '个文件大于2MB上传失败'), '提示', 0);
if i > 0 then
Application.MessageBox(PChar(inttostr(i-ii) + '个文件上传成功!'), '提示', 0);
ModalResult := 1;
end;
procedure TfrmQMFileUp.CreThumb(Image1, Image2: TImage; Width, Height: Integer);
var
Bitmap: TBitmap;
Ratio: Double;
ARect: TRect;
AHeight, AHeightOffset: Integer;
AWidth, AWidthOffset: Integer;
begin
Bitmap := TBitmap.Create;
try
Ratio := Image1.Picture.Graphic.Width / Image1.Picture.Graphic.Height;
if Ratio > 1.333 then
begin
AHeight := Round(Width / Ratio);
AHeightOffset := (Height - AHeight) div 2;
AWidth := Width;
AWidthOffset := 0;
end
else
begin
AWidth := Round(Height * Ratio);
AWidthOffset := (Width - AWidth) div 2;
AHeight := Height;
AHeightOffset := 0;
end;
Bitmap.Width := Width;
Bitmap.Height := Height;
Bitmap.Canvas.Brush.Color := clBtnFace;
Bitmap.Canvas.FillRect(Rect(0, 0, Width, Height));
ARect := Rect(AWidthOffset, AHeightOffset, AWidth + AWidthOffset, AHeight + AHeightOffset);
Bitmap.Canvas.StretchDraw(ARect, Image1.Picture.Graphic);
Image2.Picture.Assign(Bitmap);
finally
Bitmap.Free;
end;
end;
procedure TfrmQMFileUp.SaveImageOther(FTFID: string);
var
AJpeg: TJPEGImage;
myStream: TADOBlobStream;
ImgMaxNo: string;
i, j: Integer;
PatFile: string;
FConNo, MaxNo: string;
begin
if Image2.Picture = nil then
Exit;
AJpeg := TJpegImage.Create();
with ADOQueryCmd do
begin
close;
sql.Clear;
sql.Add(' select * from TP_File where TFID=''' + Trim(FTFID) + '''');
open;
end;
with ADOQueryCmd do
begin
if Trim(FTFID) = '' then
begin
Append;
FieldByName('Filler').Value := Trim(DName);
end
else
begin
Edit;
FieldByName('Editer').Value := Trim(DName);
FieldByName('EditTime').Value := SGetServerDateTime(ADOQueryTemp);
end;
FieldByName('TFID').Value := Trim(FTFID);
FieldByName('WBID').Value := Trim(FBCIID);
FieldByName('TFType').Value := '样品';
AJpeg.Assign(Image2.Picture.Graphic);
myStream := TADOBlobStream.Create(TBlobField(ADOQueryCmd.FieldByName('FilesOther')), bmWrite);
AJpeg.Assign(Image2.Picture.Graphic);
AJpeg.SaveToStream(myStream);
myStream.Free;
Post;
end;
end;
procedure TfrmQMFileUp.TV7CellDblClick(Sender: TcxCustomGridTableView;
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
AShift: TShiftState; var AHandled: Boolean);
var
IdFTP1: TIdFTP;
FPath, FFName, FileName: string;
FInt: integer;
begin
FileName := ADOQueryFile.FieldByName('FileName').AsString;
try
IdFTP1 := TIdFTP.Create(self);
IdFTP1.Host := PicSvr;
IdFTP1.Username := 'three';
IdFTP1.Password := '641010';
IdFTP1.Connect();
except
IdFTP1.Quit;
IdFTP1.Free;
Application.MessageBox('无法连接到文件服务器,请检查!', '提示', MB_ICONWARNING);
Exit;
end;
FPath := 'D:\Right1209\';
if not DirectoryExists(ExtractFileDir(FPath)) then
CreateDir(ExtractFileDir(FPath));
FFName := Trim(FileName);
FFName := FPath + FFName;
if FileExists(FFName) then
begin
FInt := 1;
end;
if FInt <> 1 then
IdFTP1.Get(UserDataFlag + 'YP\' + FileName, pchar(FFName));
if IdFTP1.Connected then
begin
IdFTP1.Quit;
IdFTP1.Free;
end;
ShellExecute(Handle, 'open', PChar(FFName), '', '', SW_SHOWNORMAL);
end;
procedure TfrmQMFileUp.FormCreate(Sender: TObject);
begin
lstPat := TStringList.Create;
if FWidth = 0 then
FWidth := 160;
if FHeight = 0 then
FHeight := 120;
end;
procedure TfrmQMFileUp.FileDelClick(Sender: TObject);
begin
with ADOQueryCmd do
begin
Close;
sql.Clear;
SQL.Add(' Delete TP_File where TFID=''' + Trim(ADOQueryFile.fieldbyname('TFID').AsString) + '''');
ExecSQL;
end;
with ADOQueryFile do
begin
Close;
SQL.Clear;
SQL.Add('select TFID,WBID,TFDate,Files,Filler,FillTime,FileName from TP_File where WBID=''' + Trim(FBCIID) + '''');
SQL.Add(' and FileType=''QM''');
Open;
end;
// if ADOQueryFile.IsEmpty then
// begin
// with ADOQueryCmd do
// begin
// Close;
// sql.Clear;
// sql.Add('Update CP_YDang Set TPFlag=0 where FBCIID=''' + Trim(FBCIID) + '''');
// ExecSQL;
// end;
// end;
end;
procedure TfrmQMFileUp.FormShow(Sender: TObject);
begin
with ADOQueryFile do
begin
Close;
SQL.Clear;
SQL.Add('select TFID,WBID,TFDate,Files,Filler,FillTime,FileName from TP_File where WBID=''' + Trim(FBCIID) + '''');
SQL.Add(' and FileType=''QM''');
Open;
end;
end;
procedure TfrmQMFileUp.HXNameBtnDnClick(Sender: TObject);
begin
TBtnEditC(Sender).Text := '';
TBtnEditC(Sender).TxtCode := '';
end;
procedure TfrmQMFileUp.HXNameBtnUpClick(Sender: TObject);
begin
try
frmZDYHelp := TfrmZDYHelp.Create(Application);
with frmZDYHelp do
begin
flag := 'HX' + Trim(Code.Text);
flagname := '花型';
if ShowModal = 1 then
begin
TEdit(Sender).Text := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
end;
end;
finally
frmZDYHelp.Free;
end;
end;
end.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,713 @@
unit U_ZDYHelp_Img;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
cxEdit, DB, cxDBData, ToolWin, ComCtrls, U_BaseInput, cxGridCustomTableView,
cxGridTableView, cxGridDBTableView, cxGridLevel, cxClasses, cxControls,
cxGridCustomView, cxGrid, DBClient, ADODB, ImgList, StdCtrls, ExtCtrls,
cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu, cxLookAndFeels,
cxLookAndFeelPainters, dxSkinsCore, dxSkinsDefaultPainters, cxNavigator,
dxDateRanges, dxBarBuiltInMenu, System.ImageList, dxSkinWXI,
dxScrollbarAnnotations;
type
TfrmZDYHelp_Img = class(TfrmBaseInput)
TV1: TcxGridDBTableView;
cxGrid1Level1: TcxGridLevel;
cxGrid1: TcxGrid;
V1Code: TcxGridDBColumn;
V1Name: TcxGridDBColumn;
ToolBar1: TToolBar;
ADOQueryMain: TADOQuery;
ADOQueryTemp: TADOQuery;
ADOQueryCmd: TADOQuery;
DataSource1: TDataSource;
ClientDataSet1: TClientDataSet;
TBAdd: TToolButton;
TBSave: TToolButton;
TBDel: TToolButton;
TBClose: TToolButton;
ToolButton1: TToolButton;
TBEdit: TToolButton;
V1Note: TcxGridDBColumn;
V1OrderNo: TcxGridDBColumn;
ADOConnection1: TADOConnection;
Panel1: TPanel;
Label1: TLabel;
ZDYName: TEdit;
ThreeImgList: TImageList;
Label2: TLabel;
cxGridPopupMenu1: TcxGridPopupMenu;
V1ZdyFlag: TcxGridDBColumn;
V1HelpType: TcxGridDBColumn;
V1note1: TcxGridDBColumn;
ImageList1: TImageList;
TV1Column1: TcxGridDBColumn;
TV1Column2: TcxGridDBColumn;
ToolButton2: TToolButton;
ToolButton3: TToolButton;
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBAddClick(Sender: TObject);
procedure TBSaveClick(Sender: TObject);
procedure TBDelClick(Sender: TObject);
procedure TBCloseClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure ToolButton1Click(Sender: TObject);
procedure TBEditClick(Sender: TObject);
procedure TV1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
procedure ZDYNameChange(Sender: TObject);
procedure V1NamePropertiesEditValueChanged(Sender: TObject);
procedure V1OrderNoPropertiesEditValueChanged(Sender: TObject);
procedure V1NotePropertiesEditValueChanged(Sender: TObject);
procedure V1Column1PropertiesEditValueChanged(Sender: TObject);
procedure V1HelpTypePropertiesEditValueChanged(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure ToolButton2Click(Sender: TObject);
procedure ToolButton3Click(Sender: TObject);
private
procedure InitGrid();
{ Private declarations }
public
flag, flagname, snote, MainType: string;
fnote, forderno, fZdyFlag, ViewFlag, fnote1, FHelpType: Boolean;
PPSTE: integer;
{ Public declarations }
end;
var
frmZDYHelp_Img: TfrmZDYHelp_Img;
implementation
uses
U_DataLink, U_RTFun, U_ZDYHelp,U_BGZFileUp, U_QMFileUp;
{$R *.dfm}
procedure TfrmZDYHelp_Img.FormCreate(Sender: TObject);
begin
inherited;
with ADOConnection1 do
begin
Connected := false;
ConnectionString := DConString;
Connected := true;
end;
ADOQueryBaseCmd.Connection := ADOConnection1;
ADOQueryBaseTemp.Connection := ADOConnection1;
end;
procedure TfrmZDYHelp_Img.FormClose(Sender: TObject; var Action: TCloseAction);
begin
ZDYName.SetFocus;
Action := cahide;
end;
procedure TfrmZDYHelp_Img.InitGrid();
begin
try
ADOQueryMain.DisableControls;
with ADOQueryMain do
begin
Close;
sql.Clear;
sql.Add('select A.*,ZJM=dbo.getPinYin(A.ZdyName) ');
sql.Add(',QMIsImg=cast((case when (select COUNT(T.WBID) from TP_File T where T.FileType = ''QM'' and T.WBID=A.ZdyNo and isnull(filename,'''')<>'''')=0 then 0 else 1 end) as bit )');
sql.Add(',BGZIsImg=cast((case when (select COUNT(T.WBID) from TP_File T where T.FileType = ''BGZ'' and T.WBID=A.ZdyNo and isnull(filename,'''')<>'''')=0 then 0 else 1 end) as bit )');
sql.Add('from KH_ZDY A where A.Type=''' + flag + '''');
if Trim(MainType) <> '' then
begin
sql.Add(' and A.MainType=''' + Trim(MainType) + '''');
end;
Open;
end;
SCreateCDS(ADOQueryMain, ClientDataSet1);
SInitCDSData(ADOQueryMain, ClientDataSet1);
finally
ADOQueryMain.EnableControls;
end;
end;
procedure TfrmZDYHelp_Img.TBAddClick(Sender: TObject);
var
i: Integer;
begin
ZDYName.SetFocus;
TV1.OptionsData.Editing := True;
TV1.OptionsSelection.CellSelect := True;
for i := 0 to 5 do
begin
with ClientDataSet1 do
begin
Append;
Post;
end;
end;
end;
procedure TfrmZDYHelp_Img.TBSaveClick(Sender: TObject);
var
maxno: string;
begin
if ClientDataSet1.IsEmpty then
Exit;
ZDYName.SetFocus;
if ClientDataSet1.Locate('ZDYName', null, []) then
begin
Application.MessageBox('名称不能为空!', '提示', 0);
Exit;
end;
if ClientDataSet1.Locate('ZDYName', '', []) then
begin
Application.MessageBox('名称不能为空!', '提示', 0);
Exit;
end;
try
ADOQueryCmd.Connection.BeginTrans;
with ADOQueryTemp do
begin
Close;
SQL.Clear;
SQL.Add('select * from KH_ZDY where ZdyNo=''' + Trim(flag) + '''');
open;
end;
if ADOQueryTemp.IsEmpty then
begin
with ADOQueryCmd do
begin
close;
sql.Clear;
sql.Add('select * from KH_ZDY where 1=2');
open;
ADOQueryCmd.Append;
ADOQueryCmd.FieldByName('ZDYNo').Value := Trim(flag);
ADOQueryCmd.FieldByName('ZDYName').Value := trim(flagname);
ADOQueryCmd.FieldByName('Type').Value := 'Main';
ADOQueryCmd.FieldByName('MainType').Value := Trim(MainType);
ADOQueryCmd.Post;
{ sql.Add('insert into KH_ZDY(ZDYNo,ZDYName,Type,MainType) select :ZDYNo,:ZDYName,:Type,:MainType ');
Parameters.ParamByName('ZDYNo').Value:=Trim(flag);
Parameters.ParamByName('ZDYName').Value:=Trim(flagname);
Parameters.ParamByName('Type').Value:='Main';
Parameters.ParamByName('MainType').Value:=Trim(MainType);
ExecSQL; }
end;
end;
with ADOQueryCmd do
begin
ClientDataSet1.DisableControls;
with ClientDataSet1 do
begin
First;
while not eof do
begin
if Trim(ClientDataSet1.FieldByName('ZDYNO').AsString) = '' then
begin
if GetLSNo(ADOQueryTemp, maxno, 'SY', 'KH_ZDY', 3, 1) = False then
begin
ADOQueryCmd.Connection.RollbackTrans;
ClientDataSet1.EnableControls;
Application.MessageBox('取最大编号失败!', '提示', 0);
Exit;
end;
end
else
begin
maxno := Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString);
end;
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.add('select * from KH_Zdy where Type=''' + Trim(flag) + '''');
if Trim(MainType) <> '' then
SQL.Add(' and MainType=''' + Trim(MainType) + '''');
sql.Add(' and ZdyName=''' + Trim(ClientDataSet1.fieldbyname('ZdyName').AsString) + '''');
Open;
end;
if ADOQueryTemp.IsEmpty = False then
begin
if ADOQueryTemp.RecordCount > 1 then
begin
ADOQueryCmd.Connection.RollbackTrans;
ClientDataSet1.EnableControls;
Application.MessageBox('名称重复!', '提示', 0);
Exit;
end;
if Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) = '' then
begin
ADOQueryCmd.Connection.RollbackTrans;
ClientDataSet1.EnableControls;
Application.MessageBox('名称重复!', '提示', 0);
Exit;
end
else
begin
if Trim(ADOQueryTemp.fieldbyname('ZdyNo').AsString) <> Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) then
begin
ADOQueryCmd.Connection.RollbackTrans;
ClientDataSet1.EnableControls;
Application.MessageBox('名称重复!', '提示', 0);
Exit;
end;
end;
end;
with ADOQueryCmd do
begin
Close;
sql.Clear;
SQL.Add('delete KH_ZDY where ZDYNO=''' + Trim(ClientDataSet1.fieldbyname('ZDYNO').AsString) + '''');
ExecSQL;
end;
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add('select * from KH_ZDY where 1<>1');
Open;
end;
ADOQueryCmd.Append;
ADOQueryCmd.FieldByName('ZDYNo').Value := Trim(maxno);
ADOQueryCmd.FieldByName('ZDYName').Value := ClientDataSet1.fieldbyname('ZDYName').Value;
ADOQueryCmd.FieldByName('note').Value := Trim(snote);
//ADOQueryCmd.FieldByName('orderno').Value:=ClientDataSet1.fieldbyname('Name').AsString;
ADOQueryCmd.FieldByName('Type').Value := flag;
ADOQueryCmd.FieldByName('valid').Value := 'Y';
if Trim(MainType) <> '' then
ADOQueryCmd.FieldByName('MainType').Value := Trim(MainType);
//ADOQueryCmd.FieldByName('sel').Value:=0;
ADOQueryCmd.Post;
ClientDataSet1.Edit;
ClientDataSet1.FieldByName('ZDYNo').Value := Trim(maxno);
ClientDataSet1.Post;
Next;
end;
end;
ClientDataSet1.EnableControls;
end;
ADOQueryCmd.Connection.CommitTrans;
Application.MessageBox('保存成功!', '提示', 0);
TV1.OptionsData.Editing := False;
TV1.OptionsSelection.CellSelect := False;
except
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('保存失败!', '提示', 0);
end;
end;
procedure TfrmZDYHelp_Img.TBDelClick(Sender: TObject);
begin
if ClientDataSet1.IsEmpty then
Exit;
if (Trim(ClientDataSet1.FieldByName('ZDYNo').AsString) <> '') or (Trim(ClientDataSet1.FieldByName('ZDYname').AsString) <> '') then
begin
if application.MessageBox('确定要删除吗?', '提示信息', 1) = 2 then
exit;
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add('delete KH_ZDY where ZDYNo=''' + Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString) + '''');
SQL.Add(' and Type=''' + Trim(flag) + '''');
ExecSQL;
end;
end;
ClientDataSet1.Delete;
end;
procedure TfrmZDYHelp_Img.TBCloseClick(Sender: TObject);
begin
ModalResult := 2;
ZDYName.SetFocus;
Close;
end;
procedure TfrmZDYHelp_Img.FormShow(Sender: TObject);
var
fsj, fsj1: string;
begin
inherited;
InitGrid();
fsj := Trim(flag) + '01';
fsj1 := Trim(flagname) + '01';
ReadCxGrid('自定义' + Trim(flag), TV1, '自定义数据');
frmZDYHelp_Img.Caption := Trim(flagname);
V1Note.Visible := fnote;
V1ZdyFlag.Visible := fZdyFlag;
V1OrderNo.Visible := forderno;
v1note1.Visible := true;
V1HelpType.Visible := fhelpType;
if ViewFlag = True then
begin
TBAdd.Visible := False;
TBSave.Visible := False;
TBDel.Visible := False;
TBEdit.Visible := False;
Label2.Visible := False;
end;
end;
procedure TfrmZDYHelp_Img.ToolButton1Click(Sender: TObject);
begin
ZDYName.SetFocus;
// WriteCxGrid('自定义'+Trim(flag),TV1,'自定义数据');
ModalResult := 1;
end;
procedure TfrmZDYHelp_Img.ToolButton2Click(Sender: TObject);
begin
try
frmBGZFileUp := TfrmBGZFileUp.Create(Application);
with frmBGZFileUp do
begin
// Code.Text := Trim(Self.CDS_1.fieldbyname('CoCode').AsString);
FBCIID := trim(ClientDataSet1.fieldbyname('zdyno').AsString);
if ShowModal = 1 then
begin
Self.InitGrid();
// Self.CDS_1.Locate('BCIID', BCIID, []);
end;
end;
finally
frmBGZFileUp.Free;
end;
end;
procedure TfrmZDYHelp_Img.ToolButton3Click(Sender: TObject);
begin
try
frmQMFileUp := TfrmQMFileUp.Create(Application);
with frmQMFileUp do
begin
// Code.Text := Trim(Self.CDS_1.fieldbyname('CoCode').AsString);
FBCIID := trim(ClientDataSet1.fieldbyname('zdyno').AsString);
if ShowModal = 1 then
begin
Self.InitGrid();
// Self.CDS_1.Locate('BCIID', BCIID, []);
end;
end;
finally
frmQMFileUp.Free;
end;
end;
procedure TfrmZDYHelp_Img.TBEditClick(Sender: TObject);
begin
TV1.OptionsData.Editing := True;
TV1.OptionsSelection.CellSelect := True;
end;
procedure TfrmZDYHelp_Img.TV1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
begin
if TV1.OptionsData.Editing = False then
begin
ModalResult := 1;
end;
end;
procedure TfrmZDYHelp_Img.ZDYNameChange(Sender: TObject);
var
fsj: string;
begin
if Trim(ZDYName.Text) <> '' then
begin
fsj := ' zdyname like ''' + '%' + Trim(ZDYName.Text) + '%' + '''' + ' or Note like ''' + '%' + Trim(ZDYName.Text) + '%' + '''' + ' or ZJM like ''' + '%' + Trim(ZDYName.Text) + '%' + '''';
end;
if ADOQueryMain.Active then
begin
SDofilter(ADOQueryMain, fsj);
SCreateCDS(ADOQueryMain, ClientDataSet1);
SInitCDSData(ADOQueryMain, ClientDataSet1);
end;
end;
procedure TfrmZDYHelp_Img.V1NamePropertiesEditValueChanged(Sender: TObject);
var
maxno, mvalue: string;
begin
mvalue := TcxTextEdit(Sender).EditingText;
if Trim(mvalue) = '' then
begin
//Application.MessageBox('名称不能为空!','提示',0);
Exit;
end;
with ClientDataSet1 do
begin
Edit;
FieldByName('ZdyName').Value := Trim(mvalue);
//Post;
end;
try
ADOQueryCmd.Connection.BeginTrans;
with ADOQueryTemp do
begin
Close;
SQL.Clear;
SQL.Add('select * from KH_ZDY where ZdyNo=''' + Trim(flag) + '''');
open;
end;
if ADOQueryTemp.IsEmpty then
begin
with ADOQueryCmd do
begin
close;
sql.Clear;
sql.Add('select * from KH_ZDY where 1=2');
open;
ADOQueryCmd.Append;
ADOQueryCmd.FieldByName('ZDYNo').Value := Trim(flag);
ADOQueryCmd.FieldByName('ZDYName').Value := trim(flagname);
ADOQueryCmd.FieldByName('Type').Value := 'Main';
ADOQueryCmd.FieldByName('MainType').Value := Trim(MainType);
ADOQueryCmd.Post;
end;
end;
with ADOQueryCmd do
begin
//ClientDataSet1.DisableControls;
//with ClientDataSet1 do
//begin
//First;
//while not eof do
//begin
if Trim(ClientDataSet1.FieldByName('ZDYNO').AsString) = '' then
begin
if GetLSNo(ADOQueryTemp, maxno, 'SY', 'KH_ZDY', 3, 1) = False then
begin
ADOQueryCmd.Connection.RollbackTrans;
//ClientDataSet1.EnableControls;
Application.MessageBox('取最大编号失败!', '提示', 0);
Exit;
end;
end
else
begin
maxno := Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString);
end;
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.add('select * from KH_Zdy where Type=''' + Trim(flag) + '''');
if Trim(MainType) <> '' then
SQL.Add(' and MainType=''' + Trim(MainType) + '''');
sql.Add(' and ZdyName=''' + Trim(ClientDataSet1.fieldbyname('ZdyName').AsString) + '''');
sql.Add(' and note=''' + Trim(ClientDataSet1.fieldbyname('note').AsString) + '''');
Open;
end;
if ADOQueryTemp.IsEmpty = False then
begin
if ADOQueryTemp.RecordCount > 1 then
begin
ADOQueryCmd.Connection.RollbackTrans;
//ClientDataSet1.EnableControls;
Application.MessageBox('名称重复!', '提示', 0);
Exit;
end;
if Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) = '' then
begin
ADOQueryCmd.Connection.RollbackTrans;
//ClientDataSet1.EnableControls;
Application.MessageBox('名称重复!', '提示', 0);
Exit;
end
else
begin
if Trim(ADOQueryTemp.fieldbyname('ZdyNo').AsString) <> Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) then
begin
ADOQueryCmd.Connection.RollbackTrans;
//ClientDataSet1.EnableControls;
Application.MessageBox('名称重复!', '提示', 0);
Exit;
end;
end;
end;
with ADOQueryCmd do
begin
Close;
sql.Clear;
SQL.Add('delete KH_ZDY where ZDYNO=''' + Trim(ClientDataSet1.fieldbyname('ZDYNO').AsString) + '''');
ExecSQL;
end;
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add('select * from KH_ZDY where 1<>1');
Open;
end;
ADOQueryCmd.Append;
ADOQueryCmd.FieldByName('ZDYNo').Value := Trim(maxno);
ADOQueryCmd.FieldByName('ZDYName').Value := ClientDataSet1.fieldbyname('ZDYName').AsString;
ADOQueryCmd.FieldByName('note').Value := Trim(snote);
//ADOQueryCmd.FieldByName('orderno').Value:=ClientDataSet1.fieldbyname('Name').AsString;
ADOQueryCmd.FieldByName('Type').Value := flag;
ADOQueryCmd.FieldByName('valid').Value := 'Y';
if Trim(MainType) <> '' then
ADOQueryCmd.FieldByName('MainType').Value := Trim(MainType);
//ADOQueryCmd.FieldByName('sel').Value:=0;
ADOQueryCmd.Post;
ClientDataSet1.Edit;
ClientDataSet1.FieldByName('ZDYNo').Value := Trim(maxno);
//ClientDataSet1.Post;
// Next;
//end;
//end;
// ClientDataSet1.EnableControls;
end;
ADOQueryCmd.Connection.CommitTrans;
//Application.MessageBox('保存成功!','提示',0);
//TV1.OptionsData.Editing:=False;
//TV1.OptionsSelection.CellSelect:=False;
except
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('保存失败!', '提示', 0);
end;
end;
procedure TfrmZDYHelp_Img.V1OrderNoPropertiesEditValueChanged(Sender: TObject);
var
mvalue: string;
begin
if Trim(ClientDataSet1.fieldbyname('ZdyName').AsString) = '' then
begin
Application.MessageBox('名称不能为空!', '提示', 0);
Exit;
end;
mvalue := TcxTextEdit(Sender).EditingText;
if Trim(mvalue) = '' then
begin
mvalue := '0';
end;
with ClientDataSet1 do
begin
Edit;
FieldByName('OrderNo').Value := mvalue;
Post;
end;
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('Update KH_Zdy Set OrderNo=' + mvalue);
sql.Add(' where ZdyNo=''' + Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) + '''');
ExecSQL;
end;
end;
procedure TfrmZDYHelp_Img.V1NotePropertiesEditValueChanged(Sender: TObject);
var
mvalue: string;
begin
if Trim(ClientDataSet1.fieldbyname('ZdyName').AsString) = '' then
begin
Application.MessageBox('名称不能为空!', '提示', 0);
Exit;
end;
mvalue := TcxTextEdit(Sender).EditingText;
if Trim(mvalue) = '' then
begin
mvalue := '';
end;
with ClientDataSet1 do
begin
Edit;
FieldByName('Note').Value := mvalue;
Post;
end;
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('Update KH_Zdy Set Note=''' + Trim(mvalue) + '''');
sql.Add(' where ZdyNo=''' + Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) + '''');
ExecSQL;
end;
end;
procedure TfrmZDYHelp_Img.V1Column1PropertiesEditValueChanged(Sender: TObject);
var
mvalue: string;
fieldname: string;
begin
fieldname := Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName;
if Trim(ClientDataSet1.fieldbyname('ZdyName').AsString) = '' then
begin
Application.MessageBox('名称不能为空!', '提示', 0);
Exit;
end;
mvalue := TcxTextEdit(Sender).EditingText;
with ClientDataSet1 do
begin
Edit;
FieldByName(fieldname).Value := mvalue;
Post;
end;
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('Update KH_Zdy Set ' + fieldname + '=''' + Trim(mvalue) + ''' ');
sql.Add('where ZdyNo=''' + Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) + '''');
ExecSQL;
end;
end;
procedure TfrmZDYHelp_Img.V1HelpTypePropertiesEditValueChanged(Sender: TObject);
var
mvalue: string;
begin
if Trim(ClientDataSet1.fieldbyname('ZdyName').AsString) = '' then
begin
Application.MessageBox('名称不能为空!', '提示', 0);
Exit;
end;
mvalue := TcxTextEdit(Sender).EditingText;
if Trim(mvalue) = '' then
begin
mvalue := '0';
end;
with ClientDataSet1 do
begin
Edit;
FieldByName('HelpType').Value := mvalue;
Post;
end;
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('Update KH_Zdy Set HelpType=''' + Trim(mvalue) + '''');
sql.Add(' where ZdyNo=''' + Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) + '''');
ExecSQL;
end;
end;
procedure TfrmZDYHelp_Img.FormDestroy(Sender: TObject);
begin
inherited;
WriteCxGrid('自定义' + Trim(flag), TV1, '自定义数据');
frmZDYHelp := nil;
end;
end.

View File

@ -273,7 +273,7 @@ inherited frmTradeClothInspList: TfrmTradeClothInspList
end
object v1Column7: TcxGridDBColumn
Caption = #30133#28857#24773#20917
DataBinding.FieldName = 'FlawList'
DataBinding.FieldName = 'FlawList1'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
@ -605,7 +605,6 @@ inherited frmTradeClothInspList: TfrmTradeClothInspList
Color = 16242829
ParentBackground = False
TabOrder = 1
ExplicitTop = 39
object Label3: TLabel
Left = 195
Top = 10

View File

@ -34,7 +34,8 @@ uses
U_ZDYHelp in '..\..\..\public10\ThreeFun\Form\U_ZDYHelp.pas' {frmZDYHelp},
U_TradeKCListSel in 'U_TradeKCListSel.pas' {frmTradeKCListSel},
U_DeliTradePlanSel in 'U_DeliTradePlanSel.pas' {frmDeliTradePlanSel},
U_BaseDataLink in '..\..\..\public10\design\U_BaseDataLink.pas' {BaseDataLink: TDataModule};
U_BaseDataLink in '..\..\..\public10\design\U_BaseDataLink.pas' {BaseDataLink: TDataModule},
U_TradeClothSplitWeight in 'U_TradeClothSplitWeight.pas' {frmTradeClothSplitWeight};
{$R *.res}

View File

@ -221,6 +221,10 @@
<FormType>dfm</FormType>
<DesignClass>TDataModule</DesignClass>
</DCCReference>
<DCCReference Include="U_TradeClothSplitWeight.pas">
<Form>frmTradeClothSplitWeight</Form>
<FormType>dfm</FormType>
</DCCReference>
<BuildConfiguration Include="Debug">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>

View File

@ -2,54 +2,55 @@
<BorlandProject>
<Transactions>
<Transaction>1899-12-30 00:00:00.000.048,=D:\Dp10Repo\public10\design\U_BaseList.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.527,=D:\Dp10Repo\项目代码\骉骐\T04贸易明细仓库\U_DeliTradePlanSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.760,=D:\Dp10Repo\项目代码\RTBasics\T00贸易通用窗体\U_TradePlanSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.939,=D:\Dp10Repo\public10\design\U_BaseInput.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.684,D:\Dp10Repo\项目代码\RTBasics\G04贸易明细仓库\TradeClothStk.dproj=D:\Dp10Repo\项目代码\RTBasics\G04贸易明细仓库\InformationBase.dproj</Transaction>
<Transaction>1899-12-30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.900,=D:\Dp10Repo\项目代码\华府\A00通用窗体\U_LabelPrint.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.890,=D:\Dp10Repo\项目代码\骉骐\T04贸易明细仓库\U_TradeClothInListNew.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.135,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ZDYHelp.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.844,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_AttachmentUpload.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.163,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LbaelMapSet.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.832,=D:\Dp10Repo\public10\design\U_BaseHelp.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.760,=D:\Dp10Repo\项目代码\RTBasics\T00贸易通用窗体\U_TradePlanSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.355,=D:\Dp10Repo\项目代码\骉骐\T04贸易明细仓库\U_TradeKCListSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.975,=D:\Dp10Repo\public10\ThreeFun\Fun\U_CompressionFun.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.572,D:\Dp10Repo\项目代码\RTBasics\D03针织成品仓库\U_KnitPlanSel.dfm=D:\Dp10Repo\项目代码\RTBasics\G00贸易通用窗体\U_TradePlanSel.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.832,=D:\Dp10Repo\public10\design\U_BaseHelp.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.296,=D:\Dp10Repo\项目代码\D10myBiaoqi\T04贸易明细仓库\U_TradeClothSplitWeight.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.527,=D:\Dp10Repo\项目代码\骉骐\T04贸易明细仓库\U_DeliTradePlanSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.097,D:\Dp10Repo\项目代码\华府\A00通用窗体\U_LabelPrint.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.733,=D:\Dp10Repo\项目代码\骉骐\T04贸易明细仓库\U_TradeStockListSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.149,=D:\Dp10Repo\public10\ThreeFun\Form\U_ZDYHelp.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.493,=D:\Dp10Repo\项目代码\RTBasics\A00通用模板\Unit1.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.097,D:\Dp10Repo\项目代码\华府\A00通用窗体\U_LabelPrint.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.339,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.808,=D:\Dp10Repo\public10\design\U_BaseDataLink.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.733,=D:\Dp10Repo\项目代码\骉骐\T04贸易明细仓库\U_TradeStockListSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.630,=D:\Dp10Repo\项目代码\RTBasics\G00贸易通用窗体\U_TradePlanSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.572,D:\Dp10Repo\项目代码\RTBasics\G00贸易通用窗体\U_TradePlanSel.pas=D:\Dp10Repo\项目代码\RTBasics\D03针织成品仓库\U_KnitPlanSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.572,D:\Dp10Repo\项目代码\RTBasics\G00贸易通用窗体\U_TradePlanSel.dfm=D:\Dp10Repo\项目代码\RTBasics\D03针织成品仓库\U_KnitPlanSel.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.900,=D:\Dp10Repo\项目代码\华府\A00通用窗体\U_LabelPrint.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.059,=D:\Dp10Repo\项目代码\华府\A00通用窗体\U_LabelPrint.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.649,=D:\Dp10Repo\项目代码\RTBasics\G00贸易通用窗体\U_TradePlanSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.520,=D:\Dp10Repo\项目代码\骉骐\T04贸易明细仓库\U_TradeClothOutListNew.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.178,=D:\Dp10Repo\public10\design\U_WindowFormdesign.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.123,=D:\Dp10Repo\public10\design\U_globalVar.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.868,=D:\Dp10Repo\项目代码\RTBasics\G04贸易明细仓库\U_TradeClothWaitStorage.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.903,=D:\Dp10Repo\项目代码\华府\A00通用窗体\U_LabelMapSet.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.939,=D:\Dp10Repo\public10\design\U_BaseInput.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.059,=D:\Dp10Repo\项目代码\华府\A00通用窗体\U_LabelPrint.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.572,D:\Dp10Repo\项目代码\RTBasics\D03针织成品仓库\U_KnitPlanSel.pas=D:\Dp10Repo\项目代码\RTBasics\G00贸易通用窗体\U_TradePlanSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.630,=D:\Dp10Repo\项目代码\RTBasics\G00贸易通用窗体\U_TradePlanSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.497,=D:\Dp10Repo\项目代码\骉骐\T04贸易明细仓库\U_TradeClothStkListNew.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.178,=D:\Dp10Repo\public10\design\U_WindowFormdesign.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.736,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ModuleNote.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm</Transaction>
<Transaction>1899-12-30 00:00:00.000.434,=D:\Dp10Repo\项目代码\华府\A00通用窗体\U_LabelMapSet.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.903,=D:\Dp10Repo\项目代码\华府\A00通用窗体\U_LabelMapSet.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.952,D:\Dp10Repo\项目代码\华府\A00通用窗体\U_LabelMapSet.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.015,=D:\Dp10Repo\public10\ThreeFun\Fun\U_RTFun.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.793,=D:\Dp10Repo\项目代码\RTBasics\G00贸易通用窗体\U_TradeSalesContractSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.997,=D:\Dp10Repo\项目代码\RTBasics\G04贸易明细仓库\U_TradeClothOutEdit.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.086,=D:\Dp10Repo\public10\design\U_cxGridCustomCss.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.684,D:\Dp10Repo\项目代码\RTBasics\G04贸易明细仓库\InformationBase.dproj=D:\Dp10Repo\项目代码\RTBasics\G04贸易明细仓库\TradeClothStk.dproj</Transaction>
<Transaction>1899-12-30 00:00:00.000.015,=D:\Dp10Repo\public10\ThreeFun\Fun\U_RTFun.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.487,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ZDYHelpSel.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.928,=D:\Dp10Repo\项目代码\RTBasics\T00贸易通用窗体\U_TradeSalesContractSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.716,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ProcessSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.868,=D:\Dp10Repo\项目代码\RTBasics\G04贸易明细仓库\U_TradeClothWaitStorage.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.123,=D:\Dp10Repo\public10\design\U_globalVar.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.520,=D:\Dp10Repo\项目代码\骉骐\T04贸易明细仓库\U_TradeClothOutListNew.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.370,D:\Dp10Repo\项目代码\RTBasics\G04贸易明细仓库\Unit1.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.092,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_EmployeeSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.434,=D:\Dp10Repo\项目代码\华府\A00通用窗体\U_LabelMapSet.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.952,D:\Dp10Repo\项目代码\华府\A00通用窗体\U_LabelMapSet.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.422,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.734,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.716,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ProcessSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.844,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_AttachmentUpload.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.163,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LbaelMapSet.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.975,=D:\Dp10Repo\public10\ThreeFun\Fun\U_CompressionFun.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.630,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.734,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.422,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.487,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ZDYHelpSel.pas=</Transaction>
<Transaction>1899-12-30 00:00:00.000.092,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_EmployeeSel.pas</Transaction>
<Transaction>1899-12-30 00:00:00.000.928,=D:\Dp10Repo\项目代码\RTBasics\T00贸易通用窗体\U_TradeSalesContractSel.pas</Transaction>
</Transactions>
<ProjectSortOrder AutoSort="0" SortType="0">
<File Path="android-support-v4.dex.jar"/>
@ -138,5 +139,7 @@
<File Path="U_TradeKCListSel.dfm"/>
<File Path="U_DeliTradePlanSel.pas"/>
<File Path="U_DeliTradePlanSel.dfm"/>
<File Path="U_TradeClothSplitWeight.pas"/>
<File Path="U_TradeClothSplitWeight.dfm"/>
</ProjectSortOrder>
</BorlandProject>

View File

@ -80,6 +80,7 @@ begin
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
Parameters1 := '管理';
Parameters4 := '调整';
Parameters5 := '땐데';
DName:='ADMIN';
end
else

View File

@ -0,0 +1,83 @@
object frmTradeClothSplitWeight: TfrmTradeClothSplitWeight
Left = 682
Top = 315
Caption = #24211#23384#25286#37325
ClientHeight = 127
ClientWidth = 330
Color = clWhite
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poMainFormCenter
PixelsPerInch = 96
TextHeight = 13
object Panel1: TPanel
Left = 0
Top = 0
Width = 330
Height = 127
Align = alClient
TabOrder = 0
DesignSize = (
330
127)
object Label1: TLabel
Left = 28
Top = 40
Width = 30
Height = 13
Anchors = []
AutoSize = False
Caption = #37325#37327
end
object Button1: TButton
Left = 208
Top = 37
Width = 75
Height = 21
Caption = #30830#35748
TabOrder = 0
OnClick = Button1Click
end
object Len: TEdit
Left = 64
Top = 37
Width = 121
Height = 21
Anchors = []
TabOrder = 1
end
object Button2: TButton
Left = 208
Top = 76
Width = 75
Height = 25
Caption = #20851#38381
TabOrder = 2
OnClick = Button2Click
end
end
object ADOQueryMain: TADOQuery
Connection = DataLink_TradeClothStk.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 293
Top = 373
end
object ADOQueryTemp: TADOQuery
Connection = DataLink_TradeClothStk.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 197
Top = 373
end
object ADOQueryCmd: TADOQuery
Connection = DataLink_TradeClothStk.ADOLink
Parameters = <>
Left = 101
Top = 373
end
end

View File

@ -0,0 +1,71 @@
unit U_TradeClothSplitWeight;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, DB, ADODB;
type
TfrmTradeClothSplitWeight = class(TForm)
Panel1: TPanel;
Button1: TButton;
Label1: TLabel;
Button2: TButton;
ADOQueryMain: TADOQuery;
ADOQueryTemp: TADOQuery;
ADOQueryCmd: TADOQuery;
Len: TEdit;
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
FStkID: string;
{ Public declarations }
end;
var
frmTradeClothSplitWeight: TfrmTradeClothSplitWeight;
implementation
uses
U_DataLink;
{$R *.dfm}
procedure TfrmTradeClothSplitWeight.Button2Click(Sender: TObject);
begin
Close;
end;
procedure TfrmTradeClothSplitWeight.Button1Click(Sender: TObject);
begin
if StrToFloatDef(Len.Text, 0) = 0 then
begin
application.MessageBox('请输入拆分米数', '提示信息', 0);
end;
try
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add(' exec P_Trade_Cloth_Split_weight ');
sql.Add(' @StkID=' + QuotedStr(FStkID));
sql.Add(',@SplitWeight=' + Len.Text);
Sql.Add(',@FillId=' + quotedstr(DCode));
Sql.Add(',@Filler=' + quotedstr(DName));
open;
end;
if ADOQueryCmd.FieldByName('intReturn').AsInteger = -1 then
raise Exception.Create(pchar(trim(ADOQueryCmd.FieldByName('ShowMsg').AsString)));
ModalResult := 1;
except
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
end;
end;
end.

View File

@ -7,6 +7,7 @@
FormStyle = fsMDIChild
Position = poScreenCenter
Visible = True
ExplicitTop = -22
ExplicitWidth = 1556
ExplicitHeight = 631
PixelsPerInch = 96
@ -65,16 +66,24 @@
ImageIndex = 23
OnClick = ToolButton1Click
end
object TBExport: TToolButton
object ToolButton9: TToolButton
Left = 332
Top = 0
AutoSize = True
Caption = #25286#37325
ImageIndex = 23
OnClick = ToolButton9Click
end
object TBExport: TToolButton
Left = 403
Top = 0
AutoSize = True
Caption = #23548#20986
ImageIndex = 20
OnClick = TBExportClick
end
object ToolButton4: TToolButton
Left = 403
Left = 474
Top = 0
AutoSize = True
Caption = #20445#23384#26684#24335
@ -82,7 +91,7 @@
OnClick = ToolButton4Click
end
object TBClose: TToolButton
Left = 498
Left = 569
Top = 0
AutoSize = True
Caption = #20851#38381
@ -90,7 +99,7 @@
OnClick = TBCloseClick
end
object ToolButton5: TToolButton
Left = 569
Left = 640
Top = 0
AutoSize = True
Caption = #24211#20301#35843#25972
@ -99,7 +108,7 @@
OnClick = ToolButton5Click
end
object ToolButton6: TToolButton
Left = 664
Left = 735
Top = 0
Caption = #24211#23384#31867#22411#35843#25972
ImageIndex = 1
@ -107,7 +116,7 @@
OnClick = ToolButton6Click
end
object ToolButton7: TToolButton
Left = 779
Left = 850
Top = 0
AutoSize = True
Caption = #21333#20215#35843#25972
@ -116,7 +125,7 @@
OnClick = ToolButton7Click
end
object ToolButton8: TToolButton
Left = 874
Left = 945
Top = 0
AutoSize = True
Caption = #25968#25454#35843#25972
@ -138,7 +147,7 @@
Font.Style = [fsBold]
ParentFont = False
TabOrder = 1
Properties.ActivePage = cxTabSheet1
Properties.ActivePage = cxTabSheet2
Properties.CustomButtons.Buttons = <>
Properties.Style = 5
OnChange = cxPageControl1Change

View File

@ -184,6 +184,7 @@ type
Tv1Column15: TcxGridDBColumn;
Tv1Column16: TcxGridDBColumn;
TV2Column13: TcxGridDBColumn;
ToolButton9: TToolButton;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject);
procedure TBRafreshClick(Sender: TObject);
@ -219,6 +220,7 @@ type
procedure ToolButton7Click(Sender: TObject);
procedure ToolButton8Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure ToolButton9Click(Sender: TObject);
private
CurrentPage, RecordsNumber: Integer;
lstPacketId: TStringList;
@ -227,14 +229,15 @@ type
procedure SetStatus();
{ Private declarations }
public
canshu1, FWorkshop, canshu2, canshu4: string;
canshu1, FWorkshop, canshu2, canshu4, canshu5: string;
{ Public declarations }
end;
implementation
uses
U_DataLink, U_RTFun, U_LabelPrint, U_TradeClothSplit, U_ZDYHelp;
U_DataLink, U_RTFun, U_LabelPrint, U_TradeClothSplit, U_ZDYHelp,
U_TradeClothSplitWeight;
{$R *.dfm}
procedure TfrmTradeClothStkListNew.InitPage();
@ -284,6 +287,20 @@ end;
procedure TfrmTradeClothStkListNew.SetStatus();
begin
if cxPageControl1.ActivePageIndex = 1 then
begin
ToolButton1.Visible := True;
ToolButton9.Visible := True;
end
else
begin
ToolButton1.Visible := False;
ToolButton9.Visible := False;
end;
// if canshu1 then
if canshu4 = 'µ÷Õû' then
begin
@ -345,6 +362,7 @@ begin
sql.Add(' ,COUNT(PieceNo) SumPieceNo,sum(GrossWeight) SumGrossWeight,sum(Tare) SumTare,sum(NetWeight) SumNetWeight');
sql.Add(' ,Sum(Meter) SumMeter,Sum(Yardage) SumYardage,Sum(Amount) Amount');
sql.Add(' from V_Trade_Cloth_Stk A where 1=1 ');
sql.Add(' and StkType=''' + trim(canshu5) + ''' ');
if trim(FWorkshop) <> '' then
sql.Add(' and Workshop=''' + trim(FWorkshop) + ''' ');
if canshu2 = 'ËÀ»õ' then
@ -382,12 +400,14 @@ begin
sql.Add('(select rownumber=cast((row_number() over(order by AA.IOTime desc)) as int)');
sql.Add(',COUNT(1) OVER() AS TotalCount');
sql.Add(', kl= DATEDIFF(dd,IOTime, GETDATE()),* from V_Trade_Cloth_Stk AA where 1=1 ');
sql.Add(' and StkType=''' + trim(canshu5) + ''' ');
if trim(FWorkshop) <> '' then
sql.Add(' and Workshop=''' + trim(FWorkshop) + ''' ');
if canshu2 = 'ËÀ»õ' then
sql.Add(' and ISDie=1 ');
if canshu2 = '´ÎÆ·' then
sql.Add(' and Grade=''´ÎÆ·'' ');
sql.Add('and 1=1 ' + WSql);
sql.Add(') temp_row');
sql.Add(' where rownumber> ' + inttostr(((CurrentPage - 1) * RecordsNumber)));
@ -445,6 +465,8 @@ begin
canshu2 := Trim(Self.fParameters2);
canshu4 := Trim(Self.fParameters4);
canshu5 := Trim(Self.fParameters5);
SetStatus();
InitPage();
end;
@ -901,5 +923,23 @@ begin
end;
procedure TfrmTradeClothStkListNew.ToolButton9Click(Sender: TObject);
begin
try
frmTradeClothSplitWeight := TfrmTradeClothSplitWeight.Create(Application);
with frmTradeClothSplitWeight do
begin
FStkID := trim(self.CDS_1.FieldByName('StkID').AsString);
if ShowModal = 1 then
begin
InitGrid('');
end;
end;
finally
frmTradeClothSplitWeight.Free;
end;
end;
end.