123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <%@ page contentType="text/html;charset=UTF-8" %>
- <%@ include file="/WEB-INF/views/include/taglib.jsp"%>
- <html>
- <head>
- <title>修改应付</title>
- <meta name="decorator" content="default"/>
- <script type="text/javascript">
- $(document).ready(function() {
- //$("#name").focus();
- $("#inputForm").validate({
- ignore:"",
- submitHandler: function(form){
- loading('正在提交,请稍等...');
- form.submit();
- },
- 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);
- }
- }
- });
- });
- function updateShouldPay() {
- var shopFee = $(".shopFee").val();
- var otherFee = $(".otherFee").val();
- if(null == shopFee || "" == shopFee){
- alertx("应付供应商不能为空")
- return;
- }
- if(null == otherFee || "" == otherFee){
- alertx("应付第三方不能为空")
- return;
- }
- var shouldPayTax = $("#shouldPayTax").val();
- var shouldPayTotal = $("#shouldPayTotal").val();
- //应付采美=应付总额-应付供应商-第三方-总税费
- var cmFee = shouldPayTotal - shopFee - otherFee - shouldPayTax;
- $(".cmFee").text(cmFee);
- }
- function submit(){
- var shopFee = $(".shopFee").val();
- var otherFee = $(".otherFee").val();
- return shopFee+","+otherFee;
- }
- </script>
- </head>
- <body>
- <form:form id="inputForm" modelAttribute="shouldPay" action="${ctx}/bulkpurchase/shouldPay/" method="post" class="form-horizontal">
- <sys:message content="${message}"/>
- <input type="hidden" id="id" maxlength="20" value="${id}" class="input-medium required kong" />
- <input type="hidden" id="shopFee" maxlength="20" value="${shopFee}" class="input-medium required kong" />
- <input type="hidden" id="otherFee" maxlength="20" value="${otherFee}" class="input-medium required kong" />
- <input type="hidden" id="cmFee" maxlength="20" value="${cmFee}" class="input-medium required kong" />
- <input type="hidden" id="shouldPayTax" maxlength="20" value="${shouldPayTax}" class="input-medium required kong" />
- <input type="hidden" id="shouldPayTotal" maxlength="20" value="${shouldPayTotal}" class="input-medium required kong" />
- <div style=" width:100% ;text-align:right">
- <%--<span><p class="control-label">应付总金额:</p></span>--%>
- <span><p class="shouldPayTotal" text-aligin="right" maxlength="11">应付总金额:<fmt:formatNumber value="${shouldPayTotal}" type="currency" pattern="0.00"/></p></span>
- </div>
- <div>
- <span><label class="control-label">付供应商:</label></span>
- <span><input class="shopFee" onclick="updateShouldPay()" maxlength="11" class="required" value="<fmt:formatNumber value="${shopFee}" type="currency" pattern="0.00"/>"/></span>
- </div>
- <div>
- <span><label class="control-label">付第三方:</label></span>
- <span><input class="otherFee" onclick="updateShouldPay()" maxlength="11" class="required" value="<fmt:formatNumber value="${otherFee}" type="currency" pattern="0.00"/>"/></span>
- </div>
- <div>
- <span><label class="control-label">应付采美:</label></span>
- <span><p class="cmFee" maxlength="11"><fmt:formatNumber value="${cmFee}" type="currency" pattern="0.00"/></p></span>
- </div>
- </form:form>
- </body>
- </html>
|