cm-order-temp.vue 5.5 KB

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