diff --git a/application/admin/controller/manystore/Rule.php b/application/admin/controller/manystore/Rule.php index 2a2ade7..27940fe 100644 --- a/application/admin/controller/manystore/Rule.php +++ b/application/admin/controller/manystore/Rule.php @@ -106,7 +106,7 @@ class Rule extends Backend } //自己不能是自己的上级 - if ($params['pid'] == $params['id']) { + if ($params['pid'] == $row['id']) { $this->error(__('The parent can not be itself')); } if ($params['pid'] != $row['pid']) { diff --git a/application/admin/controller/school/activity/order/Order.php b/application/admin/controller/school/activity/order/Order.php index 62d35aa..3d6fc06 100644 --- a/application/admin/controller/school/activity/order/Order.php +++ b/application/admin/controller/school/activity/order/Order.php @@ -221,8 +221,8 @@ class Order extends Backend try{ $params = $this->request->post("row/a"); $order_no = $params["order_no"]; - $reject_reason = $params["reject_reason"]; - $price = $params["price"]; + $reject_reason = $params["reject_reason"] ?? ""; + $price = $params["price"] ?? 0; $status = $params["status"]; $model = (new \app\common\model\school\activity\order\Order()); $model->shopConfirmation($order_no,$status,$price,$reject_reason,0,true,'admin',$this->auth->id,true); @@ -259,11 +259,11 @@ class Order extends Backend $params = $this->request->post("row/a"); $order_no = $params["order_no"]; $status = $params["status"]; - $price = $params["price"]; + $price = $params["price"] ?? 0; $model = (new \app\common\model\school\activity\order\Order()); $model->adminConfirmation($order_no,$status,$price,0,true,'admin',$this->auth->id,true); }catch (\Exception $e){ - $this->error($e->getMessage()); + $this->error($e->getMessage() . $e->getFile() . $e->getLine()); } $this->success("已完成审核"); @@ -296,7 +296,7 @@ class Order extends Backend $params = $this->request->post("row/a"); $classes_order = $params["id"]; $reason = $params["reason"]; - $num = $params["num"]; + $num = $params["num"] ?? 0; $model = (new \app\common\model\school\activity\order\Order()); $order = $model->afterSales($classes_order,$num,$reason,0 ,false,'admin',$this->auth->id,true); diff --git a/application/admin/lang/zh-cn/school/activity/order/order.php b/application/admin/lang/zh-cn/school/activity/order/order.php index 51a3311..1ce921c 100644 --- a/application/admin/lang/zh-cn/school/activity/order/order.php +++ b/application/admin/lang/zh-cn/school/activity/order/order.php @@ -80,4 +80,5 @@ return [ 'Suspend_status 0' => '未挂起', 'Suspend_status 1' => '售后拒绝', 'Suspend_status 2' => '售后超时', + 'Reject_reason' => '售後拒絕原因', ]; diff --git a/application/admin/view/school/activity/refund/index.html b/application/admin/view/school/activity/refund/index.html index ed91bb0..b267137 100644 --- a/application/admin/view/school/activity/refund/index.html +++ b/application/admin/view/school/activity/refund/index.html @@ -20,7 +20,7 @@ {:__('Add')} {:__('Edit')} {:__('Delete')} - +
- {:__('Successions')}: +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ + diff --git a/application/manystore/view/user/user/edit.html b/application/manystore/view/user/user/edit.html index 83a9ed3..cf98a9c 100644 --- a/application/manystore/view/user/user/edit.html +++ b/application/manystore/view/user/user/edit.html @@ -119,4 +119,68 @@
- +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ + diff --git a/application/manystore/view/user/withdrawal/userwithdrawal/add.html b/application/manystore/view/user/withdrawal/userwithdrawal/add.html new file mode 100644 index 0000000..4be2bde --- /dev/null +++ b/application/manystore/view/user/withdrawal/userwithdrawal/add.html @@ -0,0 +1,40 @@ +
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
diff --git a/application/manystore/view/user/withdrawal/userwithdrawal/edit.html b/application/manystore/view/user/withdrawal/userwithdrawal/edit.html new file mode 100644 index 0000000..fee3548 --- /dev/null +++ b/application/manystore/view/user/withdrawal/userwithdrawal/edit.html @@ -0,0 +1,40 @@ +
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
diff --git a/application/manystore/view/user/withdrawal/userwithdrawal/index.html b/application/manystore/view/user/withdrawal/userwithdrawal/index.html new file mode 100644 index 0000000..799ef59 --- /dev/null +++ b/application/manystore/view/user/withdrawal/userwithdrawal/index.html @@ -0,0 +1,34 @@ +
+ {:build_heading()} + +
+ +
+
diff --git a/application/manystore/view/user/withdrawal/userwithdrawal/recyclebin.html b/application/manystore/view/user/withdrawal/userwithdrawal/recyclebin.html new file mode 100644 index 0000000..6110192 --- /dev/null +++ b/application/manystore/view/user/withdrawal/userwithdrawal/recyclebin.html @@ -0,0 +1,25 @@ +
+ {:build_heading()} + +
+
+
+ +
+ +
+
+
diff --git a/application/manystore/view/user/withdrawal/userwithdrawal_log/add.html b/application/manystore/view/user/withdrawal/userwithdrawal_log/add.html new file mode 100644 index 0000000..7d4ef4e --- /dev/null +++ b/application/manystore/view/user/withdrawal/userwithdrawal_log/add.html @@ -0,0 +1,130 @@ +
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+ {foreach name="statusList" item="vo"} + + {/foreach} +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+ {foreach name="withdrawalStatusList" item="vo"} + + {/foreach} +
+ +
+
+
+ +
+ +
+
+
+ +
+ + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
diff --git a/application/manystore/view/user/withdrawal/userwithdrawal_log/edit.html b/application/manystore/view/user/withdrawal/userwithdrawal_log/edit.html new file mode 100644 index 0000000..b5a9b8a --- /dev/null +++ b/application/manystore/view/user/withdrawal/userwithdrawal_log/edit.html @@ -0,0 +1,130 @@ +
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+ {foreach name="statusList" item="vo"} + + {/foreach} +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+ {foreach name="withdrawalStatusList" item="vo"} + + {/foreach} +
+ +
+
+
+ +
+ +
+
+
+ +
+ + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
diff --git a/application/manystore/view/user/withdrawal/userwithdrawal_log/index.html b/application/manystore/view/user/withdrawal/userwithdrawal_log/index.html new file mode 100644 index 0000000..60c0992 --- /dev/null +++ b/application/manystore/view/user/withdrawal/userwithdrawal_log/index.html @@ -0,0 +1,44 @@ +
+ +
+ {:build_heading(null,FALSE)} + +
+ + +
+ +
+
diff --git a/public/assets/js/backend/csmtable/test.js b/public/assets/js/backend/csmtable/test.js index 4fbbc43..05163b2 100644 --- a/public/assets/js/backend/csmtable/test.js +++ b/public/assets/js/backend/csmtable/test.js @@ -31,7 +31,7 @@ define(['jquery', 'bootstrap', 'backend', 'csmtable', 'form', 'fixedcolumns', 't { field: 'pid', title: __('pid'), sortable: true }, { field: 'title', title: __('Title'), align: 'left', editable: true }, { field: 'admin_id', title: __('Admin_id'), editable: true, editabletype: 'remote_select', datasource: "auth/admin", datafield: "nickname" }, - { field: 'price', title: __('Price12'), operate: 'BETWEEN', showsum: true, sortable: true, editable: true }, + { field: 'price', title: __('Price'), operate: 'BETWEEN', showsum: true, sortable: true, editable: true }, { field: 'views', title: __('Views'), showsum: true, sumfield: "totalviews", sortable: true }, { field: 'startdate', title: __('Startdate'), operate: 'RANGE', addclass: 'datetimerange' }, { field: 'activitytime', title: __('Activitytime'), operate: 'RANGE', addclass: 'datetimerange', editable: true }, diff --git a/public/assets/js/backend/manystore/index.js b/public/assets/js/backend/manystore/index.js index b3dfd2e..5569bb7 100644 --- a/public/assets/js/backend/manystore/index.js +++ b/public/assets/js/backend/manystore/index.js @@ -118,33 +118,32 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin // return false; // } }, + {name: 'free', + text: '免登录进入机构专业版后台', + icon: 'fa fa-sign-in', + classname: 'btn btn-ajax', + url: $.fn.bootstrapTable.defaults.extend.free_url, + confirm: '确认免登录进入机构专业版后台?如果已登录其他机构,对方账号将被强制退出。', + dropdown : '更多', + success: function (data, ret) { + Layer.alert(ret.msg ); + $(".btn-refresh").trigger("click"); + //js获取当前域名 - // {name: 'free', - // text: '免登录进入机构专业版后台', - // icon: 'fa fa-sign-in', - // classname: 'btn btn-ajax', - // url: $.fn.bootstrapTable.defaults.extend.free_url, - // confirm: '确认免登录进入机构专业版后台?(专业版为老版本后台比API版本功能更多更全,但操作稍多一些)如果已登录其他机构,对方账号将被强制退出。', - // dropdown : '更多', - // success: function (data, ret) { - // Layer.alert(ret.msg ); - // $(".btn-refresh").trigger("click"); - // //js获取当前域名 - // - // - // window.open(shop_backend_url, '_blank'); - // }, - // error: function (data, ret) { - // Layer.alert(ret.msg); - // return false; - // }, - // visible: function (row) { - // //显示条件 只能待入住订单 - // // if((row.status == 2 || row.status == 3) && row.mock_type == "base" && row.add_mock_status == "1" ){ - // return true; - // // } - // // return false; - // }}, + + window.open(shop_backend_url, '_blank'); + }, + error: function (data, ret) { + Layer.alert(ret.msg); + return false; + }, + visible: function (row) { + //显示条件 只能待入住订单 + // if((row.status == 2 || row.status == 3) && row.mock_type == "base" && row.add_mock_status == "1" ){ + return true; + // } + // return false; + }}, // {name: 'freeapi', // text: '免登录进入机构API版后台', // icon: 'fa fa-sign-in', diff --git a/public/assets/js/backend/school/activity/order/order.js b/public/assets/js/backend/school/activity/order/order.js index 4626f44..3e89dc1 100644 --- a/public/assets/js/backend/school/activity/order/order.js +++ b/public/assets/js/backend/school/activity/order/order.js @@ -524,12 +524,14 @@ define(['jquery', 'bootstrap', 'backend', 'csmtable', 'form'], function ($, unde $("#admin_confirmation").on('click', function() { $("#admin_confirmation-form").attr("action",'school/activity/order/order/admin_confirmation').submit(); }); + shop_confirmation.listen(); Controller.api.bindevent(); }, shop_confirmation: function(){ $("#shop_confirmation").on('click', function() { $("#shop_confirmation-form").attr("action",'school/activity/order/order/shop_confirmation').submit(); }); + shop_confirmation.listen(); Controller.api.bindevent(); }, @@ -573,5 +575,36 @@ define(['jquery', 'bootstrap', 'backend', 'csmtable', 'form'], function ($, unde + + var shop_confirmation = { + listen:function () { + this.offlineListen(); + }, + offlineListen:function () { + var that = this; + // console.log($("input:radio[name='row[address_type]']").val()) + // this.setOfflineType($("input:radio[name='row[address_type]']").val()); + $("input:radio[name='row[status]']").change(function (){ + that.setOfflineType($(this).val()); + }); + }, + setOfflineType:function (val) { + switch (val) { + case 'yes': + $('#status_yes').show(); + $('#status_no').hide(); + break; + case 'no': + $('#status_yes').hide(); + $('#status_no').show(); + break; + } + }, + + } + + + + return Controller; }); diff --git a/public/assets/js/backend/school/activity/order/order_log.js b/public/assets/js/backend/school/activity/order/order_log.js index d7ee263..0726a84 100644 --- a/public/assets/js/backend/school/activity/order/order_log.js +++ b/public/assets/js/backend/school/activity/order/order_log.js @@ -28,7 +28,7 @@ define(['jquery', 'bootstrap', 'backend', 'csmtable', 'form'], function ($, unde {checkbox: true}, {field: 'id', title: __('Id')}, {field: 'activity_order_id', title: __('Activity_order_id')}, - {field: 'status', title: __('Status'), searchList: {"-3":__('Status -3'),"0":__('Status 0'),"2":__('Status 2'),"3":__('Status 3'),"4":__('Status 4'),"5":__('Status 5'),"6":__('Status 6'),"9":__('Status 9')}, formatter: Table.api.formatter.status}, + {field: 'status', title: __('Status'), searchList: {"-3":__('Status -3'),"0":__('Status 0'),"2":__('Status 2'),"3":__('Status 3'),"4":__('Status 4'),"5":__('Status 5'),"6":__('Status 6'),"7":__('Status 7'),"9":__('Status 9')}, formatter: Table.api.formatter.status}, {field: 'log_text', title: __('Log_text'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content}, {field: 'oper_type', title: __('Oper_type'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content}, {field: 'oper_id', title: __('Oper_id')}, diff --git a/public/assets/js/backend/school/activity/order/settle_log.js b/public/assets/js/backend/school/activity/order/settle_log.js index 2d1ef3c..646b2ba 100644 --- a/public/assets/js/backend/school/activity/order/settle_log.js +++ b/public/assets/js/backend/school/activity/order/settle_log.js @@ -50,10 +50,10 @@ define(['jquery', 'bootstrap', 'backend', 'csmtable', 'form'], function ($, unde {field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"2":__('Status 2'),"3":__('Status 3'),"-1":__('Status -1')}, formatter: Table.api.formatter.status}, - {field: 'order_price', title: __('Order_price'), operate:'BETWEEN'}, - {field: 'fee_price', title: __('Fee_price'), operate:'BETWEEN'}, + {field: 'order_price', title: __('Order_price'), operate:'BETWEEN', showsum: true}, + {field: 'fee_price', title: __('Fee_price'), operate:'BETWEEN', showsum: true}, {field: 'fee_scale', title: __('Fee_scale'), operate:'BETWEEN'}, - {field: 'settle_price', title: __('Settle_price'), operate:'BETWEEN'}, + {field: 'settle_price', title: __('Settle_price'), operate:'BETWEEN', showsum: true}, {field: 'order.order_no', title: __('Order.order_no'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content}, @@ -62,7 +62,7 @@ define(['jquery', 'bootstrap', 'backend', 'csmtable', 'form'], function ($, unde - {field: 'settletime', title: __('Settletime'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content}, + {field: 'settletime', title: __('Settletime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, {field: 'canceltime', title: __('Canceltime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, {field: 'unfreezetime', title: __('Unfreezetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, diff --git a/public/assets/js/manystore/school/activity/activity.js b/public/assets/js/manystore/school/activity/activity.js new file mode 100644 index 0000000..1edc593 --- /dev/null +++ b/public/assets/js/manystore/school/activity/activity.js @@ -0,0 +1,440 @@ +define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) { + + var Controller = { + index: function () { + // 初始化表格参数配置 + Table.api.init({ + extend: { + index_url: 'school/activity/activity/index' + location.search, + add_url: 'school/activity/activity/add'+ location.search, + edit_url: 'school/activity/activity/edit'+ location.search, + copy_url: 'school/activity/activity/copy'+ location.search, + del_url: 'school/activity/activity/del', + cancel_url: 'school/activity/activity/cancel', + multi_url: 'school/activity/activity/multi', + import_url: 'school/activity/activity/import', + + + lookminiqrcode_url: 'school/activity/activity/lookminiqrcode', + miniqrcode_url: 'school/activity/activity/miniqrcode', + + table: 'school_activity', + } + }); + + var table = $("#table"); + + // 初始化表格 + table.bootstrapTable({ + url: $.fn.bootstrapTable.defaults.extend.index_url, + pk: 'id', + sortName: 'weigh', + fixedColumns: true, + fixedRightNumber: 2, + columns: [ + [ + {checkbox: true}, + + {field: 'id', title: __('Id')}, + {field: 'user_id', title: __('User_id')}, + {field: 'title', title: __('Title'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content}, + {field: 'images', title: __('Images'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images}, + {field: 'feel', title: __('Feel'), searchList: {"0":__('Feel 0'),"1":__('Feel 1')}, formatter: Table.api.formatter.normal}, + {field: 'cate_ids', title: __('Cate_ids'), searchList: cateListJson, formatter: Table.api.formatter.flag}, + {field: 'platform', title: __('Platform'), searchList: platformListJson, formatter: Table.api.formatter.flag}, + {field: 'show', title: __('Show'), searchList: {"1":__('Show 1'),"2":__('Show 2')}, formatter: Table.api.formatter.status}, + {field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"2":__('Status 2'),"3":__('Status 3'),"4":__('Status 4'),"5":__('Status 5'),"-1":__('Status -1')}, formatter: Table.api.formatter.status}, + + {field: 'image', title: __('Image'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image}, + + {field: 'auth_status', title: __('Auth_status'), searchList: {"0":__('Auth_status 0'),"1":__('Auth_status 1'),"2":__('Auth_status 2')}, formatter: Table.api.formatter.status}, + {field: 'reason', title: __('Reason'), operate: 'LIKE'}, + + {field: 'settlestatus', title: __('结算状态'), searchList: settlestatusListJson, formatter: Table.api.formatter.status}, + // {field: 'address_city', title: __('Address_city'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content}, + // {field: 'cate_ids', title: __('Cate_ids'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content}, + + + + + + // {field: 'province', title: __('Province')}, + // {field: 'city', title: __('City')}, + // {field: 'district', title: __('District')}, + {field: 'address', title: __('Address'), operate: 'LIKE'}, + {field: 'address_detail', title: __('Address_detail'), operate: 'LIKE'}, + {field: 'longitude', title: __('Longitude'), operate: 'LIKE'}, + {field: 'latitude', title: __('Latitude'), operate: 'LIKE'}, + {field: 'start_time', title: __('Start_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, + {field: 'end_time', title: __('End_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, + {field: 'sign_start_time', title: __('Sign_start_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, + {field: 'sign_end_time', title: __('Sign_end_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, + {field: 'price', title: __('Price'), operate:'BETWEEN'}, + {field: 'stock', title: __('Stock')}, + + {field: 'cancel_type', title: __('Cancel_type'), searchList: {"1":__('Cancel_type 1'),"2":__('Cancel_type 2')}, formatter: Table.api.formatter.normal}, + {field: 'weigh', title: __('Weigh'), operate: false}, + {field: 'recommend', title: __('Recommend'), searchList: {"0":__('Recommend 0'),"1":__('Recommend 1')}, formatter: Table.api.formatter.normal}, + {field: 'hot', title: __('Hot'), searchList: {"0":__('Hot 0'),"1":__('Hot 1')}, formatter: Table.api.formatter.normal}, + {field: 'new', title: __('New'), searchList: {"0":__('New 0'),"1":__('New 1')}, formatter: Table.api.formatter.normal}, + {field: 'sale', title: __('Sale')}, + {field: 'views', title: __('Views')}, + {field: 'add_type', title: __('Add_type'), searchList: {"1":__('Add_type 1'),"2":__('Add_type 2')}, formatter: Table.api.formatter.normal}, + {field: 'add_id', title: __('Add_id')}, + + {field: 'sign_num', title: __('Sign_num')}, + {field: 'verification_num', title: __('Verification_num')}, + {field: 'collect', title: __('Collect')}, + {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, + {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, + + {field: 'admin_id', title: __('Admin_id')}, + {field: 'auth_time', title: __('Auth_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, + {field: 'canceltime', title: __('Canceltime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, + {field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'}, + {field: 'user.realname', title: __('User.realname'), operate: 'LIKE'}, + {field: 'user.mobile', title: __('User.mobile'), operate: 'LIKE'}, + {field: 'user.avatar', title: __('User.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image}, + {field: 'admin.nickname', title: __('Admin.nickname'), operate: 'LIKE'}, + {field: 'admin.avatar', title: __('Admin.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image}, + // {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} + {field: 'miniqrcode_link', title: __('微信小程序端展示'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image}, + + + + {field: 'operate', title: __('Operate'), table: table , buttons: [ + + {name: 'cancel', + text: '取消活动', + icon: 'fa fa-user-times', + classname: 'btn btn-xs btn-warning btn-magic btn-ajax', + url: $.fn.bootstrapTable.defaults.extend.cancel_url, + confirm: '确认取消活动', + success: function (data, ret) { + Layer.alert(ret.msg ); + $(".btn-refresh").trigger("click"); + }, + error: function (data, ret) { + Layer.alert(ret.msg); + return false; + }, + visible: function (row) { + //非免费订单只有未支付可取消 + if(row.status == '1' || row.status == '2' || row.status == '3' || row.status == '4' ){ + return true; + } + + return false; + }}, + + { + name: 'copy', + text: __('复制并创建活动'), + title: __('复制活动信息并创建成新活动'), + classname: 'btn btn-dialog', + icon: 'fa fa-files-o', + dropdown : '更多', + url: $.fn.bootstrapTable.defaults.extend.copy_url, + callback: function (data) { + + }, + // visible: function (row) { + // return row.status == '2'||row.status == '3'; + // } + }, + + { + name: 'activity_order', + text: __('参与的活动订单'), + title: __('参与的活动订单'), + classname: 'btn btn-dialog', + icon: 'fa fa-cart-arrow-down', + dropdown : '更多', + url: activity_order_url, + callback: function (data) { + + }, + // visible: function (row) { + // return row.status == '2'||row.status == '3'; + // } + }, + + + + { + name: 'settle_log', + text: __('活动生成的结算日志'), + title: __('活动生成的结算日志'), + classname: 'btn btn-dialog', + icon: 'fa fa-cart-arrow-down', + dropdown : '更多', + url: settle_log_url, + callback: function (data) { + + }, + // visible: function (row) { + // return row.status == '2'||row.status == '3'; + // } + }, + + ], events: Table.api.events.operate, formatter: Table.api.formatter.operate}, + ] + ] + }); + + // 为表格绑定事件 + Table.api.bindevent(table); + + + $('.panel-heading .nav-custom3-condition a[data-toggle="tab"]', table.closest(".panel-intro")).on('shown.bs.tab', function (e) { + var value = $(this).data("value"); + var options = table.bootstrapTable('getOptions'); + var queryParams = options.queryParams; + options.pageNumber = 1; + options.queryParams = function (params) { + //这一行必须要存在,否则在点击下一页时会丢失搜索栏数据 + params = queryParams(params); + + //如果希望追加搜索条件,可使用 + var filter = params.filter ? JSON.parse(params.filter) : {}; + var op = params.op ? JSON.parse(params.op) : {}; + if (value!=="") { + //这里可以自定义多个筛选条件 + filter.settlestatus = value; + op.settlestatus = '='; + }else{ + //console.log("111111111111111111"); + //选全部时要移除相应的条件 + delete filter.settlestatus; + delete op.settlestatus; + } + + params.filter = JSON.stringify(filter); + params.op = JSON.stringify(op); + + //如果希望忽略搜索栏搜索条件,可使用 + //params.filter = JSON.stringify(value?{admin_id: value}:{}); + //params.op = JSON.stringify(value?{admin_id: '='}:{}); + return params; + }; + + table.trigger("uncheckbox"); + table.bootstrapTable('refresh', {pageNumber: 1}); + return false; + }); + + //自定义Tab筛选条件 + $('.panel-heading .nav-custom-condition a[data-toggle="tab"]', table.closest(".panel-intro")).on('shown.bs.tab', function (e) { + var value = $(this).data("value"); + var options = table.bootstrapTable('getOptions'); + var queryParams = options.queryParams; + options.pageNumber = 1; + options.queryParams = function (params) { + //这一行必须要存在,否则在点击下一页时会丢失搜索栏数据 + params = queryParams(params); + + //如果希望追加搜索条件,可使用 + var filter = params.filter ? JSON.parse(params.filter) : {}; + var op = params.op ? JSON.parse(params.op) : {}; + if (value!=="") { + //这里可以自定义多个筛选条件 + filter.auth_status = value; + op.auth_status = '='; + }else{ + //console.log("111111111111111111"); + //选全部时要移除相应的条件 + delete filter.auth_status; + delete op.auth_status; + } + + params.filter = JSON.stringify(filter); + params.op = JSON.stringify(op); + + //如果希望忽略搜索栏搜索条件,可使用 + //params.filter = JSON.stringify(value?{admin_id: value}:{}); + //params.op = JSON.stringify(value?{admin_id: '='}:{}); + return params; + }; + + table.trigger("uncheckbox"); + table.bootstrapTable('refresh', {pageNumber: 1}); + return false; + }); + + + + + + //自定义Tab筛选条件 + $('.panel-heading .nav-custom2-condition a[data-toggle="tab"]', table.closest(".panel-intro")).on('shown.bs.tab', function (e) { + var value = $(this).data("value"); + var options = table.bootstrapTable('getOptions'); + var queryParams = options.queryParams; + options.pageNumber = 1; + options.queryParams = function (params) { + //这一行必须要存在,否则在点击下一页时会丢失搜索栏数据 + params = queryParams(params); + + //如果希望追加搜索条件,可使用 + var filter = params.filter ? JSON.parse(params.filter) : {}; + var op = params.op ? JSON.parse(params.op) : {}; + if (value!=="") { + //这里可以自定义多个筛选条件 + filter.platform = value; + op.platform = 'FIND_IN_SET'; + }else{ + //console.log("111111111111111111"); + //选全部时要移除相应的条件 + delete filter.platform; + delete op.platform; + } + + params.filter = JSON.stringify(filter); + params.op = JSON.stringify(op); + + //如果希望忽略搜索栏搜索条件,可使用 + //params.filter = JSON.stringify(value?{admin_id: value}:{}); + //params.op = JSON.stringify(value?{admin_id: '='}:{}); + return params; + }; + + table.trigger("uncheckbox"); + table.bootstrapTable('refresh', {pageNumber: 1}); + return false; + }); + + + + }, + recyclebin: function () { + // 初始化表格参数配置 + Table.api.init({ + extend: { + 'dragsort_url': '' + } + }); + + var table = $("#table"); + + // 初始化表格 + table.bootstrapTable({ + url: 'school/activity/activity/recyclebin' + location.search, + pk: 'id', + sortName: 'id', + columns: [ + [ + {checkbox: true}, + {field: 'id', title: __('Id')}, + {field: 'title', title: __('Title'), align: 'left'}, + { + field: 'deletetime', + title: __('Deletetime'), + operate: 'RANGE', + addclass: 'datetimerange', + formatter: Table.api.formatter.datetime + }, + { + field: 'operate', + width: '130px', + title: __('Operate'), + table: table, + events: Table.api.events.operate, + buttons: [ + { + name: 'Restore', + text: __('Restore'), + classname: 'btn btn-xs btn-info btn-ajax btn-restoreit', + icon: 'fa fa-rotate-left', + url: 'school/activity/activity/restore', + refresh: true + }, + { + name: 'Destroy', + text: __('Destroy'), + classname: 'btn btn-xs btn-danger btn-ajax btn-destroyit', + icon: 'fa fa-times', + url: 'school/activity/activity/destroy', + refresh: true + } + ], + formatter: Table.api.formatter.operate + } + ] + ] + }); + + // 为表格绑定事件 + Table.api.bindevent(table); + }, + add: function () { + Controller.api.bindevent(); + }, + edit: function () { + Controller.api.bindevent(); + }, + copy: function () { + Controller.api.bindevent(); + }, + api: { + bindevent: function () { + + $(document).on("dp.change", "#add-form .datetimerange", function () { + $(this).parent().prev().find("input").trigger("change"); + }); + + $(document).on("dp.change", "#add-form .datetimepicker", function () { + $(this).parent().prev().find("input").trigger("change"); + }); + $(document).on("dp.change", "#edit-form .datetimerange", function () { + $(this).parent().prev().find("input").trigger("change"); + }); + + $(document).on("dp.change", "#edit-form .datetimepicker", function () { + $(this).parent().prev().find("input").trigger("change"); + }); + + + $(document).on('click', '.btn-changeuser', function (event) { + var url = $(this).attr('data-url'); + if(!url) return false; + var title = $(this).attr('title'); + var width = $(this).attr('data-width'); + var height = $(this).attr('data-height'); + // var ids = $(this).attr('data-id'); + var area = [$(window).width() > 800 ? (width?width:'800px') : '95%', $(window).height() > 600 ? (height?height:'600px') : '95%']; + var options = { + shadeClose: false, + shade: [0.3, '#393D49'], + area: area, + callback:function(ret){//回调方法,需要在本页面Controller中增加方法监听且调用Fast.api.close(ret)传递结果; + Fast.api.close(ret); + } + }; + Fast.api.open(url,title,options); + }); + + + Form.api.bindevent($("form[role=form]")); + } + } + }; + + + var activity_order_url = function (row,dom) { + return 'school/activity/order/order/index?activity_id='+row.id; + } + + var user_url = function (row,dom) { + return 'user/user/index?id='+row.user_id; + } + + + var settle_log_url = function (row,dom) { + return 'school/activity/order/settle_log/index?activity_id='+row.id; + } + + + + + return Controller; +}); \ No newline at end of file diff --git a/public/assets/js/manystore/school/activity/cate.js b/public/assets/js/manystore/school/activity/cate.js new file mode 100644 index 0000000..4f94073 --- /dev/null +++ b/public/assets/js/manystore/school/activity/cate.js @@ -0,0 +1,117 @@ +define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) { + + var Controller = { + index: function () { + // 初始化表格参数配置 + Table.api.init({ + extend: { + index_url: 'school/activity/cate/index' + location.search, + add_url: 'school/activity/cate/add', + edit_url: 'school/activity/cate/edit', + del_url: 'school/activity/cate/del', + multi_url: 'school/activity/cate/multi', + import_url: 'school/activity/cate/import', + table: 'school_activity_cate', + } + }); + + var table = $("#table"); + + // 初始化表格 + table.bootstrapTable({ + url: $.fn.bootstrapTable.defaults.extend.index_url, + pk: 'id', + sortName: 'weigh', + columns: [ + [ + {checkbox: true}, + {field: 'id', title: __('Id')}, + {field: 'name', title: __('Name'), operate: 'LIKE'}, + {field: 'image', title: __('Image'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image}, + {field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"2":__('Status 2')}, formatter: Table.api.formatter.status}, + {field: 'hot', title: __('Hot'), searchList: {"0":__('Hot 0'),"1":__('Hot 1')}, formatter: Table.api.formatter.normal}, + {field: 'weigh', title: __('Weigh'), operate: false}, + {field: 'createtime', title: __('Createtime')}, + {field: 'updatetime', title: __('Updatetime')}, + // {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} + ] + ] + }); + + // 为表格绑定事件 + Table.api.bindevent(table); + }, + recyclebin: function () { + // 初始化表格参数配置 + Table.api.init({ + extend: { + 'dragsort_url': '' + } + }); + + var table = $("#table"); + + // 初始化表格 + table.bootstrapTable({ + url: 'school/activity/cate/recyclebin' + location.search, + pk: 'id', + sortName: 'id', + columns: [ + [ + {checkbox: true}, + {field: 'id', title: __('Id')}, + {field: 'name', title: __('Name'), align: 'left'}, + { + field: 'deletetime', + title: __('Deletetime'), + operate: 'RANGE', + addclass: 'datetimerange', + formatter: Table.api.formatter.datetime + }, + { + field: 'operate', + width: '130px', + title: __('Operate'), + table: table, + events: Table.api.events.operate, + buttons: [ + { + name: 'Restore', + text: __('Restore'), + classname: 'btn btn-xs btn-info btn-ajax btn-restoreit', + icon: 'fa fa-rotate-left', + url: 'school/activity/cate/restore', + refresh: true + }, + { + name: 'Destroy', + text: __('Destroy'), + classname: 'btn btn-xs btn-danger btn-ajax btn-destroyit', + icon: 'fa fa-times', + url: 'school/activity/cate/destroy', + refresh: true + } + ], + 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; +}); \ No newline at end of file diff --git a/public/assets/js/manystore/school/activity/order/order.js b/public/assets/js/manystore/school/activity/order/order.js new file mode 100644 index 0000000..baca59c --- /dev/null +++ b/public/assets/js/manystore/school/activity/order/order.js @@ -0,0 +1,156 @@ +define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) { + + var Controller = { + index: function () { + // 初始化表格参数配置 + Table.api.init({ + extend: { + index_url: 'school/activity/order/order/index' + location.search, + add_url: 'school/activity/order/order/add', + edit_url: 'school/activity/order/order/edit', + del_url: 'school/activity/order/order/del', + multi_url: 'school/activity/order/order/multi', + import_url: 'school/activity/order/order/import', + table: 'school_activity_order', + } + }); + + var table = $("#table"); + + // 初始化表格 + table.bootstrapTable({ + url: $.fn.bootstrapTable.defaults.extend.index_url, + pk: 'id', + sortName: 'id', + columns: [ + [ + {checkbox: true}, + {field: 'id', title: __('Id')}, + {field: 'order_no', title: __('Order_no'), operate: 'LIKE'}, + {field: 'pay_no', title: __('Pay_no'), operate: 'LIKE'}, + {field: 'user_id', title: __('User_id')}, + {field: 'activity_id', title: __('Activity_id')}, + {field: 'activity_order_detail_id', title: __('Activity_order_detail_id')}, + {field: 'beforeprice', title: __('Beforeprice'), operate:'BETWEEN'}, + {field: 'totalprice', title: __('Totalprice'), operate:'BETWEEN'}, + {field: 'payprice', title: __('Payprice'), operate:'BETWEEN'}, + {field: 'pay_type', title: __('Pay_type'), searchList: {"yue":__('Pay_type yue'),"wechat":__('Pay_type wechat')}, formatter: Table.api.formatter.normal}, + {field: 'status', title: __('Status'), searchList: {"-3":__('Status -3'),"0":__('Status 0'),"2":__('Status 2'),"3":__('Status 3'),"4":__('Status 4'),"5":__('Status 5'),"6":__('Status 6'),"7":__('Status 7'),"9":__('Status 9')}, formatter: Table.api.formatter.status}, + {field: 'before_status', title: __('Before_status'), searchList: {"-3":__('Before_status -3'),"0":__('Before_status 0'),"2":__('Before_status 2'),"3":__('Before_status 3'),"4":__('Before_status 4'),"6":__('Before_status 6'),"9":__('Before_status 9')}, formatter: Table.api.formatter.status}, + {field: 'server_status', title: __('Server_status'), searchList: {"0":__('Server_status 0'),"3":__('Server_status 3'),"6":__('Server_status 6')}, formatter: Table.api.formatter.status}, + {field: 'suspend_status', title: __('Suspend_status'), searchList: {"0":__('Suspend_status 0'),"1":__('Suspend_status 1'),"2":__('Suspend_status 2')}, formatter: Table.api.formatter.status}, + {field: 'canceltime', title: __('Canceltime')}, + {field: 'paytime', title: __('Paytime')}, + {field: 'auth_time', title: __('Auth_time')}, + {field: 'reservation_time', title: __('Reservation_time')}, + {field: 'finishtime', title: __('Finishtime')}, + {field: 'refundtime', title: __('Refundtime')}, + {field: 'first_refundprice', title: __('First_refundprice'), operate:'BETWEEN'}, + {field: 'total_refundprice', title: __('Total_refundprice'), operate:'BETWEEN'}, + {field: 'real_refundprice', title: __('Real_refundprice'), operate:'BETWEEN'}, + {field: 'sub_refundprice', title: __('Sub_refundprice'), operate:'BETWEEN'}, + {field: 'platform', title: __('Platform'), operate: 'LIKE'}, + {field: 'reason', title: __('Reason'), operate: 'LIKE'}, + {field: 'auth_reason', title: __('Auth_reason'), operate: 'LIKE'}, + {field: 'auth_status', title: __('Auth_status'), searchList: {"0":__('Auth_status 0'),"1":__('Auth_status 1'),"2":__('Auth_status 2')}, formatter: Table.api.formatter.status}, + {field: 'auth_user_id', title: __('Auth_user_id')}, + {field: 'auth_type', title: __('Auth_type'), operate: 'LIKE'}, + {field: 'refund_no', title: __('Refund_no'), operate: 'LIKE'}, + {field: 'refund_error', title: __('Refund_error'), operate: 'LIKE'}, + {field: 'refundsendtime', title: __('Refundsendtime')}, + {field: 'createtime', title: __('Createtime')}, + {field: 'updatetime', title: __('Updatetime')}, + {field: 'num', title: __('Num')}, + {field: 'fee_scale', title: __('Fee_scale'), operate:'BETWEEN'}, + {field: 'settle_log_time', title: __('Settle_log_time')}, + {field: 'fee_price', title: __('Fee_price'), operate:'BETWEEN'}, + {field: 'last_time', title: __('Last_time')}, + {field: 'desc', title: __('Desc'), operate: 'LIKE'}, + {field: 'schoolactivity.title', title: __('Schoolactivity.title'), operate: 'LIKE'}, + {field: 'schoolactivity.images', title: __('Schoolactivity.images'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images}, + {field: 'schoolactivityorderdetail.title', title: __('Schoolactivityorderdetail.title'), operate: 'LIKE'}, + {field: 'schoolactivityorderdetail.images', title: __('Schoolactivityorderdetail.images'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images}, + {field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'}, + {field: 'user.mobile', title: __('User.mobile'), operate: 'LIKE'}, + {field: 'user.avatar', title: __('User.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image}, + {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} + ] + ] + }); + + // 为表格绑定事件 + Table.api.bindevent(table); + }, + recyclebin: function () { + // 初始化表格参数配置 + Table.api.init({ + extend: { + 'dragsort_url': '' + } + }); + + var table = $("#table"); + + // 初始化表格 + table.bootstrapTable({ + url: 'school/activity/order/order/recyclebin' + location.search, + pk: 'id', + sortName: 'id', + columns: [ + [ + {checkbox: true}, + {field: 'id', title: __('Id')}, + { + field: 'deletetime', + title: __('Deletetime'), + operate: 'RANGE', + addclass: 'datetimerange', + formatter: Table.api.formatter.datetime + }, + { + field: 'operate', + width: '130px', + title: __('Operate'), + table: table, + events: Table.api.events.operate, + buttons: [ + { + name: 'Restore', + text: __('Restore'), + classname: 'btn btn-xs btn-info btn-ajax btn-restoreit', + icon: 'fa fa-rotate-left', + url: 'school/activity/order/order/restore', + refresh: true + }, + { + name: 'Destroy', + text: __('Destroy'), + classname: 'btn btn-xs btn-danger btn-ajax btn-destroyit', + icon: 'fa fa-times', + url: 'school/activity/order/order/destroy', + refresh: true + } + ], + 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; +}); \ No newline at end of file diff --git a/public/assets/js/manystore/school/activity/order/order_code.js b/public/assets/js/manystore/school/activity/order/order_code.js new file mode 100644 index 0000000..539e277 --- /dev/null +++ b/public/assets/js/manystore/school/activity/order/order_code.js @@ -0,0 +1,131 @@ +define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) { + + var Controller = { + index: function () { + // 初始化表格参数配置 + Table.api.init({ + extend: { + index_url: 'school/activity/order/order_code/index' + location.search, + add_url: 'school/activity/order/order_code/add', + edit_url: 'school/activity/order/order_code/edit', + del_url: 'school/activity/order/order_code/del', + multi_url: 'school/activity/order/order_code/multi', + import_url: 'school/activity/order/order_code/import', + table: 'school_activity_order_code', + } + }); + + var table = $("#table"); + + // 初始化表格 + table.bootstrapTable({ + url: $.fn.bootstrapTable.defaults.extend.index_url, + pk: 'id', + sortName: 'id', + columns: [ + [ + {checkbox: true}, + {field: 'id', title: __('Id')}, + {field: 'activity_order_id', title: __('Activity_order_id')}, + {field: 'code', title: __('Code'), operate: 'LIKE'}, + {field: 'codeimage', title: __('Codeimage'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image}, + {field: 'codeoneimage', title: __('Codeoneimage'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image}, + {field: 'status', title: __('Status'), searchList: {"3":__('Status 3'),"6":__('Status 6')}, formatter: Table.api.formatter.status}, + {field: 'verificationtime', title: __('Verificationtime')}, + {field: 'verification_user_id', title: __('Verification_user_id')}, + {field: 'verification_type', title: __('Verification_type'), operate: 'LIKE'}, + {field: 'createtime', title: __('Createtime')}, + {field: 'updatetime', title: __('Updatetime')}, + {field: 'activity_id', title: __('Activity_id')}, + {field: 'miniurl', title: __('Miniurl'), operate: 'LIKE', formatter: Table.api.formatter.url}, + {field: 'name', title: __('Name'), operate: 'LIKE'}, + {field: 'idnum', title: __('Idnum'), operate: 'LIKE'}, + {field: 'schoolactivityorder.order_no', title: __('Schoolactivityorder.order_no'), operate: 'LIKE'}, + {field: 'schoolactivityorder.pay_no', title: __('Schoolactivityorder.pay_no'), operate: 'LIKE'}, + {field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'}, + {field: 'user.mobile', title: __('User.mobile'), operate: 'LIKE'}, + {field: 'user.avatar', title: __('User.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image}, + {field: 'schoolactivity.title', title: __('Schoolactivity.title'), operate: 'LIKE'}, + {field: 'schoolactivity.images', title: __('Schoolactivity.images'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images}, + {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} + ] + ] + }); + + // 为表格绑定事件 + Table.api.bindevent(table); + }, + recyclebin: function () { + // 初始化表格参数配置 + Table.api.init({ + extend: { + 'dragsort_url': '' + } + }); + + var table = $("#table"); + + // 初始化表格 + table.bootstrapTable({ + url: 'school/activity/order/order_code/recyclebin' + location.search, + pk: 'id', + sortName: 'id', + columns: [ + [ + {checkbox: true}, + {field: 'id', title: __('Id')}, + {field: 'name', title: __('Name'), align: 'left'}, + { + field: 'deletetime', + title: __('Deletetime'), + operate: 'RANGE', + addclass: 'datetimerange', + formatter: Table.api.formatter.datetime + }, + { + field: 'operate', + width: '130px', + title: __('Operate'), + table: table, + events: Table.api.events.operate, + buttons: [ + { + name: 'Restore', + text: __('Restore'), + classname: 'btn btn-xs btn-info btn-ajax btn-restoreit', + icon: 'fa fa-rotate-left', + url: 'school/activity/order/order_code/restore', + refresh: true + }, + { + name: 'Destroy', + text: __('Destroy'), + classname: 'btn btn-xs btn-danger btn-ajax btn-destroyit', + icon: 'fa fa-times', + url: 'school/activity/order/order_code/destroy', + refresh: true + } + ], + 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; +}); \ No newline at end of file diff --git a/public/assets/js/manystore/school/activity/order/order_detail.js b/public/assets/js/manystore/school/activity/order/order_detail.js new file mode 100644 index 0000000..17e39f0 --- /dev/null +++ b/public/assets/js/manystore/school/activity/order/order_detail.js @@ -0,0 +1,159 @@ +define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) { + + var Controller = { + index: function () { + // 初始化表格参数配置 + Table.api.init({ + extend: { + index_url: 'school/activity/order/order_detail/index' + location.search, + add_url: 'school/activity/order/order_detail/add', + edit_url: 'school/activity/order/order_detail/edit', + del_url: 'school/activity/order/order_detail/del', + multi_url: 'school/activity/order/order_detail/multi', + import_url: 'school/activity/order/order_detail/import', + table: 'school_activity_order_detail', + } + }); + + var table = $("#table"); + + // 初始化表格 + table.bootstrapTable({ + url: $.fn.bootstrapTable.defaults.extend.index_url, + pk: 'id', + sortName: 'weigh', + columns: [ + [ + {checkbox: true}, + {field: 'id', title: __('Id')}, + {field: 'user_id', title: __('User_id')}, + {field: 'activity_order_id', title: __('Activity_order_id')}, + {field: 'activity_id', title: __('Activity_id')}, + {field: 'title', title: __('Title'), operate: 'LIKE'}, + {field: 'image', title: __('Image'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image}, + {field: 'images', title: __('Images'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images}, + {field: 'address_city', title: __('Address_city'), operate: 'LIKE'}, + {field: 'cate_ids', title: __('Cate_ids'), operate: 'LIKE'}, + {field: 'province', title: __('Province')}, + {field: 'city', title: __('City')}, + {field: 'district', title: __('District')}, + {field: 'address', title: __('Address'), operate: 'LIKE'}, + {field: 'address_detail', title: __('Address_detail'), operate: 'LIKE'}, + {field: 'longitude', title: __('Longitude'), operate: 'LIKE'}, + {field: 'latitude', title: __('Latitude'), operate: 'LIKE'}, + {field: 'start_time', title: __('Start_time')}, + {field: 'end_time', title: __('End_time')}, + {field: 'sign_start_time', title: __('Sign_start_time')}, + {field: 'sign_end_time', title: __('Sign_end_time')}, + {field: 'price', title: __('Price'), operate:'BETWEEN'}, + {field: 'stock', title: __('Stock')}, + {field: 'weigh', title: __('Weigh'), operate: false}, + {field: 'recommend', title: __('Recommend'), searchList: {"0":__('Recommend 0'),"1":__('Recommend 1')}, formatter: Table.api.formatter.normal}, + {field: 'hot', title: __('Hot'), searchList: {"0":__('Hot 0'),"1":__('Hot 1')}, formatter: Table.api.formatter.normal}, + {field: 'new', title: __('New'), searchList: {"0":__('New 0'),"1":__('New 1')}, formatter: Table.api.formatter.normal}, + {field: 'sale', title: __('Sale')}, + {field: 'views', title: __('Views')}, + {field: 'add_type', title: __('Add_type'), searchList: {"1":__('Add_type 1'),"2":__('Add_type 2')}, formatter: Table.api.formatter.normal}, + {field: 'add_id', title: __('Add_id')}, + {field: 'feel', title: __('Feel'), searchList: {"0":__('Feel 0'),"1":__('Feel 1')}, formatter: Table.api.formatter.normal}, + {field: 'sign_num', title: __('Sign_num')}, + {field: 'verification_num', title: __('Verification_num')}, + {field: 'collect', title: __('Collect')}, + {field: 'createtime', title: __('Createtime')}, + {field: 'updatetime', title: __('Updatetime')}, + {field: 'refund_id', title: __('Refund_id')}, + {field: 'fee_scale', title: __('Fee_scale'), operate:'BETWEEN'}, + {field: 'refund_status', title: __('Refund_status'), searchList: {"1":__('Refund_status 1'),"3":__('Refund_status 3'),"5":__('Refund_status 5'),"7":__('Refund_status 7'),"9":__('Refund_status 9'),"11":__('Refund_status 11')}, formatter: Table.api.formatter.status}, + {field: 'settlement_time', title: __('Settlement_time')}, + {field: 'platform', title: __('Platform'), searchList: {"wechat_miniapp":__('Platform wechat_miniapp'),"tt_miniapp":__('Platform tt_miniapp')}, operate:'FIND_IN_SET', formatter: Table.api.formatter.label}, + {field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'}, + {field: 'user.mobile', title: __('User.mobile'), operate: 'LIKE'}, + {field: 'user.avatar', title: __('User.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image}, + {field: 'schoolactivityorder.order_no', title: __('Schoolactivityorder.order_no'), operate: 'LIKE'}, + {field: 'schoolactivityorder.pay_no', title: __('Schoolactivityorder.pay_no'), operate: 'LIKE'}, + {field: 'schoolactivity.title', title: __('Schoolactivity.title'), operate: 'LIKE'}, + {field: 'schoolactivity.images', title: __('Schoolactivity.images'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images}, + {field: 'schoolactivityrefund.title', title: __('Schoolactivityrefund.title'), operate: 'LIKE'}, + {field: 'schoolactivityrefund.desc', title: __('Schoolactivityrefund.desc'), operate: 'LIKE'}, + {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} + ] + ] + }); + + // 为表格绑定事件 + Table.api.bindevent(table); + }, + recyclebin: function () { + // 初始化表格参数配置 + Table.api.init({ + extend: { + 'dragsort_url': '' + } + }); + + var table = $("#table"); + + // 初始化表格 + table.bootstrapTable({ + url: 'school/activity/order/order_detail/recyclebin' + location.search, + pk: 'id', + sortName: 'id', + columns: [ + [ + {checkbox: true}, + {field: 'id', title: __('Id')}, + {field: 'title', title: __('Title'), align: 'left'}, + { + field: 'deletetime', + title: __('Deletetime'), + operate: 'RANGE', + addclass: 'datetimerange', + formatter: Table.api.formatter.datetime + }, + { + field: 'operate', + width: '130px', + title: __('Operate'), + table: table, + events: Table.api.events.operate, + buttons: [ + { + name: 'Restore', + text: __('Restore'), + classname: 'btn btn-xs btn-info btn-ajax btn-restoreit', + icon: 'fa fa-rotate-left', + url: 'school/activity/order/order_detail/restore', + refresh: true + }, + { + name: 'Destroy', + text: __('Destroy'), + classname: 'btn btn-xs btn-danger btn-ajax btn-destroyit', + icon: 'fa fa-times', + url: 'school/activity/order/order_detail/destroy', + refresh: true + } + ], + 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; +}); \ No newline at end of file diff --git a/public/assets/js/manystore/school/activity/order/order_log.js b/public/assets/js/manystore/school/activity/order/order_log.js new file mode 100644 index 0000000..ab157fc --- /dev/null +++ b/public/assets/js/manystore/school/activity/order/order_log.js @@ -0,0 +1,118 @@ +define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) { + + var Controller = { + index: function () { + // 初始化表格参数配置 + Table.api.init({ + extend: { + index_url: 'school/activity/order/order_log/index' + location.search, + add_url: 'school/activity/order/order_log/add', + edit_url: 'school/activity/order/order_log/edit', + del_url: 'school/activity/order/order_log/del', + multi_url: 'school/activity/order/order_log/multi', + import_url: 'school/activity/order/order_log/import', + table: 'school_activity_order_log', + } + }); + + var table = $("#table"); + + // 初始化表格 + table.bootstrapTable({ + url: $.fn.bootstrapTable.defaults.extend.index_url, + pk: 'id', + sortName: 'id', + columns: [ + [ + {checkbox: true}, + {field: 'id', title: __('Id')}, + {field: 'activity_order_id', title: __('Activity_order_id')}, + {field: 'status', title: __('Status'), searchList: {"-3":__('Status -3'),"0":__('Status 0'),"2":__('Status 2'),"3":__('Status 3'),"4":__('Status 4'),"5":__('Status 5'),"6":__('Status 6'),"7":__('Status 7'),"9":__('Status 9')}, formatter: Table.api.formatter.status}, + {field: 'log_text', title: __('Log_text'), operate: 'LIKE'}, + {field: 'oper_type', title: __('Oper_type'), operate: 'LIKE'}, + {field: 'oper_id', title: __('Oper_id')}, + {field: 'createtime', title: __('Createtime')}, + {field: 'updatetime', title: __('Updatetime')}, + {field: 'schoolactivityorder.order_no', title: __('Schoolactivityorder.order_no'), operate: 'LIKE'}, + {field: 'schoolactivityorder.pay_no', title: __('Schoolactivityorder.pay_no'), operate: 'LIKE'}, + {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} + ] + ] + }); + + // 为表格绑定事件 + Table.api.bindevent(table); + }, + recyclebin: function () { + // 初始化表格参数配置 + Table.api.init({ + extend: { + 'dragsort_url': '' + } + }); + + var table = $("#table"); + + // 初始化表格 + table.bootstrapTable({ + url: 'school/activity/order/order_log/recyclebin' + location.search, + pk: 'id', + sortName: 'id', + columns: [ + [ + {checkbox: true}, + {field: 'id', title: __('Id')}, + { + field: 'deletetime', + title: __('Deletetime'), + operate: 'RANGE', + addclass: 'datetimerange', + formatter: Table.api.formatter.datetime + }, + { + field: 'operate', + width: '130px', + title: __('Operate'), + table: table, + events: Table.api.events.operate, + buttons: [ + { + name: 'Restore', + text: __('Restore'), + classname: 'btn btn-xs btn-info btn-ajax btn-restoreit', + icon: 'fa fa-rotate-left', + url: 'school/activity/order/order_log/restore', + refresh: true + }, + { + name: 'Destroy', + text: __('Destroy'), + classname: 'btn btn-xs btn-danger btn-ajax btn-destroyit', + icon: 'fa fa-times', + url: 'school/activity/order/order_log/destroy', + refresh: true + } + ], + 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; +}); \ No newline at end of file diff --git a/public/assets/js/manystore/school/activity/order/settle_log.js b/public/assets/js/manystore/school/activity/order/settle_log.js new file mode 100644 index 0000000..d8d2d94 --- /dev/null +++ b/public/assets/js/manystore/school/activity/order/settle_log.js @@ -0,0 +1,135 @@ +define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) { + + var Controller = { + index: function () { + // 初始化表格参数配置 + Table.api.init({ + extend: { + index_url: 'school/activity/order/settle_log/index' + location.search, + add_url: 'school/activity/order/settle_log/add', + edit_url: 'school/activity/order/settle_log/edit', + del_url: 'school/activity/order/settle_log/del', + multi_url: 'school/activity/order/settle_log/multi', + import_url: 'school/activity/order/settle_log/import', + table: 'school_activity_settle_log', + } + }); + + var table = $("#table"); + + // 初始化表格 + table.bootstrapTable({ + url: $.fn.bootstrapTable.defaults.extend.index_url, + pk: 'id', + sortName: 'id', + columns: [ + [ + {checkbox: true}, + {field: 'id', title: __('Id')}, + {field: 'activity_order_id', title: __('Activity_order_id')}, + {field: 'withdrawal_log_id', title: __('Withdrawal_log_id')}, + {field: 'to_user_id', title: __('To_user_id')}, + {field: 'pay_user_id', title: __('Pay_user_id')}, + {field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"2":__('Status 2'),"3":__('Status 3'),"-1":__('Status -1')}, formatter: Table.api.formatter.status}, + {field: 'settletime', title: __('Settletime'), operate: 'LIKE'}, + {field: 'createtime', title: __('Createtime')}, + {field: 'canceltime', title: __('Canceltime')}, + {field: 'unfreezetime', title: __('Unfreezetime')}, + {field: 'order_price', title: __('Order_price'), operate:'BETWEEN'}, + {field: 'fee_price', title: __('Fee_price'), operate:'BETWEEN'}, + {field: 'fee_scale', title: __('Fee_scale'), operate:'BETWEEN'}, + {field: 'settle_price', title: __('Settle_price'), operate:'BETWEEN'}, + {field: 'sub_refundprice', title: __('Sub_refundprice'), operate:'BETWEEN'}, + {field: 'activity_id', title: __('Activity_id')}, + {field: 'activity_order_detail_id', title: __('Activity_order_detail_id')}, + {field: 'schoolactivityorder.order_no', title: __('Schoolactivityorder.order_no'), operate: 'LIKE'}, + {field: 'schoolactivityorder.pay_no', title: __('Schoolactivityorder.pay_no'), operate: 'LIKE'}, + {field: 'userwithdrawallog.id', title: __('Userwithdrawallog.id')}, + {field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'}, + {field: 'user.mobile', title: __('User.mobile'), operate: 'LIKE'}, + {field: 'user.avatar', title: __('User.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image}, + {field: 'schoolactivity.title', title: __('Schoolactivity.title'), operate: 'LIKE'}, + {field: 'schoolactivity.images', title: __('Schoolactivity.images'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images}, + {field: 'schoolactivityorderdetail.title', title: __('Schoolactivityorderdetail.title'), operate: 'LIKE'}, + {field: 'schoolactivityorderdetail.images', title: __('Schoolactivityorderdetail.images'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images}, + {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} + ] + ] + }); + + // 为表格绑定事件 + Table.api.bindevent(table); + }, + recyclebin: function () { + // 初始化表格参数配置 + Table.api.init({ + extend: { + 'dragsort_url': '' + } + }); + + var table = $("#table"); + + // 初始化表格 + table.bootstrapTable({ + url: 'school/activity/order/settle_log/recyclebin' + location.search, + pk: 'id', + sortName: 'id', + columns: [ + [ + {checkbox: true}, + {field: 'id', title: __('Id')}, + { + field: 'deletetime', + title: __('Deletetime'), + operate: 'RANGE', + addclass: 'datetimerange', + formatter: Table.api.formatter.datetime + }, + { + field: 'operate', + width: '130px', + title: __('Operate'), + table: table, + events: Table.api.events.operate, + buttons: [ + { + name: 'Restore', + text: __('Restore'), + classname: 'btn btn-xs btn-info btn-ajax btn-restoreit', + icon: 'fa fa-rotate-left', + url: 'school/activity/order/settle_log/restore', + refresh: true + }, + { + name: 'Destroy', + text: __('Destroy'), + classname: 'btn btn-xs btn-danger btn-ajax btn-destroyit', + icon: 'fa fa-times', + url: 'school/activity/order/settle_log/destroy', + refresh: true + } + ], + 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; +}); \ No newline at end of file diff --git a/public/assets/js/manystore/school/activity/refund.js b/public/assets/js/manystore/school/activity/refund.js new file mode 100644 index 0000000..2ea6bbc --- /dev/null +++ b/public/assets/js/manystore/school/activity/refund.js @@ -0,0 +1,116 @@ +define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) { + + var Controller = { + index: function () { + // 初始化表格参数配置 + Table.api.init({ + extend: { + index_url: 'school/activity/refund/index' + location.search, + add_url: 'school/activity/refund/add', + edit_url: 'school/activity/refund/edit', + del_url: 'school/activity/refund/del', + multi_url: 'school/activity/refund/multi', + import_url: 'school/activity/refund/import', + table: 'school_activity_refund', + } + }); + + var table = $("#table"); + + // 初始化表格 + table.bootstrapTable({ + url: $.fn.bootstrapTable.defaults.extend.index_url, + pk: 'id', + sortName: 'weigh', + columns: [ + [ + {checkbox: true}, + {field: 'id', title: __('Id')}, + {field: 'title', title: __('Title'), operate: 'LIKE'}, + {field: 'desc', title: __('Desc'), operate: 'LIKE'}, + {field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"3":__('Status 3'),"5":__('Status 5'),"7":__('Status 7'),"9":__('Status 9'),"11":__('Status 11')}, formatter: Table.api.formatter.status}, + {field: 'weigh', title: __('Weigh'), operate: false}, + {field: 'createtime', title: __('Createtime')}, + {field: 'updatetime', title: __('Updatetime')}, + // {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} + ] + ] + }); + + // 为表格绑定事件 + Table.api.bindevent(table); + }, + recyclebin: function () { + // 初始化表格参数配置 + Table.api.init({ + extend: { + 'dragsort_url': '' + } + }); + + var table = $("#table"); + + // 初始化表格 + table.bootstrapTable({ + url: 'school/activity/refund/recyclebin' + location.search, + pk: 'id', + sortName: 'id', + columns: [ + [ + {checkbox: true}, + {field: 'id', title: __('Id')}, + {field: 'title', title: __('Title'), align: 'left'}, + { + field: 'deletetime', + title: __('Deletetime'), + operate: 'RANGE', + addclass: 'datetimerange', + formatter: Table.api.formatter.datetime + }, + { + field: 'operate', + width: '130px', + title: __('Operate'), + table: table, + events: Table.api.events.operate, + buttons: [ + { + name: 'Restore', + text: __('Restore'), + classname: 'btn btn-xs btn-info btn-ajax btn-restoreit', + icon: 'fa fa-rotate-left', + url: 'school/activity/refund/restore', + refresh: true + }, + { + name: 'Destroy', + text: __('Destroy'), + classname: 'btn btn-xs btn-danger btn-ajax btn-destroyit', + icon: 'fa fa-times', + url: 'school/activity/refund/destroy', + refresh: true + } + ], + 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; +}); \ No newline at end of file diff --git a/public/assets/js/manystore/user/user.js b/public/assets/js/manystore/user/user.js index ea8d87b..1892f8a 100644 --- a/public/assets/js/manystore/user/user.js +++ b/public/assets/js/manystore/user/user.js @@ -68,39 +68,39 @@ define(['jquery', 'bootstrap', 'backend', 'csmtable', 'form'], function ($, unde // {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} {field: 'operate', title: __('Operate'), table: table , buttons: [ - { - name: 'classes_order', - text: __('课程购买记录'), - title: __('课程购买记录'), - classname: 'btn btn-xs btn-danger btn-magic btn-dialog', - icon: 'fa fa-cart-arrow-down', - url: classes_order_url, - callback: function (data) { - - }, - // visible: function (row) { - // return row.status == '2'||row.status == '3'; - // } - }, - - { - name: 'classes_hourorder', - text: __('课时预约记录'), - title: __('课时预约记录'), - classname: 'btn btn-xs btn-danger btn-magic btn-dialog', - icon: 'fa fa-calendar', - url: classes_hourorder_url, - callback: function (data) { - - }, - // visible: function (row) { - // return row.status == '2'||row.status == '3'; - // } - }, + // { + // name: 'classes_order', + // text: __('课程购买记录'), + // title: __('课程购买记录'), + // classname: 'btn btn-xs btn-danger btn-magic btn-dialog', + // icon: 'fa fa-cart-arrow-down', + // url: classes_order_url, + // callback: function (data) { + // + // }, + // // visible: function (row) { + // // return row.status == '2'||row.status == '3'; + // // } + // }, + // + // { + // name: 'classes_hourorder', + // text: __('课时预约记录'), + // title: __('课时预约记录'), + // classname: 'btn btn-xs btn-danger btn-magic btn-dialog', + // icon: 'fa fa-calendar', + // url: classes_hourorder_url, + // callback: function (data) { + // + // }, + // // visible: function (row) { + // // return row.status == '2'||row.status == '3'; + // // } + // }, { name: 'activity_order', - text: __('机构活动订单'), - title: __('机构活动订单'), + text: __('活动订单'), + title: __('活动订单'), classname: 'btn btn-dialog', icon: 'fa fa-cart-arrow-down', dropdown : '更多', @@ -112,21 +112,21 @@ define(['jquery', 'bootstrap', 'backend', 'csmtable', 'form'], function ($, unde // return row.status == '2'||row.status == '3'; // } }, - { - name: 'evaluate', - text: __('查看用户评价'), - title: __('查看用户评价'), - classname: 'btn btn-dialog', - icon: 'fa fa-handshake-o', - dropdown : '更多', - url: evaluate_url, - callback: function (data) { - - }, - // visible: function (row) { - // return row.classes_evaluate_id; - // } - }, + // { + // name: 'evaluate', + // text: __('查看用户评价'), + // title: __('查看用户评价'), + // classname: 'btn btn-dialog', + // icon: 'fa fa-handshake-o', + // dropdown : '更多', + // url: evaluate_url, + // callback: function (data) { + // + // }, + // // visible: function (row) { + // // return row.classes_evaluate_id; + // // } + // }, ], events: Table.api.events.operate, formatter: Table.api.formatter.operate}, @@ -165,7 +165,7 @@ define(['jquery', 'bootstrap', 'backend', 'csmtable', 'form'], function ($, unde return 'school/classes/evaluate/index?user_id='+row.id; } var activity_order_url = function (row,dom) { - return 'school/classes/activity/order/order/index?user_id='+row.shop_id; + return 'school/activity/order/order/index?user_id='+row.id; } return Controller; diff --git a/public/assets/js/manystore/user/withdrawal/userwithdrawal.js b/public/assets/js/manystore/user/withdrawal/userwithdrawal.js new file mode 100644 index 0000000..9e7c347 --- /dev/null +++ b/public/assets/js/manystore/user/withdrawal/userwithdrawal.js @@ -0,0 +1,120 @@ +define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) { + + var Controller = { + index: function () { + // 初始化表格参数配置 + Table.api.init({ + extend: { + index_url: 'user/withdrawal/userwithdrawal/index' + location.search, + add_url: 'user/withdrawal/userwithdrawal/add', + edit_url: 'user/withdrawal/userwithdrawal/edit', + del_url: 'user/withdrawal/userwithdrawal/del', + multi_url: 'user/withdrawal/userwithdrawal/multi', + import_url: 'user/withdrawal/userwithdrawal/import', + table: 'user_withdrawal', + } + }); + + var table = $("#table"); + + // 初始化表格 + table.bootstrapTable({ + url: $.fn.bootstrapTable.defaults.extend.index_url, + pk: 'id', + sortName: 'id', + columns: [ + [ + {checkbox: true}, + {field: 'id', title: __('Id')}, + {field: 'user_id', title: __('User_id')}, + {field: 'name', title: __('Name'), operate: 'LIKE'}, + {field: 'bank_name', title: __('Bank_name'), operate: 'LIKE'}, + {field: 'bank_user_name', title: __('Bank_user_name'), operate: 'LIKE'}, + {field: 'id_number', title: __('Id_number'), operate: 'LIKE'}, + {field: 'createtime', title: __('Createtime')}, + {field: 'updatetime', title: __('Updatetime')}, + {field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'}, + {field: 'user.mobile', title: __('User.mobile'), operate: 'LIKE'}, + {field: 'user.avatar', title: __('User.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image}, + {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} + ] + ] + }); + + // 为表格绑定事件 + Table.api.bindevent(table); + }, + recyclebin: function () { + // 初始化表格参数配置 + Table.api.init({ + extend: { + 'dragsort_url': '' + } + }); + + var table = $("#table"); + + // 初始化表格 + table.bootstrapTable({ + url: 'user/withdrawal/userwithdrawal/recyclebin' + location.search, + pk: 'id', + sortName: 'id', + columns: [ + [ + {checkbox: true}, + {field: 'id', title: __('Id')}, + {field: 'name', title: __('Name'), align: 'left'}, + { + field: 'deletetime', + title: __('Deletetime'), + operate: 'RANGE', + addclass: 'datetimerange', + formatter: Table.api.formatter.datetime + }, + { + field: 'operate', + width: '130px', + title: __('Operate'), + table: table, + events: Table.api.events.operate, + buttons: [ + { + name: 'Restore', + text: __('Restore'), + classname: 'btn btn-xs btn-info btn-ajax btn-restoreit', + icon: 'fa fa-rotate-left', + url: 'user/withdrawal/userwithdrawal/restore', + refresh: true + }, + { + name: 'Destroy', + text: __('Destroy'), + classname: 'btn btn-xs btn-danger btn-ajax btn-destroyit', + icon: 'fa fa-times', + url: 'user/withdrawal/userwithdrawal/destroy', + refresh: true + } + ], + 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; +}); \ No newline at end of file diff --git a/public/assets/js/manystore/user/withdrawal/userwithdrawal_log.js b/public/assets/js/manystore/user/withdrawal/userwithdrawal_log.js new file mode 100644 index 0000000..4912633 --- /dev/null +++ b/public/assets/js/manystore/user/withdrawal/userwithdrawal_log.js @@ -0,0 +1,71 @@ +define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) { + + var Controller = { + index: function () { + // 初始化表格参数配置 + Table.api.init({ + extend: { + index_url: 'user/withdrawal/userwithdrawal_log/index' + location.search, + add_url: 'user/withdrawal/userwithdrawal_log/add', + edit_url: 'user/withdrawal/userwithdrawal_log/edit', + del_url: 'user/withdrawal/userwithdrawal_log/del', + multi_url: 'user/withdrawal/userwithdrawal_log/multi', + import_url: 'user/withdrawal/userwithdrawal_log/import', + table: 'user_withdrawal_log', + } + }); + + var table = $("#table"); + + // 初始化表格 + table.bootstrapTable({ + url: $.fn.bootstrapTable.defaults.extend.index_url, + pk: 'id', + sortName: 'id', + columns: [ + [ + {checkbox: true}, + {field: 'id', title: __('Id')}, + {field: 'price', title: __('Price'), operate:'BETWEEN'}, + {field: 'fee_price', title: __('Fee_price'), operate:'BETWEEN'}, + {field: 'real_price', title: __('Real_price'), operate:'BETWEEN'}, + {field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"2":__('Status 2'),"3":__('Status 3')}, formatter: Table.api.formatter.status}, + {field: 'reason', title: __('Reason'), operate: 'LIKE'}, + {field: 'withdrawal_status', title: __('Withdrawal_status'), searchList: {"1":__('Withdrawal_status 1'),"2":__('Withdrawal_status 2'),"3":__('Withdrawal_status 3')}, formatter: Table.api.formatter.status}, + {field: 'user_id', title: __('User_id')}, + {field: 'type', title: __('Type'), searchList: {"bank":__('Type bank'),"wechat":__('Type wechat'),"alipay":__('Type alipay')}, formatter: Table.api.formatter.normal}, + {field: 'name', title: __('Name'), operate: 'LIKE'}, + {field: 'bank_name', title: __('Bank_name'), operate: 'LIKE'}, + {field: 'bank_user_name', title: __('Bank_user_name'), operate: 'LIKE'}, + {field: 'id_number', title: __('Id_number'), operate: 'LIKE'}, + {field: 'paytime', title: __('Paytime')}, + {field: 'createtime', title: __('Createtime')}, + {field: 'examinetime', title: __('Examinetime')}, + {field: 'remark', title: __('Remark'), operate: 'LIKE'}, + {field: 'real_have_price', title: __('Real_have_price'), operate:'BETWEEN'}, + {field: 'real_fee_price', title: __('Real_fee_price'), operate:'BETWEEN'}, + {field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'}, + {field: 'user.mobile', title: __('User.mobile'), operate: 'LIKE'}, + {field: 'user.avatar', title: __('User.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image}, + {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; +}); \ No newline at end of file