wangxiaodong 3 years ago
parent
commit
4bdde488e3

+ 11 - 0
application/finance/controller/Brushorder.php

@@ -112,5 +112,16 @@ class Brushorder extends Controller
     }
 
 
+    /**
+     * 未刷出订单
+     * */
+    public function order_pay(){
+        $id = input('id/d',0);
+        $order_data['is_pay'] = 1;
+        $order_data['pay_time'] = date('Y-m-d H:i:s',time());
+        $is_up_order = Db::table('hy_brush_order')->where('id',$id)->update($order_data);
+        $is_card = Db::table('hy_order_card')->where('boid',$id)->update(['brush_pay'=>2]);
+        $this->success('操作成功','javascript:window.location.reload()');
+    }
 
 }

+ 1 - 1
application/finance/controller/Order.php

@@ -117,7 +117,7 @@ class Order extends Controller
         $order_data['pay_time'] = date('Y-m-d H:i:s',time());
         $is_pay = Db::table('hy_order')->where('id',$id)->update($order_data);
         $is_order_card = Db::table('hy_order_card')->where('oid',$id)->update(['is_pay'=>1]);
-        $this->success('操作成功','','javascript:window.location.reload()');
+        $this->success('操作成功','javascript:window.location.reload()');
     }
 
 

+ 4 - 0
application/finance/view/brushorder/index.html

@@ -64,6 +64,10 @@
                 <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除该账单吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('remove')}">删 除</a>
                 {/if}
 
+                {if auth("order_pay") && $vo.is_pay ==0}
+                <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定该账单已支付吗?" data-action="{:url('order_pay')}" data-value="id#{$vo.id}" data-csrf="{:systoken('order_pay')}">已支付</a>
+                {/if}
+
             </td>
         </tr>
         {/foreach}

+ 5 - 3
application/finance/view/order/index.html

@@ -54,14 +54,16 @@
                 <a data-dbclick class="layui-btn layui-btn-sm" data-title="查看具体账单" data-open='{:url("cardorder/index")}?id={$vo.id}'>查看详情</a>
                 {/if}
 
-                {if auth("order_pay") && $vo.is_pay ==0}
-                <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定该账单已支付吗?" data-action="{:url('order_pay')}" data-value="id#{$vo.id}" data-csrf="{:systoken('order_pay')}">已支付</a>
-                {/if}
+
 
                 {if auth("remove")}
                 <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除该账单吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('remove')}">删 除</a>
                 {/if}
 
+                {if auth("order_pay") && $vo.is_pay ==0}
+                <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定该账单已支付吗?" data-action="{:url('order_pay')}" data-value="id#{$vo.id}" data-csrf="{:systoken('order_pay')}">已支付</a>
+                {/if}
+
             </td>
         </tr>
         {/foreach}