|
@@ -57,6 +57,23 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
return row.status===5 && table.data('operate-send');
|
|
|
}
|
|
|
},
|
|
|
+ {
|
|
|
+ name: 'edit',
|
|
|
+ text: __('订单详情'),
|
|
|
+ title: __('订单详情'),
|
|
|
+ classname: 'btn btn-xs btn-info btn-detail btn-dialog',
|
|
|
+ icon: 'fa fa-outdent',
|
|
|
+ url: 'orders/detail',
|
|
|
+ extend:'data-area=\'["1200px","600px"]\'',
|
|
|
+ callback: function (data) {
|
|
|
+ //Layer.alert("接收到回传数据:" + JSON.stringify(data), {title: "回传数据"});
|
|
|
+ $('.btn-refresh').trigger('click')
|
|
|
+ },
|
|
|
+ visible: function (row) {
|
|
|
+ //返回true时按钮显示,返回false隐藏
|
|
|
+ return table.data('operate-detail');
|
|
|
+ }
|
|
|
+ },
|
|
|
]}
|
|
|
]
|
|
|
]
|
|
@@ -75,7 +92,52 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
bindevent: function () {
|
|
|
Form.api.bindevent($("form[role=form]"));
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+ detail: function () {
|
|
|
+ // 初始化表格参数配置
|
|
|
+ Table.api.init({
|
|
|
+ extend: {
|
|
|
+ index_url: 'orders/detail' + location.search,
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ var table = $("#table");
|
|
|
+
|
|
|
+ // 初始化表格
|
|
|
+ table.bootstrapTable({
|
|
|
+ url: $.fn.bootstrapTable.defaults.extend.index_url,
|
|
|
+ pk: 'id',
|
|
|
+ sortName: 'id',
|
|
|
+ commonSearch:false,
|
|
|
+ search:false,
|
|
|
+ columns: [
|
|
|
+ [
|
|
|
+ {checkbox: true},
|
|
|
+ {field: 'id', title: __('Id')},
|
|
|
+ {field: 'status', title: __('Status'),formatter: Table.api.formatter.label,searchList:status},
|
|
|
+ {field: 'user.nickname', title: __('下单用户')},
|
|
|
+ {field: 'order_no', title: __('Order_no')},
|
|
|
+ {field: 'amount_total', title: __('Amount_total'), operate:'BETWEEN'},
|
|
|
+ {field: 'amount_pay', title: __('Amount_pay'), operate:'BETWEEN'},
|
|
|
+ /* {field: 'amount_install', title: __('Amount_install'), operate:'BETWEEN'},
|
|
|
+ {field: 'num', title: __('Num'),operate: 'between'},
|
|
|
+ {field: 'num_install', title: __('Num_install'),operate: 'between'},*/
|
|
|
+ {field: 'create_time', title: __('Create_time'),addClass:'datetimerange',formatter: Table.api.formatter.datetime,operate: 'range'},
|
|
|
+ //{field: 'update_time', title: __('Update_time'),addClass:'datetimerange',formatter: Table.api.formatter.datetime,operate: 'range'},
|
|
|
+ {field: 'pay_type', title: __('Pay_type'),formatter: Table.api.formatter.label,searchList:payTypes},
|
|
|
+ {field: 'pay_time', title: __('支付时间'),addClass:'datetimerange',formatter: Table.api.formatter.datetime,operate: 'range'}
|
|
|
+ ]
|
|
|
+ ],
|
|
|
+ onLoadSuccess(){
|
|
|
+ setTimeout(()=>{
|
|
|
+ $('.btn-detail').data('area',["500px","900px"])
|
|
|
+ },200)
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ // 为表格绑定事件
|
|
|
+ Table.api.bindevent(table);
|
|
|
+ },
|
|
|
};
|
|
|
return Controller;
|
|
|
});
|