两次 ajax 请求
简介:本人想实现一个点击下拉框将选中的数据提交到后台查询,查询结果返回前台页面在下拉框中显示,再次选择下拉框将数据提交到后台,查询数据并将数据在前台页面显示
<#include "/common/commoncss.ftl">
<div class="bgc-w box">
<form action="apply" enctype="multipart/form-data" method="post" onsubmit="return check();" >
<div class="box-header">
<table class="bo table ">
<tr >
<td colspan="14" class="title"><h2>生产领料单</h2></td>
</tr>
<tr style="opacity: 0;">
<td colspan="14">11</td>
</tr>
<tr >
<td colspan="14" style="text-align: left;">
<!--錯誤信息提示 -->
<div class="alert alert-danger alert-dismissable" style="display:none;" role="alert">
错误信息:<button class="thisclose close" type="button">×</button>
<span class="error-mess"></span>
</div>
</td>
</tr>
<tr >
<td class="title"><label class="control-label">生产单号</label></td>
<td colspan="6"><input type="text" class="form-control inpu" name="productionOrder"/></td>
<td class="title"><span >创建时间</span></td>
<td colspan="6"><input type="text" class="form-control inpu" name="orderDate"></td>
</tr>
<tr >
<td class="title" ><label class="control-label">领料人</label></td>
<td colspan="6"><input type="text" class="form-control inpu" name="pickMan"/></td>
<td class="title" ><label class="control-label">领料部门</label></td>
<td colspan="6"><input type="text" class="form-control inpu " name="pickDept"/></td>
</tr>
<tr >
<td class="title" ><label class="control-label">生产负责人</label></td>
<td colspan="6"><input type="text" class="form-control inpu" name="signOff"/></td>
<td class="title" ><label class="control-label">用途</label></td>
<td colspan="6"><input type="text" class="form-control inpu" name="purpose"></td>
</tr>
<tr >
<td class="title" ><label class="control-label">备注</label></td>
<td colspan="6"><input type="text" class="form-control inpu" name="remark"></td>
<td class="title" ><label class="control-label">生产领料单票据</label></td>
<td colspan="6">
<div class="btn btn-default"style="position: relative; overflow: hidden;width: 100%;margin-top: -6px;">
<i class="glyphicon glyphicon-open"></i> 上传票据
<input type="file" name="filePath" style="opacity: 0; position: absolute;
top: 12px; right: 0; " class='inpu'>
</div>
</td>
</tr>
<tr >
<td class="title"><label class="control-label">领料明细</label></td>
<td colspan="13" style="text-align: right;" ><i class="glyphicon glyphicon-plus zeng"></i> <i class="glyphicon glyphicon-minus jian"></i></td>
</tr>
<tr >
<td colspan="14" >
<#-- <div class="food">-->
<table class="table inside">
<thead>
<tr>
<th colspan="2" style="width: 77px;">选择</th>
<th colspan="2">原材料名称</th>
<th colspan="2">规格型号</th>
<th colspan="2">计量单位</th>
<th colspan="2">商品类型</th>
<#-- 仓库数量-->
领取数量
<#-- -->
<td colspan="14" style="text-align: right;" >
<input class="btn btn-primary" id="save" type="submit" value="保存" />
<input class="btn btn-default" id="cancel" type="button" value="取消"
onclick="window.history.back();" />
</td>
</tr>
</table>
</div>
</form>
</div>
</div>