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
63b284bb
authored
Oct 16, 2018
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
自营预售审核和再次调价
parents
cf266123
82ea1b07
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
33 deletions
app/Http/Controllers/AddOrderController.php
app/Http/Controllers/OrderController.php
resources/views/detail/changeOrder.blade.php
resources/views/selfOrder/content.blade.php
app/Http/Controllers/AddOrderController.php
View file @
63b284bb
...
...
@@ -397,8 +397,8 @@ Class AddOrderController extends Controller
// 确认订单信息
public
function
confirm
(
Request
$request
)
{
if
(
$request
->
isMethod
(
'post'
))
{
$is_online
=
$request
->
input
(
'is_online'
);
if
(
$request
->
isMethod
(
'post'
))
{
$is_online
=
$request
->
input
(
'is_online'
);
$data
[
'uid'
]
=
$request
->
input
(
'uid'
,
0
);
$data
[
'address_id'
]
=
$request
->
input
(
'address_id'
,
0
);
$data
[
'cart_id'
]
=
$request
->
input
(
'cart_ids'
,
''
);
...
...
app/Http/Controllers/OrderController.php
View file @
63b284bb
...
...
@@ -1110,8 +1110,7 @@ Class OrderController extends Controller
$check
[
'k2'
]
=
md5
(
md5
(
$check
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$client_source
=
$request
->
input
(
'client_source'
)
==
1
?
$request
->
input
(
'input-other-source'
)
:
$request
->
input
(
'client_source'
);
echo
'<pre>'
;
print_r
(
$request
->
input
());
die
;
$resData
=
[
"user_id"
=>
$request
->
input
(
'user_id'
,
''
),
"cancel_reason"
=>
$request
->
input
(
'cancel_reason'
,
''
),
...
...
@@ -1249,36 +1248,30 @@ print_r($request->input());die;
errorLog
(
Error
::
E_FORBIDDEN
,
'该订单无法再进行调价操作'
);
return
redirect
(
'/prompt'
)
->
with
([
'message'
=>
"该订单无法再进行调价操作"
,
'url'
=>
'/details/'
.
$id
,
'jumpTime'
=>
3
,
'status'
=>
false
]);
}
$url
=
Config
(
'website.api_domain'
)
.
'order/applyAdjust'
;
$data
[
'confirm_time'
]
=
0
;
$data
[
'pay_time'
]
=
0
;
$data
[
'status'
]
=
1
;
// $data['sale_id'] = 0; // 再次调价调整sale_id
$check
[
'k1'
]
=
time
();
$check
[
'k2'
]
=
md5
(
md5
(
$check
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$
update
=
DB
::
connection
(
'order'
)
->
table
(
'lie_order'
)
->
where
(
'order_id'
,
$id
)
->
update
(
$data
);
$
resData
=
array
(
"order_id"
=>
$id
,
"pf"
=>
1
,
"k1"
=>
$check
[
'k1'
],
"k2"
=>
$check
[
'k2'
],
"operator_id"
=>
$request
->
user
->
userId
);
if
(
!
$update
)
{
errorLog
(
Error
::
E_UPDATE_FAILED
,
'调价操作更新数据失败'
);
return
redirect
(
'/prompt'
)
->
with
([
'message'
=>
"调价操作更新数据失败!"
,
'url'
=>
'/details/'
.
$id
,
'jumpTime'
=>
3
,
'status'
=>
false
]);
}
$temp
=
json_decode
(
curlApi
(
$url
,
$resData
,
"POST"
),
true
);
$extend
=
DB
::
connection
(
'order'
)
->
table
(
'lie_order_extend'
)
->
where
([
'order_id'
=>
$id
])
->
first
();
if
(
$extend
)
{
// 调价失败临时表状态更改
DB
::
connection
(
'order'
)
->
table
(
'lie_order_extend'
)
->
where
([
'order_id'
=>
$id
])
->
update
([
'status'
=>
0
]);
}
// url 标签
$tags
=
$request
->
input
(
'tags'
,
''
);
// 操作记录
$log
[
'order_id'
]
=
$id
;
$log
[
'operator_id'
]
=
$request
->
user
->
userId
;
$log
[
'operator_type'
]
=
2
;
$log
[
'event'
]
=
'再次调价'
;
$log
[
'ip'
]
=
get_client_ip
();
$log
[
'create_time'
]
=
time
();
DB
::
connection
(
'order'
)
->
table
(
'lie_order_action_log'
)
->
insert
(
$log
);
if
(
$tags
)
{
$param
=
'?tags='
.
$tags
;
}
else
{
$param
=
''
;
}
return
redirect
(
'/change/'
.
$id
);
if
(
$temp
[
'err_code'
]
==
0
)
{
return
redirect
(
'/change/'
.
$id
.
$param
);
}
else
{
return
redirect
(
'/prompt'
)
->
with
([
'message'
=>
$temp
[
'err_msg'
],
'url'
=>
'/details/'
.
$id
.
$param
,
'jumpTime'
=>
3
,
'status'
=>
false
]);
}
}
// 填写订单取消原因
...
...
resources/views/detail/changeOrder.blade.php
View file @
63b284bb
...
...
@@ -117,11 +117,11 @@
<!-- 销售类型为预售时展示 -->
@if ($order_info['sale_type'] == 2)
<td>
<input
type=
"text"
class=
"only_number"
name=
"
delivery_time
"
value=
""
placeholder=
"请填写天数"
>
<input
type=
"text"
class=
"only_number"
name=
"
change_info[{{$v['rec_id']}}][delivery_time]
"
value=
""
placeholder=
"请填写天数"
>
</td>
<td>
<label>
<input
type=
"checkbox"
name=
"
is_lock[
]"
value=
"{{$v['goods_id']}}"
>
<input
type=
"checkbox"
name=
"
change_info[{{$v['rec_id']}}][is_lock
]"
value=
"{{$v['goods_id']}}"
>
<span>
锁定库存,可用库存:
<b
class=
"text-danger"
>
{{ App\Http\Controllers\getSelfStock($v['goods_id']) }}
</b></span>
</label>
...
...
@@ -134,8 +134,8 @@
<?php
$extend_fee_items
=
json_decode
(
$order_temp_info
[
'extend_fee_items'
],
true
);
?>
<!-- 供应商附加费
存在且销售类型为现卖,则展示下面
-->
@if ($extend_fee_items
&&
$order_info['sale_type'] == 1
)
<!-- 供应商附加费 -->
@if ($extend_fee_items)
<hr/>
<p>
附加费设置
</p>
<table
class=
"table table-bordered table-hover extend-fee-table"
>
...
...
@@ -282,8 +282,16 @@
@endif
</p>
<?php
if
(
$order_info
[
'order_goods_type'
]
==
2
)
{
$adjustPriceUrl
=
"/adjustPrice/"
.
$order_info
[
'order_id'
]
.
"?tags=self"
;
}
else
{
$adjustPriceUrl
=
"/adjustPrice/"
.
$order_info
[
'order_id'
];
}
?>
@if ($order_info['adjust_count']
<
2
)
<
a
class=
"btn btn-default"
href=
"{{
URL('adjustPrice', ['order_id'=>$order_info['order_id']])
}}"
>
再次调价
</a><span
class=
"warn-tip"
>
每笔订单仅有一次“再次调价”机会
</span>
<
a
class=
"btn btn-default"
href=
"{{
$adjustPriceUrl
}}"
>
再次调价
</a><span
class=
"warn-tip"
>
每笔订单仅有一次“再次调价”机会
</span>
@endif
</div>
...
...
resources/views/selfOrder/content.blade.php
View file @
63b284bb
...
...
@@ -256,6 +256,10 @@
<div
class=
"btn-group btn-group-xs"
>
<a
class=
"btn btn-primary"
href=
"/details/{{$v['order_id']}}?tags=self"
target=
"_blank"
>
详情
</a>
@if (in_array('self_check_order', $userPerms)
&&
in_array($v['status'], [1, 2, 3])
&&
$v['sale_type'] == 2)
<a
class=
"btn btn-success"
href=
"/change/{{$v['order_id']}}?tags=self"
target=
"_blank"
>
人工审单
</a>
@endif
@if (in_array('self_order_download_contract', $userPerms))
<a
class=
"btn btn-default download-contract"
data-id=
"{{$v['order_id']}}"
href=
"javascript:;"
>
下载合同
</a>
@endif
...
...
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