浏览代码

合同管理测试bug修复

ellisran 10 月之前
父节点
当前提交
4ee57b5457
共有 2 个文件被更改,包括 5 次插入1 次删除
  1. 4 0
      app/public/js/contract_detail.js
  2. 1 1
      app/view/contract/detail_modal.ejs

+ 4 - 0
app/public/js/contract_detail.js

@@ -1777,6 +1777,10 @@ $(document).ready(function() {
 
     function judgePays(node, data, name, cpInfo = null) {
         let flag = true;
+        if (!data.pay_time) {
+            toastr.error('请输入'+ (name === '付' ? '支付' : '回款') +'日期');
+            return false;
+        }
         if (!data.pay_price) {
             toastr.error('请输入'+ name +'款金额');
             return false;

+ 1 - 1
app/view/contract/detail_modal.ejs

@@ -147,7 +147,7 @@
             </div>
             <div class="modal-body">
                 <div class="form-group form-group-sm">
-                    <label><% if (ctx.contract_type === contractConst.type.expenses) { %>支付<% } else if (ctx.contract_type === contractConst.type.income) { %>回款<% } %>日期</label>
+                    <label><% if (ctx.contract_type === contractConst.type.expenses) { %>支付<% } else if (ctx.contract_type === contractConst.type.income) { %>回款<% } %>日期<b class="text-danger">*</b></label>
                     <input class="datepicker-here form-control form-control-sm" name="pay_time" placeholder="点击选择时间" data-date-format="yyyy-MM-dd" data-language="zh" type="text">
                 </div>
                 <div class="form-group">