housepurchase_info.js 76 KB

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