no message

main
HUOJIN\92525 2025-03-14 20:29:09 +08:00
parent 225dc1e51f
commit c0667d5424
2 changed files with 38 additions and 12 deletions

View File

@ -35,7 +35,7 @@ export const itemApi = {
* @author
*/
delete: (id: number) => {
return getRequest('tem/delete', {id});
return getRequest('/item/delete', {id});
},
/**

View File

@ -37,13 +37,13 @@
<!---------- 表格操作行 begin ----------->
<a-row class="smart-table-btn-block">
<div class="smart-table-operate-block">
<a-button @click="showForm" type="primary" size="small">
<a-button @click="showForm" type="primary" v-privilege="'item:add'">
<template #icon>
<PlusOutlined/>
</template>
新建
</a-button>
<a-button @click="confirmBatchDelete" type="primary" danger size="small"
<a-button @click="confirmBatchDelete" type="primary" danger v-privilege="'item:batchDelete'"
:disabled="selectedRowKeyList.length == 0">
<template #icon>
<DeleteOutlined/>
@ -70,11 +70,32 @@
>
<template #bodyCell="{ text, record, column }">
<template v-if="column.dataIndex === 'disabledFlag'">
<a-tag :color="text ? 'processing' : 'error'">{{ text ? '启用' : '禁用' }}</a-tag>
</template>
<template v-if="column.dataIndex === 'unit'">
<DictPreview :options="itemUnit.ITEM_UNIT" :value="text"/>
</template>
<template v-if="column.dataIndex === 'itemType'">
<DictPreview :options="itemType.ITEM_TYPE" :value="text"/>
</template>
<template v-if="column.dataIndex === 'action'">
<div class="smart-table-operate">
<a-button @click="showForm(record)" type="link">编辑</a-button>
<a-button @click="onDelete(record)" danger type="link">删除</a-button>
<a-button @click="showForm(record)" type="link" v-privilege="'item:update'">
<template #icon>
<EditOutlined/>
</template>
编辑
</a-button>
<a-button @click="onDelete(record)" danger type="link" v-privilege="'item:delete'">
<template #icon>
<DeleteOutlined/>
</template>
删除
</a-button>
</div>
</template>
</template>
@ -111,7 +132,11 @@ import {smartSentry} from '/@/lib/smart-sentry';
import TableOperator from '/@/components/support/table-operator/index.vue';
import ItemForm from '/@/views/business/base/item/item-form.vue';
import {TABLE_ID_CONST} from "/@/constants/support/table-id-const";
import DictPreview from '/@/components/dict-preview/index.vue';
import {useDict} from '/@/utils/dict';
const itemUnit = useDict('ITEM_UNIT');
const itemType = useDict('ITEM_TYPE');
// ---------------------------- ----------------------------
const columns = ref([
@ -121,7 +146,7 @@ const columns = ref([
ellipsis: true,
},
{
title: '物料编码',
title: '物料',
dataIndex: 'itemCode',
ellipsis: true,
},
@ -130,6 +155,11 @@ const columns = ref([
dataIndex: 'itemName',
ellipsis: true,
},
{
title: '物料类型',
dataIndex: 'itemType',
ellipsis: true,
},
{
title: '单位',
dataIndex: 'unit',
@ -141,15 +171,11 @@ const columns = ref([
ellipsis: true,
},
{
title: '是否用',
title: '是否用',
dataIndex: 'disabledFlag',
ellipsis: true,
},
{
title: '物料类型',
dataIndex: 'itemType',
ellipsis: true,
},
{
title: '创建时间',
dataIndex: 'createTime',