bundle_detail.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <template>
  2. <view v-show="data.bundlePartList || data.bundleItemList" class="bundle_detail_wrap">
  3. <view class="uni-col-10" >
  4. <view class="list-title flex align_center justify_between" hover-class="navigator-hover">
  5. <view class="bundle-name">{{data.name}}</view>
  6. </view>
  7. <!-- 套餐包含服务项 -->
  8. <view v-show="serverList.length" class="bundle-list flex flex_column" v-for="item in serverList" :key="item.id">
  9. <view class="line-height font32">
  10. {{item.itemName}}-{{item.itemClsName}}
  11. </view>
  12. <view class="flex align_end justify_between">
  13. <view class="uni-col-6 flex flex_column">
  14. <text class="line-height">单次工时:¥{{item.itemPrice||0}}</text>
  15. </view>
  16. <view class="line-height">
  17. 次数:<text style="padding: 0 2px;font-weight: bold;">{{ item.times || 0 }}</text>次
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. export default {
  26. props:{
  27. data: {
  28. type: Object,
  29. default: function(){
  30. return {}
  31. }
  32. },
  33. // 父级页面 detail:套餐详情 sellOrder:购买套餐
  34. parentPage: {
  35. type: String,
  36. default: ''
  37. }
  38. },
  39. watch:{
  40. data (newV,oldV){
  41. this.partList = newV ? newV.bundlePartList : []
  42. this.serverList = newV ? newV.bundleItemList : []
  43. }
  44. },
  45. data() {
  46. return {
  47. partList: this.data.bundlePartList ,
  48. serverList: this.data.bundleItemList
  49. }
  50. },
  51. onLoad() {
  52. },
  53. methods: {
  54. }
  55. }
  56. </script>
  57. <style lang="scss">
  58. .bundle_detail_wrap{
  59. background-color: white;
  60. padding: 20rpx;
  61. margin-bottom: 20rpx;
  62. .flex{
  63. display: flex;
  64. }
  65. .align_end{
  66. align-items: flex-end;
  67. }
  68. .justify_between{
  69. justify-content: space-between;
  70. }
  71. .flex_column{
  72. flex-direction: column;
  73. }
  74. .bundle-name{
  75. font-size: 30rpx;
  76. font-weight: bold;
  77. }
  78. .pack-num{
  79. color: #8b8b8b;
  80. font-size: 28rpx;
  81. margin-left: 40rpx;
  82. }
  83. .price{
  84. color: red;
  85. font-size: 30rpx;
  86. }
  87. .bundle-list{
  88. padding: 10rpx 0 20rpx ;
  89. font-size: 28rpx;
  90. border-bottom: 1px solid #eee;
  91. }
  92. .bundle-list:last-child{
  93. border-bottom: none;
  94. }
  95. .list-title{
  96. padding-bottom: 20rpx;
  97. border-bottom: 1px solid #eee;
  98. }
  99. .line-height {
  100. line-height: 60rpx;
  101. }
  102. .vip-text{
  103. font-size: 28rpx;
  104. font-style: oblique;
  105. margin-left: 3px;
  106. color: #fff;
  107. padding: 6rpx 12rpx 6rpx 10rpx;
  108. background-color: #ff5500;
  109. border-radius: 10rpx;
  110. }
  111. }
  112. </style>