Files
fast_response/superadmin/public/assets/js/backend/firmcustomerfollowuptimelist.js
2025-04-16 10:08:13 +08:00

54 lines
2.1 KiB
JavaScript
Executable File

define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'firmcustomerfollowuptimelist/index' + location.search,
add_url: 'firmcustomerfollowuptimelist/add',
edit_url: 'firmcustomerfollowuptimelist/edit',
del_url: 'firmcustomerfollowuptimelist/del',
multi_url: 'firmcustomerfollowuptimelist/multi',
import_url: 'firmcustomerfollowuptimelist/import',
table: 'firmcustomerfollowuptimelist',
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'id',
columns: [
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'day', title: __('Day')},
{field: 'followup_time', title: __('Followup_time')},
{field: 'firmcustomerfollowuprecord.name', title: __('Firmcustomerfollowuprecord.name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{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 () {
Form.api.bindevent($("form[role=form]"));
}
}
};
return Controller;
});