housepurchase_info.js 78 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570
  1. /**
  2. * 初始化购房补贴详情对话框
  3. */
  4. var HousepurchaseInfoDlg = {
  5. housepurchaseInfoData: {}
  6. };
  7. var locked = false;
  8. /**
  9. * 关闭此对话框
  10. */
  11. HousepurchaseInfoDlg.close = function () {
  12. parent.layer.close(window.parent.Housepurchase.layerIndex);
  13. }
  14. /**
  15. * 显示初审审核模态框
  16. */
  17. HousepurchaseInfoDlg.showFirstCheckModal = function () {
  18. var process = $("#process").val();
  19. var ajax = new $ax(Feng.ctxPath + "/admin/house/validateIsCheck", function (data) {
  20. if (data.code == 200) {
  21. layer.open({
  22. type: 1,
  23. id: "checkModel",
  24. title: '审核',
  25. area: ['800px', '450px'], //宽高
  26. fix: false, //不固定
  27. shade: 0,
  28. maxmin: true,
  29. content: HousepurchaseInfoDlg.createFirstCheckHtml(data.obj.number),
  30. btn: ['<i class="fa fa-save"></i>&nbsp;&nbsp;提交', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
  31. btnAlign: 'c',
  32. zIndex: layer.zIndex,
  33. success: function (layero, index) {
  34. layer.setTop(layero);
  35. var obj = data.obj.obj;
  36. var fileList = data.obj.fileTypeList;
  37. var html = '';
  38. for (var key in fileList) {
  39. html = html + '<ul><li style="width: 100%"><input type="checkbox" value="' + fileList[key].id + '"><span>' + fileList[key].name + '</span></li></ul>';
  40. }
  41. $("#field_file").empty().append(html);
  42. $("#checkForm")[0].reset();
  43. $("#checkStateFirstModal").val(obj.checkState).trigger("change");
  44. $("#checkMsgFirst").val(obj.checkMsg);
  45. if (Feng.isNotEmptyStr(obj.fields)) {
  46. $("#field_info input").each(function () {
  47. var arr = obj.fields.split(",");
  48. for (var key in arr) {
  49. if ($(this).val() == arr[key])
  50. this.checked = true;
  51. }
  52. });
  53. }
  54. if (Feng.isNotEmptyStr(obj.files)) {
  55. $("#field_file input").each(function () {
  56. if (obj.files.indexOf($(this).val()) != -1)
  57. this.checked = true;
  58. });
  59. }
  60. },
  61. yes: function (index, layero) {
  62. var checkState = $("#checkStateFirstModal").val();
  63. var checkMsg = $("#checkMsgFirst").val();
  64. if (checkState == null || checkState == '') {
  65. Feng.info("请选择审核状态");
  66. return;
  67. }
  68. if (checkMsg == null || checkMsg == '') {
  69. Feng.info("请填写审核意见");
  70. return;
  71. }
  72. var fields = '', files = '';
  73. $("#field_info li input").each(function (index) {
  74. if ($(this).is(":checked")) {
  75. fields = fields + $(this).val() + ",";
  76. }
  77. });
  78. $("#field_file li input").each(function (index) {
  79. if ($(this).is(":checked")) {
  80. files = files + $(this).val() + ",";
  81. }
  82. });
  83. if (checkState == 2 && fields == '' && files == '') {
  84. Feng.info("请选择可修改的字段或附件!");
  85. return;
  86. }
  87. if (locked)
  88. return;
  89. locked = true;
  90. var ajax = new $ax(Feng.ctxPath + "/admin/house/check", function (data) {
  91. if (data.code == 200) {
  92. layer.close(index);
  93. Feng.success(data.msg);
  94. } else {
  95. Feng.error(data.msg);
  96. }
  97. locked = false;
  98. }, function (data) {
  99. Feng.error("提交审核失败!" + data.responseJSON.message + "!");
  100. locked = false;
  101. });
  102. ajax.setData({
  103. "id": $("#id").val(), "checkState": checkState, "checkMsg": checkMsg,
  104. "process": $("#process").val(), "fields": fields, "files": files
  105. })
  106. ajax.start();
  107. }
  108. });
  109. } else {
  110. Feng.error(data.msg);
  111. }
  112. }, function (data) {
  113. Feng.error("校验失败!" + data.responseJSON.message + "!");
  114. });
  115. ajax.setData({"id": $("#id").val(), "process": process, "companyId": $("#companyId").val()})
  116. ajax.start();
  117. }
  118. /**
  119. * 显示各单位审核页面
  120. */
  121. HousepurchaseInfoDlg.showDepCheckModal = function () {
  122. var process = $("#process").val();
  123. var ajax = new $ax(Feng.ctxPath + "/admin/house/validateIsCheck", function (data) {
  124. if (data.code == 200) {
  125. var company = data.obj.company;
  126. var obj = data.obj.obj;
  127. layer.open({
  128. type: 1,
  129. id: "checkModel",
  130. title: company.name + '核查结果录入',
  131. area: ['800px', '450px'], //宽高
  132. fix: false, //不固定
  133. shade: 0,
  134. maxmin: true,
  135. content:
  136. "<form id=\"depForm\" class=\"form-horizontal\">\n" +
  137. '<div class="form-group" style="margin: 10px;">\n' +
  138. '<label for="checkMsg" class="control-label" >核查结果备注</label>\n' +
  139. '<textarea class="form-control" id="hcMsg" placeholder="" rows="6"></textarea>\n' +
  140. "</div>\n" +
  141. "</form>",
  142. btn: ['<i class="fa fa-save"></i>&nbsp;&nbsp;提交', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
  143. btnAlign: 'c',
  144. zIndex: layer.zIndex,
  145. success: function (layero, index) {
  146. layer.setTop(layero);
  147. if (company.code = CONFIG.COM_ZJJ)
  148. $("#hcMsg").val(obj.zjjCheckDetail);
  149. if (company.code = CONFIG.COM_ZRZYJ)
  150. $("#hcMsg").val(obj.zrzzjCheckDetail);
  151. if (company.code = CONFIG.COM_MZJ)
  152. $("#hcMsg").val(obj.mzjCheckDetail);
  153. },
  154. yes: function (index, layero) {
  155. var msg = $("#hcMsg").val();
  156. if (Feng.isEmptyStr(msg)) {
  157. Feng.info("请填写核查结果!");
  158. return;
  159. }
  160. var ajax = new $ax(Feng.ctxPath + "/admin/house/depCheck", function (data) {
  161. if (data.code == 200) {
  162. layer.close(index);
  163. Feng.success(data.msg);
  164. } else {
  165. Feng.error(data.msg);
  166. }
  167. }, function (data) {
  168. Feng.error("提交审核失败!" + data.responseJSON.message + "!");
  169. });
  170. ajax.setData({"id": $("#id").val(), "description": msg, "companyId": company.id})
  171. ajax.start();
  172. }
  173. });
  174. } else {
  175. Feng.error(data.msg);
  176. }
  177. }, function (data) {
  178. Feng.error("校验失败!" + data.responseJSON.message + "!");
  179. });
  180. ajax.setData({"id": $("#id").val(), "process": process, "companyId": $("#companyId").val()})
  181. ajax.start();
  182. }
  183. /**
  184. * 显示复核审核页面
  185. */
  186. HousepurchaseInfoDlg.showThirdCheckModal = function () {
  187. var process = $("#process").val();
  188. var ajax = new $ax(Feng.ctxPath + "/admin/house/validateIsCheck", function (data) {
  189. if (data.code == 200) {
  190. layer.open({
  191. type: 1,
  192. id: "checkModel",
  193. title: '审核',
  194. area: ['800px', '450px'], //宽高
  195. fix: false, //不固定
  196. shade: 0,
  197. maxmin: true,
  198. content: HousepurchaseInfoDlg.createThirdCheckHtml(),
  199. btn: ['<i class="fa fa-save"></i>&nbsp;&nbsp;提交', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
  200. btnAlign: 'c',
  201. zIndex: layer.zIndex,
  202. success: function (layero, index) {
  203. layer.setTop(layero);
  204. $('#toDep').chosen({width: '100%', placeholder_text_multiple: '请选择兑现对象'});
  205. $("#checkStateFirstModal").val(data.obj.obj.checkState);
  206. $("#checkMsgFirst").val(data.obj.obj.checkMsg);
  207. $("#toProcess").val(data.obj.obj.toProcess);
  208. $("#cashType").val(data.obj.obj.cashType).trigger("change");
  209. if (Feng.isNotEmptyStr(data.obj.obj.toDep)) {
  210. $("#toDep").val(data.obj.obj.toDep.split(",")).trigger("chosen:updated");
  211. }
  212. },
  213. yes: function (index, layero) {
  214. var checkState = $("#checkStateFirstModal").val();
  215. var checkMsg = $("#checkMsgFirst").val();
  216. var toProcess = $("#toProcess").val();
  217. var toDep = $("#toDep").val();
  218. var cashType = $("#cashType").val();
  219. if (checkState == null || checkState == '') {
  220. Feng.info("请选择审核状态");
  221. return;
  222. }
  223. if (checkMsg == null || checkMsg == '') {
  224. Feng.info("请填写审核意见");
  225. return;
  226. }
  227. if (checkState == 2) {
  228. if (Feng.isEmptyStr(toProcess)) {
  229. Feng.info("请选择驳回至流程");
  230. return;
  231. }
  232. if (toProcess == 2 && Feng.isEmptyStr(toDep)) {
  233. Feng.info("请选择驳回单位");
  234. return;
  235. }
  236. }
  237. if (checkState == 3 && Feng.isEmptyStr(cashType)) {
  238. Feng.info("请选择兑现状态");
  239. return;
  240. }
  241. var companyCodes = "", cashObjs = "";
  242. for (var key in toDep) {
  243. if (Feng.isNotEmptyStr(top[key])) {
  244. companyCodes = companyCodes + toDep[key] + ",";
  245. }
  246. }
  247. companyCodes = companyCodes.substring(0, companyCodes.length - 1);
  248. cashObjs = cashObjs.substring(0, cashObjs.length - 1);
  249. var ajax = new $ax(Feng.ctxPath + "/admin/house/check", function (data) {
  250. if (data.code == 200) {
  251. layer.close(index);
  252. Feng.success(data.msg);
  253. } else {
  254. Feng.error(data.msg);
  255. }
  256. }, function (data) {
  257. Feng.error("审核失败!" + data.responseJSON.message + "!");
  258. });
  259. ajax.setData({
  260. "id": $("#id").val(),
  261. "checkState": checkState,
  262. "checkMsg": checkMsg,
  263. "cashType": cashType,
  264. "process": $("#process").val(),
  265. "companyId": $("#companyId").val(),
  266. "toProcess": $("#toProcess").val(),
  267. "toDep": companyCodes
  268. });
  269. ajax.start();
  270. }
  271. });
  272. } else {
  273. Feng.error(data.msg);
  274. }
  275. }, function (data) {
  276. Feng.error("校验失败!" + data.responseJSON.message + "!");
  277. });
  278. ajax.setData({"id": $("#id").val(), "process": process, "companyId": $("#companyId").val()})
  279. ajax.start();
  280. }
  281. /**
  282. * 公示再审核保存数据
  283. */
  284. HousepurchaseInfoDlg.saveDepDataAtAfter = function () {
  285. }
  286. /**
  287. * 公示再审核提交
  288. */
  289. HousepurchaseInfoDlg.showAfterCheckModal = function () {
  290. var process = $("#process").val();
  291. var ajax = new $ax(Feng.ctxPath + "/admin/house/validateIsCheck", function (data) {
  292. if (data.code == 200) {
  293. layer.open({
  294. type: 1,
  295. id: "checkModel",
  296. title: '审核',
  297. area: ['800px', '450px'], //宽高
  298. fix: false, //不固定
  299. shade: 0,
  300. maxmin: true,
  301. content: HousepurchaseInfoDlg.createAfterCheckHtml(),
  302. btn: ['<i class="fa fa-save"></i>&nbsp;&nbsp;提交', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
  303. btnAlign: 'c',
  304. zIndex: layer.zIndex,
  305. success: function (layero, index) {
  306. layer.setTop(layero);
  307. var housepurchase = data.obj.housepurchase;
  308. $("#decideMoneyDetail").val(housepurchase.decideMoneyDetail);
  309. $("#realEnjoyMoney").val(housepurchase.realEnjoyMoney);
  310. },
  311. yes: function (index, layero) {
  312. var declareType = $("#declareType").val();
  313. var checkState = $("#checkStateFirstModal").val();
  314. var checkMsg = $("#checkMsgFirst").val();
  315. var cashType = $("#cashType").val();
  316. var decideMoneyDetail = $("#decideMoneyDetail").val();
  317. var shouldEnjoyMoney = $("#shouldEnjoyMoney").val();
  318. if (checkState == null || checkState == '') {
  319. Feng.info("请选择审核状态");
  320. return;
  321. }
  322. if (checkMsg == null || checkMsg == '') {
  323. Feng.info("请填写审核意见");
  324. return;
  325. }
  326. if (checkState == 3) {
  327. if (Feng.isEmptyStr(cashType)) {
  328. Feng.info("请选择兑现状态");
  329. return;
  330. }
  331. if (cashType == 1) {
  332. if (declareType == 1 && Feng.isEmptyStr(shouldEnjoyMoney)) {
  333. Feng.info("请填写应享受金额");
  334. return;
  335. }
  336. }
  337. }
  338. var cashObjs = "";
  339. cashObjs = cashObjs.substring(0, cashObjs.length - 1);
  340. var operation = function () {
  341. var ajax = new $ax(Feng.ctxPath + "/admin/house/afterCheck", function (data) {
  342. if (data.code == 200) {
  343. Feng.success(data.msg);
  344. layer.close(index);
  345. HousepurchaseInfoDlg.close();
  346. window.parent.Housepurchase.table.refresh();
  347. } else {
  348. Feng.error(data.msg);
  349. }
  350. }, function (data) {
  351. Feng.error("审核失败!" + data.responseJSON.message + "!");
  352. });
  353. ajax.setData({
  354. "id": $("#id").val(),
  355. "checkState": checkState,
  356. "checkMsg": checkMsg,
  357. "cashType": cashType,
  358. "decideMoneyDetail": decideMoneyDetail,
  359. "shouldEnjoyMoney": shouldEnjoyMoney
  360. });
  361. ajax.start();
  362. }
  363. Feng.confirm("一旦提交无法修改,是否审核完毕且无误?", operation);
  364. }
  365. });
  366. } else {
  367. Feng.error(data.msg);
  368. }
  369. }, function (data) {
  370. Feng.error("校验失败!" + data.responseJSON.message + "!");
  371. });
  372. ajax.setData({"id": $("#id").val(), "process": process, "companyId": $("#companyId").val()})
  373. ajax.start();
  374. }
  375. /**
  376. * 提交审核
  377. */
  378. HousepurchaseInfoDlg.submitCheck = function () {
  379. var operation = function () {
  380. var ajax = new $ax(Feng.ctxPath + "/admin/house/submitCheck", function (data) {
  381. if (data.code == 200) {
  382. Feng.success(data.msg);
  383. window.parent.Housepurchase.table.refresh();
  384. HousepurchaseInfoDlg.close();
  385. } else {
  386. Feng.error(data.msg);
  387. }
  388. }, function (data) {
  389. Feng.error("提交审核失败!" + data.responseJSON.message + "!");
  390. });
  391. ajax.setData({"id": $("#id").val(), "process": $("#process").val(), "companyId": $("#companyId").val()});
  392. ajax.start();
  393. }
  394. Feng.confirm("一旦提交无法修改,是否审核完毕且无误?", operation);
  395. }
  396. HousepurchaseInfoDlg.createFirstCheckHtml = function () {
  397. var declareType = $("#declareType").val();
  398. var field =
  399. // '<li style="width:10%"><input type="checkbox" value="phone"/><span>手机号码</span></li>\n' +
  400. '<li style="width:10%"><input type="checkbox" value="marryStatus"/><span>婚姻状态</span></li>\n' +
  401. '<li style="width:10%"><input type="checkbox" value="spouseName"/><span>配偶姓名</span></li>\n' +
  402. '<li style="width:20.5%"><input type="checkbox" value="spouseCardType"/><span>配偶证件类型</span></li>\n' +
  403. '<li style="width:20.5%"><input type="checkbox" value="spouseIdcard"/><span>配偶证件号码</span></li>\n' +
  404. '<li style="width:20.5%"><input type="checkbox" value="spouseIsLibrary"/><span>配偶是否在库人才</span></li>\n';
  405. if (declareType == 1) {
  406. field = field +
  407. '<li style="width:20.5%"><input type="checkbox" value="realEstateNo"/><span>不动产权证编号</span></li>\n' +
  408. '<li style="width:20.5%"><input type="checkbox" value="recordNo"/><span>备案合同编号</span></li>\n' +
  409. '<li style="width:20.5%"><input type="checkbox" value="houseAddress"/><span>房屋坐落地址</span></li>\n' +
  410. '<li style="width:20.5%"><input type="checkbox" value="houseArea"/><span>房屋建筑面积</span></li>\n' +
  411. '<li style="width:63%"><input type="checkbox" value="recordTime"/><span>商品房购房合同备案时间/不动产权证书办理时间</span></li>\n' +
  412. '<li style="width:20.5%"><input type="checkbox" value="houseMoney"/><span>房屋成交金额</span></li>\n' +
  413. '<li style="width:20.5%"><input type="checkbox" value="isEnjoyOther"/><span>是否享受我市其他政策</span></li>\n';
  414. }
  415. return '<form id="checkForm">\n' +
  416. ' <div class="form-group" style="margin: 10px;">\n' +
  417. ' <label for="checkState" class="control-label">审核状态</label>\n' +
  418. ' <select class="form-control" id="checkStateFirstModal" onchange="HousepurchaseInfoDlg.toggleField()">\n' +
  419. ' <option value="">请选择</option>\n' +
  420. ' <option value="3">审核通过</option>\n' +
  421. ' <option value="2">审核驳回</option>\n' +
  422. ' </select>\n' +
  423. ' </div>\n' +
  424. ' <div class="form-group" style="margin: 10px;">\n' +
  425. ' <label for="checkMsg" class="control-label" >审核意见</label>\n' +
  426. ' <textarea class="form-control" id="checkMsgFirst" placeholder="" rows="6"></textarea>\n' +
  427. ' <div id="field" style="padding-top: 5px;display: none">\n' +
  428. ' <label for="checkMsg" class="control-label">可修改字段</label>\n' +
  429. ' <div id="field_info">\n' +
  430. ' <ul>\n' +
  431. field +
  432. ' </ul>\n' +
  433. ' </div>\n' +
  434. ' <label for="checkMsg" class="control-label">可修改附件</label>\n' +
  435. ' <div id="field_file">\n' +
  436. ' </div>\n' +
  437. ' <div class="form-group" style="text-align: center">\n' +
  438. ' <button type="button" class="btn btn-primary" onclick="Feng.checkAll(\'field\')">全选</button>\n' +
  439. ' <button type="button" class="btn btn-success" onclick="Feng.unCheckAll(\'field\')">反选</button>\n' +
  440. ' </div>\n' +
  441. ' </div>\n' +
  442. ' </div>\n' +
  443. ' </form>';
  444. }
  445. /**
  446. * 公示在审核
  447. */
  448. HousepurchaseInfoDlg.createAfterCheckHtml = function () {
  449. var idCard = $("#idCard").val();
  450. var name = $("#name").val();
  451. var spouseName = $("#spouseName").val();
  452. var spouseIdcard = $("#spouseIdcard").val();
  453. var options = "<option value='" + idCard + "'>" + name + "</option>";
  454. if (Feng.isNotEmptyStr(spouseIdcard)) {
  455. options = options + "<option value='" + spouseIdcard + "'>" + spouseName + "</option>";
  456. }
  457. return '<form id="checkForm">\n' +
  458. '<div class="form-group" style="margin: 10px;">\n' +
  459. '<label for="checkState" class="control-label">审核状态</label>\n' +
  460. '<select class="form-control" id="checkStateFirstModal" onchange="HousepurchaseInfoDlg.afterToggleField(this)">\n' +
  461. '<option value="">请选择</option>\n' +
  462. '<option value="3">审核通过</option>\n' +
  463. '<option value="-1">审核不通过</option>\n' +
  464. '</select>\n' +
  465. '</div>\n' +
  466. '<div class="form-group" style="margin: 10px;">\n' +
  467. '<label for="checkMsg" class="control-label" >审核意见</label>\n' +
  468. '<textarea class="form-control" id="checkMsgFirst" placeholder="" rows="4"></textarea>\n' +
  469. '</div>\n' +
  470. '<div class="form-group" style="margin: 10px;" >\n' +
  471. '<label for="processLable" class=" control-label">兑现状态</label>\n' +
  472. '<select class="form-control" id="cashType" onchange="HousepurchaseInfoDlg.afterCashTypeChange()">\n' +
  473. '<option value="">请选择</option>\n' +
  474. '<option value="1">兑现</option>\n' +
  475. '<option value="2">不予兑现</option>\n' +
  476. '</select>\n' +
  477. '</div>\n' +
  478. '<div class="form-group" style="display: none;margin: 10px;" id="descideDesc">\n' +
  479. '<label for="processLable" class=" control-label">计算说明</label>\n' +
  480. '<textarea class="form-control" id="decideMoneyDetail" rows="4"></textarea>\n' +
  481. '</div>\n' +
  482. '<div class="form-group" style="display: none;margin: 10px;" id="moneyDiv">\n' +
  483. '<label for="processLable" class=" control-label">应该享受金额(不扣除其他政策金额前)</label>\n' +
  484. '<input class="form-control" id="shouldEnjoyMoney">\n' +
  485. '</div>\n' +
  486. '</form>';
  487. }
  488. HousepurchaseInfoDlg.afterToggleField = function (context) {
  489. var checkState = $(context).val();
  490. if (checkState == -1) {
  491. $("#cashType").attr("style", "pointer-events: none;background-color: #eee;").val(2).trigger("change");
  492. } else {
  493. $("#cashType").removeAttr("style").val("");
  494. }
  495. }
  496. HousepurchaseInfoDlg.afterCashTypeChange = function () {
  497. var declareType = $("#declareType").val();
  498. var cashType = $("#cashType").val();
  499. if (cashType == 1) {
  500. if (declareType == 1) {
  501. $("#descideDesc,#moneyDiv").css("display", "block");
  502. } else {
  503. $("#descideDesc,#moneyDiv").css("display", "none");
  504. }
  505. } else {
  506. $("#descideDesc,#moneyDiv").css("display", "none");
  507. $("#descideDesc,#moneyDiv").val("");
  508. }
  509. }
  510. /**
  511. * 复核页面
  512. */
  513. HousepurchaseInfoDlg.createThirdCheckHtml = function () {
  514. var idCard = $("#idCard").val();
  515. var name = $("#name").val();
  516. var spouseName = $("#spouseName").val();
  517. var spouseIdcard = $("#spouseIdcard").val();
  518. var options = "<option value='" + idCard + "'>" + name + "</option>";
  519. if (Feng.isNotEmptyStr(spouseIdcard)) {
  520. options = options + "<option value='" + spouseIdcard + "'>" + spouseName + "</option>";
  521. }
  522. return '<form id="checkForm">\n' +
  523. '<div class="form-group" style="margin: 10px;">\n' +
  524. '<label for="checkState" class="control-label">审核状态</label>\n' +
  525. '<select class="form-control" id="checkStateFirstModal" onchange="HousepurchaseInfoDlg.thirdToggleField()">\n' +
  526. '<option value="">请选择</option>\n' +
  527. '<option value="3">审核通过</option>\n' +
  528. '<option value="2">审核驳回</option>\n' +
  529. '<option value="-1">审核不通过</option>\n' +
  530. '</select>\n' +
  531. '</div>\n' +
  532. '<div class="form-group" style="margin: 10px;">\n' +
  533. '<label for="checkMsg" class="control-label" >审核意见</label>\n' +
  534. '<textarea class="form-control" id="checkMsgFirst" placeholder="" rows="6"></textarea>\n' +
  535. '</div>\n' +
  536. '<div class="form-group" style="display: none;margin: 10px;" id="cashTypeDiv">\n' +
  537. '<label for="processLable" class=" control-label">兑现状态</label>\n' +
  538. '<select class="form-control" id="cashType" onchange="HousepurchaseInfoDlg.cashTypeChange()">\n' +
  539. '<option value="">请选择</option>\n' +
  540. '<option value="1">兑现</option>\n' +
  541. '<option value="2">不予兑现</option>\n' +
  542. '</select>\n' +
  543. '</div>\n' +
  544. '<div class="form-group" style="display: none;margin: 10px;" id="toProcessDiv" >\n' +
  545. '<label for="processLable" class=" control-label">驳回至</label>\n' +
  546. '<select class="form-control" id="toProcess" >\n' +
  547. '<option value="">请选择</option>\n' +
  548. '<option value="1">初级审核</option>\n' +
  549. '<option value="2">部门审核</option>\n' +
  550. '</select>\n' +
  551. '</div>\n' +
  552. '<div class="form-group" style="display: none;margin: 10px;" id="toDepDiv" >\n' +
  553. '<label for="processLable" class=" control-label">驳回单位</label>\n' +
  554. '<select class="form-control" id="toDep" multiple>\n' +
  555. '<option value="">请选择</option>\n' +
  556. '<option value="' + CONFIG.COM_MZJ + '">民政局</option>\n' +
  557. '<option value="' + CONFIG.COM_ZRZYJ + '">自然资源局</option>\n' +
  558. '<option value="' + CONFIG.COM_ZJJ + '">住建局</option>\n' +
  559. '</select>\n' +
  560. '</div>\n' +
  561. '</form>';
  562. }
  563. /**
  564. * 显示字段或者隐藏字段选择
  565. */
  566. HousepurchaseInfoDlg.toggleField = function () {
  567. var checkState = $("#checkStateFirstModal").val();
  568. var process = $("#process").val();
  569. var checkMsgFirst = $("#checkMsgFirst").val();
  570. if (checkState == 2 && process == 1) {
  571. $("#field").show();
  572. $("#checkMsgFirst").val("");
  573. } else if (checkState == 3) {
  574. $("#field").hide();
  575. $("#field").find("input[type=checkbox]").removeAttr("checked");
  576. if (Feng.isEmptyStr(checkMsgFirst)) {
  577. $("#checkMsgFirst").val("审核通过");
  578. }
  579. } else if (checkState == -1) {
  580. $("#field").hide();
  581. $("#checkMsgFirst").val("审核不通过");
  582. }
  583. }
  584. /**
  585. * 复核状态变更
  586. */
  587. HousepurchaseInfoDlg.thirdToggleField = function () {
  588. var checkState = $("#checkStateFirstModal").val();
  589. if (checkState == -1) {
  590. $("#checkMsgFirst").val("审核不通过");
  591. $("#toProcess,#toDep,#cashType").val("");
  592. $("#toProcessDiv,#toDepDiv,#cashTypeDiv,#cashObjDiv").css("display", "none");
  593. }
  594. if (checkState == 2) {
  595. $("#checkMsgFirst").val("");
  596. $("#cashType").val("");
  597. $("#cashTypeDiv,#cashObjDiv").css("display", "none");
  598. $("#toProcessDiv,#toDepDiv").css("display", "block");
  599. }
  600. if (checkState == 3) {
  601. $("#checkMsgFirst").val("审核通过");
  602. $("#toProcess,#toDep").val("");
  603. $("#toProcessDiv,#toDepDiv").css("display", "none");
  604. $("#cashTypeDiv").css("display", "block");
  605. }
  606. }
  607. /**
  608. * 删除享受其他政策
  609. * @param context
  610. */
  611. HousepurchaseInfoDlg.deleteEnjoyOther = function (context) {
  612. var id = $(context).parent().next().find("input[name='id']").val()
  613. var pId = $(context).parent().next().find("input[name='pId']").val()
  614. if (Feng.isEmptyStr(id)) {
  615. $(context).parent().parent().remove();
  616. } else {
  617. var operation = function () {
  618. var ajax = new $ax(Feng.ctxPath + "/admin/house/validateIsCheck", function (data) {
  619. if (data.code == 200) {
  620. var ajax1 = new $ax(Feng.ctxPath + "/admin/house/deleteOtherOrHouse", function (data) {
  621. if (data.code == 200) {
  622. Feng.success(data.msg);
  623. $(context).parent().parent().remove();
  624. } else {
  625. Feng.info(data.msg);
  626. }
  627. }, function (data) {
  628. Feng.error("删除失败!" + data.responseJSON.message + "!");
  629. });
  630. ajax1.set("id", id);
  631. ajax1.set("type", 1);
  632. ajax1.start();
  633. } else {
  634. Feng.error(data.msg);
  635. }
  636. }, function (data) {
  637. Feng.error("校验失败!" + data.responseJSON.message + "!");
  638. });
  639. ajax.setData({"id": $("#id").val(), "process": $("#process").val(), "companyId": $("#companyId").val()})
  640. ajax.start();
  641. }
  642. Feng.confirm("一旦删除无法恢复,确认删除吗?", operation);
  643. }
  644. }
  645. /**
  646. * 删除其他房产信息
  647. * @param context
  648. */
  649. HousepurchaseInfoDlg.deleteOtherHouse = function (context) {
  650. var id = $(context).parent().next().find("input[name='id']").val()
  651. var pId = $(context).parent().next().find("input[name='pId']").val()
  652. if (Feng.isEmptyStr(id)) {
  653. $(context).parent().parent().remove();
  654. } else {
  655. var operation = function () {
  656. var ajax = new $ax(Feng.ctxPath + "/admin/house/validateIsCheck", function (data) {
  657. if (data.code == 200) {
  658. var ajax1 = new $ax(Feng.ctxPath + "/admin/house/deleteOtherOrHouse", function (data) {
  659. if (data.code == 200) {
  660. Feng.success(data.msg);
  661. $(context).parent().parent().remove();
  662. } else {
  663. Feng.info(data.msg);
  664. }
  665. }, function (data) {
  666. Feng.error("删除失败!" + data.responseJSON.message + "!");
  667. });
  668. ajax1.set("id", id);
  669. ajax1.set("type", 2);
  670. ajax1.start();
  671. } else {
  672. Feng.error(data.msg);
  673. }
  674. }, function (data) {
  675. Feng.error("校验失败!" + data.responseJSON.message + "!");
  676. });
  677. ajax.setData({"id": $("#id").val(), "process": $("#process").val(), "companyId": $("#companyId").val()})
  678. ajax.start();
  679. }
  680. Feng.confirm("一旦删除无法恢复,确认删除吗?", operation);
  681. }
  682. }
  683. /**
  684. * 删除配偶信息
  685. * @param context
  686. */
  687. HousepurchaseInfoDlg.deleteSpouse = function (context) {
  688. var id = $(context).parent().next().find("input[name='id']").val()
  689. if (Feng.isEmptyStr(id)) {
  690. $(context).parent().parent().remove();
  691. } else {
  692. var operation = function () {
  693. var ajax = new $ax(Feng.ctxPath + "/admin/house/validateIsCheck", function (data) {
  694. if (data.code == 200) {
  695. var ajax1 = new $ax(Feng.ctxPath + "/admin/house/deleteSpouse", function (data) {
  696. if (data.code == 200) {
  697. Feng.success(data.msg);
  698. $(context).parent().parent().remove();
  699. } else {
  700. Feng.info(data.msg);
  701. }
  702. }, function (data) {
  703. Feng.error("删除失败!" + data.responseJSON.message + "!");
  704. });
  705. ajax1.set("id", id);
  706. ajax1.start();
  707. } else {
  708. Feng.error(data.msg);
  709. }
  710. }, function (data) {
  711. Feng.error("校验失败!" + data.responseJSON.message + "!");
  712. });
  713. ajax.setData({"id": $("#id").val(), "process": $("#process").val(), "companyId": $("#companyId").val()})
  714. ajax.start();
  715. }
  716. Feng.confirm("一旦删除无法恢复,确认删除吗?", operation);
  717. }
  718. }
  719. /***
  720. * 保存部门内审核录入数据
  721. */
  722. HousepurchaseInfoDlg.saveDepCheckData = function () {
  723. var companyCode = $("#companyCode").val();
  724. var mainId = $("#id").val();
  725. var declareType = $("#declareType").val();
  726. var error = "";
  727. var obj = null;
  728. switch (companyCode) {
  729. case CONFIG.COM_ZJJ:
  730. var enjoyOtherObject = new Array();
  731. var otherHouseObject = new Array();
  732. var checkIsTradeRecord = $("#zjjData").find("select[name='checkIsTradeRecord']").val();
  733. var checkRecordTime = $("#zjjData").find("input[name='checkRecordTime']").val();
  734. var zjjCheckDetail = $("#zjjData").find("input[name='zjjCheckDetail']").val();
  735. if (declareType == 1) {
  736. if (Feng.isEmptyStr(checkIsTradeRecord)) {
  737. Feng.info("请选择是否交易备案");
  738. return;
  739. }
  740. if (checkIsTradeRecord == 1 && Feng.isEmptyStr(checkRecordTime)) {
  741. Feng.info("请选填写交易备案时间");
  742. return;
  743. }
  744. }
  745. var error = HousepurchaseInfoDlg.getZjjData(enjoyOtherObject, otherHouseObject);
  746. if (Feng.isNotEmptyStr(error)) {
  747. Feng.info(error);
  748. return;
  749. }
  750. obj = {
  751. "id": mainId,
  752. "companyId": $("#companyId").val(),
  753. "checkIsTradeRecord": checkIsTradeRecord,
  754. "checkRecordTime": checkRecordTime,
  755. "zjjCheckDetail": zjjCheckDetail,
  756. "otherList": enjoyOtherObject,
  757. "houseList": otherHouseObject
  758. };
  759. var ajax = new $ax(Feng.ctxPath + "/admin/house/zjjCheck", function (data) {
  760. if (data.code == 200) {
  761. HousepurchaseInfoDlg.initZzj(data.obj.otherList, data.obj.houseList);
  762. Feng.success(data.msg);
  763. } else {
  764. Feng.info(data.msg);
  765. }
  766. }, function (data) {
  767. Feng.error("提交失败!" + data.responseJSON.message + "!");
  768. });
  769. ajax.setcontentType("application/json;charset=utf-8");
  770. ajax.setData(JSON.stringify(obj));
  771. ajax.start();
  772. break;
  773. case CONFIG.COM_ZRZYJ:
  774. var otherHouseObject = new Array();
  775. var isHasBdcCard = $("#isHasBdcCard").val();
  776. var bdcRegistTime = $("#bdcRegistTime").val();
  777. var isOwner = $("#isOwner").val();
  778. var transferMethod = $("#transferMethod").val();
  779. var transferTime = $("#transferTime").val();
  780. var zrzzjCheckDetail = $("#zrzzjCheckDetail").val();
  781. if (declareType == 1) {
  782. if (Feng.isEmptyStr(isHasBdcCard)) {
  783. Feng.info("请选择是否已办理不动产权证");
  784. return;
  785. }
  786. if (isHasBdcCard == 1 && Feng.isEmptyStr(bdcRegistTime)) {
  787. Feng.info("请填写不动产权证书登记时间");
  788. return;
  789. }
  790. if (Feng.isEmptyStr(isOwner)) {
  791. Feng.info("请选择其购置的房屋是否还在名下");
  792. return;
  793. }
  794. if (isOwner == 2 && Feng.isEmptyStr(transferMethod)) {
  795. Feng.info("请填写过户方式");
  796. return;
  797. }
  798. if (isOwner == 2 && Feng.isEmptyStr(transferTime)) {
  799. Feng.info("请填写过户时间");
  800. return;
  801. }
  802. }
  803. var error = HousepurchaseInfoDlg.getZrzyjData(otherHouseObject);
  804. if (Feng.isNotEmptyStr(error)) {
  805. Feng.info(error);
  806. return;
  807. }
  808. obj = {
  809. "id": mainId,
  810. "companyId": $("#companyId").val(),
  811. "isHasBdcCard": isHasBdcCard,
  812. "bdcRegistTime": bdcRegistTime,
  813. "isOwner": isOwner,
  814. "transferMethod": transferMethod,
  815. "transferTime": transferTime,
  816. "zrzzjCheckDetail": zrzzjCheckDetail,
  817. "houseList": otherHouseObject
  818. };
  819. var ajax = new $ax(Feng.ctxPath + "/admin/house/zrzyjCheck", function (data) {
  820. if (data.code == 200) {
  821. HousepurchaseInfoDlg.initZrzyj(data.obj.houseList);
  822. Feng.success(data.msg);
  823. } else {
  824. Feng.info(data.msg);
  825. }
  826. }, function (data) {
  827. Feng.error("提交失败!" + data.responseJSON.message + "!");
  828. });
  829. ajax.setcontentType("application/json;charset=utf-8");
  830. ajax.setData(JSON.stringify(obj));
  831. ajax.start();
  832. break;
  833. case CONFIG.COM_MZJ:
  834. var spouseObj = new Array();
  835. var mzjCheckDetail = $("#mzjCheckDetail").val();
  836. $("#mzjMarryData .panel-body").each(function (index) {
  837. var id = $(this).find("input[name='id']").val();
  838. var pId = $(this).find("input[name='pId']").val();
  839. var type = $(this).find("select[name='type']").val();
  840. var name = $(this).find("input[name='name']").val();
  841. var registerTime = $(this).find("input[name='registerTime']").val();
  842. var idCard = $(this).find("input[name='idCard']").val();
  843. // var description = $(this).find("input[name='description']").val();
  844. if (Feng.isNotEmptyStr(id) || Feng.isNotEmptyStr(pId) || Feng.isNotEmptyStr(type) || Feng.isNotEmptyStr(name) ||
  845. Feng.isNotEmptyStr(registerTime) || Feng.isNotEmptyStr(idCard)) {
  846. if (Feng.isEmptyStr(type)) {
  847. error = error + "婚姻状况" + (index + 1) + "登记类型为空;\n";
  848. }
  849. if (Feng.isEmptyStr(name)) {
  850. error = error + "婚姻状况" + (index + 1) + "配偶姓名为空;\n";
  851. }
  852. if (Feng.isEmptyStr(idCard)) {
  853. error = error + "婚姻状况" + (index + 1) + "配偶证件号码为空;\n";
  854. }
  855. if (Feng.isEmptyStr(registerTime)) {
  856. error = error + "婚姻状况" + (index + 1) + "登记时间为空;\n";
  857. } else if (!/^\d{4}-\d{2}-\d{2}$/.test(registerTime)) {
  858. error = error + "房产信息" + (index + 1) + "登记时间格式不正确;\n";
  859. }
  860. spouseObj.push({
  861. "id": id,
  862. "type": type,
  863. "name": name,
  864. "registerTime": registerTime,
  865. "idCard": idCard
  866. });
  867. }
  868. });
  869. if (Feng.isNotEmptyStr(error)) {
  870. Feng.info(error);
  871. return;
  872. }
  873. obj = {
  874. "id": mainId,
  875. "companyId": $("#companyId").val(),
  876. "mzjCheckDetail": mzjCheckDetail,
  877. "spouseList": spouseObj
  878. };
  879. var ajax = new $ax(Feng.ctxPath + "/admin/house/mzjCheck", function (data) {
  880. if (data.code == 200) {
  881. HousepurchaseInfoDlg.initMzj(data.obj.spouseList);
  882. Feng.success(data.msg);
  883. } else {
  884. Feng.info(data.msg);
  885. }
  886. }, function (data) {
  887. Feng.error("提交失败!" + data.responseJSON.message + "!");
  888. });
  889. ajax.setcontentType("application/json;charset=utf-8");
  890. ajax.setData(JSON.stringify(obj));
  891. ajax.start();
  892. break;
  893. break;
  894. }
  895. }
  896. HousepurchaseInfoDlg.getZjjData = function (enjoyOtherObject, otherHouseObject) {
  897. var error = "";
  898. $("#zzjOtherBody .panel-body").not(".history").each(function (index) {
  899. var id = $(this).find("input[name='id']").val();
  900. var pId = $(this).find("input[name='pId']").val();
  901. var name = $(this).find("input[name='name']").val();
  902. var idCard = $(this).find("input[name='idCard']").val();
  903. var houseAddress = $(this).find("input[name='houseAddress']").val();
  904. var recordNo = $(this).find("input[name='recordNo']").val();
  905. var enjoyPolicyName = $(this).find("input[name='enjoyPolicyName']").val();
  906. var money = $(this).find("input[name='money']").val();
  907. var enjoyTime = $(this).find("input[name='enjoyTime']").val();
  908. var description = $(this).find("input[name='description']").val();
  909. if (Feng.isNotEmptyStr(id) || Feng.isNotEmptyStr(pId) || Feng.isNotEmptyStr(name) || Feng.isNotEmptyStr(houseAddress) || Feng.isNotEmptyStr(idCard) ||
  910. Feng.isNotEmptyStr(recordNo) || Feng.isNotEmptyStr(enjoyPolicyName) || Feng.isNotEmptyStr(money) || Feng.isNotEmptyStr(enjoyTime)) {
  911. if (Feng.isEmptyStr(name)) {
  912. error = error + "享受其他政策" + (index + 1) + ")享受人姓名为空;\n";
  913. }
  914. if (Feng.isEmptyStr(idCard)) {
  915. error = error + "享受其他政策" + (index + 1) + ")享受人证件号码为空;\n";
  916. }
  917. if (Feng.isEmptyStr(houseAddress)) {
  918. error = error + "享受其他政策" + (index + 1) + "房屋坐落地址为空;\n";
  919. }
  920. if (Feng.isEmptyStr(recordNo)) {
  921. error = error + "享受其他政策" + (index + 1) + "合同编号为空;\n";
  922. }
  923. if (Feng.isEmptyStr(enjoyPolicyName)) {
  924. error = error + "享受其他政策" + (index + 1) + "享受政策名称为空;\n";
  925. }
  926. if (Feng.isEmptyStr(money)) {
  927. error = error + "享受其他政策" + (index + 1) + "补贴发放金额为空;\n";
  928. } else if (!/^([1-9][0-9]*)+(\.[0-9]{1,10})?$/.test(money)) {
  929. error = error + "享受其他政策" + (index + 1) + "金额格式不正确;\n";
  930. }
  931. if (Feng.isEmptyStr(enjoyTime)) {
  932. error = error + "享受其他政策" + (index + 1) + "发放时间为空;\n";
  933. } else if (!/^\d{4}-\d{2}-\d{2}$/.test(enjoyTime)) {
  934. error = error + "享受其他政策" + (index + 1) + "发放时间格式不正确;\n";
  935. }
  936. enjoyOtherObject.push({
  937. "id": id,
  938. "pId": pId,
  939. "name": name,
  940. "idCard": idCard,
  941. "houseAddress": houseAddress,
  942. "recordNo": recordNo,
  943. "enjoyPolicyName": enjoyPolicyName,
  944. "money": money,
  945. "description": description,
  946. "enjoyTime": enjoyTime
  947. });
  948. }
  949. });
  950. if (Feng.isNotEmptyStr(error)) {
  951. return error;
  952. }
  953. $("#zzjOtherHouse .panel-body").each(function (index) {
  954. var error = "";
  955. var id = $(this).find("input[name='id']").val();
  956. var pId = $(this).find("input[name='pId']").val();
  957. var type = $(this).find("input[name='type']").val();
  958. var name = $(this).find("input[name='name']").val();
  959. var idCard = $(this).find("input[name='idCard']").val();
  960. var number = $(this).find("input[name='number']").val();
  961. var houseAddress = $(this).find("input[name='houseAddress']").val();
  962. var area = $(this).find("input[name='area']").val();
  963. var recordTime = $(this).find("input[name='recordTime']").val();
  964. var tradeMethod = $(this).find("input[name='tradeMethod']").val();
  965. var description = $(this).find("input[name='description']").val();
  966. if (Feng.isNotEmptyStr(id) || Feng.isNotEmptyStr(pId) || Feng.isNotEmptyStr(type) || Feng.isNotEmptyStr(name) || Feng.isNotEmptyStr(number) || Feng.isNotEmptyStr(idCard) ||
  967. Feng.isNotEmptyStr(houseAddress) || Feng.isNotEmptyStr(area) || Feng.isNotEmptyStr(recordTime) || Feng.isNotEmptyStr(tradeMethod)) {
  968. if (Feng.isEmptyStr(name)) {
  969. error = error + "其他房产信息" + (index + 1) + "购房人姓名为空;\n";
  970. }
  971. if (Feng.isEmptyStr(idCard)) {
  972. error = error + "其他房产信息" + (index + 1) + "购房人证件号码为空;\n";
  973. }
  974. if (Feng.isEmptyStr(number)) {
  975. error = error + "其他房产信息" + (index + 1) + "合同编号为空;\n";
  976. }
  977. if (Feng.isEmptyStr(houseAddress)) {
  978. error = error + "其他房产信息" + (index + 1) + "房屋坐落地址为空;\n";
  979. }
  980. if (Feng.isEmptyStr(area)) {
  981. error = error + "其他房产信息" + (index + 1) + "面积为空;\n";
  982. } else if (!/^([1-9][0-9]*)+(\.[0-9]{0,10})?$/.test(area)) {
  983. error = error + "其他房产信息" + (index + 1) + "面积格式不正确;\n";
  984. }
  985. if (Feng.isEmptyStr(recordTime)) {
  986. error = error + "其他房产信息记录中第" + (index + 1) + "交易备案时间为空;\n";
  987. } else if (!/^\d{4}-\d{2}-\d{2}$/.test(recordTime)) {
  988. error = error + "其他房产信息" + (index + 1) + "交易备案时间格式不正确;\n";
  989. }
  990. if (Feng.isEmptyStr(tradeMethod)) {
  991. error = error + "其他房产信息" + (index + 1) + "交易方式为空;\n";
  992. }
  993. otherHouseObject.push({
  994. "id": id,
  995. "type": type,
  996. "name": name,
  997. "idCard": idCard,
  998. "number": number,
  999. "houseAddress": houseAddress,
  1000. "area": area,
  1001. "recordTime": recordTime,
  1002. "tradeMethod": tradeMethod,
  1003. "description": description
  1004. });
  1005. }
  1006. });
  1007. if (Feng.isNotEmptyStr(error)) {
  1008. return error;
  1009. }
  1010. return null;
  1011. }
  1012. HousepurchaseInfoDlg.getZrzyjData = function (otherHouseObject) {
  1013. var error = "";
  1014. $("#zrzyOtherHouse .panel-body").each(function (index) {
  1015. var id = $(this).find("input[name='id']").val();
  1016. var pId = $(this).find("input[name='pId']").val();
  1017. var type = $(this).find("input[name='type']").val();
  1018. var name = $(this).find("input[name='name']").val();
  1019. var idCard = $(this).find("input[name='idCard']").val();
  1020. var houseAddress = $(this).find("input[name='houseAddress']").val();
  1021. var number = $(this).find("input[name='number']").val();
  1022. var area = $(this).find("input[name='area']").val();
  1023. var recordTime = $(this).find("input[name='recordTime']").val();
  1024. var description = $(this).find("input[name='description']").val();
  1025. if (Feng.isNotEmptyStr(id) || Feng.isNotEmptyStr(pId) || Feng.isNotEmptyStr(type) || Feng.isNotEmptyStr(name) || Feng.isNotEmptyStr(idCard) ||
  1026. Feng.isNotEmptyStr(houseAddress) || Feng.isNotEmptyStr(area) || Feng.isNotEmptyStr(recordTime) || Feng.isNotEmptyStr(number)) {
  1027. if (Feng.isEmptyStr(name)) {
  1028. error = error + "房产信息" + (index + 1) + "产权人姓名为空;\n";
  1029. }
  1030. if (Feng.isEmptyStr(idCard)) {
  1031. error = error + "房产信息" + (index + 1) + "产权人证件号码为空;\n";
  1032. }
  1033. if (Feng.isEmptyStr(houseAddress)) {
  1034. error = error + "房产信息" + (index + 1) + "房屋坐落地址为空;\n";
  1035. }
  1036. if (Feng.isEmptyStr(area)) {
  1037. error = error + "房产信息" + (index + 1) + "面积为空;\n";
  1038. } else if (!/^([1-9][0-9]*)+(\.[0-9]{1,10})?$/.test(area)) {
  1039. error = error + "其他房产信息" + (index + 1) + "面积格式不正确;\n";
  1040. }
  1041. if (Feng.isEmptyStr(recordTime)) {
  1042. error = error + "房产信息" + (index + 1) + "房屋登记时间为空;\n";
  1043. } else if (!/^\d{4}-\d{2}-\d{2}$/.test(recordTime)) {
  1044. error = error + "房产信息" + (index + 1) + "房屋登记时间格式不正确;\n";
  1045. }
  1046. otherHouseObject.push({
  1047. "id": id,
  1048. "type": type,
  1049. "name": name,
  1050. "idCard": idCard,
  1051. "houseAddress": houseAddress,
  1052. "area": area,
  1053. "recordTime": recordTime,
  1054. "number": number,
  1055. "description": description
  1056. });
  1057. }
  1058. });
  1059. if (Feng.isNotEmptyStr(error)) {
  1060. return error;
  1061. }
  1062. return null;
  1063. }
  1064. /**
  1065. * 公示再审核修改住建局、自然资源局录入数据
  1066. */
  1067. HousepurchaseInfoDlg.afterCheckEdit = function () {
  1068. var mainId = $("#id").val();
  1069. var declareType = $("#declareType").val();
  1070. var enjoyOtherObject = new Array();
  1071. var zjjOtherHouseObject = new Array();
  1072. var zrzyjOtherHouseObject = new Array();
  1073. var checkIsTradeRecord = $("#zjjData").find("select[name='checkIsTradeRecord']").val();
  1074. var checkRecordTime = $("#zjjData").find("input[name='checkRecordTime']").val();
  1075. var zjjCheckDetail = $("#zjjData").find("input[name='zjjCheckDetail']").val();
  1076. if (declareType == 1) {
  1077. if (Feng.isEmptyStr(checkIsTradeRecord)) {
  1078. Feng.info("请选择是否交易备案");
  1079. return;
  1080. }
  1081. if (checkIsTradeRecord == 1 && Feng.isEmptyStr(checkRecordTime)) {
  1082. Feng.info("请选填写交易备案时间");
  1083. return;
  1084. }
  1085. }
  1086. var error = HousepurchaseInfoDlg.getZjjData(enjoyOtherObject, zjjOtherHouseObject);
  1087. if (Feng.isNotEmptyStr(error)) {
  1088. Feng.info(error);
  1089. return;
  1090. }
  1091. var isHasBdcCard = $("#isHasBdcCard").val();
  1092. var bdcRegistTime = $("#bdcRegistTime").val();
  1093. var isOwner = $("#isOwner").val();
  1094. var transferMethod = $("#transferMethod").val();
  1095. var transferTime = $("#transferTime").val();
  1096. var zrzzjCheckDetail = $("#zrzzjCheckDetail").val();
  1097. if (declareType == 1) {
  1098. if (Feng.isEmptyStr(isHasBdcCard)) {
  1099. Feng.info("请选择是否已办理不动产权证");
  1100. return;
  1101. }
  1102. if (isHasBdcCard == 1 && Feng.isEmptyStr(bdcRegistTime)) {
  1103. Feng.info("请填写不动产权证书登记时间");
  1104. return;
  1105. }
  1106. if (Feng.isEmptyStr(isOwner)) {
  1107. Feng.info("请选择其购置的房屋是否还在名下");
  1108. return;
  1109. }
  1110. if (isOwner == 2 && Feng.isEmptyStr(transferMethod)) {
  1111. Feng.info("请填写过户方式");
  1112. return;
  1113. }
  1114. if (isOwner == 2 && Feng.isEmptyStr(transferTime)) {
  1115. Feng.info("请填写过户时间");
  1116. return;
  1117. }
  1118. }
  1119. error = HousepurchaseInfoDlg.getZrzyjData(zrzyjOtherHouseObject);
  1120. if (Feng.isNotEmptyStr(error)) {
  1121. Feng.info(error);
  1122. return;
  1123. }
  1124. var obj = {
  1125. "id": mainId,
  1126. "checkIsTradeRecord": checkIsTradeRecord,
  1127. "checkRecordTime": checkRecordTime,
  1128. "zjjCheckDetail": zjjCheckDetail,
  1129. "isHasBdcCard": isHasBdcCard,
  1130. "bdcRegistTime": bdcRegistTime,
  1131. "isOwner": isOwner,
  1132. "transferMethod": transferMethod,
  1133. "transferTime": transferTime,
  1134. "zrzzjCheckDetail": zrzzjCheckDetail,
  1135. "zjjHouseList": zjjOtherHouseObject,
  1136. "zrzyjHouseList": zrzyjOtherHouseObject,
  1137. "otherList": enjoyOtherObject
  1138. };
  1139. var ajax = new $ax(Feng.ctxPath + "/admin/house/afterCheckEdit", function (data) {
  1140. if (data.code == 200) {
  1141. HousepurchaseInfoDlg.initZzj(data.obj.otherList, data.obj.zjjOtherHouseObject);
  1142. HousepurchaseInfoDlg.initZrzyj(data.obj.zrzyjOtherHouseObject);
  1143. Feng.success(data.msg);
  1144. } else {
  1145. Feng.info(data.msg);
  1146. }
  1147. }, function (data) {
  1148. Feng.error("提交失败!" + data.responseJSON.message + "!");
  1149. });
  1150. ajax.setcontentType("application/json;charset=utf-8");
  1151. ajax.setData(JSON.stringify(obj));
  1152. ajax.start();
  1153. }
  1154. HousepurchaseInfoDlg.initZzj = function (otherList, houseList) {
  1155. if (otherList != null) {
  1156. var html = "";
  1157. for (var key in otherList) {
  1158. html = html +
  1159. '<div class="panel panel-default" >\n' +
  1160. ' <div class="panel-heading">\n' +
  1161. ' <span class="caret" onclick="$(this).parent().next().toggle()"></span>\n' +
  1162. ' <span class="houseTitle" >' + otherList[key].enjoyPolicyName + '</span>\n' +
  1163. ' <button type="button" class="close" aria-label="Close" style="float: right" onclick="HousepurchaseInfoDlg.deleteEnjoyOther(this)">\n' +
  1164. ' <span aria-hidden="true">&times;</span>\n' +
  1165. ' </button>\n' +
  1166. ' </div>\n' +
  1167. ' <div class="panel-body">\n' +
  1168. ' <div class="col-sm-12">\n' +
  1169. ' <div class="rowGroup col-sm-3">\n' +
  1170. ' <input type="hidden" name="id" value="' + otherList[key].id + '"/>\n' +
  1171. ' <input type="hidden" name="pId" value="' + otherList[key].pId + '"/>\n' +
  1172. ' <label class="control-label spacing">享受人姓名</label>\n' +
  1173. ' <input type="text" class="form-control" name="name" value="' + otherList[key].name + '"/>\n' +
  1174. ' </div>\n' +
  1175. ' <div class="rowGroup col-sm-3">\n' +
  1176. ' <label class="control-label spacing">享受人证件号码</label>\n' +
  1177. ' <input type="text" class="form-control" name="idCard" value="' + otherList[key].idCard + '"/>\n' +
  1178. ' </div>\n' +
  1179. ' <div class="rowGroup col-sm-3">\n' +
  1180. ' <label class="control-label spacing">房屋坐落地址</label>\n' +
  1181. ' <input type="text" class="form-control" name="houseAddress" value="' + otherList[key].houseAddress + '"/>\n' +
  1182. ' </div>\n' +
  1183. ' <div class="rowGroup col-sm-3">\n' +
  1184. ' <label class="control-label spacing">合同编号</label>\n' +
  1185. ' <input type="text" class="form-control" name="recordNo" value="' + otherList[key].recordNo + '"/>\n' +
  1186. ' </div>\n' +
  1187. ' <div class="rowGroup col-sm-3">\n' +
  1188. ' <label class="control-label spacing">享受政策名称(例:XX年度第X批XX购房补助)</label>\n' +
  1189. ' <input type="text" class="form-control" name="enjoyPolicyName" placeholder="例:XX年度第X批XX购房补助" value="' + otherList[key].enjoyPolicyName + '" onchange="$(this).parent().parent().parent().parent().find(\'.houseTitle\').text($(this).val())"/>\n' +
  1190. ' </div>\n' +
  1191. ' <div class="rowGroup col-sm-3">\n' +
  1192. ' <label class="control-label spacing">补贴发放金额(元)</label>\n' +
  1193. ' <input type="text" class="form-control" name="money" value="' + otherList[key].money + '"/>\n' +
  1194. ' </div>\n' +
  1195. ' <div class="rowGroup col-sm-3">\n' +
  1196. ' <label class="control-label spacing">发放时间</label>\n' +
  1197. ' <input type="text" class="form-control date" name="enjoyTime" value="' + otherList[key].enjoyTime + '"/>\n' +
  1198. ' </div>\n' +
  1199. ' <div class="rowGroup col-sm-3">\n' +
  1200. ' <label class="control-label spacing">备注</label>\n' +
  1201. ' <input type="text" class="form-control" name="description" value="' + otherList[key].description + '"/>\n' +
  1202. ' </div>\n' +
  1203. ' </div>\n' +
  1204. ' </div>\n' +
  1205. ' </div>';
  1206. }
  1207. $("#zzjOtherBody .panel-default").not(".history").remove();
  1208. $("#zzjOtherBody").append(html);
  1209. }
  1210. if (houseList != null) {
  1211. var html = "";
  1212. for (var key in houseList) {
  1213. html = html +
  1214. '<div class="panel panel-default">\n' +
  1215. ' <div class="panel-heading">\n' +
  1216. ' <span class="caret" onclick="$(this).parent().next().toggle()"></span>\n' +
  1217. ' <span class="houseTitle" >' + houseList[key].houseAddress + '</span>\n' +
  1218. ' <button type="button" class="close" aria-label="Close" style="float: right" onclick="HousepurchaseInfoDlg.deleteOtherHouse(this)">\n' +
  1219. ' <span aria-hidden="true">&times;</span>\n' +
  1220. ' </button>\n' +
  1221. ' </div>\n' +
  1222. ' <div class="panel-body">\n' +
  1223. ' <div class="col-sm-12">\n' +
  1224. ' <input type="hidden" name="id" value="' + houseList[key].id + '"/>\n' +
  1225. ' <input type="hidden" name="pId" value="' + houseList[key].pId + '"/>\n' +
  1226. ' <input type="hidden" name="type" value="' + houseList[key].type + '"/>\n' +
  1227. ' <div class="rowGroup col-sm-3">\n' +
  1228. ' <label class="control-label spacing">购房人姓名</label>\n' +
  1229. ' <input type="text" class="form-control" name="name" value="' + houseList[key].name + '"/>\n' +
  1230. ' </div>\n' +
  1231. ' <div class="rowGroup col-sm-3">\n' +
  1232. ' <label class="control-label spacing">购房人证件号码</label>\n' +
  1233. ' <input type="text" class="form-control" name="idCard" value="' + houseList[key].idCard + '"/>\n' +
  1234. ' </div>\n' +
  1235. ' <div class="rowGroup col-sm-3">\n' +
  1236. ' <label class="control-label spacing">房屋坐落地址</label>\n' +
  1237. ' <input type="text" class="form-control" name="houseAddress" value="' + houseList[key].houseAddress + '" onchange="$(this).parent().parent().parent().parent().find(\'.houseTitle\').text($(this).val())"/>\n' +
  1238. ' </div>\n' +
  1239. ' <div class="rowGroup col-sm-3">\n' +
  1240. ' <label class="control-label spacing">合同编号</label>\n' +
  1241. ' <input type="text" class="form-control" name="number" value="' + houseList[key].number + '"/>\n' +
  1242. ' </div>\n' +
  1243. ' <div class="rowGroup col-sm-3">\n' +
  1244. ' <label class="control-label spacing">面积(m2)</label>\n' +
  1245. ' <input type="text" class="form-control" name="area" value="' + houseList[key].area + '"/>\n' +
  1246. ' </div>\n' +
  1247. ' <div class="rowGroup col-sm-3">\n' +
  1248. ' <label class="control-label spacing">交易备案时间</label>\n' +
  1249. ' <input type="text" class="form-control date" name="recordTime" value="' + houseList[key].recordTime + '"/>\n' +
  1250. ' </div>\n' +
  1251. ' <div class="rowGroup col-sm-3">\n' +
  1252. ' <label class="control-label spacing">交易方式(购买、出售、签约注销、备案注销等)</label>\n' +
  1253. ' <input type="text" class="form-control" name="tradeMethod" value="' + houseList[key].tradeMethod + '"/>\n' +
  1254. ' </div>\n' +
  1255. ' <div class="rowGroup col-sm-3">\n' +
  1256. ' <label class="control-label spacing">备注</label>\n' +
  1257. ' <input type="text" class="form-control" name="description" value="' + houseList[key].description + '"/>\n' +
  1258. ' </div>\n' +
  1259. ' </div>\n' +
  1260. ' </div>\n' +
  1261. ' </div>';
  1262. }
  1263. $("#zzjOtherHouse").empty().append(html);
  1264. }
  1265. }
  1266. HousepurchaseInfoDlg.initZrzyj = function (houseList) {
  1267. if (houseList != null) {
  1268. var html = "";
  1269. for (var key in houseList) {
  1270. html = html +
  1271. '<div class="panel panel-default">\n' +
  1272. ' <div class="panel-heading">\n' +
  1273. ' <span class="caret" onclick="$(this).parent().next().toggle()"></span>\n' +
  1274. ' <span class="houseTitle">' + houseList[key].houseAddress + '</span>\n' +
  1275. ' <button type="button" class="close" aria-label="Close" style="float: right" onclick="HousepurchaseInfoDlg.deleteOtherHouse(this)">\n' +
  1276. ' <span aria-hidden="true">&times;</span>\n' +
  1277. ' </button>\n' +
  1278. ' </div>\n' +
  1279. ' <div class="panel-body">\n' +
  1280. ' <div class="col-sm-12">\n' +
  1281. ' <input type="hidden" name="id" value="' + houseList[key].id + '"/>\n' +
  1282. ' <input type="hidden" name="pId" value="' + houseList[key].pId + '"/>\n' +
  1283. ' <input type="hidden" name="type" value="' + houseList[key].type + '"/>\n' +
  1284. ' <div class="rowGroup col-sm-3">\n' +
  1285. ' <label class="control-label spacing">产权人姓名</label>\n' +
  1286. ' <input type="text" class="form-control" name="name" value="' + houseList[key].name + '"/>\n' +
  1287. ' </div>\n' +
  1288. ' <div class="rowGroup col-sm-3">\n' +
  1289. ' <label class="control-label spacing">产权人证件号码</label>\n' +
  1290. ' <input type="text" class="form-control" name="idCard" value="' + houseList[key].idCard + '"/>\n' +
  1291. ' </div>\n' +
  1292. ' <div class="rowGroup col-sm-3">\n' +
  1293. ' <label class="control-label spacing">房屋坐落地址</label>\n' +
  1294. ' <input type="text" class="form-control" name="houseAddress" value="' + houseList[key].houseAddress + '" onchange="$(this).parent().parent().parent().parent().find(\'.houseTitle\').text($(this).val())"/>\n' +
  1295. ' </div>\n' +
  1296. ' <div class="rowGroup col-sm-3">\n' +
  1297. ' <label class="control-label spacing">不动产权号</label>\n' +
  1298. ' <input type="text" class="form-control" name="number" value="' + houseList[key].number + '"/>\n' +
  1299. ' </div>\n' +
  1300. ' <div class="rowGroup col-sm-3">\n' +
  1301. ' <label class="control-label spacing">面积(m2)</label>\n' +
  1302. ' <input type="text" class="form-control" name="area" value="' + houseList[key].area + '"/>\n' +
  1303. ' </div>\n' +
  1304. ' <div class="rowGroup col-sm-3">\n' +
  1305. ' <label class="control-label spacing">房屋登记时间</label>\n' +
  1306. ' <input type="text" class="form-control date" name="recordTime" value="' + houseList[key].recordTime + '"/>\n' +
  1307. ' </div>\n' +
  1308. ' <div class="rowGroup col-sm-3">\n' +
  1309. ' <label class="control-label spacing">备注</label>\n' +
  1310. ' <input type="text" class="form-control" name="description" value="' + houseList[key].description + '"/>\n' +
  1311. ' </div>\n' +
  1312. ' </div>\n' +
  1313. ' </div>\n' +
  1314. ' </div>'
  1315. }
  1316. $("#zrzyOtherHouse").empty().append(html);
  1317. }
  1318. }
  1319. HousepurchaseInfoDlg.initMzj = function (spouseList) {
  1320. if (spouseList != null) {
  1321. var html = "";
  1322. for (var key in spouseList) {
  1323. html = html +
  1324. '<div class="panel panel-default">\n' +
  1325. ' <div class="panel-heading">\n' +
  1326. ' <span class="caret" onclick="$(this).parent().next().toggle()"></span>\n' +
  1327. ' <span class="houseTitle">' + spouseList[key].registerTime + '</span>\n' +
  1328. ' <button type="button" class="close" aria-label="Close" style="float: right" onclick="HousepurchaseInfoDlg.deleteSpouse(this)">\n' +
  1329. ' <span aria-hidden="true">&times;</span>\n' +
  1330. ' </button>\n' +
  1331. ' </div>\n' +
  1332. ' <div class="panel-body">\n' +
  1333. ' <div class="col-sm-12">\n' +
  1334. ' <input type="hidden" name="id" />\n' +
  1335. ' <input type="hidden" name="pId" />\n' +
  1336. ' <div class="rowGroup col-sm-3">\n' +
  1337. ' <label class="control-label spacing">登记类型</label>\n' +
  1338. ' <select type="text" class="form-control" name="type" value="' + spouseList[key].type + '">\n' +
  1339. ' <option value="">请选择</option>\n' +
  1340. ' <option value="1">初婚</option>\n' +
  1341. ' <option value="2">复婚</option>\n' +
  1342. ' <option value="3">再婚</option>\n' +
  1343. ' <option value="4">离婚</option>\n' +
  1344. ' </select>\n' +
  1345. ' </div>\n' +
  1346. ' <div class="rowGroup col-sm-3">\n' +
  1347. ' <label class="control-label spacing">登记时间</label>\n' +
  1348. ' <input type="text" class="form-control date" name="registerTime" value="' + spouseList[key].registerTime + '"/>\n' +
  1349. ' </div>\n' +
  1350. ' <div class="rowGroup col-sm-3">\n' +
  1351. ' <label class="control-label spacing">配偶姓名</label>\n' +
  1352. ' <input type="text" class="form-control" name="name" value="' + spouseList[key].name + '"/>\n' +
  1353. ' </div>\n' +
  1354. ' <div class="rowGroup col-sm-3">\n' +
  1355. ' <label class="control-label spacing">配偶证件号码</label>\n' +
  1356. ' <input type="text" class="form-control" name="idCard" value="' + spouseList[key].idCard + '"/>\n' +
  1357. ' </div>\n' +
  1358. ' </div>\n' +
  1359. ' </div>\n' +
  1360. ' </div>'
  1361. }
  1362. $("#mzjMarryData").empty().append(html);
  1363. $("select").each(function () {
  1364. $(this).val($(this).attr("value"));
  1365. });
  1366. }
  1367. }
  1368. HousepurchaseInfoDlg.initDate = function () {
  1369. $(".date").removeAttr('lay-key');
  1370. $(".date").each(function () {
  1371. laydate.render({
  1372. elem: this
  1373. , type: 'date'
  1374. , trigger: 'click'
  1375. });
  1376. });
  1377. }
  1378. $(function () {
  1379. $("select").each(function () {
  1380. $(this).val($(this).attr("value"));
  1381. });
  1382. Feng.getCheckLog("logTable", {
  1383. "type": CONFIG.project_house,
  1384. "mainId": $("#id").val(),
  1385. "typeFileId": "",
  1386. "active": 1
  1387. })
  1388. HousepurchaseInfoDlg.initDate();
  1389. Feng.showMiniFileModal(CONFIG.project_house, $("#type").val(), $("#id").val());
  1390. initNoBtnFileTable(CONFIG.project_house, 'fileTable');
  1391. var declareType = $("#declareType").val();
  1392. if (declareType == 1) {
  1393. $('#historyTable').bootstrapTable({
  1394. url: Feng.ctxPath + "/admin/house/getHistoryRecord?id=" + $("#id").val(),
  1395. method: 'POST',
  1396. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  1397. search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
  1398. showRefresh: false, // 是否显示刷新按钮
  1399. clickToSelect: true, // 是否启用点击选中行
  1400. singleSelect: true, // 设置True 将禁止多选
  1401. striped: true, // 是否显示行间隔色
  1402. pagination: false, // 设置为 true 会在表格底部显示分页条
  1403. paginationHAlign: "left",
  1404. paginationDetailHAlign: "right",
  1405. sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
  1406. showColumns: false,
  1407. rowStyle: function (row, index) {
  1408. return {
  1409. css: {
  1410. "word-break": "break-word",
  1411. "white-space": "inherit"
  1412. }
  1413. }
  1414. },
  1415. columns:
  1416. [
  1417. {
  1418. title: '年度',
  1419. field: 'year',
  1420. visible: true,
  1421. align: 'center',
  1422. valign: 'middle',
  1423. width: "80px",
  1424. 'class': 'uitd_showTip',
  1425. },
  1426. {
  1427. title: '姓名',
  1428. field: 'name',
  1429. visible: true,
  1430. align: 'center',
  1431. valign: 'middle',
  1432. width: "100px",
  1433. 'class': 'uitd_showTip'
  1434. },
  1435. {
  1436. title: '证件号码',
  1437. field: 'idCard',
  1438. visible: true,
  1439. align: 'center',
  1440. valign: 'middle',
  1441. width: "150px",
  1442. 'class': 'uitd_showTip'
  1443. },
  1444. {
  1445. title: '婚姻状态',
  1446. field: 'marryStatusName',
  1447. visible: true,
  1448. align: 'center',
  1449. valign: 'middle',
  1450. width: "100px",
  1451. 'class': 'uitd_showTip'
  1452. },
  1453. {
  1454. title: '配偶姓名',
  1455. field: 'spouseName',
  1456. visible: true,
  1457. align: 'center',
  1458. valign: 'middle',
  1459. width: "100px",
  1460. 'class': 'uitd_showTip'
  1461. },
  1462. {
  1463. title: '配偶证件号码',
  1464. field: 'spouseIdcard',
  1465. visible: true,
  1466. align: 'center',
  1467. valign: 'middle',
  1468. width: "100px",
  1469. 'class': 'uitd_showTip'
  1470. },
  1471. {
  1472. title: '房屋地址',
  1473. field: 'houseAddress',
  1474. visible: true,
  1475. align: 'center',
  1476. valign: 'middle',
  1477. width: "100px",
  1478. 'class': 'uitd_showTip'
  1479. },
  1480. {
  1481. title: '房屋建筑面积',
  1482. field: 'houseArea',
  1483. visible: true,
  1484. align: 'center',
  1485. valign: 'middle',
  1486. width: "100px",
  1487. 'class': 'uitd_showTip'
  1488. },
  1489. {
  1490. title: '房源成交金额',
  1491. field: 'houseMoney',
  1492. visible: true,
  1493. align: 'center',
  1494. valign: 'middle',
  1495. width: "100px",
  1496. 'class': 'uitd_showTip'
  1497. },
  1498. {
  1499. title: '计算结果',
  1500. field: 'realEnjoyMoney',
  1501. visible: true,
  1502. align: 'center',
  1503. valign: 'middle',
  1504. 'class': 'uitd_showTip',
  1505. width: "100px",
  1506. formatter: function (value, row, index) {
  1507. if (row.cashType == 1 && row.declareType == 1) {
  1508. var html = "1.可享受总金额(首套房产金额):" + (parseFloat(row.totalMoney) / 10000).toFixed(2) +
  1509. "万元</br>2.个人余额(未扣除本次):" + (parseFloat(row.balanceMoney) / 10000).toFixed(2) +
  1510. "万元</br>3.房产余额(未扣除本次):" + (parseFloat(row.houseBalanceMoney) / 10000).toFixed(2) +
  1511. "万元</br>4.上一年度未扣除其他政策金额:" + (parseFloat(row.lastOtherMoney) / 10000).toFixed(2) +
  1512. "万元</br>5.本年度新增享受其他政策金额:" + (parseFloat(row.nowOtherMoney) / 10000).toFixed(2) +
  1513. "万元</br>6.本年度人才层次可享受金额:" + (parseFloat(row.talentArrangeMoney) / 10000).toFixed(2) +
  1514. "万元</br>7.本年度应享受金额(2,3,6比较得到):" + (parseFloat(row.shouldEnjoyMoney) / 10000).toFixed(2) +
  1515. "万元</br>8.本年度扣除享受其他政策金额:" + (parseFloat(row.nowSubOtherMoney) / 10000).toFixed(2) +
  1516. "万元</br>9.本年度未扣除享受其他政策金额:" + (parseFloat(row.nowNotSubOtherMoney) / 10000).toFixed(2) +
  1517. "万元</br>10.本年度最终可到账金额:" + (parseFloat(row.realEnjoyMoney) / 10000).toFixed(2) + "万元";
  1518. return "<span class='label label-success' onclick=\"layer.alert('" + html + "', {title:'计算结果', skin: 'layui-layer-molv',closeBtn: 0})\" >" +
  1519. "<i class=\"fa fa-book\"></i>查看" +
  1520. "</span>";
  1521. } else {
  1522. return "无";
  1523. }
  1524. }
  1525. }
  1526. ]
  1527. ,
  1528. onPostBody: function () {
  1529. $('#' + id + "td.uitd_showTip").bind("mouseover", function () {
  1530. var htm = $(this).html();
  1531. $(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show');
  1532. });
  1533. }
  1534. });
  1535. }
  1536. });