fix:1.增加空辊信息管理。2.增加烘箱点位管理。3.增加生箔工序单下满卷、单上空辊、单下空辊、允许进入功能。4.优化生箔工序.5.增加烘箱工序工功能。6.手持接口等。

This commit is contained in:
2026-08-24 16:26:32 +08:00
parent 8c34cdde22
commit 20837434c4
100 changed files with 6765 additions and 171 deletions

View File

@@ -0,0 +1,58 @@
import type { PageParam, PageResult } from '@vben/request';
import type { Dayjs } from 'dayjs';
import { requestClient } from '#/api/request';
export namespace LmsEmptyRollerInfoApi {
/** 空辊信息信息 */
export interface EmptyRollerInfo {
emptyrollerId: number; // 空辊标识
emptyrollerCode?: string; // 空辊编码
weight?: number; // 重量
isUsed?: string; // 是否启用
}
}
/** 查询空辊信息分页 */
export function getEmptyRollerInfoPage(params: PageParam) {
return requestClient.get<PageResult<LmsEmptyRollerInfoApi.EmptyRollerInfo>>(
'/lms/empty-roller-info/page',
{ params },
);
}
/** 查询空辊信息详情 */
export function getEmptyRollerInfo(id: number) {
return requestClient.get<LmsEmptyRollerInfoApi.EmptyRollerInfo>(
`/lms/empty-roller-info/get?id=${id}`,
);
}
/** 新增空辊信息 */
export function createEmptyRollerInfo(data: LmsEmptyRollerInfoApi.EmptyRollerInfo) {
return requestClient.post('/lms/empty-roller-info/create', data);
}
/** 修改空辊信息 */
export function updateEmptyRollerInfo(data: LmsEmptyRollerInfoApi.EmptyRollerInfo) {
return requestClient.put('/lms/empty-roller-info/update', data);
}
/** 删除空辊信息 */
export function deleteEmptyRollerInfo(id: number) {
return requestClient.delete(`/lms/empty-roller-info/delete?id=${id}`);
}
/** 批量删除空辊信息 */
export function deleteEmptyRollerInfoList(ids: number[]) {
return requestClient.delete(
`/lms/empty-roller-info/delete-list?ids=${ids.join(',')}`,
);
}
/** 导出空辊信息 */
export function exportEmptyRollerInfo(params: any) {
return requestClient.download('/lms/empty-roller-info/export-excel', { params });
}

View File

@@ -0,0 +1,72 @@
import type { PageParam, PageResult } from '@vben/request';
import type { Dayjs } from 'dayjs';
import { requestClient } from '#/api/request';
export namespace LmsRawFoilHotPointIVTApi {
/** 烘箱点位库存信息 */
export interface RawFoilHotPointIVT {
ivtId: number; // 库存记录标识
pointCode?: string; // 点位编码
pointStatus?: string; // 点位状态
containerName: string; // 母卷号
workorderId: string; // 母卷工单标识
fullVehicleCode: string; // 母卷轴编码
ivtQty: number; // 库存数
instorageTime: string | Dayjs; // 入库时间
productionArea: string; // 生产区域
temperature: number; // 温度
groupName: string; // 组别
pointLocation: string; // 位置
sortSeq: number; // 顺序号
isUsed?: string; // 是否启用
remark: string; // 备注
extCode: string; // 外部编码
lastTime: string; // 倒计时
lockStatus: string; // 锁(0.空闲,1占用)
}
}
/** 查询烘箱点位库存分页 */
export function getRawFoilHotPointIVTPage(params: PageParam) {
return requestClient.get<PageResult<LmsRawFoilHotPointIVTApi.RawFoilHotPointIVT>>(
'/lms/raw-foil-hot-point-IVT/page',
{ params },
);
}
/** 查询烘箱点位库存详情 */
export function getRawFoilHotPointIVT(id: number) {
return requestClient.get<LmsRawFoilHotPointIVTApi.RawFoilHotPointIVT>(
`/lms/raw-foil-hot-point-IVT/get?id=${id}`,
);
}
/** 新增烘箱点位库存 */
export function createRawFoilHotPointIVT(data: LmsRawFoilHotPointIVTApi.RawFoilHotPointIVT) {
return requestClient.post('/lms/raw-foil-hot-point-IVT/create', data);
}
/** 修改烘箱点位库存 */
export function updateRawFoilHotPointIVT(data: LmsRawFoilHotPointIVTApi.RawFoilHotPointIVT) {
return requestClient.put('/lms/raw-foil-hot-point-IVT/update', data);
}
/** 删除烘箱点位库存 */
export function deleteRawFoilHotPointIVT(id: number) {
return requestClient.delete(`/lms/raw-foil-hot-point-IVT/delete?id=${id}`);
}
/** 批量删除烘箱点位库存 */
export function deleteRawFoilHotPointIVTList(ids: number[]) {
return requestClient.delete(
`/lms/raw-foil-hot-point-IVT/delete-list?ids=${ids.join(',')}`,
);
}
/** 导出烘箱点位库存 */
export function exportRawFoilHotPointIVT(params: any) {
return requestClient.download('/lms/raw-foil-hot-point-IVT/export-excel', { params });
}

