| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
- var Controller = {
- index: function () {
- // 初始化表格参数配置
- Table.api.init({
- extend: {
- index_url: 'user/synthesis/index' + location.search + "&ids=" + Config.ids,
- table: 'user_synthesis',
- }
- });
- var table = $("#table");
- // 初始化表格
- table.bootstrapTable({
- url: $.fn.bootstrapTable.defaults.extend.index_url,
- pk: 'id',
- sortName: 'id',
- columns: [
- [
- {checkbox: true},
- {field: 'users.address', title: __('User_id')},
- {field: 'num', title: __('Num')},
- {field: 'note', title: __('详情订单ID'), align: 'left', formatter:function (value, row, index) {
- //console.log(JSON.parse(value.replace(/"/g, '"')),"======");
-
- var note = Object.values(JSON.parse(value.replace(/"/g, '"')))
- var str = "";
- note.forEach(function(item,index){
- str += "<p>" + JSON.stringify(item[0].new_order) + "</p>";
- });
- return str;
- }
- },
-
- ]
- ]
- });
- // 为表格绑定事件
- Table.api.bindevent(table);
- },
-
- api: {
- bindevent: function () {
- Form.api.bindevent($("form[role=form]"));
- }
- }
- };
- return Controller;
- });
|