cm-order-temp.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. <template name="information">
  2. <view class="information-template">
  3. <!-- 订单信息 -->
  4. <view class="information-content">
  5. <view class="information-view title">
  6. <view class="view-num">
  7. <view class="bage-text">
  8. 订单编号:
  9. <label class="label">
  10. {{ orderData.shopOrderNo ? orderData.shopOrderNo : '' }}
  11. ({{ orderData.shopOrderId }})
  12. </label>
  13. <text class="clipboard" @click="clipboard(orderData.shopOrderId)">复制ID</text>
  14. </view>
  15. </view>
  16. </view>
  17. <view class="information-view">
  18. <view class="view-num time">
  19. 下单时间:<label class="label">{{ orderData.orderTime ? orderData.orderTime : '' }}</label>
  20. </view>
  21. </view>
  22. <!-- <view class="information-view same" v-if="orderData.svipFullReduction > 0">
  23. <view class="view-man">
  24. 超级会员优惠:<label class="label">¥{{ orderData.svipFullReduction | NumFormat }}</label>
  25. </view>
  26. </view>
  27. <view class="information-view" v-if="orderData.userBeans > 0">
  28. <view class="view-man">
  29. 采美豆抵用运费:<label class="label">{{ orderData.userBeans }}</label>
  30. </view>
  31. </view>-->
  32. </view>
  33. </view>
  34. </template>
  35. <script>
  36. const thorui = require('@/components/clipboard/clipboard.thorui.js')
  37. export default {
  38. name: 'orderInfo',
  39. props: {
  40. orderInfo: {
  41. type: Object
  42. }
  43. },
  44. data() {
  45. return {
  46. orderData: '',
  47. openShowflag: false,
  48. }
  49. },
  50. created() {
  51. this.initData(this.orderInfo)
  52. },
  53. filters: {
  54. NumFormat(value) {
  55. //处理金额
  56. if (!value) return '0.00'
  57. let number = Number(value)
  58. return number.toFixed(2)
  59. }
  60. },
  61. computed: {},
  62. watch: {
  63. orderInfo: {
  64. handler: function(val) {
  65. this.initData(val)
  66. },
  67. deep: true //对象内部的属性监听,也叫深度监听
  68. }
  69. },
  70. methods: {
  71. openShow() {
  72. this.openShowflag = true
  73. this.infoflag = false
  74. },
  75. initData(data) {
  76. this.orderData = data
  77. },
  78. clipboard(shopOrderId) {
  79. const data = shopOrderId + ''
  80. thorui.getClipboardData(data, res => {
  81. if (res) {
  82. uni.hideToast()
  83. this.$util.msg('复制成功', 2000, true, 'success')
  84. } else {
  85. uni.hideToast()
  86. this.$util.msg('复制失败', 2000, true, 'none')
  87. }
  88. })
  89. }
  90. }
  91. }
  92. </script>
  93. <style lang="scss">
  94. .information-template {
  95. width: 100%;
  96. height: auto;
  97. background: #ffffff;
  98. float: left;
  99. margin-top: 24rpx;
  100. .information-content {
  101. width: 702rpx;
  102. padding: 15rpx 24rpx 20rpx 24rpx;
  103. .information-view {
  104. height: 50rpx;
  105. line-height: 50rpx;
  106. font-size: $font-size-24;
  107. margin: 4rpx 0;
  108. // display: flex;
  109. width: 100%;
  110. display: inline-block;
  111. &.same {
  112. width: 45%;
  113. text-align: right;
  114. }
  115. view {
  116. // flex: 1;
  117. color: $text-color;
  118. color: #999999;
  119. .label {
  120. color: #666666;
  121. }
  122. }
  123. .view-num.title {
  124. height: 68rpx;
  125. line-height: 68rpx;
  126. position: relative;
  127. .bage-icon {
  128. width: 50rpx;
  129. height: 50rpx;
  130. display: block;
  131. position: absolute;
  132. right: 0;
  133. top: 9rpx;
  134. }
  135. .bage-buss {
  136. display: inline-block;
  137. width: 72rpx;
  138. height: 30rpx;
  139. background: radial-gradient(circle, rgba(255, 39, 180, 1) 0%, rgba(193, 77, 245, 1) 100%);
  140. border-radius: 4rpx;
  141. line-height: 30rpx;
  142. font-size: $font-size-24;
  143. text-align: center;
  144. color: #ffffff;
  145. margin-top: 10rpx;
  146. }
  147. .bage-auto {
  148. display: inline-block;
  149. width: 72rpx;
  150. height: 30rpx;
  151. background: radial-gradient(circle, rgba(255, 180, 39, 1) 0%, rgba(245, 142, 77, 1) 100%);
  152. border-radius: 4rpx;
  153. line-height: 30rpx;
  154. font-size: $font-size-24;
  155. text-align: center;
  156. color: #ffffff;
  157. margin-top: 10rpx;
  158. }
  159. .bage-text {
  160. display: inline-block;
  161. font-size: $font-size-28;
  162. line-height: 68rpx;
  163. text-align: left;
  164. color: $color-system;
  165. // margin-left: 10rpx;
  166. }
  167. }
  168. .view-num.ord {
  169. color: $color-system;
  170. text-align: left;
  171. flex: 3;
  172. font-weight: bold;
  173. }
  174. .view-num.time {
  175. color: #999999;
  176. flex: 6;
  177. }
  178. // .bold{
  179. // font-weight: bold;
  180. // }
  181. .red {
  182. color: #ff2a2a;
  183. }
  184. .view-type {
  185. float: right;
  186. text-align: right;
  187. color: #ff2a2a;
  188. flex: 4;
  189. }
  190. .clipboard {
  191. height: 44rpx;
  192. background: #e2e2e2;
  193. text-align: center;
  194. font-size: $font-size-24;
  195. color: #999999;
  196. border-radius: 22rpx;
  197. line-height: 40rpx;
  198. display: inline-block;
  199. margin-left: 24rpx;
  200. border: 1px solid #f7f7f7;
  201. box-sizing: border-box;
  202. padding: 0 10px;
  203. }
  204. }
  205. }
  206. }
  207. .openinfo {
  208. width: 100%;
  209. height: 48rpx;
  210. margin-bottom: 30rpx;
  211. .btnInfo{
  212. width: 168rpx;
  213. height: 48rpx;
  214. line-height: 46rpx;
  215. box-sizing: border-box;
  216. border: 2rpx solid #e1e1e1;
  217. border-radius: 8rpx;
  218. text-align: center;
  219. color: #b2b2b2;
  220. margin: 0 auto;
  221. font-size: $font-size-24;
  222. }
  223. }
  224. </style>