View File

@@ -0,0 +1,110 @@
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { LmsEmptyRollerInfoApi } from '#/api/lms/emptyrollerinfo';
import {z} from "#/adapter/form";
/** 新增/修改的表单 */
export function useFormSchema(): VbenFormSchema[] {
return [
{
fieldName: 'emptyrollerId',
component: 'Input',
dependencies: {
triggerFields: [''],
show: () => false,
},
},
{
fieldName: 'emptyrollerCode',
label: '空辊编码',
rules: 'required',
component: 'Input',
componentProps: {
placeholder: '请输入空辊编码',
},
},
{
fieldName: 'weight',
label: '重量',
rules: 'required',
component: 'Input',
componentProps: {
placeholder: '请输入重量',
},
},
{
fieldName: 'isUsed',
label: '是否启用',
rules: z.string().default('1'),
component: 'RadioGroup',
componentProps: {
options: [{ label: '是', value: '1' }, { label: '否', value: '0' }],
buttonStyle: 'solid',
optionType: 'button',
},
},
];
}
/** 列表的搜索表单 */
export function useGridFormSchema(): VbenFormSchema[] {
return [
{
fieldName: 'emptyrollerCode',
label: '空辊编码',
component: 'Input',
componentProps: {
allowClear: true,
placeholder: '请输入空辊编码',
},
},
{
fieldName: 'isUsed',
label: '是否启用',
component: 'Select',
componentProps: {
allowClear: true,
options: [
{ label: '是', value: '1' },
{ label: '否', value: '0' },
],
placeholder: '请输入是否启用',
},
},
];
}
/** 列表的字段 */
export function useGridColumns(): VxeTableGridOptions<LmsEmptyRollerInfoApi.EmptyRollerInfo>['columns'] {
return [
{ type: 'checkbox', width: 40 },
{
field: 'emptyrollerCode',
title: '空辊编码',
minWidth: 120,
},
{
field: 'weight',
title: '重量',
minWidth: 120,
},
{
field: 'isUsed',
title: '是否启用',
minWidth: 120,
},
{
field: 'updateTime',
title: '修改时间',
minWidth: 120,
formatter: 'formatDateTime',
},
{
title: '操作',
width: 200,
fixed: 'right',
slots: { default: 'actions' },
},
];
}

View File

