import { factorySelect, shopSelectByFactory } from "@/services/system";
import regValue from "@/utils/regValue";
export default {
  processLineCode: {
    value: null,
    type: "input",
    title: "工艺路线编号",
    name: ["processLineCode"],
    required: true,
  },
  processLineName: {
    value: null,
    type: "input",
    title: "工艺路线名称",
    name: ["processLineName"],
    required: true,
  },
  factoryId: {
    value: null,
    type: "select",
    title: "所属工厂",
    name: ["factoryId"],
    required: true,
    options: {
      database: factorySelect,
      params: {},
    },
    linked: true,
  },
  shopId: {
    value: null,
    type: "select",
    title: "所属车间",
    name: ["shopId"],
    required: true,
    belinked: {
      options: {
        database: shopSelectByFactory,
        params: { factoryId: "linked" },
      },
    },
    linked: true,
  },
  processLineType: {
    value: null,
    type: "select",
    title: "工艺路线类型",
    name: ["processLineType"],
    required: false,
    options: [
      {
        label: "常规",
        value: 1,
      },
      {
        label: "返工",
        value: 2,
      },
    ],
  },
  capacity: {
    value: null,
    type: "inputnumber",
    title: "能力",
    name: ["capacity"],
    required: false,
    ...regValue(null, 6, 3),
  },
  remark: {
    value: null,
    type: "textarea",
    title: "描述",
    name: ["remark"],
    required: false,
    col: { span: 24 },
  },
};
