📄 unit_xiangxi.pas
字号:
if adoquery.fieldbyname('ys_js_dw').AsInteger=1 then RadioButton7.Checked:=true
else if adoquery.fieldbyname('ys_js_dw').AsInteger=2 then RadioButton8.Checked:=true
else
begin
RadioButton7.Checked:=false;
RadioButton8.Checked:=false;
end;
if adoquery.fieldbyname('ys_js_jlqzx').AsInteger=2 then CheckBox1.Checked:=true;
if adoquery.fieldbyname('ys_js_jlqzx').AsInteger=0 then CheckBox1.Checked:=false;
edit7.Text:=adoquery.fieldbyname('ys_js_jlcishu').AsString;
if adoquery.fieldbyname('ys_js_jl').AsInteger=1 then CheckBox2.Checked:=true;
if adoquery.fieldbyname('ys_js_jl').AsInteger=0 then CheckBox2.Checked:=false;
if adoquery.fieldbyname('ys_gcs_jlqzx').AsInteger=2 then CheckBox3.Checked:=true;
if adoquery.fieldbyname('ys_gcs_jlqzx').AsInteger=0 then CheckBox3.Checked:=false;
edit8.Text:=adoquery.fieldbyname('ys_gcs_jlcishu').AsString;
if adoquery.fieldbyname('ys_gcs_jl').AsInteger=1 then CheckBox4.Checked:=true;
if adoquery.fieldbyname('ys_gcs_jl').AsInteger=0 then CheckBox4.Checked:=false;
if adoquery.fieldbyname('ys_js_qtqzx').AsInteger=3 then CheckBox5.Checked:=true;
if adoquery.fieldbyname('ys_js_qtqzx').AsInteger=0 then CheckBox5.Checked:=false;
edit9.Text:=adoquery.fieldbyname('ys_js_qtgjzc').AsString;
edit10.Text:=adoquery.fieldbyname('ys_js_qtgcs').AsString;
if adoquery.fieldbyname('ys_sb_qzx').AsInteger=2 then CheckBox8.Checked:=true;
if adoquery.fieldbyname('ys_sb_qzx').AsInteger=0 then CheckBox8.Checked:=false;
edit11.Text:=adoquery.fieldbyname('ys_sb_sl').AsString;
if adoquery.fieldbyname('ys_sbqzx').AsInteger=1 then CheckBox6.Checked:=true;
if adoquery.fieldbyname('ys_sbqzx').AsInteger=0 then CheckBox6.Checked:=false;
if adoquery.fieldbyname('ys_sbfhx').AsInteger=1 then CheckBox7.Checked:=true;
if adoquery.fieldbyname('ys_sbfhx').AsInteger=0 then CheckBox7.Checked:=false;
if adoquery.fieldbyname('ys_sb_nx').AsInteger=1 then RadioButton9.Checked:=true
else if adoquery.fieldbyname('ys_sb_nx').AsInteger=2 then RadioButton10.Checked:=true
else if adoquery.fieldbyname('ys_sb_nx').AsInteger=3 then RadioButton11.Checked:=true
else
begin
RadioButton9.Checked:=false;
RadioButton10.Checked:=false;
RadioButton11.Checked:=false;
end;
if adoquery.fieldbyname('ys_sb_ly').AsInteger=0 then RadioButton21.Checked:=true
else if adoquery.fieldbyname('ys_sb_ly').AsInteger=1 then RadioButton22.Checked:=true
else
begin
RadioButton21.Checked:=false;
RadioButton22.Checked:=false;
end;
memo2.Text:=adoquery.fieldbyname('ys_jishu_ms').AsString;
//加载第三页信息
edit3.Text:=adoquery.fieldbyname('ys_jy_htd').AsString;
edit2.Text:=adoquery.fieldbyname('ys_jy_ylp').AsString;
edit1.Text:=adoquery.fieldbyname('ys_jy_lshtd').AsString;
edit4.Text:=adoquery.fieldbyname('ys_jy_yl').AsString;
if adoquery.fieldbyname('ys_jy_sbj').AsInteger=2 then CheckBox9.Checked:=true;
if adoquery.fieldbyname('ys_jy_sbj').AsInteger=0 then CheckBox9.Checked:=false;
if adoquery.fieldbyname('ys_jy_jiang').AsInteger=3 then RadioButton3.Checked:=true
else if adoquery.fieldbyname('ys_jy_jiang').AsInteger=2 then RadioButton4.Checked:=true
else
begin
RadioButton3.Checked:=false;
RadioButton4.Checked:=false
end;
if adoquery.fieldbyname('ys_jy_qydj').AsInteger=0 then RadioButton27.Checked:=true
else if adoquery.fieldbyname('ys_jy_qydj').AsInteger=1 then RadioButton5.Checked:=true
else if adoquery.fieldbyname('ys_jy_qydj').AsInteger=2 then RadioButton6.Checked:=true
else
begin
RadioButton27.Checked:=false;
RadioButton5.Checked:=false;
RadioButton6.Checked:=false;
end;
memo3.Text:=adoquery.fieldbyname('ys_jingyan_ms').AsString;
//计算第一页分数
if (edt_w.Text<>'') and (edt_gsz.Text<>'') and (edt_t.Text<>'') then
getcwnl
else edt_CWNL.Text:='';
if (edt_jzc.Text<>'') and (edt_syjz.Text<>'') and (edt_gsz.Text<>'') then
gettbnl
else edt_tbNL.Text:='';
if (edt_zyzj.Text<>'') and (edt_xd.Text<>'') and (edt_gsz.Text<>'') then
getzjnl
else edt_zjnl.text:='';
if (trim(edt_zjnl.Text)<>'') or (trim(edt_tbnl.Text)<>'') or (trim(edt_cwnl.Text)<>'') then
begin
getcaiwu;
end
else
edt_caiwu.Text:='';
//计算第二页分数
Getrydf;
Getjxsb;
if RadioButton2.Checked then
RadioButton7Click(sender);
if RadioButton1.Checked then
RadioButton8Click(sender);
//计算第三页分数
Edit3Exit(sender);
EDIT2exit(sender);
edit1exit(sender);
GetZlHjXy;
end;
if com_zhaobiao.Text='监理' then
begin
adoquery.SQL.Text:='select * 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)+''')';
adoquery.Open;
//加载四页信息
edit17.Text:=adoquery.fieldbyname('ysjl_gcjy').AsString;
edit18.Text:=adoquery.fieldbyname('ysjl_xcjy').AsString;
edit19.Text:=adoquery.fieldbyname('ysjl_jlnx').AsString;
edit20.Text:=adoquery.fieldbyname('ysjl_gczl').AsString;
if adoquery.fieldbyname('ysjl_hjqk').AsInteger=2 then RadioButton12.Checked:=true;
if adoquery.fieldbyname('ysjl_hjqk').AsInteger=1 then RadioButton13.Checked:=true;
MEMO4.Text:=adoquery.fieldbyname('ysjl_jy_ms').AsString;
//计算第五页数据
if adoquery.FieldByName('ysjl_jigou').AsString='5' then RadioButton14.Checked:=true;
if adoquery.FieldByName('ysjl_jigou').AsString='3' then RadioButton15.Checked:=true;
if adoquery.FieldByName('ysjl_duiwu').AsString='1' then RadioButton16.Checked:=true;
if adoquery.FieldByName('ysjl_duiwu').AsString='3' then RadioButton17.Checked:=true;
if adoquery.FieldByName('ysjl_zg_qzx').AsString='6' then checkbox11.Checked:=true;
if adoquery.FieldByName('ysjl_zg_qzx').AsString='0' then checkbox11.Checked:=false;
edit34.Text:=adoquery.FieldByName('ysjl_zg_cs').AsString;
if adoquery.FieldByName('ysjl_zg_gj').AsString='1' then checkbox10.Checked:=true;
if adoquery.FieldByName('ysjl_zg_gj').AsString='0' then checkbox10.Checked:=false;
if adoquery.FieldByName('ysjl_fzg_qzx').AsString='3' then checkbox13.Checked:=true;
if adoquery.FieldByName('ysjl_fzg_qzx').AsString='0' then checkbox13.Checked:=false;
edit35.Text:=adoquery.FieldByName('ysjl_fzg_cs').AsString;
if adoquery.FieldByName('ysjl_fzg_gj').AsString='1' then checkbox12.Checked:=true;
if adoquery.FieldByName('ysjl_fzg_gj').AsString='0' then checkbox12.Checked:=false;
if adoquery.FieldByName('ysjl_zr_qzx').AsString='2' then checkbox15.Checked:=true;
if adoquery.FieldByName('ysjl_zr_qzx').AsString='0' then checkbox15.Checked:=false;
edit36.Text:=adoquery.FieldByName('ysjl_zr_cs').AsString;
if adoquery.FieldByName('ysjl_fzr_qzx').AsString='1' then checkbox14.Checked:=true;
if adoquery.FieldByName('ysjl_fzr_qzx').AsString='0' then checkbox14.Checked:=false;
edit37.Text:=adoquery.FieldByName('ysjl_fzr_cs').AsString;
if adoquery.FieldByName('ysjl_gcs_qzx').AsString='2' then checkbox16.Checked:=true;
if adoquery.FieldByName('ysjl_gcs_qzx').AsString='0' then checkbox16.Checked:=false;
edit38.Text:=adoquery.FieldByName('ysjl_gcs_cs').AsString;
if adoquery.FieldByName('ysjl_jly_qzx').AsString='1' then checkbox17.Checked:=true;
if adoquery.FieldByName('ysjl_jly_qzx').AsString='0' then checkbox17.Checked:=false;
edit39.Text:=adoquery.FieldByName('ysjl_jly_cs').AsString;
if adoquery.FieldByName('ysjl_sb_sl').AsString='1' then RadioButton25.checked:=true;
if adoquery.FieldByName('ysjl_sb_sl').AsString='3' then RadioButton26.Checked:=true;
if adoquery.FieldByName('ysjl_sb_nx').AsString='0.5' then RadioButton20.Checked:=true;
if adoquery.FieldByName('ysjl_sb_nx').AsString='1' then RadioButton19.Checked:=true;
if adoquery.FieldByName('ysjl_sb_nx').AsString='2' then RadioButton18.Checked:=true;
if adoquery.FieldByName('ysjl_sb_ly').AsString='1' then RadioButton24.Checked:=true;
if adoquery.FieldByName('ysjl_sb_ly').AsString='2' then RadioButton23.Checked:=true;
if adoquery.FieldByName('ysjl_zdgcs_qzx').AsString='6' then CheckBox21.Checked:=true;
if adoquery.FieldByName('ysjl_zdgcs_qzx').AsString='0' then CheckBox21.Checked:=false;
memo5.Text:=adoquery.FieldByName('ysjl_js_ms').AsString;
//加载第六页信息
edit26.Text:=adoquery.fieldbyname('ysjl_w').AsString;
edit27.Text:=adoquery.fieldbyname('ysjl_v').AsString;
edit28.Text:=adoquery.fieldbyname('ysjl_t').AsString;
edit29.Text:=adoquery.fieldbyname('ysjl_jzc').AsString;
edit30.Text:=adoquery.fieldbyname('ysjl_syjz').AsString;
memo6.Text:=adoquery.fieldbyname('YSjl_cw_ms').AsString;
//计算第四页信息
Edit17Exit(sender);
Edit18Exit(sender);
Edit19Exit(sender);
Edit20Exit(sender);
//计算第五页信息
get_gcsinfor;
RadioButton14Click(sender);
Edit34Exit(sender);
RadioButton25Click(sender);
//计算第六页信息
Edit27Exit(sender);
end;
finally
freeandnil(adoquery);
end;
end;
procedure TFrm_Xiangxi.ComboBox1Change(Sender: TObject);
begin
IF DROPDOWN<>2 THEN EXIT;
GETINFRO(Sender);
edit5.SetFocus;
combobox1.DroppedDown:=false;
dropdown:=3;
end;
procedure TFrm_Xiangxi.BitBtn4Click(Sender: TObject);
begin
if (edt_jzc.Text<>'') and (edt_syjz.Text<>'') and (edt_gsz.Text<>'') then
gettbnl
else edt_tbNL.Text:='';
if (edt_zyzj.Text<>'') and (edt_xd.Text<>'') and (edt_gsz.Text<>'') then
getzjnl
else edt_zjnl.text:='';
if (trim(edt_zjnl.Text)='') or (trim(edt_tbnl.Text)='') or (trim(edt_cwnl.Text)='') then
begin
edt_caiwu.Text:='';
exit;
end;
getcaiwu;
end;
procedure TFrm_Xiangxi.RadioButton7Click(Sender: TObject);
begin
if not RadioButton7.Checked and not radiobutton8.Checked then
begin
edt_zzjg.Text:='';
exit;
end;
if RadioButton7.Checked then
edt_zzjg.Text:='2';
if radiobutton8.Checked then
edt_zzjg.Text:='3';
if (trim(edt_zyry.text)<>'') and (trim(edt_sb.Text)<>'') then
edt_jishu.Text:=floattostr(strtofloat(edt_zzjg.Text)+strtofloat(edt_sb.Text)
+strtofloat(edt_zyry.Text));
end;
procedure TFrm_Xiangxi.RadioButton8Click(Sender: TObject);
begin
if not RadioButton7.Checked and not radiobutton8.Checked then
begin
edt_zzjg.Text:='';
exit;
end;
if RadioButton7.Checked then
edt_zzjg.Text:='4';
if radiobutton8.Checked then
edt_zzjg.Text:='5';
if (trim(edt_zyry.text)<>'') and (trim(edt_sb.Text)<>'') then
edt_jishu.Text:=floattostr(strtofloat(edt_zzjg.Text)+strtofloat(edt_sb.Text)
+strtofloat(edt_zyry.Text));
end;
procedure TFrm_Xiangxi.RadioButton5Click(Sender: TObject);
begin
if not RadioButton1.Checked and not radiobutton2.Checked then
begin
edt_zzjg.Text:='';
exit;
end;
if RadioButton2.Checked then
edt_zzjg.Text:='2';
if radiobutton1.Checked then
edt_zzjg.Text:='4';
if (trim(edt_zyry.text)<>'') and (trim(edt_sb.Text)<>'') then
edt_jishu.Text:=floattostr(strtofloat(edt_zzjg.Text)+strtofloat(edt_sb.Text)
+strtofloat(edt_zyry.Text));
end;
procedure TFrm_Xiangxi.RadioButton6Click(Sender: TObject);
begin
if not RadioButton1.Checked and not radiobutton2.Checked then
begin
edt_zzjg.Text:='';
exit;
end;
if RadioButton2.Checked then
edt_zzjg.Text:='3';
if radiobutton1.Checked then
edt_zzjg.Text:='5';
if (trim(edt_zyry.text)<>'') and (trim(edt_sb.Text)<>'') then
edt_jishu.Text:=floattostr(strtofloat(edt_zzjg.Text)+strtofloat(edt_sb.Text)
+strtofloat(edt_zyry.Text));
end;
procedure TFrm_Xiangxi.Edit7KeyPress(Sender: TObject; var Key: Char);
begin
if not (Key in['0'..'9',#8,#13]) then
Key:=#0;
end;
procedure tfrm_xiangxi.Getjxsb;
var
sb:real;
begin
sb:=0;
if (trim(edit11.text)='') or ((not RadioButton21.Checked) and (not RadioButton22.Checked))
or( (not RadioButton9.Checked) and (not RadioButton10.Checked)
and (not RadioButton11.Checked)) then
begin
edt_sb.Text:='';
exit;
end;
if checkbox6.Checked then sb:=sb+1;
if checkbox7.Checked then sb:=sb+1;
if checkbox8.Checked then sb:=sb+2;
if (strtoint(edit11.Text)*0.2)>2 then
sb:=sb+2
else
sb:=sb+strtoint(edit11.Text)*0.2;
if RadioButton9.Checked then sb:=sb+1;
if RadioButton10.Checked then sb:=sb+2;
if RadioButton11.Checked then sb:=sb+3;
if RadioButton21.Checked then sb:=sb+0;
if RadioButton22.Checked then sb:=sb+1;
edt_sb.Text:=floattostr(sb);
if (trim(edt_zzjg.text)<>'') and (trim(edt_zyry.Text)<>'') then
edt_jishu.Text:=floattostr(strtofloat(edt_zzjg.Text)+strtofloat(edt_sb.Text)
+strtofloat(edt_zyry.Text));
end;
procedure TFrm_Xiangxi.Getrydf;
var
zyry:real;
begin
zyry:=0;
if (trim(edit7.Text)='')or (trim(edit8.Text)='') or (trim(edit9.Text)='') or (trim(edit10.Text)='') then
begin
edt_zyry.Text:='';
exit;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -