heheNewOrderDetail.jsp 57 KB

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