std_billsGuidance_lib.js 23 KB

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