12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244 |
- <%@ taglib prefix="from" uri="http://www.springframework.org/tags/form" %>
- <%@ page contentType="text/html;charset=UTF-8" %>
- <%@ include file="/WEB-INF/views/include/taglib.jsp" %>
- <html>
- <head>
- <title>申请退款退货</title>
- <meta name="decorator" content="default"/>
- <style>
- .form-horizontal .controls{margin-left:0}
- #increase,#decrease,.lineNum{width:30px;height:30px}
- .lineNum{text-align:center}
- .dateInput input{width:150px}
- .clause span{margin-left:30px}
- #productTable th{text-align:center;white-space:nowrap}
- #productTable td{text-align:center;white-space:nowrap}
- .controls{font-size:0}
- .controls .conList{display:inline-block;margin-right:15px}
- .conList .btn:nth-of-type(1){margin-left:25px}
- .select2-choice{width:100px}
- .upload-content{margin-top:-70px;display:inline-block}
- .upload-content .conList .btn:nth-of-type(1){width:90px;height:100px;border:1px solid #eee;background:#fff;position:relative}
- .upload-content .conList .btn:nth-of-type(1)>div{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#666}
- .upload-content .conList .btn:nth-of-type(1) span{font-size:35px}
- .upload-content .conList .btn:nth-of-type(1) h5{color:#666}
- .cancel-upload{background:transparent;border:none;box-shadow:none;position:relative;top:-38px;left:-25px;cursor:pointer;z-index:100}
- .upload-content .conList ol li{width:114px;min-height:80px;text-align:center;background:#fff;position:relative;top:120px}
- .hide-pic{display:none !important}
- .upload-tips{margin:10px 0}
- .weishaIcon {background:darkorange;color:white;margin:0 0px;padding:0 3px;font-style:normal;font-size: 12px; display:inline-block;border-radius:2px}
- </style>
- <script type="text/javascript">
- $(document).ready(function () {
- $("#name").focus();
- $("#inputForm").validate({
- submitHandler: function (form) {
- //线下转账
- if (${!returnOnline}){
- //判断退款金额是否和填写金额总和一致
- var obj = document.getElementsByClassName("check-item-review");
- var checked0 = obj[0].checked;
- var checked1 = obj[1].checked;
- if(!checked1 && !checked0){
- alertx("请选择退款方式");
- return;
- }
- var totalFee = 0;
- if(checked0) {
- var refundOfflineFee = $('#refundOfflineFee').val();
- if (refundOfflineFee == null || refundOfflineFee == "") {
- alertx("请填写线下转账退款数");
- return;
- } else {
- totalFee = parseFloat(refundOfflineFee) + totalFee;
- }
- //判断银行信息
- var bankAccountName = $('#bankAccountName').val();
- var bankAccountNo = $('#bankAccountNo').val();
- var openBank = $('#openBank').val();
- if (bankAccountName == null || bankAccountName == "") {
- alertx("请填写开户名");
- return;
- }
- if (bankAccountNo == null || bankAccountNo == "") {
- alertx("请填写开户账号");
- return;
- }
- if (openBank == null || openBank == "") {
- alertx("请填写开户行");
- return;
- }
- }
- if(checked1){
- var refundBalanceFee = $('#refundBalanceFee').val();
- if( refundBalanceFee == null || refundBalanceFee == ""){
- alertx("请填写账户余额退款数");
- return;
- }else{
- totalFee = parseFloat(refundBalanceFee) + totalFee;
- }
- }
- var refundFee = $(".refundFee").text();
- if(refundFee == "" || refundFee == null){
- refundFee = 0;
- }
- refundFee = parseFloat(refundFee);
- var refundType = $("#refundType").val();
- console.log("refundType------------>"+refundType);
- if(1==refundType){
- var number = refundFee - totalFee;
- if(number > 0.1 || number < -0.1){
- alertx("各退款方式的金额之和不等于退款总金额,请重新计算后再提交申请");
- return;
- }
- }else{
- var refundFee = $("#freeRefundFee").val();
- console.log("自定义退款金额------------》"+refundFee);
- if(refundFee == "" || refundFee == null){
- refundFee = 0;
- alertx("请填写自定义退款金额!");
- return;
- }
- }
- if (${cmDiscernReceipt.payWay eq 1}) {
- var businessNumber = $(".businessNumber").eq(0).text();
- if (businessNumber.length > 0) {
- if (checked0 && checked1){
- alertx("本订单为线上支付订单,由于您申请退到余额和线下转账,请在一天后联系开通了线上分账商户号的供应商" +
- "退回相应付款金额。确定付款情况请到付款管理页面查看。");
- }else if (checked0){
- alertx("本订单为线上支付订单,由于您申请线下转账,请在一天后联系开通了线上分账商户号的供应商" +
- "退回相应付款金额。确定付款情况请到付款管理页面查看。");
- }else {
- alertx("本订单为线上支付订单,由于您申请退到余额,请在一天后联系开通了线上分账商户号的供应商" +
- "退回相应付款金额。确定付款情况请到付款管理页面查看。");
- }
- }
- }
- }else if (${returnOnline}){
- var obj = document.getElementsByClassName("check-item-review");
- var checked0 = obj[0].checked;
- // var checked1 = obj[1].checked;
- if(!checked0){
- alertx("请选择退款方式");
- return;
- }
- var businessNumber = $(".businessNumber").eq(0).text();
- if (businessNumber.length > 0 && checked1) {
- alertx("本订单为线上支付订单,由于您申请退到余额,请在一天后联系开通了线上分账商户号的供应商" +
- "退回相应付款金额。确定付款情况请到付款管理页面查看。");
- }
- }
- $.jBox("本次退款(退货)操作后,需等待财务审核,确定进行本次操作吗?", {
- title: "提示",
- width: $(top.document).width() - 1550,
- height: $(top.document).height()-1400,
- buttons: { '确定':1 , '关闭': 2 },
- submit: function (v, h, f) {
- if (v == 1) {
- loading('正在提交,请稍等...');
- form.submit();
- }else{
- return;
- }
- }
- });
- },
- errorContainer: "#messageBox",
- errorPlacement: function (error, element) {
- $("#messageBox").text("输入有误,请先更正。");
- if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")) {
- error.appendTo(element.parent().parent());
- } else {
- error.insertAfter(element);
- }
- }
- });
- });
- /**
- * @param obj
- * jquery控制input只能输入数字和两位小数
- */
- function num(obj) {
- obj.value = obj.value.replace(/[^\d.]/g, ""); //清除"数字"和"."以外的字符
- obj.value = obj.value.replace(/^\./g, ""); //验证第一个字符是数字
- obj.value = obj.value.replace(/\.{2,}/g, "."); //只保留第一个, 清除多余的
- obj.value = obj.value.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
- obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3'); //只能输入两个小数
- }
- function showBankInfo() {
- if (${!returnOnline}){
- var obj = document.getElementsByClassName("refundOfflineFee"),
- blockEle = $('.refund-details-block');
- if(obj){
- if(obj[0].checked){
- //显示银行信息
- blockEle.show();
- } else {
- blockEle.hide();
- }
- }
- }
- }
- </script>
- </head>
- <body>
- <input type="hidden" id="product_index" value="${fn:length(order.orderProduct)}">
- <input type="hidden" id="ctx" value="${ctx}">
- <ul class="nav nav-tabs">
- <c:if test="${order.orderType eq 2}">
- <li><a href="${ctx}/hehe/new/order/orderList">订单列表</a></li>
- </c:if>
- <c:if test="${order.orderType ne 2}">
- <li><a href="${ctx}/order/orderList">订单列表</a></li>
- </c:if>
- <li class="active"><a href="${ctx}/bulkpurchase/cmRefundsProduct/applyRefound.rpc?orderID=${order.orderID}&id=${cmReturnedPurchase.id}">申请退货</a></li>
- </ul>
- <br/>
- <form:form id="inputForm" modelAttribute="cmReturnedPurchase" action="${ctx}/bulkpurchase/cmRefundsProduct/saveRefound" method="post"
- class="form-horizontal">
- <form:hidden path="orderID" value="${order.orderID}"/>
- <form:hidden path="userID" value="${order.userID}"/>
- <form:hidden path="id" value="${cmReturnedPurchase.id}"/>
- <%--订单收款状态:1待收款,2部分收款,3已收款--%>
- <input type="hidden" id="receiptStatus" value="${order.receiptStatus}"/>
- <%--订单已支付金额(包括余额支付金额)--%>
- <input type="hidden" id="paidAmount" value="${empty order.paidAmount? 0:order.paidAmount}"/>
- <%--订单经理折扣费用--%>
- <input type="hidden" id="discountFee" value="${empty order.discountFee? 0:order.discountFee}"/>
- <%--订单退款已退的经理折扣金额--%>
- <input type="hidden" id="totalDiscount" value="${empty order.totalDiscount? 0:order.totalDiscount}"/>
- <input type="hidden" id="orderStatus" value="${fns:isNotPay(order.status)}">
- <input type="hidden" id="isBuFenFaHuo" value="${fns:isBuFenShouKuan(order.status)}">
- <sys:message content="${message}"/>
- <table id="contentTable" class="table table-striped table-bordered table-condensed">
- <tr>
- <td colspan="2">
- <b>申请信息</b>
- </td>
- </tr>
- <tr>
- <td>退款备注</td>
- <td>
- <textarea id='remarks' name='remarks' rows='4' cols='50' style="width: 709px" maxlength="200" >${cmReturnedPurchase.remarks}</textarea>
- </td>
- </tr>
- <tr>
- <td>上传凭证</td>
- <td>
- <div class="controls upload-content" id="remarkImageBox">
- <div class="conList">
- <form:hidden id="image1" path="image1" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
- <sys:ckfinder input="image1" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
- </div>
- <div class="conList hide-pic">
- <form:hidden id="image2" path="image2" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
- <sys:ckfinder input="image2" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
- </div>
- <div class="conList hide-pic">
- <form:hidden id="image3" path="image3" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
- <sys:ckfinder input="image3" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
- </div>
- <div class="conList hide-pic">
- <form:hidden id="image4" path="image4" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
- <sys:ckfinder input="image4" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
- </div>
- <div class="conList hide-pic">
- <form:hidden id="image5" path="image5" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
- <sys:ckfinder input="image5" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
- </div>
- </div>
- <div class="conList upload-tips">
- <font color="red">注意:请上传jpg / png格式的图片,最大不超过5M,最多可上传5张</font>
- </div>
- </td>
- </tr>
- </table>
- <table id="contentTable" class="table table-striped table-bordered table-condensed">
- <tr>
- <td><b>退款编号:</b>
- ${empty returnedNo?'':(returnedNo)}
- </td>
- <c:if test="${cmReturnedPurchase.refundType eq 1 or cmReturnedPurchase.refundType eq 2}">
- <td><b>退款模式:</b>
- <form:select path="refundType" class="input-medium" id="refundType" onchange="changeType()">
- <form:option value="1">按商品金额退款</form:option>
- <form:option value="2">自定义金额退款</form:option>
- </form:select>
- </td>
- </c:if>
- <c:if test="${cmReturnedPurchase.refundType eq 3}">
- <td><b>退款模式:</b>
- <form:select path="refundType" class="input-medium" id="refundType" onchange="changeType()">
- <form:option value="2">自定义金额退款</form:option>
- </form:select>
- </td>
- </c:if>
- <td><b>申请时间:</b>
- ${returnTime}
- </td>
- <c:if test="${cmReturnedPurchase.refundType eq 1}">
- <td id="spt"><b>申请金额:</b>
- <span class="refundFee"><fmt:formatNumber value="${empty cmReturnedPurchase.refundFee?'0.00':(cmReturnedPurchase.refundFee)}" pattern="#0.00"/></span>元
- </td>
- <td id="zdy" hidden><b>申请金额:</b>
- <from:input id="freeRefundFee" path="freeRefundFee" onkeyup="num(this)" placeholder="¥0.00" value="${empty cmReturnedPurchase.freeRefundFee?'':(cmReturnedPurchase.freeRefundFee)}"></from:input>
- </td>
- </c:if>
- <c:if test="${cmReturnedPurchase.refundType eq 2 or cmReturnedPurchase.refundType eq 3}">
- <td id="spt" hidden><b>申请金额:</b>
- <span class="refundFee"><fmt:formatNumber value="${empty cmReturnedPurchase.refundFee?'0.00':(cmReturnedPurchase.refundFee)}" pattern="#0.00"/></span>元
- </td>
- <td id="zdy"><b>申请金额:</b>
- <from:input id="freeRefundFee" path="freeRefundFee" onkeyup="num(this)" placeholder="¥0.00" value="${empty cmReturnedPurchase.freeRefundFee?'':(cmReturnedPurchase.freeRefundFee)}"></from:input>
- </td>
- </c:if>
- <td><b>退款状态:</b>
- <c:if test="${empty status}">
- 待申请
- </c:if>
- <c:if test="${ not empty status}">
- <c:if test="${status eq 1}">
- 待审核
- </c:if>
- <c:if test="${status eq 2}">
- 审核通过
- </c:if>
- <c:if test="${status eq 3}">
- 审核不通过
- </c:if>
- </c:if>
- </td>
- </tr>
- <tr>
- <td colspan="4">
- <b>退款方式:</b>
- <c:if test="${order.receiptStatus eq 1}">无支付无退款</c:if>
- <c:if test="${order.receiptStatus ne 1}">
- <c:if test="${order.productCode ne 1}">
- <c:if test="${returnOnline}">
- <input class="check-item-review refundOnlineFee" type="radio" checked name="returnedWay" value='2'/>
- 线上退回
- </c:if>
- <c:if test="${!returnOnline}">
- <c:if test="${cmReturnedPurchase.refundOfflineFee>0}">
- <input class="check-item-review refundOfflineFee" checked type="checkbox" onclick="showBankInfo()"/>
- </c:if>
- <c:if test="${empty cmReturnedPurchase.refundOfflineFee or cmReturnedPurchase.refundOfflineFee eq 0}">
- <input class="check-item-review refundOfflineFee" type="checkbox" onclick="showBankInfo()"/>
- </c:if>
- 线下转账
- <from:input path="refundOfflineFee" onkeyup="num(this)" placeholder="¥0.00" value="${empty cmReturnedPurchase.refundOfflineFee?'':(cmReturnedPurchase.refundOfflineFee)}"></from:input>
- <c:if test="${order.rechargeGoods ne 1 && order.rechargeGoods ne 2 && order.organizeID != 4}">
- <c:if test="${cmReturnedPurchase.refundBalanceFee>0}">
- <input class="check-item-review refundBalanceFee" checked type="checkbox"/>
- </c:if>
- <c:if test="${empty cmReturnedPurchase.refundBalanceFee or cmReturnedPurchase.refundBalanceFee eq 0}">
- <input class="check-item-review refundBalanceFee" type="checkbox"/>
- </c:if>
- 账户余额
- <from:input path="refundBalanceFee" onkeyup="num(this)" placeholder="¥0.00"
- value="${empty cmReturnedPurchase.refundBalanceFee?'':(cmReturnedPurchase.refundBalanceFee)}"></from:input>
- </c:if>
- </c:if>
- </c:if>
- <c:if test="${order.productCode eq 1}">
- <c:if test="${cmReturnedPurchase.refundOfflineFee>0}">
- <input class="check-item-review refundOfflineFee" checked type="checkbox" onclick="showBankInfo()"/>
- </c:if>
- <c:if test="${empty cmReturnedPurchase.refundOfflineFee or cmReturnedPurchase.refundOfflineFee eq 0}">
- <input class="check-item-review refundOfflineFee" type="checkbox" onclick="showBankInfo()"/>
- </c:if>
- 线下转账
- <from:input path="refundOfflineFee" onkeyup="num(this)" placeholder="¥0.00" value="${empty cmReturnedPurchase.refundOfflineFee?'':(cmReturnedPurchase.refundOfflineFee)}"></from:input>
- <c:if test="${order.rechargeGoods ne 1 && order.rechargeGoods ne 2}">
- <c:if test="${cmReturnedPurchase.refundBalanceFee>0}">
- <input class="check-item-review refundBalanceFee" checked type="checkbox"/>
- </c:if>
- <c:if test="${empty cmReturnedPurchase.refundBalanceFee or cmReturnedPurchase.refundBalanceFee eq 0}">
- <input class="check-item-review refundBalanceFee" type="checkbox"/>
- </c:if>
- 账户余额
- <from:input path="refundBalanceFee" onkeyup="num(this)" placeholder="¥0.00" value="${empty cmReturnedPurchase.refundBalanceFee?'':(cmReturnedPurchase.refundBalanceFee)}"></from:input>
- </c:if>
- </c:if>
- <br>
- <div class="refund-details-block" style=" white-space: nowrap;">
- <font color="red">*</font>开户名:
- <from:input path="bankAccountName" value="${empty cmReturnedPurchase.bankAccountName?'':(cmReturnedPurchase.bankAccountName)}"></from:input>
- <font color="red">*</font>账号:
- <from:input path="bankAccountNo" value="${empty cmReturnedPurchase.bankAccountNo?'':(cmReturnedPurchase.bankAccountNo)}"></from:input>
- <%--<br> --%>
- <font color="red">*</font>开户行:
- <from:input path="openBank" value="${empty cmReturnedPurchase.openBank?'':(cmReturnedPurchase.openBank)}"></from:input>
- <font color="red">*</font>账户类型:
- <select name="bankAccountType" id="bankAccountType" style="width: 100px">
- <option value="" selected>请选择</option>
- <option value="1" <c:if test="${not empty cmReturnedPurchase.bankAccountType && cmReturnedPurchase.bankAccountType eq 1}"> selected="selected"</c:if>>公账</option>
- <option value="2" <c:if test="${not empty cmReturnedPurchase.bankAccountType && cmReturnedPurchase.bankAccountType eq 2}"> selected="selected"</c:if>>私账</option>
- </select>
- </div>
- </c:if>
- </td>
- </tr>
- </table>
- <table id="orderTable" class="table table-striped table-bordered table-condensed">
- <thead>
- </thead>
- <tr>
- <td>
- 订单编号(ID):${order.orderNo}(${order.orderID})
- </td>
- <td>
- 下单时间:${order.orderTime}
- </td>
- <c:if test="${order.orderType eq 2}">
- <td>
- 订单类型:${order.collageFlag eq 1?'拼团订单':'独立订单'}
- </td>
- </c:if>
- <td colspan="2">
- 订单状态:
- <c:if test="${order.status eq 11 || order.status eq 12 || order.status eq 13 ||order.status eq 21 ||order.status eq 22 ||
- 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>
- <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>
- </td>
- </tr>
- <tr>
- <td>
- 订单金额:¥<fmt:formatNumber type="number" value="${order.payTotalFee}" pattern="0.00" maxFractionDigits="2" />
- <c:if test="${not empty order.couponOrderRecord}">
- <c:if test="${order.couponOrderRecord.couponType eq 0}">
- <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(活动券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
- </c:if>
- <c:if test="${order.couponOrderRecord.couponType eq 1}">
- <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(品类券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
- </c:if>
- <c:if test="${order.couponOrderRecord.couponType eq 2}">
- <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(用户专享券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
- </c:if>
- <c:if test="${order.couponOrderRecord.couponType eq 3}">
- <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(店铺券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
- </c:if>
- <c:if test="${order.couponOrderRecord.couponType eq 4}">
- <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(新用户券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
- </c:if>
- </c:if>
- <c:if test="${not empty order.heheCouponRecord}">
- <a href="${ctx}/hehe/cmHeheCoupon/receiveDetails?userId=${order.userID}">
- <font color="red">
- (${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})
- </font>
- </a>
- </c:if>
- <c:if test="${order.reductionAmount > 0}">
- (分享减免¥${order.reductionAmount},满${order.reductionTouchPrice}减${order.reductionAmount})
- </c:if>
- </td>
- <td>
- 应收总额:¥<fmt:formatNumber type="number" value="${order.payableAmount}" pattern="0.00"
- maxFractionDigits="2"/>
- <c:if test="${order.organizeID != 4}">
- (账户余额抵扣:${order.balancePayFee})
- </c:if>
- <a href="${ctx}/order/cmDiscernReceipt/detail?id=${lastReceiptDetailId}"
- style="text-decoration: underline;margin-left: 20px">查看订单收款情况</a>
- </td>
- <c:if test="${order.organizeID != 4}">
- <td>
- 经理折扣:¥<fmt:formatNumber type="number" value="${order.discountFee}" pattern="0.00"
- maxFractionDigits="2"/>
- </td>
- </c:if>
- <td>
- 运费:
- <c:if test="${order.organizeID != 4}">
- <c:if test="${order.freePostFlag == 0}">
- 包邮
- </c:if>
- <c:if test="${order.freePostFlag == -1}">
- 到付
- </c:if>
- <c:if test="${order.freePostFlag == -2}">
- 仪器到付-产品包邮
- </c:if>
- <c:if test="${order.freePostFlag != -1 && order.freePostFlag != 0 && order.freePostFlag != -2}">
- <fmt:formatNumber value="${order.freight}" type="currency"/>
- </c:if>
- <c:if test="${order.userBeans > 0}">
- <font color="red">(采美豆抵用:${order.userBeans})</font>
- </c:if>
- </c:if>
- <c:if test="${order.organizeID == 4}">
- ${postageInfo}
- </c:if>
- </td>
- </tr>
- <tr>
- <td>
- 收款状态:
- <c:if test="${order.receiptStatus == 1}">
- <font color="red">待收款</font>
- </c:if>
- <c:if test="${order.receiptStatus == 2}">
- <font color="#ff8c00">部分收款</font>
- </c:if>
- <c:if test="${order.receiptStatus == 3}">
- <font color="green">已收款</font>
- </c:if></td>
- </td>
- <c:if test="${order.orderType eq 2}">
- <td>
- 拼团状态:
- <c:choose>
- <c:when test="${order.collageFlag eq 1 && (order.status eq 31 || order.status eq 32 || order.status eq 33)}">
- <font color="${order.collageStatus eq 1?'#00CC66':(order.collageStatus eq 2?'red':'')}">
- ${order.collageStatus eq 1?'拼团中':(order.collageStatus eq 2?'已拼成':'-')}
- </font>
- </c:when>
- <c:otherwise>
- -
- </c:otherwise>
- </c:choose>
- </td>
- </c:if>
- <td>
- 发货状态:
- <c:if test="${order.sendOutStatus == 1}">
- <font color="red">待发货</font>
- </c:if>
- <c:if test="${order.sendOutStatus == 2}">
- <font color="#ff8c00">部分发货</font>
- </c:if>
- <c:if test="${order.sendOutStatus == 3}">
- <font color="green">已发货</font>
- </c:if></td>
- </td>
- <td>
- 付款状态:
- <c:if test="${order.payStatus == 1}">
- <font color="red">待付款</font>
- </c:if>
- <c:if test="${order.payStatus == 2}">
- <font color="#ff8c00">部分付款</font>
- </c:if>
- <c:if test="${order.payStatus == 3}">
- <font color="green">已付款</font>
- </c:if></td>
- </td>
- <td>
- 退款状态:
- <c:if test="${empty order.refundType}">
- <font>无退款</font>
- </c:if>
- <c:if test="${order.refundType == 1}">
- <font>部分退款</font>
- </c:if>
- <c:if test="${order.refundType == 2}">
- <font>已退款</font>
- </c:if></td>
- </td>
- </tr>
- <tr>
- <td>
- 机构:${order.buyer}<c:if test="${order.organizeID == 3}"></c:if>
- </td>
- <td>
- 收货人:${order.bpOrderUserinfo.shouHuoRen}(${order.bpOrderUserinfo.mobile})
- </td>
- <td colspan="2">
- 地址:${order.bpOrderUserinfo.province}${order.bpOrderUserinfo.city}${order.bpOrderUserinfo.town}${order.bpOrderUserinfo.address}
- </td>
- </tr>
- </table>
- <c:forEach items="${order.newShopOrders}" var="shopOrder" varStatus="status">
- <c:if test="${!shopOrder.defaultStatus}">
- <table id="shopOrderTable${status.index}" class="table shopOrderTable table-striped table-bordered table-condensed">
- <thead></thead>
- <tr>
- <td style="width: 300px;">
- 子订单号(ID):${shopOrder.shopOrderNo}(${shopOrder.shopOrderID})
- </td>
- <td style="width: 275px;">
- 子订单金额:¥<fmt:formatNumber type="number" value="${shopOrder.totalAmount}" pattern="0.00" maxFractionDigits="2" />
- </td>
- <td>
- 收款状态:${fns:getDictLabel(shopOrder.shopReceiptStatus,'receiptStatus' ,'' )}
- </td>
- <td>
- 发货状态:${fns:getDictLabel(shopOrder.sendOutStatus,'sendOutStatus' ,'' )}
- </td>
- <td>
- 付款状态:${fns:getDictLabel(shopOrder.payStatus,'payStatus' ,'' )}
- </td>
- <td>
- 供应商:${shopOrder.shopName}
- <c:if test="${not empty shopOrder.commercialCode}">
- <font color="red" class="businessNumber">(商户号: ${shopOrder.commercialCode})</font>
- </c:if>
- </td>
- </tr>
- <c:if test="${order.onlinePayFlag eq 0}">
- <tr>
- <td>
- 商品总额:¥<fmt:formatNumber type="number" value="${shopOrder.needPayAmount}" pattern="0.00" maxFractionDigits="2" />
- </td>
- <td>
- 优惠:¥<fmt:formatNumber type="number" value="${shopOrder.eachDiscount}" pattern="0.00" maxFractionDigits="2" />
- </td>
- <td>
- 应付金额:¥<fmt:formatNumber type="number" value="${shopOrder.realPay}" pattern="0.00" maxFractionDigits="2" />
- </td>
- <td>
- 已付金额:¥<fmt:formatNumber type="number" value="${shopOrder.receiptAmount}" pattern="0.00" maxFractionDigits="2" />
- </td>
- <td colspan="2">
- 待付金额:¥<fmt:formatNumber type="number" value="${shopOrder.restAmount}" pattern="0.00" maxFractionDigits="2" />
- </td>
- </tr>
- </c:if>
- <c:forEach items="${shopOrder.newOrderProducts}" var="newOrderProduct" varStatus="productStatus">
- <tr>
- <td colspan="5">
- <table id="newOrderProductTable" class="table table-striped table-bordered table-condensed">
- <tr>
- <td rowspan="4" style="width: 295px;height: 125px">
- <img style="width: 100px;height: 100px" src="${newOrderProduct.image}">
- <font title="${newOrderProduct.name}">${fns:abbr(newOrderProduct.name,30)}</font>
- <c:if test="${newOrderProduct.returnGoodsStutas==2}">
- <label style="color: red">(不能退货)</label>
- </c:if>
- </td>
- <td style="width: 275px;">
- 单价:¥<span class="price"><fmt:formatNumber type="number"
- value="${newOrderProduct.price}"
- pattern="0.00"
- maxFractionDigits="2"/></span>
- <c:if test="${order.collageFlag eq 1}"><font color="red">(拼团价)</font></c:if>
- </td>
- <c:if test="${order.organizeID != 4}">
- <td >
- 折扣 :${newOrderProduct.discount}%
- </td>
- <td >
- 折后单价 :¥<span class="discountPrice"><fmt:formatNumber type="number" value="${newOrderProduct.discountPrice}" pattern="0.00" maxFractionDigits="2" /></span>
- </td>
- </c:if>
- <td >
- 数量(赠品):${newOrderProduct.num}(${newOrderProduct.presentNum})
- </td>
- </tr>
- <tr>
- <td>
- 规格:${newOrderProduct.unit}
- </td>
- <c:if test="${order.organizeID != 4}">
- <td style="width: 275px;">
- 税率:${newOrderProduct.taxRate}%
- </td>
- <td>
- 税费:¥<span class="addedValueTax"><fmt:formatNumber type="number" value="${newOrderProduct.addedValueTax}" pattern="0.00" maxFractionDigits="2" /></span>
- </td>
- </c:if>
- <td colspan="2">
- 总额:¥<fmt:formatNumber type="number" value="${newOrderProduct.shouldPayFee}" pattern="0.00" maxFractionDigits="2" />
- </td>
- </tr>
- <tr>
- <%--已发货=商品数量-未出库数量--%>
- <td><font color="red">已发货:<span id="shipped${status.index}${productStatus.index}">${newOrderProduct.num + newOrderProduct.presentNum - newOrderProduct.notOutStore}</span></font></td>
- <input type="hidden" id="returning${status.index}${productStatus.index}" value="${newOrderProduct.returningPurchaseProductNum}"/>
- <%--已退货=所有退货数量总和--%>
- <td><font color="red"><span>已退货:<span id="returned${status.index}${productStatus.index}">${newOrderProduct.returnedPurchaseProductNum}</span></span></font></td>
- <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>
- </tr>
- <tr>
- <%--待发货=未出库数量-取消数量--%>
- <td><font color="red">待发货:<span id="toBeShipped${status.index}${productStatus.index}">${newOrderProduct.notOutStore - newOrderProduct.cancelProductNum}</span></font></td>
- <%--已取消数量=所有已取消数量总和--%>
- <td><font color="red">已取消:<span id="toBeShipped${status.index}${productStatus.index}">${newOrderProduct.cancelProductNum}</span></font></td>
- <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>
- <form:hidden path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].shopOrderID" value="${newOrderProduct.shopOrderID}"/>
- <form:hidden path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].productID" value="${newOrderProduct.productID}"/>
- <form:hidden path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].orderProductID" value="${newOrderProduct.orderProductID}"/>
- <form:hidden path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].shopID" value="${newOrderProduct.shopID}"/>
- </tr>
- </table>
- </td>
- </tr>
- </c:forEach>
- </table>
- </c:if>
- <%--默认状态代码--%>
- <c:if test="${shopOrder.defaultStatus}">
- <table id="shopOrderTable${status.index}" class="table shopOrderTable table-striped table-bordered table-condensed">
- <thead></thead>
- <tr>
- <td style="width: 300px;">
- 子订单号(ID):${shopOrder.shopOrderNo}(${shopOrder.shopOrderID})
- </td>
- <td style="width: 275px;">
- 子订单金额:¥<fmt:formatNumber type="number" value="${shopOrder.totalAmount}" pattern="0.00" maxFractionDigits="2" />
- </td>
- <td>
- 发货状态:${fns:getDictLabel(shopOrder.sendOutStatus,'sendOutStatus' ,'' )}
- </td>
- <td>
- 付款状态:${fns:getDictLabel(shopOrder.payStatus,'payStatus' ,'' )}
- </td>
- <td>
- 供应商:${shopOrder.shopName}
- </td>
- </tr>
- <c:forEach items="${shopOrder.newOrderProducts}" var="newOrderProduct" varStatus="productStatus">
- <tr>
- <td colspan="5">
- <table id="newOrderProductTable" class="table table-striped table-bordered table-condensed">
- <tr>
- <td rowspan="4" style="width: 295px;height: 125px">
- <img style="width: 100px;height: 100px" src="${newOrderProduct.image}">
- <font title="${newOrderProduct.name}">${fns:abbr(newOrderProduct.name,30)}</font>
- </td>
- <td style="width: 275px;">
- 单价:¥<span class="price"><fmt:formatNumber type="number"
- value="${newOrderProduct.price}"
- pattern="0.00"
- maxFractionDigits="2"/></span>
- </td>
- <c:if test="${order.organizeID != 4}">
- <td>
- 折扣 :${newOrderProduct.discount}%
- </td>
- <td>
- 折后单价 :¥<span class="discountPrice"><fmt:formatNumber type="number" value="${newOrderProduct.discountPrice}" pattern="0.00" maxFractionDigits="2" /></span>
- </td>
- </c:if>
- <td>
- 数量(赠品):${newOrderProduct.num}(${newOrderProduct.presentNum})
- </td>
- </tr>
- <tr>
- <c:if test="${order.organizeID != 4}">
- <td style="width: 275px;">
- 税率:${newOrderProduct.taxRate}%
- </td>
- <td>
- 税费:¥<span class="addedValueTax"><fmt:formatNumber type="number" value="${newOrderProduct.addedValueTax}" pattern="0.00" maxFractionDigits="2" /></span>
- </td>
- </c:if>
- <td colspan="2">
- 总额:¥<fmt:formatNumber type="number" value="${newOrderProduct.shouldPayFee}" pattern="0.00" maxFractionDigits="2" />
- </td>
- </tr>
- <tr>
- <td><font color="red">已发货:<span id="shipped${status.index}${productStatus.index}">${newOrderProduct.num + newOrderProduct.presentNum - newOrderProduct.notOutStore}</span></font></td>
- <input type="hidden" id="returning${status.index}${productStatus.index}" value="${newOrderProduct.returningPurchaseProductNum}"/>
- <td><font color="red"><span>已退货:<span id="returned${status.index}${productStatus.index}">${newOrderProduct.returnedPurchaseProductNum}</span></span></font></td>
- <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>
- </tr>
- <tr>
- <td><font color="red">待发货:<span id="toBeShipped${status.index}${productStatus.index}">${newOrderProduct.notOutStore - newOrderProduct.cancelProductNum}</span></font></td>
- <td><font color="red">已取消:<span id="toBeShipped${status.index}${productStatus.index}">${newOrderProduct.cancelProductNum}</span></font></td>
- <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>
- <form:hidden path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].shopOrderID" value="${newOrderProduct.shopOrderID}"/>
- <form:hidden path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].productID" value="${newOrderProduct.productID}"/>
- <form:hidden path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].orderProductID" value="${newOrderProduct.orderProductID}"/>
- <form:hidden path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].shopID" value="${newOrderProduct.shopID}"/>
- </tr>
- </table>
- </td>
- </tr>
- </c:forEach>
- </table>
- </c:if>
- </table>
- <%--默认状态代码--%>
- <c:if test="${shopOrder.defaultStatus}">
- <table id="shopOrderTable${status.index}"
- class="table shopOrderTable table-striped table-bordered table-condensed">
- <thead></thead>
- <tr>
- <td style="width: 300px;">
- 子订单号(ID):${shopOrder.shopOrderNo}(${shopOrder.shopOrderID})
- </td>
- <td style="width: 275px;">
- 子订单金额:¥<fmt:formatNumber type="number" value="${shopOrder.totalAmount}" pattern="0.00"
- maxFractionDigits="2"/>
- </td>
- <td>
- 发货状态:${fns:getDictLabel(shopOrder.sendOutStatus,'sendOutStatus' ,'' )}
- </td>
- <td>
- 付款状态:${fns:getDictLabel(shopOrder.payStatus,'payStatus' ,'' )}
- </td>
- <td>
- 供应商:${shopOrder.shopName}
- </td>
- </tr>
- <c:forEach items="${shopOrder.newOrderProducts}" var="newOrderProduct" varStatus="productStatus">
- <tr>
- <td colspan="5">
- <table id="newOrderProductTable" class="table table-striped table-bordered table-condensed">
- <tr>
- <td rowspan="4" style="width: 295px;height: 125px">
- <img style="width: 100px;height: 100px" src="${newOrderProduct.image}">
- <font title="${newOrderProduct.name}">${fns:abbr(newOrderProduct.name,30)}</font>
- </td>
- <td style="width: 275px;">
- 单价:¥<span class="price"><fmt:formatNumber type="number"
- value="${newOrderProduct.price}"
- pattern="0.00"
- maxFractionDigits="2"/></span>
- </td>
- <td>
- 折扣 :${newOrderProduct.discount}%
- </td>
- <td>
- 折后单价 :¥<span class="discountPrice"><fmt:formatNumber type="number"
- value="${newOrderProduct.discountPrice}"
- pattern="0.00"
- maxFractionDigits="2"/></span>
- </td>
- <td>
- 数量(赠品):${newOrderProduct.num}(${newOrderProduct.presentNum})
- </td>
- </tr>
- <tr>
- <td style="width: 275px;">
- 税率:${newOrderProduct.taxRate}%
- </td>
- <td>
- 税费:¥<span class="addedValueTax"><fmt:formatNumber type="number"
- value="${newOrderProduct.addedValueTax}"
- pattern="0.00"
- maxFractionDigits="2"/></span>
- </td>
- <td colspan="2">
- 总额:¥<fmt:formatNumber type="number" value="${newOrderProduct.shouldPayFee}"
- pattern="0.00" maxFractionDigits="2"/>
- </td>
- </tr>
- <tr>
- <td><font color="red">已发货:<span
- id="shipped${status.index}${productStatus.index}">${newOrderProduct.num + newOrderProduct.presentNum - newOrderProduct.notOutStore}</span></font>
- </td>
- <input type="hidden" id="returning${status.index}${productStatus.index}"
- value="${newOrderProduct.returningPurchaseProductNum}"/>
- <td><font color="red"><span>已退货:<span
- id="returned${status.index}${productStatus.index}">${newOrderProduct.returnedPurchaseProductNum}</span></span></font>
- </td>
- <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>
- </tr>
- <tr>
- <td><font color="red">待发货:<span
- id="toBeShipped${status.index}${productStatus.index}">${newOrderProduct.notOutStore - newOrderProduct.cancelProductNum}</span></font>
- </td>
- <td><font color="red">已取消:<span
- id="toBeShipped${status.index}${productStatus.index}">${newOrderProduct.cancelProductNum}</span></font>
- </td>
- <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>
- <form:hidden
- path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].shopOrderID"
- value="${newOrderProduct.shopOrderID}"/>
- <form:hidden
- path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].productID"
- value="${newOrderProduct.productID}"/>
- <form:hidden
- path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].orderProductID"
- value="${newOrderProduct.orderProductID}"/>
- <form:hidden
- path="cmReturnedPurchaseProductList[${status.index}][${productStatus.index}].shopID"
- value="${newOrderProduct.shopID}"/>
- </tr>
- </table>
- </td>
- </tr>
- </c:forEach>
- </table>
- </c:if>
- </c:forEach>
- <div class="form-actions">
- <input id="btnSubmit" class="btn btn-primary" type="submit" value="申 请"/>
- <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
- </div>
- </form:form>
- <script type="text/javascript" src="${ctxStatic}/modules/bulkpurchase/loadAddress.js"></script>
- <script type="text/javascript" src="${ctxStatic}/modules/bulkpurchase/orderForm.js"></script>
- <script type="text/javascript" src="${ctxStatic}/modules/bulkpurchase/stages.js"></script>
- <script>
- function changeType(){
- var refundType = $("#refundType").val();
- if(1==refundType){
- var orderStatus = $("#orderStatus").val();
- var isBuFenFaHuo = $("#isBuFenFaHuo").val();
- if(isBuFenFaHuo == "true"){
- $(".shopOrderInput").attr("readonly",true);
- /*$(".shopOrderInput1").attr("readonly",false);*///设置邮费的可修改
- };
- //有促销商品订单不可修改
- if (${isPromotions}){
- $(".shopOrderInput").attr("readonly",true);
- }
- //线上全部付款订单不可修改
- if (${order.receiptStatus == 3 && cmDiscernReceipt.payWay eq 1}){
- $(".shopOrderInput").attr("readonly",true);
- }
- // 有优惠不可修改,只能全退
- if (${order.discountAmount > 0 and order.onlinePayFlag eq 0}){
- $(".shopOrderInput").attr("readonly",true);
- }
- //充值订单不可修改
- if (${order.rechargeGoods != null && (order.rechargeGoods eq 1 || order.rechargeGoods eq 2)}){
- $(".shopOrderInput").attr("readonly",true);
- }
- $("#zdy").hide();
- $("#spt").show();
- }
- if(2==refundType || 3==refundType) {
- $("input[readonly='readonly']").removeProp("readonly");
- $("#spt").hide();
- $("#zdy").show();
- }
- }
- function showBankInfo() {
- if (${!returnOnline}){
- var obj = document.getElementsByClassName("refundOfflineFee"),
- blockEle = $('.refund-details-block');
- if(obj){
- if(obj[0].checked){
- //显示银行信息
- blockEle.show();
- } else {
- blockEle.hide();
- }
- }
- }
- }
- $(function () {
- var orderStatus = $("#orderStatus").val();
- var isBuFenFaHuo = $("#isBuFenFaHuo").val();
- var refundType = $("#refundType").val();
- if(isBuFenFaHuo == "true"){
- $(".shopOrderInput").attr("readonly",true);
- /*$(".shopOrderInput1").attr("readonly",false);*///设置邮费的可修改
- };
- //有促销商品订单不可修改
- if (${isPromotions}){
- $(".shopOrderInput").attr("readonly",true);
- }
- //线上全部付款订单不可修改
- if (${order.receiptStatus == 3 && cmDiscernReceipt.payWay eq 1}){
- $(".shopOrderInput").attr("readonly",true);
- }
- // 有优惠不可修改,只能全退
- if (${order.discountAmount > 0 and order.onlinePayFlag eq 0}){
- $(".shopOrderInput").attr("readonly",true);
- }
- if(orderStatus == "true"){
- $("#returnWayDiv").html("");
- $("#returnWayDiv").html("未支付无退款");
- };
- //充值订单不可修改
- if (${order.rechargeGoods != null && (order.rechargeGoods eq 1 || order.rechargeGoods eq 2)}){
- $(".shopOrderInput").attr("readonly",true);
- }
- if(2==refundType || 3==refundType){
- $("input[readonly='readonly']").removeProp("readonly");
- }
- if (${order.rechargeGoods != null && order.rechargeGoods eq 1 && ableUserMoney eq 0}){
- alertx("本订单为缴纳订金订单,机构的余额为¥0.00,不能进行退款", function(){
- window.location.href = "${ctx}/order/orderList";
- })
- }
- if (${order.rechargeGoods != null && order.rechargeGoods eq 2 && ableUserMoney eq 0}){
- alertx("本订单为充值余额订单,机构的余额为¥0.00,不能进行退款", function(){
- window.location.href = "${ctx}/order/orderList";
- })
- }
- $('.upload-content .conList .btn:nth-of-type(1)').html('<div><span>+</span><h5>选择图片</h5></div>');
- $('.upload-content .conList .btn:nth-of-type(2)').after('<img class="cancel-upload" src="/static/images/close-btn1.png">').remove();
- $('.upload-content .conList').find('.cancel-upload').hide();
- var observeEle = document.getElementsByClassName('upload-content')[0];
- var MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
- var MutationObserverConfig={
- childList: true,
- subtree: true,
- characterData: true
- };
- var observer = new MutationObserver(function(mutations){
- $.each(mutations, function(index,item) {
- if (item.type === 'childList') {
- // 在创建新的 element 时调用
- var target = $(item.target),
- thisWrapper = target.closest('.conList'),
- nextEle = thisWrapper.next();
- thisWrapper.find('li').css('z-index',99);
- thisWrapper.find('.cancel-upload').show();
- if(nextEle.hasClass('hide-pic')) {
- nextEle.removeClass('hide-pic');
- }
- }
- })
- });
- observer.observe(observeEle,MutationObserverConfig);
- $('body').on('click','.upload-content li',function() {
- var index = $(this).closest('.conList').index() + 1,
- str = 'image'+index+'FinderOpen';
- eval(str+'()');
- });
- $('body').on('click', '.cancel-upload',function() {
- var wrapper = $(this).closest('.conList');
- wrapper.find('li').css('z-index','-1');
- wrapper.find('input').val('');
- $(this).hide();
- if ($('.cancel-upload:visible').length < 9) {
- wrapper.addClass("hide-pic");
- }else{
- wrapper.removeClass("hide-pic");
- }
- wrapper.parent().append(wrapper.clone());
- wrapper.remove();
- $(".conList").each(function(i,ele){
- if($(ele).find("input.input-xlarge").val()){
- $(ele).next().removeClass("hide-pic")
- }
- })
- });
- $(window).on("load", function(){
- setTimeout(function(){
- $("#remarkImageBox").find("input.input-xlarge").each(function(i,ele){
- if($(ele).val()){
- $(ele).next().find("li").css("z-index","99");
- $(ele).parents(".conList").find(".cancel-upload").show();
- $(ele).parents(".conList").next().removeClass("hide-pic")
- }
- })
- },500);
- });
- //初始化支付方式选中
- blockEle = $('.refund-details-block');
- blockEle.hide();//默认不显示
- var str = "${cmReturnedPurchase.returnedWay}";
- if(str.indexOf("1") != -1){
- $('.refundBalanceFee').prop('checked',true);
- }
- if(str.indexOf("2") != -1){
- $('.refundOnlineFee').prop('checked',true);
- }
- if(str.indexOf("3") != -1){
- //选中了线下则默认开启银行信息
- $('.refundOfflineFee').prop('checked',true);
- blockEle.show();
- }
- //错误提示
- var errorMsg = "${errorMsg}";
- if(errorMsg){
- alertx(errorMsg);
- }
- //本次退货和本次取消
- $('body').on('input','.refundGoodsInput, .cancelGoodsInput,.refundGoodsInput1',function() {
- var receiptStatus = $('#receiptStatus').val(),
- refundFee = 0,
- originalAmount = getTotalAmount(); // 所有商品原始总金额
- if(receiptStatus == 1) {
- //如果为订单状态收款状态为1待收款,退款金额refundFee为0
- refundFee = 0;
- } else if(receiptStatus == 2) {
- var paidAmount = Number($('#paidAmount').val()); // 已支付金额
- // 如果商品原始总金额 > 已支付金额,
- // 退款金额为refundFee就为已支付金额(列:商品20,运费10,用户付15,退款15)
- /** 此处考虑邮费可不退,获取邮费退货数量*/
- var num = $(".refundGoodsInput1").val();
- var freight = ${null != order.freight ? order.freight : 0 };//默认不退
- if(num > 0){//退邮费
- freight = 0;
- }
- if(originalAmount > paidAmount) {
- refundFee = paidAmount - freight;
- } else {
- refundFee = originalAmount - freight;
- }
- } else if(receiptStatus == 3) {
- var managerDiscount = Number($('#discountFee').val()),
- totalDiscount = Number($('#totalDiscount').val());
- // 如果经理折扣 > 订单之前已退款的金额
- if(managerDiscount > totalDiscount) {
- // 如果商品总和 > (剩余可抵扣经理折扣)
- if(originalAmount > (managerDiscount - totalDiscount)) {
- refundFee = originalAmount - (managerDiscount - totalDiscount);
- } else {
- refundFee = 0;
- }
- }else {
- refundFee = originalAmount;
- }
- }
- $('.refundFee').text(refundFee.toFixed(2));
- if (${cmDiscernReceipt.payWay eq 3 && order.receiptStatus == 3}) {
- $('#balanceOfAccount').val(refundFee.toFixed(2));
- }
- })
- function getTotalAmount() {
- var originalAmount = 0; // 所有商品原始总金额
- $('.shopOrderTable').each(function () {
- var innerTable = $(this).find('.table');
- innerTable.each(function () {
- // 某个商品原始金额 = 单个折后单价 * (单个退货数量+单个取消数量)
- var refundVal = Number($(this).find('.refundGoodsInput').val()),
- cancelVal = Number($(this).find('.cancelGoodsInput').val()),
- price = Number($(this).find('.price').text()),
- discountPrice = Number($(this).find('.discountPrice').text()),
- addedValueTax = Number($(this).find('.addedValueTax').text());
- var presentNum = Number($(this).find('.refundGoodsInput').attr('presentNum'));
- if ((refundVal != 0 || cancelVal != 0)) {
- if (${order.organizeID != 4}) {
- originalAmount += (discountPrice * (refundVal + cancelVal - presentNum) + (refundVal + cancelVal - presentNum) * addedValueTax);
- } else {
- originalAmount += (price * (refundVal + cancelVal - presentNum));
- }
- }
- })
- })
- return originalAmount;
- }
- });
- (function () {
- $('body').click(function (e) {
- var target = $(e.target),
- $block = $('.operation-block');
- if(target.is('.operation-btn')) {
- if($block.css('display') === 'none') {
- $block.show();
- } else {
- $block.hide();
- }
- }
- if(!target.is('.operation-block') && !target.is('.operation-btn')) {
- $block.hide();
- }
- });
- $('.clauseId').each(function() {
- var self = $(this);
- if (!self.prop("checked")) {
- self.parent().hide();
- } else {
- self.hide();
- }
- });
- $('#invoice1, #invoice2, #invoice3').each(function () {
- var self = $(this);
- if (!self.prop("checked")) {
- self.next().remove();
- self.remove();
- } else {
- self.remove();
- }
- })
- })();
- function openClauseInfo(index) {
- var content=$("#clauseContent"+index).val();
- if (content == '') {
- return false;
- }
- $.jBox(content, {
- title: $("#clauseName"+index).val(),
- width: $(top.document).width() - 440,
- height: $(top.document).height()-240,
- buttons: { '关闭': true }
- });
- }
- function setApplicationReturnedNum(a,b){
- debugger
- var refundType = $("#refundType").val();
- var num = $("#applicationReturnedNum"+a+b).val();
- var max = Number($("#shipped"+a+b).html() - $("#returning"+a+b).html() - $("#returned"+a+b).html());
- if(1==refundType){
- if(num > max){
- alertx("退货数量不能大于已发货数量(之前已退不算)!");
- $("#applicationReturnedNum"+a+b).val(0)
- }
- if (num != max && ${returnOnline}){
- alertx("退货数量只能等于已发货数量(之前已退不算)!");
- $("#applicationReturnedNum"+a+b).val(0)
- }
- }
- };
- function setApplicationCancelNum(a,b){
- debugger
- var refundType = $("#refundType").val();
- var num = $("#applicationCancelNum"+a+b).val();
- var max = Number($("#toBeShipped"+a+b).html());
- if(1==refundType){
- if(num > max){
- alertx("取消数量不能大于待发数量,请重新填写!");
- $("#applicationCancelNum"+a+b).val(0)
- }
- if (num != max && ${returnOnline}){
- alertx("取消数量只能等于待发数量,请重新填写!");
- $("#applicationCancelNum"+a+b).val(0)
- }
- }
- };
- </script>
- </body>
- </html>
|