fix(@vben/web-antdv-next): 在web-antdv-next,表单适配器只有TextArea,没有Textarea

pull/355/head
XuZhiqiang 2026-06-04 16:42:46 +08:00
parent 03f167b7d0
commit 70aed10752
125 changed files with 667 additions and 327 deletions

View File

@ -17,7 +17,7 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'systemMessage',
label: '角色设定',
component: 'Textarea',
component: 'TextArea',
componentProps: {
rows: 4,
placeholder: '请输入角色设定',

View File

@ -28,7 +28,7 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'description',
label: '知识库描述',
component: 'Textarea',
component: 'TextArea',
componentProps: {
rows: 3,
placeholder: '请输入知识库描述',

View File

@ -31,7 +31,7 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'description',
label: '知识库描述',
component: 'Textarea',
component: 'TextArea',
componentProps: {
rows: 3,
placeholder: '请输入知识库描述',

View File

@ -77,7 +77,7 @@ export function useFormSchema(): VbenFormSchema[] {
},
},
{
component: 'Textarea',
component: 'TextArea',
fieldName: 'description',
label: '角色描述',
componentProps: {
@ -88,7 +88,7 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'systemMessage',
label: '角色设定',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入角色设定',
},

View File

@ -39,7 +39,7 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'description',
label: '分类描述',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入分类描述',
},

View File

@ -181,7 +181,7 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
rows: 4,

View File

@ -100,7 +100,7 @@ export function useFormSchema(): VbenFormSchema[] {
},
},
{
component: 'Textarea',
component: 'TextArea',
fieldName: 'description',
label: '产品描述',
componentProps: {

View File

@ -162,7 +162,7 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
rows: 4,

View File

@ -137,7 +137,7 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
rows: 4,

View File

@ -82,7 +82,7 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
rows: 3,

View File

@ -77,7 +77,7 @@ export function useFormSchema(formType: FormType): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
autoSize: { minRows: 1, maxRows: 1 },

View File

@ -77,7 +77,7 @@ export function useFormSchema(formType: FormType): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
autoSize: { minRows: 1, maxRows: 1 },

View File

@ -144,7 +144,7 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
},

View File

@ -78,7 +78,7 @@ export function useFormSchema(formType: FormType): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
autoSize: { minRows: 1, maxRows: 1 },

View File

@ -64,7 +64,7 @@ export function useFormSchema(formType: FormType): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
autoSize: { minRows: 1, maxRows: 1 },

View File

@ -78,7 +78,7 @@ export function useFormSchema(formType: FormType): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
autoSize: { minRows: 1, maxRows: 1 },

View File

@ -133,7 +133,7 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
rows: 3,

View File

@ -134,7 +134,7 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
rows: 3,

View File

@ -77,7 +77,7 @@ export function useFormSchema(formType: FormType): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
autoSize: { minRows: 1, maxRows: 1 },

View File

@ -95,7 +95,7 @@ export function useFormSchema(formType: FormType): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
autoSize: { minRows: 1, maxRows: 1 },

View File

@ -91,7 +91,7 @@ export function useFormSchema(formType: FormType): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
autoSize: { minRows: 1, maxRows: 1 },

View File

@ -47,7 +47,7 @@ export function useFormSchema(formType: FormType): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
autoSize: { minRows: 1, maxRows: 1 },

View File

@ -62,7 +62,7 @@ export function useFormSchema(formType: FormType): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
autoSize: { minRows: 1, maxRows: 1 },

View File

@ -47,7 +47,7 @@ export function useFormSchema(formType: FormType): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
autoSize: { minRows: 1, maxRows: 1 },

View File

@ -64,7 +64,7 @@ export function useFormSchema(formType: FormType): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
autoSize: { minRows: 1, maxRows: 1 },

View File

@ -90,7 +90,7 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
},

View File

@ -43,7 +43,7 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
},

View File

