Commit 2e37c7e2 by qinjianhui

feat: 拣胚完成功能开发

parent 5ac50c9e
...@@ -4,6 +4,7 @@ import type { ...@@ -4,6 +4,7 @@ import type {
BatchManageData, BatchManageData,
FactoryOrderNewListData, FactoryOrderNewListData,
LogListData, LogListData,
operateOrderListData,
PickCompleteData, PickCompleteData,
PickFailData, PickFailData,
ProductListData, ProductListData,
...@@ -206,7 +207,6 @@ export function pickCompleteByIdsDataApi(ids: (number | string)[]) { ...@@ -206,7 +207,6 @@ export function pickCompleteByIdsDataApi(ids: (number | string)[]) {
>('factory/podOrderOperation/getPickingSituation', ids) >('factory/podOrderOperation/getPickingSituation', ids)
} }
export function pickCompleteApi(ids: (number | string)[]) { export function pickCompleteApi(ids: (number | string)[]) {
return axios.post<never, BaseRespData<void>>( return axios.post<never, BaseRespData<void>>(
'factory/podOrderOperation/pickingComplete', 'factory/podOrderOperation/pickingComplete',
...@@ -375,9 +375,6 @@ export function updateRemarkApi(id: number | string, remark: string) { ...@@ -375,9 +375,6 @@ export function updateRemarkApi(id: number | string, remark: string) {
) )
} }
export function applyForReplenishByIdApi(id: number | string) { export function applyForReplenishByIdApi(ids: (number | string)[], url: string) {
return axios.post<never, BaseRespData<unknown>>( return axios.post<never, BaseRespData<operateOrderListData[]>>(url, ids)
'factory/podOrder/applyForReplenish',
{ id },
)
} }
...@@ -93,9 +93,8 @@ export interface ProductListData { ...@@ -93,9 +93,8 @@ export interface ProductListData {
baseSku?: string baseSku?: string
variantSku?: string variantSku?: string
variantImage?: string variantImage?: string
// 后端字段名兼容(部分接口返回 snake_case)
variant_image?: string variant_image?: string
productMark?: 'custom_part' productMark?: string
diyId?: string diyId?: string
templateType?: number templateType?: number
customTemplateItemId?: number customTemplateItemId?: number
...@@ -219,7 +218,7 @@ export interface PickCompleteData { ...@@ -219,7 +218,7 @@ export interface PickCompleteData {
occupyInventory?: number occupyInventory?: number
pickingStatus?: string pickingStatus?: string
availableOrderIds?: number[] availableOrderIds?: number[]
allOrderIds?: number[] allOrderIds: number[]
} }
export interface PickFailData { export interface PickFailData {
......
<template>
<ElDialog
v-model="visible"
title="申请补胚"
width="900px"
:close-on-click-modal="false"
>
<div class="replenish-tip">请选择具体的操作单,申请补胚</div>
<div v-loading="loading" class="replenish-card-grid">
<div
v-for="item in cardList"
:key="item.id"
class="replenish-card-item"
@click="toggleSelect(item)"
>
<CommonCard
:card-item="item"
:active="isSelected(item)"
:show-sku="false"
:show-product-info="false"
:image-field="'variantImage'"
>
<template #bottom_left>
<span
v-if="item.factorySubOrderNumber"
class="operation-number"
:title="`操作单号:${item.factorySubOrderNumber}`"
>
{{ item.factorySubOrderNumber }}
</span>
</template>
<template #info>
<div class="card-info-grid">
<div class="card-info-row full">
<span
class="info-value ellipsis"
:title="(item.productName as string) || ''"
>
{{ item.productName }}
</span>
</div>
<div class="card-info-row">
<span class="info-label">工艺:</span>
<span class="info-value">{{ item.craftName }}</span>
</div>
<div class="card-info-row">
<span class="info-label">店铺单号:</span>
<span class="info-value">{{ item.shopNumber }}</span>
</div>
<div class="card-info-row">
<span class="info-label">客户号:</span>
<span class="info-value">{{ item.userMark }}</span>
</div>
<div class="card-info-row">
<span class="info-label">变体SKU</span>
<span class="info-value ellipsis" :title="(item.variantSku as string) || ''">
{{ item.variantSku }}
</span>
</div>
<div class="card-info-row">
<span class="info-label">库存SKU</span>
<span class="info-value ellipsis" :title="(item.thirdSkuCode as string) || ''">
{{ item.thirdSkuCode }}
</span>
</div>
<div class="card-info-row">
<span class="info-label">款号:</span>
<span class="info-value">{{ item.supplierProductNo }}</span>
</div>
<div v-if="item.batchArrangeNumber" class="card-info-row">
<span class="info-label">批次号:</span>
<span class="info-value">{{ item.batchArrangeNumber }}</span>
</div>
<div class="card-info-row">
<span class="info-label">状态:</span>
<span class="info-value">{{ item.statusName }}</span>
</div>
</div>
</template>
</CommonCard>
</div>
<div v-if="!loading && cardList.length === 0" class="replenish-empty">
暂无数据
</div>
</div>
<template #footer>
<div style="text-align: center">
<ElButton @click="visible = false">取消</ElButton>
<ElButton type="primary" :loading="submitting" @click="handleConfirm">
确定
</ElButton>
</div>
</template>
</ElDialog>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { ElMessage } from 'element-plus'
import CommonCard from '@/components/CommonCard.vue'
import { applyForReplenishByIdApi } from '@/api/factoryOrderNew'
interface CardItem {
id: number | string
[key: string]: unknown
}
const emit = defineEmits<{
success: []
}>()
const visible = ref(false)
const loading = ref(false)
const submitting = ref(false)
const cardList = ref<CardItem[]>([])
const selectedItems = ref<CardItem[]>([])
const productId = ref<number | string>()
const isSelected = (item: CardItem) =>
selectedItems.value.some((s) => s.id === item.id)
const toggleSelect = (item: CardItem) => {
const idx = selectedItems.value.findIndex((s) => s.id === item.id)
if (idx >= 0) {
selectedItems.value.splice(idx, 1)
} else {
selectedItems.value.push(item)
}
}
const open = async (id: number | string) => {
productId.value = id
selectedItems.value = []
cardList.value = []
visible.value = true
loading.value = true
try {
const res = await applyForReplenishByIdApi(id)
cardList.value = Array.isArray(res.data) ? res.data : []
} catch (e) {
console.error(e)
} finally {
loading.value = false
}
}
const handleConfirm = async () => {
if (!selectedItems.value.length) {
return ElMessage.warning('请选择操作单')
}
submitting.value = true
try {
await applyForReplenishByIdApi(productId.value!)
ElMessage.success('申请补胚成功')
visible.value = false
emit('success')
} catch (e) {
console.error(e)
} finally {
submitting.value = false
}
}
defineExpose({ open })
</script>
<style scoped lang="scss">
.replenish-tip {
font-size: 14px;
color: #606266;
margin-bottom: 12px;
}
.replenish-card-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 12px;
max-height: 500px;
overflow-y: auto;
min-height: 200px;
}
.replenish-card-item {
cursor: pointer;
}
.replenish-empty {
grid-column: 1 / -1;
display: flex;
align-items: center;
justify-content: center;
color: #909399;
font-size: 14px;
min-height: 200px;
}
.operation-number {
font-size: 12px;
color: #409eff;
}
.card-info-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 4px;
font-size: 12px;
margin-top: 6px;
.full {
grid-column: 1 / -1;
}
}
.card-info-row {
display: flex;
overflow: hidden;
}
.info-label {
flex-shrink: 0;
color: #909399;
}
.info-value {
flex: 1;
min-width: 0;
&.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
</style>
...@@ -364,7 +364,7 @@ defineExpose({ clearSelection, getSelectedIds, refresh }) ...@@ -364,7 +364,7 @@ defineExpose({ clearSelection, getSelectedIds, refresh })
.card-info-grid { .card-info-grid {
display: grid; display: grid;
grid-template-columns: repeat(2, 1fr); grid-template-columns: 1fr 150px;
gap: 4px; gap: 4px;
font-size: 12px; font-size: 12px;
margin-top: 6px; margin-top: 6px;
......
<template>
<ElDialog
v-model="visible"
:title="title"
width="1500px"
:close-on-click-modal="false"
>
<div class="operate-order-details-content">
<div v-if="!pickable" class="operate-order-tip">
请选择具体的操作单,申请补胚
</div>
<div v-else class="pick-data">
<div class="pick-data-item">
<span>商品名称: </span>
<span>{{ selectedRow?.productName }}</span>
</div>
<div class="pick-data-item">
<span>库存SKU: </span>
<span>{{ selectedRow?.thirdSkuCode }}</span>
</div>
<div class="pick-data-item">
<span>仓库: </span>
<span>{{ selectedRow?.warehouseName }}</span>
</div>
<div class="pick-data-item" style="color: red">
<span>当前拣胚数量: </span>
<span>{{ selectedItems.length }}</span>
</div>
<div class="pick-data-item">
<span>库存数量: </span>
<span>{{ selectedRow?.inventory }}</span>
</div>
<div class="pick-data-item">
<span>生产中数量: </span>
<span>{{ selectedRow?.producingQuantity }}</span>
</div>
</div>
<div v-loading="loading" class="operate-order-card-grid">
<div
v-for="item in cardList"
:key="item.id"
class="operate-order-card-item"
@click="toggleSelect(item)"
>
<CommonCard
:card-item="item"
:active="isSelected(item)"
:show-sku="false"
:show-product-info="false"
:image-field="'variantImage'"
>
<template #bottom_left>
<span
class="operation-number"
:title="`操作单号:${item.operationNo}`"
@click.stop="String(item.operationNo)"
>
{{ item.operationNo }}
</span>
</template>
<template #top_right>
<img
v-if="item.craftCode && ['ZPZY', 'CXZY', 'THZY'].includes(item.craftCode as string)"
:src="`/images/pic/${item.craftCode}.png`"
width="60"
height="60"
/>
</template>
<template #images>
<div class="flex-between">
<div class="images-position">
<div v-if="item.imageAry" class="images-container">
<div
v-for="(img, index) in JSON.parse(item.imageAry as string)"
:key="index"
:title="img.title"
class="item-image"
>
<el-image
:src="img?.url"
height="50"
:preview-src-list="JSON.parse(item.imageAry as string).map((i: { title: string; url: string }) => i.url)"
/>
</div>
</div>
</div>
<div class="flex-row flex-row-gap15">
<el-tooltip
class="item"
effect="dark"
:content="'用户编码: ' + item?.userMark"
placement="bottom"
>
<span
style="
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
display: inline-block;
"
@click.stop="copyText(String(item?.userMark || ''))"
>
{{ item?.userMark || 'AAAF' }}
</span>
</el-tooltip>
<img
v-if="item.platform"
:src="`/images/icon/${getPlatformImg(item.platform as string)}`"
style="width: 30px; height: 30px"
/>
</div>
</div>
</template>
<template #operations>
<div class="flex-row flex-row-gap6">
<div
v-if="item.customizedQuantity"
class="quantity-badge"
:class="
item.customizedQuantity === 1
? 'single-quantity-badge-color'
: 'multiple-quantity-badge-color'
"
:title="`类型:${
item.customizedQuantity === 1 ? '单面' : '双面'
}`"
>
{{ item.customizedQuantity === 1 ? '单' : '多' }}
</div>
<Icon name="caozuorizhi" style="width: 28px; height: 28px">
<template #title>
<title>操作日志</title>
</template>
</Icon>
<Icon name="chakanxiangqing">
<template #title>
<title>查看详情</title>
</template>
</Icon>
</div>
</template>
<template #info>
<div class="card-info-grid">
<div class="card-info-row full">
<span
class="info-value ellipsis"
:title="(item.productName as string) || ''"
>
{{ item.productName }}
</span>
</div>
<div class="card-info-row">
<span
class="info-value clickable ellipsis"
:title="`变体SKU:${(item.variantSku as string) || ''}`"
@click.stop="copyText((item.variantSku as string) || '')"
>
{{ item.variantSku }}
</span>
</div>
<div class="card-info-row">
<span class="info-label">工艺:</span>
<span class="info-value">{{ item.craftName }}</span>
</div>
<div class="card-info-row">
<span
class="info-value clickable ellipsis"
:title="`库存SKU:${(item.thirdSkuCode as string) || ''}`"
@click.stop="copyText((item.thirdSkuCode as string) || '')"
>
{{ item.thirdSkuCode }}
</span>
</div>
<div class="card-info-row">
<span class="info-label">店铺单号:</span>
<span
class="info-value clickable ellipsis"
:title="`店铺单号:${(item.shopNumber as string) || ''}`"
@click.stop="copyText((item.shopNumber as string) || '')"
>{{ item.shopNumber }}</span
>
</div>
<div class="card-info-row">
<span class="info-label">款号:</span>
<span
class="info-value clickable ellipsis"
:title="`款号:${(item.supplierProductNo as string) || ''}`"
@click.stop="
copyText((item.supplierProductNo as string) || '')
"
>{{ item.supplierProductNo }}</span
>
</div>
<div class="card-info-row">
<span class="info-label">客户单号:</span>
<span
class="info-value clickable ellipsis"
:title="`客户单号:${(item.thirdOrderNumber as string) || ''}`"
@click.stop="
copyText((item.thirdOrderNumber as string) || '')
"
>{{ item.thirdOrderNumber }}</span
>
</div>
<div class="card-info-row">
<span class="info-label">批次号:</span>
<span
class="info-value clickable ellipsis"
:title="`批次号:${(item.batchArrangeNumber as string) || ''}`"
@click.stop="
copyText((item.batchArrangeNumber as string) || '')
"
>{{ item.batchArrangeNumber }}</span
>
</div>
<div class="card-info-row" style="color: red">
<span class="info-label">状态:</span>
<span class="info-value">{{ item.statusName }}</span>
</div>
</div>
</template>
</CommonCard>
</div>
<div v-if="!loading && cardList.length === 0" class="replenish-empty">
暂无数据
</div>
</div>
</div>
<template #footer>
<div style="text-align: center">
<ElButton @click="visible = false">取消</ElButton>
<ElButton
v-if="pickable"
type="primary"
:loading="submitting"
@click="handleConfirm"
>
确定
</ElButton>
</div>
</template>
</ElDialog>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { ElMessage } from 'element-plus'
import CommonCard from '@/components/CommonCard.vue'
import { applyForReplenishByIdApi } from '@/api/factoryOrderNew'
import platformJson from '../../../../json/platform.json'
import type {
operateOrderListData,
PickCompleteData,
} from '@/types/api/factoryOrderNew'
const emit = defineEmits(['adjustPickOrderSuccess'])
defineProps<{
title: string
pickable?: boolean
}>()
const visible = ref(false)
const loading = ref(false)
const submitting = ref(false)
const cardList = ref<operateOrderListData[]>([])
const selectedItems = ref<operateOrderListData[]>([])
const selectedRow = ref<PickCompleteData | null>(null)
const isSelected = (item: operateOrderListData) => {
return selectedItems.value.some((s) => s.id === item.id)
}
const toggleSelect = (item: operateOrderListData) => {
const idx = selectedItems.value.findIndex((s) => s.id === item.id)
if (idx >= 0) {
selectedItems.value.splice(idx, 1)
} else {
selectedItems.value.push(item)
}
}
const copyText = (text: string) => {
navigator.clipboard.writeText(text)
ElMessage.success('复制成功')
}
const open = async ({
row,
ids,
url,
}: {
row: PickCompleteData
ids: (number | string)[]
url: string
}) => {
selectedItems.value = []
cardList.value = []
loading.value = true
try {
const res = await applyForReplenishByIdApi(ids, url)
if (res.code !== 200) return
cardList.value = Array.isArray(res.data) ? res.data : []
if (row.availableOrderIds?.length) {
selectedItems.value = cardList.value.filter((item) => {
return row.availableOrderIds?.includes(item.id)
})
}
visible.value = true
selectedRow.value = row
} catch (e) {
console.error(e)
} finally {
loading.value = false
}
}
const getPlatformImg = (code: string) => {
const lowerCode = code.toLowerCase()
const item = platformJson.find((el) =>
el.type.toLowerCase().includes(lowerCode),
)
if (item) {
return item.icon.split('/').pop()
}
return ''
}
const handleConfirm = async () => {
if (!selectedItems.value.length) {
return ElMessage.warning('请选择操作单')
}
if (
selectedItems.value.length >
(selectedRow.value?.availableOrderIds?.length ?? 0)
) {
return ElMessageBox.confirm(
`<div>
<span>当前库存数量: ${selectedRow.value?.inventory}</span>
<span style="margin: 0 4px">生产中数量: ${selectedRow.value?.producingQuantity}</span>
<span>最多只能拣胚 ${selectedRow.value?.allOrderIds?.length} </span>
<div>请重新选择!</div>
</div>`,
'提示',
{
type: 'warning',
dangerouslyUseHTMLString: true,
confirmButtonText: '确定',
},
)
}
emit('adjustPickOrderSuccess',selectedItems.value.map((item) => item.id))
visible.value = false
}
defineExpose({ open })
</script>
<style scoped lang="scss">
.operate-order-details-content {
height: 600px;
}
.operate-order-tip {
font-size: 14px;
color: #606266;
margin-bottom: 12px;
}
.operate-order-card-grid {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 12px;
max-height: 500px;
overflow-y: auto;
min-height: 200px;
}
.operate-order-card-item {
cursor: pointer;
}
.operate-order-empty {
grid-column: 1 / -1;
display: flex;
align-items: center;
justify-content: center;
color: #909399;
font-size: 14px;
min-height: 200px;
}
.operation-number {
font-size: 12px;
}
.card-info-grid {
display: grid;
grid-template-columns: 1fr 80px;
gap: 4px;
font-size: 12px;
margin-top: 6px;
.full {
grid-column: 1 / -1;
}
}
.card-info-row {
display: flex;
overflow: hidden;
}
.info-label {
flex-shrink: 0;
color: #909399;
}
.info-value {
flex: 1;
min-width: 0;
&.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
&.clickable {
cursor: pointer;
color: #409eff;
&:hover {
text-decoration: underline;
}
}
}
.flex-row {
display: flex;
align-items: center;
justify-content: center;
gap: 15px;
}
.flex-row-gap15 {
gap: 15px;
}
.flex-row-gap6 {
gap: 6px;
}
.quantity-badge {
background-color: #f56c6c;
color: #fff;
padding: 5px 8px;
border-radius: 4px;
font-size: 12px;
}
.multiple-quantity-badge-color {
background-color: #e6a23c;
}
.pick-data {
display: flex;
align-items: center;
gap: 20px;
margin-bottom: 10px;
}
</style>
...@@ -49,7 +49,12 @@ ...@@ -49,7 +49,12 @@
✕ 无法拣胚 ✕ 无法拣胚
</span> </span>
<span v-else-if="row.pickingStatus === 'partial'" class="item"> <span v-else-if="row.pickingStatus === 'partial'" class="item">
<ElButton type="warning" size="small">调整拣胚顺序</ElButton> <ElButton
type="warning"
size="small"
@click="handleAdjustPickOrder(row)"
>调整拣胚顺序</ElButton
>
</span> </span>
<span <span
v-else-if="row.pickingStatus === 'success'" v-else-if="row.pickingStatus === 'success'"
...@@ -73,6 +78,12 @@ ...@@ -73,6 +78,12 @@
</div> </div>
</template> </template>
</ElDialog> </ElDialog>
<OperateDetailsDialog
ref="operateDetailsDialogRef"
title="调整拣胚顺序"
:pickable="true"
@adjust-pick-order-success="open"
/>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
...@@ -85,6 +96,7 @@ import { ...@@ -85,6 +96,7 @@ import {
import type { PickCompleteData } from '@/types/api/factoryOrderNew' import type { PickCompleteData } from '@/types/api/factoryOrderNew'
import TableView from '@/components/TableView.vue' import TableView from '@/components/TableView.vue'
import Icon from '@/components/Icon.vue' import Icon from '@/components/Icon.vue'
import OperateDetailsDialog from './OperateDetailsDialog.vue'
interface PickData { interface PickData {
overallMessage?: string overallMessage?: string
pickingSituationList?: PickCompleteData[] pickingSituationList?: PickCompleteData[]
...@@ -201,10 +213,17 @@ const handleClose = () => { ...@@ -201,10 +213,17 @@ const handleClose = () => {
const handleCreateInbound = () => { const handleCreateInbound = () => {
ElMessage.info('创建入库单功能待实现') ElMessage.info('创建入库单功能待实现')
} }
const operateDetailsDialogRef = ref()
const handleSelectionChange = (selection: PickCompleteData[]) => { const handleSelectionChange = (selection: PickCompleteData[]) => {
selections.value = selection selections.value = selection
} }
const handleAdjustPickOrder = async (row: PickCompleteData) => {
operateDetailsDialogRef.value?.open({
row,
ids: row.allOrderIds as (number | string)[],
url: 'factory/podOrderOperation/listByIds',
})
}
const handleSubmit = async () => { const handleSubmit = async () => {
const loading = ElLoading.service({ const loading = ElLoading.service({
......
...@@ -823,8 +823,9 @@ ...@@ -823,8 +823,9 @@
@success="() => refreshCurrentView({ isRefreshTree: true })" @success="() => refreshCurrentView({ isRefreshTree: true })"
/> />
<ApplyReplenishDialog <OperateDetailsDialog
ref="applyReplenishDialogRef" ref="operateDetailsDialogRef"
title="申请补胚"
@success="() => refreshCurrentView({ isRefreshTree: true })" @success="() => refreshCurrentView({ isRefreshTree: true })"
/> />
...@@ -920,7 +921,7 @@ import CardLayout from './component/CardLayout.vue' ...@@ -920,7 +921,7 @@ import CardLayout from './component/CardLayout.vue'
import BatchManageTable from './component/BatchManageTable.vue' import BatchManageTable from './component/BatchManageTable.vue'
import WaitingRestockTable from './component/WaitingRestockTable.vue' import WaitingRestockTable from './component/WaitingRestockTable.vue'
import ArrangeDialog from './component/ArrangeDialog.vue' import ArrangeDialog from './component/ArrangeDialog.vue'
import ApplyReplenishDialog from './component/ApplyReplenishDialog.vue' import OperateDetailsDialog from './component/OperateDetailsDialog.vue'
import CreateLogisticDialog from '@/views/order/podCN/components/CreateLogisticDialog.vue' import CreateLogisticDialog from '@/views/order/podCN/components/CreateLogisticDialog.vue'
import UpdateCustomDeclarationInfoDialog from '@/views/order/podCN/components/UpdateCustomDeclarationInfoDialog.vue' import UpdateCustomDeclarationInfoDialog from '@/views/order/podCN/components/UpdateCustomDeclarationInfoDialog.vue'
...@@ -1485,11 +1486,11 @@ const cancelOrderDialogRef = ref<InstanceType<typeof CancelOrderDialog>>() ...@@ -1485,11 +1486,11 @@ const cancelOrderDialogRef = ref<InstanceType<typeof CancelOrderDialog>>()
const suspendDialogRef = ref<InstanceType<typeof SuspendDialog>>() const suspendDialogRef = ref<InstanceType<typeof SuspendDialog>>()
const pickCompleteDialogRef = ref<InstanceType<typeof PickCompleteDialog>>() const pickCompleteDialogRef = ref<InstanceType<typeof PickCompleteDialog>>()
const pickFailDialogRef = ref<InstanceType<typeof PickFailDialog>>() const pickFailDialogRef = ref<InstanceType<typeof PickFailDialog>>()
const operateDetailsDialogRef = ref()
const cardLayoutRef = ref<InstanceType<typeof CardLayout>>() const cardLayoutRef = ref<InstanceType<typeof CardLayout>>()
const batchManageRef = ref<InstanceType<typeof BatchManageTable>>() const batchManageRef = ref<InstanceType<typeof BatchManageTable>>()
const waitingRestockRef = ref<InstanceType<typeof WaitingRestockTable>>() const waitingRestockRef = ref<InstanceType<typeof WaitingRestockTable>>()
const arrangeDialogRef = ref<InstanceType<typeof ArrangeDialog>>() const arrangeDialogRef = ref<InstanceType<typeof ArrangeDialog>>()
const applyReplenishDialogRef = ref<InstanceType<typeof ApplyReplenishDialog>>()
const createLogisticDialogRef = ref() const createLogisticDialogRef = ref()
const updateCustomsDialogVisible = ref(false) const updateCustomsDialogVisible = ref(false)
const weightDialogRef = ref() const weightDialogRef = ref()
...@@ -1596,7 +1597,7 @@ const getOrderDetailsById = async (tabName?: 'product' | 'log') => { ...@@ -1596,7 +1597,7 @@ const getOrderDetailsById = async (tabName?: 'product' | 'log') => {
} }
} catch (e) { } catch (e) {
console.error(e) console.error(e)
} finally{ } finally {
subLoading.value = false subLoading.value = false
} }
} }
...@@ -1647,7 +1648,7 @@ const handleEditRemark = async (row: ProductListData) => { ...@@ -1647,7 +1648,7 @@ const handleEditRemark = async (row: ProductListData) => {
} }
const handleSubApplyReplenish = (row: ProductListData) => { const handleSubApplyReplenish = (row: ProductListData) => {
applyReplenishDialogRef.value?.open(row.id) operateDetailsDialogRef.value?.open({ ids: [row.id], url: '' })
} }
const handleConfirmOrder = () => { const handleConfirmOrder = () => {
...@@ -1934,15 +1935,16 @@ const downloadPDF = (url: string) => { ...@@ -1934,15 +1935,16 @@ const downloadPDF = (url: string) => {
} }
const handleDownloadMaterial = async () => { const handleDownloadMaterial = async () => {
if (!ensureSelection()) return if (!ensureSelection()) return
const usePodOrderDownloadStatuses = [ const usePodOrderDownloadStatuses = ['PENDING_DELIVERY', 'SUSPEND']
'PENDING_DELIVERY',
'SUSPEND',
]
const usePodOrderDownload = usePodOrderDownloadStatuses.includes(status.value) const usePodOrderDownload = usePodOrderDownloadStatuses.includes(status.value)
const ids = usePodOrderDownload const ids = usePodOrderDownload
? selectedRows.value.map((row) => row.id) ? selectedRows.value.map((row) => row.id)
: cardSelectList.value.map((row) => row.podOrderProductId) : cardSelectList.value.map((row) => row.podOrderProductId)
console.log(usePodOrderDownload,ids,cardSelectList.value.map((row) => row.podOrderProductId)) console.log(
usePodOrderDownload,
ids,
cardSelectList.value.map((row) => row.podOrderProductId),
)
const loading = ElLoading.service({ const loading = ElLoading.service({
fullscreen: true, fullscreen: true,
text: '操作中...', text: '操作中...',
...@@ -2193,7 +2195,10 @@ const getPendingReceiveCounts = async () => { ...@@ -2193,7 +2195,10 @@ const getPendingReceiveCounts = async () => {
getListPageAcceptedSubStatus(), getListPageAcceptedSubStatus(),
) )
if (res.code !== 200) return if (res.code !== 200) return
pendingAcceptCounts.value = res.data || { pendingCount: 0, acceptedOutOfStockCount: 0 } pendingAcceptCounts.value = res.data || {
pendingCount: 0,
acceptedOutOfStockCount: 0,
}
} catch (e) { } catch (e) {
console.error(e) console.error(e)
} }
......
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