📄 unit_xiangxi.pas
字号:
procedure Edit10Exit(Sender: TObject);
procedure CheckBox8Click(Sender: TObject);
procedure Edit11Exit(Sender: TObject);
procedure CheckBox6Click(Sender: TObject);
procedure CheckBox7Click(Sender: TObject);
procedure RadioButton9Click(Sender: TObject);
procedure Edit3Exit(Sender: TObject);
procedure Edit2Exit(Sender: TObject);
procedure Edit1Exit(Sender: TObject);
procedure Edit4Exit(Sender: TObject);
procedure Edit18Exit(Sender: TObject);
procedure Edit19Exit(Sender: TObject);
procedure Edit20Exit(Sender: TObject);
procedure GetInfro(SENDER:TOBJECT);
procedure CheckBox9Click(Sender: TObject);
procedure CheckBox10Click(Sender: TObject);
procedure ComboBox1Select(Sender: TObject);
procedure Edit5KeyPress(Sender: TObject; var Key: Char);
procedure FormShow(Sender: TObject);//得到财务总分
procedure SaveSource; //保存数据
procedure PageControl1Change(Sender: TObject);
procedure Edit17Exit(Sender: TObject);
procedure ComboBox2Change(Sender: TObject);
procedure Edit26Exit(Sender: TObject);
procedure Edit27Exit(Sender: TObject);
procedure Edit29Exit(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure get_gcsinfor;
procedure Button2Click(Sender: TObject);
procedure RadioButton14Click(Sender: TObject);
procedure RadioButton25Click(Sender: TObject);
procedure Edit34Exit(Sender: TObject);
procedure ListView1SelectItem(Sender: TObject; Item: TListItem;
Selected: Boolean);
procedure BitBtn9Click(Sender: TObject);
private
{ Private declarations }
dropdown:Integer; //判断下拉框的状态,在回车后载入数据
iPageTab:Integer;//存储变化前的页码
public
{ Public declarations }
end;
var
Frm_Xiangxi: TFrm_Xiangxi;
implementation
uses
DataModule,SystemObject,DataAccessCommonShell,Unit_public;
{$R *.dfm}
procedure TFrm_Xiangxi.SaveSource;
var
adoquery:tadoquery;
s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14,s15:string;
begin
if trim(combobox1.Text)='' then exit;
adoquery:=tadoquery.Create(nil);
try
adoquery.Connection:=datamodule1.ADOMainConn;
adoquery.Close;
datamodule1.ADOMainConn.BeginTrans;
try
if ipagetab=0 then
begin
if (trim(edt_t.Text)='') or (trim(edt_w.Text)='') or (trim(edt_t.Text)='') or
(trim(edt_gsz.Text)='') or (trim(edt_zyzj.Text)='') or (trim(edt_syjz.Text)='')
or (trim(edt_xd.Text)='') then
begin
//showmessage('输入信息不完整');
datamodule1.ADOMainConn.RollbackTrans;
freeandnil(adoquery);
exit;
end;
adoquery.SQL.Text:='update bid_yushen_defen set ys_cw_cwsr='+trim(edt_w.Text)+',ys_cw_jzc='
+trim(edt_jzc.Text)+',ys_cw_wcgq='+trim(edt_t.Text)+',ys_cw_gsz='+trim(edt_gsz.Text)
+',ys_cw_zyzj='+trim(edt_zyzj.Text)+',ys_cw_syjz='+trim(edt_syjz.Text)
+',ys_cw_xdnl='+trim(edt_xd.Text)+',ys_caiwu='+trim(edt_caiwu.Text)
+',ys_caiwu_ms='''+trim(memo1.Text)+'''' //财务描述
+' from bid_yushen_defen a,bid_danwei_xinxi b,bid_xmgczb c where a.dw_id=b.dw_id '
+' and b.dw_name='''+trim(combobox1.Text)+''' and c.xm_isbn='''+trim(xmbdgc.XM_ISBn)
+''' and c.gclx_id='+xmbdgc.gCLX_ID+' and c.zblx_id='+xmbdgc.BDLX_ID
+' and a.xmgczb_id=c.xmgczb_id and a.bd_leibie='+getleibie(combobox2.text);
end;
if ipagetab=1 then
begin
if ((not RadioButton2.Checked) and (not RadioButton1.Checked)) or ((not RadioButton7.Checked) and (not RadioButton8.Checked))
or (trim(edit7.Text)='') or (trim(edit8.Text)='') or (trim(edit9.Text)='') or (trim(edit10.Text)='') or
(trim(edit11.Text)='') or ((not RadioButton9.Checked) and (not RadioButton10.Checked) and (not RadioButton11.Checked))
or ((not RadioButton21.Checked) and (not RadioButton22.Checked)) then
begin
//showmessage('输入信息不完整');
datamodule1.ADOMainConn.RollbackTrans;
freeandnil(adoquery);
exit;
end;
if RadioButton1.Checked then s1:='3';
if RadioButton2.Checked then s1:='1';
if RadioButton7.Checked then s2:='1';
if radiobutton8.Checked then s2:='2';
if not checkbox1.Checked then s3:='0';
if checkbox1.Checked then s3:='2';
if not checkbox2.Checked then s4:='0';
if checkbox2.Checked then s4:='1';
if not checkbox3.Checked then s5:='0';
if checkbox3.Checked then s5:='2';
if not checkbox4.Checked then s6:='0';
if checkbox4.Checked then s6:='1';
if not checkbox5.Checked then s7:='0';
if checkbox5.Checked then s7:='3';
if not checkbox6.Checked then s8:='0';
if checkbox6.Checked then s8:='1';
if not checkbox7.Checked then s9:='0';
if checkbox7.Checked then s9:='1';
if not checkbox8.Checked then s10:='0';
if checkbox8.Checked then s10:='2';
if RadioButton9.Checked then s11:='1';
if RadioButton10.Checked then s11:='2';
if RadioButton11.Checked then s11:='3';
if RadioButton21.Checked then s12:='0';
if RadioButton22.Checked then s12:='1';
adoquery.SQL.Text:=' update bid_yushen_defen set ys_js_jg='+trim(s1)+',ys_js_dw='+trim(s2)
+',ys_js_jlqzx='+trim(s3)+',ys_js_jlcishu='+trim(edit7.Text)+',ys_js_jl='
+trim(s4)+',ys_gcs_jlqzx='+trim(s5)+',ys_gcs_jlcishu='+trim(edit8.Text)
+',ys_gcs_jl='+trim(s6)+',ys_js_qtqzx='+trim(s7)+',ys_js_qtgjzc='+trim(edit9.Text)
+',ys_js_qtgcs='+trim(edit10.Text)+',ys_sb_qzx='+trim(s10)+',ys_sb_sl='+trim(edit11.Text)
+',ys_sbqzx='+trim(s8)+',ys_sbfhx='+trim(s9)+', ys_sb_nx='+trim(s11)+',ys_sb_ly='+trim(s12)
+',ys_jishu_ms='''+trim(memo2.Text)+'''' //技术描述
+',ys_jishu='+trim(edt_jishu.Text)+' from bid_yushen_defen a,bid_danwei_xinxi b,bid_xmgczb c where a.dw_id=b.dw_id '
+' and b.dw_name='''+trim(combobox1.Text)+''' and c.xm_isbn='''+trim(xmbdgc.XM_ISBn)
+''' and c.gclx_id='+xmbdgc.gCLX_ID+' and c.zblx_id='+xmbdgc.BDLX_ID
+' and a.xmgczb_id=c.xmgczb_id and a.bd_leibie='+getleibie(combobox2.text);
end;
if ipagetab=2 then
begin
if (trim(edit1.text)='') or (trim(edit2.text)='') or (trim(edit3.text)='') or (trim(edit4.text)='')
or ((not RadioButton5.Checked) and (not RadioButton6.Checked) and (not RadioButton27.Checked)) then
begin
//showmessage('输入信息不完整');
datamodule1.ADOMainConn.RollbackTrans;
freeandnil(adoquery);
exit;
end;
if CheckBox9.Checked then s1:='2'
else s1:='0';
{if checkbox10.Checked then s2:='1'
else s2:='0'; }
if RadioButton4.Checked then s2:='2';
if radiobutton3.Checked then s2:='3';
if RadioButton27.Checked then s3:='0';
if RadioButton5.Checked then s3:='1';
if RadioButton6.Checked then s3:='2';
adoquery.SQL.Text:=' update bid_yushen_defen set ys_jy_htd='+trim(edit3.Text)+',ys_jy_ylp='
+trim(edit2.Text)+',ys_jy_lshtd='+trim(edit1.Text)+',ys_jy_yl='+trim(edit4.Text)
+',ys_jy_sbj='+trim(s1)+',ys_jy_jiang='+trim(s2)+',ys_jy_qydj='+trim(s3)+',ys_jingyan='+trim(edit16.text)
+',ys_jingyan_ms='''+trim(memo3.Text)+'''' //经验描述
+' from bid_yushen_defen a,bid_danwei_xinxi b,bid_xmgczb c where a.dw_id=b.dw_id '
+' and b.dw_name='''+trim(combobox1.Text)+''' and c.xm_isbn='''+trim(xmbdgc.XM_ISBn)
+''' and c.gclx_id='+xmbdgc.gCLX_ID+' and c.zblx_id='+xmbdgc.BDLX_ID
+' and a.xmgczb_id=c.xmgczb_id and a.bd_leibie='+getleibie(combobox2.text);
end;
if ipagetab=3 then
begin
if (trim(edit17.text)='') or (trim(edit18.text)='') or (trim(edit19.text)='') or (trim(edit20.text)='')
or ((not RadioButton12.Checked) and (not RadioButton13.Checked)) then
begin
//showmessage('输入信息不完整');
datamodule1.ADOMainConn.RollbackTrans;
freeandnil(adoquery);
exit;
end;
if RadioButton12.Checked then s1:='2';
if RadioButton13.Checked then s1:='1';
adoquery.SQL.Text:='if (select COUNT(*) from bid_ys_jl where dw_id in (select dw_id from bid_danwei_xinxi where dw_name='''+trim(combobox1.Text)
+''') 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(combobox2.Text)+'''))>0 begin '
+' update bid_ys_jl set ysjl_gcjy='+trim(edit17.Text)+',ysjl_xcjy='+trim(edit18.Text)+',ysjl_jlnx='+trim(edit19.Text)
+',ysjl_gczl='+trim(edit20.Text)+',ysjl_hjqk='+trim(s1)+',ysjl_jy_ms='''+trim(memo4.Text)
+''',ysjl_jingyan='+trim(edit25.text)+' where dw_id in (select dw_id from bid_danwei_xinxi where dw_name='''+trim(combobox1.Text)
+''') 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(combobox2.Text)+''')'
+' end else begin'
+' insert into bid_ys_jl(DW_ID,BD_ISBN,ysjl_gcjy,ysjl_xcjy,ysjl_jlnx,ysjl_gczl,ysjl_hjqk,ysjl_jy_ms,ysjl_jingyan) select dw_Id,bd_isbn,'
+trim(edit17.Text)+','+ trim(edit18.Text)+','+trim(edit19.Text)+','+trim(edit20.Text)+','+trim(s1)
+','''+trim(memo4.Text)+''','+trim(edit25.Text)+' from bid_danwei_xinxi ,bid_biaoduan_xinxi where dw_name='''+trim(combobox1.Text)
+''' and 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(combobox2.Text)+''' end';
end;
if ipagetab=4 then
begin
if ((not RadioButton15.Checked) and (not RadioButton14.Checked)) or ((not RadioButton16.Checked) and (not RadioButton17.Checked))
or(trim(edit34.Text)='') or (trim(edit35.Text)='') or (trim(edit36.Text)='') or (trim(edit37.Text)='') or(trim(edit38.Text)='') or
(trim(edit39.Text)='') or ((not RadioButton18.Checked) and (not RadioButton19.Checked) and (not RadioButton20.Checked))
or ((not RadioButton23.Checked) and (not RadioButton24.Checked)) or (trim(edit42.Text)='')
or (trim(edit43.Text)='') then
begin
//showmessage('输入信息不完整');
datamodule1.ADOMainConn.RollbackTrans;
freeandnil(adoquery);
exit;
end;
if RadioButton14.Checked then s1:='5';
if RadioButton15.Checked then s1:='3';
if RadioButton16.Checked then s2:='1';
if RadioButton17.Checked then s2:='3';
if checkbox11.Checked then s3:='6';
if not checkbox11.Checked then s3:='0';
if checkbox10.Checked then s4:='1';
if not checkbox10.Checked then s4:='0';
if checkbox12.Checked then s5:='1';
if not checkbox12.Checked then s5:='0';
if checkbox13.Checked then s6:='3';
if not checkbox13.Checked then s6:='0';
if checkbox14.Checked then s7:='1';
if not checkbox14.Checked then s7:='0';
if checkbox15.Checked then s8:='2';
if not checkbox15.Checked then s8:='0';
if checkbox16.Checked then s9:='2';
if not checkbox16.Checked then s9:='0';
if checkbox17.Checked then s10:='1';
if not checkbox17.Checked then s10:='0';
if RadioButton25.Checked then s11:='1';
if RadioButton26.Checked then s11:='3';
if RadioButton18.Checked then s13:='2';
if RadioButton19.Checked then s13:='1';
if RadioButton20.Checked then s13:='0.5';
if RadioButton23.Checked then s14:='2';
if RadioButton24.Checked then s14:='1';
if checkbox21.Checked then s15:='6';
if not checkbox21.Checked then s15:='0';
adoquery.SQL.Text:='if (select COUNT(*) from bid_ys_jl where dw_id in (select dw_id from bid_danwei_xinxi where dw_name='''+trim(combobox1.Text)
+''') 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(combobox2.Text)+'''))>0 begin '
+''
+' update bid_ys_jl set ysjl_jigou='+trim(s1)+',ysjl_duiwu='+trim(s2)+',ysjl_zg_qzx='+trim(s3)+',ysjl_zg_cs='+trim(edit34.Text)
+',ysjl_zg_gj='+trim(s4)+',ysjl_fzg_qzx='+trim(s6)+',ysjl_fzg_cs='+(edit35.Text)+',ysjl_fzg_gj='+trim(s5)+',ysjl_zr_qzx='+trim(s8)
+',ysjl_zr_cs='+trim(edit36.Text)+',ysjl_fzr_qzx='+trim(s7)+',ysjl_fzr_cs='+trim(edit37.text)+',ysjl_gcs_qzx='+trim(s9)
+',ysjl_gcs_cs='+trim(edit38.Text)+',ysjl_jly_qzx='+trim(s10)+',ysjl_jly_cs='+trim(edit39.Text)+',ysjl_zdgcs_qzx='
+trim(s15)+',ysjl_zdgcs_xmdf='+trim(edit42.Text)+',ysjl_zdgcs_ggdf='+trim(edit43.Text)+',ysjl_sb_sl='
+trim(s11)+',ysjl_sb_nx='+trim(s13)+',ysjl_sb_ly='+trim(s14)
+',ysjl_js_ms='''+trim(memo5.Text)+''',ysjl_jishu='+trim(edit47.Text)
+' where dw_id in (select dw_id from bid_danwei_xinxi where dw_name='''+trim(combobox1.Text)
+''') 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(combobox2.Text)+''') '
+' end else begin '
+' insert into bid_ys_jl(DW_ID,BD_ISBN,ysjl_jigou,ysjl_duiwu,ysjl_zg_qzx,ysjl_zg_cs,ysjl_zg_gj,ysjl_fzg_qzx,ysjl_fzg_cs,ysjl_fzg_gj,'
+'ysjl_zr_qzx,ysjl_zr_cs,ysjl_fzr_qzx,ysjl_fzr_cs,ysjl_gcs_qzx,ysjl_gcs_cs,ysjl_jly_qzx,ysjl_jly_cs,ysjl_zdgcs_qzx,ysjl_zdgcs_xmdf,'
+'ysjl_zdgcs_ggdf,ysjl_sb_sl,ysjl_sb_nx,ysjl_sb_ly,ysjl_js_ms,ysjl_jishu)'
+' select dw_Id,bd_isbn,'+trim(s1)+','+trim(s2)+','+trim(s3)+','+trim(edit34.Text)+','+trim(s4)+','+trim(s6)+','
+(edit35.Text)+','+trim(s5)+','+trim(s8)+','+trim(edit36.Text)+','+trim(s7)+','+trim(edit37.text)+','+trim(s9)
+','+trim(edit38.Text)+','+trim(s10)+','+trim(edit39.Text)+','+trim(s15)+','+trim(edit42.Text)+','+trim(edit43.Text)+','
+trim(s11)+','+trim(s13)+','+trim(s14)+','''+trim(memo5.Text)+''','+trim(edit47.Text)
+' from bid_danwei_xinxi ,bid_biaoduan_xinxi where dw_name='''+trim(combobox1.Text)
+''' and 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(combobox2.Text)+''' end ';
end;
if ipagetab=5 then
begin
if (trim(edit26.Text)='') or (trim(edit27.Text)='') or (trim(edit28.Text)='') or (trim(edit29.Text)='') or (trim(edit30.Text)='') then
begin
//showmessage('输入信息不完整');
datamodule1.ADOMainConn.RollbackTrans;
freeandnil(adoquery);
exit;
end;
adoquery.SQL.Text:='if (select COUNT(*) from bid_ys_jl where dw_id in (select dw_id from bid_danwei_xinxi where dw_name='''+trim(combobox1.Text)
+''') 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(combobox2.Text)+'''))>0 begin '
+' update bid_ys_jl set ysjl_w='+trim(edit26.Text)+',ysjl_v='+trim(edit27.Text)+',ysjl_t='+trim(edit28.Text)
+',ysjl_jzc='+trim(edit29.Text)+',ysjl_syjz='+trim(edit30.Text)+',ysjl_cw_ms='''+trim(memo6.Text)
+''',ysjl_caiwu='+trim(edit33.text)+' where dw_id in (select dw_id from bid_danwei_xinxi where dw_name='''+trim(combobox1.Text)
+''') 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(combobox2.Text)+''')'
+' end else begin'
+' insert into bid_ys_jl(DW_ID,BD_ISBN,ysjl_w,ysjl_v,ysjl_t,ysjl_jzc,ysjl_syjz,ysjl_cw_ms,ysjl_caiwu) select dw_Id,bd_isbn,'
+trim(edit26.Text)+','+ trim(edit27.Text)+','+trim(edit28.Text)+','+trim(edit29.Text)+','+trim(edit30.Text)
+','''+trim(memo6.Text)+''','+trim(edit33.text)+' from bid_danwei_xinxi ,bid_biaoduan_xinxi where dw_name='''+trim(combobox1.Text)
+''' and 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(combobox2.Text)+''' end';
end;
adoquery.ExecSQL;
datamodule1.ADOMainConn.CommitTrans;
except
datamodule1.ADOMainConn.RollbackTrans;
end;
finally
FreeAndNil(adoquery);
end;
end;
procedure TFrm_Xiangxi.getDw_name;
var
adoquery:tadoquery;
i:Integer;
begin
adoquery:=tadoquery.create(nil);
try
//获得申请人单位名称
adoquery.Connection:=datamodule1.ADOMainConn;
adoquery.Close;
adoquery.sql.Text:=' select a.dw_name from bid_danwei_xinxi a,bid_wenjian2 b,bid_xmgczb c where b.wj2_leixing=1 and a.dw_id=b.dw_id '
// +' and b.wj2_qzx=1
+' and b.xmgczb_id=c.xmgczb_id and c.xm_isbn='''+trim(xmbdgc.XM_ISBn)
+''' and c.gclx_id='+xmbdgc.gCLX_ID+' and c.zblx_id='+xmbdgc.BDLX_ID+' and a.dw_name like ''%'+trim(combobox1.Text)
+'%''';
if (com_zhaobiao.Text='施工') and (combobox2.Items.IndexOf(combobox2.Text)>=0) then
adoquery.SQL.Text:=adoquery.SQL.Text+' and wj2_leibie='+getleibie(combobox2.Text)
else if (com_zhaobiao.Text='监理') and (combobox2.items.indexof(combobox2.text)>=0) then
adoquery.SQL.Text:=adoquery.SQL.Text+' and b.bd_isbn in (select bd_isbn from bid_biaoduan_xinxi where xmgczb_id=b.xmgczb_id and'
+' bd_name='''+trim(combobox2.Text)+''')';
adoquery.SQL.Text:=adoquery.SQL.text+' order by dwbm_id';
adoquery.Open;
adoquery.First;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -