orderDetail.jsp 54 KB

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