gaoluyang
22 小时以前 cd8b52bdf89a4d1101f72e0ece9f4df22a3d3f7a
src/views/mes/pro/route/data.ts
@@ -11,13 +11,14 @@
  CommonStatusEnum,
  DICT_TYPE,
  MesAutoCodeRuleCode,
} from '..\..\..\..\packages\constants\src';
import { getDictOptions } from '..\..\..\..\packages\effects\hooks\src';
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { Button } from 'ant-design-vue';
import { z } from '#/adapter/form';
import { generateAutoCode } from '#/api/mes/md/autocode/record';
import { getTemplatePage } from '#/api/mes/pro/processdesign/template';
import {
  MdItemSelect,
  MdProductBomSelect,
@@ -166,7 +167,7 @@
      field: 'createTime',
      title: '创建时间',
      width: 180,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '操作',
@@ -216,15 +217,50 @@
      rules: 'selectRequired',
    },
    {
      fieldName: 'paramTemplateId',
      label: '工艺参数模板',
      component: 'ApiSelect',
      componentProps: {
        api: () => getTemplatePage({ pageNo: 1, pageSize: 100 }),
        labelField: 'templateName',
        valueField: 'id',
        resultField: 'list',
        allowClear: true,
        placeholder: '请选择工艺参数模板',
      },
    },
    {
      fieldName: 'yieldRate',
      label: '收率',
      component: 'InputNumber',
      componentProps: {
        class: '!w-full',
        min: 0.0001,
        max: 1,
        step: 0.01,
        precision: 4,
        placeholder: '产出/投入,如 0.98',
      },
    },
    {
      fieldName: 'linkType',
      label: '与下道工序关系',
      component: 'Select',
      help: () =>
        h(
          'div',
          {
            style:
              'white-space: pre-line; max-width: 320px; line-height: 1.6;',
          },
          '0=开始-开始(SS):本工序开始后,下道工序才能开始(可重叠并行开工)\n1=结束-结束(FF):下道工序必须等到本工序结束才能结束(并行但同步完工)\n2=开始-结束(SF):本工序开始后,下道工序才能结束\n3=结束-开始(FS):本工序结束后,下道工序才能开始(默认值)',
        ),
      componentProps: {
        allowClear: true,
        options: getDictOptions(DICT_TYPE.MES_PRO_LINK_TYPE, 'number'),
        placeholder: '请选择',
      },
      rules: z.number().default(3),
      rules: z.number().optional(),
    },
    {
      fieldName: 'colorCode',