diff --git a/打卷检验管理/U_JYOrderCDOne.dfm b/打卷检验管理/U_JYOrderCDOne.dfm index b4d93f7..ff45b31 100644 --- a/打卷检验管理/U_JYOrderCDOne.dfm +++ b/打卷检验管理/U_JYOrderCDOne.dfm @@ -21,11 +21,11 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne object ToolBar1: TToolBar Left = 0 Top = 0 - Width = 1392 + Width = 1384 Height = 62 AutoSize = True ButtonHeight = 30 - ButtonWidth = 119 + ButtonWidth = 131 Caption = 'ToolBar1' Color = clSkyBlue Flat = True @@ -112,7 +112,7 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne OnClick = ToolButton11Click end object TBDW: TToolButton - Left = 671 + Left = 683 Top = 0 AutoSize = True Caption = #20462#25913#25968#37327#21333#20301 @@ -120,7 +120,7 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne OnClick = TBDWClick end object ToolButton4: TToolButton - Left = 782 + Left = 794 Top = 0 AutoSize = True Caption = #25209#37327#35843#25972#31859#25968 @@ -128,7 +128,7 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne OnClick = ToolButton4Click end object ToolButton13: TToolButton - Left = 893 + Left = 905 Top = 0 AutoSize = True Caption = #25209#37327#20928#37325#36716#38271#24230 @@ -137,7 +137,7 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne OnClick = ToolButton13Click end object ToolButton8: TToolButton - Left = 1016 + Left = 1028 Top = 0 AutoSize = True Caption = #25209#37327#20462#25913#30382#37325 @@ -249,7 +249,7 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne OnClick = ToolButton12Click end object ToolButton9: TToolButton - Left = 904 + Left = 916 Top = 30 AutoSize = True Caption = #24322#24120#25968#25454 @@ -257,7 +257,7 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne OnClick = ToolButton9Click end object TBExport: TToolButton - Left = 991 + Left = 1003 Top = 30 AutoSize = True Caption = #23548#20986 @@ -265,18 +265,25 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne OnClick = TBExportClick end object TBClose: TToolButton - Left = 1054 + Left = 1066 Top = 30 AutoSize = True Caption = #20851#38381 ImageIndex = 55 OnClick = TBCloseClick end + object ToolButton16: TToolButton + Left = 1129 + Top = 30 + Caption = #25209#37327#20462#25913#27611#37325#20928#37325 + ImageIndex = 57 + OnClick = ToolButton16Click + end end object Panel1: TPanel Left = 0 Top = 62 - Width = 1392 + Width = 1384 Height = 88 Align = alTop BevelInner = bvRaised @@ -791,8 +798,8 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne object cxGrid1: TcxGrid Left = 0 Top = 150 - Width = 1392 - Height = 576 + Width = 1384 + Height = 568 Align = alClient PopupMenu = PopupMenu1 TabOrder = 3 @@ -1258,8 +1265,8 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne end end object Panel2: TPanel - Left = 496 - Top = 336 + Left = 320 + Top = 496 Width = 273 Height = 101 Color = clSkyBlue @@ -1868,6 +1875,67 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne '4') end end + object Panel14: TPanel + Left = 1040 + Top = 248 + Width = 273 + Height = 101 + Color = clSkyBlue + TabOrder = 14 + Visible = False + object Label37: TLabel + Left = 40 + Top = 12 + Width = 48 + Height = 12 + Caption = #35843#25972#26041#24335 + end + object Label38: TLabel + Left = 16 + Top = 40 + Width = 72 + Height = 12 + Caption = #37325#37327#35843#25972#25968#37327 + end + object ZLTZ: TComboBox + Left = 92 + Top = 8 + Width = 101 + Height = 20 + Style = csDropDownList + ItemHeight = 12 + TabOrder = 0 + Items.Strings = ( + '' + #22686#21152 + #20943#23569) + end + object Button15: TButton + Left = 32 + Top = 64 + Width = 60 + Height = 25 + Caption = #30830#23450 + TabOrder = 2 + OnClick = Button15Click + end + object Button16: TButton + Left = 172 + Top = 64 + Width = 60 + Height = 25 + Caption = #20851#38381 + TabOrder = 3 + OnClick = Button16Click + end + object ZLSL: TEdit + Left = 92 + Top = 35 + Width = 101 + Height = 20 + TabOrder = 1 + end + end object cxGridPopupMenu1: TcxGridPopupMenu Grid = cxGrid1 PopupMenus = <> diff --git a/打卷检验管理/U_JYOrderCDOne.pas b/打卷检验管理/U_JYOrderCDOne.pas index 3b1b132..dd2ab39 100644 --- a/打卷检验管理/U_JYOrderCDOne.pas +++ b/打卷检验管理/U_JYOrderCDOne.pas @@ -11,7 +11,20 @@ uses cxGrid, DBClient, cxCheckBox, cxCalendar, cxSplitter, RM_Dataset, RM_System, RM_Common, RM_Class, RM_GridReport, RM_e_Xls, Menus, MovePanel, cxTextEdit, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, cxContainer, ShellAPI, - cxCurrencyEdit, MMSystem; + cxCurrencyEdit, MMSystem, 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 TfrmJYOrderCDOne = class(TForm) @@ -210,6 +223,14 @@ type ComboBox3: TComboBox; Edit6: TEdit; ToolButton14: TToolButton; + ToolButton16: TToolButton; + Panel14: TPanel; + Label37: TLabel; + Label38: TLabel; + ZLTZ: TComboBox; + Button15: TButton; + Button16: TButton; + ZLSL: TEdit; procedure FormDestroy(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormCreate(Sender: TObject); @@ -272,6 +293,9 @@ type procedure Button14Click(Sender: TObject); procedure Button13Click(Sender: TObject); procedure ToolButton14Click(Sender: TObject); + procedure Button15Click(Sender: TObject); + procedure Button16Click(Sender: TObject); + procedure ToolButton16Click(Sender: TObject); // procedure Edit5Click(Sender: TObject); // procedure CheckBox3Click(Sender: TObject); private @@ -297,7 +321,7 @@ var implementation uses - U_DataLink, U_OrderInPut, U_Fun, U_MJEdit, U_CPDBAO, U_MJSJFX,U_JSZDZSDXZ1; + U_DataLink, U_OrderInPut, U_Fun, U_MJEdit, U_CPDBAO, U_MJSJFX, U_JSZDZSDXZ1; {$R *.dfm} procedure TfrmJYOrderCDOne.JSbaoNum(); @@ -322,7 +346,7 @@ begin while not eof do begin - if (trim(fieldbyname('BaoNO').AsString) <> '') then + if (trim(fieldbyname('BaoNO').AsString) <> '') then begin if strlist.IndexOf(trim(fieldbyname('subID').AsString) + trim(fieldbyname('baono').AsString)) < 0 then begin @@ -1582,7 +1606,7 @@ begin end; end; - if (trim(ComboBox1.Text) = '뵥(ȫ)') then + if (trim(ComboBox1.Text) = '뵥(ȫ)') then begin with ADOQueryTemp do begin @@ -2322,7 +2346,7 @@ begin Exit; end; try - frmJSZDZSD1 := TfrmJSZDZSD1.Create(Application); + frmJSZDZSD1 := TfrmJSZDZSD1.Create(Application); with frmJSZDZSD1 do begin if ShowModal = 1 then @@ -2355,5 +2379,91 @@ begin end; end; +procedure TfrmJYOrderCDOne.Button15Click(Sender: TObject); +var + FTZMZ, FTZJZ: string; +begin + if Order_Main.IsEmpty then + Exit; + if Order_Main.Locate('SSel', True, []) = False then + begin + Application.MessageBox('ûѡ!', 'ʾ', 0); + Exit; + end; + if trim(ZLTZ.Text) = '' then + begin + Application.MessageBox('ʽΪ!', 'ʾ', 0); + Exit; + end; + if trim(ZLSL.Text) = '' then + begin + Application.MessageBox('Ϊ!', 'ʾ', 0); + Exit; + end; + try + Order_Main.DisableControls; + ADOQueryCmd.Connection.BeginTrans; + with Order_Main do + begin + First; + while not Eof do + begin + if Order_Main.FieldByName('SSel').AsBoolean = True then + begin + if Trim(ZLTZ.Text) = '' then + begin + FTZMZ := FloatToStr(Order_Main.fieldbyname('MJMaoz').AsFloat + strtofloat(ZLSL.Text)); + FTZJZ := FloatToStr(Order_Main.fieldbyname('MJQty4').AsFloat + strtofloat(ZLSL.Text)); + end; + if Trim(ZLTZ.Text) = '' then + begin + FTZMZ := FloatToStr(Order_Main.fieldbyname('MJMaoz').AsFloat - strtofloat(ZLSL.Text)); + FTZJZ := FloatToStr(Order_Main.fieldbyname('MJQty4').AsFloat - strtofloat(ZLSL.Text)); + end; + with ADOQueryCmd do + begin + Close; + sql.Clear; + sql.Add('Update WFB_MJJY Set MJMaoz=''' + FTZMZ + ''',MJQty4=''' + FTZJZ + ''' '); + sql.Add('where MJID=''' + Trim(Order_Main.fieldbyname('MJID').AsString) + ''''); + ExecSQL; + end; +// with ADOQueryCmd do +// begin +// Close; +// sql.Clear; +// sql.Add('Update CK_BanCP_CR Set Qty=''' + SL + ''' '); +// sql.Add('where MJID=''' + Trim(Order_Main.fieldbyname('MJID').AsString) + ''''); +// ExecSQL; +// end; + end; + Next; + end; + end; + ADOQueryCmd.Connection.CommitTrans; + Order_Main.EnableControls; + application.MessageBox('ݱɹ', 'ʾϢ'); + Panel14.Visible := false; + ZLTZ.Text := ''; + ZLSL.Text := ''; + TBRafresh.Click; + except + ADOQueryCmd.Connection.RollbackTrans; + Order_Main.EnableControls; + application.MessageBox('ݱʧܣ', 'ʾϢ', 0); + end; +end; + +procedure TfrmJYOrderCDOne.Button16Click(Sender: TObject); +begin + Panel14.Visible := false; +end; + +procedure TfrmJYOrderCDOne.ToolButton16Click(Sender: TObject); +begin + Panel14.Left := (self.Width - Panel14.Width) div 2; + Panel14.Visible := true; +end; + end.