import {
  factorySelect,
  shopSelectByFactory,
  sectionSelectByShop,
} from "@/services/system";
export default {
  groupNo: {
    value: null,
    type: "input",
    title: "班组编号",
    name: ["groupNo"],
    required: true,
  },
  groupName: {
    value: null,
    type: "input",
    title: "班组名称",
    name: ["groupName"],
    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,
  },
  sectionId: {
    value: null,
    type: "select",
    title: "所属工段",
    name: ["sectionId"],
    required: true,
    belinked: {
      options: {
        database: sectionSelectByShop,
        params: { shopId: "linked", factoryId: "linked" },
      },
    },
  },
  description: {
    value: null,
    type: "textarea",
    title: "描述",
    name: ["description"],
    required: false,
    col: { span: 24 },
  },
};
