|
@@ -46,11 +46,9 @@ export default (props) => {
|
46
|
46
|
const changeMachinery = (e) => {
|
47
|
47
|
getduty(e, { date: dispatch.appointmentDate.substr(0, 10) }).then((res => {
|
48
|
48
|
if (res.length != 0) {
|
49
|
|
- message.info('该农机已调度请选择其他农机');
|
50
|
|
- setDispatch({ ...dispatch, machineryId: null })
|
51
|
|
- } else {
|
52
|
|
- setDispatch({ ...dispatch, machineryId: e })
|
|
49
|
+ message.info('该农机今天已有' + res.length + '条调度信息');
|
53
|
50
|
}
|
|
51
|
+ setDispatch({ ...dispatch, machineryId: e })
|
54
|
52
|
})).catch((err) => {
|
55
|
53
|
console.log(err.message)
|
56
|
54
|
});
|