Commit 8bdf60a3 by qinjianhui

feat: 等待捕获

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