新增多个控制器以支持密炼相关功能,包括报警记录、自动卸料日志、物料对应、称量校验日志、密炼机动作状态等,提供分页查询、通过ID查询及导出Excel功能,增强系统的可用性与数据管理能力。
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
enum Api {
|
||||
list = '/xslmes/mcs/mcsToMesMixExePlan/list',
|
||||
queryById = '/xslmes/mcs/mcsToMesMixExePlan/queryById',
|
||||
exportXls = '/xslmes/mcs/mcsToMesMixExePlan/exportXls',
|
||||
}
|
||||
|
||||
export const getExportUrl = Api.exportXls;
|
||||
|
||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||
|
||||
export const queryById = (params) => defHttp.get({ url: Api.queryById, params });
|
||||
@@ -0,0 +1,46 @@
|
||||
import { BasicColumn, FormSchema } from '/@/components/Table';
|
||||
|
||||
export const columns: BasicColumn[] = [
|
||||
{ title: '计划编号', align: 'center', dataIndex: 'planId' },
|
||||
{ title: '机台编号', align: 'center', dataIndex: 'equipId' },
|
||||
{ title: '机台类型', align: 'center', dataIndex: 'equipType' },
|
||||
{ title: '计划日期', align: 'center', dataIndex: 'planDate' },
|
||||
{ title: '班次', align: 'center', dataIndex: 'shiftId' },
|
||||
{ title: '配方代码', align: 'center', dataIndex: 'recipCode' },
|
||||
{ title: '设定车次', align: 'center', dataIndex: 'setNum' },
|
||||
{ title: '完成车次', align: 'center', dataIndex: 'doneNum' },
|
||||
{ title: '计划状态', align: 'center', dataIndex: 'planState' },
|
||||
{ title: '写入时间', align: 'center', dataIndex: 'writeTime' },
|
||||
];
|
||||
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
{ label: '计划编号', field: 'planId', component: 'JInput', colProps: { span: 6 } },
|
||||
{ label: '机台编号', field: 'equipId', component: 'JInput', colProps: { span: 6 } },
|
||||
{ label: '计划日期', field: 'planDate', component: 'JInput', colProps: { span: 6 } },
|
||||
{ label: '计划状态', field: 'planState', component: 'InputNumber', colProps: { span: 6 } },
|
||||
];
|
||||
|
||||
export const formSchema: FormSchema[] = [
|
||||
{ label: '', field: 'id', component: 'Input', show: false },
|
||||
{ label: '计划编号', field: 'planId', component: 'Input', componentProps: { disabled: true }, colProps: { span: 12 } },
|
||||
{ label: '计划来源', field: 'planSource', component: 'Input', componentProps: { disabled: true }, colProps: { span: 12 } },
|
||||
{ label: '机台编号', field: 'equipId', component: 'Input', componentProps: { disabled: true }, colProps: { span: 12 } },
|
||||
{ label: '机台名称', field: 'equipName', component: 'Input', componentProps: { disabled: true }, colProps: { span: 12 } },
|
||||
{ label: '机台类型', field: 'equipType', component: 'Input', componentProps: { disabled: true }, colProps: { span: 12 } },
|
||||
{ label: '计划日期', field: 'planDate', component: 'Input', componentProps: { disabled: true }, colProps: { span: 12 } },
|
||||
{ label: '班次', field: 'shiftId', component: 'Input', componentProps: { disabled: true }, colProps: { span: 12 } },
|
||||
{ label: '班组', field: 'shiftClass', component: 'Input', componentProps: { disabled: true }, colProps: { span: 12 } },
|
||||
{ label: '计划顺序', field: 'workOrder', component: 'InputNumber', componentProps: { disabled: true }, colProps: { span: 12 } },
|
||||
{ label: '配方代码', field: 'recipCode', component: 'Input', componentProps: { disabled: true }, colProps: { span: 12 } },
|
||||
{ label: '配方名称', field: 'recipName', component: 'Input', componentProps: { disabled: true }, colProps: { span: 12 } },
|
||||
{ label: '物料代码', field: 'materCode', component: 'Input', componentProps: { disabled: true }, colProps: { span: 12 } },
|
||||
{ label: '物料名称', field: 'materName', component: 'Input', componentProps: { disabled: true }, colProps: { span: 12 } },
|
||||
{ label: '设定车次', field: 'setNum', component: 'InputNumber', componentProps: { disabled: true }, colProps: { span: 12 } },
|
||||
{ label: '完成车次', field: 'doneNum', component: 'InputNumber', componentProps: { disabled: true }, colProps: { span: 12 } },
|
||||
{ label: '计划状态', field: 'planState', component: 'InputNumber', componentProps: { disabled: true }, colProps: { span: 12 } },
|
||||
{ label: '开始时间', field: 'startTime', component: 'Input', componentProps: { disabled: true }, colProps: { span: 12 } },
|
||||
{ label: '结束时间', field: 'endTime', component: 'Input', componentProps: { disabled: true }, colProps: { span: 12 } },
|
||||
{ label: '写入时间', field: 'writeTime', component: 'Input', componentProps: { disabled: true }, colProps: { span: 12 } },
|
||||
{ label: '读取时间', field: 'readTime', component: 'Input', componentProps: { disabled: true }, colProps: { span: 12 } },
|
||||
{ label: '备注', field: 'remark', component: 'Input', componentProps: { disabled: true }, colProps: { span: 24 } },
|
||||
];
|
||||
@@ -0,0 +1,30 @@
|
||||
<template>
|
||||
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose title="密炼执行计划" :width="1200">
|
||||
<BasicForm @register="registerForm" />
|
||||
</BasicModal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { BasicModal, useModalInner } from '/@/components/Modal';
|
||||
import { BasicForm, useForm } from '/@/components/Form/index';
|
||||
import { formSchema } from '../McsToMesMixExePlan.data';
|
||||
|
||||
defineEmits(['register']);
|
||||
|
||||
const [registerForm, { resetFields, setFieldsValue, setProps }] = useForm({
|
||||
labelWidth: 120,
|
||||
schemas: formSchema,
|
||||
showActionButtonGroup: false,
|
||||
baseColProps: { span: 12 },
|
||||
disabled: true,
|
||||
});
|
||||
|
||||
const [registerModal, { setModalProps }] = useModalInner(async (data) => {
|
||||
await resetFields();
|
||||
setModalProps({ confirmLoading: false, showOkBtn: false, showCancelBtn: true, cancelText: '关闭' });
|
||||
if (data?.record) {
|
||||
await setFieldsValue({ ...data.record });
|
||||
}
|
||||
setProps({ disabled: true });
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,64 @@
|
||||
<template>
|
||||
<div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
|
||||
</template>
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" />
|
||||
</template>
|
||||
</BasicTable>
|
||||
<McsToMesMixExePlanModal @register="registerModal" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="xslmes-mcs-mcsToMesMixExePlan" setup>
|
||||
import { reactive } from 'vue';
|
||||
import { BasicTable, TableAction } from '/@/components/Table';
|
||||
import { useModal } from '/@/components/Modal';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import McsToMesMixExePlanModal from './components/McsToMesMixExePlanModal.vue';
|
||||
import { columns, searchFormSchema } from './McsToMesMixExePlan.data';
|
||||
import { list, getExportUrl } from './McsToMesMixExePlan.api';
|
||||
|
||||
const queryParam = reactive<any>({});
|
||||
const [registerModal, { openModal }] = useModal();
|
||||
|
||||
const { tableContext, onExportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '密炼执行计划',
|
||||
api: list,
|
||||
columns,
|
||||
canResize: true,
|
||||
formConfig: {
|
||||
schemas: searchFormSchema,
|
||||
autoSubmitOnEnter: true,
|
||||
showAdvancedButton: true,
|
||||
fieldMapToTime: [
|
||||
['writeTime', ['writeTime_begin', 'writeTime_end'], 'YYYY-MM-DD HH:mm:ss'],
|
||||
['cdate', ['cdate_begin', 'cdate_end'], 'YYYY-MM-DD HH:mm:ss'],
|
||||
],
|
||||
},
|
||||
actionColumn: { width: 80, fixed: 'right' },
|
||||
beforeFetch: (params) => Object.assign(params, queryParam),
|
||||
},
|
||||
exportConfig: { name: '密炼执行计划', url: getExportUrl, params: queryParam },
|
||||
});
|
||||
|
||||
const [registerTable, { reload }] = tableContext;
|
||||
const superQueryConfig = reactive({});
|
||||
|
||||
function handleSuperQuery(params) {
|
||||
Object.keys(params).map((k) => { queryParam[k] = params[k]; });
|
||||
reload();
|
||||
}
|
||||
|
||||
function handleDetail(record: Recordable) {
|
||||
openModal(true, { record, isUpdate: true, showFooter: false });
|
||||
}
|
||||
|
||||
function getTableAction(record) {
|
||||
return [{ label: '详情', onClick: handleDetail.bind(null, record) }];
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user