From b0fa89df41ab40a75b7d3b8572fe4e66657ded0b Mon Sep 17 00:00:00 2001
From: hanbo <2608504783@qq.com>
Date: Tue, 19 Apr 2022 18:39:55 +0800
Subject: [PATCH] =?UTF-8?q?=E6=98=93=E7=94=A8=E6=80=A7=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../static/assets/js/project_budget_cost.js          |  2 +-
 .../resources/templates/admin/project_approve.ftl    |  8 ++++----
 .../templates/admin/project_budget_edit.ftl          |  2 +-
 .../templates/admin/project_estimate_add.ftl         | 12 ++++++++++--
 .../templates/admin/project_estimate_edit.ftl        | 12 ++++++++++--
 5 files changed, 26 insertions(+), 10 deletions(-)

diff --git a/src/main/resources/static/assets/js/project_budget_cost.js b/src/main/resources/static/assets/js/project_budget_cost.js
index e121aec..0ba7a52 100644
--- a/src/main/resources/static/assets/js/project_budget_cost.js
+++ b/src/main/resources/static/assets/js/project_budget_cost.js
@@ -195,7 +195,7 @@ function appendTrCost() {
         '<td><input type="text" min="0.00" max="99.99" step="0.01" maxlength="5" class="number am-modal-prompt-input am-modal-prompt-input-cost input-changeable-tax-rate input-changeable-tax-rate-cost"></td>'+
         '<td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost input-changeable-total-tax-include input-changeable-total-tax-include-cost" readonly></td>'+
         '<td><input type="text" class="am-modal-prompt-input am-modal-prompt-input-cost input-changeable-total-tax-exclude input-changeable-total-tax-exclude-cost" readonly></td>'+
-        '<td><button type="button" class="am-btn am-btn-danger am-btn-xs am-round am-modal-line-delete"><span class="am-icon-minus"></span></button></td>'+
+        '<td><button type="button" style="margin-top: 10px" class="am-btn am-btn-danger am-btn-xs am-round am-modal-line-delete"><span class="am-icon-minus"></span></button></td>'+
     '</tr>';
 
     $("#costTotal").before(template);
diff --git a/src/main/resources/templates/admin/project_approve.ftl b/src/main/resources/templates/admin/project_approve.ftl
index cfb7abc..d303b20 100644
--- a/src/main/resources/templates/admin/project_approve.ftl
+++ b/src/main/resources/templates/admin/project_approve.ftl
@@ -454,7 +454,7 @@
                                             <#list incomeDetails as incomeDetail>
                                                 <tr>
                                                     <td>${(incomeDetail_index+1)!}</td>
-                                                    <td>
+                                                    <td width="66px">
                                                         <#--<select style="width: auto" readonly
                                                                 class="am-modal-prompt-input am-modal-prompt-input-income">
                                                             <option value="1" <#if incomeDetail.type == 1>selected</#if>>设备类
@@ -542,7 +542,7 @@
                                             <#list costDetails as costDetail>
                                                 <tr>
                                                     <td>${(costDetail_index+1)!}</td>
-                                                    <td>
+                                                    <td width="60px">
                                                         <#--<select style="width: auto" readonly
                                                                 class="am-modal-prompt-input am-modal-prompt-input-cost am-modal-prompt-input-cost-type">
                                                             <option value="1" <#if costDetail.type == 1>selected</#if>>设备
@@ -564,7 +564,7 @@
                                                             其他
                                                         </#if>
                                                     </td>
-                                                    <td>
+                                                    <td width="100px">
                                                         <#list procurementTypes as procurementType>
                                                             <#if costDetail.category == procurementType.id>${procurementType.name}</#if>
                                                         </#list>
@@ -626,7 +626,7 @@
                                         <tbody>
                                         <tr>
                                             <td>序号</td>
-                                            <td>财务费用类别</td>
+                                            <td width="100px">财务费用类别</td>
                                             <td>业务项目</td>
                                             <td>项目明细</td>
                                             <td>单位</td>
diff --git a/src/main/resources/templates/admin/project_budget_edit.ftl b/src/main/resources/templates/admin/project_budget_edit.ftl
index 9f06b03..73c829b 100644
--- a/src/main/resources/templates/admin/project_budget_edit.ftl
+++ b/src/main/resources/templates/admin/project_budget_edit.ftl
@@ -503,7 +503,7 @@
 
                         </tbody>
                     </table>
-                    <button type="button" id="costAddBtn" class="am-btn am-btn-primary am-btn-xs am-round"><span class="am-icon-plus"></span></button>
+                    <button type="button" style="margin-top: 10px" id="costAddBtn" class="am-btn am-btn-primary am-btn-xs am-round"><span class="am-icon-plus"></span></button>
                 </div>
                 <div class="am-modal-footer">
                     <#--<span class="am-modal-btn" data-am-modal-cancel>取消</span>-->
diff --git a/src/main/resources/templates/admin/project_estimate_add.ftl b/src/main/resources/templates/admin/project_estimate_add.ftl
index 77b2958..508469c 100644
--- a/src/main/resources/templates/admin/project_estimate_add.ftl
+++ b/src/main/resources/templates/admin/project_estimate_add.ftl
@@ -351,8 +351,8 @@
                                     <td>其他</td>
                                     <td><input type="text" id="otherName" maxlength="10" data-validate-async data-validation-message="请输入其他类的名称(10字符以内)"
                                                value="" name="otherName" placeholder="请输入其他类的名称(10字符以内)"/> </td>
-                                    <td><input type="text" class="number" maxlength="16" name="costOtherOtherTaxInclude"></td>
-                                    <td><input type="text" class="number" maxlength="16" name="costOtherOtherTaxExclude" readonly></td>
+                                    <td><input type="text" class="number" maxlength="16" name="costOtherOtherTaxInclude" id="costOtherOtherTaxInclude"></td>
+                                    <td><input type="text" class="number" maxlength="16" name="costOtherOtherTaxExclude" id="costOtherOtherTaxExclude" readonly></td>
                                     <td>
                                         <select data-am-selected name="costOtherOtherSelect" id="costOtherOtherSelect">
                                             <option value="0">0%</option>
@@ -501,6 +501,8 @@
         var costPurchaseOtherTaxExclude = $("#costPurchaseOtherTaxExclude").val();
         var costCompanyManageTaxExclude  = $("#costCompanyManageTaxExclude ").val();
         var costProjectManageTaxExclude  = $("#costProjectManageTaxExclude ").val();
+        var costOtherOtherTaxInclude  = $("#costOtherOtherTaxInclude").val();
+        var costOtherOtherTaxExclude  = $("#costOtherOtherTaxExclude").val();
 
         if (startTime.length <= 0) {
             window.confirm('项目计划开始时间不能为空');
@@ -620,6 +622,12 @@
             check = 1;
             return;
         }
+
+        if (changeToNumber(costOtherOtherTaxInclude) < changeToNumber(costOtherOtherTaxExclude)) {
+            window.confirm('其他成本含税金额应大于不含税金额');
+            check = 1;
+            return;
+        }
     }
 
     function checkName () {
diff --git a/src/main/resources/templates/admin/project_estimate_edit.ftl b/src/main/resources/templates/admin/project_estimate_edit.ftl
index 6e5526c..52e666c 100644
--- a/src/main/resources/templates/admin/project_estimate_edit.ftl
+++ b/src/main/resources/templates/admin/project_estimate_edit.ftl
@@ -358,8 +358,8 @@
                             <td>其他</td>
                             <td><input type="text" id="otherName" maxlength="10" data-validate-async data-validation-message="请输入其他类的名称(10字符以内)"
                                        value="${project.otherName!}" name="otherName" placeholder="请输入其他类的名称(10字符以内)"/> </td>
-                            <td><input type="text" class="number" maxlength="16" name="costOtherOtherTaxInclude" value="${Utils.format(estimateBean.costOtherOtherTaxInclude, "0.00")}"></td>
-                            <td><input type="text" class="number" maxlength="16" name="costOtherOtherTaxExclude" value="${Utils.format(estimateBean.costOtherOtherTaxExclude, "0.00")}" <#if estimateBean.costOtherOtherSelect! !="自定义">readonly</#if>></td>
+                            <td><input type="text" class="number" maxlength="16" name="costOtherOtherTaxInclude" id="costOtherOtherTaxInclude" value="${Utils.format(estimateBean.costOtherOtherTaxInclude, "0.00")}"></td>
+                            <td><input type="text" class="number" maxlength="16" name="costOtherOtherTaxExclude" id="costOtherOtherTaxExclude" value="${Utils.format(estimateBean.costOtherOtherTaxExclude, "0.00")}" <#if estimateBean.costOtherOtherSelect! !="自定义">readonly</#if>></td>
                             <td>
                                 <select data-am-selected name="costOtherOtherSelect" id="costOtherOtherSelect">
                                     <option value="0" <#if estimateBean.costOtherOtherSelect! =="0">selected</#if>>0%</option>
@@ -507,6 +507,8 @@
         var costPurchaseOtherTaxExclude = $("#costPurchaseOtherTaxExclude").val();
         var costCompanyManageTaxExclude  = $("#costCompanyManageTaxExclude ").val();
         var costProjectManageTaxExclude  = $("#costProjectManageTaxExclude ").val();
+        var costOtherOtherTaxInclude  = $("#costOtherOtherTaxInclude").val();
+        var costOtherOtherTaxExclude  = $("#costOtherOtherTaxExclude").val();
 
         if (startTime.length <= 0) {
             window.confirm('项目计划开始时间不能为空');
@@ -628,6 +630,12 @@
             check = 1;
             return;
         }
+
+        if (changeToNumber(costOtherOtherTaxInclude) < changeToNumber(costOtherOtherTaxExclude)) {
+            window.confirm('其他成本含税金额应大于不含税金额');
+            check = 1;
+            return;
+        }
     }
 
     function checkName () {