Commit 58e44c5eebbd8fa3cff1957ca12e59d0247ea31c
1 parent
406f5237
feat: update 历史记录修改
Showing
2 changed files
with
4 additions
and
4 deletions
src/pages/Order/components/HistoryModal.tsx
src/pages/Order/components/OrderDrawer.tsx
... | ... | @@ -202,9 +202,9 @@ export default ({ onClose, data, subOrders, orderOptType }) => { |
202 | 202 | * @param option 商品名称所对应的商品数据 |
203 | 203 | * @param currentRowData list中当前行的数据 |
204 | 204 | */ |
205 | - function autoFillProductInfo(option: any, currentRowData: any) { | |
205 | + function autoFillProductInfo(option: any, currentRowData: any, index: any) { | |
206 | 206 | let copyList = form.getFieldValue('list'); |
207 | - let currentData = copyList[currentRowData.field.key]; | |
207 | + let currentData = copyList[index]; | |
208 | 208 | currentData.productCode = option?.productCode; |
209 | 209 | currentData.parameters = option?.specifications; |
210 | 210 | currentData.unit = option?.unit; |
... | ... | @@ -712,7 +712,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { |
712 | 712 | placeholder="请搜索商品" |
713 | 713 | rules={[{ required: true, message: '商品名称必填' }]} |
714 | 714 | onChange={(_, option) => { |
715 | - autoFillProductInfo(option, listMeta); | |
715 | + autoFillProductInfo(option, listMeta, listMeta.index); | |
716 | 716 | }} |
717 | 717 | fieldProps={{ |
718 | 718 | optionItemRender(item) { | ... | ... |