752 lines
30 KiB

  1. 
  2. @{
  3. ViewBag.Title = "Index";
  4. Layout = "~/Views/Shared/_Index.cshtml";
  5. }
  6. <style>
  7. .btn-primary {
  8. margin-right: 2px;
  9. }
  10. .topPanel .toolbar {
  11. float: left;
  12. }
  13. /*.ui-jqgrid tr.jqgrow td {
  14. white-space: normal !important;
  15. height: auto;
  16. }*/
  17. </style>
  18. <script src="~/Content/js/CommonReport/CommonReport.js"></script>
  19. <script>
  20. //var _MenuCaption = "";
  21. var _MenuTag = "";
  22. var _MenuID = "";//菜单ID
  23. var _SourceID = "";//数据源ID
  24. var _sqlTxt = "";//加上参数的sql
  25. var _sqlTxt_Condition = new Array();//加上过滤条件的sql
  26. var _sqlTxt_AddCondition = "";//加上过滤条件的sql
  27. var _IsExistsDataSource = "";
  28. var _DBName = "";//s数据库
  29. var _Cols = new Array();//列
  30. var _ReportName = "";
  31. var _Filter = "";
  32. var _TempName = "";
  33. var _footerrow = false;//是否有合计项
  34. var _footercols = new Array();//合计项
  35. var _formatcols = new Array();//个性化项
  36. var _formatcols_Row = new Array();//个性化项的行
  37. var _Mergercols = new Array();//合并项
  38. var _XCol = "";
  39. var dataRR = "";
  40. var _HiddenCols = new Array();
  41. $(function () {
  42. debugger;
  43. //1、获取当前页菜单名
  44. GetMenuID();
  45. //2、获取菜单设置
  46. GetMenu();
  47. //gridList();
  48. $(window).resize(function () {
  49. $("#gridList").setGridWidth($(window).width() * 0.99);
  50. $("#gridList").setGridWidth(document.body.clientWidth * 0.99);
  51. $("#gridList").setGridHeight($(window).height() - 132);
  52. $("#gridList").setGridHeight(document.body.clientHeight - 132);
  53. });
  54. });
  55. //1、获取当前页菜单名
  56. function GetMenuID() {
  57. debugger;
  58. var cc = self.frameElement.getAttribute('id');
  59. _MenuID = cc.replace("iframe", "");
  60. //_MenuTag = $.request("MenuTag");
  61. //$.ajax({
  62. // url: "/SystemManage/CommonReport/GetMenuID?MenuTag=" + _MenuTag + "&" + Math.random(),
  63. // dataType: "json",
  64. // async: false,
  65. // success: function (data) {
  66. // if (data != false && data != null && data.length > 0) {
  67. // _MenuID = data[0].MenuID;
  68. // }
  69. // else {
  70. // alert("获取菜单ID异常,请查看菜单配置并刷新:" + data);
  71. // }
  72. // },
  73. // error: function (aa) {
  74. // alert("异常:" + aa.responseText);
  75. // }
  76. //});
  77. }
  78. //2、获取菜单设置 URL 列 等
  79. function GetMenu() {
  80. debugger;
  81. $.ajax({
  82. url: "/SystemManage/CommonReport/GetMenu?MenuID=" + _MenuID + "&" + Math.random(),
  83. dataType: "json",
  84. async: false,
  85. success: function (data) {
  86. if (data != false && data != null) {
  87. _sqlTxt = data.sqlTxt;
  88. _sqlTxt_AddCondition = data.sqlTxt;
  89. _DBName = data.DBName;
  90. _SourceID = data.SourceID;
  91. _IsExistsDataSource = data.IsExistsDataSource;
  92. _ReportName = data.ReportName;
  93. _XCol = data.XCol;
  94. _Mergercols = eval(data.Mergercols);
  95. _formatcols = data.formatcols;
  96. _TempName = data.TempName;
  97. _footerrow = data.footerrow;
  98. _footercols = eval(data.footercols);
  99. _Cols = SetCols(eval(data.Cols));
  100. _HiddenCols = eval(data.HiddenCols);
  101. btn_Filter();
  102. }
  103. else {
  104. alert("获取菜单栏位等信息异常。" + data);
  105. }
  106. },
  107. error: function (aa) {
  108. alert("异常:" + aa.responseText);
  109. }
  110. });
  111. }
  112. //个性化栏位背景色
  113. function addCellAttr(rowId, val, rawObject, cm, rdata) {
  114. var rr = ' id=\'' + cm.name + '' + rowId + "\' ";
  115. var formatList = Getformatcol(_formatcols, cm.name);//获取format所有条件
  116. if (formatList != null && formatList.length > 0) {
  117. for (var i = 0; i < formatList.length; i++) {
  118. var formatcol = formatList[i];//条件
  119. var IsRow = false;
  120. if (formatcol.AllRowFlag) {
  121. IsRow = true;
  122. var rr = {
  123. rowid: rowId - 1,
  124. backgroundcolor: formatcol.Color,
  125. }
  126. }
  127. var FormatDataType = formatcol.DataType;
  128. var LogStr = GetLogStringByNum(parseInt(formatcol.LogStr));
  129. if (FormatDataType != "日期型") {
  130. switch (LogStr) {
  131. case "等于": if (val == formatcol.SValue) {
  132. if (IsRow) { _formatcols_Row.push(rr); }
  133. else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; }
  134. }
  135. break;
  136. case "不等于": if (val != formatcol.SValue) {
  137. if (IsRow) { _formatcols_Row.push(rr); }
  138. else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; }
  139. }
  140. break;
  141. case "小于": if (val < formatcol.SValue) {
  142. if (IsRow) { _formatcols_Row.push(rr); }
  143. else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; }
  144. }
  145. break;
  146. case "大于": if (val > formatcol.SValue) {
  147. if (IsRow) { _formatcols_Row.push(rr); }
  148. else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; }
  149. }
  150. break;
  151. case "小于等于": if (val <= formatcol.SValue) {
  152. if (IsRow) { _formatcols_Row.push(rr); }
  153. else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; }
  154. }
  155. break;
  156. case "大于等于": if (val >= formatcol.SValue) {
  157. if (IsRow) { _formatcols_Row.push(rr); }
  158. else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; }
  159. }
  160. break;
  161. case "范围内": if (val >= formatcol.SValue && val <= formatcol.DValue) {
  162. if (IsRow) { _formatcols_Row.push(rr); }
  163. else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; }
  164. }
  165. break;
  166. case "范围外": if (val < formatcol.SValue || val > formatcol.DValue) {
  167. if (IsRow) { _formatcols_Row.push(rr); }
  168. else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; }
  169. }
  170. break;
  171. case "包含": if (val.indexOf(formatcol.SValue) != -1) {
  172. if (IsRow) { _formatcols_Row.push(rr); }
  173. else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; }
  174. }
  175. break;
  176. case "头部包含": if (val.indexOf(formatcol.SValue) == 0) {
  177. if (IsRow) { _formatcols_Row.push(rr); }
  178. else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; }
  179. }
  180. break;
  181. case "尾部包含": if (val.indexOf(formatcol.SValue) == formatcol.length - val.length) {
  182. if (IsRow) { _formatcols_Row.push(rr); }
  183. else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; }
  184. }
  185. break;
  186. case "不包含": if (val.indexOf(formatcol.SValue) == -1) {
  187. if (IsRow) { _formatcols_Row.push(rr); }
  188. else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; }
  189. }
  190. break;
  191. }
  192. }
  193. else {
  194. //日期型
  195. if (val.length >= 10) {
  196. var VV = val.substring(0, 10);
  197. switch (LogStr) {
  198. case "等于":
  199. if (VV == formatcol.SValue) {
  200. if (IsRow) { _formatcols_Row.push(rr); }
  201. else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; }
  202. }
  203. break;
  204. case "不等于": if (VV != formatcol.SValue) {
  205. if (IsRow) { _formatcols_Row.push(rr); }
  206. else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; }
  207. }
  208. break;
  209. case "小于":
  210. if (VV < formatcol.SValue) {
  211. if (IsRow) { _formatcols_Row.push(rr); }
  212. else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; }
  213. }
  214. break;
  215. case "大于": if (VV > formatcol.SValue) {
  216. if (IsRow) { _formatcols_Row.push(rr); }
  217. else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; }
  218. }
  219. break;
  220. case "小于等于": if (VV <= formatcol.SValue) {
  221. if (IsRow) { _formatcols_Row.push(rr); }
  222. else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; }
  223. }
  224. break;
  225. case "大于等于": if (VV >= formatcol.SValue) {
  226. if (IsRow) { _formatcols_Row.push(rr); }
  227. else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; }
  228. }
  229. break;
  230. case "范围内": if (VV >= formatcol.SValue && VV <= formatcol.DValue) {
  231. if (IsRow) { _formatcols_Row.push(rr); }
  232. else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; }
  233. }
  234. break;
  235. case "范围外": if (VV < formatcol.SValue || VV > formatcol.DValue) {
  236. if (IsRow) { _formatcols_Row.push(rr); }
  237. else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; }
  238. }
  239. break;
  240. }
  241. }
  242. }
  243. }
  244. }
  245. return rr;
  246. }
  247. //个性化栏位背景色
  248. function addCellAttr_ID(rowId, val, rawObject, cm, rdata) {
  249. var rr = ' id=\'' + cm.name + '' + rowId + "\' ";
  250. return rr;
  251. }
  252. function Getformatcol(formatcols, colname) {
  253. var formatList = new Array();
  254. if (formatcols != null && formatcols.length > 0) {
  255. for (var i = 0; i < formatcols.length; i++) {
  256. if (formatcols[i].ColFiledName == colname) {
  257. formatList.push(formatcols[i]);
  258. }
  259. }
  260. }
  261. return formatList;
  262. }
  263. //生成colModel
  264. function SetCols(datacols) {
  265. var cols = new Array();
  266. if (datacols != null && datacols.length > 0) {
  267. for (var i = 0; i < datacols.length; i++) {
  268. var ColCaption = datacols[i].ColCaption;
  269. var ColFiledName = datacols[i].ColFiledName;
  270. var DataType = datacols[i].DataType;
  271. var DataTypeStr = GetDataTypeByNum(DataType);
  272. var ColWidth = datacols[i].ColWidth;
  273. var DeciamlNum = datacols[i].DeciamlNum;
  274. var sortable = datacols[i].sortable;
  275. var ColMerFlag = datacols[i].ColMerFlag;
  276. var IsFormat = datacols[i].IsFormat;
  277. var obj = new Array();
  278. if (IsFormat == "1") {
  279. obj = {
  280. label: ColCaption,
  281. name: ColFiledName,
  282. width: ColWidth,
  283. align: "left",
  284. sortable: sortable,
  285. cellattr: addCellAttr,
  286. }
  287. }
  288. else {
  289. obj = {
  290. label: ColCaption,
  291. name: ColFiledName,
  292. width: ColWidth,
  293. align: "left",
  294. sortable: sortable,
  295. cellattr: addCellAttr_ID,
  296. }
  297. }
  298. switch (DataTypeStr) {
  299. case "数值型":
  300. var Formatoptions = new { decimalPlaces: DeciamlNum };
  301. obj.push({ formatter: "number" });
  302. obj.push({ formatoptions: Formatoptions });
  303. break;
  304. case "字符型":
  305. case "日期型":
  306. case "布尔值":
  307. break;
  308. }
  309. //if (IsFormat) {
  310. // obj.push({ cellattr: addCellAttr });
  311. //}
  312. cols.push(obj);
  313. }
  314. var collast = { label: "", name: "", width: "20", align: "left", sortable: true };
  315. cols.push(collast);
  316. }
  317. return cols;
  318. }
  319. function gridList() {
  320. document.getElementById("gridPanel").innerHTML = ' <table id="gridList"></table> <div id="gridPager"></div>';//重置grid
  321. _formatcols_Row = new Array();
  322. var $gridList = $("#gridList");
  323. var condion = new Array();
  324. if (_sqlTxt_Condition != undefined && _sqlTxt_Condition.length > 0) {
  325. condion = _sqlTxt_Condition;
  326. }
  327. $gridList.dataGrid({
  328. //url: "/SystemManage/CommonReport/GetGridJson",
  329. url: "/SystemManage/CommonReport/GetGridJsonNew",
  330. height: $(window).height() - 132,
  331. // postData: { sqlTxt: _sqlTxt_AddCondition, DBName: _DBName, TempName: _TempName },
  332. postData: { MenuID: _MenuID, sqlTxt_Condition: JSON.stringify(condion), DBName: _DBName, TempName: _TempName },
  333. colModel: _Cols,
  334. pager: "#gridPager",
  335. //sortname: ' ',
  336. //sortorder: ' ',
  337. sortname: _XCol,
  338. sortorder: ' ',
  339. viewrecords: true,
  340. multiselect: true,//开启选中行
  341. footerrow: _footerrow,
  342. gridComplete: function () {
  343. var strIds = $("#gridList").jqGrid("getDataIDs");
  344. if (_formatcols_Row.length > 0) {
  345. for (var i = 0; i < _formatcols_Row.length; i++) {
  346. $("#" + strIds[_formatcols_Row[i].rowid] + " td").css("background-color", _formatcols_Row[i].backgroundcolor);
  347. }
  348. }
  349. //$("#"+ids[ii]+ " td").css("background-color","red");
  350. //合并行
  351. if (_Mergercols != undefined && _Mergercols.length > 0) {
  352. for (var i = 0; i < _Mergercols.length; i++) {
  353. Merger("gridList", _Mergercols[i]);
  354. }
  355. }
  356. //合计
  357. if (_footerrow == true) {
  358. var footerData = {};
  359. for (var i = 0; i < _footercols.length; i++) {
  360. var total = 0;
  361. for (var j = 0; j < strIds.length; j++) {
  362. var qty = $("#gridList").jqGrid("getCell", strIds[j], _footercols[i]);
  363. if (qty != "") {
  364. total += parseInt(qty);
  365. }
  366. }
  367. footerData[_footercols[i]] = total;
  368. }
  369. $("#gridList").footerData('set', footerData);
  370. $("#gridList").footerData('set', { "rn": "合计" });
  371. }
  372. //隐藏列(不可见/无权限)
  373. if (_HiddenCols != null && _HiddenCols.length > 0) {
  374. for (var j = 0; j < _HiddenCols.length; j++) {
  375. $("#gridList").setGridParam().hideCol(_HiddenCols[j].ColFiledName);
  376. }
  377. }
  378. },
  379. loadError: function (data) {
  380. alert("异常:");
  381. }
  382. });
  383. $("#btn_search").click(function () {
  384. $gridList.jqGrid('setGridParam', {
  385. //sqlTxt: _sqlTxt_AddCondition, DBName: _DBName, TempName: _TempName
  386. MenuID: _MenuID, sqlTxt_Condition: JSON.stringify(condion), DBName: _DBName, TempName: _TempName
  387. }).trigger('reloadGrid');
  388. });
  389. }
  390. //过滤
  391. function btn_Filter() {
  392. $.modalOpenYC({
  393. id: "Filer",
  394. title: "过滤条件",
  395. url: "/SystemManage/CommonReport/Filter?MenuID=" + _MenuID + "&SourceID=" + _SourceID + "&" + Math.random(),
  396. width: "800px",
  397. height: "570px",
  398. // btn: ['确认', '关闭'],
  399. callBack: function (iframeId) {
  400. _sqlTxt_Condition = eval(top.frames[iframeId].submitForm());
  401. //_sqlTxt_AddCondition = _sqlTxt;
  402. if (_sqlTxt_Condition != undefined) {
  403. // if (_sqlTxt_Condition.length > 0) {
  404. // for (var i = 0; i < _sqlTxt_Condition.length; i++) {
  405. // _sqlTxt_AddCondition = ReplaceALL(_sqlTxt_AddCondition, _sqlTxt_Condition[i].CIndex, _sqlTxt_Condition[i].Content);
  406. // }
  407. // }
  408. top.frames[iframeId].Close();
  409. gridList();
  410. }
  411. }
  412. });
  413. }
  414. //数据源
  415. function btn_DataSource() {
  416. $.modalOpen({
  417. id: "DataSource",
  418. title: "数据源",
  419. url: "/SystemManage/CommonReport/DataSource?MenuID=" + _MenuID,//+ "&" + Math.random(),
  420. width: "1300px",
  421. height: "570px",
  422. btn: ['确认', '关闭'],
  423. callBack: function (iframeId) {
  424. dataRR = top.frames[iframeId].submitForm();
  425. if (dataRR == "Error")
  426. { }
  427. else {
  428. GetMenu();
  429. }
  430. }
  431. });
  432. }
  433. //列设置
  434. function btn_Cols() {
  435. if (_IsExistsDataSource != "1") {
  436. alert("请先设置数据源");
  437. }
  438. else {
  439. $.modalOpen({
  440. id: "Cols",
  441. title: "列设置",
  442. url: "/SystemManage/CommonReport/Cols?SourceID=" + _SourceID + "&MenuID=" + _MenuID + "&" + Math.random(),
  443. width: "1300px",
  444. height: "570px",
  445. btn: ['确认', '关闭'],
  446. callBack: function (iframeId) {
  447. top.frames[iframeId].submitForm();
  448. GetMenu();
  449. }
  450. });
  451. }
  452. }
  453. //个性化设置
  454. function btn_GridFormat() {
  455. if (_IsExistsDataSource != "1") {
  456. alert("请先设置数据源");
  457. }
  458. else {
  459. $.modalOpen({
  460. id: "GridFormat",
  461. title: "个性化设置",
  462. url: "/SystemManage/CommonReport/GridFormat?SourceID=" + _SourceID + "&" + Math.random(),
  463. width: "800px",
  464. height: "570px",
  465. btn: null,
  466. callBack: function (iframeId) {
  467. GetMenu();
  468. }
  469. });
  470. }
  471. }
  472. //多表头设置
  473. function btn_GridHeader() {
  474. if (_IsExistsDataSource != "1") {
  475. alert("请先设置数据源");
  476. }
  477. else {
  478. $.modalOpen({
  479. id: "GridHeader",
  480. title: "多表头设置",
  481. url: "/SystemManage/CommonReport/GridHeader?SourceID=" + _SourceID + "&" + Math.random(),
  482. width: "1300px",
  483. height: "570px",
  484. btn: ['确认', '关闭'],
  485. callBack: function (iframeId) {
  486. top.frames[iframeId].submitForm();
  487. GetMenu();
  488. }
  489. });
  490. }
  491. }
  492. //清空本菜单所有数据源相关设置
  493. function btn_Clear() {
  494. $.deleteForm({
  495. url: "/SystemManage/CommonReport/ClearAll?" + Math.random(),
  496. param: { MenuID: _MenuID },
  497. success: function () {
  498. _SourceID = "";//数据源ID
  499. _sqlTxt = "";//加上参数的sql
  500. _sqlTxt_AddCondition = "";//加上过滤条件的sql
  501. _TempName = "";
  502. _IsExistsDataSource = "";
  503. _DBName = "";//s数据库
  504. _Cols = new Array();//列
  505. _Filter = "";
  506. _footerrow = false;//是否有合计项
  507. _footercols = new Array();//合计项
  508. _formatcols = new Array();//个性化项
  509. _formatcols_Row = new Array();//个性化项的行
  510. _Mergercols = new Array();//合并项
  511. document.getElementById("gridPanel").innerHTML = ' <table id="gridList"></table> <div id="gridPager"></div>';
  512. },
  513. error: function (aa) {
  514. //alert("异常", aa.responseText);
  515. $.modalAlertNew("WMS00015", aa.responseText);
  516. }
  517. });
  518. }
  519. function btn_ExportAll() {
  520. var condion = new Array();
  521. if (_sqlTxt_Condition != undefined && _sqlTxt_Condition.length > 0) {
  522. condion = _sqlTxt_Condition;
  523. }
  524. //var data = "&sqlTxt=" + encodeURIComponent(_sqlTxt_AddCondition) + "&DBName=" + _DBName + "&TempName=" + _TempName + "&MenuID=" + _MenuID;
  525. var data = "&sqlTxt=" + encodeURIComponent(JSON.stringify(condion)) + "&DBName=" + _DBName + "&TempName=" + _TempName + "&MenuID=" + _MenuID + "&XCol=" + _XCol;
  526. $.download("/SystemManage/CommonReport/ExportAllNew?" + Math.random(), data, 'post');
  527. }
  528. function btn_WatchPanel() {
  529. var condion = new Array();
  530. if (_sqlTxt_Condition != undefined && _sqlTxt_Condition.length > 0) {
  531. condion = _sqlTxt_Condition;
  532. }
  533. $.modalOpen({
  534. id: "WatchPanel",
  535. title: _ReportName + "看板显示",
  536. url: "/SystemManage/CommonReport/WatchPanel?_MenuID=" + _MenuID + "&_sqlTxt_Condition=" + escape(JSON.stringify(condion)) + "&TempName=" + escape(_TempName) + "&" + Math.random(),
  537. width: "1300px",
  538. height: "570px",
  539. btn: null,
  540. callBack: function (iframeId) {
  541. top.frames[iframeId].submitForm();
  542. GetMenu();
  543. }
  544. });
  545. }
  546. //角色显示栏位
  547. function btn_ColsVisible() {
  548. $.modalOpen({
  549. id: "ColsVisible",
  550. title: _ReportName + " 角色显示栏位",
  551. url: "/SystemManage/CommonReport/ColsVisible?MenuID=" + _MenuID + "&IsCommon=Y&Cols=&" + Math.random(),
  552. width: "1000px",
  553. height: "570px",
  554. btn: null,
  555. callBack: function (iframeId) {
  556. alert("111");
  557. GetMenu();
  558. }
  559. });
  560. }
  561. //新增类型
  562. function btn_CleanUp() {
  563. var TableCode = [];
  564. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  565. if (ids.length < 0) {
  566. $.modalAlertNew("WMS00006");
  567. return;
  568. }
  569. for (var i in ids) {
  570. var rowData = jQuery("#gridList").jqGrid("getRowData", ids[i]);
  571. var obj = {
  572. Code: rowData.Code,
  573. }
  574. TableCode.push(obj);
  575. }
  576. $.modalConfirm("请确认是否清除所选表中数据,清除后该操作无法撤销?", function (r) {
  577. if (r) {
  578. $.submitForm({
  579. url: "/WMS/BasicSettings/DeleteTableByCode" + "?" + Math.random(),
  580. param: { TableCode: JSON.stringify(TableCode) },
  581. success: function () {
  582. $.currentWindow().$("#gridList").trigger("reloadGrid");
  583. }
  584. })
  585. }
  586. });
  587. }
  588. //导入
  589. function btn_Introduction() {
  590. debugger;
  591. $("#FileUp").click();
  592. }
  593. function btn_Clike() {
  594. $.ClickOperate();
  595. }
  596. function UpLoadFile(fileinfo) { //点击确定按钮的时候
  597. debugger;
  598. var files = fileinfo.files;
  599. var fileURL = fileinfo.value;
  600. var fileName = files[0].name;
  601. if (fileName != null && fileName != "") {
  602. var data = new FormData();
  603. jQuery.each(jQuery('#FileUp')[0].files, function (i, file) {
  604. data.append('file-' + i, file);
  605. });
  606. //var info = document.getElementById("form1");
  607. //var formData = new FormData(info);
  608. $.modalConfirm("确定上传文件吗?", function (r) {
  609. if (r) {
  610. $.ajax({
  611. url: "/WMS/BasicSettings/Import" + "?" + Math.random() + "&fileURL=" + fileURL + "",
  612. type: "post",
  613. data: "",
  614. contentType: false,
  615. processData: false,
  616. success: function (data) {
  617. if (data != "" && data != "获取文件失败" && data != "上传文件失败") {
  618. $.modalAlertNew("WMS00014");
  619. $.currentWindow().$("#gridList").trigger("reloadGrid");
  620. }
  621. else {
  622. $.modalAlertNew("WMS00015", data);
  623. }
  624. },
  625. error: function (aa) {
  626. $.modalAlertNew("WMS00016", aa);
  627. }
  628. });
  629. }
  630. });
  631. }
  632. }
  633. </script>
  634. <iframe id="ifrm" src="" width="0" height="0" style="display:none"></iframe>
  635. <div class="topPanel">
  636. <div class="toolbar">
  637. <div class="btn-group">
  638. <a class="btn btn-primary" style="margin-left:3px;" onclick="$.reload()"><span class="glyphicon glyphicon-refresh"></span></a>
  639. <a id="NF-CleanUp" authorize="yes" class="btn btn-primary dropdown-text" onclick="btn_CleanUp()"><i class="fa fa-pencil-square-o"></i>清除</a>
  640. <a id="NF-ExportAll" authorize="yes" class="btn btn-primary dropdown-text" onclick="btn_ExportAll()"><i class="fa fa-download"></i>全部导出</a>
  641. <a id="NF-Print" authorize="yes" class="btn btn-primary dropdown-text" onclick="btn_Print()"><i class="fa fa-print"></i>打印</a>
  642. <a href="~/File/Stack/库位资料导入模板.xlsx" id="NF-IntroductionMould" authorize="yes" class="btn btn-primary dropdown-text" onclick="btn_IntroductionMould()"><i class="fa fa-file-excel-o"></i>导入模板下载</a>
  643. <a id="NF-Introduction" authorize="yes" class="btn btn-primary dropdown-text" onclick="btn_Introduction()">导入</a>
  644. <a id="NF-Clike" authorize="yes" class="btn btn-primary dropdown-text" onclick="btn_Clike()"><i class="fa fa-eject"></i>...</a>
  645. @*<a id="NF-GridHeader" authorize="yes" class="btn btn-primary dropdown-text" onclick="btn_GridHeader()"><i class="fa fa-list-alt"></i>多表头设置</a>*@
  646. </div>
  647. <div class="operates">
  648. <ul class="nav nav-pills">
  649. @*<li><a class="btn btn-primary" onclick="$.reload()"><span class="glyphicon glyphicon-refresh"></span></a></li>*@
  650. <li><a class="btn btn-primary dropdown-text" onclick="btn_Filter()"><i class="fa fa-filter"></i>过滤</a></li>
  651. <li><a id="NF-DataSource" authorize="yes" class="btn btn-primary dropdown-text" onclick="btn_DataSource()"><i class="fa fa-database"></i>设置数据源</a></li>
  652. <li><a id="NF-Cols" authorize="yes" class="btn btn-primary dropdown-text" onclick="btn_Cols()"><i class="fa fa-text-width"></i>列设置</a></li>
  653. <li class="split"></li>
  654. <li><a id="NF-GridFormat" authorize="yes" class="btn btn-primary dropdown-text" onclick="btn_GridFormat()"><i class="fa fa-bars"></i>个性化设置</a></li>
  655. <li class="split"></li>
  656. <li><a id="NF-Clear" authorize="yes" class="btn btn-primary dropdown-text" onclick="btn_Clear()"><i class="fa fa-times"></i>清空本菜单所有设置</a></li>
  657. <li><a id="NF-WatchPanel" authorize="yes" class="btn btn-primary dropdown-text" onclick="btn_WatchPanel()"><i class="fa fa-download"></i>看板显示</a></li>
  658. <li><a id="NF-ColsVisible" authorize="yes" class="btn btn-primary dropdown-text" onclick="btn_ColsVisible()"><i class="fa fa-user"></i>角色显示栏位</a></li>
  659. </ul>
  660. <a href="javascript:;" class="close"></a>
  661. </div>
  662. <script>$('.toolbar').authorizeButton()</script>
  663. </div>
  664. </div>
  665. <div class="gridPanel" id="gridPanel">
  666. <table id="gridList"></table>
  667. <div id="gridPager"></div>
  668. </div>