wupengfei 1 year ago
parent
commit
6ec795aeec

+ 17 - 12
.idea/workspace.xml

@@ -2,8 +2,12 @@
 <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/BillApply.php" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/application/synth/view/bill_apply/form.html" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/application/synth/view/bill_apply/index.html" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/application/synth/view/bill_apply/index_search.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/common/service/Activity.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/common/service/Activity.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/synth/controller/BillHeader.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/synth/controller/BillHeader.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -138,7 +142,7 @@
     <property name="WebServerToolWindowPanel.toolwindow.show.date" value="false" />
     <property name="WebServerToolWindowPanel.toolwindow.show.permissions" value="false" />
     <property name="WebServerToolWindowPanel.toolwindow.show.size" value="false" />
-    <property name="last_opened_file_path" value="$PROJECT_DIR$/../ddsc" />
+    <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" />
@@ -149,19 +153,19 @@
     <property name="two.files.diff.last.used.folder" value="$PROJECT_DIR$" />
   </component>
   <component name="RecentsManager">
-    <key name="CopyFile.RECENT_KEYS">
-      <recent name="D:\zs\gaoyixia\application\nutrition\view" />
-      <recent name="D:\zs\gaoyixia\application\nutrition\controller" />
-      <recent name="D:\zs\gaoyixia\application\operate\controller" />
-      <recent name="D:\zs\gaoyixia\application\operate\view" />
-      <recent name="D:\zs\gaoyixia\application\common\model" />
-    </key>
     <key name="MoveFile.RECENT_KEYS">
       <recent name="D:\zs\gaoyixia\public\wx_cert" />
       <recent name="D:\zs\gaoyixia\public\a" />
       <recent name="D:\zs\gaoyixia\public" />
       <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\nutrition\view" />
+      <recent name="D:\zs\gaoyixia\application\nutrition\controller" />
+      <recent name="D:\zs\gaoyixia\application\operate\controller" />
+    </key>
   </component>
   <component name="SvnConfiguration">
     <configuration />
@@ -326,7 +330,8 @@
       <workItem from="1684457633587" duration="21568000" />
       <workItem from="1684543423796" duration="10653000" />
       <workItem from="1684716593546" duration="15730000" />
-      <workItem from="1684743465298" duration="4782000" />
+      <workItem from="1684743465298" duration="6526000" />
+      <workItem from="1684802887863" duration="1788000" />
     </task>
     <servers />
   </component>
@@ -476,10 +481,10 @@
       <screen x="0" y="0" width="2560" height="1400" />
     </state>
     <state width="498" height="446" key="SwitcherDM/0.0.2560.1400@0.0.2560.1400" timestamp="1681796091672" />
-    <state x="535" y="293" key="com.intellij.ide.util.TipDialog" timestamp="1684743466065">
+    <state x="535" y="293" key="com.intellij.ide.util.TipDialog" timestamp="1684803144324">
       <screen x="0" y="0" width="2560" height="1400" />
     </state>
-    <state x="535" y="293" key="com.intellij.ide.util.TipDialog/0.0.2560.1400@0.0.2560.1400" timestamp="1684743466065" />
+    <state x="535" y="293" key="com.intellij.ide.util.TipDialog/0.0.2560.1400@0.0.2560.1400" timestamp="1684803144324" />
     <state x="1166" y="605" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2" timestamp="1683268554421">
       <screen x="0" y="0" width="2560" height="1400" />
     </state>

+ 71 - 0
application/synth/controller/BillApply.php

