Commit 40a2d47b by mushishixian

fix

parent 06419166
......@@ -120,13 +120,15 @@ class LogService
$result[] = $content;
}
if ($key == 'extra_fee') {
$oldFee = json_decode($oldSupplier['extra_fee'], true);
$newFee = json_decode($newSupplier['extra_fee'], true);
$content = "采购附加费由 [商品总价不满" . $oldFee['cn']['max'] . "元,收取" . $oldFee['cn']['price'] . "元;商品总价不满" .
$oldFee['cn']['max'] . "美金,收取" . $oldFee['cn']['price'] .
"元;] 修改为 [商品总价不满" . $newFee['hk']['max'] . "元,收取" . $newFee['hk']['price'] . "元;商品总价不满" .
$newFee['hk']['max'] . "美金,收取" . $newFee['hk']['price'] . "元;]";
$result[] = $content;
if (!empty($oldSupplier['extra_fee'])) {
$oldFee = json_decode($oldSupplier['extra_fee'], true);
$newFee = json_decode($newSupplier['extra_fee'], true);
$content = "采购附加费由 [商品总价不满" . $oldFee['cn']['max'] . "元,收取" . $oldFee['cn']['price'] . "元;商品总价不满" .
$oldFee['cn']['max'] . "美金,收取" . $oldFee['cn']['price'] .
"元;] 修改为 [商品总价不满" . $newFee['hk']['max'] . "元,收取" . $newFee['hk']['price'] . "元;商品总价不满" .
$newFee['hk']['max'] . "美金,收取" . $newFee['hk']['price'] . "元;]";
$result[] = $content;
}
}
}
$result = array_unique($result);
......
......@@ -75,17 +75,21 @@ class SupplierContactService
if ($result) {
//修改供应商为审核状态
$supplierModel = new SupplierChannelModel();
$supplierStatus = $supplierModel->where('supplier_id', $contact['supplier_id'])->value('status');
$supplierModel->where('supplier_id', $contact['supplier_id'])->update([
'update_time' => time(),
'status' => 1,
]);
$logService = new LogService();
$content = !empty($contact['contact_id'])?'修改联系人':'添加联系人';
$remark = json_encode([
'old_contact'=>$oldContact,
'new_contact' => $newContact,
]);
$logService->AddLog($contact['supplier_id'], LogModel::UPDATE_OPERATE, '修改供应商基本资料', $content, $remark);
//待审核(没有完善过联系人的,不需要记录日志,让其继续保持一条日志,就叫新增供应商)
if ($supplierStatus != -1) {
$logService = new LogService();
$content = !empty($contact['contact_id'])?'修改联系人':'添加联系人';
$remark = json_encode([
'old_contact'=>$oldContact,
'new_contact' => $newContact,
]);
$logService->AddLog($contact['supplier_id'], LogModel::UPDATE_OPERATE, '修改供应商基本资料', $content, $remark);
}
}
return $result;
......
......@@ -87,7 +87,6 @@ class SupplierService
//走事务
$dataResult = DB::connection('web')->transaction(function () use ($channel) {
$redis = new RedisModel();
$model = new SupplierChannelModel();
$extraFax = [
'supplier_id' => $channel['supplier_id'],
......@@ -128,6 +127,7 @@ class SupplierService
$supplierAddressService->saveAddress($address);
$extraFaxService = new SupplierExtraFeeService();
$extraFaxService->saveSupplierExtraFee($extraFax);
$this->saveRatioToRedis($supplierId);
$this->saveSkuAuditRulerToRedis($supplierId, $channel['sku_audit_ruler']);
$this->saveSkuUploadRulerToRedis($supplierId, $channel['sku_upload_ruler']);
......
......@@ -59,7 +59,11 @@ class SupplierSkuAuditRulerService
'3' => 1,
'4' => 1
];
if (empty($auditData)) {
$auditRuler['skip'] = 0;
$auditRuler['audit_ruler'] = $defaultRuler;
return json_encode($auditRuler);
}
$rulers = [];
foreach ($defaultRuler as $key => $ruler) {
if (empty($auditData[$key])) {
......
......@@ -19,14 +19,16 @@
</div>
<div class="layui-form-item">
<label class="layui-form-label">审核内容 : </label>
<div class="layui-input-block block-42" style="padding-top: 7px">
{{$auditContent['action'] .' : '}}
@if(is_array($auditContent['content']))
@foreach($auditContent['content'] as $content)
{{$content}}
@endforeach
@endif
</div>
<div class="layui-input-block block-42" style="padding-top: 7px">
{{$auditContent['action'] .' : '}}
@if(is_array($auditContent['content']))
@foreach($auditContent['content'] as $content)
{{$content}}
@endforeach
@else
{{$auditContent['content']}}
@endif
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">审核意见 : </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