customOrderItem.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <view class="order-item-view" @click="clickItemEvent">
  3. <view class="item-header">
  4. <view class="title">
  5. <image class="icon" :src="info.customAvatar" alt="" />
  6. <text class="name">
  7. {{ info.customName }}
  8. </text>
  9. </view>
  10. <view class="status">已结账</view>
  11. </view>
  12. <view class="item-main" >
  13. <view class="item-info">
  14. <view class="info-row">
  15. <text class="info-label"> 日期:</text>
  16. <text class="info-value">{{ info.addTime }} </text>
  17. </view>
  18. <view class="info-row">
  19. <text class="info-label"> 单号:</text>
  20. <text class="info-value">{{ info.orderSn }} </text>
  21. </view>
  22. <view class="info-row">
  23. <text class="info-label"> 人员:</text>
  24. <text class="info-value">{{ info.operator }} </text>
  25. </view>
  26. </view>
  27. <view class="item-price"
  28. >¥{{ info.realPrice }} <text class="iconfont iconxiangyou"></text>
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. import { PURCHASE_ORDER_STATUS } from "@/utils/declare";
  35. export default {
  36. name: "orderItem",
  37. props: {
  38. info: {
  39. required: true
  40. }
  41. },
  42. data() {
  43. return {
  44. PURCHASE_ORDER_STATUS
  45. };
  46. },
  47. computed: {},
  48. methods: {
  49. clickItemEvent() {
  50. this.$emit("click", this.info);
  51. }
  52. }
  53. };
  54. </script>
  55. <style lang="scss" scoped>
  56. .order-item-view {
  57. padding: 30upx;
  58. margin-bottom: 20upx;
  59. width: 100%;
  60. background-color: #fff;
  61. .item-header {
  62. display: flex;
  63. justify-content: space-between;
  64. align-items: center;
  65. margin-bottom: 20upx;
  66. .title {
  67. display: flex;
  68. align-items: center;
  69. flex: 1;
  70. .icon {
  71. margin-right: 20upx;
  72. width: 50upx;
  73. height: 50upx;
  74. border-radius: 25upx;
  75. border-radius: 50%;
  76. }
  77. .name {
  78. font-size: 32upx;
  79. font-weight: 600;
  80. color: #333333;
  81. }
  82. }
  83. .status {
  84. flex-shrink: 0;
  85. color: $mainColor;
  86. }
  87. }
  88. .item-main {
  89. display: flex;
  90. align-items: flex-end;
  91. .item-info {
  92. flex: 1;
  93. font-size: 26upx;
  94. .info-row {
  95. margin-top: 12upx;
  96. display: flex;
  97. align-items: center;
  98. }
  99. .info-label {
  100. font-weight: 400;
  101. color: #999999;
  102. }
  103. .info-value {
  104. font-weight: 400;
  105. color: #333333;
  106. }
  107. }
  108. .item-price {
  109. display: flex;
  110. align-items: center;
  111. flex-shrink: 0;
  112. font-size: 30upx;
  113. font-weight: 600;
  114. color: #333333;
  115. .iconfont {
  116. font-size: 28upx;
  117. color: #999999;
  118. }
  119. }
  120. }
  121. }
  122. </style>