Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
朱继来
/
后台订单管理
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
4c5280bb
authored
May 20, 2021
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整订单来源
parent
c6c2ac82
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
22 deletions
app/Http/Controllers/AddOrderController.php
app/Http/Controllers/ApiController.php
app/Http/Controllers/OrderController.php
app/Http/Controllers/AddOrderController.php
View file @
4c5280bb
...
@@ -707,10 +707,6 @@ Class AddOrderController extends Controller
...
@@ -707,10 +707,6 @@ Class AddOrderController extends Controller
$data
[
'k1'
]
=
time
();
$data
[
'k1'
]
=
time
();
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$report_ids
=
$request
->
input
(
'report_ids'
,
''
);
if
(
$report_ids
)
$data
[
'pf'
]
=
8
;
$url
=
Config
(
'website.api_domain'
)
.
'order/create'
;
$url
=
Config
(
'website.api_domain'
)
.
'order/create'
;
// dd(curlApi($url, $data));
// dd(curlApi($url, $data));
$response
=
json_decode
(
curlApi
(
$url
,
$data
),
true
);
$response
=
json_decode
(
curlApi
(
$url
,
$data
),
true
);
...
@@ -718,6 +714,8 @@ Class AddOrderController extends Controller
...
@@ -718,6 +714,8 @@ Class AddOrderController extends Controller
if
(
$response
[
'err_code'
]
!=
0
)
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
]];
if
(
$response
[
'err_code'
]
!=
0
)
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
]];
// 若存在销售报价明细ID,则修改对应报价单状态为已成单
// 若存在销售报价明细ID,则修改对应报价单状态为已成单
$report_ids
=
$request
->
input
(
'report_ids'
,
''
);
if
(
$report_ids
)
{
if
(
$report_ids
)
{
$ids
=
explode
(
','
,
$report_ids
);
$ids
=
explode
(
','
,
$report_ids
);
...
...
app/Http/Controllers/ApiController.php
View file @
4c5280bb
...
@@ -710,6 +710,7 @@ class ApiController extends Controller
...
@@ -710,6 +710,7 @@ class ApiController extends Controller
$data
[
'type'
]
=
4
;
// 批量导入销售报价
$data
[
'type'
]
=
4
;
// 批量导入销售报价
$data
[
'uid'
]
=
$user_id
;
$data
[
'uid'
]
=
$user_id
;
$data
[
'delivery_place'
]
=
$delivery_place
;
$data
[
'delivery_place'
]
=
$delivery_place
;
$data
[
'pf'
]
=
8
;
// 询价系统标记
$url
=
Config
(
'website.api_domain'
)
.
'cart/addBatchByOrderSystem'
;
$url
=
Config
(
'website.api_domain'
)
.
'cart/addBatchByOrderSystem'
;
...
...
app/Http/Controllers/OrderController.php
View file @
4c5280bb
...
@@ -184,33 +184,33 @@ function getGoodsName($goods_id)
...
@@ -184,33 +184,33 @@ function getGoodsName($goods_id)
function
getOrderSource
(
$order_id
,
$order_type
=
1
,
$order_goods_type
=
1
)
function
getOrderSource
(
$order_id
,
$order_type
=
1
,
$order_goods_type
=
1
)
{
{
if
(
$order_type
==
1
)
{
if
(
$order_type
==
1
)
{
$order
=
DB
::
connection
(
'order'
)
->
table
(
'lie_order_extend'
)
->
where
(
'order_id'
,
$order_id
)
->
select
(
'order_type'
)
->
first
(
);
$order
_source
=
DB
::
connection
(
'order'
)
->
table
(
'lie_order'
)
->
where
(
'order_id'
,
$order_id
)
->
value
(
'order_source'
);
if
(
$order
)
{
if
(
preg_match
(
'/pf=1/'
,
$order_source
))
{
switch
(
$order
->
order_type
)
{
case
1
:
case
2
:
case
3
:
return
'后台'
;
}
}
$order_source
=
DB
::
connection
(
'order'
)
->
table
(
'lie_order'
)
->
where
(
'order_id'
,
$order_id
)
->
select
(
'order_source'
)
->
first
();
if
(
preg_match
(
'/pf=1/'
,
$order_source
->
order_source
))
{
$source
=
'PC端'
;
$source
=
'PC端'
;
}
else
if
(
preg_match
(
'/pf=2/'
,
$order_source
->
order_source
))
{
}
else
if
(
preg_match
(
'/pf=2/'
,
$order_source
))
{
$source
=
'移动端'
;
$source
=
'移动端'
;
}
else
if
(
preg_match
(
'/pf=6/'
,
$order_source
->
order_source
))
{
}
else
if
(
preg_match
(
'/pf=6/'
,
$order_source
))
{
$source
=
'小程序'
;
$source
=
'小程序'
;
}
else
if
(
preg_match
(
'/pf=8/'
,
$order_source
->
order_source
))
{
}
else
if
(
preg_match
(
'/pf=8/'
,
$order_source
))
{
$source
=
'询报价平台'
;
$source
=
'询报价平台'
;
}
else
if
(
preg_match
(
'/pf=9/'
,
$order_source
->
order_source
))
{
}
else
if
(
preg_match
(
'/pf=9/'
,
$order_source
))
{
$source
=
'云芯平台'
;
$source
=
'云芯平台'
;
}
else
{
}
else
{
$source
=
'
平
台'
;
$source
=
'
后
台'
;
}
}
// $order = DB::connection('order')->table('lie_order_extend')->where('order_id', $order_id)->select('order_type')->first();
// if ($order) {
// switch ($order->order_type) {
// case 1:
// case 2:
// case 3:
// return '后台';
// }
// }
return
$source
;
return
$source
;
}
else
if
(
$order_type
==
2
)
{
}
else
if
(
$order_type
==
2
)
{
return
'ERP'
;
return
'ERP'
;
...
...
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