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