Commit 50f2a90b by 杨树贤

修复bug

parent 01281b32
...@@ -66,6 +66,11 @@ class SupplierAuditService ...@@ -66,6 +66,11 @@ class SupplierAuditService
if ($result) { if ($result) {
//如果状态是复审 //如果状态是复审
if ($supplier['status'] == SupplierChannelModel::STATUS_NEED_REVIEW) { if ($supplier['status'] == SupplierChannelModel::STATUS_NEED_REVIEW) {
if ($status == SupplierChannelModel::STATUS_PASSED) {
SupplierChannelModel::where('supplier_id', $supplierId)->update([
'level' => 'E',
]);
}
$auditStatus = $status == SupplierChannelModel::STATUS_PASSED ? '复审通过' : '复审不通过,原因是 : ' . $rejectReason; $auditStatus = $status == SupplierChannelModel::STATUS_PASSED ? '复审通过' : '复审不通过,原因是 : ' . $rejectReason;
$action = '复审供应商'; $action = '复审供应商';
} else { } else {
...@@ -222,8 +227,8 @@ class SupplierAuditService ...@@ -222,8 +227,8 @@ class SupplierAuditService
return true; return true;
} }
foreach ($oldPayTypeData as $key => $data) { foreach ($oldPayTypeData as $key => $data) {
if (array_diff($data,array_get($payTypeData,$key))) { if (array_diff($data, array_get($payTypeData, $key))) {
return true; return true;
} }
} }
} }
......
...@@ -127,8 +127,8 @@ class SupplierTransformer ...@@ -127,8 +127,8 @@ class SupplierTransformer
$log = $logModel->where('supplier_id', $supplier['supplier_id']) $log = $logModel->where('supplier_id', $supplier['supplier_id'])
->where('type', LogModel::UPDATE_OPERATE)->orderBy('id', 'desc')->first(); ->where('type', LogModel::UPDATE_OPERATE)->orderBy('id', 'desc')->first();
$supplier['last_update_name'] = $log['admin_name'] ?: '无'; $supplier['last_update_name'] = $log['admin_name'] ?: '无';
$supplier['last_update_time'] = empty($supplier['last_update_time']) ? date('Y-m-d H:i:s', $supplier['last_update_time'] = empty($supplier['last_update_time']) ? ($log['add_time'] ? date('Y-m-d H:i:s',
$log['add_time']) : '无'; $log['add_time']):'无') : '无';
$supplier['has_certification_name'] = array_get(config('fixed.CertificationStatus'), $supplier['has_certification_name'] = array_get(config('fixed.CertificationStatus'),
array_get($supplier, 'has_certification', ''), ''); array_get($supplier, 'has_certification', ''), '');
$supplier['sku_tag_name'] = array_get(config('field.SkuTag'), array_get($supplier, 'sku_tag', ''), '无'); $supplier['sku_tag_name'] = array_get(config('field.SkuTag'), array_get($supplier, 'sku_tag', ''), '无');
......
...@@ -107,6 +107,11 @@ ...@@ -107,6 +107,11 @@
{field: 'has_sku', title: 'SKU上传', align: 'center', width: 80}, {field: 'has_sku', title: 'SKU上传', align: 'center', width: 80},
{ {
field: 'uploaded_sku', title: 'SKU合作', align: 'center', width: 80, templet: function (data) {
return data.uploaded_sku > 0 ? '是' : '否';
}
},
{
field: 'status_name', title: '状态', align: 'center', width: 80, templet: function (data) { field: 'status_name', title: '状态', align: 'center', width: 80, templet: function (data) {
if (data.status === 3) { if (data.status === 3) {
return "<span style='color: red' title='" + data.reject_reason + "'>" + data.status_name + "</span>" return "<span style='color: red' title='" + data.reject_reason + "'>" + data.status_name + "</span>"
......
...@@ -65,14 +65,12 @@ ...@@ -65,14 +65,12 @@
}); });
//监听供应商类别单选,如果是临时供应商,附件可以不上传 //监听供应商类别单选,如果是临时供应商,附件可以不上传
form.on('radio(is_type)', function(data){ form.on('radio(supplier_type)', function(data){
console.log(data.elem); //得到radio原始DOM对象 let supplier_type = data.value;
console.log(data.value); //被点击的radio的value值 if (supplier_type === '1') {
let isType = data.value;
if (isType === '1') {
$('#attachment_required_span').hide();
}else{
$('#attachment_required_span').show(); $('#attachment_required_span').show();
}else{
$('#attachment_required_span').hide();
} }
}); });
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
@endif @endif
<div class="layui-form-item"> <div class="layui-form-item">
@inject('singleSelectPresenter','App\Presenters\SingleSelectPresenter') @inject('singleSelectPresenter','App\Presenters\SingleSelectPresenter')
{!! $singleSelectPresenter->render('supplier_type','供应商类别',!empty($supplier)?array_get($supplier,'supplier_type',0):'',config('field.SupplierType'),['required'=>true]) !!} {!! $singleSelectPresenter->render('supplier_type','供应商类别',!empty($supplier)?array_get($supplier,'supplier_type',0):'1',config('field.SupplierType'),['required'=>true]) !!}
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label"><span class="require">*</span>供应商名称 : </label> <label class="layui-form-label"><span class="require">*</span>供应商名称 : </label>
......
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