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
9c4cb4db
authored
May 20, 2021
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'zjl_inquiry_20210519' into development
parents
42b128c5
4c5280bb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
24 deletions
app/Http/Controllers/AddOrderController.php
app/Http/Controllers/ApiController.php
app/Http/Controllers/OrderController.php
public/js/add_inquiry_order.js
resources/views/addInquiryOrder/goodsInfo.blade.php
app/Http/Controllers/AddOrderController.php
View file @
9c4cb4db
...
...
@@ -711,12 +711,26 @@ Class AddOrderController extends Controller
// dd(curlApi($url, $data));
$response
=
json_decode
(
curlApi
(
$url
,
$data
),
true
);
if
(
$response
[
'err_code'
]
==
0
)
{
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
],
'data'
=>
[
'order_id'
=>
$response
[
'data'
],
'type'
=>
$data
[
'type'
]]];
if
(
$response
[
'err_code'
]
!=
0
)
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
]];
// 若存在销售报价明细ID,则修改对应报价单状态为已成单
$report_ids
=
$request
->
input
(
'report_ids'
,
''
);
if
(
$report_ids
)
{
$ids
=
explode
(
','
,
$report_ids
);
foreach
(
$ids
as
$v
)
{
$res
=
DB
::
connection
(
'frq'
)
->
table
(
'inquiry_items_report'
)
->
where
(
'id'
,
$v
)
->
select
(
'quote_id'
,
'inquiry_items_id'
)
->
first
();
if
(
$res
->
quote_id
)
{
DB
::
connection
(
'frq'
)
->
table
(
'quote'
)
->
where
(
'id'
,
$res
->
quote_id
)
->
update
([
'status'
=>
4
,
'update_time'
=>
time
()]);
}
DB
::
connection
(
'frq'
)
->
table
(
'inquiry_items'
)
->
where
(
'id'
,
$res
->
inquiry_items_id
)
->
update
([
'status'
=>
10
,
'update_time'
=>
time
()]);
}
}
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
]];
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
],
'data'
=>
[
'order_id'
=>
$response
[
'data'
],
'type'
=>
$data
[
'type'
]]];
}
}
...
...
app/Http/Controllers/ApiController.php
View file @
9c4cb4db
...
...
@@ -710,6 +710,7 @@ class ApiController extends Controller
$data
[
'type'
]
=
4
;
// 批量导入销售报价
$data
[
'uid'
]
=
$user_id
;
$data
[
'delivery_place'
]
=
$delivery_place
;
$data
[
'pf'
]
=
8
;
// 询价系统标记
$url
=
Config
(
'website.api_domain'
)
.
'cart/addBatchByOrderSystem'
;
...
...
app/Http/Controllers/OrderController.php
View file @
9c4cb4db
...
...
@@ -184,33 +184,33 @@ function getGoodsName($goods_id)
function
getOrderSource
(
$order_id
,
$order_type
=
1
,
$order_goods_type
=
1
)
{
if
(
$order_type
==
1
)
{
$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
'后台'
;
}
}
$order_source
=
DB
::
connection
(
'order'
)
->
table
(
'lie_order'
)
->
where
(
'order_id'
,
$order_id
)
->
select
(
'order_source'
)
->
first
();
$order_source
=
DB
::
connection
(
'order'
)
->
table
(
'lie_order'
)
->
where
(
'order_id'
,
$order_id
)
->
value
(
'order_source'
);
if
(
preg_match
(
'/pf=1/'
,
$order_source
->
order_source
))
{
if
(
preg_match
(
'/pf=1/'
,
$order_source
))
{
$source
=
'PC端'
;
}
else
if
(
preg_match
(
'/pf=2/'
,
$order_source
->
order_source
))
{
}
else
if
(
preg_match
(
'/pf=2/'
,
$order_source
))
{
$source
=
'移动端'
;
}
else
if
(
preg_match
(
'/pf=6/'
,
$order_source
->
order_source
))
{
}
else
if
(
preg_match
(
'/pf=6/'
,
$order_source
))
{
$source
=
'小程序'
;
}
else
if
(
preg_match
(
'/pf=8/'
,
$order_source
->
order_source
))
{
}
else
if
(
preg_match
(
'/pf=8/'
,
$order_source
))
{
$source
=
'询报价平台'
;
}
else
if
(
preg_match
(
'/pf=9/'
,
$order_source
->
order_source
))
{
}
else
if
(
preg_match
(
'/pf=9/'
,
$order_source
))
{
$source
=
'云芯平台'
;
}
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
;
}
else
if
(
$order_type
==
2
)
{
return
'ERP'
;
...
...
public/js/add_inquiry_order.js
View file @
9c4cb4db
...
...
@@ -759,6 +759,7 @@ layui.config({
remark
:
remark
,
user_coupon_id
:
user_coupon_id
,
cart_ids
:
cart_ids
,
report_ids
:
report_ids
,
// 询价明细ID
}
// if (is_dgk) { // 联营包含digikey商品,则填写终端资料
...
...
@@ -875,7 +876,7 @@ layui.config({
,{
field
:
'goods_price'
,
title
:
'采购单价'
,
edit
:
'text'
,
style
:
'cursor: pointer;'
}
,{
field
:
'goods_amount_format'
,
title
:
'小计'
}
,{
field
:
'delivery_time'
,
title
:
'货期'
,
edit
:
'text'
,
style
:
'cursor: pointer;'
}
,{
field
:
'buyer_id'
,
title
:
'采购员'
,
templet
:
'#t_buyer_id'
,
style
:
'overflow: visible;'
}
,{
field
:
'buyer_id'
,
title
:
'采购员'
,
templet
:
'#t_buyer_id'
}
,{
field
:
'batch'
,
title
:
'批次'
,
edit
:
'text'
,
style
:
'cursor: pointer;'
}
,{
title
:
'操作'
,
align
:
'center'
,
fixed
:
'right'
,
toolbar
:
'#list_action'
,
width
:
80
}
]]
...
...
resources/views/addInquiryOrder/goodsInfo.blade.php
View file @
9c4cb4db
...
...
@@ -96,7 +96,7 @@
<style>
.carts-info
{
display
:
none
;
}
.carts-info
.lay
table-cell-1-0-9
{
overflow
:
visible
;
}
/* 指定采购列 */
.carts-info
.lay
ui-table-cell
{
overflow
:
visible
;
}
</style>
<!-- 商品列表 -->
<div
class=
"carts-info"
>
...
...
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