feat(@vben/web-antd): erp-stock-in 优化入库单产品清单组件

pull/188/head
nehc 2025-08-01 18:22:51 +08:00
parent 1433a0980d
commit 9d80b9fc71
3 changed files with 10 additions and 58 deletions

View File

@ -169,19 +169,19 @@ const [Grid, gridApi] = useVbenVxeGrid({
:actions="[
{
label: '详情',
icon: ACTION_ICON.VIEW,
auth: ['erp:stock-in:query'],
onClick: () => openForm('detail', row.id),
},
{
label: '编辑',
type: 'primary',
auth: ['erp:stock-in:update'],
ifShow: row.status === 10,
icon: ACTION_ICON.EDIT,
disabled: row.status !== 10,
onClick: () => openForm('update', row.id),
},
{
label: '审核',
type: 'primary',
auth: ['erp:stock-in:update'],
ifShow: row.status === 10,
popConfirm: {
@ -203,7 +203,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
label: '删除',
danger: true,
auth: ['erp:stock-in:delete'],
ifShow: row.status === 10,
disabled: row.status !== 10,
popConfirm: {
title: '确认要删除该入库单吗?',
confirm: () => handleDelete([row.id]),

View File

@ -246,41 +246,27 @@ defineExpose({
<template #warehouseId="{ row }">
<Select
v-model:value="row.warehouseId"
:options="warehouseOptions"
:field-names="{ label: 'name', value: 'id' }"
placeholder="请选择仓库"
:disabled="disabled"
show-search
:filter-option="false"
@change="(value) => handleWarehouseChange(value, row)"
class="w-full"
>
<Select.Option
v-for="warehouse in warehouseOptions"
:key="warehouse.id"
:value="warehouse.id"
>
{{ warehouse.name }}
</Select.Option>
</Select>
/>
</template>
<template #productId="{ row }">
<Select
v-model:value="row.productId"
:options="productOptions"
:field-names="{ label: 'name', value: 'id' }"
placeholder="请选择产品"
:disabled="disabled"
show-search
:filter-option="false"
@change="(value) => handleProductChange(value, row)"
class="w-full"
>
<Select.Option
v-for="product in productOptions"
:key="product.id"
:value="product.id"
>
{{ product.name }}
</Select.Option>
</Select>
/>
</template>
<template #count="{ row }">

View File

@ -198,39 +198,5 @@ defineExpose({ modalApi, handleUpdateStatus });
/>
</template>
</Form>
<!-- 审核操作按钮 -->
<template #footer>
<div class="flex w-full justify-between">
<div>
<template v-if="formType === 'detail' && formData">
<a-button
v-if="formData.status === 10"
type="primary"
@click="handleUpdateStatus(formData.id!, 20)"
>
审核
</a-button>
<a-button
v-if="formData.status === 20"
danger
@click="handleUpdateStatus(formData.id!, 10)"
>
反审核
</a-button>
</template>
</div>
<div>
<a-button
v-if="formType !== 'detail'"
type="primary"
@click="modalApi.confirm()"
>
确定
</a-button>
<a-button @click="modalApi.close()"></a-button>
</div>
</div>
</template>
</Modal>
</template>