From f639e59b9105adb2ad895b795bcb0e2c57a15e0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E7=84=B1?= Date: Fri, 15 Mar 2024 10:10:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E9=A2=91=E7=B9=81=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E5=BC=B9=E7=AA=97=EF=BC=8C=E6=96=B0=E5=A2=9E=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/src/js/custom_form_status_indicator.js | 6 ++++-- sf_maintenance/views/maintenance_views.xml | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/jikimo_frontend/static/src/js/custom_form_status_indicator.js b/jikimo_frontend/static/src/js/custom_form_status_indicator.js index 7c149de8..2bed0804 100644 --- a/jikimo_frontend/static/src/js/custom_form_status_indicator.js +++ b/jikimo_frontend/static/src/js/custom_form_status_indicator.js @@ -19,7 +19,9 @@ const filedRequiredList = { 'brand_id': { multiple: false, noLabel: false }, 'type_id': { multiple: false, noLabel: false }, 'taper_type_id': { multiple: false, noLabel: false }, - + 'eq_maintenance_id': { multiple: false, noLabel: false }, + 'overhaul_id': { multiple: false, noLabel: false }, + 'overhaul_period': { multiple: false, noLabel: false }, 'maintenance_equipment_category_id': { multiple: false, noLabel: false }, 'maintenance_type': { multiple: false, noLabel: false }, @@ -147,7 +149,7 @@ $(function () { dom.each(function () { const requiredDom = $(this).parent().prev().find('label') let t = requiredDom.html() - if (t.indexOf('c*') < 0) { + if (t && t.indexOf('c*') < 0) { t = '*' + t } requiredDom.html(t) diff --git a/sf_maintenance/views/maintenance_views.xml b/sf_maintenance/views/maintenance_views.xml index 9a57f29a..9233c7c9 100644 --- a/sf_maintenance/views/maintenance_views.xml +++ b/sf_maintenance/views/maintenance_views.xml @@ -981,16 +981,16 @@ - + - + -