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
d3d47b3f
authored
Dec 11, 2018
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
fix
parents
6b70cbe7
4d30f0fc
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
258 additions
and
274 deletions
app/Http/Controllers/OrderController.php
app/Http/routes.php
public/css/detail.css
public/js/add_order.js
public/js/order.js
resources/views/addOffline/content.blade.php
resources/views/addOnline/content.blade.php
resources/views/addOrder/content.blade.php
resources/views/detail/changeOrder.blade.php
resources/views/detail/content.blade.php
resources/views/orderlist/content.blade.php
resources/views/selfOrder/content.blade.php
app/Http/Controllers/OrderController.php
View file @
d3d47b3f
...
...
@@ -260,12 +260,18 @@ function isChangeInvoice($order_sn)
}
}
//
自营线下订单
function
getOrderExtend
(
$order_id
)
//
订单扩展表
function
getOrderExtend
(
$order_id
,
$field
=
"*"
,
$where
=
array
()
)
{
$
extend
=
DB
::
connection
(
'order'
)
->
table
(
'lie_order_extend'
)
->
where
([
'order_id'
=>
$order_id
,
'order_type'
=>
3
])
->
select
(
'temp_id'
)
->
first
()
;
$
map
[
'order_id'
]
=
$order_id
;
return
$extend
?
true
:
false
;
if
(
!
empty
(
$where
))
{
$map
=
array_merge
(
$map
,
$where
);
}
$extend
=
DB
::
connection
(
'order'
)
->
table
(
'lie_order_extend'
)
->
where
(
$map
)
->
select
(
$field
)
->
first
();
return
$extend
;
}
Class
OrderController
extends
Controller
...
...
@@ -680,8 +686,8 @@ Class OrderController extends Controller
"user_id"
=>
$request
->
input
(
'user_id'
,
''
),
"cancel_reason"
=>
$request
->
input
(
'cancel_reason'
,
''
),
"sale_id"
=>
$request
->
input
(
'sale_id'
,
''
),
"order_pay_type"
=>
$request
->
input
(
'order_pay_type'
,
''
),
"status"
=>
$request
->
input
(
'order_status'
,
''
),
"order_pay_type"
=>
$request
->
input
(
'order_pay_type'
,
''
)
?
$request
->
input
(
'order_pay_type'
)
:
1
,
"status"
=>
$request
->
input
(
'order_status'
,
''
)
?
$request
->
input
(
'order_status'
)
:
2
,
"deposit_amount"
=>
$request
->
input
(
'deposit_amount'
,
''
),
"goods_amount"
=>
$request
->
input
(
'goods_amount'
,
''
),
"order_amount"
=>
$request
->
input
(
'order_amount'
,
''
),
...
...
@@ -840,30 +846,6 @@ Class OrderController extends Controller
}
}
// 填写订单取消原因
public
function
ajaxInputCancelReason
(
Request
$request
)
{
if
(
$request
->
isMethod
(
'post'
))
{
$order_id
=
$request
->
input
(
'order_id'
);
$cancel_reason
=
$request
->
input
(
'cancel_reason'
);
$update
=
DB
::
connection
(
'order'
)
->
table
(
'lie_order'
)
->
where
(
'order_id'
,
$order_id
)
->
update
([
'cancel_reason'
=>
$cancel_reason
]);
if
(
!
$update
)
return
[
'errcode'
=>
-
1
,
'errmsg'
=>
'填写订单取消原因失败'
];
// 操作记录
$log
[
'order_id'
]
=
$order_id
;
$log
[
'operator_id'
]
=
$request
->
user
->
userId
;
$log
[
'operator_type'
]
=
2
;
$log
[
'event'
]
=
'填写订单取消原因:'
.
$cancel_reason
;
$log
[
'ip'
]
=
get_client_ip
();
$log
[
'create_time'
]
=
time
();
DB
::
connection
(
'order'
)
->
table
(
'lie_order_action_log'
)
->
insert
(
$log
);
return
[
'errcode'
=>
0
,
'errmsg'
=>
'填写订单取消原因成功'
];
}
}
// 申请再次调价
public
function
applyAdjust
(
Request
$request
,
$id
)
{
...
...
@@ -974,42 +956,6 @@ Class OrderController extends Controller
}
}
// 联营取消订单
public
function
cancelPay
(
Request
$request
,
$id
)
{
if
(
$request
->
isMethod
(
'post'
)){
$order_id
=
$request
->
input
(
'order_id'
);
$cancel_reason
=
$request
->
input
(
'cancel_reason'
);
$operator_id
=
$request
->
user
->
userId
;
if
(
!
$order_id
)
{
errorLog
(
Error
::
E_NOT_EXISTS
,
'订单不存在'
);
return
array
(
'errcode'
=>
Error
::
E_NOT_EXISTS
,
'errmsg'
=>
'订单不存在~'
);
}
if
(
!
$cancel_reason
)
{
errorLog
(
Error
::
E_NOT_EXISTS
,
'取消订单的原因不可为空'
);
return
array
(
'errcode'
=>
Error
::
E_NOT_EXISTS
,
'errmsg'
=>
'取消订单的原因不可为空~'
);
}
$url
=
Config
(
'website.api_domain'
)
.
'order/cancel'
;
$check
[
'k1'
]
=
time
();
$check
[
'k2'
]
=
md5
(
md5
(
$check
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$resData
=
array
(
"pf"
=>
1
,
"k1"
=>
$check
[
'k1'
],
"k2"
=>
$check
[
'k2'
],
"order_id"
=>
$order_id
,
"cancel_reason"
=>
$cancel_reason
,
'operator_id'
=>
$operator_id
,
'type'
=>
2
);
$temp
=
json_decode
(
curlApi
(
$url
,
$resData
,
"POST"
),
true
);
return
array
(
'errcode'
=>
$temp
[
'err_code'
],
'errmsg'
=>
$temp
[
'err_msg'
]);
}
$info
=
$this
->
orderDetail
(
$request
,
$id
);
$this
->
pageHeader
(
$request
,
$info
,
'取消订单'
,
[
"title"
=>
'取消订单'
,
"href"
=>
'#'
]);
return
view
(
'detail'
,
$info
);
}
// 对账
public
function
checkPay
(
Request
$request
,
$id
)
{
...
...
@@ -1307,24 +1253,23 @@ Class OrderController extends Controller
return
$response
;
}
//
自营
取消订单
public
function
ajax
Self
Cancel
(
Request
$request
)
// 取消订单
public
function
ajaxCancel
(
Request
$request
)
{
if
(
$request
->
isMethod
(
'post'
))
{
$order_id
=
$request
->
input
(
'order_id'
);
$cancel_reason
=
$request
->
input
(
'reason'
);
$operator_id
=
$request
->
user
->
userId
;
$data
[
'order_id'
]
=
$request
->
input
(
'order_id'
,
0
);
$data
[
'cancel_reason'
]
=
$request
->
input
(
'cancel_reason'
,
''
);
$data
[
'type'
]
=
$request
->
input
(
'type'
,
2
);
// 2.取消订单,3.审核不通过,4-填写取消原因
$data
[
'operator_id'
]
=
$request
->
user
->
userId
;
$url
=
Config
(
'website.api_domain'
)
.
'order/cancel'
;
$check
[
'k1'
]
=
time
();
$check
[
'k2'
]
=
md5
(
md5
(
$check
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$resData
=
array
(
"pf"
=>
1
,
"k1"
=>
$check
[
'k1'
],
"k2"
=>
$check
[
'k2'
],
"order_id"
=>
$order_id
,
"cancel_reason"
=>
$cancel_reason
,
'operator_id'
=>
$operator_id
,
'type'
=>
2
);
$data
[
'k1'
]
=
time
();
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$temp
=
json_decode
(
curlApi
(
$url
,
$
resD
ata
,
"POST"
),
true
);
$temp
=
json_decode
(
curlApi
(
$url
,
$
d
ata
,
"POST"
),
true
);
return
array
(
'errcode'
=>
$temp
[
'err_code'
],
'errmsg'
=>
$temp
[
'err_msg'
]);
return
array
(
'errcode'
=>
$temp
[
'err_code'
],
'errmsg'
=>
$temp
[
'err_msg'
]);
}
}
...
...
app/Http/routes.php
View file @
d3d47b3f
...
...
@@ -47,7 +47,7 @@ Route::group(['middleware' => 'web'], function () {
Route
::
match
([
'get'
,
'post'
],
'/send/{id}'
,
'OrderController@send'
);
Route
::
post
(
'/ajaxCheck'
,
'OrderController@ajaxCheck'
);
Route
::
match
([
'get'
,
'post'
],
'/adjustPrice/{id}'
,
'OrderController@adjustPrice'
);
Route
::
match
([
'get'
,
'post'
],
'/cancelPay/{id}'
,
'OrderController@cancelPay'
);
//
Route::match(['get', 'post'], '/cancelPay/{id}', 'OrderController@cancelPay');
Route
::
match
([
'get'
,
'post'
],
'/checkPay/{id}'
,
'OrderController@checkPay'
);
Route
::
match
([
'get'
,
'post'
],
'/invShipping/{id}'
,
'OrderController@invShipping'
);
...
...
@@ -68,7 +68,7 @@ Route::group(['middleware' => 'web'], function () {
Route
::
match
(
'post'
,
'/ajaxRejected'
,
'OrderController@ajaxRejected'
);
Route
::
get
(
'/self_order'
,
'OrderController@selfOrder'
);
Route
::
post
(
'/ajax
SelfCancel'
,
'OrderController@ajaxSelf
Cancel'
);
Route
::
post
(
'/ajax
Cancel'
,
'OrderController@ajax
Cancel'
);
Route
::
post
(
'/ajaxSelfExpress'
,
'OrderController@ajaxSelfExpress'
);
Route
::
match
([
'get'
,
'post'
],
'/self_check_pay/{id}'
,
'OrderController@selfCheckPay'
);
...
...
@@ -76,7 +76,8 @@ Route::group(['middleware' => 'web'], function () {
Route
::
match
([
'get'
,
'post'
],
'/tempcount'
,
'OrderController@tempCount'
);
Route
::
post
(
'/ajaxDownloadContract'
,
'OrderController@ajaxDownloadContract'
);
Route
::
post
(
'/ajaxInputCancelReason'
,
'OrderController@ajaxInputCancelReason'
);
// Route::post('/ajaxInputCancelReason', 'OrderController@ajaxInputCancelReason');
Route
::
post
(
'/ajax/shipping'
,
'OrderController@shipping'
);
Route
::
get
(
'/add_order'
,
'AddOrderController@addOrder'
);
...
...
public/css/detail.css
View file @
d3d47b3f
...
...
@@ -98,7 +98,7 @@ li {
.search-user
,
.search-sku
{
width
:
240px
!important
;
}
.label-prompt
{
.
create-order
.
label-prompt
{
padding
:
6px
6px
;
}
.get-user
,
.get-sku
{
...
...
public/js/add_order.js
View file @
d3d47b3f
...
...
@@ -407,6 +407,7 @@
var
cart_id
=
self
.
parents
(
'tr'
).
data
(
'cid'
);
var
type
=
self
.
parents
(
'tr'
).
data
(
'type'
);
var
user_id
=
0
;
var
delivery_place
=
1
;
// 1.大陆,2.香港 自营默认是大陆
if
(
is_online
)
{
user_id
=
$
(
'.user_id'
).
val
();
...
...
@@ -414,6 +415,10 @@
user_id
=
internal_uid
?
internal_uid
:
user_id
;
if
(
goods_type
==
1
)
{
// 联营需要选择交货地
delivery_place
=
$
(
'input[name=delivery_place]:checked'
).
val
();
}
$
.
ajax
({
type
:
"POST"
,
url
:
'/ajax/changeNum'
,
...
...
@@ -421,7 +426,7 @@
dataType
:
"json"
,
success
:
function
(
resp
){
if
(
resp
.
errcode
==
0
)
{
loading
.
lists
(
user_id
,
goods_type
,
is_online
);
// 加载购物车列表
loading
.
lists
(
user_id
,
goods_type
,
is_online
,
delivery_place
);
// 加载购物车列表
}
layer
.
msg
(
resp
.
errmsg
);
...
...
@@ -434,6 +439,7 @@
var
self
=
$
(
this
);
var
cart_id
=
self
.
parents
(
'tr'
).
data
(
'cid'
);
var
user_id
=
0
;
var
delivery_place
=
1
;
// 1.大陆,2.香港 自营默认是大陆
if
(
is_online
)
{
user_id
=
$
(
'.user_id'
).
val
();
...
...
@@ -441,6 +447,10 @@
user_id
=
internal_uid
?
internal_uid
:
user_id
;
if
(
goods_type
==
1
)
{
// 联营需要选择交货地
delivery_place
=
$
(
'input[name=delivery_place]:checked'
).
val
();
}
layer
.
open
({
title
:
'删除提示'
,
content
:
'确定删除该商品吗?'
,
...
...
@@ -454,7 +464,7 @@
success
:
function
(
resp
){
layer
.
msg
(
resp
.
errmsg
);
// self.parents('tr').remove();
loading
.
lists
(
user_id
,
goods_type
,
is_online
);
// 加载购物车列表
loading
.
lists
(
user_id
,
goods_type
,
is_online
,
delivery_place
);
// 加载购物车列表
return
false
;
},
})
...
...
@@ -559,7 +569,7 @@
success
:
function
(
resp
){
if
(
resp
.
errcode
==
0
)
{
layer
.
msg
(
resp
.
errmsg
);
loading
.
lists
(
user_id
,
goods_type
,
is_online
);
// 加载购物车列表
loading
.
lists
(
user_id
,
goods_type
,
is_online
,
delivery_place
);
// 加载购物车列表
return
false
;
}
...
...
public/js/order.js
View file @
d3d47b3f
...
...
@@ -242,72 +242,6 @@
})
})
// 填写订单取消原因
$
(
'.input-cancel-reason'
).
click
(
function
(){
var
self
=
$
(
this
);
var
order_id
=
self
.
data
(
'oid'
);
var
content
=
'<div class="form-group">'
+
'<div class="input-radio">'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="平台信任度问题">平台信任度问题</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="商品质量不放心">商品质量不放心</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="价格问题">价格问题</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="货期问题">货期问题</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="配套服务问题">配套服务问题</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="1">其他</label>'
+
'</div>'
+
'<div class="input-other-reason">'
+
'<textarea class="form-control" name="input-other-reason" placeholder="请填写其他原因"></textarea>'
+
'</div>'
+
'</div>'
;
layer
.
open
({
area
:
[
'650px'
,
'220px'
],
title
:
'填写订单取消原因'
,
content
:
content
,
btn
:[
'确认'
,
'取消'
],
btn1
:
function
(){
var
cancel_reason
=
$
(
'input[name=cancel_reason]:checked'
).
val
();
var
other_reason
=
$
(
'textarea[name=input-other-reason]'
).
val
();
if
(
cancel_reason
==
null
)
{
layer
.
tips
(
'请选择取消原因'
,
$
(
'.input-radio'
));
return
false
;
}
else
if
(
cancel_reason
==
1
)
{
if
(
other_reason
==
''
)
{
layer
.
tips
(
'请填写其他原因'
,
$
(
'.input-other-reason'
));
return
false
;
}
else
{
cancel_reason
=
other_reason
;
}
}
$
.
ajax
({
url
:
'/ajaxInputCancelReason'
,
data
:
{
order_id
:
order_id
,
cancel_reason
:
cancel_reason
},
type
:
'post'
,
dataType
:
'json'
,
success
:
function
(
resp
){
if
(
resp
.
errcode
==
0
){
self
.
remove
();
layer
.
msg
(
resp
.
errmsg
);
layer
.
close
();
}
else
{
layer
.
alert
(
resp
.
errmsg
);
}
},
error
:
function
(){
layer
.
alert
(
'网络异常'
);
}
});
},
btn2
:
function
(
index
){
layer
.
close
(
index
);
}
})
})
// 切换类型时,清空输入框内容
$
(
'.dropdown-menu>li'
).
click
(
function
(){
var
val
=
$
(
this
).
data
(
'val'
);
// 当前值
...
...
@@ -334,40 +268,6 @@
}
})
//推送到erp
$
(
'.send-erp'
).
on
(
'click'
,
function
(){
var
url
=
$
(
this
).
attr
(
'data-url'
)
||
''
;
if
(
!
url
)
return
;
var
content
=
$
(
'#sale-container'
).
html
();
layer
.
open
({
type
:
1
,
btn
:
[
'确认'
,
'取消'
],
btn1
:
function
(){
var
UserID
=
$
(
'input[name="UserID"]:checked'
).
val
();
if
(
!
UserID
){
layer
.
alert
(
'请选择业务员'
);
return
;
}
$
.
ajax
({
type
:
"post"
,
url
:
url
,
data
:{
UserID
:
UserID
},
dataType
:
'json'
,
success
:
function
(
res
)
{
window
.
location
.
reload
();
layer
.
msg
(
res
.
errmsg
);
}
});
},
btn2
:
function
(){
return
true
;
},
skin
:
'layui-layer-rim'
,
//加上边框
area
:
[
'600px'
,
'300px'
],
//宽高
content
:
content
});
});
$
(
'.searchErpOrder'
).
click
(
function
(){
var
order_type
=
$
(
'#order_type'
).
data
(
'default'
),
order_contain
=
$
(
'input[name=order_contain]'
).
val
(),
...
...
@@ -410,6 +310,107 @@
location
.
href
=
listUrl
;
})
this
.
cancelorder
();
},
// 取消订单弹框
cancelorder
:
function
()
{
// 填写订单取消原因
$
(
'.input-cancel-reason'
).
click
(
function
(){
var
self
=
$
(
this
);
var
order_id
=
self
.
data
(
'oid'
);
var
type
=
self
.
data
(
'type'
);
var
title
=
''
;
switch
(
type
)
{
case
2
:
title
=
'取消订单'
;
break
;
case
3
:
title
=
'订单审核不通过'
;
break
;
case
4
:
title
=
'填写订单取消原因'
;
break
;
default
:
title
=
'填写订单取消原因'
;
break
;
}
var
content
=
'<div class="form-group">'
+
'<label>常见原因:</label>'
+
'<div class="input-radio">'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="测试订单">测试订单</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="客户没需求">客户没需求</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="审核太久">审核太久</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="订单信息填错">订单信息填错</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="需用优惠券">需用优惠券</label>'
+
'</div>'
+
'</div>'
+
'<div class="form-group">'
+
'<label>数据不准:</label>'
+
'<div class="input-radio">'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="库存不准">库存不准</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="单价不准">单价不准</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="批次不准">批次不准</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="起订量不准">起订量不准</label>'
+
'</div>'
+
'</div>'
+
'<div class="form-group">'
+
'<label>不接受附加费:</label>'
+
'<div class="input-radio">'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="有关税">有关税</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="产地税">产地税</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="商检费">商检费</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="采购运费">采购运费</label>'
+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="1">其他</label>'
+
'</div>'
+
'<div class="input-other-reason">'
+
'<textarea class="form-control" name="input-other-reason" placeholder="请填写其他原因"></textarea>'
+
'</div>'
+
'</div>'
;
layer
.
open
({
area
:
[
'650px'
,
'400px'
],
title
:
title
,
content
:
content
,
btn
:[
'确认'
,
'取消'
],
btn1
:
function
(){
var
cancel_reason
=
$
(
'input[name=cancel_reason]:checked'
).
val
();
var
other_reason
=
$
(
'textarea[name=input-other-reason]'
).
val
();
if
(
cancel_reason
==
null
)
{
layer
.
tips
(
'请选择取消原因'
,
$
(
'.input-radio'
));
return
false
;
}
else
if
(
cancel_reason
==
1
)
{
if
(
other_reason
==
''
)
{
layer
.
tips
(
'请填写其他原因'
,
$
(
'.input-other-reason'
));
return
false
;
}
else
{
cancel_reason
=
other_reason
;
}
}
$
.
ajax
({
url
:
'/ajaxCancel'
,
data
:
{
order_id
:
order_id
,
cancel_reason
:
cancel_reason
,
type
:
type
},
type
:
'post'
,
dataType
:
'json'
,
success
:
function
(
resp
){
if
(
resp
.
errcode
==
0
){
// self.remove();
layer
.
msg
(
resp
.
errmsg
);
location
.
reload
();
// layer.close();
}
else
{
layer
.
alert
(
resp
.
errmsg
);
}
},
error
:
function
(){
layer
.
alert
(
'网络异常'
);
}
});
},
btn2
:
function
(
index
){
layer
.
close
(
index
);
}
})
})
},
details
:
function
(){
...
...
@@ -438,6 +439,7 @@
}
self
.
selfOrder
();
self
.
cancelorder
();
$
.
lie
.
droplist
(
$
(
'.droplist'
));
var
order_sn
=
$
(
'.order-save'
).
attr
(
'ordersn'
);
...
...
@@ -1195,37 +1197,37 @@
});
// 订单审核---通过or不通过
$
(
'input[name="order_status"]'
).
parent
().
on
(
'click'
,
function
(){
if
(
$
(
this
).
find
(
'input'
).
val
()
==
2
){
$
(
'.cancle_reason'
).
hide
();
}
else
{
$
(
'.cancle_reason'
).
show
();
}
});
//
$('input[name="order_status"]').parent().on('click', function(){
//
if($(this).find('input').val() == 2){
//
$('.cancle_reason').hide();
//
} else {
//
$('.cancle_reason').show();
//
}
//
});
// 订单审核 -- 其他
$
(
'input[name="reason"]'
).
on
(
'click'
,
function
(){
if
(
$
(
this
).
val
()
==
1
){
$
(
'.other-reason'
).
show
();
}
else
{
$
(
'.other-reason'
).
hide
();
}
});
//
//
订单审核 -- 其他
//
$('input[name="reason"]').on('click', function(){
//
if($(this).val() == 1){
//
$('.other-reason').show();
//
} else {
//
$('.other-reason').hide();
//
}
//
});
$
(
'.cancle_reason label'
).
click
(
function
(){
if
(
$
(
this
).
find
(
'input'
).
val
()
==
1
){
var
reason
=
$
(
'textarea[name="reason"]'
).
val
();
}
else
{
var
reason
=
$
(
this
).
text
();
}
$
(
'input[name="cancel_reason"]'
).
val
(
reason
);
});
//
$('.cancle_reason label').click(function(){
//
if($(this).find('input').val() == 1){
//
var reason = $('textarea[name="reason"]').val();
//
} else {
//
var reason = $(this).text();
//
}
//
$('input[name="cancel_reason"]').val(reason);
//
});
$
(
'textarea[name="reason"]'
).
on
(
'blur'
,
function
(){
if
(
$
(
'.cancle_reason input[name="reason"]:checked'
).
val
()
==
1
){
$
(
'input[name="cancel_reason"]'
).
val
(
$
(
this
).
val
());
}
});
//
$('textarea[name="reason"]').on('blur', function(){
//
if($('.cancle_reason input[name="reason"]:checked').val() == 1){
//
$('input[name="cancel_reason"]').val($(this).val());
//
}
//
});
// 附加费
// $('input[name="extra_fee"]').on('blur', function(){
...
...
@@ -1296,47 +1298,49 @@
// 审核不通过
if
(
order_status
==
-
1
)
{
if
(
reason
==
null
)
{
layer
.
msg
(
'请选择不通过原因!'
);
return
false
;
}
else
if
(
reason
==
1
)
{
if
(
$
(
'#input-reason'
).
val
()
==
''
)
{
layer
.
msg
(
'请填写其他原因!'
);
return
false
;
}
}
$
(
'.input-cancel-reason'
).
click
();
// 弹出提示
layer
.
open
({
title
:
'提醒'
,
content
:
'<div>确定审核不通过吗?</div>'
,
btn
:[
'取消'
,
'确定'
],
yes
:
function
(
index
,
layero
){
layer
.
close
(
index
);
},
btn2
:
function
(
index
,
layero
){
$
.
ajax
({
url
:
'/ajaxCheck'
,
type
:
'post'
,
data
:
$
(
'#checkOrderForm'
).
serialize
(),
dataType
:
'json'
,
success
:
function
(
resp
)
{
if
(
resp
.
errcode
===
0
){
layer
.
msg
(
resp
.
errmsg
||
'操作成功'
);
setTimeout
(
function
(){
location
.
reload
();
},
1000
);
}
else
{
layer
.
alert
(
resp
.
errmsg
||
'网络异常'
);
}
},
// if (reason == null) {
// layer.msg('请选择不通过原因!');
// return false;
// } else if (reason == 1) {
// if ($('#input-reason').val() == '') {
// layer.msg('请填写其他原因!');
// return false;
// }
// }
error
:
function
(
res
)
{
console
.
log
(
res
);
}
})
}
});
// // 弹出提示
// layer.open({
// title: '提醒',
// content: '<div>确定审核不通过吗?</div>',
// btn:['取消','确定'],
// yes: function(index, layero){
// layer.close(index);
// },
// btn2: function(index, layero){
// $.ajax({
// url : '/ajaxCheck',
// type: 'post',
// data: $('#checkOrderForm').serialize(),
// 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);
// }
// })
// }
// });
return
false
;
}
...
...
resources/views/addOffline/content.blade.php
View file @
d3d47b3f
...
...
@@ -3,7 +3,7 @@
<h3>
客户信息
</h3>
</div>
<div
class=
"ibox-content"
>
<div
class=
"ibox-content
create-order
"
>
<div
class=
"account-info"
>
<h4>
账户信息
<span
class=
"title-tips"
><i
class=
"fa fa-info-circle"
></i>
此账号为内部下单账号,前台不可登录。
</span></h4>
...
...
resources/views/addOnline/content.blade.php
View file @
d3d47b3f
...
...
@@ -3,7 +3,7 @@
<h3>
客户信息
</h3>
</div>
<div
class=
"ibox-content"
>
<div
class=
"ibox-content
create-order
"
>
<div
class=
"row"
style=
"margin-bottom: 30px;"
>
<div
class=
"col-sm-12"
>
<input
type=
"text"
class=
"search-user"
name=
"user-mobile"
value=
""
placeholder=
"请输入会员账号"
>
...
...
resources/views/addOrder/content.blade.php
View file @
d3d47b3f
...
...
@@ -3,7 +3,7 @@
<h3>
客户信息
</h3>
</div>
<div
class=
"ibox-content"
>
<div
class=
"ibox-content
create-order
"
>
<div
class=
"row"
style=
"margin-bottom: 30px;"
>
<div
class=
"col-sm-12"
>
<input
type=
"text"
class=
"search-user"
name=
"user-mobile"
value=
""
placeholder=
"请输入会员账号"
>
...
...
resources/views/detail/changeOrder.blade.php
View file @
d3d47b3f
...
...
@@ -43,6 +43,7 @@
@endif
<!-- 审核 -->
@if ($order_info['order_goods_type'] == 1)
<p>
审核
</p>
<table
class=
"table table-bordered table-hover check-table"
>
<tr>
...
...
@@ -60,12 +61,22 @@
<td
class=
"check-table-title"
width=
"20%"
>
调价审核:
</td>
<td
class=
"check-select"
>
<label><input
type=
"radio"
name=
"order_status"
value=
"2"
checked
>
审核通过
</label>
<label><input
type=
"radio"
name=
"order_status"
value=
"-1"
id=
"faild
"
>
审核不通过
</label>
<label><input
type=
"radio"
name=
"order_status"
class=
"input-cancel-reason"
value=
"-1"
data-oid=
"{{$order_info['order_id']}}"
data-type=
"3
"
>
审核不通过
</label>
</td>
</tr>
<tr
class=
"cancle_reason"
style=
"display: none;"
>
<
!-- <
tr class="cancle_reason" style="display: none;">
<td class="check-table-title">审核不通过原因:</td>
<td>
<div class="form-group">
<label>常见原因:</label>
<div class="input-radio">
<label class="radio-inline"><input type="radio" name="cancel_reason" value="测试订单">测试订单</label>
<label class="radio-inline"><input type="radio" name="cancel_reason" value="客户没需求">客户没需求</label>
<label class="radio-inline"><input type="radio" name="cancel_reason" value="审核太久">审核太久</label>
<label class="radio-inline"><input type="radio" name="cancel_reason" value="订单信息填错">订单信息填错</label>
<label class="radio-inline"><input type="radio" name="cancel_reason" value="需用优惠券">需用优惠券</label>
</div>
</div>
<div class="multi-reason">
<label><input type="radio" name="reason" value="客户不接受调价">客户不接受调价</label>
<label><input type="radio" name="reason" value="无现货">无现货</label>
...
...
@@ -78,10 +89,12 @@
<textarea name="reason" id="input-reason" placeholder="请填写其他原因"></textarea>
</div>
</td>
</tr>
</tr>
-->
</table>
<hr/>
@endif
<!-- 调价 -->
<p>
调价
</p>
<table
class=
"table table-bordered table-hover order-change-table"
>
...
...
resources/views/detail/content.blade.php
View file @
d3d47b3f
...
...
@@ -410,7 +410,7 @@
<th>
供应商
</th>
<?php
if
(
$action_name
==
'changeOrder'
&&
count
(
$order_items_info
)
>
1
&&
$order_info
[
'status'
]
==
1
)
{
if
(
$action_name
==
'changeOrder'
&&
count
(
$order_items_info
)
>
1
&&
in_array
(
$order_info
[
'status'
],
[
1
,
2
])
)
{
echo
'<th>操作</th>'
;
}
?>
...
...
@@ -575,15 +575,16 @@
@if (!isset($_REQUEST['tags'])
&&
$action_name != 'changeOrder'
&&
$action_name != 'sendSales')
<p
style=
"padding-left: 5px;"
>
操作
</p>
<div
class=
"tabs-box"
>
@if (in_array($order_info['status'], [1, 2])
&&
in_array('cancel_order', $userPerms))
<!-- <a href="{{URL('cancelPay', ['order_id'=>$order_info['order_id']])}}" class="btn btn-danger">取消订单</a> -->
<a
class=
"btn btn-danger input-cancel-reason"
href=
"javascript:;"
data-oid=
"{{$order_info['order_id']}}"
data-type=
"2"
>
取消订单
</a>
@endif
<!-- 判断操作权限 -->
@if (in_array($order_info['status'], [1, 2])
&&
in_array('check_order', $userPerms))
<a
class=
"btn btn-info"
href=
"{{URL('change', ['order_id'=>$order_info['order_id']])}}"
>
人工审单
</a>
@endif
@if ($order_info['status'] == 2
&&
in_array('cancel_order', $userPerms))
<a
href=
"{{URL('cancelPay', ['order_id'=>$order_info['order_id']])}}"
class=
"btn btn-danger"
>
取消订单
</a>
@endif
<!-- 预付款 管理员完成首款对账后改变'对账'按钮 -->
@if (in_array($order_info['status'], [2, 3])
&&
in_array('check_account', $userPerms))
@if ($order_info['status'] == 3
&&
(!empty($order_pay_log)
&&
$order_pay_log[0]['pay_type'] != ''))
...
...
@@ -606,20 +607,21 @@
@elseif (isset($_REQUEST['tags'])
&&
$_REQUEST['tags'] == 'self'
&&
$action_name != 'changeOrder')
<p
style=
"padding-left: 5px;"
>
操作
</p>
<div
class=
"tabs-box"
>
@if (in_array($order_info['status'], [1, 2, 3, 4])
&&
in_array('self_order_cancel', $userPerms))
<!-- <a class="btn btn-danger self_cancel" href="javascript:;" data-id="{{$order_info['order_id']}}">取消订单</a> -->
<a
class=
"btn btn-danger input-cancel-reason"
href=
"javascript:;"
data-oid=
"{{$order_info['order_id']}}"
data-type=
"2"
>
取消订单
</a>
@endif
<!-- 判断状态和权限 $extend-自营线下订单 -->
@if ($order_info['status'] == 1
&&
in_array('add_offline_audit', $userPerms)
&&
$extend)
<
a
class=
"btn btn-success self-check"
data-id=
"{{$order_info['order_id']}}"
>
内部订单审核
</a
>
<
!-- <a class="btn btn-success self-check" data-id="{{$order_info['order_id']}}">内部订单审核</a> --
>
@endif
<!-- 订单审单 -->
@if (in_array($order_info['status'], [1, 2])
&&
in_array('self_check_order', $userPerms)
&&
!$extend
)
@if (in_array($order_info['status'], [1, 2])
&&
in_array('self_check_order', $userPerms))
<a
class=
"btn btn-info"
href=
"/change/{{$order_info['order_id']}}?tags=self"
>
人工审单
</a>
@endif
@if (in_array($order_info['status'], [1, 2, 3, 4])
&&
!$extend
&&
in_array('self_order_cancel', $userPerms))
<a
class=
"btn btn-danger self_cancel"
href=
"javascript:;"
data-id=
"{{$order_info['order_id']}}"
>
取消订单
</a>
@endif
@if ($order_info['status'] == 2
&&
in_array('self_check_pay', $userPerms))
<a
href=
"/self_check_pay/{{$order_info['order_id']}}?tags=self"
class=
"btn btn-success"
>
对账
</a>
@endif
...
...
resources/views/orderlist/content.blade.php
View file @
d3d47b3f
...
...
@@ -325,7 +325,7 @@
@endif
@if ($v['status'] == -1
&&
!$v['cancel_reason'])
<a
class=
"btn btn-danger input-cancel-reason"
href=
"javascript:;"
data-oid=
"{{$v['order_id']}}"
>
填写取消原因
</a>
<a
class=
"btn btn-danger input-cancel-reason"
href=
"javascript:;"
data-oid=
"{{$v['order_id']}}"
data-type=
"4"
>
填写取消原因
</a>
@endif
</div>
</td>
...
...
@@ -340,9 +340,13 @@
<td
class=
"table-list-content"
>
<p
class=
"show-title"
title=
"{{App\Http\Controllers\getCompanyName($v['user_id'])}}"
>
{{App\Http\Controllers\getCompanyName($v['user_id'])}}
</p>
</td>
<td
class=
"table-list-title"
>
Adtag或其它
</td>
<td
class=
"table-list-content"
colspan=
"3"
>
<p
class=
"show-title"
title=
"
<?php
echo
App\Http\Controllers\handleOrderSource
(
$v
[
'order_source'
]);
?>
"
>
<?php
echo
App\Http\Controllers\handleOrderSource
(
$v
[
'order_source'
]);
?>
</p>
<td
class=
"table-list-title"
>
是否新订单
</td>
<td
class=
"table-list-content"
>
<?php
$is_new_order
=
App\Http\Controllers\getOrderExtend
(
$v
[
'order_id'
],
'is_new'
);
echo
$is_new_order
&&
$is_new_order
->
is_new
?
'是'
:
'否'
;
?>
</td>
</tr>
@if ($v['order_pay_type'] == 2)
...
...
@@ -433,6 +437,12 @@
<td
class=
"table-list-title"
>
发货状态
</td>
<td
class=
"table-list-content"
>
{{$shippingStatus}}
</td>
</tr>
<tr>
<td
class=
"table-list-title"
>
Adtag或其它
</td>
<td
class=
"table-list-content"
colspan=
"3"
>
<p
class=
"show-title"
title=
"
<?php
echo
App\Http\Controllers\handleOrderSource
(
$v
[
'order_source'
]);
?>
"
>
<?php
echo
App\Http\Controllers\handleOrderSource
(
$v
[
'order_source'
]);
?>
</p>
</td>
</tr>
</table>
</td>
</tr>
...
...
resources/views/selfOrder/content.blade.php
View file @
d3d47b3f
...
...
@@ -276,8 +276,7 @@
<div
class=
"btn-group btn-group-xs"
>
<a
class=
"btn btn-primary"
href=
"/details/{{$v['order_id']}}?tags=self"
target=
"_blank"
>
详情
</a>
<?php
$extend
=
App\Http\Controllers\getOrderExtend
(
$v
[
'order_id'
]);
?>
@if (in_array('self_check_order', $userPerms)
&&
in_array($v['status'], [1, 2])
&&
!$extend)
@if (in_array('self_check_order', $userPerms)
&&
in_array($v['status'], [1, 2]))
<a
class=
"btn btn-success"
href=
"/change/{{$v['order_id']}}?tags=self"
target=
"_blank"
>
人工审单
</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