heheNewOrderList.jsp 42 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021
  1. <%@ page import="java.util.Date" %>
  2. <%@ page contentType="text/html;charset=UTF-8" %>
  3. <%@ include file="/WEB-INF/views/include/taglib.jsp" %>
  4. <html>
  5. <head>
  6. <title>订单管理</title>
  7. <meta name="decorator" content="default"/>
  8. <style type="text/css">
  9. .table th {
  10. text-align: center;
  11. }
  12. .table td {
  13. text-align: center;
  14. }
  15. .data-title {
  16. width: 100%;
  17. display: table;
  18. }
  19. .data-title ul li {
  20. word-break: break-all;
  21. display: table-cell;
  22. width: 100px;
  23. border: 1px solid #000;
  24. text-align: center;
  25. height: 35px;
  26. vertical-align: middle;
  27. border-right: 0;
  28. border-bottom: 0
  29. }
  30. .data-title ul {
  31. margin-bottom: 0 !important;
  32. display: table-row;
  33. }
  34. .data-title ul li:last-of-type {
  35. width: 120px;
  36. border-right: 1px solid #000000;
  37. }
  38. .data-title ul:last-of-type li {
  39. border-bottom: 1px solid #000000
  40. }
  41. .data-title ul li:nth-child(6) {
  42. width: 80px
  43. }
  44. .spileOrder li:nth-of-type(1) {
  45. position: relative
  46. }
  47. .san {
  48. width: 10px;
  49. height: 10px;
  50. border-top: 2px solid #000;
  51. border-right: 2px solid #000;
  52. transform: rotate(45deg);
  53. position: absolute;
  54. right: -2px;
  55. top: 50%;
  56. margin-top: -5px;
  57. cursor: pointer
  58. }
  59. .red-waring {
  60. margin: 0 !important;
  61. background-color: #f3f3f3 !important;
  62. }
  63. .red-waring li {
  64. border-color: red !important;
  65. }
  66. #biao1 {
  67. position: absolute;
  68. left: -9999px;
  69. top: -9999px;
  70. z-index: -99;
  71. width: 1px;
  72. height: 1px;
  73. }
  74. .operation-btn {
  75. cursor: pointer;
  76. }
  77. .operation-block {
  78. background: #fff;
  79. position: absolute;
  80. right: 2px;
  81. padding: 10px;
  82. border: 1px solid #666;
  83. -webkit-border-radius: 5px;
  84. -moz-border-radius: 5px;
  85. border-radius: 5px;
  86. z-index: 999;
  87. display: none;
  88. }
  89. .operation-block a {
  90. display: block;
  91. padding: 3px 0;
  92. }
  93. .refund-selector {
  94. width: 150px;
  95. height: 26px;
  96. line-height: 26px;
  97. text-indent: 10px;
  98. background: #fff;
  99. display: inline-block;
  100. -webkit-border-radius: 3px;
  101. -moz-border-radius: 3px;
  102. border-radius: 3px;
  103. border: 1px solid #ccc;
  104. vertical-align: middle;
  105. position: relative;
  106. cursor: pointer;
  107. }
  108. .refund-selector ul {
  109. z-index: 999;
  110. }
  111. .refund-selector li {
  112. width: 100%;
  113. text-indent: 10px;
  114. }
  115. .refund-selector li:hover {
  116. background: #3875d7;
  117. color: #fff;
  118. }
  119. .refund-arrow {
  120. display: inline-block;
  121. width: 18px;
  122. height: 100%;
  123. position: absolute;
  124. right: 0;
  125. top: 0;
  126. border-left: 1px solid #aaa;
  127. border-radius: 0 4px 4px 0;
  128. background-clip: padding-box;
  129. background: #eee;
  130. background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #ccc), color-stop(0.6, #eee));
  131. background-image: -webkit-linear-gradient(center bottom, #ccc 0, #eee 60%);
  132. background-image: -moz-linear-gradient(center bottom, #ccc 0, #eee 60%);
  133. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#cccccc', GradientType=0);
  134. background-image: linear-gradient(top, #ccc 0, #eee 60%);
  135. }
  136. .refund-arrow b {
  137. display: block;
  138. width: 100%;
  139. height: 100%;
  140. background: url('/static/jquery-select2/3.4/select2.png') no-repeat 0 1px;
  141. }
  142. .refund-block1, .refund-block2 {
  143. width: 100%;
  144. position: absolute;
  145. background: #fff;
  146. -webkit-border-radius: 3px;
  147. -moz-border-radius: 3px;
  148. border-radius: 3px;
  149. border: 1px solid #ccc;
  150. margin: 0;
  151. color: #666;
  152. display: none;
  153. }
  154. .refund-more {
  155. position: relative;
  156. }
  157. .refund-block1 {
  158. top: 26px;
  159. }
  160. .refund-block2 {
  161. left: 100%;
  162. top: 0;
  163. }
  164. .refund-selector .refund-more:hover .refund-block2 {
  165. display: block;
  166. }
  167. #searchForm {
  168. line-height: 40px;
  169. }
  170. #searchForm .ul-form {
  171. overflow: visible;
  172. }
  173. #searchForm {
  174. white-space: nowrap;
  175. }
  176. #searchForm label {
  177. margin-top: 15px;
  178. }
  179. .ul-form {
  180. white-space: nowrap;
  181. margin-left: -10px !important;
  182. }
  183. .ul-form label {
  184. width: 90px;
  185. text-align: right;
  186. }
  187. .time-space-symbols {
  188. width: 100px;
  189. display: inline-block;
  190. text-align: center;
  191. }
  192. #btnSubmit {
  193. width: 128px;
  194. margin-left: 152px;
  195. }
  196. .select-ele {
  197. width: 177px;
  198. }
  199. #auditBox {
  200. padding: 20px;
  201. line-height: 30px
  202. }
  203. #auditBox p {
  204. font-size: 16px;
  205. margin: 0 0 0 0;
  206. }
  207. #auditBox .note-div {
  208. font-size: 16px;
  209. }
  210. .weishaIcon {
  211. background: darkorange;
  212. color: white;
  213. margin: 0 0px;
  214. padding: 0 3px;
  215. font-style: normal;
  216. font-size: 12px;
  217. display: inline-block;
  218. border-radius: 2px
  219. }
  220. </style>
  221. <script type="text/javascript" src="${ctxStatic}/QRCode/jquery.qrcode.min.js"></script>
  222. <script type="text/javascript" src="static/common/clipboard.min.js"></script>
  223. <script type="text/javascript">
  224. function copyUrl2() {
  225. var Url2 = document.getElementById("biao1");
  226. Url2.select(); // 选择对象
  227. document.execCommand("Copy"); // 执行浏览器复制命令
  228. // alert("已复制好,可贴粘。");
  229. }
  230. $(document).ready(function () {
  231. var lab = '';
  232. var val = '';
  233. var startRefundTime = $('#startRefundTime');
  234. var endRefundTime = $('#endRefundTime');
  235. startRefundTime.attr('disabled', 'disabled');
  236. endRefundTime.attr('disabled', 'disabled');
  237. startRefundTime.val('');
  238. endRefundTime.val('');
  239. switch ('${orderRefundType}') {
  240. case '':
  241. lab = '全部';
  242. val = '';
  243. break;
  244. case '0':
  245. lab = '无';
  246. val = '0';
  247. break;
  248. case '1':
  249. lab = '全部状态';
  250. val = '1';
  251. break;
  252. case '11':
  253. lab = '退款(退货)中';
  254. val = '11';
  255. break;
  256. case '12':
  257. lab = '已完成';
  258. val = '12';
  259. startRefundTime.removeAttr('disabled');
  260. endRefundTime.removeAttr('disabled');
  261. startRefundTime.val('${startRefundTime}');
  262. endRefundTime.val('${endRefundTime}');
  263. break;
  264. case '13':
  265. lab = '已取消';
  266. val = '13';
  267. break;
  268. default:
  269. }
  270. $("#orderRefundType").val(val);
  271. $('.refund-val').text(lab);
  272. $('body').click(function (e) {
  273. var target = $(e.target),
  274. opBlockEle = target.siblings('.operation-block');
  275. if ((target.is('.operation-btn') && opBlockEle.css('display') == 'block') ||
  276. (!target.is('.operation-block') && !target.is('.operation-btn'))) {
  277. $('.operation-block').hide();
  278. } else {
  279. $('.operation-block').hide();
  280. opBlockEle.show();
  281. }
  282. });
  283. $('.refund-selector').on('click', function () {
  284. var block1 = $('.refund-block1');
  285. if (block1.css('display') === 'none') {
  286. $('.refund-block1').show();
  287. }
  288. });
  289. $('.refund-options').on('click', function (e) {
  290. var val = $(this).text();
  291. $("#orderRefundType").val($(this).data('v'));
  292. var startRefundTime = $('#startRefundTime');
  293. var endRefundTime = $('#endRefundTime');
  294. if ($(this).data('v') == '12') {
  295. startRefundTime.removeAttr('disabled');
  296. endRefundTime.removeAttr('disabled');
  297. } else {
  298. startRefundTime.attr('disabled', 'disabled');
  299. endRefundTime.attr('disabled', 'disabled');
  300. startRefundTime.val('');
  301. endRefundTime.val('');
  302. }
  303. $('.refund-val').text(val);
  304. $('.refund-block1').hide();
  305. e.stopPropagation();
  306. })
  307. if ($(".operation-block").length > 0) {
  308. var length = $(".operation-block").length;
  309. for (var i = 0; i < length; i++) {
  310. var b = $(".operation-block").get(i);
  311. if ($(b).html().trim() == '') {
  312. $(b).hide();
  313. $(b).prev().hide();
  314. }
  315. }
  316. }
  317. });
  318. function page(n, s) {
  319. $("#pageNo").val(n);
  320. $("#pageSize").val(s);
  321. $("#searchForm").submit();
  322. return false;
  323. }
  324. // 二维码分享
  325. function QRCodewin(orderId, orderNo) {
  326. var html = '<div style="padding:10px;">订单号:' + orderNo + '' +
  327. '<div class="code" style="text-align: center;"></div>' +
  328. '</div>';
  329. $.jBox(html, {
  330. title: "订单二维码分享",
  331. width: $(top.document).width() - 1700,
  332. height: $(top.document).height() - 1600,
  333. buttons: {'关闭': true}
  334. });
  335. var enCodeRedirectUrl;
  336. var redirectUrl = '${fns:getConfig('caimei.crm.server')}oauth.action?orderId=' + orderId;
  337. $.ajax({
  338. url: "${ctx}/bulkpurchase/contractOrder/enCode",
  339. data: {"redirectUrl": redirectUrl},
  340. type: "POST",
  341. async: false,
  342. success: function (data) {
  343. enCodeRedirectUrl = data.enCodeRedirectUrl;
  344. }
  345. });
  346. var shareUrl = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=${fns:getConfig('weixin.appId')}&redirect_uri=' + enCodeRedirectUrl + '&response_type=code&scope=snsapi_base&state=bulkpurchase#wechat_redirect';
  347. $('.code').qrcode({
  348. width: 150,
  349. height: 150,
  350. text: shareUrl
  351. });
  352. }
  353. // 供应商链接
  354. function shareShopLink(shopOrderID) {
  355. var cpTxt = '${fns:getConfig('caimei.crm.server')}supplier/order/shopAuthorizedOrder.rpc?shopOrderID=' + shopOrderID;
  356. var html = '<div style="padding:10px;">' + cpTxt +
  357. '<div class="code" style="text-align: center;"></div>' +
  358. '</div>';
  359. $('#biao1').val(cpTxt);//设置值
  360. $.jBox(html, {
  361. title: "复制以下链接,可分享订单信息",
  362. width: $(top.document).width() - 1400,
  363. height: $(top.document).height() - 1600,
  364. buttons: {'复制': 1, '关闭': true},
  365. // buttons: { '关闭': true },
  366. submit: function (v, h, f) {
  367. if (v == 1) {
  368. copyUrl2()
  369. // alert("1")
  370. // window.clipboardData.setData("text" , cpTxt);
  371. }
  372. }
  373. });
  374. }
  375. // 终止备注信息
  376. function orderRemarkswin(orderStopRemarks) {
  377. var html = "<div style='padding:10px;'><textarea id='remarks' name='remarks' rows='5' cols='12' readonly='true'>" + orderStopRemarks + "</textarea></div>";
  378. $.jBox(html, {
  379. title: "备注",
  380. width: $(top.document).width() - 1600,
  381. height: $(top.document).height() - 1600,
  382. buttons: {'关闭': true}
  383. });
  384. }
  385. // 订单终止弹窗
  386. function orderStopwin(id, flag) {
  387. var html = "<div style='padding:10px;'><font color='red'>*</font>备注:<textarea id='remarks' name='remarks' rows='5' cols='12'></textarea></div>";
  388. var submit = function (v, h, f) {
  389. if (f.remarks == '') {
  390. $.jBox.tip("请输入您填写备注信息", 'error', {focusId: "remarks"});
  391. return false;
  392. }
  393. // $.jBox.tip("备注:" + f.remarks);
  394. location.href = "${ctx}/bulkpurchase/contractOrder/saveOrderStopInfo?id=" + id + "&flag=" + flag + "&orderStopRemarks=" + f.remarks;
  395. return true;
  396. };
  397. $.jBox(html, {title: "确认终止订单?", submit: submit});
  398. }
  399. // 未分期确认订单
  400. function openwin(id, flag) {
  401. var submit = function (v, h, f) {
  402. if (v == true) {
  403. location.href = "${ctx}/bulkpurchase/contractOrder/saveConfirmFlag?id=" + id + "&flag=" + flag;
  404. }
  405. return true;// close
  406. };
  407. // 自定义按钮
  408. $.jBox.confirm("客户已确认了吗?", "确认订单", submit, {buttons: {'确认': true, '取消': false}});
  409. }
  410. // 分期确认订单
  411. function stagesOpenwin(id, flag) {
  412. var submit = function (v, h, f) {
  413. if (v == true) {
  414. location.href = "${ctx}/bulkpurchase/contractOrder/saveStagesConfirmFlag?id=" + id + "&flag=" + flag;
  415. }
  416. return true;// close
  417. };
  418. // 自定义按钮
  419. $.jBox.confirm("确认此订单可以生成?", "确认订单", submit, {buttons: {'确认': true, '取消': false}});
  420. }
  421. //编辑经理折扣
  422. function modelShow(orderID) {
  423. top.$.jBox("iframe:${ctx}/order/DiscountFee?orderID=" + orderID, {
  424. iframeScrolling: 'yes',
  425. top: 150,
  426. width: 480,
  427. height: 300,
  428. persistent: true,
  429. title: "编辑经理折扣",
  430. buttons: {"确认": '1', "取消": '-1'},
  431. submit: function (v, h, f) {
  432. //确定
  433. var $jboxFrame = top.$('#jbox-iframe');
  434. var $mainFrame = top.$('#mainFrame');
  435. if ('1' == v && 1 == $jboxFrame.size() && 1 == $mainFrame.size()) {
  436. var rechargeInfo = $jboxFrame[0].contentWindow.submit();
  437. var split = rechargeInfo.split(",");
  438. var payTotalFee = split[0];
  439. var discountFee = split[1];
  440. //取值,然后调用后台接口传入参数,最后刷新页面
  441. if (payTotalFee <= 0) {
  442. return false;
  443. }
  444. $.post("${ctx}/order/saveDiscountFee", {
  445. 'discountFee': discountFee,
  446. 'orderID': orderID,
  447. 'payTotalFee': payTotalFee
  448. }, function (data) {
  449. if (true == data.success) {
  450. refresh();
  451. $.jBox.tip(data.msg, 'info', {timeout: 1000});
  452. } else {
  453. alertx(data.msg, 1000);
  454. }
  455. }, "JSON");//这里返回的类型有:json,html,xml,text
  456. }
  457. return true;
  458. }, loaded: function (h) { //隐藏滚动条
  459. $(".jbox-content", top.document).css("overflow-y", "hidden");
  460. }
  461. });
  462. }
  463. //订单商品备注
  464. function remarks(orderID, shopOrderID) {
  465. top.$.jBox("iframe:${ctx}/order/cmOrderRemark/remarksView?orderID=" + orderID + "&shopOrderID=" + shopOrderID, {
  466. iframeScrolling: 'yes',
  467. top: 150,
  468. width: 400,
  469. height: 480,
  470. persistent: true,
  471. title: "订单备注信息",
  472. buttons: {"确认": '1', "关闭": '-1'},
  473. submit: function (v, h, f) {
  474. //确定
  475. var $jboxFrame = top.$('#jbox-iframe');
  476. var $mainFrame = top.$('#mainFrame');
  477. if ('1' == v && 1 == $jboxFrame.size() && 1 == $mainFrame.size()) {
  478. var remarks = $jboxFrame[0].contentWindow.submit();
  479. // var arr = item.split(",");
  480. // var remarks = arr[0];
  481. if ('' == remarks) {
  482. alertx("备注信息不能为空!!!")
  483. return false;
  484. }
  485. saveRemarks(remarks, orderID, shopOrderID);
  486. return true;
  487. }
  488. return true;
  489. },
  490. loaded: function (h) { //隐藏滚动条
  491. $(".jbox-content", top.document).css("overflow-y", "hidden");
  492. }
  493. });
  494. }
  495. function saveRemarks(remarks, orderID, shopOrderID) {
  496. $.post("${ctx}/order/cmOrderRemark/addRemarks", {
  497. "remarks": remarks, "orderID": orderID, "shopOrderID": shopOrderID
  498. }, function (data) {
  499. if (true == data.success) {
  500. refresh();
  501. $.jBox.tip(data.msg, 'info');
  502. } else {
  503. $.jBox.tip(data.msg, 'error');
  504. }
  505. }, "JSON");//这里返回的类型有:json,html,xml,text
  506. }
  507. //修改订单状态弹窗
  508. function updateOrderStatus(orderId) {
  509. top.$.jBox("iframe:${ctx}/bulkpurchase/contractOrder/orderStatusEdit?orderId=" + orderId, {
  510. iframeScrolling: 'yes',
  511. top: 150,
  512. width: 400,
  513. height: 230,
  514. persistent: true,
  515. title: "更新订单状态",
  516. buttons: {"确认修改": '1', "关闭": '-1'},
  517. submit: function (v, h, f) {
  518. //确定
  519. var $jboxFrame = top.$('#jbox-iframe');
  520. var $mainFrame = top.$('#mainFrame');
  521. if ('1' == v && 1 == $jboxFrame.size() && 1 == $mainFrame.size()) {
  522. var item = $jboxFrame[0].contentWindow.submit();
  523. var arr = item.split(",");
  524. var orderStatus = arr[0];
  525. var updateDate = arr[1];
  526. if (updateDate == "") {
  527. alertx("时间不能为空!!!")
  528. return false;
  529. }
  530. saveOrderStatus(orderStatus, updateDate, orderId);
  531. return true;
  532. }
  533. return true;
  534. }
  535. });
  536. }
  537. function saveOrderStatus(orderStatus, updateDate, orderId) {
  538. $.post("${ctx}/bulkpurchase/contractOrder/saveOrderStatus", {
  539. 'orderStatus': orderStatus, "updateDate": updateDate, "orderId": orderId
  540. }, function (data) {
  541. if (true == data.success) {
  542. refresh();
  543. $.jBox.tip(data.msg, 'info');
  544. } else {
  545. $.jBox.tip(data.msg, 'error');
  546. }
  547. }, "JSON");//这里返回的类型有:json,html,xml,text
  548. }
  549. function refresh() {
  550. window.location.href = "${ctx}/hehe/new/order/orderList/";
  551. }
  552. function checkfun() {
  553. var orderID = $('#orderID').val();
  554. var reg = /^[0-9]*$/;
  555. if (!reg.test(orderID) && orderID.trim() != "") {
  556. alertx("请输入正确的订单ID!");
  557. // $('#orderID').val("");
  558. return false;
  559. }
  560. return true;
  561. }
  562. //抹平收款
  563. function collection(orderId) {
  564. $.post("${ctx}/order/gatheringData", {
  565. 'orderId': orderId
  566. }, function (data) {
  567. if (true == data.success) {
  568. var html = "<div id='auditBox'>" +
  569. "<P>确定抹平收款吗?抹平后该订单将变为已收款状态</p>" +
  570. "<P><span>订单金额:<b>¥" + Number(data.payTotalFee).toFixed(2) + "</b></span></p>" +
  571. "<P><span>应收金额:<b>¥" + Number(data.payableAmount).toFixed(2) + "</b><span style='color:#FF0000'>(账户余额抵扣: ¥<b>" + Number(data.balancePayFee).toFixed(2) + "</b>)</span></span></p>" +
  572. "<P><span>已收金额:<b>¥" + Number(data.associateAmount).toFixed(2) + "</b></span></p>" +
  573. "<div><div class='note-div'><span style='color:#FF0000'>*</span>备注</div></div>" +
  574. "<textarea name='auditNote' style='width: 100%;min-height:60px;'></textarea>" +
  575. "<div class='note-div' style='display: none' id='noteError'><span style='color:#FF0000'>请填写备注</span> </div>" +
  576. "</div>";
  577. $.jBox(html, {
  578. title: "确认提示", width: 500, height: 400, buttons: {"确定": '1', "取消": '-1'},
  579. submit: function (v, h, f) {
  580. if ('1' == v) {
  581. var content = document.getElementsByName("auditNote")[0].value;
  582. if (content == '' || content == null) {
  583. document.getElementById('noteError').style.display = 'block';
  584. return false;
  585. }
  586. $.post("${ctx}/order/smoothOutCollection", {
  587. 'orderID': orderId,
  588. 'balanceAccountsRemark': content
  589. });
  590. window.location.href = "${ctx}/order/detail?id=" + orderId;
  591. }
  592. }
  593. });
  594. } else {
  595. $.jBox.tip(data.msg, 'error');
  596. }
  597. }, "JSON");//这里返回的类型有:json,html,xml,text
  598. };
  599. function orderExport() {
  600. var searchForm = $("#searchForm");
  601. searchForm.attr('action', '${ctx}/hehe/new/order/batchExportOrder');
  602. searchForm.submit();
  603. searchForm.attr('action', '${ctx}/hehe/new/order/orderList');
  604. }
  605. </script>
  606. </head>
  607. <body>
  608. <textarea cols="20" rows="10" id="biao1"></textarea>
  609. <ul class="nav nav-tabs">
  610. <li class="active"><a href="${ctx}/hehe/new/order/orderList">订单列表</a></li>
  611. </ul>
  612. <sys:message content="${message}"/>
  613. <form:form id="searchForm" modelAttribute="newOrder" onsubmit="return checkfun()" action="${ctx}/hehe/new/order/orderList"
  614. method="post" class="breadcrumb form-search">
  615. <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
  616. <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
  617. <div class="ul-form">
  618. <div class="flex-wrap">
  619. <div class="item">
  620. <label>订单ID:</label>
  621. <form:input path="orderID" id="orderID" htmlEscape="false" maxlength="30" class="input-medium"/>
  622. </div>
  623. <div class="item">
  624. <label>订单类型:</label>
  625. <form:select path="collageFlag" class="select-ele input-medium required">
  626. <form:option value="" label="所有"/>
  627. <form:option value="0" label="独立订单"/>
  628. <form:option value="1" label="拼团订单"/>
  629. </form:select>
  630. </div>
  631. <div class="item">
  632. <label>订单编号:</label>
  633. <form:input path="orderNo" htmlEscape="false" maxlength="30" class="input-medium"/>
  634. </div>
  635. <div class="item">
  636. <label>买家:</label>
  637. <form:input path="buyer" maxlength="20" class="input-medium"/>
  638. </div>
  639. <div class="item">
  640. <label>收货人:</label>
  641. <form:input path="receiver" maxlength="20" class="input-medium"/>
  642. </div>
  643. <div class="item">
  644. <label>订单状态:</label>
  645. <form:select path="status" class="select-ele input-medium required">
  646. <form:option value="" label="所有"/>
  647. <form:options items="${fns:getDictList('order_status')}" itemLabel="label" itemValue="value"
  648. htmlEscape="false"/>
  649. </form:select>
  650. </div>
  651. <div class="item">
  652. <label>收款状态:</label>
  653. <form:select path="receiptStatus" class="select-ele input-medium required">
  654. <form:option value="" label="所有"/>
  655. <form:options items="${fns:getDictList('receiptStatus')}" itemLabel="label" itemValue="value"
  656. htmlEscape="false"/>
  657. </form:select>
  658. </div>
  659. <div class="item">
  660. <label>拼团状态:</label>
  661. <form:select path="collageStatus" class="select-ele input-medium required">
  662. <form:option value="" label="所有"/>
  663. <form:option value="1" label="拼团中"/>
  664. <form:option value="2" label="已拼成"/>
  665. </form:select>
  666. </div>
  667. <div class="item">
  668. <label>发货状态:</label>
  669. <form:select path="sendOutStatus" class="select-ele input-medium required">
  670. <form:option value="" label="所有"/>
  671. <form:options items="${fns:getDictList('sendOutStatus')}" itemLabel="label" itemValue="value"
  672. htmlEscape="false"/>
  673. </form:select>
  674. </div>
  675. <div class="item">
  676. <label>付款状态:</label>
  677. <form:select path="payStatus" class="select-ele input-medium required">
  678. <form:option value="" label="所有"/>
  679. <form:options items="${fns:getDictList('payStatus')}" itemLabel="label" itemValue="value"
  680. htmlEscape="false"/>
  681. </form:select>
  682. </div>
  683. <div class="item">
  684. <label>退款状态:</label>
  685. <form:select path="refundType" class="select-ele input-medium required">
  686. <form:option value="" label="所有"/>
  687. <form:option value="0" label="无退款"/>
  688. <form:option value="1" label="部分退款"/>
  689. <form:option value="2" label="已退款"/>
  690. </form:select>
  691. </div>
  692. <div class="item">
  693. <label>待审核退款:</label>
  694. <form:select path="returnedPurchaseStatus" class="select-ele input-medium required">
  695. <form:option value="" label="所有"/>
  696. <form:option value="1" label="有"/>
  697. <form:option value="0" label="无"/>
  698. </form:select>
  699. </div>
  700. <div class="item">
  701. <label>分销者:</label>
  702. <form:select path="userID" class="select-ele input-medium required">
  703. <form:option value="" label="所有"/>
  704. <form:options items="${heUsers}" itemLabel="name" itemValue="userId" htmlEscape="false"/>
  705. </form:select>
  706. </div>
  707. <div class="item">
  708. <label class="control-label">下单时间:</label>
  709. <form:input path="startTime" type="text" maxlength="10" class="input-medium Wdate" value="${startTime}"
  710. onclick="WdatePicker({dateFmt:'yyyy-MM-dd ',isShowClear:false});"/>
  711. <form:input path="endTime" type="text" maxlength="10" class="input-medium Wdate" value="${endTime}"
  712. onclick="WdatePicker({dateFmt:'yyyy-MM-dd ',isShowClear:false});"/>
  713. </div>
  714. <div class="item">
  715. <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询" style="margin-left: 20px;"/>
  716. </div>
  717. <div class="item">
  718. <a id="orderExport" class="btn btn-primary" href="javascript:;" onclick="orderExport()" style="width:100px; margin-left: 20px;">订单导出</a>
  719. </div>
  720. </div>
  721. </div>
  722. </form:form>
  723. <fmt:formatDate value="<%=new Date()%>" var="currDate" pattern="yyyy-MM-dd"/>
  724. <fmt:formatDate value="<%=new Date()%>" var="monthFirst" pattern="yyyy-MM-01"/>
  725. <div class="data-title">
  726. <ul>
  727. <li>订单ID</li>
  728. <li>订单类型</li>
  729. <li>订单编号</li>
  730. <li>买家</li>
  731. <li>收货人</li>
  732. <li>订单状态</li>
  733. <li>收款状态</li>
  734. <li>拼团状态</li>
  735. <li>付款状态</li>
  736. <li>发货状态</li>
  737. <li>退款状态</li>
  738. <li>待审核退款</li>
  739. <li>订单金额</li>
  740. <li>下单时间</li>
  741. <li>操作</li>
  742. </ul>
  743. <c:forEach items="${page.list}" var="order">
  744. <%--颜色区分分期不分期订单以及终止订单--%>
  745. <ul class="spileOrder" data-id="${order.orderNo}">
  746. <li>${order.orderID}</li>
  747. <li>
  748. ${order.collageFlag eq 1?'拼团订单':'独立订单'}
  749. </li>
  750. <li style="position: relative">${order.orderNo}
  751. </li>
  752. <li>
  753. ${order.buyer}
  754. </li>
  755. <li>${order.receiver}</li>
  756. <li class="sd-li">
  757. <c:if test="${order.status eq 11 || order.status eq 12 || order.status eq 13 ||order.status eq 21 ||order.status eq 22 ||
  758. order.status eq 23 || order.status eq 31 ||order.status eq 32 ||order.status eq 33}">
  759. 交易中<br>(${fns:getDictLabel(order.status,"order_detail_status","" )})
  760. </c:if>
  761. <c:if test="${order.status eq 0 || order.status eq 4 || order.status eq 5 || order.status eq 6 || order.status eq 7}">${fns:getDictLabel(order.status,"order_detail_status","" )}</c:if>
  762. </li>
  763. <li>
  764. <c:if test="${order.receiptStatus == 1}">
  765. <font color="red">待收款</font>
  766. </c:if>
  767. <c:if test="${order.receiptStatus == 2}">
  768. <font color="#ff8c00">部分收款</font>
  769. </c:if>
  770. <c:if test="${order.receiptStatus == 3}">
  771. <font color="green">已收款</font>
  772. </c:if>
  773. <br>
  774. <%--抹平明细--%>
  775. <c:if test="${order.confirmType eq 1}">
  776. <c:if test="${order.receiptOrderFlag}">
  777. 一款多单:少收抹平金额未知
  778. </c:if>
  779. <c:if test="${!order.receiptOrderFlag}">
  780. <font>少收抹平:<br>
  781. ¥<fmt:formatNumber
  782. value="${order.payableAmount - (empty order.orderReceivedAmount ? 0 : order.orderReceivedAmount)}"
  783. pattern="#0.00"/>
  784. </font>
  785. </c:if>
  786. </c:if>
  787. <c:if test="${order.confirmType eq 2}">
  788. <c:if test="${order.receiptOrderFlag}">
  789. 一款多单:多收抹平金额未知
  790. </c:if>
  791. <c:if test="${!order.receiptOrderFlag}">
  792. <font>多收抹平:<br>
  793. ¥<fmt:formatNumber
  794. value="${(empty order.orderReceivedAmount ? 0 : order.orderReceivedAmount) - order.payableAmount}"
  795. pattern="#0.00"/>
  796. </font>
  797. </c:if>
  798. </c:if>
  799. <c:if test="${order.confirmType eq 3}">
  800. <c:if test="${order.receiptOrderFlag}">
  801. 一款多单:多收退余额
  802. </c:if>
  803. <c:if test="${!order.receiptOrderFlag}">
  804. <font>多收退余额&nbsp;&nbsp;${order.associationType eq 2 ? "(自动)" : ""}:<br>
  805. ¥<fmt:formatNumber
  806. value="${(empty order.returnBalanceAmount ? 0 : order.returnBalanceAmount)}"
  807. pattern="#0.00"/>
  808. </font>
  809. </c:if>
  810. </c:if>
  811. </li>
  812. <li>
  813. <c:choose>
  814. <c:when test="${order.collageFlag eq 1 && (order.status eq 31 || order.status eq 32 || order.status eq 33)}">
  815. <font color="${order.collageStatus eq 1?'red':(order.collageStatus eq 2?'green':'')}">
  816. ${order.collageStatus eq 1?'拼团中':(order.collageStatus eq 2?'已拼成':'-')}
  817. </font>
  818. </c:when>
  819. <c:otherwise>
  820. -
  821. </c:otherwise>
  822. </c:choose>
  823. </li>
  824. <li>
  825. <c:if test="${order.payStatus == 1}">
  826. 待付款
  827. </c:if>
  828. <c:if test="${order.payStatus == 2}">
  829. 部分付款
  830. </c:if>
  831. <c:if test="${order.payStatus == 3}">
  832. 已付款
  833. </c:if>
  834. </li>
  835. <li>
  836. <c:if test="${order.sendOutStatus == 1}">
  837. <font color="red">待发货</font>
  838. </c:if>
  839. <c:if test="${order.sendOutStatus == 2}">
  840. <font color="##FF9966">部分发货</font>
  841. </c:if>
  842. <c:if test="${order.sendOutStatus == 3}">
  843. <font color="green">已发货</font>
  844. </c:if>
  845. </li>
  846. <li>
  847. <c:if test="${order.refundType == 1}">
  848. 部分退款
  849. </c:if>
  850. <c:if test="${order.refundType == 2}">
  851. 已退款
  852. </c:if>
  853. <c:if test="${order.refundType ne 1 and order.refundType ne 2 }">
  854. 无退款
  855. </c:if>
  856. </li>
  857. <li>
  858. <c:if test="${order.returnedPurchaseStatus == 1}">
  859. <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRecturnRecordByOrderID.rpc?orderID=${order.orderID}">
  860. </a>
  861. </c:if>
  862. <c:if test="${order.returnedPurchaseStatus == 0}">
  863. </c:if>
  864. </li>
  865. <li><fmt:formatNumber value="${order.payTotalFee}" type="currency"/></li>
  866. <%-- 订单金额 --%>
  867. <li>${order.orderTime}</li>
  868. <li class="operation-wrap">
  869. <a href="${ctx}/hehe/new/order/detail?id=${order.orderID}">查看详情</a>
  870. <a class="operation-btn">功能</a>
  871. <div class="operation-block">
  872. <shiro:hasPermission name="order:order:edit">
  873. <%--包含订单充值商品就不显示--%>
  874. <c:if test="${empty order.rechargeGoods}">
  875. <c:if test="${order.status == 11 || order.status == 12 || order.status == 21 || order.status == 22 || order.status == 31 || order.status == 32}">
  876. <a href="${ctx}/order/toDeliveryPage?id=${order.orderID}">发货</a>
  877. </c:if>
  878. <c:if test="${order.receiptStatus == 2 && order.status != 6 && order.status != 7}">
  879. <a href="javascript:void(0);" onclick="collection(${order.orderID})">抹平收款</a>
  880. </c:if>
  881. </c:if>
  882. <c:if test="${(order.organizeID == 0 or order.organizeID > 2) && order.status == 11 && order.payStatus == 1}">
  883. <a href="javascript:void(0);"
  884. onclick="modelShow('${order.orderID}')">编辑经理折扣</a>
  885. </c:if>
  886. </shiro:hasPermission>
  887. <shiro:hasPermission name="order:order:applyrefound">
  888. <c:if test="${order.status == 12 || order.status == 13 || order.status == 21 || order.status == 22 || order.status == 23 || order.status == 31 || order.status == 32 || order.status == 33 || order.status == 4 || order.status == 5}">
  889. <%-- 返佣订单不能申请退款(退货) --%>
  890. <c:if test="${order.rebateOrder == '0'}">
  891. <%--如果存在审核收款则不允许申请:1不能申请,其它可以申请--%>
  892. <c:if test="${order.toAudit eq 1}">
  893. <%--弹窗提示--%>
  894. <a href="#" onclick="return alertx('订单存在未审核的收款,暂不能退款。请将收款审核通过后再操作退款。')">申请退款</a>
  895. </c:if>
  896. <c:if test="${order.toAudit ne 1}">
  897. <%--如果存在退款记录在待审核或者审核不通过记录不允许继续退款--%>
  898. <c:if test="${order.applyReturnedPurchaseFlag eq 1}">
  899. <a href="${ctx}/bulkpurchase/cmRefundsProduct/applyRefound.rpc?orderID=${order.orderID}"
  900. <c:if test="${order.status == 21 || order.status == 22 || order.status == 23}">onclick="return confirmx('部分收款的订单、申请退款只能申请全部退款!', this.href)"
  901. </c:if>
  902. >
  903. 申请退款
  904. </a>
  905. </c:if>
  906. <c:if test="${order.applyReturnedPurchaseFlag ne 1}">
  907. <font title="存在未处理完的申请,请前往退款列表处理!">申请退款</font>
  908. </c:if>
  909. </c:if>
  910. </c:if>
  911. </c:if>
  912. </shiro:hasPermission>
  913. <shiro:hasPermission name="order:order:edit">
  914. <c:if test="${order.status == 0 || order.status == 11}">
  915. <a href="${ctx}/hehe/new/order/cancelOrder?orderID=${order.orderID}"
  916. onclick="return confirmx('是否取消订单?', this.href)">取消订单</a>
  917. </c:if>
  918. <c:if test="${order.status ne 0}">
  919. <a href="${ctx}/order/printOrder?orderID=${order.orderID}">打印发货单</a>
  920. </c:if>
  921. <%--<a href="/">供应商链接</a>--%>
  922. <a href="${ctx}/order/exportOrder?id=${order.orderID}">订单导出</a>
  923. <a href="${ctx}/order/cmOrderRemark/remarksViewNew.rpc?orderID=${order.orderID}&source=1&orderType=2">订单备注</a>
  924. <%--包含订单充值商品就不显示--%>
  925. <c:if test="${empty order.rechargeGoods}">
  926. <c:if test="${order.status ne 0 && order.status ne 11 && order.status ne 21 && order.status ne 6 && order.status ne 4}">
  927. <a href="${ctx}/order/logisticsDetails?orderID=${order.orderID}&orderType=2">发货记录</a>
  928. </c:if>
  929. <c:if test="${order.status ne 0 && order.status ne 11 && order.status ne 6}">
  930. <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${order.orderID}&from=1">收退款记录
  931. </a>
  932. </c:if>
  933. <c:if test="${order.status ne 0 && order.status ne 11 && order.status ne 6}">
  934. <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRecturnRecordByOrderID.rpc?orderID=${order.orderID}">退款(退货)记录
  935. </a>
  936. </c:if>
  937. </c:if>
  938. </shiro:hasPermission>
  939. </div>
  940. </li>
  941. </ul>
  942. </c:forEach>
  943. </div>
  944. <div class="pagination">${page}</div>
  945. </body>
  946. </html>