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
130da05a
authored
Mar 29, 2021
by
hcy001
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
1
parent
5cb723e3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
4 deletions
app/Model/InquiryItemsModel.php
app/Model/InquiryModel.php
app/Model/InquiryItemsModel.php
View file @
130da05a
...
...
@@ -189,8 +189,6 @@ class InquiryItemsModel extends Model
if
(
empty
(
$b
[
"batch"
]))
return
[
1003
,
"请输入批次要求"
];
if
(
empty
(
$b
[
"delivery_time"
]))
return
[
1003
,
"请选择交货日期"
];
try
{
$con
=
DB
::
connection
(
'rfq'
);
$con
->
beginTransaction
();
...
...
@@ -211,7 +209,7 @@ class InquiryItemsModel extends Model
"class_id2_name"
=>@
$b
[
"class_id2_name"
]
?
$b
[
"class_id2_name"
]
:
""
,
"inquiry_number"
=>@
$b
[
"inquiry_number"
]
?
$b
[
"inquiry_number"
]
:
0
,
"target_price"
=>@
$b
[
"target_price"
]
?
$b
[
"target_price"
]
:
0
,
"delivery_time"
=>@
$b
[
"delivery_time
"
]
?
$b
[
"delivery_time"
]
:
""
,
"delivery_time"
=>@
$b
[
"delivery_time
_unit"
]
==
"天"
?
$b
[
"delivery_time"
]
:
$b
[
"delivery_time"
]
*
7
,
"batch"
=>@
$b
[
"batch"
]
?
$b
[
"batch"
]
:
""
,
"assign_type"
=>
$b
[
"pur_s"
]
!==
""
?
1
:
2
,
"remark"
=>@
$b
[
"remark"
]
?
$b
[
"remark"
]
:
""
,
...
...
@@ -331,6 +329,15 @@ class InquiryItemsModel extends Model
]);
$con
->
commit
();
#发送消息
$info
=
$this
->
where
(
"id"
,
$inquiry_items_id
)
->
value
(
"inquiry_id"
);
$mainStatus
=
(
new
InquiryModel
())
->
where
(
"id"
,
$inquiry_items_id
)
->
value
(
"status"
);
#主单状态
if
(
$mainStatus
==
0
){
#
}
return
[
0
,
"修改成功"
];
}
catch
(
\Exception
$e
)
{
$con
->
rollBack
();
...
...
@@ -520,6 +527,19 @@ class InquiryItemsModel extends Model
}
$b2
[
"purArr"
]
=
$userInfo
;
break
;
case
"delivery_time"
:
#交期
if
(
strpos
(
$val
,
"天"
)
===
false
||
strpos
(
$val
,
"周"
)
===
false
){
$err
[]
=
$str_msg
.
"交期输入名称有误"
;
}
$delivery_time
=
str_replace
(
"天"
,
""
,
$val
);
if
(
strpos
(
$val
,
"周"
)
!==
false
){
$delivery_time
=
str_replace
(
"周"
,
""
,
$val
)
*
7
;
}
if
(
$delivery_time
==
0
){
$err
[]
=
$str_msg
.
"交期输入名称有误"
;
}
$b2
[
"delivery_time"
]
=
$delivery_time
;
break
;
}
}
}
...
...
@@ -545,7 +565,7 @@ class InquiryItemsModel extends Model
$check
=
$this
->
select
(
"inquiry_id"
)
->
where
([
"goods_name"
=>
$input
[
"goods_name"
],
"inquiry_number"
=>
$input
[
"inquiry_number"
],
"brand_name"
=>
$brandInfo
[
0
][
"
brand_
name"
]])
->
where
([
"goods_name"
=>
$input
[
"goods_name"
],
"inquiry_number"
=>
$input
[
"inquiry_number"
],
"brand_name"
=>
$brandInfo
[
0
][
"name"
]])
->
whereRaw
(
"create_time > "
.
strtotime
(
date
(
'Y-m-d'
)))
->
first
();
if
(
$check
){
...
...
app/Model/InquiryModel.php
View file @
130da05a
...
...
@@ -139,6 +139,9 @@ class InquiryModel extends Model
$v
[
'target_price'
]
=
$currency_sign
.
$v
[
'target_price'
]
.
"
\t
"
;
// 客户目标报价
}
#交货日期
$v
[
'delivery_time'
]
=
$v
[
'delivery_time'
]
>
6
?
$v
[
'delivery_time'
]
.
'周'
:
$v
[
'delivery_time'
]
.
"天"
;
#查询所有报价
$v
[
'quote_price'
]
=
"--"
;
$quote
=
$QuoteModel
->
select
(
"status"
,
"currency"
,
"price_origin"
,
"price_rmb"
)
...
...
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