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
c9ee2511
authored
May 10, 2018
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
重新调整审核调价功能
parent
f97f26df
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
187 additions
and
11 deletions
app/Http/Controllers/OrderController.php
app/Http/routes.php
config/website.php
public/js/order.js
resources/views/detail/changeOrder.blade.php
resources/views/detail/content.blade.php
app/Http/Controllers/OrderController.php
View file @
c9ee2511
...
...
@@ -742,6 +742,15 @@ Class OrderController extends Controller
// return array('errcode'=>-10010,'errmsg'=>'没有权限进行二次调价');
// }
if
(
!
$request
->
input
(
'pay_time_limit'
))
{
$payTime
=
$request
->
input
(
'payTime'
,
''
);
$payTimeOther
=
$request
->
input
(
'payTimeOther'
,
''
);
$pay_time_limit
=
$payTime
==
'other'
?
$payTimeOther
:
$payTime
;
}
else
{
$pay_time_limit
=
$request
->
input
(
'pay_time_limit'
);
}
$url
=
Config
(
'website.api_domain'
)
.
'order/changeOrder'
;
$check
[
'k1'
]
=
time
();
...
...
@@ -757,22 +766,39 @@ Class OrderController extends Controller
"order_amount"
=>
$request
->
input
(
'order_amount'
,
''
),
"extra_fee"
=>
$request
->
input
(
'extra_fee'
,
''
),
"change_info"
=>
$request
->
input
(
'change_info'
,
''
),
"payTime"
=>
$request
->
input
(
'payTime'
,
''
),
"payTimeOther"
=>
$request
->
input
(
'payTimeOther'
,
''
),
"pay_time_limit"
=>
$pay_time_limit
,
"check_failed"
=>
$request
->
input
(
'check_failed'
,
''
),
"order_id"
=>
$order_id
,
"pf"
=>
1
,
"k1"
=>
$check
[
'k1'
],
"k2"
=>
$check
[
'k2'
]
"k2"
=>
$check
[
'k2'
]
,
];
echo
'<pre>'
;
print_r
(
curlApi
(
$url
,
$resData
,
"POST"
));
die
;
$temp
=
json_decode
(
curlApi
(
$url
,
$resData
,
"POST"
),
true
);
return
array
(
'errcode'
=>
$temp
[
'err_code'
],
'errmsg'
=>
$temp
[
'err_msg'
]);
}
}
// 驳回调价信息
public
function
ajaxRejected
(
Request
$request
)
{
if
(
$request
->
isMethod
(
'post'
))
{
$order_id
=
$request
->
input
(
'order_id'
);
$order
=
DB
::
connection
(
'order'
)
->
table
(
'lie_order'
)
->
where
([
'order_id'
=>
$order_id
])
->
update
([
'order_temp_info'
=>
''
]);
if
(
!
$order
)
{
return
array
(
'errcode'
=>-
1
,
'errmsg'
=>
'驳回失败'
);
}
return
array
(
'errcode'
=>
0
,
'errmsg'
=>
'驳回成功'
);
}
}
// 推送业务员
public
function
sendSales
(
Request
$request
,
$id
=
''
)
{
...
...
app/Http/routes.php
View file @
c9ee2511
...
...
@@ -62,6 +62,8 @@ Route::group(['middleware' => 'web'], function () {
Route
::
match
(
'post'
,
'/ajaxDelayTime'
,
'OrderController@ajaxDelayTime'
);
Route
::
match
(
'post'
,
'/ajaxRejected'
,
'OrderController@ajaxRejected'
);
});
// 不需要登陆态
...
...
config/website.php
View file @
c9ee2511
...
...
@@ -23,7 +23,4 @@ return [
// 竞调账户配置显示时间
'vp_time_set'
=>
'2018-04-01'
,
// 订单审核时默认选中 ---经理ID
'manager_id'
=>
1406
,
// 郑家锋
];
public/js/order.js
View file @
c9ee2511
...
...
@@ -1252,6 +1252,14 @@
return
false
;
}
var
sale_id
=
$
(
'input[name=sale_id]'
).
val
();
if
(
sale_id
==
0
)
{
layer
.
alert
(
'请先将订单推送给业务员'
,
function
(){
location
.
href
=
'/sendSales/'
+
$
(
'input[name=order_id]'
).
val
();
});
return
false
;
}
if
(
payTime
==
''
)
{
layer
.
msg
(
'请选择付款时间'
);
return
false
;
...
...
@@ -1317,7 +1325,9 @@
location
.
reload
();
},
1000
);
}
else
{
layer
.
alert
(
resp
.
errmsg
||
'网络异常'
);
layer
.
alert
(
resp
.
errmsg
||
'网络异常'
,
function
(){
location
.
reload
();
});
}
},
...
...
@@ -1329,6 +1339,69 @@
});
})
// 弹出已调价的订单信息
$
(
'.checkAdjusted'
).
click
(
function
(){
var
adjusted_info
=
$
(
'.adjusted_order'
).
html
();
var
layer_btn
;
if
(
is_manager
)
{
layer_btn
=
[
'驳回'
,
'确认调价'
];
}
else
{
layer_btn
=
[];
}
// 弹出提示
layer
.
open
({
title
:
'调价后的订单信息'
,
content
:
adjusted_info
,
area
:
[
'700px'
,
'400px'
],
btn
:
layer_btn
,
yes
:
function
(
index
,
layero
){
$
.
ajax
({
url
:
'/ajaxRejected'
,
type
:
'post'
,
data
:
$
(
'#adjustedOrderForm'
).
serialize
()
+
'&order_status=1'
,
dataType
:
'json'
,
success
:
function
(
resp
)
{
if
(
resp
.
errcode
===
0
){
layer
.
msg
(
resp
.
errmsg
||
'操作成功'
);
setTimeout
(
function
(){
location
.
reload
();
},
1000
);
}
else
{
layer
.
alert
(
resp
.
errmsg
||
'网络异常'
);
}
},
error
:
function
(
res
)
{
console
.
log
(
res
);
}
})
},
btn2
:
function
(
index
,
layero
){
$
.
ajax
({
url
:
'/ajaxSaveChange'
,
type
:
'post'
,
data
:
$
(
'#adjustedOrderForm'
).
serialize
()
+
'&order_status=2'
,
dataType
:
'json'
,
success
:
function
(
resp
)
{
if
(
resp
.
errcode
===
0
){
layer
.
msg
(
resp
.
errmsg
||
'操作成功'
);
setTimeout
(
function
(){
location
.
reload
();
},
1000
);
}
else
{
layer
.
alert
(
resp
.
errmsg
||
'网络异常'
);
}
},
error
:
function
(
res
)
{
console
.
log
(
res
);
}
})
}
});
})
},
}
...
...
resources/views/detail/changeOrder.blade.php
View file @
c9ee2511
...
...
@@ -5,6 +5,7 @@
<form
id=
"checkOrderForm"
class=
"form-horizontal"
>
<input
type=
"hidden"
name=
"order_sn"
value=
"{{$order_info['order_sn']}}"
>
<input
type=
"hidden"
name=
"order_id"
value=
"{{$order_info['order_id']}}"
>
<input
type=
"hidden"
name=
"sale_id"
value=
"{{$order_info['sale_id']}}"
>
<input
type=
"hidden"
name=
"goods_amount"
value=
"{{$order_price_info['goods_price']}}"
>
<input
type=
"hidden"
name=
"order_amount"
value=
"{{$order_info['order_amount']}}"
>
<input
type=
"hidden"
name=
"cancel_reason"
value=
"{{isset($order_info['cancle_reason']) ? $order_info['cancle_reason'] : ''}}"
>
...
...
@@ -60,7 +61,10 @@
<tbody>
@foreach ($order_items_info as $v)
<tr>
<td><p>
{{$v['goods_name']}}
</p></td>
<td>
<input
type=
"hidden"
name=
"change_info[{{$v['rec_id']}}][goods_name]"
value=
"{{$v['goods_name']}}"
>
<p>
{{$v['goods_name']}}
</p>
</td>
<td>
<input
class=
"only_positive_nubme num"
name=
"change_info[{{$v['rec_id']}}][goods_number]"
value=
"{{$v['goods_number']}}"
>
</td>
...
...
@@ -144,7 +148,11 @@
</tr>
</table>
@if ($order_info['status'] == 1
&&
$order_info['order_temp_info'])
<a
class=
"btn btn-primary checkAdjusted"
>
查看调价信息
</a>
@else
<a
class=
"btn btn-primary checkOrder"
>
提交
</a>
@endif
</form>
@endif
...
...
@@ -204,7 +212,77 @@
</div>
</div>
@if ($order_info['status'] == 1
&&
$order_info['order_temp_info'])
<div
class=
"tabs-box adjusted_order"
style=
"display: none;"
>
<div
class=
"order-change-main"
>
<form
id=
"adjustedOrderForm"
class=
"form-horizontal"
>
<input
type=
"hidden"
name=
"order_id"
value=
"{{$order_info['order_id']}}"
>
<input
type=
"hidden"
name=
"sale_id"
value=
"{{$order_info['sale_id']}}"
>
<input
type=
"hidden"
name=
"extra_fee"
value=
"{{$order_info['order_temp_info']['extra_fee']}}"
>
<input
type=
"hidden"
name=
"goods_amount"
value=
"{{$order_info['order_temp_info']['goods_amount']}}"
>
<input
type=
"hidden"
name=
"deposit_amount"
value=
"{{$order_info['order_temp_info']['deposit_amount']}}"
>
<input
type=
"hidden"
name=
"order_pay_type"
value=
"{{$order_info['order_temp_info']['order_pay_type']}}"
>
<input
type=
"hidden"
name=
"pay_time_limit"
value=
"{{$order_info['order_temp_info']['pay_time_limit']}}"
>
<input
type=
"hidden"
name=
"cancel_reason"
value=
"{{isset($order_info['cancle_reason']) ? $order_info['cancle_reason'] : ''}}"
>
<table
class=
"table table-bordered table-hover"
>
<thead>
<tr>
<th>
型号
</th>
<th>
调整数量
</th>
<th>
调整单价
</th>
</tr>
</thead>
<tbody>
@foreach ($order_info['order_temp_info']['change_info'] as $k => $v)
<tr>
<td>
<input
type=
"hidden"
name=
"change_info[{{$k}}][goods_name]"
value=
"{{$v['goods_name']}}"
>
<p>
{{$v['goods_name']}}
</p>
</td>
<td>
<input
type=
"hidden"
name=
"change_info[{{$k}}][goods_number]"
value=
"{{$v['goods_number']}}"
>
<p>
{{$v['goods_number']}}
</p>
</td>
<td>
<input
type=
"hidden"
name=
"change_info[{{$k}}][goods_price]"
value=
"{{$v['goods_price']}}"
>
<p>
{{$v['goods_price']}}
</p>
</td>
</tr>
@endforeach
</tbody>
</table>
<hr>
<table
class=
"table table-bordered table-hover"
>
<tr>
<th>
商品总额:
</th>
<td>
{{$order_info['order_temp_info']['goods_amount']}}
</td>
</tr>
<tr>
<th>
附加费:
</th>
<td>
{{$order_info['order_temp_info']['extra_fee']}}
</td>
</tr>
<tr>
<th>
订单总额:
</th>
<td>
{{$order_info['order_temp_info']['goods_amount'] + $order_info['order_temp_info']['extra_fee']}}
</td>
</tr>
<tr>
<th>
付款时间:
</th>
<td>
{{$order_info['order_temp_info']['pay_time_limit'].'天'}}
</td>
</tr>
</table>
</form>
</div>
</div>
@endif
<script>
var
is_manager
=
"{{ $role == 1 || $role == 2 ? true : false }}"
;
var
order_amount
=
"{{$order_info['order_amount']}}"
;
var
currency
=
"{{$order_info['currency']}}"
;
var
order_pay_type
=
"{{$order_info['order_pay_type']}}"
;
...
...
resources/views/detail/content.blade.php
View file @
c9ee2511
...
...
@@ -430,7 +430,7 @@
<!-- 查看ERP订单详情时去掉操作按钮 -->
@if (!isset($_REQUEST['tags']))
<!-- 人工审单时去掉操作按钮 -->
@if ($action_name != 'changeOrder')
@if ($action_name != '
sendSales'
&&
$action_name != '
changeOrder')
<p
style=
"padding-left: 5px;"
>
操作
</p>
<div
class=
"tabs-box"
>
<!-- 判断操作权限 -->
...
...
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