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

📄 billpublic.pas

📁 进销存·完整的·有数据库的·非常完整·只得参考
💻 PAS
字号:
unit BillPublic;

interface

uses ShareBill, Forms, SysUtils;

function ExistDrawShow(lMode: Integer): string; //领料单
function ExistReturnShow(lMode: Integer): string; //退料单
function ExistEnterShow(lMode: Integer): string; //产品进仓
function ExistCheckShow(lMode: Integer): string; //库存盘点
function ExistChangeShow(lMode: Integer): string; //存货调价
function ExistExchangeShow(lMode: Integer): string; //库存变动
function ExistAssemblyShow(lMode: Integer): string; //组装与拆卸
function ExistOtherShow(lMode: Integer): string; //仓库调拨

implementation

uses SysPublic;

function ExistDrawShow(lMode: Integer): string;
var
  frmExistDraw: TfrmShareBill;
begin
  frmExistDraw := TfrmShareBill.Create(Application);
  with frmExistDraw do
  begin
    Caption := '领料单';
    sMasterSql := ' SELECT * FROM ExistIndex e where e.mode=' + IntToStr(lMode);
    lMasterID := 0;
    sListSql := ' SELECT * FROM ExistList el ';
    lPanelHeight := PANEL_HEIGHT_1;
    lPubMode := lMode;
    sEditField := 'DepotID,EmployeID';
    sEditCaption := '领料仓,领料人';
    sEditType := 'eButton,eButton';
    sButton := IntToStr(BASE_DEPOT) + ',' + IntToStr(BASE_EMPLOYE);
    sGridField := 'WareID,WareCode,WareName,Number,Price,Total';
    sGridCaption := '商品ID,商品编号,商品名称,数量,单价,金额';
    sGridWidth := '30,150,150,70,70,70';
    MainShow;
    Result := sReturn;
    Free;
  end;
end;

function ExistReturnShow(lMode: Integer): string;
var
  frmExistReturn: TfrmShareBill;
begin
  frmExistReturn := TfrmShareBill.Create(Application);
  with frmExistReturn do
  begin
    Caption := '退料单';
    sMasterSql := ' SELECT * FROM ExistIndex e where e.mode=' + IntToStr(lMode);
    sListSql := ' SELECT * FROM ExistList el ';
    lMasterID := 0;
    lPanelHeight := PANEL_HEIGHT_1;
    lPubMode := lMode;
    sEditField := 'DepotID,EmployeID';
    sEditCaption := '退料仓,退料人';
    sEditType := 'eButton,eButton';
    sButton := IntToStr(BASE_DEPOT) + ',' + IntToStr(BASE_EMPLOYE);
    sGridField := 'WareID,WareCode,WareName,Number,Price,Total';
    sGridCaption := '商品ID,商品编号,商品名称,数量,单价,金额';
    sGridWidth := '30,150,150,70,70,70';
    MainShow;
    Result := sReturn;
    Free;
  end;
end;

function ExistEnterShow(lMode: Integer): string;
var
  frmExistEnter: TfrmShareBill;
begin
  frmExistEnter := TfrmShareBill.Create(Application);
  with frmExistEnter do
  begin
    Caption := '产品进仓';
    sMasterSql := ' SELECT * FROM ExistIndex e where e.mode=' + IntToStr(lMode);
    sListSql := ' SELECT * FROM ExistList el ';
    lMasterID := 0;
    lPanelHeight := PANEL_HEIGHT_1;
    lPubMode := lMode;
    sEditField := 'DepotID,BatchNo';
    sEditCaption := '进货仓,批号';
    sEditType := 'eButton,eText';
    sButton := IntToStr(BASE_DEPOT) + ',0';
    sGridField := 'WareID,WareCode,WareName,Number,Price,Total';
    sGridCaption := '商品ID,商品编号,商品名称,数量,平均成本价,金额';
    sGridWidth := '30,150,150,70,70,70';
    MainShow;
    Result := sReturn;
    Free;
  end;
end;

function ExistCheckShow(lMode: Integer): string;
var
  frmExistCheck: TfrmShareBill;
begin
  frmExistCheck := TfrmShareBill.Create(Application);
  with frmExistCheck do
  begin
    Caption := '库存盘点';
    sMasterSql := ' SELECT * FROM ExistIndex e where e.mode=' + IntToStr(lMode);
    sListSql := ' SELECT * FROM ExistList el ';
    lMasterID := 0;
    lPanelHeight := PANEL_HEIGHT_1;
    lPubMode := lMode;
    sEditField := 'DepotID';
    sEditCaption := '盘点仓库';
    sEditType := 'eButton';
    sButton := IntToStr(BASE_DEPOT);
    sGridField := 'WareID,WareCode,WareName,Number,Price,Total';
    sGridCaption := '商品ID,商品编号,商品名称,数量,单价,金额';
    sGridWidth := '30,150,150,70,70,70';
    MainShow;
    Result := sReturn;
    Free;
  end;
