record.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. <template>
  2. <view class="record-box">
  3. <!-- #ifdef MP||APP-PLUS -->
  4. <view class="w-full header_bg" :style="{'height': (120 + sysHeight) * 2 + 'rpx'}">
  5. <view class="w-full abs-lb white_jianbian"></view>
  6. </view>
  7. <!-- #endif -->
  8. <!-- #ifdef H5 -->
  9. <view class="w-full header_bg" :style="{'height': (100 + sysHeight) * 2 + 'rpx'}">
  10. <view class="w-full abs-lb white_jianbian"></view>
  11. </view>
  12. <!-- #endif -->
  13. <!-- #ifdef MP -->
  14. <NavBar titleText="发货记录" :iconColor="iconColor" :textColor="iconColor" :isScrolling="isScrolling" showBack></NavBar>
  15. <!-- #endif -->
  16. <view class="product-box">
  17. <view class="acea-row productInfo-box">
  18. <view class="acea-row productInfo-item" v-for="(item,index) in productInfo" :key="index">
  19. <span class="num">x{{item.num}}</span>
  20. <image class="wrapper-img" :src="item.image" mode=""></image>
  21. <view class="acea-row row-column-between ml20">
  22. <view class="line1 line1-width f-s-28">
  23. {{item.productName}}
  24. </view>
  25. <view class="f-s-24 line1-width line2 color-999">
  26. {{item.sku}}
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. <view class="info-box pos-rel">
  32. <view class="item acea-row row-between">
  33. <view>发货方式</view>
  34. <view v-if="!secodeType">{{deliveryInfo.deliveryType=='merchant'?'商家送货':'无需发货'}}</view>
  35. <view v-if="secodeType">虚拟发货</view>
  36. </view>
  37. <view class="item acea-row row-between" v-if="deliveryInfo.deliveryType=='noNeed'">
  38. <view>发货备注</view>
  39. <view class="text-width">{{deliveryInfo.deliveryMark}}</view>
  40. </view>
  41. <view class="item acea-row row-between" v-if="deliveryInfo.deliveryType=='merchant'">
  42. <view>配送人员</view>
  43. <view>{{deliveryInfo.deliveryCarrier}}</view>
  44. </view>
  45. <view class="item acea-row row-between" v-if="deliveryInfo.deliveryType=='merchant'">
  46. <view>手机号码</view>
  47. <view>{{deliveryInfo.carrierPhone}}</view>
  48. </view>
  49. </view>
  50. </view>
  51. <view class="footer">
  52. <view class="update" @click="toUpdate">编辑</view>
  53. </view>
  54. </view>
  55. </template>
  56. <script>
  57. import {
  58. orderInvoiceListInfo
  59. } from '@/api/order.js';
  60. // #ifdef MP
  61. import NavBar from '../components/NavBar.vue'
  62. // #endif
  63. let sysHeight = uni.getSystemInfoSync().statusBarHeight;
  64. export default{
  65. components: {
  66. // #ifdef MP
  67. NavBar,
  68. // #endif
  69. },
  70. data(){
  71. return{
  72. sysHeight: sysHeight,
  73. // #ifdef MP
  74. iconColor: '#FFFFFF',
  75. isScrolling: false,
  76. // #endif
  77. pageScrollStatus: false,
  78. productInfo:[],
  79. deliveryInfo:{},
  80. orderNo:'',
  81. index:'',
  82. secodeType:null,
  83. }
  84. },
  85. onLoad(options) {
  86. this.orderNo=options.orderNo
  87. this.index=options.index
  88. this.secodeType=options.secodeType
  89. this.getInfo(options.orderNo,options.index)
  90. },
  91. methods:{
  92. //编辑配送信息
  93. toUpdate(){
  94. uni.redirectTo({
  95. url:`/pages/admin/order/send?orderNo=${this.orderNo}&type=2&index=${this.index}`
  96. })
  97. },
  98. getInfo(orderNo,index){
  99. orderInvoiceListInfo(orderNo).then(res=>{
  100. this.deliveryInfo=res.data.invoiceList[index]
  101. this.productInfo=res.data.invoiceList[index]['detailList']
  102. })
  103. },
  104. onPageScroll(object) {
  105. if (object.scrollTop > 100) {
  106. this.pageScrollStatus = true;
  107. } else if (object.scrollTop < 100) {
  108. this.pageScrollStatus = false;
  109. }
  110. // #ifdef MP
  111. if (object.scrollTop > 50) {
  112. this.isScrolling = true;
  113. this.iconColor = '#333333';
  114. } else if (object.scrollTop < 50) {
  115. this.isScrolling = false;
  116. this.iconColor = '#FFFFFF';
  117. }
  118. // #endif
  119. uni.$emit('scroll');
  120. },
  121. }
  122. }
  123. </script>
  124. <style lang="scss" scoped>
  125. .header_bg {
  126. position: absolute;
  127. top: 0;
  128. left: 0;
  129. width: 100%;
  130. height: 369rpx;
  131. background: linear-gradient(270deg, #01ABF8 0%, #2A7EFB 100%);
  132. }
  133. .white_jianbian {
  134. height: 160rpx;
  135. background: linear-gradient(0deg, #F5F5F5 0%, rgba(245, 245, 245, 0) 100%);
  136. }
  137. .wrapper-img {
  138. display: inline-block;
  139. margin-right: 10rpx;
  140. }
  141. .color-999{
  142. color: #999;
  143. }
  144. .f-s-28{
  145. font-size: 28rpx;
  146. }
  147. .record-box{
  148. overflow: hidden;
  149. padding-bottom: 200rpx;
  150. .product-box{
  151. padding: 0 24rpx;
  152. /* #ifdef H5 */
  153. margin-top: 100rpx;
  154. /* #endif */
  155. /* #ifndef H5 */
  156. margin-top: 50rpx;
  157. /* #endif */
  158. .productInfo-box{
  159. position: relative;
  160. z-index: 999;
  161. padding: 24rpx;
  162. border-radius: 14rpx;
  163. background: #fff;
  164. .productInfo-item{
  165. position: relative;
  166. padding: 10rpx 0;
  167. .wrapper-img{
  168. width: 130rpx;
  169. height: 130rpx;
  170. }
  171. .line1-width{
  172. width: 450rpx;
  173. }
  174. .num{
  175. position: absolute;
  176. right: -40rpx;
  177. top: 10rpx;
  178. color: #999;
  179. }
  180. }
  181. }
  182. }
  183. .info-box{
  184. padding:24rpx;
  185. margin-top: 24rpx;
  186. background: #fff;
  187. border-radius: 14rpx;
  188. .text-width{
  189. width: 400rpx;
  190. text-align: right;
  191. }
  192. .item{
  193. padding: 20rpx 0;
  194. }
  195. }
  196. .footer{
  197. width: 100%;
  198. height: 100rpx;
  199. position: fixed;
  200. bottom: 0;
  201. display: flex;
  202. align-items: center;
  203. justify-content: flex-end;
  204. padding: 0 24rpx;
  205. background: #fff;
  206. height: calc(100rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  207. height: calc(100rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  208. padding-bottom: calc(0rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  209. padding-bottom: calc(0rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  210. .update{
  211. background: #2A7EFB;
  212. width: 150rpx;
  213. height: 60rpx;
  214. border-radius: 30rpx;
  215. line-height: 60rpx;
  216. text-align: center;
  217. color: #fff;
  218. }
  219. }
  220. }
  221. </style>