控件代码
<td class="label" ><div id="lbtzxfsj">图纸下发时间</div> <div id="lbysjg">预算价格</div> <div id="lbqtjg">洽谈金额</div></td>预算价格显示异常
<td > <div id="tbtzxfsj"> <input type="text" id="patzdate" name="patzdate" data-toggle="topjui-datebox" value="@Model.PA_TZDate" ></div>
<div id="tbysjg"><input type="text" id="paysmoney" name="paysmoney" data-toggle="topjui-numberbox" value="@Model.PA_YSMoney"></div>
<div id="tbqtjg"><input type="text" id="paqtmoney" name="paqtmoney" data-toggle="topjui-numberbox" value="@Model.PA_QTMoney"></div>
</td>
JS代码
$(function () {
DisplaySet();
});
function DisplaySet()
{
var pbtype = $("#papbtype").val();
if (pbtype == "")
{
document.getElementById("lbtzxfsj").style.display = "";//一进页面 显示图纸下发时间 通过JS 隐藏 再显示正常
document.getElementById("tbtzxfsj").style.display = "";//一进页面 显示图纸下发时间
document.getElementById("lbysjg").style.display = "none";//一进页面 隐藏预算价格 通过JS再显示不正常
document.getElementById("tbysjg").style.display = "none";//一进页面 隐藏预算价格
document.getElementById("lbqtjg").style.display = "none";
document.getElementById("tbqtjg").style.display = "none";
}
else if (pbtype == "小配套类")
{
document.getElementById("lbtzxfsj").style.display = "none";
document.getElementById("tbtzxfsj").style.display = "none";
document.getElementById("lbysjg").style.display = "";
document.getElementById("tbysjg").style.display = "";
document.getElementById("lbqtjg").style.display = "none";
document.getElementById("tbqtjg").style.display = "none";
}
else if (pbtype == "技改类") {
document.getElementById("lbtzxfsj").style.display = "none";
document.getElementById("tbtzxfsj").style.display = "none";
document.getElementById("lbysjg").style.display = "none";
document.getElementById("tbysjg").style.display = "none";
document.getElementById("lbqtjg").style.display = "";
document.getElementById("tbqtjg").style.display = "";
}
}