Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄成意
/
php_frq_api
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
479912fb
authored
Jun 02, 2021
by
duwenjun
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
关闭报价
parent
cfa88507
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
app/Model/QuoteModel.php
app/Model/QuoteModel.php
View file @
479912fb
...
@@ -515,11 +515,11 @@ class QuoteModel extends Model
...
@@ -515,11 +515,11 @@ class QuoteModel extends Model
if
(
$quote_info
[
'status'
]
==
self
::
STATUS_CLOSE
)
{
if
(
$quote_info
[
'status'
]
==
self
::
STATUS_CLOSE
)
{
return
[
1
,
'关闭失败,该报价已关闭,请刷新页面查看'
];
return
[
1
,
'关闭失败,该报价已关闭,请刷新页面查看'
];
}
}
if
(
$quote_info
[
'status'
]
!==
self
::
STATUS_OFFER
)
{
if
(
!
in_array
(
$quote_info
[
'status'
],
[
self
::
STATUS_OFFER
,
self
::
STATUS_SELECTED
,
self
::
STATUS_SURE
])
)
{
return
[
1
,
'关闭失败,该报价状态不能关闭'
];
return
[
1
,
'关闭失败,该报价状态不能关闭'
];
}
}
$res
=
$this
->
where
(
'id'
,
$id
)
->
where
(
'status'
,
self
::
STATUS_OFFER
)
->
update
([
'status'
=>
self
::
STATUS_CLOSE
]);
$res
=
$this
->
where
(
'id'
,
$id
)
->
where
In
(
'status'
,
[
self
::
STATUS_OFFER
,
self
::
STATUS_SELECTED
,
self
::
STATUS_SURE
]
)
->
update
([
'status'
=>
self
::
STATUS_CLOSE
]);
// 查看当前询价明细的报价数量,若为0,则更新询价明细状态为待报价
// 查看当前询价明细的报价数量,若为0,则更新询价明细状态为待报价
$count
=
$this
->
where
(
'inquiry_items_id'
,
$quote_info
[
'inquiry_items_id'
])
->
whereNotIn
(
'status'
,
[
self
::
STATUS_CANCEL
,
self
::
STATUS_CLOSE
,
self
::
STATUS_DEL
])
->
count
();
$count
=
$this
->
where
(
'inquiry_items_id'
,
$quote_info
[
'inquiry_items_id'
])
->
whereNotIn
(
'status'
,
[
self
::
STATUS_CANCEL
,
self
::
STATUS_CLOSE
,
self
::
STATUS_DEL
])
->
count
();
$InquiryItemsModel
=
new
InquiryItemsModel
;
$InquiryItemsModel
=
new
InquiryItemsModel
;
...
...
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