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
...
@@ -397,8 +397,8 @@ Class AddOrderController extends Controller
// 确认订单信息
// 确认订单信息
public
function
confirm
(
Request
$request
)
public
function
confirm
(
Request
$request
)
{
{
if
(
$request
->
isMethod
(
'post'
))
{
if
(
$request
->
isMethod
(
'post'
))
{
$is_online
=
$request
->
input
(
'is_online'
);
$is_online
=
$request
->
input
(
'is_online'
);
$data
[
'uid'
]
=
$request
->
input
(
'uid'
,
0
);
$data
[
'uid'
]
=
$request
->
input
(
'uid'
,
0
);
$data
[
'address_id'
]
=
$request
->
input
(
'address_id'
,
0
);
$data
[
'address_id'
]
=
$request
->
input
(
'address_id'
,
0
);
$data
[
'cart_id'
]
=
$request
->
input
(
'cart_ids'
,
''
);
$data
[
'cart_id'
]
=
$request
->
input
(
'cart_ids'
,
''
);
...
...
app/Http/Controllers/OrderController.php
View file @
63b284bb
...
@@ -1110,8 +1110,7 @@ Class OrderController extends Controller
...
@@ -1110,8 +1110,7 @@ Class OrderController extends Controller
$check
[
'k2'
]
=
md5
(
md5
(
$check
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$check
[
'k2'
]
=
md5
(
md5
(
$check
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$client_source
=
$request
->
input
(
'client_source'
)
==
1
?
$request
->
input
(
'input-other-source'
)
:
$request
->
input
(
'client_source'
);
$client_source
=
$request
->
input
(
'client_source'
)
==
1
?
$request
->
input
(
'input-other-source'
)
:
$request
->
input
(
'client_source'
);
echo
'<pre>'
;
print_r
(
$request
->
input
());
die
;
$resData
=
[
$resData
=
[
"user_id"
=>
$request
->
input
(
'user_id'
,
''
),
"user_id"
=>
$request
->
input
(
'user_id'
,
''
),
"cancel_reason"
=>
$request
->
input
(
'cancel_reason'
,
''
),
"cancel_reason"
=>
$request
->
input
(
'cancel_reason'
,
''
),
...
@@ -1249,36 +1248,30 @@ print_r($request->input());die;
...
@@ -1249,36 +1248,30 @@ print_r($request->input());die;
errorLog
(
Error
::
E_FORBIDDEN
,
'该订单无法再进行调价操作'
);
errorLog
(
Error
::
E_FORBIDDEN
,
'该订单无法再进行调价操作'
);
return
redirect
(
'/prompt'
)
->
with
([
'message'
=>
"该订单无法再进行调价操作"
,
'url'
=>
'/details/'
.
$id
,
'jumpTime'
=>
3
,
'status'
=>
false
]);
return
redirect
(
'/prompt'
)
->
with
([
'message'
=>
"该订单无法再进行调价操作"
,
'url'
=>
'/details/'
.
$id
,
'jumpTime'
=>
3
,
'status'
=>
false
]);
}
}
$url
=
Config
(
'website.api_domain'
)
.
'order/applyAdjust'
;
$data
[
'confirm_time'
]
=
0
;
$check
[
'k1'
]
=
time
();
$data
[
'pay_time'
]
=
0
;
$check
[
'k2'
]
=
md5
(
md5
(
$check
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$data
[
'status'
]
=
1
;
// $data['sale_id'] = 0; // 再次调价调整sale_id
$
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
)
{
$temp
=
json_decode
(
curlApi
(
$url
,
$resData
,
"POST"
),
true
);
errorLog
(
Error
::
E_UPDATE_FAILED
,
'调价操作更新数据失败'
);
return
redirect
(
'/prompt'
)
->
with
([
'message'
=>
"调价操作更新数据失败!"
,
'url'
=>
'/details/'
.
$id
,
'jumpTime'
=>
3
,
'status'
=>
false
]);
}
$extend
=
DB
::
connection
(
'order'
)
->
table
(
'lie_order_extend'
)
->
where
([
'order_id'
=>
$id
])
->
first
();
// url 标签
$tags
=
$request
->
input
(
'tags'
,
''
);
if
(
$extend
)
{
// 调价失败临时表状态更改
DB
::
connection
(
'order'
)
->
table
(
'lie_order_extend'
)
->
where
([
'order_id'
=>
$id
])
->
update
([
'status'
=>
0
]);
}
// 操作记录
if
(
$tags
)
{
$log
[
'order_id'
]
=
$id
;
$param
=
'?tags='
.
$tags
;
$log
[
'operator_id'
]
=
$request
->
user
->
userId
;
}
else
{
$log
[
'operator_type'
]
=
2
;
$param
=
''
;
$log
[
'event'
]
=
'再次调价'
;
}
$log
[
'ip'
]
=
get_client_ip
();
$log
[
'create_time'
]
=
time
();
DB
::
connection
(
'order'
)
->
table
(
'lie_order_action_log'
)
->
insert
(
$log
);
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 @@
...
@@ -117,11 +117,11 @@
<!-- 销售类型为预售时展示 -->
<!-- 销售类型为预售时展示 -->
@if ($order_info['sale_type'] == 2)
@if ($order_info['sale_type'] == 2)
<td>
<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>
<td>
<td>
<label>
<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>
<span>
锁定库存,可用库存:
<b
class=
"text-danger"
>
{{ App\Http\Controllers\getSelfStock($v['goods_id']) }}
</b></span>
</label>
</label>
...
@@ -134,8 +134,8 @@
...
@@ -134,8 +134,8 @@
<?php
$extend_fee_items
=
json_decode
(
$order_temp_info
[
'extend_fee_items'
],
true
);
?>
<?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/>
<hr/>
<p>
附加费设置
</p>
<p>
附加费设置
</p>
<table
class=
"table table-bordered table-hover extend-fee-table"
>
<table
class=
"table table-bordered table-hover extend-fee-table"
>
...
@@ -282,8 +282,16 @@
...
@@ -282,8 +282,16 @@
@endif
@endif
</p>
</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
)
@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
@endif
</div>
</div>
...
...
resources/views/selfOrder/content.blade.php
View file @
63b284bb
...
@@ -256,6 +256,10 @@
...
@@ -256,6 +256,10 @@
<div
class=
"btn-group btn-group-xs"
>
<div
class=
"btn-group btn-group-xs"
>
<a
class=
"btn btn-primary"
href=
"/details/{{$v['order_id']}}?tags=self"
target=
"_blank"
>
详情
</a>
<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))
@if (in_array('self_order_download_contract', $userPerms))
<a
class=
"btn btn-default download-contract"
data-id=
"{{$v['order_id']}}"
href=
"javascript:;"
>
下载合同
</a>
<a
class=
"btn btn-default download-contract"
data-id=
"{{$v['order_id']}}"
href=
"javascript:;"
>
下载合同
</a>
@endif
@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