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
25fabaa0
authored
Jun 30, 2022
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
完善审核
parent
08897255
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
14 deletions
app/Http/Services/SupplierAuditService.php
resources/views/script/AuditSupplierScript.blade.php
app/Http/Services/SupplierAuditService.php
View file @
25fabaa0
...
...
@@ -79,9 +79,24 @@ class SupplierAuditService
//发送队列消息同步到金蝶
$service
=
new
SyncSupplierService
();
$service
->
syncSupplierToErp
(
$supplierId
);
if
(
$status
==
SupplierChannelModel
::
STATUS_PASSED
)
{
//同步给一体化系统
(
new
SyncSupplierService
())
->
syncSupplierToUnited
(
$supplierId
);
if
(
$status
==
SupplierChannelModel
::
STATUS_PASSED
)
{
if
(
!
checkPerm
(
'IgnoreCompanyCheck'
))
{
//判断有公司信息才允许同步给一体化
$regionType
=
$supplier
[
'region'
]
==
2
?
1
:
2
;
if
(
$regionType
==
2
)
{
(
new
SyncSupplierService
())
->
syncSupplierToUnited
(
$supplierId
);
}
else
{
$supplier
[
'tax_number'
]
=
$supplier
[
'supplier_name'
]
?:
$supplier
[
'tax_number'
];
$company
=
(
new
CompanyService
())
->
getCompanyInfo
(
$supplier
[
'supplier_name'
],
$supplier
[
'tax_number'
],
$regionType
);
if
(
!
empty
(
$company
))
{
//同步给一体化系统
(
new
SyncSupplierService
())
->
syncSupplierToUnited
(
$supplierId
);
}
}
}
else
{
(
new
SyncSupplierService
())
->
syncSupplierToUnited
(
$supplierId
);
}
}
}
return
$result
;
...
...
resources/views/script/AuditSupplierScript.blade.php
View file @
25fabaa0
<script>
layui
.
use
([
'table'
,
'form'
,
'element'
,
'layer'
,
'admin'
],
function
()
{
layui
.
use
([
'table'
,
'form'
,
'element'
,
'layer'
,
'admin'
],
function
()
{
let
admin
=
layui
.
admin
;
let
form
=
layui
.
form
;
let
element
=
layui
.
element
;
form
.
on
(
'submit(auditSupplier)'
,
function
(
data
)
{
admin
.
showLoading
({
type
:
3
});
let
supplierId
=
getQueryVariable
(
'supplier_id'
);
let
url
=
'/api/supplier/AuditSupplier?supplier_id='
+
supplierId
;
let
res
=
ajax
(
url
,
data
.
field
);
if
(
!
res
)
{
layer
.
msg
(
'网络错误,请重试'
,
{
icon
:
6
});
}
else
{
if
(
res
.
err_code
===
0
)
{
admin
.
closeThisDialog
();
parent
.
layer
.
msg
(
res
.
err_msg
,
{
icon
:
6
});
}
else
{
parent
.
layer
.
msg
(
res
.
err_msg
,
{
icon
:
5
});
$
.
ajax
({
url
:
url
,
type
:
'post'
,
data
:
data
.
field
,
dataType
:
'json'
,
timeout
:
20000
,
success
:
function
(
res
)
{
if
(
!
res
)
return
layer
.
msg
(
'网络错误,请重试'
,
{
icon
:
5
});
if
(
res
.
err_code
===
0
)
{
admin
.
removeLoading
();
admin
.
closeThisDialog
();
parent
.
layer
.
msg
(
res
.
err_msg
,
{
icon
:
6
});
}
else
{
admin
.
removeLoading
();
parent
.
layer
.
msg
(
res
.
err_msg
,
{
icon
:
5
});
}
},
error
:
function
()
{
admin
.
removeLoading
();
return
layer
.
msg
(
'网络错误,请重试'
,
{
icon
:
5
});
}
}
}
);
return
false
;
});
form
.
on
(
'submit(cancel)'
,
function
(
data
)
{
...
...
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