📄 unit_qingbiao.pas
字号:
cell1.SetCellString(i+2,6,0,'×');
cell1.SetCellString(i+2,15,0,'×');
end
else if adoquery.fieldbyname('qbfhx_1').AsString='-' then
cell1.SetCellString(i+2,6,0,'-')
else
cell1.SetCellString(i+2,6,0,'√');
if adoquery.fieldbyname('qbfhx_2').AsString='×' then
begin
cell1.SetCellString(i+2,7,0,'×');
cell1.SetCellString(i+2,15,0,'×');
end
else if adoquery.fieldbyname('qbfhx_2').AsString='-' then
cell1.SetCellString(i+2,7,0,'-')
else
cell1.SetCellString(i+2,7,0,'√');
if adoquery.fieldbyname('qbfhx_3').AsString='×' then
begin
cell1.SetCellString(i+2,8,0,'×');
cell1.SetCellString(i+2,15,0,'×');
end
else if adoquery.fieldbyname('qbfhx_3').AsString='-' then
cell1.SetCellString(i+2,8,0,'-')
else
cell1.SetCellString(i+2,8,0,'√');
if adoquery.fieldbyname('qbfhx_4').AsString='×' then
begin
cell1.SetCellString(i+2,9,0,'×');
cell1.SetCellString(i+2,15,0,'×');
end
else if adoquery.fieldbyname('qbfhx_4').AsString='-' then
cell1.SetCellString(i+2,9,0,'-')
else
cell1.SetCellString(i+2,9,0,'√');
if adoquery.fieldbyname('qbfhx_5').AsString='×' then
begin
cell1.SetCellString(i+2,10,0,'×');
cell1.SetCellString(i+2,15,0,'×');
end
else if adoquery.fieldbyname('qbfhx_5').AsString='-' then
cell1.SetCellString(i+2,10,0,'-')
else
cell1.SetCellString(i+2,10,0,'√');
if adoquery.fieldbyname('qbfhx_6').AsString='×' then
begin
cell1.SetCellString(i+2,11,0,'×');
cell1.SetCellString(i+2,15,0,'×');
end
else if adoquery.fieldbyname('qbfhx_6').AsString='-' then
cell1.SetCellString(i+2,11,0,'-')
else
cell1.SetCellString(i+2,11,0,'√');
if adoquery.fieldbyname('qbfhx_7').AsString='×' then
begin
cell1.SetCellString(i+2,12,0,'×');
cell1.SetCellString(i+2,15,0,'×');
end
else if adoquery.fieldbyname('qbfhx_7').AsString='-' then
cell1.SetCellString(i+2,12,0,'-')
else
cell1.SetCellString(i+2,12,0,'√');
if adoquery.fieldbyname('qbfhx_8').AsString='×' then
begin
cell1.SetCellString(i+2,13,0,'×');
cell1.SetCellString(i+2,15,0,'×');
end
else if adoquery.fieldbyname('qbfhx_8').AsString='-' then
cell1.SetCellString(i+2,13,0,'-')
else
cell1.SetCellString(i+2,13,0,'√');
if adoquery.fieldbyname('qbfhx_9').AsString='×' then
begin
cell1.SetCellString(i+2,14,0,'×');
cell1.SetCellString(i+2,15,0,'×');
end
else if adoquery.fieldbyname('qbfhx_9').AsString='-' then
cell1.SetCellString(i+2,14,0,'-')
else
cell1.SetCellString(i+2,14,0,'√');
adoquery.next;
end;
end;
if com_project.ItemIndex=1 then
begin
if cell1.OpenFile(SPATH+'report\jianli\pingbiao\ssxh.cll','')<>1 then
begin
showmessage('文件打开错误');
exit;
end;
cell1.ShowSideLabel(0, 0); //不显示行标
cell1.ShowTopLabel(0, 0); //不显示列标
cell1.SetCellString(1,4,0,com_leibie.Text);
adoquery:=tadoquery.Create(nil);
try
adoquery.Close;
adoquery.Connection:=datamodule1.ADOMainConn;
adoquery.SQL.Text:='select dw_name,pb_toubiaobj,pb_suanshubj from bid_pingbiao a,'
+'bid_danwei_xinxi b,bid_biaoduan_xinxi c,bid_wenjian2 d where a.dw_id=b.dw_id and a.bd_isbn=c.bd_isbn'
+' and a.bd_isbn=d.bd_isbn and wj2_fhx=1 and wj2_leixing=2 and a.dw_id=d.dw_Id and c.xmgczb_id in (select xmgczb_id '
+' from bid_xmgczb '+' where xm_isbn='''+trim(xmbdgc.XM_ISBn)+''' and gclx_id='+xmbdgc.gCLX_ID
+' and zblx_id='+xmbdgc.BDLX_ID+') and c.bd_name='''+trim(com_leibie.Text)+''' order by a.pb_xuhao';
adoquery.Open;
for i:=0 to adoquery.RecordCount-1 do
begin
cell1.SetCellString(1,6+i,0,inttostr(i+1));
cell1.SetCellString(2,6+i,0,adoquery.fieldbyname('dw_name').AsString);
cell1.SetCellString(3,6+i,0,adoquery.fieldbyname('pb_toubiaobj').AsString);
cell1.SetCellString(4,6+i,0,adoquery.fieldbyname('pb_suanshubj').AsString);
adoquery.Next;
end;
finally
freeandnil(adoquery);
end;
end;
if com_project.ItemIndex=2 then
begin
if cell1.OpenFile(SPATH+'report\jianli\pingbiao\xmjssc.cll','')<>1 then
begin
showmessage('文件打开错误');
exit;
end;
cell1.ShowSideLabel(0, 0); //不显示行标
cell1.ShowTopLabel(0, 0); //不显示列标
cell1.SetCellString(1,4,0,com_leibie.Text);
adoquery:=tadoquery.Create(nil);
try
adoquery.Close;
adoquery.Connection:=datamodule1.ADOMainConn;
adoquery.SQL.Text:='select dw_name,qbqzx_1,qbqzx_2,qbqzx_3,qbqzx_4,qbqzx_5,qbqzx_6,qbqzx_7,qbqzx_8,qbqzx_9 from bid_qb_qzx a,'
+' bid_danwei_xinxi b,bid_biaoduan_xinxi c where a.dw_id=b.dw_id and a.bd_isbn=c.bd_isbn and c.xmgczb_id in (select xmgczb_id '
+' from bid_xmgczb '+' where xm_isbn='''+trim(xmbdgc.XM_ISBn)+''' and gclx_id='+xmbdgc.gCLX_ID
+' and zblx_id='+xmbdgc.BDLX_ID+') and c.bd_name='''+trim(com_leibie.Text)+'''';
adoquery.Open;
adoquery.First;
for i:=0 to adoquery.RecordCount-1 do
begin
cell1.SetCellString(i+3,15,0,'√');
cell1.SetCellString(i+3,5,0,adoquery.fieldbyname('dw_name').AsString);
if adoquery.fieldbyname('qbqzx_1').AsString='×' then
begin
cell1.SetCellString(i+3,6,0,'×');
cell1.SetCellString(i+3,15,0,'×');
end
else if adoquery.fieldbyname('qbqzx_1').AsString='-' then
cell1.SetCellString(i+3,6,0,'-')
else
cell1.SetCellString(i+3,6,0,'√');
if adoquery.fieldbyname('qbqzx_2').AsString='×' then
begin
cell1.SetCellString(i+3,7,0,'×');
cell1.SetCellString(i+3,15,0,'×');
end
else if adoquery.fieldbyname('qbqzx_2').AsString='-' then
cell1.SetCellString(i+3,7,0,'-')
else
cell1.SetCellString(i+3,7,0,'√');
if adoquery.fieldbyname('qbqzx_3').AsString='×' then
begin
cell1.SetCellString(i+3,8,0,'×');
cell1.SetCellString(i+3,15,0,'×');
end
else if adoquery.fieldbyname('qbqzx_3').AsString='-' then
cell1.SetCellString(i+3,8,0,'-')
else
cell1.SetCellString(i+3,8,0,'√');
if adoquery.fieldbyname('qbqzx_4').AsString='×' then
begin
cell1.SetCellString(i+3,9,0,'×');
cell1.SetCellString(i+3,15,0,'×');
end
else if adoquery.fieldbyname('qbqzx_4').AsString='-' then
cell1.SetCellString(i+3,9,0,'-')
else
cell1.SetCellString(i+3,9,0,'√');
if adoquery.fieldbyname('qbqzx_5').AsString='×' then
begin
cell1.SetCellString(i+3,10,0,'×');
cell1.SetCellString(i+3,15,0,'×');
end
else if adoquery.fieldbyname('qbqzx_5').AsString='-' then
cell1.SetCellString(i+3,10,0,'-')
else
cell1.SetCellString(i+3,10,0,'√');
if adoquery.fieldbyname('qbqzx_6').AsString='×' then
begin
cell1.SetCellString(i+3,11,0,'×');
cell1.SetCellString(i+3,15,0,'×');
end
else if adoquery.fieldbyname('qbqzx_6').AsString='-' then
cell1.SetCellString(i+3,11,0,'-')
else
cell1.SetCellString(i+3,11,0,'√');
if adoquery.fieldbyname('qbqzx_7').AsString='×' then
begin
cell1.SetCellString(i+3,12,0,'×');
cell1.SetCellString(i+3,15,0,'×');
end
else if adoquery.fieldbyname('qbqzx_7').AsString='-' then
cell1.SetCellString(i+3,12,0,'-')
else
cell1.SetCellString(i+3,12,0,'√');
if adoquery.fieldbyname('qbqzx_8').AsString='×' then
begin
cell1.SetCellString(i+3,13,0,'×');
cell1.SetCellString(i+3,15,0,'×');
end
else if adoquery.fieldbyname('qbqzx_8').AsString='-' then
cell1.SetCellString(i+3,13,0,'-')
else
cell1.SetCellString(i+3,13,0,'√');
if adoquery.fieldbyname('qbqzx_9').AsString='×' then
begin
cell1.SetCellString(i+3,14,0,'×');
cell1.SetCellString(i+3,15,0,'×');
end
else if adoquery.fieldbyname('qbqzx_9').AsString='-' then
cell1.SetCellString(i+3,14,0,'-')
else
cell1.SetCellString(i+3,14,0,'√');
adoquery.next;
end;
finally
freeandnil(adoquery);
end;
end;
if com_project.ItemIndex=3 then
begin
{if cell1.OpenFile(SPATH+'report\jianli\pingbiao\jsjyspfhz.cll','')=0 then
begin
showmessage('文件打开错误');
exit;
end;
cell1.ShowSideLabel(0, 0); //不显示行标
cell1.ShowTopLabel(0, 0); //不显示列标
cell1.SetCellString(1,4,0,com_leibie.Text);
adoquery:=tadoquery.Create(nil);
try
adoquery.Close;
adoquery.Connection:=datamodule1.ADOMainConn;
adoquery.SQL.Text:='select dw_name,jlpf_gcs,jlpf_fzgcs,jlpf_zr,jlpf_zdgcs,jlpf_gjzdgcs,jlpf_zygcs,jlpf_jldg,jlpf_jyxy,'
+'jlpf_sb,(cast(isnull(jlpf_gcs,0) as decimal)+cast(isnull(jlpf_fzgcs,0) as decimal)+cast(isnull(jlpf_zr,0) as decimal)'
+'+cast(isnull(jlpf_gjzdgcs,0) as decimal)+cast(isnull(jlpf_zdgcs,0) as decimal)+cast(isnull(jlpf_zygcs,0) as decimal)+'
+'cast(isnull(jlpf_jldg,0) as decimal)+cast(isnull(jlpf_jyxy,0) as decimal)+cast(isnull(jlpf_sb,0) as decimal)) as total from bid_jl_jspf a,'
+'bid_danwei_xinxi b,bid_biaoduan_xinxi c where a.dw_id=b.dw_id and a.bd_isbn=c.bd_isbn and c.xmgczb_id in (select xmgczb_id '
+' from bid_xmgczb '+' where xm_isbn='''+trim(xmbdgc.XM_ISBn)+''' and gclx_id='+xmbdgc.gCLX_ID
+' and zblx_id='+xmbdgc.BDLX_ID+') and c.bd_name='+quotedstr(trim(com_leibie.Text));
adoquery.Open;
adoquery.First;
for i:=0 to adoquery.RecordCount-1 do
begin
cell1.SetCellString(2+i,5,0,adoquery.fieldbyname('dw_name').AsString);
cell1.SetCellString(2+i,6,0,adoquery.fieldbyname('jlpf_gcs').AsString);
cell1.SetCellString(2+i,7,0,adoquery.fieldbyname('jlpf_fzgcs').AsString);
cell1.SetCellString(2+i,8,0,adoquery.fieldbyname('jlpf_zr').AsString);
cell1.SetCellString(2+i,9,0,adoquery.fieldbyname('jlpf_gjzdgcs').AsString);
cell1.SetCellString(2+i,10,0,adoquery.fieldbyname('jlpf_zdgcs').AsString);
cell1.SetCellString(2+i,11,0,adoquery.fieldbyname('jlpf_zygcs').AsString);
cell1.SetCellString(2+i,12,0,adoquery.fieldbyname('jlpf_jldg').AsString);
cell1.SetCellString(2+i,13,0,adoquery.fieldbyname('jlpf_jyxy').AsString);
cell1.SetCellString(2+i,14,0,adoquery.fieldbyname('jlpf_sb').AsString);
cell1.SetCellString(2+i,15,0,adoquery.fieldbyname('total').AsString);
adoquery.Next;
end;
except
freeandnil(adoquery);
end;}
end;
if com_project.ItemIndex=4 then
begin
if cell1.OpenFile(SPATH+'report\jianli\pingbiao\cwjyspfhz.cll','')<>1 then
begin
showmessage('文件打开错误');
exit;
end;
cell1.ShowSideLabel(0, 0); //不显示行标
cell1.ShowTopLabel(0, 0); //不显示列标
cell1.SetCellString(1,4,0,com_leibie.Text);
adoquery:=tadoquery.Create(nil);
try
adoquery.Close;
adoquery.Connection:=datamodule1.ADOMainConn;
adoquery.SQL.Text:='exec Get_jl_cwjys '+quotedstr(com_leibie.Text)+','+quotedstr(trim(xmbdgc.XM_ISBn))
+','+xmbdgc.gCLX_ID+','+xmbdgc.BDLX_ID;
adoquery.Open;
adoquery.First;
for i:=0 to adoquery.RecordCount-1 do
begin
cell1.SetCellString(1,6+i,0,inttostr(i+1));
cell1.SetCellString(2,6+i,0,adoquery.fieldbyname('dw_name').AsString);
cell1.SetCellString(3,6+i,0,adoquery.fieldbyname('pc').AsString);
if i=0 then
cell1.SetCellString(4,6+i,0,adoquery.fieldbyname('pn').AsString);
cell1.SetCellString(5,6+i,0,adoquery.fieldbyname('cha').AsString);
cell1.SetCellString(6,6+i,0,adoquery.fieldbyname('k').AsString);
cell1.SetCellString(7,6+i,0,adoquery.fieldbyname('koufen').AsString);
cell1.SetCellString(8,6+i,0,adoquery.fieldbyname('caiwu').AsString);
adoquery.Next;
end;
except
freeandnil(adoquery);
end;
end;
end
else if com_zhaobiao.Text='设计' then
begin
if com_project.ItemIndex=0 then
begin
if cell1.OpenFile(SPATH+'report\sheji\pingbiao\cwAndjs.cll','')<>1 then
begin
showmessage('文件打开错误');
exit;
end;
cell1.ShowSideLabel(0, 0); //不显示行标
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -