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
612783c0
authored
May 13, 2021
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整导入报价
parent
007a384f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
app/Model/QuoteModel.php
app/Model/QuoteModel.php
View file @
612783c0
...
...
@@ -184,6 +184,8 @@ class QuoteModel extends Model
}
$list
=
$list
->
whereNotIn
(
'q.status'
,
[
0
,
-
1
]);
// 过滤报价草稿
}
elseif
(
$type
==
3
)
{
$list
=
$list
->
where
(
'q.status'
,
0
)
->
whereIn
(
'q.inquiry_items_id'
,
explode
(
','
,
$input
[
'inquiry_items_ids'
]));
}
elseif
(
@
$input
[
'inquiry_items_id'
]
>
0
)
{
$list
=
$list
->
whereNotIn
(
'q.status'
,
[
0
,
-
1
])
->
where
(
'q.inquiry_items_id'
,
$input
[
'inquiry_items_id'
]);
}
elseif
(
isset
(
$input
[
'inquiry_items_ids'
])
&&
$input
[
'inquiry_items_ids'
])
{
...
...
@@ -197,7 +199,12 @@ class QuoteModel extends Model
}
$list
=
$list
->
select
(
$field
)
->
orderBy
(
'id'
,
'desc'
);
// dump($list->getBindings());
// dump($list->toSql());
// $tmp = str_replace('?', '"'.'%s'.'"', $list->toSql());
// $tmp = vsprintf($tmp, $list->getBindings());
// echo $tmp;
// exit;
if
(
$export
)
{
$list
=
$list
->
get
()
->
toArray
();
...
...
@@ -333,7 +340,7 @@ class QuoteModel extends Model
{
$list
=
$this
->
from
(
'quote as q'
)
->
join
(
'inquiry_items as it'
,
'q.inquiry_items_id'
,
'='
,
'it.id'
);
if
(
isset
(
$
input
[
'type'
])
&&
$input
[
'type'
]
==
4
)
{
if
(
isset
(
$
type
)
&&
$type
==
4
)
{
$list
=
$list
->
leftJoin
(
'inquiry as i'
,
'it.inquiry_id'
,
'='
,
'i.id'
);
$perm
=
new
PermController
;
...
...
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