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
de60b83b
authored
Jul 30, 2018
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整用户来源
parent
3f77f3a2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
15 deletions
app/Http/Controllers/OrderController.php
public/js/order.js
resources/views/detail/changeOrder.blade.php
app/Http/Controllers/OrderController.php
View file @
de60b83b
...
@@ -185,6 +185,14 @@ function getSalesName($sale_id)
...
@@ -185,6 +185,14 @@ function getSalesName($sale_id)
return
isset
(
$user
->
name
)
?
$user
->
name
:
''
;
return
isset
(
$user
->
name
)
?
$user
->
name
:
''
;
}
}
// 判断用户是否为新用户 -- 第一次下单
function
isNewClient
(
$user_id
)
{
$count
=
DB
::
connection
(
'order'
)
->
table
(
'lie_order'
)
->
where
(
'user_id'
,
$user_id
)
->
count
();
return
$count
==
1
?
true
:
false
;
}
Class
OrderController
extends
Controller
Class
OrderController
extends
Controller
{
{
// 首页
// 首页
...
...
public/js/order.js
View file @
de60b83b
...
@@ -1152,23 +1152,25 @@
...
@@ -1152,23 +1152,25 @@
var
payTime
=
$
(
'.payTime'
).
val
();
var
payTime
=
$
(
'.payTime'
).
val
();
var
payTimeOther
=
$
(
'.payTimeOther'
).
val
();
var
payTimeOther
=
$
(
'.payTimeOther'
).
val
();
// 用户来源
if
(
isNewClient
)
{
if
(
is_newClient
==
null
)
{
// 用户来源
layer
.
msg
(
'请选择用户来源!'
);
if
(
is_newClient
==
null
)
{
return
false
;
layer
.
msg
(
'请选择用户来源!'
);
}
if
(
is_newClient
==
1
)
{
if
(
client_source
==
null
)
{
layer
.
msg
(
'请选择用户来源渠道!'
);
return
false
;
return
false
;
}
else
if
(
client_source
==
1
)
{
}
if
(
$
(
'#input-other-source'
).
val
()
==
''
)
{
layer
.
msg
(
'请填写其他来源!'
);
if
(
is_newClient
==
1
)
{
if
(
client_source
==
null
)
{
layer
.
msg
(
'请选择用户来源渠道!'
);
return
false
;
return
false
;
}
}
else
if
(
client_source
==
1
)
{
}
if
(
$
(
'#input-other-source'
).
val
()
==
''
)
{
}
layer
.
msg
(
'请填写其他来源!'
);
return
false
;
}
}
}
}
// 审核不通过
// 审核不通过
if
(
order_status
==
-
1
)
{
if
(
order_status
==
-
1
)
{
...
...
resources/views/detail/changeOrder.blade.php
View file @
de60b83b
...
@@ -14,6 +14,8 @@
...
@@ -14,6 +14,8 @@
<input
type=
"hidden"
name=
"check_failed_info"
value=
""
>
<input
type=
"hidden"
name=
"check_failed_info"
value=
""
>
<input
type=
"hidden"
name=
"change_pay_type"
value=
""
>
<input
type=
"hidden"
name=
"change_pay_type"
value=
""
>
<?php
$isNewClient
=
App\Http\Controllers\isNewClient
(
$order_info
[
'user_id'
]);
?>
@if ($isNewClient)
<!-- 用户来源 -->
<!-- 用户来源 -->
<p>
用户来源
</p>
<p>
用户来源
</p>
<table
class=
"table table-bordered table-hover check-table"
>
<table
class=
"table table-bordered table-hover check-table"
>
...
@@ -43,6 +45,7 @@
...
@@ -43,6 +45,7 @@
</td>
</td>
</tr>
</tr>
</table>
</table>
@endif
<!-- 审核 -->
<!-- 审核 -->
<p>
审核
</p>
<p>
审核
</p>
...
@@ -344,6 +347,7 @@
...
@@ -344,6 +347,7 @@
<script>
<script>
var
is_manager
=
"{{ $role == 1 || $role == 2 ? true : false }}"
;
var
is_manager
=
"{{ $role == 1 || $role == 2 ? true : false }}"
;
var
isNewClient
=
"{{$isNewClient}}"
;
var
order_amount
=
"{{$order_info['order_amount']}}"
;
var
order_amount
=
"{{$order_info['order_amount']}}"
;
var
currency
=
"{{$order_info['currency']}}"
;
var
currency
=
"{{$order_info['currency']}}"
;
var
order_pay_type
=
"{{$order_info['order_pay_type']}}"
;
var
order_pay_type
=
"{{$order_info['order_pay_type']}}"
;
...
...
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