order-detail.wxml 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. <!--pages/orders/order-detail.wxml-->
  2. <view class="container">
  3. <navigation-bar title="{{ goodsInfo.orderNo ? '订单详情' : '核对订单' }}"></navigation-bar>
  4. <scroll-view class="record-list" type="list" scroll-y>
  5. <view class="scroll-container">
  6. <view class="order-status" wx:if="{{statusList[status]}}">
  7. <view class="status">
  8. <image src="{{ statusList[status].logo }}"></image>
  9. <text>{{ statusList[status].title }}</text>
  10. </view>
  11. <view class="tips">{{ statusList[status].content }}</view>
  12. </view>
  13. <!-- 添加地址 -->
  14. <view wx:if="{{ hasInstrument && !goodsInfo.orderNo }}" class="addBuyer" bind:tap="onSelectAddress">
  15. <image src="./images/address-top.png" mode="widthFix" class="addressTop"></image>
  16. <view class="addBuyer-left">
  17. <image src="./images/icon-address.png" class="icon-man"></image>
  18. <view class="info" wx:if="{{ receiveAddress }}">
  19. <view class="users">
  20. {{ receiveAddressInfo.addressDetail }}
  21. </view>
  22. <view class="address">
  23. <text class="username">{{ receiveAddressInfo.name }}</text>
  24. <text>{{ receiveAddressInfo.phoneNumber }}</text>
  25. </view>
  26. </view>
  27. <view class="info" wx:else>
  28. <view class="users">
  29. 新建收货地址
  30. </view>
  31. <view class="address">请填写您的收货地址与信息</view>
  32. </view>
  33. </view>
  34. <image src="./images/icon-arrow-right.png" class="arrow-right"></image>
  35. </view>
  36. <view class="order-content">
  37. <view class="item-content" wx:for="{{ goodsInfo.goodsList }}" wx:key="index">
  38. <image class='goods-icon' src="{{ item.pic }}" mode="" />
  39. <view class="goods-desc">
  40. <view class="goodsInfo">
  41. <view class="goods-name">{{ item.name }}</view>
  42. <view class="goods-current-price">¥<text>{{ item.originalPrice }}</text></view>
  43. </view>
  44. <view class="goods-type">
  45. <view>
  46. <text class="goods-card" wx:if="{{ item.typePeriod }}">{{ item.typePeriod }}</text>
  47. </view>
  48. <view class="goods-num">x 1</view>
  49. </view>
  50. </view>
  51. </view>
  52. <view class="goodsInfos">
  53. <view class="goodsInfo-item">
  54. <text class="title">商品总额</text>
  55. <view class="goods-price">
  56. <text class="stuff">¥</text>
  57. <text class="priceZ">{{ goodsInfo.originIntegerPart }}</text>
  58. <text class="priceF">.{{ goodsInfo.originDecimalPart }}</text>
  59. </view>
  60. </view>
  61. <view class="goodsInfo-item" wx:if="{{ goodsInfo.allOriginPrice > goodsInfo.allSalePrice }}">
  62. <text class="title">惊喜优惠</text>
  63. <!-- <view class="calc-price">-¥ {{ goodsInfo.allDiscountPrice }}</view> -->
  64. <view class="goods-price calc-price">
  65. <text class="stuff">-¥</text>
  66. <text class="priceZ">{{ goodsInfo.discountIntegerPart }}</text>
  67. <text class="priceF">.{{ goodsInfo.discountDecimalPart }}</text>
  68. </view>
  69. </view>
  70. <view class="qrcode-line"></view>
  71. <view class="goodsInfo-count">
  72. <view class="goods-price">
  73. <text class="before">共{{ goodsInfo.goodsList.length }}件:</text>
  74. <view class="gp"><text class="stuff">¥</text>
  75. <text class="priceZ">{{ goodsInfo.integerPart }}</text>
  76. <text class="priceF">.{{ goodsInfo.decimalPart }}</text>
  77. </view>
  78. </view>
  79. </view>
  80. </view>
  81. </view>
  82. <view class="wechat-section" wx:if="{{ !goodsInfo.orderNo }}">
  83. <view class="wechat-left">
  84. <image src="./images/icon-wechat.png"></image>
  85. 微信支付
  86. </view>
  87. <image src="./images/icon-checkbox.png" class="checkbox"></image>
  88. </view>
  89. <view class="order-time" wx:if="{{ goodsInfo.orderNo }}">
  90. <block wx:if="{{ receiveAddress }}">
  91. <template is="address" data="{{ receiveAddressInfo }}"></template>
  92. <view class="line"></view>
  93. <block wx:if="{{ isExpanded }}">
  94. <block wx:if="{{ userBeneficiaryId }}">
  95. <template is="schoolInfo" data="{{ userBeneficiaryInfo }}"></template>
  96. <view class="line" wx:if="{{ !receiveAddress }}"></view>
  97. </block>
  98. <template is="orderInfo" data="{{ goodsInfo }}"></template>
  99. </block>
  100. </block>
  101. <block wx:else>
  102. <block wx:if="{{ userBeneficiaryId }}">
  103. <template is="schoolInfo" data="{{ userBeneficiaryInfo }}"></template>
  104. <view class="line" wx:if="{{ !receiveAddress }}"></view>
  105. </block>
  106. <block wx:if="{{ isExpanded || !userBeneficiaryId }}">
  107. <template is="orderInfo" data="{{ goodsInfo }}"></template>
  108. </block>
  109. </block>
  110. <view class="order-item" bind:tap="onExpanded" wx:if="{{ userBeneficiaryId }}">
  111. <view class="title">更多信息</view>
  112. <view class="value {{ isExpanded ? 'expanded' : '' }}">
  113. {{ isExpanded ? '收起' : '展开' }}
  114. <image src="./images/icon-down.png" class="iconDown"></image>
  115. </view>
  116. </view>
  117. </view>
  118. </view>
  119. <view class="order-btn">
  120. <view class="more">
  121. <view class="price-section">
  122. <view class="price">
  123. <view class="desc">共计</view>
  124. <view class="currentPrice">
  125. <text class="stuff">¥</text>
  126. <text class="priceZ">{{ goodsInfo.integerPart }}</text>
  127. <text class="priceF">.{{ goodsInfo.decimalPart }}</text>
  128. </view>
  129. <block wx:if="{{ goodsInfo.allDiscountPrice > 0 }}">
  130. <text class="line"></text>
  131. <text class="discountPrice">优惠 ¥{{ goodsInfo.allDiscountPrice }}</text>
  132. </block>
  133. </view>
  134. </view>
  135. <button type="primary" bind:tap="onSubmit">{{ goodsInfo.orderNo ? '继续支付' : '提交' }}</button>
  136. </view>
  137. </view>
  138. </scroll-view>
  139. <van-popup show="{{ addressShow }}" safe-area-inset-bottom="{{false}}" lock-scroll="{{true}}" bind:close="onCloseAddress" position="bottom" round z-index="101" bind:after-leave="onAddressAfterLeave">
  140. <view class="addressContainer" wx:if="{{ !addressAfterLeave }}">
  141. <image src="./images/icon-close1.png" class="icon-close" bind:tap="onCloseAddress" />
  142. <view class="pop-address-title">
  143. {{ id ? '修改收货地址' : '新建收货地址' }}
  144. </view>
  145. <van-cell-group border="{{ false }}" class="cell-group">
  146. <van-field model:value="{{ name }}" label="收货人" placeholder="请填写收货人姓名" placeholder-style="color: #bbb" maxlength="50" />
  147. <van-field model:value="{{ phoneNumber }}" label="电话号码" type="number" placeholder-style="color: #bbb" placeholder="请输入手机号码" maxlength="11" />
  148. <van-field value="{{ provinceName ? provinceName + '/' + cityName + (regionName ? '/' + regionName : '' ) : '' }}" label="选择地区" placeholder-style="color: #bbb" placeholder="请选择省/市/区" readonly is-link bind:tap="onShowAreaList" />
  149. <van-field border="{{false}}" model:value="{{ detailAddress }}" label="详细地址" type="textarea" placeholder-style="color: #bbb" placeholder="请填写小区/楼号/单元/门牌号" input-class="textarea" autosize="{{ { maxHeight: 80, minHeight: 30 } }}" maxlength="100" />
  150. </van-cell-group>
  151. <view class="pop-btn-group">
  152. <button class="submit-btn" bind:tap="onOperationAddress">确认</button>
  153. </view>
  154. </view>
  155. </van-popup>
  156. <!-- 地区 -->
  157. <van-popup round="{{true}}" lock-scroll="{{true}}" z-index="{{103}}" show="{{showArea}}" position="bottom" safe-area-inset-bottom="{{false}}" bind:close="onCloseAreaList">
  158. <van-area id='area1' areaList="{{areaList}}" visible-item-count="9" item-height="46" value="{{ regionCode }}" bind:cancel="onCloseAreaList" bind:confirm="submitArea" />
  159. </van-popup>
  160. <!-- <service popShow="{{ showService }}" bind:changePop="changePop"></service> -->
  161. </view>
  162. <template name="address">
  163. <view class="order-item">
  164. <view class="title">收货人</view>
  165. <view class="value">{{ receiveAddressInfo.name }}</view>
  166. </view>
  167. <view class="order-item">
  168. <view class="title">电话号码</view>
  169. <view class="value">{{ receiveAddressInfo.phoneNumber }}</view>
  170. </view>
  171. <view class="order-item">
  172. <view class="title">收货地址</view>
  173. <view class="value">{{ receiveAddressInfo.addressDetail }}</view>
  174. </view>
  175. </template>
  176. <template name="schoolInfo">
  177. <view class="order-item">
  178. <view class="title">享用者姓名</view>
  179. <view class="value">{{ userBeneficiaryInfo.name }}</view>
  180. </view>
  181. <view class="order-item">
  182. <view class="title">电话号码</view>
  183. <view class="value">{{ userBeneficiaryInfo.phoneNumber }}</view>
  184. </view>
  185. <view class="order-item">
  186. <view class="title">学校信息</view>
  187. <view class="value">{{ userBeneficiaryInfo.schoolInfo }}</view>
  188. </view>
  189. <!-- name: beneficiary.name,
  190. phoneNumber: beneficiary.phone,
  191. schoolInfo: tempSchoolAddress.join('') -->
  192. </template>
  193. <template name="orderInfo">
  194. <view class="order-item">
  195. <view class="title">订单编号</view>
  196. <view class="value">{{ goodsInfo.orderNo }}
  197. <view class="copy" bind:tap="onCopy" data-orderno="{{goodsInfo.orderNo}}">复制</view>
  198. </view>
  199. </view>
  200. <view class="order-item">
  201. <view class="title">创建时间</view>
  202. <view class="value">{{ goodsInfo.createTime }}</view>
  203. </view>
  204. </template>