调整
This commit is contained in:
parent
b7dd395200
commit
9d3d0fc81e
|
|
@ -101,7 +101,7 @@ DebugSourceDirs=
|
|||
UsePackages=0
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=D:\徐加艳项目代码\项目代码\英文联科打卷\检验管理英文版\testDll.exe
|
||||
HostApplication=D:\Dp7Repo\项目代码\D7DJlianke\检验管理英文版\testDll.exe
|
||||
Launcher=
|
||||
UseLauncher=0
|
||||
DebugCWD=
|
||||
|
|
|
|||
|
|
@ -4,7 +4,21 @@ interface
|
|||
|
||||
uses
|
||||
SysUtils, Classes, DB, ADODB, ImgList, Controls, cxStyles, cxLookAndFeels,
|
||||
Windows,Messages,forms,OleCtnrs,DateUtils, cxClasses;
|
||||
Windows,Messages,forms,OleCtnrs,DateUtils, cxClasses, 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;
|
||||
var
|
||||
DConString:String; {全局连接字符串}
|
||||
server, dtbase, user, pswd: String; {数据库连接参数}
|
||||
|
|
|
|||
|
|
@ -55,6 +55,11 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
Styles.Inactive = cxStyle4
|
||||
Styles.IncSearch = cxStyle4
|
||||
Styles.Selection = cxStyle4
|
||||
object Tv3Column1: TcxGridDBColumn
|
||||
Caption = 'Order NO.'
|
||||
DataBinding.FieldName = 'dingdanhao'
|
||||
Width = 60
|
||||
end
|
||||
object v3Column1: TcxGridDBColumn
|
||||
Caption = 'Roll NO.'
|
||||
DataBinding.FieldName = 'MJXH'
|
||||
|
|
@ -67,6 +72,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
object v3Column2: TcxGridDBColumn
|
||||
Caption = 'Qty'
|
||||
DataBinding.FieldName = 'MJLen'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Content = cxStyle3
|
||||
|
|
@ -76,6 +82,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
object v3Column4: TcxGridDBColumn
|
||||
Caption = 'G.W'
|
||||
DataBinding.FieldName = 'MJMaoZ'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Content = cxStyle5
|
||||
Styles.Footer = cxStyle5
|
||||
|
|
@ -1016,6 +1023,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 400
|
||||
|
|
@ -1057,6 +1065,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label11: TLabel
|
||||
Left = 8
|
||||
|
|
@ -1152,6 +1161,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label23: TLabel
|
||||
Left = 2
|
||||
|
|
@ -1165,6 +1175,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label27: TLabel
|
||||
Left = 243
|
||||
|
|
@ -1493,6 +1504,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 16
|
||||
Visible = False
|
||||
OnClick = MJXHClick
|
||||
OnKeyPress = MJstr3KeyPress
|
||||
end
|
||||
|
|
@ -1609,6 +1621,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 18
|
||||
Visible = False
|
||||
OnClick = MJXHClick
|
||||
OnKeyPress = MJstr3KeyPress
|
||||
end
|
||||
|
|
@ -1827,6 +1840,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 20
|
||||
Visible = False
|
||||
OnClick = Button7Click
|
||||
end
|
||||
object PM: TBtnEditA
|
||||
|
|
@ -2007,8 +2021,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
ImeName = #20013#25991' ('#31616#20307') - '#25628#29399#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
TabOrder = 31
|
||||
OnChange = dingdanhaoChange
|
||||
OnClick = MJXHClick
|
||||
OnExit = MJStr4Exit
|
||||
OnKeyPress = MJstr3KeyPress
|
||||
end
|
||||
object KH: TEdit
|
||||
|
|
@ -2062,6 +2076,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
Width = 312
|
||||
Height = 207
|
||||
Caption = 'type'
|
||||
ItemIndex = 0
|
||||
Items.Strings = (
|
||||
'ROLL WISE FABRIC WEIGHT'
|
||||
'RIB'
|
||||
|
|
@ -2069,6 +2084,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
'TAPE'
|
||||
'TRIMS')
|
||||
TabOrder = 35
|
||||
OnClick = Radio_typeClick
|
||||
OnExit = Radio_typeExit
|
||||
end
|
||||
end
|
||||
object MovePanel1: TMovePanel
|
||||
|
|
@ -2675,7 +2692,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
Height = 30
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 115
|
||||
ButtonWidth = 185
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
EdgeInner = esNone
|
||||
|
|
@ -2847,10 +2864,18 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
ImageIndex = 72
|
||||
OnClick = ToolButton4Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
object ToolButton1: TToolButton
|
||||
Left = 995
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = 'Print code list'
|
||||
ImageIndex = 57
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 1184
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = 'Close'
|
||||
ImageIndex = 55
|
||||
OnClick = TBCloseClick
|
||||
|
|
@ -3482,4 +3507,23 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
Top = 544
|
||||
ReportData = {}
|
||||
end
|
||||
object RMDBHZ: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_HZ
|
||||
Left = 156
|
||||
Top = 492
|
||||
end
|
||||
object CDS_HZ: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 116
|
||||
Top = 488
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_TradeManage.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 404
|
||||
Top = 276
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -288,6 +288,11 @@ type
|
|||
shift: TEdit;
|
||||
Label62: TLabel;
|
||||
Radio_type: TRadioGroup;
|
||||
ToolButton1: TToolButton;
|
||||
RMDBHZ: TRMDBDataSet;
|
||||
CDS_HZ: TClientDataSet;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
Tv3Column1: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
|
|
@ -352,6 +357,10 @@ type
|
|||
procedure Button11Click(Sender: TObject);
|
||||
procedure Button121Click(Sender: TObject);
|
||||
procedure Edit13Click(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure dingdanhaoChange(Sender: TObject);
|
||||
procedure Radio_typeClick(Sender: TObject);
|
||||
procedure Radio_typeExit(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
FInt, PState, PrintInt, SCInitGrid, FState, FCK: Integer;
|
||||
|
|
@ -379,7 +388,7 @@ type
|
|||
procedure On1301(var Message: Tmessage); message 1301;
|
||||
function JsXj(str1: string): string;
|
||||
public
|
||||
fmanage: string;
|
||||
fmanage, FSMJtype: string;
|
||||
{ Public declarations }
|
||||
|
||||
end;
|
||||
|
|
@ -644,6 +653,8 @@ begin
|
|||
sql.Add(' A.* from WFB_MJJY A where APID=''' + Trim(FAPID) + '''');
|
||||
if Trim(SCXFlag) <> '' then
|
||||
sql.Add(' and JTType=''' + Trim(SCXFlag) + '''');
|
||||
if Trim(dingdanhao.text) <> '' then
|
||||
sql.Add('and dingdanhao=''' + trim(dingdanhao.text) + '''');
|
||||
sql.Add('and mjstr2=''未入库'' ');
|
||||
sql.Add(' order by FillTime desc');
|
||||
Open;
|
||||
|
|
@ -654,12 +665,15 @@ end;
|
|||
|
||||
procedure TfrmMJManageNewFDNewSF.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
|
||||
close;
|
||||
WriteCxGrid('检验页面', Tv3, '检验页面');
|
||||
end;
|
||||
|
||||
procedure TfrmMJManageNewFDNewSF.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitJP();
|
||||
ReadCxGrid('检验页面', Tv3, '检验页面');
|
||||
with ADOTmp do
|
||||
begin
|
||||
Close;
|
||||
|
|
@ -682,6 +696,8 @@ begin
|
|||
Edit9.Visible := true;
|
||||
Label44.Visible := true;
|
||||
end;
|
||||
Radio_type.ItemIndex := 0;
|
||||
FSMJtype := 'ROLL WISE FABRIC WEI';
|
||||
end;
|
||||
|
||||
procedure TfrmMJManageNewFDNewSF.InitJP();
|
||||
|
|
@ -694,7 +710,6 @@ begin
|
|||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select ZDYName from KH_Zdy where Type=''WFBCD'' order by ZDYNO ');
|
||||
// showmessage(sql.text);
|
||||
Open;
|
||||
end;
|
||||
if ADOTmp.IsEmpty then
|
||||
|
|
@ -922,7 +937,7 @@ end;
|
|||
|
||||
function TfrmMJManageNewFDNewSF.SaveData(): Boolean;
|
||||
var
|
||||
maxno, FMJID, BZID, strsql, CFMJXH, GMJXH, GMJLen, GMJMaoZ, GMJQty4, Gmjstr4: string;
|
||||
maxno, FMJID, BZID, strsql, CFMJXH, GMJXH, GMJLen, GMJMaoZ, GMJQty4, Gmjstr4, FSType: string;
|
||||
FMJLen: Double;
|
||||
FOrder: Integer;
|
||||
begin
|
||||
|
|
@ -946,7 +961,9 @@ begin
|
|||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select maxRoll=1+isnull(cast(max(mjxh) as int),0) ');
|
||||
sql.Add('from WFB_MJJY X where X.mainID=''' + trim(fmainId) + ''' ');
|
||||
// sql.Add('from WFB_MJJY X where X.mainID=''' + trim(fmainId) + ''' ');
|
||||
sql.Add('from WFB_MJJY X where X.dingdanhao=''' + trim(dingdanhao.text) + ''' ');
|
||||
SQL.Add('and X.MJType=''' + Trim(Radio_type.Items.Strings[Radio_type.ItemIndex]) + ''' ');
|
||||
Open;
|
||||
MJXH.Text := Trim(fieldbyname('maxRoll').AsString);
|
||||
end;
|
||||
|
|
@ -1108,16 +1125,8 @@ begin
|
|||
begin
|
||||
FieldByName('MJSJKZ').Value := MJSJKZ.Text;
|
||||
end;
|
||||
FieldByName('MJType').Value := '';
|
||||
// if Trim(Edit3.Text) <> '' then
|
||||
// begin
|
||||
// FieldByName('MJType').Value := '正品';
|
||||
// end;
|
||||
// if Trim(Edit4.Text) <> '' then
|
||||
// begin
|
||||
// FieldByName('MJType').Value := '次品';
|
||||
// end;
|
||||
|
||||
FSType := Trim(Radio_type.Items.Strings[Radio_type.ItemIndex]);
|
||||
FieldByName('MJType').Value := Trim(Radio_type.Items.Strings[Radio_type.ItemIndex]);
|
||||
FieldByName('MJStr1').Value := Trim(Label13.Caption);
|
||||
|
||||
|
|
@ -1134,7 +1143,6 @@ begin
|
|||
begin
|
||||
FieldByName('JTType').Value := Trim(SCXFlag);
|
||||
end;
|
||||
|
||||
FieldByName('MJTypeOther').Value := Trim(Label9.Caption);
|
||||
|
||||
if trim(fbaotype) = 'Manual packaging' then
|
||||
|
|
@ -1142,8 +1150,8 @@ begin
|
|||
FieldByName('baoNO').Value := Trim(baono.text);
|
||||
FieldByName('baoID').Value := Trim(baoID.Text);
|
||||
end;
|
||||
|
||||
Post;
|
||||
|
||||
end;
|
||||
if PState = 1 then
|
||||
begin
|
||||
|
|
@ -1155,8 +1163,9 @@ begin
|
|||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('update WFB_MJJY SET mjxh=1+isnull((select cast (max(mjxh) as int) from WFB_MJJY X where X.mainID=WFB_MJJY.mainID and X.MJID<>WFB_MJJY.MJID),0)');
|
||||
sql.Add('update WFB_MJJY SET mjxh=1+isnull((select cast (max(mjxh) as int) from WFB_MJJY X where isnull(X.dingdanhao,'''')=WFB_MJJY.dingdanhao and isnull( X.MJType,'''')=WFB_MJJY.MJType and X.MJID<>WFB_MJJY.MJID),0)');
|
||||
sql.Add('where MJID=''' + Trim(maxno) + '''');
|
||||
|
||||
execsql;
|
||||
end;
|
||||
end
|
||||
|
|
@ -1218,17 +1227,21 @@ begin
|
|||
sql.Add(',' + quotedstr(trim(FMainId)));
|
||||
sql.Add(')');
|
||||
execsql;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
////////////判断跳号和卷号重复
|
||||
if fRollType = '按订单生成' then
|
||||
if fRollType = 'Build-to-order' then
|
||||
begin
|
||||
//////////////////跳号判断
|
||||
with ADOCmd do
|
||||
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select Top 1 MJXH,MJID from WFB_MJJY A where A.mainID=''' + Trim(FMainId) + ''' order by MJXH Desc');
|
||||
sql.Add('select Top 1 MJXH,MJID from WFB_MJJY A ');
|
||||
sql.Add(' where A.dingdanhao=''' + Trim(dingdanhao.text) + ''' and isnull(A.MJType,'''')=''' + Trim(Radio_type.Items.Strings[Radio_type.ItemIndex]) + '''');
|
||||
sql.Add(' order by MJXH Desc');
|
||||
// ShowMessage(SQL.text);
|
||||
Open;
|
||||
end;
|
||||
GMJXH := Trim(ADOCmd.fieldbyname('MJXH').AsString);
|
||||
|
|
@ -1240,7 +1253,8 @@ begin
|
|||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select MJID from WFB_MJJY X where X.mainID=''' + Trim(FMainId) + '''');
|
||||
sql.Add('select MJID from WFB_MJJY X where X.dingdanhao=''' + Trim(dingdanhao.text) + '''');
|
||||
SQL.Add('and X.MJType=''' + Trim(Radio_type.Items.Strings[Radio_type.ItemIndex]) + ''' ');
|
||||
SQL.Add(' and MJXH=' + GMJXH + '-1');
|
||||
Open;
|
||||
end;
|
||||
|
|
@ -1291,7 +1305,8 @@ begin
|
|||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select Mainid,MJXH from WFB_MJJY X where X.mainID=''' + Trim(FMainId) + '''');
|
||||
sql.Add('select Mainid,MJXH from WFB_MJJY X where X.dingdanhao=''' + Trim(dingdanhao.text) + '''');
|
||||
SQL.Add('and X.MJType=''' + Trim(Radio_type.Items.Strings[Radio_type.ItemIndex]) + ''' ');
|
||||
sql.Add(' Group by Mainid,MJXH having count(*)>1');
|
||||
Open;
|
||||
end;
|
||||
|
|
@ -1306,7 +1321,7 @@ begin
|
|||
end;
|
||||
//////////////////卷号重复判断
|
||||
end
|
||||
else if fRollType = '按缸号生成' then
|
||||
else if fRollType = 'Generated by cylinder number' then
|
||||
begin
|
||||
//////////////////跳号判断
|
||||
with ADOCmd do
|
||||
|
|
@ -1395,7 +1410,7 @@ begin
|
|||
end;
|
||||
//////////////////卷号重复判断
|
||||
end
|
||||
else if fRollType = '无规则生成' then
|
||||
else if fRollType = 'Ruleless generation' then
|
||||
begin
|
||||
|
||||
end
|
||||
|
|
@ -1812,7 +1827,6 @@ begin
|
|||
sql.Add(' inner join JYOrder_Sub C on A.SubId=C.SubId');
|
||||
SQL.Add(' where A.MJID=''' + Trim(FMJID) + '''');
|
||||
Open;
|
||||
// ShowMessage(SQL.Text);
|
||||
end;
|
||||
|
||||
with ADOQueryPrint1 do
|
||||
|
|
@ -2654,8 +2668,8 @@ begin
|
|||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select maxRoll=1+isnull(cast(max(mjxh) as int),0) ');
|
||||
sql.Add('from WFB_MJJY X where X.mainID=''' + trim(fMainID) + ''' ');
|
||||
// sql.add('and X.MJStr4='+quotedstr(trim(MJstr4.text)));
|
||||
sql.Add('from WFB_MJJY X where X.dingdanhao=''' + trim(dingdanhao.text) + ''' ');
|
||||
SQL.Add('and X.MJType=''' + Trim(Radio_type.Items.Strings[Radio_type.ItemIndex]) + ''' ');
|
||||
Open;
|
||||
MJXH.Text := Trim(fieldbyname('maxRoll').AsString);
|
||||
end;
|
||||
|
|
@ -2684,7 +2698,9 @@ begin
|
|||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select maxRoll=isnull(cast(min(mjxh) as int),1)-1 ');
|
||||
sql.Add('from WFB_MJJY X where X.mainID=''' + trim(fMainID) + ''' ');
|
||||
// sql.Add('from WFB_MJJY X where X.mainID=''' + trim(fMainID) + ''' ');
|
||||
sql.Add('from WFB_MJJY X where X.dingdanhao=''' + trim(dingdanhao.text) + ''' ');
|
||||
SQL.Add('and X.MJType=''' + Trim(Radio_type.Items.Strings[Radio_type.ItemIndex]) + ''' ');
|
||||
Open;
|
||||
MJXH.Text := Trim(fieldbyname('maxRoll').AsString);
|
||||
end;
|
||||
|
|
@ -2778,16 +2794,16 @@ begin
|
|||
MJLen.Text := Trim(ADOTmp.fieldbyname('MJLen').AsString);
|
||||
MJstr4.Text := Trim(ADOTmp.fieldbyname('MJstr4').AsString);
|
||||
MJXH.Text := Trim(ADOTmp.fieldbyname('MJXH').AsString);
|
||||
if Trim(ADOTmp.fieldbyname('MJType').AsString) = '正品' then
|
||||
begin
|
||||
Edit3.Text := '√';
|
||||
Edit4.Text := '';
|
||||
end
|
||||
else if Trim(ADOTmp.fieldbyname('MJType').AsString) = '次品' then
|
||||
begin
|
||||
Edit4.Text := '√';
|
||||
Edit3.Text := '';
|
||||
end;
|
||||
// if Trim(ADOTmp.fieldbyname('MJType').AsString) = '正品' then
|
||||
// begin
|
||||
// Edit3.Text := '√';
|
||||
// Edit4.Text := '';
|
||||
// end
|
||||
// else if Trim(ADOTmp.fieldbyname('MJType').AsString) = '次品' then
|
||||
// begin
|
||||
// Edit4.Text := '√';
|
||||
// Edit3.Text := '';
|
||||
// end;
|
||||
BtnStatus(False);
|
||||
Label16.Caption := '';
|
||||
PState := 2;
|
||||
|
|
@ -3146,5 +3162,85 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmMJManageNewFDNewSF.ToolButton1Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile, fPrintFile10, FMainID: string;
|
||||
sqlStr: string;
|
||||
begin
|
||||
|
||||
if CDS_MJID.IsEmpty then
|
||||
Exit;
|
||||
if trim(dingdanhao.Text) = '' then
|
||||
exit;
|
||||
|
||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\Check the code list.rmf';
|
||||
|
||||
ExportFtErpFile('Check the code list.rmf', ADOCmd);
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('exec P_Print_CKMDYDL ');
|
||||
sql.add('@DName=' + quotedstr(Trim(dingdanhao.text)));
|
||||
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(dingdanhao.text)));
|
||||
sql.add(',@flag=''2'' ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_HZ);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_HZ);
|
||||
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
RM2.LoadFromFile(fPrintFile);
|
||||
RM2.ShowReport;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找' + fPrintFile), 'prompt', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmMJManageNewFDNewSF.dingdanhaoChange(Sender: TObject);
|
||||
begin
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select ');
|
||||
//sql.Add('Case when isnull(MJType,'''')=''次品'' then ''B''+RTrim(Cast(MJXH as varchar(20))) else Cast(MJXH as varchar(20)) end as MJXH ,');
|
||||
sql.Add(' A.* from WFB_MJJY A where APID=''' + Trim(FAPID) + '''');
|
||||
if Trim(SCXFlag) <> '' then
|
||||
sql.Add(' and JTType=''' + Trim(SCXFlag) + '''');
|
||||
sql.Add('and mjstr2=''未入库'' ');
|
||||
sql.Add('and dingdanhao=''' + trim(dingdanhao.text) + '''');
|
||||
sql.Add(' order by FillTime desc');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, CDS_MJID);
|
||||
SInitCDSData20(ADOQueryMain, CDS_MJID);
|
||||
end;
|
||||
|
||||
procedure TfrmMJManageNewFDNewSF.Radio_typeClick(Sender: TObject);
|
||||
begin
|
||||
FSMJtype := Trim(Radio_type.Items.Strings[Radio_type.ItemIndex]);
|
||||
end;
|
||||
|
||||
procedure TfrmMJManageNewFDNewSF.Radio_typeExit(Sender: TObject);
|
||||
begin
|
||||
FSMJtype := Trim(Radio_type.Items.Strings[Radio_type.ItemIndex]);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user