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
7a27307f
authored
Apr 09, 2018
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整同步状态
parent
3466b1ab
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
23 deletions
app/Http/Controllers/OrderController.php
public/js/order.js
resources/views/orderlist/content.blade.php
app/Http/Controllers/OrderController.php
View file @
7a27307f
...
...
@@ -244,7 +244,7 @@ Class OrderController extends Controller
// $map['order_pay_status'] = $request->input('order_pay_status', '');
$map
[
'order_source_pf'
]
=
$request
->
input
(
'order_source_pf'
,
''
);
$map
[
'order_source_adtag'
]
=
$request
->
input
(
'order_source_adtag'
,
''
);
$map
[
'
order_erp_syn'
]
=
$request
->
input
(
'order_erp_syn
'
,
''
);
$map
[
'
erp_order_id'
]
=
$request
->
input
(
'erp_order_id
'
,
''
);
}
// 若没有'查看线下订单'权限,则仅查看线上订单
...
...
@@ -397,7 +397,7 @@ Class OrderController extends Controller
$map
[
'order_type_a'
]
=
$request
->
input
(
'order_type_a'
,
''
);
$map
[
'order_source_pf'
]
=
$request
->
input
(
'order_source_pf'
,
''
);
$map
[
'order_source_adtag'
]
=
$request
->
input
(
'order_source_adtag'
,
''
);
$map
[
'
order_erp_syn'
]
=
$request
->
input
(
'order_erp_syn
'
,
''
);
$map
[
'
erp_order_id'
]
=
$request
->
input
(
'erp_order_id
'
,
''
);
}
// 若没有'查看线下订单'权限,则仅查看线上订单
...
...
@@ -539,9 +539,11 @@ Class OrderController extends Controller
})
->
where
(
function
(
$query
)
use
(
$map
)
{
// 同步状态
if
(
!
empty
(
$map
[
'order_erp_syn'
]))
{
$query
->
where
(
'o.erp_syn'
,
'='
,
$map
[
'order_erp_syn'
]);
}
if
(
$map
[
'erp_order_id'
]
==
1
)
{
$query
->
where
(
'o.erp_order_id'
,
'<>'
,
''
);
}
else
{
$query
->
where
(
'o.erp_order_id'
,
'='
,
''
);
}
})
->
where
(
function
(
$query
)
use
(
$map
)
{
// 竞调数据
...
...
public/js/order.js
View file @
7a27307f
...
...
@@ -27,7 +27,7 @@
order_source_pf
=
$
(
'#order_source_pf'
).
data
(
'default'
),
order_source_adtag
=
$
(
'input[name="order_source_adtag"]'
).
val
(),
test_order
=
$
(
'input[name=test_order]'
),
order_erp_syn
=
$
(
'#order_erp_syn
'
).
data
(
'default'
),
erp_order_id
=
$
(
'#erp_order_id
'
).
data
(
'default'
),
listUrl
=
'/list'
;
listUrl
+=
'?order_type='
+
order_type
;
...
...
@@ -76,15 +76,15 @@
listUrl
+=
'&order_source_adtag='
+
order_source_adtag
;
}
if
(
order_erp_syn
)
{
listUrl
+=
'&
order_erp_syn='
+
order_erp_syn
;
if
(
erp_order_id
)
{
listUrl
+=
'&
erp_order_id='
+
erp_order_id
;
}
if
(
test_order
.
is
(
':checked'
))
{
listUrl
+=
'&test_order='
+
1
;
}
if
(
!
order_contain
&&
!
time_start
&&
!
time_end
&&
!
order_pay_type
&&
!
order_status
&&
!
shipping_name
&&
!
order_send
&&
!
order_source_pf
&&
!
order_source_adtag
&&
!
order_erp_syn
&&
!
test_order
.
is
(
':checked'
))
{
if
(
!
order_contain
&&
!
time_start
&&
!
time_end
&&
!
order_pay_type
&&
!
order_status
&&
!
shipping_name
&&
!
order_send
&&
!
order_source_pf
&&
!
order_source_adtag
&&
!
erp_order_id
&&
!
test_order
.
is
(
':checked'
))
{
listUrl
=
'/list'
;
}
...
...
@@ -104,16 +104,16 @@
order_send
=
$
(
'#order_send'
).
data
(
'default'
),
order_source_pf
=
$
(
'#order_source_pf'
).
data
(
'default'
),
order_source_adtag
=
$
(
'input[name="order_source_adtag"]'
).
val
(),
order_erp_syn
=
$
(
'#order_erp_syn
'
).
data
(
'default'
),
erp_order_id
=
$
(
'#erp_order_id
'
).
data
(
'default'
),
test_order
=
$
(
'input[name=test_order]'
);
if
(
test_order
.
length
)
{
if
(
!
order_contain
&&
!
time_start
&&
!
time_end
&&
!
order_pay_type
&&
!
order_status
&&
!
shipping_name
&&
!
order_send
&&
!
order_source_pf
&&
!
order_source_adtag
&&
!
order_erp_syn
&&
!
test_order
.
is
(
':checked'
))
{
if
(
!
order_contain
&&
!
time_start
&&
!
time_end
&&
!
order_pay_type
&&
!
order_status
&&
!
shipping_name
&&
!
order_send
&&
!
order_source_pf
&&
!
order_source_adtag
&&
!
erp_order_id
&&
!
test_order
.
is
(
':checked'
))
{
layer
.
msg
(
'请选择筛选条件,再导出!'
);
return
false
;
}
}
else
{
if
(
!
order_contain
&&
!
time_start
&&
!
time_end
&&
!
order_pay_type
&&
!
order_status
&&
!
shipping_name
&&
!
order_send
&&
!
order_source_pf
&&
!
order_source_adtag
&&
!
order_erp_syn
)
{
if
(
!
order_contain
&&
!
time_start
&&
!
time_end
&&
!
order_pay_type
&&
!
order_status
&&
!
shipping_name
&&
!
order_send
&&
!
order_source_pf
&&
!
order_source_adtag
&&
!
erp_order_id
)
{
layer
.
msg
(
'请选择筛选条件,再导出!'
);
return
false
;
}
...
...
@@ -133,7 +133,7 @@
test_order
=
''
;
}
location
.
href
=
'/export?order_type='
+
order_type
+
'&order_contain='
+
order_contain
+
'&time_start='
+
time_start
+
'&time_end='
+
time_end
+
'&order_pay_type='
+
order_pay_type
+
'&order_status='
+
order_status
+
'&shipping_name='
+
shipping_name
+
'&order_send='
+
order_send
+
'&order_source_pf='
+
order_source_pf
+
'&order_source_adtag='
+
order_source_adtag
+
'&
order_erp_syn='
+
order_erp_syn
+
'&test_order='
+
test_order
;
location
.
href
=
'/export?order_type='
+
order_type
+
'&order_contain='
+
order_contain
+
'&time_start='
+
time_start
+
'&time_end='
+
time_end
+
'&order_pay_type='
+
order_pay_type
+
'&order_status='
+
order_status
+
'&shipping_name='
+
shipping_name
+
'&order_send='
+
order_send
+
'&order_source_pf='
+
order_source_pf
+
'&order_source_adtag='
+
order_source_adtag
+
'&
erp_order_id='
+
erp_order_id
+
'&test_order='
+
test_order
;
})
// 选择查看测试订单
...
...
resources/views/orderlist/content.blade.php
View file @
7a27307f
...
...
@@ -132,12 +132,11 @@
<dl>
<dt>
同步状态:
</dt>
<dd>
<div
class=
"droplist"
data-default=
"{{$condition['
order_erp_syn']}}"
id=
"order_erp_syn"
name=
"order_erp_syn
"
>
<div
class=
"droplist"
data-default=
"{{$condition['
erp_order_id']}}"
id=
"erp_order_id"
name=
"erp_order_id
"
>
<ul
class=
"dropdown-menu"
>
<li
data-val=
""
class=
"active"
>
全部
</li>
<li
data-val=
"1"
>
已同步
</li>
<li
data-val=
"-1"
>
不同步
</li>
<li
data-val=
"-2"
>
同步失败
</li>
</ul>
</div>
</dd>
...
...
@@ -249,14 +248,11 @@
?>
</td>
<td
class=
"show-list"
>
<?php
switch
(
$v
[
'erp_syn'
])
{
case
-
2
:
echo
'同步失败'
;
break
;
case
-
1
:
echo
'不同步'
;
break
;
case
1
:
echo
'已同步'
;
break
;
default
:
echo
'未配送'
;
break
;
}
?>
@if ($v['erp_order_id'])
已同步
@else
不同步
@endif
</td>
<td
class=
"show-list"
>
{{$username != 'vpadmin@ichunt.com' ? date('Y-m-d H:i:s', $v['create_time']) : date('Y-m-d', $v['create_time'])}}
</td>
<td>
...
...
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