budgetToolsDemo.jsp 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489
  1. <%@ page language="java" contentType="text/html; charset=UTF-8"
  2. pageEncoding="UTF-8"%>
  3. <%@include file="/context/mytags.jsp"%>
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  5. <t:base type="jquery,easyui,tools,DatePicker"></t:base>
  6. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  7. <head>
  8. <meta name="spreadjs culture" content="zh-cn" />
  9. <meta charset="utf-8" />
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  11. <link rel="stylesheet" type="text/css" href="plug-in/SpreadJS/css/gc.spread.sheets.excel2016colorful.13.1.0.css">
  12. <script src="plug-in/SpreadJS/scripts/gc.spread.sheets.all.13.1.0.min.js" type="text/javascript"></script>
  13. <script src="plug-in/SpreadJS/scripts/resources/zh/gc.spread.sheets.resources.zh.13.1.0.min.js" type="text/javascript"></script>
  14. <script src = "webpage/cn/com/lzt/budget/tempsheet/dataDetail.js" type="text/javascript"></script>
  15. <script src="plug-in/SpreadJS/license.js" type="text/javascript"></script>
  16. <style>
  17. .sample-tutorial {
  18. position: relative;
  19. height: 100%;
  20. overflow: hidden;
  21. }
  22. .sample-spreadsheets {
  23. width: calc(100%);
  24. height: 100%;
  25. overflow: hidden;
  26. float: left;
  27. }
  28. .options-container {
  29. float: right;
  30. width: 40%;
  31. /* padding: 12px; */
  32. padding-left: 12px;
  33. padding-right: 12px;
  34. height: 100%;
  35. box-sizing: border-box;
  36. background: #fbfbfb;
  37. overflow: auto;
  38. }
  39. .option-row {
  40. font-size: 14px;
  41. margin-top: 10px;
  42. }
  43. label {
  44. margin-bottom: 6px;
  45. }
  46. input {
  47. padding: 4px 6px;
  48. }
  49. input[type=button] {
  50. margin-top: 6px;
  51. }
  52. .buttonStyle{
  53. width:240px;
  54. height:30px;
  55. }
  56. .colorPickerContent{
  57. width: 100%;
  58. background-color:white;
  59. }
  60. .colorDom{
  61. width: 14px;
  62. height: 14px;
  63. margin:0 0 0 6px;
  64. display: inline-block;
  65. border: solid 1px #333333;
  66. vertical-align: top;
  67. }
  68. body {
  69. position: absolute;
  70. top: 0;
  71. bottom: 0;
  72. left: 0;
  73. right: 0;
  74. }
  75. </style>
  76. </head>
  77. <body style="background:#FFFFFF">
  78. <!-- <form id="form1" runat="server"> -->
  79. <div>
  80. <div id="div2">
  81. <%--查询框begin --%>
  82. <table cellpadding="0" cellspacing="1" class="formtable" style="position:fixed;top:5px;"> <!-- bottom -->
  83. <tr >
  84. <td align="right" width="600px" style="text-align: left;">
  85. <label class="Validform_label">预算主体: </label>
  86. <!-- </td>
  87. <td class="value" nowrap> -->
  88. <input id="warehouseId" name="warehouseId" type="hidden" >
  89. <input name="warehouseName" type="text" class="inputxt" style="width: 150px" id="warehouseName" readonly="readonly" />
  90. <span class="Validform_checktip"></span>
  91. <label class="Validform_label" style="display: none;">领料点</label>
  92. <t:choose hiddenName="warehouseId" hiddenid="id" url="pOrdersController.do?selectReferWareHouse&classname=cn.com.lzt.warehouse.entity.WarehouseEntity&codefield=warehouseCode&namefield=warehouseName" name="list"
  93. left="40%" width="450px" height="700px" icon="icon-search" title="领料点" textname="warehouseName" isclear="true" isInit="true" ></t:choose>
  94. </td>
  95. </tr>
  96. <tr>
  97. <td class="value">
  98. <span class="spancon" title="attType">预算年度:</span>
  99. </span>
  100. <input type="text" id="attYear" name="attYear" style="width: 94px;" class="Wdate" onclick="WdatePicker({readOnly:true,enableKeyboard:false,enableInputMask:false,lang:'zh-cn',dateFmt:'yyyy'})">
  101. <span style="display:-moz-inline-box;display:inline-block;width: 20px;text-align:center;">年</span>
  102. <input type="text" id="attMonth" name="period" style="width: 94px;" class="Wdate" onclick="WdatePicker({readOnly:true,enableKeyboard:false,enableInputMask:false,lang:'zh-cn',dateFmt:'MM'})">
  103. <span style="display:-moz-inline-box;display:inline-block;width: 20px;text-align:center;">月</span>
  104. </td>
  105. <span style="float: left;padding-left: 750px;padding-top: 34px;" >
  106. <td height="50px" align="right" colspan="8" valign="top">
  107. <a href="#" class="easyui-linkbutton l-btn" iconcls="icon-search" onclick="btn_query()">保存</a>
  108. <a href="#" class="easyui-linkbutton l-btn" iconcls="icon-putout" onclick="btn_output()">导出word</a>
  109. </td>
  110. </span>
  111. </tr>
  112. </table>
  113. <%--查询框end --%>
  114. </div>
  115. <br/><br/><br/>
  116. <div class="sample-tutorial" style="top: 20px;width:calc(100vw-200px); height:600px;">
  117. <div id="ss" class="sample-spreadsheets" ></div>
  118. <!-- <div id="detail" class="options-container"> -->
  119. <!-- <div class="option-row">
  120. 操作<br/>
  121. <div class="option-row">
  122. <input id="addBackgroundColorMenuSelection" type="checkbox" />
  123. <label for="addBackgroundColorMenuSelection">Add background color menu selection</label>
  124. </div>
  125. </div> -->
  126. </div>
  127. </div>
  128. <script>
  129. var spreadNS = GC.Spread.Sheets;
  130. window.onload = function () {
  131. var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), { sheetCount: 1 });
  132. initSpread(spread);
  133. initMenu(spread);
  134. };
  135. function initSpread(spread) {
  136. var sheet = spread.getSheet(0);
  137. // 自定义命令替换右键菜单命令
  138. spread.commandManager().register("customInsertRows",
  139. {
  140. canUndo: true,
  141. execute: function (context, options, isUndo) {
  142. var Commands = GC.Spread.Sheets.Commands;
  143. // 在此加cmd
  144. options.cmd = "customInsertRows";
  145. if (isUndo) {
  146. Commands.undoTransaction(context, options);
  147. return true;
  148. } else {
  149. Commands.startTransaction(context, options);
  150. spread.commandManager().execute({
  151. cmd: "gc.spread.contextMenu.insertRows",
  152. sheetName: sheet.name(),
  153. activeRow: options.activeRow,
  154. activeCol: options.activeCol,
  155. selections: options.selections
  156. });
  157. // 在此定义用户自己的逻辑
  158. var colCount = sheet.getColumnCount();
  159. for(var i = 0; i < colCount; i++){
  160. sheet.getCell(options.activeRow, i).locked(false);
  161. }
  162. Commands.endTransaction(context, options);
  163. return true;
  164. }
  165. }
  166. });
  167. sheet.suspendPaint();
  168. //设置省略符
  169. sheet.getDefaultStyle().showEllipsis = true;
  170. var cfs = sheet.conditionalFormats ;
  171. //11
  172. var table = sheet.tables.add("tblOperatingExpenses2", 4, 1, 51, 6, new spreadNS.Tables.TableTheme());
  173. table.showFooter(true);
  174. var dataTable = [];
  175. dataTable[0] = new Array("_", "预算指标", "不含税金额", "价税金额", "指标说明", "预算备注");
  176. dataTable[1] = new Array(0, "项目人员薪资及附加", 600, 545, "标准工时工资,不含餐费", null);
  177. dataTable[2] = new Array(0, " 岗位编制", 125, 150, null, null);
  178. dataTable[3] = new Array(0, " 保安岗编制", 11, 11, null, null);
  179. dataTable[4] = new Array(0, " 保洁岗编制", 8, 8, null, null);
  180. dataTable[5] = new Array(0, " 工程岗编制", 4, 4, null, null);
  181. dataTable[6] = new Array(0, " 会务岗编制", 2, 2, null, null);
  182. dataTable[7] = new Array(0, " 宿管岗编制", 0, 0, null, null);
  183. dataTable[8] = new Array(0, " 管理岗编制", 3, 3, null, null);
  184. dataTable[9] = new Array(0, " 工资", 125, 150, null, null);
  185. dataTable[10] = new Array(0, " 保安工资", 550000, 550000, null, null);
  186. dataTable[11] = new Array(0, " 保洁工资", 230300, 230300, null, null);
  187. dataTable[12] = new Array(0, " 工程工资", 150000, 150000, null, null);
  188. dataTable[13] = new Array(0, " 会务工资", 100000, 100000, null, null);
  189. dataTable[14] = new Array(0, " 宿管工资", 0, 0, null, null);
  190. dataTable[15] = new Array(0, " 管理人员工资", 239400, 239400, null, null);
  191. dataTable[16] = new Array(0, " 加班费", 1000, 1000, "排班加班工时、额外申请加班工时(非业主付费)、国定加班工时。不含餐费、交通费等", null);
  192. dataTable[17] = new Array(0, " 保安加班费", 500, 630, null, null);
  193. dataTable[18] = new Array(0, " 保洁加班费", 350, 375, null, null);
  194. dataTable[19] = new Array(0, " 工程加班费", 400, 370, null, null);
  195. dataTable[20] = new Array(0, " 会务加班费", 500, 435, null, null);
  196. dataTable[21] = new Array(0, " 宿管加班费", 600, 545, null, null);
  197. dataTable[22] = new Array(0, " 社保", 125, 150, null, null);
  198. dataTable[23] = new Array(0, " 公积金", 100, 100, null, null);
  199. dataTable[24] = new Array(0, " 日常餐补", 100, 90, null, null);
  200. dataTable[25] = new Array(0, " 保安餐补", 150, 145, null, null);
  201. dataTable[26] = new Array(0, " 保洁餐补", 1000, 1000, null, null);
  202. dataTable[27] = new Array(0, " 工程餐补", 500, 630, null, null);
  203. dataTable[28] = new Array(0, " 会务餐补", 350, 375, null, null);
  204. dataTable[29] = new Array(0, " 宿管餐补", 400, 370, null, null);
  205. dataTable[30] = new Array(0, " 管理人员餐补", 500, 435, null, null);
  206. dataTable[31] = new Array(0, " 福利费", 600, 545, null, null);
  207. dataTable[32] = new Array(0, " 员工补助", 125, 150, null, null);
  208. dataTable[33] = new Array(0, " 节日福利费", 100, 100, null, null);
  209. dataTable[34] = new Array(0, " 团队建设费", 100, 90, null, null);
  210. dataTable[35] = new Array(0, "集约化分摊", 150, 145, null, null);
  211. dataTable[36] = new Array(0, " 工程集约化", 1000, 1000, null, null);
  212. dataTable[37] = new Array(0, " 管理集约化", 500, 630, null, null);
  213. dataTable[38] = new Array(0, "项目培训费", 350, 375, null, null);
  214. dataTable[39] = new Array(0, " 保安培训", 400, 370, null, null);
  215. dataTable[40] = new Array(0, " 资格证书", 500, 435, null, null);
  216. dataTable[41] = new Array(0, " 复证费", 600, 545, null, null);
  217. dataTable[42] = new Array(0, " 培训课程及书籍", 125, 150, null, null);
  218. dataTable[43] = new Array(0, " 培训差旅餐费", 100, 100, null, null);
  219. dataTable[44] = new Array(0, "绩效评价指标",null ,null, null, null);
  220. dataTable[45] = new Array(0, " 年休使用率", 2.00, 1.28, "年休工时/加班工时", null);
  221. dataTable[46] = new Array(0, " 经济补偿率", 2.00, 1.89, "经济赔偿次数/员工数量", null);
  222. dataTable[47] = new Array(0, " 调休使用率", 2.00, 2.1, "调休工时/加班工时", null);
  223. dataTable[48] = new Array(0, " 物料采购业主支付比例", 2.00, 1.33, "业主支付费用/物料采购费用", null);
  224. dataTable[49] = new Array(0, " 业主支付加班费比例", 2.00, 3.58, "业主支付费用/加班工时费", null);
  225. dataTable[50] = new Array(0, ".........", 2.00, 3.58, null, null);
  226. dataTable[51] = new Array(0, "合计", 0, 0, null, null);
  227. sheet.addSpan(0, 1, 1, 4);
  228. sheet.addSpan(0, 5, 1, 2);
  229. sheet.addSpan(1, 1, 1, 6);
  230. sheet.addSpan(2, 1, 1, 6);
  231. sheet.addSpan(3, 1, 1, 2);
  232. // sheet.addSpan(16, 1, 1, 6);
  233. // sheet.addSpan(17, 1, 1, 6);
  234. sheet.getDefaultStyle().vAlign = spreadNS.VerticalAlign.center;
  235. sheet.getDefaultStyle().font = "lighter 10pt Calibri";
  236. sheet.getDefaultStyle().foreColor = "rgb(68, 84, 106)";
  237. sheet.options.gridline = { showVerticalGridline: false, showHorizontalGridline: false };
  238. sheet.getCell(0, 1).value("项目运营成本预算表").font("lighter 28pt Calibri")
  239. .hAlign(spreadNS.HorizontalAlign.center);
  240. sheet.getCell(0, 5).value("美都环卫物业-青浦工业园区【2020年度】").font("11pt Calibri").foreColor("rgb(64, 64, 64)")
  241. .hAlign(spreadNS.HorizontalAlign.right).vAlign(spreadNS.VerticalAlign.bottom);
  242. sheet.getCell(3, 1).value("指标预算").font("bold 13pt Calibri ").foreColor("rgb(64, 64, 64)");
  243. sheet.getCell(3, 5).value("项目经理绩效奖(预计):").font("bold 13pt Calibri ").foreColor("rgb(64, 64, 64)");
  244. sheet.getCell(3, 6).value("¥17680.00").font("bold 13pt Calibri ").foreColor("rgb(64, 64, 64)");
  245. sheet.getCell(3, 6).formatter('"¥"#,##0.00');
  246. //奖金公式设置
  247. sheet.getCell(3, 6).formula('=(2280000-D6)*0.04');
  248. sheet.getRange(4, 1, 1, 6).font("bold 10pt Calibri")
  249. .borderTop(new spreadNS.LineBorder("rgb(217,217,217)", spreadNS.LineStyle.thin));
  250. //15
  251. sheet.getRange(55, 1, 1, 6).font("bold 10pt Calibri")
  252. .borderBottom(new spreadNS.LineBorder("rgb(217,217,217)", spreadNS.LineStyle.thin));
  253. sheet.getRange(3, 1, 1, 2)
  254. .borderLeft(new spreadNS.LineBorder("rgb(217,217,217)", spreadNS.LineStyle.thin))
  255. .borderTop(new spreadNS.LineBorder("rgb(217,217,217)", spreadNS.LineStyle.thin))
  256. .borderRight(new spreadNS.LineBorder("rgb(217,217,217)", spreadNS.LineStyle.thin));
  257. //12 getRange (row col rowcount colcount)
  258. sheet.getRange(4, 1, 52, 1).borderLeft(new spreadNS.LineBorder("rgb(217,217,217)", spreadNS.LineStyle.thin)).hAlign(spreadNS.HorizontalAlign.center);
  259. //12
  260. sheet.getRange(4, 6, 52, 1).borderRight(new spreadNS.LineBorder("rgb(217,217,217)", spreadNS.LineStyle.thin));
  261. //10
  262. sheet.getRange(5, 1, 50, 6).borderBottom(new spreadNS.LineBorder("rgb(217,217,217)", spreadNS.LineStyle.dashed));;
  263. //16
  264. for (var row = 4; row < 56; row++) {
  265. for (var col = 1; col < 7; col++) {
  266. sheet.setValue(row, col, dataTable[row - 4][col - 1]);
  267. }
  268. }
  269. var rowHeights = new Array(74, 4, 20);
  270. for (var row = 0; row < 3; row++) {
  271. sheet.setRowHeight(row, rowHeights[row]);
  272. }
  273. //
  274. for (var row = 3; row < 56; row++) {
  275. sheet.setRowHeight(row, 24);
  276. }
  277. //
  278. sheet.setRowHeight(56, 4);
  279. var colWidths = new Array(18, 110, 180, 180, 180, 180, 180);
  280. for (var col = 0; col < 7; col++) {
  281. sheet.setColumnWidth(col, colWidths[col]);
  282. }
  283. sheet.getRange(1, 1, 1, 6)
  284. .borderTop(new spreadNS.LineBorder("rgb(217,217,217)", spreadNS.LineStyle.thick))
  285. .borderBottom(new spreadNS.LineBorder("rgb(217,217,217)", spreadNS.LineStyle.thin));
  286. //17
  287. sheet.getRange(56, 1, 1, 6)
  288. .borderTop(new spreadNS.LineBorder("rgb(217,217,217)", spreadNS.LineStyle.thick))
  289. .borderBottom(new spreadNS.LineBorder("rgb(217,217,217)", spreadNS.LineStyle.thin));
  290. //13
  291. sheet.getRange(3, 3, 45, 2).formatter('"¥"#,##0.00');
  292. sheet.getRange(49, 3, 6, 2).formatter('##0.00"%"');
  293. sheet.getRange(6, 3, 8, 2).formatter('""#,##0');
  294. //12
  295. //sheet.getRange(3, 6, 52, 1).formatter('0%');
  296. //15
  297. sheet.getCell(55, 6).formatter('0.0%');
  298. //
  299. sheet.getCell(6, 3).formula('=SUM(D8:D13)');
  300. sheet.getCell(6, 4).formula('=SUM(E8:E13)');
  301. sheet.getCell(13, 3).formula('=SUM(D15:D20)');
  302. sheet.getCell(13, 4).formula('=SUM(E15:E20)');
  303. sheet.getCell(20, 3).formula('=SUM(D22:D26)');
  304. sheet.getCell(20, 4).formula('=SUM(E22:E26)');
  305. sheet.getCell(5, 3).formula('=D7+D14+D21');
  306. sheet.getCell(5, 4).formula('=E7+E14+E21');
  307. sheet.frozenRowCount(5);
  308. var iconSetRule1 = new spreadNS.ConditionalFormatting.IconSetRule();
  309. //15
  310. iconSetRule1.ranges([new spreadNS.Range(55, 1, 1, 1)]);
  311. iconSetRule1.iconSetType(spreadNS.ConditionalFormatting.IconSetType.threeSymbolsCircled)
  312. .showIconOnly(true);
  313. var icons = iconSetRule1.iconCriteria();
  314. icons[0] = new spreadNS.ConditionalFormatting.IconCriterion(false, spreadNS.ConditionalFormatting.IconValueType.number, -1);
  315. icons[1] = new spreadNS.ConditionalFormatting.IconCriterion(true, spreadNS.ConditionalFormatting.IconValueType.number, 1);
  316. cfs.addRule(iconSetRule1);
  317. var style = new spreadNS.Style();
  318. style.foreColor = "red";
  319. //15
  320. cfs.addCellValueRule(spreadNS.ConditionalFormatting.ComparisonOperators.lessThan, 0, 0, style, [new spreadNS.Range(55, 5, 1, 2)]);
  321. var dataBarRule1 = new spreadNS.ConditionalFormatting.DataBarRule();
  322. dataBarRule1.minType(spreadNS.ConditionalFormatting.ScaleValueType.automin);
  323. dataBarRule1.maxType(spreadNS.ConditionalFormatting.ScaleValueType.automax);
  324. //10
  325. /* dataBarRule1.ranges([new spreadNS.Range(5, 4, 43, 1)]);
  326. dataBarRule1.color("orange").showBorder(true).borderColor("orange").dataBarDirection(spreadNS.ConditionalFormatting.BarDirection.rightToLeft);
  327. cfs.addRule(dataBarRule1); */
  328. var dataBarRule2 = new spreadNS.ConditionalFormatting.DataBarRule();
  329. dataBarRule2.minType(spreadNS.ConditionalFormatting.ScaleValueType.automin);
  330. dataBarRule2.maxType(spreadNS.ConditionalFormatting.ScaleValueType.automax);
  331. //10
  332. dataBarRule2.ranges([new spreadNS.Range(5, 3, 43, 1)]);
  333. dataBarRule2.color("rgb(0,138,239)").showBorder(true).borderColor("rgb(0,138,239)");
  334. cfs.addRule(dataBarRule2);
  335. var dataBarRule3 = new spreadNS.ConditionalFormatting.DataBarRule();
  336. dataBarRule3.minType(spreadNS.ConditionalFormatting.ScaleValueType.lowestValue);
  337. dataBarRule3.maxType(spreadNS.ConditionalFormatting.ScaleValueType.highestValue);
  338. //10
  339. /* dataBarRule3.ranges([new spreadNS.Range(5, 6, 50, 1)]);
  340. dataBarRule3.color("rgb(91,155,213)").showBorder(true).borderColor("rgb(91,155,213)")
  341. .negativeFillColor("rgb(237,125,49)").useNegativeBorderColor(true).negativeBorderColor("rgb(237,125,49)")
  342. .axisPosition(spreadNS.ConditionalFormatting.DataBarAxisPosition.cellMidPoint);
  343. cfs.addRule(dataBarRule3); */
  344. var iconSetRule2 = new spreadNS.ConditionalFormatting.IconSetRule();
  345. //10
  346. iconSetRule2.ranges([new spreadNS.Range(5, 1, 50, 1)]);
  347. iconSetRule2.iconSetType(spreadNS.ConditionalFormatting.IconSetType.threeSymbolsUncircled)
  348. .reverseIconOrder(true)
  349. .showIconOnly(true);
  350. cfs.addRule(iconSetRule2);
  351. //table.setColumnFormula(0, "=tblOperatingExpenses2[[#Totals],[差率 (%)]]");
  352. table.setColumnFormula(2, "=SUBTOTAL(109,[预算金额])");
  353. table.setColumnFormula(3, "=SUBTOTAL(109,[预算价税合计])");
  354. // table.setColumnFormula(4, "=SUBTOTAL(109,[填报说明])");
  355. //table.setColumnFormula(5, '=IFERROR(SUM(tblOperatingExpenses2[[#Totals],[填报说明]]/tblOperatingExpenses2[[#Totals],[预算金额]]),"")');
  356. table.setColumnDataFormula(0, '=IFERROR([@预算价税合计]/[@预算金额],"")');
  357. //table.setColumnDataFormula(4, '=[@预算金额]-[@预算价税合计]');
  358. //去掉一个单元格的公式
  359. sheet.getCell(48,5).formula('').text('');
  360. // table.setColumnDataFormula(5, '=IFERROR([@[填报说明]]/[@预算金额],"")');
  361. sheet.resumePaint();
  362. }
  363. function initMenu(spread){
  364. var commandManager = spread.commandManager();
  365. var selectActualDetailbtn = {
  366. text: "人员工资预算子表",
  367. name: "selectActualDetail" ,
  368. workArea: "viewport",
  369. command: "selectActualDetailcommand"
  370. };
  371. //清空原有按钮
  372. //spread.contextMenu.menuData = new Array();
  373. //添加自定义按钮
  374. spread.contextMenu.menuData.push(selectActualDetailbtn);
  375. //响应事件在这里写代码
  376. var selectActualDetailCommand = {
  377. canUndo: false,
  378. execute: function (spread, options) {
  379. showBudgetSub();
  380. return true;
  381. }
  382. };
  383. commandManager.register("selectActualDetailcommand", selectActualDetailCommand, null, false, false, false, false);
  384. }
  385. function showBudgetSub(){
  386. var url = 'budgetTempSheetController.do?budgetSubDemo';
  387. $.dialog({
  388. title:'人力资源成本分表',
  389. content: 'url:'+ url,
  390. zIndex: getzIndex(),
  391. lock: true,
  392. width: window.top.document.body.offsetWidth ,
  393. height: window.top.document.body.offsetHeight-100,
  394. cache:false,
  395. button: [
  396. {
  397. name: '<t:mutiLang langKey="common.confirm"/>',
  398. callback: function(){
  399. /*
  400. //获得子页面getReason()方法中的值
  401. var iframe = this.iframe.contentWindow;
  402. if(iframe.getReason().length>0){
  403. var strData=eval(iframe.getReason());
  404. var maintainids="";
  405. for(var key in strData[0]){
  406. if(key=="id"){
  407. maintainids=strData[0][key];
  408. }
  409. }
  410. if(maintainids.length > 0)
  411. {
  412. //addApply(cid,contractType,maintainids);
  413. }
  414. }
  415. */
  416. },
  417. focus: true
  418. },
  419. {
  420. name: '<t:mutiLang langKey="common.cancel"/>',
  421. callback: function(){
  422. //refresh();
  423. }
  424. }
  425. ]
  426. });
  427. }
  428. function btn_output(){
  429. var url = "budgetTempSheetController.do?downloadword";
  430. layer.msg('数据导出中,请稍候···', {
  431. time : 6000,
  432. shade: 0.1});
  433. window.location.href = url; //encodeURI(fields+params+id);
  434. }
  435. </script>
  436. </body>
  437. </html>