From 1b09bcbf64541919f5b39a923ba8ad7be8206fac Mon Sep 17 00:00:00 2001 From: vguanyiwgd Date: Tue, 9 Apr 2024 16:07:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=A6=82=E6=9E=9C=E6=9C=89?= =?UTF-8?q?=E5=A4=87=E6=B3=A8=EF=BC=8C=E5=B0=B1=E5=BF=85=E9=A1=BB=E5=A1=AB?= =?UTF-8?q?=E5=86=99=E6=89=8D=E8=83=BD=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ifca252c770685ddafe536f11c9501f1ecc671872 --- m/js/main.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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({