|
|
@ -2,15 +2,17 @@ import { NavBar, Picker, Toast } from 'antd-mobile'; |
|
|
|
import { useNavigate } from 'react-router'; |
|
|
|
import icon_arr_r from '../assets/icon_arr_s_r.svg'; |
|
|
|
import { ChangeEvent, useState } from 'react'; |
|
|
|
import { useAppSelector } from '../utils/hooks'; |
|
|
|
import { useAppDispatch, useAppSelector } from '../utils/hooks'; |
|
|
|
import { XB_CODES } from '../utils/constant'; |
|
|
|
import { selectLabeledKtjOrgs } from '../store/features/baseData'; |
|
|
|
import { textsOfKeys } from '../utils/helper'; |
|
|
|
import { SaveMeasureDTO } from '../services/apiTypes'; |
|
|
|
import Bridge from '../utils/bridge'; |
|
|
|
import { resetState } from '../store/features/measureSlice'; |
|
|
|
|
|
|
|
export default function MeasureSave() { |
|
|
|
const navigate = useNavigate(); |
|
|
|
const dispatch = useAppDispatch(); |
|
|
|
const back = () => navigate(-1); |
|
|
|
|
|
|
|
const contextState = useAppSelector((state) => state.context); |
|
|
@ -43,6 +45,10 @@ export default function MeasureSave() { |
|
|
|
Bridge.saveMeasure(dto).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
Toast.show('保存成功'); |
|
|
|
setTimeout(() => { |
|
|
|
navigate(-1); |
|
|
|
dispatch(resetState()); |
|
|
|
}, 300); |
|
|
|
} else { |
|
|
|
Toast.show(res.message); |
|
|
|
} |
|
|
|