cm-order-temp.vue 4.6 KB

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