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

📄 main.pas

📁 服装厂管理系统源程序压缩包, 请耐心阅读提供的文件包含的内容
💻 PAS
📖 第 1 页 / 共 2 页
字号:
    if curAdmin.team_power[3][3]='0' then  A_4.Visible :=false else A_4.Visible :=true;
    if curAdmin.team_power[3][4]='0' then  A_5.Visible :=false else A_5.Visible :=true;
    if curAdmin.team_power[3][5]='0' then  A_6.Visible :=false else A_6.Visible :=true;
    if curAdmin.team_power[3][6]='0' then  A_7.Visible :=false else A_7.Visible :=true;
    if curAdmin.team_power[3][7]='0' then  A_8.Visible :=false else A_8.Visible :=true;
    if curAdmin.team_power[3][8]='0' then  A_9.Visible :=false else A_9.Visible :=true;
    if curAdmin.team_power[3][9]='0' then  A_10.Visible :=false else A_10.Visible :=true;

    if not(A_1.Visible or A_2.Visible or A_3.Visible) then
    A_1_1.Visible:=false else A_1_1.Visible:=true;
    A_1_2.Visible:=(A_4.Visible or A_5.Visible);
    A_1_3.Visible:=(A_6.Visible or A_7.Visible or A_8.Visible);
    if not (A_1.Visible or A_2.Visible or A_3.Visible or A_4.Visible or A_5.Visible or A_6.Visible or A_7.Visible or A_8.Visible or A_9.Visible or A_10.Visible)
    then Account.Visible:=false else Account.Visible:=true;

    //安全管理
    //curAdmin.team_power[4][0]     登录占用
    if curAdmin.team_power[4][1]='0' then  F_1.Visible :=false else F_1.Visible :=true;
    if curAdmin.team_power[4][2]='0' then  F_2.Visible :=false else F_2.Visible :=true;
    if curAdmin.team_power[4][3]='0' then  F_3.Visible :=false else F_3.Visible :=true;
    if curAdmin.team_power[4][4]='0' then  F_4.Visible :=false else F_4.Visible :=true;
    
    if curAdmin.team_power[4][5]='0' then  P_1.Visible :=false else P_1.Visible :=true;
    if curAdmin.team_power[4][6]='0' then  P_3.Visible :=false else P_3.Visible :=true;
    if curAdmin.team_power[4][7]='0' then  P_4.Visible :=false else P_4.Visible :=true;

    ToolBtn_L.Visible:=F_4.Visible;
    if (F_1.Visible or F_2.Visible or F_3.Visible) then
    F_1_1.Visible:=true else F_1_1.Visible:=false;
    P_1_1.Visible:=(p_3.Visible or P_4.Visible);
    //是否显示分隔符
    ToolButton5.Visible:=ToolBtn_FinRK.Visible or ToolBtn_FinCK.Visible or ToolBtn_FinXS.Visible;
    ToolButton6.Visible:=ToolBtn_MatRK.Visible or ToolBtn_MatCK.Visible;
    ToolButton7.Visible:=ToolBtn_SeqFL.Visible;
end;

procedure TForm_main.FormShow(Sender: TObject);
begin
//    LBLLOGO.Align:=alClient;
//    Bevel1.Align :=alClient;
    CloseMe:=false;
    Application.OnHint := ShowHint;
    StatusBar1.Panels[1].Text:=trim(curAdmin.user_id) + ' -['+trim(curAdmin.user_name) +']';
    StatusBar1.Panels[3].Text:=trim(curAdmin.user_team);
    display_menu;
end;


procedure TForm_main.Time1Timer(Sender: TObject);
var
times:string;
begin
   times:=datetimetostr(now);
   statusbar1.Panels[5].Text:=times+'  '+days[DayOfWeek(date)];
end;

procedure TForm_main.FormCloseQuery(Sender: TObject;
  var CanClose: Boolean);
begin
  if not CloseMe then
  begin
    CanClose:=false;
    if MsgQst(handle,'确定要退出当前企业管理系统吗?')=IDNO then EXIT;
  end;
  CanClose:=true;
  CloseMe:=true; //将关闭窗口BOOLEAN值赋true
end;

procedure TForm_main.F_5Click(Sender: TObject);
begin
  close;
end;

procedure TForm_main.F_4Click(Sender: TObject);
begin
  self.Hide;
  GetSysConfig();
  Form_Logon:=TForm_Logon.create(self);
  CloseMe:=true;
  if Form_Logon.ShowModal=MrCancel then
  close
  else
  begin
    CloseMe:=false;
    self.Show;
  end;
end;

procedure TForm_main.P_2Click(Sender: TObject);
begin
  Form_DBConfig:=TForm_DBConfig.create(application);
  Form_DBConfig.showmodal;
