xuxueyang
2024-07-30 e4233b5c4e123c4b79a38d0a9b0c8b60631e1683
sub_pages/customer/trade/list.vue
@@ -13,7 +13,7 @@
            <view class="desc">
               颜色:{{categoryInfo.color || '暂无'}}
            </view>
         <!--    <view class="desc">
            <!--    <view class="desc">
               包袋:棉袋
            </view> -->
         </view>
@@ -21,8 +21,12 @@
            <view class="title">当日均价</view>
            <view class="price">{{categoryInfo.avePrice||'暂无'}}</view>
            <view class="flex desc">
               <view class="m-l-a m-r-5">{{categoryInfo.avePriceDifference&&categoryInfo.avePriceDifference>=0?'+':''}}{{categoryInfo.avePriceDifference||0}}</view>
               <view class="m-r-a m-l-5">{{categoryInfo.avePriceDifferenceRate&&categoryInfo.avePriceDifferenceRate>=0?'+':''}}{{categoryInfo.avePriceDifferenceRate||0}}%</view>
               <view class="m-l-a m-r-5">
                  {{categoryInfo.avePriceDifference&&categoryInfo.avePriceDifference>=0?'+':''}}{{categoryInfo.avePriceDifference||0}}
               </view>
               <view class="m-r-a m-l-5">
                  {{categoryInfo.avePriceDifferenceRate&&categoryInfo.avePriceDifferenceRate>=0?'+':''}}{{categoryInfo.avePriceDifferenceRate||0}}%
               </view>
            </view>
         </view>
      </view>
@@ -55,8 +59,7 @@
         <view class="component-shop-item flex" v-for="(item,index) of list" :key="index">
            <view class="img" @click.stop="toDetail(item)">
               <image class="img img100"
                  :src="item.cover">
               <image class="img img100" :src="item.cover">
               </image>
               <view class="level">
                  {{item.levelStr||''}}
@@ -133,13 +136,16 @@
               </view>
            </view>
            <view class="button-space"></view>
            <view class="button-space"></view>
            <view class="button-green" style="background-color: #fff;bottom: 160rpx;color: #000"
               @click="closeParamPopAndQuery">
               查询
            </view>
            <view>
               <view class="button-green"
                  style="background-color: #fff;border: 2rpx solid #666; color: #666;width: 200rpx;left: 40rpx;right: unset;"
                  @click="closeParamPopAndQuery">
                  查询
               </view>
            <view class="button-green" @click="closeParamPop">关闭</view>
               <view class="button-green" style="width: 200rpx;right: 40rpx;left: unset;" @click="closeParamPop">关闭
               </view>
            </view>
         </view>
      </uni-popup>
@@ -184,6 +190,11 @@
         this.query.category = options.categoryId || ''
         this.query.zoneId = options.zoneId || ''
         this.query.name = options.name || ''
         if (this.query.name) {
            uni.setNavigationBarTitle({
               title: '商品列表-' + this.query.name
            })
         }
         this.listApi = '/api/customer/flower/list'
         this.getList('post')
         this.$http.request('get', '/api/code/value', {
@@ -253,13 +264,13 @@
         },
         closeParamPopAndQuery() {
            this.$refs.popup_param.close()
            //设置参数
            this.dto.params = []
            for (var params of this.params) {
               if (params.value) {
                  this.dto.params.push({
                     id: params.id,
                     value: params.value
            //设置参数
            this.query.params = []
            for (var param of this.params) {
               if (param.value) {
                  this.query.params.push({
                     id: param.id,
                     value: param.value
                  })
               }
            }
@@ -283,7 +294,7 @@
         },
         select_level(e) {
            this.level_show = false
            console.log('select_level',e)
            console.log('select_level', e)
            this.query.levelStr = e.value[0].label
            this.query.level = e.value[0].value
            this.refreshList('post')
@@ -317,9 +328,17 @@
               })
               return
            }
            if (!item.shopnum) {
               item.shopnum = 0
            if (!item.stock) {
               item.stock = 0
            }
            if (!item.shopnum) {
               item.shopnum = 0
            }
            if (item.shopnum + addnum > item.stock) {
               this.$message.showToast('库存不足,无法添加')
               return
            }
            if (item.shopnum + addnum >= 0) {
            } else {