📄 stock_enter.pas
字号:
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_Stock_Enter.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_Stock_Enter.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
frm_data.ClientDataSet3.Active:=False;
frm_data.ClientDataSet3.Close;
frm_data.ClientDataSet4.Active:=False;
frm_data.ClientDataSet4.Close;
Action:=Cafree;
end;
procedure Tfrm_Stock_Enter.FormShow(Sender: TObject);
var
i,icount,k:integer;
tt,yy,temppos:integer;
begin
frm_Stock_Enter.Left:=170 * longint(Screen.Width) div 1024;
frm_Stock_Enter.Top:=40 * longint(Screen.Height) div 768;
frm_Stock_Enter.Height:=715;
frm_Stock_Enter.Width:=860;
iColcount:=StringGrid1.ColCount-1; //需要的填充数据的网络表格的列数
StringGrid1.RowCount:=2; StringGrid1.ColCount:=27;
Total_Count:=StringGrid1.RowCount;
StringGrid1.ColWidths[0]:=40; StringGrid1.ColWidths[1]:=150; StringGrid1.ColWidths[2]:=150;
StringGrid1.ColWidths[3]:=100; StringGrid1.ColWidths[4]:=100; StringGrid1.ColWidths[5]:=150;
StringGrid1.ColWidths[6]:=50; StringGrid1.ColWidths[7]:=80; StringGrid1.ColWidths[8]:=100;
StringGrid1.ColWidths[9]:=50; StringGrid1.ColWidths[10]:=100; StringGrid1.ColWidths[11]:=100;
StringGrid1.ColWidths[12]:=50; StringGrid1.ColWidths[13]:=150; StringGrid1.ColWidths[14]:=150;
StringGrid1.ColWidths[15]:=100; StringGrid1.ColWidths[16]:=100; StringGrid1.ColWidths[17]:=150;
StringGrid1.ColWidths[18]:=50; StringGrid1.ColWidths[19]:=80; StringGrid1.ColWidths[20]:=100;
StringGrid1.ColWidths[21]:=50; StringGrid1.ColWidths[22]:=100; StringGrid1.ColWidths[23]:=100;
StringGrid1.ColWidths[24]:=50; StringGrid1.ColWidths[25]:=150;
StringGrid1.Cells[0,0]:='行号'; StringGrid1.Cells[1,0]:='商品编号'; StringGrid1.Cells[2,0]:='商品名称';
StringGrid1.Cells[3,0]:='批号'; StringGrid1.Cells[4,0]:='单价'; StringGrid1.Cells[5,0]:='数量';
StringGrid1.Cells[6,0]:='金额'; StringGrid1.Cells[7,0]:='折扣'; StringGrid1.Cells[8,0]:='折后单价';
StringGrid1.Cells[9,0]:='合计金额'; StringGrid1.Cells[10,0]:='税率'; StringGrid1.Cells[11,0]:='含税单价';
StringGrid1.Cells[12,0]:='税后合计'; StringGrid1.Cells[13,0]:='质量状况'; StringGrid1.Cells[14,0]:='类别名称';
StringGrid1.Cells[15,0]:='品牌名称'; StringGrid1.Cells[16,0]:='品种名称'; StringGrid1.Cells[17,0]:='规格型号';
StringGrid1.Cells[18,0]:='球面度数'; StringGrid1.Cells[19,0]:='柱面度数'; StringGrid1.Cells[20,0]:='颜色名称';
StringGrid1.Cells[21,0]:='商品条玛'; StringGrid1.Cells[22,0]:='组册商品'; StringGrid1.Cells[23,0]:='生产厂家';
StringGrid1.Cells[24,0]:='基本单位'; StringGrid1.Cells[25,0]:='有效日期(月)'; StringGrid1.Cells[26,0]:='备注说明';
if Public_Do='Stock_0003' then
begin
P_check.Visible:=False;
end;
//草稿单据查看
if ((Public_Do='Business_Draft_0001') and (SH_Level<>0)) then
begin
P_check.Visible:=true;
if Trim(ExamineMan1)<>'' then
begin
tempstr:=ExamineMan1;
tt:=0;
while pos(',',tempstr)>0 do //取得逗号的位置
begin
temppos:=pos(',',tempstr); //取得逗号的位置
ss:=copy(tempstr,1,temppos-1);
tempstr:=copy(tempstr,temppos+1,length(tempstr)-temppos);
if ss=Handle_Man then
begin
P1.Visible:=True; L1.Caption:=LevelName1+':'+ss;
if ee1='' then
begin
L1.Caption:=LevelName1+':'+ss;
Flag1:=1;
end;
if ee1<>'' then
begin
L1.Caption:=LevelName1+':';
Flag1:=2;
end;
end;
end;
Next;
end;
if Trim(ExamineMan2)<>'' then
begin
tempstr:=ExamineMan2;
tt:=0;
while pos(',',tempstr)>0 do //取得逗号的位置
begin
temppos:=pos(',',tempstr); //取得逗号的位置
ss:=copy(tempstr,1,temppos-1);
tempstr:=copy(tempstr,temppos+1,length(tempstr)-temppos);
if ss=Handle_Man then
begin
P2.Visible:=True; L2.Caption:=LevelName2+':'+ss;
if ee2='' then
begin
L2.Caption:=LevelName2+':'+ss;
Flag2:=1;
end;
if ee2<>'' then
begin
L2.Caption:=LevelName2+':';
Flag2:=2;
end;
end;
end;
Next;
end;
if Trim(ExamineMan3)<>'' then
begin
tempstr:=ExamineMan3;
tt:=0;
while pos(',',tempstr)>0 do //取得逗号的位置
begin
temppos:=pos(',',tempstr); //取得逗号的位置
ss:=copy(tempstr,1,temppos-1);
tempstr:=copy(tempstr,temppos+1,length(tempstr)-temppos);
if ss=Handle_Man then
begin
P3.Visible:=True; L3.Caption:=LevelName3+':'+ss;
if ee3='' then
begin
L3.Caption:=LevelName3+':'+ss;
Flag3:=1;
end;
if ee3<>'' then
begin
L3.Caption:=LevelName3+':';
Flag3:=2;
end;
end;
end;
Next;
end;
if Trim(ExamineMan4)<>'' then
begin
tempstr:=ExamineMan4;
tt:=0;
while pos(',',tempstr)>0 do //取得逗号的位置
begin
temppos:=pos(',',tempstr); //取得逗号的位置
ss:=copy(tempstr,1,temppos-1);
tempstr:=copy(tempstr,temppos+1,length(tempstr)-temppos);
if ss=Handle_Man then
begin
P4.Visible:=True; L4.Caption:=LevelName4+':'+ss;
if ee4='' then
begin
L4.Caption:=LevelName4+':'+ss;
Flag4:=1;
end;
if ee1<>'' then
begin
L4.Caption:=LevelName4+':';
Flag4:=2;
end;
end;
end;
Next;
end;
if Trim(ExamineMan5)<>'' then
begin
tempstr:=ExamineMan5;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -