1087 lines
29 KiB
ObjectPascal
1087 lines
29 KiB
ObjectPascal
|
||
unit U_GetDllForm;
|
||
interface
|
||
uses
|
||
Windows,Messages,forms,OleCtnrs,DateUtils,SysUtils,ADODB,IniFiles,Dxcore,activex;
|
||
|
||
function GetDllForm(App:Tapplication; FormH:hwnd; FormID:integer;
|
||
Language: integer; WinStyle:integer;
|
||
GCode: Pchar; GName: Pchar; DataBase:Pchar;Title:PChar;
|
||
Parameters1:PChar;Parameters2:PChar;Parameters3:PChar;Parameters4:PChar;
|
||
Parameters5:PChar;Parameters6:PChar;Parameters7:PChar;Parameters8:PChar;
|
||
Parameters9:PChar;Parameters10:PChar;DataBaseStr:PChar):hwnd;export;stdcall;
|
||
function ConnData():Boolean;
|
||
Function GetsysParam(muserId:pchar;fparam1:pchar):Boolean;
|
||
|
||
implementation
|
||
uses
|
||
U_DataLink,U_Fun,U_iniParam,U_MJManageNewFDNew,U_ProductOrderList,U_ProductOrderAnPai,U_SetBanZu
|
||
,U_BangAdd,U_MJEdit,U_JYOrderCDOne,U_JYOrderCDMore,U_CpCkSaoMNewSel,U_CKProductBCPInList
|
||
,U_CKProductBCPOutList,U_BanCpHCSaoM,U_CKProductBCPHCList,U_CKProductBCPKCList,
|
||
U_CKProductBCPKCHZList,U_CpRkSaoMNew,U_ClothContractList,U_ClothContractListDH,U_ClothContractListLL,
|
||
U_ClothContractKCList,U_ContractList,U_ProductOrderNewList,U_ClothContractListWJG,U_ClothPDInfoList,
|
||
U_OrderJDList,U_ProductOrderAnPaiGQX,U_ClothHCList,U_ContractListNX,U_ClothContractListSX,U_ClothContractListDHSX
|
||
,U_ClothContractListLLSX,U_ClothContractListHZ,U_ProductOrderLBNameSet,U_ClothContractListDHSXQJG,U_ProductOrderNewList_JD,
|
||
U_ProductOrderNewList_CY,U_HCList,U_OrderInPut_HYWT,U_ModulePromptList,U_ProductOrderNewList_FB,U_FanYangList,U_FanYangListHZ,
|
||
U_CKProductRKHZList,U_CKProductCKHZList,U_CKJYList,U_ProductOrderLBNameSetFZ,U_Contract_Main;
|
||
|
||
/////////////////////////////////////////////////////////////////
|
||
// 功能说明:取Dll中得窗体 //
|
||
// 参数说明:App>>调用应用程序; //
|
||
// FormH>>调用窗口句柄 ; //
|
||
// FormID>>窗口号; //
|
||
// Language>>语言种类; //
|
||
// WinStyle>>窗口类型; //
|
||
/////////////////////////////////////////////////////////////////
|
||
function GetDllForm(App:Tapplication; FormH:hwnd; FormID:integer;
|
||
Language: integer; WinStyle:integer;
|
||
GCode: Pchar; GName: Pchar; DataBase:Pchar;Title:PChar;
|
||
Parameters1:PChar;Parameters2:PChar;Parameters3:PChar;Parameters4:PChar;
|
||
Parameters5:PChar;Parameters6:PChar;Parameters7:PChar;Parameters8:PChar;
|
||
Parameters9:PChar;Parameters10:PChar;
|
||
DataBaseStr:PChar):hwnd;
|
||
|
||
var
|
||
mnewHandle: hwnd;
|
||
mstyle: TFormStyle; // 0:子窗口; 1:普通窗口
|
||
mstate: TWindowState;
|
||
mborderstyle: TFormBorderStyle;
|
||
begin
|
||
mNewHandle:=0;
|
||
DName:=GName;
|
||
DCode:=GCode;
|
||
DdataBase:=DataBase;
|
||
DTitCaption:=Title;
|
||
DParameters1:=Parameters1;
|
||
DParameters2:=Parameters2;
|
||
DParameters3:=Parameters3;
|
||
DParameters4:=Parameters4;
|
||
DParameters5:=Parameters5;
|
||
DParameters6:=Parameters6;
|
||
DParameters7:=Parameters7;
|
||
DParameters8:=Parameters8;
|
||
DParameters9:=Parameters9;
|
||
DParameters10:=Parameters10;
|
||
|
||
|
||
MainApplication:=App;
|
||
DCurHandle:=FormH;
|
||
IsDelphiLanguage:= Language;
|
||
|
||
Application:=TApplication(App);
|
||
DCurHandle:=0;
|
||
|
||
|
||
//赋值链接字符串
|
||
SetLength(server, 255);
|
||
SetLength(dtbase, 255);
|
||
SetLength(user, 255);
|
||
SetLength(pswd, 255);
|
||
|
||
//server:='192.168.1.99'; //192.168.1.113
|
||
//dtbase:='powertexdata';
|
||
// server:='.';
|
||
server:='47.101.61.158,7781';
|
||
dtbase:='leixiaofudata';
|
||
// dtbase:='jianweidata';
|
||
user:='haoyuesa';
|
||
pswd:='rightsoft@123';
|
||
// pswd:='numlock';
|
||
DConString := 'Provider=SQLOLEDB.1;Password='+pswd+';Persist Security Info=True;User ID='
|
||
+user+';Initial Catalog='+dtbase+';Data Source='+server;
|
||
IF trim(DataBaseStr)<>'' then
|
||
DConString:=DataBaseStr;
|
||
DParameters1:='高权限';
|
||
//DCode:='002';
|
||
// DName:='ADMIN';
|
||
//DParameters2:='管理';
|
||
// DParameters2:='次品';
|
||
// database:='高权限';
|
||
if not ConnData() then
|
||
begin
|
||
result:=0;
|
||
exit;
|
||
end;
|
||
if IsINIFile() then
|
||
ReadINIFile()
|
||
else
|
||
WriteINIFile ;
|
||
GetsysParam('','');
|
||
// 定义窗口类型 、状态
|
||
if WinStyle=0 then
|
||
begin
|
||
mstyle := fsMDIChild ;
|
||
mstate := wsMaximized ;
|
||
mborderstyle := bsSizeable;
|
||
end
|
||
else
|
||
begin
|
||
mstyle := fsNormal ;
|
||
mstate := wsNormal ;
|
||
mborderstyle := bsSizeable;
|
||
end;
|
||
////////////////////
|
||
{ GetSWLDZ('192.168.1.246');
|
||
if IpCall<>0 then
|
||
begin
|
||
Result:=0;
|
||
Application.MessageBox('!!网络不通!!','提示',0);
|
||
Exit;
|
||
end;
|
||
if Trim(IpWLDZStr)<>'D4:AE:52:BE:9F:02' then
|
||
begin
|
||
Result:=0;
|
||
Application.MessageBox('!!数据库连接失败!!','提示',0);
|
||
Exit;
|
||
end; }
|
||
/////////////////////
|
||
//调用子模块窗口
|
||
case FormId of
|
||
0: //订单合同(外销)
|
||
begin
|
||
if frmContractList=nil then
|
||
begin
|
||
frmContractList:= TfrmContractList.Create(application.MainForm);
|
||
with frmContractList do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmContractList.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmContractList.Handle;
|
||
|
||
end ;
|
||
1: //订单合同(内销)
|
||
begin
|
||
if frmContractListNX=nil then
|
||
begin
|
||
frmContractListNX:= TfrmContractListNX.Create(application.MainForm);
|
||
with frmContractListNX do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmContractListNX.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmContractListNX.Handle;
|
||
end ;
|
||
201: //生产指示单
|
||
begin
|
||
if frmProductOrderNewList=nil then
|
||
begin
|
||
frmProductOrderNewList:= TfrmProductOrderNewList.Create(application.MainForm);
|
||
with frmProductOrderNewList do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmProductOrderNewList.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmProductOrderNewList.Handle;
|
||
|
||
end;
|
||
2: // 成品检验
|
||
begin
|
||
if frmMJManageNewFDNewSF=nil then
|
||
begin
|
||
frmMJManageNewFDNewSF:= TfrmMJManageNewFDNewSF.Create(application.MainForm);
|
||
with frmMJManageNewFDNewSF do
|
||
begin
|
||
fmanage:=Trim(database);
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmMJManageNewFDNewSF.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmMJManageNewFDNewSF.Handle;
|
||
end ;
|
||
|
||
3: //采购合同
|
||
begin
|
||
if frmClothContractListHZ=nil then
|
||
begin
|
||
frmClothContractListHZ:= TfrmClothContractListHZ.Create(application.MainForm);
|
||
with frmClothContractListHZ do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmClothContractListHZ.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmClothContractListHZ.Handle;
|
||
|
||
end ;
|
||
|
||
4: //纱线 到货
|
||
begin
|
||
if frmClothContractListDHSX=nil then
|
||
begin
|
||
frmClothContractListDHSX:= TfrmClothContractListDHSX.Create(application.MainForm);
|
||
with frmClothContractListDHSX do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmClothContractListDHSX.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmClothContractListDHSX.Handle;
|
||
|
||
end ;
|
||
41: //染纱
|
||
begin
|
||
if frmClothContractListDHSXQJG=nil then
|
||
begin
|
||
frmClothContractListDHSXQJG:= TfrmClothContractListDHSXQJG.Create(application.MainForm);
|
||
with frmClothContractListDHSXQJG do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmClothContractListDHSXQJG.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmClothContractListDHSXQJG.Handle;
|
||
end ;
|
||
5: //纱线织成品出库
|
||
begin
|
||
if frmClothContractListLLSX=nil then
|
||
begin
|
||
frmClothContractListLLSX:= TfrmClothContractListLLSX.Create(application.MainForm);
|
||
with frmClothContractListLLSX do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmClothContractListLLSX.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmClothContractListLLSX.Handle;
|
||
end ;
|
||
|
||
61: //提示窗口
|
||
begin
|
||
if frmModulePromptList=nil then
|
||
begin
|
||
frmModulePromptList:= TfrmModulePromptList.Create(application.MainForm);
|
||
with frmModulePromptList do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmModulePromptList.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmModulePromptList.Handle;
|
||
end ;
|
||
|
||
6: //坯布采购
|
||
begin
|
||
if frmClothContractList=nil then
|
||
begin
|
||
frmClothContractList:= TfrmClothContractList.Create(application.MainForm);
|
||
with frmClothContractList do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FType:=trim(database);
|
||
// FType:='';
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmClothContractList.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmClothContractList.Handle;
|
||
end ;
|
||
611: //采购合同
|
||
begin
|
||
if frmContract_Main=nil then
|
||
begin
|
||
frmContract_Main:= TfrmContract_Main.Create(application.MainForm);
|
||
with frmContract_Main do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmContract_Main.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmContract_Main.Handle;
|
||
end ;
|
||
|
||
7: //坯布 到货
|
||
begin
|
||
if frmClothContractListDH=nil then
|
||
begin
|
||
frmClothContractListDH:= TfrmClothContractListDH.Create(application.MainForm);
|
||
with frmClothContractListDH do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmClothContractListDH.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmClothContractListDH.Handle;
|
||
|
||
end ;
|
||
|
||
8: //坯布领料
|
||
begin
|
||
if frmClothContractListLL=nil then
|
||
begin
|
||
frmClothContractListLL:= TfrmClothContractListLL.Create(application.MainForm);
|
||
with frmClothContractListLL do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmClothContractListLL.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmClothContractListLL.Handle;
|
||
|
||
end ;
|
||
9: //外加工
|
||
begin
|
||
if frmClothContractListWJG=nil then
|
||
begin
|
||
frmClothContractListWJG:= TfrmClothContractListWJG.Create(application.MainForm);
|
||
with frmClothContractListWJG do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmClothContractListWJG.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmClothContractListWJG.Handle;
|
||
|
||
end ;
|
||
10: //回仓管理
|
||
begin
|
||
if frmProductOrderAnPai=nil then
|
||
begin
|
||
frmProductOrderAnPai:= TfrmProductOrderAnPai.Create(application.MainForm);
|
||
with frmProductOrderAnPai do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmProductOrderAnPai.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmProductOrderAnPai.Handle;
|
||
|
||
end ;
|
||
|
||
11: //标签皮重设置
|
||
begin
|
||
if frmProductOrderLBNameSet=nil then
|
||
begin
|
||
frmProductOrderLBNameSet:= TfrmProductOrderLBNameSet.Create(application.MainForm);
|
||
with frmProductOrderLBNameSet do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmProductOrderLBNameSet.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmProductOrderLBNameSet.Handle;
|
||
|
||
end ;
|
||
12: //布匹管理
|
||
begin
|
||
if frmMJEdit=nil then
|
||
begin
|
||
frmMJEdit:= TfrmMJEdit.Create(application.MainForm);
|
||
with frmMJEdit do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmMJEdit.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmMJEdit.Handle;
|
||
|
||
end ;
|
||
13: //入库扫描
|
||
begin
|
||
if frmCpRkSaoMNew=nil then
|
||
begin
|
||
frmCpRkSaoMNew:= TfrmCpRkSaoMNew.Create(application.MainForm);
|
||
with frmCpRkSaoMNew do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmCpRkSaoMNew.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmCpRkSaoMNew.Handle;
|
||
|
||
end ;
|
||
14: //成品出库
|
||
begin
|
||
if frmCpCkSaoMNewSel=nil then
|
||
begin
|
||
frmCpCkSaoMNewSel:= TfrmCpCkSaoMNewSel.Create(application.MainForm);
|
||
with frmCpCkSaoMNewSel do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmCpCkSaoMNewSel.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmCpCkSaoMNewSel.Handle;
|
||
|
||
end ;
|
||
15: //成品入库列表
|
||
begin
|
||
if frmCKProductBCPInList=nil then
|
||
begin
|
||
frmCKProductBCPInList:= TfrmCKProductBCPInList.Create(application.MainForm);
|
||
with frmCKProductBCPInList do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmCKProductBCPInList.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmCKProductBCPInList.Handle;
|
||
end ;
|
||
16: //成品出库列表
|
||
begin
|
||
if frmCKProductBCPOutList=nil then
|
||
begin
|
||
frmCKProductBCPOutList:= TfrmCKProductBCPOutList.Create(application.MainForm);
|
||
with frmCKProductBCPOutList do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmCKProductBCPOutList.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmCKProductBCPOutList.Handle;
|
||
|
||
end ;
|
||
17: //库存列表
|
||
begin
|
||
if frmCKProductBCPKCList=nil then
|
||
begin
|
||
frmCKProductBCPKCList:= TfrmCKProductBCPKCList.Create(application.MainForm);
|
||
with frmCKProductBCPKCList do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmCKProductBCPKCList.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmCKProductBCPKCList.Handle;
|
||
|
||
end ;
|
||
18: //库存汇总列表
|
||
begin
|
||
if frmCKProductBCPKCHZList=nil then
|
||
begin
|
||
frmCKProductBCPKCHZList:= TfrmCKProductBCPKCHZList.Create(application.MainForm);
|
||
with frmCKProductBCPKCHZList do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmCKProductBCPKCHZList.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmCKProductBCPKCHZList.Handle;
|
||
|
||
end ;
|
||
19: //检验报告
|
||
begin
|
||
if frmJYOrderCDOne=nil then
|
||
begin
|
||
frmJYOrderCDOne:= TfrmJYOrderCDOne.Create(application.MainForm);
|
||
with frmJYOrderCDOne do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmJYOrderCDOne.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmJYOrderCDOne.Handle;
|
||
|
||
end ;
|
||
20: //检验分析
|
||
begin
|
||
if frmJYOrderCDMore=nil then
|
||
begin
|
||
frmJYOrderCDMore:= TfrmJYOrderCDMore.Create(application.MainForm);
|
||
with frmJYOrderCDMore do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmJYOrderCDMore.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmJYOrderCDMore.Handle;
|
||
|
||
end ;
|
||
21: //待检布库存
|
||
begin
|
||
if frmClothPDInfoList=nil then
|
||
begin
|
||
frmClothPDInfoList:= TfrmClothPDInfoList.Create(application.MainForm);
|
||
with frmClothPDInfoList do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmClothPDInfoList.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmClothPDInfoList.Handle;
|
||
|
||
end ;
|
||
22: //回仓查询
|
||
begin
|
||
if frmClothHCList=nil then
|
||
begin
|
||
frmClothHCList:= TfrmClothHCList.Create(application.MainForm);
|
||
with frmClothHCList do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmClothHCList.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmClothHCList.Handle;
|
||
|
||
end ;
|
||
|
||
23: //生产指示单进度查询
|
||
begin
|
||
if frmProductOrderNewList_JD=nil then
|
||
begin
|
||
frmProductOrderNewList_JD:= TfrmProductOrderNewList_JD.Create(application.MainForm);
|
||
with frmProductOrderNewList_JD do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmProductOrderNewList_JD.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmProductOrderNewList_JD.Handle;
|
||
|
||
end ;
|
||
|
||
|
||
24: //坯布库存汇总查询
|
||
begin
|
||
if frmClothContractKCList=nil then
|
||
begin
|
||
frmClothContractKCList:= TfrmClothContractKCList.Create(application.MainForm);
|
||
with frmClothContractKCList do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmClothContractKCList.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmClothContractKCList.Handle;
|
||
|
||
end ;
|
||
|
||
25: //出运计划
|
||
begin
|
||
if frmProductOrderNewList_CY=nil then
|
||
begin
|
||
frmProductOrderNewList_CY:= TfrmProductOrderNewList_CY.Create(application.MainForm);
|
||
with frmProductOrderNewList_CY do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmProductOrderNewList_CY.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmProductOrderNewList_CY.Handle;
|
||
end ;
|
||
|
||
26: //货运委托
|
||
begin
|
||
if frmorderInput_HYWT=nil then
|
||
begin
|
||
frmorderInput_HYWT:=TfrmorderInput_HYWT.create(application.MainForm);
|
||
with frmorderInput_HYWT do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle:=mstyle;
|
||
windowState:=mstate;
|
||
BorderStyle:=mborderstyle;
|
||
end;
|
||
end
|
||
else
|
||
frmorderInput_HYWT.BringToFront;
|
||
mNewHandle:=frmorderInput_HYWT.Handle;
|
||
end ;
|
||
|
||
27: //发票信息
|
||
begin
|
||
if frmProductOrderNewList_FB=nil then
|
||
begin
|
||
frmProductOrderNewList_FB:= TfrmProductOrderNewList_FB.Create(application.MainForm);
|
||
with frmProductOrderNewList_FB do
|
||
begin
|
||
caption:=Trim(Title);
|
||
ftype:='输入';
|
||
// ftype:=trim(DataBase);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmProductOrderNewList_FB.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmProductOrderNewList_FB.Handle;
|
||
end ;
|
||
|
||
28: //放样指示单
|
||
begin
|
||
if FrmFanYangList=nil then
|
||
begin
|
||
FrmFanYangList:= TFrmFanYangList.Create(application.MainForm);
|
||
with FrmFanYangList do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
FrmFanYangList.BringToFront;
|
||
//句柄
|
||
mNewHandle:=FrmFanYangList.Handle;
|
||
end ;
|
||
|
||
29: //放样指示单汇总
|
||
begin
|
||
if FrmFanYangListHZ=nil then
|
||
begin
|
||
FrmFanYangListHZ:= TFrmFanYangListHZ.Create(application.MainForm);
|
||
with FrmFanYangListHZ do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
FrmFanYangListHZ.BringToFront;
|
||
//句柄
|
||
mNewHandle:=FrmFanYangListHZ.Handle;
|
||
end ;
|
||
30: //入库汇总
|
||
begin
|
||
if frmCKProductRKHZList=nil then
|
||
begin
|
||
frmCKProductRKHZList:= TfrmCKProductRKHZList.Create(application.MainForm);
|
||
with frmCKProductRKHZList do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmCKProductRKHZList.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmCKProductRKHZList.Handle;
|
||
end ;
|
||
31: //出库汇总
|
||
begin
|
||
if frmCKProductCKHZList=nil then
|
||
begin
|
||
frmCKProductCKHZList:= TfrmCKProductCKHZList.Create(application.MainForm);
|
||
with frmCKProductCKHZList do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmCKProductCKHZList.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmCKProductCKHZList.Handle;
|
||
end ;
|
||
32: //打卷产量统计
|
||
begin
|
||
if frmCKJYList=nil then
|
||
begin
|
||
frmCKJYList:= TfrmCKJYList.Create(application.MainForm);
|
||
with frmCKJYList do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmCKJYList.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmCKJYList.Handle;
|
||
end ;
|
||
33: //标签皮重设置
|
||
begin
|
||
if frmProductOrderLBNameSetFZ=nil then
|
||
begin
|
||
frmProductOrderLBNameSetFZ:= TfrmProductOrderLBNameSetFZ.Create(application.MainForm);
|
||
with frmProductOrderLBNameSetFZ do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmProductOrderLBNameSetFZ.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmProductOrderLBNameSetFZ.Handle;
|
||
end ;
|
||
|
||
{
|
||
|
||
101: //回仓管理 (高权限)
|
||
begin
|
||
if frmProductOrderAnPaiGQX=nil then
|
||
begin
|
||
frmProductOrderAnPaiGQX:= TfrmProductOrderAnPaiGQX.Create(application.MainForm);
|
||
with frmProductOrderAnPaiGQX do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmProductOrderAnPaiGQX.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmProductOrderAnPaiGQX.Handle;
|
||
|
||
end ;
|
||
|
||
|
||
3: // 班组设置
|
||
begin
|
||
if frmSetBanZu=nil then
|
||
begin
|
||
frmSetBanZu:= TfrmSetBanZu.Create(application.MainForm);
|
||
with frmSetBanZu do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmSetBanZu.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmSetBanZu.Handle;
|
||
|
||
end ;
|
||
|
||
|
||
|
||
|
||
8: //成品回仓
|
||
begin
|
||
if frmBanCpHCSaoM=nil then
|
||
begin
|
||
frmBanCpHCSaoM:= TfrmBanCpHCSaoM.Create(application.MainForm);
|
||
with frmBanCpHCSaoM do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmBanCpHCSaoM.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmBanCpHCSaoM.Handle;
|
||
|
||
end ;
|
||
9: //成品列表
|
||
begin
|
||
if frmCKProductBCPHCList=nil then
|
||
begin
|
||
frmCKProductBCPHCList:= TfrmCKProductBCPHCList.Create(application.MainForm);
|
||
with frmCKProductBCPHCList do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmCKProductBCPHCList.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmCKProductBCPHCList.Handle;
|
||
|
||
end ;
|
||
|
||
22: //订单进度查询
|
||
begin
|
||
if frmOrderJDList=nil then
|
||
begin
|
||
frmOrderJDList:= TfrmOrderJDList.Create(application.MainForm);
|
||
with frmOrderJDList do
|
||
begin
|
||
caption:=Trim(Title);
|
||
FormStyle := mstyle ;
|
||
windowState := mstate ;
|
||
BorderStyle := mborderstyle;
|
||
//show;
|
||
end;
|
||
end
|
||
else
|
||
frmOrderJDList.BringToFront;
|
||
//句柄
|
||
mNewHandle:=frmOrderJDList.Handle;
|
||
|
||
end ; }
|
||
|
||
|
||
end ; // end case
|
||
|
||
Result:= mnewHandle;
|
||
// NewDllApp:=Application ;
|
||
end;
|
||
Function GetsysParam(muserId:pchar;fparam1:pchar):Boolean;
|
||
begin
|
||
result:=true;
|
||
//////////////////////////////
|
||
shortDateFormat:='yyyy-MM-dd';
|
||
//服务器日期
|
||
with DataLink_TradeManage.AdoDataLink do
|
||
begin
|
||
close;
|
||
sql.Clear;
|
||
sql.Add('select getDate()as dt');
|
||
open;
|
||
DServerDate:=fieldByName('dt').AsDatetime;
|
||
end;
|
||
result:=true;
|
||
end;
|
||
//===========================================================
|
||
//建立数据库连接池
|
||
//===========================================================
|
||
function ConnData():Boolean;
|
||
var
|
||
IniFile: TIniFile;
|
||
begin
|
||
try
|
||
IniFile := TIniFile.Create(ExtractFilePath(Application.ExeName) + 'SYSTEMSET.INI');
|
||
PicSvr := IniFile.ReadString('SERVER', '服务器地址','127.0.0.1');
|
||
UserDataFlag:=IniFile.ReadString('SERVER', '服务器地址类型','-1');
|
||
finally
|
||
IniFile.Free;
|
||
end;
|
||
if not Assigned(DataLink_TradeManage) then
|
||
DataLink_TradeManage:=TDataLink_TradeManage.Create(Application);
|
||
Try
|
||
with DataLink_TradeManage.ADOLink do
|
||
begin
|
||
if not Connected then
|
||
begin
|
||
Connected:=false;
|
||
ConnectionString:=DConString;
|
||
LoginPrompt:=false;
|
||
Connected:=true;
|
||
end;
|
||
end;
|
||
Result:=true;
|
||
Except
|
||
Result:=false;
|
||
application.MessageBox('数据库连接失败!','错误',mb_Ok+ MB_ICONERROR);
|
||
end;
|
||
|
||
end;
|
||
initialization
|
||
CoInitialize(nil);
|
||
dxUnitsLoader.Initialize;
|
||
|
||
|
||
finalization
|
||
DataLink_TradeManage.Free;
|
||
application := NewDllApp;
|
||
dxUnitsLoader.Finalize;
|
||
|
||
//INITIALIZATION
|
||
// OldDllApp:= Application;
|
||
//
|
||
//FINALIZATION
|
||
// DataLink_TradeManage.Free;
|
||
// Application := OldDllApp;
|
||
|
||
end.
|
||
|