report日期选择方式更改(问题修复)
This commit is contained in:
@@ -52,14 +52,16 @@
|
|||||||
|
|
||||||
function changeReportType(reportType, init) {
|
function changeReportType(reportType, init) {
|
||||||
$("#intype").remove();
|
$("#intype").remove();
|
||||||
if(reportType == 1){//需删除元素后重新添加,直接更改onclick会出现缓存问题
|
var reportTime = "";
|
||||||
$("#reportTypeDiv").append('<input id="intype" class="form-control input-medium" type="text" value="" readonly="readonly" onclick=WdatePicker({dateFmt:"yyyy-MM-dd",isShowClear:true});>');
|
|
||||||
} else if(reportType == 2){
|
|
||||||
$("#reportTypeDiv").append('<input id="intype" class="form-control input-medium" type="text" value="" readonly="readonly" onclick=WdatePicker({dateFmt:"yyyy-MM",isShowClear:true});>');
|
|
||||||
} else if(reportType == 3){
|
|
||||||
$("#reportTypeDiv").append('<input id="intype" class="form-control input-medium" type="text" value="" readonly="readonly" onclick=WdatePicker({dateFmt:"yyyy",isShowClear:true});>');
|
|
||||||
}
|
|
||||||
if (init) {
|
if (init) {
|
||||||
|
reportTime = "${bean.reportTime }";
|
||||||
|
}
|
||||||
|
if(reportType == 1){//需删除元素后重新添加,直接更改onclick会出现缓存问题
|
||||||
|
$("#reportTypeDiv").append('<input id="intype" name="reportTime" class="form-control input-medium Wdate" type="text" value="' + reportTime + '" readonly="readonly" onclick=WdatePicker({dateFmt:"yyyy-MM-dd",isShowClear:true});>');
|
||||||
|
} else if(reportType == 2){
|
||||||
|
$("#reportTypeDiv").append('<input id="intype" name="reportTime" class="form-control input-medium Wdate" type="text" value="' + reportTime + '" readonly="readonly" onclick=WdatePicker({dateFmt:"yyyy-MM",isShowClear:true});>');
|
||||||
|
} else if(reportType == 3){
|
||||||
|
$("#reportTypeDiv").append('<input id="intype" name="reportTime" class="form-control input-medium Wdate" type="text" value="' + reportTime + '" readonly="readonly" onclick=WdatePicker({dateFmt:"yyyy",isShowClear:true});>');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -167,7 +169,7 @@ var ajaxGetLwhhReport=function(){
|
|||||||
<form:option value="3"><spring:message code="月报"/></form:option>
|
<form:option value="3"><spring:message code="月报"/></form:option>
|
||||||
</form:select>
|
</form:select>
|
||||||
</div>
|
</div>
|
||||||
<input id="intype" class="form-control input-medium" type="text" value="" readonly="readonly">
|
<input id="intype" name="reportTime" class="form-control input-medium Wdate" type="text" value="${bean.reportTime }" readonly="readonly">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
|
|||||||
Reference in New Issue
Block a user