@ -19,7 +19,9 @@ import { NotifyTemplateSelect } from '#/views/system/notify/template/components'
import { SmsTemplateSelect } from '#/views/system/sms/template/components';
function hasReceiveType(values: Partial<Record<string, any>>, type: number) {
return Array.isArray(values.receiveTypes) && values.receiveTypes.includes(type);
return (
Array.isArray(values.receiveTypes) && values.receiveTypes.includes(type)
);
}
/** 新增/修改告警配置的表单 */
@ -45,7 +47,7 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'description',
label: '配置描述',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入配置描述',
rows: 3,
@ -155,7 +157,8 @@ export function useFormSchema(): VbenFormSchema[] {
component: markRaw(NotifyTemplateSelect),
dependencies: {
triggerFields: ['receiveTypes'],
show: (values) => hasReceiveType(values, IotAlertReceiveTypeEnum.NOTIFY),
show: (values) =>
hasReceiveType(values, IotAlertReceiveTypeEnum.NOTIFY),
trigger: async (values, formApi) => {
if (
!hasReceiveType(values, IotAlertReceiveTypeEnum.NOTIFY) &&

View File

@ -42,7 +42,7 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'description',
label: '分组描述',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入分组描述',
rows: 3,

View File

@ -95,7 +95,7 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'description',
label: '固件描述',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入固件描述',
rows: 3,

View File

@ -53,7 +53,7 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'description',
label: '任务描述',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入任务描述',
rows: 3,

View File

@ -58,7 +58,7 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'description',
label: '描述',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入分类描述',
rows: 3,

View File

@ -190,7 +190,7 @@ export function useAdvancedFormSchema(): VbenFormSchema[] {
{
fieldName: 'description',
label: '产品描述',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入产品描述',
rows: 3,

View File

@ -65,7 +65,7 @@ export function useRuleFormSchema(): VbenFormSchema[] {
{
fieldName: 'description',
label: '规则描述',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入规则描述',
rows: 3,

View File

@ -61,7 +61,7 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'description',
label: '品牌描述',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入品牌描述',
},

View File

@ -68,7 +68,7 @@ export function useInfoFormSchema(): VbenFormSchema[] {
{
fieldName: 'introduction',
label: '商品简介',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入商品简介',
autoSize: { minRows: 2, maxRows: 2 },

View File

@ -82,7 +82,7 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'memo',
label: '描述',
component: 'Textarea',
component: 'TextArea',
componentProps: {
rows: 4,
placeholder: '请输入描述',

View File

@ -45,7 +45,7 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'description',
label: '优惠券描述',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入优惠券描述',
},

View File

@ -119,7 +119,7 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
rows: 4,

View File

@ -130,7 +130,7 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
rows: 4,

View File

@ -135,7 +135,7 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'mark',
label: '会员备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入会员备注',
},
@ -365,7 +365,7 @@ export function useLevelFormSchema(): VbenFormSchema[] {
{
fieldName: 'reason',
label: '修改原因',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入修改原因',
},

View File

@ -38,7 +38,7 @@ export function useHolidayFormSchema(): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
rows: 3,

View File

@ -4,7 +4,13 @@ import type { MesCalPlanApi } from '#/api/mes/cal/plan';
import { h } from 'vue';
import { DICT_TYPE, MesAutoCodeRuleCode, MesCalPlanStatusEnum, MesCalShiftMethodEnum, MesCalShiftTypeEnum } from '@vben/constants';
import {
DICT_TYPE,
MesAutoCodeRuleCode,
MesCalPlanStatusEnum,
MesCalShiftMethodEnum,
MesCalShiftTypeEnum,
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { Button } from 'antdv-next';
@ -55,7 +61,9 @@ export function useFormSchema(
{
type: 'default',
onClick: async () => {
const code = await generateAutoCode(MesAutoCodeRuleCode.CAL_PLAN_CODE);
const code = await generateAutoCode(
MesAutoCodeRuleCode.CAL_PLAN_CODE,
);
await formApi?.setFieldValue('code', code);
},
},
@ -126,7 +134,8 @@ export function useFormSchema(
},
dependencies: {
triggerFields: ['shiftType'],
show: (values) => !!values.shiftType && values.shiftType !== MesCalShiftTypeEnum.SINGLE,
show: (values) =>
!!values.shiftType && values.shiftType !== MesCalShiftTypeEnum.SINGLE,
},
},
{
@ -146,7 +155,7 @@ export function useFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入备注',
@ -237,8 +246,18 @@ export function useGridColumns(): VxeTableGridOptions<MesCalPlanApi.Plan>['colum
props: { type: DICT_TYPE.MES_CAL_CALENDAR_TYPE },
},
},
{ field: 'startDate', title: '开始日期', width: 150, formatter: 'formatDate' },
{ field: 'endDate', title: '结束日期', width: 150, formatter: 'formatDate' },
{
field: 'startDate',
title: '开始日期',
width: 150,
formatter: 'formatDate',
},
{
field: 'endDate',
title: '结束日期',
width: 150,
formatter: 'formatDate',
},
{
field: 'shiftType',
title: '轮班方式',
@ -266,7 +285,12 @@ export function useGridColumns(): VxeTableGridOptions<MesCalPlanApi.Plan>['colum
props: { type: DICT_TYPE.MES_CAL_PLAN_STATUS },
},
},
{ field: 'createTime', title: '创建时间', width: 180, formatter: 'formatDateTime' },
{
field: 'createTime',
title: '创建时间',
width: 180,
formatter: 'formatDateTime',
},
{
title: '操作',
width: 160,

View File

@ -18,14 +18,19 @@ import {
} from '#/api/mes/cal/plan/shift';
import { $t } from '#/locales';
const props = withDefaults(defineProps<{ formType?: FormType; planId: number }>(), {
formType: 'update',
});
const props = withDefaults(
defineProps<{ formType?: FormType; planId: number }>(),
{
formType: 'update',
},
);
const isEditable = computed(() => props.formType !== 'detail'); //
const formOpen = ref(false); //
const formLoading = ref(false); //
const shiftFormType = ref<'create' | 'update'>('create'); //
const formTitle = computed(() => (shiftFormType.value === 'create' ? '添加班次' : '修改班次'));
const formTitle = computed(() =>
shiftFormType.value === 'create' ? '添加班次' : '修改班次',
);
const list = ref<MesCalPlanShiftApi.PlanShift[]>([]); //
const [Form, formApi] = useVbenForm({
@ -99,7 +104,7 @@ const [Form, formApi] = useVbenForm({
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
rows: 3,
@ -157,7 +162,10 @@ async function getList() {
}
/** 打开班次表单 */
async function openForm(type: 'create' | 'update', row?: MesCalPlanShiftApi.PlanShift) {
async function openForm(
type: 'create' | 'update',
row?: MesCalPlanShiftApi.PlanShift,
) {
formOpen.value = true;
shiftFormType.value = type;
await formApi.resetForm();
@ -173,7 +181,9 @@ async function submitForm() {
formLoading.value = true;
try {
const data = (await formApi.getValues()) as MesCalPlanShiftApi.PlanShift;
await (shiftFormType.value === 'create' ? createPlanShift(data) : updatePlanShift(data));
await (shiftFormType.value === 'create'
? createPlanShift(data)
: updatePlanShift(data));
formOpen.value = false;
message.success($t('ui.actionMessage.operationSuccess'));
await getList();
@ -204,14 +214,24 @@ watch(
<div>
<div v-if="isEditable" class="mb-3 flex items-center justify-start">
<TableAction
:actions="[{ label: '添加班次', type: 'primary', onClick: openForm.bind(null, 'create') }]"
:actions="[
{
label: '添加班次',
type: 'primary',
onClick: openForm.bind(null, 'create'),
},
]"
/>
</div>
<Grid class="w-full">
<template #actions="{ row }">
<TableAction
:actions="[
{ label: '编辑', type: 'link', onClick: openForm.bind(null, 'update', row) },
{
label: '编辑',
type: 'link',
onClick: openForm.bind(null, 'update', row),
},
{
label: '删除',
type: 'link',

View File

@ -47,7 +47,9 @@ export function useFormSchema(
{
type: 'default',
onClick: async () => {
const code = await generateAutoCode(MesAutoCodeRuleCode.CAL_TEAM_CODE);
const code = await generateAutoCode(
MesAutoCodeRuleCode.CAL_TEAM_CODE,
);
await formApi?.setFieldValue('code', code);
},
},
@ -78,7 +80,7 @@ export function useFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
maxLength: 250,
@ -145,7 +147,12 @@ export function useGridColumns(): VxeTableGridOptions<MesCalTeamApi.Team>['colum
},
},
{ field: 'remark', title: '备注', minWidth: 180 },
{ field: 'createTime', title: '创建时间', width: 180, formatter: 'formatDateTime' },
{
field: 'createTime',
title: '创建时间',
width: 180,
formatter: 'formatDateTime',
},
{
title: '操作',
width: 180,

View File

@ -18,10 +18,15 @@ import {
import { getSimpleUserList } from '#/api/system/user';
import { $t } from '#/locales';
const props = withDefaults(defineProps<{ formType?: FormType; teamId: number }>(), {
formType: 'update',
});
const isEditable = computed(() => ['create', 'update'].includes(props.formType)); //
const props = withDefaults(
defineProps<{ formType?: FormType; teamId: number }>(),
{
formType: 'update',
},
);
const isEditable = computed(() =>
['create', 'update'].includes(props.formType),
); //
const formOpen = ref(false); //
const formLoading = ref(false); //
const list = ref<MesCalTeamMemberApi.TeamMember[]>([]); //
@ -61,7 +66,7 @@ const [Form, formApi] = useVbenForm({
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
rows: 3,
@ -163,7 +168,9 @@ watch(
<template>
<div>
<div v-if="isEditable" class="mb-3 flex items-center justify-start">
<TableAction :actions="[{ label: '添加成员', type: 'primary', onClick: openForm }]" />
<TableAction
:actions="[{ label: '添加成员', type: 'primary', onClick: openForm }]"
/>
</div>
<Grid class="w-full">
<template #actions="{ row }">

View File

@ -4,7 +4,12 @@ import type { MesDvCheckPlanApi } from '#/api/mes/dv/checkplan';
import { h } from 'vue';
import { DICT_TYPE, MesAutoCodeRuleCode, MesDvCheckPlanStatusEnum, MesDvSubjectTypeEnum } from '@vben/constants';
import {
DICT_TYPE,
MesAutoCodeRuleCode,
MesDvCheckPlanStatusEnum,
MesDvSubjectTypeEnum,
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { Button } from 'antdv-next';
@ -56,7 +61,9 @@ export function useFormSchema(
{
type: 'default',
onClick: async () => {
const code = await generateAutoCode(MesAutoCodeRuleCode.DV_CHECK_PLAN_CODE);
const code = await generateAutoCode(
MesAutoCodeRuleCode.DV_CHECK_PLAN_CODE,
);
await formApi?.setFieldValue('code', code);
},
},
@ -130,7 +137,7 @@ export function useFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入备注',
@ -213,8 +220,18 @@ export function useGridColumns(): VxeTableGridOptions<MesDvCheckPlanApi.CheckPla
props: { type: DICT_TYPE.MES_DV_SUBJECT_TYPE },
},
},
{ field: 'startDate', title: '开始日期', width: 150, formatter: 'formatDate' },
{ field: 'endDate', title: '结束日期', width: 150, formatter: 'formatDate' },
{
field: 'startDate',
title: '开始日期',
width: 150,
formatter: 'formatDate',
},
{
field: 'endDate',
title: '结束日期',
width: 150,
formatter: 'formatDate',
},
{
field: 'cycleType',
title: '周期类型',
@ -234,7 +251,12 @@ export function useGridColumns(): VxeTableGridOptions<MesDvCheckPlanApi.CheckPla
props: { type: DICT_TYPE.MES_DV_CHECK_PLAN_STATUS },
},
},
{ field: 'createTime', title: '创建时间', width: 180, formatter: 'formatDateTime' },
{
field: 'createTime',
title: '创建时间',
width: 180,
formatter: 'formatDateTime',
},
{
title: '操作',
width: 240,
@ -287,8 +309,18 @@ export function useCheckPlanSelectGridColumns(
props: { type: DICT_TYPE.MES_DV_SUBJECT_TYPE },
},
},
{ field: 'startDate', title: '开始日期', width: 120, formatter: 'formatDate' },
{ field: 'endDate', title: '结束日期', width: 120, formatter: 'formatDate' },
{
field: 'startDate',
title: '开始日期',
width: 120,
formatter: 'formatDate',
},
{
field: 'endDate',
title: '结束日期',
width: 120,
formatter: 'formatDate',
},
{ field: 'cycleCount', title: '频率', width: 100 },
{
field: 'cycleType',

View File

@ -57,7 +57,7 @@ const [Form, formApi] = useVbenForm({
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
rows: 3,
@ -159,7 +159,9 @@ watch(
<template>
<div>
<div v-if="isEditable" class="mb-3 flex items-center justify-start">
<TableAction :actions="[{ label: '添加设备', type: 'primary', onClick: openForm }]" />
<TableAction
:actions="[{ label: '添加设备', type: 'primary', onClick: openForm }]"
/>
</div>
<Grid class="w-full">
<template #actions="{ row }">

View File

@ -60,7 +60,7 @@ const [Form, formApi] = useVbenForm({
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
rows: 3,
@ -171,7 +171,9 @@ watch(
<template>
<div>
<div v-if="isEditable" class="mb-3 flex items-center justify-start">
<TableAction :actions="[{ label: '添加项目', type: 'primary', onClick: openForm }]" />
<TableAction
:actions="[{ label: '添加项目', type: 'primary', onClick: openForm }]"
/>
</div>
<Grid class="w-full">
<template #actions="{ row }">

View File

@ -4,7 +4,12 @@ import type { MesDvCheckRecordApi } from '#/api/mes/dv/checkrecord';
import { markRaw } from 'vue';
import { DICT_TYPE, MesDvCheckPlanStatusEnum, MesDvCheckRecordStatusEnum, MesDvSubjectTypeEnum } from '@vben/constants';
import {
DICT_TYPE,
MesDvCheckPlanStatusEnum,
MesDvCheckRecordStatusEnum,
MesDvSubjectTypeEnum,
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { getSimpleUserList } from '#/api/system/user';
@ -81,7 +86,7 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入备注',
@ -137,7 +142,12 @@ export function useGridColumns(): VxeTableGridOptions<MesDvCheckRecordApi.CheckR
},
},
{ field: 'planName', title: '计划名称', minWidth: 150 },
{ field: 'checkTime', title: '点检时间', width: 180, formatter: 'formatDateTime' },
{
field: 'checkTime',
title: '点检时间',
width: 180,
formatter: 'formatDateTime',
},
{ field: 'nickname', title: '点检人', minWidth: 120 },
{
field: 'status',
@ -148,7 +158,12 @@ export function useGridColumns(): VxeTableGridOptions<MesDvCheckRecordApi.CheckR
props: { type: DICT_TYPE.MES_DV_CHECK_RECORD_STATUS },
},
},
{ field: 'createTime', title: '创建时间', width: 180, formatter: 'formatDateTime' },
{
field: 'createTime',
title: '创建时间',
width: 180,
formatter: 'formatDateTime',
},
{
title: '操作',
width: 200,

View File

@ -4,7 +4,11 @@ import type { MesDvCheckRecordLineApi } from '#/api/mes/dv/checkrecord/line';
import { computed, ref, watch } from 'vue';
import { DICT_TYPE, MesDvCheckResultEnum, MesDvSubjectTypeEnum } from '@vben/constants';
import {
DICT_TYPE,
MesDvCheckResultEnum,
MesDvSubjectTypeEnum,
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { message, Modal } from 'antdv-next';
@ -25,7 +29,9 @@ const props = defineProps<{ disabled?: boolean; recordId: number }>();
const formOpen = ref(false);
const formLoading = ref(false);
const lineFormType = ref<'create' | 'update'>('create');
const formTitle = computed(() => (lineFormType.value === 'create' ? '添加明细' : '修改明细'));
const formTitle = computed(() =>
lineFormType.value === 'create' ? '添加明细' : '修改明细',
);
const [Form, formApi] = useVbenForm({
commonConfig: {
@ -77,7 +83,7 @@ const [Form, formApi] = useVbenForm({
{
fieldName: 'checkResult',
label: '异常描述',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入异常描述',
rows: 3,
@ -86,7 +92,7 @@ const [Form, formApi] = useVbenForm({
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
rows: 2,
@ -144,7 +150,10 @@ const [Grid, gridApi] = useVbenVxeGrid({
});
/** 打开点检明细表单 */
async function openForm(type: 'create' | 'update', row?: MesDvCheckRecordLineApi.CheckRecordLine) {
async function openForm(
type: 'create' | 'update',
row?: MesDvCheckRecordLineApi.CheckRecordLine,
) {
formOpen.value = true;
lineFormType.value = type;
await formApi.resetForm();
@ -168,7 +177,8 @@ async function submitForm() {
}
formLoading.value = true;
try {
const data = (await formApi.getValues()) as MesDvCheckRecordLineApi.CheckRecordLine;
const data =
(await formApi.getValues()) as MesDvCheckRecordLineApi.CheckRecordLine;
await (data.id ? updateCheckRecordLine(data) : createCheckRecordLine(data));
formOpen.value = false;
message.success($t('ui.actionMessage.operationSuccess'));
@ -197,14 +207,24 @@ watch(
<div class="mx-4 mt-4">
<div v-if="!disabled" class="mb-3">
<TableAction
:actions="[{ label: '添加明细', type: 'primary', onClick: openForm.bind(null, 'create') }]"
:actions="[
{
label: '添加明细',
type: 'primary',
onClick: openForm.bind(null, 'create'),
},
]"
/>
</div>
<Grid table-title="">
<template #actions="{ row }">
<TableAction
:actions="[
{ label: '编辑', type: 'link', onClick: openForm.bind(null, 'update', row) },
{
label: '编辑',
type: 'link',
onClick: openForm.bind(null, 'update', row),
},
{
label: '删除',
type: 'link',

View File

@ -4,7 +4,11 @@ import type { MesDvMachineryApi } from '#/api/mes/dv/machinery';
import { h, markRaw } from 'vue';
import { DICT_TYPE, MesAutoCodeRuleCode, MesDvMachineryStatusEnum } from '@vben/constants';
import {
DICT_TYPE,
MesAutoCodeRuleCode,
MesDvMachineryStatusEnum,
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { Button } from 'antdv-next';
@ -19,7 +23,10 @@ import { DvMachineryTypeSelect } from './type/components';
export type FormType = 'create' | 'detail' | 'update';
/** 新增/修改设备的表单 */
export function useFormSchema(formType: FormType, formApi?: VbenFormApi): VbenFormSchema[] {
export function useFormSchema(
formType: FormType,
formApi?: VbenFormApi,
): VbenFormSchema[] {
return [
{
fieldName: 'id',
@ -50,7 +57,9 @@ export function useFormSchema(formType: FormType, formApi?: VbenFormApi): VbenFo
{
type: 'default',
onClick: async () => {
const code = await generateAutoCode(MesAutoCodeRuleCode.DV_MACHINERY_CODE);
const code = await generateAutoCode(
MesAutoCodeRuleCode.DV_MACHINERY_CODE,
);
await formApi?.setFieldValue('code', code);
},
},
@ -146,7 +155,7 @@ export function useFormSchema(formType: FormType, formApi?: VbenFormApi): VbenFo
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入备注',

View File

@ -4,7 +4,11 @@ import type { MesDvMachineryTypeApi } from '#/api/mes/dv/machinery/type';
import { h } from 'vue';
import { CommonStatusEnum, DICT_TYPE, MesAutoCodeRuleCode } from '@vben/constants';
import {
CommonStatusEnum,
DICT_TYPE,
MesAutoCodeRuleCode,
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { handleTree } from '@vben/utils';
@ -38,7 +42,11 @@ export function useFormSchema(
componentProps: {
allowClear: true,
api: async () => [
{ id: 0, name: '顶级类型', children: handleTree(await getMachineryTypeList()) },
{
id: 0,
name: '顶级类型',
children: handleTree(await getMachineryTypeList()),
},
],
childrenField: 'children',
labelField: 'name',
@ -110,7 +118,7 @@ export function useFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
rows: 3,
@ -147,7 +155,13 @@ export function useGridFormSchema(): VbenFormSchema[] {
/** 列表的字段 */
export function useGridColumns(): VxeTableGridOptions<MesDvMachineryTypeApi.MachineryType>['columns'] {
return [
{ field: 'name', title: '类型名称', minWidth: 200, align: 'left', treeNode: true },
{
field: 'name',
title: '类型名称',
minWidth: 200,
align: 'left',
treeNode: true,
},
{ field: 'code', title: '类型编码', width: 160, align: 'center' },
{ field: 'sort', title: '排序', width: 100, align: 'center' },
{

View File

@ -4,7 +4,12 @@ import type { MesDvMaintenRecordApi } from '#/api/mes/dv/maintenrecord';
import { markRaw } from 'vue';
import { DICT_TYPE, MesDvCheckPlanStatusEnum, MesDvMaintenRecordStatusEnum, MesDvSubjectTypeEnum } from '@vben/constants';
import {
DICT_TYPE,
MesDvCheckPlanStatusEnum,
MesDvMaintenRecordStatusEnum,
MesDvSubjectTypeEnum,
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { getSimpleUserList } from '#/api/system/user';
@ -81,7 +86,7 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入备注',
@ -137,7 +142,12 @@ export function useGridColumns(): VxeTableGridOptions<MesDvMaintenRecordApi.Main
},
},
{ field: 'planName', title: '计划名称', minWidth: 150 },
{ field: 'maintenTime', title: '保养时间', width: 180, formatter: 'formatDateTime' },
{
field: 'maintenTime',
title: '保养时间',
width: 180,
formatter: 'formatDateTime',
},
{ field: 'nickname', title: '保养人', minWidth: 120 },
{
field: 'status',
@ -148,7 +158,12 @@ export function useGridColumns(): VxeTableGridOptions<MesDvMaintenRecordApi.Main
props: { type: DICT_TYPE.MES_MAINTEN_RECORD_STATUS },
},
},
{ field: 'createTime', title: '创建时间', width: 180, formatter: 'formatDateTime' },
{
field: 'createTime',
title: '创建时间',
width: 180,
formatter: 'formatDateTime',
},
{
title: '操作',
width: 200,

View File

@ -4,7 +4,11 @@ import type { MesDvMaintenRecordLineApi } from '#/api/mes/dv/maintenrecord/line'
import { computed, ref, watch } from 'vue';
import { DICT_TYPE, MesDvMaintenStatusEnum, MesDvSubjectTypeEnum } from '@vben/constants';
import {
DICT_TYPE,
MesDvMaintenStatusEnum,
MesDvSubjectTypeEnum,
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { message, Modal } from 'antdv-next';
@ -25,7 +29,9 @@ const props = defineProps<{ disabled?: boolean; recordId: number }>();
const formOpen = ref(false);
const formLoading = ref(false);
const lineFormType = ref<'create' | 'update'>('create');
const formTitle = computed(() => (lineFormType.value === 'create' ? '添加明细' : '修改明细'));
const formTitle = computed(() =>
lineFormType.value === 'create' ? '添加明细' : '修改明细',
);
const [Form, formApi] = useVbenForm({
commonConfig: {
@ -77,7 +83,7 @@ const [Form, formApi] = useVbenForm({
{
fieldName: 'result',
label: '异常描述',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入异常描述',
rows: 3,
@ -86,7 +92,7 @@ const [Form, formApi] = useVbenForm({
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
rows: 2,
@ -171,8 +177,11 @@ async function submitForm() {
}
formLoading.value = true;
try {
const data = (await formApi.getValues()) as MesDvMaintenRecordLineApi.MaintenRecordLine;
await (data.id ? updateMaintenRecordLine(data) : createMaintenRecordLine(data));
const data =
(await formApi.getValues()) as MesDvMaintenRecordLineApi.MaintenRecordLine;
await (data.id
? updateMaintenRecordLine(data)
: createMaintenRecordLine(data));
formOpen.value = false;
message.success($t('ui.actionMessage.operationSuccess'));
await gridApi.query();
@ -200,14 +209,24 @@ watch(
<div class="mx-4 mt-4">
<div v-if="!disabled" class="mb-3">
<TableAction
:actions="[{ label: '添加明细', type: 'primary', onClick: openForm.bind(null, 'create') }]"
:actions="[
{
label: '添加明细',
type: 'primary',
onClick: openForm.bind(null, 'create'),
},
]"
/>
</div>
<Grid table-title="">
<template #actions="{ row }">
<TableAction
:actions="[
{ label: '编辑', type: 'link', onClick: openForm.bind(null, 'update', row) },
{
label: '编辑',
type: 'link',
onClick: openForm.bind(null, 'update', row),
},
{
label: '删除',
type: 'link',

View File

@ -4,7 +4,11 @@ import type { MesDvRepairApi } from '#/api/mes/dv/repair';
import { h, markRaw } from 'vue';
import { DICT_TYPE, MesAutoCodeRuleCode, MesDvRepairStatusEnum } from '@vben/constants';
import {
DICT_TYPE,
MesAutoCodeRuleCode,
MesDvRepairStatusEnum,
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { Button } from 'antdv-next';
@ -54,7 +58,9 @@ export function useFormSchema(
},
dependencies: {
triggerFields: ['id'],
componentProps: (values) => ({ disabled: headerReadonly || !!values.id }),
componentProps: (values) => ({
disabled: headerReadonly || !!values.id,
}),
},
rules: 'required',
suffix: headerReadonly
@ -65,7 +71,9 @@ export function useFormSchema(
{
type: 'default',
onClick: async () => {
const code = await generateAutoCode(MesAutoCodeRuleCode.DV_REPAIR_CODE);
const code = await generateAutoCode(
MesAutoCodeRuleCode.DV_REPAIR_CODE,
);
await formApi?.setFieldValue('code', code);
},
},
@ -205,7 +213,7 @@ export function useFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
disabled: headerReadonly,
@ -288,8 +296,18 @@ export function useGridColumns(): VxeTableGridOptions<MesDvRepairApi.Repair>['co
},
{ field: 'name', title: '维修单名称', minWidth: 150 },
{ field: 'machineryName', title: '设备名称', minWidth: 150 },
{ field: 'requireDate', title: '报修日期', width: 180, formatter: 'formatDateTime' },
{ field: 'finishDate', title: '完成日期', width: 180, formatter: 'formatDateTime' },
{
field: 'requireDate',
title: '报修日期',
width: 180,
formatter: 'formatDateTime',
},
{
field: 'finishDate',
title: '完成日期',
width: 180,
formatter: 'formatDateTime',
},
{
field: 'result',
title: '维修结果',
@ -308,7 +326,12 @@ export function useGridColumns(): VxeTableGridOptions<MesDvRepairApi.Repair>['co
props: { type: DICT_TYPE.MES_DV_REPAIR_STATUS },
},
},
{ field: 'createTime', title: '创建时间', width: 180, formatter: 'formatDateTime' },
{
field: 'createTime',
title: '创建时间',
width: 180,
formatter: 'formatDateTime',
},
{
title: '操作',
width: 260,

View File

@ -64,7 +64,7 @@ const [Form, formApi] = useVbenForm({
{
fieldName: 'malfunction',
label: '故障描述',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入故障描述',
rows: 3,
@ -82,7 +82,7 @@ const [Form, formApi] = useVbenForm({
{
fieldName: 'description',
label: '维修描述',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入维修描述',
rows: 3,
@ -91,7 +91,7 @@ const [Form, formApi] = useVbenForm({
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
rows: 2,
@ -143,7 +143,10 @@ const [Grid, gridApi] = useVbenVxeGrid({
});
/** 打开维修明细表单 */
async function openForm(type: 'create' | 'update', row?: MesDvRepairLineApi.RepairLine) {
async function openForm(
type: 'create' | 'update',
row?: MesDvRepairLineApi.RepairLine,
) {
formOpen.value = true;
lineFormType.value = type;
await formApi.resetForm();
@ -198,7 +201,11 @@ watch(
<div v-if="!disabled" class="mb-3">
<TableAction
:actions="[
{ label: '添加维修项目', type: 'primary', onClick: openForm.bind(null, 'create') },
{
label: '添加维修项目',
type: 'primary',
onClick: openForm.bind(null, 'create'),
},
]"
/>
</div>
@ -206,7 +213,11 @@ watch(
<template #actions="{ row }">
<TableAction
:actions="[
{ label: '编辑', type: 'link', onClick: openForm.bind(null, 'update', row) },
{
label: '编辑',
type: 'link',
onClick: openForm.bind(null, 'update', row),
},
{
label: '删除',
type: 'link',

View File

@ -51,7 +51,9 @@ export function useFormSchema(
{
type: 'default',
onClick: async () => {
const code = await generateAutoCode(MesAutoCodeRuleCode.DV_SUBJECT_CODE);
const code = await generateAutoCode(
MesAutoCodeRuleCode.DV_SUBJECT_CODE,
);
await formApi?.setFieldValue('code', code);
},
},
@ -81,7 +83,7 @@ export function useFormSchema(
{
fieldName: 'content',
label: '项目内容',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-2',
componentProps: {
placeholder: '请输入项目内容',
@ -92,7 +94,7 @@ export function useFormSchema(
{
fieldName: 'standard',
label: '标准',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-2',
componentProps: {
placeholder: '请输入标准',
@ -114,7 +116,7 @@ export function useFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-2',
componentProps: {
placeholder: '请输入备注',

View File

@ -3,7 +3,11 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MesMdAutoCodePartApi } from '#/api/mes/md/autocode/part';
import type { MesMdAutoCodeRuleApi } from '#/api/mes/md/autocode/rule';
import { CommonStatusEnum, DICT_TYPE, MesAutoCodePartTypeEnum } from '@vben/constants';
import {
CommonStatusEnum,
DICT_TYPE,
MesAutoCodePartTypeEnum,
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { z } from '#/adapter/form';
@ -114,7 +118,7 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
rows: 3,
@ -375,7 +379,7 @@ export function usePartFormSchema(): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
rows: 3,

View File

@ -4,7 +4,11 @@ import type { MesMdClientApi } from '#/api/mes/md/client';
import { h } from 'vue';
import { CommonStatusEnum, DICT_TYPE, MesAutoCodeRuleCode } from '@vben/constants';
import {
CommonStatusEnum,
DICT_TYPE,
MesAutoCodeRuleCode,
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { Button } from 'antdv-next';
@ -94,7 +98,7 @@ export function useFormSchema(
{
fieldName: 'description',
label: '客户简介',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入客户简介',
@ -104,7 +108,7 @@ export function useFormSchema(
{
fieldName: 'address',
label: '客户地址',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入客户地址',
@ -216,7 +220,7 @@ export function useFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入备注',

View File

@ -5,7 +5,11 @@ import type { MesMdProductBomApi } from '#/api/mes/md/item/productBom';
import { h, markRaw } from 'vue';
import { CommonStatusEnum, DICT_TYPE, MesAutoCodeRuleCode } from '@vben/constants';
import {
CommonStatusEnum,
DICT_TYPE,
MesAutoCodeRuleCode,
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { Button } from 'antdv-next';
@ -176,7 +180,7 @@ export function useFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
rows: 3,

View File

@ -111,7 +111,7 @@ const [Form, formApi] = useVbenForm({
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
rows: 3,

View File

@ -98,7 +98,7 @@ const [Form, formApi] = useVbenForm({
{
fieldName: 'description',
label: '内容说明',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入详细描述',
rows: 3,
@ -121,7 +121,7 @@ const [Form, formApi] = useVbenForm({
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
rows: 3,

View File

@ -133,7 +133,7 @@ export function useFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
rows: 3,

View File

@ -96,7 +96,7 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
rows: 3,

View File

@ -4,7 +4,11 @@ import type { MesMdVendorApi } from '#/api/mes/md/vendor';
import { h } from 'vue';
import { CommonStatusEnum, DICT_TYPE, MesAutoCodeRuleCode } from '@vben/constants';
import {
CommonStatusEnum,
DICT_TYPE,
MesAutoCodeRuleCode,
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { Button } from 'antdv-next';
@ -93,7 +97,7 @@ export function useFormSchema(
{
fieldName: 'description',
label: '供应商简介',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入供应商简介',
@ -103,7 +107,7 @@ export function useFormSchema(
{
fieldName: 'address',
label: '供应商地址',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入供应商地址',
@ -226,7 +230,7 @@ export function useFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入备注',

View File

@ -4,7 +4,11 @@ import type { MesMdWorkstationApi } from '#/api/mes/md/workstation';
import { h, markRaw } from 'vue';
import { CommonStatusEnum, DICT_TYPE, MesAutoCodeRuleCode } from '@vben/constants';
import {
CommonStatusEnum,
DICT_TYPE,
MesAutoCodeRuleCode,
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { Button } from 'antdv-next';
@ -169,7 +173,7 @@ export function useFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入备注',

View File

@ -77,7 +77,7 @@ const [Form, formApi] = useVbenForm({
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
rows: 3,

View File

@ -88,7 +88,7 @@ const [Form, formApi] = useVbenForm({
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
rows: 3,

View File

@ -84,7 +84,7 @@ const [Form, formApi] = useVbenForm({
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
rows: 3,

View File

@ -4,7 +4,11 @@ import type { MesMdWorkshopApi } from '#/api/mes/md/workstation/workshop';
import { h } from 'vue';
import { CommonStatusEnum, DICT_TYPE, MesAutoCodeRuleCode } from '@vben/constants';
import {
CommonStatusEnum,
DICT_TYPE,
MesAutoCodeRuleCode,
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { Button } from 'antdv-next';
@ -107,7 +111,7 @@ export function useFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-2',
componentProps: {
placeholder: '请输入备注',

View File

@ -45,7 +45,7 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'reason',
label: '呼叫原因',
component: 'Textarea',
component: 'TextArea',
componentProps: {
autoSize: { maxRows: 3, minRows: 1 },
maxLength: 200,

View File

@ -263,10 +263,7 @@ export function useFormSchema(
component: 'Select',
componentProps: {
disabled: true,
options: getDictOptions(
DICT_TYPE.MES_PRO_ANDON_STATUS,
'number',
),
options: getDictOptions(DICT_TYPE.MES_PRO_ANDON_STATUS, 'number'),
},
},
{
@ -306,7 +303,7 @@ export function useFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
disabled: formType === 'detail',
maxLength: 250,

View File

@ -5,7 +5,11 @@ import type { MesProCardProcessApi } from '#/api/mes/pro/card/process';
import { h, markRaw } from 'vue';
import { DICT_TYPE, MesAutoCodeRuleCode, MesProWorkOrderStatusEnum } from '@vben/constants';
import {
DICT_TYPE,
MesAutoCodeRuleCode,
MesProWorkOrderStatusEnum,
} from '@vben/constants';
import { Button } from 'antdv-next';
@ -120,7 +124,7 @@ export function useFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
disabled: headerReadonly,
@ -409,7 +413,7 @@ export function useProcessFormSchema(): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-2',
componentProps: {
placeholder: '请输入备注',

View File

@ -5,7 +5,12 @@ import type { MesProTaskApi } from '#/api/mes/pro/task';
import { h, markRaw } from 'vue';
import { DICT_TYPE, MesAutoCodeRuleCode, MesProTaskStatusEnum, MesProWorkOrderStatusEnum } from '@vben/constants';
import {
DICT_TYPE,
MesAutoCodeRuleCode,
MesProTaskStatusEnum,
MesProWorkOrderStatusEnum,
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { Button } from 'antdv-next';
@ -457,8 +462,7 @@ export function useFormSchema(
(values?.materialScrapQuantity || 0) +
(values?.otherScrapQuantity || 0);
await formApi?.setValues({
feedbackQuantity:
(values?.qualifiedQuantity || 0) + unqualified,
feedbackQuantity: (values?.qualifiedQuantity || 0) + unqualified,
unqualifiedQuantity: unqualified,
});
},
@ -486,8 +490,7 @@ export function useFormSchema(
(values?.materialScrapQuantity || 0) +
(values?.otherScrapQuantity || 0);
await formApi?.setValues({
feedbackQuantity:
(values?.qualifiedQuantity || 0) + unqualified,
feedbackQuantity: (values?.qualifiedQuantity || 0) + unqualified,
unqualifiedQuantity: unqualified,
});
},
@ -515,8 +518,7 @@ export function useFormSchema(
(values?.materialScrapQuantity || 0) +
(values?.otherScrapQuantity || 0);
await formApi?.setValues({
feedbackQuantity:
(values?.qualifiedQuantity || 0) + unqualified,
feedbackQuantity: (values?.qualifiedQuantity || 0) + unqualified,
unqualifiedQuantity: unqualified,
});
},
@ -573,7 +575,7 @@ export function useFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
disabled: formType === 'detail',

View File

@ -5,7 +5,11 @@ import type { MesProProcessContentApi } from '#/api/mes/pro/process/content';
import { h } from 'vue';
import { CommonStatusEnum, DICT_TYPE, MesAutoCodeRuleCode } from '@vben/constants';
import {
CommonStatusEnum,
DICT_TYPE,
MesAutoCodeRuleCode,
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { Button } from 'antdv-next';
@ -75,7 +79,7 @@ export function useFormSchema(formApi?: VbenFormApi): VbenFormSchema[] {
{
fieldName: 'attention',
label: '工序说明',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
maxLength: 500,
@ -86,7 +90,7 @@ export function useFormSchema(formApi?: VbenFormApi): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
maxLength: 250,
@ -204,7 +208,7 @@ export function useContentFormSchema(): VbenFormSchema[] {
{
fieldName: 'content',
label: '步骤说明',
component: 'Textarea',
component: 'TextArea',
componentProps: {
maxLength: 500,
placeholder: '请输入步骤说明',
@ -241,7 +245,7 @@ export function useContentFormSchema(): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
maxLength: 250,
placeholder: '请输入备注',

View File

@ -7,7 +7,11 @@ import type { MesProRouteProductBomApi } from '#/api/mes/pro/route/productbom';
import { h, markRaw } from 'vue';
import { CommonStatusEnum, DICT_TYPE, MesAutoCodeRuleCode } from '@vben/constants';
import {
CommonStatusEnum,
DICT_TYPE,
MesAutoCodeRuleCode,
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { Button } from 'antdv-next';
@ -69,7 +73,7 @@ export function useFormSchema(formApi?: VbenFormApi): VbenFormSchema[] {
{
fieldName: 'description',
label: '路线说明',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-2',
componentProps: {
maxLength: 500,
@ -80,7 +84,7 @@ export function useFormSchema(formApi?: VbenFormApi): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-2',
componentProps: {
maxLength: 250,
@ -272,7 +276,7 @@ export function useRouteProcessFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-2',
componentProps: {
maxLength: 250,
@ -377,7 +381,6 @@ export function useRouteProductBomGridColumns(): VxeTableGridOptions<MesProRoute
];
}
/** 工艺路线产品表单 */
export function useRouteProductFormSchema(
onItemChange?: (item: any) => void,
@ -440,7 +443,7 @@ export function useRouteProductFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-2',
componentProps: {
maxLength: 250,
@ -503,7 +506,7 @@ export function useRouteProductBomFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
maxLength: 250,
placeholder: '请输入备注',

View File

@ -198,7 +198,10 @@ export function useScheduleFormSchema(): VbenFormSchema[] {
component: 'Select',
componentProps: {
disabled: true,
options: getDictOptions(DICT_TYPE.MES_PRO_WORK_ORDER_SOURCE_TYPE, 'number'),
options: getDictOptions(
DICT_TYPE.MES_PRO_WORK_ORDER_SOURCE_TYPE,
'number',
),
},
},
{
@ -291,7 +294,7 @@ export function useScheduleFormSchema(): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
disabled: true,
@ -443,7 +446,7 @@ export function useTaskFormSchema(formApi?: VbenFormApi): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入备注',

View File

@ -6,7 +6,12 @@ import type { MesProWorkOrderBomApi } from '#/api/mes/pro/workorder/bom';
import { h, markRaw } from 'vue';
import { DICT_TYPE, MesAutoCodeRuleCode, MesProWorkOrderSourceTypeEnum, MesProWorkOrderTypeEnum } from '@vben/constants';
import {
DICT_TYPE,
MesAutoCodeRuleCode,
MesProWorkOrderSourceTypeEnum,
MesProWorkOrderTypeEnum,
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { Button } from 'antdv-next';
@ -14,7 +19,10 @@ import { Button } from 'antdv-next';
import { generateAutoCode } from '#/api/mes/md/autocode/record';
import { getRangePickerDefaultProps } from '#/utils';
import { MdClientSelect } from '#/views/mes/md/client/components';
import { MdItemSelect, MdProductBomSelect } from '#/views/mes/md/item/components';
import {
MdItemSelect,
MdProductBomSelect,
} from '#/views/mes/md/item/components';
import { MdVendorSelect } from '#/views/mes/md/vendor/components';
/** 表单类型 */
@ -232,7 +240,7 @@ export function useFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
disabled: headerReadonly,
@ -542,7 +550,7 @@ export function useBomFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
rows: 3,

View File

@ -48,7 +48,7 @@ export function useFormSchema(formApi?: VbenFormApi): VbenFormSchema[] {
{
fieldName: 'name',
label: '缺陷描述',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入缺陷描述',
rows: 2,
@ -80,7 +80,7 @@ export function useFormSchema(formApi?: VbenFormApi): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
rows: 3,

View File

@ -14,7 +14,7 @@ export function useDefectRecordInlineFormSchema(): VbenFormSchema[] {
{
fieldName: 'name',
label: '缺陷描述',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-2',
componentProps: {
placeholder: '请输入缺陷描述',

View File

@ -4,7 +4,11 @@ import type { MesQcIndicatorApi } from '#/api/mes/qc/indicator';
import { h, markRaw } from 'vue';
import { DICT_TYPE, MesAutoCodeRuleCode, MesQcResultValueType } from '@vben/constants';
import {
DICT_TYPE,
MesAutoCodeRuleCode,
MesQcResultValueType,
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { Button } from 'antdv-next';
@ -111,7 +115,7 @@ export function useFormSchema(formApi?: VbenFormApi): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
maxlength: 250,
placeholder: '请输入备注',

View File

@ -60,7 +60,7 @@ export function useQcIndicatorResultFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-2',
componentProps: {
placeholder: '请输入备注',

View File

@ -5,7 +5,12 @@ import type { MesQcIpqcLineApi } from '#/api/mes/qc/ipqc/line';
import { h, markRaw } from 'vue';
import { DICT_TYPE, MesAutoCodeRuleCode, MesProTaskStatusEnum, MesProWorkOrderStatusEnum } from '@vben/constants';
import {
DICT_TYPE,
MesAutoCodeRuleCode,
MesProTaskStatusEnum,
MesProWorkOrderStatusEnum,
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { Button } from 'antdv-next';
@ -340,7 +345,7 @@ export function useFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入备注',

View File

@ -249,7 +249,7 @@ export function useFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入备注',

View File

@ -282,7 +282,7 @@ export function useFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入备注',

View File

@ -5,7 +5,11 @@ import type { MesQcRqcLineApi } from '#/api/mes/qc/rqc/line';
import { h, markRaw } from 'vue';
import { DICT_TYPE, MesAutoCodeRuleCode, MesQcSourceDocTypeEnum } from '@vben/constants';
import {
DICT_TYPE,
MesAutoCodeRuleCode,
MesQcSourceDocTypeEnum,
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { Button } from 'antdv-next';
@ -245,7 +249,7 @@ export function useFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入备注',

View File

@ -6,7 +6,11 @@ import type { MesQcTemplateItemApi } from '#/api/mes/qc/template/item';
import { h, markRaw } from 'vue';
import { CommonStatusEnum, DICT_TYPE, MesAutoCodeRuleCode } from '@vben/constants';
import {
CommonStatusEnum,
DICT_TYPE,
MesAutoCodeRuleCode,
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { Button } from 'antdv-next';
@ -89,7 +93,7 @@ export function useFormSchema(formApi?: VbenFormApi): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入备注',
@ -315,7 +319,7 @@ export function useIndicatorFormSchema(): VbenFormSchema[] {
{
fieldName: 'checkMethod',
label: '检测方法',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-2',
componentProps: {
placeholder: '请输入检测方法',
@ -334,7 +338,7 @@ export function useIndicatorFormSchema(): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-2',
componentProps: {
placeholder: '请输入备注',
@ -491,7 +495,7 @@ export function useItemFormSchema(): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入备注',

View File

@ -4,7 +4,12 @@ import type { MesTmToolApi } from '#/api/mes/tm/tool';
import { h, markRaw } from 'vue';
import { DICT_TYPE, MesAutoCodeRuleCode, MesMaintenTypeEnum, MesToolStatusEnum } from '@vben/constants';
import {
DICT_TYPE,
MesAutoCodeRuleCode,
MesMaintenTypeEnum,
MesToolStatusEnum,
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { formatDateTime } from '@vben/utils';
@ -62,7 +67,9 @@ export function useFormSchema(
{
type: 'default',
onClick: async () => {
const code = await generateAutoCode(MesAutoCodeRuleCode.TM_TOOL_CODE);
const code = await generateAutoCode(
MesAutoCodeRuleCode.TM_TOOL_CODE,
);
await formApi?.setFieldValue('code', code);
},
},
@ -119,7 +126,9 @@ export function useFormSchema(
class: '!w-full',
min: 1,
onChange: async (value?: number) => {
const values = (await formApi?.getValues()) as MesTmToolApi.Tool | undefined;
const values = (await formApi?.getValues()) as
| MesTmToolApi.Tool
| undefined;
if (!values?.id) {
await formApi?.setFieldValue('availableQuantity', value);
}
@ -198,7 +207,7 @@ export function useFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入备注',
@ -292,10 +301,14 @@ export function useGridColumns(): VxeTableGridOptions<MesTmToolApi.Tool>['column
width: 180,
formatter: ({ row }) => {
if (row.maintenType === MesMaintenTypeEnum.REGULAR) {
return row.nextMaintenDate ? formatDateTime(row.nextMaintenDate) : '-';
return row.nextMaintenDate
? formatDateTime(row.nextMaintenDate)
: '-';
}
if (row.maintenType === MesMaintenTypeEnum.USAGE) {
return row.nextMaintenPeriod == null ? '-' : `${row.nextMaintenPeriod}`;
return row.nextMaintenPeriod == null
? '-'
: `${row.nextMaintenPeriod}`;
}
return '-';
},

View File

@ -4,7 +4,11 @@ import type { MesTmToolTypeApi } from '#/api/mes/tm/tool/type';
import { h } from 'vue';
import { DICT_TYPE, MesAutoCodeRuleCode, MesMaintenTypeEnum } from '@vben/constants';
import {
DICT_TYPE,
MesAutoCodeRuleCode,
MesMaintenTypeEnum,
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { Button } from 'antdv-next';
@ -46,7 +50,9 @@ export function useFormSchema(
{
type: 'default',
onClick: async () => {
const code = await generateAutoCode(MesAutoCodeRuleCode.TM_TOOL_TYPE_CODE);
const code = await generateAutoCode(
MesAutoCodeRuleCode.TM_TOOL_TYPE_CODE,
);
await formApi?.setFieldValue('code', code);
},
},
@ -101,14 +107,16 @@ export function useFormSchema(
triggerFields: ['codeFlag', 'maintenType'],
show: (values) =>
!!values.codeFlag &&
[MesMaintenTypeEnum.REGULAR, MesMaintenTypeEnum.USAGE].includes(values.maintenType),
[MesMaintenTypeEnum.REGULAR, MesMaintenTypeEnum.USAGE].includes(
values.maintenType,
),
},
rules: 'required',
},
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-2',
componentProps: {
placeholder: '请输入备注',

View File

@ -123,7 +123,7 @@ export function useFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入备注',
@ -341,7 +341,7 @@ export function useLineFormSchema(): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入备注',

View File

@ -86,7 +86,8 @@ export function useFormSchema(): VbenFormSchema[] {
h(
Button,
{
onClick: () => message.warning('打印模板选择功能暂未实现,敬请期待'),
onClick: () =>
message.warning('打印模板选择功能暂未实现,敬请期待'),
},
{ default: () => '设置' },
),
@ -103,7 +104,7 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
rows: 2,

View File

@ -41,10 +41,7 @@ import {
} from '../warehouse/components';
/** 业务对象选中后回填业务编码、业务名称、条码内容 */
async function syncBizDetail(
formApi: undefined | VbenFormApi,
item: any,
) {
async function syncBizDetail(formApi: undefined | VbenFormApi, item: any) {
if (!formApi) {
return;
}
@ -467,7 +464,7 @@ export function useFormSchema(formApi?: VbenFormApi): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
componentProps: {
placeholder: '请输入备注',
rows: 2,

View File

@ -8,7 +8,11 @@ import type { MesWmItemReceiptLineApi } from '#/api/mes/wm/itemreceipt/line';
import { h, markRaw } from 'vue';
import { DICT_TYPE, MesAutoCodeRuleCode, MesWmArrivalNoticeStatusEnum } from '@vben/constants';
import {
DICT_TYPE,
MesAutoCodeRuleCode,
MesWmArrivalNoticeStatusEnum,
} from '@vben/constants';
import { Button } from 'antdv-next';
@ -31,9 +35,7 @@ export type FormType = 'create' | 'detail' | 'finish' | 'stock' | 'update';
/** 表单头部是否只读(上架、详情、入库态) */
function isHeaderReadonly(formType: FormType): boolean {
return (
formType === 'detail' || formType === 'finish' || formType === 'stock'
);
return formType === 'detail' || formType === 'finish' || formType === 'stock';
}
/** 新增/修改的表单 */
@ -138,7 +140,7 @@ export function useFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入备注',
@ -398,7 +400,7 @@ export function useLineFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入备注',

View File

@ -124,7 +124,7 @@ export function useFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入备注',
@ -441,7 +441,7 @@ export function useLineFormSchema(formApi?: VbenFormApi): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入备注',

View File

@ -123,7 +123,7 @@ export function useFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入备注',
@ -411,7 +411,7 @@ export function useLineFormSchema(formApi?: VbenFormApi): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入备注',

View File

@ -8,7 +8,12 @@ import type { MesWmOutsourceIssueLineApi } from '#/api/mes/wm/outsourceissue/lin
import { h, markRaw } from 'vue';
import { DICT_TYPE, MesAutoCodeRuleCode, MesProWorkOrderStatusEnum, MesProWorkOrderTypeEnum } from '@vben/constants';
import {
DICT_TYPE,
MesAutoCodeRuleCode,
MesProWorkOrderStatusEnum,
MesProWorkOrderTypeEnum,
} from '@vben/constants';
import { Button } from 'antdv-next';
@ -29,9 +34,7 @@ export type FormType = 'create' | 'detail' | 'finish' | 'stock' | 'update';
/** 表单头部是否只读(拣货、详情、领出态) */
function isHeaderReadonly(formType: FormType): boolean {
return (
formType === 'detail' || formType === 'finish' || formType === 'stock'
);
return formType === 'detail' || formType === 'finish' || formType === 'stock';
}
/** 新增/修改的表单 */
@ -125,7 +128,7 @@ export function useFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入备注',
@ -318,7 +321,7 @@ export function useLineFormSchema(): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入备注',

View File

@ -7,7 +7,12 @@ import type { MesWmOutsourceReceiptLineApi } from '#/api/mes/wm/outsourcereceipt
import { h, markRaw } from 'vue';
import { DICT_TYPE, MesAutoCodeRuleCode, MesProWorkOrderStatusEnum, MesProWorkOrderTypeEnum } from '@vben/constants';
import {
DICT_TYPE,
MesAutoCodeRuleCode,
MesProWorkOrderStatusEnum,
MesProWorkOrderTypeEnum,
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { Button } from 'antdv-next';
@ -29,9 +34,7 @@ export type FormType = 'create' | 'detail' | 'finish' | 'stock' | 'update';
/** 表单头部是否只读(上架、详情、完成态) */
function isHeaderReadonly(formType: FormType): boolean {
return (
formType === 'detail' || formType === 'finish' || formType === 'stock'
);
return formType === 'detail' || formType === 'finish' || formType === 'stock';
}
/** 新增/修改的表单 */
@ -126,7 +129,7 @@ export function useFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入备注',
@ -391,7 +394,7 @@ export function useLineFormSchema(): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入备注',
@ -526,7 +529,7 @@ export function useDetailFormSchema(formApi?: VbenFormApi): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-2',
componentProps: {
placeholder: '请输入备注',

View File

@ -5,7 +5,11 @@ import type { MesWmPackageLineApi } from '#/api/mes/wm/packages/line';
import { h, markRaw } from 'vue';
import { DICT_TYPE, MesAutoCodeRuleCode, MesProWorkOrderStatusEnum } from '@vben/constants';
import {
DICT_TYPE,
MesAutoCodeRuleCode,
MesProWorkOrderStatusEnum,
} from '@vben/constants';
import { Button } from 'antdv-next';
@ -188,7 +192,7 @@ export function useFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入备注',
@ -457,7 +461,7 @@ export function useLineFormSchema(): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-2',
componentProps: {
placeholder: '请输入备注',

View File

@ -7,7 +7,11 @@ import type { MesWmProductIssueLineApi } from '#/api/mes/wm/productissue/line';
import { h, markRaw } from 'vue';
import { DICT_TYPE, MesAutoCodeRuleCode, MesProWorkOrderStatusEnum } from '@vben/constants';
import {
DICT_TYPE,
MesAutoCodeRuleCode,
MesProWorkOrderStatusEnum,
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { Button } from 'antdv-next';
@ -29,9 +33,7 @@ export type FormType = 'create' | 'detail' | 'finish' | 'stock' | 'update';
/** 表单头部是否只读(拣货、详情、完成态) */
function isHeaderReadonly(formType: FormType): boolean {
return (
formType === 'detail' || formType === 'finish' || formType === 'stock'
);
return formType === 'detail' || formType === 'finish' || formType === 'stock';
}
/** 新增/修改的表单 */
@ -123,7 +125,7 @@ export function useFormSchema(
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入备注',
@ -169,7 +171,10 @@ export function useGridFormSchema(): VbenFormSchema[] {
component: 'Select',
componentProps: {
allowClear: true,
options: getDictOptions(DICT_TYPE.MES_WM_PRODUCT_ISSUE_STATUS, 'number'),
options: getDictOptions(
DICT_TYPE.MES_WM_PRODUCT_ISSUE_STATUS,
'number',
),
placeholder: '请选择单据状态',
},
},
@ -300,7 +305,7 @@ export function useLineFormSchema(): VbenFormSchema[] {
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
component: 'TextArea',
formItemClass: 'col-span-3',
componentProps: {
placeholder: '请输入备注',

Some files were not shown because too many files have changed in this diff Show More