end;

procedure TForm_main.H_2Click(Sender: TObject);
begin
  Form_About:=TForm_About.create(application);
  Form_About.showmodal;
end;

procedure TForm_main.B_1Click(Sender: TObject);
begin
  Form_Base_info:=TForm_Base_info.Create(application);
  Form_Base_info.TabSheet.ActivePageIndex:=0;
  Form_Base_info.ShowModal;
end;

procedure TForm_main.B_2Click(Sender: TObject);
begin
  Form_Base_info:=TForm_Base_info.Create(application);
  Form_Base_info.TabSheet.ActivePageIndex:=1;
  Form_Base_info.ShowModal;
end;

procedure TForm_main.B_4Click(Sender: TObject);
begin
  Form_Base_info:=TForm_Base_info.Create(application);
  Form_Base_info.TabSheet.ActivePageIndex:=2;
  Form_Base_info.ShowModal;
end;

procedure TForm_main.B_3Click(Sender: TObject);
begin
  Form_Base_info:=TForm_Base_info.Create(application);
  Form_Base_info.TabSheet.ActivePageIndex:=3;
  Form_Base_info.ShowModal;
end;

procedure TForm_main.B_5Click(Sender: TObject);
begin
  Form_Base_info:=TForm_Base_info.Create(application);
  Form_Base_info.TabSheet.ActivePageIndex:=4;
  Form_Base_info.ShowModal;
end;

procedure TForm_main.B_6Click(Sender: TObject);
begin
  Form_Material_info:=TForm_Material_info.Create(application);
  Form_Material_info.ShowModal;
end;

procedure TForm_main.O_1Click(Sender: TObject);
begin
  Form_order_info:=TForm_order_info.Create(Application);
  Form_order_info.ShowModal;
end;

procedure TForm_main.O_2Click(Sender: TObject);
begin
  Form_seq_price:=TForm_seq_price.Create(application);
  Form_seq_price.ShowModal;
end;

procedure TForm_main.O_3Click(Sender: TObject);
begin
  Form_Absent_BOM:=TForm_Absent_BOM.Create(application);
  Form_Absent_BOM.ShowModal;
end;

procedure TForm_main.B_7Click(Sender: TObject);
begin
  Form_employee:=TForm_employee.Create(application);
  Form_employee.ShowModal;
end;
                                                     
procedure TForm_main.F_1Click(Sender: TObject);
begin
  Form_Role:=TForm_Role.create(application);
  Form_Role.showmodal;
  DataMod.CheckAdmin(curAdmin.user_id,curAdmin.user_pwd,true);
  display_menu;
end;

procedure TForm_main.P_1Click(Sender: TObject);
begin
  Form_SysFlag:=TForm_SysFlag.Create(application);
  Form_SysFlag.ShowModal;
end;

procedure TForm_main.F_2Click(Sender: TObject);
begin
  Form_Admin:=TForm_Admin.Create(application);
  Form_Admin.ShowModal;
end;

procedure TForm_main.F_3Click(Sender: TObject);
begin
  Form_ChangeKey:=TForm_ChangeKey.Create(application);
  if Form_ChangeKey.ShowModal=mrOK then
  MsgOk(handle,'密码更改成功!');
end;

procedure TForm_main.S_1_1Click(Sender: TObject);
begin
  Form_Material_RK:=TForm_Material_RK.Create(application);
  Form_Material_RK.showmodal;
end;

procedure TForm_main.S_1_3Click(Sender: TObject);
begin
  Form_Material_KC:=TForm_Material_KC.Create(Application);
  Form_Material_KC.showmodal;
end;

procedure TForm_main.S_1_2Click(Sender: TObject);
begin
  Form_Material_CK:=TForm_Material_CK.Create(application);
  Form_Material_CK.showmodal;
end;

procedure TForm_main.S_2_1Click(Sender: TObject);
begin
  Form_Fin_Product_RK:=TForm_Fin_Product_RK.Create(application);
  Form_Fin_Product_RK.ShowModal;
end;

procedure TForm_main.S_2_2Click(Sender: TObject);
begin
  Form_Fin_Product_CK:=TForm_Fin_Product_CK.Create(application);
  Form_Fin_Product_CK.ShowModal;
end;

procedure TForm_main.S_2_4Click(Sender: TObject);
begin
  Form_Fin_Product_KC:=TForm_Fin_Product_KC.Create(application);
  Form_Fin_Product_KC.ShowModal;
end;

procedure TForm_main.S_2_3Click(Sender: TObject);
begin
  Form_Fin_Product_XS:=TForm_Fin_Product_XS.Create(application);
  Form_Fin_Product_XS.ShowModal;
end;

