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
9eb7c32f
authored
Jun 04, 2021
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'zjl_inquiry_20210519'
parents
5f5a1781
c271506e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
27 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 @
9eb7c32f
...
...
@@ -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 @
9eb7c32f
...
...
@@ -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 @
9eb7c32f
...
...
@@ -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 @
9eb7c32f
...
...
@@ -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商品,则填写终端资料
...
...
@@ -868,14 +869,14 @@ layui.config({
,
cols
:
[[
//表头
{
title
:
'序号'
,
type
:
'numbers'
,
fixed
:
'left'
,
width
:
50
}
,{
field
:
'goods_id'
,
title
:
'SKUID'
}
,{
field
:
'goods_name'
,
title
:
'商品名称'
}
,{
field
:
'goods_name'
,
title
:
'商品名称'
,
minWidth
:
100
}
,{
field
:
'brand_name'
,
title
:
'制造商'
}
,{
field
:
'supplier_name'
,
title
:
'供应商'
}
,{
field
:
'goods_number'
,
title
:
'采购数量'
,
edit
:
'text'
,
style
:
'cursor: pointer;'
}
,{
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
}
]]
...
...
@@ -890,6 +891,7 @@ layui.config({
$
(
'.carts-info'
).
show
();
// 显示商品table
$
(
".layui-table-body, .layui-table-box"
).
css
(
'overflow'
,
'visible'
);
// 下拉显示
$
(
'.buyer_id'
).
parent
(
'.layui-table-cell'
).
css
(
'overflow'
,
'visible'
);
cart_ids
=
[];
...
...
@@ -912,7 +914,7 @@ layui.config({
//下拉框监听事件
form
.
on
(
'select(buyer_id)'
,
function
(
data
)
{
var
cart_id
=
$
(
'
#
buyer_id'
).
data
(
'cid'
);
var
cart_id
=
$
(
'
.
buyer_id'
).
data
(
'cid'
);
var
value
=
data
.
value
;
var
datax
=
{
...
...
resources/views/addInquiryOrder/goodsInfo.blade.php
View file @
9eb7c32f
...
...
@@ -96,7 +96,7 @@
<style>
.carts-info
{
display
:
none
;
}
.carts-info
.laytable-cell-1-0-9
{
overflow
:
visible
;
}
/* 指定采购列
*/
/*.carts-info .layui-table-cell{ overflow: visible; }
*/
</style>
<!-- 商品列表 -->
<div
class=
"carts-info"
>
...
...
@@ -117,7 +117,7 @@
}
</style>
<script
type=
"text/html"
id=
"t_buyer_id"
>
<
select
name
=
"buyer_id"
id
=
"buyer_id"
lay
-
filter
=
"buyer_id"
data
-
cid
=
"@{{ d.cart_id }}"
>
<
select
name
=
"buyer_id"
class
=
"buyer_id"
lay
-
filter
=
"buyer_id"
data
-
cid
=
"@{{ d.cart_id }}"
>
@{{
d
.
buyerSelect
}}
<
/select>
</script>
...
...
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