From 0f8bee120b162f41b5772b8070d86706aea21ad5 Mon Sep 17 00:00:00 2001
From: yuxianghui <3437689193@qq.com>
Date: Tue, 27 Feb 2024 17:15:22 +0800
Subject: [PATCH 1/2] =?UTF-8?q?1=E3=80=81=E6=96=B0=E5=A2=9E=E5=BF=85?=
=?UTF-8?q?=E5=A1=AB=E5=AD=97=E6=AE=B5=E5=89=8D=E6=B7=BB=E5=8A=A0=20*=20?=
=?UTF-8?q?=E7=9A=84=E6=A0=B7=E5=BC=8F=EF=BC=9B2=E3=80=81=E7=BB=99?=
=?UTF-8?q?=E5=88=80=E5=85=B7=E7=AE=A1=E7=90=86=E6=A8=A1=E5=9D=97=E7=9A=84?=
=?UTF-8?q?=E5=BF=85=E5=A1=AB=E5=AD=97=E6=AE=B5=E6=B7=BB=E5=8A=A0=E7=BA=A2?=
=?UTF-8?q?=E6=98=9F=E6=A0=B7=E5=BC=8F=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/js/custom_form_status_indicator.js | 42 +++++++++++++++++++
sf_tool_management/views/tool_base_views.xml | 30 ++++++-------
sf_tool_management/wizard/wizard_view.xml | 31 +++++++++-----
3 files changed, 78 insertions(+), 25 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 a5ca68f1..484114d0 100644
--- a/jikimo_frontend/static/src/js/custom_form_status_indicator.js
+++ b/jikimo_frontend/static/src/js/custom_form_status_indicator.js
@@ -59,4 +59,46 @@ $(function (){
}
}
})
+ function customRequired() {
+ let timer = null
+ let timer_count = 0
+ clearInterval(timer)
+ timer = setInterval(() => {
+ timer_count ++
+ const dom = $('.custom_required')
+ let tableDom = $('.table_custom_required')
+ if(tableDom.length) {
+ tableDom = tableDom.eq(0).parents('tr').children('.table_custom_required')
+ tableDom.each(function (){
+ const i = $(this).index()
+ const requiredDom = $(this).parents('table').find('thead').find('th').eq(i).find('span').eq(0)
+ const t = requiredDom.text().replace('*', '')
+ requiredDom.html('*' + t)
+ })
+ clearInterval(timer)
+ }
+ if(dom.length) {
+ dom.each(function (){
+ const requiredDom = $(this).parent().prev().find('label')
+ let t = requiredDom.html()
+ t.replace('*', '');
+ t = '*' + t
+ requiredDom.html(t)
+ })
+ clearInterval(timer)
+ }
+ if(timer_count == 20) {
+ clearInterval(timer)
+ }
+ },500)
+ }
+ var currentUrl = location.href
+ const listenerUrl = setInterval(() => {
+ const isChange = currentUrl != location.href
+ if(isChange) {
+ currentUrl = location.href
+ customRequired()
+ }
+ }, 500)
+ customRequired()
})
diff --git a/sf_tool_management/views/tool_base_views.xml b/sf_tool_management/views/tool_base_views.xml
index 1a33c713..834cec5f 100644
--- a/sf_tool_management/views/tool_base_views.xml
+++ b/sf_tool_management/views/tool_base_views.xml
@@ -296,7 +296,7 @@
-
+
@@ -325,20 +325,20 @@
-
-
-
-
-
-
+
+
@@ -969,10 +969,10 @@
}"
attrs="{'invisible': [('assemble_status', '!=', '0')]}" groups="sf_base.group_sf_mrp_user"
class="btn-primary"/>
-
-
-
-
+
+
+
+
@@ -1008,10 +1008,10 @@
attrs="{'invisible': [('assemble_status', '!=', '0')]}"
class="btn-primary"/>
-
-
-
-
+
+
+
+
diff --git a/sf_tool_management/wizard/wizard_view.xml b/sf_tool_management/wizard/wizard_view.xml
index cd15a91b..f055ffba 100644
--- a/sf_tool_management/wizard/wizard_view.xml
+++ b/sf_tool_management/wizard/wizard_view.xml
@@ -195,7 +195,7 @@
-
+
@@ -208,6 +208,7 @@
@@ -229,6 +230,7 @@
@@ -251,6 +253,7 @@
@@ -273,6 +276,7 @@
@@ -294,6 +298,7 @@
@@ -315,6 +320,7 @@
@@ -335,13 +341,15 @@
-
+
-
-
+
+
@@ -350,13 +358,16 @@
-
-
+
+
-
-
-
-
+
+
+
+
From 659f869d630322f7edaa81edb634e1c89ac83222 Mon Sep 17 00:00:00 2001
From: yuxianghui <3437689193@qq.com>
Date: Tue, 27 Feb 2024 17:20:42 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E5=8F=96=E6=B6=88=E5=88=80=E5=85=B7?=
=?UTF-8?q?=E5=AE=89=E5=85=A8=E5=BA=93=E5=AD=98=E7=9A=84tree=E8=A7=86?=
=?UTF-8?q?=E5=9B=BE=E5=BF=85=E5=A1=AB=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sf_tool_management/views/tool_base_views.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sf_tool_management/views/tool_base_views.xml b/sf_tool_management/views/tool_base_views.xml
index 834cec5f..bac6533d 100644
--- a/sf_tool_management/views/tool_base_views.xml
+++ b/sf_tool_management/views/tool_base_views.xml
@@ -296,7 +296,7 @@
-
+