123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- <template name="cm-ladder-popup">
- <!-- 规格阶梯价 -->
- <view class="tui-popup-maskmodel" v-show="show" @click.stop="hidePopup">
- <view class="tui-popup-ladder">
- <view class="tui-scrollview-box">
- <view class="ladder-main clearfix">
- <view class="ladder-item">
- <view class="ladder-item-td">起订量</view> <view class="ladder-item-td">价格</view>
- </view>
- <view class="ladder-item" v-for="(ladd, index) in ladderPriceList" :key="index">
- <view class="ladder-item-td">{{ ladd.numRange }}</view>
- <view class="ladder-item-td">¥{{ ladd.buyPrice | NumFormat }}</view>
- </view>
- </view>
- </view>
- <view class="tui-right-flex tui-popup-btn" :style="{ paddingBottom: isIphoneX ? '68rpx' : '34rpx' }">
- <view class="tui-flex-1">
- <view class="tui-button" @click.stop="hidePopup">了解</view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import { mapState, mapMutations } from 'vuex'
- export default {
- name: 'cm-ladder-popup',
- props: {
- list: {
- type: Array
- },
- show: {
- type: Boolean,
- default: false
- },
- type: {
- type: Number,
- default: 1
- }
- },
- data() {
- return {
- ladderPriceList:[]
- }
- },
- filters: {
- NumFormat: function(value) {
- //处理金额
- if (!value) return '0.00'
- let number = Number(value).toFixed(2)
- return number
- }
- },
- created() {
- this.ladderPriceList = this.list
- },
- methods: {
- hidePopup() {
- this.$parent.laddePopupShow = false
- }
- }
- }
- </script>
- <style lang="scss">
- .tui-popup-maskmodel{
- width: 100%;
- height: 100%;
- position: fixed;
- top: 0;
- left: 0;
- background: rgba(0, 0, 0, 0.6);
- z-index: 1000;
- }
- .tui-popup-ladder {
- width: 100%;
- height: 700rpx;
- box-sizing: border-box;
- padding: 40rpx 24rpx 0 24rpx;
- border-radius: 16rpx;
- background-color: #ffffff;
- box-shadow: 0px 10rpx 12rpx 0px rgba(0, 0, 0, 0.2);
- position: absolute;
- bottom: 0;
- left: 0;
- z-index: 1009;
- .tui-scrollview-box {
- width: 100%;
- height: auto;
- float: left;
- box-sizing: border-box;
- .ladder-main {
- width: 100%;
- min-height: 240rpx;
- border: 1px solid rgba(225, 86, 22, 0.6);
- border-radius: 10rpx;
- .ladder-item {
- width: 100%;
- height: 80rpx;
- float: left;
- border-bottom: 1px solid rgba(225, 86, 22, 0.6);
- &:nth-child(1) {
- .ladder-item-td {
- color: #333333;
- }
- }
- &:last-child {
- border-bottom: none;
- }
- .ladder-item-td {
- width: 50%;
- text-align: center;
- line-height: 80rpx;
- font-size: $font-size-28;
- color: $color-system;
- box-sizing: border-box;
- float: left;
- &:nth-child(1) {
- border-right: 1px solid rgba(225, 86, 22, 0.6);
- }
- }
- }
- }
- }
- }
- .tui-popup-btn {
- width: 100%;
- height: auto;
- float: left;
- margin-top: 200rpx;
- .tui-button {
- width: 100%;
- height: 88rpx;
- background: $btn-confirm;
- line-height: 88rpx;
- text-align: center;
- color: #ffffff;
- font-size: $font-size-28;
- border-radius: 44rpx;
- }
- }
- </style>
|