切换导航条
此项目
正在载入...
登录
anyv
/
xkeasy
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
刘朕
6 years ago
提交
cfa674fe83c5f8892f9026496ca925cf2e0d5c93
1 个父辈
9c731d95
1 个管道 的构建
通过
耗费 27 秒
后台平台订单发货调整,前台展示信息调整
变更
5
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
5 个修改的文件
包含
153 行增加
和
20 行删除
app/admin/controller/OrderscourierController.php
app/portal/controller/LogisticsController.php
public/themes/admin_simpleboot3/admin/orderscourier/fahuo.html
public/themes/admin_simpleboot3/admin/orderscourier/order_list.html
public/themes/simpleboot3/portal/logistics/index.html
app/admin/controller/OrderscourierController.php
查看文件 @
cfa674f
...
...
@@ -71,9 +71,89 @@ class OrderscourierController extends AdminBaseController{
}
/**
* 发货
* @adminMenu(
* 'name' => '发货',
* 'parent' => 'index',
* 'display'=> false,
* 'hasView'=> false,
* 'order' => 10000,
* 'icon' => '',
* 'remark' => '发货',
* 'param' => ''
* )
*/
public
function
fahuo
()
{
$id
=
$this
->
request
->
param
(
'id'
,
0
,
'intval'
);
if
(
$this
->
request
->
isPost
())
{
$param
=
$this
->
request
->
param
();
$url
=
$param
[
'url'
];
unset
(
$param
[
'url'
]);
// 判断订单是否可发货
$info
=
Db
::
name
(
'indent'
)
->
where
(
'id'
,
$param
[
'id'
])
->
find
();
if
(
!
$info
)
{
$this
->
error
(
"订单不存在!"
);
}
if
(
$info
[
'state'
]
!=
2
)
{
$this
->
error
(
"订单无法发货!"
);
}
// 修改发货状态
$param
[
'state'
]
=
5
;
$result
=
Db
::
name
(
'indent'
)
->
update
(
$param
);
if
(
$result
)
{
$this
->
success
(
"发货成功!"
,
$url
);
}
else
{
$this
->
error
(
'发货失败!'
);
}
}
else
{
if
(
$id
)
{
$info
=
Db
::
name
(
'indent'
)
->
where
(
'id'
,
$id
)
->
find
();
$this
->
assign
(
'info'
,
$info
);
$this
->
assign
(
'url'
,
$_SERVER
[
'HTTP_REFERER'
]);
return
$this
->
fetch
();
}
else
{
$this
->
error
(
'数据传入失败!'
);
}
}
}
/**
* 完成
* @adminMenu(
* 'name' => '完成',
* 'parent' => 'index',
* 'display'=> false,
* 'hasView'=> false,
* 'order' => 10000,
* 'icon' => '',
* 'remark' => '完成',
* 'param' => ''
* )
*/
public
function
complete
()
{
$param
=
$this
->
request
->
param
();
// 判断订单是否可发货
$info
=
Db
::
name
(
'indent'
)
->
where
(
'id'
,
$param
[
'id'
])
->
find
();
if
(
!
$info
)
{
$this
->
error
(
"订单不存在!"
);
}
if
(
$info
[
'state'
]
!=
5
)
{
$this
->
error
(
"订单无法完成!"
);
}
// 修改发货状态
$param
[
'state'
]
=
3
;
$result
=
Db
::
name
(
'indent'
)
->
update
(
$param
);
if
(
$result
)
{
$this
->
success
(
"操作成功!"
);
}
else
{
$this
->
error
(
'操作失败!'
);
}
}
...
...
app/portal/controller/LogisticsController.php
查看文件 @
cfa674f
...
...
@@ -27,22 +27,22 @@ class LogisticsController extends WeChatBaseController
if
(
empty
(
$data
)){
$this
->
error
(
'查询为空'
,
''
,
''
,
''
);
}
if
(
$data
[
'is_courier'
]
==
1
){
$result
[
'data'
]
=
$data
[
'start_time'
];
}
else
{
$result
=
$birdController
->
getOrder
(
$indent_id
);
if
(
empty
(
$result
)){
$this
->
error
(
'未知错误'
,
''
,
''
);
}
if
(
$result
[
'code'
]
!=
20000
){
$this
->
error
(
$result
[
'msg'
],
''
,
''
,
''
);
}
}
// if($data['is_courier'] == 1){
// $result['data'] = $data['start_time'];
// }else{
// $result = $birdController->getOrder($indent_id);
// if(empty($result)){
// $this->error('未知错误','','');
// }
// if($result['code'] != 20000){
// $this->error($result['msg'],'','','');
// }
// }
$indent
=
$indentModel
->
findData
([
'id'
=>
$indent_id
])
->
toArray
();
$indentGoodsModel
=
new
IndentGoodsModel
();
$indent_goods
=
$indentGoodsModel
->
selectData
([
'indent_id'
=>
$indent_id
]);
$indent
[
'indent_goods'
]
=
$indent_goods
;
$this
->
assign
(
'data'
,
$result
[
'data'
]);
//
$this->assign('data',$result['data']);
$this
->
assign
(
'data2'
,
$data
->
toArray
());
$this
->
assign
(
'indent'
,
$indent
);
return
$this
->
fetch
();
...
...
public/themes/admin_simpleboot3/admin/orderscourier/fahuo.html
0 → 100644
查看文件 @
cfa674f
<include
file=
"public@header"
/>
</head>
<body>
<div
class=
"wrap js-check-wrap"
>
<ul
class=
"nav nav-tabs"
>
<li><a
href=
"{$url}"
>
平台订单列表
</a></li>
<li
class=
"active"
><a
href=
"javascript:;"
>
发货
</a></li>
</ul>
<form
action=
"{:url('Orderscourier/fahuo')}"
method=
"post"
class=
"form-horizontal js-ajax-form margin-top-20"
>
<div
class=
"row"
>
<div
class=
"col-md-9"
>
<table
class=
"table table-bordered"
>
<tr>
<th>
快递单号
<span
class=
"form-required"
>
*
</span></th>
<td>
<input
class=
"form-control"
type=
"text"
style=
"width:400px;"
name=
"logistic_code"
id=
"logistic_code"
required
value=
""
placeholder=
"请输入快递单号"
/>
</td>
</tr>
<tr>
<th>
信息来源
<span
class=
"form-required"
>
*
</span></th>
<td>
<input
class=
"form-control"
type=
"text"
name=
"logistic_name"
id=
"logistic_name"
value=
""
required
style=
"width: 400px"
placeholder=
"请输入信息来源"
>
</td>
</tr>
</table>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"col-sm-offset-2 col-sm-10"
>
<input
type=
"hidden"
name=
"id"
value=
"{$info.id}"
>
<input
type=
"hidden"
name=
"url"
value=
"{$url}"
>
<button
type=
"submit"
class=
"btn btn-primary js-ajax-submit"
>
{:lang('SAVE')}
</button>
<a
class=
"btn btn-default"
href=
"{$url}"
>
{:lang('BACK')}
</a>
</div>
</div>
</form>
</div>
<script
type=
"text/javascript"
src=
"__STATIC__/js/admin.js"
></script>
</body>
</html>
\ No newline at end of file
...
...
public/themes/admin_simpleboot3/admin/orderscourier/order_list.html
查看文件 @
cfa674f
...
...
@@ -26,6 +26,7 @@
<select
name=
"state"
class=
"form-control"
>
<option
value=
""
>
全部
</option>
<option
value=
"3"
<
eq
name=
"state"
value=
"3"
>
selected
</eq>
>已完成
</option>
<option
value=
"5"
<
eq
name=
"state"
value=
"5"
>
selected
</eq>
>已发货
</option>
<option
value=
"2"
<
eq
name=
"state"
value=
"2"
>
selected
</eq>
>未完成
</option>
</select>
<input
type=
"submit"
class=
"btn btn-primary"
value=
"搜索"
/>
...
...
@@ -58,20 +59,25 @@
<td>
未完成
</td>
<elseif
condition=
"$vo.state eq 3"
/>
<td>
已完成
</td>
<elseif
condition=
"$vo.state eq 5"
/>
<td>
已发货
</td>
</if>
<td>
{$vo.create_time|date="Y-m-d H:i:s",###}
</td>
<td
style=
"width: 230px;"
class=
"fahuo{$vo.id}"
>
<a
href=
"{:url('Platformorders/plat_view',array('id'=>$vo.id))}"
><button
type=
"button"
class=
"btn btn-default"
>
查看
</button></a>
<if
condition=
"$vo.state eq 2"
>
<button
type=
"button"
class=
"btn btn-default"
>
物流信息
</button>
<else/>
<a
href=
"{:url('Orderscourier/logistics_information',array('id'=>$vo.id))}"
><button
type=
"button"
class=
"btn btn-default"
>
物流信息
</button></a>
</if>
<!-- <if condition="$vo.state eq 2">-->
<!-- <button type="button" class="btn btn-default">物流信息</button>-->
<!-- <else/>-->
<!-- <a href="{:url('Orderscourier/logistics_information',array('id'=>$vo.id))}"><button type="button" class="btn btn-default">物流信息</button></a>-->
<!-- </if>-->
<if
condition=
"$vo.state eq 2"
>
<button
type=
"button"
class=
"btn btn-default daifa{$vo.id}"
onclick=
"deliver_goods({$vo.id})"
>
待发货
</button>
<else/>
<button
type=
"button"
class=
"btn btn-default"
>
已发货
</button>
<a
href=
"{:url('Orderscourier/fahuo',array('id'=>$vo['id']))}"
><button
type=
"button"
class=
"btn btn-default"
>
发货
</button></a>
<elseif
condition=
"$vo.state eq 5"
>
<a
class=
"js-ajax-delete"
href=
"{:url('Orderscourier/complete',array('id'=>$vo['id']))}"
data-msg=
"您确定该订单已完成吗?"
>
<button
type=
"button"
class=
"btn btn-default"
>
完成
</button>
</a>
</elseif>
</if>
</td>
...
...
public/themes/simpleboot3/portal/logistics/index.html
查看文件 @
cfa674f
...
...
@@ -29,6 +29,8 @@
<p>
运单号:
<notempty
name=
"$indent.logistic_code"
>
{$indent.logistic_code}
<else
/>
暂无
</notempty></p>
<p>
信息来源:
{$indent.logistic_name}
<!--
<if condition="$indent.logistic_name eq 'SF'">
顺丰快递
<elseif condition="$indent.logistic_name eq 'YTO'"/>
...
...
@@ -60,12 +62,14 @@
暂无
</if>
</if>
-->
</p>
</div>
</div>
<!-- 物流信息 -->
<!--
<div class="logistics_process">
<div class="logistics_left">
<if condition="$data2.is_courier eq 1">
...
...
@@ -110,6 +114,7 @@
</if>
</div>
</div>
-->
</div>
<script
src=
"__TMPL__/public/assets/js/base.js"
></script>
<script
src=
"__TMPL__/public/assets/js/jquery.js"
></script>
...
...
请
注册
或
登录
后发表评论