fields.js 1.32 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
import { unitSelect } from "@/services/craft";
import { bmTableFileSelect } from "@/services/platform";
import regValue from "@/utils/regValue";
export default {
  tableNo: {
    value: null,
    type: "input",
    title: "标签模板编号",
    name: ["tableNo"],
    required: true,
  },
  tableName: {
    value: null,
    type: "input",
    title: "标签模板名称",
    name: ["tableName"],
    required: true,
  },
  tableType: {
    value: null,
    type: "select",
    title: "标签模板类别",
    name: ["tableType"],
    required: true,
    options: {
      database: unitSelect,
      params: { dicKey: "table_template" },
    },
  },
  length: {
    value: null,
    title: "标签长度(cm)",
    type: "inputnumber",
    name: ["length"],
    required: true,
    ...regValue(null, 6, 3),
  },
  width: {
    value: null,
    title: "标签宽度(cm)",
    type: "inputnumber",
    name: ["width"],
    required: true,
    ...regValue(null, 6, 3),
  },
  tableFileId: {
    value: null,
    type: "select",
    title: "标签模板",
    name: ["tableFileId"],
    required: true,
    options: {
      database: bmTableFileSelect,
      params: { tableType: 0 },
    },
  },
  remark: {
    value: null,
    type: "textarea",
    title: "描述",
    name: ["remark"],
    required: false,
    col: { span: 24 },
  },
};