applyRefoundForm.jsp 69 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178
  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="${returnOnline}">
  319. <input class="check-item-review refundOnlineFee" type="radio" checked name="returnedWay" value='2'/>
  320. 线上退回
  321. </c:if>
  322. <c:if test="${!returnOnline}">
  323. <c:if test="${cmReturnedPurchase.refundOfflineFee>0}">
  324. <input class="check-item-review refundOfflineFee" checked type="checkbox" onclick="showBankInfo()"/>
  325. </c:if>
  326. <c:if test="${empty cmReturnedPurchase.refundOfflineFee or cmReturnedPurchase.refundOfflineFee eq 0}">
  327. <input class="check-item-review refundOfflineFee" type="checkbox" onclick="showBankInfo()"/>
  328. </c:if>
  329. 线下转账
  330. <from:input path="refundOfflineFee" onkeyup="num(this)" placeholder="¥0.00" value="${empty cmReturnedPurchase.refundOfflineFee?'':(cmReturnedPurchase.refundOfflineFee)}"></from:input>
  331. <c:if test="${order.rechargeGoods ne 1 && order.rechargeGoods ne 2}">
  332. <c:if test="${cmReturnedPurchase.refundBalanceFee>0}">
  333. <input class="check-item-review refundBalanceFee" checked type="checkbox"/>
  334. </c:if>
  335. <c:if test="${empty cmReturnedPurchase.refundBalanceFee or cmReturnedPurchase.refundBalanceFee eq 0}">
  336. <input class="check-item-review refundBalanceFee" type="checkbox"/>
  337. </c:if>
  338. 账户余额
  339. <from:input path="refundBalanceFee" onkeyup="num(this)" placeholder="¥0.00" value="${empty cmReturnedPurchase.refundBalanceFee?'':(cmReturnedPurchase.refundBalanceFee)}"></from:input>
  340. </c:if>
  341. </c:if>
  342. <br>
  343. <div class="refund-details-block">
  344. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  345. <font color="red">*</font>开户名:;&nbsp;&nbsp;&nbsp;&nbsp;
  346. <from:input path="bankAccountName" value="${empty cmReturnedPurchase.bankAccountName?'':(cmReturnedPurchase.bankAccountName)}"></from:input>
  347. <font color="red">*</font>账号:
  348. <from:input path="bankAccountNo" value="${empty cmReturnedPurchase.bankAccountNo?'':(cmReturnedPurchase.bankAccountNo)}"></from:input>
  349. <%--<br>&nbsp;&nbsp;&nbsp;&nbsp;--%>
  350. <font color="red">*</font>开户行:
  351. <from:input path="openBank" value="${empty cmReturnedPurchase.openBank?'':(cmReturnedPurchase.openBank)}"></from:input>
  352. <font color="red">*</font>账户类型:
  353. <select name="bankAccountType" id="bankAccountType">
  354. <option value="" selected>请选择</option>
  355. <option value="1" <c:if test="${not empty cmReturnedPurchase.bankAccountType && cmReturnedPurchase.bankAccountType eq 1}"> selected="selected"</c:if>>公账</option>
  356. <option value="2" <c:if test="${not empty cmReturnedPurchase.bankAccountType && cmReturnedPurchase.bankAccountType eq 2}"> selected="selected"</c:if>>私账</option>
  357. </select>
  358. </div>
  359. </c:if>
  360. </td>
  361. </tr>
  362. </table>
  363. <table id="orderTable" class="table table-striped table-bordered table-condensed">
  364. <thead>
  365. </thead>
  366. <tr>
  367. <td>
  368. 订单编号(ID):${order.orderNo}(${order.orderID})
  369. </td>
  370. <td>
  371. 下单时间:${order.orderTime}
  372. </td>
  373. <c:if test="${order.orderType eq 2}">
  374. <td>
  375. 订单类型:${order.collageFlag eq 1?'拼团订单':'独立订单'}
  376. </td>
  377. </c:if>
  378. <td colspan="2">
  379. 订单状态:
  380. <c:if test="${order.status eq 11 || order.status eq 12 || order.status eq 13 ||order.status eq 21 ||order.status eq 22 ||
  381. 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>
  382. <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>
  383. </td>
  384. </tr>
  385. <tr>
  386. <td>
  387. 订单金额:¥<fmt:formatNumber type="number" value="${order.payTotalFee}" pattern="0.00" maxFractionDigits="2" />
  388. <c:if test="${not empty order.couponOrderRecord}">
  389. <c:if test="${order.couponOrderRecord.couponType eq 0}">
  390. <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(活动券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
  391. </c:if>
  392. <c:if test="${order.couponOrderRecord.couponType eq 1}">
  393. <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(品类券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
  394. </c:if>
  395. <c:if test="${order.couponOrderRecord.couponType eq 2}">
  396. <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(用户专享券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
  397. </c:if>
  398. <c:if test="${order.couponOrderRecord.couponType eq 3}">
  399. <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(店铺券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
  400. </c:if>
  401. <c:if test="${order.couponOrderRecord.couponType eq 4}">
  402. <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(新用户券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
  403. </c:if>
  404. </c:if>
  405. <c:if test="${not empty order.heheCouponRecord}">
  406. <a href="${ctx}/hehe/cmHeheCoupon/receiveDetails?userId=${order.userID}">
  407. <font color="red">
  408. (${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})
  409. </font>
  410. </a>
  411. </c:if>
  412. <c:if test="${order.reductionAmount > 0}">
  413. (分享减免¥${order.reductionAmount},满${order.reductionTouchPrice}减${order.reductionAmount})
  414. </c:if>
  415. </td>
  416. <td>
  417. 应收总额:¥<fmt:formatNumber type="number" value="${order.payableAmount}" pattern="0.00" maxFractionDigits="2" />(账户余额抵扣:${order.balancePayFee})
  418. <a href="${ctx}/order/cmDiscernReceipt/detail?id=${lastReceiptDetailId}" style="text-decoration: underline;margin-left: 20px">查看订单收款情况</a>
  419. </td>
  420. <td>
  421. 经理折扣:¥<fmt:formatNumber type="number" value="${order.discountFee}" pattern="0.00" maxFractionDigits="2" />
  422. </td>
  423. <td>
  424. 运费:
  425. <c:if test="${order.freePostFlag == 0}">
  426. 包邮
  427. </c:if>
  428. <c:if test="${order.freePostFlag == -1}">
  429. 到付
  430. </c:if>
  431. <c:if test="${order.freePostFlag == -2}">
  432. 仪器到付-产品包邮
  433. </c:if>
  434. <c:if test="${order.freePostFlag != -1 && order.freePostFlag != 0 && order.freePostFlag != -2}">
  435. <fmt:formatNumber value="${order.freight}" type="currency"/>
  436. </c:if>
  437. <c:if test="${order.userBeans > 0}">
  438. <font color="red">(采美豆抵用:${order.userBeans})</font>
  439. </c:if>
  440. </td>
  441. </tr>
  442. <tr>
  443. <td>
  444. 收款状态:
  445. <c:if test="${order.receiptStatus == 1}">
  446. <font color="red">待收款</font>
  447. </c:if>
  448. <c:if test="${order.receiptStatus == 2}">
  449. <font color="#ff8c00">部分收款</font>
  450. </c:if>
  451. <c:if test="${order.receiptStatus == 3}">
  452. <font color="green">已收款</font>
  453. </c:if></td>
  454. </td>
  455. <c:if test="${order.orderType eq 2}">
  456. <td>
  457. 拼团状态:
  458. <c:choose>
  459. <c:when test="${order.collageFlag eq 1 && (order.status eq 31 || order.status eq 32 || order.status eq 33)}">
  460. <font color="${order.collageStatus eq 1?'#00CC66':(order.collageStatus eq 2?'red':'')}">
  461. ${order.collageStatus eq 1?'拼团中':(order.collageStatus eq 2?'已拼成':'-')}
  462. </font>
  463. </c:when>
  464. <c:otherwise>
  465. -
  466. </c:otherwise>
  467. </c:choose>
  468. </td>
  469. </c:if>
  470. <td>
  471. 发货状态:
  472. <c:if test="${order.sendOutStatus == 1}">
  473. <font color="red">待发货</font>
  474. </c:if>
  475. <c:if test="${order.sendOutStatus == 2}">
  476. <font color="#ff8c00">部分发货</font>
  477. </c:if>
  478. <c:if test="${order.sendOutStatus == 3}">
  479. <font color="green">已发货</font>
  480. </c:if></td>
  481. </td>
  482. <td>
  483. 付款状态:
  484. <c:if test="${order.payStatus == 1}">
  485. <font color="red">待付款</font>
  486. </c:if>
  487. <c:if test="${order.payStatus == 2}">
  488. <font color="#ff8c00">部分付款</font>
  489. </c:if>
  490. <c:if test="${order.payStatus == 3}">
  491. <font color="green">已付款</font>
  492. </c:if></td>
  493. </td>
  494. <td>
  495. 退款状态:
  496. <c:if test="${empty order.refundType}">
  497. <font>无退款</font>
  498. </c:if>
  499. <c:if test="${order.refundType == 1}">
  500. <font>部分退款</font>
  501. </c:if>
  502. <c:if test="${order.refundType == 2}">
  503. <font>已退款</font>
  504. </c:if></td>
  505. </td>
  506. </tr>
  507. <tr>
  508. <td>
  509. 机构:${order.buyer}<c:if test="${order.organizeID == 3}"></c:if>
  510. </td>
  511. <td>
  512. 收货人:${order.bpOrderUserinfo.shouHuoRen}(${order.bpOrderUserinfo.mobile})
  513. </td>
  514. <td colspan="2">
  515. 地址:${order.bpOrderUserinfo.province}${order.bpOrderUserinfo.city}${order.bpOrderUserinfo.town}${order.bpOrderUserinfo.address}
  516. </td>
  517. </tr>
  518. </table>
  519. <c:forEach items="${order.newShopOrders}" var="shopOrder" varStatus="status">
  520. <c:if test="${!shopOrder.defaultStatus}">
  521. <table id="shopOrderTable${status.index}" class="table shopOrderTable table-striped table-bordered table-condensed">
  522. <thead></thead>
  523. <tr>
  524. <td style="width: 300px;">
  525. 子订单号(ID):${shopOrder.shopOrderNo}(${shopOrder.shopOrderID})
  526. </td>
  527. <td style="width: 275px;">
  528. 子订单金额:¥<fmt:formatNumber type="number" value="${shopOrder.totalAmount}" pattern="0.00" maxFractionDigits="2" />
  529. </td>
  530. <td>
  531. 收款状态:${fns:getDictLabel(shopOrder.shopReceiptStatus,'receiptStatus' ,'' )}
  532. </td>
  533. <td>
  534. 发货状态:${fns:getDictLabel(shopOrder.sendOutStatus,'sendOutStatus' ,'' )}
  535. </td>
  536. <td>
  537. 付款状态:${fns:getDictLabel(shopOrder.payStatus,'payStatus' ,'' )}
  538. </td>
  539. <td>
  540. 供应商:${shopOrder.shopName} &nbsp;&nbsp;
  541. <c:if test="${not empty shopOrder.commercialCode}">
  542. <font color="red" class="businessNumber">(商户号:&nbsp;&nbsp;${shopOrder.commercialCode})</font>
  543. </c:if>
  544. </td>
  545. </tr>
  546. <c:if test="${order.onlinePayFlag eq 0}">
  547. <tr>
  548. <td>
  549. 商品总额:¥<fmt:formatNumber type="number" value="${shopOrder.needPayAmount}" pattern="0.00" maxFractionDigits="2" />
  550. </td>
  551. <td>
  552. 优惠:¥<fmt:formatNumber type="number" value="${shopOrder.eachDiscount}" pattern="0.00" maxFractionDigits="2" />
  553. </td>
  554. <td>
  555. 应付金额:¥<fmt:formatNumber type="number" value="${shopOrder.realPay}" pattern="0.00" maxFractionDigits="2" />
  556. </td>
  557. <td>
  558. 已付金额:¥<fmt:formatNumber type="number" value="${shopOrder.receiptAmount}" pattern="0.00" maxFractionDigits="2" />
  559. </td>
  560. <td colspan="2">
  561. 待付金额:¥<fmt:formatNumber type="number" value="${shopOrder.restAmount}" pattern="0.00" maxFractionDigits="2" />
  562. </td>
  563. </tr>
  564. </c:if>
  565. <c:forEach items="${shopOrder.newOrderProducts}" var="newOrderProduct" varStatus="productStatus">
  566. <tr>
  567. <td colspan="5">
  568. <table id="newOrderProductTable" class="table table-striped table-bordered table-condensed">
  569. <tr>
  570. <td rowspan="4" style="width: 295px;height: 125px">
  571. <img style="width: 100px;height: 100px" src="${newOrderProduct.image}">
  572. <font title="${newOrderProduct.name}">${fns:abbr(newOrderProduct.name,30)}</font>
  573. </td>
  574. <td style="width: 275px;">
  575. 单价:¥<fmt:formatNumber type="number" value="${newOrderProduct.price}" pattern="0.00" maxFractionDigits="2" />
  576. <c:if test="${order.collageFlag eq 1}"><font color="red">(拼团价)</font></c:if>
  577. </td>
  578. <td >
  579. 折扣 :${newOrderProduct.discount}%
  580. </td>
  581. <td >
  582. 折后单价 :¥<span class="discountPrice"><fmt:formatNumber type="number" value="${newOrderProduct.discountPrice}" pattern="0.00" maxFractionDigits="2" /></span>
  583. </td>
  584. <td >
  585. 数量(赠品):${newOrderProduct.num}(${newOrderProduct.presentNum})
  586. </td>
  587. </tr>
  588. <tr>
  589. <td style="width: 275px;">
  590. 税率:${newOrderProduct.taxRate}%
  591. </td>
  592. <td>
  593. 税费:¥<span class="addedValueTax"><fmt:formatNumber type="number" value="${newOrderProduct.addedValueTax}" pattern="0.00" maxFractionDigits="2" /></span>
  594. </td>
  595. <td colspan="2">
  596. 总额:¥<fmt:formatNumber type="number" value="${newOrderProduct.shouldPayFee}" pattern="0.00" maxFractionDigits="2" />
  597. </td>
  598. </tr>
  599. <tr>
  600. <%--已发货=商品数量-未出库数量--%>
  601. <td><font color="red">已发货:<span id="shipped${status.index}${productStatus.index}">${newOrderProduct.num + newOrderProduct.presentNum - newOrderProduct.notOutStore}</span></font></td>
  602. <input type="hidden" id="returning${status.index}${productStatus.index}" value="${newOrderProduct.returningPurchaseProductNum}"/>
  603. <%--已退货=所有退货数量总和--%>
  604. <td><font color="red"><span>已退货:<span id="returned${status.index}${productStatus.index}">${newOrderProduct.returnedPurchaseProductNum}</span></span></font></td>
  605. <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>
  606. </tr>
  607. <tr>
  608. <%--待发货=未出库数量-取消数量--%>
  609. <td><font color="red">待发货:<span id="toBeShipped${status.index}${productStatus.index}">${newOrderProduct.notOutStore - newOrderProduct.cancelProductNum}</span></font></td>
  610. <%--已取消数量=所有已取消数量总和--%>
  611. <td><font color="red">已取消:<span id="toBeShipped${status.index}${productStatus.index}">${newOrderProduct.cancelProductNum}</span></font></td>
  612. <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>
  613. <form:hidden path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].shopOrderID" value="${newOrderProduct.shopOrderID}"/>
  614. <form:hidden path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].productID" value="${newOrderProduct.productID}"/>
  615. <form:hidden path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].orderProductID" value="${newOrderProduct.orderProductID}"/>
  616. <form:hidden path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].shopID" value="${newOrderProduct.shopID}"/>
  617. </tr>
  618. </table>
  619. </td>
  620. </tr>
  621. </c:forEach>
  622. </table>
  623. </c:if>
  624. <%--默认状态代码--%>
  625. <c:if test="${shopOrder.defaultStatus}">
  626. <table id="shopOrderTable${status.index}" class="table shopOrderTable table-striped table-bordered table-condensed">
  627. <thead></thead>
  628. <tr>
  629. <td style="width: 300px;">
  630. 子订单号(ID):${shopOrder.shopOrderNo}(${shopOrder.shopOrderID})
  631. </td>
  632. <td style="width: 275px;">
  633. 子订单金额:¥<fmt:formatNumber type="number" value="${shopOrder.totalAmount}" pattern="0.00" maxFractionDigits="2" />
  634. </td>
  635. <td>
  636. 发货状态:${fns:getDictLabel(shopOrder.sendOutStatus,'sendOutStatus' ,'' )}
  637. </td>
  638. <td>
  639. 付款状态:${fns:getDictLabel(shopOrder.payStatus,'payStatus' ,'' )}
  640. </td>
  641. <td>
  642. 供应商:${shopOrder.shopName}
  643. </td>
  644. </tr>
  645. <c:forEach items="${shopOrder.newOrderProducts}" var="newOrderProduct" varStatus="productStatus">
  646. <tr>
  647. <td colspan="5">
  648. <table id="newOrderProductTable" class="table table-striped table-bordered table-condensed">
  649. <tr>
  650. <td rowspan="4" style="width: 295px;height: 125px">
  651. <img style="width: 100px;height: 100px" src="${newOrderProduct.image}">
  652. <font title="${newOrderProduct.name}">${fns:abbr(newOrderProduct.name,30)}</font>
  653. </td>
  654. <td style="width: 275px;">
  655. 单价:¥<fmt:formatNumber type="number" value="${newOrderProduct.price}" pattern="0.00" maxFractionDigits="2" />
  656. </td>
  657. <td>
  658. 折扣 :${newOrderProduct.discount}%
  659. </td>
  660. <td>
  661. 折后单价 :¥<span class="discountPrice"><fmt:formatNumber type="number" value="${newOrderProduct.discountPrice}" pattern="0.00" maxFractionDigits="2" /></span>
  662. </td>
  663. <td>
  664. 数量(赠品):${newOrderProduct.num}(${newOrderProduct.presentNum})
  665. </td>
  666. </tr>
  667. <tr>
  668. <td style="width: 275px;">
  669. 税率:${newOrderProduct.taxRate}%
  670. </td>
  671. <td>
  672. 税费:¥<span class="addedValueTax"><fmt:formatNumber type="number" value="${newOrderProduct.addedValueTax}" pattern="0.00" maxFractionDigits="2" /></span>
  673. </td>
  674. <td colspan="2">
  675. 总额:¥<fmt:formatNumber type="number" value="${newOrderProduct.shouldPayFee}" pattern="0.00" maxFractionDigits="2" />
  676. </td>
  677. </tr>
  678. <tr>
  679. <td><font color="red">已发货:<span id="shipped${status.index}${productStatus.index}">${newOrderProduct.num + newOrderProduct.presentNum - newOrderProduct.notOutStore}</span></font></td>
  680. <input type="hidden" id="returning${status.index}${productStatus.index}" value="${newOrderProduct.returningPurchaseProductNum}"/>
  681. <td><font color="red"><span>已退货:<span id="returned${status.index}${productStatus.index}">${newOrderProduct.returnedPurchaseProductNum}</span></span></font></td>
  682. <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>
  683. </tr>
  684. <tr>
  685. <td><font color="red">待发货:<span id="toBeShipped${status.index}${productStatus.index}">${newOrderProduct.notOutStore - newOrderProduct.cancelProductNum}</span></font></td>
  686. <td><font color="red">已取消:<span id="toBeShipped${status.index}${productStatus.index}">${newOrderProduct.cancelProductNum}</span></font></td>
  687. <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>
  688. <form:hidden path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].shopOrderID" value="${newOrderProduct.shopOrderID}"/>
  689. <form:hidden path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].productID" value="${newOrderProduct.productID}"/>
  690. <form:hidden path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].orderProductID" value="${newOrderProduct.orderProductID}"/>
  691. <form:hidden path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].shopID" value="${newOrderProduct.shopID}"/>
  692. </tr>
  693. </table>
  694. </td>
  695. </tr>
  696. </c:forEach>
  697. </table>
  698. </c:if>
  699. </table>
  700. <%--默认状态代码--%>
  701. <c:if test="${shopOrder.defaultStatus}">
  702. <table id="shopOrderTable${status.index}"
  703. class="table shopOrderTable table-striped table-bordered table-condensed">
  704. <thead></thead>
  705. <tr>
  706. <td style="width: 300px;">
  707. 子订单号(ID):${shopOrder.shopOrderNo}(${shopOrder.shopOrderID})
  708. </td>
  709. <td style="width: 275px;">
  710. 子订单金额:¥<fmt:formatNumber type="number" value="${shopOrder.totalAmount}" pattern="0.00"
  711. maxFractionDigits="2"/>
  712. </td>
  713. <td>
  714. 发货状态:${fns:getDictLabel(shopOrder.sendOutStatus,'sendOutStatus' ,'' )}
  715. </td>
  716. <td>
  717. 付款状态:${fns:getDictLabel(shopOrder.payStatus,'payStatus' ,'' )}
  718. </td>
  719. <td>
  720. 供应商:${shopOrder.shopName}
  721. </td>
  722. </tr>
  723. <c:forEach items="${shopOrder.newOrderProducts}" var="newOrderProduct" varStatus="productStatus">
  724. <tr>
  725. <td colspan="5">
  726. <table id="newOrderProductTable" class="table table-striped table-bordered table-condensed">
  727. <tr>
  728. <td rowspan="4" style="width: 295px;height: 125px">
  729. <img style="width: 100px;height: 100px" src="${newOrderProduct.image}">
  730. <font title="${newOrderProduct.name}">${fns:abbr(newOrderProduct.name,30)}</font>
  731. </td>
  732. <td style="width: 275px;">
  733. 单价:¥<fmt:formatNumber type="number" value="${newOrderProduct.price}"
  734. pattern="0.00" maxFractionDigits="2"/>
  735. </td>
  736. <td>
  737. 折扣 :${newOrderProduct.discount}%
  738. </td>
  739. <td>
  740. 折后单价 :¥<span class="discountPrice"><fmt:formatNumber type="number"
  741. value="${newOrderProduct.discountPrice}"
  742. pattern="0.00"
  743. maxFractionDigits="2"/></span>
  744. </td>
  745. <td>
  746. 数量(赠品):${newOrderProduct.num}(${newOrderProduct.presentNum})
  747. </td>
  748. </tr>
  749. <tr>
  750. <td style="width: 275px;">
  751. 税率:${newOrderProduct.taxRate}%
  752. </td>
  753. <td>
  754. 税费:¥<span class="addedValueTax"><fmt:formatNumber type="number"
  755. value="${newOrderProduct.addedValueTax}"
  756. pattern="0.00"
  757. maxFractionDigits="2"/></span>
  758. </td>
  759. <td colspan="2">
  760. 总额:¥<fmt:formatNumber type="number" value="${newOrderProduct.shouldPayFee}"
  761. pattern="0.00" maxFractionDigits="2"/>
  762. </td>
  763. </tr>
  764. <tr>
  765. <td><font color="red">已发货:<span
  766. id="shipped${status.index}${productStatus.index}">${newOrderProduct.num + newOrderProduct.presentNum - newOrderProduct.notOutStore}</span></font>
  767. </td>
  768. <input type="hidden" id="returning${status.index}${productStatus.index}"
  769. value="${newOrderProduct.returningPurchaseProductNum}"/>
  770. <td><font color="red"><span>已退货:<span
  771. id="returned${status.index}${productStatus.index}">${newOrderProduct.returnedPurchaseProductNum}</span></span></font>
  772. </td>
  773. <td colspan="4"><font
  774. color="red"><span>本次退货:<input ${newOrderProduct.presentNum>0 or (order.onlinePayFlag eq 0 and shopOrder.shopID eq 998)?"readonly":""}
  775. presentNum="${newOrderProduct.presentNum}"
  776. id="applicationReturnedNum${status.index}${productStatus.index}"
  777. class="refundGoodsInput1 shopOrderInput1 refundGoodsInput shopOrderInput"
  778. name="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].applicationReturnedNum"
  779. value="${(order.onlinePayFlag eq 0 and shopOrder.shopID eq 998)?0:(newOrderProduct.num + newOrderProduct.presentNum - newOrderProduct.notOutStore - newOrderProduct.returnedPurchaseProductNum)}"
  780. oninput="this.value=this.value.replace(/\D/g,'').replace(/^0+(?=\d)/,1)"
  781. class="input tuihuo" type="text"
  782. onchange="setApplicationReturnedNum(${status.index},${productStatus.index})"></span></font>
  783. </td>
  784. </tr>
  785. <tr>
  786. <td><font color="red">待发货:<span
  787. id="toBeShipped${status.index}${productStatus.index}">${newOrderProduct.notOutStore - newOrderProduct.cancelProductNum}</span></font>
  788. </td>
  789. <td><font color="red">已取消:<span
  790. id="toBeShipped${status.index}${productStatus.index}">${newOrderProduct.cancelProductNum}</span></font>
  791. </td>
  792. <td colspan="4"><font
  793. color="red"><span>本次取消:<input ${newOrderProduct.presentNum>0 or (order.onlinePayFlag eq 0 and shopOrder.shopID eq 998)?"readonly":""}
  794. id="applicationCancelNum${status.index}${productStatus.index}"
  795. class="cancelGoodsInput shopOrderInput"
  796. name="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].applicationCancelNum"
  797. value="${(order.onlinePayFlag eq 0 and shopOrder.shopID eq 998)?0:(newOrderProduct.notOutStore - newOrderProduct.cancelProductNum)}"
  798. oninput="this.value=this.value.replace(/\D/g,'').replace(/^0+(?=\d)/,1)"
  799. class="input cancel" type="text"
  800. onchange="setApplicationCancelNum(${status.index},${productStatus.index})"></span></font>
  801. </td>
  802. <form:hidden
  803. path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].shopOrderID"
  804. value="${newOrderProduct.shopOrderID}"/>
  805. <form:hidden
  806. path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].productID"
  807. value="${newOrderProduct.productID}"/>
  808. <form:hidden
  809. path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].orderProductID"
  810. value="${newOrderProduct.orderProductID}"/>
  811. <form:hidden
  812. path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].shopID"
  813. value="${newOrderProduct.shopID}"/>
  814. </tr>
  815. </table>
  816. </td>
  817. </tr>
  818. </table>
  819. </c:if>
  820. <div class="form-actions">
  821. <input id="btnSubmit" class="btn btn-primary" type="submit" value="申 请"/>&nbsp;
  822. <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
  823. </div>
  824. </form:form>
  825. <script type="text/javascript" src="${ctxStatic}/modules/bulkpurchase/loadAddress.js"></script>
  826. <script type="text/javascript" src="${ctxStatic}/modules/bulkpurchase/orderForm.js"></script>
  827. <script type="text/javascript" src="${ctxStatic}/modules/bulkpurchase/stages.js"></script>
  828. <script>
  829. function changeType(){
  830. var refundType = $("#refundType").val();
  831. if(1==refundType){
  832. var orderStatus = $("#orderStatus").val();
  833. var isBuFenFaHuo = $("#isBuFenFaHuo").val();
  834. if(isBuFenFaHuo == "true"){
  835. $(".shopOrderInput").attr("readonly",true);
  836. /*$(".shopOrderInput1").attr("readonly",false);*///设置邮费的可修改
  837. };
  838. //有促销商品订单不可修改
  839. if (${isPromotions}){
  840. $(".shopOrderInput").attr("readonly",true);
  841. }
  842. //线上全部付款订单不可修改
  843. if (${order.receiptStatus == 3 && cmDiscernReceipt.payWay eq 1}){
  844. $(".shopOrderInput").attr("readonly",true);
  845. }
  846. // 有优惠不可修改,只能全退
  847. if (${order.discountAmount > 0 and order.onlinePayFlag eq 0}){
  848. $(".shopOrderInput").attr("readonly",true);
  849. }
  850. //充值订单不可修改
  851. if (${order.rechargeGoods != null && (order.rechargeGoods eq 1 || order.rechargeGoods eq 2)}){
  852. $(".shopOrderInput").attr("readonly",true);
  853. }
  854. $("#zdy").hide();
  855. $("#spt").show();
  856. }
  857. if(2==refundType || 3==refundType) {
  858. $("input[readonly='readonly']").removeProp("readonly");
  859. $("#spt").hide();
  860. $("#zdy").show();
  861. }
  862. }
  863. function showBankInfo() {
  864. if (${!returnOnline}){
  865. var obj = document.getElementsByClassName("refundOfflineFee"),
  866. blockEle = $('.refund-details-block');
  867. if(obj){
  868. if(obj[0].checked){
  869. //显示银行信息
  870. blockEle.show();
  871. } else {
  872. blockEle.hide();
  873. }
  874. }
  875. }
  876. }
  877. $(function () {
  878. var orderStatus = $("#orderStatus").val();
  879. var isBuFenFaHuo = $("#isBuFenFaHuo").val();
  880. var refundType = $("#refundType").val();
  881. if(isBuFenFaHuo == "true"){
  882. $(".shopOrderInput").attr("readonly",true);
  883. /*$(".shopOrderInput1").attr("readonly",false);*///设置邮费的可修改
  884. };
  885. //有促销商品订单不可修改
  886. if (${isPromotions}){
  887. $(".shopOrderInput").attr("readonly",true);
  888. }
  889. //线上全部付款订单不可修改
  890. if (${order.receiptStatus == 3 && cmDiscernReceipt.payWay eq 1}){
  891. $(".shopOrderInput").attr("readonly",true);
  892. }
  893. // 有优惠不可修改,只能全退
  894. if (${order.discountAmount > 0 and order.onlinePayFlag eq 0}){
  895. $(".shopOrderInput").attr("readonly",true);
  896. }
  897. if(orderStatus == "true"){
  898. $("#returnWayDiv").html("");
  899. $("#returnWayDiv").html("未支付无退款");
  900. };
  901. //充值订单不可修改
  902. if (${order.rechargeGoods != null && (order.rechargeGoods eq 1 || order.rechargeGoods eq 2)}){
  903. $(".shopOrderInput").attr("readonly",true);
  904. }
  905. if(2==refundType || 3==refundType){
  906. $("input[readonly='readonly']").removeProp("readonly");
  907. }
  908. if (${order.rechargeGoods != null && order.rechargeGoods eq 1 && ableUserMoney eq 0}){
  909. alertx("本订单为缴纳订金订单,机构的余额为¥0.00,不能进行退款", function(){
  910. window.location.href = "${ctx}/order/orderList";
  911. })
  912. }
  913. if (${order.rechargeGoods != null && order.rechargeGoods eq 2 && ableUserMoney eq 0}){
  914. alertx("本订单为充值余额订单,机构的余额为¥0.00,不能进行退款", function(){
  915. window.location.href = "${ctx}/order/orderList";
  916. })
  917. }
  918. $('.upload-content .conList .btn:nth-of-type(1)').html('<div><span>+</span><h5>选择图片</h5></div>');
  919. $('.upload-content .conList .btn:nth-of-type(2)').after('<img class="cancel-upload" src="/static/images/close-btn1.png">').remove();
  920. $('.upload-content .conList').find('.cancel-upload').hide();
  921. var observeEle = document.getElementsByClassName('upload-content')[0];
  922. var MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
  923. var MutationObserverConfig={
  924. childList: true,
  925. subtree: true,
  926. characterData: true
  927. };
  928. var observer = new MutationObserver(function(mutations){
  929. $.each(mutations, function(index,item) {
  930. if (item.type === 'childList') {
  931. // 在创建新的 element 时调用
  932. var target = $(item.target),
  933. thisWrapper = target.closest('.conList'),
  934. nextEle = thisWrapper.next();
  935. thisWrapper.find('li').css('z-index',99);
  936. thisWrapper.find('.cancel-upload').show();
  937. if(nextEle.hasClass('hide-pic')) {
  938. nextEle.removeClass('hide-pic');
  939. }
  940. }
  941. })
  942. });
  943. observer.observe(observeEle,MutationObserverConfig);
  944. $('body').on('click','.upload-content li',function() {
  945. var index = $(this).closest('.conList').index() + 1,
  946. str = 'image'+index+'FinderOpen';
  947. eval(str+'()');
  948. });
  949. $('body').on('click', '.cancel-upload',function() {
  950. var wrapper = $(this).closest('.conList');
  951. wrapper.find('li').css('z-index','-1');
  952. wrapper.find('input').val('');
  953. $(this).hide();
  954. if ($('.cancel-upload:visible').length < 9) {
  955. wrapper.addClass("hide-pic");
  956. }else{
  957. wrapper.removeClass("hide-pic");
  958. }
  959. wrapper.parent().append(wrapper.clone());
  960. wrapper.remove();
  961. $(".conList").each(function(i,ele){
  962. if($(ele).find("input.input-xlarge").val()){
  963. $(ele).next().removeClass("hide-pic")
  964. }
  965. })
  966. });
  967. $(window).on("load", function(){
  968. setTimeout(function(){
  969. $("#remarkImageBox").find("input.input-xlarge").each(function(i,ele){
  970. if($(ele).val()){
  971. $(ele).next().find("li").css("z-index","99");
  972. $(ele).parents(".conList").find(".cancel-upload").show();
  973. $(ele).parents(".conList").next().removeClass("hide-pic")
  974. }
  975. })
  976. },500);
  977. });
  978. //初始化支付方式选中
  979. blockEle = $('.refund-details-block');
  980. blockEle.hide();//默认不显示
  981. var str = "${cmReturnedPurchase.returnedWay}";
  982. if(str.indexOf("1") != -1){
  983. $('.refundBalanceFee').prop('checked',true);
  984. }
  985. if(str.indexOf("2") != -1){
  986. $('.refundOnlineFee').prop('checked',true);
  987. }
  988. if(str.indexOf("3") != -1){
  989. //选中了线下则默认开启银行信息
  990. $('.refundOfflineFee').prop('checked',true);
  991. blockEle.show();
  992. }
  993. //错误提示
  994. var errorMsg = "${errorMsg}";
  995. if(errorMsg){
  996. alertx(errorMsg);
  997. }
  998. //本次退货和本次取消
  999. $('body').on('input','.refundGoodsInput, .cancelGoodsInput,.refundGoodsInput1',function() {
  1000. var receiptStatus = $('#receiptStatus').val(),
  1001. refundFee = 0,
  1002. originalAmount = getTotalAmount(); // 所有商品原始总金额
  1003. if(receiptStatus == 1) {
  1004. //如果为订单状态收款状态为1待收款,退款金额refundFee为0
  1005. refundFee = 0;
  1006. } else if(receiptStatus == 2) {
  1007. var paidAmount = Number($('#paidAmount').val()); // 已支付金额
  1008. // 如果商品原始总金额 > 已支付金额,
  1009. // 退款金额为refundFee就为已支付金额(列:商品20,运费10,用户付15,退款15)
  1010. /** 此处考虑邮费可不退,获取邮费退货数量*/
  1011. var num = $(".refundGoodsInput1").val();
  1012. var freight = ${null != order.freight ? order.freight : 0 };//默认不退
  1013. if(num > 0){//退邮费
  1014. freight = 0;
  1015. }
  1016. if(originalAmount > paidAmount) {
  1017. refundFee = paidAmount - freight;
  1018. } else {
  1019. refundFee = originalAmount - freight;
  1020. }
  1021. } else if(receiptStatus == 3) {
  1022. var managerDiscount = Number($('#discountFee').val()),
  1023. totalDiscount = Number($('#totalDiscount').val());
  1024. // 如果经理折扣 > 订单之前已退款的金额
  1025. if(managerDiscount > totalDiscount) {
  1026. // 如果商品总和 > (剩余可抵扣经理折扣)
  1027. if(originalAmount > (managerDiscount - totalDiscount)) {
  1028. refundFee = originalAmount - (managerDiscount - totalDiscount);
  1029. } else {
  1030. refundFee = 0;
  1031. }
  1032. }else {
  1033. refundFee = originalAmount;
  1034. }
  1035. }
  1036. $('.refundFee').text(refundFee.toFixed(2));
  1037. if (${cmDiscernReceipt.payWay eq 3 && order.receiptStatus == 3}) {
  1038. $('#balanceOfAccount').val(refundFee.toFixed(2));
  1039. }
  1040. })
  1041. function getTotalAmount() {
  1042. var originalAmount = 0; // 所有商品原始总金额
  1043. $('.shopOrderTable').each(function() {
  1044. var innerTable = $(this).find('.table');
  1045. innerTable.each(function() {
  1046. // 某个商品原始金额 = 单个折后单价 * (单个退货数量+单个取消数量)
  1047. var refundVal = Number($(this).find('.refundGoodsInput').val()),
  1048. cancelVal = Number($(this).find('.cancelGoodsInput').val()),
  1049. discountPrice = Number($(this).find('.discountPrice').text()),
  1050. addedValueTax = Number($(this).find('.addedValueTax').text());
  1051. var presentNum = Number($(this).find('.refundGoodsInput').attr('presentNum'));
  1052. if((refundVal != 0 || cancelVal != 0)){
  1053. originalAmount += (discountPrice * (refundVal + cancelVal - presentNum)+(refundVal + cancelVal - presentNum)*addedValueTax);
  1054. }
  1055. })
  1056. })
  1057. return originalAmount;
  1058. }
  1059. });
  1060. (function(){
  1061. $('body').click(function(e) {
  1062. var target = $(e.target),
  1063. $block = $('.operation-block');
  1064. if(target.is('.operation-btn')) {
  1065. if($block.css('display') === 'none') {
  1066. $block.show();
  1067. } else {
  1068. $block.hide();
  1069. }
  1070. }
  1071. if(!target.is('.operation-block') && !target.is('.operation-btn')) {
  1072. $block.hide();
  1073. }
  1074. });
  1075. $('.clauseId').each(function() {
  1076. var self = $(this);
  1077. if (!self.prop("checked")) {
  1078. self.parent().hide();
  1079. } else {
  1080. self.hide();
  1081. }
  1082. });
  1083. $('#invoice1, #invoice2, #invoice3').each(function () {
  1084. var self = $(this);
  1085. if (!self.prop("checked")) {
  1086. self.next().remove();
  1087. self.remove();
  1088. } else {
  1089. self.remove();
  1090. }
  1091. })
  1092. })();
  1093. function openClauseInfo(index) {
  1094. var content=$("#clauseContent"+index).val();
  1095. if (content == '') {
  1096. return false;
  1097. }
  1098. $.jBox(content, {
  1099. title: $("#clauseName"+index).val(),
  1100. width: $(top.document).width() - 440,
  1101. height: $(top.document).height()-240,
  1102. buttons: { '关闭': true }
  1103. });
  1104. }
  1105. function setApplicationReturnedNum(a,b){
  1106. var refundType = $("#refundType").val();
  1107. var num = $("#applicationReturnedNum"+a+b).val();
  1108. var max = Number($("#shipped"+a+b).html() - $("#returning"+a+b).html() - $("#returned"+a+b).html());
  1109. if(1==refundType){
  1110. if(num > max){
  1111. alertx("退货数量不能大于已发货数量(之前已退不算)!");
  1112. $("#applicationReturnedNum"+a+b).val(0)
  1113. }
  1114. if (num !== max && ${returnOnline}){
  1115. alertx("退货数量只能等于已发货数量(之前已退不算)!");
  1116. $("#applicationReturnedNum"+a+b).val(0)
  1117. }
  1118. }
  1119. };
  1120. function setApplicationCancelNum(a,b){
  1121. var refundType = $("#refundType").val();
  1122. var num = $("#applicationCancelNum"+a+b).val();
  1123. var max = Number($("#toBeShipped"+a+b).html());
  1124. if(1==refundType){
  1125. if(num > max){
  1126. alertx("取消数量不能大于待发数量,请重新填写!");
  1127. $("#applicationCancelNum"+a+b).val(0)
  1128. }
  1129. if (num !== max && ${returnOnline}){
  1130. alertx("取消数量只能等于待发数量,请重新填写!");
  1131. $("#applicationCancelNum"+a+b).val(0)
  1132. }
  1133. }
  1134. };
  1135. </script>
  1136. </body>
  1137. </html>