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

📄 u_zhongbiaobg.pas

📁 招投标软件代码,很有应用价值,请大家参考下哦,不明白的地方给我留言
💻 PAS
📖 第 1 页 / 共 3 页
字号:
        if  listview1.Items[I].Caption='委员会名单' then
        begin
          iname:=iname+1;
          sName:='附表'+inttostr(iname);
        end;
        if  listview1.Items[I].Caption='评标监督小组名单' then
        begin
          iname:=iname+1;
          sName:='附表'+inttostr(iname);
        end;
        if  listview1.Items[I].Caption='清标工作组名单' then
        begin
          iname:=iname+1;
          sName:='附表'+inttostr(iname);
        end;
      end
      else if com_zhaobiao.text='监理' then
      begin
        if  listview1.Items[I].Caption='业主标底' then
        begin
           iname:=iname+1;
           sName:='附表'+inttostr(iname);
        end;
        if pos('开标记录',listview1.Items[I].Caption)>0 then
        begin
          if i1=1 then iname:=iname+1;
          sName:='附表'+inttostr(iname);
          if bdsl>1 then
            sName:=sName+'-'+inttostr(i1);
          i1:=i1+1
        end;
        if pos('符合性审查',listview1.Items[I].Caption)>0 then
        begin
          if i2=1 then iname:=iname+1;
          sName:='附表'+inttostr(iname);
          if bdsl>1 then
            sName:=sName+'-'+inttostr(i2);
          i2:=i2+1
        end;
        if pos('投标报价算术性校核',listview1.Items[I].Caption)>0 then
        begin
          if i3=1 then iname:=iname+1;
          sName:='附表'+inttostr(iname);
          if bdsl>1 then
            sName:=sName+'-'+inttostr(i3);
          i3:=i3+1
        end;
        if pos('详细评审',listview1.Items[I].Caption)>0 then
        begin
          if i4=1 then iname:=iname+1;
          sName:='附表'+inttostr(iname);
          if bdsl>1 then
            sName:=sName+'-'+inttostr(i4);
          i4:=i4+1
        end;
        if pos('技术建议书评审',listview1.Items[I].Caption)>0 then
        begin
          if i5=1 then iname:=iname+1;
          sName:='附表'+inttostr(iname);
          if bdsl>1 then
            sName:=sName+'-'+inttostr(i5);
          i5:=i5+1
        end;
        if pos('财务建议书评审',listview1.Items[I].Caption)>0 then
        begin
          if i6=1 then iname:=iname+1;
          sName:='附表'+inttostr(iname);
          if bdsl>1 then
            sName:=sName+'-'+inttostr(i6);
          i6:=i6+1
        end;
        if  listview1.Items[I].Caption='中标候选人' then
        begin
           iname:=iname+1;
           sName:='附表'+inttostr(iname);
        end;
        if  listview1.Items[I].Caption='中标确定' then
        begin
          iname:=iname+1;
          sName:='附表'+inttostr(iname);
        end;
        if  listview1.Items[I].Caption='委员会名单' then
        begin
          //iname:=iname+1;
          sName:='';//'附表'+inttostr(iname);
        end;
        if  listview1.Items[I].Caption='评标监督小组名单' then
        begin
          //iname:=iname+1;
          sName:='';//'附表'+inttostr(iname);
        end;
        if  listview1.Items[I].Caption='清标工作组名单' then
        begin
          //iname:=iname+1;
          sName:='附表'+inttostr(iname);
        end;
      end
      else if com_zhaobiao.Text='设计' then
      begin
        if pos('开标记录',listview1.Items[I].Caption)>0 then
        begin
          if i1=1 then iname:=iname+1;
          sName:='附表'+inttostr(iname);
          if bdsl>1 then
            sName:=sName+'-'+inttostr(i1);
          i1:=i1+1
        end;
        if pos('商务和技术',listview1.Items[I].Caption)>0 then
        begin
          if i2=1 then iname:=iname+1;
          sName:='附表'+inttostr(iname);
          if bdsl>1 then
            sName:=sName+'-'+inttostr(i2);
          i2:=i2+1
        end;
        if pos('专家打分表--',listview1.Items[I].Caption)>0 then
        begin

          if i7<>strtoint(copy(listview1.Items[I].Caption,pos('--',listview1.Items[I].Caption)+2,1)) then
            i7:=strtoint(copy(listview1.Items[I].Caption,pos('--',listview1.Items[I].Caption)+2,1));
          if pos('专家打分表--'+inttostr(i7),listview1.Items[I].Caption)>0 then
          begin
            if i3=1 then iname:=iname+1;
            sName:='附表'+inttostr(iname);
            if bdsl>1 then
            begin
              sName:=sName+'-'+inttostr(i7);
            end;
            sname:=sname+'_'+inttostr(i3);
            i3:=i3+1;
          end;
        end;
        if pos('报价清单',listview1.Items[I].Caption)>0 then
        begin
          if i4=1 then iname:=iname+1;
          sName:='附表'+inttostr(iname);
          if bdsl>1 then
            sName:=sName+'-'+inttostr(i4);
          i4:=i4+1
        end;
        if pos('评标价得分计算表',listview1.Items[I].Caption)>0 then
        begin
          if i5=1 then iname:=iname+1;
          sName:='附表'+inttostr(iname);
          if bdsl>1 then
            sName:=sName+'-'+inttostr(i5);
          i5:=i5+1
        end;
        if pos('综合得分汇总表',listview1.Items[I].Caption)>0 then
        begin
          if i6=1 then iname:=iname+1;
          sName:='附表'+inttostr(iname);
          if bdsl>1 then
            sName:=sName+'-'+inttostr(i6);
          i6:=i6+1
        end;
        if  listview1.Items[I].Caption='中标候选人' then
        begin
           iname:=iname+1;
           sName:='附表'+inttostr(iname);
        end;
        if  listview1.Items[I].Caption='委员会名单' then
        begin
          //iname:=iname+1;
          sName:='';//'附表'+inttostr(iname);
        end;
        if  listview1.Items[I].Caption='评标监督小组名单' then
        begin
          //iname:=iname+1;
          sName:='';//'附表'+inttostr(iname);
        end;







      end;
      if cell1.GetTotalSheets=1 then
      begin
        if  listview1.Items[I].Caption='业主标底' then
          cell1.SetCellString(11,2,0,sname)
        else
          cell1.SetCellString(cell1.GetCols(0)-1,4,0,sname);
        if checkbox1.Checked then
        begin
          if com_zhaobiao.text='施工' then
            cell1.PrintSetHead('',
              '                                                                                                '
              +xmbdgc.XM_NAME+xmbdgc.GCLX_NAME
              +'                                                                                                '
              ,'')
          else
            cell1.PrintSetHead('',
              '                                                                                                '
              +xmbdgc.XM_NAME
              +'                                                                                                '
              ,'');
          Cell1.PrintSetHeaderFont(Cell1.FindFontIndex('宋体',1),8,8,RGB(0, 0, 0));
        end;
        cell1.printsetfoot('',inttostr(isheet),'');
        cell1.PrintSetAlign(1,1);
        cell1.PrintSheet(0,0);
        //cell1.PrintPreview(0,0);
        isheet:=isheet+1;
      end
      else
      begin
        for j:=0 to cell1.GetTotalSheets-1 do
        begin
          if  listview1.Items[I].Caption='业主标底' then
            cell1.SetCellString(11,2,j,sname+'-'+inttostr(j+1))
          else
            cell1.SetCellString(cell1.GetCols(j)-1,4,j,sname+'-'+inttostr(j+1));
          if checkbox1.Checked then
          begin
            if com_zhaobiao.text='施工' then
              cell1.PrintSetHead('',
                '                                                                                                '
                +xmbdgc.XM_NAME+xmbdgc.GCLX_NAME
                +'                                                                                                '
                ,'')
            else
              cell1.PrintSetHead('',
                '                                                                                                '
                +xmbdgc.XM_NAME
                +'                                                                                                '
                ,'');
            Cell1.PrintSetHeaderFont(Cell1.FindFontIndex('宋体',1),8,8,RGB(0, 0, 0));
          end;
          cell1.PrintSetAlign(1,1);
          cell1.printsetfoot('',inttostr(isheet),'');
          cell1.PrintSheet(0,j);
          //cell1.PrintPreview(0,j);
          isheet:=isheet+1;
        end;
      end;
    end;
  finally
    freeandnil(cell1);
  end;
