Commit 4ab92abd by zhuzhequan

Merge remote-tracking branch 'origin/dev' into dev

parents 649ee958 6a235918
...@@ -406,7 +406,12 @@ const renderItemBox = (bool: boolean) => { ...@@ -406,7 +406,12 @@ const renderItemBox = (bool: boolean) => {
} }
if (currentCode) { if (currentCode) {
const parts = currentCode.split('_') const parts = currentCode.split('_')
currentCode = parts.length > 0 ? parts[1] : parts[0] currentCode =
parts.length > 3 && parts[3].startsWith('USPSC')
? parts[3]
: parts.length > 1
? parts[1]
: parts[0]
for (const product of productList) { for (const product of productList) {
if (product.podJomallUsNo === currentCode) { if (product.podJomallUsNo === currentCode) {
coverImage.value = product.variantImage || '' coverImage.value = product.variantImage || ''
......
...@@ -264,7 +264,14 @@ ...@@ -264,7 +264,14 @@
</ElFormItem> </ElFormItem>
<ElFormItem> <ElFormItem>
<span v-if="status === 'PICKING'" class="item"> <span
v-if="
status === 'PICKING' ||
status === 'TO_BE_REPLENISHMENT' ||
status === 'IN_PRODUCTION'
"
class="item"
>
<ElButton <ElButton
:loading="tifDownloadLoading" :loading="tifDownloadLoading"
type="warning" type="warning"
...@@ -273,7 +280,14 @@ ...@@ -273,7 +280,14 @@
TIF排版 TIF排版
</ElButton> </ElButton>
</span> </span>
<span v-if="status === 'PICKING'" class="item"> <span
v-if="
status === 'PICKING' ||
status === 'TO_BE_REPLENISHMENT' ||
status === 'IN_PRODUCTION'
"
class="item"
>
<ElButton <ElButton
:loading="pngDownloadLoading" :loading="pngDownloadLoading"
type="warning" type="warning"
...@@ -462,7 +476,8 @@ ...@@ -462,7 +476,8 @@
status === 'PICKING' || status === 'PICKING' ||
status === 'STOCK_OUT' || status === 'STOCK_OUT' ||
status === 'EXCEPTION_ORDER' || status === 'EXCEPTION_ORDER' ||
status === 'TO_BE_REPLENISHMENT' status === 'TO_BE_REPLENISHMENT' ||
status === 'IN_PRODUCTION'
" "
class="item" class="item"
> >
...@@ -2032,6 +2047,7 @@ const searchVisible = ref(false) ...@@ -2032,6 +2047,7 @@ const searchVisible = ref(false)
const confirmSelectionData = ref<LogisticsData[]>([]) const confirmSelectionData = ref<LogisticsData[]>([])
const confirmRowData = ref<ProductList | null>(null) const confirmRowData = ref<ProductList | null>(null)
const status = ref('TO_BE_CONFIRMED') const status = ref('TO_BE_CONFIRMED')
const detailData = ref({}) const detailData = ref({})
const [searchForm, resetSearchForm] = useValue<SearchForm>({ const [searchForm, resetSearchForm] = useValue<SearchForm>({
timeType: 1, timeType: 1,
...@@ -2435,6 +2451,7 @@ const asyncOrderAddress = async () => { ...@@ -2435,6 +2451,7 @@ const asyncOrderAddress = async () => {
const changeTab = (item: Tab) => { const changeTab = (item: Tab) => {
status.value = item.status || '' status.value = item.status || ''
localStorage.setItem('podUsStatus', item.status as string)
selection.value = [] selection.value = []
cardSelection.value = [] cardSelection.value = []
stockOutSuccessIds.value = [] stockOutSuccessIds.value = []
...@@ -3852,7 +3869,23 @@ const showLogistics = (item: PodUsOrderListData) => { ...@@ -3852,7 +3869,23 @@ const showLogistics = (item: PodUsOrderListData) => {
logisticsVisible.value = true logisticsVisible.value = true
logisticsForm.value = JSON.parse(JSON.stringify(logistics)) logisticsForm.value = JSON.parse(JSON.stringify(logistics))
} }
watch(
() => status.value,
(val) => {
const currentUrl = new URL(window.location.href)
currentUrl.searchParams.set('tab', val)
window.history.pushState({}, '', currentUrl)
},
{ immediate: true },
)
onMounted(() => { onMounted(() => {
const podUsStatus = localStorage.getItem('podUsStatus')
if (podUsStatus) {
status.value = podUsStatus
}
loadTabData() loadTabData()
getUserMark() getUserMark()
loadProductionClient() loadProductionClient()
...@@ -4053,6 +4086,14 @@ function getPlatformImg(code: string) { ...@@ -4053,6 +4086,14 @@ function getPlatformImg(code: string) {
// 全局 loading 改为每行 loading map // 全局 loading 改为每行 loading map
const reComposingLoadingMap = reactive<{ [key: number]: boolean }>({}) const reComposingLoadingMap = reactive<{ [key: number]: boolean }>({})
window.addEventListener('beforeunload', () => {
localStorage.removeItem('podUsStatus')
// 执行全局清理操作
})
onBeforeUnmount(() => {
localStorage.removeItem('podUsStatus')
})
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.header-filter-form { .header-filter-form {
......
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