|
@@ -0,0 +1,86 @@
|
|
|
+define(['jquery', 'bootstrap', 'backend', 'form', 'table'], function ($, undefined, Backend, Form, Table) {
|
|
|
+
|
|
|
+ var Controller = {
|
|
|
+ index: function () {
|
|
|
+
|
|
|
+ Table.api.init({
|
|
|
+ extend: {
|
|
|
+ index_url: 'wechat/lave_month/index',
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ multi_url: 'wechat/lave_month/multi',
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ var table = $("#table");
|
|
|
+
|
|
|
+
|
|
|
+ table.bootstrapTable({
|
|
|
+ url: $.fn.bootstrapTable.defaults.extend.index_url,
|
|
|
+ sortName: 'id',
|
|
|
+ columns: [
|
|
|
+ [
|
|
|
+ {field: 'id', title: __('Id')},
|
|
|
+ {field: 'cid', title: __('Cid')},
|
|
|
+ {field: 'user_id', title: __('User_id')},
|
|
|
+ {field: 'order_id', title: __('Order_id'), operate: 'LIKE'},
|
|
|
+ {field: 'order_name', title: __('Order_name'), operate: 'LIKE'},
|
|
|
+ {field: 'amount', title: __('Amount'), operate:'BETWEEN'},
|
|
|
+ {field: 'name', title: __('Name'), operate: 'LIKE'},
|
|
|
+ {field: 'contact', title: __('Contact'), operate: 'LIKE'},
|
|
|
+ {field: 'tel', title: __('Tel'), operate: 'LIKE'},
|
|
|
+ {field: 'address', title: __('Address'), operate: 'LIKE'},
|
|
|
+ {field: 'is_open', title: __('Is_open'), searchList: {"0":__('Is_open 0'),"1":__('Is_open 1')}, formatter: Table.api.formatter.normal},
|
|
|
+ {field: 'is_ticket', title: __('Is_ticket'), searchList: {"0":__('Is_ticket 0'),"1":__('Is_ticket 1')}, formatter: Table.api.formatter.normal},
|
|
|
+ {field: 'paid', title: __('Paid'), searchList: {"0":__('Paid 0'),"1":__('Paid 1')}, formatter: Table.api.formatter.normal},
|
|
|
+ {field: 'pay_type', title: __('Pay_type'), searchList: {"0":__('Pay_type 0'),"1":__('Pay_type 1'),"2":__('Pay_type 2'),"3":__('Pay_type 3'),"4":__('Pay_type 4')}, formatter: Table.api.formatter.normal},
|
|
|
+ {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
|
|
+ {field: 'paytime', title: __('Paytime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
|
|
+ {field: 'SN', title: __('Sn'), operate: 'LIKE'},
|
|
|
+ {field: 'type', title: __('Type'), searchList: {"0":__('Type 0'),"1":__('Type 1')}, 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 () {
|
|
|
+ Form.api.bindevent($("form[role=form]"));
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ };
|
|
|
+ return Controller;
|
|
|
+});
|