Fill in the upper left $(m-1)\times(n-1)$ table any which way. The first $n-1$ entries of the $i$th row ($1\leq i\leq m-1$) force the $n$th entry; the entries first $m-1$ entries in the $j$th column ($1\leq j\leq n-1$) force the $m$th entry. The only question is whether the $(m,n)$ entry can be filled in.
Let $a_{ij}$ be the $(i,j)$th entry, $1\leq i\leq m-1$, $1\leq j\leq n-1$. Then $a_{i,n} = -\prod\limits_{j=1}^{n-1}a_{i,j}$, and $a_{m,j} = -\prod\limits_{i=1}^{n-1}a_{i,j}$.
For the last column to satisfy condition $2$, you need $a_{m,n}$ to satisfy $a_{m,n} = -\prod\limits_{i=1}^{n-1}a_{i,n} = -\prod\limits_{i=1}^{n-1}\left(-\prod_{j=1}^{m-1}a_{i,j}\right) = -(-1)^{n-1}\prod_{i=1}^{n-1}\prod_{j=1}^{m-1}a_{i,j} = (-1)^n\prod_{\stackrel{\scriptstyle1\leq i\leq n-1}{1\leq j\leq m-1}}a_{ij},$ and for the last row to satisfy condition $2$ you need $a_{m,n}$ to satisfy $a_{m,n} = -\prod\limits_{j=1}^{m-1}a_{m,j} = -\prod\limits_{j=1}^{m-1}\left(-\prod_{i=1}^{n-1}a_{i,j}\right) = -(-1)^{m-1}\prod_{j=1}^{m-1}\prod_{i=1}^{n-1}a_{i,j} = (-1)^m\prod_{\stackrel{\scriptstyle1\leq i\leq n-1}{1\leq j\leq m-1}}a_{ij}.$ This gives the necessary condition that $m\equiv n\pmod{2}$; conversely, if $m\equiv n\pmod{2}$, then you can do it.
So the answer is that there are $2^{(n-1)(m-1)}$ possible tables when $m\equiv n\pmod{2}$, and $0$ if $m\not\equiv n\pmod{2}$.