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
a6f43a8e
authored
Jan 11, 2019
by
PRY5YKGJ82EZEPX\Administrator
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
更新pcb后台
parent
8fc775de
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
2 deletions
app/Model/Pcb/PcbOrderModel.php
app/Model/Pcb/PcbPublicModel.php
app/Model/Pcb/PcbServerModel.php
resources/views/Pcb/PcbOrderList.blade.php
app/Model/Pcb/PcbOrderModel.php
View file @
a6f43a8e
...
...
@@ -3,6 +3,7 @@
namespace
App\Model\Pcb
;
use
App\Map\PcbOrderMap
;
use
App\Model\UserMainModel
;
use
Illuminate\Database\Eloquent\Model
;
use
Request
;
use
DB
;
...
...
@@ -17,11 +18,11 @@ class PcbOrderModel extends Model
//列表
public
function
getList
(
$type
=
1
)
{
$arr
=
[
'p'
,
'limit'
,
'self'
,
'start_time'
,
'end_time'
,
'status'
,
"user_account"
,
"order_sn"
,
"purchase_sn"
,
"order_type"
,
"adtag"
,
"ptag"
];
$arr
=
[
'p'
,
'limit'
,
'self'
,
'start_time'
,
'end_time'
,
'status'
,
"user_account"
,
"order_sn"
,
"purchase_sn"
,
"order_type"
,
"adtag"
,
"ptag"
,
"test_order"
];
$input
=
Request
::
only
(
$arr
);
$input
=
TrimX
(
$input
,
true
,
$arr
);
//
//查询数据\
//查询数据\
$list
=
$this
->
where
(
function
(
$query
)
use
(
$input
)
{
$PcbPurchaseModel
=
new
PcbPurchaseModel
();
foreach
(
$input
as
$k
=>
$v
){
...
...
@@ -30,6 +31,7 @@ class PcbOrderModel extends Model
case
"p"
:
case
"limit"
:
case
"_url"
:
case
"test_order"
:
continue
;
break
;
case
"start_time"
:
...
...
@@ -56,6 +58,11 @@ class PcbOrderModel extends Model
}
}
})
->
orderBy
(
'order_id'
,
'desc'
);
if
(
empty
(
$input
[
'test_order'
])){
//排除测试账号
$testMobile
=
(
new
UserMainModel
())
->
testMobile
();
$list
->
whereNotIn
(
'user_id'
,
$testMobile
);
}
//getSql();
if
(
$type
==
1
){
$input
[
'limit'
]
=
10
;
...
...
app/Model/Pcb/PcbPublicModel.php
View file @
a6f43a8e
...
...
@@ -86,6 +86,8 @@ class PcbPublicModel
$con
->
commit
();
(
new
PcbServerModel
())
->
pcb_delivered_customer
(
$data
[
'order_sn'
],
$data
[
'shipping_no'
],
$data
[
'shipping_name'
]);
return
[
0
,
'成功'
];
}
catch
(
\Exception
$e
)
{
...
...
app/Model/Pcb/PcbServerModel.php
View file @
a6f43a8e
...
...
@@ -75,4 +75,21 @@ class PcbServerModel
}
return
$res
;
}
/*
* 发送短信,发货给客户短信
* @param int $purchase_id 采购ID
*/
public
function
pcb_delivered_customer
(
$order_sn
,
$shipping_no
,
$shipping_name
){
$param
=
[
'order_sn'
=>
$order_sn
,
'shipping_no'
=>
$shipping_no
,
'shipping_name'
=>
$shipping_name
,
];
$res
=
curlApi
(
$this
->
PcbUrl
.
'/pcb/adminapi/pcb_delivered_customer'
,
$param
,
'POST'
);
$json
=
json_decode
(
$res
,
true
);
if
(
$json
[
'err_code'
]
==
0
){
PcbActionLogModel
::
log
(
1
,
'pcb_delivered_customer'
,
"发货给客户短信"
,
$order_sn
);
}
return
$res
;
}
}
\ No newline at end of file
resources/views/Pcb/PcbOrderList.blade.php
View file @
a6f43a8e
...
...
@@ -13,6 +13,12 @@
<input
type=
"text"
name=
"end_time"
id=
"end_time"
value=
"
<?=
@
$_GET
[
'end_time'
]
?>
"
placeholder=
"结束时间"
style=
"float: left;margin-left: 10px;"
autocomplete=
"off"
class=
"layui-input"
>
</div>
</div>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
是否包括测试:
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"checkbox"
lay-ignore
name=
"test_order"
<?php
if
(
@
$_GET
[
'test_order'
])
echo
"checked='checked'"
?>
>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
...
...
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