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

📄 unit_qingbiao.pas

📁 招投标软件代码,很有应用价值,请大家参考下哦,不明白的地方给我留言
💻 PAS
📖 第 1 页 / 共 5 页
字号:
      adoquery:=tadoquery.Create(nil);
      try
        adoquery.Close;
        adoquery.Connection:=datamodule1.ADOMainConn;
        adoquery.SQL.Text:='select a.bd_isbn,a.dw_name,sjjishu_1,sjjishu_2,sjjishu_3,sjjishu_4,sjjishu_5,sjjishu_6,'
            +'sjjishu_7,sjjishu_8,sjjishu_9 from bid_sj_jishu a,bid_sj_qingbiao b where'
            +' a.bd_isbn=b.bd_isbn and a.dw_name=b.dw_name and a.bd_isbn in'
            +' (select bd_isbn from bid_biaoduan_xinxi where 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 bd_name='''+trim(com_leibie.Text)+''')'
            +' order by sj_xuhao';
        adoquery.Open;
        if adoquery.RecordCount>0 then
        begin
          if adoquery.RecordCount<(Cell1.GetCols(0)-3) then
          begin
            cell1.DeleteCol(4,Cell1.GetCols(0)-3-adoquery.RecordCount,0);
          end;
          adoquery.First;
          for i:=0 to adoquery.RecordCount-1 do
          begin
            cell1.SetCellString(i+3,6,0,adoquery.fieldbyname('dw_name').AsString);
            cell1.SetCellString(i+3,7,0,adoquery.fieldbyname('sjjishu_1').AsString);
            cell1.SetCellString(i+3,8,0,adoquery.fieldbyname('sjjishu_2').AsString);
            cell1.SetCellString(i+3,9,0,adoquery.fieldbyname('sjjishu_3').AsString);
            cell1.SetCellString(i+3,10,0,adoquery.fieldbyname('sjjishu_4').AsString);
            cell1.SetCellString(i+3,11,0,adoquery.fieldbyname('sjjishu_5').AsString);
            cell1.SetCellString(i+3,12,0,adoquery.fieldbyname('sjjishu_6').AsString);
            cell1.SetCellString(i+3,13,0,adoquery.fieldbyname('sjjishu_7').AsString);
            cell1.SetCellString(i+3,14,0,adoquery.fieldbyname('sjjishu_8').AsString);
            cell1.SetCellString(i+3,15,0,adoquery.fieldbyname('sjjishu_9').AsString);
            cell1.SetCellString(i+3,16,0,'√');
            for j:=7 to 15 do
            begin
              if cell1.GetCellString(i+3,j,0)='×' then
              begin
                cell1.SetCellString(i+3,16,0,'×');
                break;
              end;
            end;
            adoquery.Next;
          end;
        end;
      finally
        freeAndNil(adoquery);
      end;
    end
    else if com_project.ItemIndex=2 then
    begin
      if cell1.OpenFile(SPATH+'report\sheji\pingbiao\baojiaqd.cll','')<>1 then
      begin
        showmessage('文件打开错误');
        exit;
      end;
      cell1.ShowSideLabel(0, 0); //不显示行标
      adoquery:=tadoquery.Create(nil);
      try
        adoquery.Close;
        adoquery.Connection:=datamodule1.ADOMainConn;
        adoquery.SQL.Text:='select a.bd_isbn,a.dw_name,sjbj_1,sjbj_2,sjbj_3'
            +' from bid_sj_baojia a,bid_sj_qingbiao b where'
            +' a.bd_isbn=b.bd_isbn and a.dw_name=b.dw_name and a.bd_isbn in'
            +' (select bd_isbn from bid_biaoduan_xinxi where 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 bd_name='''+trim(com_leibie.Text)+''')'
            +' order by sj_xuhao';
        adoquery.Open;
        if adoquery.RecordCount>0 then
        begin
          if adoquery.RecordCount<(Cell1.GetCols(0)-3) then
          begin
            cell1.DeleteCol(4,Cell1.GetCols(0)-3-adoquery.RecordCount,0);
          end;
          adoquery.First;
          for i:=0 to adoquery.RecordCount-1 do
          begin
            cell1.SetCellString(i+3,5,0,adoquery.fieldbyname('dw_name').AsString);
            cell1.SetCellString(i+3,6,0,adoquery.fieldbyname('sjbj_1').AsString);
            cell1.SetCellString(i+3,7,0,adoquery.fieldbyname('sjbj_2').AsString);
            cell1.SetCellString(i+3,8,0,adoquery.fieldbyname('sjbj_3').AsString);
            cell1.SetCellString(i+3,9,0,'√');
            for j:=6 to 8 do
            begin
              if cell1.GetCellString(i+3,j,0)='×' then
              begin
                cell1.SetCellString(i+3,9,0,'×');
                break;
              end;
            end;
            adoquery.Next;
          end;
        end;
      finally
        freeandnil(adoquery);
      end;
    end
    else if com_project.ItemIndex=3 then
    begin
      if cell1.OpenFile(SPATH+'report\sheji\pingbiao\pbdefen.cll','')<>1 then
      begin
        showmessage('文件打开错误');
        exit;
      end;
      cell1.ShowTopLabel(0, 0);  //不显示列标
      adoquery:=tadoquery.Create(nil);
      try
        adoquery.Close;
        adoquery.Connection:=datamodule1.ADOMainConn;
        adoquery.SQL.Text:='select sj_xuhao,dw_name,sj_youhuibj,sj_suanshubj from bid_sj_qingbiao where'
            +' sj_jishu=1 and sj_baojia=1 and bd_isbn in'
            +' (select bd_isbn from bid_biaoduan_xinxi where 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 bd_name='''+trim(com_leibie.Text)+''')'
            +' order by sj_xuhao';
        adoquery.Open;
        if adoquery.RecordCount>0 then
        begin
          if adoquery.RecordCount<cell1.GetRows(0)-7 then
          begin
            cell1.DeleteRow(7,cell1.GetRows(0)-7-adoquery.RecordCount,0);
          end;
          dpingjun:=0;
          for i:=0 to adoquery.RecordCount-1 do
          begin
            if adoquery.FieldByName('sj_suanshubj').AsString<>'' then
              dpingjun:=dpingjun+adoquery.FieldByName('sj_suanshubj').AsFloat;
            adoquery.next;
          end;
          if dpingjun>0 then
            dpingjun:=dpingjun/adoquery.RecordCount;
          adoquery.First;
          for i:=0 to adoquery.RecordCount-1 do
          begin
            cell1.SetCellString(1,i+6,0,adoquery.fieldbyname('sj_xuhao').AsString);
            cell1.SetCellString(2,i+6,0,adoquery.fieldbyname('dw_name').AsString);
            cell1.SetCellString(3,i+6,0,adoquery.fieldbyname('sj_youhuibj').AsString);
            if (i=0) and (dpingjun>0) then
               cell1.SetCellString(5,6,0,floattostr(Rround(dpingjun,0)));
            if adoquery.FieldByName('sj_suanshubj').AsString<>'' then
            begin
              cell1.SetCellString(4,i+6,0,adoquery.fieldbyname('sj_suanshubj').AsString);
              cell1.SetCellString(6,i+6,0,
                floattostr(Rround(((adoquery.FieldByName('sj_suanshubj').AsFloat-dpingjun)/dpingjun),4)*100));
              if adoquery.FieldByName('sj_suanshubj').AsFloat<dpingjun then
                cell1.SetCellString(7,i+6,0,'10')
              else
              begin
                cell1.SetCellString(7,i+6,0,
                   Floattostr(Rround(10*dpingjun/(adoquery.FieldByName('sj_suanshubj').AsFloat),3)));
              end;
            end;
            adoquery.Next;
          end;   
        end;
      finally
        freeandnil(adoquery);
      end;
    end;
  end;
end;

procedure TFrm_qingbiao.Com_LeibieChange(Sender: TObject);
begin
  inherited;
  com_zhuanjia.Text:='请选择';
  loadsource;
end;

procedure TFrm_qingbiao.Com_xmnameChange(sender:Tobject);
begin
  inherited;
  if (Com_zhaoBiao.Items.IndexOf(Com_zhaoBiao.text)<0)
      or (Com_Gclxname.Items.IndexOf(Com_Gclxname.text)<0) then exit;
  getbiaoduan;
end;

procedure TFrm_qingbiao.Com_zhaoBiaoChange(Sender:Tobject);
begin
  inherited;
  getinfor;
  if (com_xmname.Items.IndexOf(com_xmname.text)<0)
      or (Com_Gclxname.Items.IndexOf(Com_Gclxname.text)<0) then exit;
  getbiaoduan;
end;

procedure TFrm_qingbiao.Com_GclxnameChange(Sender: TObject);
begin
  inherited;
  if (com_xmname.Items.IndexOf(com_xmname.text)<0)
      or (Com_zhaoBiao.Items.IndexOf(Com_zhaoBiao.text)<0) then exit;
  getbiaoduan;
end;

procedure TFrm_qingbiao.com_projectchange(sender:tobject);
begin
  inherited;
  com_zhuanjia.visible:=false;
  btn_xiangxi.Left:=384;
  if com_zhaobiao.Text='施工' then
  begin
    if com_project.ItemIndex=0 then
    begin
      btn_xiangxi.visible:=true;
      btn_xiangxi.Caption:='审核';
      com_leibie.Visible:=true;
    end
    else if (com_project.ItemIndex=1) or (com_project.itemindex=2) then
    begin
      com_leibie.visible:=true;
      btn_xiangxi.visible:=false;
    end
    else if com_project.ItemIndex=3 then
    begin
      com_leibie.Visible:=false;
      btn_xiangxi.Left:=com_leibie.Left;
      btn_xiangxi.Visible:=true;
      btn_xiangxi.Caption:='得到数据';
      loadsource;
    end
    else
    begin
      com_leibie.Visible:=true;
      btn_xiangxi.Visible:=true;
      btn_xiangxi.Caption:='得到数据';
    end;
  end
  else if com_zhaobiao.Text='监理' then
  begin
    if com_project.ItemIndex=0 then
    begin
      btn_xiangxi.Visible:=true;
      btn_xiangxi.Caption:='得到数据';
    end
    else if  com_project.ItemIndex=1 then
    begin
      btn_xiangxi.Visible:=false;
    end
    else if  com_project.ItemIndex=2 then
    begin
      btn_xiangxi.Visible:=true;
      btn_xiangxi.Caption:='得到数据';
    end
    else if  com_project.ItemIndex=3 then
    begin
      btn_xiangxi.Visible:=true;
      btn_xiangxi.Caption:='得到数据';
      com_zhuanjia.Text:='请选择';
      com_zhuanjia.Visible:=true;
      com_zhuanjia.Left:=384;
      btn_xiangxi.Left:=505;
      com_zhuanjia.Items.Add('招标办评分');
      com_zhuanjia.Items.Add('专家一评分');
      com_zhuanjia.Items.Add('专家二评分');
      com_zhuanjia.Items.Add('专家三评分');
      com_zhuanjia.Items.Add('专家四评分');
      com_zhuanjia.Items.Add('专家五评分');
      com_zhuanjia.Items.Add('专家六评分');
      com_zhuanjia.Items.Add('专家七评分');
      com_zhuanjia.Items.Add('总得分');
    end
    else if  com_project.ItemIndex=4 then
    begin
      btn_xiangxi.Visible:=false;
    end;
  end
  else if com_zhaobiao.text='设计' then
  begin
    if com_project.ItemIndex=0 then
    begin
      btn_xiangxi.Visible:=true;
      btn_xiangxi.Caption:='得到数据';
    end
    else if com_project.ItemIndex=1 then
    begin
      btn_xiangxi.Visible:=true;
      btn_xiangxi.Caption:='得到数据';
      com_zhuanjia.Text:='请选择';
      com_zhuanjia.Visible:=true;
      com_zhuanjia.Left:=384;
      btn_xiangxi.Left:=505;
      com_zhuanjia.Items.Clear;
      com_zhuanjia.Items.Add('招标办评分');
      com_zhuanjia.Items.Add('专家一评分');
      com_zhuanjia.Items.Add('专家二评分');
      com_zhuanjia.Items.Add('专家三评分');
      com_zhuanjia.Items.Add('专家四评分');
      com_zhuanjia.Items.Add('专家五评分');
      com_zhuanjia.Items.Add('专家六评分');
      com_zhuanjia.Items.Add('专家七评分');
    end
    else if com_project.ItemIndex=2 then
    begin
      btn_xiangxi.Visible:=true;
      btn_xiangxi.Caption:='得到数据';
    end
    else if com_project.ItemIndex=3 then
    begin
      btn_xiangxi.Visible:=false;
    end
  end;
  com_leibie.Text:='请选择';
end;

procedure TFrm_qingbiao.com_zhuanjianChange(Sender:Tobject);
var
  adoquery:tadoquery;
  i,j:Integer;
begin
  if not IsExistsPath then exit;
  if (com_project.ItemIndex<0) or (com_leibie.ItemIndex<0) then exit;
  if com_zhaobiao.text='监理' then
  begin
    if cell1.OpenFile(SPATH+'report\jianli\pingbiao\jsjyspfhz.cll','')=0 then

⌨️ 快捷键说明

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