end;

procedure Tf_zhongbiaobg.SpeedButton2Click(Sender: TObject);
var
  listitem:tlistitem;
begin
  inherited;
  listitem:=listview2.Items.Add;
  listitem.Caption:=listview1.Selected.Caption;
  listview1.DeleteSelected;
end;

procedure Tf_zhongbiaobg.SpeedButton3Click(Sender: TObject);
var
  listitem:tlistitem;
begin
  inherited;
  listitem:=listview1.Items.Add;
  listitem.Caption:=listview2.Selected.Caption;
  listview2.DeleteSelected;
end;

procedure Tf_zhongbiaobg.BitBtn1Click(Sender: TObject);
var
  XMLFile:TXMLDocument;
  RootNode,ChildNode,TempNode,TempSubNode:IXMLNode;
  VCLZip: TVCLZip;
  i:Integer;
begin
  inherited;
  if not IsExistsPath then exit;
  if application.MessageBox('是否要上传该报表','请确定',MB_YESNO)<>Idyes then
     exit;
  if not DirectoryExists(GetFilePath) then
    CreateDir(GetFilePath);
  if not fileexists(GetFilePath+'Post.XML') then
  begin
     CopyFile(Pchar(sPath+'report\File\Post.XML'),Pchar(GetFilePath+'Post.XML'),false);
  end;
  MakeXmlFile(xmbdgc.XM_NAME,xmbdgc.BDLX_NAME,xmbdgc.GCLX_NAME,
      GetFilePath+'Post.XML');
  
  if fileexists(GetFilePath+'Post.zip') then
  begin
    DeleteFile(GetFilePath+'Post.zip');
  end;
  VCLZip:=TVCLZip.Create(application);
  try
    VCLZip.RootDir := GetFilePath;
    VCLZip.ZipName := GetFilePath+'Post.zip';

    XMLFile:= TXMLDocument.Create(application);
    try
      XMLFile.LoadFromFile(GetFilePath+'Post.XML');
      RootNode := xmlFile.DocumentElement;
      ChildNode:= GetChildNodeByName(RootNode, 'REPORT');
      TempNode := GetChildNodeByName(ChildNode, 'PINGBIAOSHOUBIAO');
      if TempNode<>Nil then
      begin
        TempNode.ChildNodes.Clear;
        for i:=0 to listview1.Items.Count-1 do
        begin
          TempSubNode := TempNode.AddChild('ROW');
          TempSubNode.Attributes['NAME'] := listview1.Items[i].Caption;
          TempSubNode.Attributes['PATH'] := copy(OpenFilePath(listview1.Items[i].Caption),Length(GetFilePath)+1,
             Length(OpenFilePath(listview1.Items[i].Caption))-Length(GetFilePath));
          VCLZip.FilesList.Add(OpenFilePath(listview1.Items[i].Caption));
        end;
      end;
      XMLFile.SaveToFile(GetFilePath+'Post.XML')
    Finally
      FreeAndNil(XMLFile);
    end;

    VCLZip.FilesList.Add(GetFilePath+'Post.xml');
    VCLZip.Zip;
  Finally
    FreeAndNil(VCLZip);
  end;
  frm_up_report:=Tfrm_up_report.create(nil);
  try
    frm_up_report.up_id:='401';
    frm_up_report.Edt_path.Text:=GetFilePath+'Post.zip';
    frm_up_report.showmodal;
  finally
    Freeandnil(frm_up_report);
  end;
end;


procedure Tf_zhongbiaobg.BitBtn2Click(Sender: TObject);
var
  cell1:TCell;
begin
  inherited;
  cell1:=tcell.Create(nil);
  try
    Cell1.OpenFile(OpenFilePath(listview1.Selected.Caption),'');
    cell1.PrintSetAlign(1,1);
    cell1.PrintPreview(0,0);
    cell1.closefile;
  finally
    freeandnil(cell1);
  end;
end;

end.

⌨️ 快捷键说明

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