How to put together an HKT30 optical rotary encoder?
It's not hard...

The sensor screws into the screw holes.
The disc slots into the gap in the sensor
The case clips on the outside

As to what the wires are, only the datasheet / manual / manufacturer can tell you that. Maybe if you trace them on the sensor board you can work out what is what.