|
|
@ -66,23 +66,29 @@ function Blacklist(props) { |
|
|
|
} |
|
|
|
if (getAddData.plate == '') { |
|
|
|
message.error('请输入车牌号') |
|
|
|
} else if (getAddData.operator_id == '') { |
|
|
|
} else if (getAddData.operator_id ) { |
|
|
|
message.error('请选择商户名称') |
|
|
|
} else if (getAddData.plate_color_id == '') { |
|
|
|
message.error('请选择车牌颜色') |
|
|
|
} else { |
|
|
|
ajax.addChange(data).then(res => { |
|
|
|
if (res.status === 20000) { |
|
|
|
setGetAddVisible(false) |
|
|
|
getData(formData) |
|
|
|
setGetAddData({ |
|
|
|
plate: '', |
|
|
|
operator: '', |
|
|
|
plate_color: '', |
|
|
|
detail: '', |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
const cancel = () => { |
|
|
|
setGetAddVisible(false) |
|
|
|
setEditVisible(false) |
|
|
|
setDeleteVisible(false) |
|
|
|
} |
|
|
|
const cancelAdd = () => { |
|
|
|
setGetAddVisible(false) |
|
|
|
setGetAddData({ |
|
|
|
plate: '', |
|
|
|
operator: '', |
|
|
@ -245,7 +251,14 @@ function Blacklist(props) { |
|
|
|
} |
|
|
|
const addModal = () => { |
|
|
|
setGetAddVisible(false) |
|
|
|
setGetAddData({ |
|
|
|
plate: '', |
|
|
|
operator: '', |
|
|
|
plate_color: '', |
|
|
|
detail: '', |
|
|
|
}) |
|
|
|
} |
|
|
|
//添加 |
|
|
|
const addData = () => { |
|
|
|
setGetAddVisible(true) |
|
|
|
} |
|
|
@ -395,7 +408,7 @@ function Blacklist(props) { |
|
|
|
</div> |
|
|
|
<div className="submitBtn"> |
|
|
|
<button className="submit colorBtn" onClick={() => { applySubmit() }}>提交</button> |
|
|
|
<button className="cancel colorReset" onClick={() => { cancel() }}>取消</button> |
|
|
|
<button className="cancel colorReset" onClick={() => { cancelAdd() }}>取消</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</Modal> |
|
|
|