@@ -0,0 +1,186 @@
<script lang="ts" setup>
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { LmsEmptyRollerInfoApi } from '#/api/lms/emptyrollerinfo';
import { ref } from 'vue';
import { confirm, Page, useVbenModal } from '@vben/common-ui';
import { downloadFileFromBlobPart, isEmpty } from '@vben/utils';
import { message } from 'antdv-next';
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import {
deleteEmptyRollerInfo,
deleteEmptyRollerInfoList,
exportEmptyRollerInfo,
getEmptyRollerInfoPage,
} from '#/api/lms/emptyrollerinfo';
import { $t } from '#/locales';
import { useGridColumns, useGridFormSchema } from './data';
import Form from './modules/form.vue';
const [FormModal, formModalApi] = useVbenModal({
connectedComponent: Form,
destroyOnClose: true,
});
/** 刷新表格 */
function handleRefresh() {
gridApi.query();
}
/** 创建空辊信息 */
function handleCreate() {
formModalApi.setData(null).open();
}
/** 编辑空辊信息 */
function handleEdit(row: LmsEmptyRollerInfoApi.EmptyRollerInfo) {
formModalApi.setData(row).open();
}
/** 删除空辊信息 */
async function handleDelete(row: LmsEmptyRollerInfoApi.EmptyRollerInfo) {
const hideLoading = message.loading({
content: $t('ui.actionMessage.deleting', [row.emptyrollerId]),
duration: 0,
});
try {
await deleteEmptyRollerInfo(row.emptyrollerId!);
message.success($t('ui.actionMessage.deleteSuccess', [row.emptyrollerId]));
handleRefresh();
} finally {
hideLoading();
}
}
/** 批量删除空辊信息 */
async function handleDeleteBatch() {
await confirm($t('ui.actionMessage.deleteBatchConfirm'));
const hideLoading = message.loading({
content: $t('ui.actionMessage.deletingBatch'),
duration: 0,
});
try {
await deleteEmptyRollerInfoList(checkedIds.value);
checkedIds.value = [];
message.success($t('ui.actionMessage.deleteSuccess'));
handleRefresh();
} finally {
hideLoading();
}
}
const checkedIds = ref<number[]>([]);
function handleRowCheckboxChange({
records,
}: {
records: LmsEmptyRollerInfoApi.EmptyRollerInfo[];
}) {
checkedIds.value = records.map((item) => item.emptyrollerId!);
}
/** 导出表格 */
async function handleExport() {
const data = await exportEmptyRollerInfo(await gridApi.formApi.getValues());
downloadFileFromBlobPart({ fileName: '空辊信息.xls', source: data });
}
const [Grid, gridApi] = useVbenVxeGrid({
formOptions: {
schema: useGridFormSchema(),
},
gridOptions: {
columns: useGridColumns(),
height: 'auto',
keepSource: true,
proxyConfig: {
ajax: {
query: async ({ page }, formValues) => {
return await getEmptyRollerInfoPage({
pageNo: page.currentPage,
pageSize: page.pageSize,
...formValues,
});
},
},
},
rowConfig: {
keyField: 'id',
isHover: true,
},
toolbarConfig: {
refresh: true,
search: true,
},
} as VxeTableGridOptions<LmsEmptyRollerInfoApi.EmptyRollerInfo>,
gridEvents: {
checkboxAll: handleRowCheckboxChange,
checkboxChange: handleRowCheckboxChange,
},
});
</script>
<template>
<Page auto-content-height>
<FormModal @success="handleRefresh" />
<Grid table-title="空辊信息列表">
<template #toolbar-tools>
<TableAction
:actions="[
{
label: $t('ui.actionTitle.create', ['空辊信息']),
type: 'primary',
icon: ACTION_ICON.ADD,
auth: ['lms:empty-roller-info:create'],
onClick: handleCreate,
},
{
label: $t('ui.actionTitle.export'),
type: 'primary',
icon: ACTION_ICON.DOWNLOAD,
auth: ['lms:empty-roller-info:export'],
onClick: handleExport,
},
{
label: $t('ui.actionTitle.deleteBatch'),
type: 'primary',
danger: true,
icon: ACTION_ICON.DELETE,
auth: ['lms:empty-roller-info:delete'],
disabled: isEmpty(checkedIds),
onClick: handleDeleteBatch,
},
]"
/>
</template>
<template #actions="{ row }">
<TableAction
:actions="[
{
label: $t('common.edit'),
type: 'link',
icon: ACTION_ICON.EDIT,
auth: ['lms:empty-roller-info:update'],
onClick: handleEdit.bind(null, row),
},
{
label: $t('common.delete'),
type: 'link',
danger: true,
icon: ACTION_ICON.DELETE,
auth: ['lms:empty-roller-info:delete'],
popConfirm: {
title: $t('ui.actionMessage.deleteConfirm', [row.emptyrollerId]),
confirm: handleDelete.bind(null, row),
},
},
]"
/>
</template>
</Grid>
</Page>
</template>

