init commit
This commit is contained in:
82
public/assets/js/backend/wdsxh/institution/institution.js
Normal file
82
public/assets/js/backend/wdsxh/institution/institution.js
Normal file
@@ -0,0 +1,82 @@
|
||||
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
// 初始化表格参数配置
|
||||
Table.api.init({
|
||||
extend: {
|
||||
index_url: 'wdsxh/institution/institution/index' + location.search,
|
||||
add_url: 'wdsxh/institution/institution/add',
|
||||
edit_url: 'wdsxh/institution/institution/edit',
|
||||
del_url: 'wdsxh/institution/institution/del',
|
||||
multi_url: 'wdsxh/institution/institution/multi',
|
||||
import_url: 'wdsxh/institution/institution/import',
|
||||
table: 'wdsxh_institution',
|
||||
}
|
||||
});
|
||||
|
||||
var table = $("#table");
|
||||
|
||||
// 初始化表格
|
||||
table.bootstrapTable({
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||
pk: 'id',
|
||||
sortName: 'weigh',
|
||||
columns: [
|
||||
[
|
||||
{checkbox: true},
|
||||
{field: 'id', title: __('Id')},
|
||||
{field: 'name', title: __('Name'), operate: 'LIKE'},
|
||||
{field: 'icon', title: __('Icon'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
|
||||
{field: 'status', title: __('Status'), searchList: {"0":__('Status 0'),"1":__('Status 1')}, formatter: Table.api.formatter.status},
|
||||
{field: 'weigh', title: __('Weigh'), operate: false},
|
||||
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
||||
{field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate,buttons:[
|
||||
{
|
||||
name: 'level_list',
|
||||
text: '级别列表',
|
||||
title: '级别列表',
|
||||
classname: 'btn btn-xs btn-info btn-dialog',
|
||||
url: 'wdsxh/institution/level?institution_id={id}',
|
||||
extend: 'data-area=["100%","100%"]',
|
||||
callback: function (data) {
|
||||
Layer.alert("接收到回传数据:" + JSON.stringify(data), {title: "回传数据"});
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
{
|
||||
name: 'member_list',
|
||||
text: '成员列表',
|
||||
title: '成员列表',
|
||||
classname: 'btn btn-xs btn-info btn-dialog bg-olive',
|
||||
extend: 'data-area=["100%","100%"]',
|
||||
url: 'wdsxh/institution/member?institution_id={id}',
|
||||
refresh:true,
|
||||
},
|
||||
]}
|
||||
]
|
||||
]
|
||||
});
|
||||
|
||||
// 为表格绑定事件
|
||||
Table.api.bindevent(table);
|
||||
},
|
||||
add: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
edit: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
institution_config: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
api: {
|
||||
bindevent: function () {
|
||||
Form.api.bindevent($("form[role=form]"));
|
||||
}
|
||||
}
|
||||
};
|
||||
return Controller;
|
||||
});
|
||||
@@ -0,0 +1,73 @@
|
||||
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
// 初始化表格参数配置
|
||||
Table.api.init({
|
||||
extend: {
|
||||
index_url: 'wdsxh/institution/institution_member_apply/index' + location.search,
|
||||
table: 'wdsxh_institution_member_apply',
|
||||
}
|
||||
});
|
||||
|
||||
var table = $("#table");
|
||||
|
||||
// 初始化表格
|
||||
table.bootstrapTable({
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||
pk: 'id',
|
||||
sortName: 'id',
|
||||
columns: [
|
||||
[
|
||||
{field: 'id', title: __('Id')},
|
||||
{field: 'usermember.name', title: '会员名称'},
|
||||
{field: 'institution.name', title: __('Institution.name'), operate: 'LIKE'},
|
||||
{field: 'level.level_name', title: __('Level.level_name'), operate: 'LIKE'},
|
||||
{field: 'state', title: __('State'), searchList: {"1":__('State 1'),"2":__('State 2'),"3":__('State 3')}, formatter: Table.api.formatter.normal},
|
||||
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
||||
{field: 'handle_time', title: __('Handle_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate,buttons:[
|
||||
{
|
||||
name: 'handle',
|
||||
text: __('审核'),
|
||||
title: __('审核'),
|
||||
classname: 'btn btn-xs btn-info btn-dialog',
|
||||
icon: 'fa',
|
||||
extend: 'data-area=["100%","100%"]',
|
||||
url: 'wdsxh/institution/institution_member_apply/handle',
|
||||
visible:function(row){
|
||||
if(row['state'] == 1){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
},
|
||||
success: function (data, ret) {
|
||||
$(".btn-refresh").trigger("click");
|
||||
return true;
|
||||
},
|
||||
error: function (data, ret) {
|
||||
Layer.alert(ret.msg);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
]}
|
||||
]
|
||||
]
|
||||
});
|
||||
|
||||
// 为表格绑定事件
|
||||
Table.api.bindevent(table);
|
||||
},
|
||||
handle: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
api: {
|
||||
bindevent: function () {
|
||||
Form.api.bindevent($("form[role=form]"));
|
||||
}
|
||||
}
|
||||
};
|
||||
return Controller;
|
||||
});
|
||||
64
public/assets/js/backend/wdsxh/institution/level.js
Normal file
64
public/assets/js/backend/wdsxh/institution/level.js
Normal file
@@ -0,0 +1,64 @@
|
||||
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
// 初始化表格参数配置
|
||||
Table.api.init({
|
||||
extend: {
|
||||
index_url: 'wdsxh/institution/level/index' + location.search + '&institution_id=' + Config.institution_id,
|
||||
add_url: 'wdsxh/institution/level/add?institution_id=' + Config.institution_id,
|
||||
edit_url: 'wdsxh/institution/level/edit?institution_id=' + Config.institution_id,
|
||||
del_url: 'wdsxh/institution/level/del',
|
||||
multi_url: 'wdsxh/institution/level/multi',
|
||||
import_url: 'wdsxh/institution/level/import',
|
||||
table: 'wdsxh_institution_level',
|
||||
}
|
||||
});
|
||||
|
||||
var table = $("#table");
|
||||
|
||||
// 初始化表格
|
||||
table.bootstrapTable({
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||
pk: 'id',
|
||||
sortName: 'id',
|
||||
columns: [
|
||||
[
|
||||
{checkbox: true},
|
||||
{field: 'id', title: __('Id')},
|
||||
{field: 'institution.name', title: __('Institution.name'), operate: 'LIKE'},
|
||||
{field: 'level_name', title: __('Level_name'), operate: 'LIKE'},
|
||||
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
||||
{field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate,buttons:[
|
||||
{
|
||||
name: 'member_list',
|
||||
text: '成员列表',
|
||||
title: '成员列表',
|
||||
classname: 'btn btn-xs btn-info btn-dialog bg-olive',
|
||||
extend: 'data-area=["100%","100%"]',
|
||||
url: 'wdsxh/institution/member?level_id={id}',
|
||||
refresh:true,
|
||||
},
|
||||
]}
|
||||
]
|
||||
]
|
||||
});
|
||||
|
||||
// 为表格绑定事件
|
||||
Table.api.bindevent(table);
|
||||
},
|
||||
add: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
edit: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
api: {
|
||||
bindevent: function () {
|
||||
Form.api.bindevent($("form[role=form]"));
|
||||
}
|
||||
}
|
||||
};
|
||||
return Controller;
|
||||
});
|
||||
66
public/assets/js/backend/wdsxh/institution/member.js
Normal file
66
public/assets/js/backend/wdsxh/institution/member.js
Normal file
@@ -0,0 +1,66 @@
|
||||
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
// 初始化表格参数配置
|
||||
Table.api.init({
|
||||
extend: {
|
||||
index_url: 'wdsxh/institution/member/index' + location.search + '&institution_id=' + Config.institution_id + '&level_id=' + Config.level_id,
|
||||
add_url: 'wdsxh/institution/member/add?institution_id=' + Config.institution_id + '&level_id=' + Config.level_id,
|
||||
edit_url: 'wdsxh/institution/member/edit?institution_id=' + Config.institution_id + '&level_id=' + Config.level_id,
|
||||
del_url: 'wdsxh/institution/member/del',
|
||||
multi_url: 'wdsxh/institution/member/multi',
|
||||
import_url: 'wdsxh/institution/member/import',
|
||||
table: 'wdsxh_institution_member',
|
||||
}
|
||||
});
|
||||
|
||||
var table = $("#table");
|
||||
|
||||
// 初始化表格
|
||||
table.bootstrapTable({
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||
pk: 'id',
|
||||
sortName: 'id',
|
||||
columns: [
|
||||
[
|
||||
{checkbox: true},
|
||||
{field: 'id', title: __('Id')},
|
||||
{field: 'usermember.name', title: __('Member_id')},
|
||||
{field: 'usermember.mobile', title: '会员手机号', operate: 'LIKE'},
|
||||
{field: 'institution.name', title: __('Institution.name'), operate: 'LIKE'},
|
||||
{field: 'level.level_name', title: __('Level.level_name'), operate: 'LIKE'},
|
||||
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
||||
{field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
||||
{field: 'member_expire_status', title: __('会员状态'), searchList: {"1":__('正常'),"2":__('已过期')}, formatter: Table.api.formatter.normal},
|
||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
||||
]
|
||||
]
|
||||
});
|
||||
|
||||
// 为表格绑定事件
|
||||
Table.api.bindevent(table);
|
||||
},
|
||||
add: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
edit: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
api: {
|
||||
bindevent: function () {
|
||||
$("#c-level_id").data("params", function(){
|
||||
console.log($("#c-institution_id").val());
|
||||
return {custom: {institution_id: $('input[name="row[institution_id]"]').val()}};
|
||||
});
|
||||
$(document).on("change", "#c-institution_id_text", function () {
|
||||
$("#c-level_id_text").val('');
|
||||
});
|
||||
|
||||
|
||||
Form.api.bindevent($("form[role=form]"));
|
||||
}
|
||||
}
|
||||
};
|
||||
return Controller;
|
||||
});
|
||||
Reference in New Issue
Block a user