Commit 8bdf60a3 by qinjianhui

feat: 等待捕获

parent df3ce930
...@@ -193,15 +193,34 @@ export interface BatchManageData { ...@@ -193,15 +193,34 @@ export interface BatchManageData {
export interface RestockData { export interface RestockData {
id: number id: number
factoryId: number
warehouseId: number
warehouseName?: string warehouseName?: string
skuImage?: string locationId?: number
productName?: string locationCode?: string
styleNo?: string warehouseSku?: string
stockSku?: string customSku?: string
shortageQuantity?: number skuName?: string
availableQuantity?: number unit: string | null
stockQuantity?: number occupyInventory?: number
occupiedQuantity?: number freezeInventory?: number
inventory?: number
upperLimit?: number
floorLimit?: number
productNo?: string
customerName?: string
userMark?: string
createTime?: string
updateTime?: string
productItem?: string
usableInventory?: number
image?: string
price?: number
costPrice?: number | null
skuImage?: string | null
currencyCode?: string
currencyName?: string
sumOccupyInventory?: number
} }
export interface PickCompleteData { export interface PickCompleteData {
......
<template> <template>
<div class="waiting-restock"> <div class="waiting-restock">
<div class="restock-filter"> <div class="restock-filter">
<ElForm :inline="true" :model="filterForm" size="default" class="search-form"> <ElForm
:inline="true"
:model="filterForm"
size="default"
class="search-form"
>
<ElFormItem label="库存SKU"> <ElFormItem label="库存SKU">
<ElInput <ElInput
v-model="filterForm.stockSku" v-model="filterForm.stockSku"
...@@ -25,33 +30,15 @@ ...@@ -25,33 +30,15 @@
</ElForm> </ElForm>
</div> </div>
<div class="restock-table"> <div v-loading="loading" class="restock-table">
<TableView <TableView :paginated-data="data" :columns="columns" serial-numberable>
v-loading="loading"
:paginated-data="data"
:columns="columns"
serial-numberable
>
<template #skuImage="{ row }">
<el-image
v-if="row.skuImage"
:src="row.skuImage"
style="width: 50px; height: 50px"
fit="contain"
:preview-src-list="[row.skuImage]"
preview-teleported
/>
</template>
<template #shortageQuantity="{ row }">
<span style="color: #f56c6c; font-weight: bold">{{ row.shortageQuantity }}</span>
</template>
<template #availableQuantity="{ row }">
<span :style="{ color: (row.availableQuantity || 0) < 0 ? '#f56c6c' : '' }">
{{ row.availableQuantity }}
</span>
</template>
<template #operation="{ row }"> <template #operation="{ row }">
<ElButton type="primary" link size="small" @click="handleRestockCheck(row)"> <ElButton
type="primary"
link
size="small"
@click="handleRestockCheck(row)"
>
补货校验 补货校验
</ElButton> </ElButton>
</template> </template>
...@@ -65,19 +52,18 @@ ...@@ -65,19 +52,18 @@
background background
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
:total="total" :total="total"
style="margin: 10px auto 0;" style="margin: 10px auto 0"
@size-change="onPageSizeChange" @size-change="onPageSizeChange"
@current-change="onCurrentPageChange" @current-change="onCurrentPageChange"
/> />
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="tsx">
import { reactive } from 'vue' import { reactive } from 'vue'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import { getRestockListApi, restockCheckApi } from '@/api/factoryOrderNew' import { getRestockListApi, restockCheckApi } from '@/api/factoryOrderNew'
import type { RestockData } from '@/types/api/factoryOrderNew' import type { RestockData } from '@/types/api/factoryOrderNew'
import type { CustomColumn } from '@/types/table'
import TableView from '@/components/TableView.vue' import TableView from '@/components/TableView.vue'
import usePageList from '@/utils/hooks/usePageList' import usePageList from '@/utils/hooks/usePageList'
...@@ -110,58 +96,65 @@ const { ...@@ -110,58 +96,65 @@ const {
}, },
}) })
const columns: CustomColumn<RestockData>[] = [ const columns = [
{ {
key: 'warehouseName',
prop: 'warehouseName', prop: 'warehouseName',
label: '仓库名称', label: '仓库名称',
minWidth: 100, width: 160,
}, },
{ {
key: 'skuImage',
label: 'SKU图片', label: 'SKU图片',
width: 100, width: 100,
align: 'center', align: 'center',
slot: 'skuImage', render: (row: RestockData) => {
return (
<el-image
src={row.skuImage ?? ''}
style={{ width: '50px', height: '50px' }}
previewSrcList={[row.skuImage ?? '']}
previewTeleported
/>
)
},
}, },
{ {
key: 'productName',
prop: 'productName', prop: 'productName',
label: '商品名称', label: '商品名称',
minWidth: 120, minWidth: 140,
showOverflowTooltip: true, showOverflowTooltip: true,
}, },
{ key: 'styleNo', prop: 'styleNo', label: '款号', minWidth: 80 }, { prop: 'supplierProductNo', label: '款号', width: 130 },
{ key: 'stockSku', prop: 'stockSku', label: '库存SKU', minWidth: 120 },
{ {
key: 'shortageQuantity', key: 'thirdSkuCode',
prop: 'shortageQuantity', prop: 'thirdSkuCode',
label: '缺货数量', label: '库存SKU',
minWidth: 90, width: 160,
align: 'center', align: 'center',
slot: 'shortageQuantity',
}, },
{ {
key: 'availableQuantity', prop: 'stockOutNum',
prop: 'availableQuantity', label: '缺货数量',
width: 90,
align: 'right'
},
{
label: '可用数量', label: '可用数量',
minWidth: 90, prop: 'usableInventory',
align: 'center', width: 90,
slot: 'availableQuantity', align: 'right',
}, },
{ {
key: 'stockQuantity', key: 'stockQuantity',
prop: 'stockQuantity', prop: 'stockQuantity',
label: '库存数量', label: '库存数量',
minWidth: 90, width: 90,
align: 'center', align: 'right',
}, },
{ {
key: 'occupiedQuantity',
prop: 'occupiedQuantity', prop: 'occupiedQuantity',
label: '占用数量', label: '占用数量',
minWidth: 90, width: 90,
align: 'center', align: 'right',
}, },
{ {
key: 'operation', key: 'operation',
......
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