import { InvoiceControllerState, IGood2 } from '..'; /** * 设置当前的编辑货物运输 */ export default async (state: InvoiceControllerState, newEditGood?: any) => { if (newEditGood) { const editGood = state.freightListState.editGood as IGood2; state.freightListState = { ...state.freightListState, editGood: { ...editGood, ...newEditGood }, }; } else { state.freightListState = { ...state.freightListState, editGood: undefined }; } };