columns.js 4.27 KB
Newer Older
wangjing2's avatar
wangjing2 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 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
function getcolumns(setdrawer) {
    return [
        {
            title: "用户名",
            dataIndex: "accountName",
            key: "accountName",
            formItemProps: { rules: [{ required: true, message: '此项为必填项' }] }
        },
        {
            title: "姓名",
            dataIndex: "userName",
            key: "userName",
            formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
            render:(_,row)=>{
                return <a className="table-cell" onClick={()=>{
                    setdrawer(s=>{
                        return {
                            ...s,
                            open:true,
                            title:`${row.userName}详情`,
                            detailpath:'/ta_wms_auth/sysUser/query/detail',
                            val:'detail',
                            item:row
                        }
                    })
                }} >{row.userName}</a>
            }
        },
        {
            title: "联系电话",
            dataIndex: "telephone",
            key: "telephone"
        },
        {
            title: '组织',
            dataIndex: 'departmentName',
            key: 'departmentId',
            searchValueType:'input',
            searchKey:'departmentName',
            valueType: 'treeSelect',
            fieldProps: {
                placeholder: '请选择'
            },
            formItemProps: {
                rules: [
                    {
                        required: true,
                        message: '此项为必填项',
                    },
                ],
            },
            options: {
                path: '/ta_wms_auth/sysDepartment/query/tree',
                params:{}
            },
            span:3
        },
        {
            title: '工厂',
            dataIndex: 'factoryName',
            key: 'factoryIdList',
            valueType: 'select',
            searchValueType:'input',
            searchKey:'factoryName',
            fieldProps: {
                placeholder: '请选择',
                mode: 'multiple',
            },
            formItemProps: {
                rules: [
                    {
                        required: true,
                        message: '此项为必填项',
                    },
                ],
            },
            options: {
                path: '/ta_wms_auth/sysFactory/selectionBoxAll',
                params:{}
            },
            span:3
        },
        {
            title: '负责仓库',
            dataIndex: 'chargeStoreName',
            key: 'storeIdList',
            valueType: 'select',
            searchValueType:'input',
            searchKey:'chargeStoreName',
            fieldProps: {
                placeholder: '请选择',
                mode: 'multiple',
            },
            options: {
                path: '/ta_wms_auth/sysStore/selectionBoxAll',
                params:{}
            },
            span:3
        },
        {
            title: '角色配置',
            dataIndex: 'roleName',
            key: 'roleIdList',
            valueType: 'select',
            fieldProps: {
                placeholder: '请选择',
                mode: 'multiple',
            },
            options: {
                path: '/ta_wms_auth/sysRole/queryAllSelectList',
                params:{}
            },
            hideInSearch:true,
            span:3
        },
        {
            title: '直属领导',
            dataIndex: 'parentName',
            key: 'parentId',
            valueType: 'select',
            fieldProps: {
                placeholder: '请选择'
            },
            options: {
                path: '/ta_wms_auth/sysUser/queryParentSelectionByUserId',
                params:{}
            },
            hideInTable:true,
            hideInSearch:true
        },
        {
            title: "邮箱",
            dataIndex: "mailNo",
            key: "mailNo",
            hideInSearch:true,
            hideInTable:true,
            span:2
        },
        {
            title: "备注",
            dataIndex: "remark",
            key: "remark",
            hideInSearch: true,
            valueType: 'textarea',
            hideInTable:true
        }
    ];
}

export default getcolumns;