mainform1.pas

来自「思微POS连锁超市管理系统 (商业代码),几年前的东西了」· PAS 代码 · 共 2,254 行 · 第 1/5 页

PAS
2,254
字号

procedure TMainForm.N97Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '商品促销管理';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('xscxwh') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Txscxwh, xscxwh);
    xscxwh.show;
  end
  else
  begin //存在则将其拖到前台。
    xscxwh.BringToFront;
    xscxwh.SetFocus;
  end;

end;

procedure TMainForm.N41Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '建立盘点清单';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('pdqd') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Tpdqd, pdqd);
    pdqd.show;
  end
  else
  begin //存在则将其拖到前台。
    pdqd.BringToFront;
    pdqd.SetFocus;
  end;
end;

procedure TMainForm.N43Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '录入实盘数据';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('pdlr') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Tpdlr, pdlr);
    pdlr.show;
  end
  else
  begin //存在则将其拖到前台。
    pdlr.BringToFront;
    pdlr.SetFocus;
  end;

end;

procedure TMainForm.N44Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '实盘数据入账';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('pdgx') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Tpdgx, pdgx);
    pdgx.show;
  end
  else
  begin //存在则将其拖到前台。
    pdgx.BringToFront;
    pdgx.SetFocus;
  end;
end;

procedure TMainForm.N45Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '盘点盈亏查询';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('pdykcx') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Tpdykcx, pdykcx);
    pdykcx.show;
  end
  else
  begin //存在则将其拖到前台。
    pdykcx.BringToFront;
    pdykcx.SetFocus;
  end;
end;

procedure TMainForm.N42Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '打印盘点报表';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('pdbb') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Tpdbb, pdbb);
    pdbb.show;
  end
  else
  begin //存在则将其拖到前台。
    pdbb.BringToFront;
    pdbb.SetFocus;
  end;
end;

procedure TMainForm.N102Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '促销商品销售查询';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('cxspxscx') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Tcxspxscx, cxspxscx);
    cxspxscx.show;
  end
  else
  begin //存在则将其拖到前台。
    cxspxscx.BringToFront;
    cxspxscx.SetFocus;
  end;

end;

procedure TMainForm.N107Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '按供货商查进货';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('ghsghcx') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Tghsghcx, ghsghcx);
    ghsghcx.show;
  end
  else
  begin //存在则将其拖到前台。
    ghsghcx.BringToFront;
    ghsghcx.SetFocus;
  end;

end;

procedure TMainForm.N106Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '按供货商查销售';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('ghsxscx') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Tghsxscx, ghsxscx);
    ghsxscx.show;
  end
  else
  begin //存在则将其拖到前台。
    ghsxscx.BringToFront;
    ghsxscx.SetFocus;
  end;

end;

procedure TMainForm.N105Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '按供货商查库存';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('ghskccx') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Tghskccx, ghskccx);
    ghskccx.show;
  end
  else
  begin //存在则将其拖到前台。
    ghskccx.BringToFront;
    ghskccx.SetFocus;
  end;
end;

procedure TMainForm.N109Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '按类别查进货';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('lbjhcx') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Tlbjhcx, lbjhcx);
    lbjhcx.show;
  end
  else
  begin //存在则将其拖到前台。
    lbjhcx.BringToFront;
    lbjhcx.SetFocus;
  end;

end;

procedure TMainForm.N110Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '按类别查销售';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('lbxscx') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Tlbxscx, lbxscx);
    lbxscx.show;
  end
  else
  begin //存在则将其拖到前台。
    lbxscx.BringToFront;
    lbxscx.SetFocus;
  end;

end;

procedure TMainForm.N69Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '分类库存报表';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('lbkccx') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Tlbkccx, lbkccx);
    lbkccx.show;
  end
  else
  begin //存在则将其拖到前台。
    lbkccx.BringToFront;
    lbkccx.SetFocus;
  end;

end;

procedure TMainForm.N34Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '按客户查销售';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('khxshz') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Tkhxshz, khxshz);
    khxshz.show;
  end
  else
  begin //存在则将其拖到前台。
    khxshz.BringToFront;
    khxshz.SetFocus;
  end;

end;

procedure TMainForm.N103Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '客户类别销售';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('khlbxscx') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Tkhlbxscx, khlbxscx);
    khlbxscx.show;
  end
  else
  begin //存在则将其拖到前台。
    khlbxscx.BringToFront;
    khlbxscx.SetFocus;
  end;

end;

procedure TMainForm.N10Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '货品资料查询';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('cxspda') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Tcxspda, cxspda);
    cxspda.show;
  end
  else
  begin //存在则将其拖到前台。
    cxspda.BringToFront;
    cxspda.SetFocus;
  end;
end;


procedure TMainForm.N111Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '客户档案查询';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('khdacx') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Tkhdacx, khdacx);
    khdacx.show;
  end
  else
  begin //存在则将其拖到前台。
    khdacx

⌨️ 快捷键说明

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