Commit 38ccd26c by 杨树贤

修复disable逻辑

parent 848474ed
...@@ -12,8 +12,7 @@ ...@@ -12,8 +12,7 @@
layDate.render({ layDate.render({
elem: '#established_time' elem: '#established_time'
, type: 'month' , format: 'yyyy-MM-dd'
, format: 'yyyy-MM'
}); });
const supplierId = getQueryVariable('supplier_id'); const supplierId = getQueryVariable('supplier_id');
...@@ -120,8 +119,6 @@ ...@@ -120,8 +119,6 @@
@if(!empty($supplier)) @if(!empty($supplier))
@if($supplier['region']==2) @if($supplier['region']==2)
$('.city-div').show(); $('.city-div').show();
$('#established_time').attr('disabled', true);
$('#established_time').addClass('layui-disabled');
@endif @endif
@if($supplier['supplier_group']==\App\Model\SupplierChannelModel::SUPPLIER_GROUP_MIX) @if($supplier['supplier_group']==\App\Model\SupplierChannelModel::SUPPLIER_GROUP_MIX)
$('#agency_brands_div').show(); $('#agency_brands_div').show();
...@@ -152,8 +149,8 @@ ...@@ -152,8 +149,8 @@
$('#tax_number_required_span').show(); $('#tax_number_required_span').show();
$('#tax_number_div').show(); $('#tax_number_div').show();
$('.city-div').show(); $('.city-div').show();
//同时还要判断权限,有忽略公司校验权限的,成立时间可以不disabled //同时还要判断权限,有忽略公司校验权限的,成立时间可以不disabled,以及还有一个条件,修改的时候不能disable
if (!ignoreCompanyCheck) { if (!ignoreCompanyCheck && !supplierId) {
$('#established_time').attr('disabled', true); $('#established_time').attr('disabled', true);
$('#established_time').addClass('layui-disabled'); $('#established_time').addClass('layui-disabled');
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment