columns.js 6.65 KB
Newer Older
wuhao's avatar
wuhao committed
1
function getcolumns(setdrawer) {
TZW's avatar
TZW committed
2 3 4 5 6 7 8 9 10
  return [
    {
      tab: '维修工单',
      key: '1',
      columns: [
        {
          title: '维修单号',
          dataIndex: 'repairOrderNo',
          key: 'repairOrderNo',
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_wxgd',
                    title: '详细信息',
                    item: row,
                  }));
                }}
              >
                {row?.repairOrderNo}
              </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',
        },
        {
          title: '报修人员',
          dataIndex: 'repairUserName',
TZW's avatar
TZW committed
49 50 51 52 53 54 55 56
          key: 'repairUserId',
          valueType: 'select',
          fieldProps: {
            showSearch: true,
          },
          options: {
            path: '/auth/sysUser/selection',
          },
TZW's avatar
TZW committed
57 58 59 60 61 62
        },
        {
          title: '报修时间',
          dataIndex: 'repairTime',
          key: 'repairTimeList',
          valueType: 'dateTimeRange',
TZW's avatar
TZW committed
63 64 65 66 67 68
          fieldProps: {
            showTime: {
              format: 'HH:mm',
            },
            format: 'YYYY-MM-DD HH:mm',
          },
TZW's avatar
TZW committed
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
        },
        {
          title: '报修单号',
          dataIndex: 'repairNo',
          key: 'repairNo',
        },
        {
          title: '工单状态',
          dataIndex: 'statusName',
          key: 'statusName',
        },
      ],
      pathconfig: {
        enableadd: false,
        enableedit: false,
        enabledelete: false,
        enabledetail: false,
        add: '',
        edit: '',
        list: '/repair/umRepairOrder/queryRepairOrderList',
        delete: '',
        detail: '',
      },
    },
    {
      tab: '追踪工单',
      key: '2',
      columns: [
        {
          title: '追踪单号',
          dataIndex: 'taskOrderNo',
          key: 'taskOrderNo',
TZW's avatar
TZW committed
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
          render: (text, row, _, action) => {
            return (
              <a
                onClick={() => {
                  setdrawer((s) => ({
                    ...s,
                    open: true,
                    title: '详情',
                    val: 'only',
                    type: 'detail_zzgd',
                    title: '详细信息',
                    item: row,
                  }));
                }}
              >
                {row?.taskOrderNo}
              </a>
            );
          },
TZW's avatar
TZW committed
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
        },
        {
          title: '设备编号',
          dataIndex: 'equipmentNo',
          key: 'equipmentNo',
        },
        {
          title: '设备名称',
          dataIndex: 'equipmentName',
          key: 'equipmentName',
        },
        {
          title: '故障描述',
          dataIndex: 'faultDescription',
          key: 'faultDescription',
        },
        {
          title: '创建时间',
          dataIndex: 'createTime',
TZW's avatar
TZW committed
139
          valueType: 'dateTimeRange',
TZW's avatar
TZW committed
140
          key: 'createTime',
TZW's avatar
TZW committed
141 142 143 144 145 146
          fieldProps: {
            showTime: {
              format: 'HH:mm',
            },
            format: 'YYYY-MM-DD HH:mm',
          },
TZW's avatar
TZW committed
147 148 149 150
        },
        {
          title: '创建人员',
          dataIndex: 'createUserName',
TZW's avatar
TZW committed
151 152 153 154 155 156 157 158
          key: 'createUserId',
          valueType: 'select',
          fieldProps: {
            showSearch: true,
          },
          options: {
            path: '/auth/sysUser/selection',
          },
TZW's avatar
TZW committed
159 160 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 186 187
        },
        {
          title: '来源单号',
          dataIndex: 'dataSourcesNo',
          key: 'dataSourcesNo',
        },
        {
          title: '工单状态',
          dataIndex: 'statusName',
          key: 'statusName',
        },
      ],
      pathconfig: {
        enableadd: false,
        enableedit: false,
        enabledelete: false,
        enabledetail: false,
        add: '',
        edit: '',
        list: '/repair/umTrackOrder/queryTrackOrderList',
        delete: '',
        detail: '',
      },
    },
    {
      tab: '外协工单',
      key: '3',
      columns: [
        {
TZW's avatar
TZW committed
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209
          title: '外协单号',
          dataIndex: 'otherUnitsOrderNo',
          key: 'otherUnitsOrderNo',
          render: (text, row, _, action) => {
            return (
              <a
                onClick={() => {
                  setdrawer((s) => ({
                    ...s,
                    open: true,
                    title: '详情',
                    val: 'only',
                    type: 'detail_wgd',
                    title: '详细信息',
                    item: row,
                  }));
                }}
              >
                {row?.otherUnitsOrderNo}
              </a>
            );
          },
TZW's avatar
TZW committed
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226
        },
        {
          title: '设备编号',
          dataIndex: 'equipmentNo',
          key: 'equipmentNo',
        },
        {
          title: '设备名称',
          dataIndex: 'equipmentName',
          key: 'equipmentName',
        },
        {
          title: '故障描述',
          dataIndex: 'faultDescription',
          key: 'faultDescription',
        },
        {
TZW's avatar
TZW committed
227 228 229 230
          title: '创建时间',
          dataIndex: 'createTime',
          key: 'createTimeList',
          valueType: 'dateTimeRange',
TZW's avatar
TZW committed
231 232 233 234 235 236
          fieldProps: {
            showTime: {
              format: 'HH:mm',
            },
            format: 'YYYY-MM-DD HH:mm',
          },
TZW's avatar
TZW committed
237 238
        },
        {
TZW's avatar
TZW committed
239 240
          title: '创建人员',
          dataIndex: 'createUserName',
TZW's avatar
TZW committed
241 242 243 244 245 246 247 248
          key: 'createUserId',
          valueType: 'select',
          fieldProps: {
            showSearch: true,
          },
          options: {
            path: '/auth/sysUser/selection',
          },
TZW's avatar
TZW committed
249 250
        },
        {
TZW's avatar
TZW committed
251 252 253
          title: '来源单号',
          dataIndex: 'dataSourcesNo',
          key: 'dataSourcesNo',
TZW's avatar
TZW committed
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
        },
        {
          title: '工单状态',
          dataIndex: 'statusName',
          key: 'statusName',
        },
      ],
      pathconfig: {
        enableadd: true,
        enableedit: true,
        enabledelete: true,
        enabledetail: true,
        add: '',
        edit: '',
        list: '/repair/umOtherUnitsOrder/queryOtherUnitsOrderList',
        delete: '',
        detail: '',
      },
    },
  ];
}
export default getcolumns;