deliveryPrice.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <template>
  2. <div class="send-box">
  3. <div class="title-label">预计配送和预计费用</div>
  4. <div class="send-type">
  5. <!-- <div class="send-item onSend">
  6. <div class="label-name">整车配送</div>
  7. <div class="send-info">
  8. <div class="s-time">7月23 12:23前</div>
  9. <div class="send-price">¥16.00起</div>
  10. </div>
  11. </div> -->
  12. <div class="send-item" v-for="(item,index) of data" :key="index" :title="item.ruleName" :class="{'onSend':currentValue.id == item.id}" @click="priceHandle(index)" >
  13. <div class="label-name">{{item.ruleName}}</div>
  14. <div class="send-info">
  15. <div class="s-time">{{item.endTime}}前</div>
  16. <div class="send-price">¥{{item.estimateFreight}}</div>
  17. </div>
  18. </div>
  19. </div>
  20. </div>
  21. </template>
  22. <script lang="ts">
  23. import { Component, Prop, Vue, Watch } from "vue-property-decorator";
  24. @Component({components:{}})
  25. export default class DeliveryPrice extends Vue {
  26. @Prop()
  27. data?:Array<any>;
  28. @Prop()
  29. currentValue?:any;
  30. onIndex:any=null;
  31. mounted(){
  32. }
  33. priceHandle(index:number){
  34. // this.onIndex = item.id;
  35. this.$emit('prichChange',index)
  36. }
  37. }
  38. </script>
  39. <style lang="scss" scoped>
  40. .send-box{
  41. width: 100%;
  42. box-sizing: border-box;
  43. padding: 16px;
  44. background-color: rgba(255, 226, 160, 0.3);
  45. .title-label{
  46. font-size: 14px;
  47. padding-bottom: 8px;
  48. }
  49. .send-type{
  50. width: 100%;
  51. display: flex;
  52. align-items: center;
  53. .send-item{
  54. width: 156px;
  55. box-sizing: border-box;
  56. border:solid 3px #999;
  57. border-radius: 6px;
  58. overflow: hidden;
  59. margin-right: 32px;
  60. cursor: pointer;
  61. .label-name{
  62. background-color: #999;
  63. color: #FFF;
  64. font-size: 16px;
  65. font-weight: 700;
  66. padding: 2px 0 4px;
  67. text-align: center;
  68. width: 100%;
  69. overflow: hidden;
  70. text-overflow: ellipsis;
  71. white-space: nowrap;
  72. }
  73. .send-info{
  74. padding: 8px 0;
  75. text-align: center;
  76. background-color: #FFF;
  77. .s-time{
  78. font-size: 14px;
  79. color: #1684FC;
  80. font-weight: 700;
  81. }
  82. .send-price{
  83. font-size: 20px;
  84. padding-top: 4px;
  85. }
  86. }
  87. }
  88. .send-item:hover,.onSend{
  89. border:solid 3px #1684FC;
  90. .label-name{
  91. background-color: #1684FC;
  92. }
  93. }
  94. }
  95. }
  96. </style>