cm-order-temp.vue 5.3 KB

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