import { InvoiceControllerState, IGood } from '..'; /** * 设置单个商品的付款信息 */ export default async (state: InvoiceControllerState, options?: IGood) => { if (!options || !options.$index) return; const goodsList = state.payListState.goodsList.map(e => e.$index === options.$index ? { ...e, ...options } : e); state.payListState = { ...state.payListState, goodsList }; };