feat(@vben/web-antd): erp-stock-in 优化入库单产品清单组件
parent
1433a0980d
commit
9d80b9fc71
|
@ -169,19 +169,19 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
:actions="[
|
:actions="[
|
||||||
{
|
{
|
||||||
label: '详情',
|
label: '详情',
|
||||||
|
icon: ACTION_ICON.VIEW,
|
||||||
auth: ['erp:stock-in:query'],
|
auth: ['erp:stock-in:query'],
|
||||||
onClick: () => openForm('detail', row.id),
|
onClick: () => openForm('detail', row.id),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '编辑',
|
label: '编辑',
|
||||||
type: 'primary',
|
|
||||||
auth: ['erp:stock-in:update'],
|
auth: ['erp:stock-in:update'],
|
||||||
ifShow: row.status === 10,
|
icon: ACTION_ICON.EDIT,
|
||||||
|
disabled: row.status !== 10,
|
||||||
onClick: () => openForm('update', row.id),
|
onClick: () => openForm('update', row.id),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '审核',
|
label: '审核',
|
||||||
type: 'primary',
|
|
||||||
auth: ['erp:stock-in:update'],
|
auth: ['erp:stock-in:update'],
|
||||||
ifShow: row.status === 10,
|
ifShow: row.status === 10,
|
||||||
popConfirm: {
|
popConfirm: {
|
||||||
|
@ -203,7 +203,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
label: '删除',
|
label: '删除',
|
||||||
danger: true,
|
danger: true,
|
||||||
auth: ['erp:stock-in:delete'],
|
auth: ['erp:stock-in:delete'],
|
||||||
ifShow: row.status === 10,
|
disabled: row.status !== 10,
|
||||||
popConfirm: {
|
popConfirm: {
|
||||||
title: '确认要删除该入库单吗?',
|
title: '确认要删除该入库单吗?',
|
||||||
confirm: () => handleDelete([row.id]),
|
confirm: () => handleDelete([row.id]),
|
||||||
|
|
|
@ -246,41 +246,27 @@ defineExpose({
|
||||||
<template #warehouseId="{ row }">
|
<template #warehouseId="{ row }">
|
||||||
<Select
|
<Select
|
||||||
v-model:value="row.warehouseId"
|
v-model:value="row.warehouseId"
|
||||||
|
:options="warehouseOptions"
|
||||||
|
:field-names="{ label: 'name', value: 'id' }"
|
||||||
placeholder="请选择仓库"
|
placeholder="请选择仓库"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
show-search
|
show-search
|
||||||
:filter-option="false"
|
|
||||||
@change="(value) => handleWarehouseChange(value, row)"
|
@change="(value) => handleWarehouseChange(value, row)"
|
||||||
class="w-full"
|
class="w-full"
|
||||||
>
|
/>
|
||||||
<Select.Option
|
|
||||||
v-for="warehouse in warehouseOptions"
|
|
||||||
:key="warehouse.id"
|
|
||||||
:value="warehouse.id"
|
|
||||||
>
|
|
||||||
{{ warehouse.name }}
|
|
||||||
</Select.Option>
|
|
||||||
</Select>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #productId="{ row }">
|
<template #productId="{ row }">
|
||||||
<Select
|
<Select
|
||||||
v-model:value="row.productId"
|
v-model:value="row.productId"
|
||||||
|
:options="productOptions"
|
||||||
|
:field-names="{ label: 'name', value: 'id' }"
|
||||||
placeholder="请选择产品"
|
placeholder="请选择产品"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
show-search
|
show-search
|
||||||
:filter-option="false"
|
|
||||||
@change="(value) => handleProductChange(value, row)"
|
@change="(value) => handleProductChange(value, row)"
|
||||||
class="w-full"
|
class="w-full"
|
||||||
>
|
/>
|
||||||
<Select.Option
|
|
||||||
v-for="product in productOptions"
|
|
||||||
:key="product.id"
|
|
||||||
:value="product.id"
|
|
||||||
>
|
|
||||||
{{ product.name }}
|
|
||||||
</Select.Option>
|
|
||||||
</Select>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #count="{ row }">
|
<template #count="{ row }">
|
||||||
|
|
|
@ -198,39 +198,5 @@ defineExpose({ modalApi, handleUpdateStatus });
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</Form>
|
</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>
|
</Modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue