lijiangwei 4 жил өмнө
parent
commit
d0606660d9

+ 22 - 2
uis/views/store/index.html

@@ -78,6 +78,10 @@
                     <table class="layui-hide" id="store_datagrid" lay-filter="store-operate"></table>
                     <table class="layui-hide" id="store_datagrid" lay-filter="store-operate"></table>
 
 
                     <script type="text/html" id="store-operate-bar">
                     <script type="text/html" id="store-operate-bar">
+                        <div class="layui-btn-group">
+                            <a class="layui-btn layui-btn-xs" lay-event="store_check"
+                            >审核</a>
+                        </div>
                         <div class="layui-btn-group">
                         <div class="layui-btn-group">
                             <a class="layui-btn layui-btn-xs" lay-event="store_edit"
                             <a class="layui-btn layui-btn-xs" lay-event="store_edit"
                             >修改</a>
                             >修改</a>
@@ -110,11 +114,14 @@
             , cols: [[
             , cols: [[
                 {field: 'name', title: '名称', width: 150}
                 {field: 'name', title: '名称', width: 150}
                 , {field: 'address', title: '地址', width: 200}
                 , {field: 'address', title: '地址', width: 200}
-                , {field: 'create_user_text', title: '添加人', width: 100}
+                , {field: 'create_user_text', title: '添加人', width: 160}
                 , {field: 'create_time', title: '添加时间', width: 180}
                 , {field: 'create_time', title: '添加时间', width: 180}
                 , {field: 'end_date', title: '到期日期', width: 150}
                 , {field: 'end_date', title: '到期日期', width: 150}
                 , {field: 'notes', title: '备注', width: 200}
                 , {field: 'notes', title: '备注', width: 200}
-                , {width: 150, align: 'center', fixed: 'right', toolbar: '#store-operate-bar'}
+                , {field: 'status', title: '状态', width: 150}
+                , {field: 'check_user', title: '审核人', width: 150}
+                , {field: 'check_time', title: '审核时间', width: 180}
+                , {width: 180, align: 'center', fixed: 'right', toolbar: '#store-operate-bar'}
             ]]
             ]]
             , page: true
             , page: true
             , height: 'full-108'
             , height: 'full-108'
@@ -154,6 +161,19 @@
                     },
                     },
                     content: 'edit.html?id=' + data.id
                     content: 'edit.html?id=' + data.id
                 });
                 });
+            }else if(obj.event === 'store_check'){
+                if(data.status !== 0){
+                    layer.msg("只有待审核才允许修改");
+                    return
+                }
+                admin.req({
+                    url: '/agent/store/' + data.id + '/check/'
+                    , type: 'post'
+                    , data: {status: 1}
+                    , done: function (res) {
+                        console.log(res, "opppppppp")
+                    }
+                });
             }
             }
         });
         });