diff --git a/ruoyi-admin/src/main/resources/templates/manage/order/add.html b/ruoyi-admin/src/main/resources/templates/manage/order/add.html index eba56013..7a46608e 100644 --- a/ruoyi-admin/src/main/resources/templates/manage/order/add.html +++ b/ruoyi-admin/src/main/resources/templates/manage/order/add.html @@ -5,14 +5,14 @@
@@ -38,7 +38,7 @@
- +
@@ -55,7 +55,8 @@
@@ -124,13 +125,13 @@
- +
- +
@@ -141,7 +142,7 @@
- +
@@ -296,6 +297,10 @@ top: '30px', left: '300px' }); + + $('[name="versionCode"]').on('focus',function (){ + $(this).blur() + }) }); function addRow(row) { @@ -461,9 +466,17 @@ let res = Number((price * quantity * discount).toFixed(2)) $(ele).parent().parent().find('.amount').val(res) } - $('[name="versionCode"]').on('focus',function (){ - $(this).blur() - }) + function changeOrderType(){ + let orderType=$('[name="orderType"]').val() + if(orderType=='zq'){ + $('[name="orderPartnerName"]').removeAttr('required') + $('[name="orderPartnerName"]').parent().parent().parent().find('label').removeClass('is-required') + }else{ + $('[name="orderPartnerName"]').attr('required',true) + $('[name="orderPartnerName"]').parent().parent().parent().find('label').addClass('is-required') + } + } + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/manage/order/edit.html b/ruoyi-admin/src/main/resources/templates/manage/order/edit.html index 3f3558d3..4a2cd06d 100644 --- a/ruoyi-admin/src/main/resources/templates/manage/order/edit.html +++ b/ruoyi-admin/src/main/resources/templates/manage/order/edit.html @@ -7,9 +7,8 @@ .hideTd { display: none; } - - .customerBox div { - padding-left: 25px !important; + label[for="versionCode"]{ + margin-right: 20px; } @@ -38,7 +37,7 @@
- +
@@ -55,7 +54,7 @@
@@ -131,14 +130,14 @@
+ type="text" required>
- +
@@ -148,7 +147,7 @@
- +
@@ -329,6 +328,10 @@ top: '30px', left: '300px' }); + $('[name="versionCode"]').on('focus',function (){ + $(this).blur() + }) + changeOrderType() }); function downloadTem() { @@ -462,9 +465,18 @@ $(this).blur() }) } - $('[name="versionCode"]').on('focus',function (){ - $(this).blur() - }) + + function changeOrderType(){ + let orderType=$('[name="orderType"]').val() + if(orderType=='zq'){ + $('[name="orderPartnerName"]').removeAttr('required') + $('[name="orderPartnerName"]').parent().parent().parent().find('label').removeClass('is-required') + }else{ + $('[name="orderPartnerName"]').attr('required',true) + $('[name="orderPartnerName"]').parent().parent().parent().find('label').addClass('is-required') + } + } + \ No newline at end of file