list1.js 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597
  1. 'use strict';
  2. var app = angular.module('app', [
  3. 'angularUtils.directives.dirPagination'
  4. ]);
  5. app.controller("listCtrl", ["$scope", "$http", "$timeout", function ($scope, $http, $timeout) {
  6. var self = this;
  7. var s4 = new SM4Util();
  8. self.userId = $.cookie("GlWorkPlatform-userid");
  9. self.userName = $.cookie("GlWorkPlatform-chineseName");
  10. self.get_AccessToken = localStorage.getItem("GlWorkPlatform-AccessToken");
  11. self.get_lastReturnPageno = sp.getUrlName("lastReturnPageno");
  12. var postCfg = {
  13. headers: {
  14. 'Content-Type': 'application/json',
  15. 'Authorization': "Bearer " + self.get_AccessToken
  16. }
  17. }
  18. self.type = sp.getUrlName("type") == "" ? 1 : sp.getUrlName("type");
  19. self.changeType = function (n) {
  20. if (self.type == n) {
  21. return;
  22. } else {
  23. self.type = n;
  24. self.getData(1, self.type)
  25. }
  26. }
  27. self.CrossPage = window.parent.CrossPage;
  28. self.loading = false;
  29. self.noDataTip = 1;//没有数据时赋变量为0,先默认为1
  30. self.listTotal1 = [];
  31. self.listTotal2 = [];
  32. self.list = [];
  33. self.pageno = 1;
  34. self.total_count = 0;
  35. //self.itemsPerPage = 10;
  36. self.pageOptions = [10, 20, 30, 40];
  37. self.search = JSON.parse($.cookie("danganList1-search"));
  38. //1为已提交、2为退回、3为合并提交、4为合并草稿、5为封装、6为已整理提交
  39. self.getData = function (pageno, type) {
  40. if (self.search == null) {
  41. self.search = {
  42. starttime: "",
  43. endtime: "",
  44. title: "",
  45. itemsPerPage: 10
  46. }
  47. }
  48. $.cookie("danganList1-search", JSON.stringify(self.search), { path: '/', expires: 1 });
  49. self.loading = true;
  50. self.pageno = pageno;
  51. $scope.__default__currentPage = self.pageno; //设置页面样式在第几页
  52. self.list = [];
  53. var functionName = type == 1 ? "queryBuHuoDataWithPage" : "queryDataByColumnsWithPage";
  54. if (type == 1) {
  55. var data = {
  56. tablename: "DOCELEMENT",
  57. starttime: self.search.starttime,
  58. endtime: self.search.endtime,
  59. title: self.search.title,
  60. sendstatus: "0",
  61. sqlwhere: "dpcode='" + self.userDpCode + "'",
  62. order: "SORTID desc",
  63. pageno: self.pageno,
  64. pagesize: self.search.itemsPerPage
  65. }
  66. } else {
  67. var data = {
  68. tablename: "DOCELEMENT_ZL",
  69. sqlwhere: {},
  70. sqlinwhere: {
  71. sendstatus: "2"
  72. },
  73. title: "",
  74. order: "SORTID desc",
  75. pageno: self.pageno,
  76. pagesize: self.search.itemsPerPage,
  77. columns: "ID,ROUTEINFOID,DOCUMENTTYPE,DOCTITLE,FLOWID,TO_CHAR(FINISHEDDATE,'YYYY-mm-dd hh24:mi:ss') AS FINISHEDDATE,SENDSTATUS,DOCISSUEDNUM,MIJIQIXIAN"
  78. }
  79. }
  80. $http.post(apiurljs.login + "g2app/DangAn/" + functionName, { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
  81. .success(function (obj) {
  82. var res = strToJson(s4.decryptData_CBC(obj.data));
  83. self.loading = false;
  84. if (res.totalCount == 0) {
  85. self.noDataTip = 0;
  86. } else if (res.data == null || res.data == undefined || res.data == "") {
  87. self.noDataTip = 0;
  88. self.getData(self.pageno - 1, self.type)
  89. } else {
  90. self.noDataTip = 1;
  91. self.list = res.data;
  92. console.log(self.list)
  93. self.listChecked = false;
  94. self.total_count = res.totalCount;
  95. if (QCHB(self.list, self["listTotal" + self.type], "ID").length > 0) {
  96. self["listTotal" + self.type] = self["listTotal" + self.type].concat(QCHB(self.list, self["listTotal" + self.type], "ID"))
  97. }
  98. var checkedNum = 0;
  99. $.each(self.list, function (index, item) {
  100. item.checked = false;
  101. item.STATUS = item.SENDSTATUS == 0 ? "待提交" : "被退回";
  102. if (!item.DOCTITLE) {
  103. item.DOCTITLE = item.BT ? item.BT : item.ZT ? item.ZT : item.TITLE;
  104. }
  105. $.each(self["listTotal" + self.type], function (index1, item1) {
  106. if (item.ID == item1.ID) {
  107. item.checked = item1.checked;
  108. }
  109. })
  110. if (item.checked == true) {
  111. checkedNum++
  112. }
  113. })
  114. if (checkedNum == self.list.length) {
  115. self.listChecked = true;
  116. }
  117. }
  118. })
  119. }
  120. self.getDP = function () {
  121. var data = {
  122. userid: self.userId
  123. }
  124. $http.post(apiurljs.login + "g2app/richang/queryDpInfo", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
  125. .success(function (obj) {
  126. var res = strToJson(s4.decryptData_CBC(obj.data));
  127. self.userDpName = res.data.length == 0 ? "" : res.data[0].SECTION;
  128. self.userDpCode = res.data.length == 0 ? "" : res.data[0].CODE;
  129. self.load();
  130. })
  131. }
  132. self.getDP();
  133. self.changeListCheck = function () {
  134. $.each(self.list, function (index, item) {
  135. item.checked = self.listChecked;
  136. $.each(self["listTotal" + self.type], function (index1, item1) {
  137. if (item1.ID == item.ID) {
  138. item1.checked = item.checked;
  139. }
  140. })
  141. })
  142. }
  143. self.changeCheck = function (item, n) {
  144. item.checked = n == 1 ? item.checked : !item.checked;
  145. $.each(self["listTotal" + self.type], function (index1, item1) {
  146. if (item1.ID == item.ID) {
  147. item1.checked = item.checked;
  148. }
  149. })
  150. event.stopPropagation()
  151. }
  152. self.load = function () {
  153. if (self.get_lastReturnPageno == undefined || self.get_lastReturnPageno == null || self.get_lastReturnPageno == "") {
  154. self.getData(self.pageno, self.type);
  155. } else {
  156. $timeout(function () {
  157. self.getData(parseInt(self.get_lastReturnPageno), self.type);
  158. }, 1)
  159. }
  160. }
  161. self.refresh = function () {
  162. self.CrossPage.type = null;
  163. self.getData(self.pageno, self.type);
  164. }
  165. ///查询-打开弹出层
  166. self.openSearchLayer = function () {
  167. if (self.search == null) {
  168. self.search = {
  169. starttime: "",
  170. endtime: "",
  171. title: "",
  172. itemsPerPage: 10
  173. }
  174. }
  175. sp.layer("#search");
  176. }
  177. self.getFlowList = function () {
  178. var data1 = {
  179. flowkinds: "'AA01','AA02','AA03'"
  180. }
  181. $http.post(apiurljs.login + "g2work/flow/queryInData", { data: s4.encryptData_CBC(JSON.stringify(data1)) }, postCfg)
  182. .success(function (obj) {
  183. var res = strToJson(s4.decryptData_CBC(obj.data));
  184. self.AllList = res.data;
  185. $http.get("js/getFlow.txt", "", postCfg)
  186. .success(function (obj2) {
  187. self.showList = obj2;
  188. self.AllList.forEach(function (item) {
  189. self.showList.forEach(function (item1) {
  190. item1.data.forEach(function (item2) {
  191. if (item.FLOWID == item2.FLOWID) {
  192. item2.FLOWNAME = item.CNAME;
  193. item2.TABLENAME = item.CODETABLE
  194. }
  195. })
  196. })
  197. })
  198. var data2 = {
  199. tablename: "DANGANFLOW",
  200. colums: "*",
  201. order: "ID",
  202. sqlwhere: "",
  203. sqlorwhere: "",
  204. sqlinwhere: "",
  205. sqllikewhere: ""
  206. };
  207. $http.post(apiurljs.login + "g2app/dataabase/queryDataByCol", { data: s4.encryptData_CBC(JSON.stringify(data2)) }, postCfg)
  208. .success(function (obj1) {
  209. var res1 = strToJson(s4.decryptData_CBC(obj1.data));
  210. self.funcList = res1.data;;
  211. self.showList.forEach(function (item) {
  212. var n = 0;
  213. self.funcList.forEach(function (item1) {
  214. item.data.forEach(function (item2) {
  215. if (item2.FLOWID == item1.FLOWID) {
  216. //item.checked = true;
  217. n++
  218. }
  219. })
  220. })
  221. item.checked = n == item.data.length;
  222. })
  223. })
  224. })
  225. })
  226. }
  227. self.getFlowList()
  228. self.btnSubmit = function () {
  229. var ids = [], list = [];
  230. self["listTotal" + self.type].filter(function (item) {
  231. if (item.checked == true) {
  232. list.push(item)
  233. ids.push(item.ROUTEINFOID)
  234. }
  235. })
  236. if (ids.length == 0) {
  237. sp.dialog("请选择要提交的案件!");
  238. return;
  239. }
  240. var dialogHead = "<span class=\"sp-dialog-head\"><span class=\"sp-dialog-tip\">温馨提示</span><span class=\"sp-dialog-close sp-closeDialog\" title=\"关闭\">×</span></span>";
  241. var dialogBody = "<div class=\"sp-dialog-body\">您确认要提交这些案件吗?</div>";
  242. var dialogFoot = "<div class=\"sp-dialog-foot\"><input id='upDataTrue' type='button' value='确 认' class='sp-dialog-btnTrue' /><input type='button' value='取 消' class='sp-dialog-btnCancle sp-closeDialog' /></div>";
  243. $('.sp-dialog').html(dialogHead + dialogBody + dialogFoot);
  244. sp.openCenter(".sp-dialog");
  245. $('.sp-closeDialog').click(function (event) {
  246. sp.dialoghide();
  247. event.preventDefault();
  248. event.stopPropagation();
  249. });
  250. $("#upDataTrue").click(function () {
  251. sp.dialoghide();
  252. if (self.type == 1) {
  253. var data = {
  254. tablename: "DOCELEMENT_ZL",
  255. pagesize: 1,
  256. pageno: 1,
  257. colums: "ID,JIANHAO",
  258. order: "JIANHAO desc",
  259. sqlwhere: { MIJIQIXIAN: "10年" },
  260. sqlorwhere: "",
  261. sqlinwhere: {
  262. LOCKSTATUS: "'0','" + self.userId + "'",
  263. sendstatus: "1"
  264. } ,
  265. sqllikewhere: ""
  266. }
  267. $http.post(apiurljs.login + "g2app/dataabase/queryDataByColWithPage", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
  268. .success(function (obj) {
  269. var res = strToJson(s4.decryptData_CBC(obj.data));
  270. if (res.data == null || res.data == undefined || res.data == "") {
  271. var JIANHAO = 0
  272. } else {
  273. var JIANHAO = res.data[0].JIANHAO;
  274. }
  275. var array = [];
  276. $.each(ids, function (index, item) {
  277. array.push({ routeinfoid: item, mijiqixian: "10年", jianhao: JIANHAO * 1 + index + 1, archyear: sp.currentYear(), organizationma: self.userDpCode })
  278. })
  279. var data1 = {
  280. data: ids,
  281. userid: self.userId,
  282. username: self.userName,
  283. updata: array
  284. }
  285. $http.post(apiurljs.login + "g2app/DangAn/SendData", { data: s4.encryptData_CBC(JSON.stringify(data1)) }, postCfg)
  286. .success(function (obj1) {
  287. var res1 = strToJson(s4.decryptData_CBC(obj1.data));
  288. if (res1.success) {
  289. sp.dialog("提交成功!");
  290. self.getData(1, self.type);
  291. self["listTotal" + self.type] = self["listTotal" + self.type].filter(function (item) {
  292. return ids.every(function (item1) {
  293. return item.ROUTEINFOID != item1;
  294. })
  295. })
  296. $timeout(function () { sp.dialoghide() }, 1500)
  297. } else {
  298. sp.dialog(res1.message)
  299. }
  300. })
  301. })
  302. } else {
  303. var JIANHAO1, JIANHAO2, JIANHAO3;
  304. var data1 = {
  305. tablename: "DOCELEMENT_ZL",
  306. pagesize: 1,
  307. pageno: 1,
  308. colums: "ID,JIANHAO",
  309. order: "JIANHAO desc",
  310. sqlwhere: { MIJIQIXIAN: "10年" },
  311. sqlorwhere: "",
  312. sqlinwhere: {
  313. LOCKSTATUS: "'0','" + self.userId + "'",
  314. sendstatus: "1"
  315. },
  316. sqllikewhere: ""
  317. }
  318. $http.post(apiurljs.login + "g2app/dataabase/queryDataByColWithPage", { data: s4.encryptData_CBC(JSON.stringify(data1)) }, postCfg)
  319. .success(function (obj1) {
  320. var res1 = strToJson(s4.decryptData_CBC(obj1.data));
  321. if (res1.data == null || res1.data == undefined || res1.data == "") {
  322. JIANHAO1 = 0
  323. } else {
  324. JIANHAO1 = res1.data[0].JIANHAO;
  325. }
  326. var data2 = {
  327. tablename: "DOCELEMENT_ZL",
  328. pagesize: 1,
  329. pageno: 1,
  330. colums: "ID,JIANHAO",
  331. order: "JIANHAO desc",
  332. sqlwhere: { MIJIQIXIAN: "30年" },
  333. sqlorwhere: "",
  334. sqlinwhere: {
  335. LOCKSTATUS: "'0','" + self.userId + "'",
  336. sendstatus: "1"
  337. },
  338. sqllikewhere: ""
  339. }
  340. $http.post(apiurljs.login + "g2app/dataabase/queryDataByColWithPage", { data: s4.encryptData_CBC(JSON.stringify(data2)) }, postCfg)
  341. .success(function (obj2) {
  342. var res2 = strToJson(s4.decryptData_CBC(obj2.data));
  343. if (res2.data == null || res2.data == undefined || res2.data == "") {
  344. JIANHAO2 = 0
  345. } else {
  346. JIANHAO2 = res2.data[0].JIANHAO;
  347. }
  348. var data3 = {
  349. tablename: "DOCELEMENT_ZL",
  350. pagesize: 1,
  351. pageno: 1,
  352. colums: "ID,JIANHAO",
  353. order: "JIANHAO desc",
  354. sqlwhere: { MIJIQIXIAN: "永久" },
  355. sqlorwhere: "",
  356. sqlinwhere: {
  357. LOCKSTATUS: "'0','" + self.userId + "'",
  358. sendstatus: "1"
  359. },
  360. sqllikewhere: ""
  361. }
  362. $http.post(apiurljs.login + "g2app/dataabase/queryDataByColWithPage", { data: s4.encryptData_CBC(JSON.stringify(data3)) }, postCfg)
  363. .success(function (obj3) {
  364. var res3 = strToJson(s4.decryptData_CBC(obj3.data));
  365. if (res3.data == null || res3.data == undefined || res3.data == "") {
  366. JIANHAO3 = 0
  367. } else {
  368. JIANHAO3 = res3.data[0].JIANHAO;
  369. }
  370. var array = [];
  371. var index1 = 1, index2 = 1, index3 = 1;
  372. list.forEach(function (item) {
  373. if (item.MIJIQIXIAN == "10年") {
  374. array.push({ routeinfoid: item.ROUTEINFOID, sendstatus: "1", jianhao: JIANHAO1 * 1 + index1 })
  375. index1++
  376. } else if (item.MIJIQIXIAN == "30年") {
  377. array.push({ routeinfoid: item.ROUTEINFOID, sendstatus: "1", jianhao: JIANHAO2 * 1 + index2 })
  378. index2++
  379. } else if (item.MIJIQIXIAN == "永久") {
  380. array.push({ routeinfoid: item.ROUTEINFOID, sendstatus: "1", jianhao: JIANHAO3 * 1 + index3 })
  381. index3++
  382. }
  383. })
  384. $http.post(apiurljs.login + "g2app/DangAn/SendBackData", { data: s4.encryptData_CBC(JSON.stringify(array)) }, postCfg)
  385. .success(function (obj) {
  386. var res = strToJson(s4.decryptData_CBC(obj.data));
  387. if (res.success) {
  388. sp.dialog("提交成功!");
  389. self.getData(1, self.type);
  390. self["listTotal" + self.type] = self["listTotal" + self.type].filter(function (item) {
  391. return ids.every(function (item1) {
  392. return item.ROUTEINFOID != item1;
  393. })
  394. })
  395. $timeout(function () { sp.dialoghide() }, 1500)
  396. } else {
  397. sp.dialog(res.message)
  398. }
  399. })
  400. })
  401. })
  402. })
  403. }
  404. })
  405. }
  406. self.btnSearch = function () {
  407. self.getData(1, self.type);
  408. sp.layerhide()
  409. }
  410. self.closeSeach = function () {
  411. self.search.title = "";
  412. sp.layerhide();
  413. $.cookie("danganList1-search", null, { path: '/', expires: -1 });
  414. self.getData(1, self.type);
  415. };
  416. ///捕获-打开弹出层
  417. self.openFilterLayer = function () {
  418. var data = {
  419. tablename: "DANGANFLOW",
  420. colums: "*",
  421. order: "ID",
  422. sqlwhere: {
  423. DPCODE: self.userDpCode,
  424. STATUS: "启用"
  425. },
  426. sqlorwhere: "",
  427. sqlinwhere: "",
  428. sqllikewhere: ""
  429. };
  430. $http.post(apiurljs.login + "g2app/dataabase/queryDataByCol", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
  431. .success(function (obj) {
  432. var res = strToJson(s4.decryptData_CBC(obj.data));
  433. if (res.data.length == 0) {
  434. sp.dialog("请先设置捕获流程!")
  435. } else {
  436. self.filter = {
  437. starttime: sp.format(sp.getPreMonthDay(sp.getLocalDate(), -12)),
  438. endtime: sp.format(sp.getLocalDate()),
  439. dpname: self.userDpName
  440. }
  441. self.windowFlag = 1;
  442. sp.layer("#filter1");
  443. }
  444. })
  445. }
  446. self.goDown = function () {
  447. self.windowFlag = 2;
  448. sp.closeCenter('.sp-layer')
  449. $timeout(function () {
  450. sp.layer("#filter2");
  451. },1)
  452. }
  453. self.goUp = function () {
  454. self.windowFlag = 1;
  455. sp.closeCenter('.sp-layer')
  456. $timeout(function () {
  457. sp.layer("#filter1");
  458. },1)
  459. }
  460. self.btnFilter = function () {
  461. sp.layerhide();
  462. self.loading = true;
  463. var data = {
  464. starttime: self.filter.starttime + " 00:00:00",
  465. endtime: self.filter.endtime + " 23:59:59",
  466. userid: self.userId,
  467. username: self.userName,
  468. cname: "DOCELEMENT",
  469. status: "启用",
  470. dpname: self.userDpName,
  471. dpcode: self.userDpCode
  472. }
  473. $http.post(apiurljs.login + "g2app/DangAn/BatchBuHuoApiT", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
  474. .success(function (obj) {
  475. var res = strToJson(s4.decryptData_CBC(obj.data));
  476. self.loading = false;
  477. if (res.success == true) {
  478. self.getData(1, 1);
  479. sp.dialog("捕获到" + res.data.count + "条数据!");
  480. } else {
  481. sp.dialog(res.message);
  482. }
  483. })
  484. .error(function (XMLHttpRequest, textStatus, errorThrown) {
  485. if (textStatus != 200) {
  486. self.loading = false;
  487. sp.dialog("捕获失败!");
  488. }
  489. })
  490. }
  491. self.checkItem = function (obj) {
  492. obj.checked = !obj.checked;
  493. if (obj.checked == true) {
  494. var array = [];
  495. obj.data.forEach(function (item) {
  496. array.push({
  497. FLOWID: item.FLOWID,
  498. FLOWNAME: item.FLOWNAME,
  499. FLOWCODE: item.FLOWCODE,
  500. TABLENAME: item.TABLENAME
  501. })
  502. })
  503. var data = {
  504. tablename: "DANGANFLOW",
  505. data: array
  506. }
  507. console.log(array)
  508. $http.post(apiurljs.login + "g2app/Data/insertChildDataList2", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
  509. .success(function (obj) {
  510. var res = strToJson(s4.decryptData_CBC(obj.data));
  511. self.getFlowList();
  512. })
  513. } else {
  514. var array = [];
  515. self.funcList.forEach(function (item) {
  516. obj.data.forEach(function (item1) {
  517. if (item.FLOWID == item1.FLOWID) {
  518. array.push("'" + item.ID + "'")
  519. }
  520. })
  521. })
  522. var data = {
  523. tablename: "DANGANFLOW",
  524. sqlwhere: "id IN (" + array.join(",") + ")"
  525. };
  526. $http.post(apiurljs.login + "g2app/dataabase/deletBywhere", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
  527. .success(function (obj) {
  528. var res = strToJson(s4.decryptData_CBC(obj.data));
  529. console.log(res)
  530. });
  531. }
  532. }
  533. self.Edit = function (item) {
  534. //window.location.href = "formedt.html?routeinfoid=" + ROUTEINFOID + "&lastReturn=list&lastReturnPageno=" + self.pageno + "&type=" + self.type;
  535. window.location.href = "detail1.html?ID=" + item.ID + "&routeinfoid=" + item.ROUTEINFOID + "&lastReturn=list&lastReturnPageno=" + self.pageno + "&type=" + self.type
  536. event.stopPropagation()
  537. }
  538. self.Delete = function (routeinfoid) {
  539. var dialogHead = "<span class=\"sp-dialog-head\"><span class=\"sp-dialog-tip\">温馨提示</span><span class=\"sp-dialog-close sp-closeDialog\" title=\"关闭\">×</span></span>";
  540. var dialogBody = "<div class=\"sp-dialog-body\">您确认要删除此记录吗?</div>";
  541. var dialogFoot = "<div class=\"sp-dialog-foot\"><input id='upDataTrue' type='button' value='确 认' class='sp-dialog-btnTrue' /><input type='button' value='取 消' class='sp-dialog-btnCancle sp-closeDialog' /></div>";
  542. $('.sp-dialog').html(dialogHead + dialogBody + dialogFoot);
  543. sp.openCenter(".sp-dialog");
  544. $('.sp-closeDialog').click(function (event) {
  545. sp.dialoghide();
  546. event.preventDefault();
  547. event.stopPropagation();
  548. });
  549. $("#upDataTrue").click(function () {
  550. sp.dialoghide();
  551. var data = {
  552. routeinfoid: routeinfoid
  553. }
  554. $http.post(apiurljs.login + "g2app/DangAn/deleteBuHuoData", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
  555. .success(function (obj) {
  556. var res = strToJson(s4.decryptData_CBC(obj.data));
  557. if (res.success) {
  558. self.getData(self.pageno, self.type);
  559. }
  560. })
  561. })
  562. }
  563. //头部下滚冻结
  564. $(function () {
  565. //页面高度撑满
  566. setTimeout(function () {
  567. if ($(".ibox-content").height() < $(window).height() - 31) {
  568. $(".ibox-content").css("height", $(window).height() - 31)
  569. }
  570. }, 1)
  571. })
  572. }])
  573. function QCHB(arr1,arr2,filed){
  574. return arr1.filter(function (item) {
  575. return arr2.every(function (item1) {
  576. return item[filed] != item1[filed];
  577. })
  578. })
  579. }