diff --git a/application/admin/view/orders/dispatch/add.html b/application/admin/view/orders/dispatch/add.html index 75b37ee..1a87ae1 100644 --- a/application/admin/view/orders/dispatch/add.html +++ b/application/admin/view/orders/dispatch/add.html @@ -1,77 +1,109 @@ -
+
+
+ -
- -
- +
+ +
+ +
-
-
- -
- +
+ +
+ +
-
-
- -
- +
+ +
+ +
-
-
- -
- +
+ +
+ +
-
-
- -
- +
+ +
+ +
-
-
- -
- +
+ +
+ +
-
-
- -
- +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ + + + +
+
+
+
+
+
+
+
+ +
+
+ +
+ +
+

重置

+
+
+
+ +
+
+
+ +
+
- -
- -
- -
-
- -
- -
- -
-
- - - - +
\ No newline at end of file diff --git a/public/assets/js/backend/orders/dispatch.js b/public/assets/js/backend/orders/dispatch.js index b4cf059..0aa2486 100644 --- a/public/assets/js/backend/orders/dispatch.js +++ b/public/assets/js/backend/orders/dispatch.js @@ -164,6 +164,54 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','layer'], function ($, Table.api.bindevent(table); }, add: function () { + + // 初始化表格参数配置 + Table.api.init({ + extend: { + index_url: 'workers/worker/index' + location.search, + table: 'worker', + } + }); + + var table = $("#table"); + + // 初始化表格 + table.bootstrapTable({ + url: $.fn.bootstrapTable.defaults.extend.index_url, + pk: 'id', + sortName: 'id', + fixedColumns: true, + fixedRightNumber: 1, + columns: [ + [ + // {checkbox: true}, + // {field: 'id', title: __('Id')}, + {field: 'name', title: __('Name'), operate: 'LIKE'}, + {field: 'tel', title: __('Tel'), operate: 'LIKE'}, + // {field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"0":__('Status 0')}, formatter: Table.api.formatter.status}, + //{field: 'area_id', title: __('Area_id')}, + //{field: 'lng', title: __('Lng'), operate:'BETWEEN'}, + //{field: 'lat', title: __('Lat'), operate:'BETWEEN'}, + {field: 'area.short_merge_name', title: __('Area.short_merge_name'), operate: 'LIKE'}, + // {field: 'deposit_amount', title: __('Deposit_amount'), operate:'BETWEEN'}, + {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} + ] + ] + }); + $("#c-city-search").on("cp:updated", function() { + var citypicker = $(this).data("citypicker"); + var code = citypicker.getCode("district") || citypicker.getCode("city") || citypicker.getCode("province"); + table.bootstrapTable('refresh',{query: {area_code: code}}); + }); + $("#reset").on("click", function() { + $("#c-city").citypicker('reset'); + table.bootstrapTable('refresh'); + }); + + // 为表格绑定事件 + Table.api.bindevent(table); + Form.events.citypicker($("#select-form")); + Controller.api.bindevent(); }, edit: function () {