This commit is contained in:
MeSHard
2025-12-01 11:19:23 +08:00
parent adc5fd81aa
commit b22d09bd39
4440 changed files with 815952 additions and 0 deletions

View File

@@ -0,0 +1,73 @@
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'yq/electronic_waybill/waybill/index' + location.search,
add_url: 'yq/electronic_waybill/waybill/add',
edit_url: 'yq/electronic_waybill/waybill/edit',
del_url: 'yq/electronic_waybill/waybill/del',
multi_url: 'yq/electronic_waybill/waybill/multi',
import_url: 'yq/electronic_waybill/waybill/import',
table: 'waybill',
}
});
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: 'waybill_order', title: __('Waybill_order'), operate: 'LIKE'},
{field: 'w_mission', title: __('W_mission'), operate: 'LIKE'},
{field: 'waybill_name', title: __('Waybill_name'), operate: 'LIKE'},
{field: 'driver_tel', title: __('Driver_tel')},
{field: 'tow_license', title: __('Tow_license'), operate: 'LIKE'},
// {field: 'mount_license', title: __('Mount_license'), operate: 'LIKE'},
{field: 'cargocategory', title: __('Cargocategory'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'cargocount', title: __('Cargocount')},
{field: 'sale_product', title: __('Sale_product'), operate: 'LIKE'},
// {field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
// {field: 'is_del', title: __('Is_del'), searchList: {"1":__('正常'),"2":__('禁用')}, formatter: Table.api.formatter.status},
// {field: 'driverid', title: __('Driverid')},
{field: 'waybill_date', title: __('Waybill_date'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
// {field: 'waybill_loading', title: __('Waybill_loading'), operate: 'LIKE'},
// {field: 'waybill_unloading', title: __('Waybill_unloading'), operate: 'LIKE'},
// {field: 'carriers_code', title: __('Carriers_code'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
// {field: 'vehicle_type', title: __('Vehicle_type'), searchList: {"0":__('箱式 普货'),"1":__('罐车 危化品')}, formatter: Table.api.formatter.normal},
// {field: 'waybilltype', title: __('Waybilltype'), searchList: {"0":__('自建'),"1":__('路安保')}, formatter: Table.api.formatter.normal},
// {field: 'waybill_type', title: __('Waybill_type'), searchList: {"0":__('自建'),"1":__('接收')}, formatter: Table.api.formatter.normal},
// {field: 'check_status', title: __('Check_status'), searchList: {"0":__('未查验'),"1":__('通过'),"2":__('未通过')}, formatter: Table.api.formatter.flag},
{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;
});