@@ -0,0 +1,71 @@
+<?php
+namespace app\synth\controller;
+use library\Controller;
+use think\Db;
+
+class BillApply extends Controller
+{
+    protected $table = 'BillApply';
+
+
+    /**
+     * 列表
+     * @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);
+        $this->type_arr = \app\common\model\BillType::getType();
+        $where= [];
+        $were[] = ['i.is_deleted','=',0];
+        if($this->request->request('user_name'))    $where[]= ['i.name','like','%'.$this->request->request('user_name').'%'];
+        if($this->request->request('header'))        $where[]= ['i.header','like','%'.$this->request->request('header').'%'];
+        if($this->request->request('type'))         $where[]= ['i.type','=',$this->request->request('type')];
+        $query->alias('i')->field('i.* ,b.title type_name,m.headimg,m.name as user_name,m.phone')
+            ->Leftjoin('store_member m',' m.id = i.user_id ')
+            ->join('bill_type b',' b.id = i.type ','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']);
+    }
+
+    /**
+     * 编辑
+     * @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 edit()
+    {
+        $this->title = '编辑';
+        $this->_form($this->table, 'form');
+    }
+
+
+
+}

+ 1 - 1
application/synth/controller/BillHeader.php

@@ -20,7 +20,7 @@ class BillHeader extends Controller
      */
     public function index()
     {
-        $this->title = '收货地址列表';
+        $this->title = '列表';
         $query = $this->_query($this->table);
         $this->type_arr = \app\common\model\BillType::getType();
         $where= [];

+ 62 - 0
application/synth/view/bill_apply/form.html

@@ -0,0 +1,62 @@
+<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="header"  value='{$vo.header|default=""}'  class="layui-input">
+                </div>
+            </div>
+
+
+            <div class="layui-form-item">
+                <label class="layui-form-label label-required">电话</label>
+                <div class="layui-input-block">
+                    <input name="phone"  value='{$vo.phone|default=""}'  class="layui-input">
+                </div>
+            </div>
+
+            <div class="layui-form-item">
+                <label class="layui-form-label label-required">邮箱</label>
+                <div class="layui-input-block">
+                    <input name="email"  value='{$vo.email|default=""}'  class="layui-input">
+                </div>
+            </div>
+
+            <div class="layui-form-item">
+                <label class="layui-form-label label-required">银行名称</label>
+                <div class="layui-input-block">
+                    <input name="bank"  value='{$vo.bank|default=""}'  class="layui-input">
+                </div>
+            </div>
+
+            <div class="layui-form-item">
+                <label class="layui-form-label label-required">银行卡号</label>
+                <div class="layui-input-block">
+                    <input name="card_no"  value='{$vo.card_no|default=""}'  class="layui-input">
+                </div>
+            </div>
+
+
+            <div class="layui-form-item">
+                <label class="layui-form-label label-required">备注</label>
+                <div class="layui-input-block">
+                    <input name="remark"  value='{$vo.remark|default=""}'  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>

+ 71 - 0
application/synth/view/bill_apply/index.html

@@ -0,0 +1,71 @@
+{extend name='admin@main'}
+
+{block name="content"}
+<div class="think-box-shadow">
+    {include file='bill_apply/index_search'}
+    <table class="layui-table margin-top-20" lay-skin="line">
+        <thead>
+        <tr>
+            <th class='text-left nowrap' >ID</th>
+            <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>
+        <tbody>
+        {foreach $list as $key=>$vo}
+        <tr>
+            <td class='text-left nowrap'>{$vo.id|default='--'}</td>
+            <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.user_id|default='--'}<br>
+                    用户昵称:{$vo.user_name|default='--'}
+                </div>
+            </td>
+            <td class='text-left nowrap'>
+                <div class="inline-block">
+                    抬头名称:{$vo.header|default='--'}<br>
+                    手机号:{$vo.phone_pre|default=''}-{$vo.phone|default='--'}<br>
+                    邮箱:{$vo.email|default='--'}
+                </div>
+            </td>
+            <td class='text-left nowrap'>{$vo.type_name|default='--'}</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_apply/"+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}
+
+
+

+ 44 - 0
application/synth/view/bill_apply/index_search.html

@@ -0,0 +1,44 @@
+<fieldset>
+    <legend>条件搜索</legend>
+    <form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
+
+        <div class="layui-form-item layui-inline">
+            <label class="layui-form-label">会员名称</label>
+            <div class="layui-input-inline">
+                <input name="user_name" value="{$Think.get.user_name|default=''}" placeholder="请输入会员名称" class="layui-input">
+            </div>
+        </div>
+
+        <div class="layui-form-item layui-inline">
+            <label class="layui-form-label">抬头</label>
+            <div class="layui-input-inline">
+                <input name="header" value="{$Think.get.header|default=''}" placeholder="请输入抬头名称" class="layui-input">
+            </div>
+        </div>
+
+        <div class="layui-form-item layui-inline">
+            <label class="layui-form-label">抬头类型</label>
+            <div class="layui-input-inline">
+                <select class="layui-select" name="type">
+                    <option value="0">全部</option>
+                    {foreach $type_arr as $k=>$v}
+                        {if $Think.get.type eq $v['id']}
+                        <option selected value="{$v.id}">{$v.title}</option>
+                        {else}
+                        <option  value="{$v.id}">{$v.title}</option>
+                        {/if}
+                    {/foreach}
+                </select>
+            </div>
+        </div>
+
+
+        <div class="layui-form-item layui-inline">
+            <button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
+        </div>
+    </form>
+    <script>
+        form.render();
+        laydate.render({elem: '[name="sel_time"]'})
+    </script>
+</fieldset>