std_billsGuidance_lib.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597
  1. 'use strict';
  2. /**
  3. *
  4. *
  5. * @author Zhong
  6. * @date 2018/6/11
  7. * @version
  8. */
  9. //清单指引/精灵获取完清单数据后的回调函数
  10. let doAfterLoadGuidance = null;
  11. const billsGuidance = (function () {
  12. const libSel = $('#stdBillsGuidanceLibSelect');
  13. //工作内容
  14. let stdBillsJobData = [];
  15. //项目特征
  16. let stdBillsFeatureData = [];
  17. const bills = {
  18. dom: $('#billsGuidance_bills'),
  19. workBook: null,
  20. cache: [],
  21. tree: null,
  22. controller: null,
  23. treeSetting: {
  24. emptyRowHeader: true,
  25. rowHeaderWidth: 15,
  26. treeCol: 0,
  27. emptyRows: 0,
  28. headRows: 1,
  29. headRowHeight: [40],
  30. defaultRowHeight: 21,
  31. cols: [{
  32. width: 140,
  33. readOnly: true,
  34. showHint: true,
  35. head: {
  36. titleNames: ["项目编码"],
  37. spanCols: [1],
  38. spanRows: [1],
  39. vAlign: [1],
  40. hAlign: [1],
  41. font: ["Arial"]
  42. },
  43. data: {
  44. field: "code",
  45. vAlign: 1,
  46. hAlign: 0,
  47. font: "Arial"
  48. }
  49. }, {
  50. width: 190,
  51. readOnly: true,
  52. head: {
  53. titleNames: ["项目名称"],
  54. spanCols: [1],
  55. spanRows: [1],
  56. vAlign: [1],
  57. hAlign: [1],
  58. font: ["Arial"]
  59. },
  60. data: {
  61. field: "name",
  62. vAlign: 1,
  63. hAlign: 0,
  64. font: "Arial"
  65. }
  66. },
  67. {
  68. width: 45,
  69. readOnly: true,
  70. head: {
  71. titleNames: ["计量单位"],
  72. spanCols: [1],
  73. spanRows: [1],
  74. vAlign: [1],
  75. hAlign: [1],
  76. font: ["Arial"]
  77. },
  78. data: {
  79. field: "unit",
  80. vAlign: 1,
  81. hAlign: 1,
  82. font: "Arial"
  83. }
  84. }
  85. ]
  86. },
  87. headers: [
  88. {name: '项目编码', dataCode: 'code', width: 140, vAlign: 'center', hAlign: 'left', formatter: '@'},
  89. {name: '项目名称', dataCode: 'name', width: 190, vAlign: 'center', hAlign: 'left', formatter: '@'},
  90. {name: '单位', dataCode: 'unit', width: 45, vAlign: 'center', hAlign: 'center', formatter: '@'},
  91. ],
  92. rowHeaderWidth:1,
  93. events: {
  94. CellDoubleClick: function (sender, args) {
  95. if(!bills.tree){
  96. return;
  97. }
  98. let node = bills.tree.items[args.row];
  99. if(!node){
  100. return;
  101. }
  102. if(node.children.length > 0){
  103. node.setExpanded(!node.expanded);
  104. //设置展开收起状态
  105. sessionStorage.setItem('stdBillsGuidanceExpState', bills.tree.getExpState(bills.tree.items));
  106. renderSheetFunc(args.sheet, function () {
  107. let iCount = node.posterityCount(), i, child;
  108. for (i = 0; i < iCount; i++) {
  109. child = bills.tree.items[args.row + i + 1];
  110. args.sheet.setRowVisible(args.row + i + 1, child.visible, args.sheetArea);
  111. }
  112. args.sheet.invalidateLayout();
  113. });
  114. args.sheet.repaint();
  115. } else if(!projectReadOnly) {
  116. billsLibObj.insertBills(stdBillsJobData, stdBillsFeatureData, node);
  117. }
  118. }
  119. }
  120. };
  121. const options = {
  122. workBook: {
  123. tabStripVisible: false,
  124. allowContextMenu: false,
  125. allowCopyPasteExcelStyle : false,
  126. allowExtendPasteRange: false,
  127. allowUserDragDrop : false,
  128. allowUserDragFill: false,
  129. scrollbarMaxAlign : true
  130. },
  131. sheet: {
  132. protectionOptions: {allowResizeRows: true, allowResizeColumns: true},
  133. clipBoardOptions: GC.Spread.Sheets.ClipboardPasteOptions.values
  134. }
  135. };
  136. //渲染时方法,停止渲染
  137. //@param {Object}sheet {Function}func @return {void}
  138. function renderSheetFunc(sheet, func){
  139. sheet.suspendEvent();
  140. sheet.suspendPaint();
  141. if(func){
  142. func();
  143. }
  144. sheet.resumeEvent();
  145. sheet.resumePaint();
  146. }
  147. //设置表选项
  148. //@param {Object}workBook {Object}opts @return {void}
  149. function setOptions (workBook, opts) {
  150. for(let opt in opts.workBook){
  151. workBook.options[opt] = opts.workBook[opt];
  152. }
  153. for(let opt in opts.sheet){
  154. workBook.getActiveSheet().options[opt] = opts.sheet[opt];
  155. }
  156. }
  157. //建表头
  158. //@param {Object}sheet {Array}headers @return {void}
  159. function buildHeader(sheet, headers) {
  160. let fuc = function () {
  161. sheet.setColumnCount(headers.length);
  162. sheet.setRowHeight(0, 30, GC.Spread.Sheets.SheetArea.colHeader);
  163. for(let i = 0, len = headers.length; i < len; i++){
  164. sheet.setValue(0, i, headers[i].name, GC.Spread.Sheets.SheetArea.colHeader);
  165. sheet.setColumnWidth(i, headers[i].width, GC.Spread.Sheets.SheetArea.colHeader);
  166. if(headers[i].formatter){
  167. sheet.setFormatter(-1, i, headers[i].formatter);
  168. }
  169. sheet.getRange(-1, i, -1, 1).hAlign(GC.Spread.Sheets.HorizontalAlign[headers[i]['hAlign']]);
  170. sheet.getRange(-1, i, -1, 1).vAlign(GC.Spread.Sheets.VerticalAlign[headers[i]['vAlign']]);
  171. }
  172. };
  173. renderSheetFunc(sheet, fuc);
  174. }
  175. //表监听事件
  176. //@param {Object}workBook @return {void}
  177. function bindEvent(workBook, events) {
  178. if(Object.keys(events).length === 0){
  179. return;
  180. }
  181. const Events = GC.Spread.Sheets.Events;
  182. for(let event in events){
  183. workBook.bind(Events[event], events[event]);
  184. }
  185. }
  186. //建表
  187. //@param {Object}module @return {void}
  188. function buildSheet(module) {
  189. if(!module.workBook){
  190. module.workBook = new GC.Spread.Sheets.Workbook(module.dom[0], {sheetCount: 1});
  191. sheetCommonObj.spreadDefaultStyle(module.workBook);
  192. let sheet = module.workBook.getActiveSheet();
  193. if(module === bills){
  194. //默认初始可控制焦点在清单表中
  195. sheet.options.rowHeaderVisible = false;
  196. module.workBook.focus();
  197. sheet.options.isProtected = true;
  198. sheet.name('stdBillsGuidance_bills');
  199. //设置悬浮提示
  200. TREE_SHEET_HELPER.initSetting(bills.dom[0], bills.treeSetting);
  201. }
  202. if(module.rowHeaderWidth) {
  203. sheet.setColumnWidth(0, module.rowHeaderWidth, GC.Spread.Sheets.SheetArea.rowHeader);
  204. }
  205. setOptions(module.workBook, options);
  206. buildHeader(module.workBook.getActiveSheet(), module.headers);
  207. bindEvent(module.workBook, module.events);
  208. }
  209. }
  210. //初始化各工作表
  211. //@param {Array}modules @return {void}
  212. function initWorkBooks(modules){
  213. for(let module of modules){
  214. buildSheet(module);
  215. }
  216. }
  217. //点击清单名称后面的问号,弹出补注窗口并设置当前节点(或xxx父节点)的补注
  218. //@param {Number}row(当前焦点行) @return {void}
  219. function initRechargeModal(row) {
  220. let node = bills.tree.items[row];
  221. while (node && !node.data.recharge){
  222. node = node.parent;
  223. }
  224. let recharge = node && node.data.recharge ? node.data.recharge : '无内容';
  225. node = bills.tree.items[row];
  226. while (node && !node.data.ruleText){
  227. node = node.parent;
  228. }
  229. let ruleText = node && node.data.ruleText ? node.data.ruleText : '无内容';
  230. $('#questionTab1').text('补注');
  231. $('#questionTab2').text('工程量计算规则');
  232. $('#questionContent1').html(recharge);
  233. $('#questionContent2').html(ruleText);
  234. $('#questionModal').modal('show');
  235. }
  236. //节点链上含有补注或工程量计算规则数据
  237. //@param {Number}row(行当前行) @return {Boolean}
  238. function hasRechargeRuleText(row) {
  239. let node = bills.tree.items[row];
  240. if (!node) {
  241. return false;
  242. }
  243. while (node) {
  244. if (node.data.recharge || node.data.ruleText) {
  245. return true;
  246. }
  247. node = node.parent;
  248. }
  249. return false;
  250. }
  251. //初始化并输出树
  252. //@param {Object}module {Object}sheet {Object}treeSetting {Array}datas
  253. function initTree(module, sheet, treeSetting, datas){
  254. module.tree = idTree.createNew({id: 'ID', pid: 'ParentID', nid: 'NextSiblingID', rootId: -1, autoUpdate: true});
  255. module.controller = TREE_SHEET_CONTROLLER.createNew(module.tree, sheet, treeSetting, false);
  256. module.tree.loadDatas(datas);
  257. if(module === bills){
  258. initExpandStat();
  259. }
  260. module.controller.showTreeData();
  261. if(module === bills){
  262. module.workBook.getSheet(0).options.rowHeaderVisible = true;
  263. setBillsHint(bills.tree.items, stdBillsJobData, stdBillsFeatureData);
  264. renderSheetFunc(sheet, function () {
  265. for(let i = 0; i < bills.tree.items.length; i++){
  266. sheet.setCellType(i, 1, TREE_SHEET_HELPER.getQuestionCellType(initRechargeModal, hasRechargeRuleText));
  267. }
  268. });
  269. }
  270. }
  271. //初始化清单的工作内容和项目特征
  272. //@param {Number}billsLibId {Function}callback @return {void}
  273. function initJobAndCharacter(billsLibId, callback){
  274. CommonAjax.post('/stdBillsEditor/getJobContent', {userId: userID, billsLibId: billsLibId}, function (datas) {
  275. stdBillsJobData = datas;
  276. CommonAjax.post('/stdBillsEditor/getItemCharacter', {userId: userID, billsLibId: billsLibId}, function (datas) {
  277. stdBillsFeatureData = datas;
  278. if(callback){
  279. callback();
  280. }
  281. });
  282. });
  283. }
  284. //初始化清单展开收起状态
  285. //@return {void}
  286. function initExpandStat(){
  287. //读取展开收起状态
  288. let currentExpState = sessionStorage.getItem('stdBillsGuidanceExpState');
  289. if(currentExpState){
  290. bills.tree.setExpandedByState(bills.tree.items, currentExpState);
  291. }
  292. //非叶子节点默认收起
  293. else{
  294. bills.tree.setRootExpanded(bills.tree.roots, false);
  295. }
  296. }
  297. //设置tag以悬浮提示
  298. function setTagForHint(nodes){
  299. let sheet = bills.workBook.getActiveSheet();
  300. renderSheetFunc(sheet, function () {
  301. for(let node of nodes){
  302. sheet.setTag(node.serialNo(), 2, node.data.ruleText ? node.data.ruleText : '');
  303. }
  304. });
  305. }
  306. //根据编码定位至清单精灵库中
  307. //@param {String}code @return {void}
  308. function locateAtBills(code) {
  309. let nineCode = code.substring(0, 9);
  310. let items = bills.tree.items;
  311. let locateBills = _.find(items, function(item){
  312. return item.data.code === nineCode;
  313. });
  314. if(locateBills){
  315. expandSearchNodes([locateBills]);
  316. sessionStorage.setItem('stdBillsGuidanceExpState', bills.tree.getExpState(bills.tree.items));
  317. }
  318. let sheet = bills.workBook.getActiveSheet();
  319. let locateRow = locateBills ? locateBills.serialNo() : 0;
  320. sheet.setActiveCell(locateRow, 0);
  321. sheet.showRow(locateRow, GC.Spread.Sheets.VerticalPosition.center);
  322. }
  323. //清单设置悬浮提示信息
  324. //@param {Array}billsNodes(清单节点) {Array}jobs(总的工作内容数据) {Array}items(总的项目特征数据)
  325. function setBillsHint(billsNodes, jobs, items) {
  326. let jobsMapping = {},
  327. itemsMapping = {};
  328. for(let job of jobs){
  329. jobsMapping[job.id] = job;
  330. }
  331. for(let item of items){
  332. itemsMapping[item.id] = item;
  333. }
  334. let tagInfo = [];
  335. for(let billsNode of billsNodes){
  336. let hintArr = [];
  337. let billsItems = billsNode.data.items;
  338. if(billsItems.length > 0){
  339. //项目特征
  340. hintArr.push('项目特征:');
  341. }
  342. let itemCount = 1,
  343. jobCount = 1;
  344. for(let billsItem of billsItems){
  345. let itemData = itemsMapping[billsItem.id];
  346. if(itemData){
  347. //特征值
  348. let eigens = [];
  349. for(let eigen of itemData.itemValue){
  350. eigens.push(eigen.value);
  351. }
  352. eigens = eigens.join(';');
  353. hintArr.push(`${itemCount}.${itemData.content}${eigens === '' ? '' : ': ' + eigens}`);
  354. itemCount ++;
  355. }
  356. }
  357. //工作内容
  358. let billsJobs = billsNode.data.jobs;
  359. if(billsJobs.length > 0){
  360. hintArr.push('工作内容:');
  361. }
  362. for(let billsJob of billsJobs){
  363. let jobData = jobsMapping[billsJob.id];
  364. if(jobData){
  365. hintArr.push(`${jobCount}.${jobData.content}`);
  366. jobCount ++;
  367. }
  368. }
  369. if(hintArr.length > 0){
  370. tagInfo.push({row: billsNode.serialNo(), value: hintArr.join('\n')});
  371. }
  372. }
  373. let sheet = bills.workBook.getActiveSheet();
  374. renderSheetFunc(sheet, function () {
  375. for(let tagI of tagInfo){
  376. sheet.setTag(tagI.row, 0, tagI.value);
  377. }
  378. });
  379. }
  380. //初始选择清单指引库
  381. //@param {Number}libID @return {void}
  382. function libInitSel(libID,rcallback){
  383. //获取清单
  384. $.bootstrapLoading.start();
  385. CommonAjax.post('/billsGuidance/api/getLibWithBills', {libID: libID, isGuidanceLib: false}, function(rstData){
  386. initViews();
  387. let callback = function () {
  388. initTree(bills, bills.workBook.getActiveSheet(), bills.treeSetting, rstData.bills);
  389. if(doAfterLoadGuidance){
  390. doAfterLoadGuidance();
  391. }
  392. if(rcallback)rcallback();
  393. $.bootstrapLoading.end();
  394. };
  395. //获取清单库中的工作内容和项目特征
  396. initJobAndCharacter(+libID, callback);
  397. }, function () {
  398. $.bootstrapLoading.end();
  399. });
  400. }
  401. //初始化清单指引库
  402. //@param {Array}libDats @return {void}
  403. function initLibs(libDatas,callback){
  404. libSel.empty();
  405. if(!libDatas){
  406. return;
  407. }
  408. let selectedLib = sessionStorage.getItem('stdBillsGuidance');
  409. for(let libData of libDatas){
  410. let opt = $('<option>').val(libData.id).text(libData.name);
  411. if(selectedLib && libData.id == selectedLib){
  412. opt.attr('selected', 'selected');
  413. }
  414. libSel.append(opt);
  415. }
  416. //初始默认选择
  417. libInitSel(libSel.select().val(),callback);
  418. }
  419. //初始化视图
  420. //@param {void} @return {void}
  421. function initViews(){
  422. //赋初始高度
  423. if($('#billsGuidance_bills').height() === 0 || $('#billsGuidance_items').height() === 0){
  424. let height = $(window).height()-$(".header").height()-$(".toolsbar").height()-$(".tools-bar-height-z").height();
  425. $('#billsGuidance_bills').height(height / 2);
  426. $('#billsGuidance_items').height(height / 2);
  427. }
  428. let modules = [bills];
  429. initWorkBooks(modules);
  430. }
  431. //展开至搜索出来点的节点
  432. //@param {Array}nodes @return {void}
  433. function expandSearchNodes(nodes){
  434. let billsSheet = bills.workBook.getActiveSheet();
  435. renderSheetFunc(billsSheet, function () {
  436. function expParentNode(node){
  437. if(node.parent){
  438. if (!node.parent.expanded) {
  439. node.parent.setExpanded(true);
  440. }
  441. expParentNode(node.parent);
  442. }
  443. }
  444. for(let node of nodes){
  445. expParentNode(node);
  446. }
  447. TREE_SHEET_HELPER.refreshTreeNodeData(bills.treeSetting, billsSheet, bills.tree.roots, true);
  448. TREE_SHEET_HELPER.refreshNodesVisible(bills.tree.roots, billsSheet, true);
  449. });
  450. }
  451. function initBillsLibs(callback){
  452. if(libSel.children().length === 0 && !$(this).hasClass('disabled')){
  453. initLibs(projectObj.project.projectInfo.engineeringInfo.bill_lib,callback);
  454. }else{
  455. callback();
  456. }
  457. }
  458. //各按钮监听事件
  459. //@return {void}
  460. function bindBtn(){
  461. //打开清单指引库
  462. $('#stdBillsGuidanceTab').click(function () {
  463. if(libSel.children().length === 0 && !$(this).hasClass('disabled')){
  464. initLibs(projectObj.project.projectInfo.engineeringInfo.bill_lib);
  465. }
  466. });
  467. //更改清单指引库
  468. $('#stdBillsGuidanceLibSelect').change(function () {
  469. //关闭搜索窗口
  470. $('#billsGuidanceSearchResult').hide();
  471. billsLibObj.clearHighLight(bills.workBook);
  472. libInitSel($(this).select().val());
  473. //记住选项
  474. sessionStorage.setItem('stdBillsGuidance', $(this).select().val());
  475. //清除展开收起状态sessionStorage
  476. sessionStorage.removeItem('stdBillsGuidanceExpState');
  477. });
  478. //搜索
  479. $('#stdBillsGuidanceSearch>div>button').click(function () {
  480. if(!bills.tree){
  481. return;
  482. }
  483. let billsSheet = bills.workBook.getActiveSheet();
  484. billsLibObj.clearHighLight(bills.workBook);
  485. let keyword = $('#stdBillsGuidanceSearch>input').val();
  486. if (!keyword || keyword === '') {
  487. $('#billsGuidanceSearchResult').hide();
  488. return;
  489. }
  490. let result = bills.tree.items.filter(function (item) {
  491. let codeIs = item.data.code ? item.data.code.indexOf(keyword) !== -1 : false;
  492. let nameIs = item.data.name ? item.data.name.indexOf(keyword) !== -1 : false;
  493. return codeIs || nameIs;
  494. });
  495. result.sort(function (x, y) {
  496. return x.serialNo() - y.serialNo();
  497. });
  498. if (result.length !== 0) {
  499. //展开搜索出来的节点
  500. expandSearchNodes(result);
  501. //设置记住展开
  502. sessionStorage.setItem('stdBillsGuidanceExpState', bills.tree.getExpState(bills.tree.items));
  503. let sel = billsSheet.getSelections();
  504. renderSheetFunc(billsSheet, function () {
  505. bills.controller.setTreeSelected(result[0]);
  506. billsSheet.setSelection(result[0].serialNo(), sel[0].col, 1, 1);
  507. for (let node of result) {
  508. billsSheet.getRange(node.serialNo(), -1, 1, -1).backColor('lemonChiffon');
  509. }
  510. });
  511. //搜索初始定位
  512. billsSheet.showRow(result[0].serialNo(), GC.Spread.Sheets.VerticalPosition.center);
  513. //查找下一条
  514. $('#nextBillsGuidance').show();
  515. $('#nextBillsGuidance').unbind('click');
  516. $('#nextBillsGuidance').bind('click', function () {
  517. let cur = bills.tree.selected, resultIndex = result.indexOf(cur), sel = billsSheet.getSelections();
  518. if (resultIndex === result.length - 1) {
  519. bills.controller.setTreeSelected(result[0]);
  520. billsSheet.setSelection(result[0].serialNo(), sel[0].col, 1, 1);
  521. billsSheet.showRow(result[0].serialNo(), GC.Spread.Sheets.VerticalPosition.center);
  522. } else {
  523. bills.controller.setTreeSelected(result[resultIndex + 1]);
  524. billsSheet.setSelection(result[resultIndex + 1].serialNo(), sel[0].col, 1, 1);
  525. billsSheet.showRow(result[resultIndex + 1].serialNo(), GC.Spread.Sheets.VerticalPosition.center);
  526. }
  527. });
  528. //查找上一条
  529. $('#preBillsGuidance').show();
  530. $('#preBillsGuidance').unbind('click');
  531. $('#preBillsGuidance').bind('click', function () {
  532. let cur = bills.tree.selected, resultIndex = result.indexOf(cur), sel = billsSheet.getSelections();
  533. if (resultIndex === 0) {
  534. bills.controller.setTreeSelected(result[result.length - 1]);
  535. billsSheet.setSelection(result[result.length - 1].serialNo(), sel[0].col, 1, 1);
  536. billsSheet.showRow(result[result.length - 1].serialNo(), GC.Spread.Sheets.VerticalPosition.center);
  537. } else {
  538. bills.controller.setTreeSelected(result[resultIndex - 1]);
  539. billsSheet.setSelection(result[resultIndex - 1].serialNo(), sel[0].col, 1, 1);
  540. billsSheet.showRow(result[resultIndex - 1].serialNo(), GC.Spread.Sheets.VerticalPosition.center);
  541. }
  542. });
  543. } else {
  544. billsLibObj.clearHighLight(bills.workBook);
  545. $('#nextBillsGuidance').hide();
  546. $('#preBillsGuidance').hide();
  547. }
  548. $('#billsGuidanceSearchResultCount').text('搜索结果:' + result.length);
  549. $('#billsGuidanceSearchResult').show();
  550. autoFlashHeight();
  551. refreshWorkBook();
  552. });
  553. //搜索框回车
  554. $('#stdBillsGuidanceSearch>input').bind('keypress', function (event) {
  555. if(event.keyCode === 13){
  556. $(this).blur();
  557. $('#stdBillsGuidanceSearch>div>button').click();
  558. }
  559. });
  560. // 关闭搜索结果
  561. $('#closeSearchBillsGuidance').click(function () {
  562. $('#billsGuidanceSearchResult').hide();
  563. billsLibObj.clearHighLight(bills.workBook);
  564. autoFlashHeight();
  565. refreshWorkBook();
  566. });
  567. }
  568. //刷新表
  569. //@return {void}
  570. function refreshWorkBook(){
  571. if(bills.workBook){
  572. bills.workBook.refresh();
  573. }
  574. }
  575. return {
  576. initViews,
  577. bindBtn,
  578. refreshWorkBook,
  579. locateAtBills,
  580. initBillsLibs,
  581. bills
  582. };
  583. })();
  584. $(document).ready(function(){
  585. billsGuidance.bindBtn();
  586. });