fields.js 2.96 KB
Newer Older
krysent's avatar
krysent committed
1
import { doFetch } from "@/utils/doFetch";
krysent's avatar
krysent committed
2 3 4 5 6 7
import {
  factorySelect,
  shopSelectByFactory,
  StoreAreaselection,
  storeselectionBoxAll,
} from "@/services/system";
krysent's avatar
krysent committed
8
export default {
krysent's avatar
krysent committed
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
  storePositionCode: {
    value: null,
    type: "input",
    title: "库位编码",
    name: ["storePositionCode"],
    required: true,
  },
  storePositionName: {
    value: null,
    type: "input",
    title: "库位名称",
    name: ["storePositionName"],
    required: true,
  },
  factoryId: {
    value: null,
    type: "select",
    title: "所属工厂",
    name: ["factoryId"],
    required: true,
    options: {
      database: factorySelect,
      params: {},
krysent's avatar
krysent committed
32
    },
krysent's avatar
krysent committed
33 34 35 36 37 38 39 40 41 42 43
    linked: true,
  },
  storeId: {
    value: null,
    type: "select",
    title: "所属仓库",
    name: ["storeId"],
    required: true,
    linked: true,
    belinked: {
      options: {
krysent's avatar
krysent committed
44
        database: storeselectionBoxAll,
krysent's avatar
krysent committed
45 46 47 48
        params: {
          factoryId: "linked",
        },
      },
krysent's avatar
krysent committed
49
    },
krysent's avatar
krysent committed
50 51 52 53 54 55 56 57 58
  },
  storeAreaId: {
    value: null,
    type: "select",
    title: "所属库区",
    name: ["storeAreaId"],
    required: true,
    belinked: {
      options: {
krysent's avatar
krysent committed
59
        database: StoreAreaselection,
krysent's avatar
krysent committed
60 61 62 63
        params: {
          storeId: "linked",
        },
      },
krysent's avatar
krysent committed
64
    },
krysent's avatar
krysent committed
65 66
    linked: true,
  },
krysent's avatar
krysent committed
67

krysent's avatar
krysent committed
68 69 70 71 72
  status: {
    value: 1,
    type: "select",
    name: ["status"],
    title: "库位状态",
krysent's avatar
krysent committed
73
    required: false,
krysent's avatar
krysent committed
74 75 76 77 78 79 80 81 82 83 84
    options: [
      {
        label: "启用",
        value: 1,
      },
      {
        label: "停用",
        value: 2,
      },
    ],
  },
krysent's avatar
krysent committed
85 86
  /* `isMovePosition` 是对象中表示表单字段的属性。它的类型为“radio”,这意味着它将在表单中呈现为单选按钮组。用户可以选择“是”(是)或“否”(否)作为该字段的值。 */
  /* `isMovePosition` 是对象中表示表单字段的属性。它的类型为“radio”,这意味着它将在表单中呈现为单选按钮组。用户可以选择“是”(是)或“否”(否)作为该字段的值。 */
krysent's avatar
krysent committed
87 88
  isMovePosition: {
    value: 1,
krysent's avatar
krysent committed
89
    type: "select",
krysent's avatar
krysent committed
90 91 92 93 94 95 96 97 98 99 100 101 102 103
    name: ["isMovePosition"],
    title: "是否为移库库位",
    required: false,
    options: [
      {
        label: "是",
        value: 1,
      },
      {
        label: "否",
        value: 0,
      },
    ],
  },
krysent's avatar
krysent committed
104 105 106 107 108 109 110 111 112 113 114
  wzpz: {
    type: "split",
    title: "位置配置",
    name: ["wzpz"],
    col: { span: 24 },
  },
  row: {
    value: null,
    type: "input",
    title: "排",
    name: ["row"],
krysent's avatar
krysent committed
115
    required: true,
krysent's avatar
krysent committed
116 117 118 119 120 121
  },
  line: {
    value: null,
    type: "input",
    title: "列",
    name: ["line"],
krysent's avatar
krysent committed
122
    required: true,
krysent's avatar
krysent committed
123 124 125 126 127 128
  },
  level: {
    value: null,
    type: "input",
    title: "层",
    name: ["level"],
krysent's avatar
krysent committed
129
    required: true,
krysent's avatar
krysent committed
130 131 132 133 134 135 136
    allowHalf: true,
  },
  roadway: {
    value: null,
    type: "input",
    title: "巷道",
    name: ["roadway"],
krysent's avatar
krysent committed
137
    required: true,
krysent's avatar
krysent committed
138 139
    allowHalf: true,
  },
krysent's avatar
krysent committed
140

krysent's avatar
krysent committed
141 142 143 144 145 146 147 148 149
  remark: {
    value: null,
    type: "textarea",
    title: "备注",
    name: ["remark"],
    required: false,
    col: { span: 24 },
  },
};