Commit 939beb40 by mushishixian

fix

parent cce8796c
......@@ -297,4 +297,13 @@ class SupplierApiController extends Controller
}
$this->response(0, '转正供应商成功');
}
public function SyncToErp($request)
{
$supplierId = $request->get('supplier_id');
$service = new SyncSupplierService();
$service->syncSupplierToErp($supplierId);
$this->response(0, '已发送同步请求');
}
}
......@@ -55,6 +55,9 @@ class SupplierAuditService
$logService = new LogService();
$content = $auditStatus;
$logService->AddLog($supplierId, LogModel::UPDATE_OPERATE, '审核供应商', $content);
//发送队列消息同步到金蝶
$service = new SyncSupplierService();
$service->syncSupplierToErp($supplierId);
}
return $result;
}
......
......@@ -117,6 +117,25 @@
})
//审批供应商弹窗
$("#sync_supplier_to_erp").click(function () {
let checkStatus = table.checkStatus('list');
let data = checkStatus.data;
if (!data.length) {
layer.msg('请先选择要操作的供应商', {icon: 5})
} else {
let supplierId = data[0].supplier_id;
let res = ajax('/api/supplier/SyncToErp', {supplier_id: supplierId})
if (res.err_code === 0) {
table.reload('list')
layer.closeAll();
layer.msg(res.err_msg, {icon: 6})
} else {
layer.msg(res.err_msg, {icon: 5})
}
}
});
//审批供应商弹窗
$("#audit_supplier").click(function () {
let checkStatus = table.checkStatus('list');
let data = checkStatus.data;
......
......@@ -14,8 +14,15 @@
<button type="button" class="layui-btn layui-btn-sm" id="allocate_purchase_user">分配渠道员</button>
@endif
@if(checkPerm('ChangeSupplierIsType'))
<button type="button" class="layui-btn layui-btn-sm" title="该操作可以将竞调供应商转为正式供应商" id="change_supplier_is_type">转正供应商</button>
@endif
<button type="button" class="layui-btn layui-btn-sm" title="该操作可以将竞调供应商转为正式供应商" id="change_supplier_is_type">
转正供应商
</button>
@endif
@if(request()->user->userId==1000)
<button type="button" class="layui-btn layui-btn-sm" title="该操作可以将供应商同步到供应商" id="sync_supplier_to_erp">
金蝶同步
</button>
@endif
</div>
<table class="layui-table" id="list" lay-filter="list"></table>
......
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