order-top.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <template>
  2. <view class="order-top">
  3. <view class="hflex acenter jbetween">
  4. <view class="title">商家信息</view>
  5. <view class="type1" v-if="type == 1">未报价</view>
  6. <view class="type1" v-if="type == 2 && amount == ''">未报价</view>
  7. <view class="type1 type2" v-if="type == 2 && amount !== ''">已报价</view>
  8. <view class="type1 type3" v-if="type == 3">已匹配</view>
  9. </view>
  10. <view class="hflex acenter cell">
  11. <view class="left">商家名称:</view>
  12. <view class="right">{{merchant.name}}</view>
  13. </view>
  14. <view class="hflex acenter jbetween cell">
  15. <view class="hflex acenter">
  16. <view class="left">商家地址:</view>
  17. <view class="right">{{merchant.full_address}}</view>
  18. </view>
  19. <u-icon name="map-fill" color="#2979ff" size="18" @click="getMap"></u-icon>
  20. </view>
  21. <view class="hflex acenter cell">
  22. <view class="left">联系人:</view>
  23. <view class="right">{{name}}</view>
  24. </view>
  25. <view class="hflex acenter jbetween">
  26. <view class="hflex acenter">
  27. <view class="left">手机号:</view>
  28. <view class="right">{{phone}}</view>
  29. </view>
  30. <u-icon name="phone-fill" color="#2979ff" size="18" @click="take"></u-icon>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. export default {
  36. name:"order-top",
  37. props: {
  38. name: {
  39. type: String,
  40. value: ''
  41. },
  42. phone: {
  43. type: String,
  44. value: ''
  45. },
  46. type: {
  47. type: String,
  48. value: ''
  49. },
  50. amount: {
  51. type: String,
  52. value: ''
  53. },
  54. merchant: {
  55. typeof: Object,
  56. value: {}
  57. }
  58. },
  59. data() {
  60. return {
  61. };
  62. },
  63. methods: {
  64. getMap() {
  65. uni.openLocation({
  66. latitude: Number(this.merchant.latitude),
  67. longitude: Number(this.merchant.longitude),
  68. scale: 18,
  69. success: function () {
  70. console.log('success');
  71. }
  72. });
  73. },
  74. take() {
  75. uni.makePhoneCall({
  76. phoneNumber: this.phone
  77. });
  78. }
  79. }
  80. }
  81. </script>
  82. <style lang="scss" scoped>
  83. .order-top {
  84. width: 690rpx;
  85. background: #FFFFFF;
  86. border-radius: 24rpx;
  87. box-sizing: border-box;
  88. padding: 24rpx 20rpx;
  89. .title {
  90. font-size: 30rpx;
  91. font-weight: 500;
  92. color: #222222;
  93. }
  94. .cell {
  95. margin: 16rpx 0 24rpx;
  96. }
  97. .type1 {
  98. width: 96rpx;
  99. height: 40rpx;
  100. background: #FFF4E8;
  101. border-radius: 4rpx;
  102. text-align: center;
  103. line-height: 40rpx;
  104. font-size: 22rpx;
  105. font-weight: 400;
  106. color: #FBA94E;
  107. }
  108. .type2 {
  109. background: #E7EBF7;
  110. color: #506DFF;
  111. }
  112. .type3 {
  113. background: #E6F7E8;
  114. color: #4AB256;
  115. }
  116. .left {
  117. font-size: 26rpx;
  118. font-weight: 400;
  119. color: #222222;
  120. white-space: nowrap;
  121. }
  122. .right {
  123. font-size: 26rpx;
  124. font-weight: 400;
  125. color: #888888;
  126. }
  127. }
  128. </style>