|
@@ -21,20 +21,42 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
table.bootstrapTable({
|
|
|
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
|
|
pk: 'id',
|
|
|
- sortName: 'weigh',
|
|
|
+ search: false,
|
|
|
columns: [
|
|
|
[
|
|
|
{checkbox: true},
|
|
|
- {field: 'id', title: __('Id')},
|
|
|
- {field: 'company_id', title: __('Company_id')},
|
|
|
+ {field: 'id', title: __('Id'),operate:false},
|
|
|
+// {field: 'company_id', title: __('Company_id')},
|
|
|
{field: 'company.companyname', title: __('Company.companyname'), operate: 'LIKE'},
|
|
|
- {field: 'pid', title: __('Pid')},
|
|
|
+// {field: 'pid', title: __('Pid')},
|
|
|
+ {field: 'pj.title', title: '上级',operate:'LIKE'},
|
|
|
{field: 'title', title: __('Title'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
|
|
- {field: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"2":__('Type 2')}, formatter: Table.api.formatter.normal},
|
|
|
- {field: 'info', title: __('Info'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
|
|
+ {field: 'type', title: __('Type'), searchList: {"0":__('Type 0'),"1":__('Type 1'),"2":__('Type 2')}, formatter: Table.api.formatter.normal},
|
|
|
+ {field: 'info', title: __('Info'), operate: false, table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
|
|
{field: 'weigh', title: __('Weigh'), operate: false},
|
|
|
- {field: 'createtime', title: __('Createtime'), 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}
|
|
|
+ {field: 'createtime', title: __('Createtime'), operate:false, addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
|
|
+ {field: 'operate', title: __('Operate'), table: table,
|
|
|
+ buttons:[
|
|
|
+ {
|
|
|
+ name:'addchild',
|
|
|
+ text:'添加',
|
|
|
+ title:'添加',
|
|
|
+ icon:'fa fa-exclamation-circle',
|
|
|
+ classname:'btn btn-xs btn-info btn-dialog btn-addchild',
|
|
|
+ url:function(row){
|
|
|
+ return 'jianceproject/addchild/company_id/'+ row.company_id +'/pid/'+ row.id +'?dialog=1'
|
|
|
+ },
|
|
|
+ target:'_self',
|
|
|
+ hidden:function(row){
|
|
|
+ if(row.pid == 0){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ },
|
|
|
+ refresh:true,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
|
|
]
|
|
|
]
|
|
|
});
|
|
@@ -103,6 +125,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
Table.api.bindevent(table);
|
|
|
},
|
|
|
|
|
|
+ addchild: function () {
|
|
|
+ Controller.api.bindevent();
|
|
|
+ },
|
|
|
add: function () {
|
|
|
Controller.api.bindevent();
|
|
|
},
|