fields.js 1.98 KB
Newer Older
wuhao's avatar
wuhao committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
import {
  factorySelect,
  shopSelectByFactory,
  sectionSelectByShop,
} from "@/services/system";
export default {
  workingProcedureCode: {
    value: null,
    type: "input",
    title: "工序编号",
    name: ["workingProcedureCode"],
    required: true,
  },
  workingProcedureName: {
    value: null,
    type: "input",
    title: "工序名称",
    name: ["workingProcedureName"],
    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" },
      },
    },
  },
  workingProcedureType: {
    value: null,
    type: "select",
    title: "工序类型",
    name: ["workingProcedureType"],
    required: true,
    options: [
      {
        label: "生产",
        value: 1,
      },
      {
        label: "检验",
        value: 2,
      },
      {
        label: "包装",
        value: 3,
      },
    ],
  },
  collectionMode: {
    value: null,
    type: "select",
    title: "采集方式",
    name: ["collectionMode"],
    required: true,
    options: [
      {
        label: "上下线",
        value: 1,
      },
      {
        label: "一次",
        value: 2,
      },
      {
        label: "投料",
        value: 3,
      },
    ],
  },
  remark: {
    value: null,
    type: "textarea",
    title: "描述",
    name: ["remark"],
    required: false,
    col: { span: 24 },
  },
};