소스 검색

1sdfasdfasd

chenhao 4 년 전
부모
커밋
2712ef387c

+ 32 - 0
application/admin/controller/Uuser.php

@@ -152,6 +152,38 @@ class Uuser extends Controller
 
     }
     /**
+     * 编辑系统用户修改其他信息
+     * @auth true
+     * @throws \think\Exception
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\ModelNotFoundException
+     * @throws \think\exception\DbException
+     * @throws \think\exception\PDOException
+     */
+    public function beizhu()
+    {
+        $this->applyCsrfToken();
+        if ($this->request->isGet()) {
+            $this->verify = false;
+            $this->_form($this->table, 'beizhu');
+        } else {
+
+            $post = $this->request->post();
+
+            $data['content'] = $post['content'];
+
+            $upd = Db::name('user')->where('id',$post['id'])->update($data);
+
+            if ($upd) {
+                return $this->success('编辑成功');
+            } else {
+                return $this->error('编辑失败');
+            }
+//            $upd = Db::name('where')
+        }
+
+    }
+    /**
      * 修改用户密码
      * @auth true
      * @throws \think\Exception

+ 23 - 0
application/admin/view/uuser/beizhu.html

@@ -0,0 +1,23 @@
+<form class="layui-form layui-card" action="{:request()->url()}" data-auto="true" method="post" autocomplete="off">
+    <div class="layui-card-body padding-left-40">
+        <div class="layui-form-item">
+            <label class="relative block">
+                <span class="color-green font-w7">备注</span>
+                <span class="color-desc margin-left-5">notice</span>
+                <input type="text"  name="content" value='{$vo.content|default=""}'  placeholder="" class="layui-input">
+            </label>
+        </div>
+
+
+
+    </div>
+
+    <div class="hr-line-dashed"></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>
+
+</form>

+ 0 - 8
application/admin/view/uuser/edits.html

@@ -27,14 +27,6 @@
         </div>
         <div class="layui-form-item">
             <label class="relative block">
-                <span class="color-green font-w7">备注</span>
-                <span class="color-desc margin-left-5">notice</span>
-                <input type="text"  name="content" value='{$vo.content|default=""}'  placeholder="" class="layui-input">
-            </label>
-            <p class="color-desc">可选,用户联系手机号码,需要填写正确的格式</p>
-        </div>
-        <div class="layui-form-item">
-            <label class="relative block">
                 <span class="color-green font-w7">新的登录密码</span>
                 <span class="color-desc margin-left-5">New Password</span>
                 <input type="password" name="pwd" maxlength="32" pattern="^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$).{6,32}$"  placeholder="请输入新的登录密码(不修改不输入)" class="layui-input">

+ 10 - 9
application/admin/view/uuser/index.html

@@ -51,34 +51,34 @@
 
             <td class='text-left nowrap'>
                 {eq name='vo.levels' value='1'}
-                <a data-dbclick class="layui-btn layui-btn-sm" data-title="修改积分" data-modal='{:url("edit")}?id={$vo.id}&type=2'>修改积分</a>
+                <a  class="layui-btn layui-btn-sm" data-title="修改积分" data-modal='{:url("edit")}?id={$vo.id}&type=2'>修改积分</a>
                 {/eq}
                 {eq name='vo.levels' value='2'}
-                <a data-dbclick class="layui-btn layui-btn-sm" data-title="修改积分" data-modal='{:url("edit")}?id={$vo.id}&type=2'>修改积分</a>
+                <a  class="layui-btn layui-btn-sm" data-title="修改积分" data-modal='{:url("edit")}?id={$vo.id}&type=2'>修改积分</a>
                 {/eq}
                 {eq name='vo.levels' value='1'}
-                <a data-dbclick class="layui-btn layui-btn-normal layui-btn-sm" data-open='{:url("userorder/index")}?id={$vo.id}'>服务订单</a>
+                <a  class="layui-btn layui-btn-normal layui-btn-sm" data-open='{:url("userorder/index")}?id={$vo.id}'>服务订单</a>
                 {/eq}
                 {eq name='vo.levels' value='2'}
-                <a data-dbclick class="layui-btn layui-btn-normal layui-btn-sm" data-open='{:url("userorder/index")}?id={$vo.id}'>服务订单</a>
+                <a  class="layui-btn layui-btn-normal layui-btn-sm" data-open='{:url("userorder/index")}?id={$vo.id}'>服务订单</a>
                 {/eq}
 <!--                {if auth("pass")}-->
 <!--                <a class="layui-btn layui-btn-normal layui-btn-sm" data-title="施工照片" data-modal='{:url("pass")}?id={$vo.id}'>施工照片</a>-->
 <!--                {/if}-->
                 {eq name='vo.levels' value='0'}
-                <a data-dbclick class="layui-btn layui-btn-normal layui-btn-sm" data-open='{:url("userimage/index")}?id={$vo.id}'>施工照片管理</a>
+                <a  class="layui-btn layui-btn-normal layui-btn-sm" data-open='{:url("userimage/index")}?id={$vo.id}'>施工照片管理</a>
                 {/eq}
                 {eq name='vo.levels' value='0'}
-                <a data-dbclick class="layui-btn layui-btn-normal layui-btn-sm" data-open='{:url("userapp/index")}?id={$vo.id}'>线上预约</a>
+                <a  class="layui-btn layui-btn-normal layui-btn-sm" data-open='{:url("userapp/index")}?id={$vo.id}'>线上预约</a>
                 {/eq}
                 {eq name='vo.levels' value='0'}
-                <a data-dbclick class="layui-btn layui-btn-normal layui-btn-sm" data-open='{:url("userfeedback/index")}?id={$vo.id}'>跟进反馈</a>
+                <a  class="layui-btn layui-btn-normal layui-btn-sm" data-open='{:url("userfeedback/index")}?id={$vo.id}'>跟进反馈</a>
                 {/eq}
                 {eq name='vo.levels' value='0'}
-                <a data-dbclick class="layui-btn layui-btn-normal layui-btn-sm" data-open='{:url("userweixiu/index")}?id={$vo.id}&type=1'>维修</a>
+                <a  class="layui-btn layui-btn-normal layui-btn-sm" data-open='{:url("userweixiu/index")}?id={$vo.id}&type=1'>维修</a>
                 {/eq}
                 {eq name='vo.levels' value='0'}
-                <a data-dbclick class="layui-btn layui-btn-normal layui-btn-sm" data-open='{:url("userweixiu/index")}?id={$vo.id}&type=2'>报备</a>
+                <a  class="layui-btn layui-btn-normal layui-btn-sm" data-open='{:url("userweixiu/index")}?id={$vo.id}&type=2'>报备</a>
                 {/eq}
 <!--                {eq name='vo.levels' value='0'}-->
 <!--                <a data-dbclick class="layui-btn layui-btn-normal layui-btn-sm" data-open='{:url("userorder/index")}?id={$vo.id}'>服务订单</a>-->
@@ -94,6 +94,7 @@
 <!--                <a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('resume')}" data-value="id#{$vo.id};is_delete#1" data-csrf="{:systoken('resume')}">启 用</a>-->
 <!--                {/if}-->
                 <a data-dbclick class="layui-btn layui-btn-sm" data-title="修改信息" data-modal='{:url("edits")}?id={$vo.id}&type=2'>修改信息</a>
+                <a data-dbclick class="layui-btn layui-btn-sm" data-title="备注" data-modal='{:url("beizhu")}?id={$vo.id}&type=2'>备注</a>
 
                 {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>