orderDetail.jsp 52 KB

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