Goods.wxml
5.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<wxs src="/tabWorkOrder/components/Goods/index.wxs" module="filter" />
<popup show="{{ show }}" title="选择商品" bindconfirm="confirm" bindcancel="cancel">
<view class="coupon-box">
<search-input bindsearch="searchGoods" value="{{ keyWord }}" />
<scroll-view class="coupon" scroll-y>
<block wx:if="{{ goodsList.length > 0 }}">
<view class="box">
<block wx:for="{{ goodsList }}" wx:key="ind" wx:for-index="ind" wx:for-item="i">
<view class="item-wrap">
<view class="itemBox">
<view class="choose" catchtap="choose" data-ind="{{ ind }}" data-item="{{ i }}">
<image src="{{ filter.getImageSrc(i.active) }}" />
</view>
<!-- 单商品 -->
<block wx:if="{{ i.goodsFlag==1 }}">
<view class="item {{ minPrice?(minPrice/100)>= i.minSellPrice ?'':'disableSelect':'' }}">
<view class="value {{ i.active?'labelWidth':'' }}" catchtap="choose" data-ind="{{ ind }}" data-item="{{ i }}">
<view class="name goods-name {{ i.active?'textWidth':'' }}">
<view class="goods-name-with-icon">
<text class="goods-name-text text-hide">{{filter.replaceItemText(i.goods.goodsAlias) ||filter.replaceItemText(i.goods.upgradeGoodsName) || filter.replaceItemText(i.goods.goodsInfo.goodsName)}}</text>
<image wx:if="{{ filter.isMarketingActive(i) }}" class="marketing-icon" src="/tabWorkOrder/images/activeIcon.png" mode="aspectFit" />
</view>
<text wx:if="{{ i.goods.merchantGoodsPosition || i.goods.upgradeGoodsPosition }}">{{'「' + i.goods.positionStr+'」'}}</text>
<text class="warning_text" wx:if="{{ !i.goods.merchantGoodsPosition && !i.goods.upgradeGoodsPosition && (i.goods.goodsInfo.goodsType == 1 || i.goods.goodsInfo.goodsType == baseConfigData.selfBuildFilmType) }}">无部位</text>
</view>
<view class="last" wx:if="{{ !i.active }}">
<text class="price">¥{{i.goods.price}}</text>
</view>
</view>
<block wx:if="{{ i.active }}">
<view class="control">
<view class="minus" catchtap="addCount" data-count="{{ -1 }}" data-ind="{{ ind }}" data-item="{{ i }}">-</view>
<input
type="number"
catchtap="noScroll"
class="input"
value="{{ i.count || 1 }}"
catchinput="input"
data-ind="{{ ind }}"
data-item="{{ i }}"
/>
<view class="add" catchtap="addCount" data-count="{{ 1 }}" data-ind="{{ ind }}" data-item="{{ i }}">+</view>
</view>
</block>
</view>
</block>
<!-- 多规格 -->
<block wx:if="{{ i.goodsFlag==2 }}">
<view class="item {{ minPrice?(minPrice/100)>= i.minSellPrice ?'':'disableSelect':'' }}">
<view class="value {{ i.active?'labelWidth':'' }}" catchtap="choose" data-ind="{{ ind }}" data-item="{{ i }}">
<view class="name goods-name {{ i.active?'textWidth':'' }}">
<view class="goods-name-with-icon">
<text class="goods-name-text text-hide">{{i.multipleSpecificationsGoods.baseGoodsName }}</text>
<image wx:if="{{ filter.isMarketingActive(i) }}" class="marketing-icon" src="/tabWorkOrder/images/activeIcon.png" mode="aspectFit" />
</view>
</view>
<view class="last" wx:if="{{ !i.active }}">
<text class="price" wx:if="{{ i.multipleSpecificationsGoods.goods.sellPrice }}">¥{{i.multipleSpecificationsGoods.goods.sellPrice}}</text>
</view>
</view>
<block wx:if="{{ i.active }}">
<view class="control">
<view class="minus" catchtap="addCount" data-count="{{ -1 }}" data-ind="{{ ind }}" data-item="{{ i }}">-</view>
<input
type="number"
catchtap="noScroll"
class="input"
value="{{ i.count || 1 }}"
catchinput="input"
data-ind="{{ ind }}"
data-item="{{ i }}"
/>
<view class="add" catchtap="addCount" data-count="{{ 1 }}" data-ind="{{ ind }}" data-item="{{ i }}">+</view>
</view>
</block>
</view>
</block>
</view>
<view class="specification" wx:if="{{ i.goodsFlag==2 }}">
<view wx:for="{{ i.multipleSpecificationsGoods.specificationList }}" wx:for-item="specific" wx:for-index="specInd">
<gl-cell
border
valueAlign="right"
label="{{ specific.specificationName }}"
labelWidth="var(--fontSize180)"
placeholder="请选择"
bindclick="showPopup"
background="#F7F7F7"
data-show-name="specificBox"
>
<picker
bindchange="handlePickerChange"
data-item="{{ i }}"
value="{{ specific.selectIndex }}"
data-specIndex="{{ specInd }}"
data-index="{{ ind }}"
range="{{ specific.specificationSelectValueList }}"
>
<view class="picker">
<image class="arrow" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{ specific.value }}">{{specific.value}}</view>
<text class="placeholder" wx:else>请选择</text>
</view>
</picker>
</gl-cell>
</view>
</view>
</view>
</block>
</view>
</block>
<block wx:else>
<view class="nothing">暂无数据</view>
</block>
</scroll-view>
</view>
</popup>