Commit 4ab92abd by zhuzhequan

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

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