Commit a8475b81 by wusiyi

feat: 工厂订单new新增全部tab下的状态筛选支持多选 #1006853

parent c81b28aa
......@@ -49,9 +49,9 @@
:inline="true"
label-width="70px"
>
<ElFormItem v-if="status === 'ALL'" label="状态">
<ElFormItem v-if="status === 'ALL'" label="订单状态">
<ElTreeSelect
v-model="searchForm.status"
v-model="searchFormStatusSelect"
:data="statusTreeChildren"
:props="{
value: 'status',
......@@ -60,6 +60,7 @@
}"
node-key="status"
placeholder="请选择"
multiple
clearable
filterable
check-strictly
......@@ -1122,6 +1123,19 @@ const statusTreeChildren = computed(() => {
item.status !== 'AWAITING_RESTOCK' && item.status !== 'BATCH_MANAGE',
)
})
const searchFormStatusSelect = computed({
get() {
const val = searchForm.value.status
if (!val) return []
return String(val).split(',').filter(Boolean)
},
set(val: string | string[] | undefined) {
const arr = Array.isArray(val) ? val : val ? [val] : []
searchForm.value.status = arr.length ? arr.join(',') : undefined
},
})
getFactoryOrderSearchVisibilityContext = () => ({
status: searchForm.value.status ?? status.value,
isCardLayout: isCardLayout.value,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment