gx
queenwuli
2021-01-28 b83ba3cc4687f21d744e9866e10e30e91229e8a4
hive-app/pages/workbench/selectProduct/shoppingCart.vue
@@ -10,22 +10,25 @@
            </view>
         </view>
         <scroll-view scroll-y="true" class="popup-row-wrap">
            <view class="popup-row"v-for="item in list">
               <image class="popup-row-img" mode="aspectFill" :src="item.img?item.img:'../../../static/images/no-img.png'"></image>
               <view class="flex-1">
                  <text>{{item.name}}</text>
                  <view class="flex justify-between">
            <view class="popup-row" v-for="(item, index) in list">
               <view class="flex">
                  <image class="popup-row-img" mode="aspectFill" :src="item.img?item.img:'../../../static/images/no-img.png'"></image>
                  <view>
                     <text>{{item.name}}</text>
                     <text class="price">¥{{item.price}}</text>
                     <view class="right">
                        <template v-if="item.num">
                           <text class="iconfont iconjian blue-outline-btn-circle mr-10"
                              @click.stop="_decreaseGoods(item)"></text>
                              <text>{{item.num}}</text>
                        </template>
                        <text class="iconfont iconjia blue-btn-circle ml-10"
                           @click.stop="_addGoods(item)"></text>
                     </view>
                  </view>
               </view>
               <view v-if="item.isPresent == 1" @click="freeChange(item, index)">
                  <checkbox value="true" :checked="item.isFree" />赠
               </view>
               <view class="right">
                  <template v-if="item.num">
                     <text class="iconfont iconjian blue-outline-btn-circle mr-10"
                        @click.stop="_decreaseGoods(item)"></text>
                        <text>{{item.num}}</text>
                  </template>
                  <text class="iconfont iconjia blue-btn-circle ml-10"
                     @click.stop="_addGoods(item)"></text>
               </view>
            </view>
         </scroll-view>
@@ -63,6 +66,12 @@
         },
         hide(){
            this.$refs.popup.close();
         },
         freeChange(item, index){
            this.$emit('freeChange', {
               goods: item,
               index
            });
         },
         _addGoods(item){
            this.$emit('addGoods', item);
@@ -106,6 +115,7 @@
   .popup-row{
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 7px 10px;
      font-size: 12px;
   }
@@ -115,6 +125,7 @@
      margin-right: 10px;
   }
   .popup-row .price{
      display: block;
      color: #FA5151;
      font-size: 14px;
      margin-top: 5px;