feat: 原材料盘点编辑和删除功能完善
This commit is contained in:
parent
9764ead573
commit
210e0d7dd5
|
@ -26,14 +26,12 @@
|
||||||
import { useTable } from '@/components/core/dynamic-table';
|
import { useTable } from '@/components/core/dynamic-table';
|
||||||
import { baseColumns, type TableColumnItem, type TableListItem } from './columns';
|
import { baseColumns, type TableColumnItem, type TableListItem } from './columns';
|
||||||
import Api from '@/api/';
|
import Api from '@/api/';
|
||||||
import { useDictStore } from '@/store/modules/dict';
|
import { onMounted, ref, unref } from 'vue';
|
||||||
import { onMounted, ref, type FunctionalComponent, unref } from 'vue';
|
import { useFormModal } from '@/hooks/useModal';
|
||||||
import { DictEnum } from '@/enums/dictEnum';
|
|
||||||
import { useFormModal, useModal } from '@/hooks/useModal';
|
|
||||||
import { Button } from 'ant-design-vue';
|
|
||||||
import { exportSchemas } from './exportSchema';
|
import { exportSchemas } from './exportSchema';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import fileDownload from 'js-file-download';
|
import fileDownload from 'js-file-download';
|
||||||
|
import { message } from 'ant-design-vue';
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'MaterialsInventory',
|
name: 'MaterialsInventory',
|
||||||
|
@ -57,22 +55,22 @@
|
||||||
icon: 'ant-design:edit-outlined',
|
icon: 'ant-design:edit-outlined',
|
||||||
tooltip: '编辑',
|
tooltip: '编辑',
|
||||||
auth: {
|
auth: {
|
||||||
perm: 'app:contract:update',
|
perm: 'app:materials_inventory:update',
|
||||||
effect: 'disable',
|
effect: 'disable',
|
||||||
},
|
},
|
||||||
onClick: () => openEditModal(record),
|
onClick: () => openEditModal(record),
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
icon: 'ant-design:delete-outlined',
|
// icon: 'ant-design:delete-outlined',
|
||||||
color: 'red',
|
// color: 'red',
|
||||||
tooltip: '删除此记录',
|
// tooltip: '删除此记录',
|
||||||
auth: 'app:contract:delete',
|
// auth: 'app:materials_inventory:delete',
|
||||||
popConfirm: {
|
// popConfirm: {
|
||||||
title: '你确定要删除吗?',
|
// title: '你确定要删除吗?',
|
||||||
placement: 'left',
|
// placement: 'left',
|
||||||
onConfirm: () => delRowConfirm(record.id),
|
// onConfirm: () => delRowConfirm(record.id),
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
@ -111,6 +109,12 @@
|
||||||
* @description 打开新增/编辑弹窗
|
* @description 打开新增/编辑弹窗
|
||||||
*/
|
*/
|
||||||
const openEditModal = async (record: Partial<TableListItem>) => {
|
const openEditModal = async (record: Partial<TableListItem>) => {
|
||||||
|
message.warning(
|
||||||
|
<div>
|
||||||
|
暂不支持编辑功能,等待后期需求确认
|
||||||
|
<div>库存数量是由出入库记录自动计算得出的,库存单价为入库的单价</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
// const [formRef] = await showModal({
|
// const [formRef] = await showModal({
|
||||||
// modalProps: {
|
// modalProps: {
|
||||||
// title: `${record.id ? '编辑' : '新增'}盘点记录`,
|
// title: `${record.id ? '编辑' : '新增'}盘点记录`,
|
||||||
|
|
Loading…
Reference in New Issue