新增原料入场记录的免密查询和删除功能,支持级联删除关联原材料卡片。重构相关服务和控制器以增强逻辑删除支持,优化数据处理流程,确保数据一致性和准确性。同时,更新前端表单以支持新功能。
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
enum Api {
|
||||
list = '/xslmes/mesXslRawMaterialCardEditLog/list',
|
||||
exportXls = '/xslmes/mesXslRawMaterialCardEditLog/exportXls',
|
||||
}
|
||||
|
||||
export const getExportUrl = Api.exportXls;
|
||||
|
||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||
@@ -0,0 +1,45 @@
|
||||
import { BasicColumn, FormSchema } from '/@/components/Table';
|
||||
|
||||
export const columns: BasicColumn[] = [
|
||||
{ title: '条码', align: 'center', dataIndex: 'barcode', width: 240 },
|
||||
{ title: '批次号', align: 'center', dataIndex: 'batchNo', width: 220 },
|
||||
{ title: '物料名称', align: 'center', dataIndex: 'materialName', width: 320 },
|
||||
{ title: '修改前重量', align: 'center', dataIndex: 'beforeRemainingWeight', width: 110 },
|
||||
{ title: '修改前数量', align: 'center', dataIndex: 'beforeRemainingQty', width: 100 },
|
||||
{ title: '修改前库区', align: 'center', dataIndex: 'beforeWarehouseArea', width: 120 },
|
||||
{ title: '修改后重量', align: 'center', dataIndex: 'afterRemainingWeight', width: 110 },
|
||||
{ title: '修改后数量', align: 'center', dataIndex: 'afterRemainingQty', width: 100 },
|
||||
{ title: '修改后库区', align: 'center', dataIndex: 'afterWarehouseArea', width: 120 },
|
||||
{
|
||||
title: '修改时间',
|
||||
align: 'center',
|
||||
dataIndex: 'modifyTime',
|
||||
width: 165,
|
||||
},
|
||||
{ title: '修改人姓名', align: 'center', dataIndex: 'modifyByName', width: 120 },
|
||||
{ title: '数值来源', align: 'center', dataIndex: 'dataSource', width: 160, ellipsis: true },
|
||||
];
|
||||
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
{ label: '条码', field: 'barcode', component: 'JInput', colProps: { span: 6 } },
|
||||
{ label: '批次号', field: 'batchNo', component: 'JInput', colProps: { span: 6 } },
|
||||
{ label: '物料名称', field: 'materialName', component: 'Input', colProps: { span: 6 } },
|
||||
{ label: '修改人', field: 'modifyByName', component: 'Input', colProps: { span: 6 } },
|
||||
{
|
||||
label: '数值来源',
|
||||
field: 'dataSource',
|
||||
component: 'Input',
|
||||
colProps: { span: 6 },
|
||||
componentProps: { placeholder: '如 Web端原材料卡片' },
|
||||
},
|
||||
{
|
||||
label: '修改时间',
|
||||
field: 'modifyTime',
|
||||
component: 'RangePicker',
|
||||
colProps: { span: 8 },
|
||||
componentProps: {
|
||||
showTime: true,
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
},
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,44 @@
|
||||
<template>
|
||||
<div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" v-auth="'xslmes:mes_xsl_raw_material_card_edit_log:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls">
|
||||
导出
|
||||
</a-button>
|
||||
</template>
|
||||
</BasicTable>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="xslmes-mesXslRawMaterialCardEditLog" setup>
|
||||
import { reactive } from 'vue';
|
||||
import { BasicTable } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, searchFormSchema } from './MesXslRawMaterialCardEditLog.data';
|
||||
import { list, getExportUrl } from './MesXslRawMaterialCardEditLog.api';
|
||||
|
||||
const queryParam = reactive<any>({});
|
||||
|
||||
const { tableContext, onExportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '原材料卡片修改日志',
|
||||
api: list,
|
||||
columns,
|
||||
canResize: true,
|
||||
showIndexColumn: true,
|
||||
formConfig: {
|
||||
schemas: searchFormSchema,
|
||||
autoSubmitOnEnter: true,
|
||||
fieldMapToTime: [['modifyTime', ['modifyTime_begin', 'modifyTime_end'], 'YYYY-MM-DD HH:mm:ss']],
|
||||
},
|
||||
beforeFetch: (params) => Object.assign(params, queryParam),
|
||||
},
|
||||
exportConfig: {
|
||||
name: '原材料卡片修改日志',
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
});
|
||||
|
||||
const [registerTable] = tableContext;
|
||||
</script>
|
||||
Reference in New Issue
Block a user