import { selectboxMaterie } from "@/services/craft";
import regValue from "@/utils/regValue";
const addFields = {
  materieId: {
    value: null,
    type: "select",
    title: "物料编号-名称-单位",
    name: ["materieId"],
    required: true,
    options: {
      database: selectboxMaterie,
      params: { materieType: 0 },
    },
  },
  planNum: {
    value: null,
    type: "inputnumber",
    title: "计划数量",
    name: ["planNum"],
    required: true,
    ...regValue(null, 6, 3),
  },
  planStartDate: {
    value: null,
    type: "datepicker",
    title: "计划开始时间",
    name: ["planStartDate"],
    required: true,
    format: "YYYY-MM-DD",
    showTime: false,
    disabledDate: null,
    disabledDateTime: null,
  },
  planEndDate: {
    value: null,
    type: "datepicker",
    title: "计划完成时间",
    name: ["planEndDate"],
    required: true,
    format: "YYYY-MM-DD",
    showTime: false,
    disabledDate: null,
    disabledDateTime: null,
  },
  sortNo: {
    value: null,
    type: "inputnumber",
    title: "排序号",
    name: ["sortNo"],
    required: false,
    ...regValue("integer"),
  },
  description: {
    value: null,
    type: "textarea",
    title: "描述",
    name: ["description"],
    required: false,
    col: {
      span: 24,
    },
  },
  productionOrderNo: {
    value: null,
    type: "input",
    title: "生产订单编号",
    name: ["productionOrderNo"],
    required: false,
  },
  saleOrderNo: {
    value: null,
    type: "input",
    title: "销售订单号",
    name: ["saleOrderNo"],
    required: false,
  },
  lineNo: {
    value: null,
    type: "input",
    title: "行号",
    name: ["lineNo"],
    required: false,
  },
  customerName: {
    value: null,
    type: "input",
    title: "客户名称",
    name: ["customerName"],
    required: false,
  },
  specs: {
    value: null,
    type: "input",
    title: "规格",
    name: ["specs"],
    required: false,
  },
  color: {
    value: null,
    type: "input",
    title: "颜色",
    name: ["color"],
    required: false,
  },
};
export { addFields };
