Procházet zdrojové kódy

订单编辑页商品删除BUG修复

xupeng před 2 roky
rodič
revize
3f79ff2cf8

+ 1 - 1
src/components/GridTable/index.js

@@ -58,7 +58,7 @@ class GridTable extends Component {
           }
         }
         const row = {
-          key: `${dataSource[index].goodsId}`,
+          key: `${dataSource[index].goodsId}-${index}`,
           record: dataSource[index],
           index: index
         };

+ 2 - 2
src/components/OrderGoodsList/index.js

@@ -58,7 +58,7 @@ class OrderGoodsList extends PureComponent {
               </p>
               <p className={styles.goodsCode}>
                 <span>编码:{record.goodsCode}</span>
-                <span style={{'margin-left':'20px'}}>规格:{record.specification}</span>
+                <span style={{'marginLeft':'20px'}}>规格:{record.specification}</span>
               </p>
               <p className={styles.goodsCode}>
                 <span>型号:{record.model}</span>
@@ -997,7 +997,7 @@ class OrderGoodsList extends PureComponent {
     const { orderCartData, dispatch } = this.props;
     // todo...
     const newOrderCartData = orderCartData.filter(
-      item => goodsItem.goodsId != item.goodsId
+      item => goodsItem.goodsId != item.goodsId || goodsItem.ext05 != item.ext05
     );
     this.props.dispatch({
       type: "orderEdit/orderCartData",

+ 0 - 1
src/models/orderEdit.js

@@ -122,7 +122,6 @@ export default {
     },
     // 获取促销
     *getPromotionInfo({ payload }, { call, put }) {
-      debugger;
       payload.customerId = getCustomer().id;
       const { saleOrgId, customerId, promotionStyle } = payload;
       if (promotionStyle) {

+ 1 - 1
src/pages/Buyer/goods/goodsDetail/index.js

@@ -262,7 +262,7 @@ class GoodsDetails extends PureComponent {
                 baseGoodsOptId: opt[0].goodsOptDtos[0].id,
                 baseGoodsOptValue: color.custDocGroupName+ ":" + color.attrValName,
                 ext04: "1",
-                ext05: color.attrValId,
+                ext05: color.attrValCode,
                 // isOptional: "1",
                 baseDiscountPrice: price, 
                 basePrice: price, 

+ 1 - 1
src/pages/Buyer/orderEdit/index.js

@@ -789,7 +789,7 @@ class OrderEidt extends PureComponent {
           dealAmount : goodsDetail.amount,
           baseGoodsOptId : opt[0].goodsOptDtos[0].id,
           baseGoodsOptValue : color.custDocGroupName+ ":" + color.attrValName,
-          ext05 : color.attrValId
+          ext05 : color.attrValCode
         }
         let newItem = Object.assign({},goodsDetail,priceAndMny)
         orderCartData.splice(this.state.currRow,1,newItem)

+ 3 - 0
src/pages/Buyer/orderListDetail/index.js

@@ -92,6 +92,9 @@ class OrderListDetail extends PureComponent {
           };
           return (
             <div className={styles.goodsNameBox}>
+              <div style={{"float": 'left', "fontSize": "1.5rem", "paddingRight": "1rem"}}>
+                {Number(index) + 1}
+              </div>              
               <div className={styles.imgBox}>
                 <img src={record.goodsImg} alt="" />
               </div>