applyRefoundForm.jsp 73 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244
  1. <%@ taglib prefix="from" uri="http://www.springframework.org/tags/form" %>
  2. <%@ page contentType="text/html;charset=UTF-8" %>
  3. <%@ include file="/WEB-INF/views/include/taglib.jsp" %>
  4. <html>
  5. <head>
  6. <title>申请退款退货</title>
  7. <meta name="decorator" content="default"/>
  8. <style>
  9. .form-horizontal .controls{margin-left:0}
  10. #increase,#decrease,.lineNum{width:30px;height:30px}
  11. .lineNum{text-align:center}
  12. .dateInput input{width:150px}
  13. .clause span{margin-left:30px}
  14. #productTable th{text-align:center;white-space:nowrap}
  15. #productTable td{text-align:center;white-space:nowrap}
  16. .controls{font-size:0}
  17. .controls .conList{display:inline-block;margin-right:15px}
  18. .conList .btn:nth-of-type(1){margin-left:25px}
  19. .select2-choice{width:100px}
  20. .upload-content{margin-top:-70px;display:inline-block}
  21. .upload-content .conList .btn:nth-of-type(1){width:90px;height:100px;border:1px solid #eee;background:#fff;position:relative}
  22. .upload-content .conList .btn:nth-of-type(1)>div{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#666}
  23. .upload-content .conList .btn:nth-of-type(1) span{font-size:35px}
  24. .upload-content .conList .btn:nth-of-type(1) h5{color:#666}
  25. .cancel-upload{background:transparent;border:none;box-shadow:none;position:relative;top:-38px;left:-25px;cursor:pointer;z-index:100}
  26. .upload-content .conList ol li{width:114px;min-height:80px;text-align:center;background:#fff;position:relative;top:120px}
  27. .hide-pic{display:none !important}
  28. .upload-tips{margin:10px 0}
  29. .weishaIcon {background:darkorange;color:white;margin:0 0px;padding:0 3px;font-style:normal;font-size: 12px; display:inline-block;border-radius:2px}
  30. </style>
  31. <script type="text/javascript">
  32. $(document).ready(function () {
  33. $("#name").focus();
  34. $("#inputForm").validate({
  35. submitHandler: function (form) {
  36. //线下转账
  37. if (${!returnOnline}){
  38. //判断退款金额是否和填写金额总和一致
  39. var obj = document.getElementsByClassName("check-item-review");
  40. var checked0 = obj[0].checked;
  41. var checked1 = obj[1].checked;
  42. if(!checked1 && !checked0){
  43. alertx("请选择退款方式");
  44. return;
  45. }
  46. var totalFee = 0;
  47. if(checked0) {
  48. var refundOfflineFee = $('#refundOfflineFee').val();
  49. if (refundOfflineFee == null || refundOfflineFee == "") {
  50. alertx("请填写线下转账退款数");
  51. return;
  52. } else {
  53. totalFee = parseFloat(refundOfflineFee) + totalFee;
  54. }
  55. //判断银行信息
  56. var bankAccountName = $('#bankAccountName').val();
  57. var bankAccountNo = $('#bankAccountNo').val();
  58. var openBank = $('#openBank').val();
  59. if (bankAccountName == null || bankAccountName == "") {
  60. alertx("请填写开户名");
  61. return;
  62. }
  63. if (bankAccountNo == null || bankAccountNo == "") {
  64. alertx("请填写开户账号");
  65. return;
  66. }
  67. if (openBank == null || openBank == "") {
  68. alertx("请填写开户行");
  69. return;
  70. }
  71. }
  72. if(checked1){
  73. var refundBalanceFee = $('#refundBalanceFee').val();
  74. if( refundBalanceFee == null || refundBalanceFee == ""){
  75. alertx("请填写账户余额退款数");
  76. return;
  77. }else{
  78. totalFee = parseFloat(refundBalanceFee) + totalFee;
  79. }
  80. }
  81. var refundFee = $(".refundFee").text();
  82. if(refundFee == "" || refundFee == null){
  83. refundFee = 0;
  84. }
  85. refundFee = parseFloat(refundFee);
  86. var refundType = $("#refundType").val();
  87. console.log("refundType------------>"+refundType);
  88. if(1==refundType){
  89. var number = refundFee - totalFee;
  90. if(number > 0.1 || number < -0.1){
  91. alertx("各退款方式的金额之和不等于退款总金额,请重新计算后再提交申请");
  92. return;
  93. }
  94. }else{
  95. var refundFee = $("#freeRefundFee").val();
  96. console.log("自定义退款金额------------》"+refundFee);
  97. if(refundFee == "" || refundFee == null){
  98. refundFee = 0;
  99. alertx("请填写自定义退款金额!");
  100. return;
  101. }
  102. }
  103. if (${cmDiscernReceipt.payWay eq 1}) {
  104. var businessNumber = $(".businessNumber").eq(0).text();
  105. if (businessNumber.length > 0) {
  106. if (checked0 && checked1){
  107. alertx("本订单为线上支付订单,由于您申请退到余额和线下转账,请在一天后联系开通了线上分账商户号的供应商" +
  108. "退回相应付款金额。确定付款情况请到付款管理页面查看。");
  109. }else if (checked0){
  110. alertx("本订单为线上支付订单,由于您申请线下转账,请在一天后联系开通了线上分账商户号的供应商" +
  111. "退回相应付款金额。确定付款情况请到付款管理页面查看。");
  112. }else {
  113. alertx("本订单为线上支付订单,由于您申请退到余额,请在一天后联系开通了线上分账商户号的供应商" +
  114. "退回相应付款金额。确定付款情况请到付款管理页面查看。");
  115. }
  116. }
  117. }
  118. }else if (${returnOnline}){
  119. var obj = document.getElementsByClassName("check-item-review");
  120. var checked0 = obj[0].checked;
  121. // var checked1 = obj[1].checked;
  122. if(!checked0){
  123. alertx("请选择退款方式");
  124. return;
  125. }
  126. var businessNumber = $(".businessNumber").eq(0).text();
  127. if (businessNumber.length > 0 && checked1) {
  128. alertx("本订单为线上支付订单,由于您申请退到余额,请在一天后联系开通了线上分账商户号的供应商" +
  129. "退回相应付款金额。确定付款情况请到付款管理页面查看。");
  130. }
  131. }
  132. $.jBox("本次退款(退货)操作后,需等待财务审核,确定进行本次操作吗?", {
  133. title: "提示",
  134. width: $(top.document).width() - 1550,
  135. height: $(top.document).height()-1400,
  136. buttons: { '确定':1 , '关闭': 2 },
  137. submit: function (v, h, f) {
  138. if (v == 1) {
  139. loading('正在提交,请稍等...');
  140. form.submit();
  141. }else{
  142. return;
  143. }
  144. }
  145. });
  146. },
  147. errorContainer: "#messageBox",
  148. errorPlacement: function (error, element) {
  149. $("#messageBox").text("输入有误,请先更正。");
  150. if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")) {
  151. error.appendTo(element.parent().parent());
  152. } else {
  153. error.insertAfter(element);
  154. }
  155. }
  156. });
  157. });
  158. /**
  159. * @param obj
  160. * jquery控制input只能输入数字和两位小数
  161. */
  162. function num(obj) {
  163. obj.value = obj.value.replace(/[^\d.]/g, ""); //清除"数字"和"."以外的字符
  164. obj.value = obj.value.replace(/^\./g, ""); //验证第一个字符是数字
  165. obj.value = obj.value.replace(/\.{2,}/g, "."); //只保留第一个, 清除多余的
  166. obj.value = obj.value.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
  167. obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3'); //只能输入两个小数
  168. }
  169. function showBankInfo() {
  170. if (${!returnOnline}){
  171. var obj = document.getElementsByClassName("refundOfflineFee"),
  172. blockEle = $('.refund-details-block');
  173. if(obj){
  174. if(obj[0].checked){
  175. //显示银行信息
  176. blockEle.show();
  177. } else {
  178. blockEle.hide();
  179. }
  180. }
  181. }
  182. }
  183. </script>
  184. </head>
  185. <body>
  186. <input type="hidden" id="product_index" value="${fn:length(order.orderProduct)}">
  187. <input type="hidden" id="ctx" value="${ctx}">
  188. <ul class="nav nav-tabs">
  189. <c:if test="${order.orderType eq 2}">
  190. <li><a href="${ctx}/hehe/new/order/orderList">订单列表</a></li>
  191. </c:if>
  192. <c:if test="${order.orderType ne 2}">
  193. <li><a href="${ctx}/order/orderList">订单列表</a></li>
  194. </c:if>
  195. <li class="active"><a href="${ctx}/bulkpurchase/cmRefundsProduct/applyRefound.rpc?orderID=${order.orderID}&id=${cmReturnedPurchase.id}">申请退货</a></li>
  196. </ul>
  197. <br/>
  198. <form:form id="inputForm" modelAttribute="cmReturnedPurchase" action="${ctx}/bulkpurchase/cmRefundsProduct/saveRefound" method="post"
  199. class="form-horizontal">
  200. <form:hidden path="orderID" value="${order.orderID}"/>
  201. <form:hidden path="userID" value="${order.userID}"/>
  202. <form:hidden path="id" value="${cmReturnedPurchase.id}"/>
  203. <%--订单收款状态:1待收款,2部分收款,3已收款--%>
  204. <input type="hidden" id="receiptStatus" value="${order.receiptStatus}"/>
  205. <%--订单已支付金额(包括余额支付金额)--%>
  206. <input type="hidden" id="paidAmount" value="${empty order.paidAmount? 0:order.paidAmount}"/>
  207. <%--订单经理折扣费用--%>
  208. <input type="hidden" id="discountFee" value="${empty order.discountFee? 0:order.discountFee}"/>
  209. <%--订单退款已退的经理折扣金额--%>
  210. <input type="hidden" id="totalDiscount" value="${empty order.totalDiscount? 0:order.totalDiscount}"/>
  211. <input type="hidden" id="orderStatus" value="${fns:isNotPay(order.status)}">
  212. <input type="hidden" id="isBuFenFaHuo" value="${fns:isBuFenShouKuan(order.status)}">
  213. <sys:message content="${message}"/>
  214. <table id="contentTable" class="table table-striped table-bordered table-condensed">
  215. <tr>
  216. <td colspan="2">
  217. <b>申请信息</b>
  218. </td>
  219. </tr>
  220. <tr>
  221. <td>退款备注</td>
  222. <td>
  223. <textarea id='remarks' name='remarks' rows='4' cols='50' style="width: 709px" maxlength="200" >${cmReturnedPurchase.remarks}</textarea>
  224. </td>
  225. </tr>
  226. <tr>
  227. <td>上传凭证</td>
  228. <td>
  229. <div class="controls upload-content" id="remarkImageBox">
  230. <div class="conList">
  231. <form:hidden id="image1" path="image1" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
  232. <sys:ckfinder input="image1" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
  233. </div>
  234. <div class="conList hide-pic">
  235. <form:hidden id="image2" path="image2" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
  236. <sys:ckfinder input="image2" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
  237. </div>
  238. <div class="conList hide-pic">
  239. <form:hidden id="image3" path="image3" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
  240. <sys:ckfinder input="image3" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
  241. </div>
  242. <div class="conList hide-pic">
  243. <form:hidden id="image4" path="image4" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
  244. <sys:ckfinder input="image4" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
  245. </div>
  246. <div class="conList hide-pic">
  247. <form:hidden id="image5" path="image5" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
  248. <sys:ckfinder input="image5" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
  249. </div>
  250. </div>
  251. <div class="conList upload-tips">
  252. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="red">注意:请上传jpg / png格式的图片,最大不超过5M,最多可上传5张</font>
  253. </div>
  254. </td>
  255. </tr>
  256. </table>
  257. <table id="contentTable" class="table table-striped table-bordered table-condensed">
  258. <tr>
  259. <td><b>退款编号:</b>
  260. ${empty returnedNo?'':(returnedNo)}
  261. </td>
  262. <c:if test="${cmReturnedPurchase.refundType eq 1 or cmReturnedPurchase.refundType eq 2}">
  263. <td><b>退款模式:</b>
  264. <form:select path="refundType" class="input-medium" id="refundType" onchange="changeType()">
  265. <form:option value="1">按商品金额退款</form:option>
  266. <form:option value="2">自定义金额退款</form:option>
  267. </form:select>
  268. </td>
  269. </c:if>
  270. <c:if test="${cmReturnedPurchase.refundType eq 3}">
  271. <td><b>退款模式:</b>
  272. <form:select path="refundType" class="input-medium" id="refundType" onchange="changeType()">
  273. <form:option value="2">自定义金额退款</form:option>
  274. </form:select>
  275. </td>
  276. </c:if>
  277. <td><b>申请时间:</b>
  278. ${returnTime}
  279. </td>
  280. <c:if test="${cmReturnedPurchase.refundType eq 1}">
  281. <td id="spt"><b>申请金额:</b>
  282. <span class="refundFee"><fmt:formatNumber value="${empty cmReturnedPurchase.refundFee?'0.00':(cmReturnedPurchase.refundFee)}" pattern="#0.00"/></span>元
  283. </td>
  284. <td id="zdy" hidden><b>申请金额:</b>
  285. <from:input id="freeRefundFee" path="freeRefundFee" onkeyup="num(this)" placeholder="¥0.00" value="${empty cmReturnedPurchase.freeRefundFee?'':(cmReturnedPurchase.freeRefundFee)}"></from:input>
  286. </td>
  287. </c:if>
  288. <c:if test="${cmReturnedPurchase.refundType eq 2 or cmReturnedPurchase.refundType eq 3}">
  289. <td id="spt" hidden><b>申请金额:</b>
  290. <span class="refundFee"><fmt:formatNumber value="${empty cmReturnedPurchase.refundFee?'0.00':(cmReturnedPurchase.refundFee)}" pattern="#0.00"/></span>元
  291. </td>
  292. <td id="zdy"><b>申请金额:</b>
  293. <from:input id="freeRefundFee" path="freeRefundFee" onkeyup="num(this)" placeholder="¥0.00" value="${empty cmReturnedPurchase.freeRefundFee?'':(cmReturnedPurchase.freeRefundFee)}"></from:input>
  294. </td>
  295. </c:if>
  296. <td><b>退款状态:</b>
  297. <c:if test="${empty status}">
  298. 待申请
  299. </c:if>
  300. <c:if test="${ not empty status}">
  301. <c:if test="${status eq 1}">
  302. 待审核
  303. </c:if>
  304. <c:if test="${status eq 2}">
  305. 审核通过
  306. </c:if>
  307. <c:if test="${status eq 3}">
  308. 审核不通过
  309. </c:if>
  310. </c:if>
  311. </td>
  312. </tr>
  313. <tr>
  314. <td colspan="4">
  315. <b>退款方式:</b>
  316. <c:if test="${order.receiptStatus eq 1}">无支付无退款</c:if>
  317. <c:if test="${order.receiptStatus ne 1}">
  318. <c:if test="${order.productCode ne 1}">
  319. <c:if test="${returnOnline}">
  320. <input class="check-item-review refundOnlineFee" type="radio" checked name="returnedWay" value='2'/>
  321. 线上退回
  322. </c:if>
  323. <c:if test="${!returnOnline}">
  324. <c:if test="${cmReturnedPurchase.refundOfflineFee>0}">
  325. <input class="check-item-review refundOfflineFee" checked type="checkbox" onclick="showBankInfo()"/>
  326. </c:if>
  327. <c:if test="${empty cmReturnedPurchase.refundOfflineFee or cmReturnedPurchase.refundOfflineFee eq 0}">
  328. <input class="check-item-review refundOfflineFee" type="checkbox" onclick="showBankInfo()"/>
  329. </c:if>
  330. 线下转账
  331. <from:input path="refundOfflineFee" onkeyup="num(this)" placeholder="¥0.00" value="${empty cmReturnedPurchase.refundOfflineFee?'':(cmReturnedPurchase.refundOfflineFee)}"></from:input>
  332. <c:if test="${order.rechargeGoods ne 1 && order.rechargeGoods ne 2 && order.organizeID != 4}">
  333. <c:if test="${cmReturnedPurchase.refundBalanceFee>0}">
  334. <input class="check-item-review refundBalanceFee" checked type="checkbox"/>
  335. </c:if>
  336. <c:if test="${empty cmReturnedPurchase.refundBalanceFee or cmReturnedPurchase.refundBalanceFee eq 0}">
  337. <input class="check-item-review refundBalanceFee" type="checkbox"/>
  338. </c:if>
  339. 账户余额
  340. <from:input path="refundBalanceFee" onkeyup="num(this)" placeholder="¥0.00"
  341. value="${empty cmReturnedPurchase.refundBalanceFee?'':(cmReturnedPurchase.refundBalanceFee)}"></from:input>
  342. </c:if>
  343. </c:if>
  344. </c:if>
  345. <c:if test="${order.productCode eq 1}">
  346. <c:if test="${cmReturnedPurchase.refundOfflineFee>0}">
  347. <input class="check-item-review refundOfflineFee" checked type="checkbox" onclick="showBankInfo()"/>
  348. </c:if>
  349. <c:if test="${empty cmReturnedPurchase.refundOfflineFee or cmReturnedPurchase.refundOfflineFee eq 0}">
  350. <input class="check-item-review refundOfflineFee" type="checkbox" onclick="showBankInfo()"/>
  351. </c:if>
  352. 线下转账
  353. <from:input path="refundOfflineFee" onkeyup="num(this)" placeholder="¥0.00" value="${empty cmReturnedPurchase.refundOfflineFee?'':(cmReturnedPurchase.refundOfflineFee)}"></from:input>
  354. <c:if test="${order.rechargeGoods ne 1 && order.rechargeGoods ne 2}">
  355. <c:if test="${cmReturnedPurchase.refundBalanceFee>0}">
  356. <input class="check-item-review refundBalanceFee" checked type="checkbox"/>
  357. </c:if>
  358. <c:if test="${empty cmReturnedPurchase.refundBalanceFee or cmReturnedPurchase.refundBalanceFee eq 0}">
  359. <input class="check-item-review refundBalanceFee" type="checkbox"/>
  360. </c:if>
  361. 账户余额
  362. <from:input path="refundBalanceFee" onkeyup="num(this)" placeholder="¥0.00" value="${empty cmReturnedPurchase.refundBalanceFee?'':(cmReturnedPurchase.refundBalanceFee)}"></from:input>
  363. </c:if>
  364. </c:if>
  365. <br>
  366. <div class="refund-details-block" style=" white-space: nowrap;">
  367. <font color="red">*</font>开户名:
  368. <from:input path="bankAccountName" value="${empty cmReturnedPurchase.bankAccountName?'':(cmReturnedPurchase.bankAccountName)}"></from:input>
  369. <font color="red">*</font>账号:
  370. <from:input path="bankAccountNo" value="${empty cmReturnedPurchase.bankAccountNo?'':(cmReturnedPurchase.bankAccountNo)}"></from:input>
  371. <%--<br>&nbsp;&nbsp;&nbsp;&nbsp;--%>
  372. <font color="red">*</font>开户行:
  373. <from:input path="openBank" value="${empty cmReturnedPurchase.openBank?'':(cmReturnedPurchase.openBank)}"></from:input>
  374. <font color="red">*</font>账户类型:
  375. <select name="bankAccountType" id="bankAccountType" style="width: 100px">
  376. <option value="" selected>请选择</option>
  377. <option value="1" <c:if test="${not empty cmReturnedPurchase.bankAccountType && cmReturnedPurchase.bankAccountType eq 1}"> selected="selected"</c:if>>公账</option>
  378. <option value="2" <c:if test="${not empty cmReturnedPurchase.bankAccountType && cmReturnedPurchase.bankAccountType eq 2}"> selected="selected"</c:if>>私账</option>
  379. </select>
  380. </div>
  381. </c:if>
  382. </td>
  383. </tr>
  384. </table>
  385. <table id="orderTable" class="table table-striped table-bordered table-condensed">
  386. <thead>
  387. </thead>
  388. <tr>
  389. <td>
  390. 订单编号(ID):${order.orderNo}(${order.orderID})
  391. </td>
  392. <td>
  393. 下单时间:${order.orderTime}
  394. </td>
  395. <c:if test="${order.orderType eq 2}">
  396. <td>
  397. 订单类型:${order.collageFlag eq 1?'拼团订单':'独立订单'}
  398. </td>
  399. </c:if>
  400. <td colspan="2">
  401. 订单状态:
  402. <c:if test="${order.status eq 11 || order.status eq 12 || order.status eq 13 ||order.status eq 21 ||order.status eq 22 ||
  403. order.status eq 23 || order.status eq 31 ||order.status eq 32 ||order.status eq 33}">交易中(${fns:getDictLabel(order.status,"order_detail_status","" )})</c:if>
  404. <c:if test="${order.status eq 0 || order.status eq 4 || order.status eq 5 || order.status eq 6 || order.status eq 7}">${fns:getDictLabel(order.status,"order_detail_status","" )}</c:if>
  405. </td>
  406. </tr>
  407. <tr>
  408. <td>
  409. 订单金额:¥<fmt:formatNumber type="number" value="${order.payTotalFee}" pattern="0.00" maxFractionDigits="2" />
  410. <c:if test="${not empty order.couponOrderRecord}">
  411. <c:if test="${order.couponOrderRecord.couponType eq 0}">
  412. <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(活动券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
  413. </c:if>
  414. <c:if test="${order.couponOrderRecord.couponType eq 1}">
  415. <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(品类券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
  416. </c:if>
  417. <c:if test="${order.couponOrderRecord.couponType eq 2}">
  418. <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(用户专享券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
  419. </c:if>
  420. <c:if test="${order.couponOrderRecord.couponType eq 3}">
  421. <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(店铺券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
  422. </c:if>
  423. <c:if test="${order.couponOrderRecord.couponType eq 4}">
  424. <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(新用户券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
  425. </c:if>
  426. </c:if>
  427. <c:if test="${not empty order.heheCouponRecord}">
  428. <a href="${ctx}/hehe/cmHeheCoupon/receiveDetails?userId=${order.userID}">
  429. <font color="red">
  430. (${order.heheCouponRecord.couponType eq 1 ? '活动':order.heheCouponRecord.couponType eq 2?'专享':order.heheCouponRecord.couponType eq 3?'新人':order.heheCouponRecord.couponType eq 4?'好友分享':'好友消费'}券抵扣¥${order.heheCouponRecord.couponAmount},满${order.heheCouponRecord.touchPrice}减${order.heheCouponRecord.couponAmount})
  431. </font>
  432. </a>
  433. </c:if>
  434. <c:if test="${order.reductionAmount > 0}">
  435. (分享减免¥${order.reductionAmount},满${order.reductionTouchPrice}减${order.reductionAmount})
  436. </c:if>
  437. </td>
  438. <td>
  439. 应收总额:¥<fmt:formatNumber type="number" value="${order.payableAmount}" pattern="0.00"
  440. maxFractionDigits="2"/>
  441. <c:if test="${order.organizeID != 4}">
  442. (账户余额抵扣:${order.balancePayFee})
  443. </c:if>
  444. <a href="${ctx}/order/cmDiscernReceipt/detail?id=${lastReceiptDetailId}"
  445. style="text-decoration: underline;margin-left: 20px">查看订单收款情况</a>
  446. </td>
  447. <c:if test="${order.organizeID != 4}">
  448. <td>
  449. 经理折扣:¥<fmt:formatNumber type="number" value="${order.discountFee}" pattern="0.00"
  450. maxFractionDigits="2"/>
  451. </td>
  452. </c:if>
  453. <td>
  454. 运费:
  455. <c:if test="${order.organizeID != 4}">
  456. <c:if test="${order.freePostFlag == 0}">
  457. 包邮
  458. </c:if>
  459. <c:if test="${order.freePostFlag == -1}">
  460. 到付
  461. </c:if>
  462. <c:if test="${order.freePostFlag == -2}">
  463. 仪器到付-产品包邮
  464. </c:if>
  465. <c:if test="${order.freePostFlag != -1 && order.freePostFlag != 0 && order.freePostFlag != -2}">
  466. <fmt:formatNumber value="${order.freight}" type="currency"/>
  467. </c:if>
  468. <c:if test="${order.userBeans > 0}">
  469. <font color="red">(采美豆抵用:${order.userBeans})</font>
  470. </c:if>
  471. </c:if>
  472. <c:if test="${order.organizeID == 4}">
  473. ${postageInfo}
  474. </c:if>
  475. </td>
  476. </tr>
  477. <tr>
  478. <td>
  479. 收款状态:
  480. <c:if test="${order.receiptStatus == 1}">
  481. <font color="red">待收款</font>
  482. </c:if>
  483. <c:if test="${order.receiptStatus == 2}">
  484. <font color="#ff8c00">部分收款</font>
  485. </c:if>
  486. <c:if test="${order.receiptStatus == 3}">
  487. <font color="green">已收款</font>
  488. </c:if></td>
  489. </td>
  490. <c:if test="${order.orderType eq 2}">
  491. <td>
  492. 拼团状态:
  493. <c:choose>
  494. <c:when test="${order.collageFlag eq 1 && (order.status eq 31 || order.status eq 32 || order.status eq 33)}">
  495. <font color="${order.collageStatus eq 1?'#00CC66':(order.collageStatus eq 2?'red':'')}">
  496. ${order.collageStatus eq 1?'拼团中':(order.collageStatus eq 2?'已拼成':'-')}
  497. </font>
  498. </c:when>
  499. <c:otherwise>
  500. -
  501. </c:otherwise>
  502. </c:choose>
  503. </td>
  504. </c:if>
  505. <td>
  506. 发货状态:
  507. <c:if test="${order.sendOutStatus == 1}">
  508. <font color="red">待发货</font>
  509. </c:if>
  510. <c:if test="${order.sendOutStatus == 2}">
  511. <font color="#ff8c00">部分发货</font>
  512. </c:if>
  513. <c:if test="${order.sendOutStatus == 3}">
  514. <font color="green">已发货</font>
  515. </c:if></td>
  516. </td>
  517. <td>
  518. 付款状态:
  519. <c:if test="${order.payStatus == 1}">
  520. <font color="red">待付款</font>
  521. </c:if>
  522. <c:if test="${order.payStatus == 2}">
  523. <font color="#ff8c00">部分付款</font>
  524. </c:if>
  525. <c:if test="${order.payStatus == 3}">
  526. <font color="green">已付款</font>
  527. </c:if></td>
  528. </td>
  529. <td>
  530. 退款状态:
  531. <c:if test="${empty order.refundType}">
  532. <font>无退款</font>
  533. </c:if>
  534. <c:if test="${order.refundType == 1}">
  535. <font>部分退款</font>
  536. </c:if>
  537. <c:if test="${order.refundType == 2}">
  538. <font>已退款</font>
  539. </c:if></td>
  540. </td>
  541. </tr>
  542. <tr>
  543. <td>
  544. 机构:${order.buyer}<c:if test="${order.organizeID == 3}"></c:if>
  545. </td>
  546. <td>
  547. 收货人:${order.bpOrderUserinfo.shouHuoRen}(${order.bpOrderUserinfo.mobile})
  548. </td>
  549. <td colspan="2">
  550. 地址:${order.bpOrderUserinfo.province}${order.bpOrderUserinfo.city}${order.bpOrderUserinfo.town}${order.bpOrderUserinfo.address}
  551. </td>
  552. </tr>
  553. </table>
  554. <c:forEach items="${order.newShopOrders}" var="shopOrder" varStatus="status">
  555. <c:if test="${!shopOrder.defaultStatus}">
  556. <table id="shopOrderTable${status.index}" class="table shopOrderTable table-striped table-bordered table-condensed">
  557. <thead></thead>
  558. <tr>
  559. <td style="width: 300px;">
  560. 子订单号(ID):${shopOrder.shopOrderNo}(${shopOrder.shopOrderID})
  561. </td>
  562. <td style="width: 275px;">
  563. 子订单金额:¥<fmt:formatNumber type="number" value="${shopOrder.totalAmount}" pattern="0.00" maxFractionDigits="2" />
  564. </td>
  565. <td>
  566. 收款状态:${fns:getDictLabel(shopOrder.shopReceiptStatus,'receiptStatus' ,'' )}
  567. </td>
  568. <td>
  569. 发货状态:${fns:getDictLabel(shopOrder.sendOutStatus,'sendOutStatus' ,'' )}
  570. </td>
  571. <td>
  572. 付款状态:${fns:getDictLabel(shopOrder.payStatus,'payStatus' ,'' )}
  573. </td>
  574. <td>
  575. 供应商:${shopOrder.shopName} &nbsp;&nbsp;
  576. <c:if test="${not empty shopOrder.commercialCode}">
  577. <font color="red" class="businessNumber">(商户号:&nbsp;&nbsp;${shopOrder.commercialCode})</font>
  578. </c:if>
  579. </td>
  580. </tr>
  581. <c:if test="${order.onlinePayFlag eq 0}">
  582. <tr>
  583. <td>
  584. 商品总额:¥<fmt:formatNumber type="number" value="${shopOrder.needPayAmount}" pattern="0.00" maxFractionDigits="2" />
  585. </td>
  586. <td>
  587. 优惠:¥<fmt:formatNumber type="number" value="${shopOrder.eachDiscount}" pattern="0.00" maxFractionDigits="2" />
  588. </td>
  589. <td>
  590. 应付金额:¥<fmt:formatNumber type="number" value="${shopOrder.realPay}" pattern="0.00" maxFractionDigits="2" />
  591. </td>
  592. <td>
  593. 已付金额:¥<fmt:formatNumber type="number" value="${shopOrder.receiptAmount}" pattern="0.00" maxFractionDigits="2" />
  594. </td>
  595. <td colspan="2">
  596. 待付金额:¥<fmt:formatNumber type="number" value="${shopOrder.restAmount}" pattern="0.00" maxFractionDigits="2" />
  597. </td>
  598. </tr>
  599. </c:if>
  600. <c:forEach items="${shopOrder.newOrderProducts}" var="newOrderProduct" varStatus="productStatus">
  601. <tr>
  602. <td colspan="5">
  603. <table id="newOrderProductTable" class="table table-striped table-bordered table-condensed">
  604. <tr>
  605. <td rowspan="4" style="width: 295px;height: 125px">
  606. <img style="width: 100px;height: 100px" src="${newOrderProduct.image}">
  607. <font title="${newOrderProduct.name}">${fns:abbr(newOrderProduct.name,30)}</font>
  608. <c:if test="${newOrderProduct.returnGoodsStutas==2}">
  609. <label style="color: red">(不能退货)</label>
  610. </c:if>
  611. </td>
  612. <td style="width: 275px;">
  613. 单价:¥<span class="price"><fmt:formatNumber type="number"
  614. value="${newOrderProduct.price}"
  615. pattern="0.00"
  616. maxFractionDigits="2"/></span>
  617. <c:if test="${order.collageFlag eq 1}"><font color="red">(拼团价)</font></c:if>
  618. </td>
  619. <c:if test="${order.organizeID != 4}">
  620. <td >
  621. 折扣 :${newOrderProduct.discount}%
  622. </td>
  623. <td >
  624. 折后单价 :¥<span class="discountPrice"><fmt:formatNumber type="number" value="${newOrderProduct.discountPrice}" pattern="0.00" maxFractionDigits="2" /></span>
  625. </td>
  626. </c:if>
  627. <td >
  628. 数量(赠品):${newOrderProduct.num}(${newOrderProduct.presentNum})
  629. </td>
  630. </tr>
  631. <tr>
  632. <td>
  633. 规格:${newOrderProduct.unit}
  634. </td>
  635. <c:if test="${order.organizeID != 4}">
  636. <td style="width: 275px;">
  637. 税率:${newOrderProduct.taxRate}%
  638. </td>
  639. <td>
  640. 税费:¥<span class="addedValueTax"><fmt:formatNumber type="number" value="${newOrderProduct.addedValueTax}" pattern="0.00" maxFractionDigits="2" /></span>
  641. </td>
  642. </c:if>
  643. <td colspan="2">
  644. 总额:¥<fmt:formatNumber type="number" value="${newOrderProduct.shouldPayFee}" pattern="0.00" maxFractionDigits="2" />
  645. </td>
  646. </tr>
  647. <tr>
  648. <%--已发货=商品数量-未出库数量--%>
  649. <td><font color="red">已发货:<span id="shipped${status.index}${productStatus.index}">${newOrderProduct.num + newOrderProduct.presentNum - newOrderProduct.notOutStore}</span></font></td>
  650. <input type="hidden" id="returning${status.index}${productStatus.index}" value="${newOrderProduct.returningPurchaseProductNum}"/>
  651. <%--已退货=所有退货数量总和--%>
  652. <td><font color="red"><span>已退货:<span id="returned${status.index}${productStatus.index}">${newOrderProduct.returnedPurchaseProductNum}</span></span></font></td>
  653. <td colspan="4"><font color="red"><span>本次退货:<input ${newOrderProduct.presentNum>0 or (order.onlinePayFlag eq 0 and shopOrder.shopID eq 998)?"readonly":""} presentNum="${newOrderProduct.presentNum}" id="applicationReturnedNum${status.index}${productStatus.index}" class="refundGoodsInput shopOrderInput" name="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].applicationReturnedNum" value="${(order.onlinePayFlag eq 0 and shopOrder.shopID eq 998)?0:(newOrderProduct.num + newOrderProduct.presentNum - newOrderProduct.notOutStore -newOrderProduct.returnedPurchaseProductNum) }" oninput="this.value=this.value.replace(/\D/g,'').replace(/^0+(?=\d)/,1)" class="input tuihuo" type="text" onchange="setApplicationReturnedNum(${status.index},${productStatus.index})"></span></font></td>
  654. </tr>
  655. <tr>
  656. <%--待发货=未出库数量-取消数量--%>
  657. <td><font color="red">待发货:<span id="toBeShipped${status.index}${productStatus.index}">${newOrderProduct.notOutStore - newOrderProduct.cancelProductNum}</span></font></td>
  658. <%--已取消数量=所有已取消数量总和--%>
  659. <td><font color="red">已取消:<span id="toBeShipped${status.index}${productStatus.index}">${newOrderProduct.cancelProductNum}</span></font></td>
  660. <td colspan="4"><font color="red"><span>本次取消:<input ${newOrderProduct.presentNum>0 or (order.onlinePayFlag eq 0 and shopOrder.shopID eq 998)?"readonly":""} id="applicationCancelNum${status.index}${productStatus.index}" class="cancelGoodsInput shopOrderInput" name="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].applicationCancelNum" value="${(order.onlinePayFlag eq 0 and shopOrder.shopID eq 998)?0:(newOrderProduct.notOutStore - newOrderProduct.cancelProductNum)}" oninput="this.value=this.value.replace(/\D/g,'').replace(/^0+(?=\d)/,1)" class="input cancel" type="text" onchange="setApplicationCancelNum(${status.index},${productStatus.index})"></span></font></td>
  661. <form:hidden path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].shopOrderID" value="${newOrderProduct.shopOrderID}"/>
  662. <form:hidden path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].productID" value="${newOrderProduct.productID}"/>
  663. <form:hidden path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].orderProductID" value="${newOrderProduct.orderProductID}"/>
  664. <form:hidden path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].shopID" value="${newOrderProduct.shopID}"/>
  665. </tr>
  666. </table>
  667. </td>
  668. </tr>
  669. </c:forEach>
  670. </table>
  671. </c:if>
  672. <%--默认状态代码--%>
  673. <c:if test="${shopOrder.defaultStatus}">
  674. <table id="shopOrderTable${status.index}" class="table shopOrderTable table-striped table-bordered table-condensed">
  675. <thead></thead>
  676. <tr>
  677. <td style="width: 300px;">
  678. 子订单号(ID):${shopOrder.shopOrderNo}(${shopOrder.shopOrderID})
  679. </td>
  680. <td style="width: 275px;">
  681. 子订单金额:¥<fmt:formatNumber type="number" value="${shopOrder.totalAmount}" pattern="0.00" maxFractionDigits="2" />
  682. </td>
  683. <td>
  684. 发货状态:${fns:getDictLabel(shopOrder.sendOutStatus,'sendOutStatus' ,'' )}
  685. </td>
  686. <td>
  687. 付款状态:${fns:getDictLabel(shopOrder.payStatus,'payStatus' ,'' )}
  688. </td>
  689. <td>
  690. 供应商:${shopOrder.shopName}
  691. </td>
  692. </tr>
  693. <c:forEach items="${shopOrder.newOrderProducts}" var="newOrderProduct" varStatus="productStatus">
  694. <tr>
  695. <td colspan="5">
  696. <table id="newOrderProductTable" class="table table-striped table-bordered table-condensed">
  697. <tr>
  698. <td rowspan="4" style="width: 295px;height: 125px">
  699. <img style="width: 100px;height: 100px" src="${newOrderProduct.image}">
  700. <font title="${newOrderProduct.name}">${fns:abbr(newOrderProduct.name,30)}</font>
  701. </td>
  702. <td style="width: 275px;">
  703. 单价:¥<span class="price"><fmt:formatNumber type="number"
  704. value="${newOrderProduct.price}"
  705. pattern="0.00"
  706. maxFractionDigits="2"/></span>
  707. </td>
  708. <c:if test="${order.organizeID != 4}">
  709. <td>
  710. 折扣 :${newOrderProduct.discount}%
  711. </td>
  712. <td>
  713. 折后单价 :¥<span class="discountPrice"><fmt:formatNumber type="number" value="${newOrderProduct.discountPrice}" pattern="0.00" maxFractionDigits="2" /></span>
  714. </td>
  715. </c:if>
  716. <td>
  717. 数量(赠品):${newOrderProduct.num}(${newOrderProduct.presentNum})
  718. </td>
  719. </tr>
  720. <tr>
  721. <c:if test="${order.organizeID != 4}">
  722. <td style="width: 275px;">
  723. 税率:${newOrderProduct.taxRate}%
  724. </td>
  725. <td>
  726. 税费:¥<span class="addedValueTax"><fmt:formatNumber type="number" value="${newOrderProduct.addedValueTax}" pattern="0.00" maxFractionDigits="2" /></span>
  727. </td>
  728. </c:if>
  729. <td colspan="2">
  730. 总额:¥<fmt:formatNumber type="number" value="${newOrderProduct.shouldPayFee}" pattern="0.00" maxFractionDigits="2" />
  731. </td>
  732. </tr>
  733. <tr>
  734. <td><font color="red">已发货:<span id="shipped${status.index}${productStatus.index}">${newOrderProduct.num + newOrderProduct.presentNum - newOrderProduct.notOutStore}</span></font></td>
  735. <input type="hidden" id="returning${status.index}${productStatus.index}" value="${newOrderProduct.returningPurchaseProductNum}"/>
  736. <td><font color="red"><span>已退货:<span id="returned${status.index}${productStatus.index}">${newOrderProduct.returnedPurchaseProductNum}</span></span></font></td>
  737. <td colspan="4"><font color="red"><span>本次退货:<input ${newOrderProduct.presentNum>0 or (order.onlinePayFlag eq 0 and shopOrder.shopID eq 998)?"readonly":""} presentNum="${newOrderProduct.presentNum}" id="applicationReturnedNum${status.index}${productStatus.index}" class="refundGoodsInput1 shopOrderInput1 refundGoodsInput shopOrderInput" name="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].applicationReturnedNum" value="${(order.onlinePayFlag eq 0 and shopOrder.shopID eq 998)?0:(newOrderProduct.num + newOrderProduct.presentNum - newOrderProduct.notOutStore - newOrderProduct.returnedPurchaseProductNum)}" oninput="this.value=this.value.replace(/\D/g,'').replace(/^0+(?=\d)/,1)" class="input tuihuo" type="text" onchange="setApplicationReturnedNum(${status.index},${productStatus.index})"></span></font></td>
  738. </tr>
  739. <tr>
  740. <td><font color="red">待发货:<span id="toBeShipped${status.index}${productStatus.index}">${newOrderProduct.notOutStore - newOrderProduct.cancelProductNum}</span></font></td>
  741. <td><font color="red">已取消:<span id="toBeShipped${status.index}${productStatus.index}">${newOrderProduct.cancelProductNum}</span></font></td>
  742. <td colspan="4"><font color="red"><span>本次取消:<input ${newOrderProduct.presentNum>0 or (order.onlinfePayFlag eq 0 and shopOrder.shopID eq 998)?"readonly":""} id="applicationCancelNum${status.index}${productStatus.index}" class="cancelGoodsInput shopOrderInput" name="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].applicationCancelNum" value="${(order.onlinePayFlag eq 0 and shopOrder.shopID eq 998)?0:(newOrderProduct.notOutStore - newOrderProduct.cancelProductNum)}" oninput="this.value=this.value.replace(/\D/g,'').replace(/^0+(?=\d)/,1)" class="input cancel" type="text" onchange="setApplicationCancelNum(${status.index},${productStatus.index})"></span></font></td>
  743. <form:hidden path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].shopOrderID" value="${newOrderProduct.shopOrderID}"/>
  744. <form:hidden path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].productID" value="${newOrderProduct.productID}"/>
  745. <form:hidden path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].orderProductID" value="${newOrderProduct.orderProductID}"/>
  746. <form:hidden path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].shopID" value="${newOrderProduct.shopID}"/>
  747. </tr>
  748. </table>
  749. </td>
  750. </tr>
  751. </c:forEach>
  752. </table>
  753. </c:if>
  754. </table>
  755. <%--默认状态代码--%>
  756. <c:if test="${shopOrder.defaultStatus}">
  757. <table id="shopOrderTable${status.index}"
  758. class="table shopOrderTable table-striped table-bordered table-condensed">
  759. <thead></thead>
  760. <tr>
  761. <td style="width: 300px;">
  762. 子订单号(ID):${shopOrder.shopOrderNo}(${shopOrder.shopOrderID})
  763. </td>
  764. <td style="width: 275px;">
  765. 子订单金额:¥<fmt:formatNumber type="number" value="${shopOrder.totalAmount}" pattern="0.00"
  766. maxFractionDigits="2"/>
  767. </td>
  768. <td>
  769. 发货状态:${fns:getDictLabel(shopOrder.sendOutStatus,'sendOutStatus' ,'' )}
  770. </td>
  771. <td>
  772. 付款状态:${fns:getDictLabel(shopOrder.payStatus,'payStatus' ,'' )}
  773. </td>
  774. <td>
  775. 供应商:${shopOrder.shopName}
  776. </td>
  777. </tr>
  778. <c:forEach items="${shopOrder.newOrderProducts}" var="newOrderProduct" varStatus="productStatus">
  779. <tr>
  780. <td colspan="5">
  781. <table id="newOrderProductTable" class="table table-striped table-bordered table-condensed">
  782. <tr>
  783. <td rowspan="4" style="width: 295px;height: 125px">
  784. <img style="width: 100px;height: 100px" src="${newOrderProduct.image}">
  785. <font title="${newOrderProduct.name}">${fns:abbr(newOrderProduct.name,30)}</font>
  786. </td>
  787. <td style="width: 275px;">
  788. 单价:¥<span class="price"><fmt:formatNumber type="number"
  789. value="${newOrderProduct.price}"
  790. pattern="0.00"
  791. maxFractionDigits="2"/></span>
  792. </td>
  793. <td>
  794. 折扣 :${newOrderProduct.discount}%
  795. </td>
  796. <td>
  797. 折后单价 :¥<span class="discountPrice"><fmt:formatNumber type="number"
  798. value="${newOrderProduct.discountPrice}"
  799. pattern="0.00"
  800. maxFractionDigits="2"/></span>
  801. </td>
  802. <td>
  803. 数量(赠品):${newOrderProduct.num}(${newOrderProduct.presentNum})
  804. </td>
  805. </tr>
  806. <tr>
  807. <td style="width: 275px;">
  808. 税率:${newOrderProduct.taxRate}%
  809. </td>
  810. <td>
  811. 税费:¥<span class="addedValueTax"><fmt:formatNumber type="number"
  812. value="${newOrderProduct.addedValueTax}"
  813. pattern="0.00"
  814. maxFractionDigits="2"/></span>
  815. </td>
  816. <td colspan="2">
  817. 总额:¥<fmt:formatNumber type="number" value="${newOrderProduct.shouldPayFee}"
  818. pattern="0.00" maxFractionDigits="2"/>
  819. </td>
  820. </tr>
  821. <tr>
  822. <td><font color="red">已发货:<span
  823. id="shipped${status.index}${productStatus.index}">${newOrderProduct.num + newOrderProduct.presentNum - newOrderProduct.notOutStore}</span></font>
  824. </td>
  825. <input type="hidden" id="returning${status.index}${productStatus.index}"
  826. value="${newOrderProduct.returningPurchaseProductNum}"/>
  827. <td><font color="red"><span>已退货:<span
  828. id="returned${status.index}${productStatus.index}">${newOrderProduct.returnedPurchaseProductNum}</span></span></font>
  829. </td>
  830. <td colspan="4"><font
  831. color="red"><span>本次退货:<input ${newOrderProduct.presentNum>0 or (order.onlinePayFlag eq 0 and shopOrder.shopID eq 998)?"readonly":""}
  832. presentNum="${newOrderProduct.presentNum}"
  833. id="applicationReturnedNum${status.index}${productStatus.index}"
  834. class="refundGoodsInput1 shopOrderInput1 refundGoodsInput shopOrderInput"
  835. name="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].applicationReturnedNum"
  836. value="${(order.onlinePayFlag eq 0 and shopOrder.shopID eq 998)?0:(newOrderProduct.num + newOrderProduct.presentNum - newOrderProduct.notOutStore - newOrderProduct.returnedPurchaseProductNum)}"
  837. oninput="this.value=this.value.replace(/\D/g,'').replace(/^0+(?=\d)/,1)"
  838. class="input tuihuo" type="text"
  839. onchange="setApplicationReturnedNum(${status.index},${productStatus.index})"></span></font>
  840. </td>
  841. </tr>
  842. <tr>
  843. <td><font color="red">待发货:<span
  844. id="toBeShipped${status.index}${productStatus.index}">${newOrderProduct.notOutStore - newOrderProduct.cancelProductNum}</span></font>
  845. </td>
  846. <td><font color="red">已取消:<span
  847. id="toBeShipped${status.index}${productStatus.index}">${newOrderProduct.cancelProductNum}</span></font>
  848. </td>
  849. <td colspan="4"><font
  850. color="red"><span>本次取消:<input ${newOrderProduct.presentNum>0 or (order.onlinePayFlag eq 0 and shopOrder.shopID eq 998)?"readonly":""}
  851. id="applicationCancelNum${status.index}${productStatus.index}"
  852. class="cancelGoodsInput shopOrderInput"
  853. name="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].applicationCancelNum"
  854. value="${(order.onlinePayFlag eq 0 and shopOrder.shopID eq 998)?0:(newOrderProduct.notOutStore - newOrderProduct.cancelProductNum)}"
  855. oninput="this.value=this.value.replace(/\D/g,'').replace(/^0+(?=\d)/,1)"
  856. class="input cancel" type="text"
  857. onchange="setApplicationCancelNum(${status.index},${productStatus.index})"></span></font>
  858. </td>
  859. <form:hidden
  860. path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].shopOrderID"
  861. value="${newOrderProduct.shopOrderID}"/>
  862. <form:hidden
  863. path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].productID"
  864. value="${newOrderProduct.productID}"/>
  865. <form:hidden
  866. path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].orderProductID"
  867. value="${newOrderProduct.orderProductID}"/>
  868. <form:hidden
  869. path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].shopID"
  870. value="${newOrderProduct.shopID}"/>
  871. </tr>
  872. </table>
  873. </td>
  874. </tr>
  875. </c:forEach>
  876. </table>
  877. </c:if>
  878. </c:forEach>
  879. <div class="form-actions">
  880. <input id="btnSubmit" class="btn btn-primary" type="submit" value="申 请"/>&nbsp;
  881. <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
  882. </div>
  883. </form:form>
  884. <script type="text/javascript" src="${ctxStatic}/modules/bulkpurchase/loadAddress.js"></script>
  885. <script type="text/javascript" src="${ctxStatic}/modules/bulkpurchase/orderForm.js"></script>
  886. <script type="text/javascript" src="${ctxStatic}/modules/bulkpurchase/stages.js"></script>
  887. <script>
  888. function changeType(){
  889. var refundType = $("#refundType").val();
  890. if(1==refundType){
  891. var orderStatus = $("#orderStatus").val();
  892. var isBuFenFaHuo = $("#isBuFenFaHuo").val();
  893. if(isBuFenFaHuo == "true"){
  894. $(".shopOrderInput").attr("readonly",true);
  895. /*$(".shopOrderInput1").attr("readonly",false);*///设置邮费的可修改
  896. };
  897. //有促销商品订单不可修改
  898. if (${isPromotions}){
  899. $(".shopOrderInput").attr("readonly",true);
  900. }
  901. //线上全部付款订单不可修改
  902. if (${order.receiptStatus == 3 && cmDiscernReceipt.payWay eq 1}){
  903. $(".shopOrderInput").attr("readonly",true);
  904. }
  905. // 有优惠不可修改,只能全退
  906. if (${order.discountAmount > 0 and order.onlinePayFlag eq 0}){
  907. $(".shopOrderInput").attr("readonly",true);
  908. }
  909. //充值订单不可修改
  910. if (${order.rechargeGoods != null && (order.rechargeGoods eq 1 || order.rechargeGoods eq 2)}){
  911. $(".shopOrderInput").attr("readonly",true);
  912. }
  913. $("#zdy").hide();
  914. $("#spt").show();
  915. }
  916. if(2==refundType || 3==refundType) {
  917. $("input[readonly='readonly']").removeProp("readonly");
  918. $("#spt").hide();
  919. $("#zdy").show();
  920. }
  921. }
  922. function showBankInfo() {
  923. if (${!returnOnline}){
  924. var obj = document.getElementsByClassName("refundOfflineFee"),
  925. blockEle = $('.refund-details-block');
  926. if(obj){
  927. if(obj[0].checked){
  928. //显示银行信息
  929. blockEle.show();
  930. } else {
  931. blockEle.hide();
  932. }
  933. }
  934. }
  935. }
  936. $(function () {
  937. var orderStatus = $("#orderStatus").val();
  938. var isBuFenFaHuo = $("#isBuFenFaHuo").val();
  939. var refundType = $("#refundType").val();
  940. if(isBuFenFaHuo == "true"){
  941. $(".shopOrderInput").attr("readonly",true);
  942. /*$(".shopOrderInput1").attr("readonly",false);*///设置邮费的可修改
  943. };
  944. //有促销商品订单不可修改
  945. if (${isPromotions}){
  946. $(".shopOrderInput").attr("readonly",true);
  947. }
  948. //线上全部付款订单不可修改
  949. if (${order.receiptStatus == 3 && cmDiscernReceipt.payWay eq 1}){
  950. $(".shopOrderInput").attr("readonly",true);
  951. }
  952. // 有优惠不可修改,只能全退
  953. if (${order.discountAmount > 0 and order.onlinePayFlag eq 0}){
  954. $(".shopOrderInput").attr("readonly",true);
  955. }
  956. if(orderStatus == "true"){
  957. $("#returnWayDiv").html("");
  958. $("#returnWayDiv").html("未支付无退款");
  959. };
  960. //充值订单不可修改
  961. if (${order.rechargeGoods != null && (order.rechargeGoods eq 1 || order.rechargeGoods eq 2)}){
  962. $(".shopOrderInput").attr("readonly",true);
  963. }
  964. if(2==refundType || 3==refundType){
  965. $("input[readonly='readonly']").removeProp("readonly");
  966. }
  967. if (${order.rechargeGoods != null && order.rechargeGoods eq 1 && ableUserMoney eq 0}){
  968. alertx("本订单为缴纳订金订单,机构的余额为¥0.00,不能进行退款", function(){
  969. window.location.href = "${ctx}/order/orderList";
  970. })
  971. }
  972. if (${order.rechargeGoods != null && order.rechargeGoods eq 2 && ableUserMoney eq 0}){
  973. alertx("本订单为充值余额订单,机构的余额为¥0.00,不能进行退款", function(){
  974. window.location.href = "${ctx}/order/orderList";
  975. })
  976. }
  977. $('.upload-content .conList .btn:nth-of-type(1)').html('<div><span>+</span><h5>选择图片</h5></div>');
  978. $('.upload-content .conList .btn:nth-of-type(2)').after('<img class="cancel-upload" src="/static/images/close-btn1.png">').remove();
  979. $('.upload-content .conList').find('.cancel-upload').hide();
  980. var observeEle = document.getElementsByClassName('upload-content')[0];
  981. var MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
  982. var MutationObserverConfig={
  983. childList: true,
  984. subtree: true,
  985. characterData: true
  986. };
  987. var observer = new MutationObserver(function(mutations){
  988. $.each(mutations, function(index,item) {
  989. if (item.type === 'childList') {
  990. // 在创建新的 element 时调用
  991. var target = $(item.target),
  992. thisWrapper = target.closest('.conList'),
  993. nextEle = thisWrapper.next();
  994. thisWrapper.find('li').css('z-index',99);
  995. thisWrapper.find('.cancel-upload').show();
  996. if(nextEle.hasClass('hide-pic')) {
  997. nextEle.removeClass('hide-pic');
  998. }
  999. }
  1000. })
  1001. });
  1002. observer.observe(observeEle,MutationObserverConfig);
  1003. $('body').on('click','.upload-content li',function() {
  1004. var index = $(this).closest('.conList').index() + 1,
  1005. str = 'image'+index+'FinderOpen';
  1006. eval(str+'()');
  1007. });
  1008. $('body').on('click', '.cancel-upload',function() {
  1009. var wrapper = $(this).closest('.conList');
  1010. wrapper.find('li').css('z-index','-1');
  1011. wrapper.find('input').val('');
  1012. $(this).hide();
  1013. if ($('.cancel-upload:visible').length < 9) {
  1014. wrapper.addClass("hide-pic");
  1015. }else{
  1016. wrapper.removeClass("hide-pic");
  1017. }
  1018. wrapper.parent().append(wrapper.clone());
  1019. wrapper.remove();
  1020. $(".conList").each(function(i,ele){
  1021. if($(ele).find("input.input-xlarge").val()){
  1022. $(ele).next().removeClass("hide-pic")
  1023. }
  1024. })
  1025. });
  1026. $(window).on("load", function(){
  1027. setTimeout(function(){
  1028. $("#remarkImageBox").find("input.input-xlarge").each(function(i,ele){
  1029. if($(ele).val()){
  1030. $(ele).next().find("li").css("z-index","99");
  1031. $(ele).parents(".conList").find(".cancel-upload").show();
  1032. $(ele).parents(".conList").next().removeClass("hide-pic")
  1033. }
  1034. })
  1035. },500);
  1036. });
  1037. //初始化支付方式选中
  1038. blockEle = $('.refund-details-block');
  1039. blockEle.hide();//默认不显示
  1040. var str = "${cmReturnedPurchase.returnedWay}";
  1041. if(str.indexOf("1") != -1){
  1042. $('.refundBalanceFee').prop('checked',true);
  1043. }
  1044. if(str.indexOf("2") != -1){
  1045. $('.refundOnlineFee').prop('checked',true);
  1046. }
  1047. if(str.indexOf("3") != -1){
  1048. //选中了线下则默认开启银行信息
  1049. $('.refundOfflineFee').prop('checked',true);
  1050. blockEle.show();
  1051. }
  1052. //错误提示
  1053. var errorMsg = "${errorMsg}";
  1054. if(errorMsg){
  1055. alertx(errorMsg);
  1056. }
  1057. //本次退货和本次取消
  1058. $('body').on('input','.refundGoodsInput, .cancelGoodsInput,.refundGoodsInput1',function() {
  1059. var receiptStatus = $('#receiptStatus').val(),
  1060. refundFee = 0,
  1061. originalAmount = getTotalAmount(); // 所有商品原始总金额
  1062. if(receiptStatus == 1) {
  1063. //如果为订单状态收款状态为1待收款,退款金额refundFee为0
  1064. refundFee = 0;
  1065. } else if(receiptStatus == 2) {
  1066. var paidAmount = Number($('#paidAmount').val()); // 已支付金额
  1067. // 如果商品原始总金额 > 已支付金额,
  1068. // 退款金额为refundFee就为已支付金额(列:商品20,运费10,用户付15,退款15)
  1069. /** 此处考虑邮费可不退,获取邮费退货数量*/
  1070. var num = $(".refundGoodsInput1").val();
  1071. var freight = ${null != order.freight ? order.freight : 0 };//默认不退
  1072. if(num > 0){//退邮费
  1073. freight = 0;
  1074. }
  1075. if(originalAmount > paidAmount) {
  1076. refundFee = paidAmount - freight;
  1077. } else {
  1078. refundFee = originalAmount - freight;
  1079. }
  1080. } else if(receiptStatus == 3) {
  1081. var managerDiscount = Number($('#discountFee').val()),
  1082. totalDiscount = Number($('#totalDiscount').val());
  1083. // 如果经理折扣 > 订单之前已退款的金额
  1084. if(managerDiscount > totalDiscount) {
  1085. // 如果商品总和 > (剩余可抵扣经理折扣)
  1086. if(originalAmount > (managerDiscount - totalDiscount)) {
  1087. refundFee = originalAmount - (managerDiscount - totalDiscount);
  1088. } else {
  1089. refundFee = 0;
  1090. }
  1091. }else {
  1092. refundFee = originalAmount;
  1093. }
  1094. }
  1095. $('.refundFee').text(refundFee.toFixed(2));
  1096. if (${cmDiscernReceipt.payWay eq 3 && order.receiptStatus == 3}) {
  1097. $('#balanceOfAccount').val(refundFee.toFixed(2));
  1098. }
  1099. })
  1100. function getTotalAmount() {
  1101. var originalAmount = 0; // 所有商品原始总金额
  1102. $('.shopOrderTable').each(function () {
  1103. var innerTable = $(this).find('.table');
  1104. innerTable.each(function () {
  1105. // 某个商品原始金额 = 单个折后单价 * (单个退货数量+单个取消数量)
  1106. var refundVal = Number($(this).find('.refundGoodsInput').val()),
  1107. cancelVal = Number($(this).find('.cancelGoodsInput').val()),
  1108. price = Number($(this).find('.price').text()),
  1109. discountPrice = Number($(this).find('.discountPrice').text()),
  1110. addedValueTax = Number($(this).find('.addedValueTax').text());
  1111. var presentNum = Number($(this).find('.refundGoodsInput').attr('presentNum'));
  1112. if ((refundVal != 0 || cancelVal != 0)) {
  1113. if (${order.organizeID != 4}) {
  1114. originalAmount += (discountPrice * (refundVal + cancelVal - presentNum) + (refundVal + cancelVal - presentNum) * addedValueTax);
  1115. } else {
  1116. originalAmount += (price * (refundVal + cancelVal - presentNum));
  1117. }
  1118. }
  1119. })
  1120. })
  1121. return originalAmount;
  1122. }
  1123. });
  1124. (function () {
  1125. $('body').click(function (e) {
  1126. var target = $(e.target),
  1127. $block = $('.operation-block');
  1128. if(target.is('.operation-btn')) {
  1129. if($block.css('display') === 'none') {
  1130. $block.show();
  1131. } else {
  1132. $block.hide();
  1133. }
  1134. }
  1135. if(!target.is('.operation-block') && !target.is('.operation-btn')) {
  1136. $block.hide();
  1137. }
  1138. });
  1139. $('.clauseId').each(function() {
  1140. var self = $(this);
  1141. if (!self.prop("checked")) {
  1142. self.parent().hide();
  1143. } else {
  1144. self.hide();
  1145. }
  1146. });
  1147. $('#invoice1, #invoice2, #invoice3').each(function () {
  1148. var self = $(this);
  1149. if (!self.prop("checked")) {
  1150. self.next().remove();
  1151. self.remove();
  1152. } else {
  1153. self.remove();
  1154. }
  1155. })
  1156. })();
  1157. function openClauseInfo(index) {
  1158. var content=$("#clauseContent"+index).val();
  1159. if (content == '') {
  1160. return false;
  1161. }
  1162. $.jBox(content, {
  1163. title: $("#clauseName"+index).val(),
  1164. width: $(top.document).width() - 440,
  1165. height: $(top.document).height()-240,
  1166. buttons: { '关闭': true }
  1167. });
  1168. }
  1169. function setApplicationReturnedNum(a,b){
  1170. debugger
  1171. var refundType = $("#refundType").val();
  1172. var num = $("#applicationReturnedNum"+a+b).val();
  1173. var max = Number($("#shipped"+a+b).html() - $("#returning"+a+b).html() - $("#returned"+a+b).html());
  1174. if(1==refundType){
  1175. if(num > max){
  1176. alertx("退货数量不能大于已发货数量(之前已退不算)!");
  1177. $("#applicationReturnedNum"+a+b).val(0)
  1178. }
  1179. if (num != max && ${returnOnline}){
  1180. alertx("退货数量只能等于已发货数量(之前已退不算)!");
  1181. $("#applicationReturnedNum"+a+b).val(0)
  1182. }
  1183. }
  1184. };
  1185. function setApplicationCancelNum(a,b){
  1186. debugger
  1187. var refundType = $("#refundType").val();
  1188. var num = $("#applicationCancelNum"+a+b).val();
  1189. var max = Number($("#toBeShipped"+a+b).html());
  1190. if(1==refundType){
  1191. if(num > max){
  1192. alertx("取消数量不能大于待发数量,请重新填写!");
  1193. $("#applicationCancelNum"+a+b).val(0)
  1194. }
  1195. if (num != max && ${returnOnline}){
  1196. alertx("取消数量只能等于待发数量,请重新填写!");
  1197. $("#applicationCancelNum"+a+b).val(0)
  1198. }
  1199. }
  1200. };
  1201. </script>
  1202. </body>
  1203. </html>