View File

@@ -0,0 +1,82 @@
<script lang="ts" setup>
import type { LmsEmptyRollerInfoApi } from '#/api/lms/emptyrollerinfo';
import { computed, ref } from 'vue';
import { useVbenModal } from '@vben/common-ui';
import { message } from 'antdv-next';
import { useVbenForm } from '#/adapter/form';
import { createEmptyRollerInfo, getEmptyRollerInfo, updateEmptyRollerInfo } from '#/api/lms/emptyrollerinfo';
import { $t } from '#/locales';
import { useFormSchema } from '../data';
const emit = defineEmits(['success']);
const formData = ref<LmsEmptyRollerInfoApi.EmptyRollerInfo>();
const getTitle = computed(() => {
return formData.value?.emptyrollerId
? $t('ui.actionTitle.edit', ['空辊信息'])
: $t('ui.actionTitle.create', ['空辊信息']);
});
const [Form, formApi] = useVbenForm({
commonConfig: {
componentProps: {
class: 'w-full',
},
formItemClass: 'col-span-2',
labelWidth: 80,
},
layout: 'horizontal',
schema: useFormSchema(),
showDefaultActions: false,
});
const [Modal, modalApi] = useVbenModal({
async onConfirm() {
const { valid } = await formApi.validate();
if (!valid) {
return;
}
modalApi.lock();
// 提交表单
const data = (await formApi.getValues()) as LmsEmptyRollerInfoApi.EmptyRollerInfo;
try {
await (formData.value?.emptyrollerId ? updateEmptyRollerInfo(data) : createEmptyRollerInfo(data));
// 关闭并提示
await modalApi.close();
emit('success');
message.success($t('ui.actionMessage.operationSuccess'));
} finally {
modalApi.unlock();
}
},
async onOpenChange(isOpen: boolean) {
if (!isOpen) {
formData.value = undefined;
return;
}
// 加载数据
const data = modalApi.getData<LmsEmptyRollerInfoApi.EmptyRollerInfo>();
if (!data || !data.emptyrollerId) {
return;
}
modalApi.lock();
try {
formData.value = await getEmptyRollerInfo(data.emptyrollerId);
// 设置到 values
await formApi.setValues(formData.value);
} finally {
modalApi.unlock();
}
},
});
</script>
<template>
<Modal :title="getTitle">
<Form class="mx-4" />
</Modal>
</template>

View File

