Commit 046c2dd6 by wusiyi

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

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