order-goods-row.wxml
6.3 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
118
119
120
121
122
123
124
125
126
127
<wxs src="../../../../index.wxs" module="filter" />
<view class="goods">
<view class="name_box">
<view class="name text-hide alias" wx:if="{{ product.goodsAlias && productName }}">商品别名: {{product.goodsAlias}}</view>
<view class="name text-hide goods-name">
<image wx:if="{{ marketingFlag == 1 && !productName }}" class="marketing-icon" src="/tabWorkOrder/images/activeIcon.png" mode="aspectFit" />
<view class="name-with-icon" wx:if="{{ marketingFlag == 1 && productName }}">
<image class="marketing-icon" src="/tabWorkOrder/images/activeIcon.png" mode="aspectFit" />
<text>{{productName}}</text>
</view>
<text wx:elif="{{ productName }}">{{productName}}</text>
<text wx:else>{{filter.replaceItemText(product.goodsAlias) || filter.replaceItemText(product.upgradeGoodsName) || filter.replaceItemText(product.goodsInfo.goodsName)}}</text>
</view>
</view>
<view class="bottom_box">
<view class="position" wx:if="{{ product.specificationStr }}">{{product.specificationStr}}</view>
<view class="position" wx:elif="{{ product.positionStr }}">{{product.positionStr}}</view>
<view
class="position"
wx:elif="{{ (product.merchantGoodsPosition || product.upgradeGoodsPosition || product.goodsInfo.goodsTypeName||product.upgradeGoodsTypeName) }}"
>
<!-- Logic for formatting position -->
<block wx:if="{{ isPackageSubItem && (product.goodsInfo.goodsTypeName||product.upgradeGoodsTypeName) }}">{{product.goodsInfo.goodsTypeName||product.upgradeGoodsTypeName}}</block>
<block wx:elif="{{ product.merchantGoodsPosition || product.upgradeGoodsPosition }}">{{filter.formatPosition((product.merchantGoodsPosition || product.upgradeGoodsPosition), positionTypeList)}}</block>
<block wx:else>{{product.goodsInfo.goodsTypeName || product.upgradeGoodsTypeName || ''}}</block>
</view>
<view
class="position red_text"
wx:elif="{{ (product.goodsInfo.goodsType == 1 || product.upgradeGoodsType == 1 || product.goodsInfo.goodsType == baseConfigData.selfBuildFilmType || product.upgradeGoodsType == baseConfigData.selfBuildFilmType) && !product.merchantGoodsPosition && !product.upgradeGoodsPosition }}"
>无部位属性</view>
<view class="position" wx:else></view>
<!-- Price and Count -->
<view class="price_count">
<view class="price">
<text>¥</text>
<input
type="digit"
value="{{ product.resetOrder && product.totalPrice !== undefined ? product.totalPrice : (product.sellPrice !== undefined ? product.sellPrice : product.price) }}"
bindinput="changePrice"
disabled="{{ selectPayType == 0 || product.goodsPriceModify || ((marketingFlag == 1 || product.marketingFlag == 1) && (activityId || product.activityId)) }}"
bindblur="priceBlur"
class="{{ (product.basePriceError || product.errorTarget) && (selectPayType != 0) ? 'error' : '' }} {{ selectPayType == 0 || product.goodsPriceModify || ((marketingFlag == 1 || product.marketingFlag == 1) && (activityId || product.activityId)) ? 'disabled' : '' }}"
always-embed
/>
</view>
<!-- Count Trigger -->
<view
class="count"
catchtap="showPopup"
data-show-name="{{ showPopupName }}"
data-type="{{ popupType }}"
data-positionnnum="{{ positionNum }}"
>x {{ count }}</view>
</view>
</view>
<!-- Strategy Box (Discount/Gift) -->
<!-- Only show if NOT disabled or some logic? Original code checks orderType -->
<view class="strategy-box" wx:if="{{ djOrderType == 2 }}">
<view class="discount-types">
<view class="discount-tabs">
<view
class="type-item {{ (product.discountType == 3 || !product.discountType) ? 'active' : '' }}"
catchtap="changeProductDiscountType"
data-type="3"
>无折扣</view>
<view class="type-item {{ product.discountType == 1 ? 'active' : '' }}" catchtap="changeProductDiscountType" data-type="1">折扣比例</view>
<view class="type-item {{ product.discountType == 2 ? 'active' : '' }}" catchtap="changeProductDiscountType" data-type="2">折扣金额</view>
</view>
<view class="discount-input" wx:if="{{ product.discountType == 1 || product.discountType == 2 }}">
<input
type="digit"
placeholder="{{ product.discountType == 1 ? '输入折扣' : '输入金额' }}"
value="{{ product.discountValue }}"
bindinput="inputDiscountValue"
/>
<text> {{product.discountType == 1 ? '折': '元'}}</text>
</view>
</view>
<view class="final-price">
价格
<text class="orange">¥ {{product.finalPrice !== undefined ? product.finalPrice : (product.sellPrice !== undefined ? product.sellPrice : product.price)}}</text>
</view>
</view>
<view class="strategy-box" wx:if="{{ djOrderType == 3 }}">
<view class="gift-row">
<view>是否为赠品</view>
<radio-group bindchange="toggleGift" class="gift-radios">
<label class="radio-label">
<radio value="4" checked="{{ product.discountType == 4 }}" color="#347BFF" />
是
</label>
<label class="radio-label">
<radio value="5" checked="{{ product.discountType != 4 }}" color="#347BFF" />
否
</label>
</radio-group>
</view>
<view class="final-price">
价格
<text class="orange">¥ {{product.finalPrice !== undefined ? product.finalPrice : (product.sellPrice !== undefined ? product.sellPrice : product.price)}}</text>
</view>
</view>
<view class="strategy-box" wx:if="{{ djOrderType == 5 }}">
<view class="discount-types">
<view class="discount-tabs">
<view
class="type-item {{ (product.discountType == 3 || !product.discountType) ? 'active' : '' }}"
catchtap="changeProductDiscountType"
data-type="3"
>无抵扣</view>
<view class="type-item {{ product.discountType == 2 ? 'active' : '' }}" catchtap="changeProductDiscountType" data-type="2">抵扣金额</view>
</view>
<view class="discount-input" wx:if="{{ product.discountType == 2 }}">
<input type="digit" placeholder="输入金额" value="{{ product.discountValue }}" bindinput="inputDiscountValue" />
<text>元</text>
</view>
</view>
<view class="final-price">
价格
<text class="orange">¥ {{product.finalPrice !== undefined ? product.finalPrice : (product.sellPrice !== undefined ? product.sellPrice : product.price)}}</text>
</view>
</view>
<!-- Delete Icon (Only if not package sub-item) -->
<view class="icon" bindtap="delGoodsList" wx:if="{{ !isPackageSubItem }}">
<image src="/tabWorkOrder/images/del.png" />
</view>
</view>