@@ -0,0 +1,301 @@
import {type VbenFormSchema, z} from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { LmsRawFoilHotPointIVTApi } from '#/api/lms/rawfoilhotpointivt';
import { getDictOptions } from '@vben/hooks';
import { getRangePickerDefaultProps } from '#/utils';
import {DICT_TYPE} from "@vben/constants";
/** 新增/修改的表单 */
export function useFormSchema(): VbenFormSchema[] {
return [
{
fieldName: 'ivtId',
component: 'Input',
dependencies: {
triggerFields: [''],
show: () => false,
},
},
{
fieldName: 'pointCode',
label: '点位编码',
rules: 'required',
component: 'Input',
componentProps: {
placeholder: '请输入点位编码',
},
},
{
fieldName: 'pointStatus',
label: '点位状态',
rules: 'required',
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.RAWFOIL_HOTPOINT_STATUS),
placeholder: '请选择点位状态',
},
},
{
fieldName: 'containerName',
label: '母卷号',
component: 'Input',
componentProps: {
placeholder: '请输入母卷号',
},
},
{
fieldName: 'workorderId',
label: '母卷工单标识',
component: 'Input',
componentProps: {
placeholder: '请输入母卷工单标识',
},
},
{
fieldName: 'fullVehicleCode',
label: '母卷轴编码',
component: 'Input',
componentProps: {
placeholder: '请输入母卷轴编码',
},
},
{
fieldName: 'ivtQty',
label: '库存数',
rules: 'required',
component: 'Input',
componentProps: {
placeholder: '请输入库存数',
},
},
{
fieldName: 'instorageTime',
label: '入库时间',
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
},
},
{
fieldName: 'productionArea',
label: '生产区域',
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.PRODUCT_AREA),
placeholder: '请选择生产区域',
},
},
{
fieldName: 'temperature',
label: '温度',
component: 'Input',
componentProps: {
placeholder: '请输入温度',
},
},
{
fieldName: 'groupName',
label: '组别',
component: 'Input',
componentProps: {
placeholder: '请输入组别',
},
},
{
fieldName: 'pointLocation',
label: '位置',
component: 'Input',
componentProps: {
placeholder: '请输入位置',
},
},
{
fieldName: 'sortSeq',
label: '顺序号',
rules: 'required',
component: 'Input',
componentProps: {
placeholder: '请输入顺序号',
},
},
{
fieldName: 'isUsed',
label: '是否启用',
rules: z.string().default('1'),
component: 'RadioGroup',
componentProps: {
options: [{ label: '是', value: '1' }, { label: '否', value: '0' }],
buttonStyle: 'solid',
optionType: 'button',
},
},
{
fieldName: 'remark',
label: '备注',
component: 'Input',
componentProps: {
placeholder: '请输入备注',
},
},
{
fieldName: 'extCode',
label: '外部编码',
component: 'Input',
componentProps: {
placeholder: '请输入外部编码',
},
},
{
fieldName: 'lastTime',
label: '倒计时',
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
},
},
];
}
/** 列表的搜索表单 */
export function useGridFormSchema(): VbenFormSchema[] {
return [
{
fieldName: 'pointCode',
label: '点位编码',
component: 'Input',
componentProps: {
allowClear: true,
placeholder: '请输入点位编码',
},
},
{
fieldName: 'pointStatus',
label: '点位状态',
component: 'Select',
componentProps: {
allowClear: true,
options: getDictOptions(DICT_TYPE.RAWFOIL_HOTPOINT_STATUS),
placeholder: '请选择点位状态',
},
},
{
fieldName: 'instorageTime',
label: '入库时间',
component: 'RangePicker',
componentProps: {
...getRangePickerDefaultProps(),
allowClear: true,
},
},
{
fieldName: 'productionArea',
label: '生产区域',
component: 'Select',
componentProps: {
allowClear: true,
options: getDictOptions(DICT_TYPE.PRODUCT_AREA),
placeholder: '请输入生产区域',
},
},
{
fieldName: 'isUsed',
label: '是否启用',
component: 'Select',
componentProps: {
allowClear: true,
options: [
{ label: '是', value: '1' },
{ label: '否', value: '0' },
],
placeholder: '请选择是否启用',
},
},
];
}
/** 列表的字段 */
export function useGridColumns(): VxeTableGridOptions<LmsRawFoilHotPointIVTApi.RawFoilHotPointIVT>['columns'] {
return [
{ type: 'checkbox', width: 40 },
{
field: 'pointCode',
title: '点位编码',
minWidth: 120,
},
{
field: 'pointStatus',
title: '点位状态',
minWidth: 120,
},
{
field: 'containerName',
title: '母卷号',
minWidth: 120,
},
{
field: 'ivtQty',
title: '库存数',
minWidth: 120,
},
{
field: 'instorageTime',
title: '入库时间',
minWidth: 120,
formatter: 'formatDateTime',
},
{
field: 'productionArea',
title: '生产区域',
minWidth: 120,
},
{
field: 'temperature',
title: '温度',
minWidth: 120,
},
{
field: 'groupName',
title: '组别',
minWidth: 120,
},
{
field: 'isUsed',
title: '是否启用',
minWidth: 120,
},
{
field: 'remark',
title: '备注',
minWidth: 120,
},
{
field: 'updateTime',
title: '修改时间',
minWidth: 120,
formatter: 'formatDateTime',
},
{
field: 'extCode',
title: '外部编码',
minWidth: 120,
},
{
field: 'lastTime',
title: '倒计时',
minWidth: 120,
},
{
title: '操作',
width: 200,
fixed: 'right',
slots: { default: 'actions' },
},
];
}

