wupengfei 2 years ago
parent
commit
669cd09797

+ 7 - 5
.idea/workspace.xml

@@ -2,8 +2,10 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="1a36929e-c054-4875-a943-593a74e55fa4" name="Default Changelist" comment="">
+      <change afterPath="$PROJECT_DIR$/application/synth/controller/BillHeader.php" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/application/synth/view/bill_header/form.html" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/application/synth/view/bill_header/index.html" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/api/controller/Bill.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Bill.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -121,7 +123,7 @@
   <component name="PropertiesComponent">
     <property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
     <property name="WebServerToolWindowFactoryState" value="false" />
-    <property name="last_opened_file_path" value="$PROJECT_DIR$/application/common/model" />
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/application/synth/view" />
     <property name="node.js.detected.package.eslint" value="true" />
     <property name="node.js.detected.package.tslint" value="true" />
     <property name="node.js.path.for.package.eslint" value="project" />
@@ -137,11 +139,11 @@
       <recent name="D:\zs\gaoyixia\application\api\controller" />
     </key>
     <key name="CopyFile.RECENT_KEYS">
+      <recent name="D:\zs\gaoyixia\application\synth\view" />
+      <recent name="D:\zs\gaoyixia\application\synth\controller" />
       <recent name="D:\zs\gaoyixia\application\common\model" />
       <recent name="D:\zs\gaoyixia\application\common\validate" />
       <recent name="D:\zs\gaoyixia\application\synth\view\bill_type" />
-      <recent name="D:\zs\gaoyixia\application\api\controller" />
-      <recent name="D:\zs\gaoyixia\application\operate\view\recruit" />
     </key>
   </component>
   <component name="SvnConfiguration">
@@ -210,7 +212,7 @@
       <workItem from="1672793409629" duration="408000" />
       <workItem from="1672793834653" duration="24306000" />
       <workItem from="1672880479757" duration="22897000" />
-      <workItem from="1672966192005" duration="11505000" />
+      <workItem from="1672966192005" duration="12924000" />
     </task>
     <servers />
   </component>

+ 53 - 0
application/synth/controller/BillHeader.php

@@ -0,0 +1,53 @@
+<?php
+namespace app\synth\controller;
+use library\Controller;
+use think\Db;
+
+class BillHeader extends Controller
+{
+    protected $table = 'BillHeader';
+
+
+    /**
+     * 列表
+     * @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 index()
+    {
+        $this->title = '收货地址列表';
+        $query = $this->_query($this->table);
+        $where= [];
+        $were[] = ['i.is_deleted','=',0];
+        if($this->request->request('user_name'))    $where[]= ['m.name','like','%'.$this->request->request('user_name').'%'];
+        if($this->request->request('title'))         $where[]= ['i.title','like','%'.$this->request->request('title').'%'];
+        $query->alias('i')->field('i.* ,m.headimg,m.name as user_name,m.phone')
+            ->join('store_member m',' m.id = i.user_id ','LEFT');
+        if(!empty($where)) $query->where($where);
+        $query ->order('i.id desc')->page();
+    }
+
+
+    /**
+     * 删除
+     * @auth true
+     * @menu true
+     * @param array $data
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\ModelNotFoundException
+     * @throws \think\exception\DbException
+     */
+    public function remove()
+    {
+        $this->_save($this->table, ['is_deleted' => '1']);
+    }
+
+
+
+
+}

+ 31 - 0
application/synth/view/bill_header/form.html

@@ -0,0 +1,31 @@
+<style>
+
+</style>
+<div class="think-box-shadow">
+    <form class="layui-form layui-card" action="{:request()->url()}" data-auto="true" method="post" autocomplete="off">
+        <div class="layui-card-body">
+
+            <div class="layui-form-item">
+                <label class="layui-form-label label-required">类型名称</label>
+                <div class="layui-input-block">
+                    <input name="title" maxlength="20"  value='{$vo.title|default=""}' placeholder="请输入类型名称" class="layui-input">
+                </div>
+            </div>
+
+            <div class="layui-form-item">
+                <label class="layui-form-label label-required">排序</label>
+                <div class="layui-input-block">
+                    <input type="number" name="sort"  value='{$vo.sort|default=""}' placeholder="请输入排序号" class="layui-input">
+                </div>
+            </div>
+            {notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
+            <div class="layui-form-item text-center">
+                <button class="layui-btn" type='submit'>保 存</button>
+                <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定取消编辑吗?" data-close>取消编辑</button>
+            </div>
+        </div>
+    </form>
+    <script>
+        window.form.render();
+    </script>
+</div>

+ 61 - 0
application/synth/view/bill_header/index.html

@@ -0,0 +1,61 @@
+{extend name='admin@main'}
+
+{block name="content"}
+<div class="think-box-shadow">
+    <table class="layui-table margin-top-20" lay-skin="line">
+        <thead>
+        <tr>
+            <th class='text-left nowrap' >用户信息</th>
+            <th class='text-left nowrap' >抬头信息</th>
+            <th class="text-left nowrap">操作</th>
+        </tr>
+        </thead>
+        <tbody>
+        {foreach $list as $key=>$vo}
+        <tr>
+            <td class='text-left'>
+                <img data-tips-image style="width:50px;height:50px" src="{$vo.headimg|default=''}" class="margin-right-5 text-top">
+                <div class="inline-block">
+                    记录ID:{$vo.id}<br>
+                    用户ID:{$vo.user_id|default='--'}<br>
+                    用户昵称:{$vo.user_name|default='--'}
+                </div>
+            </td>
+            <td class='text-left nowrap'>{$vo.create_at}</td>
+            <td class='text-left' >
+                <a data-title="查 看" class="layui-btn layui-btn-sm" data-modal='{:url("edit")}?id={$vo.id}'>查 看</a>
+                <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 = "/synth/bill_header/"+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}
+
+
+