Hi friend!
1. The Layer 2 interface cannot be directly configured with an IP address, you need to use the command undo portswitch to convert to a Layer 3 interface before you can directly configure the IP address
2. Or you can configure the IP address under vlanif.
[S5731-H-02] interface vlanif 100
[S5731-H-02-Vlanif100] ip address 10.1.1.4 255.255.255.224
Hope to help you!