View File

@@ -0,0 +1,186 @@
<script lang="ts" setup>
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { LmsRawFoilHotPointIVTApi } from '#/api/lms/rawfoilhotpointivt';
import { ref } from 'vue';
import { confirm, Page, useVbenModal } from '@vben/common-ui';
import { downloadFileFromBlobPart, isEmpty } from '@vben/utils';
import { message } from 'antdv-next';
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import {
deleteRawFoilHotPointIVT,
deleteRawFoilHotPointIVTList,
exportRawFoilHotPointIVT,
getRawFoilHotPointIVTPage,
} from '#/api/lms/rawfoilhotpointivt';
import { $t } from '#/locales';
import { useGridColumns, useGridFormSchema } from './data';
import Form from './modules/form.vue';
const [FormModal, formModalApi] = useVbenModal({
connectedComponent: Form,
destroyOnClose: true,
});
/** 刷新表格 */
function handleRefresh() {
gridApi.query();
}
/** 创建烘箱点位库存 */
function handleCreate() {
formModalApi.setData(null).open();
}
/** 编辑烘箱点位库存 */
function handleEdit(row: LmsRawFoilHotPointIVTApi.RawFoilHotPointIVT) {
formModalApi.setData(row).open();
}
/** 删除烘箱点位库存 */
async function handleDelete(row: LmsRawFoilHotPointIVTApi.RawFoilHotPointIVT) {
const hideLoading = message.loading({
content: $t('ui.actionMessage.deleting', [row.ivtId]),
duration: 0,
});
try {
await deleteRawFoilHotPointIVT(row.ivtId!);
message.success($t('ui.actionMessage.deleteSuccess', [row.ivtId]));
handleRefresh();
} finally {
hideLoading();
}
}
/** 批量删除烘箱点位库存 */
async function handleDeleteBatch() {
await confirm($t('ui.actionMessage.deleteBatchConfirm'));
const hideLoading = message.loading({
content: $t('ui.actionMessage.deletingBatch'),
duration: 0,
});
try {
await deleteRawFoilHotPointIVTList(checkedIds.value);
checkedIds.value = [];
message.success($t('ui.actionMessage.deleteSuccess'));
handleRefresh();
} finally {
hideLoading();
}
}
const checkedIds = ref<number[]>([]);
function handleRowCheckboxChange({
records,
}: {
records: LmsRawFoilHotPointIVTApi.RawFoilHotPointIVT[];
}) {
checkedIds.value = records.map((item) => item.ivtId!);
}
/** 导出表格 */
async function handleExport() {
const data = await exportRawFoilHotPointIVT(await gridApi.formApi.getValues());
downloadFileFromBlobPart({ fileName: '烘箱点位库存.xls', source: data });
}
const [Grid, gridApi] = useVbenVxeGrid({
formOptions: {
schema: useGridFormSchema(),
},
gridOptions: {
columns: useGridColumns(),
height: 'auto',
keepSource: true,
proxyConfig: {
ajax: {
query: async ({ page }, formValues) => {
return await getRawFoilHotPointIVTPage({
pageNo: page.currentPage,
pageSize: page.pageSize,
...formValues,
});
},
},
},
rowConfig: {
keyField: 'id',
isHover: true,
},
toolbarConfig: {
refresh: true,
search: true,
},
} as VxeTableGridOptions<LmsRawFoilHotPointIVTApi.RawFoilHotPointIVT>,
gridEvents: {
checkboxAll: handleRowCheckboxChange,
checkboxChange: handleRowCheckboxChange,
},
});
</script>
<template>
<Page auto-content-height>
<FormModal @success="handleRefresh" />
<Grid table-title="烘箱点位库存列表">
<template #toolbar-tools>
<TableAction
:actions="[
{
label: $t('ui.actionTitle.create', ['烘箱点位库存']),
type: 'primary',
icon: ACTION_ICON.ADD,
auth: ['lms:raw-foil-hot-point-IVT:create'],
onClick: handleCreate,
},
{
label: $t('ui.actionTitle.export'),
type: 'primary',
icon: ACTION_ICON.DOWNLOAD,
auth: ['lms:raw-foil-hot-point-IVT:export'],
onClick: handleExport,
},
{
label: $t('ui.actionTitle.deleteBatch'),
type: 'primary',
danger: true,
icon: ACTION_ICON.DELETE,
auth: ['lms:raw-foil-hot-point-IVT:delete'],
disabled: isEmpty(checkedIds),
onClick: handleDeleteBatch,
},
]"
/>
</template>
<template #actions="{ row }">
<TableAction
:actions="[
{
label: $t('common.edit'),
type: 'link',
icon: ACTION_ICON.EDIT,
auth: ['lms:raw-foil-hot-point-IVT:update'],
onClick: handleEdit.bind(null, row),
},
{
label: $t('common.delete'),
type: 'link',
danger: true,
icon: ACTION_ICON.DELETE,
auth: ['lms:raw-foil-hot-point-IVT:delete'],
popConfirm: {
title: $t('ui.actionMessage.deleteConfirm', [row.ivtId]),
confirm: handleDelete.bind(null, row),
},
},
]"
/>
</template>
</Grid>
</Page>
</template>

