123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315 |
- <template>
- <view class="pages">
- <view class="" :style="{height: navHeight+'px' }"></view>
- <view class="navbar-box">
- <u-navbar title="开具发票" :safeAreaInsetTop="true" @leftClick="leftClick" :titleStyle="{color:'#fff'}" leftIconColor="#fff" bgColor="#EF1818"></u-navbar>
- </view>
- <view class="page-wrap">
- <mescroll-body class="" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback">
-
- <view class="list">
- <u-checkbox-group placement="column" @change="checkboxChange" >
- <view v-for="(item,index) in dataList" class="list-item u-flex" :key="item.id">
- <view class="left">
- <u-checkbox shape="circle" :disabled="item.quantity>item.stock" activeColor="#ED0000" :key="index" :name="item.name" :checked="item.checked" @change="toggleCheck(index)" class="checkbox" />
- </view>
- <view class="right">
- <view class="order-number">订单号:360123456789079797</view>
- <view class="info u-flex">
- <image class="img" :src="item.showImg||staticUrl+'/img/newsdetails-banner.png'"></image>
- <view class="text">
- <view class="name">《伟大转折》-【成人票】</view>
- <view class="time">2023-11–03 14:00-16:00</view>
- <view class="position">5排6座</view>
- <view class="statistics">
- <text>共1张</text>
- <text class="label">合计:</text>
- <text class="price">¥120.00</text>
- </view>
- </view>
- </view>
- </view>
- </view>
- </u-checkbox-group>
- </view>
- </mescroll-body>
- </view>
- <view class="page-bottom">
- <view class="inner u-flex u-row-between">
- <view class="left">
- <u-checkbox-group @change="allCheckboxChange">
- <u-checkbox shape="circle" :checked="allChecked" activeColor="#ED0000" :name="allCheckbox.name" label="全选"></u-checkbox>
- </u-checkbox-group>
- </view>
- <view class="right u-flex">
- <view class="total-price u-flex">
- <text>合计:</text>
- <text class="num">{{totalPrice}}</text>
- </view>
- <view class="btn active" v-if="totalPrice>0&&cansubmit" @click="submitorder">申请开票</view>
- <view class="btn" v-else>申请开票</view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import { systemInfo } from "@/mixin.js";
- import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
- export default {
- mixins: [MescrollMixin,systemInfo],
- data() {
- return {
- staticUrl:this.$commonConfig.staticUrl,
- allCheckbox:{name: '全选'},
- dataList:[
- {name:'路线推荐',checked:false,pic:`${this.$commonConfig.staticUrl}/img/indexnav-luxian.png`,id:1},
- {name:'路线推荐',checked:false,pic:`${this.$commonConfig.staticUrl}/img/indexnav-luxian.png`,id:2},
- ],
- }
- },
- onShow() {
- },
- onLoad() {
- this.getSystemInfo();
- },
- computed: {
-
- allChecked() {
- return this.dataList.every(item => item.checked)
- },
-
- selectGoods() {
- let selectGoods = [];
- this.dataList.forEach(item => {
- if (item.checked) {
- selectGoods.push(item)
- }
- })
- return selectGoods
- },
- totalPrice() {
- let that = this;
- return this.dataList.reduce((total, item) => {
- if (item.checked) {
- let price = null;
-
-
-
-
-
- price = item.levelPrice
- total += price * item.quantity;
- }
- return total;
- }, 0).toFixed(2);
- }
- },
- methods: {
- leftClick(e){
- let pages = getCurrentPages();
- if(pages.length==1){
- uni.$u.route('/pages/index/index')
- }else{
- uni.navigateBack()
- };
- },
-
- </script>
- <style>
- page{background-color: #F7F7F9;}
- </style>
- <style lang="scss" scoped>
- .list-item{
- background: #FFFFFF;
- box-shadow: 0rpx 2rpx 12rpx 0rpx rgba(221,221,221,0.5);
- border-radius: 20rpx;
- margin-bottom: 24rpx;
- padding: 34rpx 32rpx 50rpx 20rpx;
- .right{
- flex: 1;
- padding-left: 24rpx;
- .order-number{
- font-size: 24rpx;
- font-weight: 400;
- color: #7F7F7F;
- line-height: 36rpx;
- margin-bottom: 36rpx;
- }
- .info{
- .img{
- width: 180rpx;
- height: 160rpx;
- }
- .text{
- font-size: 24rpx;
- font-weight: 400;
- color: #7F7F7F;
- padding-left: 26rpx;
- .name{
- font-size: 28rpx;
- font-weight: bold;
- color: #363636;
- margin-bottom: 20rpx;
- }
- .time{
- margin-bottom: 20rpx;
- }
- .position{
- margin-bottom: 20rpx;
- }
- .statistics{
- text-align: right;
- }
- .label{
- font-size: 24rpx;
- font-weight: 400;
- color: #363636;
- margin-left: 10rpx;
- }
- .price{
- font-size: 32rpx;
- font-weight: bold;
- color: #ED0000;
- }
- }
- }
- }
- }
- .page-bottom{
- position: relative;
- z-index: 1001;
- height: 98rpx;
- padding: 24rpx 20rpx 50rpx;
- .inner{
- position: fixed;
- background-color: #fff;
- height: 98rpx;
- left: 0;
- right: 0;
- bottom: 0;
- padding: 24rpx 20rpx 50rpx;
- box-shadow: 0rpx -4rpx 12rpx 0rpx rgba(215,215,215,0.5);
- .total-price{
- font-size: 28rpx;
- font-weight: 400;
- color: #313131;
- margin-right: 32rpx;
- .num{
- font-size: 40rpx;
- font-weight: bold;
- color: #ED0000;
- }
- }
- .btn{
- font-size: 28rpx;
- height: 80rpx;
- line-height: 80rpx;
- border-radius: 50rpx;
- padding: 0 50rpx;
- background-color: #eee;
- color: #333;
- text-align: center;
- &.active{
- background: linear-gradient(90deg, #FF7979 0%, #ED0000 100%);
- color: #fff;
- }
- }
- }
- }
- </style>
|