⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 goods_write.pas

📁 delphi的一个开发实例
💻 PAS
📖 第 1 页 / 共 4 页
字号:
                end;
            except
                Application.MessageBox('【反审核】操作失败!,请确认!',pchar(application.Title),mb_iconwarning);
                Exit;
            end;
        end;
    end;
end;

procedure Tfrm_Goods_Write.Cmd2Click(Sender: TObject);
begin
    if Flag2=1 then
    begin
        if Application.MessageBox('确定需要【审核】该单据吗?请确认!',pchar(application.Title),mb_okcancel)=idok then
        begin
            try
                with frm_data.ClientDataSet4 do
                begin
                    Close;
                    Commandtext:='';
                    Commandtext:='Update [Receipt] set Examine_Man2='''+Trim(Handle_Man)+''' where Receipt_No='''+Trim(Edit2.Text)+''' and Receipt_Name=''来货登记单''';
                    Execute;
                    L2.Caption:='';
                    L2.Caption:=LevelName2+'【已审】';
                    Flag2:=2;
                    Application.MessageBox('【审核】操作成功!请确认',Pchar(application.Title),MB_ICONwarning);
                    Cmd_Check_Filsh;
                end;
            except
                Application.MessageBox('操作失败!,请确认!',pchar(application.Title),mb_iconwarning);
                Exit;
            end;
        end;
    end
    else if Flag2=2 then
    begin
        if Application.MessageBox('确定需要【反审核】该单据吗?'+#13#10+'如果【反审核】你将使后面级别的人的【审核】作废,'+#13#10+'后面级别的人必须重新【审核】,才能够生效,请确认!',pchar(application.Title),mb_okcancel)=idok then
        begin
            try
                with frm_data.ClientDataSet4 do
                begin
                    Close;
                    Commandtext:='';
                    Commandtext:='Update [Receipt] set Examine_Man2='''',Examine_Man3='''',Examine_Man4='''',Examine_Man5='''' where Receipt_No='''+Trim(Edit2.Text)+''' and Receipt_Name=''来货登记单''';
                    Execute;
                    L2.Caption:='';
                    L2.Caption:=LevelName2+':'+Handle_Man;
                    L2.Visible:=True;
                    L3.Caption:=LevelName3+':'+Handle_Man;
                    L4.Caption:=LevelName4+':'+Handle_Man;
                    L5.Caption:=LevelName5+':'+Handle_Man;
                    Flag2:=1;Flag3:=1; Flag4:=1; Flag5:=1;
                    Application.MessageBox('【反审核】操作成功!请确认',Pchar(application.Title),MB_ICONwarning);
                    Cmd_Check_Filsh;
                end;
            except
                Application.MessageBox('操作失败!,请确认!',pchar(application.Title),mb_iconwarning);
                Exit;
            end;
        end;
    end;
end;

procedure Tfrm_Goods_Write.Cmd3Click(Sender: TObject);
begin
    if Flag3=1 then
    begin
        if Application.MessageBox('确定需要【审核】该单据吗?请确认!',pchar(application.Title),mb_okcancel)=idok then
        begin
            try
                with frm_data.ClientDataSet4 do
                begin
                    Close;
                    Commandtext:='';
                    Commandtext:='Update [Receipt] set Examine_Man3='''+Trim(Handle_Man)+''' where Receipt_No='''+Trim(Edit2.Text)+''' and Receipt_Name=''来货登记单''';
                    Execute;
                    L3.Caption:='';
                    L3.Caption:=LevelName2+'【已审】';
                    Flag3:=2;
                    Application.MessageBox('【审核】操作成功!请确认',Pchar(application.Title),MB_ICONwarning);
                    Cmd_Check_Filsh;
                end;
            except
                Application.MessageBox('操作失败!,请确认!',pchar(application.Title),mb_iconwarning);
                Exit;
            end;
        end;
    end
    else if Flag3=2 then
    begin
        if Application.MessageBox('确定需要【反审核】该单据吗?'+#13#10+'如果【反审核】你将使后面级别的人的【审核】作废,'+#13#10+'后面级别的人必须重新【审核】,才能够生效,请确认!',pchar(application.Title),mb_okcancel)=idok then
        begin
            try
                with frm_data.ClientDataSet4 do
                begin
                    Close;
                    Commandtext:='';
                    Commandtext:='Update [Receipt] set Examine_Man3='''',Examine_Man3='''',Examine_Man4='''',Examine_Man5='''' where Receipt_No='''+Trim(Edit2.Text)+''' and Receipt_Name=''来货登记单''';
                    Execute;
                    L3.Caption:='';
                    L3.Caption:=LevelName2+':'+Handle_Man;
                    L3.Visible:=True;
                    L3.Caption:=LevelName3+':'+Handle_Man;
                    L4.Caption:=LevelName4+':'+Handle_Man;
                    L5.Caption:=LevelName5+':'+Handle_Man;
                    Flag3:=1;Flag3:=1; Flag4:=1; Flag5:=1;
                    Application.MessageBox('【反审核】操作成功!请确认',Pchar(application.Title),MB_ICONwarning);
                    Cmd_Check_Filsh;
                end;
            except
                Application.MessageBox('操作失败!,请确认!',pchar(application.Title),mb_iconwarning);
                Exit;
            end;
        end;
    end;
end;

procedure Tfrm_Goods_Write.Cmd4Click(Sender: TObject);
begin
    if Flag4=1 then
    begin
        if Application.MessageBox('确定需要【审核】该单据吗?请确认!',pchar(application.Title),mb_okcancel)=idok then
        begin
            try
                with frm_data.ClientDataSet4 do
                begin
                    Close;
                    Commandtext:='';
                    Commandtext:='Update [Receipt] set Examine_Man4='''+Trim(Handle_Man)+''' where Receipt_No='''+Trim(Edit2.Text)+''' and Receipt_Name=''来货登记单''';
                    Execute;
                    L4.Caption:='';
                    L4.Caption:=LevelName4+'【已审】';
                    Flag4:=2;
                    Application.MessageBox('【审核】操作成功!请确认',Pchar(application.Title),MB_ICONwarning);
                    Cmd_Check_Filsh;
                end;
            except
                Application.MessageBox('操作失败!,请确认!',pchar(application.Title),mb_iconwarning);
                Exit;
            end;
        end;
    end
    else if Flag4=2 then
    begin
        if Application.MessageBox('确定需要【反审核】该单据吗?'+#13#10+'如果【反审核】你将使后面级别的人的【审核】作废,'+#13#10+'后面级别的人必须重新【审核】,才能够生效,请确认!',pchar(application.Title),mb_okcancel)=idok then
        begin
            try
                with frm_data.ClientDataSet4 do
                begin
                    Close;
                    Commandtext:='';
                    Commandtext:='Update [Receipt] set Examine_Man4='''',Examine_Man5='''' where Receipt_No='''+Trim(Edit2.Text)+''' and Receipt_Name=''来货登记单''';
                    Execute;

                    L4.Caption:=LevelName4+':'+Handle_Man;
                    L4.Visible:=True;
                    L5.Caption:=LevelName5+':'+Handle_Man;
                    Flag4:=1;Flag5:=1;
                    Application.MessageBox('【反审核】操作成功!请确认',Pchar(application.Title),MB_ICONwarning);
                    Cmd_Check_Filsh;
                end;
            except
                Application.MessageBox('操作失败!,请确认!',pchar(application.Title),mb_iconwarning);
                Exit;
            end;
        end;
    end;
end;

procedure Tfrm_Goods_Write.Cmd5Click(Sender: TObject);
begin
    if Flag5=1 then
    begin
        if Application.MessageBox('确定需要【审核】该单据吗?请确认!',pchar(application.Title),mb_okcancel)=idok then
        begin
            try
                with frm_data.ClientDataSet4 do
                begin
                    Close;
                    Commandtext:='';
                    Commandtext:='Update [Receipt] set Examine_Man5='''+Trim(Handle_Man)+''' where Receipt_No='''+Trim(Edit2.Text)+''' and Receipt_Name=''来货登记单''';
                    Execute;
                    L5.Caption:='';
                    L5.Caption:=LevelName5+'【已审】';
                    Flag5:=2;
                    Application.MessageBox('【审核】操作成功!请确认',Pchar(application.Title),MB_ICONwarning);
                    Cmd_Check_Filsh;
                end;
            except
                Application.MessageBox('操作失败!,请确认!',pchar(application.Title),mb_iconwarning);
                Exit;
            end;
        end;
    end
    else if Flag5=2 then
    begin
        if Application.MessageBox('确定需要【反审核】该单据吗?'+#13#10+'如果【反审核】你将使后面级别的人的【审核】作废,'+#13#10+'后面级别的人必须重新【审核】,才能够生效,请确认!',pchar(application.Title),mb_okcancel)=idok then
        begin
            try
                with frm_data.ClientDataSet4 do
                begin
                    Close;
                    Commandtext:='';
                    Commandtext:='Update [Receipt] set Examine_Man5='''' where Receipt_No='''+Trim(Edit2.Text)+''' and Receipt_Name=''来货登记单''';
                    Execute;

                    L5.Caption:=LevelName5+':'+Handle_Man;
                    L5.Visible:=True;
                    Flag5:=1;
                    Application.MessageBox('【反审核】操作成功!请确认',Pchar(application.Title),MB_ICONwarning);
                    Cmd_Check_Filsh;
                end;
            except
                Application.MessageBox('操作失败!,请确认!',pchar(application.Title),mb_iconwarning);
                Exit;
            end;
        end;
    end;
end;

procedure Tfrm_Goods_Write.SpeedButton1Click(Sender: TObject);
begin
    Check_Mond:='';
    Check_Mond:='Goods_Write'; //来货登记
    frm_Supply_Monad:=Tfrm_Supply_Monad.Create(self);
    frm_Supply_Monad.Caption:='【供货单位】';
    frm_Supply_Monad.ShowModal;
    Edit4.Text:=check_Mond_Result;
    frm_Supply_Monad.Free;
end;

procedure Tfrm_Goods_Write.Cmd_HTClick(Sender: TObject);
begin
    Contract_Check_Result_Str:='';
    Contract_Check_Str:='Goods_Writestr';
    frm_Contract_Check:=Tfrm_Contract_Check.Create(self);
    frm_Contract_Check.ShowModal;
    Edit3.Text:=Contract_Check_Result_Str;
    with frm_data.ClientDataSet_Add do
    begin
        Close;
        CommandText:='';
        CommandText:='Select * from [Stock_contract] where Contract_No='''+Trim(Edit3.Text)+'''';
        Open;
        Edit4.Text:=frm_data.ClientDataSet_Add.FieldByName('wldw').AsString;
    end;
    frm_Contract_Check.Free;
end;

procedure Tfrm_Goods_Write.SpeedButton5Click(Sender: TObject);
begin
    Check_Storage:='';
    Check_Storage_Result:='';
    Check_Storage:='Goods_Write';
    frm_Storage_Select:=Tfrm_Storage_Select.Create(self);
    frm_Storage_Select.ShowModal;
    Edit5.Text:=Trim(Check_Storage_Result_NO);
    Edit_Storage_Name.Text:=Trim(Check_Storage_Result);
    frm_Storage_Select.Free;
end;

procedure Tfrm_Goods_Write.SpeedButton9Click(Sender: TObject);
begin
    Employe_Check:='';
    Employe_Check:='Goods_Write_Str';
    Employe_Check_Result:='';
    frm_Login_Man:=Tfrm_Login_Man.Create(self);
    frm_Login_Man.Caption:='经手人选择';
    frm_Login_Man.ShowModal;
    Edit6.Text:=Employe_Check_Result;
    frm_Login_Man.Free;
end;

procedure Tfrm_Goods_Write.SpeedButton8Click(Sender: TObject);
begin
    ChildShop_Str:='';
    ChildShop_Result_NO:='';
    ChildShop_Result_Name:='';
    ChildShop_Str:='Goods_Write_Str';
    frm_ChildShop_Select:=Tfrm_ChildShop_Select.Create(self);
    frm_ChildShop_Select.ShowModal;
    Edit7.Text:=ChildShop_Result_NO;
    frm_ChildShop_Select.Free;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -