|
|
|
@ -154,8 +154,9 @@ |
|
|
|
</FormItem> |
|
|
|
</Form> |
|
|
|
</div> |
|
|
|
<Row v-if="isOrderTab" v-show="openSearch" @keydown.enter.native="handleSearch"> |
|
|
|
<Form ref="searchForm" :model="activeSearchForm" inline :label-width="90"> |
|
|
|
<Row v-if="isOrderTab" v-show="openSearch"> |
|
|
|
<Form ref="searchForm" :model="activeSearchForm" inline :label-width="90" autocomplete="off" |
|
|
|
@submit.native.prevent="handleSearch"> |
|
|
|
<FormItem label="配送类型" v-if="tabName === 'delivery'"> |
|
|
|
<Select v-model="deliverySearchForm.deliveryType" clearable placeholder="全部类型" style="width: 160px" |
|
|
|
@on-change="handleSearch"> |
|
|
|
@ -165,11 +166,13 @@ |
|
|
|
</Select> |
|
|
|
</FormItem> |
|
|
|
<FormItem label="配送员名称" prop="workerName" v-if="tabName === 'delivery'"> |
|
|
|
<Input type="text" v-model="deliverySearchForm.workerName" clearable placeholder="请输入配送员名称" |
|
|
|
<AutoComplete v-model="deliverySearchForm.workerName" :data="searchHistory.workerName" |
|
|
|
:filter-method="filterSearchHistory" clearable placeholder="请输入配送员名称" |
|
|
|
style="width: 180px" /> |
|
|
|
</FormItem> |
|
|
|
<FormItem label="店铺名称" prop="shopName"> |
|
|
|
<Input type="text" v-model="activeSearchForm.shopName" clearable placeholder="请输入店铺名称" |
|
|
|
<AutoComplete v-model="activeSearchForm.shopName" :data="searchHistory.shopName" |
|
|
|
:filter-method="filterSearchHistory" clearable placeholder="请输入店铺名称" |
|
|
|
style="width: 180px" /> |
|
|
|
</FormItem> |
|
|
|
<FormItem label="取货区域"> |
|
|
|
@ -181,7 +184,7 @@ |
|
|
|
:root-id="currentRegionId" @on-change="handlePutAreaChange" @on-clear="handlePutAreaChange('')" /> |
|
|
|
</FormItem> |
|
|
|
<FormItem style="margin-left: -35px" class="br"> |
|
|
|
<Button @click="handleSearch" type="primary" icon="ios-search">搜索</Button> |
|
|
|
<Button html-type="submit" type="primary" icon="ios-search">搜索</Button> |
|
|
|
<Button @click="handleReset">重置</Button> |
|
|
|
<Button v-if="tabName === 'hall'" :type="hallSearchForm.order === 'deliveryFee' ? 'warning' : 'default'" |
|
|
|
@click="toggleCommissionSort">佣金优先</Button> |
|
|
|
@ -285,6 +288,7 @@ |
|
|
|
import addEdit from "./addEdit.vue"; |
|
|
|
import logisticsAddress from "@/views/app/business/logistics/logisticsAddress"; |
|
|
|
import shopAreaTreeChoose from "@/views/my-components/hiver/shopArea-tree-choose"; |
|
|
|
import { SEARCH_HISTORY_KEYS, getSearchHistory, saveSearchHistory } from "@/libs/searchHistory"; |
|
|
|
|
|
|
|
const HALL_TYPE_MAP = { |
|
|
|
waimai: 1, |
|
|
|
@ -314,6 +318,10 @@ |
|
|
|
Visiable: false, |
|
|
|
transferList: [], |
|
|
|
tableSize: "default", |
|
|
|
searchHistory: { |
|
|
|
shopName: getSearchHistory(SEARCH_HISTORY_KEYS.shopName), |
|
|
|
workerName: getSearchHistory(SEARCH_HISTORY_KEYS.workerName) |
|
|
|
}, |
|
|
|
showOrder: false, |
|
|
|
showType: "0", |
|
|
|
openSearch: true, |
|
|
|
@ -463,6 +471,20 @@ |
|
|
|
this.getBaseDeliveryFeeSetting(); |
|
|
|
this.getDeliverySwitch(); |
|
|
|
}, |
|
|
|
loadSearchHistory() { |
|
|
|
this.searchHistory.shopName = getSearchHistory(SEARCH_HISTORY_KEYS.shopName); |
|
|
|
this.searchHistory.workerName = getSearchHistory(SEARCH_HISTORY_KEYS.workerName); |
|
|
|
}, |
|
|
|
filterSearchHistory(value, option) { |
|
|
|
if (!value) return true; |
|
|
|
return String(option || "").toLowerCase().indexOf(String(value).toLowerCase()) > -1; |
|
|
|
}, |
|
|
|
saveCurrentSearchHistory() { |
|
|
|
this.searchHistory.shopName = saveSearchHistory(SEARCH_HISTORY_KEYS.shopName, this.activeSearchForm.shopName); |
|
|
|
if (this.tabName === "delivery") { |
|
|
|
this.searchHistory.workerName = saveSearchHistory(SEARCH_HISTORY_KEYS.workerName, this.deliverySearchForm.workerName); |
|
|
|
} |
|
|
|
}, |
|
|
|
refreshOnMenuClick() { |
|
|
|
if (this.isOrderTab) { |
|
|
|
this.getLogisticsInfo(); |
|
|
|
@ -731,6 +753,7 @@ |
|
|
|
this.handleSearch(); |
|
|
|
}, |
|
|
|
handleSearch() { |
|
|
|
this.saveCurrentSearchHistory(); |
|
|
|
this.activeSearchForm.pageNum = 1; |
|
|
|
this.getLogisticsInfo(); |
|
|
|
this.refreshOrderCounts(); |
|
|
|
@ -1601,6 +1624,7 @@ |
|
|
|
this.init(); |
|
|
|
}, |
|
|
|
activated() { |
|
|
|
this.loadSearchHistory(); |
|
|
|
this.startCountRefreshTimer(); |
|
|
|
if (this.hasActivatedOnce) { |
|
|
|
this.refreshOnMenuClick(); |
|
|
|
|