Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_supplier
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
939beb40
authored
May 06, 2021
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix
parent
cce8796c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
2 deletions
app/Http/Controllers/Api/SupplierApiController.php
app/Http/Services/SupplierAuditService.php
resources/views/script/SupplierListScript.blade.php
resources/views/web/SupplierList.blade.php
app/Http/Controllers/Api/SupplierApiController.php
View file @
939beb40
...
...
@@ -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
,
'已发送同步请求'
);
}
}
app/Http/Services/SupplierAuditService.php
View file @
939beb40
...
...
@@ -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
;
}
...
...
resources/views/script/SupplierListScript.blade.php
View file @
939beb40
...
...
@@ -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
;
...
...
resources/views/web/SupplierList.blade.php
View file @
939beb40
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment