diff --git a/app/controller/manager/mall/Order.php b/app/controller/manager/mall/Order.php index db061a7..433a4bc 100755 --- a/app/controller/manager/mall/Order.php +++ b/app/controller/manager/mall/Order.php @@ -771,4 +771,23 @@ class Order extends Base return $this->json(5001,"创建压缩文件失败"); } + public function del() + { + $id = input("id/d",0); + $order = OrderModel::findById($id); + if(empty($order)){ + return $this->json(4001,"订单不存在"); + } + Db::startTrans(); + try { + OrderSku::where("order_coding",$order["coding"])->delete(); + $order->delete(); + Db::commit(); + return $this->json(); + }catch (Exception $e){ + Db::rollback(); + return $this->json(5001,"删除订单失败"); + } + + } } \ No newline at end of file diff --git a/public/static/manager/js/mall/order.js b/public/static/manager/js/mall/order.js index e7fe8ad..a51109d 100755 --- a/public/static/manager/js/mall/order.js +++ b/public/static/manager/js/mall/order.js @@ -154,7 +154,7 @@ layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect', 'laydate' // {field: 'express_code', title: '快递公司代号', minWidth: 150, hide: true}, // {field: 'express_name', title: '快递公司名称', minWidth: 150, hide: true}, // {field: 'accepted_at', title: '确认收货时间', width: 160, hide: true}, - { fixed: 'right', title: '操作', minWidth:220,templet: '#row-operate'} + { fixed: 'right', title: '操作', minWidth:250,templet: '#row-operate'} ]], done: function () { Tools.setInsTb(insTb); diff --git a/view/manager/mall/order/index.html b/view/manager/mall/order/index.html index a1e4e5f..e034e66 100755 --- a/view/manager/mall/order/index.html +++ b/view/manager/mall/order/index.html @@ -108,7 +108,8 @@ 详情 - + 删除 {{# if (d.status == 'paid' || d.status == 'shipped') { let sendTitle = d.status == 'paid' ? '发货' : '重发'; }}