cm-order-temp.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  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. this.$util.msg('复制成功', 2000, true, 'success')
  83. } else {
  84. this.$util.msg('复制失败', 2000, true, 'none')
  85. }
  86. })
  87. }
  88. }
  89. }
  90. </script>
  91. <style lang="scss">
  92. .information-template {
  93. width: 100%;
  94. height: auto;
  95. background: #ffffff;
  96. float: left;
  97. margin-top: 24rpx;
  98. .information-content {
  99. width: 702rpx;
  100. padding: 15rpx 24rpx 20rpx 24rpx;
  101. .information-view {
  102. height: 50rpx;
  103. line-height: 50rpx;
  104. font-size: $font-size-24;
  105. margin: 4rpx 0;
  106. // display: flex;
  107. width: 100%;
  108. display: inline-block;
  109. &.same {
  110. width: 45%;
  111. text-align: right;
  112. }
  113. view {
  114. // flex: 1;
  115. color: $text-color;
  116. color: #999999;
  117. .label {
  118. color: #666666;
  119. }
  120. }
  121. .view-num.title {
  122. height: 68rpx;
  123. line-height: 68rpx;
  124. position: relative;
  125. .bage-icon {
  126. width: 50rpx;
  127. height: 50rpx;
  128. display: block;
  129. position: absolute;
  130. right: 0;
  131. top: 9rpx;
  132. }
  133. .bage-buss {
  134. display: inline-block;
  135. width: 72rpx;
  136. height: 30rpx;
  137. background: radial-gradient(circle, rgba(255, 39, 180, 1) 0%, rgba(193, 77, 245, 1) 100%);
  138. border-radius: 4rpx;
  139. line-height: 30rpx;
  140. font-size: $font-size-24;
  141. text-align: center;
  142. color: #ffffff;
  143. margin-top: 10rpx;
  144. }
  145. .bage-auto {
  146. display: inline-block;
  147. width: 72rpx;
  148. height: 30rpx;
  149. background: radial-gradient(circle, rgba(255, 180, 39, 1) 0%, rgba(245, 142, 77, 1) 100%);
  150. border-radius: 4rpx;
  151. line-height: 30rpx;
  152. font-size: $font-size-24;
  153. text-align: center;
  154. color: #ffffff;
  155. margin-top: 10rpx;
  156. }
  157. .bage-text {
  158. display: inline-block;
  159. font-size: $font-size-28;
  160. line-height: 68rpx;
  161. text-align: left;
  162. color: $color-system;
  163. // margin-left: 10rpx;
  164. }
  165. }
  166. .view-num.ord {
  167. color: $color-system;
  168. text-align: left;
  169. flex: 3;
  170. font-weight: bold;
  171. }
  172. .view-num.time {
  173. color: #999999;
  174. flex: 6;
  175. }
  176. // .bold{
  177. // font-weight: bold;
  178. // }
  179. .red {
  180. color: #ff2a2a;
  181. }
  182. .view-type {
  183. float: right;
  184. text-align: right;
  185. color: #ff2a2a;
  186. flex: 4;
  187. }
  188. .clipboard {
  189. height: 44rpx;
  190. background: #e2e2e2;
  191. text-align: center;
  192. font-size: $font-size-24;
  193. color: #999999;
  194. border-radius: 22rpx;
  195. line-height: 40rpx;
  196. display: inline-block;
  197. margin-left: 24rpx;
  198. border: 1px solid #f7f7f7;
  199. box-sizing: border-box;
  200. padding: 0 10px;
  201. }
  202. }
  203. }
  204. }
  205. .openinfo {
  206. width: 100%;
  207. height: 48rpx;
  208. margin-bottom: 30rpx;
  209. .btnInfo{
  210. width: 168rpx;
  211. height: 48rpx;
  212. line-height: 46rpx;
  213. box-sizing: border-box;
  214. border: 2rpx solid #e1e1e1;
  215. border-radius: 8rpx;
  216. text-align: center;
  217. color: #b2b2b2;
  218. margin: 0 auto;
  219. font-size: $font-size-24;
  220. }
  221. }
  222. </style>