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
7ddcc0c8
authored
Dec 10, 2018
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
temp
parent
a4d2db41
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
104 deletions
app/Http/Controllers/OrderController.php
public/js/order.js
app/Http/Controllers/OrderController.php
View file @
7ddcc0c8
...
...
@@ -684,8 +684,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'
,
''
),
...
...
public/js/order.js
View file @
7ddcc0c8
...
...
@@ -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,77 @@
location
.
href
=
listUrl
;
})
this
.
cancelorder
();
},
// 取消订单弹框
cancelorder
:
function
()
{
// 填写订单取消原因
$
(
'.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
);
}
})
})
},
details
:
function
(){
...
...
@@ -1265,8 +1236,8 @@
$
(
'.checkOrder'
).
click
(
function
(){
var
is_newClient
=
$
(
'input[name=is_newClient]:checked'
).
val
();
var
client_source
=
$
(
'input[name=client_source]:checked'
).
val
();
var
order_status
=
$
(
'input[name=order_status]:checked'
).
val
()
?
$
(
'input[name=order_status]:checked'
).
val
()
:
2
;
var
pay_type
=
$
(
'input[name=order_pay_type]:checked'
).
val
()
?
$
(
'input[name=order_pay_type]:checked'
).
val
()
:
1
;
// 订单付款类型
var
order_status
=
$
(
'input[name=order_status]:checked'
).
val
();
var
pay_type
=
$
(
'input[name=order_pay_type]:checked'
).
val
();
// 订单付款类型
var
reason
=
$
(
'input[name=reason]:checked'
).
val
();
var
payTime
=
$
(
'.payTime'
).
val
();
var
payTimeOther
=
$
(
'.payTimeOther'
).
val
();
...
...
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