欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

jsp套页面代码实现

程序员文章站 2022-08-04 15:57:40
套页面代码实现 日期回显: date logtime = slog.getlogtime(); string logtime =null; if(...

套页面代码实现

日期回显:


    date logtime = slog.getlogtime();
        string logtime =null;
    	if(logtime!=null&&!"".equals(logtime)){
    		simpledateformat dateformater = new simpledateformat("yyyy-mm-dd");
    		logtime  = dateformater.format(logtime);
    		model.addattribute("logtime", logtime);
    	}	
<td><fmt:formatdate value="${buser.jobdate}" type="date"/></td>


-------------------------------------------------------------------------------------------
<input id="product_date" name="product_date" class=" form-control" type="text" 
                    value="<fmt:formatdate value='${wsoallocate.lot4 }' pattern='yyyy-mm-dd '/>" readonly="readonly" maxlength="100">


<td>${menu.isshow eq '1'?'显示':'隐藏'}</td>

<td><fmt:formatdate value="${buser.jobdate}" type="date"/></td>
-------------------------------radio回显-----记得model.add--------------------------------

<td><c:if test="${buser.sex==0}">女 </c:if>
<c:if test="${buser.sex==1}">男</c:if></td>	
<c:if test="${not empty buser.sex}">
                          <c:if test="${buser.sex == '1' }">
                          <input id="sex" name="sex" class="sex" type="radio" value="1" checked="checked"><label for="male">男</label>
                        	<input id="sex" name="sex" class="sex" type="radio" value="0"><label for="female">女</label>
                          </c:if>
                           <c:if test="${buser.sex == '0' }">
                          <input id="sex" name="sex" class="sex" type="radio" value="1" ><label for="male">男</label>
                        	<input id="sex" name="sex" class="sex" type="radio" value="0" checked="checked"><label for="female">女</label>
                          </c:if>
                          </c:if>
                          <c:if test="${empty buser.sex}">
                          <input id="sex" name="sex" class="sex" type="radio" value="1" ><label for="male">男</label>
                        	<input id="sex" name="sex" class="sex" type="radio" value="0"><label for="female">女</label>
                          </c:if>


<td><fmt:formatdate value="${ubser.adddate}" type="date"/></td>
<td><c:if test="${ubser.sex==0}">女 </c:if><c:if test="${ubser.sex==1}">男</c:if></td>
-------------------good----------actflg---记得model.add---------------------------------------
输入查询的
-----------------------------
<p class="col-md-2 col-sm-3">
									<span>调整单状态:</span>
										<select id="" name="auditflg" class="form-control input-sm">
											<option value="">请选择</option>
											<option value="0" <c:if test="${param.auditflg==0 }">selected</c:if>>未审核</option>
                                    		<option value="1" <c:if test="${param.auditflg==1 }">selected</c:if>>已审核</option>
										</select>
								</p>
----------
详情页回显的


-------------------justsoso----------actflg---记得model.add---------------------------------------
 <span>开关标志:</span>
                                  
                                  <c:if test = "${empty  sapp.isopen}">
                                      <select id="isopen" name="isopen" class="form-control">
	                                   <option value="">请选择</option>
	                                   <option value = 1 >开</option>
	                                   <option value = 0 >关</option>
                                	</select>
                                  </c:if>
                                  <c:if test="${not empty sapp.isopen }">
                                <c:if test="${sapp.isopen == 0 }">
                                    <select id="isopen" name="isopen" class="form-control">
	                                   <option value="">请选择</option>
	                                   <option value = 1 >开</option>
	                                   <option value = 0 selected="selected">关</option>
                                	</select>
                               	</c:if>
                               	    <c:if test="${sapp.isopen == 1 }">
                                    <select id="isopen" name="isopen" class="form-control">
	                                   <option value="">请选择</option>
	                                   <option value = 1 selected="selected">开</option>
	                                   <option value = 0 >关</option>
                                	</select>
                               	</c:if>
                                  </c:if>
----------------good------------select框回显-----------记得model.add----------------------------




<p class="col-md-2 col-sm-3">
									<span>出库类型:</span>
										<select id="ruku_type" name="sotype" class=" form-control input-sm" style="width:80%;">
											<option value="">请选择</option>
										<c:foreach items="${sotypelist}" var="sdict">
											<option value="${sdict.dvalue}" <c:if test="${sdict.dvalue eq sotype }" >selected</c:if>>${sdict.label}</option>
										</c:foreach>
									    </select>
								</p>
____________________________________________________________________________

<select id="appid" name="appid" class="form-control required">
                           
	                                 <c:foreach items="${listapp}" var="sapp" >
	                                 	<c:if test="${sapp.appid eq sfuncation.appid}">
	                                 		<option value="${sapp.appid}" selected>${sapp.appname}</option>
	                                 	</c:if>
	                                   
	                                   	<c:if test="${sapp.appid ne sfuncation.appid}">
	                                 		<option value="${sapp.appid}">${sapp.appname}</option>
	                                 	</c:if>
	                                   
	                                  </c:foreach>
                           </select>
----------------------perfect------select框回显-----------记得model.add----------------------------
<select id="wwarehouse.warehousecd" name="wwarehouse.warehousecd" class="form-control required" onchange="selectwwharea(this.options[this.options.selectedindex].value,'seareacd')">
							<option value="" >请选择所属仓库</option>
							  	<c:foreach items="${listwwarehouse}" var="wwarehous" >
                       				<option value="${wwarehous.warehousecd}" <c:if test="${wwarehous.warehousecd param.warehousecd }" >selected</c:if>>${wwarehous.whname}</option>
                       			</c:foreach>
							</select> 

 <span>库区名称:</span>
		                  <select id="seareacd" name="areacd" class="form-control input-sm" style="width:138px;">
		                    <option value="" >请选择所属库区</option>
		                  
				            <c:foreach items="${wwharealist}" var="wwhare" >
				                <option value="${wwhare.areacd}" <c:if test="${wwhare.areacd eq param.areacd }" >selected</c:if>>${wwhare.areaname}</option>
				            </c:foreach>
                          </select>
--------------------------




	<tr>

								<th>
									所属部门:
								</th>
								<td>
									<select name="e_department">
										<option value="">==请选择部门==</option>
										<c:foreach items="${employeebumenlist}" var="e">
											<option value="${e.e_department}">
												${e.e_department}
											</option>
										</c:foreach>
									</select>
								</td>

							</tr>
<img src=https://www.2cto.com/uploadfile/2018/0614/20180614115338868.png" modifysize="75%" diffpixels="16px" scalingmode="zoom" line-height:="" 21px;="" outline:="" none;="" color:="" rgb(0,="" 0,="" 0);="" font-family:="" 'microsoft="" yahei';="" font-size:="" 14px;="" font-style:="" normal;="" font-variant:="" font-weight:="" letter-spacing:="" orphans:="" auto;="" text-align:="" start;="" text-indent:="" 0px;="" text-transform:="" white-space:="" widows:="" word-spacing:="" -webkit-text-stroke-width:="" 0px;"="" style="color: rgb(0, 0, 0); font-family: "microsoft yahei"; font-size: 14px; line-height: 21px; text-align: start; widows: 1; width: 471px; height: 185px; background-color: rgb(255, 255, 255);">
	<tr>

								<th>
									入职时间:
								</th>
								<td>
									<p>
										<input id="dp1" data-date-format="yyyy-mm-dd" type="text"
											name="e_startworktime" />
									</p>
								</td>

							</tr>
	<tr>
								<c:if test="${param.e_sex=='女'}">
									<th>
										性别:
									</th>
									<td>
										<input type="radio" name="e_sex" value="男">
										男
										<input type="radio" name="e_sex" checked="checked" value="女">
										女
									</td>
								</c:if>
								<c:if test="${param.e_sex=='男'}">
									<th>
										性别:
									</th>
									<td>
										<input type="radio" name="e_sex" checked="checked" value="男">
										男
										<input type="radio" name="e_sex" value="女">
										女
									</td>
								</c:if>

							</tr>

日期回显:


    date logtime = slog.getlogtime();
        string logtime =null;
    	if(logtime!=null&&!"".equals(logtime)){
    		simpledateformat dateformater = new simpledateformat("yyyy-mm-dd");
    		logtime  = dateformater.format(logtime);
    		model.addattribute("logtime", logtime);
    	}	
<td><fmt:formatdate value="${buser.jobdate}" type="date"/></td>


-------------------------------------------------------------------------------------------
<input id="product_date" name="product_date" class=" form-control" type="text" 
                    value="<fmt:formatdate value='${wsoallocate.lot4 }' pattern='yyyy-mm-dd '/>" readonly="readonly" maxlength="100">


<td>${menu.isshow eq '1'?'显示':'隐藏'}</td>

<td><fmt:formatdate value="${buser.jobdate}" type="date"/></td>
-------------------------------radio回显-----记得model.add--------------------------------

<td><c:if test="${buser.sex==0}">女 </c:if>
<c:if test="${buser.sex==1}">男</c:if></td>	
<c:if test="${not empty buser.sex}">
                          <c:if test="${buser.sex == '1' }">
                          <input id="sex" name="sex" class="sex" type="radio" value="1" checked="checked"><label for="male">男</label>
                        	<input id="sex" name="sex" class="sex" type="radio" value="0"><label for="female">女</label>
                          </c:if>
                           <c:if test="${buser.sex == '0' }">
                          <input id="sex" name="sex" class="sex" type="radio" value="1" ><label for="male">男</label>
                        	<input id="sex" name="sex" class="sex" type="radio" value="0" checked="checked"><label for="female">女</label>
                          </c:if>
                          </c:if>
                          <c:if test="${empty buser.sex}">
                          <input id="sex" name="sex" class="sex" type="radio" value="1" ><label for="male">男</label>
                        	<input id="sex" name="sex" class="sex" type="radio" value="0"><label for="female">女</label>
                          </c:if>


<td><fmt:formatdate value="${ubser.adddate}" type="date"/></td>
<td><c:if test="${ubser.sex==0}">女 </c:if><c:if test="${ubser.sex==1}">男</c:if></td>
-------------------good----------actflg---记得model.add---------------------------------------
输入查询的
-----------------------------
<p class="col-md-2 col-sm-3">
									<span>调整单状态:</span>
										<select id="" name="auditflg" class="form-control input-sm">
											<option value="">请选择</option>
											<option value="0" <c:if test="${param.auditflg==0 }">selected</c:if>>未审核</option>
                                    		<option value="1" <c:if test="${param.auditflg==1 }">selected</c:if>>已审核</option>
										</select>
								</p>
----------
详情页回显的


-------------------justsoso----------actflg---记得model.add---------------------------------------
 <span>开关标志:</span>
                                  
                                  <c:if test = "${empty  sapp.isopen}">
                                      <select id="isopen" name="isopen" class="form-control">
	                                   <option value="">请选择</option>
	                                   <option value = 1 >开</option>
	                                   <option value = 0 >关</option>
                                	</select>
                                  </c:if>
                                  <c:if test="${not empty sapp.isopen }">
                                <c:if test="${sapp.isopen == 0 }">
                                    <select id="isopen" name="isopen" class="form-control">
	                                   <option value="">请选择</option>
	                                   <option value = 1 >开</option>
	                                   <option value = 0 selected="selected">关</option>
                                	</select>
                               	</c:if>
                               	    <c:if test="${sapp.isopen == 1 }">
                                    <select id="isopen" name="isopen" class="form-control">
	                                   <option value="">请选择</option>
	                                   <option value = 1 selected="selected">开</option>
	                                   <option value = 0 >关</option>
                                	</select>
                               	</c:if>
                                  </c:if>
----------------good------------select框回显-----------记得model.add----------------------------




<p class="col-md-2 col-sm-3">
									<span>出库类型:</span>
										<select id="ruku_type" name="sotype" class=" form-control input-sm" style="width:80%;">
											<option value="">请选择</option>
										<c:foreach items="${sotypelist}" var="sdict">
											<option value="${sdict.dvalue}" <c:if test="${sdict.dvalue eq sotype }" >selected</c:if>>${sdict.label}</option>
										</c:foreach>
									    </select>
								</p>
____________________________________________________________________________

<select id="appid" name="appid" class="form-control required">
                           
	                                 <c:foreach items="${listapp}" var="sapp" >
	                                 	<c:if test="${sapp.appid eq sfuncation.appid}">
	                                 		<option value="${sapp.appid}" selected>${sapp.appname}</option>
	                                 	</c:if>
	                                   
	                                   	<c:if test="${sapp.appid ne sfuncation.appid}">
	                                 		<option value="${sapp.appid}">${sapp.appname}</option>
	                                 	</c:if>
	                                   
	                                  </c:foreach>
                           </select>
----------------------perfect------select框回显-----------记得model.add----------------------------
<select id="wwarehouse.warehousecd" name="wwarehouse.warehousecd" class="form-control required" onchange="selectwwharea(this.options[this.options.selectedindex].value,'seareacd')">
							<option value="" >请选择所属仓库</option>
							  	<c:foreach items="${listwwarehouse}" var="wwarehous" >
                       				<option value="${wwarehous.warehousecd}" <c:if test="${wwarehous.warehousecd param.warehousecd }" >selected</c:if>>${wwarehous.whname}</option>
                       			</c:foreach>
							</select> 

 <span>库区名称:</span>
		                  <select id="seareacd" name="areacd" class="form-control input-sm" style="width:138px;">
		                    <option value="" >请选择所属库区</option>
		                  
				            <c:foreach items="${wwharealist}" var="wwhare" >
				                <option value="${wwhare.areacd}" <c:if test="${wwhare.areacd eq param.areacd }" >selected</c:if>>${wwhare.areaname}</option>
				            </c:foreach>
                          </select>
--------------------------




	<tr>

								<th>
									所属部门:
								</th>
								<td>
									<select name="e_department">
										<option value="">==请选择部门==</option>
										<c:foreach items="${employeebumenlist}" var="e">
											<option value="${e.e_department}">
												${e.e_department}
											</option>
										</c:foreach>
									</select>
								</td>

							</tr>
<img src=https://www.2cto.com/uploadfile/2018/0614/20180614115338868.png" modifysize="75%" diffpixels="16px" scalingmode="zoom" line-height:="" 21px;="" outline:="" none;="" color:="" rgb(0,="" 0,="" 0);="" font-family:="" 'microsoft="" yahei';="" font-size:="" 14px;="" font-style:="" normal;="" font-variant:="" font-weight:="" letter-spacing:="" orphans:="" auto;="" text-align:="" start;="" text-indent:="" 0px;="" text-transform:="" white-space:="" widows:="" word-spacing:="" -webkit-text-stroke-width:="" 0px;"="" style="color: rgb(0, 0, 0); font-family: "microsoft yahei"; font-size: 14px; line-height: 21px; text-align: start; widows: 1; width: 471px; height: 185px; background-color: rgb(255, 255, 255);">
	<tr>

								<th>
									入职时间:
								</th>
								<td>
									<p>
										<input id="dp1" data-date-format="yyyy-mm-dd" type="text"
											name="e_startworktime" />
									</p>
								</td>

							</tr>
	<tr>
								<c:if test="${param.e_sex=='女'}">
									<th>
										性别:
									</th>
									<td>
										<input type="radio" name="e_sex" value="男">
										男
										<input type="radio" name="e_sex" checked="checked" value="女">
										女
									</td>
								</c:if>
								<c:if test="${param.e_sex=='男'}">
									<th>
										性别:
									</th>
									<td>
										<input type="radio" name="e_sex" checked="checked" value="男">
										男
										<input type="radio" name="e_sex" value="女">
										女
									</td>
								</c:if>

							</tr>