import { factorySelect } from "@/services/system";
import { doFetch } from "@/utils/doFetch";
export default {
  storeAreaName: {
    value: null,
    type: "input",
    title: "库区名称",
    name: ["storeAreaName"],
    required: true,
  },
  factoryId: {
    value: null,
    type: "select",
    title: "工厂",
    name: ["factoryId"],
    required: true,
    options: {
      database: factorySelect,
      params: {},
    },
    linked: true,
    required: true,
  },

  storeId: {
    value: null,
    type: "select",
    title: "负责仓库",
    name: ["storeId"],
    required: false,
    belinked: {
      options: {
        database: (params) =>
          doFetch({
            url: "/ngic-auth/sysStore/selectionBox",
            params: { ...params },
          }),
        params: {
          factoryId: "linked",
        },
      },
    },
    required: true, 
  },
  remark: {
    value: null,
    type: "textarea",
    title: "描述",
    name: ["remark"],
    required: false,
  },
};
