123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594 |
- <%@ 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 type="text/css">
- .table th {
- text-align: center
- }
- .table td {
- text-align: center
- }
- .pay-wrapper {
- padding: 0 10px
- }
- .pay-list-item {
- margin-bottom: 30px
- }
- .pay-table th {
- background: #f9f9f9
- }
- .pay-table tr:first-child th {
- background: #eee !important
- }
- .pay-table td {
- background: #fff !important
- }
- input[type="checkbox"]::before {
- content: '\a0';
- display: inline-block;
- vertical-align: .2em;
- width: .8em;
- height: .8em;
- margin-right: .2em;
- border-radius: .2em;
- text-indent: .15em;
- line-height: .65
- }
- .t-btn {
- width: 120px;
- height: 30px;
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- border-radius: 5px;
- background: #fff;
- border: 1px solid #ddd;
- margin-bottom: 10px
- }
- #select-all {
- width: 70px;
- height: 30px;
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- border-radius: 5px;
- background: #fff;
- border: 1px solid #ddd;
- margin-bottom: 10px
- }
- #select-all:active {
- background: #3daae9;
- color: #fff
- }
- .pay-more-func {
- float: right;
- color: #2fa4e7;
- cursor: pointer
- }
- .pay-more-func span:first-child {
- margin-right: 6px
- }
- .pay-more-func span:hover {
- color: #7aa9c3
- }
- .mask {
- width: 100%;
- height: 100%;
- position: fixed;
- top: 0;
- background: rgba(0, 0, 0, 0.7);
- display: none
- }
- .revise-popup-content, .tips-popup-content {
- width: 40%;
- height: auto;
- padding-bottom: 30px;
- background: #fff;
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- border-radius: 5px;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%)
- }
- .revise-popup-content {
- width: 450px;
- height: 360px;
- overflow-y: scroll;
- padding: 0 15px 30px 15px
- }
- .tips-popup-content {
- width: 30%
- }
- .tips-popup-content p {
- text-align: center;
- padding: 80px;
- font-size: 20px
- }
- .revise-popup-content h4, .tips-popup-content h4 {
- padding-left: 10px;
- height: 40px;
- line-height: 40px;
- border-bottom: 1px solid #eee;
- margin-bottom: 20px
- }
- .revise-popup-content div {
- margin-top: 7px;
- text-align: center
- }
- .revise-popup-content label {
- width: 70px;
- text-align: right;
- vertical-align: text-bottom
- }
- .revise-popup-content button {
- width: 80px;
- height: 30px;
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- border-radius: 5px
- }
- .revise-popup-content > div:nth-of-type(4) > span:first-child {
- margin-left: -104px
- }
- .revise-popup-content > div:nth-of-type(4) > span:last-child {
- margin-left: 30px
- }
- .revise-popup-content > div:nth-of-type(4) > span span {
- margin-left: 10px
- }
- .revise-popup-content > div:last-child {
- text-align: center;
- margin-top: 20px
- }
- .revise-popup-content input {
- width: 100px;
- margin-bottom: 0px
- }
- .tips-input-wrapper {
- width: 100px
- }
- .pay-status {
- height: 40px;
- line-height: 40px;
- display: block
- }
- .form-search label {
- width: 80px;
- text-align: left;
- margin-top: 12px
- }
- .remark-textarea {
- width: 95%;
- height: 100px;
- resize: none
- }
- .remark-title {
- text-align: left !important
- }
- .remark-title span {
- color: red
- }
- .ul-form {
- white-space: nowrap;
- margin-left: -10px !important
- }
- .ul-form label {
- width: 90px;
- text-align: left;
- margin-top: 15px
- }
- .time-space-symbols {
- width: 100px;
- display: inline-block;
- text-align: center
- }
- #btnSubmit {
- width: 128px;
- margin-left: 165px
- }
- .pay-status label {
- margin-left: 0
- }
- .pay-status label:first-child {
- margin-left: 10px
- }
- .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">
- function page(n, s) {
- $("#pageNo").val(n);
- $("#pageSize").val(s);
- $("#searchForm").submit();
- return false;
- }
- </script>
- </head>
- <body>
- <ul class="nav nav-tabs">
- <li><a href="${ctx}/order/cmPayShop/payList">付款列表</a></li>
- <li class="active tab-li"><a href="${ctx}/shopOrder/payThirdParties">申请付第三方</a></li>
- <shiro:hasPermission name="order:cmPayShop:split">
- <li><a href="${ctx}/shopOrder/splitList">子订单手动分账</a></li>
- </shiro:hasPermission>
- <li><a href="${ctx}/shopOrder/settlement">子订单手动结算</a></li>
- </ul>
- <form:form id="searchForm" onsubmit="submitFunc()" modelAttribute="newShopOrder"
- action="${ctx}/shopOrder/payThirdParties" method="post" class="breadcrumb form-search">
- <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
- <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
- <div class="ul-form">
- <label>子订单ID:</label>
- <form:input path="shopOrderID" htmlEscape="false" onkeyup="onlynum(this)" maxlength="8" class="input-medium"/>
- <label>子订单编号:</label>
- <form:input path="shopOrderNo" htmlEscape="false" maxlength="20" class="input-medium"/>
- <label>订单ID:</label>
- <form:input path="orderID" htmlEscape="false" onkeyup="onlynum(this)" maxlength="8" class="input-medium"/>
- <label>订单编号:</label>
- <form:input path="orderNo" htmlEscape="false" maxlength="20" class="input-medium"/><br>
- <label>供应商:</label>
- <form:input path="shopName" htmlEscape="false" maxlength="20" class="input-medium"/>
- <label>机构:</label>
- <form:input path="clubName" htmlEscape="false" maxlength="20" class="input-medium"/>
- <label class="control-label">下单时间:</label>
- <form:input path="startTime" type="text" maxlength="10" class="input-medium Wdate" value="${startTime}"
- onclick="WdatePicker({dateFmt:'yyyy-MM-dd ',isShowClear:false});"/>
- <span class="time-space-symbols">至</span>
- <form:input path="endTime" type="text" maxlength="10" class="input-medium Wdate" value="${endTime}"
- onclick="WdatePicker({dateFmt:'yyyy-MM-dd ',isShowClear:false});"/>
- <div class="pay-status">
- <label>组织:</label>
- <form:select path="organizeID" class="input-medium">
- <form:option value="" label="请选择"/>
- <form:option value="0" label="采美"/>
- <form:option value="9999" label="呵呵商城"/>
- <c:forEach items="${cmUserOrganizeList}" var="organize">
- <c:if test="${organize.id!=4}">
- <form:option value="${organize.id}" label="${organize.organizeName}"/>
- </c:if>
- </c:forEach>
- </form:select>
- <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
- </div>
- <div class="clearfix"></div>
- </div>
- </form:form>
- <sys:message content="${message}"/>
- <div class="pay-wrapper">
- <button id="applyShopOtherFee" class="t-btn" style="color:white;background-color:#2F6FAB">付第三方申请</button>
- <c:forEach items="${page.list}" var="s" varStatus="sIndex">
- <div class="pay-list-item">
- <table class="table table-striped table-bordered table-condensed pay-table">
- <tr>
- <th style="width:20px;">
- <input type="checkbox" ${s.status eq 7 ?'disabled':''} data-shoporderid="${s.shopOrderID}" data-shopid="${s.shopID}" data-isPayShopOtherFee="${s.payShopOtherFee}"/>
- </th>
- <th>子订单编号(ID)</th>
- <th colspan="3">订单编号(ID)</th>
- <th colspan="2">订单金额</th>
- <th colspan="3">下单时间</th>
- <th>收款状态</th>
- <th>收款金额</th>
- <th colspan="3">经理折扣</th>
- <th>优惠券</th>
- <th>成本类型</th>
- </tr>
- <tr>
- <td><a href="${ctx}/order/detail?id=${s.orderID}">${s.shopOrderNo}(${s.shopOrderID})</a></td>
- <td colspan="3"><a href="${ctx}/order/detail?id=${s.orderID}">${s.orderNo}(${s.orderID})</a></td>
- <td colspan="2"><fmt:formatNumber value="${s.payTotalFee}" type="number" pattern="#,##0.00"/></td>
- <td colspan="3">${s.orderTime}</td>
- <%--此处对应订单列表收款状态--%>
- <td><a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1" style="text-decoration: underline">
- <c:if test="${s.receiptStatus == 1}"><font color="red">待收款</font></c:if>
- <c:if test="${s.receiptStatus == 2}"><font color="#ff8c00">部分收款</font></c:if>
- <c:if test="${s.receiptStatus == 3}"><font color="green">已收款</font></c:if></a>
- </td>
- <td><a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1" style="text-decoration: underline">${s.receiptTotalFee}</a></td>
- <td colspan="3">
- <c:if test="${s.discountTotalFee gt 0}">
- <c:if test="${s.discountTotalFee gt s.returnedPurchaseTotalFee}">
- <fmt:formatNumber value="${s.discountTotalFee - s.returnedPurchaseTotalFee}"
- type="currency"/>
- </c:if>
- <c:if test="${s.discountTotalFee le s.returnedPurchaseTotalFee}">
- ¥0.00
- </c:if>
- <c:if test="${s.returnedPurchaseTotalFee gt 0}">
- <span style="color: red">
- (原<fmt:formatNumber value="${s.discountTotalFee}" type="currency"/>,因退货折扣取消
- <c:if test="${s.discountTotalFee gt s.returnedPurchaseTotalFee}">
- <fmt:formatNumber value="${s.returnedPurchaseTotalFee}" type="currency"/>
- </c:if>
- <c:if test="${s.discountTotalFee le s.returnedPurchaseTotalFee}">
- <fmt:formatNumber value="${s.discountTotalFee}" type="currency"/>
- </c:if>)
- </span>
- </c:if>
- </c:if>
- <c:if test="${s.discountTotalFee le 0}">¥0.00</c:if>
- </td>
- <td>
- ${s.couponAmount}
- </td>
- <td colspan="2"><c:if test="${empty s.costType || s.costType == '1'}">固定成本</c:if><c:if
- test="${s.costType == '2'}">比例成本</c:if></td>
- </tr>
- <tr>
- <th>供应商</th>
- <th colspan="3">机构</th>
- <th>机构运费</th>
- <th>供应商运费</th>
- <th colspan="3">商品费</th>
- <th colspan="2">付款状态</th>
- <th colspan="3">应付税费</th>
- <th>付供应商</th>
- <th>付第三方</th>
- </tr>
- <tr>
- <td>${s.shopName}</td>
- <td colspan="3">
- <c:if test="${s.organizeID eq 1}"><span class="org-note">星范</span></c:if>
- ${s.clubName}
- <c:if test="${s.orderType eq 2}"><font color="red">(呵呵商城)</font></c:if>
- <c:if test="${s.organizeID == 3}"><em class="weishaIcon">维沙</em></c:if>
- </td>
- <td>
- <c:if test="${s.freight == 0}">
- 包邮
- </c:if>
- <c:if test="${s.freight == -1}">
- 到付
- </c:if>
- <c:if test="${s.freight == -2}">
- 仪器到付-产品包邮
- </c:if>
- <c:if test="${s.freight != -1 && s.freight != 0 && s.freight != -2}">
- <fmt:formatNumber value="${s.freight}" type="currency"/>
- <c:if test="${s.returnedFreightFlag eq true}"><font color="red">(已退)</font></c:if>
- </c:if>
- <c:if test="${s.userBeans > 0}">
- <br><font color="red">(采美豆抵用:${s.userBeans})</font>
- </c:if>
- </td>
- <td class="freight"><fmt:formatNumber value="${s.shopPostFee}" type="number"
- pattern="#,##0.00"/></td>
- <td colspan="3" class="product-fee"><fmt:formatNumber value="${s.shopProductAmount}" type="number"
- pattern="#,##0.00"/></td>
- <td colspan="2"><c:if test="${s.payStatus == 1 || empty s.payStatus || s.payStatus == 0}"><font
- color="red">待付款</font></c:if>
- <c:if test="${s.payStatus == 2}"><font color="#ff8c00">部分付款</font></c:if>
- <c:if test="${s.payStatus == 3}"><font color="green">已付款</font></c:if></td>
- <td colspan="3" class="taxes"><fmt:formatNumber value="${s.shopTaxFee}" type="number"
- pattern="#,##0.00"/></td>
- <td class="supplier-fee">
- <c:if test="${s.differenceType ne 1 && s.differenceType ne 2 }">
- <font color="#E15616"><fmt:formatNumber value="${s.shouldPayShopAmount}" type="number"
- pattern="#,##0.00"/></font>
- </c:if>
- <c:if test="${s.differenceType eq 1 && s.differencePrice > 0}">
- <font color="black"><fmt:formatNumber value="${s.shouldPayShopAmount+s.differencePrice}"/></font><font color="red">(原应付:${s.shouldPayShopAmount},已补差价:${s.differencePrice})</font>
- </c:if>
- <c:if test="${s.differenceType eq 2 && s.differencePrice > 0}">
- <font color="black"><fmt:formatNumber value="${s.shouldPayShopAmount-s.differencePrice}"/></font><font color="red">(原应付:${s.shouldPayShopAmount},已退差价:${s.differencePrice})</font>
- </c:if>
- </td>
- <input type="hidden" class="payedShopAmount" value="${s.payedShopAmount}">
- <input type="hidden" class="productAmount" value="${s.productAmount}">
- <input type="hidden" class="costType" value="${s.costType}">
- <input type="hidden" class="proportional" value="${s.proportional}">
- <input type="hidden" class="modifyShouldPayNote" value="${s.modifyShouldPayNote}">
- <td class="third-party-fee"><fmt:formatNumber value="${s.shopOtherFee}" type="number"
- pattern="#,##0.00"/></td>
- </tr>
- <tr>
- <th>商品名</th>
- <th>规格</th>
- <th>数量<%--(赠品)--%></th>
- <th>退货</th>
- <th colspan="2">单价</th>
- <th colspan="3">机构税率 / 单税费 / 总税费</th>
- <th colspan="2">总价</th>
- <th colspan="3">供应商税率 / 单税费 / 总税费</th>
- <th>成本(单)</th>
- <th>成本(总)</th>
- </tr>
- <c:forEach items="${s.newOrderProducts}" var="p" varStatus="pIndex">
- <tr class="pay-product-item">
- <input type="hidden" class="p-copId" value="${p.orderProductID}">
- <td style="width:300px;" class="p-name">
- <c:if test="${p.productType eq 1}"><font color="red">协商赠品:</font></c:if>
- <c:if test="${p.productType eq 2}"><font color="red">促销赠品:</font></c:if>
- ${p.name}
- </td>
- <td style="width:80px;">${p.unit}</td>
- <td class="p-num" data-num="${p.num + p.presentNum}">
- ${p.num}
- <c:if test="${p.presentNum > 0}">(赠:${p.presentNum})</c:if>
- </td>
- <td><font color="${p.returnedNum>0?'red':''}">${p.returnedNum}</font></td>
- <td colspan="2"><fmt:formatNumber value="${empty p.touchPrice?p.discountPrice:p.touchPrice}"
- type="number" pattern="#,##0.00"/>
- <c:if test="${p.includedTax != null and p.includedTax != '' and p.includedTax ne 2}">
- <label style="color: red">
- (${p.includedTax eq 1?'含税':(p.invoiceType eq 1 or p.invoiceType eq 2)?'不含税-能开票':'不含税-不能开票'})
- </label>
- </c:if>
- </td>
- <td>${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'---':empty p.taxRate?0.0:p.taxRate}${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'':'%'}</td>
- <td>${(p.includedTax ne '' and (p.includedTax eq 1 or (p.includedTax eq 0 and p.invoiceType eq 3)))?'---': empty p.addedValueTax ?0.00:p.addedValueTax}</td>
- <td>
- <c:choose>
- <c:when test="${(p.includedTax ne '' and (p.includedTax eq 1 or (p.includedTax eq 0 and p.invoiceType eq 3)))}">
- ---
- </c:when>
- <c:otherwise>
- <fmt:formatNumber
- value="${empty p.totalAddedValueTax ?0.00:(p.addedValueTax * (p.num+p.presentNum-p.returnedNum))}"
- type="number" pattern="#,##0.00"/>
- </c:otherwise>
- </c:choose>
- </td>
- <td colspan="2"><fmt:formatNumber
- value="${((empty p.touchPrice?p.discountPrice:p.touchPrice) + p.addedValueTax)*(p.num+p.presentNum-p.returnedNum)}"
- type="number" pattern="#,##0.00"/></td>
- <td class="p-taxes">${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'---':empty p.supplierTaxRate?0.0:p.supplierTaxRate}${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'':'%'}</td>
- <td class="p-taxes">${(p.includedTax ne '' and (p.includedTax eq 1 or (p.includedTax eq 0 and p.invoiceType eq 3)))?'---': empty p.singleShouldPayTotalTax ?0.00:p.singleShouldPayTotalTax}</td>
- <td class="p-taxes-t">
- <c:choose>
- <c:when test="${(p.includedTax ne '' and (p.includedTax eq 1 or (p.includedTax eq 0 and p.invoiceType eq 3)))}">
- ---
- </c:when>
- <c:otherwise>
- <fmt:formatNumber
- value="${empty p.shouldPayTotalTax ?0.00:(p.singleShouldPayTotalTax * (p.num+p.presentNum-p.returnedNum))}"
- type="number" pattern="#,##0.00"/>
- </c:otherwise>
- </c:choose>
- </td>
- <td class="p-costprice"><fmt:formatNumber value="${p.costPrice}" type="number"
- pattern="#,##0.00"/></td>
- <td><fmt:formatNumber value="${p.costPrice * (p.num + p.presentNum - p.returnedNum)}"
- type="number" pattern="#,##0.00"/></td>
- </tr>
- </c:forEach>
- </table>
- <div class="pay-more-func">
- <a href="${ctx}/shopOrder/payShopRemark?shopOrderId=${s.shopOrderID}">应付备注</a>
- <a href="${ctx}/shopOrder/payedAndRefundRecordList?shopOrderID=${s.shopOrderID}&operatingMode=${operatingMode}">退/付款记录</a>
- </div>
- </div>
- </c:forEach>
- </div>
- <div class="pagination">${page}</div>
- <script>
- (function () {
- var payTableEle = $('.pay-table'),
- payProductEle = $('.pay-product-item');
- payTableEle.each(function (i, l) {
- var leftLength = $(this).find('tr').length,
- productLength = $(this).find('.pay-product-item').length;
- // 左侧栏合并单元格
- $(this).find('tr:first-child th:first-child').attr('rowspan', leftLength);
- });
- $('.tab-li').on('click', function () {
- if (getCheckedArr) {
- sessionStorage.removeItem('checkedIndexArr');
- }
- });
- //付第三方
- $('#applyShopOtherFee').on('click', function () {
- var checked = $('.pay-wrapper input[type=checkbox]:checked');
- if (checked.length < 1) {
- alertx('请选择一个子订单');
- return false;
- }
- if (checked.length > 1) {
- alertx('每次只能选择一个子订单进行付第三方申请');
- return false;
- }
- var isPayShopOtherFee = $(checked[0]).attr('data-isPayShopOtherFee');
- if ("false" == isPayShopOtherFee) {
- alertx("付第三方处于待审核状态,暂不能操作");
- return false;
- }
- var shopOrderId = $(checked[0]).attr('data-shoporderid');
- window.location.href = '${ctx}/order/cmPayShop/shopOtherFeeForm?shopOrderId=' + shopOrderId+'&payType=2';
- });
- //供应商差价申请
- $('#applyDifferencePrice').on('click', function () {
- var checked = $('.pay-wrapper input[type=checkbox]:checked');
- if (checked.length < 1) {
- alertx('请选择一个子订单');
- return false;
- }
- if (checked.length > 1){
- alertx('每次只能选择一个子订单进行供应商差价申请');
- return false;
- }
- var shopOrderId = $(checked[0]).attr('data-shoporderid');
- window.location.href = '${ctx}/order/cmPayShop/differencePriceForm?shopOrderId=' + shopOrderId;
- });
- })();
- /**
- * @param obj
- * jquery控制input只能输入数字
- */
- function onlynum(obj) {
- obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
- }
- function submitFunc() {
- var checkedArr = [];
- $('.pay-checkbox').each(function (index) {
- var thisStatus = $(this).prop('checked');
- if (thisStatus) {
- checkedArr.push(index);
- }
- })
- if (checkedArr.length > 0) {
- sessionStorage.setItem('checkedIndexArr', JSON.stringify(checkedArr));
- } else {
- sessionStorage.setItem('checkedIndexArr', []);
- }
- }
- function inputnum(obj, val) {
- 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'); //只能输入两个小数
- }
- </script>
- </body>
- </html>
|