123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527 |
- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <%@ taglib prefix="s" uri="/struts-tags" %>
- <script type="text/javascript">
-
- //婚姻状况
- var maritalStatusObj_update = null;
- var maritalStatus_array_update = null;
-
-
- //申请保障类型
- var applyTypeObj_update = null;
- var applyType_array_update = null;
-
- //是否现房
- var isExistHouseObj_update = null;
- var isExistHouse_array_update = null;
-
- var securityPersonId = null;
-
- var dealNull = function(value)
- {
- if(value == ""){
- return 0;
- }
- else{
- return value;
- }
- }
-
- var countHouseMoney =function(){
- var securityNum = dealNull($("#securityNum_update").numberbox('getValue'));
-
- var houseArea = dealNull($("#houseArea_update").numberbox('getValue'));
- var garageArea = dealNull($("#garageArea_update").numberbox('getValue'));
- var protectArea = dealNull($("#protectArea_update").numberbox('getValue'));
-
- var protectRealArea = protectArea;
- if(houseArea < protectArea){
- protectRealArea = houseArea;
- }
- var protectOutArea = 0;
- if(houseArea > protectArea){
- protectOutArea = houseArea - protectArea;
- }
-
- $("#protectOutArea_update").numberbox('setValue', protectOutArea);
-
- var housePrice = dealNull($("#housePrice_update").numberbox('getValue'));
- var garagePrice = dealNull($("#garagePrice_update").numberbox('getValue'));
-
- var houseMoney = houseArea * housePrice ;
- var garageMoney = garageArea * garagePrice;
-
- $("#houseMoney_update").numberbox('setValue', houseMoney );
- $("#garageMoney_update").numberbox('setValue', garageMoney );
-
- var totalMoney = houseMoney + garageMoney;
- $("#totalMoney_update").numberbox('setValue', totalMoney );
-
- var govPercent = dealNull($("#govPercent_update").numberbox('getValue'));
- var personPercent = 100 - govPercent;
- $("#personPercent_update").numberbox('setValue', personPercent );
-
- var govMoney = housePrice*protectRealArea*govPercent/100;
-
- $("#govMoney_update").numberbox('setValue', govMoney );
-
- var personTotalMoney = totalMoney - govMoney;
- $("#personTotalMoney_update").numberbox('setValue', personTotalMoney );
-
- var personProtectMoney = housePrice*protectRealArea*personPercent/100 ;
- $("#personProtectMoney_update").numberbox('setValue', personProtectMoney );
- $("#personOutMoney_update").numberbox('setValue', personTotalMoney - personProtectMoney );
- }
-
- function commonHouseHelpOrder_update_load(id){
-
- $('#houseArea_update').numberbox({
- onChange: function () {
- countHouseMoney();
- }
- });
-
- $('#garageArea_update').numberbox({
- onChange: function () {
- countHouseMoney();
- }
- });
-
- $('#housePrice_update').numberbox({
- onChange: function () {
- countHouseMoney();
- }
- });
-
- $('#garagePrice_update').numberbox({
- onChange: function () {
- countHouseMoney();
- }
- });
-
- $('#govPercent_update').numberbox({
- onChange: function () {
- countHouseMoney();
- }
- });
-
- //保障类别
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"applyType" ,"aa10.name":"保障业务类别" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- applyTypeObj_update = msg.obj.rows;
- var select_arr = [];
- var data = applyTypeObj_update;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- applyType_array_update = select_arr.join("");
- }
- }
- });
-
- //婚姻情况
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"maritalStatus" ,"aa10.name":"婚姻情况" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- maritalStatusObj_update = msg.obj.rows;
- var select_arr = [];
- var data = maritalStatusObj_update;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- maritalStatus_array_update = select_arr.join("");
- }
- }
- });
-
- //是否现房
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"isExistHouse" ,"aa10.name":"是否现房" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- isExistHouseObj_update = msg.obj.rows;
- var select_arr = [];
- var data = isExistHouseObj_update;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- isExistHouse_array_update = select_arr.join("");
- $("#isExistHouse_update").append(isExistHouse_array_update);
- }
- }
- });
- $.ajax({
- type: "post",//使用get方法访问后台
- dataType: "json",//返回json格式的数据
- url: "commonHouseHelpOrderAction_findById",//要访问的后台地址
- data: "commonHouseHelpOrder.cid="+id,//要发送的数据
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
-
- //个人信息
- securityPersonId = msg.obj.securityPersonId;
- $("#name_update").text(msg.obj.securityPersonName);
- $("#idCard_update").text(msg.obj.securityPersonIdCard);
- var personType = "";
- for(var nItem = 0; nItem < personTypeObj.length; nItem++ ){
- if(personTypeObj[nItem].code == msg.obj.securityPerson.personType){
- personType = personTypeObj[nItem].value;
- }
- }
- $("#personType_update").text(personType);
- var maritalStatus = "";
- for(var nItem = 0; nItem < maritalStatusObj_update.length; nItem++ ){
- if(maritalStatusObj_update[nItem].code == msg.obj.securityPerson.maritalStatus){
- maritalStatus = maritalStatusObj_update[nItem].value;
- }
- }
- $("#maritalStatus_update").text(maritalStatus);
- $("#phone_update").text(msg.obj.securityPerson.phone);
- $("#company_update").text(msg.obj.company);
- //$("#residence_update").text(msg.obj.securityPerson.houseRegister.parent.parent.name + "-" + msg.obj.securityPerson.houseRegister.parent.name + "-" + msg.obj.securityPerson.houseRegister.name);
- if(msg.obj.securityPerson.houseRegister != undefined){
- $("#residence_update").text(msg.obj.securityPerson.houseRegister.parent.parent.name + "-" + msg.obj.securityPerson.houseRegister.parent.name + "-" + msg.obj.securityPerson.houseRegister.name);
- }else{
- $("#residence_update").text(msg.obj.securityPerson.accountLocation)
- }
- $("#residenceNo_update").text(msg.obj.securityPerson.residenceNo);
- $("#residenceYear_update").text(msg.obj.securityPerson.residenceYear);
- $("#securityNum_update_1").text(msg.obj.securityPerson.securityNum);
- $("#familyNum_update").text(msg.obj.securityPerson.familyNum);
- $("#avgIncome_update").text(msg.obj.securityPerson.avgIncome);
-
- var applyType = "";
- for(var nItem = 0; nItem < applyTypeObj_update.length; nItem++ ){
- if(applyTypeObj_update[nItem].code == msg.obj.securityPerson.applyType){
- applyType = applyTypeObj_update[nItem].value;
- }
- }
- $("#applyType_update").text(applyType);
-
- //购房信息
- $("#commonHouseHelpOrderId_update").val(msg.obj.cid);
- $("#securityPersonId_update").val(msg.obj.securityPerson.id);
- $("#securityNum_update").numberbox('setValue', msg.obj.securityNum);
- $("#protectArea_update").numberbox('setValue', msg.obj.protectArea );
- $("#houseAddress_update").val(msg.obj.houseAddress);
- $("#developer_update").val(msg.obj.developer);
- $("#isExistHouse_update").val(msg.obj.isExistHouse);
- $("#protectAvgArea_update").numberbox('setValue',msg.obj.protectAvgArea);
- $("#houseArea_update").numberbox('setValue',msg.obj.houseArea);
- $("#garageArea_update").numberbox('setValue',msg.obj.garageArea);
- $("#protectOutArea_update").numberbox('setValue',msg.obj.protectOutArea);
-
- $("#housePrice_update").numberbox('setValue',msg.obj.housePrice);
- $("#garagePrice_update").numberbox('setValue',msg.obj.garagePrice);
-
- $("#houseMoney_update").numberbox('setValue',msg.obj.houseMoney);
- $("#garageMoney_update").numberbox('setValue',msg.obj.garageMoney);
-
- $("#totalMoney_update").numberbox('setValue',msg.obj.totalMoney);
-
- $("#govPercent_update").numberbox('setValue',msg.obj.govPercent);
- $("#personPercent_update").numberbox('setValue',msg.obj.personPercent);
-
- $("#govMoney_update").text(msg.obj.govMoney);
- $("#personTotalMoney_update").text(msg.obj.personTotalMoney);
- $("#personProtectMoney_update").text(msg.obj.personProtectMoney);
- $("#personOutMoney_update").text(msg.obj.personOutMoney);
-
-
- $('#dg_update').datagrid({
- rownumbers:true,
- border:false,
- sortOrder:'desc',
- url:whzl.basePath + '/securityPersonAction_listSecurityPersonRelative?securityPersonId='+securityPersonId,
- checkOnSelect:true,
- selectOnCheck:false,
- loadFilter:function(result){
- if(result.success){
- return result.obj;
- }else{
- $.messager.alert("提示",result.message);
- return ;
- }
- }
- });
- }
- });
- }
-
- function commonHouseHelpOrder_update_submit(){
- $('#updateCommonHouseHelpOrderForm').form('submit',{
- url : whzl.basePath+'/commonHouseHelpOrderAction_updateCommonHouseHelpOrder',
- success : function(result){
- var parseResult = $.parseJSON(result);
- if(parseResult.success){
- $("#updatecommonHouseHelpOrderDialog").dialog("close");
- $('#commonHouseHelpOrderDataGrid').datagrid('reload');
- }
- }
- }
- );
- }
- </script>
- <form id="updateCommonHouseHelpOrderForm" method="post" enctype="multipart/form-data">
- <div class="easyui-tabs" id="tabs_update">
- <div title="购房信息" id="gfxx_update">
- <table class="mytable" style="width: 100%;">
- <tr>
- <th width="20%">房屋地址</th>
- <td width="30%">
- <input class="easyui-validatebox" required="true" type="text" id="houseAddress_update" name="commonHouseHelpOrder.houseAddress">
- <input type="hidden" id="commonHouseHelpOrderId_update" name="commonHouseHelpOrder.cid">
- <input type="hidden" id="securityPersonId_update" name="commonHouseHelpOrder.securityPerson.id">
- </td>
- <th width="20%">开发商</th>
- <td width="30%">
- <input class="easyui-validatebox" required="true" type="text" id="developer_update" name="commonHouseHelpOrder.developer">
- </td>
- </tr>
- <tr>
- <th width="20%">是否现房</th>
- <td colspan="3">
- <select id="isExistHouse_update" name="commonHouseHelpOrder.isExistHouse" required="true" class="easyui-validatebox" >
- <option value="">请选择</option>
- </select>
- </td>
- </tr>
- <tr>
- <th width="20%">人均保障面积(m2)</th>
- <td width="30%">
- <input class="easyui-numberbox" value="24" precision="2" required="true" type="text" id="protectAvgArea_update" name="commonHouseHelpOrder.protectAvgArea" >
- </td>
- <th width="20%">保障人口数量</th>
- <td width="30%">
- <input class="easyui-numberbox" required="true" readonly="readonly" type="text" id="securityNum_update" name="commonHouseHelpOrder.securityNum" >
- </td>
- </tr>
- <tr>
- <th width="20%">住宅面积</th>
- <td width="30%">
- <input class="easyui-numberbox" precision="2" required="true" type="text" id="houseArea_update" name="commonHouseHelpOrder.houseArea" >
- </td>
- <th width="20%">车库面积</th>
- <td width="30%">
- <input class="easyui-numberbox" precision="2" required="true" type="text" id="garageArea_update" name="commonHouseHelpOrder.garageArea" >
- </td>
- </tr>
- <tr>
- <th width="20%">保障面积</th>
- <td width="30%">
- <input class="easyui-numberbox" precision="2" readonly="readonly" required="true" type="text" id="protectArea_update" name="commonHouseHelpOrder.protectArea" >
- </td>
- <th width="20%">保障外面积</th>
- <td width="30%">
- <input class="easyui-numberbox" precision="2" readonly="readonly" required="true" type="text" id="protectOutArea_update" name="commonHouseHelpOrder.protectOutArea" >
- </td>
- </tr>
-
-
- <tr>
- <th width="20%">住宅单价</th>
- <td width="30%">
- <input class="easyui-numberbox" precision="2" required="true" type="text" id="housePrice_update" name="commonHouseHelpOrder.housePrice" >
- </td>
- <th width="20%">车库单价</th>
- <td width="30%">
- <input class="easyui-numberbox" precision="2" required="true" type="text" id="garagePrice_update" name="commonHouseHelpOrder.garagePrice" >
- </td>
- </tr>
-
- <tr>
- <th width="20%">住宅总价</th>
- <td width="30%">
- <input class="easyui-numberbox" precision="2" readonly="readonly" required="true" type="text" id="houseMoney_update" name="commonHouseHelpOrder.houseMoney" >
- </td>
- <th width="20%">车库总价</th>
- <td width="30%">
- <input class="easyui-numberbox" precision="2" readonly="readonly" required="true" type="text" id="garageMoney_update" name="commonHouseHelpOrder.garageMoney" >
- </td>
- </tr>
-
- <tr>
- <th width="20%">房屋总价</th>
- <td colspan="3">
- <input class="easyui-numberbox" precision="2" required="true" type="text" id="totalMoney_update" name="commonHouseHelpOrder.totalMoney" >
- </td>
- </tr>
-
- <tr>
- <th width="20%">保障面积内政府产权比例</th>
- <td width="30%">
- <input class="easyui-numberbox" style="width:50px" precision="2" required="true" type="text" id="govPercent_update" name="commonHouseHelpOrder.govPercent" >%
- </td>
- <th width="20%">保障面积内个人产权比例</th>
- <td width="30%">
- <input class="easyui-numberbox" style="width:50px" precision="2" required="true" type="text" id="personPercent_update" name="commonHouseHelpOrder.personPercent" >%
- </td>
- </tr>
-
- <tr>
- <th width="20%">个人保障面积内金额</th>
- <td width="30%">
- <input class="easyui-numberbox" precision="2" required="true" type="text" id="personProtectMoney_update" name="commonHouseHelpOrder.personProtectMoney" >
- </td>
- <th width="20%">个人保障面积外金额</th>
- <td width="30%">
- <input class="easyui-numberbox" precision="2" required="true" type="text" id="personOutMoney_update" name="commonHouseHelpOrder.personOutMoney" >
- </td>
- </tr>
-
- <tr>
- <th width="20%">政府补贴金额</th>
- <td width="30%">
- <input class="easyui-numberbox" precision="2" required="true" type="text" id="govMoney_update" name="commonHouseHelpOrder.govMoney" >
- </td>
- <th width="20%">个人总金额</th>
- <td width="30%">
- <input class="easyui-numberbox" precision="2" required="true" type="text" id="personTotalMoney_update" name="commonHouseHelpOrder.personTotalMoney" >
- </td>
- </tr>
- </table>
- </div>
- <div title="购房人信息" id="grxx_update">
- <table class="mytable" style="width: 100%;">
- <tr>
- <th width="20%">申请人姓名</th>
- <td width="30%">
- <span id="name_update"></span>
-
- </td>
- <th width="20%">申请人身份证号</th>
- <td width="30%">
- <span id="idCard_update"></span>
- </td>
- </tr>
-
- <tr>
- <th>
- 人员类型
- </th>
- <td>
- <span id="personType_update"></span>
- </td>
- <th>
- 婚姻状况
- </th>
- <td>
- <span id="maritalStatus_update"></span>
- </td>
- </tr>
- <tr>
- <th>联系电话</th>
- <td >
- <span id="phone_update"></span>
- </td>
- <th>工作单位</th>
- <td >
- <span id="company_update"></span>
- </td>
- </tr>
- <tr>
- <th>
- 户口所在地
- </th>
- <td colspan = "3" >
- <span id="residence_update"></span>
- </td>
-
-
- </tr>
- <tr>
- <th>
- 户号
- </th>
- <td>
- <span id="residenceNo_update"></span>
- </td>
- <th>
- 取得市区户口年限
- </th>
- <td>
- <span id="residenceYear_update"></span>
- </td>
- </tr>
- <tr>
- <th>
- 家庭总人口数
- </th>
- <td>
- <span id="familyNum_update"></span>
- </td>
- <th>
- 享受低保人数
- </th>
- <td>
- <span id="securityNum_update_1"></span>
- </td>
- </tr>
- <tr>
- <th>
- 家庭人均收入
- </th>
- <td>
- <span id="avgIncome_update"></span>
- </td>
-
- <th>
- 保障类别
- </th>
- <td>
- <span id="applyType_update"></span>
- </td>
- </tr>
- </table>
- </div>
-
- <div title="同户籍家庭其他成员" id="qtcy_update">
-
- <table id="dg_update" title="同户籍家庭其他成员" >
-
- <thead frozen="true">
- <tr>
- <th data-options="field:'name',sortable:true,width:80,align:'center',editor:'textbox'">姓名</th>
- </tr>
- </thead>
- <thead>
- <tr>
- <th data-options="field:'relative',sortable:true,width:70,align:'center',formatter:relativeFormatter">与户主<br/>关系</th>
- <th data-options="field:'idCard',sortable:true,width:150,align:'center'">身份证号</th>
- <th data-options="field:'maritalStatus',sortable:true,width:70,align:'center',formatter:maritalStatusFormatter">婚姻状况</th>
- <th data-options="field:'residenceYear',sortable:true,width:70,align:'center'">获取市区<br/>户口年限</th>
- <th data-options="field:'company',sortable:true,width:150,align:'center'">工作单位</th>
- <th data-options="field:'income',sortable:true,width:80,align:'center'">年收入</th>
- <th data-options="field:'isInRange',sortable:true,width:70,align:'center',formatter:isInRangeFormatter">是否在<br/>保障范围</th>
- </tr>
- </thead>
- </table>
-
- </div>
-
-
- </div>
- </form>
|