新增必填项

This commit is contained in:
dragon
2024-12-25 14:48:51 +08:00
parent f5b721a6f8
commit 924971a290

View File

@@ -83,7 +83,6 @@
>
<div class="col-sm-9">
<select name="isTop" id="modal_isTop" class="form-control">
<option value=""></option>
<option value="1"></option>
<option value="0"></option>
</select>
@@ -114,7 +113,7 @@
min="1"
max="5"
placeholder="填入的数字=在首页的第几个位置"
oninput="this.value = Math.min(Math.max(this.value, 1), 5)"
oninput="this.value = Math.min(Math.max(this.value, 0), 5)"
/>
</div>
</div>
@@ -284,7 +283,6 @@ export default {
} else if (val == 0) {
return "否";
}
return "是";
},
},
{ field: "seq", title: "置顶排序", align: "center", width: "5%" },
@@ -427,6 +425,17 @@ export default {
var topStart = $("#modal_topStart").val();
var topEnd = $("#modal_topEnd").val();
var isShow = $("#modal_isShow").val();
if (
isTop == "" ||
homeType == "" ||
seq == "" ||
topStart == "" ||
topEnd == "" ||
isShow == ""
) {
alert("请填写必填项");
return;
}
if ($("#addForm").validationEngine("validate")) {
$.ajax({
type: "post",