Browse Source

显示销量 = 实际销量+虚拟销量

xiaomei 9 months ago
parent
commit
d673355cd8
2 changed files with 3 additions and 3 deletions
  1. 2 2
      src/views/index/index.vue
  2. 1 1
      src/views/trade/detail.vue

+ 2 - 2
src/views/index/index.vue

@@ -54,8 +54,8 @@
             </div>
             <span class="time_text">{{ $t('lang6') }} {{ item.cost_price }}{{ $t('lang174') }}</span>
             <div class="progress">
-              <van-progress :percentage="(item.num / item.stock) * 100 || 0" class="pro" color="#29b286" :show-pivot="false" />
-              <span>{{ item.num }}/{{ item.stock }}{{ $t('lang7') }}</span>
+              <van-progress :percentage="((item.num+item.init_num) / item.stock) * 100 || 0" class="pro" color="#29b286" :show-pivot="false" />
+              <span>{{ (item.num+item.init_num) }}/{{ item.stock }}{{ $t('lang7') }}</span>
             </div>
           </div>
         </div>

+ 1 - 1
src/views/trade/detail.vue

@@ -316,7 +316,7 @@ export default {
       //       // on cancel
       //     });
 
-      if (!this.areaIds) {
+      if (this.areaIds.length <= 0) {
         return Notify({ type: 'warning', message: this.$t('lang69') });
       }
       let _this = this;