U_kcpdcx.pas
上传用户:psxgmh
上传日期:2013-04-08
资源大小:15112k
文件大小:4k
- unit U_kcpdcx;
- interface
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- ComCtrls, ExtCtrls, Grids, DBGrids, Db, DBClient, ImgList, ToolWin;
- type
- TForm75 = class(TForm)
- Panel1: TPanel;
- StatusBar1: TStatusBar;
- ClientDataSet1: TClientDataSet;
- DataSource1: TDataSource;
- DBGrid1: TDBGrid;
- Panel3: TPanel;
- ImageList1: TImageList;
- Timer1: TTimer;
- ToolBar1: TToolBar;
- ToolButton1: TToolButton;
- ToolButton3: TToolButton;
- ToolButton2: TToolButton;
- ToolButton4: TToolButton;
- procedure FormClose(Sender: TObject; var Action: TCloseAction);
- procedure ToolButton1Click(Sender: TObject);
- procedure ToolButton2Click(Sender: TObject);
- procedure Timer1Timer(Sender: TObject);
- procedure ToolButton4Click(Sender: TObject);
- procedure ToolButton3Click(Sender: TObject);
- procedure DBGrid1TitleClick(Column: TColumn);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- Form75: TForm75;
- implementation
- uses U_mainform, U_dwck, U_szcx, U_general_print;
- {$R *.DFM}
- procedure TForm75.FormClose(Sender: TObject; var Action: TCloseAction);
- begin
- ACTION := CAFREE;
- form75 := nil;
- end;
- procedure TForm75.ToolButton1Click(Sender: TObject);
- begin
- application.createform(Tform77, form77);
- form77.combobox1.items.add('仓库名称');
- form77.combobox1.items.add('盘点编号');
- form77.combobox1.items.add('材料编码');
- form77.combobox1.items.add('实存数量');
- form77.combobox1.items.add('盘点数量');
- form77.combobox1.items.add('材料名称');
- form77.combobox1.items.add('规格型号');
- form77.combobox1.items.add('盘点日期');
- form77.combobox1.items.add('盘点人');
- form77.combobox1.items.add('是否审核');
- v_table := 'VIEW_CL_KCPD';
- try
- form77.showmodal;
- finally
- form77.free;
- if sf_qr = 'yes' then
- begin
- clientdataset1.filter := xx401;
- clientdataset1.filtered := true;
- end;
- end;
- end;
- procedure TForm75.ToolButton2Click(Sender: TObject);
- var
- vs_value: string;
- vi, i: integer;
- begin
- application.createform(Tform78, form78);
- form78.srclist.items.add('仓库名称');
- form78.srclist.items.add('盘点编号');
- form78.srclist.items.add('材料编码');
- form78.srclist.items.add('实存数量');
- form78.srclist.items.add('盘点数量');
- form78.srclist.items.add('材料名称');
- form78.srclist.items.add('规格型号');
- form78.srclist.items.add('盘点日期');
- form78.srclist.items.add('盘点人');
- form78.srclist.items.add('是否审核');
- try
- form78.showmodal;
- finally
- if sf_qd1 = 'yes' then
- begin
- vi := form78.DstList.Items.Count;
- if vi > 0 then
- begin
- vs_value := form78.dstlist.items[0];
- end;
- for i := 2 to vi do
- begin
- vs_value := vs_value + ';' + form78.dstlist.items[i - 1];
- end;
- clientdataset1.IndexFieldNames := vs_value;
- end;
- form78.free;
- end;
- end;
- procedure TForm75.Timer1Timer(Sender: TObject);
- begin
- statusbar1.Panels[2].text := '共有:' + inttostr(clientdataset1.recordcount) + '条记录';
- statusbar1.refresh;
- end;
- procedure TForm75.ToolButton4Click(Sender: TObject);
- begin
- application.createform(Tform80, form80);
- form80.srclist.items.add('仓库名称');
- form80.srclist.items.add('盘点编号');
- form80.srclist.items.add('材料编码');
- form80.srclist.items.add('实存数量');
- form80.srclist.items.add('盘点数量');
- form80.srclist.items.add('材料名称');
- form80.srclist.items.add('规格型号');
- form80.srclist.items.add('盘点日期');
- form80.srclist.items.add('盘点人');
- form80.srclist.items.add('是否审核');
- vps_tablename := 'view_cl_kcpd';
- vps_filter := clientdataset1.Filter;
- vps_index := clientdataset1.IndexFieldNames;
- Form80.Edit1.Text := '库存盘点单据打印';
- try
- form80.showmodal;
- finally
- form80.free;
- end;
- end;
- procedure TForm75.ToolButton3Click(Sender: TObject);
- begin
- clientdataset1.close;
- clientdataset1.filter:='';
- clientdataset1.filtered := false;
- clientdataset1.open;
- end;
- procedure TForm75.DBGrid1TitleClick(Column: TColumn);
- begin
- Form1.MySort(dbgrid1, column);
- end;
- end.