This commit is contained in:
xman 2025-05-31 15:33:22 +08:00
parent e548cf86a4
commit 62dbe6a876
2 changed files with 23 additions and 13 deletions

View File

@ -1,12 +1,14 @@
<div class="panel panel-default panel-intro">
<div class="panel-heading">
{:build_heading(null,FALSE)}
<ul class="nav nav-tabs" data-field="status">
<li class="{:$Think.get.status === null ? 'active' : ''}"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>
{foreach name="statusList" item="vo"}
<li class="{:$Think.get.status === (string)$key ? 'active' : ''}"><a href="#t-{$key}" data-value="{$key}" data-toggle="tab">{$vo}</a></li>
{/foreach}
{:build_heading(null, FALSE)}
<ul class="nav nav-tabs" data-field="type">
<li class="{:$Think.get.type === null || $Think.get.type == '1' ? 'active' : ''}">
<a href="#t-1" data-value="1" data-toggle="tab">手动派单</a>
</li>
<li class="{:$Think.get.type == '2' ? 'active' : ''}">
<a href="#t-2" data-value="2" data-toggle="tab">自动派单</a>
</li>
</ul>
</div>

View File

@ -63,13 +63,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','layer'], function ($,
{field: 'record_count', title: '跟进次数',operate: false},
//{field: 'order_id', title: __('Order_id')},
{field: 'status', title: __('Status'), searchList: {"0":__('Status 0'),"10":__('Status 10'),"20":__('Status 20'),"25":__('Status 25'),"30":__('Status 30'),"60":__('Status 60'),"-10":__('Status -10'),
//"-20":__('Status -20'),
"-30":__('Status -30')},
@ -81,7 +76,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','layer'], function ($,
// {field: 'worker_id', title: __('Worker_id')},
{field: 'worker_name', title: __('Worker_name'), operate: 'LIKE'},
{field: 'worker_tel', title: __('Worker_tel'), operate: 'LIKE'},
{field: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"2":__('自动')}, formatter: Table.api.formatter.normal},
{field: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"2":__('自动')}, formatter: Table.api.formatter.normal,
defaultValue: '1'
},
@ -365,6 +362,17 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','layer'], function ($,
});
// 默认设置 type=1并触发表格筛选
if (typeof Fast.api.query !== 'undefined' && !Fast.api.query('type')) {
// 修改 URL 参数为 type=1
Fast.api.replace('type', '1');
// 主动触发 tab 点击事件,自动选中“手动派单”并刷新数据
setTimeout(function () {
$('.nav-tabs[data-field="type"] a[data-value="1"]').trigger('click');
}, 10);
}
},
add: function () {
Controller.api.bindevent();