procedure TForm_main.A_1Click(Sender: TObject);
begin
  Form_Payout:=TForm_Payout.Create(application);
  Form_Payout.ShowModal;
end;

procedure TForm_main.A_2Click(Sender: TObject);
begin
  Form_Earning:=TForm_Earning.Create(application);
  Form_Earning.ShowModal;
end;

procedure TForm_main.A_4Click(Sender: TObject);
begin
  Form_Borrow:=TForm_Borrow.Create(application);
  Form_Borrow.ShowModal;
end;

procedure TForm_main.A_5Click(Sender: TObject);
begin
  FrmFJEarn:=TFrmFJEarn.Create(application);
  FrmFJEarn.ShowModal;
end;

procedure TForm_main.S_4Click(Sender: TObject);
begin
  Form_Outbom_log:=TForm_Outbom_log.Create(application);
  Form_Outbom_log.ShowModal;
end;

procedure TForm_main.S_3Click(Sender: TObject);
begin
FrmCaiCangDan:=TFrmCaiCangDan.create(self);
FrmCaiCangDan.showmodal;
end;

procedure TForm_main.A_8Click(Sender: TObject);
begin
FrmPersonMainShouLU:=TFrmPersonMainShouLU.create(self);
FrmPersonMainShouLU.showmodal;
end;

procedure TForm_main.A_3Click(Sender: TObject);
begin
  Form_Etp_Month_ACC:=TForm_Etp_Month_ACC.Create(application);
  Form_Etp_Month_ACC.ShowModal;
end;

procedure TForm_main.B_9Click(Sender: TObject);
begin
  Form_EmpPay_Out:=TForm_EmpPay_Out.Create(application);
  Form_EmpPay_Out.ShowModal;
end;

procedure TForm_main.A_9Click(Sender: TObject);
begin
FrmEMPTJ_SHOUZHI_month:=TFrmEMPTJ_SHOUZHI_month.create(self);
FrmEMPTJ_SHOUZHI_month.showmodal;
end;

procedure TForm_main.A_10Click(Sender: TObject);
begin
FrmEMPTJ_SHOUZHI_ALL:=TFrmEMPTJ_SHOUZHI_ALL.create(self);
FrmEMPTJ_SHOUZHI_ALL.ShowModal;
end;

procedure TForm_main.FormClose(Sender: TObject; var Action: TCloseAction);
var now_datetime:Tdatetime;
begin
  if closeme then
  begin
    //保存本次离陆的日期时间
    with adoq_severdate do
    begin
      close; sql.Clear;
      sql.Add('select * from Sever_date');
      open;
      if recordcount<>0 then
      begin
        close; sql.Clear;
        sql.Add('update sever_date set sys_date=:V_sys_date');
        GetHostDateTime(datamod.ADOCon,now_datetime);
        parameters.ParamValues['V_sys_date']:=now_datetime;
        try
          execsql;
        except
        end;
      end
      else
      begin
        close; sql.Clear;
        sql.Add('insert into sever_date (sys_date) values(:v_sys_date)');
        GetHostDateTime(datamod.ADOCon,now_datetime);
        parameters.ParamValues['V_sys_date']:=now_datetime;
        try
          execsql;
        except
        end;
      end;
    end;//保存本次离陆的日期时间.End
    Action:=cafree;
  end;
end;

procedure TForm_main.A_7Click(Sender: TObject);
begin
  Form_EmpPay_Out:=TForm_EmpPay_Out.Create(application);
  Form_EmpPay_Out.ShowModal;
end;

procedure TForm_main.A_6Click(Sender: TObject);
begin
  Form_Emp_Pay:=TForm_Emp_Pay.Create(application);
  Form_Emp_Pay.showmodal;
end;

procedure TForm_main.P_4Click(Sender: TObject);
begin
  frmSysdata_manage:=TfrmSysdata_manage.Create(self);
  frmSysdata_manage.ShowModal;
end;

procedure TForm_main.O_4Click(Sender: TObject);
begin
  Frm_Search_orderSL:=TFrm_Search_orderSL.create(self);
  Frm_Search_orderSL.showmodal;
end;

procedure TForm_main.O_5Click(Sender: TObject);
begin
  Frmsearch_orderSL_detail:=TFrmsearch_orderSL_detail.Create(self);
  Frmsearch_orderSL_detail.ShowModal;
end;

procedure TForm_main.P_3Click(Sender: TObject);
begin
  Form_employee_Backup:=TForm_employee_Backup.Create(self);
  Form_employee_Backup.ShowModal;
end;

procedure TForm_main.P_5Click(Sender: TObject);
begin
//  SkinData1.Active:=not SkinData1.Active;
end;

end.

⌨️ 快捷键说明

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