orderDetail.jsp 61 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354
  1. <%@ page contentType="text/html;charset=UTF-8" %>
  2. <%@ include file="/WEB-INF/views/include/taglib.jsp" %>
  3. <html>
  4. <head>
  5. <title>订单列表</title>
  6. <meta name="decorator" content="default"/>
  7. <style type="text/css">
  8. * {
  9. margin: 0;
  10. padding: 0
  11. }
  12. a {
  13. list-style: none;
  14. text-decoration: none
  15. }
  16. body {
  17. background-color: rgb(255, 255, 255)
  18. }
  19. h3 {
  20. line-height: 20px;
  21. padding: 20px 0 20px 15px;
  22. border-bottom: 1px solid #CCCCCC
  23. }
  24. .now-status p {
  25. padding: 20px
  26. }
  27. .now-status span {
  28. display: inline-block;
  29. width: 160px;
  30. line-height: 35px;
  31. margin-right: 15px;
  32. cursor: pointer;
  33. border: 1px solid #CCCCCC;
  34. text-align: center;
  35. border-radius: 5px
  36. }
  37. .buyInfo p {
  38. padding: 15px 5px 0
  39. }
  40. .buyInfo p label {
  41. width: 60px;
  42. display: inline-block
  43. }
  44. .buyInfo p span {
  45. padding-left: 10px
  46. }
  47. .table th {
  48. background-color: #CCCCCC
  49. }
  50. .table th, .table td {
  51. font-weight: normal;
  52. border: 1px solid #CCCCCC;
  53. height: 35px;
  54. text-align: center
  55. }
  56. .table td .div-img {
  57. box-sizing: border-box
  58. }
  59. .table td .div-img img {
  60. width: 100px;
  61. height: 100px;
  62. vertical-align: middle
  63. }
  64. .table td .div-img span {
  65. }
  66. .div-order span {
  67. width: 260px;
  68. display: inline-block;
  69. margin-right: 50px
  70. }
  71. .text-result p {
  72. padding-top: 15px
  73. }
  74. .text-cost p {
  75. padding: 20px 0
  76. }
  77. .moeny-cost p {
  78. padding: 10px 0 0 0;
  79. text-align: left
  80. }
  81. .moeny-cost p label {
  82. display: inline-block
  83. }
  84. .Staging table {
  85. width: 100%;
  86. border-collapse: collapse;
  87. margin-top: 20px
  88. }
  89. .Staging table th, .Staging table td {
  90. font-weight: normal;
  91. border: 1px solid #000;
  92. height: 35px;
  93. text-align: center;
  94. width: 10%
  95. }
  96. .change-info {
  97. position: fixed;
  98. top: 0%;
  99. left: 50%;
  100. transform: translateX(-50%);
  101. z-index: 999;
  102. width: 800px;
  103. background-color: #fff;
  104. box-shadow: 0px 0px 15px #ccc
  105. }
  106. .item-div label {
  107. width: 260px;
  108. text-align: right;
  109. display: inline-block;
  110. margin-right: 50px
  111. }
  112. .item-div input {
  113. width: 300px;
  114. line-height: 35px;
  115. height: 35px;
  116. box-sizing: border-box;
  117. border: 1px solid #CCCCCC;
  118. display: inline-block
  119. }
  120. .item-div select {
  121. width: 90px;
  122. height: 35px;
  123. margin-right: 10px
  124. }
  125. .item-div textarea {
  126. border: 1px solid #CCCCCC;
  127. margin-top: 20px;
  128. width: 300px;
  129. height: 80px;
  130. resize: none;
  131. display: block
  132. }
  133. .layer-status span {
  134. display: inline-block;
  135. width: 80px;
  136. line-height: 35px;
  137. background-color: #00A6C7;
  138. text-align: center;
  139. color: #fff;
  140. cursor: pointer
  141. }
  142. .layer-status span:nth-of-type(1) {
  143. }
  144. .layer-status span:nth-of-type(2) {
  145. margin-left: 72px
  146. }
  147. .same-style {
  148. position: fixed;
  149. top: 20%;
  150. left: 50%;
  151. transform: translateX(-50%);
  152. width: 500px;
  153. background-color: #fff;
  154. z-index: 999;
  155. box-shadow: 0 0 15px #666
  156. }
  157. .reason-cancel label {
  158. margin-right: 20px
  159. }
  160. .reason-cancel textarea {
  161. width: 270px;
  162. height: 80px;
  163. resize: none;
  164. vertical-align: text-top;
  165. border: 1px solid #CCCCCC
  166. }
  167. .order-details-heading {
  168. background: #eee
  169. }
  170. .order-details-heading td {
  171. white-space: nowrap;
  172. padding: 0 10px
  173. }
  174. .order-rows, .order-details-heading {
  175. width: 100%;
  176. border-bottom: 1px solid #ccc;
  177. border-left: 1px solid #ccc;
  178. border-right: 1px solid #ccc;
  179. color: #666;
  180. padding: 10px;
  181. line-height: 30px
  182. }
  183. .order-details-heading {
  184. border-top: 1px solid #ccc
  185. }
  186. .order-details-heading span, .order-rows span {
  187. margin-right: 80px
  188. }
  189. .order-details-heading span {
  190. width: 230px;
  191. margin-right: 0px;
  192. display: inline-block
  193. }
  194. .order-details-heading span label, .order-rows span label {
  195. font-weight: bold
  196. }
  197. .order-rows .supplier-img {
  198. width: 100px
  199. }
  200. .operation-wrapper {
  201. position: relative
  202. }
  203. .operation-btn {
  204. cursor: pointer
  205. }
  206. .operation-block {
  207. background: #fff;
  208. width: 125px;
  209. position: absolute;
  210. left: 35px;
  211. top: 30px;
  212. padding: 10px;
  213. border: 1px solid #666;
  214. -webkit-border-radius: 5px;
  215. -moz-border-radius: 5px;
  216. border-radius: 5px;
  217. z-index: 100001;
  218. display: none
  219. }
  220. .operation-block a {
  221. display: block;
  222. padding: 3px 0
  223. }
  224. .print-wrapper {
  225. display: inline-block
  226. }
  227. .supplier-product-name, .supplier-product-alias {
  228. width: 200px;
  229. line-height: 20px
  230. }
  231. .supplier-product-info {
  232. width: 50%;
  233. display: inline-block;
  234. position: relative;
  235. top: 50%;
  236. transform: translateY(30%)
  237. }
  238. .supplier-product-promotionInfo {
  239. width: 20%;
  240. display: inline-block;
  241. position: relative;
  242. top: 50%;
  243. transform: translateY(30%)
  244. }
  245. .supplier-product-item {
  246. margin-bottom: 10px
  247. }
  248. .supplier-product-alias {
  249. display: inline-block;
  250. margin-top: 5px
  251. }
  252. .supplier-name {
  253. display: inline-block;
  254. vertical-align: middle;
  255. margin: 0 10px
  256. }
  257. #auditBox {
  258. padding: 20px;
  259. line-height: 30px
  260. }
  261. #auditBox p {
  262. font-size: 16px;
  263. margin: 0 0 0 0
  264. }
  265. #auditBox .note-div {
  266. font-size: 16px
  267. }
  268. .downSpan {
  269. display: block;
  270. margin-left: 5px;
  271. margin-bottom: -8px
  272. }
  273. .upSpan {
  274. display: block;
  275. margin-left: 5px;
  276. margin-top: -8px
  277. }
  278. .promotionsName {
  279. margin: 2px
  280. }
  281. .ladderPrice > span {
  282. text-decoration: underline;
  283. color: red
  284. }
  285. .ladderPrice .list {
  286. display: none;
  287. position: absolute;
  288. z-index: 999;
  289. background: #FFF;
  290. white-space: nowrap;
  291. border: 1px solid #EEE;
  292. padding: 10px 0;
  293. color: #333
  294. }
  295. .ladderPrice:hover .list {
  296. display: block
  297. }
  298. .ladderPrice .list span {
  299. margin: 0 20px;
  300. width: 60px;
  301. text-align: center;
  302. display: inline-block
  303. }
  304. .ladderPrice .list span.price {
  305. color: red
  306. }
  307. .weishaIcon {
  308. background: darkorange;
  309. color: white;
  310. margin: 0 0px;
  311. padding: 0 3px;
  312. font-style: normal;
  313. font-size: 12px;
  314. display: inline-block;
  315. border-radius: 2px
  316. }
  317. </style>
  318. <script type="text/javascript" src="${ctxStatic}/QRCode/jquery.qrcode.min.js"></script>
  319. <script type="text/javascript" src="static/common/clipboard.min.js"></script>
  320. </head>
  321. <body>
  322. <ul class="nav nav-tabs">
  323. <li><a href="${ctx}/order/orderList">订单列表</a></li>
  324. <li class="active"><a href="${ctx}/order/detail?id=${order.orderID}">订单详情</a></li>
  325. <shiro:hasPermission name="order:order:edit">
  326. <li><a href="${ctx}/order/postageOrderForm">添加运费订单</a></li>
  327. </shiro:hasPermission>
  328. <li><a href="${ctx}/order/secondeProductOrderForm">添加二手订单</a></li>
  329. </ul>
  330. <sys:message content="${message}"/>
  331. <table class="order-details-heading">
  332. <tr>
  333. <td>下单时间: ${order.orderTime}</td>
  334. <td>订单号(ID): ${order.orderNo}(${order.orderID})</td>
  335. <td>返佣订单: ${(order.rebateOrder ne '0' || order.rebateFlag eq '1')?'是':'否'}</td>
  336. </tr>
  337. <tr>
  338. <td>订单类型: <c:if test="${order.orderType == 1}">自主订单</c:if><c:if test="${order.orderType == 0}">协销订单</c:if></td>
  339. <td>订单来源: ${fns:getDictLabel(order.orderSource,"bp_orderSource","" )}</td>
  340. <td>订单状态:
  341. <c:if test="${order.status eq 11 || order.status eq 12 || order.status eq 13 ||order.status eq 21 ||order.status eq 22 ||
  342. order.status eq 23 || order.status eq 31 ||order.status eq 32 ||order.status eq 33}">
  343. 交易中
  344. </c:if>
  345. <c:if test="${order.status eq 0 || order.status eq 4 || order.status eq 5 || order.status eq 6 || order.status eq 7}">
  346. ${fns:getDictLabel(order.status,"order_status","" )}
  347. <c:if test="${order.status eq 0}">
  348. <span id="time" style="color: red"></span>
  349. </c:if>
  350. </c:if>
  351. </td>
  352. </tr>
  353. <tr>
  354. <c:if test="${order.status ne 0}">
  355. <td>
  356. 收款状态:
  357. <c:if test="${order.receiptStatus == 1}">
  358. <font color="red">待收款</font>
  359. </c:if>
  360. <c:if test="${order.receiptStatus == 2}">
  361. <font color="#ff8c00">部分收款</font>
  362. </c:if>
  363. <c:if test="${order.receiptStatus == 3}">
  364. <font color="green">已收款</font>
  365. </c:if>
  366. <%--抹平明细--%>
  367. <c:if test="${order.confirmType eq 1}">
  368. <c:if test="${order.receiptOrderFlag}">
  369. <font color="red">(一款多单:少收抹平金额未知)</font>
  370. </c:if>
  371. <c:if test="${!order.receiptOrderFlag}">
  372. <font color="red">(少收抹平:
  373. ¥<fmt:formatNumber
  374. value="${order.payableAmount - (empty order.orderReceivedAmount ? 0 : order.orderReceivedAmount)}"
  375. pattern="#0.00"/>)
  376. </font>
  377. </c:if>
  378. </c:if>
  379. <c:if test="${order.confirmType eq 2}">
  380. <c:if test="${order.receiptOrderFlag}">
  381. <font color="red">(一款多单:多收抹平金额未知)</font>
  382. </c:if>
  383. <c:if test="${!order.receiptOrderFlag}">
  384. <font color="red">(多收抹平:
  385. ¥<fmt:formatNumber
  386. value="${(empty order.orderReceivedAmount ? 0 : order.orderReceivedAmount) - order.payableAmount}"
  387. pattern="#0.00"/>)
  388. </font>
  389. </c:if>
  390. </c:if>
  391. <c:if test="${order.confirmType eq 3}">
  392. <c:if test="${order.receiptOrderFlag}">
  393. <font color="red">(一款多单:多收退余额)</font>
  394. </c:if>
  395. <c:if test="${!order.receiptOrderFlag}">
  396. <font color="red">(多收退余额&nbsp;&nbsp;${order.associationType eq 2 ? "(自动)" : ""}:
  397. ¥<fmt:formatNumber
  398. value="${(empty order.returnBalanceAmount ? 0 : order.returnBalanceAmount)}"
  399. pattern="#0.00"/>)
  400. </font>
  401. </c:if>
  402. </c:if>
  403. </td>
  404. <td>发货状态:
  405. <c:if test="${order.sendOutStatus == 1}">
  406. <font color="red">待发货</font>
  407. </c:if>
  408. <c:if test="${order.sendOutStatus == 2}">
  409. <font color="#ff8c00">部分发货</font>
  410. </c:if>
  411. <c:if test="${order.sendOutStatus == 3}">
  412. <font color="green">已发货</font>
  413. </c:if></td>
  414. <td>付款状态:
  415. <c:if test="${order.payStatus == 1}">
  416. <font color="red">待付款</font>
  417. </c:if>
  418. <c:if test="${order.payStatus == 2}">
  419. <font color="#ff8c00">部分付款</font>
  420. </c:if>
  421. <c:if test="${order.payStatus == 3}">
  422. <font color="green">已付款</font>
  423. </c:if></td>
  424. </td>
  425. </c:if>
  426. </tr>
  427. <tr>
  428. <c:if test="${order.status ne 0}">
  429. <td>
  430. 退款状态:
  431. <c:if test="${order.refundType == 0}">
  432. 无退款
  433. </c:if>
  434. <c:if test="${order.refundType == 1}">
  435. 部分退款
  436. </c:if>
  437. <c:if test="${order.refundType == 2}">
  438. 已退款
  439. </c:if>
  440. </td>
  441. </c:if>
  442. <td>机构:${order.buyer}<font id="svipFlagLabel" style="margin-left:10px"
  443. color="red">${order.bpOrderUserinfo.svipFlag eq 1?'(超级会员)':''}</font>
  444. <c:if test="${order.organizeID >= 3}"><label
  445. style="margin-left: 20px">门店:${order.organizeStoreName}</label> </c:if></td>
  446. <td>收货人: ${order.bpOrderUserinfo.shouHuoRen}</td>
  447. </tr>
  448. <tr>
  449. <td>手机: ${order.bpOrderUserinfo.mobile}</td>
  450. <td>
  451. 地址: ${fns:appendLast(fns:appendLast1(order.bpOrderUserinfo.province,order.bpOrderUserinfo.city,order.bpOrderUserinfo.town), order.bpOrderUserinfo.address)}</td>
  452. <fmt:setLocale value="zh_CN" scope="session"/>
  453. <td>
  454. 订单金额:<fmt:formatNumber value="${order.payTotalFee}" type="currency"/>&nbsp;
  455. <c:if test="${not empty order.couponOrderRecord}">
  456. <c:if test="${order.couponOrderRecord.couponType eq 0}">
  457. <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font
  458. color="red">(活动券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
  459. </c:if>
  460. <c:if test="${order.couponOrderRecord.couponType eq 1}">
  461. <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font
  462. color="red">(品类券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
  463. </c:if>
  464. <c:if test="${order.couponOrderRecord.couponType eq 2}">
  465. <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(用户专享券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
  466. </c:if>
  467. <c:if test="${order.couponOrderRecord.couponType eq 3}">
  468. <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font
  469. color="red">(店铺券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
  470. </c:if>
  471. <c:if test="${order.couponOrderRecord.couponType eq 4}">
  472. <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font
  473. color="red">(新用户券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
  474. </c:if>
  475. </c:if>
  476. </td>
  477. </tr>
  478. <tr>
  479. <td>
  480. 应收金额:<fmt:formatNumber value="${order.payableAmount}" type="currency"/>
  481. <span style="color: red">
  482. <c:if test="${order.balancePayFee gt 0}">
  483. <a href="${ctx}/user/cmUserBalanceRecord/userBalanceRecord?userId=${order.userID}"
  484. style="color: red;text-decoration: underline">
  485. (账户余额抵扣: <fmt:formatNumber value="${order.balancePayFee}" type="currency"/>)
  486. </a>
  487. </c:if>
  488. <c:if test="${order.balancePayFee le 0}">
  489. (账户余额抵扣: <fmt:formatNumber value="${order.balancePayFee}" type="currency"/>)
  490. </c:if>
  491. </span>
  492. </td>
  493. <td>
  494. 已收金额:
  495. <c:if test="${order.receiptStatus eq 1}">
  496. ¥0.00
  497. </c:if>
  498. <c:if test="${order.receiptStatus ne 1}">
  499. <fmt:formatNumber value="${receiptAmount}" type="currency"/>
  500. </c:if>
  501. <c:if test="${order.receiptStatus == 3 && order.confirmType != null && order.confirmType != ''}">
  502. <%-- <span style='color:#FF0000'>(已抹平收款)</span>--%>
  503. </c:if>
  504. </td>
  505. <td>
  506. 退款金额(已完成):<fmt:formatNumber value="${returnValue}" type="currency"/>
  507. <span style="color: red">
  508. (原<fmt:formatNumber value="${returnedPurchaseFee}" type="currency"/>,折扣取消
  509. <c:if test="${order.discountFee gt returnedPurchaseFee}"><fmt:formatNumber
  510. value="${returnedPurchaseFee}" type="currency"/></c:if>
  511. <c:if test="${order.discountFee le returnedPurchaseFee}"><fmt:formatNumber
  512. value="${order.discountFee}" type="currency"/></c:if>)
  513. </span>
  514. </td>
  515. </tr>
  516. <tr>
  517. <td>
  518. 经理折扣:
  519. <c:if test="${order.discountFee gt 0}">
  520. <c:if test="${order.discountFee gt returnedPurchaseFee}">
  521. <fmt:formatNumber value="${order.discountFee - returnedPurchaseFee}" type="currency"/>
  522. </c:if>
  523. <c:if test="${order.discountFee le returnedPurchaseFee}">
  524. ¥0.00
  525. </c:if>
  526. <span style="color: red">
  527. (原<fmt:formatNumber value="${order.discountFee}" type="currency"/>,折扣取消
  528. <c:if test="${order.discountFee gt returnedPurchaseFee}">
  529. <fmt:formatNumber value="${returnedPurchaseFee}" type="currency"/>
  530. </c:if>
  531. <c:if test="${order.discountFee le returnedPurchaseFee}">
  532. <fmt:formatNumber value="${order.discountFee}" type="currency"/>
  533. </c:if>)
  534. </span>
  535. </c:if>
  536. <c:if test="${order.discountFee le 0}">¥0.00</c:if>
  537. </td>
  538. <td>运费:
  539. <c:if test="${order.freePostFlag == 0}">
  540. 包邮
  541. </c:if>
  542. <c:if test="${order.freePostFlag == -1}">
  543. 到付
  544. </c:if>
  545. <c:if test="${order.freePostFlag == -2}">
  546. 仪器到付-产品包邮
  547. </c:if>
  548. <c:if test="${order.freePostFlag != -1 && order.freePostFlag != 0 && order.freePostFlag != -2}">
  549. <fmt:formatNumber value="${order.freight}" type="currency"/>
  550. </c:if>
  551. <c:if test="${order.userBeans > 0}">
  552. <font color="red">(采美豆抵用:${order.userBeans})</font>
  553. </c:if>
  554. </td>
  555. <td style="position: relative;"><a class="operation-btn btn">功能</a>
  556. <div class="operation-block">
  557. <shiro:hasPermission name="order:order:edit">
  558. <%--包含订单充值商品就不显示--%>
  559. <c:if test="${empty order.rechargeGoods}">
  560. <c:if test="${order.status == 11 || order.status == 12 || order.status == 21 || order.status == 22 || order.status == 31 || order.status == 32}">
  561. <a href="${ctx}/order/toDeliveryPage?id=${order.orderID}">发货</a>
  562. </c:if>
  563. <c:if test="${order.receiptStatus == 2 && order.status != 6 && order.status != 7}">
  564. <a href="javascript:void(0);" onclick="collection(${order.orderID})">抹平收款</a>
  565. </c:if>
  566. </c:if>
  567. <c:if test="${order.organizeID == 0}">
  568. <c:if test="${order.status == 0}">
  569. <a href="${ctx}/order/confirmOrder?orderID=${order.orderID}"
  570. onclick="return confirmx('是否确认订单?', this.href)">确认订单</a>
  571. </c:if>
  572. <c:if test="${order.status == 0 || order.status == 11}">
  573. <a href="${ctx}/order/cancelOrder?orderID=${order.orderID}"
  574. onclick="return confirmx('是否取消订单?', this.href)">取消订单</a>
  575. </c:if>
  576. <c:if test="${order.status eq 11 || order.status eq 12 || order.status eq 13 ||order.status eq 21 ||order.status eq 22 ||
  577. order.status eq 23 || order.status eq 0}">
  578. <c:if test="${empty order.rechargeGoods && (order.ableUserMoney > 0 || order.status eq 0)}">
  579. <c:if test="${order.postageOrderFlag == 0 && order.secondHandOrderFlag != 1}">
  580. <a href="${ctx}/order/form?id=${order.orderID}">修改订单</a>
  581. </c:if>
  582. <c:if test="${order.postageOrderFlag == 0 && order.secondHandOrderFlag == 1}">
  583. <a href="${ctx}/order/secondeProductOrderForm?id=${order.orderID}">修改订单</a>
  584. </c:if>
  585. </c:if>
  586. </c:if>
  587. <c:if test="${order.status == 0}">
  588. <c:if test="${order.postageOrderFlag == 1}">
  589. <a href="${ctx}/order/postageOrderForm?id=${order.orderID}">修改邮费订单</a>
  590. </c:if>
  591. </c:if>
  592. </c:if>
  593. <c:if test="${(order.organizeID == 0 or order.organizeID > 2) && order.status == 11 && order.payStatus == 1}">
  594. <a href="javascript:void(0);"
  595. onclick="modelShow('${order.orderID}')">编辑经理折扣</a>
  596. </c:if>
  597. <c:if test="${order.rebateFlag eq 0 && order.receiptStatus eq 1 && order.payStatus eq 1}">
  598. <a href="${ctx}/order/modifyRebate?orderId=${order.orderID}"
  599. onclick="return confirmx('确定将订单转为返佣订单吗?', this.href)">转为返佣订单</a>
  600. </c:if>
  601. </shiro:hasPermission>
  602. <shiro:hasPermission name="order:order:applyrefound">
  603. <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}">
  604. <%-- 返佣订单不能申请退款(退货) --%>
  605. <c:if test="${order.rebateOrder == '0'}">
  606. <c:if test="${order.toAudit eq 1}">
  607. <%--如果存在审核收款则不允许申请:1不能申请,其它可以申请--%>
  608. <c:if test="${order.toAudit eq 1}">
  609. <%--弹窗提示--%>
  610. <a href="#" onclick="return alertx('订单存在未审核的收款,暂不能退款。请将收款审核通过后再操作退款。')">申请退款</a>
  611. </c:if>
  612. </c:if>
  613. <c:if test="${order.toAudit ne 1}">
  614. <c:if test="${order.applyReturnedPurchaseFlag eq 1}">
  615. <a href="${ctx}/bulkpurchase/cmRefundsProduct/applyRefound.rpc?orderID=${order.orderID}"
  616. <c:if test="${order.status == 21 || order.status == 22 || order.status == 23}">onclick="return confirmx('部分收款的订单、申请退款只能申请全部退款!', this.href)"
  617. </c:if>
  618. >申请退款</a>
  619. </c:if>
  620. <c:if test="${order.applyReturnedPurchaseFlag ne 1}">
  621. <font title="存在未处理完的申请,请前往退款列表处理!">申请退款</font>
  622. </c:if>
  623. </c:if>
  624. </c:if>
  625. </c:if>
  626. </shiro:hasPermission>
  627. <shiro:hasPermission name="order:order:edit">
  628. <c:if test="${(order.rebateOrder == '1' ) && (brokerage == 0) && (order.status != 0)}">
  629. <a href="${ctx}/order/toChangePay?orderId=${order.orderID}"
  630. onclick="return confirmx('确定将该返佣订单直接置为已收款和已付款状态吗?', this.href)">置为已收款已付款</a>
  631. </c:if>
  632. <c:if test="${order.organizeID == 0}">
  633. <c:if test="${order.status == 11}">
  634. <c:if test="${order.splitFlag == 1}">
  635. <a href="${ctx}/order/toSplit?id=${order.orderID}">
  636. 拆分订单
  637. </a>
  638. </c:if>
  639. </c:if>
  640. <a href="javascript:" onclick="QRCodewin(${order.orderID},'${order.orderNo}')">分享二维码</a>
  641. <c:if test="${order.status ne 6 && order.status ne 7}">
  642. <a href="${ctx}/order/editclausecontent?id=${order.orderID}">修改售后条款</a>
  643. </c:if>
  644. </c:if>
  645. <c:if test="${order.status ne 0}">
  646. <a href="${ctx}/order/printOrder?orderID=${order.orderID}">打印发货单</a>
  647. </c:if>
  648. <a href="${ctx}/order/exportOrder?id=${order.orderID}">订单导出</a>
  649. <%-- <a href="javascript:void(0);" onclick="remarks('${order.orderID}','')">备注</a>--%>
  650. <a href="${ctx}/order/cmOrderRemark/remarksViewNew.rpc?orderID=${order.orderID}&source=2">订单备注</a>
  651. <%--包含订单充值商品就不显示--%>
  652. <c:if test="${empty order.rechargeGoods}">
  653. <c:if test="${order.status ne 0 && order.status ne 11 && order.status ne 21 && order.status ne 6}">
  654. <a href="${ctx}/order/logisticsDetails?orderID=${order.orderID}">发货记录</a>
  655. </c:if>
  656. <c:if test="${order.status ne 0 && order.status ne 11 && order.status ne 6}">
  657. <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${order.orderID}&from=2">收退款记录
  658. </a>
  659. </c:if>
  660. <c:if test="${order.status ne 0 && order.status ne 11 && order.status ne 6}">
  661. <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRecturnRecordByOrderID.rpc?orderID=${order.orderID}">退款(退货)记录
  662. </a>
  663. </c:if>
  664. </c:if>
  665. </shiro:hasPermission>
  666. </div>
  667. </td>
  668. </tr>
  669. <c:if test="${order.svipFullReduction gt 0}">
  670. <tr>
  671. <td>超级会员优惠:¥${order.svipFullReduction}</td>
  672. </tr>
  673. </c:if>
  674. <c:if test="${order.promotionFullReduction gt 0 || order.promotionalGiftsCount gt 0}">
  675. <tr>
  676. <c:if test="${order.promotionFullReduction gt 0}">
  677. <td>促销满减:¥${order.promotionFullReduction}</td>
  678. </c:if>
  679. <c:if test="${order.promotionalGiftsCount gt 0}">
  680. <td>赠品总数:${order.promotionalGiftsCount}</td>
  681. </c:if>
  682. </tr>
  683. </c:if>
  684. <c:if test="${order.discountFee gt 0 and returnedPurchaseFee gt 0}">
  685. <tr>
  686. <td style="color: red">说明:因退货,经理折扣收回,用于抵扣退款。</td>
  687. </tr>
  688. </c:if>
  689. </table>
  690. <textarea id="copyValue" style="display: none"></textarea>
  691. <c:forEach items="${order.newShopOrders}" var="shopOrder">
  692. <div class="order-rows">
  693. <span><label>下单时间:</label>${order.orderTime}</span>
  694. <span><label>子订单号(ID):</label>${shopOrder.shopOrderNo}(${shopOrder.shopOrderID})</span>
  695. <span><label>子订单金额:</label><fmt:formatNumber value="${shopOrder.needPayAmount}" type="currency"/></span>
  696. <c:if test="${shopOrder.postFeeCos eq '0'}">
  697. <div class="print-wrapper">
  698. <a href="${ctx}/order/printOrder?shopOrderID=${shopOrder.shopOrderID}">打印</a>
  699. <a href="${ctx}/order/exportSubOrder?shopOrderID=${shopOrder.shopOrderID}">导出</a>
  700. <c:if test="${order.status ne '0'}">
  701. <a onclick="copyText('${shopOrder.shopOrderID}')" style="cursor:pointer;">供应商订单二维码</a>
  702. </c:if>
  703. <c:if test="${shopOrder.orderArchiveId ne null}">
  704. <a href="${ctx}/archive/cmOrderArchive/form?id=${shopOrder.orderArchiveId}">查看订单资料</a>
  705. </c:if>
  706. </div>
  707. <c:if test="${order.status ne 0 && order.status ne 11}">
  708. <div class="delivery-wrapper">
  709. <span>发货状态:
  710. <c:if test="${shopOrder.sendOutStatus == 1}">
  711. <font color="red">待发货</font>
  712. </c:if>
  713. <c:if test="${shopOrder.sendOutStatus == 2}">
  714. <font color="#ff8c00">部分发货</font>
  715. </c:if>
  716. <c:if test="${shopOrder.sendOutStatus == 3}">
  717. <font color="green">已发货</font>
  718. </c:if>
  719. </span>
  720. <span>付款状态:<c:if test="${shopOrder.payStatus == 1}">
  721. <font color="red">待付款</font>
  722. </c:if>
  723. <c:if test="${shopOrder.payStatus == 2}">
  724. <font color="#ff8c00">部分付款</font>
  725. </c:if>
  726. <c:if test="${shopOrder.payStatus == 3}">
  727. <font color="green">已付款</font>
  728. </c:if></span>
  729. <c:if test="${shopOrder.payStatus == 3 or shopOrder.payStatus == 2}">
  730. <span>已付金额: <fmt:formatNumber value="${shopOrder.payed}" type="currency"/>
  731. </span>
  732. </c:if>
  733. </div>
  734. </c:if>
  735. <c:if test="${not empty shopOrder.note}">
  736. <div><label>留言:</label>${shopOrder.note}</div>
  737. </c:if>
  738. </c:if>
  739. </div>
  740. <div class="order-rows">
  741. <span><label>供应商:</label>${shopOrder.shopName}</span>
  742. <c:if test="${shopOrder.shopPromotion ne null && shopOrder.shopPromotion.type eq 3}">
  743. <c:if test="${shopOrder.shopPromotion.mode eq 2}">
  744. <span><label
  745. style="background-color: #F60;color: white">${shopOrder.shopPromotion.name}</label> 满<fmt:formatNumber
  746. value="${shopOrder.shopPromotion.touchPrice}" pattern="#,##0.00"
  747. maxFractionDigits="2"/>,减<fmt:formatNumber value="${shopOrder.shopPromotion.reducedPrice}"
  748. pattern="#,##0.00" maxFractionDigits="2"/></span>
  749. </c:if>
  750. <c:if test="${shopOrder.shopPromotion.mode eq 3}">
  751. <span><label
  752. style="background-color: purple;color: white">${shopOrder.shopPromotion.name}</label> 满<fmt:formatNumber
  753. value="${shopOrder.shopPromotion.touchPrice}" pattern="#,##0.00"
  754. maxFractionDigits="2"/>,赠送商品</span>
  755. </c:if>
  756. </c:if>
  757. <div>
  758. <c:forEach items="${shopOrder.newOrderProducts}" var="op" varStatus="varIndex">
  759. <div class="supplier-product-item" style="z-index:${100000 - varIndex.index};position:relative;">
  760. <%--二手订单详情--%>
  761. <c:if test="${order.secondHandOrderFlag eq 1}">
  762. <a href="${fns:getConfig('wwwServer')}flea-market-${op.productID}.html" target="_blank">
  763. <img class="supplier-img" src="${op.image}"/>
  764. </a>
  765. </c:if>
  766. <%--正常订单详情--%>
  767. <c:if test="${order.secondHandOrderFlag ne 1}">
  768. <a href="${fns:getConfig('wwwServer')}product-${op.productID}.html" target="_blank">
  769. <img class="supplier-img" src="${op.image}"/>
  770. </a>
  771. </c:if>
  772. <div class="supplier-name">
  773. <c:if test="${op.name eq op.aliasName || op.productID eq 6060}">
  774. <div class="supplier-product-name">${op.name}</div>
  775. </c:if>
  776. <c:if test="${op.name ne op.aliasName && op.productID ne 6060}">
  777. <div class="supplier-product-name">${op.name}</div>
  778. <div class="supplier-product-alias">${op.aliasName}</div>
  779. </c:if>
  780. <c:if test="${op.productType eq 1}">
  781. <div class="supplier-product-name"><label style="color: red">协商赠品</label></div>
  782. </c:if>
  783. <c:if test="${op.productType eq 2}">
  784. <div class="supplier-product-name"><label style="color: red">促销赠品</label></div>
  785. </c:if>
  786. <c:if test="${op.includedTax eq 1}">
  787. <div class="supplier-product-name"><label style="color: red">(含税)</label></div>
  788. </c:if>
  789. <c:if test="${op.includedTax ne '' and op.includedTax eq 0}">
  790. <c:if test="${op.invoiceType eq 3}">
  791. <div class="supplier-product-name"><label style="color: red">(不含税-不能开票)</label></div>
  792. </c:if>
  793. <c:if test="${op.invoiceType eq 2 or op.invoiceType eq 1}">
  794. <div class="supplier-product-name"><label style="color: red">(不含税-能开票)</label></div>
  795. </c:if>
  796. </c:if>
  797. </div>
  798. <c:if test="${op.productID ne 999}">
  799. <div class="supplier-product-info">
  800. <span>单价:
  801. <c:if test="${op.svipPriceFlag eq 1 or op.productPromotion.mode eq 1}">
  802. <label style="text-decoration: line-through"><fmt:formatNumber value="${op.price}"
  803. type="currency"/></label>
  804. </c:if>
  805. <c:if test="${op.svipPriceFlag ne 1 and op.productPromotion.mode ne 1}">
  806. <fmt:formatNumber value="${op.price}" type="currency"/>
  807. </c:if>
  808. <c:if test="${op.svipPriceFlag eq 1}">
  809. <label style="margin-left:5px"><fmt:formatNumber value="${op.discountPrice}"
  810. type="currency"/></label>
  811. <font color="red">(超级会员价)</font></span>
  812. </c:if>
  813. <c:if test="${op.ladderPriceFlag eq 1 || op.isActProduct eq 2}">
  814. <a href="javascript:;" class="ladderPrice"><span> (阶梯价格)</span>
  815. <c:if test="${not empty op.orderProductLadderPriceList}">
  816. <div class="list">
  817. <p><span>起订量</span><span>价格</span></p>
  818. <c:forEach items="${op.orderProductLadderPriceList}" var="ladderPrice">
  819. <p data-num="${ladderPrice.buyNum}">
  820. <span>${ladderPrice.buyNumRangeShow}</span><span
  821. class="price">${ladderPrice.buyPrice}</span></p>
  822. </c:forEach>
  823. </div>
  824. </c:if>
  825. </a>
  826. </c:if>
  827. </span>
  828. <span>折扣: ${op.discount}%</span>
  829. <span>折后单价:
  830. <c:if test="${op.productPromotion.mode eq 1}">
  831. <label style="text-decoration: line-through"><fmt:formatNumber
  832. value="${op.discountPrice}" type="currency"/></label></span>
  833. </c:if>
  834. <c:if test="${op.productPromotion.mode ne 1}">
  835. <fmt:formatNumber value="${op.discountPrice}" type="currency"/></span>
  836. </c:if>
  837. <span>数量: x${op.num}</span>
  838. <br>
  839. <span>税率: ${(op.includedTax != '' and op.includedTax eq 0 and op.invoiceType eq 3)?'---': op.taxRate ne null?op.taxRate:0.0}%</span>
  840. <span>税费: ${(op.includedTax eq 1 or (op.includedTax != '' and op.includedTax eq 0 and op.invoiceType eq 3))?'---': empty op.totalAddedValueTax ?0.00:(op.totalAddedValueTax)}</span>
  841. <span>总额: <fmt:formatNumber value="${op.totalFee}" type="currency"/></span>
  842. <c:if test="${order.sendOutStatus == 2 || order.sendOutStatus == 3}">
  843. <span>已发/已收 ${(op.num == null ? 0 : op.num)+ (op.presentNum == null ? 0 : op.presentNum)- (op.notOutStore == null ? 0 : op.notOutStore)}/${op.receivedNum}</span>
  844. </c:if>
  845. <c:if test="${fns:hasReturn(order.status)}">
  846. <span>退款(退货)中/已完成 ${op.returningNum}/${op.returnedNum}</span>
  847. </c:if>
  848. </div>
  849. <c:if test="${op.productPromotion ne null}">
  850. <c:if test="${op.productPromotion.type eq 2}">
  851. <div class="supplier-product-promotionInfo">
  852. <table>
  853. <tr>
  854. <td rowspan="2">
  855. <c:if test="${op.productPromotion.mode eq 2}">
  856. <label style="background-color: #F60;color: white"><label
  857. class="promotionsName">${op.productPromotion.name}</label></label>
  858. </c:if>
  859. <c:if test="${op.productPromotion.mode eq 3}">
  860. <label style="background-color: purple;color: white"><label
  861. class="promotionsName">${op.productPromotion.name}</label></label>
  862. </c:if>
  863. </td>
  864. <td>
  865. <span class="downSpan">${op.productPromotion.description}</span>
  866. <c:if test="${op.productPromotion.mode eq 2}">
  867. <span class="upSpan"> 满<fmt:formatNumber
  868. value="${op.productPromotion.touchPrice}" pattern="#,##0.00"
  869. maxFractionDigits="2"/>,减<fmt:formatNumber
  870. value="${op.productPromotion.reducedPrice}"
  871. pattern="#,##0.00" maxFractionDigits="2"/></span>
  872. </c:if>
  873. <c:if test="${op.productPromotion.mode eq 3}">
  874. <span class="upSpan"> 满<fmt:formatNumber
  875. value="${op.productPromotion.touchPrice}" pattern="#,##0.00"
  876. maxFractionDigits="2"/>,赠送商品</span>
  877. </c:if>
  878. </td>
  879. </tr>
  880. </table>
  881. </div>
  882. </c:if>
  883. <c:if test="${op.productPromotion.type eq 1}">
  884. <div class="supplier-product-promotionInfo">
  885. <table>
  886. <tr>
  887. <c:if test="${op.productPromotion.mode eq 1}">
  888. <td><label style="background-color: green;color: white"><label
  889. class="promotionsName">${op.productPromotion.name}</label></label>
  890. </td>
  891. <td> 优惠价: <label style="color: red"><fmt:formatNumber
  892. value="${op.productPromotion.touchPrice}" pattern="#,##0.00"
  893. maxFractionDigits="2"/></label></td>
  894. </c:if>
  895. <c:if test="${op.productPromotion.mode eq 2}">
  896. <td><label style="background-color: #F60;color: white"><label
  897. class="promotionsName">${op.productPromotion.name}</label></label>
  898. </td>
  899. <td> 满<fmt:formatNumber value="${op.productPromotion.touchPrice}"
  900. pattern="#,##0.00"
  901. maxFractionDigits="2"/>,减<fmt:formatNumber
  902. value="${op.productPromotion.reducedPrice}" pattern="#,##0.00"
  903. maxFractionDigits="2"/></td>
  904. </c:if>
  905. <c:if test="${op.productPromotion.mode eq 3}">
  906. <td><label style="background-color: purple;color: white"><label
  907. class="promotionsName">${op.productPromotion.name}</label></label>
  908. </td>
  909. <td> 满<fmt:formatNumber value="${op.productPromotion.touchPrice}"
  910. pattern="#,##0.00" maxFractionDigits="2"/>,赠送商品
  911. </td>
  912. </c:if>
  913. </tr>
  914. </table>
  915. </div>
  916. </c:if>
  917. </c:if>
  918. </c:if>
  919. <c:if test="${op.productID eq 999}">
  920. <span>数量: x${op.num}</span>
  921. </c:if>
  922. <br>
  923. </div>
  924. </c:forEach>
  925. </div>
  926. </div>
  927. </c:forEach>
  928. <%--组织订单暂时不显示发票和条款信息--%>
  929. <c:if test="${order.organizeID == 0}">
  930. <div class="order-rows">
  931. <label>订单对机构是否可见:</label>
  932. <c:if test="${order.orderSeen eq 1}">
  933. <label>可见</label>
  934. </c:if>
  935. <c:if test="${order.orderSeen eq 2}">
  936. <label>不可见</label>
  937. </c:if>
  938. <c:if test="${order.orderSeen ne 1 and order.orderSeen ne 2}">
  939. <label>未定义</label>
  940. </c:if>
  941. </div>
  942. <div class="order-rows">
  943. <label>发票信息:</label>
  944. <c:if test="${order.orderInvoice.type eq 0}">
  945. <%-- <input name="invoice" type="radio" checked="checked">--%>
  946. <label>不需要发票</label>
  947. </c:if>
  948. <c:if test="${order.orderInvoice.type eq 1}">
  949. <%-- <input name="invoice" type="radio" checked="checked">--%>
  950. <label>增值税普通发票</label>
  951. </c:if>
  952. <c:if test="${order.orderInvoice.type eq 2}">
  953. <%-- <input name="invoice" type="radio" checked="checked">--%>
  954. <label>增值税专用发票</label>
  955. </c:if>
  956. <c:if test="${order.orderInvoice.type eq null}">
  957. <%-- <input name="invoice" type="radio" checked="checked">--%>
  958. <label>不需要发票</label>
  959. </c:if>
  960. <c:if test="${order.orderInvoice.type == 1}">
  961. <br>
  962. <div>
  963. <span>
  964. <c:if test="${order.orderInvoice.invoiceTitleType eq 0}">
  965. 个人抬头:
  966. <span>${order.orderInvoice.invoiceTitle}</span>
  967. </c:if>
  968. <c:if test="${order.orderInvoice.invoiceTitleType eq 1}">
  969. 企业抬头:
  970. <span>${order.orderInvoice.invoiceTitle}</span>
  971. &nbsp;&nbsp;&nbsp;&nbsp;
  972. 纳税人识别号:
  973. <span>${order.orderInvoice.corporationTaxNum}</span>
  974. </c:if>
  975. </span>
  976. </div>
  977. </c:if>
  978. <c:if test="${order.orderInvoice.type == 2}">
  979. <table>
  980. <tr>
  981. <td><span>单位名称:${order.orderInvoice.invoiceTitle}</span></td>
  982. <td><span>纳税人识别号:${order.orderInvoice.corporationTaxNum}</span></td>
  983. <td><span>注册地址:${order.orderInvoice.registeredAddress}</span></td>
  984. </tr>
  985. <tr>
  986. <td><span>注册电话:${order.orderInvoice.registeredPhone}</span></td>
  987. <td><span>开户银行:${order.orderInvoice.openBank}</span></td>
  988. <td><span>银行账号:${order.orderInvoice.bankAccountNo}</span></td>
  989. </tr>
  990. </table>
  991. </c:if>
  992. </div>
  993. <div class="order-rows">
  994. <label>售后条款:</label>
  995. <c:forEach items="${bpClauses}" var="items" varStatus="index">
  996. <c:if test="${items.clauseType ne 0 }">
  997. <span>
  998. <input id="clauseId${index.index+1}" class="clauseId" name="clauseID" type="radio"
  999. value="${items.id}"${(order.clauseID)==(items.id)?'checked="checked"':''}
  1000. class="required" class="clauseId" disabled="disabled">
  1001. <input type="hidden" class="clauseContent" id="clauseContent${index.index+1}"
  1002. value="${fns:escapeHtml(items.content)}">
  1003. <input type="hidden" class="clauseName" id="clauseName${index.index+1}" value="${items.name}">
  1004. <a href="javascript:void(0);"
  1005. onclick="openClauseInfo(${index.index+1});"><label>${items.name}</label></a>
  1006. </span>
  1007. </c:if>
  1008. </c:forEach>
  1009. </div>
  1010. </c:if>
  1011. <script type="text/javascript">
  1012. (function () {
  1013. $('body').click(function (e) {
  1014. var target = $(e.target),
  1015. $block = $('.operation-block');
  1016. if (target.is('.operation-btn')) {
  1017. if ($block.css('display') === 'none') {
  1018. $block.show();
  1019. } else {
  1020. $block.hide();
  1021. }
  1022. }
  1023. if (!target.is('.operation-block') && !target.is('.operation-btn')) {
  1024. $block.hide();
  1025. }
  1026. });
  1027. $('.clauseId').each(function () {
  1028. var self = $(this);
  1029. if (!self.prop("checked")) {
  1030. self.parent().hide();
  1031. } else {
  1032. self.hide();
  1033. }
  1034. });
  1035. $('#invoice1, #invoice2, #invoice3').each(function () {
  1036. var self = $(this);
  1037. if (!self.prop("checked")) {
  1038. self.next().remove();
  1039. self.remove();
  1040. } else {
  1041. self.remove();
  1042. }
  1043. })
  1044. })();
  1045. function openClauseInfo(index) {
  1046. var content = $("#clauseContent" + index).val();
  1047. if (content == '') {
  1048. return false;
  1049. }
  1050. $.jBox(content, {
  1051. title: $("#clauseName" + index).val(),
  1052. width: $(top.document).width() - 440,
  1053. height: $(top.document).height() - 240,
  1054. buttons: {'关闭': true}
  1055. });
  1056. }
  1057. //编辑经理折扣
  1058. function modelShow(orderID) {
  1059. top.$.jBox("iframe:${ctx}/order/DiscountFee?orderID=" + orderID, {
  1060. iframeScrolling: 'yes',
  1061. top: 150,
  1062. width: 480,
  1063. height: 250,
  1064. persistent: true,
  1065. title: "编辑经理折扣",
  1066. buttons: {"确认": '1', "取消": '-1'},
  1067. submit: function (v, h, f) {
  1068. //确定
  1069. var $jboxFrame = top.$('#jbox-iframe');
  1070. var $mainFrame = top.$('#mainFrame');
  1071. if ('1' == v && 1 == $jboxFrame.size() && 1 == $mainFrame.size()) {
  1072. var rechargeInfo = $jboxFrame[0].contentWindow.submit();
  1073. var split = rechargeInfo.split(",");
  1074. var payTotalFee = split[0];
  1075. var discountFee = split[1];
  1076. //取值,然后调用后台接口传入参数,最后刷新页面
  1077. if (payTotalFee <= 0) {
  1078. return false;
  1079. }
  1080. $.post("${ctx}/order/saveDiscountFee", {
  1081. 'discountFee': discountFee,
  1082. 'orderID': orderID,
  1083. 'payTotalFee': payTotalFee
  1084. }, function (data) {
  1085. if (true == data.success) {
  1086. refresh(data.msg);
  1087. } else {
  1088. alertx(data.msg, 1000);
  1089. }
  1090. }, "JSON");//这里返回的类型有:json,html,xml,text
  1091. }
  1092. return true;
  1093. }, closed: function () {/* 窗口关闭后执行的函数 */
  1094. }
  1095. });
  1096. }
  1097. //订单商品备注
  1098. function remarks(orderID, shopOrderID) {
  1099. top.$.jBox("iframe:${ctx}/order/cmOrderRemark/remarksView?orderID=" + orderID + "&shopOrderID=" + shopOrderID, {
  1100. iframeScrolling: 'yes',
  1101. top: 150,
  1102. width: 400,
  1103. height: 480,
  1104. persistent: true,
  1105. title: "订单备注信息",
  1106. buttons: {"确认": '1', "关闭": '-1'},
  1107. submit: function (v, h, f) {
  1108. //确定
  1109. var $jboxFrame = top.$('#jbox-iframe');
  1110. var $mainFrame = top.$('#mainFrame');
  1111. if ('1' == v && 1 == $jboxFrame.size() && 1 == $mainFrame.size()) {
  1112. var remarks = $jboxFrame[0].contentWindow.submit();
  1113. // var arr = item.split(",");
  1114. // var remarks = arr[0];
  1115. if ('' == remarks) {
  1116. alertx("备注信息不能为空!!!")
  1117. return false;
  1118. }
  1119. saveRemarks(remarks, orderID, shopOrderID);
  1120. return true;
  1121. }
  1122. return true;
  1123. },
  1124. loaded: function (h) { //隐藏滚动条
  1125. $(".jbox-content", top.document).css("overflow-y", "hidden");
  1126. }
  1127. });
  1128. }
  1129. function saveRemarks(remarks, orderID, shopOrderID) {
  1130. $.post("${ctx}/order/cmOrderRemark/addRemarks", {
  1131. "remarks": remarks, "orderID": orderID, "shopOrderID": shopOrderID
  1132. }, function (data) {
  1133. if (true == data.success) {
  1134. refresh(data.msg);
  1135. } else {
  1136. $.jBox.tip(data.msg, 'error');
  1137. }
  1138. }, "JSON");//这里返回的类型有:json,html,xml,text
  1139. }
  1140. // 二维码分享
  1141. function QRCodewin(orderId, orderNo) {
  1142. var html = '<div style="padding:10px;">订单号:' + orderNo + '' +
  1143. '<div class="code" style="text-align: center;"></div>' +
  1144. '</div>';
  1145. $.jBox(html, {
  1146. title: "订单二维码分享",
  1147. width: $(top.document).width() - 1700,
  1148. height: $(top.document).height() - 1600,
  1149. buttons: {'关闭': true}
  1150. });
  1151. var enCodeRedirectUrl;
  1152. var redirectUrl = '${fns:getConfig('caimei.crm.server')}oauth.action?orderId=' + orderId;
  1153. $.ajax({
  1154. url: "${ctx}/bulkpurchase/contractOrder/enCode",
  1155. data: {"redirectUrl": redirectUrl},
  1156. type: "POST",
  1157. async: false,
  1158. success: function (data) {
  1159. enCodeRedirectUrl = data.enCodeRedirectUrl;
  1160. }
  1161. });
  1162. 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';
  1163. $('.code').qrcode({
  1164. width: 150,
  1165. height: 150,
  1166. text: shareUrl
  1167. });
  1168. }
  1169. //刷新页面
  1170. function refresh(msg) {
  1171. $.jBox.tip(msg, 'info', {timeout: 1000});
  1172. setTimeout(function () {
  1173. window.location.href = "${ctx}/order/detail?id=${order.orderID}"
  1174. }, 1000)
  1175. }
  1176. </script>
  1177.  
  1178. <script>
  1179. if ("${time}" != "") {
  1180. window.onload = clock;
  1181. function clock() {
  1182. var today = new Date(),//当前时间
  1183. h = today.getHours(),
  1184. m = today.getMinutes(),
  1185. s = today.getSeconds();
  1186. var stopTime = new Date("${time}"),//结束时间
  1187. stopH = stopTime.getHours(),
  1188. stopM = stopTime.getMinutes(),
  1189. stopS = stopTime.getSeconds();
  1190. var shenyu = stopTime.getTime() - today.getTime(),//倒计时毫秒数
  1191. shengyuD = parseInt(shenyu / (60 * 60 * 24 * 1000)),//转换为天
  1192. D = parseInt(shenyu) - parseInt(shengyuD * 60 * 60 * 24 * 1000),//除去天的毫秒数
  1193. shengyuH = parseInt(D / (60 * 60 * 1000)),//除去天的毫秒数转换成小时
  1194. H = D - shengyuH * 60 * 60 * 1000,//除去天、小时的毫秒数
  1195. shengyuM = parseInt(H / (60 * 1000)),//除去天的毫秒数转换成分钟
  1196. M = H - shengyuM * 60 * 1000;//除去天、小时、分的毫秒数
  1197. S = parseInt((shenyu - shengyuD * 60 * 60 * 24 * 1000 - shengyuH * 60 * 60 * 1000 - shengyuM * 60 * 1000) / 1000)//除去天、小时、分的毫秒数转化为秒
  1198. document.getElementById("time").innerHTML = ("(剩余" + shengyuD + "天" + shengyuH + "小时" + shengyuM + "分" + S + "秒)" + "<br>");
  1199. setTimeout(clock, 500);
  1200. }
  1201. }
  1202. function copyText(shopOrderID) {
  1203. $.post("${ctx}/order/shopOrderLink", {'shopOrderId': shopOrderID}, function (data) {
  1204. if (data.success) {
  1205. var imageSrc = "data:image/jpeg|png|gif;base64," + data.imageBuffer;
  1206. top.$.jBox.info('<img width="150px" height="150px" style="margin-left: 65px;" src=' + imageSrc + '>', '小程序扫码发货');
  1207. } else {
  1208. alertx(data.msg);
  1209. }
  1210. });
  1211. }
  1212. $(document).ready(function () {
  1213. if ($(".operation-block").length > 0) {
  1214. var length = $(".operation-block").length;
  1215. for (var i = 0; i < length; i++) {
  1216. var b = $(".operation-block").get(i);
  1217. if ($(b).html().trim() == '') {
  1218. $(b).hide();
  1219. $(b).prev().hide();
  1220. }
  1221. }
  1222. }
  1223. if ($('.supplier-product-name').html() == $('.supplier-product-alias').html()) {
  1224. $('.supplier-product-alias').remove();
  1225. }
  1226. })
  1227. //抹平收款
  1228. function collection(orderId) {
  1229. $.post("${ctx}/order/gatheringData", {
  1230. 'orderId': orderId
  1231. }, function (data) {
  1232. if (true == data.success) {
  1233. var html = "<div id='auditBox'>" +
  1234. "<P>确定抹平收款吗?抹平后该订单将变为已收款状态</p>" +
  1235. "<P><span>订单金额:<b>¥" + Number(data.payTotalFee).toFixed(2) + "</b></span></p>" +
  1236. "<P><span>应收金额:<b>¥" + Number(data.payableAmount).toFixed(2) + "</b><span style='color:#FF0000'>(账户余额抵扣: ¥<b>" + Number(data.balancePayFee).toFixed(2) + "</b>)</span></span></p>" +
  1237. "<P><span>已收金额:<b>¥" + Number(data.associateAmount).toFixed(2) + "</b></span></p>" +
  1238. "<div><div class='note-div'><span style='color:#FF0000'>*</span>备注</div></div>" +
  1239. "<textarea name='auditNote' style='width: 100%;min-height:60px;'></textarea>" +
  1240. "<div class='note-div' style='display: none' id='noteError'><span style='color:#FF0000'>请填写备注</span> </div>" +
  1241. "</div>";
  1242. $.jBox(html, {
  1243. title: "确认提示", width: 500, height: 400, buttons: {"确定": '1', "取消": '-1'},
  1244. submit: function (v, h, f) {
  1245. if ('1' == v) {
  1246. if ((Number(data.payTotalFee) - Number(data.associateAmount)) > 10) {
  1247. alertx("订单剩余应收金额大于¥10.00,不能抹平!");
  1248. return false;
  1249. }
  1250. var content = document.getElementsByName("auditNote")[0].value;
  1251. if (content == '' || content == null) {
  1252. document.getElementById('noteError').style.display = 'block';
  1253. return false;
  1254. }
  1255. $.post("${ctx}/order/smoothOutCollection", {
  1256. 'orderID': orderId,
  1257. 'balanceAccountsRemark': content
  1258. });
  1259. window.location.href = "${ctx}/order/detail?id=" + orderId;
  1260. }
  1261. }
  1262. });
  1263. } else {
  1264. $.jBox.tip(data.msg, 'error');
  1265. }
  1266. }, "JSON");//这里返回的类型有:json,html,xml,text
  1267. };
  1268. </script>
  1269. </body>
  1270. </html>