|  |  |  | 
|---|
|  |  |  | <view class="desc"> | 
|---|
|  |  |  | 颜色:{{categoryInfo.color || '暂无'}} | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <!--    <view class="desc"> | 
|---|
|  |  |  | <!--    <view class="desc"> | 
|---|
|  |  |  | 包袋:棉袋 | 
|---|
|  |  |  | </view> --> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | 
|---|
|  |  |  | <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> | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <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||''}} | 
|---|
|  |  |  | 
|---|
|  |  |  | </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> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | 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', { | 
|---|
|  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | 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 | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | 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') | 
|---|
|  |  |  | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | 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 { | 
|---|