wupengfei hace 1 año
padre
commit
1de7e6ad80

+ 3 - 6
.idea/workspace.xml

@@ -3,11 +3,8 @@
   <component name="ChangeListManager">
     <list default="true" id="1a36929e-c054-4875-a943-593a74e55fa4" name="Default Changelist" comment="">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/operate/controller/DemandComment.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/operate/controller/DemandComment.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/operate/controller/ForumComment.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/operate/controller/ForumComment.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/operate/controller/PressComment.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/operate/controller/PressComment.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/operate/controller/ReplyComment.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/operate/controller/ReplyComment.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/operate/controller/SupplierComment.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/operate/controller/SupplierComment.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/order/controller/LevelOrder.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/order/controller/LevelOrder.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/order/view/level_order/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/application/order/view/level_order/index.html" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -382,7 +379,7 @@
       <workItem from="1689813742376" duration="13449000" />
       <workItem from="1689900489647" duration="18483000" />
       <workItem from="1690159826319" duration="22343000" />
-      <workItem from="1690246325106" duration="13538000" />
+      <workItem from="1690246325106" duration="13944000" />
     </task>
     <servers />
   </component>

+ 15 - 0
application/order/controller/LevelOrder.php

@@ -51,4 +51,19 @@ class LevelOrder extends Controller
     }
 
 
+    /**
+     * 删除视频
+     * @auth true
+     * @menu true
+     * @throws \think\Exception
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\ModelNotFoundException
+     * @throws \think\exception\DbException
+     * @throws \think\exception\PDOException
+     */
+    public function remove()
+    {
+        $this->_save($this->table, ['is_deleted' =>1]);
+    }
+
 }

+ 31 - 0
application/order/view/level_order/index.html

@@ -1,4 +1,7 @@
 {extend name='admin@main'}
+{block name="button"}
+<button data-action='{:url("remove")}'  data-confirm="确定要删除吗?" data-csrf="{:systoken('remove')}" data-rule="id#{key}" class='layui-btn layui-btn-sm layui-btn-primary'>批量删除</button>
+{/block}
 {block name="content"}
 <div class="think-box-shadow">
     {include file='level_order/index_search'}
@@ -6,6 +9,7 @@
         {notempty name='list'}
         <thead>
         <tr>
+            <th class='list-table-check-td think-checkbox'><input data-auto-none data-check-target='.list-check-box' type='checkbox'></th>
             <th class='text-left nowrap'>ID</th>
             <th class='text-left nowrap'>用户名</th>
             <th class='text-left nowrap'>手机号</th>
@@ -14,12 +18,14 @@
             <th class='text-left nowrap'>时间(月)</th>
             <th class='text-left nowrap'>订单号</th>
             <th class="text-left nowrap">添加时间</th>
+            <th class="text-left nowrap">操作</th>
         </tr>
         </thead>
         {/notempty}
         <tbody>
         {foreach $list as $key=>$vo}
         <tr>
+            <td class='list-table-check-td think-checkbox'><input class="list-check-box" value='{$vo.id}' type='checkbox'></td>
             <td class='text-left nowrap'>{$vo.id|default=''}</td>
             <td class='text-left nowrap'>{$vo.u_name|default='--'}</td>
             <td class='text-left nowrap'>{$vo.u_phone|default='--'}</td>
@@ -28,10 +34,35 @@
             <td class='text-left nowrap'>{$vo.month|default=''}</td>
             <td class='text-left nowrap'>{$vo.order_no|default=''}</td>
             <td class='text-left nowrap'>{$vo.create_at}</td>
+            <td class='text-left' style="width: 20%">
+                <span class="layui-btn layui-btn-sm layui-btn-danger" onclick="btn_confirm('删除','remove','{$vo.id}');">删 除</span>
+            </td>
         </tr>
         {/foreach}
         </tbody>
     </table>
     {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
 </div>
+<script>
+    function btn_confirm(msg,fun,id) {
+        layer.confirm('请确定是否'+msg, {btn: ['确定', '取消'], title: "提示"}, function () {
+            var url = "/order/level_order/"+fun;
+            layer.closeAll();
+            $.ajax({
+                type: "post",
+                url: url,
+                data: {id:id},
+                dataType: "json",
+                async: false,
+                success: function (data) {
+                    layer.msg(data.info);
+                    setTimeout(function () {
+                        window.location.reload();
+                    },1000)
+                }
+            });
+        });
+    }
+
+</script>
 {/block}