From 065fe95d4642935f7c189daa3aa56373b3e712d0 Mon Sep 17 00:00:00 2001 From: "DESKTOP-E401PHE\\Administrator" Date: Fri, 26 Jun 2026 16:12:57 +0800 Subject: [PATCH] 0626cai --- 检验管理/TradeManage.dof | 2 +- 检验管理/TradeManage.skincfg | 50 ++++++++ 检验管理/U_GetDllForm.pas | 4 +- 检验管理/U_MJManageNewFDNew.dfm | 110 ++++++++--------- 检验管理/U_MJManageNewFDNew.pas | 171 +++++++++++++++++++++++++-- 检验管理/U_ProductOrderLBNameSet.dfm | 50 ++++++-- 检验管理/U_ProductOrderLBNameSet.pas | 138 ++++++++++++++++++++- 7 files changed, 450 insertions(+), 75 deletions(-) create mode 100644 检验管理/TradeManage.skincfg diff --git a/检验管理/TradeManage.dof b/检验管理/TradeManage.dof index a227dd7..c27643a 100644 --- a/检验管理/TradeManage.dof +++ b/检验管理/TradeManage.dof @@ -101,7 +101,7 @@ DebugSourceDirs= UsePackages=0 [Parameters] RunParams= -HostApplication=D:\֣ƽ\Ŀ\¶\\testDll.exe +HostApplication=D:\Dp7Repo\Ŀ\D7djXinDongfang\\testDll.exe Launcher= UseLauncher=0 DebugCWD= diff --git a/检验管理/TradeManage.skincfg b/检验管理/TradeManage.skincfg new file mode 100644 index 0000000..89edbfe --- /dev/null +++ b/检验管理/TradeManage.skincfg @@ -0,0 +1,50 @@ +[ExpressSkins] +Default=1 +ShowNotifications=1 +Enabled=1 +dxSkinBlack=1 +dxSkinBlue=1 +dxSkinBlueprint=1 +dxSkinCaramel=1 +dxSkinCoffee=1 +dxSkinDarkRoom=1 +dxSkinDarkSide=1 +dxSkinDevExpressDarkStyle=1 +dxSkinDevExpressStyle=1 +dxSkinFoggy=1 +dxSkinGlassOceans=1 +dxSkinHighContrast=1 +dxSkiniMaginary=1 +dxSkinLilian=1 +dxSkinLiquidSky=1 +dxSkinLondonLiquidSky=1 +dxSkinMcSkin=1 +dxSkinMetropolis=1 +dxSkinMetropolisDark=1 +dxSkinMoneyTwins=1 +dxSkinOffice2007Black=1 +dxSkinOffice2007Blue=1 +dxSkinOffice2007Green=1 +dxSkinOffice2007Pink=1 +dxSkinOffice2007Silver=1 +dxSkinOffice2010Black=1 +dxSkinOffice2010Blue=1 +dxSkinOffice2010Silver=1 +dxSkinOffice2013DarkGray=1 +dxSkinOffice2013LightGray=1 +dxSkinOffice2013White=1 +dxSkinPumpkin=1 +dxSkinSeven=1 +dxSkinSevenClassic=1 +dxSkinSharp=1 +dxSkinSharpPlus=1 +dxSkinSilver=1 +dxSkinSpringTime=1 +dxSkinStardust=1 +dxSkinSummer2008=1 +dxSkinTheAsphaltWorld=1 +dxSkinsDefaultPainters=1 +dxSkinValentine=1 +dxSkinVS2010=1 +dxSkinWhiteprint=1 +dxSkinXmas2008Blue=1 diff --git a/检验管理/U_GetDllForm.pas b/检验管理/U_GetDllForm.pas index e8053d7..94c913b 100644 --- a/检验管理/U_GetDllForm.pas +++ b/检验管理/U_GetDllForm.pas @@ -77,7 +77,9 @@ begin pswd := 'rightsoft@123'; DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server; - DConString := DataBaseStr; + + if trim(DataBaseStr) <> '' then + DConString := DataBaseStr; // DParameters1:='Ȩ'; // DCode:='002'; // DName:='ADMIN'; diff --git a/检验管理/U_MJManageNewFDNew.dfm b/检验管理/U_MJManageNewFDNew.dfm index f5ebbf7..79c6d31 100644 --- a/检验管理/U_MJManageNewFDNew.dfm +++ b/检验管理/U_MJManageNewFDNew.dfm @@ -1,6 +1,6 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF - Left = 236 - Top = 65 + Left = 248 + Top = 263 Width = 1265 Height = 738 Caption = #25104#21697#26816#39564 @@ -1113,7 +1113,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF TabOrder = 3 object Label9: TLabel Left = 156 - Top = 92 + Top = 89 Width = 15 Height = 22 Caption = 'M' @@ -1127,7 +1127,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object Label3: TLabel Left = 148 - Top = 450 + Top = 441 Width = 26 Height = 22 Caption = 'cm' @@ -1140,7 +1140,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object Label4: TLabel Left = 156 - Top = 205 + Top = 202 Width = 28 Height = 22 Caption = 'KG' @@ -1153,7 +1153,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object Label5: TLabel Left = 15 - Top = 92 + Top = 89 Width = 40 Height = 23 Caption = #38271#24230 @@ -1166,7 +1166,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object Label6: TLabel Left = 10 - Top = 454 + Top = 442 Width = 40 Height = 23 Caption = #24133#23485 @@ -1179,7 +1179,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object Label11: TLabel Left = 15 - Top = 205 + Top = 202 Width = 40 Height = 23 Caption = #27611#37325 @@ -1192,7 +1192,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object Label10: TLabel Left = 11 - Top = 319 + Top = 316 Width = 40 Height = 23 Caption = #27491#21697 @@ -1205,7 +1205,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object Label12: TLabel Left = 96 - Top = 319 + Top = 316 Width = 40 Height = 22 Caption = #27425#21697 @@ -1245,7 +1245,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object Label15: TLabel Left = 60 - Top = 211 + Top = 208 Width = 5 Height = 22 Font.Charset = ANSI_CHARSET @@ -1258,7 +1258,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object Label22: TLabel Left = 144 - Top = 497 + Top = 475 Width = 36 Height = 22 Caption = 'g/'#13217 @@ -1270,8 +1270,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF ParentFont = False end object Label23: TLabel - Left = 15 - Top = 496 + Left = 11 + Top = 475 Width = 40 Height = 23 Caption = #20811#37325 @@ -1284,7 +1284,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object Label27: TLabel Left = 15 - Top = 243 + Top = 240 Width = 40 Height = 23 Caption = #36192#36865 @@ -1310,7 +1310,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object Label26: TLabel Left = 11 - Top = 361 + Top = 358 Width = 40 Height = 22 Caption = #20986#32440 @@ -1337,7 +1337,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object Label30: TLabel Left = 15 - Top = 130 + Top = 127 Width = 40 Height = 23 Caption = #30382#37325 @@ -1350,7 +1350,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object Label31: TLabel Left = 156 - Top = 167 + Top = 164 Width = 28 Height = 22 Caption = 'KG' @@ -1363,7 +1363,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object Label32: TLabel Left = 15 - Top = 167 + Top = 164 Width = 40 Height = 23 Caption = #20928#37325 @@ -1376,7 +1376,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object Label33: TLabel Left = 156 - Top = 130 + Top = 127 Width = 28 Height = 22 Caption = 'KG' @@ -1389,7 +1389,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object Label34: TLabel Left = 94 - Top = 364 + Top = 361 Width = 40 Height = 22 Caption = #20221#25968 @@ -1402,7 +1402,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object Label36: TLabel Left = 15 - Top = 16 + Top = 14 Width = 40 Height = 23 Caption = #21367#21495 @@ -1415,7 +1415,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object Label37: TLabel Left = 16 - Top = 54 + Top = 52 Width = 40 Height = 23 Caption = #32568#21495 @@ -1428,7 +1428,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object Label39: TLabel Left = 15 - Top = 285 + Top = 282 Width = 40 Height = 23 Caption = #31995#25968 @@ -1493,7 +1493,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object Label47: TLabel Left = 94 - Top = 406 + Top = 403 Width = 40 Height = 22 Caption = #21367#25968 @@ -1506,7 +1506,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object Label48: TLabel Left = 11 - Top = 405 + Top = 402 Width = 40 Height = 22 Caption = #22810#21367 @@ -1519,9 +1519,10 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object MJFK: TEdit Left = 55 - Top = 440 + Top = 437 Width = 90 - Height = 41 + Height = 33 + AutoSize = False Font.Charset = GB2312_CHARSET Font.Color = clWindowText Font.Height = -32 @@ -1534,7 +1535,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object MJLen: TEdit Left = 61 - Top = 83 + Top = 80 Width = 90 Height = 37 Font.Charset = GB2312_CHARSET @@ -1552,7 +1553,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object MJMaoZ: TEdit Left = 61 - Top = 197 + Top = 194 Width = 90 Height = 37 Font.Charset = GB2312_CHARSET @@ -1569,7 +1570,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object BTPrint: TButton Left = 2 - Top = 528 + Top = 511 Width = 83 Height = 57 Caption = #25552#20132 @@ -1583,10 +1584,10 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF OnClick = BTPrintClick end object Button5: TButton - Left = 103 - Top = 528 - Width = 83 - Height = 57 + Left = 96 + Top = 505 + Width = 90 + Height = 42 Caption = #37325#25171 Font.Charset = GB2312_CHARSET Font.Color = clWindowText @@ -1599,7 +1600,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object Edit3: TEdit Left = 56 - Top = 313 + Top = 310 Width = 39 Height = 43 Font.Charset = GB2312_CHARSET @@ -1616,7 +1617,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object Edit4: TEdit Left = 134 - Top = 313 + Top = 310 Width = 40 Height = 43 Font.Charset = GB2312_CHARSET @@ -1649,9 +1650,10 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object MJSJKZ: TEdit Left = 55 - Top = 484 + Top = 471 Width = 90 - Height = 41 + Height = 33 + AutoSize = False Font.Charset = GB2312_CHARSET Font.Color = clWindowText Font.Height = -32 @@ -1664,7 +1666,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object MJQty2: TEdit Left = 61 - Top = 235 + Top = 232 Width = 90 Height = 37 Font.Charset = GB2312_CHARSET @@ -1698,7 +1700,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object Edit6: TEdit Left = 56 - Top = 355 + Top = 352 Width = 40 Height = 43 Font.Charset = GB2312_CHARSET @@ -1732,7 +1734,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object MJQty3: TEdit Left = 61 - Top = 121 + Top = 118 Width = 90 Height = 37 Font.Charset = GB2312_CHARSET @@ -1749,7 +1751,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object MJQty4: TEdit Left = 61 - Top = 159 + Top = 156 Width = 90 Height = 37 Font.Charset = GB2312_CHARSET @@ -1766,7 +1768,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object ComboBox1: TComboBox Left = 136 - Top = 356 + Top = 353 Width = 45 Height = 37 Style = csDropDownList @@ -1789,7 +1791,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object MJStr4: TEdit Left = 61 - Top = 44 + Top = 42 Width = 90 Height = 37 Font.Charset = GB2312_CHARSET @@ -1806,7 +1808,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object MJXH: TEdit Left = 61 - Top = 6 + Top = 4 Width = 90 Height = 37 Font.Charset = GB2312_CHARSET @@ -1821,7 +1823,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object kmxs: TEdit Left = 97 - Top = 273 + Top = 270 Width = 90 Height = 37 Font.Charset = GB2312_CHARSET @@ -1890,8 +1892,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF TabOrder = 10 end object Button7: TButton - Left = 90 - Top = 592 + Left = 94 + Top = 551 Width = 94 Height = 37 Caption = #25171#21253#26631#31614 @@ -1902,12 +1904,11 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF Font.Style = [fsBold] ParentFont = False TabOrder = 26 - Visible = False OnClick = Button7Click end object Edit10: TEdit Left = 56 - Top = 397 + Top = 394 Width = 40 Height = 43 Font.Charset = GB2312_CHARSET @@ -1923,7 +1924,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object ComboBox2: TComboBox Left = 136 - Top = 398 + Top = 395 Width = 45 Height = 37 Style = csDropDownList @@ -1947,7 +1948,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object ComboBox3: TComboBox Left = 4 - Top = 276 + Top = 273 Width = 93 Height = 28 Font.Charset = GB2312_CHARSET @@ -2981,8 +2982,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object DataSource2: TDataSource DataSet = CDS_MJCD - Left = 724 - Top = 65520 + Left = 740 end object CDS_MJCD: TClientDataSet Aggregates = <> diff --git a/检验管理/U_MJManageNewFDNew.pas b/检验管理/U_MJManageNewFDNew.pas index f85b21a..4af69e5 100644 --- a/检验管理/U_MJManageNewFDNew.pas +++ b/检验管理/U_MJManageNewFDNew.pas @@ -10,7 +10,20 @@ uses cxControls, cxGridCustomView, cxGrid, RM_Common, RM_Class, RM_GridReport, RM_System, RM_Dataset, ADODB, DBClient, cxGridCustomPopupMenu, cxGridPopupMenu, ExtCtrls, ComCtrls, ToolWin, cxTextEdit, Buttons, cxSplitter, cxCheckBox, - MovePanel, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator; + MovePanel, cxLookAndFeels, cxLookAndFeelPainters, 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 TfrmMJManageNewFDNewSF = class(TForm) @@ -316,7 +329,7 @@ type { Private declarations } FInt, PState, PrintInt, SCInitGrid, FState, FCK: Integer; FColumn, FBanZu, FAPID, FMainId, FSubId, FFFMJID, FFType: string; - fRollType: string; + fRollType, fbaotype, fbaosx: string; isCommopen, IsJsMessage: boolean; MValue, FCDName: string; fxsws, fxsws1: string; @@ -332,6 +345,7 @@ type procedure AddCDNew(Fbtn: TSpeedButton); procedure SavedataCK(); procedure PrtData(FMJID: string); + procedure PrtBaoData(FBaoid: string); procedure OpenCom(DllName: string); procedure CloseCom(DllName: string); procedure On1201(var Message: Tmessage); message 1201; @@ -353,6 +367,79 @@ uses U_DataLink, U_Fun, U_ZDYHelp, U_iniParam, U_ClothHCList; {$R *.dfm} +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('exec P_Print_Bao @Baoid=''' + Trim(FBaoid) + ''' '); + 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.On1301(var Message: Tmessage); var i1, i2: integer; @@ -1047,7 +1134,7 @@ begin FieldByName('MJStr1').Value := Trim(Label13.Caption); FieldByName('MBXS').Value := Trim(MBXS.Text); - if (MBXS.Text <> '') and (MBXS.Text<>'0') then + if (MBXS.Text <> '') and (MBXS.Text <> '0') then begin FieldByName('MJLen').Value := StrToFloat(format('%.' + trim(fxsws) + 'f', [(StrToFloatdef(trim(MJLen.Text), 0) - StrToFloatdef(trim(MJQty2.Text), 0)) / StrToFloatDef(MBXS.Text, 1)])); end @@ -1093,11 +1180,16 @@ begin end; if Trim(SCXFlag) <> '' then begin - FieldByName('JTType').Value := Trim(SCXFlag); + FieldByName('JTType').Value := Trim(SCXFlag); end; FieldByName('MJTypeOther').Value := Trim(Label9.Caption); 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('baoID').Value:=Trim(baoID.Text); Post; @@ -1145,7 +1237,6 @@ begin end; end - else begin with ADOCmd do @@ -1241,7 +1332,32 @@ begin sql.Add('where MJID=''' + Trim(FMJID) + ''' '); execsql; 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(); ADOCmd.Connection.CommitTrans; Result := True; @@ -1500,6 +1616,42 @@ begin PrtData(FFFMJID); //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; end; end; @@ -2249,8 +2401,7 @@ begin FMainId := Trim(ADOTmp.fieldbyname('MainId').AsString); FSubId := Trim(ADOTmp.fieldbyname('SubId').AsString); FKJ := ADOTmp.fieldbyname('PRTKJ').AsFloat; - 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('MPRTKaiJian').AsString)+#13 // +'ŷ:'+Trim(ADOTmp.fieldbyname('PRTMF').AsString)+#13 @@ -2264,6 +2415,8 @@ begin if ADOTmp.FieldByName('PRTKZ').AsFloat > 0 then MJSJKZ.Text := Trim(ADOTmp.fieldbyname('PRTKZ').AsString); MJXH.Text := inttostr(ADOTmp.fieldbyname('maxMJxh').AsInteger + 1); + fbaotype := Trim(ADOTmp.fieldbyname('baotype').AsString); + fbaosx := Trim(ADOTmp.fieldbyname('baosx').AsString); fxsws := Trim(ADOTmp.fieldbyname('xsws').AsString); fxsws1 := Trim(ADOTmp.fieldbyname('xsws1').AsString); @@ -2416,12 +2569,10 @@ begin MJXH.Text := Trim(fieldbyname('maxRoll').AsString); end; end - else if fRollType = '޹' then begin end - else begin with ADOCmd do diff --git a/检验管理/U_ProductOrderLBNameSet.dfm b/检验管理/U_ProductOrderLBNameSet.dfm index 4295a00..d108ee7 100644 --- a/检验管理/U_ProductOrderLBNameSet.dfm +++ b/检验管理/U_ProductOrderLBNameSet.dfm @@ -1,6 +1,6 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet - Left = 141 - Top = 88 + Left = 147 + Top = 196 Width = 1378 Height = 754 Caption = #26631#31614#35774#32622 @@ -129,16 +129,24 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet ImageIndex = 60 OnClick = ToolButton9Click end - object ToolButton7: TToolButton + object ToolButton11: TToolButton Left = 261 Top = 30 AutoSize = True + Caption = #27599#21253#21367#25968 + ImageIndex = 60 + OnClick = ToolButton11Click + end + object ToolButton7: TToolButton + Left = 348 + Top = 30 + AutoSize = True Caption = #39044#35272#21367#26631#31614 ImageIndex = 12 OnClick = ToolButton7Click end object ToolButton8: TToolButton - Left = 360 + Left = 447 Top = 30 AutoSize = True Caption = #39044#35272#21253#26631#31614 @@ -146,7 +154,7 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet OnClick = ToolButton8Click end object PiZhong: TEdit - Left = 459 + Left = 546 Top = 30 Width = 121 Height = 30 @@ -159,7 +167,7 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet TabOrder = 0 end object TBClose: TToolButton - Left = 580 + Left = 667 Top = 30 AutoSize = True Caption = #20851#38381 @@ -413,7 +421,7 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet Align = alTop TabOrder = 2 object Tv1: TcxGridDBTableView - NavigatorButtons.ConfirmDelete = False + Navigator.Buttons.CustomButtons = <> OnCellDblClick = Tv1CellDblClick DataController.DataSource = DataSource1 DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost] @@ -594,6 +602,34 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet DataBinding.FieldName = 'KJ' HeaderAlignmentHorz = taCenter end + object Tv1Column1: 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 = Tv1Column1PropertiesEditValueChanged + Width = 60 + end + object Tv1Column2: TcxGridDBColumn + Caption = #27599#21253#21367#25968 + DataBinding.FieldName = 'JS' + Width = 60 + end + object Tv1Column3: 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 = Tv1Column3PropertiesEditValueChanged + Width = 60 + end end object cxGrid1Level1: TcxGridLevel GridView = Tv1 diff --git a/检验管理/U_ProductOrderLBNameSet.pas b/检验管理/U_ProductOrderLBNameSet.pas index 1c0cd5a..bcad4cb 100644 --- a/检验管理/U_ProductOrderLBNameSet.pas +++ b/检验管理/U_ProductOrderLBNameSet.pas @@ -10,7 +10,22 @@ uses cxControls, cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGrid, DBClient, cxCheckBox, cxCalendar, cxSplitter, RM_Dataset, RM_System, RM_Common, RM_Class, RM_GridReport, RM_e_Xls,StrUtils, - Menus, cxDropDownEdit,cxTextEdit; + Menus, cxDropDownEdit,cxTextEdit, cxLookAndFeels, cxLookAndFeelPainters, + 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, + cxNavigator; type TfrmProductOrderLBNameSet = class(TForm) @@ -95,6 +110,10 @@ type ToolButton9: TToolButton; v1Column7: TcxGridDBColumn; ToolButton10: TToolButton; + Tv1Column1: TcxGridDBColumn; + Tv1Column2: TcxGridDBColumn; + Tv1Column3: TcxGridDBColumn; + ToolButton11: TToolButton; procedure FormDestroy(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormCreate(Sender: TObject); @@ -131,6 +150,9 @@ type procedure ToolButton8Click(Sender: TObject); procedure ToolButton9Click(Sender: TObject); procedure ToolButton10Click(Sender: TObject); + procedure Tv1Column3PropertiesEditValueChanged(Sender: TObject); + procedure Tv1Column1PropertiesEditValueChanged(Sender: TObject); + procedure ToolButton11Click(Sender: TObject); private DQdate:TDateTime; procedure InitGrid(); @@ -1084,4 +1106,118 @@ begin end; end; +procedure TfrmProductOrderLBNameSet.Tv1Column3PropertiesEditValueChanged( + 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; + +procedure TfrmProductOrderLBNameSet.Tv1Column1PropertiesEditValueChanged( + 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.ToolButton11Click(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; + end.