housepurchase_info.js 79 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595
  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. var error = HousepurchaseInfoDlg.getMzjData(spouseObj);
  843. if (Feng.isNotEmptyStr(error)) {
  844. Feng.info(error);
  845. return;
  846. }
  847. obj = {
  848. "id": mainId,
  849. "companyId": $("#companyId").val(),
  850. "mzjCheckDetail": mzjCheckDetail,
  851. "spouseList": spouseObj
  852. };
  853. var ajax = new $ax(Feng.ctxPath + "/admin/house/mzjCheck", function (data) {
  854. if (data.code == 200) {
  855. HousepurchaseInfoDlg.initMzj(data.obj.spouseList);
  856. Feng.success(data.msg);
  857. } else {
  858. Feng.info(data.msg);
  859. }
  860. }, function (data) {
  861. Feng.error("提交失败!" + data.responseJSON.message + "!");
  862. });
  863. ajax.setcontentType("application/json;charset=utf-8");
  864. ajax.setData(JSON.stringify(obj));
  865. ajax.start();
  866. break;
  867. break;
  868. }
  869. }
  870. HousepurchaseInfoDlg.getZjjData = function (enjoyOtherObject, otherHouseObject) {
  871. var error = "";
  872. $("#zzjOtherBody .panel-body").not(".history").each(function (index) {
  873. var id = $(this).find("input[name='id']").val();
  874. var pId = $(this).find("input[name='pId']").val();
  875. var name = $(this).find("input[name='name']").val();
  876. var idCard = $(this).find("input[name='idCard']").val();
  877. var houseAddress = $(this).find("input[name='houseAddress']").val();
  878. var recordNo = $(this).find("input[name='recordNo']").val();
  879. var enjoyPolicyName = $(this).find("input[name='enjoyPolicyName']").val();
  880. var money = $(this).find("input[name='money']").val();
  881. var enjoyTime = $(this).find("input[name='enjoyTime']").val();
  882. var description = $(this).find("input[name='description']").val();
  883. if (Feng.isNotEmptyStr(id) || Feng.isNotEmptyStr(pId) || Feng.isNotEmptyStr(name) || Feng.isNotEmptyStr(houseAddress) || Feng.isNotEmptyStr(idCard) ||
  884. Feng.isNotEmptyStr(recordNo) || Feng.isNotEmptyStr(enjoyPolicyName) || Feng.isNotEmptyStr(money) || Feng.isNotEmptyStr(enjoyTime)) {
  885. if (Feng.isEmptyStr(name)) {
  886. error = error + "享受其他政策" + (index + 1) + ")享受人姓名为空;\n";
  887. }
  888. if (Feng.isEmptyStr(idCard)) {
  889. error = error + "享受其他政策" + (index + 1) + ")享受人证件号码为空;\n";
  890. }
  891. if (Feng.isEmptyStr(houseAddress)) {
  892. error = error + "享受其他政策" + (index + 1) + "房屋坐落地址为空;\n";
  893. }
  894. if (Feng.isEmptyStr(recordNo)) {
  895. error = error + "享受其他政策" + (index + 1) + "合同编号为空;\n";
  896. }
  897. if (Feng.isEmptyStr(enjoyPolicyName)) {
  898. error = error + "享受其他政策" + (index + 1) + "享受政策名称为空;\n";
  899. }
  900. if (Feng.isEmptyStr(money)) {
  901. error = error + "享受其他政策" + (index + 1) + "补贴发放金额为空;\n";
  902. } else if (!/^([1-9][0-9]*)+(\.[0-9]{1,10})?$/.test(money)) {
  903. error = error + "享受其他政策" + (index + 1) + "金额格式不正确;\n";
  904. }
  905. if (Feng.isEmptyStr(enjoyTime)) {
  906. error = error + "享受其他政策" + (index + 1) + "发放时间为空;\n";
  907. } else if (!/^\d{4}-\d{2}-\d{2}$/.test(enjoyTime)) {
  908. error = error + "享受其他政策" + (index + 1) + "发放时间格式不正确;\n";
  909. }
  910. enjoyOtherObject.push({
  911. "id": id,
  912. "pId": pId,
  913. "name": name,
  914. "idCard": idCard,
  915. "houseAddress": houseAddress,
  916. "recordNo": recordNo,
  917. "enjoyPolicyName": enjoyPolicyName,
  918. "money": money,
  919. "description": description,
  920. "enjoyTime": enjoyTime
  921. });
  922. }
  923. });
  924. if (Feng.isNotEmptyStr(error)) {
  925. return error;
  926. }
  927. $("#zzjOtherHouse .panel-body").each(function (index) {
  928. var error = "";
  929. var id = $(this).find("input[name='id']").val();
  930. var pId = $(this).find("input[name='pId']").val();
  931. var type = $(this).find("input[name='type']").val();
  932. var name = $(this).find("input[name='name']").val();
  933. var idCard = $(this).find("input[name='idCard']").val();
  934. var number = $(this).find("input[name='number']").val();
  935. var houseAddress = $(this).find("input[name='houseAddress']").val();
  936. var area = $(this).find("input[name='area']").val();
  937. var recordTime = $(this).find("input[name='recordTime']").val();
  938. var tradeMethod = $(this).find("input[name='tradeMethod']").val();
  939. var description = $(this).find("input[name='description']").val();
  940. if (Feng.isNotEmptyStr(id) || Feng.isNotEmptyStr(pId) || Feng.isNotEmptyStr(type) || Feng.isNotEmptyStr(name) || Feng.isNotEmptyStr(number) || Feng.isNotEmptyStr(idCard) ||
  941. Feng.isNotEmptyStr(houseAddress) || Feng.isNotEmptyStr(area) || Feng.isNotEmptyStr(recordTime) || Feng.isNotEmptyStr(tradeMethod)) {
  942. if (Feng.isEmptyStr(name)) {
  943. error = error + "其他房产信息" + (index + 1) + "购房人姓名为空;\n";
  944. }
  945. if (Feng.isEmptyStr(idCard)) {
  946. error = error + "其他房产信息" + (index + 1) + "购房人证件号码为空;\n";
  947. }
  948. if (Feng.isEmptyStr(number)) {
  949. error = error + "其他房产信息" + (index + 1) + "合同编号为空;\n";
  950. }
  951. if (Feng.isEmptyStr(houseAddress)) {
  952. error = error + "其他房产信息" + (index + 1) + "房屋坐落地址为空;\n";
  953. }
  954. if (Feng.isEmptyStr(area)) {
  955. error = error + "其他房产信息" + (index + 1) + "面积为空;\n";
  956. } else if (!/^([1-9][0-9]*)+(\.[0-9]{0,10})?$/.test(area)) {
  957. error = error + "其他房产信息" + (index + 1) + "面积格式不正确;\n";
  958. }
  959. if (Feng.isEmptyStr(recordTime)) {
  960. error = error + "其他房产信息记录中第" + (index + 1) + "交易备案时间为空;\n";
  961. } else if (!/^\d{4}-\d{2}-\d{2}$/.test(recordTime)) {
  962. error = error + "其他房产信息" + (index + 1) + "交易备案时间格式不正确;\n";
  963. }
  964. if (Feng.isEmptyStr(tradeMethod)) {
  965. error = error + "其他房产信息" + (index + 1) + "交易方式为空;\n";
  966. }
  967. otherHouseObject.push({
  968. "id": id,
  969. "type": type,
  970. "name": name,
  971. "idCard": idCard,
  972. "number": number,
  973. "houseAddress": houseAddress,
  974. "area": area,
  975. "recordTime": recordTime,
  976. "tradeMethod": tradeMethod,
  977. "description": description
  978. });
  979. }
  980. });
  981. if (Feng.isNotEmptyStr(error)) {
  982. return error;
  983. }
  984. return null;
  985. }
  986. HousepurchaseInfoDlg.getMzjData = function (mzjSpouseList) {
  987. var error = "";
  988. $("#mzjMarryData .panel-body").each(function (index) {
  989. var id = $(this).find("input[name='id']").val();
  990. var pId = $(this).find("input[name='pId']").val();
  991. var type = $(this).find("select[name='type']").val();
  992. var registerTime = $(this).find("input[name='registerTime']").val();
  993. var name = $(this).find("input[name='name']").val();
  994. var idCard = $(this).find("input[name='idCard']").val();
  995. if (Feng.isNotEmptyStr(id) || Feng.isNotEmptyStr(pId) || Feng.isNotEmptyStr(type) || Feng.isNotEmptyStr(name) || Feng.isNotEmptyStr(idCard) ||
  996. Feng.isNotEmptyStr(registerTime)) {
  997. if (Feng.isEmptyStr(type)) {
  998. error = error + "婚姻状况" + (index + 1) + "没有选择登记类型;\n";
  999. }
  1000. if (Feng.isEmptyStr(registerTime)) {
  1001. error = error + "婚姻状况" + (index + 1) + "登记时间为空;\n";
  1002. }
  1003. if (Feng.isEmptyStr(name)) {
  1004. error = error + "婚姻状况" + (index + 1) + "配偶姓名为空;\n";
  1005. }
  1006. if (Feng.isEmptyStr(idCard)) {
  1007. error = error + "婚姻状况" + (index + 1) + "配偶证件号码为空;\n";
  1008. } else if (!/^\d{4}-\d{2}-\d{2}$/.test(registerTime)) {
  1009. error = error + "婚姻状况" + (index + 1) + "登记时间格式不正确;\n";
  1010. }
  1011. mzjSpouseList.push({
  1012. "id": id,
  1013. "type": type,
  1014. "registerTime": registerTime,
  1015. "name": name,
  1016. "idCard": idCard
  1017. });
  1018. }
  1019. });
  1020. if (Feng.isNotEmptyStr(error)) {
  1021. return error;
  1022. }
  1023. return null;
  1024. }
  1025. HousepurchaseInfoDlg.getZrzyjData = function (otherHouseObject) {
  1026. var error = "";
  1027. $("#zrzyOtherHouse .panel-body").each(function (index) {
  1028. var id = $(this).find("input[name='id']").val();
  1029. var pId = $(this).find("input[name='pId']").val();
  1030. var type = $(this).find("input[name='type']").val();
  1031. var name = $(this).find("input[name='name']").val();
  1032. var idCard = $(this).find("input[name='idCard']").val();
  1033. var houseAddress = $(this).find("input[name='houseAddress']").val();
  1034. var number = $(this).find("input[name='number']").val();
  1035. var area = $(this).find("input[name='area']").val();
  1036. var recordTime = $(this).find("input[name='recordTime']").val();
  1037. var description = $(this).find("input[name='description']").val();
  1038. if (Feng.isNotEmptyStr(id) || Feng.isNotEmptyStr(pId) || Feng.isNotEmptyStr(type) || Feng.isNotEmptyStr(name) || Feng.isNotEmptyStr(idCard) ||
  1039. Feng.isNotEmptyStr(houseAddress) || Feng.isNotEmptyStr(area) || Feng.isNotEmptyStr(recordTime) || Feng.isNotEmptyStr(number)) {
  1040. if (Feng.isEmptyStr(name)) {
  1041. error = error + "房产信息" + (index + 1) + "产权人姓名为空;\n";
  1042. }
  1043. if (Feng.isEmptyStr(idCard)) {
  1044. error = error + "房产信息" + (index + 1) + "产权人证件号码为空;\n";
  1045. }
  1046. if (Feng.isEmptyStr(houseAddress)) {
  1047. error = error + "房产信息" + (index + 1) + "房屋坐落地址为空;\n";
  1048. }
  1049. if (Feng.isEmptyStr(area)) {
  1050. error = error + "房产信息" + (index + 1) + "面积为空;\n";
  1051. } else if (!/^([1-9][0-9]*)+(\.[0-9]{1,10})?$/.test(area)) {
  1052. error = error + "其他房产信息" + (index + 1) + "面积格式不正确;\n";
  1053. }
  1054. if (Feng.isEmptyStr(recordTime)) {
  1055. error = error + "房产信息" + (index + 1) + "房屋登记时间为空;\n";
  1056. } else if (!/^\d{4}-\d{2}-\d{2}$/.test(recordTime)) {
  1057. error = error + "房产信息" + (index + 1) + "房屋登记时间格式不正确;\n";
  1058. }
  1059. otherHouseObject.push({
  1060. "id": id,
  1061. "type": type,
  1062. "name": name,
  1063. "idCard": idCard,
  1064. "houseAddress": houseAddress,
  1065. "area": area,
  1066. "recordTime": recordTime,
  1067. "number": number,
  1068. "description": description
  1069. });
  1070. }
  1071. });
  1072. if (Feng.isNotEmptyStr(error)) {
  1073. return error;
  1074. }
  1075. return null;
  1076. }
  1077. /**
  1078. * 公示再审核修改住建局、自然资源局录入数据
  1079. */
  1080. HousepurchaseInfoDlg.afterCheckEdit = function () {
  1081. var mainId = $("#id").val();
  1082. var declareType = $("#declareType").val();
  1083. var enjoyOtherObject = new Array();
  1084. var mzjSpouseList = new Array();
  1085. var zjjOtherHouseObject = new Array();
  1086. var zrzyjOtherHouseObject = new Array();
  1087. var checkIsTradeRecord = $("#zjjData").find("select[name='checkIsTradeRecord']").val();
  1088. var checkRecordTime = $("#zjjData").find("input[name='checkRecordTime']").val();
  1089. var zjjCheckDetail = $("#zjjData").find("input[name='zjjCheckDetail']").val();
  1090. var mzjCheckDetail = $("#mzjCheckDetail").val();
  1091. var error = HousepurchaseInfoDlg.getMzjData(mzjSpouseList);
  1092. if (Feng.isNotEmptyStr(error)) {
  1093. Feng.info(error);
  1094. return;
  1095. }
  1096. if (declareType == 1) {
  1097. if (Feng.isEmptyStr(checkIsTradeRecord)) {
  1098. Feng.info("请选择是否交易备案");
  1099. return;
  1100. }
  1101. if (checkIsTradeRecord == 1 && Feng.isEmptyStr(checkRecordTime)) {
  1102. Feng.info("请选填写交易备案时间");
  1103. return;
  1104. }
  1105. }
  1106. var error = HousepurchaseInfoDlg.getZjjData(enjoyOtherObject, zjjOtherHouseObject);
  1107. if (Feng.isNotEmptyStr(error)) {
  1108. Feng.info(error);
  1109. return;
  1110. }
  1111. var isHasBdcCard = $("#isHasBdcCard").val();
  1112. var bdcRegistTime = $("#bdcRegistTime").val();
  1113. var isOwner = $("#isOwner").val();
  1114. var transferMethod = $("#transferMethod").val();
  1115. var transferTime = $("#transferTime").val();
  1116. var zrzzjCheckDetail = $("#zrzzjCheckDetail").val();
  1117. if (declareType == 1) {
  1118. if (Feng.isEmptyStr(isHasBdcCard)) {
  1119. Feng.info("请选择是否已办理不动产权证");
  1120. return;
  1121. }
  1122. if (isHasBdcCard == 1 && Feng.isEmptyStr(bdcRegistTime)) {
  1123. Feng.info("请填写不动产权证书登记时间");
  1124. return;
  1125. }
  1126. if (Feng.isEmptyStr(isOwner)) {
  1127. Feng.info("请选择其购置的房屋是否还在名下");
  1128. return;
  1129. }
  1130. if (isOwner == 2 && Feng.isEmptyStr(transferMethod)) {
  1131. Feng.info("请填写过户方式");
  1132. return;
  1133. }
  1134. if (isOwner == 2 && Feng.isEmptyStr(transferTime)) {
  1135. Feng.info("请填写过户时间");
  1136. return;
  1137. }
  1138. }
  1139. error = HousepurchaseInfoDlg.getZrzyjData(zrzyjOtherHouseObject);
  1140. if (Feng.isNotEmptyStr(error)) {
  1141. Feng.info(error);
  1142. return;
  1143. }
  1144. var obj = {
  1145. "id": mainId,
  1146. "checkIsTradeRecord": checkIsTradeRecord,
  1147. "checkRecordTime": checkRecordTime,
  1148. "zjjCheckDetail": zjjCheckDetail,
  1149. "isHasBdcCard": isHasBdcCard,
  1150. "bdcRegistTime": bdcRegistTime,
  1151. "isOwner": isOwner,
  1152. "transferMethod": transferMethod,
  1153. "transferTime": transferTime,
  1154. "zrzzjCheckDetail": zrzzjCheckDetail,
  1155. "zjjHouseList": zjjOtherHouseObject,
  1156. "zrzyjHouseList": zrzyjOtherHouseObject,
  1157. "mzjCheckDetail": mzjCheckDetail,
  1158. "mzjSpouseList": mzjSpouseList,
  1159. "otherList": enjoyOtherObject
  1160. };
  1161. var ajax = new $ax(Feng.ctxPath + "/admin/house/afterCheckEdit", function (data) {
  1162. if (data.code == 200) {
  1163. HousepurchaseInfoDlg.initZzj(data.obj.otherList, data.obj.zjjOtherHouseObject);
  1164. HousepurchaseInfoDlg.initZrzyj(data.obj.zrzyjOtherHouseObject);
  1165. Feng.success(data.msg);
  1166. } else {
  1167. Feng.info(data.msg);
  1168. }
  1169. }, function (data) {
  1170. Feng.error("提交失败!" + data.responseJSON.message + "!");
  1171. });
  1172. ajax.setcontentType("application/json;charset=utf-8");
  1173. ajax.setData(JSON.stringify(obj));
  1174. ajax.start();
  1175. }
  1176. HousepurchaseInfoDlg.initZzj = function (otherList, houseList) {
  1177. if (otherList != null) {
  1178. var html = "";
  1179. for (var key in otherList) {
  1180. html = html +
  1181. '<div class="panel panel-default" >\n' +
  1182. ' <div class="panel-heading">\n' +
  1183. ' <span class="caret" onclick="$(this).parent().next().toggle()"></span>\n' +
  1184. ' <span class="houseTitle" >' + otherList[key].enjoyPolicyName + '</span>\n' +
  1185. ' <button type="button" class="close" aria-label="Close" style="float: right" onclick="HousepurchaseInfoDlg.deleteEnjoyOther(this)">\n' +
  1186. ' <span aria-hidden="true">&times;</span>\n' +
  1187. ' </button>\n' +
  1188. ' </div>\n' +
  1189. ' <div class="panel-body">\n' +
  1190. ' <div class="col-sm-12">\n' +
  1191. ' <div class="rowGroup col-sm-3">\n' +
  1192. ' <input type="hidden" name="id" value="' + otherList[key].id + '"/>\n' +
  1193. ' <input type="hidden" name="pId" value="' + otherList[key].pId + '"/>\n' +
  1194. ' <label class="control-label spacing">享受人姓名</label>\n' +
  1195. ' <input type="text" class="form-control" name="name" value="' + otherList[key].name + '"/>\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="idCard" value="' + otherList[key].idCard + '"/>\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" name="houseAddress" value="' + otherList[key].houseAddress + '"/>\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="recordNo" value="' + otherList[key].recordNo + '"/>\n' +
  1208. ' </div>\n' +
  1209. ' <div class="rowGroup col-sm-3">\n' +
  1210. ' <label class="control-label spacing">享受政策名称(例:XX年度第X批XX购房补助)</label>\n' +
  1211. ' <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' +
  1212. ' </div>\n' +
  1213. ' <div class="rowGroup col-sm-3">\n' +
  1214. ' <label class="control-label spacing">补贴发放金额(元)</label>\n' +
  1215. ' <input type="text" class="form-control" name="money" value="' + otherList[key].money + '"/>\n' +
  1216. ' </div>\n' +
  1217. ' <div class="rowGroup col-sm-3">\n' +
  1218. ' <label class="control-label spacing">发放时间</label>\n' +
  1219. ' <input type="text" class="form-control date" name="enjoyTime" value="' + otherList[key].enjoyTime + '"/>\n' +
  1220. ' </div>\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="description" value="' + otherList[key].description + '"/>\n' +
  1224. ' </div>\n' +
  1225. ' </div>\n' +
  1226. ' </div>\n' +
  1227. ' </div>';
  1228. }
  1229. $("#zzjOtherBody .panel-default").not(".history").remove();
  1230. $("#zzjOtherBody").append(html);
  1231. }
  1232. if (houseList != null) {
  1233. var html = "";
  1234. for (var key in houseList) {
  1235. html = html +
  1236. '<div class="panel panel-default">\n' +
  1237. ' <div class="panel-heading">\n' +
  1238. ' <span class="caret" onclick="$(this).parent().next().toggle()"></span>\n' +
  1239. ' <span class="houseTitle" >' + houseList[key].houseAddress + '</span>\n' +
  1240. ' <button type="button" class="close" aria-label="Close" style="float: right" onclick="HousepurchaseInfoDlg.deleteOtherHouse(this)">\n' +
  1241. ' <span aria-hidden="true">&times;</span>\n' +
  1242. ' </button>\n' +
  1243. ' </div>\n' +
  1244. ' <div class="panel-body">\n' +
  1245. ' <div class="col-sm-12">\n' +
  1246. ' <input type="hidden" name="id" value="' + houseList[key].id + '"/>\n' +
  1247. ' <input type="hidden" name="pId" value="' + houseList[key].pId + '"/>\n' +
  1248. ' <input type="hidden" name="type" value="' + houseList[key].type + '"/>\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="name" value="' + houseList[key].name + '"/>\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" name="idCard" value="' + houseList[key].idCard + '"/>\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="houseAddress" value="' + houseList[key].houseAddress + '" onchange="$(this).parent().parent().parent().parent().find(\'.houseTitle\').text($(this).val())"/>\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="number" value="' + houseList[key].number + '"/>\n' +
  1264. ' </div>\n' +
  1265. ' <div class="rowGroup col-sm-3">\n' +
  1266. ' <label class="control-label spacing">面积(m2)</label>\n' +
  1267. ' <input type="text" class="form-control" name="area" value="' + houseList[key].area + '"/>\n' +
  1268. ' </div>\n' +
  1269. ' <div class="rowGroup col-sm-3">\n' +
  1270. ' <label class="control-label spacing">交易备案时间</label>\n' +
  1271. ' <input type="text" class="form-control date" name="recordTime" value="' + houseList[key].recordTime + '"/>\n' +
  1272. ' </div>\n' +
  1273. ' <div class="rowGroup col-sm-3">\n' +
  1274. ' <label class="control-label spacing">交易方式(购买、出售、签约注销、备案注销等)</label>\n' +
  1275. ' <input type="text" class="form-control" name="tradeMethod" value="' + houseList[key].tradeMethod + '"/>\n' +
  1276. ' </div>\n' +
  1277. ' <div class="rowGroup col-sm-3">\n' +
  1278. ' <label class="control-label spacing">备注</label>\n' +
  1279. ' <input type="text" class="form-control" name="description" value="' + houseList[key].description + '"/>\n' +
  1280. ' </div>\n' +
  1281. ' </div>\n' +
  1282. ' </div>\n' +
  1283. ' </div>';
  1284. }
  1285. $("#zzjOtherHouse").empty().append(html);
  1286. }
  1287. }
  1288. HousepurchaseInfoDlg.initZrzyj = function (houseList) {
  1289. if (houseList != null) {
  1290. var html = "";
  1291. for (var key in houseList) {
  1292. html = html +
  1293. '<div class="panel panel-default">\n' +
  1294. ' <div class="panel-heading">\n' +
  1295. ' <span class="caret" onclick="$(this).parent().next().toggle()"></span>\n' +
  1296. ' <span class="houseTitle">' + houseList[key].houseAddress + '</span>\n' +
  1297. ' <button type="button" class="close" aria-label="Close" style="float: right" onclick="HousepurchaseInfoDlg.deleteOtherHouse(this)">\n' +
  1298. ' <span aria-hidden="true">&times;</span>\n' +
  1299. ' </button>\n' +
  1300. ' </div>\n' +
  1301. ' <div class="panel-body">\n' +
  1302. ' <div class="col-sm-12">\n' +
  1303. ' <input type="hidden" name="id" value="' + houseList[key].id + '"/>\n' +
  1304. ' <input type="hidden" name="pId" value="' + houseList[key].pId + '"/>\n' +
  1305. ' <input type="hidden" name="type" value="' + houseList[key].type + '"/>\n' +
  1306. ' <div class="rowGroup col-sm-3">\n' +
  1307. ' <label class="control-label spacing">产权人姓名</label>\n' +
  1308. ' <input type="text" class="form-control" name="name" value="' + houseList[key].name + '"/>\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" name="idCard" value="' + houseList[key].idCard + '"/>\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="houseAddress" value="' + houseList[key].houseAddress + '" onchange="$(this).parent().parent().parent().parent().find(\'.houseTitle\').text($(this).val())"/>\n' +
  1317. ' </div>\n' +
  1318. ' <div class="rowGroup col-sm-3">\n' +
  1319. ' <label class="control-label spacing">不动产权号</label>\n' +
  1320. ' <input type="text" class="form-control" name="number" value="' + houseList[key].number + '"/>\n' +
  1321. ' </div>\n' +
  1322. ' <div class="rowGroup col-sm-3">\n' +
  1323. ' <label class="control-label spacing">面积(m2)</label>\n' +
  1324. ' <input type="text" class="form-control" name="area" value="' + houseList[key].area + '"/>\n' +
  1325. ' </div>\n' +
  1326. ' <div class="rowGroup col-sm-3">\n' +
  1327. ' <label class="control-label spacing">房屋登记时间</label>\n' +
  1328. ' <input type="text" class="form-control date" name="recordTime" value="' + houseList[key].recordTime + '"/>\n' +
  1329. ' </div>\n' +
  1330. ' <div class="rowGroup col-sm-3">\n' +
  1331. ' <label class="control-label spacing">备注</label>\n' +
  1332. ' <input type="text" class="form-control" name="description" value="' + houseList[key].description + '"/>\n' +
  1333. ' </div>\n' +
  1334. ' </div>\n' +
  1335. ' </div>\n' +
  1336. ' </div>'
  1337. }
  1338. $("#zrzyOtherHouse").empty().append(html);
  1339. }
  1340. }
  1341. HousepurchaseInfoDlg.initMzj = function (spouseList) {
  1342. if (spouseList != null) {
  1343. var html = "";
  1344. for (var key in spouseList) {
  1345. html = html +
  1346. '<div class="panel panel-default">\n' +
  1347. ' <div class="panel-heading">\n' +
  1348. ' <span class="caret" onclick="$(this).parent().next().toggle()"></span>\n' +
  1349. ' <span class="houseTitle">' + spouseList[key].registerTime + '</span>\n' +
  1350. ' <button type="button" class="close" aria-label="Close" style="float: right" onclick="HousepurchaseInfoDlg.deleteSpouse(this)">\n' +
  1351. ' <span aria-hidden="true">&times;</span>\n' +
  1352. ' </button>\n' +
  1353. ' </div>\n' +
  1354. ' <div class="panel-body">\n' +
  1355. ' <div class="col-sm-12">\n' +
  1356. ' <input type="hidden" name="id" />\n' +
  1357. ' <input type="hidden" name="pId" />\n' +
  1358. ' <div class="rowGroup col-sm-3">\n' +
  1359. ' <label class="control-label spacing">登记类型</label>\n' +
  1360. ' <select type="text" class="form-control" name="type" value="' + spouseList[key].type + '">\n' +
  1361. ' <option value="">请选择</option>\n' +
  1362. ' <option value="1">初婚</option>\n' +
  1363. ' <option value="2">复婚</option>\n' +
  1364. ' <option value="3">再婚</option>\n' +
  1365. ' <option value="4">离婚</option>\n' +
  1366. ' </select>\n' +
  1367. ' </div>\n' +
  1368. ' <div class="rowGroup col-sm-3">\n' +
  1369. ' <label class="control-label spacing">登记时间</label>\n' +
  1370. ' <input type="text" class="form-control date" name="registerTime" value="' + spouseList[key].registerTime + '"/>\n' +
  1371. ' </div>\n' +
  1372. ' <div class="rowGroup col-sm-3">\n' +
  1373. ' <label class="control-label spacing">配偶姓名</label>\n' +
  1374. ' <input type="text" class="form-control" name="name" value="' + spouseList[key].name + '"/>\n' +
  1375. ' </div>\n' +
  1376. ' <div class="rowGroup col-sm-3">\n' +
  1377. ' <label class="control-label spacing">配偶证件号码</label>\n' +
  1378. ' <input type="text" class="form-control" name="idCard" value="' + spouseList[key].idCard + '"/>\n' +
  1379. ' </div>\n' +
  1380. ' </div>\n' +
  1381. ' </div>\n' +
  1382. ' </div>'
  1383. }
  1384. $("#mzjMarryData").empty().append(html);
  1385. $("select").each(function () {
  1386. $(this).val($(this).attr("value"));
  1387. });
  1388. }
  1389. }
  1390. HousepurchaseInfoDlg.initDate = function () {
  1391. $(".date").removeAttr('lay-key');
  1392. $(".date").each(function () {
  1393. laydate.render({
  1394. elem: this
  1395. , type: 'date'
  1396. , trigger: 'click'
  1397. });
  1398. });
  1399. }
  1400. $(function () {
  1401. $("select").each(function () {
  1402. $(this).val($(this).attr("value"));
  1403. });
  1404. Feng.getCheckLog("logTable", {
  1405. "type": CONFIG.project_house,
  1406. "mainId": $("#id").val(),
  1407. "typeFileId": "",
  1408. "active": 1
  1409. })
  1410. HousepurchaseInfoDlg.initDate();
  1411. Feng.showMiniFileModal(CONFIG.project_house, $("#type").val(), $("#id").val());
  1412. initNoBtnFileTable(CONFIG.project_house, 'fileTable');
  1413. var declareType = $("#declareType").val();
  1414. if (declareType == 1) {
  1415. $('#historyTable').bootstrapTable({
  1416. url: Feng.ctxPath + "/admin/house/getHistoryRecord?id=" + $("#id").val(),
  1417. method: 'POST',
  1418. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  1419. search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
  1420. showRefresh: false, // 是否显示刷新按钮
  1421. clickToSelect: true, // 是否启用点击选中行
  1422. singleSelect: true, // 设置True 将禁止多选
  1423. striped: true, // 是否显示行间隔色
  1424. pagination: false, // 设置为 true 会在表格底部显示分页条
  1425. paginationHAlign: "left",
  1426. paginationDetailHAlign: "right",
  1427. sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
  1428. showColumns: false,
  1429. rowStyle: function (row, index) {
  1430. return {
  1431. css: {
  1432. "word-break": "break-word",
  1433. "white-space": "inherit"
  1434. }
  1435. }
  1436. },
  1437. columns:
  1438. [
  1439. {
  1440. title: '年度',
  1441. field: 'year',
  1442. visible: true,
  1443. align: 'center',
  1444. valign: 'middle',
  1445. width: "80px",
  1446. 'class': 'uitd_showTip',
  1447. },
  1448. {
  1449. title: '姓名',
  1450. field: 'name',
  1451. visible: true,
  1452. align: 'center',
  1453. valign: 'middle',
  1454. width: "100px",
  1455. 'class': 'uitd_showTip'
  1456. },
  1457. {
  1458. title: '证件号码',
  1459. field: 'idCard',
  1460. visible: true,
  1461. align: 'center',
  1462. valign: 'middle',
  1463. width: "150px",
  1464. 'class': 'uitd_showTip'
  1465. },
  1466. {
  1467. title: '婚姻状态',
  1468. field: 'marryStatusName',
  1469. visible: true,
  1470. align: 'center',
  1471. valign: 'middle',
  1472. width: "100px",
  1473. 'class': 'uitd_showTip'
  1474. },
  1475. {
  1476. title: '配偶姓名',
  1477. field: 'spouseName',
  1478. visible: true,
  1479. align: 'center',
  1480. valign: 'middle',
  1481. width: "100px",
  1482. 'class': 'uitd_showTip'
  1483. },
  1484. {
  1485. title: '配偶证件号码',
  1486. field: 'spouseIdcard',
  1487. visible: true,
  1488. align: 'center',
  1489. valign: 'middle',
  1490. width: "100px",
  1491. 'class': 'uitd_showTip'
  1492. },
  1493. {
  1494. title: '房屋地址',
  1495. field: 'houseAddress',
  1496. visible: true,
  1497. align: 'center',
  1498. valign: 'middle',
  1499. width: "100px",
  1500. 'class': 'uitd_showTip'
  1501. },
  1502. {
  1503. title: '房屋建筑面积',
  1504. field: 'houseArea',
  1505. visible: true,
  1506. align: 'center',
  1507. valign: 'middle',
  1508. width: "100px",
  1509. 'class': 'uitd_showTip'
  1510. },
  1511. {
  1512. title: '房源成交金额',
  1513. field: 'houseMoney',
  1514. visible: true,
  1515. align: 'center',
  1516. valign: 'middle',
  1517. width: "100px",
  1518. 'class': 'uitd_showTip'
  1519. },
  1520. {
  1521. title: '计算结果',
  1522. field: 'realEnjoyMoney',
  1523. visible: true,
  1524. align: 'center',
  1525. valign: 'middle',
  1526. 'class': 'uitd_showTip',
  1527. width: "100px",
  1528. formatter: function (value, row, index) {
  1529. if (row.cashType == 1 && row.declareType == 1) {
  1530. var html = "1.可享受总金额(首套房产金额):" + (parseFloat(row.totalMoney) / 10000).toFixed(2) +
  1531. "万元</br>2.个人余额(未扣除本次):" + (parseFloat(row.balanceMoney) / 10000).toFixed(2) +
  1532. "万元</br>3.房产余额(未扣除本次):" + (parseFloat(row.houseBalanceMoney) / 10000).toFixed(2) +
  1533. "万元</br>4.上一年度未扣除其他政策金额:" + (parseFloat(row.lastOtherMoney) / 10000).toFixed(2) +
  1534. "万元</br>5.本年度新增享受其他政策金额:" + (parseFloat(row.nowOtherMoney) / 10000).toFixed(2) +
  1535. "万元</br>6.本年度人才层次可享受金额:" + (parseFloat(row.talentArrangeMoney) / 10000).toFixed(2) +
  1536. "万元</br>7.本年度应享受金额(2,3,6比较得到):" + (parseFloat(row.shouldEnjoyMoney) / 10000).toFixed(2) +
  1537. "万元</br>8.本年度扣除享受其他政策金额:" + (parseFloat(row.nowSubOtherMoney) / 10000).toFixed(2) +
  1538. "万元</br>9.本年度未扣除享受其他政策金额:" + (parseFloat(row.nowNotSubOtherMoney) / 10000).toFixed(2) +
  1539. "万元</br>10.本年度最终可到账金额:" + (parseFloat(row.realEnjoyMoney) / 10000).toFixed(2) + "万元";
  1540. return "<span class='label label-success' onclick=\"layer.alert('" + html + "', {title:'计算结果', skin: 'layui-layer-molv',closeBtn: 0})\" >" +
  1541. "<i class=\"fa fa-book\"></i>查看" +
  1542. "</span>";
  1543. } else {
  1544. return "无";
  1545. }
  1546. }
  1547. }
  1548. ]
  1549. ,
  1550. onPostBody: function () {
  1551. $('#' + id + "td.uitd_showTip").bind("mouseover", function () {
  1552. var htm = $(this).html();
  1553. $(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show');
  1554. });
  1555. }
  1556. });
  1557. }
  1558. });