fields.js 4.21 KB
Newer Older
krysent's avatar
krysent committed
1 2 3 4
export default {
    "customerNo": {
        "value": null,
        "type": "input",
krysent's avatar
krysent committed
5
        "title": "仓位编码",
krysent's avatar
krysent committed
6 7 8 9 10 11 12 13
        "name": [
            "customerNo"
        ],
        "required": false
    },
    "customerName": {
        "value": null,
        "type": "input",
krysent's avatar
krysent committed
14
        "title": "仓位名称",
krysent's avatar
krysent committed
15 16 17 18 19 20 21 22
        "name": [
            "customerName"
        ],
        "required": true
    },
    "officialWebsite": {
        "value": null,
        "type": "input",
krysent's avatar
krysent committed
23
        "title": "所属仓库",
krysent's avatar
krysent committed
24 25 26 27 28 29 30 31
        "name": [
            "officialWebsite"
        ],
        "required": false
    },
    "telephone": {
        "value": null,
        "type": "input",
krysent's avatar
krysent committed
32
        "title": "所属库区",
krysent's avatar
krysent committed
33 34 35 36 37 38 39 40
        "name": [
            "telephone"
        ],
        "required": false
    },
    "email": {
        "value": null,
        "type": "input",
krysent's avatar
krysent committed
41
        "title": "排",
krysent's avatar
krysent committed
42 43 44 45 46 47 48 49
        "name": [
            "email"
        ],
        "required": false
    },
    "address": {
        "value": null,
        "type": "input",
krysent's avatar
krysent committed
50
        "title": "列",
krysent's avatar
krysent committed
51 52 53 54 55 56 57 58
        "name": [
            "address"
        ],
        "required": false
    },
    "score": {
        "value": null,
        "type": "rate",
krysent's avatar
krysent committed
59
        "title": "层",
krysent's avatar
krysent committed
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 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174
        "name": [
            "score"
        ],
        "required": false,
        allowHalf: true,
    },
    "status": {
        "value": 1,
        "type": "select",
        "title": "启停状态",
        "name": [
            "status"
        ],
        "required": true,
        options: [
            {
                label: "启用",
                value: 1
            },
            {
                label: "停用",
                value: 0
            },
        ]
    },
    "remark": {
        "value": null,
        "type": "textarea",
        "title": "备注",
        "name": [
            "remark"
        ],
        "required": false,
        col: { span: 24 }
    },

    "customerUserList": {
        "value": null,
        "editable": true,
        "type": "table",
        "title": "联系人",
        "name": [
            "customerUserList"
        ],
        "required": false,
        "columns": [
            {
                "title": "联系人姓名",
                "dataIndex": "userName",
                "key": "userName",
                "search": false,
                "valueType": "input",
                formItemProps: {
                    rules: [
                        {
                            required: true,
                            message: '此项为必填项',
                        },
                    ],
                }
            },
            {
                "title": "联系电话",
                "dataIndex": "telephone",
                "key": "telephone",
                "search": false,
                "valueType": "input",
                formItemProps: {
                    rules: [
                        {
                            required: false,
                            pattern: /^(((\d{3,4}-)?[0-9]{7,8})|(1(3|4|5|6|7|8|9)\d{9}))$/,
                            message: '手机号格式不正确'
                        },
                    ],
                }
            },
            {
                "title": "邮箱",
                "dataIndex": "email",
                "key": "email",
                "search": false,
                "valueType": "input",
                formItemProps: {
                    rules: [
                        {
                            required: false,
                            pattern: /^[a-z0-9A-Z]+[- | a-z0-9A-Z . _]+@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\.)+[a-z]{2,}$/,
                            message: '邮箱格式不正确'
                        },
                    ],
                }
            },
            {
                "title": "职位",
                "dataIndex": "title",
                "key": "title",
                "search": false,
                "valueType": "input"
            },
            {
                title: '操作',
                valueType: 'option',
                render: () => {
                    return null;
                },
            },
        ],
        "editable": true,
        "rowKey": "id",
        "rowName": "",
        "dataSource": [],
        col: { span: 24 }
    }
}