View File

@@ -0,0 +1,82 @@
<script lang="ts" setup>
import type { LmsRawFoilHotPointIVTApi } from '#/api/lms/rawfoilhotpointivt';
import { computed, ref } from 'vue';
import { useVbenModal } from '@vben/common-ui';
import { message } from 'antdv-next';
import { useVbenForm } from '#/adapter/form';
import { createRawFoilHotPointIVT, getRawFoilHotPointIVT, updateRawFoilHotPointIVT } from '#/api/lms/rawfoilhotpointivt';
import { $t } from '#/locales';
import { useFormSchema } from '../data';
const emit = defineEmits(['success']);
const formData = ref<LmsRawFoilHotPointIVTApi.RawFoilHotPointIVT>();
const getTitle = computed(() => {
return formData.value?.ivtId
? $t('ui.actionTitle.edit', ['烘箱点位库存'])
: $t('ui.actionTitle.create', ['烘箱点位库存']);
});
const [Form, formApi] = useVbenForm({
commonConfig: {
componentProps: {
class: 'w-full',
},
formItemClass: 'col-span-2',
labelWidth: 80,
},
layout: 'horizontal',
schema: useFormSchema(),
showDefaultActions: false,
});
const [Modal, modalApi] = useVbenModal({
async onConfirm() {
const { valid } = await formApi.validate();
if (!valid) {
return;
}
modalApi.lock();
// 提交表单
const data = (await formApi.getValues()) as LmsRawFoilHotPointIVTApi.RawFoilHotPointIVT;
try {
await (formData.value?.ivtId ? updateRawFoilHotPointIVT(data) : createRawFoilHotPointIVT(data));
// 关闭并提示
await modalApi.close();
emit('success');
message.success($t('ui.actionMessage.operationSuccess'));
} finally {
modalApi.unlock();
}
},
async onOpenChange(isOpen: boolean) {
if (!isOpen) {
formData.value = undefined;
return;
}
// 加载数据
const data = modalApi.getData<LmsRawFoilHotPointIVTApi.RawFoilHotPointIVT>();
if (!data || !data.ivtId) {
return;
}
modalApi.lock();
try {
formData.value = await getRawFoilHotPointIVT(data.ivtId);
// 设置到 values
await formApi.setValues(formData.value);
} finally {
modalApi.unlock();
}
},
});
</script>
<template>
<Modal :title="getTitle">
<Form class="mx-4" />
</Modal>
</template>

View File

