|
|
@@ -6,26 +6,28 @@
|
|
|
<view class="module-com">
|
|
|
<view class="commodity-view">
|
|
|
<view class="commodity-list">
|
|
|
- <view class="commodity-item" v-for="(item, index) in selectList" :key="index">
|
|
|
- <image class="item-icon" :src="item.cover" alt="商品图" />
|
|
|
- <view class="item-info">
|
|
|
- <view class="info-line">
|
|
|
- <text class="item-name">{{ item.itemName }}</text>
|
|
|
- <text class="item-price">
|
|
|
- <text class="unit"></text>
|
|
|
- <text class="price">
|
|
|
- <text v-if="item.bigCount > 0">{{`${item.bigCount}`}}扎</text>
|
|
|
- <text v-if="item.smallCount > 0">{{`${item.smallCount}`}}支</text>
|
|
|
+ <template v-if="!$util.isEmpty(selectList)">
|
|
|
+ <view class="commodity-item" v-for="(item, index) in selectList" :key="index">
|
|
|
+ <image class="item-icon" :src="item.cover" />
|
|
|
+ <view class="item-info">
|
|
|
+ <view class="info-line">
|
|
|
+ <text class="item-name">{{ item.itemName }}</text>
|
|
|
+ <text class="item-price">
|
|
|
+ <text class="unit"></text>
|
|
|
+ <text class="price">
|
|
|
+ <text v-if="item.bigCount > 0">{{`${item.bigCount}`}}扎</text>
|
|
|
+ <text v-if="item.smallCount > 0">{{`${item.smallCount}`}}支</text>
|
|
|
+ </text>
|
|
|
</text>
|
|
|
- </text>
|
|
|
- </view>
|
|
|
- <view class="info-line">
|
|
|
- <text class="item-type"></text>
|
|
|
- <text class="item-count">
|
|
|
- </text>
|
|
|
+ </view>
|
|
|
+ <view class="info-line">
|
|
|
+ <text class="item-type"></text>
|
|
|
+ <text class="item-count">
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </template>
|
|
|
</view>
|
|
|
<view class="summary-bar">
|
|
|
<view class="operate-view" @click="gobackEvent">
|
|
|
@@ -33,7 +35,7 @@
|
|
|
重选花材
|
|
|
</view>
|
|
|
<view class="describe-view">
|
|
|
- 共{{ selectList.length }}种</text>
|
|
|
+ 共{{ selectList.length }}种
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -135,6 +137,9 @@ export default {
|
|
|
if(option.customName){
|
|
|
this.form.customName = option.customName
|
|
|
}
|
|
|
+
|
|
|
+ this.listenScanItem()
|
|
|
+
|
|
|
},
|
|
|
onShow(){
|
|
|
if(!this.$util.isEmpty(uni.getStorageSync("newClient"))){
|
|
|
@@ -142,7 +147,8 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
onUnload(){
|
|
|
- uni.removeStorageSync('newClient');
|
|
|
+ uni.removeStorageSync('newClient')
|
|
|
+ uni.$off('listenGetScanCode')
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters(["getMerchantInfo", "getLoginInfo"]),
|