|
@@ -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" data-permission="agent.add_store"
|
|
<a class="layui-btn layui-btn-xs" lay-event="store_edit" data-permission="agent.add_store"
|
|
>修改</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_text', title: '状态', width: 150}
|
|
|
|
+ , {field: 'check_user_text', 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'
|
|
@@ -127,9 +134,12 @@
|
|
layer.confirm('确定要删除吗?', function (index) {
|
|
layer.confirm('确定要删除吗?', function (index) {
|
|
layer.close(index);
|
|
layer.close(index);
|
|
admin.req({
|
|
admin.req({
|
|
- url: '/agent/agent/' + data.id + '/'
|
|
|
|
|
|
+ url: '/agent/store/' + data.id + '/'
|
|
, type: 'delete'
|
|
, type: 'delete'
|
|
, done: function (res) {
|
|
, done: function (res) {
|
|
|
|
+ if(res.code === 0){
|
|
|
|
+ layer.msg('删除成功!', {icon: 1})
|
|
|
|
+ }
|
|
table.reload('store_datagrid', {});
|
|
table.reload('store_datagrid', {});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -143,7 +153,10 @@
|
|
area: ['40%', '50%'],
|
|
area: ['40%', '50%'],
|
|
btn: ['保存', '取消'],
|
|
btn: ['保存', '取消'],
|
|
yes: function (index, dom) {
|
|
yes: function (index, dom) {
|
|
- layui.onSubmitChild = function (data) {
|
|
|
|
|
|
+ layui.onSubmitChild = function (res) {
|
|
|
|
+ if(res.code === 0){
|
|
|
|
+ layer.msg('修改成功!', {icon: 1})
|
|
|
|
+ }
|
|
layer.close(index);
|
|
layer.close(index);
|
|
table.reload('store_datagrid', {});
|
|
table.reload('store_datagrid', {});
|
|
};
|
|
};
|
|
@@ -154,6 +167,25 @@
|
|
},
|
|
},
|
|
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
|
|
|
|
+ }
|
|
|
|
+ layer.confirm('确定要审核当前门店吗?', {icon: 3, title:'提示'}, function(index){
|
|
|
|
+ admin.req({
|
|
|
|
+ url: '/agent/store/' + data.id + '/check/'
|
|
|
|
+ , type: 'post'
|
|
|
|
+ , data: {status: 1}
|
|
|
|
+ , done: function (res) {
|
|
|
|
+ if(res.code === 0){
|
|
|
|
+ layer.msg(res.data, {icon: 1});
|
|
|
|
+ table.reload('store_datagrid', {});
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ layer.close(index);
|
|
|
|
+ });
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
@@ -173,7 +205,10 @@
|
|
area: ['40%', '50%'],
|
|
area: ['40%', '50%'],
|
|
btn: ['保存', '取消'],
|
|
btn: ['保存', '取消'],
|
|
yes: function (index, dom) {
|
|
yes: function (index, dom) {
|
|
- layui.onSubmitChild = function (data) {
|
|
|
|
|
|
+ layui.onSubmitChild = function (res) {
|
|
|
|
+ if(res.code === 0){
|
|
|
|
+ layer.msg('添加成功!', {icon: 1})
|
|
|
|
+ }
|
|
layer.close(index);
|
|
layer.close(index);
|
|
table.reload('store_datagrid', {});
|
|
table.reload('store_datagrid', {});
|
|
};
|
|
};
|