@@ -0,0 +1,72 @@
<script lang="ts" setup>
import type { LmsRawFoilWorkOrderApi } from '#/api/lms/rawfoilworkorder';
import { useVbenModal } from '@vben/common-ui';
import { message } from 'antdv-next';
import { useVbenForm } from '#/adapter/form';
import { updateRawFoilWorkOrderRemark } from '#/api/lms/rawfoilworkorder';
import { $t } from '#/locales';
const emit = defineEmits(['success']);
const [Form, formApi] = useVbenForm({
commonConfig: {
componentProps: {
class: 'w-full',
},
labelWidth: 80,
},
layout: 'horizontal',
schema: [
{
fieldName: 'remark',
label: '备注',
component: 'TextArea',
componentProps: {
class: '!w-full',
rows: 4,
placeholder: '请输入检验备注',
},
},
],
showDefaultActions: false,
});
const [Modal, modalApi] = useVbenModal({
async onConfirm() {
const { valid } = await formApi.validate();
if (!valid) {
return;
}
modalApi.lock();
try {
const values = await formApi.getValues();
const row = modalApi.getData<LmsRawFoilWorkOrderApi.RawFoilWorkOrder>();
// 提交备注
await updateRawFoilWorkOrderRemark(row!.workorderId!, values.remark ?? '');
// 关闭并提示
await modalApi.close();
emit('success');
message.success($t('ui.actionMessage.operationSuccess'));
} finally {
modalApi.unlock();
}
},
async onOpenChange(isOpen: boolean) {
if (!isOpen) {
return;
}
// 回填当前工单备注
const row = modalApi.getData<LmsRawFoilWorkOrderApi.RawFoilWorkOrder>();
await formApi.setValues({ remark: row?.remark });
},
});
</script>
<template>
<Modal title="检验">
<Form class="mx-4" />
</Modal>
</template>

View File

@@ -0,0 +1,74 @@
<script lang="ts" setup>
import type { LmsRawFoilWorkOrderApi } from '#/api/lms/rawfoilworkorder';
import { useVbenModal } from '@vben/common-ui';
import { message } from 'antdv-next';
import { useVbenForm } from '#/adapter/form';
import { updateRawFoilWorkOrderWeight } from '#/api/lms/rawfoilworkorder';
import { $t } from '#/locales';
const emit = defineEmits(['success']);
const [Form, formApi] = useVbenForm({
commonConfig: {
componentProps: {
class: 'w-full',
},
labelWidth: 80,
},
layout: 'horizontal',
schema: [
{
fieldName: 'productWeight',
label: '重量',
rules: 'required',
component: 'InputNumber',
componentProps: {
class: '!w-full',
min: 0,
precision: 2,
placeholder: '请输入重量',
},
},
],
showDefaultActions: false,
});
const [Modal, modalApi] = useVbenModal({
async onConfirm() {
const { valid } = await formApi.validate();
if (!valid) {
return;
}
modalApi.lock();
try {
const values = await formApi.getValues();
const row = modalApi.getData<LmsRawFoilWorkOrderApi.RawFoilWorkOrder>();
// 提交称重
await updateRawFoilWorkOrderWeight(row!.workorderId!, values.productWeight);
// 关闭并提示
await modalApi.close();
emit('success');
message.success($t('ui.actionMessage.operationSuccess'));
} finally {
modalApi.unlock();
}
},
async onOpenChange(isOpen: boolean) {
if (!isOpen) {
return;
}
// 回填当前工单重量
const row = modalApi.getData<LmsRawFoilWorkOrderApi.RawFoilWorkOrder>();
await formApi.setValues({ productWeight: row?.productWeight });
},
});
</script>
<template>
<Modal title="称重">
<Form class="mx-4" />
</Modal>
</template>

View File

@@ -309,6 +309,7 @@ const RawFoil_DICT = {
RAWFOIL_CACHEPOSITION_TYPE: 'rawfoil_cacheposition_type', // 生箔母卷缓存位点位类型
RAWFOIL_CACHEPOSITION_STATUS: 'rawfoil_cacheposition_status', // 生箔母卷缓存位库存状态
EMPTYROLLER_CACHEPOSITION_TYPE: 'emptyroller_cacheposition_type', // 空辊缓存位点位类型
RAWFOIL_HOTPOINT_STATUS: 'rawfoil_hotpoint_status', // 烘箱点位状态
} as const;
/** 字典类型枚举 - 统一导出 */