import { factorySelect, shopSelectByFactory } from "@/services/system";
export default {
  shiftNo: {
    value: null,
    type: "input",
    title: "班次编号",
    name: ["shiftNo"],
    required: true,
  },
  shiftName: {
    value: null,
    type: "input",
    title: "班次名称",
    name: ["shiftName"],
    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" },
      },
    },
  },
  endTimeType: {
    value: null,
    type: "select",
    title: "结束日",
    name: ["endTimeType"],
    required: true,
    options: [
      {
        label: "当日",
        value: 1,
      },
      {
        label: "次日",
        value: 2,
      },
    ],
  },
  startTime: {
    value: null,
    type: "timepicker",
    title: "开始时间",
    name: ["startTime"],
    required: true,
  },
  endTime: {
    value: null,
    type: "timepicker",
    title: "结束时间",
    name: ["endTime"],
    required: true,
  },
  description: {
    value: null,
    type: "textarea",
    title: "描述",
    name: ["description"],
    required: false,
    col: { span: 24 },
  },
};
