columns.js 7.01 KB
Newer Older
wuhao's avatar
wuhao committed
1 2 3
function getcolumns(setdrawer) {
  return [
    {
TZW's avatar
TZW committed
4 5 6 7 8
      tab: '我的待办',
      key: '1',
      columns: [
        {
          title: '外协单号',
TZW's avatar
TZW committed
9 10
          dataIndex: 'otherUnitsOrderNo',
          key: 'otherUnitsOrderNo',
TZW's avatar
TZW committed
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
          render: (text, row, _, action) => {
            return (
              <a
                onClick={() => {
                  setdrawer((s) => ({
                    ...s,
                    open: true,
                    title: '详情',
                    val: 'only',
                    type: 'detail',
                    title: '详细信息',
                    item: row,
                  }));
                }}
              >
                {row?.otherUnitsOrderNo}
              </a>
            );
          },
TZW's avatar
TZW committed
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
        },
        {
          title: '设备编号',
          dataIndex: 'equipmentNo',
          key: 'equipmentNo',
        },
        {
          title: '设备名称',
          dataIndex: 'equipmentName',
          key: 'equipmentName',
        },
        {
          title: '故障描述',
          dataIndex: 'faultDescription',
          key: 'faultDescription',
          valueType: 'textarea',
        },
        {
          title: '创建时间',
TZW's avatar
TZW committed
49 50
          dataIndex: 'createTime',
          key: 'createTimeList',
TZW's avatar
TZW committed
51 52 53 54
          valueType: 'dateTimeRange',
        },
        {
          title: '创建人员',
TZW's avatar
TZW committed
55 56
          dataIndex: 'createUserName',
          key: 'createUserName',
TZW's avatar
TZW committed
57 58 59 60 61 62 63 64
        },
        {
          title: '最新外协人员',
          dataIndex: 'newRepairUserName',
          key: 'newRepairUserName',
        },
        {
          title: '来源单号',
TZW's avatar
TZW committed
65 66
          dataIndex: 'dataSourcesNo',
          key: 'dataSourcesNo',
TZW's avatar
TZW committed
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
        },
        {
          title: '工单状态',
          dataIndex: 'statusName',
          key: 'status',
          valueType: 'radio',
          options: [
            {
              label: '待维修',
              value: '1',
            },
            {
              label: '维修中',
              value: '2',
            },
          ],
        },
      ],
      pathconfig: {
        enableadd: true,
        enableedit: false,
        enabledelete: true,
        enabledetail: false,
        add: '',
        edit: '',
TZW's avatar
TZW committed
92
        list: '/repair/umOtherUnitsOrder/queryMyDealwithList',
TZW's avatar
TZW committed
93 94
        delete: '/repair/umFailureRepair/deleteById',
        detail: '',
wuhao's avatar
wuhao committed
95 96 97
      },
    },
    {
TZW's avatar
TZW committed
98 99
      tab: '未完成',
      key: '2',
TZW's avatar
TZW committed
100 101 102
      columns: [
        {
          title: '外协单号',
TZW's avatar
TZW committed
103 104
          dataIndex: 'otherUnitsOrderNo',
          key: 'otherUnitsOrderNo',
TZW's avatar
TZW committed
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
          render: (text, row, _, action) => {
            return (
              <a
                onClick={() => {
                  setdrawer((s) => ({
                    ...s,
                    open: true,
                    title: '详情',
                    val: 'only',
                    type: 'detail',
                    title: '详细信息',
                    item: row,
                  }));
                }}
              >
                {row?.otherUnitsOrderNo}
              </a>
            );
          },
TZW's avatar
TZW committed
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
        },
        {
          title: '设备编号',
          dataIndex: 'equipmentNo',
          key: 'equipmentNo',
        },
        {
          title: '设备名称',
          dataIndex: 'equipmentName',
          key: 'equipmentName',
        },
        {
          title: '故障描述',
          dataIndex: 'faultDescription',
          key: 'faultDescription',
          valueType: 'textarea',
        },
        {
          title: '创建时间',
TZW's avatar
TZW committed
143 144
          dataIndex: 'createTime',
          key: 'createTimeList',
TZW's avatar
TZW committed
145 146 147 148 149 150 151 152 153 154 155 156 157 158
          valueType: 'dateTimeRange',
        },
        {
          title: '创建人员',
          dataIndex: 'repairUserName',
          key: 'repairUserName',
        },
        {
          title: '最新外协人员',
          dataIndex: 'newRepairUserName',
          key: 'newRepairUserName',
        },
        {
          title: '来源单号',
TZW's avatar
TZW committed
159 160
          dataIndex: 'dataSourcesNo',
          key: 'dataSourcesNo',
TZW's avatar
TZW committed
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185
        },
        {
          title: '工单状态',
          dataIndex: 'statusName',
          key: 'status',
          valueType: 'radio',
          options: [
            {
              label: '待维修',
              value: '1',
            },
            {
              label: '维修中',
              value: '2',
            },
          ],
        },
      ],
      pathconfig: {
        enableadd: true,
        enableedit: false,
        enabledelete: true,
        enabledetail: false,
        add: '',
        edit: '',
TZW's avatar
TZW committed
186
        list: '/repair/umOtherUnitsOrder/queryList',
TZW's avatar
TZW committed
187 188
        delete: '/repair/umFailureRepair/deleteById',
        detail: '',
wuhao's avatar
wuhao committed
189 190 191
      },
    },
    {
TZW's avatar
TZW committed
192 193
      tab: '已完成',
      key: '3',
TZW's avatar
TZW committed
194 195 196
      columns: [
        {
          title: '外协单号',
TZW's avatar
TZW committed
197 198
          dataIndex: 'otherUnitsOrderNo',
          key: 'otherUnitsOrderNo',
TZW's avatar
TZW committed
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217
          render: (text, row, _, action) => {
            return (
              <a
                onClick={() => {
                  setdrawer((s) => ({
                    ...s,
                    open: true,
                    title: '详情',
                    val: 'only',
                    type: 'detail',
                    title: '详细信息',
                    item: row,
                  }));
                }}
              >
                {row?.otherUnitsOrderNo}
              </a>
            );
          },
TZW's avatar
TZW committed
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236
        },
        {
          title: '设备编号',
          dataIndex: 'equipmentNo',
          key: 'equipmentNo',
        },
        {
          title: '设备名称',
          dataIndex: 'equipmentName',
          key: 'equipmentName',
        },
        {
          title: '故障描述',
          dataIndex: 'faultDescription',
          key: 'faultDescription',
          valueType: 'textarea',
        },
        {
          title: '创建时间',
TZW's avatar
TZW committed
237 238
          dataIndex: 'createTime',
          key: 'createTimeList',
TZW's avatar
TZW committed
239 240 241 242 243 244 245 246 247 248 249 250 251 252
          valueType: 'dateTimeRange',
        },
        {
          title: '创建人员',
          dataIndex: 'repairUserName',
          key: 'repairUserName',
        },
        {
          title: '最新外协人员',
          dataIndex: 'newRepairUserName',
          key: 'newRepairUserName',
        },
        {
          title: '来源单号',
TZW's avatar
TZW committed
253 254
          dataIndex: 'dataSourcesNo',
          key: 'dataSourcesNo',
TZW's avatar
TZW committed
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279
        },
        {
          title: '工单状态',
          dataIndex: 'statusName',
          key: 'status',
          valueType: 'radio',
          options: [
            {
              label: '待维修',
              value: '1',
            },
            {
              label: '维修中',
              value: '2',
            },
          ],
        },
      ],
      pathconfig: {
        enableadd: true,
        enableedit: false,
        enabledelete: true,
        enabledetail: false,
        add: '',
        edit: '',
TZW's avatar
TZW committed
280
        list: '/repair/umOtherUnitsOrderHis/queryList',
TZW's avatar
TZW committed
281 282
        delete: '/repair/umFailureRepair/deleteById',
        detail: '',
wuhao's avatar
wuhao committed
283 284 285 286 287
      },
    },
  ];
}
export default getcolumns;