cm-order-temp.vue 5.3 KB

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