housepurchase_info.js 78 KB

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