Memory_LG vor 1 Woche
Ursprung
Commit
974940a2da

+ 5 - 0
qmjszx-admin/src/main/resources/templates/voucher/add.html

@@ -91,6 +91,11 @@
                     return false;
                 }
 
+                if (voucherPrice == instantDiscount) {
+                    $.modal.alertWarning("代金券金额与门槛金额不能相同");
+                    return false;
+                }
+
                 $.operate.save(prefix + "/add", $('#form-voucher-add').serialize());
             }
         }

+ 6 - 1
qmjszx-admin/src/main/resources/templates/voucher/edit.html

@@ -30,7 +30,7 @@
                 <div class="form-group">
                     <label class="col-sm-3 control-label is-required">门槛金额:</label>
                     <div class="col-sm-8">
-                        <input name="instantDiscount" class="form-control" type="text" required>
+                        <input name="instantDiscount" th:field="*{instantDiscount}" class="form-control" type="text" required>
                     </div>
                 </div>
             </div>
@@ -94,6 +94,11 @@
                     return false;
                 }
 
+                if (voucherPrice == instantDiscount) {
+                    $.modal.alertWarning("代金券金额与门槛金额不能相同");
+                    return false;
+                }
+
                 $.operate.save(prefix + "/edit", $('#form-voucher-edit').serialize());
             }
         }