cm-price.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <template name="cm-price">
  2. <!-- 商品详情价格判断 -->
  3. <view class="wrap-main">
  4. <view class="" v-if="userIdentity == 1">
  5. <view class="wrap-main-price">
  6. <view class="p-main" v-if="product.ladderPriceFlag == '0' || product.actStatus == 1">
  7. <view class="p-active" v-if="product.actStatus == 1">
  8. <image class="icon-active" :src="iconActive" mode="" ></image>
  9. </view>
  10. <view class="p-price tui-skeleton-fillet">
  11. <text class="txt sm">¥</text>
  12. <text class="txt big">{{retailPrice}}</text>
  13. <text class="txt big">{{smallMoney== '0'?'.00':smallMoney}}</text>
  14. </view>
  15. <view class="p-minBuy">起订量:<text class="min-text">{{minBuyNumber}}</text></view>
  16. </view>
  17. <view class="wrap-ladder" v-else>
  18. <view class="ladder-text">
  19. <text class="ladder-h1">说明:</text>
  20. <text class="ladder-p">本商品有以下优惠购物方案</text>
  21. </view>
  22. <view class="ladder-main tui-skeleton-fillet">
  23. <view class="ladder-left">
  24. <view class="ladder-b">起订量:</view>
  25. <view class="ladder-b">价格:</view>
  26. </view>
  27. <view class="ladder-right">
  28. <view class="ladder-li" v-for="(ladder,index) in ladderPriceList" :key="index">
  29. <view class="ladder-a">{{ladder.buyNumRangeShow}}</view>
  30. <view class="ladder-a">¥{{ladder.buyPrice.toFixed(2)}}</view>
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. <view class="" v-if="userIdentity == 4">
  38. <view class="wrap-main-pricenone" v-if="product.price1TextFlag == '1'">
  39. <text>未公开价格</text>
  40. </view>
  41. <view class="wrap-main-pricenone" v-if="product.price1TextFlag == '2'">
  42. <text>价格仅会员可见</text>
  43. </view>
  44. <view class="wrap-main-none" v-if="product.price1TextFlag == '2'" @click.stop="goUpgradeApply">
  45. <text>上传营业执照升级为会员机构即可查看价格 >></text>
  46. </view>
  47. <view class="wrap-main-price" v-if="product.price1TextFlag == '0'">
  48. <view class="p-main" v-if="product.ladderPriceFlag == '0' || product.actStatus == 1">
  49. <view class="p-active" v-if="product.actStatus == 1">
  50. <image class="icon-active" :src="iconActive" mode="" ></image>
  51. </view>
  52. <view class="p-price tui-skeleton-fillet">
  53. <text class="txt sm">¥</text>
  54. <text class="txt big">{{retailPrice}}</text>
  55. <text class="txt big">{{smallMoney== '0'?'.00':smallMoney}}</text>
  56. </view>
  57. <view class="p-minBuy">起订量:<text class="min-text">{{minBuyNumber}}</text></view>
  58. </view>
  59. <view class="wrap-ladder" v-else>
  60. <view class="ladder-text">
  61. <text class="ladder-h1">说明:</text>
  62. <text class="ladder-p">本商品有以下优惠购物方案</text>
  63. </view>
  64. <view class="ladder-main tui-skeleton-fillet">
  65. <view class="ladder-left">
  66. <view class="ladder-b">起订量:</view>
  67. <view class="ladder-b">价格:</view>
  68. </view>
  69. <view class="ladder-right">
  70. <view class="ladder-li" v-for="(ladder,index) in ladderPriceList" :key="index">
  71. <view class="ladder-a">{{ladder.buyNumRangeShow}}</view>
  72. <view class="ladder-a">¥{{ladder.buyPrice.toFixed(2)}}</view>
  73. </view>
  74. </view>
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. <view class="" v-if="userIdentity == 2">
  80. <view class="wrap-main-pricenone" v-if="product.price1TextFlag == 1">
  81. <text>未公开价格</text>
  82. </view>
  83. <view class="wrap-main-price" v-else>
  84. <view class="p-main" v-if="product.ladderPriceFlag == '0' || product.actStatus == 1">
  85. <view class="p-active" v-if="product.actStatus == 1">
  86. <image class="icon-active" :src="iconActive" mode="" ></image>
  87. </view>
  88. <view class="p-price tui-skeleton-fillet">
  89. <text class="txt sm">¥</text>
  90. <text class="txt big">{{retailPrice}}</text>
  91. <text class="txt big">{{smallMoney== '0'?'.00':smallMoney}}</text>
  92. </view>
  93. <view class="p-minBuy">起订量:<text class="min-text">{{minBuyNumber}}</text></view>
  94. </view>
  95. <view class="wrap-ladder" v-else>
  96. <view class="ladder-text">
  97. <text class="ladder-h1">说明:</text>
  98. <text class="ladder-p">本商品有以下优惠购物方案</text>
  99. </view>
  100. <view class="ladder-main tui-skeleton-fillet">
  101. <view class="ladder-left">
  102. <view class="ladder-b">起订量:</view>
  103. <view class="ladder-b">价格:</view>
  104. </view>
  105. <view class="ladder-right">
  106. <view class="ladder-li" v-for="(ladder,index) in ladderPriceList" :key="index">
  107. <view class="ladder-a">{{ladder.buyNumRangeShow}}</view>
  108. <view class="ladder-a">¥{{ladder.buyPrice.toFixed(2)}}</view>
  109. </view>
  110. </view>
  111. </view>
  112. </view>
  113. </view>
  114. </view>
  115. </view>
  116. </template>
  117. <script>
  118. import iconActive from '@/static/temp/icon-active.png'
  119. export default{
  120. name:'cm-price',
  121. props:{
  122. product:{
  123. type:Object,
  124. default: {}
  125. },
  126. userIdentity: {
  127. type: Number,
  128. default: 2
  129. },
  130. ladderPriceList:{
  131. type: Array,
  132. default:[]
  133. },
  134. retailPrice:{
  135. type:String,
  136. default:0.00
  137. },
  138. smallMoney:{
  139. type:String,
  140. default:0.00
  141. },
  142. minBuyNumber:{
  143. type: Number,
  144. default: 1
  145. }
  146. },
  147. data() {
  148. return{
  149. iconActive:iconActive
  150. }
  151. },
  152. created() {
  153. },
  154. methods:{
  155. goUpgradeApply(){
  156. this.$api.navigateTo('/pages/login/apply')
  157. }
  158. },
  159. }
  160. </script>
  161. <style lang="scss">
  162. </style>