diff --git a/m/js/main.js b/m/js/main.js index b7c02a5..401d9bc 100644 --- a/m/js/main.js +++ b/m/js/main.js @@ -10624,6 +10624,7 @@ $(function () { $(page).on('click', '.xhl', function () { if (!$(this).hasClass('btnDisabled')) { var notesObj = {}; + var is_notes = 1; $("input[class*='notes']").each(function() { // 获取类名并尝试匹配正则表达式以提取 date_id var className = $(this).attr("class"); @@ -10631,9 +10632,16 @@ $(function () { if (match) { var dateId = match[1]; var text = $(this).val(); // 获取placeholder文本 + if(text === ''){ + is_notes = 0; + } notesObj[dateId] = $.trim(text); // 创建对象,使用 date_id 作为键,placeholder文本作为值 } }); + if(is_notes == 0){ + $.alert('请先填写备注'); + return; + } $.showIndicator(); var token = user.token; $.ajax({ @@ -10749,6 +10757,7 @@ $(function () { $(page).on('click', '.order_yzf', function () { if (!$(this).hasClass('btnDisabled')) { var notesObj = {}; + var is_notes = 1; $("input[class*='notes']").each(function() { // 获取类名并尝试匹配正则表达式以提取 date_id var className = $(this).attr("class"); @@ -10756,9 +10765,16 @@ $(function () { if (match) { var dateId = match[1]; var text = $(this).val(); // 获取placeholder文本 + if(text === ''){ + is_notes = 0; + } notesObj[dateId] = $.trim(text); // 创建对象,使用 date_id 作为键,placeholder文本作为值 } }); + if(is_notes == 0){ + $.alert('请先填写备注'); + return; + } $.showIndicator(); var token = user.token; $.ajax({