|
@@ -52,7 +52,11 @@
|
|
|
:table-columns="waybillTableColumns"
|
|
|
@checked-submit="columnChecked"
|
|
|
/>
|
|
|
- <!-- <Search @search="search" @clear="clear" /> -->
|
|
|
+ <Search
|
|
|
+ placeholder="请输入运单号进行搜索"
|
|
|
+ @search="search"
|
|
|
+ @empty="clear"
|
|
|
+ />
|
|
|
</div>
|
|
|
<div class="waybill-list">
|
|
|
<SimpleTable
|
|
@@ -62,6 +66,7 @@
|
|
|
:row-class-name="flightWaybillRowClass"
|
|
|
:cell-class-name="flightWaybillCellClass"
|
|
|
:column-props="{ formatter: tableFormatter }"
|
|
|
+ :filter-sort-options="filterSortOptions"
|
|
|
sequence
|
|
|
@cell-click="flightWaybillCellClickHandler"
|
|
|
/>
|
|
@@ -76,7 +81,7 @@
|
|
|
</template>
|
|
|
<script setup lang="ts">
|
|
|
import OverflowTooltip from '@/components/OverflowTooltip/index.vue'
|
|
|
-// import Search from '@/components/search/index.vue'
|
|
|
+import Search from '@/components/search/index.vue'
|
|
|
import { CaretRight } from '@element-plus/icons-vue'
|
|
|
import ContainerWaybillDialog from './ContainerWaybillDialog.vue'
|
|
|
import SimpleTable from '@/components/SimpleTable/index.vue'
|
|
@@ -221,12 +226,22 @@ const exportHandler = () => {
|
|
|
exportToExcel({ table })
|
|
|
}
|
|
|
|
|
|
-//清空搜索
|
|
|
-const clear = () => {}
|
|
|
-
|
|
|
-//点击搜索按钮
|
|
|
+const fuzzyFilterValueMap = ref<{ [x: string]: string }>({})
|
|
|
+const filterSortOptions = {
|
|
|
+ fuzzyFilterValueMap,
|
|
|
+}
|
|
|
+// 搜索
|
|
|
const search = (text: string) => {
|
|
|
- console.log(text)
|
|
|
+ const value = text?.trim()
|
|
|
+ if (value) {
|
|
|
+ fuzzyFilterValueMap.value = {
|
|
|
+ stockCode: value,
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+// 清空搜索
|
|
|
+const clear = () => {
|
|
|
+ fuzzyFilterValueMap.value = {}
|
|
|
}
|
|
|
|
|
|
const {
|