wupengfei 1 سال پیش
والد
کامیت
012a6006f5

+ 2 - 1
.idea/workspace.xml

@@ -3,6 +3,7 @@
   <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/order/controller/LevelOrder.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/order/controller/LevelOrder.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/application/order/controller/StoreOrder.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/order/controller/StoreOrder.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/application/order/view/store_order/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/application/order/view/store_order/index.html" afterDir="false" />
     </list>
@@ -379,7 +380,7 @@
       <workItem from="1689813742376" duration="13449000" />
       <workItem from="1689900489647" duration="18483000" />
       <workItem from="1690159826319" duration="22343000" />
-      <workItem from="1690246325106" duration="14116000" />
+      <workItem from="1690246325106" duration="14240000" />
     </task>
     <servers />
   </component>

+ 1 - 1
application/order/controller/LevelOrder.php

@@ -52,7 +52,7 @@ class LevelOrder extends Controller
 
 
     /**
-     * 删除视频
+     * 删除
      * @auth true
      * @menu true
      * @throws \think\Exception

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

@@ -166,6 +166,21 @@ class StoreOrder 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]);
+    }
+
 
 
 }

+ 23 - 0
application/order/view/store_order/index.html

@@ -90,6 +90,7 @@
             </td>
             <td class='text-left nowrap'>
                 <a data-title="查看详情" class="layui-btn layui-btn-sm" data-modal='{:url("detail")}?id={$vo.id}'>查看详情</a>
+                <span class="layui-btn layui-btn-sm layui-btn-danger" onclick="btn_confirm('删除','remove','{$vo.id}');">删 除</span>
             </td>
         </tr>
         {/foreach}
@@ -97,4 +98,26 @@
     </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/store_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}