Commit 58e44c5eebbd8fa3cff1957ca12e59d0247ea31c

Authored by zhongnanhuang
1 parent 406f5237

feat: update 历史记录修改

src/pages/Order/components/HistoryModal.tsx
... ... @@ -115,7 +115,7 @@ export default ({ subOrders, isCancelledOrder, onClose }) => {
115 115 {'商品' + ++i}
116 116 </span>
117 117 <span className="text-[#8C8C8C]">
118   - -【{subOrders[i - 1].productName}】
  118 + -【{item.productName}】
119 119 </span>
120 120 </div>
121 121  
... ...
src/pages/Order/components/OrderDrawer.tsx
... ... @@ -202,9 +202,9 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
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 }) =&gt; {
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) {
... ...