Commit efaacd21 by mushishixian

联系人和银行信息删除不需要变成待审核

parent 2b9b1347
......@@ -133,17 +133,6 @@ class SupplierContactApiController extends Controller
$this->response(-1, '删除失败');
}
$supplierModel = new SupplierChannelModel();
$supplierStatus = $supplierModel->where('supplier_id', $contact['supplier_id'])->value('status');
//不等于-1的时候是第一次新增供应商,单独操作联系人,不需要修改状态
if ($supplierStatus != SupplierChannelModel::STATUS_PENDING) {
//修改为审核状态
$supplierModel = new SupplierChannelModel();
$supplierModel->where('supplier_id', $contact['supplier_id'])->update([
'update_time' => time(),
'status' => SupplierChannelModel::STATUS_IN_REVIEW,
]);
}
$logService = new LogService();
$content = '删除联系人';
$remark = json_encode(['old_contact' => $contact, 'new_contact' => []]);
......
......@@ -97,18 +97,6 @@ class SupplierReceiptApiController extends Controller
$model = new SupplierReceiptModel();
$result = $model->where('receipt_id', $receiptId)->delete();
if ($result) {
//修改供应商为审核状态
$supplierId = $model->where('receipt_id', $receiptId)->value('supplier_id');
$supplierModel = new SupplierChannelModel();
$supplierStatus = $supplierModel->where('supplier_id',$supplierId)->value('status');
//不等于-1的时候是第一次新增供应商,单独银行信息,不需要修改状态
if ($supplierStatus != SupplierChannelModel::STATUS_PENDING) {
$supplierModel = new SupplierChannelModel();
$supplierModel->where('supplier_id', $supplierId)->update([
'update_time' => time(),
'status' => 1,
]);
}
$this->response(0, '操作成功');
}
$this->response(-1, '操作失败');
......
......@@ -147,6 +147,7 @@ class SupplierService
$contactModel->insert($contact);
} else {
$supplierId = $this->newSupplierId = $channel['supplier_id'];
//要做进一步判断,部分字段修改不需要审核
$channel['status'] = SupplierChannelModel::STATUS_IN_REVIEW;
$channel['update_time'] = time();
$model->where('supplier_id', $supplierId)->update($channel);
......@@ -177,7 +178,7 @@ class SupplierService
$logType = !empty($channel['supplier_id']) ? LogModel::UPDATE_OPERATE : LogModel::ADD_OPERATE;
$logAction = !empty($channel['supplier_id']) ? "修改供应商基本资料" : "新增供应商";
$logContent = !empty($channel['supplier_id']) ? '修改供应商' : '新增供应商基础信息';
//判断是不是申请入驻
//判断是不是申请重新入驻
if (!empty($oldSupplier['status']) && $oldSupplier['status'] == -2) {
$logAction = "申请重新入驻";
}
......
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