|
|
|
@ -110,6 +110,8 @@ class NewWorkForm extends Component{
|
|
|
|
|
{/* min={has_commit ? init_max_num : (min_num == undefined ? 2 : min_num + 1) } */}
|
|
|
|
|
// 已有提交作品,人数范围只能扩大
|
|
|
|
|
const { has_commit, max_num, init_max_num, min_num, init_min_num } = this.state;
|
|
|
|
|
const isGroup = this.props.isGroup()
|
|
|
|
|
if (isGroup) {
|
|
|
|
|
if (!min_num) {
|
|
|
|
|
this.props.showNotification('最小人数不能为空');
|
|
|
|
|
return;
|
|
|
|
@ -123,12 +125,14 @@ class NewWorkForm extends Component{
|
|
|
|
|
this.props.showNotification('最大人数不能小于最小人数');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (has_commit) {
|
|
|
|
|
if (max_num < init_max_num || min_num > init_min_num) {
|
|
|
|
|
this.props.showNotification(`已有提交作品,人数范围只能扩大(原设置为:${init_min_num} - ${init_max_num})`)
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// const errKeys = Object.keys(err); // || errKeys.length == 1 && errKeys[0] == 'content' && mdContnet
|
|
|
|
|
if (!err) {
|
|
|
|
|