1
zhang
3 小时以前 e9cc2b361b5788c5e7aac0af3fe53031a76a6787
zy-acs-flow/src/map/insight/agv/AgvControl.jsx
@@ -53,8 +53,9 @@
    const onSubmit = (data) => {
        if (curAgvNo) {
            console.log(data);
            handleControlAgv(curAgvNo, data);
            handleControlAgv({ agvNo: curAgvNo, ...data }, () => {
            });
        }
    };
@@ -280,41 +281,6 @@
                                </Grid>
                            )}
                            {showField('endLocNo') && (
                                <Grid item xs={12}>
                                    <Controller
                                        name="endLocNo"
                                        control={control}
                                        rules={{ required: translate('ra.validation.required') }}
                                        render={({ field, fieldState }) => {
                                            const selectedOption = endLocOptions.find(option => option.id === field.value) || null;
                                            return (
                                                <Autocomplete
                                                    options={endLocOptions}
                                                    getOptionLabel={(option) => option.label}
                                                    isOptionEqualToValue={(option, value) => option.id === value.id}
                                                    value={selectedOption}
                                                    onInputChange={(event, value) => {
                                                        setEndLocInputValue(value);
                                                    }}
                                                    onChange={(event, value) => {
                                                        field.onChange(value ? value.id : null);
                                                    }}
                                                    renderInput={(params) => (
                                                        <TextField
                                                            {...params}
                                                            label={translate('page.map.insight.control.endLoc')}
                                                            error={!!fieldState.error}
                                                            helperText={fieldState.error?.message}
                                                        />
                                                    )}
                                                />
                                            );
                                        }}
                                    />
                                </Grid>
                            )}
                            {showField('startStaNo') && (
                                <Grid item xs={12}>
                                    <Controller
@@ -350,6 +316,41 @@
                                </Grid>
                            )}
                            {showField('endLocNo') && (
                                <Grid item xs={12}>
                                    <Controller
                                        name="endLocNo"
                                        control={control}
                                        rules={{ required: translate('ra.validation.required') }}
                                        render={({ field, fieldState }) => {
                                            const selectedOption = endLocOptions.find(option => option.id === field.value) || null;
                                            return (
                                                <Autocomplete
                                                    options={endLocOptions}
                                                    getOptionLabel={(option) => option.label}
                                                    isOptionEqualToValue={(option, value) => option.id === value.id}
                                                    value={selectedOption}
                                                    onInputChange={(event, value) => {
                                                        setEndLocInputValue(value);
                                                    }}
                                                    onChange={(event, value) => {
                                                        field.onChange(value ? value.id : null);
                                                    }}
                                                    renderInput={(params) => (
                                                        <TextField
                                                            {...params}
                                                            label={translate('page.map.insight.control.endLoc')}
                                                            error={!!fieldState.error}
                                                            helperText={fieldState.error?.message}
                                                        />
                                                    )}
                                                />
                                            );
                                        }}
                                    />
                                </Grid>
                            )}
                            {showField('endStaNo') && (
                                <Grid item xs={12}>
                                    <Controller