Commit 046c2dd6 by wusiyi

feat: 待拣胚、待补胚 添加子tab页 #1011713

parent e193f6ab
......@@ -57,6 +57,8 @@ export interface SearchForm {
/** list_page 排序方向:asc 正序,desc 倒序 */
order?: 'asc' | 'desc'
customerNo?: string // 客户交运单号
/** 待拣胚/待补胚子 tab:0-正常,1-缺货 */
outOfStock?: number
}
export interface FactoryOrderNewListData {
......
......@@ -70,6 +70,8 @@ export function useOrderStatusTree(options: UseOrderStatusTreeOptions) {
{ label: '其他', key: 'otherReasonCount', value: 3, count: 0 },
])
const cancelledSubTab = ref(1)
/** 待拣胚/待补胚:0-正常,1-缺货(等待补货) */
const outOfStockSubTab = ref<0 | 1>(0)
const treeRef = ref()
const isCardLayout = computed(() => cardLayoutStatuses.includes(status.value))
......@@ -210,6 +212,7 @@ export function useOrderStatusTree(options: UseOrderStatusTreeOptions) {
suspendedSubTab,
cancelledTabs,
cancelledSubTab,
outOfStockSubTab,
treeRef,
isCardLayout,
isSpecialLayout,
......
......@@ -788,6 +788,28 @@
</div>
</div> -->
<div
v-if="status === 'PENDING_PICK' || status === 'PENDING_REPLENISH'"
class="status-subtabs"
>
<div
class="status-subtab"
:class="{ active: outOfStockSubTab === 0 }"
@click="handleOutOfStockTabClick(0)"
>
{{ status === 'PENDING_PICK' ? '待拣胚' : '待补胚' }}
</div>
<div
class="status-subtab"
:class="{ active: outOfStockSubTab === 1 }"
@click="handleOutOfStockTabClick(1)"
>
{{
status === 'PENDING_PICK' ? '待拣胚-等待补货' : '待补胚-等待补货'
}}
</div>
</div>
<div v-if="status === 'PENDING_RECEIVE'" class="status-subtabs">
<div
class="status-subtab"
......@@ -1446,6 +1468,7 @@ const {
suspendedSubTab,
// cancelledTabs,
cancelledSubTab,
outOfStockSubTab,
treeRef,
isCardLayout,
isSpecialLayout,
......@@ -1519,6 +1542,9 @@ const getListQueryPayload = () => {
} else {
delete payload.status
}
if (status.value === 'PENDING_PICK' || status.value === 'PENDING_REPLENISH') {
payload.outOfStock = outOfStockSubTab.value
}
// 添加默认时间排序参数
const defaultSort = getDefaultCreateTimeSortParams(status.value)
if (defaultSort) {
......@@ -1752,6 +1778,9 @@ const handleStatusNodeClick = (node: { status: string }) => {
if (node.status !== 'CANCELLED') {
cancelledSubTab.value = 1
}
if (node.status !== 'PENDING_PICK' && node.status !== 'PENDING_REPLENISH') {
outOfStockSubTab.value = 0
}
if (node.status === 'PICKING') {
getOrderStatus()
}
......@@ -1778,6 +1807,12 @@ const handlePendingAcceptTabClick = (
tab: 'PENDING_RECEIVE' | 'ACCEPT_FAIL_OUT_OF_STOCK',
) => handlePendingAcceptTabClickRaw(tab, refreshTableList)
const handleOutOfStockTabClick = (tab: 0 | 1) => {
if (outOfStockSubTab.value === tab) return
outOfStockSubTab.value = tab
refreshCurrentView()
}
const handleSuspendTabClick = (value: number) => {
if (suspendedSubTab.value === value) return
suspendedSubTab.value = 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