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
efaacd21
authored
Jun 16, 2021
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
联系人和银行信息删除不需要变成待审核
parent
2b9b1347
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
24 deletions
app/Http/Controllers/Api/SupplierContactApiController.php
app/Http/Controllers/Api/SupplierReceiptApiController.php
app/Http/Services/SupplierService.php
app/Http/Controllers/Api/SupplierContactApiController.php
View file @
efaacd21
...
...
@@ -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'
=>
[]]);
...
...
app/Http/Controllers/Api/SupplierReceiptApiController.php
View file @
efaacd21
...
...
@@ -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
,
'操作失败'
);
...
...
app/Http/Services/SupplierService.php
View file @
efaacd21
...
...
@@ -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
=
"申请重新入驻"
;
}
...
...
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