logisticsRecord.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <template name="logistics">
  2. <view class="logistics-template">
  3. <!-- 物流信息 -->
  4. <view
  5. class="logistics-content"
  6. v-if="logisticsData.length > 0"
  7. v-for="(item, index) in logisticsData"
  8. :key="index"
  9. >
  10. <view class="logistics-top"> <text class="name">物流信息</text> </view>
  11. <view class="logistics-warp">
  12. <view class="logistics-warp__wrapper">
  13. <view class="logistics-main">
  14. <view class="logistics-main-top">
  15. <view class="main-top" @click="showlogistics(index)">
  16. {{ item.expressname }}:{{ item.expressNumber }}
  17. <text class="clipboard" @click="clipboard(item.expressNumber)">复制</text>
  18. <text
  19. class="arrow-showMore iconfont icon-web_xiangxiazhankai"
  20. :style="{ transform: item.isOpen ? 'rotate(180deg)' : 'rotate(0)' }"
  21. ></text>
  22. </view>
  23. <view class="main-bot"> 发货时间:{{ item.expressNewtime }} </view>
  24. </view>
  25. <view
  26. v-if="item.expressRecord.length > 0"
  27. v-for="(infoItem, infoIndex) in item.expressRecord"
  28. :key="infoIndex"
  29. :class="{ 'logistics-warp--hide': !item.isOpen }"
  30. class="logistics-main-bot logistics-animation"
  31. :style="{
  32. transform: item.isOpen ? 'translateY(0)' : 'translateY(-50%)',
  33. '-webkit-transform': item.isOpen ? 'translateY(0)' : 'translateY(-50%)'
  34. }"
  35. >
  36. {{ infoItem.time }} {{ infoItem.desc }}
  37. </view>
  38. <view
  39. v-if="item.expressRecord"
  40. :class="{ 'logistics-warp--hide': !item.isOpen }"
  41. class="logistics-main-bot logistics-animation"
  42. :style="{
  43. transform: item.isOpen ? 'translateY(0)' : 'translateY(-50%)',
  44. '-webkit-transform': item.isOpen ? 'translateY(0)' : 'translateY(-50%)'
  45. }"
  46. >
  47. 暂无物流信息
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. <view class="logistics-content" v-else> 暂无物流信息 </view>
  54. </view>
  55. </template>
  56. <script>
  57. import thorui from '@/components/clipboard/clipboard.thorui.js'
  58. export default {
  59. name: 'logistics',
  60. data() {
  61. return {
  62. title: '发票信息',
  63. logisticsData: ''
  64. }
  65. },
  66. created() {},
  67. computed: {},
  68. methods: {
  69. initData(res) {
  70. this.logisticsData = res
  71. },
  72. showlogistics(index) {
  73. let isOpen = this.logisticsData[index]['isOpen']
  74. this.logisticsData[index]['isOpen'] = !isOpen
  75. },
  76. clipboard(data) {
  77. thorui.getClipboardData(data, res => {
  78. if (res) {
  79. this.$util.msg('复制成功', 2000, true, 'success')
  80. } else {
  81. this.$util.msg('复制失败', 2000, true, 'none')
  82. }
  83. })
  84. }
  85. }
  86. }
  87. </script>
  88. <style lang="scss">
  89. .logistics-template {
  90. width: 100%;
  91. height: 100%;
  92. background: #ffffff;
  93. float: left;
  94. .logistics-content {
  95. width: 702rpx;
  96. padding: 20rpx 24rpx;
  97. height: auto;
  98. .arrow-showMore {
  99. position: absolute;
  100. right: 24rpx;
  101. z-index: 99;
  102. }
  103. .logistics-top {
  104. width: 100%;
  105. height: 40rpx;
  106. line-height: 40rpx;
  107. font-size: $font-size-28;
  108. color: $text-color;
  109. text-align: left;
  110. padding-bottom: 24rpx;
  111. border-bottom: 1px solid #f8f8f8;
  112. .name {
  113. float: left;
  114. font-weight: bold;
  115. }
  116. .icon-web_xiangxiazhankai {
  117. transform: rotate(0deg);
  118. transform-origin: center center;
  119. float: right;
  120. font-size: $font-size-32;
  121. color: #000000;
  122. /* transition: transform 0.3s ease;*/
  123. transition-property: transform;
  124. transition-duration: 0.3s;
  125. transition-timing-function: ease;
  126. }
  127. .icon-web_xiangxiazhankai-active {
  128. transform: rotate(180deg);
  129. }
  130. }
  131. .logistics-warp {
  132. width: 100%;
  133. overflow: hidden;
  134. .table {
  135. height: 76rpx;
  136. line-height: 76rpx;
  137. font-size: $font-size-26;
  138. color: $text-color;
  139. text-align: left;
  140. }
  141. }
  142. .logistics-main-top {
  143. width: 100%;
  144. height: auto;
  145. float: left;
  146. padding-top: 24rpx;
  147. margin-bottom: 14rpx;
  148. .main-top,
  149. .main-bot {
  150. font-size: $font-size-28;
  151. color: $text-color;
  152. line-height: 40rpx;
  153. margin: 4rpx 0;
  154. }
  155. }
  156. .logistics-main-bot {
  157. width: 100%;
  158. height: auto;
  159. font-size: $font-size-24;
  160. color: $text-color;
  161. line-height: 56rpx;
  162. text-align: justify;
  163. }
  164. .logistics-animation {
  165. /* transition: transform 0.3s ease;*/
  166. transition-property: transform;
  167. transition-duration: 0.3s;
  168. transition-timing-function: ease;
  169. }
  170. .logistics-warp__wrapper {
  171. /* #ifndef APP-NVUE */
  172. display: flex;
  173. /* #endif */
  174. flex-direction: column;
  175. }
  176. .logistics-warp--hide {
  177. // padding: 0 0;
  178. // height: 0px;
  179. // line-height: 0px;
  180. display: none;
  181. }
  182. .clipboard {
  183. width: 84rpx;
  184. height: 36rpx;
  185. background: linear-gradient(34deg, rgba(255, 41, 41, 1) 0%, rgba(255, 109, 27, 1) 100%);
  186. text-align: center;
  187. font-size: $font-size-24;
  188. color: #ffffff;
  189. border-radius: 6rpx;
  190. line-height: 36rpx;
  191. display: inline-block;
  192. margin-left: 42rpx;
  193. }
  194. }
  195. }
  196. </style>