end;

function ExistChangeShow(lMode: Integer): string;
var
  frmExistChange: TfrmShareBill;
begin
  frmExistChange := TfrmShareBill.Create(Application);
  with frmExistChange do
  begin
    Caption := '存货调价';
    sMasterSql := ' SELECT * FROM ExistIndex e where e.mode=' + IntToStr(lMode);
    sListSql := ' SELECT * FROM ExistList el ';
    lMasterID := 0;
    lPanelHeight := PANEL_HEIGHT_1;
    lPubMode := lMode;
    sEditField := '';
    sEditCaption := '';
    sEditType := '';
    sButton := '';
    sGridField := 'WareID,WareCode,WareName,Number,Price,Price1,Total';
    sGridCaption := '商品ID,商品编号,商品名称,数量,原单价,新单价,金额';
    sGridWidth := '30,150,150,70,70,70';
    MainShow;
    Result := sReturn;
    Free;
  end;
end;

function ExistAssemblyShow(lMode: Integer): string;
var
  frmExistAssembly: TfrmShareBill;
begin
  frmExistAssembly := TfrmShareBill.Create(Application);
  with frmExistAssembly do
  begin
    Caption := '组装与拆卸';
    sMasterSql := ' SELECT * FROM ExistIndex e where e.mode=' + IntToStr(lMode);
    sListSql := ' SELECT * FROM ExistList el ';
    lMasterID := 0;
    lPanelHeight := PANEL_HEIGHT_3;
    lPubMode := lMode;
    sEditField := 'WareID,DepotID,EmployeID,Number,Money,Sum';
    sEditCaption := '商品,仓库,经手人,数量,单价,金额';
    sEditType := 'eButton,eButton,eButton,eText,eText,eText';
    sButton := IntToStr(BASE_WARE) + ',' + IntToStr(BASE_DEPOT) + ',' +
      IntToStr(BASE_EMPLOYE) + ',0,0';
    sGridField := 'WareID,WareCode,WareName,Number,Price,Total';
    sGridCaption := '商品ID,商品编号,商品名称,数量,单价,金额';
    sGridWidth := '30,150,150,70,70,70';
    MainShow;
    Result := sReturn;
    Free;
  end;
end;

function ExistOtherShow(lMode: Integer): string;
var
  frmExistOther: TfrmShareBill;
begin
  frmExistOther := TfrmShareBill.Create(Application);
  with frmExistOther do
  begin
    Caption := '仓库调拨';
    sMasterSql := ' SELECT * FROM ExistIndex e where e.mode=' + IntToStr(lMode);
    sListSql := ' SELECT * FROM ExistList el ';
    lMasterID := 0;
    lPanelHeight := PANEL_HEIGHT_1;
    lPubMode := lMode;
    sEditField := 'DepotID,DepotID';
    sEditCaption := '调出仓,调入仓';
    sEditType := 'eButton,eButton';
    sButton := IntToStr(BASE_DEPOT) + ',' + IntToStr(BASE_DEPOT);
    sGridField := 'WareID,WareCode,WareName,Number,Price,Total';
    sGridCaption := '商品ID,商品编号,商品名称,数量,单价,金额';
    sGridWidth := '30,150,150,70,70,70';
    MainShow;
    Result := sReturn;
    Free;
  end;
end;

function ExistExchangeShow(lMode: Integer): string;
var
  frmExistExchange: TfrmShareBill;
begin
  frmExistExchange := TfrmShareBill.Create(Application);
  with frmExistExchange do
  begin
    Caption := '库存变动';
    sMasterSql := ' SELECT * FROM ExistIndex e where e.mode=' + IntToStr(lMode);
    sListSql := ' SELECT * FROM ExistList el ';
    lMasterID := 0;
    lPanelHeight := PANEL_HEIGHT_2;
    lPubMode := lMode;
    sEditField := 'ChangeType,DepotID,Address,Memo';
    sEditCaption := '变动类型,变动仓库,相关信息,说明';
    sEditType := 'eButton,eButton,eText';
    sButton := IntToStr(BASE_CHANGE_TYPE) + ',' + IntToStr(BASE_DEPOT) + ',0';
    sGridField := 'WareID,WareCode,WareName,Number,Price,Total,UnNumber';
    sGridCaption := '商品ID,商品编号,商品名称,数量,单价,金额,退还数量';
    sGridWidth := '30,150,150,70,70,70,70';
    MainShow;
    Result := sReturn;
    Free;
  end;
end;

end.

⌨️ 快捷键说明

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