|
@@ -29,7 +29,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
{field: 'amount', title: __('Amount'), operate:'BETWEEN'},
|
|
{field: 'amount', title: __('Amount'), operate:'BETWEEN'},
|
|
|
{field: 'bonus', title: __('Bonus'), operate:'BETWEEN'},
|
|
{field: 'bonus', title: __('Bonus'), operate:'BETWEEN'},
|
|
|
{field: 'status', title: __("Status"),
|
|
{field: 'status', title: __("Status"),
|
|
|
- searchList: {0:__('Unpaid'), 1:__('Finish'), 2:__('Freeze'), 3:__('Cancel')},
|
|
|
|
|
|
|
+ searchList: {100:__('Unpaid'), 101:__('Freeze'), 200:__('Success'), 400:__('Fail'), 500:__('Cancel')},
|
|
|
formatter: Table.api.formatter.status
|
|
formatter: Table.api.formatter.status
|
|
|
},
|
|
},
|
|
|
{field: 'user_type', title: __("用户类型"),
|
|
{field: 'user_type', title: __("用户类型"),
|
|
@@ -42,16 +42,46 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
{field: 'operate', title: __('Operate'),
|
|
{field: 'operate', title: __('Operate'),
|
|
|
table: table,
|
|
table: table,
|
|
|
buttons: [{
|
|
buttons: [{
|
|
|
- name: "operate",
|
|
|
|
|
- text: __('Operate'),
|
|
|
|
|
- classname: 'btn btn-xs btn-danger btn-magic btn-dialog',
|
|
|
|
|
- url: 'trade/order/operate',
|
|
|
|
|
|
|
+ name: "freeze",
|
|
|
|
|
+ text: __('Freeze'),
|
|
|
|
|
+ classname: 'btn btn-xs btn-danger btn-magic btn-ajax',
|
|
|
|
|
+ url: 'trade/order/operate/status/101',
|
|
|
visible: function (row) {
|
|
visible: function (row) {
|
|
|
- if(row.status == 0 && parseFloat(row.users.balance) >= parseFloat(row.amount)){
|
|
|
|
|
|
|
+ if(row.status == 100 && parseFloat(row.users.balance) < parseFloat(row.amount)){
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
return false;
|
|
return false;
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ refresh: true
|
|
|
|
|
+ },{
|
|
|
|
|
+ name: "cancel",
|
|
|
|
|
+ text: __('Cancel'),
|
|
|
|
|
+ classname: 'btn btn-xs btn-primary btn-magic btn-ajax',
|
|
|
|
|
+ url: 'trade/order/operate/status/500',
|
|
|
|
|
+ visible: function (row) {
|
|
|
|
|
+ if(row.status == 100 && parseFloat(row.users.balance) < parseFloat(row.amount)){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ return false;
|
|
|
|
|
+ },
|
|
|
|
|
+ refresh: true
|
|
|
|
|
+ },{
|
|
|
|
|
+ name: "success",
|
|
|
|
|
+ text: __('Success'),
|
|
|
|
|
+ classname: 'btn btn-xs btn-success btn-magic btn-ajax',
|
|
|
|
|
+ url: 'trade/order/operate/status/200',
|
|
|
|
|
+ visible: function (row) {
|
|
|
|
|
+ if(row.status == 100 && parseFloat(row.users.balance) < parseFloat(row.amount)){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ return false;
|
|
|
|
|
+ },
|
|
|
|
|
+ refresh: true
|
|
|
|
|
+ },{
|
|
|
|
|
+ name: "account",
|
|
|
|
|
+ text: __('Account change'),
|
|
|
|
|
+ classname: 'btn btn-xs btn-info btn-magic btn-dialog',
|
|
|
|
|
+ url: 'trade/money_log/index/ids/{user_id}',
|
|
|
}],
|
|
}],
|
|
|
events: Table.api.events.operate, formatter: Table.api.formatter.operate
|
|
events: Table.api.events.operate, formatter: Table.api.formatter.operate
|
|
|
}
|
|
}
|