customOrderItem.vue 2.4 KB

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