打包 码单
This commit is contained in:
parent
4db9a1e184
commit
b4e34880a9
|
|
@ -2,49 +2,49 @@
|
||||||
Default=1
|
Default=1
|
||||||
ShowNotifications=1
|
ShowNotifications=1
|
||||||
Enabled=1
|
Enabled=1
|
||||||
dxSkinBlack=0
|
dxSkinBlack=1
|
||||||
dxSkinBlue=0
|
dxSkinBlue=1
|
||||||
dxSkinBlueprint=0
|
dxSkinBlueprint=1
|
||||||
dxSkinCaramel=0
|
dxSkinCaramel=1
|
||||||
dxSkinCoffee=0
|
dxSkinCoffee=1
|
||||||
dxSkinDarkRoom=0
|
dxSkinDarkRoom=1
|
||||||
dxSkinDarkSide=0
|
dxSkinDarkSide=1
|
||||||
dxSkinDevExpressDarkStyle=0
|
dxSkinDevExpressDarkStyle=1
|
||||||
dxSkinDevExpressStyle=0
|
dxSkinDevExpressStyle=1
|
||||||
dxSkinFoggy=0
|
dxSkinFoggy=1
|
||||||
dxSkinGlassOceans=0
|
dxSkinGlassOceans=1
|
||||||
dxSkinHighContrast=0
|
dxSkinHighContrast=1
|
||||||
dxSkiniMaginary=0
|
dxSkiniMaginary=1
|
||||||
dxSkinLilian=0
|
dxSkinLilian=1
|
||||||
dxSkinLiquidSky=0
|
dxSkinLiquidSky=1
|
||||||
dxSkinLondonLiquidSky=0
|
dxSkinLondonLiquidSky=1
|
||||||
dxSkinMcSkin=0
|
dxSkinMcSkin=1
|
||||||
dxSkinMetropolis=0
|
dxSkinMetropolis=1
|
||||||
dxSkinMetropolisDark=0
|
dxSkinMetropolisDark=1
|
||||||
dxSkinMoneyTwins=0
|
dxSkinMoneyTwins=1
|
||||||
dxSkinOffice2007Black=0
|
dxSkinOffice2007Black=1
|
||||||
dxSkinOffice2007Blue=0
|
dxSkinOffice2007Blue=1
|
||||||
dxSkinOffice2007Green=0
|
dxSkinOffice2007Green=1
|
||||||
dxSkinOffice2007Pink=0
|
dxSkinOffice2007Pink=1
|
||||||
dxSkinOffice2007Silver=0
|
dxSkinOffice2007Silver=1
|
||||||
dxSkinOffice2010Black=0
|
dxSkinOffice2010Black=1
|
||||||
dxSkinOffice2010Blue=0
|
dxSkinOffice2010Blue=1
|
||||||
dxSkinOffice2010Silver=0
|
dxSkinOffice2010Silver=1
|
||||||
dxSkinOffice2013DarkGray=0
|
dxSkinOffice2013DarkGray=1
|
||||||
dxSkinOffice2013LightGray=0
|
dxSkinOffice2013LightGray=1
|
||||||
dxSkinOffice2013White=0
|
dxSkinOffice2013White=1
|
||||||
dxSkinPumpkin=0
|
dxSkinPumpkin=1
|
||||||
dxSkinSeven=0
|
dxSkinSeven=1
|
||||||
dxSkinSevenClassic=0
|
dxSkinSevenClassic=1
|
||||||
dxSkinSharp=0
|
dxSkinSharp=1
|
||||||
dxSkinSharpPlus=0
|
dxSkinSharpPlus=1
|
||||||
dxSkinSilver=0
|
dxSkinSilver=1
|
||||||
dxSkinSpringTime=0
|
dxSkinSpringTime=1
|
||||||
dxSkinStardust=0
|
dxSkinStardust=1
|
||||||
dxSkinSummer2008=0
|
dxSkinSummer2008=1
|
||||||
dxSkinTheAsphaltWorld=0
|
dxSkinTheAsphaltWorld=1
|
||||||
dxSkinsDefaultPainters=1
|
dxSkinsDefaultPainters=1
|
||||||
dxSkinValentine=0
|
dxSkinValentine=1
|
||||||
dxSkinVS2010=0
|
dxSkinVS2010=1
|
||||||
dxSkinWhiteprint=0
|
dxSkinWhiteprint=1
|
||||||
dxSkinXmas2008Blue=0
|
dxSkinXmas2008Blue=1
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
object frmCPDBao: TfrmCPDBao
|
object frmCPDBao: TfrmCPDBao
|
||||||
Left = 19
|
Left = 324
|
||||||
Top = 72
|
Top = 149
|
||||||
Width = 1382
|
Width = 1551
|
||||||
Height = 753
|
Height = 742
|
||||||
VertScrollBar.Position = 2
|
|
||||||
Caption = #25171#21253#31383#21475
|
Caption = #25171#21253#31383#21475
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
Font.Charset = GB2312_CHARSET
|
Font.Charset = GB2312_CHARSET
|
||||||
|
|
@ -21,8 +20,8 @@ object frmCPDBao: TfrmCPDBao
|
||||||
TextHeight = 12
|
TextHeight = 12
|
||||||
object ToolBar1: TToolBar
|
object ToolBar1: TToolBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = -2
|
Top = 0
|
||||||
Width = 1533
|
Width = 1535
|
||||||
Height = 33
|
Height = 33
|
||||||
ButtonHeight = 30
|
ButtonHeight = 30
|
||||||
ButtonWidth = 59
|
ButtonWidth = 59
|
||||||
|
|
@ -54,8 +53,8 @@ object frmCPDBao: TfrmCPDBao
|
||||||
end
|
end
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 31
|
Top = 33
|
||||||
Width = 1533
|
Width = 1535
|
||||||
Height = 76
|
Height = 76
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BevelInner = bvRaised
|
BevelInner = bvRaised
|
||||||
|
|
@ -486,10 +485,27 @@ object frmCPDBao: TfrmCPDBao
|
||||||
'24'
|
'24'
|
||||||
'25')
|
'25')
|
||||||
end
|
end
|
||||||
|
object cxButton8: TcxButton
|
||||||
|
Left = 984
|
||||||
|
Top = 40
|
||||||
|
Width = 77
|
||||||
|
Height = 33
|
||||||
|
Hint = 'Filesother'
|
||||||
|
Caption = #37325#25171#21253#26631#31614
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 20
|
||||||
|
OnClick = cxButton8Click
|
||||||
|
LookAndFeel.Kind = lfOffice11
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object Panel2: TPanel
|
object Panel2: TPanel
|
||||||
Left = 400
|
Left = 400
|
||||||
Top = 139
|
Top = 141
|
||||||
Width = 1133
|
Width = 1133
|
||||||
Height = 560
|
Height = 560
|
||||||
Caption = 'Panel2'
|
Caption = 'Panel2'
|
||||||
|
|
@ -508,7 +524,7 @@ object frmCPDBao: TfrmCPDBao
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object TV2: TcxGridDBTableView
|
object TV2: TcxGridDBTableView
|
||||||
NavigatorButtons.ConfirmDelete = False
|
Navigator.Buttons.CustomButtons = <>
|
||||||
OnCustomDrawCell = TV2CustomDrawCell
|
OnCustomDrawCell = TV2CustomDrawCell
|
||||||
DataController.DataSource = DataSource2
|
DataController.DataSource = DataSource2
|
||||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
|
@ -666,9 +682,10 @@ object frmCPDBao: TfrmCPDBao
|
||||||
Width = 1131
|
Width = 1131
|
||||||
Height = 292
|
Height = 292
|
||||||
Align = alClient
|
Align = alClient
|
||||||
|
PopupMenu = PopupMenu1
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object TV4: TcxGridDBTableView
|
object TV4: TcxGridDBTableView
|
||||||
NavigatorButtons.ConfirmDelete = False
|
Navigator.Buttons.CustomButtons = <>
|
||||||
DataController.DataSource = DSSEL
|
DataController.DataSource = DSSEL
|
||||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
DataController.Summary.DefaultGroupSummaryItems = <
|
DataController.Summary.DefaultGroupSummaryItems = <
|
||||||
|
|
@ -832,7 +849,7 @@ object frmCPDBao: TfrmCPDBao
|
||||||
end
|
end
|
||||||
object Panel3: TPanel
|
object Panel3: TPanel
|
||||||
Left = 999
|
Left = 999
|
||||||
Top = 225
|
Top = 227
|
||||||
Width = 290
|
Width = 290
|
||||||
Height = 286
|
Height = 286
|
||||||
BevelInner = bvRaised
|
BevelInner = bvRaised
|
||||||
|
|
@ -1027,9 +1044,9 @@ object frmCPDBao: TfrmCPDBao
|
||||||
end
|
end
|
||||||
object Panel4: TPanel
|
object Panel4: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 107
|
Top = 109
|
||||||
Width = 553
|
Width = 553
|
||||||
Height = 592
|
Height = 594
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
BevelInner = bvRaised
|
BevelInner = bvRaised
|
||||||
BevelOuter = bvLowered
|
BevelOuter = bvLowered
|
||||||
|
|
@ -1039,11 +1056,11 @@ object frmCPDBao: TfrmCPDBao
|
||||||
Left = 2
|
Left = 2
|
||||||
Top = 89
|
Top = 89
|
||||||
Width = 549
|
Width = 549
|
||||||
Height = 501
|
Height = 503
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object Tv3: TcxGridDBTableView
|
object Tv3: TcxGridDBTableView
|
||||||
NavigatorButtons.ConfirmDelete = False
|
Navigator.Buttons.CustomButtons = <>
|
||||||
DataController.DataSource = DSTm
|
DataController.DataSource = DSTm
|
||||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
|
@ -1355,8 +1372,8 @@ object frmCPDBao: TfrmCPDBao
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object MovePanel1: TMovePanel
|
object MovePanel1: TMovePanel
|
||||||
Left = 506
|
Left = 198
|
||||||
Top = 274
|
Top = 208
|
||||||
Width = 715
|
Width = 715
|
||||||
Height = 327
|
Height = 327
|
||||||
BevelInner = bvLowered
|
BevelInner = bvLowered
|
||||||
|
|
@ -1435,6 +1452,7 @@ object frmCPDBao: TfrmCPDBao
|
||||||
object cxStyleRepository1: TcxStyleRepository
|
object cxStyleRepository1: TcxStyleRepository
|
||||||
Left = 317
|
Left = 317
|
||||||
Top = 306
|
Top = 306
|
||||||
|
PixelsPerInch = 96
|
||||||
object cxStyle1: TcxStyle
|
object cxStyle1: TcxStyle
|
||||||
AssignedValues = [svColor, svFont]
|
AssignedValues = [svColor, svFont]
|
||||||
Color = clInactiveCaption
|
Color = clInactiveCaption
|
||||||
|
|
@ -1648,4 +1666,16 @@ object frmCPDBao: TfrmCPDBao
|
||||||
Left = 332
|
Left = 332
|
||||||
Top = 420
|
Top = 420
|
||||||
end
|
end
|
||||||
|
object PopupMenu1: TPopupMenu
|
||||||
|
Left = 948
|
||||||
|
Top = 568
|
||||||
|
object N1: TMenuItem
|
||||||
|
Caption = #20840#36873
|
||||||
|
OnClick = N1Click
|
||||||
|
end
|
||||||
|
object N2: TMenuItem
|
||||||
|
Caption = #20840#24323
|
||||||
|
OnClick = N2Click
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,27 @@ unit U_CPDBAO;
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Windows, Messages, strutils,SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
Windows, Messages, strutils, SysUtils, Variants, Classes, Graphics, Controls,
|
||||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
Forms, Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||||
cxDataStorage, cxEdit, DB, cxDBData, cxGridLevel, cxGridCustomTableView,
|
cxDataStorage, cxEdit, DB, cxDBData, cxGridLevel, cxGridCustomTableView,
|
||||||
cxGridTableView, cxGridDBTableView, cxClasses, cxControls,
|
cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView,
|
||||||
cxGridCustomView, cxGrid, StdCtrls, cxContainer, cxTextEdit,
|
cxGrid, StdCtrls, cxContainer, cxTextEdit, cxCurrencyEdit, BtnEdit, ExtCtrls,
|
||||||
cxCurrencyEdit, BtnEdit, ExtCtrls, ComCtrls, ToolWin, DBClient, ADODB,
|
ComCtrls, ToolWin, DBClient, ADODB, MovePanel, Buttons, Menus,
|
||||||
MovePanel, Buttons, Menus, cxLookAndFeelPainters, cxButtons, RM_Common,
|
cxLookAndFeelPainters, cxButtons, RM_Common, RM_Class, RM_GridReport,
|
||||||
RM_Class, RM_GridReport, RM_System, RM_Dataset, cxCheckBox,MMSystem;
|
RM_System, RM_Dataset, cxCheckBox, MMSystem, cxLookAndFeels, cxNavigator,
|
||||||
|
dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel,
|
||||||
|
dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
|
||||||
|
dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans, dxSkinHighContrast,
|
||||||
|
dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky,
|
||||||
|
dxSkinMcSkin, dxSkinMetropolis, dxSkinMetropolisDark, dxSkinMoneyTwins,
|
||||||
|
dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
|
||||||
|
dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinOffice2010Black,
|
||||||
|
dxSkinOffice2010Blue, dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
|
||||||
|
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven,
|
||||||
|
dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus, dxSkinSilver,
|
||||||
|
dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008, dxSkinTheAsphaltWorld,
|
||||||
|
dxSkinsDefaultPainters, dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint,
|
||||||
|
dxSkinXmas2008Blue, dxSkinscxPCPainter;
|
||||||
|
|
||||||
type
|
type
|
||||||
TfrmCPDBao = class(TForm)
|
TfrmCPDBao = class(TForm)
|
||||||
|
|
@ -160,16 +173,17 @@ type
|
||||||
ComboBox4: TComboBox;
|
ComboBox4: TComboBox;
|
||||||
Label12: TLabel;
|
Label12: TLabel;
|
||||||
ADOQuery2: TADOQuery;
|
ADOQuery2: TADOQuery;
|
||||||
|
PopupMenu1: TPopupMenu;
|
||||||
|
N1: TMenuItem;
|
||||||
|
N2: TMenuItem;
|
||||||
|
cxButton8: TcxButton;
|
||||||
procedure FormDestroy(Sender: TObject);
|
procedure FormDestroy(Sender: TObject);
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
procedure TBCloseClick(Sender: TObject);
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure SmNOKeyPress(Sender: TObject; var Key: Char);
|
procedure SmNOKeyPress(Sender: TObject; var Key: Char);
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure TV2CustomDrawCell(Sender: TcxCustomGridTableView;
|
procedure TV2CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||||
ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo;
|
|
||||||
var ADone: Boolean);
|
|
||||||
procedure kcKwBtnClick(Sender: TObject);
|
procedure kcKwBtnClick(Sender: TObject);
|
||||||
procedure Button4Click(Sender: TObject);
|
procedure Button4Click(Sender: TObject);
|
||||||
procedure baoNoKeyPress(Sender: TObject; var Key: Char);
|
procedure baoNoKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
|
@ -189,28 +203,36 @@ type
|
||||||
procedure cxButton5Click(Sender: TObject);
|
procedure cxButton5Click(Sender: TObject);
|
||||||
procedure cxButton6Click(Sender: TObject);
|
procedure cxButton6Click(Sender: TObject);
|
||||||
procedure cxButton7Click(Sender: TObject);
|
procedure cxButton7Click(Sender: TObject);
|
||||||
|
procedure N1Click(Sender: TObject);
|
||||||
|
procedure N2Click(Sender: TObject);
|
||||||
|
procedure cxButton8Click(Sender: TObject);
|
||||||
private
|
private
|
||||||
Rolls: integer;
|
Rolls: integer;
|
||||||
procedure InitGrid();
|
procedure InitGrid();
|
||||||
procedure InitMJID();
|
procedure InitMJID();
|
||||||
function SaveRK(): Boolean;
|
function SaveRK(): Boolean;
|
||||||
Procedure QueryRk();
|
procedure QueryRk();
|
||||||
Procedure QueryTM();
|
procedure QueryTM();
|
||||||
{ Private declarations }
|
{ Private declarations }
|
||||||
public
|
public
|
||||||
{ Public declarations }
|
{ Public declarations }
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
frmCPDBao: TfrmCPDBao;
|
frmCPDBao: TfrmCPDBao;
|
||||||
newh: hwnd;
|
newh: hwnd;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
U_DataLink, U_Fun, U_ZDYHelp, U_OrderSelRK;
|
U_DataLink, U_Fun, U_ZDYHelp, U_OrderSelRK;
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
Procedure TfrmCPDBao.QueryTm();
|
|
||||||
|
procedure TfrmCPDBao.QueryTm();
|
||||||
var
|
var
|
||||||
FBaoID: string;
|
FBaoID: string;
|
||||||
begin
|
begin
|
||||||
|
|
||||||
with ADOQueryTM do
|
with ADOQueryTM do
|
||||||
begin
|
begin
|
||||||
close;
|
close;
|
||||||
|
|
@ -219,18 +241,55 @@ begin
|
||||||
sql.Add('from WFB_MJJY A ');
|
sql.Add('from WFB_MJJY A ');
|
||||||
sql.Add('inner join JYOrder_sub B on B.subID=A.subID ');
|
sql.Add('inner join JYOrder_sub B on B.subID=A.subID ');
|
||||||
sql.Add('inner join JYOrder_main C on C.mainID=A.MainID ');
|
sql.Add('inner join JYOrder_main C on C.mainID=A.MainID ');
|
||||||
sql.Add('and A.mjstr2=''灌흙욋'' and C.orderNo='+quotedstr(trim(BtnEditA1.Text)));
|
sql.Add('and isnull(A.BAOID,'''')='''' and A.mjstr2=''未入库'' and C.orderNo=' + quotedstr(trim(BtnEditA1.Text)));
|
||||||
open;
|
open;
|
||||||
end;
|
end;
|
||||||
SCreateCDS20(ADOQueryTM, CDSTM);
|
SCreateCDS20(ADOQueryTM, CDSTM);
|
||||||
SInitCDSData20(ADOQueryTM, CDSTM);
|
SInitCDSData20(ADOQueryTM, CDSTM);
|
||||||
|
|
||||||
|
//if CDSMJID.IsEmpty then
|
||||||
|
// exit;
|
||||||
|
// if CDSMJID.fieldByName('SDefNote').AsString <> '' then
|
||||||
|
// begin
|
||||||
|
// application.MessageBox('已打包,不能删除!', '提示信息', 0);
|
||||||
|
// exit;
|
||||||
|
// end
|
||||||
|
|
||||||
|
if not CDSMJID.IsEmpty then
|
||||||
|
begin
|
||||||
|
Rolls := 0;
|
||||||
|
with CDSMJID do
|
||||||
|
begin
|
||||||
|
DisableControls;
|
||||||
|
first;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
Rolls := Rolls + 1;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
EnableControls;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
SCreateCDS20(ADOQueryTM, CDSMJID);
|
SCreateCDS20(ADOQueryTM, CDSMJID);
|
||||||
// SInitCDSData20(ADOQueryMain, CDSMJID);
|
// SInitCDSData20(ADOQueryMain, CDSMJID);
|
||||||
SCreateCDS20(ADOQueryTM,CDSSEL);
|
|
||||||
// SInitCDSData20(ADOQueryMain,CDSSEL);
|
|
||||||
|
|
||||||
IF not CDSTM.IsEmpty then
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select A.*,B.* ,MPrtCodeName,C.orderNo as OrderNoM');
|
||||||
|
sql.Add('from WFB_MJJY A ');
|
||||||
|
sql.Add('inner join JYOrder_sub B on B.subID=A.subID ');
|
||||||
|
sql.Add('inner join JYOrder_main C on C.mainID=A.MainID ');
|
||||||
|
sql.Add('and isnull(A.BAOID,'''')<>'''' and A.mjstr2=''未入库'' and C.orderNo=' + quotedstr(trim(BtnEditA1.Text)));
|
||||||
|
SQL.Add('order by [dbo].[Get_ShuZi](BaoNo)');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain, CDSSEL);
|
||||||
|
SInitCDSData20(ADOQueryMain, CDSSEL);
|
||||||
|
|
||||||
|
if not CDSTM.IsEmpty then
|
||||||
begin
|
begin
|
||||||
with ADOQuery1 do
|
with ADOQuery1 do
|
||||||
begin
|
begin
|
||||||
|
|
@ -240,20 +299,60 @@ begin
|
||||||
sql.Add('where mainID=' + quotedstr(trim(CDSTM.fieldbyname('MainID').AsString)));
|
sql.Add('where mainID=' + quotedstr(trim(CDSTM.fieldbyname('MainID').AsString)));
|
||||||
open;
|
open;
|
||||||
end;
|
end;
|
||||||
baoNo.text:=ADOQuery1.fieldbyname('MaxBaoNo').AsString;
|
// baoNo.text := ADOQuery1.fieldbyname('MaxBaoNo').AsString;
|
||||||
if GetLSNo(ADOQueryTmp, FBaoID, 'BI', 'WFB_MJJY', 4, 1) = False then
|
if GetLSNo(ADOQueryTmp, FBaoID, 'BI', 'WFB_MJJY', 4, 1) = False then
|
||||||
begin
|
begin
|
||||||
ADOQueryCmd.Connection.RollbackTrans;
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
Application.MessageBox('取包条码最大号失败!', '提示', 0);
|
Application.MessageBox('取包条码最大号失败!', '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
BaoID.Text:=trim(FBaoid);
|
BaoID.Text := trim(FBaoID);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
SMNO.SetFocus;
|
SMNO.SetFocus;
|
||||||
|
// with ADOQueryTM do
|
||||||
|
// begin
|
||||||
|
// close;
|
||||||
|
// sql.Clear;
|
||||||
|
// sql.Add('select A.*,B.*,C.MPrtCodeName,C.orderNo as OrderNoM');
|
||||||
|
// sql.Add('from WFB_MJJY A ');
|
||||||
|
// sql.Add('inner join JYOrder_sub B on B.subID=A.subID ');
|
||||||
|
// sql.Add('inner join JYOrder_main C on C.mainID=A.MainID ');
|
||||||
|
// sql.Add('and A.mjstr2=''未入库'' and C.orderNo=' + quotedstr(trim(BtnEditA1.Text)));
|
||||||
|
// open;
|
||||||
|
// end;
|
||||||
|
// SCreateCDS20(ADOQueryTM, CDSTM);
|
||||||
|
// SInitCDSData20(ADOQueryTM, CDSTM);
|
||||||
|
//
|
||||||
|
// SCreateCDS20(ADOQueryTM, CDSMJID);
|
||||||
|
//// SInitCDSData20(ADOQueryMain,CDSMJID);
|
||||||
|
// SCreateCDS20(ADOQueryTM, CDSSEL);
|
||||||
|
//// SInitCDSData20(ADOQueryMain,CDSSEL);
|
||||||
|
//
|
||||||
|
// if not CDSTM.IsEmpty then
|
||||||
|
// begin
|
||||||
|
// with ADOQuery1 do
|
||||||
|
// begin
|
||||||
|
// close;
|
||||||
|
// sql.clear;
|
||||||
|
// sql.add('select isnull(max(cast(baoNo as int)),0)+1 as MaxBaoNo from WFB_MJJY ');
|
||||||
|
// sql.Add('where mainID=' + quotedstr(trim(CDSTM.fieldbyname('MainID').AsString)));
|
||||||
|
// open;
|
||||||
|
// end;
|
||||||
|
// baoNo.text := ADOQuery1.fieldbyname('MaxBaoNo').AsString;
|
||||||
|
// if GetLSNo(ADOQueryTmp, FBaoID, 'BI', 'WFB_MJJY', 4, 1) = False then
|
||||||
|
// begin
|
||||||
|
// ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
// Application.MessageBox('取包条码最大号失败!', '提示', 0);
|
||||||
|
// Exit;
|
||||||
|
// end;
|
||||||
|
// BaoID.Text := trim(FBaoID);
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// SMNO.SetFocus;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Procedure TfrmCPDBao.QueryRk();
|
procedure TfrmCPDBao.QueryRk();
|
||||||
begin
|
begin
|
||||||
with ADOQuery1 do
|
with ADOQuery1 do
|
||||||
begin
|
begin
|
||||||
|
|
@ -272,9 +371,9 @@ end;
|
||||||
|
|
||||||
function TfrmCPDBao.SaveRK(): Boolean;
|
function TfrmCPDBao.SaveRK(): Boolean;
|
||||||
var
|
var
|
||||||
maxno:String;
|
maxno: string;
|
||||||
CRID: Integer;
|
CRID: Integer;
|
||||||
MaxCkNo,MaxCkSubNo:String;
|
MaxCkNo, MaxCkSubNo: string;
|
||||||
MhcTime: TdateTime;
|
MhcTime: TdateTime;
|
||||||
begin
|
begin
|
||||||
Result := false;
|
Result := false;
|
||||||
|
|
@ -405,7 +504,6 @@ procedure TfrmCPDBao.InitMJID();
|
||||||
begin
|
begin
|
||||||
MovePanel1.Visible := false;
|
MovePanel1.Visible := false;
|
||||||
|
|
||||||
|
|
||||||
with ADOQueryMain do
|
with ADOQueryMain do
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
|
|
@ -417,7 +515,7 @@ begin
|
||||||
Open;
|
Open;
|
||||||
if not IsEmpty then
|
if not IsEmpty then
|
||||||
begin
|
begin
|
||||||
IF trim(Fieldbyname('MJstr2').AsString)='綠흙욋' then
|
if trim(Fieldbyname('MJstr2').AsString) = '已入库' then
|
||||||
begin
|
begin
|
||||||
CDSMJID.Append;
|
CDSMJID.Append;
|
||||||
CDSMJID.FieldByName('SDefNote').Value := '此条码已入库';
|
CDSMJID.FieldByName('SDefNote').Value := '此条码已入库';
|
||||||
|
|
@ -458,25 +556,25 @@ begin
|
||||||
CDSMJID.Post;
|
CDSMJID.Post;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
IF trim(CDSMJID.FieldByName('SDefNote').AsString)<>'댔관냥묘' then
|
if trim(CDSMJID.FieldByName('SDefNote').AsString) <> '打包成功' then
|
||||||
begin
|
begin
|
||||||
MovePanel1.Visible := true;
|
MovePanel1.Visible := true;
|
||||||
Edit2.Text := SmNO.Text;
|
Edit2.Text := SmNO.Text;
|
||||||
Label2.Caption := trim(CDSMJID.FieldByName('SDefNote').AsString);
|
Label2.Caption := trim(CDSMJID.FieldByName('SDefNote').AsString);
|
||||||
IF FileExists(PChar(ExtractFilePath(Application.ExeName)+'wav\댔관댄轎.wav')) then
|
if FileExists(PChar(ExtractFilePath(Application.ExeName) + 'wav\打包错误.wav')) then
|
||||||
PlaySound(PChar(ExtractFilePath(Application.ExeName) + 'wav\打包错误.wav'), 0, SND_ASYNC);
|
PlaySound(PChar(ExtractFilePath(Application.ExeName) + 'wav\打包错误.wav'), 0, SND_ASYNC);
|
||||||
CDSMJID.delete;
|
CDSMJID.delete;
|
||||||
end;
|
end;
|
||||||
If CDSTM.Locate('MJID',trim(smno.Text),[]) then
|
if CDSTM.Locate('MJID', trim(smno.Text), []) then
|
||||||
begin
|
begin
|
||||||
// application.MessageBox('AAAA','AAAAAAAA',0);
|
// application.MessageBox('AAAA','AAAAAAAA',0);
|
||||||
CDSTM.Delete;
|
CDSTM.Delete;
|
||||||
tv2.Controller.EditingController.ShowEdit();
|
tv2.Controller.EditingController.ShowEdit();
|
||||||
tv3.Controller.EditingController.ShowEdit();
|
tv3.Controller.EditingController.ShowEdit();
|
||||||
end;
|
end;
|
||||||
IF CheckBox1.Checked then
|
if CheckBox1.Checked = true then
|
||||||
begin
|
begin
|
||||||
IF (Rolls=strtointdef(trim(ComboBox3.Text),0)) and (strtointdef(trim(ComboBox3.Text),0)>0) then
|
if (Rolls = strtointdef(trim(ComboBox3.Text), 0)) and (strtointdef(trim(ComboBox3.Text), 0) > 0) then
|
||||||
begin
|
begin
|
||||||
FileName.Click;
|
FileName.Click;
|
||||||
end;
|
end;
|
||||||
|
|
@ -488,8 +586,7 @@ begin
|
||||||
frmCPDBao := nil;
|
frmCPDBao := nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmCPDBao.FormClose(Sender: TObject;
|
procedure TfrmCPDBao.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
var Action: TCloseAction);
|
|
||||||
begin
|
begin
|
||||||
//writeCxGrid(self.Caption+tv1.Name,Tv1,'成品仓库');
|
//writeCxGrid(self.Caption+tv1.Name,Tv1,'成品仓库');
|
||||||
writeCxGrid(self.Caption + Tv2.Name, Tv2, '成品仓库');
|
writeCxGrid(self.Caption + Tv2.Name, Tv2, '成品仓库');
|
||||||
|
|
@ -515,7 +612,7 @@ end;
|
||||||
|
|
||||||
procedure TfrmCPDBao.SmNOKeyPress(Sender: TObject; var Key: Char);
|
procedure TfrmCPDBao.SmNOKeyPress(Sender: TObject; var Key: Char);
|
||||||
begin
|
begin
|
||||||
IF key=#13 then
|
if Key = #13 then
|
||||||
begin
|
begin
|
||||||
if combobox4.Text = '按颜色' then
|
if combobox4.Text = '按颜色' then
|
||||||
begin
|
begin
|
||||||
|
|
@ -556,20 +653,22 @@ begin
|
||||||
application.MessageBox('包条码不能为空', '提示');
|
application.MessageBox('包条码不能为空', '提示');
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
IF CDSTM.IsEmpty then exit;
|
if CDSTM.IsEmpty then
|
||||||
if trim(smno.Text)='' then exit;
|
exit;
|
||||||
IF CDSMJID.Locate('MJID',trim(smno.Text),[]) then
|
if trim(smno.Text) = '' then
|
||||||
|
exit;
|
||||||
|
if CDSMJID.Locate('MJID', trim(smno.Text), []) then
|
||||||
begin
|
begin
|
||||||
MovePanel1.Visible := true;
|
MovePanel1.Visible := true;
|
||||||
Edit2.Text := SmNO.Text;
|
Edit2.Text := SmNO.Text;
|
||||||
Label2.Caption := '此卷号重复扫描!';
|
Label2.Caption := '此卷号重复扫描!';
|
||||||
IF FileExists(PChar(ExtractFilePath(Application.ExeName)+'wav\路릿<E8B7AF>췄.wav')) then
|
if FileExists(PChar(ExtractFilePath(Application.ExeName) + 'wav\重复扫描.wav')) then
|
||||||
PlaySound(PChar(ExtractFilePath(Application.ExeName) + 'wav\重复扫描.wav'), 0, SND_ASYNC);
|
PlaySound(PChar(ExtractFilePath(Application.ExeName) + 'wav\重复扫描.wav'), 0, SND_ASYNC);
|
||||||
smno.Text := '';
|
smno.Text := '';
|
||||||
smno.SetFocus;
|
smno.SetFocus;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
If not CDSTM.Locate('MJID',trim(smno.Text),[]) then
|
if not CDSTM.Locate('MJID', trim(smno.Text), []) then
|
||||||
begin
|
begin
|
||||||
with ADOQuery1 do
|
with ADOQuery1 do
|
||||||
begin
|
begin
|
||||||
|
|
@ -580,27 +679,27 @@ begin
|
||||||
sql.add('inner join JYOrder_Main C on C.maiNID=A.mainID');
|
sql.add('inner join JYOrder_Main C on C.maiNID=A.mainID');
|
||||||
sql.Add('where MJID=' + quotedstr(trim(SmNO.Text)));
|
sql.Add('where MJID=' + quotedstr(trim(SmNO.Text)));
|
||||||
Open;
|
Open;
|
||||||
IF isempty then
|
if isempty then
|
||||||
begin
|
begin
|
||||||
MovePanel1.Visible := true;
|
MovePanel1.Visible := true;
|
||||||
Edit2.Text := SmNO.Text;
|
Edit2.Text := SmNO.Text;
|
||||||
Label2.Caption := '此卷号错误!';
|
Label2.Caption := '此卷号错误!';
|
||||||
IF FileExists(PChar(ExtractFilePath(Application.ExeName)+'wav\<5C>췄댄轎.wav')) then
|
if FileExists(PChar(ExtractFilePath(Application.ExeName) + 'wav\扫描错误.wav')) then
|
||||||
PlaySound(PChar(ExtractFilePath(Application.ExeName) + 'wav\扫描错误.wav'), 0, SND_ASYNC);
|
PlaySound(PChar(ExtractFilePath(Application.ExeName) + 'wav\扫描错误.wav'), 0, SND_ASYNC);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
If not CDSTM.Locate('orderNoM',trim(fieldbyname('OrderNoM').AsString),[]) then
|
if not CDSTM.Locate('orderNoM', trim(fieldbyname('OrderNoM').AsString), []) then
|
||||||
begin
|
begin
|
||||||
MovePanel1.Visible := true;
|
MovePanel1.Visible := true;
|
||||||
Edit2.Text := SmNO.Text;
|
Edit2.Text := SmNO.Text;
|
||||||
Label2.Caption := '此卷不属于当前订单!';
|
Label2.Caption := '此卷不属于当前订单!';
|
||||||
IF FileExists(PChar(ExtractFilePath(Application.ExeName)+'wav\<5C>췄댄轎.wav')) then
|
if FileExists(PChar(ExtractFilePath(Application.ExeName) + 'wav\扫描错误.wav')) then
|
||||||
PlaySound(PChar(ExtractFilePath(Application.ExeName) + 'wav\扫描错误.wav'), 0, SND_ASYNC);
|
PlaySound(PChar(ExtractFilePath(Application.ExeName) + 'wav\扫描错误.wav'), 0, SND_ASYNC);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
IF Fieldbyname('MJstr2').AsString<>'灌흙욋' then
|
if Fieldbyname('MJstr2').AsString <> '未入库' then
|
||||||
begin
|
begin
|
||||||
MovePanel1.Visible := true;
|
MovePanel1.Visible := true;
|
||||||
Edit2.Text := SmNO.Text;
|
Edit2.Text := SmNO.Text;
|
||||||
|
|
@ -643,9 +742,7 @@ begin
|
||||||
// InitGrid();
|
// InitGrid();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmCPDBao.TV2CustomDrawCell(Sender: TcxCustomGridTableView;
|
procedure TfrmCPDBao.TV2CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||||
ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo;
|
|
||||||
var ADone: Boolean);
|
|
||||||
var
|
var
|
||||||
i: integer;
|
i: integer;
|
||||||
begin
|
begin
|
||||||
|
|
@ -683,7 +780,8 @@ begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmCPDBao.baoNoKeyPress(Sender: TObject; var Key: Char);
|
procedure TfrmCPDBao.baoNoKeyPress(Sender: TObject; var Key: Char);
|
||||||
var FBaoID: string;
|
var
|
||||||
|
FBaoID: string;
|
||||||
begin
|
begin
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
@ -710,7 +808,8 @@ var
|
||||||
fsj: string;
|
fsj: string;
|
||||||
begin
|
begin
|
||||||
fsj := Trim(TSpeedButton(Sender).Hint);
|
fsj := Trim(TSpeedButton(Sender).Hint);
|
||||||
if Trim(fsj)='' then Exit;
|
if Trim(fsj) = '' then
|
||||||
|
Exit;
|
||||||
fsj := Trim(TEdit(FindComponent(Trim(TSpeedButton(Sender).Hint))).Text);
|
fsj := Trim(TEdit(FindComponent(Trim(TSpeedButton(Sender).Hint))).Text);
|
||||||
TEdit(FindComponent(Trim(TSpeedButton(Sender).Hint))).Text := fsj + Trim(TSpeedButton(Sender).Caption);
|
TEdit(FindComponent(Trim(TSpeedButton(Sender).Hint))).Text := fsj + Trim(TSpeedButton(Sender).Caption);
|
||||||
TEdit(FindComponent(Trim(TSpeedButton(Sender).Hint))).SelectAll;
|
TEdit(FindComponent(Trim(TSpeedButton(Sender).Hint))).SelectAll;
|
||||||
|
|
@ -721,15 +820,17 @@ var
|
||||||
fsj: string;
|
fsj: string;
|
||||||
begin
|
begin
|
||||||
fsj := Trim(TEdit(FindComponent(Trim(TSpeedButton(Sender).Hint))).Text);
|
fsj := Trim(TEdit(FindComponent(Trim(TSpeedButton(Sender).Hint))).Text);
|
||||||
if Trim(fsj)='' then Exit;
|
if Trim(fsj) = '' then
|
||||||
|
Exit;
|
||||||
TEdit(FindComponent(Trim(TSpeedButton(Sender).Hint))).Text := Copy(fsj, 1, Length(fsj) - 1);
|
TEdit(FindComponent(Trim(TSpeedButton(Sender).Hint))).Text := Copy(fsj, 1, Length(fsj) - 1);
|
||||||
TEdit(FindComponent(Trim(TSpeedButton(Sender).Hint))).SelectAll;
|
TEdit(FindComponent(Trim(TSpeedButton(Sender).Hint))).SelectAll;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmCPDBao.SpeedButton49Click(Sender: TObject);
|
procedure TfrmCPDBao.SpeedButton49Click(Sender: TObject);
|
||||||
var
|
var
|
||||||
FBaoID: string;
|
FBaoID: string;
|
||||||
begin
|
begin
|
||||||
IF trim(TEdit(FindComponent(Trim(TSpeedButton(Sender).Hint))).Hint)<>'' then
|
if trim(TEdit(FindComponent(Trim(TSpeedButton(Sender).Hint))).Hint) <> '' then
|
||||||
begin
|
begin
|
||||||
if GetLSNo(ADOQueryTmp, FBaoID, 'BI', 'WFB_MJJY', 4, 1) = False then
|
if GetLSNo(ADOQueryTmp, FBaoID, 'BI', 'WFB_MJJY', 4, 1) = False then
|
||||||
begin
|
begin
|
||||||
|
|
@ -737,13 +838,14 @@ begin
|
||||||
Application.MessageBox('取包条码最大号失败!', '提示', 0);
|
Application.MessageBox('取包条码最大号失败!', '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
BaoID.Text:=trim(FBaoid);
|
BaoID.Text := trim(FBaoID);
|
||||||
end;
|
end;
|
||||||
Panel3.Visible := False;
|
Panel3.Visible := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmCPDBao.FileNameClick(Sender: TObject);
|
procedure TfrmCPDBao.FileNameClick(Sender: TObject);
|
||||||
var fPrintFile: string;
|
var
|
||||||
|
fPrintFile: string;
|
||||||
Txt, fImagePath: string;
|
Txt, fImagePath: string;
|
||||||
Moudle: THandle;
|
Moudle: THandle;
|
||||||
Makebar: TMakebar;
|
Makebar: TMakebar;
|
||||||
|
|
@ -756,7 +858,8 @@ begin
|
||||||
application.MessageBox('包条码不能未空', '提示');
|
application.MessageBox('包条码不能未空', '提示');
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
IF CDSMJID.IsEmpty then exit;
|
if CDSMJID.IsEmpty then
|
||||||
|
exit;
|
||||||
|
|
||||||
with ADOQueryPrint do
|
with ADOQueryPrint do
|
||||||
begin
|
begin
|
||||||
|
|
@ -767,7 +870,7 @@ begin
|
||||||
sql.Add(' inner join JYOrder_Main D on D.MainID=A.MainID');
|
sql.Add(' inner join JYOrder_Main D on D.MainID=A.MainID');
|
||||||
SQL.Add('where MJID=''' + Trim(CDSMJID.fieldbyname('MJID').AsString) + '''');
|
SQL.Add('where MJID=''' + Trim(CDSMJID.fieldbyname('MJID').AsString) + '''');
|
||||||
Open;
|
Open;
|
||||||
IF not ADOQueryPrint.IsEmpty then
|
if not ADOQueryPrint.IsEmpty then
|
||||||
begin
|
begin
|
||||||
if Trim(ADOQueryPrint.fieldbyname('NLBName').AsString) = '' then
|
if Trim(ADOQueryPrint.fieldbyname('NLBName').AsString) = '' then
|
||||||
begin
|
begin
|
||||||
|
|
@ -801,11 +904,11 @@ begin
|
||||||
EnableControls;
|
EnableControls;
|
||||||
end;
|
end;
|
||||||
ADOQueryCmd.Connection.CommitTrans;
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
IF FileExists(PChar(ExtractFilePath(Application.ExeName)+'wav\攣횅.wav')) then
|
if FileExists(PChar(ExtractFilePath(Application.ExeName) + 'wav\正确.wav')) then
|
||||||
PlaySound(PChar(ExtractFilePath(Application.ExeName) + 'wav\正确.wav'), 0, SND_ASYNC);
|
PlaySound(PChar(ExtractFilePath(Application.ExeName) + 'wav\正确.wav'), 0, SND_ASYNC);
|
||||||
except
|
except
|
||||||
ADOQueryCmd.Connection.RollbackTrans;
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
IF FileExists(PChar(ExtractFilePath(Application.ExeName)+'wav\댔관댄轎.wav')) then
|
if FileExists(PChar(ExtractFilePath(Application.ExeName) + 'wav\打包错误.wav')) then
|
||||||
PlaySound(PChar(ExtractFilePath(Application.ExeName) + 'wav\打包错误.wav'), 0, SND_ASYNC);
|
PlaySound(PChar(ExtractFilePath(Application.ExeName) + 'wav\打包错误.wav'), 0, SND_ASYNC);
|
||||||
application.MessageBox('数据修改失败!', '提示信息', 0);
|
application.MessageBox('数据修改失败!', '提示信息', 0);
|
||||||
exit;
|
exit;
|
||||||
|
|
@ -841,19 +944,18 @@ begin
|
||||||
if ADOQueryPrint.RecordCount > 1 then
|
if ADOQueryPrint.RecordCount > 1 then
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('打包错误,请重新打包!', '提示', 0);
|
Application.MessageBox('打包错误,请重新打包!', '提示', 0);
|
||||||
IF FileExists(PChar(ExtractFilePath(Application.ExeName)+'wav\댔관댄轎.wav')) then
|
if FileExists(PChar(ExtractFilePath(Application.ExeName) + 'wav\打包错误.wav')) then
|
||||||
PlaySound(PChar(ExtractFilePath(Application.ExeName) + 'wav\打包错误.wav'), 0, SND_ASYNC);
|
PlaySound(PChar(ExtractFilePath(Application.ExeName) + 'wav\打包错误.wav'), 0, SND_ASYNC);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
if ADOQueryPrint.RecordCount < 1 then
|
if ADOQueryPrint.RecordCount < 1 then
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('此包号还未被保存,请保存数据,在打印条码!', '提示', 0);
|
Application.MessageBox('此包号还未被保存,请保存数据,在打印条码!', '提示', 0);
|
||||||
IF FileExists(PChar(ExtractFilePath(Application.ExeName)+'wav\댔관댄轎.wav')) then
|
if FileExists(PChar(ExtractFilePath(Application.ExeName) + 'wav\打包错误.wav')) then
|
||||||
PlaySound(PChar(ExtractFilePath(Application.ExeName) + 'wav\打包错误.wav'), 0, SND_ASYNC);
|
PlaySound(PChar(ExtractFilePath(Application.ExeName) + 'wav\打包错误.wav'), 0, SND_ASYNC);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
try
|
try
|
||||||
Moudle := LoadLibrary('MakeQRBarcode.dll');
|
Moudle := LoadLibrary('MakeQRBarcode.dll');
|
||||||
@Makebar := GetProcAddress(Moudle, 'Make');
|
@Makebar := GetProcAddress(Moudle, 'Make');
|
||||||
|
|
@ -862,7 +964,8 @@ begin
|
||||||
fImagePath := ExtractFilePath(Application.ExeName) + 'image\temp.bmp';
|
fImagePath := ExtractFilePath(Application.ExeName) + 'image\temp.bmp';
|
||||||
if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName) + 'image')) then
|
if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName) + 'image')) then
|
||||||
CreateDirectory(pchar(ExtractFilePath(Application.ExeName) + 'image'), nil);
|
CreateDirectory(pchar(ExtractFilePath(Application.ExeName) + 'image'), nil);
|
||||||
if FileExists(fImagePath) then DeleteFile(fImagePath);
|
if FileExists(fImagePath) then
|
||||||
|
DeleteFile(fImagePath);
|
||||||
Makebar(pchar(Txt), Length(Txt), 3, 3, 0, PChar(fImagePath), 3);
|
Makebar(pchar(Txt), Length(Txt), 3, 3, 0, PChar(fImagePath), 3);
|
||||||
except
|
except
|
||||||
application.MessageBox('条形码生成失败!', '提示信息', MB_ICONERROR);
|
application.MessageBox('条形码生成失败!', '提示信息', MB_ICONERROR);
|
||||||
|
|
@ -876,7 +979,7 @@ begin
|
||||||
Application.MessageBox('取包条码最大号失败!', '提示', 0);
|
Application.MessageBox('取包条码最大号失败!', '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
BaoID.Text:=trim(FBaoid);
|
BaoID.Text := trim(FBaoID);
|
||||||
CDSsel.Last;
|
CDSsel.Last;
|
||||||
with CDSMJID do
|
with CDSMJID do
|
||||||
begin
|
begin
|
||||||
|
|
@ -896,13 +999,14 @@ begin
|
||||||
end;
|
end;
|
||||||
CDSMJID.EmptyDataSet;
|
CDSMJID.EmptyDataSet;
|
||||||
|
|
||||||
IF check_bz.Checked then
|
if check_bz.Checked then
|
||||||
begin
|
begin
|
||||||
if Trim(ADOQueryPrint.fieldbyname('NLBName').AsString) <> '' then
|
if Trim(ADOQueryPrint.fieldbyname('NLBName').AsString) <> '' then
|
||||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\'+Trim(ADOQueryPrint.fieldbyname('NLBName').AsString)+'.rmf'
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + Trim(ADOQueryPrint.fieldbyname('NLBName').AsString) + '.rmf'// fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + Trim(ADOQueryPrint.fieldbyname('NLBName').AsString)
|
||||||
else
|
else
|
||||||
fPrintFile:=ExtractFilePath(Application.ExeName)+'Report\관깃푯.rmf';
|
// fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\包标签.rmf';
|
||||||
IF Not FileExists(fPrintFile) then
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\包标签';
|
||||||
|
if not FileExists(fPrintFile) then
|
||||||
begin
|
begin
|
||||||
Application.MessageBox(PChar('没有找' + fPrintFile), '提示', 0);
|
Application.MessageBox(PChar('没有找' + fPrintFile), '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
|
|
@ -951,7 +1055,7 @@ procedure TfrmCPDBao.baoNoExit(Sender: TObject);
|
||||||
var
|
var
|
||||||
FBaoID: string;
|
FBaoID: string;
|
||||||
begin
|
begin
|
||||||
IF baoNo.Text<>'' then
|
if baoNo.Text <> '' then
|
||||||
begin
|
begin
|
||||||
if GetLSNo(ADOQueryTmp, FBaoID, 'BI', 'WFB_MJJY', 4, 1) = False then
|
if GetLSNo(ADOQueryTmp, FBaoID, 'BI', 'WFB_MJJY', 4, 1) = False then
|
||||||
begin
|
begin
|
||||||
|
|
@ -959,7 +1063,7 @@ begin
|
||||||
Application.MessageBox('取包条码最大号失败!', '提示', 0);
|
Application.MessageBox('取包条码最大号失败!', '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
BaoID.Text:=trim(FBaoid);
|
BaoID.Text := trim(FBaoID);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
BaoID.Text := '';
|
BaoID.Text := '';
|
||||||
|
|
@ -995,8 +1099,9 @@ procedure TfrmCPDBao.cxButton3Click(Sender: TObject);
|
||||||
var
|
var
|
||||||
i: integer;
|
i: integer;
|
||||||
begin
|
begin
|
||||||
IF CDSMJID.IsEmpty then exit;
|
if CDSMJID.IsEmpty then
|
||||||
IF CDSMJID.fieldByName('Sflag').AsString='2' then
|
exit;
|
||||||
|
if CDSMJID.fieldByName('Sflag').AsString = '2' then
|
||||||
begin
|
begin
|
||||||
application.MessageBox('已打包,不能删除!', '提示信息', 0);
|
application.MessageBox('已打包,不能删除!', '提示信息', 0);
|
||||||
exit;
|
exit;
|
||||||
|
|
@ -1015,12 +1120,14 @@ begin
|
||||||
CDSTM.Post;
|
CDSTM.Post;
|
||||||
end;
|
end;
|
||||||
CDSMJID.Delete;
|
CDSMJID.Delete;
|
||||||
|
Rolls := Rolls - 1;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmCPDBao.cxButton2Click(Sender: TObject);
|
procedure TfrmCPDBao.cxButton2Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
IF CDSMJID.IsEmpty then exit;
|
if CDSMJID.IsEmpty then
|
||||||
|
exit;
|
||||||
ADOQueryCmd.Connection.BeginTrans;
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
try
|
try
|
||||||
with CDSMJID do
|
with CDSMJID do
|
||||||
|
|
@ -1057,7 +1164,9 @@ procedure TfrmCPDBao.cxButton4Click(Sender: TObject);
|
||||||
var
|
var
|
||||||
FBaoid: string;
|
FBaoid: string;
|
||||||
begin
|
begin
|
||||||
if CDSSEL.IsEmpty then Exit;
|
|
||||||
|
if CDSSEL.IsEmpty then
|
||||||
|
Exit;
|
||||||
if CDSSEL.Locate('SSel', True, []) = False then
|
if CDSSEL.Locate('SSel', True, []) = False then
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
|
@ -1068,8 +1177,8 @@ begin
|
||||||
// ADOQueryCmd.Connection.BeginTrans;
|
// ADOQueryCmd.Connection.BeginTrans;
|
||||||
with CDSSEL do
|
with CDSSEL do
|
||||||
begin
|
begin
|
||||||
First;
|
// First;
|
||||||
while FieldByName('SSel').AsBoolean do
|
while CDSSEL.Locate('SSel', True, []) do
|
||||||
begin
|
begin
|
||||||
with ADOQueryCmd do
|
with ADOQueryCmd do
|
||||||
begin
|
begin
|
||||||
|
|
@ -1080,7 +1189,9 @@ begin
|
||||||
ExecSQL;
|
ExecSQL;
|
||||||
end;
|
end;
|
||||||
delete;
|
delete;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
// ADOQueryCmd.Connection.CommitTrans;
|
// ADOQueryCmd.Connection.CommitTrans;
|
||||||
CDSSEL.EnableControls;
|
CDSSEL.EnableControls;
|
||||||
|
|
@ -1100,7 +1211,7 @@ begin
|
||||||
SCreateCDS20(ADOQueryTM, CDSTM);
|
SCreateCDS20(ADOQueryTM, CDSTM);
|
||||||
SInitCDSData20(ADOQueryTM, CDSTM);
|
SInitCDSData20(ADOQueryTM, CDSTM);
|
||||||
|
|
||||||
IF not CDSTM.IsEmpty then
|
if not CDSTM.IsEmpty then
|
||||||
begin
|
begin
|
||||||
with ADOQuery1 do
|
with ADOQuery1 do
|
||||||
begin
|
begin
|
||||||
|
|
@ -1111,7 +1222,7 @@ begin
|
||||||
open;
|
open;
|
||||||
end;
|
end;
|
||||||
baoNo.text := ADOQuery1.fieldbyname('MaxBaoNo').AsString;
|
baoNo.text := ADOQuery1.fieldbyname('MaxBaoNo').AsString;
|
||||||
if GetLSNo(ADOQueryTmp,FBaoID,'BI','WFB_MJJY',4,1)=False then
|
if GetLSNo(ADOQueryTmp, FBaoid, 'BI', 'WFB_MJJY', 4, 1) = False then
|
||||||
begin
|
begin
|
||||||
ADOQueryCmd.Connection.RollbackTrans;
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
Application.MessageBox('取包条码最大号失败!', '提示', 0);
|
Application.MessageBox('取包条码最大号失败!', '提示', 0);
|
||||||
|
|
@ -1121,12 +1232,84 @@ begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
SMNO.SetFocus;
|
SMNO.SetFocus;
|
||||||
|
cxButton5.Click;
|
||||||
exit;
|
exit;
|
||||||
except
|
except
|
||||||
// ADOQueryCmd.Connection.RollbackTrans;
|
// ADOQueryCmd.Connection.RollbackTrans;
|
||||||
CDSSEL.EnableControls;
|
CDSSEL.EnableControls;
|
||||||
application.MessageBox('数据撤销失败!', '提示信息', 0);
|
application.MessageBox('数据撤销失败!', '提示信息', 0);
|
||||||
end;
|
end;
|
||||||
|
// if CDSSEL.IsEmpty then
|
||||||
|
// Exit;
|
||||||
|
// if CDSSEL.Locate('SSel', True, []) = False then
|
||||||
|
// begin
|
||||||
|
// Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
// Exit;
|
||||||
|
// end;
|
||||||
|
// try
|
||||||
|
// CDSSEL.DisableControls;
|
||||||
|
// // ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
// with CDSSEL do
|
||||||
|
// begin
|
||||||
|
// First;
|
||||||
|
// while FieldByName('SSel').AsBoolean do
|
||||||
|
// begin
|
||||||
|
// with ADOQueryCmd do
|
||||||
|
// begin
|
||||||
|
// Close;
|
||||||
|
// sql.Clear;
|
||||||
|
// sql.Add('Update WFB_MJJY Set baoID='''',baoNo='''' ');
|
||||||
|
// sql.Add('where MJID=''' + Trim(CDSSEL.fieldbyname('MJID').AsString) + '''');
|
||||||
|
// ExecSQL;
|
||||||
|
// end;
|
||||||
|
// delete;
|
||||||
|
// end;
|
||||||
|
// end;
|
||||||
|
// // ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
// CDSSEL.EnableControls;
|
||||||
|
// application.MessageBox('数据撤销成功!', '提示信息');
|
||||||
|
//
|
||||||
|
// with ADOQueryTM do
|
||||||
|
// begin
|
||||||
|
// close;
|
||||||
|
// sql.Clear;
|
||||||
|
// sql.Add('select A.*,B.*,C.MPrtCodeName,C.orderNo as OrderNoM');
|
||||||
|
// sql.Add('from WFB_MJJY A ');
|
||||||
|
// sql.Add('inner join JYOrder_sub B on B.subID=A.subID ');
|
||||||
|
// sql.Add('inner join JYOrder_main C on C.mainID=A.MainID ');
|
||||||
|
// sql.Add('and A.mjstr2=''未入库'' and C.orderNo=' + quotedstr(trim(BtnEditA1.Text)));
|
||||||
|
// open;
|
||||||
|
// end;
|
||||||
|
// SCreateCDS20(ADOQueryTM, CDSTM);
|
||||||
|
// SInitCDSData20(ADOQueryTM, CDSTM);
|
||||||
|
//
|
||||||
|
// if not CDSTM.IsEmpty then
|
||||||
|
// begin
|
||||||
|
// with ADOQuery1 do
|
||||||
|
// begin
|
||||||
|
// close;
|
||||||
|
// sql.clear;
|
||||||
|
// sql.add('select isnull(max(cast(baoNo as int)),0)+1 as MaxBaoNo from WFB_MJJY ');
|
||||||
|
// sql.Add('where mainID=' + quotedstr(trim(CDSTM.fieldbyname('MainID').AsString)));
|
||||||
|
// open;
|
||||||
|
// end;
|
||||||
|
// baoNo.text := ADOQuery1.fieldbyname('MaxBaoNo').AsString;
|
||||||
|
// if GetLSNo(ADOQueryTmp, FBaoid, 'BI', 'WFB_MJJY', 4, 1) = False then
|
||||||
|
// begin
|
||||||
|
// ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
// Application.MessageBox('取包条码最大号失败!', '提示', 0);
|
||||||
|
// Exit;
|
||||||
|
// end;
|
||||||
|
// BaoID.Text := trim(FBaoid);
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// SMNO.SetFocus;
|
||||||
|
// exit;
|
||||||
|
// except
|
||||||
|
// // ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
// CDSSEL.EnableControls;
|
||||||
|
// application.MessageBox('数据撤销失败!', '提示信息', 0);
|
||||||
|
// end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmCPDBao.FbqBtnClick(Sender: TObject);
|
procedure TfrmCPDBao.FbqBtnClick(Sender: TObject);
|
||||||
|
|
@ -1149,17 +1332,12 @@ end;
|
||||||
|
|
||||||
procedure TfrmCPDBao.BaoBqBtnClick(Sender: TObject);
|
procedure TfrmCPDBao.BaoBqBtnClick(Sender: TObject);
|
||||||
type
|
type
|
||||||
TMyFunc = function(App:Tapplication; FormH:hwnd; FormID:integer;
|
TMyFunc = function(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; stdcall;
|
||||||
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;stdcall;
|
|
||||||
var
|
var
|
||||||
Tf: TMyFunc;
|
Tf: TMyFunc;
|
||||||
Tp: TFarProc;
|
Tp: TFarProc;
|
||||||
Th: Thandle;
|
Th: Thandle;
|
||||||
LabInt,labname:String;
|
LabInt, labname: string;
|
||||||
begin
|
begin
|
||||||
//if PPInt=2 then Exit;
|
//if PPInt=2 then Exit;
|
||||||
Ddatabase := StringOfChar(' ', 32);
|
Ddatabase := StringOfChar(' ', 32);
|
||||||
|
|
@ -1171,15 +1349,7 @@ begin
|
||||||
if Tp <> nil then
|
if Tp <> nil then
|
||||||
begin
|
begin
|
||||||
Tf := TMyFunc(Tp);
|
Tf := TMyFunc(Tp);
|
||||||
newh:=Tf(Application,0,2,0,0,
|
newh := Tf(Application, 0, 2, 0, 0, PChar(DCode), PChar(DName), PChar(Ddatabase), PChar('标签模版设置'), PChar(''), PChar(''), '', '', '', '', '', '', '', '', PChar(DConString));
|
||||||
PChar(DCode),
|
|
||||||
PChar(DName),
|
|
||||||
PChar(Ddatabase),
|
|
||||||
PChar('깃푯친경<ECB99C>零'),
|
|
||||||
PChar(''),
|
|
||||||
PChar(''),
|
|
||||||
'','','','','','','','',PChar(DConString)
|
|
||||||
);
|
|
||||||
if Trim(PChar(Ddatabase)) <> '' then
|
if Trim(PChar(Ddatabase)) <> '' then
|
||||||
begin
|
begin
|
||||||
Ddatabase := Trim(PChar(Ddatabase));
|
Ddatabase := Trim(PChar(Ddatabase));
|
||||||
|
|
@ -1209,7 +1379,8 @@ end;
|
||||||
|
|
||||||
procedure TfrmCPDBao.cxButton6Click(Sender: TObject);
|
procedure TfrmCPDBao.cxButton6Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
IF CDSTM.IsEmpty then exit;
|
if CDSTM.IsEmpty then
|
||||||
|
exit;
|
||||||
if trim(BaoNo.Text) = '' then
|
if trim(BaoNo.Text) = '' then
|
||||||
begin
|
begin
|
||||||
application.MessageBox('包号不能为空', '提示');
|
application.MessageBox('包号不能为空', '提示');
|
||||||
|
|
@ -1258,7 +1429,7 @@ begin
|
||||||
baoNo.text := ADOQuery2.fieldbyname('MaxBaoNo').AsString;
|
baoNo.text := ADOQuery2.fieldbyname('MaxBaoNo').AsString;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
IF CDSMJID.Locate('MJID',trim(CDSTM.fieldbyname('MJID').AsString),[]) then
|
if CDSMJID.Locate('MJID', trim(CDSTM.fieldbyname('MJID').AsString), []) then
|
||||||
begin
|
begin
|
||||||
MovePanel1.Visible := true;
|
MovePanel1.Visible := true;
|
||||||
Edit2.Text := SmNO.Text;
|
Edit2.Text := SmNO.Text;
|
||||||
|
|
@ -1306,4 +1477,124 @@ begin
|
||||||
SInitCDSData20(ADOQueryTM, CDSTM);
|
SInitCDSData20(ADOQueryTM, CDSTM);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPDBao.N1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
SelOKNoFiler(Tv4, True);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPDBao.N2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
SelOKNoFiler(Tv4, False);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPDBao.cxButton8Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile: string;
|
||||||
|
Txt, fImagePath: string;
|
||||||
|
Moudle: THandle;
|
||||||
|
Makebar: TMakebar;
|
||||||
|
Mixtext: TMixtext;
|
||||||
|
FBaoID: string;
|
||||||
|
i: Integer;
|
||||||
|
begin
|
||||||
|
|
||||||
|
if CDSSEL.IsEmpty then
|
||||||
|
exit;
|
||||||
|
|
||||||
|
with ADOQueryPrint do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' SELECT D.LBName,D.NLBName');
|
||||||
|
sql.Add(' from WFB_MJJY A');
|
||||||
|
sql.Add(' inner join JYOrder_Main D on D.MainID=A.MainID');
|
||||||
|
SQL.Add('where MJID=''' + Trim(CDSSEL.fieldbyname('MJID').AsString) + '''');
|
||||||
|
Open;
|
||||||
|
if not ADOQueryPrint.IsEmpty then
|
||||||
|
begin
|
||||||
|
if Trim(ADOQueryPrint.fieldbyname('NLBName').AsString) = '' then
|
||||||
|
begin
|
||||||
|
application.MessageBox('没有设置包标签,不能打包!', '提示信息', 0);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryPrint do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select A.Baoid,A.BaoNo,A.MJTypeOther as QtyUnit,D.OrderNo,D.conNo,D.customerNoName,D.MprtCodeName,D.Mprtspec,D.OrdPerson1,D.MPRTKuanNO,D.LBName,D.NLBName,');
|
||||||
|
sql.Add('PRTColor=DBO.F_Get_Order_SubStr(BaoID,''BNColor''),SOrddefstr1=DBO.F_Get_Order_SubStr(BaoID,''BNSOrddefstr1''),');
|
||||||
|
sql.Add('SOrddefstr4=DBO.F_Get_Order_SubStr(BaoID,''BNSOrddefstr4''),PRtHX=DBO.F_Get_Order_SubStr(BaoID,''BNPRtHX''), ');
|
||||||
|
sql.Add('Mjstr4=DBO.F_Get_Order_SubStr(BaoID,''BNGangNo''), ');
|
||||||
|
sql.Add('BNMJLENLIST=DBO.F_Get_Order_SubStr(BaoID,''BNMJLENLIST''), ');
|
||||||
|
sql.Add('PRTkuanNo=DBO.F_Get_Order_SubStr(BaoID,''BNPrtkuanno''),');
|
||||||
|
sql.Add('khConNo=(select top 1 khConNo from JYOrderCon_Main X where X.ConNO=D.conNO), ');
|
||||||
|
sql.Add('MprtCodeNameEng=(select top 1 Note from KH_Zdy X where X.zdyName=D.MprtCodeName), ');
|
||||||
|
SQL.ADD('count(A.MJID) as JSl,sum(A.MJMaoZ) MJMAOZ,sum(MJQty3) as MJQty3,sum(MJQty4) as MJQty4,SUM(A.MJLen)as MJLen');
|
||||||
|
sql.Add('from WFB_MJJY A');
|
||||||
|
sql.Add(' inner join JYOrder_Sub C on C.SubID=A.SubID');
|
||||||
|
sql.Add(' inner join JYOrder_Main D on D.MainID=A.MainID');
|
||||||
|
SQL.Add('where A.BaoID=''' + Trim(CDSSEL.fieldbyname('BaoID').AsString) + '''');
|
||||||
|
SQL.ADD('group by A.Baoid,A.BaoNo,A.MJTypeOther,D.OrderNo,D.conNo,D.customerNoName,D.MprtCodeName,D.Mprtspec,D.OrdPerson1,D.MPRTKuanNO,D.LBName,D.NLBName');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if ADOQueryPrint.RecordCount > 1 then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('打包错误,请重新打包!', '提示', 0);
|
||||||
|
if FileExists(PChar(ExtractFilePath(Application.ExeName) + 'wav\打包错误.wav')) then
|
||||||
|
PlaySound(PChar(ExtractFilePath(Application.ExeName) + 'wav\打包错误.wav'), 0, SND_ASYNC);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if ADOQueryPrint.RecordCount < 1 then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('此包号还未被保存,请保存数据,在打印条码!', '提示', 0);
|
||||||
|
if FileExists(PChar(ExtractFilePath(Application.ExeName) + 'wav\打包错误.wav')) then
|
||||||
|
PlaySound(PChar(ExtractFilePath(Application.ExeName) + 'wav\打包错误.wav'), 0, SND_ASYNC);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
|
Moudle := LoadLibrary('MakeQRBarcode.dll');
|
||||||
|
@Makebar := GetProcAddress(Moudle, 'Make');
|
||||||
|
@Mixtext := GetProcAddress(Moudle, 'MixText');
|
||||||
|
Txt := trim(BaoID.Text);
|
||||||
|
fImagePath := ExtractFilePath(Application.ExeName) + 'image\temp.bmp';
|
||||||
|
if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName) + 'image')) then
|
||||||
|
CreateDirectory(pchar(ExtractFilePath(Application.ExeName) + 'image'), nil);
|
||||||
|
if FileExists(fImagePath) then
|
||||||
|
DeleteFile(fImagePath);
|
||||||
|
Makebar(pchar(Txt), Length(Txt), 3, 3, 0, PChar(fImagePath), 3);
|
||||||
|
except
|
||||||
|
application.MessageBox('条形码生成失败!', '提示信息', MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if check_bz.Checked then
|
||||||
|
begin
|
||||||
|
if Trim(ADOQueryPrint.fieldbyname('NLBName').AsString) <> '' then
|
||||||
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + Trim(ADOQueryPrint.fieldbyname('NLBName').AsString) + '.rmf' // fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + Trim(ADOQueryPrint.fieldbyname('NLBName').AsString)
|
||||||
|
else
|
||||||
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\包标签.rmf';
|
||||||
|
if not FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找' + fPrintFile), '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
RMVariables['QRBARCODE'] := fImagePath;
|
||||||
|
RM2.LoadFromFile(fPrintFile);
|
||||||
|
RM2.DefaultCopies := strtointdef(trim(ComboBox1.Text), 1);
|
||||||
|
//RM2.ShowReport;
|
||||||
|
RM2.printReport;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
|
||||||
1652
检验管理/U_CPDBAO_S.dfm
Normal file
1652
检验管理/U_CPDBAO_S.dfm
Normal file
File diff suppressed because it is too large
Load Diff
1324
检验管理/U_CPDBAO_S.pas
Normal file
1324
检验管理/U_CPDBAO_S.pas
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -20,7 +20,7 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
|
||||||
object ToolBar1: TToolBar
|
object ToolBar1: TToolBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 1370
|
Width = 1362
|
||||||
Height = 62
|
Height = 62
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
ButtonHeight = 30
|
ButtonHeight = 30
|
||||||
|
|
@ -173,7 +173,7 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
|
||||||
end
|
end
|
||||||
object ComboBox1: TComboBox
|
object ComboBox1: TComboBox
|
||||||
Left = 515
|
Left = 515
|
||||||
Top = 30
|
Top = 33
|
||||||
Width = 149
|
Width = 149
|
||||||
Height = 24
|
Height = 24
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
|
|
@ -183,8 +183,10 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
|
||||||
Font.Name = #23435#20307
|
Font.Name = #23435#20307
|
||||||
Font.Style = []
|
Font.Style = []
|
||||||
ItemHeight = 16
|
ItemHeight = 16
|
||||||
|
ItemIndex = 0
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
|
Text = #38144#21806#30721#21333'(1'#21015')'
|
||||||
Items.Strings = (
|
Items.Strings = (
|
||||||
#38144#21806#30721#21333'(1'#21015')'
|
#38144#21806#30721#21333'(1'#21015')'
|
||||||
#33521#25991#30721#21333
|
#33521#25991#30721#21333
|
||||||
|
|
@ -199,7 +201,9 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
|
||||||
#38024#32455#24067#21333#21367#21333#21253#35013#31665#21333
|
#38024#32455#24067#21333#21367#21333#21253#35013#31665#21333
|
||||||
#25191#20565#30721#21333
|
#25191#20565#30721#21333
|
||||||
#25191#20565#30721#21333'('#20844#26020')'
|
#25191#20565#30721#21333'('#20844#26020')'
|
||||||
#25191#20565#30721#21333'(5'#21015')')
|
#25191#20565#30721#21333'(5'#21015')'
|
||||||
|
#24378#20852#30721#21333
|
||||||
|
#25171#21253#30721#21333)
|
||||||
end
|
end
|
||||||
object TBAftChkHX: TToolButton
|
object TBAftChkHX: TToolButton
|
||||||
Left = 664
|
Left = 664
|
||||||
|
|
@ -230,7 +234,7 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 62
|
Top = 62
|
||||||
Width = 1370
|
Width = 1362
|
||||||
Height = 67
|
Height = 67
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BevelInner = bvRaised
|
BevelInner = bvRaised
|
||||||
|
|
@ -677,8 +681,8 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
|
||||||
object cxGrid1: TcxGrid
|
object cxGrid1: TcxGrid
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 129
|
Top = 129
|
||||||
Width = 1370
|
Width = 1362
|
||||||
Height = 594
|
Height = 586
|
||||||
Align = alClient
|
Align = alClient
|
||||||
PopupMenu = PopupMenu1
|
PopupMenu = PopupMenu1
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
|
|
|
||||||
|
|
@ -1466,32 +1466,6 @@ begin
|
||||||
ADOQueryCmd.Connection.RollbackTrans;
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
end;
|
end;
|
||||||
Order_Main.EnableControls;
|
Order_Main.EnableControls;
|
||||||
// if trim(ComboBox1.Text) = 'ÏúÊÛÂëµ¥(2ÁÐ)' then
|
|
||||||
// begin
|
|
||||||
// with ADOQueryTemp do
|
|
||||||
// begin
|
|
||||||
// Close;
|
|
||||||
// sql.Clear;
|
|
||||||
// sql.add('exec P_Print_CKMDYDLS ');
|
|
||||||
// sql.add('@DName=' + quotedstr(Trim(DCode)));
|
|
||||||
// Open;
|
|
||||||
// end;
|
|
||||||
// SCreateCDS20(ADOQueryTemp, CDS_HZ);
|
|
||||||
// SInitCDSData20(ADOQueryTemp, CDS_HZ);
|
|
||||||
//
|
|
||||||
// with ADOQueryPrint do
|
|
||||||
// begin
|
|
||||||
// Close;
|
|
||||||
// sql.Clear;
|
|
||||||
// sql.add('exec P_Do_PrintMd_HZ ');
|
|
||||||
// sql.add('@mainID=' + quotedstr(Trim('')));
|
|
||||||
// sql.add(',@DName=' + quotedstr(Trim(DCode)));
|
|
||||||
// sql.add(',@flag=''2'' ');
|
|
||||||
// Open;
|
|
||||||
// end;
|
|
||||||
//// SCreateCDS20(ADOQueryTemp, CDS_PRT);
|
|
||||||
//// SInitCDSData20(ADOQueryTemp, CDS_PRT);
|
|
||||||
// end;
|
|
||||||
|
|
||||||
if (trim(ComboBox1.Text) = '饋簡쯤데(1죗)') or (trim(ComboBox1.Text) = '饋簡쯤데(2죗)') or (trim(ComboBox1.Text) = '亶匡쯤데') then
|
if (trim(ComboBox1.Text) = '饋簡쯤데(1죗)') or (trim(ComboBox1.Text) = '饋簡쯤데(2죗)') or (trim(ComboBox1.Text) = '亶匡쯤데') then
|
||||||
begin
|
begin
|
||||||
|
|
@ -1516,8 +1490,6 @@ begin
|
||||||
sql.add(',@flag=''2'' ');
|
sql.add(',@flag=''2'' ');
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
// SCreateCDS20(ADOQueryTemp, CDS_PRT);
|
|
||||||
// SInitCDSData20(ADOQueryTemp, CDS_PRT);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if (trim(ComboBox1.Text) = '쇱駱쯤데(陋芎)') then
|
if (trim(ComboBox1.Text) = '쇱駱쯤데(陋芎)') then
|
||||||
|
|
@ -1692,7 +1664,54 @@ begin
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
if trim(ComboBox1.Text) = '´ò°üÂëµ¥' then
|
||||||
|
begin
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('exec P_Print_CKMDYDL_DB ');
|
||||||
|
sql.add('@DName=' + quotedstr(Trim(DCode)));
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryTemp, CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryTemp, CDS_HZ);
|
||||||
|
|
||||||
|
with ADOQueryPrint do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('exec P_Do_PrintMd_HZ ');
|
||||||
|
sql.add('@mainID=' + quotedstr(Trim('')));
|
||||||
|
sql.add(',@DName=' + quotedstr(Trim(DCode)));
|
||||||
|
sql.add(',@flag=''22'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if trim(ComboBox1.Text) = 'Ç¿ÐËÂëµ¥' then
|
||||||
|
begin
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('exec P_Print_CKMDYDL_QXMD ');
|
||||||
|
sql.add('@DName=' + quotedstr(Trim(DCode)));
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryTemp, CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryTemp, CDS_HZ);
|
||||||
|
|
||||||
|
with ADOQueryPrint do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('exec P_Do_PrintMd_HZ ');
|
||||||
|
sql.add('@mainID=' + quotedstr(Trim('')));
|
||||||
|
sql.add(',@DName=' + quotedstr(Trim(DCode)));
|
||||||
|
sql.add(',@flag=''22'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
if (trim(ComboBox1.Text) = '쇱駱쯤데(횡<>)') or (trim(ComboBox1.Text) = '쇱駱쯤데(댔얩)') then
|
if (trim(ComboBox1.Text) = '쇱駱쯤데(횡<>)') or (trim(ComboBox1.Text) = '쇱駱쯤데(댔얩)') then
|
||||||
begin
|
begin
|
||||||
with ADOQueryTemp do
|
with ADOQueryTemp do
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 105
|
Top = 105
|
||||||
Width = 237
|
Width = 237
|
||||||
Height = 741
|
Height = 733
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object Tv3: TcxGridDBTableView
|
object Tv3: TcxGridDBTableView
|
||||||
|
|
@ -123,8 +123,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
||||||
object ScrollBox1: TScrollBox
|
object ScrollBox1: TScrollBox
|
||||||
Left = 649
|
Left = 649
|
||||||
Top = 105
|
Top = 105
|
||||||
Width = 645
|
Width = 637
|
||||||
Height = 741
|
Height = 733
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
object SpeedButton13: TSpeedButton
|
object SpeedButton13: TSpeedButton
|
||||||
|
|
@ -1002,7 +1002,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
||||||
Left = 445
|
Left = 445
|
||||||
Top = 105
|
Top = 105
|
||||||
Width = 204
|
Width = 204
|
||||||
Height = 741
|
Height = 733
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
BevelInner = bvRaised
|
BevelInner = bvRaised
|
||||||
BevelOuter = bvLowered
|
BevelOuter = bvLowered
|
||||||
|
|
@ -1724,7 +1724,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
||||||
object Panel4: TPanel
|
object Panel4: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 1294
|
Width = 1286
|
||||||
Height = 105
|
Height = 105
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BevelInner = bvRaised
|
BevelInner = bvRaised
|
||||||
|
|
@ -1733,14 +1733,14 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
||||||
object Panel5: TPanel
|
object Panel5: TPanel
|
||||||
Left = 2
|
Left = 2
|
||||||
Top = 2
|
Top = 2
|
||||||
Width = 1290
|
Width = 1282
|
||||||
Height = 101
|
Height = 101
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object Panel6: TPanel
|
object Panel6: TPanel
|
||||||
Left = 1
|
Left = 1
|
||||||
Top = 31
|
Top = 31
|
||||||
Width = 1288
|
Width = 1280
|
||||||
Height = 74
|
Height = 74
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BevelInner = bvRaised
|
BevelInner = bvRaised
|
||||||
|
|
@ -2035,7 +2035,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
||||||
object ToolBar1: TToolBar
|
object ToolBar1: TToolBar
|
||||||
Left = 1
|
Left = 1
|
||||||
Top = 1
|
Top = 1
|
||||||
Width = 1288
|
Width = 1280
|
||||||
Height = 30
|
Height = 30
|
||||||
ButtonHeight = 30
|
ButtonHeight = 30
|
||||||
ButtonWidth = 83
|
ButtonWidth = 83
|
||||||
|
|
@ -2352,7 +2352,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
||||||
Left = 237
|
Left = 237
|
||||||
Top = 105
|
Top = 105
|
||||||
Width = 208
|
Width = 208
|
||||||
Height = 741
|
Height = 733
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
BevelInner = bvRaised
|
BevelInner = bvRaised
|
||||||
BevelOuter = bvLowered
|
BevelOuter = bvLowered
|
||||||
|
|
@ -2361,7 +2361,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
||||||
Left = 2
|
Left = 2
|
||||||
Top = 2
|
Top = 2
|
||||||
Width = 204
|
Width = 204
|
||||||
Height = 415
|
Height = 407
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object Tv2: TcxGridDBTableView
|
object Tv2: TcxGridDBTableView
|
||||||
|
|
@ -2470,7 +2470,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
||||||
end
|
end
|
||||||
object Panel8: TPanel
|
object Panel8: TPanel
|
||||||
Left = 2
|
Left = 2
|
||||||
Top = 417
|
Top = 409
|
||||||
Width = 204
|
Width = 204
|
||||||
Height = 29
|
Height = 29
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
|
|
@ -2485,7 +2485,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
||||||
end
|
end
|
||||||
object AOrdDefNote1: TRichEdit
|
object AOrdDefNote1: TRichEdit
|
||||||
Left = 2
|
Left = 2
|
||||||
Top = 446
|
Top = 438
|
||||||
Width = 204
|
Width = 204
|
||||||
Height = 293
|
Height = 293
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
|
|
|
||||||
|
|
@ -319,7 +319,7 @@ type
|
||||||
FInt, PState, PrintInt, SCInitGrid, FState, FCK: Integer;
|
FInt, PState, PrintInt, SCInitGrid, FState, FCK: Integer;
|
||||||
FColumn, FBanZu, FAPID, FMainId, FSubId, FFFMJID: string;
|
FColumn, FBanZu, FAPID, FMainId, FSubId, FFFMJID: string;
|
||||||
FJZ, FJC: Double;
|
FJZ, FJC: Double;
|
||||||
fRollType, fRollType1: string;
|
fRollType, fRollType1, fbaotype, fbaosx: string;
|
||||||
isCommopen, IsJsMessage: boolean;
|
isCommopen, IsJsMessage: boolean;
|
||||||
MValue, FCDName: string;
|
MValue, FCDName: string;
|
||||||
fxsws, fxsws1: string;
|
fxsws, fxsws1: string;
|
||||||
|
|
@ -334,6 +334,7 @@ type
|
||||||
procedure AddCDNew(Fbtn: TSpeedButton);
|
procedure AddCDNew(Fbtn: TSpeedButton);
|
||||||
procedure SavedataCK();
|
procedure SavedataCK();
|
||||||
procedure PrtData(FMJID: string);
|
procedure PrtData(FMJID: string);
|
||||||
|
procedure PrtBaoData(FBaoid: string);
|
||||||
procedure OpenCom(DllName: string);
|
procedure OpenCom(DllName: string);
|
||||||
procedure CloseCom(DllName: string);
|
procedure CloseCom(DllName: string);
|
||||||
procedure On1201(var Message: Tmessage); message 1201;
|
procedure On1201(var Message: Tmessage); message 1201;
|
||||||
|
|
@ -1076,6 +1077,11 @@ begin
|
||||||
|
|
||||||
FieldByName('MJTypeOther').Value := Trim(Label9.Caption);
|
FieldByName('MJTypeOther').Value := Trim(Label9.Caption);
|
||||||
FieldByName('note').Value := Trim(note.Text);
|
FieldByName('note').Value := Trim(note.Text);
|
||||||
|
if trim(fbaotype) = '手动打包' then
|
||||||
|
begin
|
||||||
|
FieldByName('baoNO').Value := Trim(baono.text);
|
||||||
|
FieldByName('baoID').Value := Trim(baoID.Text);
|
||||||
|
end;
|
||||||
// FieldByName('baoNO').Value:=Trim(baono.text);
|
// FieldByName('baoNO').Value:=Trim(baono.text);
|
||||||
// FieldByName('baoID').Value:=Trim(baoID.Text);
|
// FieldByName('baoID').Value:=Trim(baoID.Text);
|
||||||
Post;
|
Post;
|
||||||
|
|
@ -1214,7 +1220,32 @@ begin
|
||||||
sql.Add('where MJID=''' + Trim(FMJID) + ''' ');
|
sql.Add('where MJID=''' + Trim(FMJID) + ''' ');
|
||||||
execsql;
|
execsql;
|
||||||
end;
|
end;
|
||||||
|
if (fbaotype = '手动打包') or (fbaotype = '') or (PState = 2) then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
with ADOCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec P_Update_Bao ''' + trim(FMJID) + ''' ');
|
||||||
|
if fbaotype = '单卷单包' then
|
||||||
|
begin
|
||||||
|
sql.Add(',1 ');
|
||||||
|
end
|
||||||
|
else if fbaotype = '多卷单色' then
|
||||||
|
begin
|
||||||
|
sql.Add(',2 ');
|
||||||
|
end
|
||||||
|
else if fbaotype = '多卷混色' then
|
||||||
|
begin
|
||||||
|
sql.Add(',3 ');
|
||||||
|
end;
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
//SavedataCK();
|
//SavedataCK();
|
||||||
ADOCmd.Connection.CommitTrans;
|
ADOCmd.Connection.CommitTrans;
|
||||||
Result := True;
|
Result := True;
|
||||||
|
|
@ -1430,7 +1461,42 @@ begin
|
||||||
PrtData(FFFMJID);
|
PrtData(FFFMJID);
|
||||||
//end;
|
//end;
|
||||||
end;
|
end;
|
||||||
|
if Trim(Edit6.Text) = '√' then
|
||||||
|
begin
|
||||||
|
if (fbaotype = '手动打包') or (fbaotype = '') then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
with ADOCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec P_View_Baoid ''' + trim(FFFMJID) + ''' ');
|
||||||
|
sql.Add(',''' + trim(FMainId) + ''' ,''' + trim(FSubId) + ''' ');
|
||||||
|
if fbaotype = '单卷单包' then
|
||||||
|
begin
|
||||||
|
sql.Add(' ,1 ');
|
||||||
|
end;
|
||||||
|
if fbaotype = '多卷单色' then
|
||||||
|
begin
|
||||||
|
sql.Add(' ,2 ');
|
||||||
|
end;
|
||||||
|
if fbaotype = '多卷混色' then
|
||||||
|
begin
|
||||||
|
sql.Add(' ,3 ');
|
||||||
|
end;
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if trim(ADOCmd.FieldByName('baoid').AsString) <> '' then
|
||||||
|
begin
|
||||||
|
PrtBaoData(ADOCmd.fieldbyname('baoid').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
Label16.Caption := '';
|
Label16.Caption := '';
|
||||||
BTAdd.Click;
|
BTAdd.Click;
|
||||||
MJMaoZ.SetFocus;
|
MJMaoZ.SetFocus;
|
||||||
|
|
@ -2189,6 +2255,8 @@ begin
|
||||||
FSubId := Trim(ADOTmp.fieldbyname('SubId').AsString);
|
FSubId := Trim(ADOTmp.fieldbyname('SubId').AsString);
|
||||||
FJZ := ADOTmp.fieldbyname('jiazhong').AsFloat;
|
FJZ := ADOTmp.fieldbyname('jiazhong').AsFloat;
|
||||||
FJC := ADOTmp.fieldbyname('jiachang').AsFloat;
|
FJC := ADOTmp.fieldbyname('jiachang').AsFloat;
|
||||||
|
fbaotype := Trim(ADOTmp.fieldbyname('baotype').AsString);
|
||||||
|
fbaosx := Trim(ADOTmp.fieldbyname('baosx').AsString);
|
||||||
AOrdDefNote1.Text := '°ü×°ÒªÇó:' + #13 + Trim(ADOTmp.fieldbyname('MPRTBZNote').AsString) + #13 //+'·âÌõ:'+Trim(ADOTmp.fieldbyname('MPRTYaoFeng').AsString)+#13
|
AOrdDefNote1.Text := '°ü×°ÒªÇó:' + #13 + Trim(ADOTmp.fieldbyname('MPRTBZNote').AsString) + #13 //+'·âÌõ:'+Trim(ADOTmp.fieldbyname('MPRTYaoFeng').AsString)+#13
|
||||||
//+'Ì̽ð:'+Trim(ADOTmp.fieldbyname('MPRTTangJin').AsString)+#13
|
//+'Ì̽ð:'+Trim(ADOTmp.fieldbyname('MPRTTangJin').AsString)+#13
|
||||||
//+'¿ª¼ô:'+Trim(ADOTmp.fieldbyname('MPRTKaiJian').AsString)+#13
|
//+'¿ª¼ô:'+Trim(ADOTmp.fieldbyname('MPRTKaiJian').AsString)+#13
|
||||||
|
|
@ -2539,6 +2607,93 @@ begin
|
||||||
InitCDGridID();
|
InitCDGridID();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmMJManageNewFDNewSF.PrtBaoData(FBaoid: string);
|
||||||
|
var
|
||||||
|
fPrintFile: string;
|
||||||
|
Txt, fImagePath: string;
|
||||||
|
Moudle: THandle;
|
||||||
|
Makebar: TMakebar;
|
||||||
|
Mixtext: TMixtext;
|
||||||
|
i: Integer;
|
||||||
|
begin
|
||||||
|
if CDS_MJID.IsEmpty then
|
||||||
|
exit;
|
||||||
|
CDS_MJID.First;
|
||||||
|
with ADOQueryPrint do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select A.Baoid,A.BaoNo,A.MJTypeOther as QtyUnit,D.OrderNo,D.conNo,D.customerNoName,D.MprtCodeName,D.Mprtspec,D.OrdPerson1,D.MPRTKuanNO,D.LBName,D.NLBName,');
|
||||||
|
sql.Add('PRTColor=DBO.F_Get_Order_SubStr(BaoID,''BNColor''),SOrddefstr1=DBO.F_Get_Order_SubStr(BaoID,''BNSOrddefstr1''),');
|
||||||
|
sql.Add('SOrddefstr4=DBO.F_Get_Order_SubStr(BaoID,''BNSOrddefstr4''),PRtHX=DBO.F_Get_Order_SubStr(BaoID,''BNPRtHX''), ');
|
||||||
|
sql.Add('Mjstr4=DBO.F_Get_Order_SubStr(BaoID,''BNGangNo''), ');
|
||||||
|
sql.Add('MJXH=DBO.F_Get_Order_SubStr(BaoID,''BNMJXH''), ');
|
||||||
|
sql.Add('BNMJLENLIST=DBO.F_Get_Order_SubStr(BaoID,''BNMJLENLIST''), ');
|
||||||
|
sql.Add('PRTkuanNo=DBO.F_Get_Order_SubStr(BaoID,''BNPrtkuanno''),');
|
||||||
|
sql.Add('khConNo=(select top 1 khConNo from JYOrderCon_Main X where X.ConNO=D.conNO), ');
|
||||||
|
sql.Add('MprtCodeNameEng=(select top 1 Note from KH_Zdy X where X.zdyName=D.MprtCodeName), ');
|
||||||
|
SQL.ADD('count(A.MJID) as JSl,sum(A.MJMaoZ) MJMAOZ,sum(MJQty3) as MJQty3,sum(MJQty4) as MJQty4,SUM(A.MJLen)as MJLen');
|
||||||
|
sql.Add('from WFB_MJJY A');
|
||||||
|
sql.Add('inner join JYOrder_Sub C on C.SubID=A.SubID');
|
||||||
|
sql.Add('inner join JYOrder_Main D on D.MainID=A.MainID');
|
||||||
|
SQL.Add('where A.BaoID=''' + Trim(FBaoid) + '''');
|
||||||
|
SQL.ADD('group by A.Baoid,A.BaoNo,A.MJTypeOther,D.OrderNo,D.conNo,D.customerNoName,D.MprtCodeName,D.Mprtspec,D.OrdPerson1,D.MPRTKuanNO,D.LBName,D.NLBName');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryPrint.RecordCount > 1 then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('打包错误,请重新打包!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if ADOQueryPrint.RecordCount < 1 then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('此包号还未被保存,请保存数据,在打印条码!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
Moudle := LoadLibrary('MakeQRBarcode.dll');
|
||||||
|
@Makebar := GetProcAddress(Moudle, 'Make');
|
||||||
|
@Mixtext := GetProcAddress(Moudle, 'MixText');
|
||||||
|
Txt := trim(FBaoid);
|
||||||
|
fImagePath := ExtractFilePath(Application.ExeName) + 'image\temp.bmp';
|
||||||
|
if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName) + 'image')) then
|
||||||
|
CreateDirectory(pchar(ExtractFilePath(Application.ExeName) + 'image'), nil);
|
||||||
|
if FileExists(fImagePath) then
|
||||||
|
DeleteFile(fImagePath);
|
||||||
|
Makebar(pchar(Txt), Length(Txt), 3, 3, 0, PChar(fImagePath), 3);
|
||||||
|
except
|
||||||
|
application.MessageBox('条形码生成失败!', '提示信息', MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if Trim(ADOQueryPrint.fieldbyname('NLBName').AsString) <> '' then
|
||||||
|
begin
|
||||||
|
ExportFtErpFile(Trim(ADOQueryPrint.fieldbyname('NLBName').AsString), ADOCmd);
|
||||||
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + Trim(ADOQueryPrint.fieldbyname('NLBName').AsString)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
ExportFtErpFile('包标签.rmf', ADOCmd);
|
||||||
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\包标签.rmf';
|
||||||
|
end;
|
||||||
|
|
||||||
|
if not FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找' + fPrintFile), '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
RMVariables['QRBARCODE'] := fImagePath;
|
||||||
|
RM2.LoadFromFile(fPrintFile);
|
||||||
|
RM2.DefaultCopies := 1;
|
||||||
|
//RM2.ShowReport;
|
||||||
|
RM2.printReport;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrmMJManageNewFDNewSF.Button7Click(Sender: TObject);
|
procedure TfrmMJManageNewFDNewSF.Button7Click(Sender: TObject);
|
||||||
var
|
var
|
||||||
fPrintFile: string;
|
fPrintFile: string;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet
|
object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet
|
||||||
Left = 170
|
Left = 182
|
||||||
Top = 95
|
Top = 249
|
||||||
Width = 1378
|
Width = 1378
|
||||||
Height = 754
|
Height = 754
|
||||||
Caption = #26631#31614#35774#32622
|
Caption = #26631#31614#35774#32622
|
||||||
|
|
@ -20,7 +20,8 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet
|
||||||
object ToolBar1: TToolBar
|
object ToolBar1: TToolBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 1370
|
Width = 1362
|
||||||
|
Height = 62
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
ButtonHeight = 30
|
ButtonHeight = 30
|
||||||
ButtonWidth = 107
|
ButtonWidth = 107
|
||||||
|
|
@ -79,16 +80,8 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet
|
||||||
ImageIndex = 60
|
ImageIndex = 60
|
||||||
OnClick = ToolButton2Click
|
OnClick = ToolButton2Click
|
||||||
end
|
end
|
||||||
object ToolButton4: TToolButton
|
|
||||||
Left = 339
|
|
||||||
Top = 0
|
|
||||||
AutoSize = True
|
|
||||||
Caption = #21253#26631#31614#35774#32622
|
|
||||||
ImageIndex = 60
|
|
||||||
OnClick = ToolButton4Click
|
|
||||||
end
|
|
||||||
object ToolButton3: TToolButton
|
object ToolButton3: TToolButton
|
||||||
Left = 438
|
Left = 339
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #30382#37325#35774#32622'(Kg)'
|
Caption = #30382#37325#35774#32622'(Kg)'
|
||||||
|
|
@ -96,64 +89,89 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet
|
||||||
OnClick = ToolButton3Click
|
OnClick = ToolButton3Click
|
||||||
end
|
end
|
||||||
object ToolButton10: TToolButton
|
object ToolButton10: TToolButton
|
||||||
Left = 549
|
Left = 450
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #21152#37325#35774#32622
|
Caption = #21152#37325#35774#32622
|
||||||
ImageIndex = 60
|
ImageIndex = 60
|
||||||
|
Wrap = True
|
||||||
OnClick = ToolButton10Click
|
OnClick = ToolButton10Click
|
||||||
end
|
end
|
||||||
object ToolButton11: TToolButton
|
object ToolButton11: TToolButton
|
||||||
Left = 636
|
Left = 0
|
||||||
Top = 0
|
Top = 30
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #21152#38271#35774#32622
|
Caption = #21152#38271#35774#32622
|
||||||
ImageIndex = 60
|
ImageIndex = 60
|
||||||
OnClick = ToolButton11Click
|
OnClick = ToolButton11Click
|
||||||
end
|
end
|
||||||
object ToolButton5: TToolButton
|
object ToolButton5: TToolButton
|
||||||
Left = 723
|
Left = 87
|
||||||
Top = 0
|
Top = 30
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #25442#31639#31995#25968
|
Caption = #25442#31639#31995#25968
|
||||||
ImageIndex = 60
|
ImageIndex = 60
|
||||||
OnClick = ToolButton5Click
|
OnClick = ToolButton5Click
|
||||||
end
|
end
|
||||||
object ToolButton6: TToolButton
|
object ToolButton6: TToolButton
|
||||||
Left = 810
|
Left = 174
|
||||||
Top = 0
|
Top = 30
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #38271#24230#20301#25968
|
Caption = #38271#24230#20301#25968
|
||||||
ImageIndex = 60
|
ImageIndex = 60
|
||||||
OnClick = ToolButton6Click
|
OnClick = ToolButton6Click
|
||||||
end
|
end
|
||||||
object ToolButton9: TToolButton
|
object ToolButton9: TToolButton
|
||||||
Left = 897
|
Left = 261
|
||||||
Top = 0
|
Top = 30
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #37325#37327#20301#25968
|
Caption = #37325#37327#20301#25968
|
||||||
ImageIndex = 60
|
ImageIndex = 60
|
||||||
OnClick = ToolButton9Click
|
OnClick = ToolButton9Click
|
||||||
end
|
end
|
||||||
|
object ToolButton12: TToolButton
|
||||||
|
Left = 348
|
||||||
|
Top = 30
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #27599#21253#21367#25968
|
||||||
|
ImageIndex = 60
|
||||||
|
OnClick = ToolButton12Click
|
||||||
|
end
|
||||||
|
object ToolButton13: TToolButton
|
||||||
|
Left = 435
|
||||||
|
Top = 30
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #27599#21367#38271#24230
|
||||||
|
ImageIndex = 60
|
||||||
|
OnClick = ToolButton13Click
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 522
|
||||||
|
Top = 30
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21253#26631#31614#35774#32622
|
||||||
|
ImageIndex = 60
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
object ToolButton7: TToolButton
|
object ToolButton7: TToolButton
|
||||||
Left = 984
|
Left = 621
|
||||||
Top = 0
|
Top = 30
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #39044#35272#21367#26631#31614
|
Caption = #39044#35272#21367#26631#31614
|
||||||
ImageIndex = 12
|
ImageIndex = 12
|
||||||
OnClick = ToolButton7Click
|
OnClick = ToolButton7Click
|
||||||
end
|
end
|
||||||
object ToolButton8: TToolButton
|
object ToolButton8: TToolButton
|
||||||
Left = 1083
|
Left = 720
|
||||||
Top = 0
|
Top = 30
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #39044#35272#21253#26631#31614
|
Caption = #39044#35272#21253#26631#31614
|
||||||
ImageIndex = 12
|
ImageIndex = 12
|
||||||
OnClick = ToolButton8Click
|
OnClick = ToolButton8Click
|
||||||
end
|
end
|
||||||
object PiZhong: TEdit
|
object PiZhong: TEdit
|
||||||
Left = 1182
|
Left = 819
|
||||||
Top = 0
|
Top = 30
|
||||||
Width = 121
|
Width = 121
|
||||||
Height = 30
|
Height = 30
|
||||||
Font.Charset = GB2312_CHARSET
|
Font.Charset = GB2312_CHARSET
|
||||||
|
|
@ -165,8 +183,8 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object TBClose: TToolButton
|
object TBClose: TToolButton
|
||||||
Left = 1303
|
Left = 940
|
||||||
Top = 0
|
Top = 30
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #20851#38381
|
Caption = #20851#38381
|
||||||
ImageIndex = 55
|
ImageIndex = 55
|
||||||
|
|
@ -175,8 +193,8 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet
|
||||||
end
|
end
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 32
|
Top = 62
|
||||||
Width = 1370
|
Width = 1362
|
||||||
Height = 62
|
Height = 62
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BevelInner = bvRaised
|
BevelInner = bvRaised
|
||||||
|
|
@ -413,8 +431,8 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet
|
||||||
end
|
end
|
||||||
object cxGrid1: TcxGrid
|
object cxGrid1: TcxGrid
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 94
|
Top = 124
|
||||||
Width = 1370
|
Width = 1362
|
||||||
Height = 545
|
Height = 545
|
||||||
Align = alTop
|
Align = alTop
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
|
@ -614,6 +632,41 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Width = 80
|
Width = 80
|
||||||
end
|
end
|
||||||
|
object Tv1Column2: TcxGridDBColumn
|
||||||
|
Caption = #25171#21253#26041#24335
|
||||||
|
DataBinding.FieldName = 'baotype'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
''
|
||||||
|
#21333#21367#21333#21253
|
||||||
|
#25163#21160#25171#21253
|
||||||
|
#22810#21367#21333#33394)
|
||||||
|
Properties.OnEditValueChanged = Tv1Column2PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv1Column3: TcxGridDBColumn
|
||||||
|
Caption = #27599#21253#21367#25968
|
||||||
|
DataBinding.FieldName = 'JS'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv1Column4: TcxGridDBColumn
|
||||||
|
Caption = #21253#21495#39034#24207
|
||||||
|
DataBinding.FieldName = 'baosx'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
#25353#39068#33394#29983#25104
|
||||||
|
#25353#35746#21333#29983#25104
|
||||||
|
#25353#32568#21495#29983#25104)
|
||||||
|
Properties.OnEditValueChanged = Tv1Column4PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv1Column5: TcxGridDBColumn
|
||||||
|
Caption = #27599#21253#38271#24230
|
||||||
|
DataBinding.FieldName = 'PRTDC'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object cxGrid1Level1: TcxGridLevel
|
object cxGrid1Level1: TcxGridLevel
|
||||||
GridView = Tv1
|
GridView = Tv1
|
||||||
|
|
|
||||||
|
|
@ -6,25 +6,24 @@ uses
|
||||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData,
|
Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData,
|
||||||
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ADODB,
|
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ADODB,
|
||||||
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxClasses,
|
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxClasses, cxControls,
|
||||||
cxControls, cxGridCustomView, cxGridCustomTableView, cxGridTableView,
|
cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
|
||||||
cxGridDBTableView, cxGrid, DBClient, cxCheckBox, cxCalendar, cxSplitter,
|
cxGrid, DBClient, cxCheckBox, cxCalendar, cxSplitter, RM_Dataset, RM_System,
|
||||||
RM_Dataset, RM_System, RM_Common, RM_Class, RM_GridReport, RM_e_Xls,StrUtils,
|
RM_Common, RM_Class, RM_GridReport, RM_e_Xls, StrUtils, Menus, cxDropDownEdit,
|
||||||
Menus, cxDropDownEdit,cxTextEdit, cxLookAndFeels, cxLookAndFeelPainters,
|
cxTextEdit, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxSkinsCore,
|
||||||
cxNavigator, dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinBlueprint,
|
dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee,
|
||||||
dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide,
|
dxSkinDarkRoom, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
|
||||||
dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
|
dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans, dxSkinHighContrast,
|
||||||
dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
|
dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky,
|
||||||
dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
|
dxSkinMcSkin, dxSkinMetropolis, dxSkinMetropolisDark, dxSkinMoneyTwins,
|
||||||
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
|
dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
|
||||||
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
|
dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinOffice2010Black,
|
||||||
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
|
dxSkinOffice2010Blue, dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
|
||||||
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
|
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven,
|
||||||
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin,
|
dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus, dxSkinSilver,
|
||||||
dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus,
|
dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008, dxSkinTheAsphaltWorld,
|
||||||
dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008,
|
dxSkinsDefaultPainters, dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint,
|
||||||
dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, dxSkinValentine,
|
dxSkinXmas2008Blue, dxSkinscxPCPainter;
|
||||||
dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue, dxSkinscxPCPainter;
|
|
||||||
|
|
||||||
type
|
type
|
||||||
TfrmProductOrderLBNameSet = class(TForm)
|
TfrmProductOrderLBNameSet = class(TForm)
|
||||||
|
|
@ -112,6 +111,12 @@ type
|
||||||
v1Column8: TcxGridDBColumn;
|
v1Column8: TcxGridDBColumn;
|
||||||
ToolButton11: TToolButton;
|
ToolButton11: TToolButton;
|
||||||
Tv1Column1: TcxGridDBColumn;
|
Tv1Column1: TcxGridDBColumn;
|
||||||
|
Tv1Column2: TcxGridDBColumn;
|
||||||
|
Tv1Column3: TcxGridDBColumn;
|
||||||
|
Tv1Column4: TcxGridDBColumn;
|
||||||
|
Tv1Column5: TcxGridDBColumn;
|
||||||
|
ToolButton12: TToolButton;
|
||||||
|
ToolButton13: TToolButton;
|
||||||
procedure FormDestroy(Sender: TObject);
|
procedure FormDestroy(Sender: TObject);
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
|
|
@ -121,20 +126,13 @@ type
|
||||||
procedure TBRafreshClick(Sender: TObject);
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
procedure OrderNoChange(Sender: TObject);
|
procedure OrderNoChange(Sender: TObject);
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView;
|
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
|
||||||
AShift: TShiftState; var AHandled: Boolean);
|
|
||||||
procedure CheckBox2Click(Sender: TObject);
|
procedure CheckBox2Click(Sender: TObject);
|
||||||
procedure Tv1StylesGetContentStyle(Sender: TcxCustomGridTableView;
|
procedure Tv1StylesGetContentStyle(Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; out AStyle: TcxStyle);
|
||||||
ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem;
|
procedure v1DeliveryDateCustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||||
out AStyle: TcxStyle);
|
|
||||||
procedure v1DeliveryDateCustomDrawCell(Sender: TcxCustomGridTableView;
|
|
||||||
ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo;
|
|
||||||
var ADone: Boolean);
|
|
||||||
procedure ToolButton1Click(Sender: TObject);
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
procedure OrderNoKeyPress(Sender: TObject; var Key: Char);
|
procedure OrderNoKeyPress(Sender: TObject; var Key: Char);
|
||||||
procedure Panel10MouseMove(Sender: TObject; Shift: TShiftState; X,
|
procedure Panel10MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
|
||||||
Y: Integer);
|
|
||||||
procedure Button1Click(Sender: TObject);
|
procedure Button1Click(Sender: TObject);
|
||||||
procedure Image2Click(Sender: TObject);
|
procedure Image2Click(Sender: TObject);
|
||||||
procedure ToolButton2Click(Sender: TObject);
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
|
@ -149,6 +147,10 @@ type
|
||||||
procedure ToolButton9Click(Sender: TObject);
|
procedure ToolButton9Click(Sender: TObject);
|
||||||
procedure ToolButton10Click(Sender: TObject);
|
procedure ToolButton10Click(Sender: TObject);
|
||||||
procedure ToolButton11Click(Sender: TObject);
|
procedure ToolButton11Click(Sender: TObject);
|
||||||
|
procedure ToolButton12Click(Sender: TObject);
|
||||||
|
procedure ToolButton13Click(Sender: TObject);
|
||||||
|
procedure Tv1Column2PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure Tv1Column4PropertiesEditValueChanged(Sender: TObject);
|
||||||
private
|
private
|
||||||
DQdate: TDateTime;
|
DQdate: TDateTime;
|
||||||
procedure InitGrid();
|
procedure InitGrid();
|
||||||
|
|
@ -164,7 +166,9 @@ type
|
||||||
var
|
var
|
||||||
frmProductOrderLBNameSet: TfrmProductOrderLBNameSet;
|
frmProductOrderLBNameSet: TfrmProductOrderLBNameSet;
|
||||||
newh: hwnd;
|
newh: hwnd;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
U_DataLink, U_OrderInPut, U_Fun;
|
U_DataLink, U_OrderInPut, U_Fun;
|
||||||
|
|
||||||
|
|
@ -175,8 +179,7 @@ begin
|
||||||
frmProductOrderLBNameSet := nil;
|
frmProductOrderLBNameSet := nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmProductOrderLBNameSet.FormClose(Sender: TObject;
|
procedure TfrmProductOrderLBNameSet.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
var Action: TCloseAction);
|
|
||||||
begin
|
begin
|
||||||
Action := caFree;
|
Action := caFree;
|
||||||
end;
|
end;
|
||||||
|
|
@ -216,7 +219,6 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmProductOrderLBNameSet.InitForm();
|
procedure TfrmProductOrderLBNameSet.InitForm();
|
||||||
begin
|
begin
|
||||||
ReadCxGrid('标签设置1', Tv1, '生产指示单管理');
|
ReadCxGrid('标签设置1', Tv1, '生产指示单管理');
|
||||||
|
|
@ -227,11 +229,13 @@ end;
|
||||||
|
|
||||||
procedure TfrmProductOrderLBNameSet.TBFindClick(Sender: TObject);
|
procedure TfrmProductOrderLBNameSet.TBFindClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if ADOQueryMain.Active=False then Exit;
|
if ADOQueryMain.Active = False then
|
||||||
|
Exit;
|
||||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmProductOrderLBNameSet.TBPrintClick(Sender: TObject);
|
procedure TfrmProductOrderLBNameSet.TBPrintClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
Panel4.Visible := True;
|
Panel4.Visible := True;
|
||||||
|
|
@ -259,7 +263,8 @@ end;
|
||||||
|
|
||||||
procedure TfrmProductOrderLBNameSet.OrderNoChange(Sender: TObject);
|
procedure TfrmProductOrderLBNameSet.OrderNoChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if ADOQueryMain.Active=False then Exit;
|
if ADOQueryMain.Active = False then
|
||||||
|
Exit;
|
||||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||||
|
|
@ -270,12 +275,10 @@ begin
|
||||||
InitForm();
|
InitForm();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmProductOrderLBNameSet.Tv1CellDblClick(
|
procedure TfrmProductOrderLBNameSet.Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||||
Sender: TcxCustomGridTableView;
|
|
||||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
|
||||||
AShift: TShiftState; var AHandled: Boolean);
|
|
||||||
begin
|
begin
|
||||||
if ToolButton1.Visible=False then Exit;
|
if ToolButton1.Visible = False then
|
||||||
|
Exit;
|
||||||
ToolButton1.Click;
|
ToolButton1.Click;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
@ -284,9 +287,7 @@ begin
|
||||||
TBRafresh.Click;
|
TBRafresh.Click;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmProductOrderLBNameSet.Tv1StylesGetContentStyle(
|
procedure TfrmProductOrderLBNameSet.Tv1StylesGetContentStyle(Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; out AStyle: TcxStyle);
|
||||||
Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord;
|
|
||||||
AItem: TcxCustomGridTableItem; out AStyle: TcxStyle);
|
|
||||||
var
|
var
|
||||||
id, id10: Integer;
|
id, id10: Integer;
|
||||||
begin
|
begin
|
||||||
|
|
@ -314,9 +315,7 @@ begin
|
||||||
end; }
|
end; }
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmProductOrderLBNameSet.v1DeliveryDateCustomDrawCell(
|
procedure TfrmProductOrderLBNameSet.v1DeliveryDateCustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||||
Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
|
|
||||||
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
|
||||||
begin
|
begin
|
||||||
{ Id:=TV1.GetColumnByFieldName('DeliveryDate').Index;//;-TV1.GroupedItemCount;
|
{ Id:=TV1.GetColumnByFieldName('DeliveryDate').Index;//;-TV1.GroupedItemCount;
|
||||||
Id10:=TV1.GetColumnByFieldName('SubStatus').Index;
|
Id10:=TV1.GetColumnByFieldName('SubStatus').Index;
|
||||||
|
|
@ -353,7 +352,8 @@ end;
|
||||||
|
|
||||||
procedure TfrmProductOrderLBNameSet.ToolButton1Click(Sender: TObject);
|
procedure TfrmProductOrderLBNameSet.ToolButton1Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if Order_Main.IsEmpty then Exit;
|
if Order_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
try
|
try
|
||||||
frmOrderInPut := TfrmOrderInPut.Create(Application);
|
frmOrderInPut := TfrmOrderInPut.Create(Application);
|
||||||
with frmOrderInPut do
|
with frmOrderInPut do
|
||||||
|
|
@ -374,12 +374,12 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmProductOrderLBNameSet.OrderNoKeyPress(Sender: TObject;
|
procedure TfrmProductOrderLBNameSet.OrderNoKeyPress(Sender: TObject; var Key: Char);
|
||||||
var Key: Char);
|
|
||||||
begin
|
begin
|
||||||
if Key = #13 then
|
if Key = #13 then
|
||||||
begin
|
begin
|
||||||
if Length(OrderNo.Text)<3 then Exit;
|
if Length(OrderNo.Text) < 3 then
|
||||||
|
Exit;
|
||||||
try
|
try
|
||||||
ADOQueryMain.DisableControls;
|
ADOQueryMain.DisableControls;
|
||||||
with ADOQueryMain do
|
with ADOQueryMain do
|
||||||
|
|
@ -401,8 +401,7 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmProductOrderLBNameSet.Panel10MouseMove(Sender: TObject;
|
procedure TfrmProductOrderLBNameSet.Panel10MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
|
||||||
Shift: TShiftState; X, Y: Integer);
|
|
||||||
begin
|
begin
|
||||||
ReleaseCapture;
|
ReleaseCapture;
|
||||||
TWinControl(Panel4).Perform(WM_SYSCOMMAND, $F012, 0);
|
TWinControl(Panel4).Perform(WM_SYSCOMMAND, $F012, 0);
|
||||||
|
|
@ -415,7 +414,8 @@ var
|
||||||
i, j: Integer;
|
i, j: Integer;
|
||||||
OrderKg: Double;
|
OrderKg: Double;
|
||||||
begin
|
begin
|
||||||
if Order_Main.IsEmpty then Exit;
|
if Order_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
LBName := RadioGroup1.Items.Strings[RadioGroup1.ItemIndex];
|
LBName := RadioGroup1.Items.Strings[RadioGroup1.ItemIndex];
|
||||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + Trim(LBName) + '.rmf';
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + Trim(LBName) + '.rmf';
|
||||||
if RadioGroup1.ItemIndex = 0 then
|
if RadioGroup1.ItemIndex = 0 then
|
||||||
|
|
@ -436,7 +436,8 @@ begin
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end else
|
end
|
||||||
|
else
|
||||||
begin
|
begin
|
||||||
with ADOQueryPrint do
|
with ADOQueryPrint do
|
||||||
begin
|
begin
|
||||||
|
|
@ -483,7 +484,8 @@ begin
|
||||||
else
|
else
|
||||||
RMVariables['OrderKg'] := '';
|
RMVariables['OrderKg'] := '';
|
||||||
RM1.ShowReport;
|
RM1.ShowReport;
|
||||||
end else
|
end
|
||||||
|
else
|
||||||
begin
|
begin
|
||||||
Application.MessageBox(PChar('没有找' + ExtractFilePath(Application.ExeName) + 'Report\' + Trim(LBName) + '.rmf'), '提示', 0);
|
Application.MessageBox(PChar('没有找' + ExtractFilePath(Application.ExeName) + 'Report\' + Trim(LBName) + '.rmf'), '提示', 0);
|
||||||
end;
|
end;
|
||||||
|
|
@ -496,22 +498,18 @@ end;
|
||||||
|
|
||||||
procedure TfrmProductOrderLBNameSet.ToolButton2Click(Sender: TObject);
|
procedure TfrmProductOrderLBNameSet.ToolButton2Click(Sender: TObject);
|
||||||
type
|
type
|
||||||
TMyFunc = function(App:Tapplication; FormH:hwnd; FormID:integer;
|
TMyFunc = function(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; stdcall;
|
||||||
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;stdcall;
|
|
||||||
var
|
var
|
||||||
Tf: TMyFunc;
|
Tf: TMyFunc;
|
||||||
Tp: TFarProc;
|
Tp: TFarProc;
|
||||||
Th: Thandle;
|
Th: Thandle;
|
||||||
LabInt,labname:String;
|
LabInt, labname: string;
|
||||||
OpenDiaLog: TOpenDialog;
|
OpenDiaLog: TOpenDialog;
|
||||||
fFileName: string;
|
fFileName: string;
|
||||||
fFilePath: string;
|
fFilePath: string;
|
||||||
begin
|
begin
|
||||||
IF Order_Main.IsEmpty then exit;
|
if Order_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
if Order_Main.Locate('SSel', True, []) = False then
|
if Order_Main.Locate('SSel', True, []) = False then
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
|
@ -528,13 +526,14 @@ begin
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
end;
|
end;
|
||||||
IF trim(fFileName)='' then exit;
|
if trim(fFileName) = '' then
|
||||||
|
exit;
|
||||||
with order_Main do
|
with order_Main do
|
||||||
begin
|
begin
|
||||||
first;
|
first;
|
||||||
While not Eof do
|
while not Eof do
|
||||||
begin
|
begin
|
||||||
If FieldByName('Ssel').AsBoolean=true then
|
if FieldByName('Ssel').AsBoolean = true then
|
||||||
begin
|
begin
|
||||||
with ADOQueryCmd do
|
with ADOQueryCmd do
|
||||||
begin
|
begin
|
||||||
|
|
@ -551,8 +550,6 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
with Order_Main do
|
with Order_Main do
|
||||||
begin
|
begin
|
||||||
DisableControls;
|
DisableControls;
|
||||||
|
|
@ -574,7 +571,8 @@ var
|
||||||
FPiZhong: string;
|
FPiZhong: string;
|
||||||
FReal: Double;
|
FReal: Double;
|
||||||
begin
|
begin
|
||||||
IF Order_Main.IsEmpty then exit;
|
if Order_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
if Order_Main.Locate('SSel', True, []) = False then
|
if Order_Main.Locate('SSel', True, []) = False then
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
|
@ -593,7 +591,7 @@ begin
|
||||||
with order_Main do
|
with order_Main do
|
||||||
begin
|
begin
|
||||||
first;
|
first;
|
||||||
While not Eof do
|
while not Eof do
|
||||||
begin
|
begin
|
||||||
if order_Main.FieldByName('Ssel').AsBoolean = true then
|
if order_Main.FieldByName('Ssel').AsBoolean = true then
|
||||||
begin
|
begin
|
||||||
|
|
@ -652,19 +650,15 @@ end;
|
||||||
|
|
||||||
procedure TfrmProductOrderLBNameSet.ToolButton4Click(Sender: TObject);
|
procedure TfrmProductOrderLBNameSet.ToolButton4Click(Sender: TObject);
|
||||||
type
|
type
|
||||||
TMyFunc = function(App:Tapplication; FormH:hwnd; FormID:integer;
|
TMyFunc = function(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; stdcall;
|
||||||
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;stdcall;
|
|
||||||
var
|
var
|
||||||
Tf: TMyFunc;
|
Tf: TMyFunc;
|
||||||
Tp: TFarProc;
|
Tp: TFarProc;
|
||||||
Th: Thandle;
|
Th: Thandle;
|
||||||
LabInt,labname:String;
|
LabInt, labname: string;
|
||||||
begin
|
begin
|
||||||
IF Order_Main.IsEmpty then exit;
|
if Order_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
if Order_Main.Locate('SSel', True, []) = False then
|
if Order_Main.Locate('SSel', True, []) = False then
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
|
@ -679,15 +673,7 @@ begin
|
||||||
if Tp <> nil then
|
if Tp <> nil then
|
||||||
begin
|
begin
|
||||||
Tf := TMyFunc(Tp);
|
Tf := TMyFunc(Tp);
|
||||||
newh:=Tf(Application,0,2,0,0,
|
newh := Tf(Application, 0, 2, 0, 0, PChar(DCode), PChar(DName), PChar(Ddatabase), PChar('标签模版设置'), PChar(''), PChar(''), '', '', '', '', '', '', '', '', PChar(DConString));
|
||||||
PChar(DCode),
|
|
||||||
PChar(DName),
|
|
||||||
PChar(Ddatabase),
|
|
||||||
PChar('±êǩģ°æÉèÖÃ'),
|
|
||||||
PChar(''),
|
|
||||||
PChar(''),
|
|
||||||
'','','','','','','','',PChar(DConString)
|
|
||||||
);
|
|
||||||
if Trim(PChar(Ddatabase)) <> '' then
|
if Trim(PChar(Ddatabase)) <> '' then
|
||||||
begin
|
begin
|
||||||
Ddatabase := Trim(PChar(Ddatabase));
|
Ddatabase := Trim(PChar(Ddatabase));
|
||||||
|
|
@ -696,7 +682,7 @@ begin
|
||||||
with order_Main do
|
with order_Main do
|
||||||
begin
|
begin
|
||||||
first;
|
first;
|
||||||
While not Eof do
|
while not Eof do
|
||||||
begin
|
begin
|
||||||
if order_Main.FieldByName('Ssel').AsBoolean = true then
|
if order_Main.FieldByName('Ssel').AsBoolean = true then
|
||||||
begin
|
begin
|
||||||
|
|
@ -748,8 +734,7 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmProductOrderLBNameSet.v1Column2PropertiesEditValueChanged(
|
procedure TfrmProductOrderLBNameSet.v1Column2PropertiesEditValueChanged(Sender: TObject);
|
||||||
Sender: TObject);
|
|
||||||
var
|
var
|
||||||
mvalues: string;
|
mvalues: string;
|
||||||
begin
|
begin
|
||||||
|
|
@ -779,7 +764,8 @@ var
|
||||||
FPiZhong: string;
|
FPiZhong: string;
|
||||||
FReal: Double;
|
FReal: Double;
|
||||||
begin
|
begin
|
||||||
IF Order_Main.IsEmpty then exit;
|
if Order_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
if Order_Main.Locate('SSel', True, []) = False then
|
if Order_Main.Locate('SSel', True, []) = False then
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
|
@ -798,7 +784,7 @@ begin
|
||||||
with order_Main do
|
with order_Main do
|
||||||
begin
|
begin
|
||||||
first;
|
first;
|
||||||
While not Eof do
|
while not Eof do
|
||||||
begin
|
begin
|
||||||
if order_Main.FieldByName('Ssel').AsBoolean = true then
|
if order_Main.FieldByName('Ssel').AsBoolean = true then
|
||||||
begin
|
begin
|
||||||
|
|
@ -843,7 +829,8 @@ var
|
||||||
FPiZhong: string;
|
FPiZhong: string;
|
||||||
FReal: Double;
|
FReal: Double;
|
||||||
begin
|
begin
|
||||||
IF Order_Main.IsEmpty then exit;
|
if Order_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
if Order_Main.Locate('SSel', True, []) = False then
|
if Order_Main.Locate('SSel', True, []) = False then
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
|
@ -862,7 +849,7 @@ begin
|
||||||
with order_Main do
|
with order_Main do
|
||||||
begin
|
begin
|
||||||
first;
|
first;
|
||||||
While not Eof do
|
while not Eof do
|
||||||
begin
|
begin
|
||||||
if order_Main.FieldByName('Ssel').AsBoolean = true then
|
if order_Main.FieldByName('Ssel').AsBoolean = true then
|
||||||
begin
|
begin
|
||||||
|
|
@ -904,14 +891,16 @@ end;
|
||||||
|
|
||||||
procedure TfrmProductOrderLBNameSet.ToolButton7Click(Sender: TObject);
|
procedure TfrmProductOrderLBNameSet.ToolButton7Click(Sender: TObject);
|
||||||
var
|
var
|
||||||
fPrintFile:String;
|
fPrintFile: string;
|
||||||
Txt, fImagePath: string;
|
Txt, fImagePath: string;
|
||||||
Moudle: THandle;
|
Moudle: THandle;
|
||||||
Makebar: TMakebar;
|
Makebar: TMakebar;
|
||||||
Mixtext: TMixtext;
|
Mixtext: TMixtext;
|
||||||
begin
|
begin
|
||||||
IF Order_Main.IsEmpty then exit;
|
if Order_Main.IsEmpty then
|
||||||
IF trim(Order_Main.fieldbyname('SLbName').AsString)='' then exit;
|
exit;
|
||||||
|
if trim(Order_Main.fieldbyname('SLbName').AsString) = '' then
|
||||||
|
exit;
|
||||||
|
|
||||||
with ADOQueryPrint do
|
with ADOQueryPrint do
|
||||||
begin
|
begin
|
||||||
|
|
@ -929,7 +918,8 @@ begin
|
||||||
fImagePath := ExtractFilePath(Application.ExeName) + 'image\temp.bmp';
|
fImagePath := ExtractFilePath(Application.ExeName) + 'image\temp.bmp';
|
||||||
if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName) + 'image')) then
|
if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName) + 'image')) then
|
||||||
CreateDirectory(pchar(ExtractFilePath(Application.ExeName) + 'image'), nil);
|
CreateDirectory(pchar(ExtractFilePath(Application.ExeName) + 'image'), nil);
|
||||||
if FileExists(fImagePath) then DeleteFile(fImagePath);
|
if FileExists(fImagePath) then
|
||||||
|
DeleteFile(fImagePath);
|
||||||
Makebar(pchar(Txt), Length(Txt), 3, 3, 0, PChar(fImagePath), 3);
|
Makebar(pchar(Txt), Length(Txt), 3, 3, 0, PChar(fImagePath), 3);
|
||||||
except
|
except
|
||||||
application.MessageBox('条形码生成失败!', '提示信息', MB_ICONERROR);
|
application.MessageBox('条形码生成失败!', '提示信息', MB_ICONERROR);
|
||||||
|
|
@ -948,19 +938,20 @@ begin
|
||||||
Application.MessageBox(PChar('没有找到' + trim(fPrintFile)), '提示信息', 0);
|
Application.MessageBox(PChar('没有找到' + trim(fPrintFile)), '提示信息', 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmProductOrderLBNameSet.ToolButton8Click(Sender: TObject);
|
procedure TfrmProductOrderLBNameSet.ToolButton8Click(Sender: TObject);
|
||||||
var
|
var
|
||||||
fPrintFile:String;
|
fPrintFile: string;
|
||||||
Txt, fImagePath: string;
|
Txt, fImagePath: string;
|
||||||
Moudle: THandle;
|
Moudle: THandle;
|
||||||
Makebar: TMakebar;
|
Makebar: TMakebar;
|
||||||
Mixtext: TMixtext;
|
Mixtext: TMixtext;
|
||||||
begin
|
begin
|
||||||
IF Order_Main.IsEmpty then exit;
|
if Order_Main.IsEmpty then
|
||||||
IF trim(Order_Main.fieldbyname('NLBName').AsString)='' then exit;
|
exit;
|
||||||
|
if trim(Order_Main.fieldbyname('NLBName').AsString) = '' then
|
||||||
|
exit;
|
||||||
with ADOQueryPrint do
|
with ADOQueryPrint do
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
|
|
@ -977,7 +968,8 @@ begin
|
||||||
fImagePath := ExtractFilePath(Application.ExeName) + 'image\temp.bmp';
|
fImagePath := ExtractFilePath(Application.ExeName) + 'image\temp.bmp';
|
||||||
if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName) + 'image')) then
|
if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName) + 'image')) then
|
||||||
CreateDirectory(pchar(ExtractFilePath(Application.ExeName) + 'image'), nil);
|
CreateDirectory(pchar(ExtractFilePath(Application.ExeName) + 'image'), nil);
|
||||||
if FileExists(fImagePath) then DeleteFile(fImagePath);
|
if FileExists(fImagePath) then
|
||||||
|
DeleteFile(fImagePath);
|
||||||
Makebar(pchar(Txt), Length(Txt), 3, 3, 0, PChar(fImagePath), 3);
|
Makebar(pchar(Txt), Length(Txt), 3, 3, 0, PChar(fImagePath), 3);
|
||||||
except
|
except
|
||||||
application.MessageBox('条形码生成失败!', '提示信息', MB_ICONERROR);
|
application.MessageBox('条形码生成失败!', '提示信息', MB_ICONERROR);
|
||||||
|
|
@ -1003,7 +995,8 @@ var
|
||||||
FPiZhong: string;
|
FPiZhong: string;
|
||||||
FReal: Double;
|
FReal: Double;
|
||||||
begin
|
begin
|
||||||
IF Order_Main.IsEmpty then exit;
|
if Order_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
if Order_Main.Locate('SSel', True, []) = False then
|
if Order_Main.Locate('SSel', True, []) = False then
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
|
@ -1022,7 +1015,7 @@ begin
|
||||||
with order_Main do
|
with order_Main do
|
||||||
begin
|
begin
|
||||||
first;
|
first;
|
||||||
While not Eof do
|
while not Eof do
|
||||||
begin
|
begin
|
||||||
if order_Main.FieldByName('Ssel').AsBoolean = true then
|
if order_Main.FieldByName('Ssel').AsBoolean = true then
|
||||||
begin
|
begin
|
||||||
|
|
@ -1067,7 +1060,8 @@ var
|
||||||
FPiZhong: string;
|
FPiZhong: string;
|
||||||
FReal: Double;
|
FReal: Double;
|
||||||
begin
|
begin
|
||||||
IF Order_Main.IsEmpty then exit;
|
if Order_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
if Order_Main.Locate('SSel', True, []) = False then
|
if Order_Main.Locate('SSel', True, []) = False then
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
|
@ -1086,7 +1080,7 @@ begin
|
||||||
with order_Main do
|
with order_Main do
|
||||||
begin
|
begin
|
||||||
first;
|
first;
|
||||||
While not Eof do
|
while not Eof do
|
||||||
begin
|
begin
|
||||||
if order_Main.FieldByName('Ssel').AsBoolean = true then
|
if order_Main.FieldByName('Ssel').AsBoolean = true then
|
||||||
begin
|
begin
|
||||||
|
|
@ -1130,7 +1124,8 @@ var
|
||||||
FPiZhong: string;
|
FPiZhong: string;
|
||||||
FReal: Double;
|
FReal: Double;
|
||||||
begin
|
begin
|
||||||
IF Order_Main.IsEmpty then exit;
|
if Order_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
if Order_Main.Locate('SSel', True, []) = False then
|
if Order_Main.Locate('SSel', True, []) = False then
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
|
@ -1149,7 +1144,7 @@ begin
|
||||||
with order_Main do
|
with order_Main do
|
||||||
begin
|
begin
|
||||||
first;
|
first;
|
||||||
While not Eof do
|
while not Eof do
|
||||||
begin
|
begin
|
||||||
if order_Main.FieldByName('Ssel').AsBoolean = true then
|
if order_Main.FieldByName('Ssel').AsBoolean = true then
|
||||||
begin
|
begin
|
||||||
|
|
@ -1188,4 +1183,182 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderLBNameSet.ToolButton12Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
FPiZhong: string;
|
||||||
|
FReal: Double;
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
|
if Order_Main.Locate('SSel', True, []) = False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Trim(PiZhong.Text) = '' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('每包卷数不能为空!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if TryStrToFloat(PiZhong.Text, FReal) = False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('每包卷数非法数字!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with order_Main do
|
||||||
|
begin
|
||||||
|
first;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
if order_Main.FieldByName('Ssel').AsBoolean = true then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update JYOrder_Sub Set JS=' + Trim(PiZhong.Text));
|
||||||
|
sql.Add(' where Subid=''' + Trim(Order_Main.fieldbyname('Subid').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with Order_Main do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('JS').Value := PiZhong.Text;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CheckBox1.Checked := False;
|
||||||
|
with Order_Main do
|
||||||
|
begin
|
||||||
|
DisableControls;
|
||||||
|
first;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
edit;
|
||||||
|
fieldbyname('Ssel').AsBoolean := False;
|
||||||
|
post;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
first;
|
||||||
|
EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderLBNameSet.ToolButton13Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
FPiZhong: string;
|
||||||
|
FReal: Double;
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
|
if Order_Main.Locate('SSel', True, []) = False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Trim(PiZhong.Text) = '' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('每卷长度不能为空!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if TryStrToFloat(PiZhong.Text, FReal) = False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('每卷长度非法数字!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with order_Main do
|
||||||
|
begin
|
||||||
|
first;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
if order_Main.FieldByName('Ssel').AsBoolean = true then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update JYOrder_Sub Set PRTDC=' + Trim(PiZhong.Text));
|
||||||
|
sql.Add(' where Subid=''' + Trim(Order_Main.fieldbyname('Subid').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with Order_Main do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('PRTDC').Value := PiZhong.Text;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CheckBox1.Checked := False;
|
||||||
|
with Order_Main do
|
||||||
|
begin
|
||||||
|
DisableControls;
|
||||||
|
first;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
edit;
|
||||||
|
fieldbyname('Ssel').AsBoolean := False;
|
||||||
|
post;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
first;
|
||||||
|
EnableControls;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderLBNameSet.Tv1Column2PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalues: string;
|
||||||
|
begin
|
||||||
|
mvalues := TCXTextEdit(Sender).Text;
|
||||||
|
|
||||||
|
with Order_Main do
|
||||||
|
begin
|
||||||
|
edit;
|
||||||
|
fieldbyname('baotype').Value := mvalues;
|
||||||
|
post;
|
||||||
|
end;
|
||||||
|
tv1.Controller.EditingController.ShowEdit();
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update JYOrder_Main Set baotype=''' + trim(mvalues) + ''' ');
|
||||||
|
sql.Add('where Mainid=''' + Trim(Order_Main.fieldbyname('Mainid').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderLBNameSet.Tv1Column4PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalues: string;
|
||||||
|
begin
|
||||||
|
mvalues := TCXTextEdit(Sender).Text;
|
||||||
|
|
||||||
|
with Order_Main do
|
||||||
|
begin
|
||||||
|
edit;
|
||||||
|
fieldbyname('baosx').Value := mvalues;
|
||||||
|
post;
|
||||||
|
end;
|
||||||
|
tv1.Controller.EditingController.ShowEdit();
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update JYOrder_Main Set baosx=''' + trim(mvalues) + ''' ');
|
||||||
|
sql.Add('where Mainid=''' + Trim(Order_Main.fieldbyname('Mainid').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user