export default {
    "supplierNo": {
        "value": null,
        "type": "input",
        "title": "供应商编号",
        "name": [
            "supplierNo"
        ],
        "required": false
    },
    "supplierName": {
        "value": null,
        "type": "input",
        "title": "供应商名称",
        "name": [
            "supplierName"
        ],
        "required": true
    },
    "officialWebsite": {
        "value": null,
        "type": "input",
        "title": "公司官网",
        "name": [
            "officialWebsite"
        ],
        "required": false
    },
    "telephone": {
        "value": null,
        "type": "input",
        "title": "联系电话",
        "name": [
            "telephone"
        ],
        "required": false
    },
    "email": {
        "value": null,
        "type": "input",
        "title": "公司邮箱",
        "name": [
            "email"
        ],
        "required": false
    },
    "address": {
        "value": null,
        "type": "input",
        "title": "地址",
        "name": [
            "address"
        ],
        "required": false
    },
    "score": {
        "value": null,
        "type": "rate",
        "title": "评分",
        "name": [
            "score"
        ],
        "required": false,
        allowHalf: true,
        col: { span: 24 }
    },
    "remark": {
        "value": null,
        "type": "textarea",
        "title": "备注",
        "name": [
            "remark"
        ],
        "required": false,
        col: { span: 24 }
    },
    "supplierUserList": {
        "value": null,
        "editable": true,
        "type": "table",
        "title": "联系人",
        "name": [
            "supplierUserList"
        ],
        "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{11}$/,
                            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 }
    }
}