<h2 >更改该注册订单的收费状态</h2>
<ul>
<li>
<label for="report">
 是否已报到:
</label>
<input type="radio" id="baodao1" name="baodao" value="1"/>是
<input type="radio" id="baodao0" name="baodao" value="0"/>否
</li>
<li>
<label for="name">
  姓  名:
</label>
<span id="costName"></span>
</li>
<li>
<label for="type">
  注册类型:
</label>
<span id="costType"></span>
</li>
<li>
<label for="sure_fee">
 在线⽀付⼿续费:
</label>
<span id="costType">0</span>
</li>
<li>
<label for="sure_fee">
 应收费⾦额:
</label>
<span id="price"></span>
</li>
<li>
<label for="already_fee">
 已收费⾦额:
</label>
<input type="text" id="pay_" name="pay"/>
</li>
<li>
<label for="owe">
  ⽋  款:
</label>
<span id="qianPay"></span>
</li>
<li>
<label for="fee_type">
  付款⽅式:
</label>
<input type="radio" id="payType1" name="payType" value="3"/>银⾏
<input type="radio" id="payType2" name="payType" value="4"/>邮局
<input type="radio" id="payType3" name="payType" value="5"/>现⾦
<input type="radio" id="payType4" name="payType" value="2"/>在线⽀付
</li>
<li>
<label for="fee_evidence">
是否收到汇款凭证:
</label>
<input type="radio" id="isReceiveProof1" name="isReceiveProof" value="1"/>是
<input type="radio" id="isReceiveProof0" name="isReceiveProof" value="0"/>否
</li>
<li>
<label for="fa_piao">
  发票抬头:
</label>webservice实现
<span id="billTitle"></span>
</li>
<li>
<label for="fa_piao">
  发票编号:
</label>
<input type="text" id="billCode" name="billCode"/>
</li>
<li>
<label for="check_evidence">
是否已开发票:
</label>
<input type="radio" id="isBill1" name="isBill" value="1"/>是
<input type="radio" id="isBill0" name="isBill" value="0"/>否
</li>
<li>
<label for="get_evidence">
是否已领发票:
</label>
<input type="radio" id="isDrawBill1" name="isDrawBill" value="1"/>是
<input type="radio" id="isDrawBill0" name="isDrawBill" value="0"/>否
</li>
<li>
<label for="date">
已发确认⽇期:
</label>
<span id="confirmDate"></span>
<!-- <input type="text" id="confirmDate" name="confirmDate"/> -->
<!-- <input id="confirmDate" name="confirmDate" class="text" type="text" onClick="WdatePicker()"/> -->
</li>
<li>
<label for="check_letter">是否已发确认函:</label>
<span id="isConfirmInvitation"></span>
</li>
<li>
<label for="fa_piao">在线⽀付状态:</label>
<span id="payString"></span>
</li>
</ul>
<div class="fee_opr">
<button type="button" class="fee_sure" >确定</button>  <button type="button" class="fee_cancel" >关闭</button> </div>
</div>
</form>
2、js代码:
$(".fee_sure").click(function () {
var dataObj = $("#costForm").serialize();
var payType = $('input[name="payType"]:checked').val();
if(payType == undefined){
alert("请选择付款类型");
return ;
}else{
$.ajax({
url:"/webCenter.do?method=saveUserMessage",
type: "post",
dataType:"json",
data:dataObj,
cache:false,
ifModified:true,
success:function(json){
if(json.flag == 1){
alert("1234");
}
}
})
}
})
3、后台action处理:
@RequestMapping(params ="method=saveUserMessage",method=RequestMethod.POST)  //导⼊发⾔
public void saveUserMessage(int userId,HttpServletRequest request,HttpServletResponse response){
try {
HttpSession session = Session(request);
Adminuser adminUser = Attribute("centerAdminUser") == null?null:(Adminuser) Attribute("centerAdminUser");
if(adminUser == null){
try {
response.ContextPath()+"/center/index.jsp");
} catch (Exception e) {
e.printStackTrace();
}
}else{
String billNumber = Parameter("billCode")==null?"":Parameter("billCode");
String isBaodao = Parameter("baodao")==null?"0":Parameter("baodao");
String haspay = Parameter("pay")==null?"0":Parameter("pay");
String payType = Parameter("payType")==null?"0":Parameter("payType");
String isFkpz = Parameter("isReceiveProof")==null?"0":Parameter("isReceiveProof");
String isYkfp = Parameter("isBill")==null?"0":Parameter("isBill");
String isYlfp = Parameter("isDrawBill")==null?"0":Parameter("isDrawBill");
JSONObject jsonObject = new JSONObject();
//AdminuserConferences adminuserConferences = AdminuserId());
UserInfo userInfo = UserInfoById(userId);
if(userInfo!=null)
{
jsonObject.accumulate("flag",1);
ChcRegUser chcRegUser = ChcRegUser(userId);
if(chcRegUser!=null)
{
chcRegUser.setHasPay(Integer.parseInt(haspay));
chcRegUser.setPayType(Integer.parseInt(payType));
HasPay()-Pay()==0)
{
chcRegUser.setStateType(1);
}
webService.saveObject(chcRegUser);
userInfo.setIsBaodao(Integer.parseInt(isBaodao));
userInfo.setIsFkpz(Integer.parseInt(isFkpz));
userInfo.setBillNumber(billNumber);
userInfo.setIsYlfp(Integer.parseInt(isYlfp));
userInfo.setIsYkfp(Integer.parseInt(isYkfp));
webService.saveObject(userInfo);
jsonObject.accumulate("pay", Pay());
jsonObject.accumulate("haspay", HasPay());
}
}else {
jsonObject.accumulate("flag",0);
}
writeJson(response, String());
}
} catch (Exception e) {
e.printStackTrace();
}
}
以上这篇form表单数据封装成json格式并提交给服务器的实现⽅法就是⼩编分享给⼤家的全部内容了,希望能给⼤家⼀个参考,也希望⼤家多多⽀持。

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。

智能数据采集终端的数据处理与软件实现
« 上一篇
浅谈工程项目运维管理系统在工程管理中的重要性
下一篇 »

发表评论

推荐文章

热门文章

最新文章

标签列表