123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285 |
- <template>
- <view class="container cashier">
- <view class="pay-title" v-if="!showPayUnder" @click="handlePayunder">
- <view class="content">
- 因线上支付政策调整,请对每家店铺分别进行线上付款;若需要直接转账支付订单,请点击右侧箭头查看线下转账信息。
- <view class="content-icon"> <text class="iconfont icon-xiangyou"></text> </view>
- </view>
- </view>
- <view class="pay-content">
- <view class="pay-list" v-for="(list, index) in list" :key="index">
- <view class="pay-list-title">{{ list.shopName }}</view>
- <view class="pay-list-goods" v-for="(pros, prosIndex) in list.orderProductList" :key="prosIndex">
- <view class="pay-list-image"> <image :src="pros.image" class="image" mode=""></image> </view>
- <view class="pay-list-info">
- <view class="info-title">{{ pros.name }}</view>
- <view class="info-view" v-if="pros.productUnit != ''"> 规格:{{ pros.productUnit ? pros.productUnit : '' }} </view>
- <view class="info-view" v-if="pros.productCode != '' && pros.productCode != null">
- 商品编码:{{ pros.productCode ? pros.productCode : '' }}
- </view>
- <view class="info-price">
- <view class="price">¥{{ pros.price | NumFormat }}</view>
- <view class="count"><text class="sm">X</text> {{ pros.num }}</view>
- </view>
- </view>
- </view>
- <view class="pay-list-msg">
- <view class="list-msg" v-if="list.receiptAmount > 0"
- >已付:<text class="text">¥{{ list.receiptAmount | NumFormat }}</text></view
- >
- <view class="list-msg" v-if="list.eachDiscount > 0"
- >优惠:<text class="text">¥{{ list.eachDiscount | NumFormat }}</text></view
- >
- </view>
- <view class="pay-list-btn">
- <view class="btn" v-if="list.receiptStatus != 3" @click="handlePayOrder(list.shopOrderId)">付款</view>
- <view class="list-msg" v-if="list.obligation > 0"
- >待付:<text class="text red">¥{{ list.obligation | NumFormat }}</text></view
- >
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- orderId: 0,
- showPayUnder:false,
- list: []
- }
- },
- onLoad(option) {
- this.initData(option)
- },
- filters: {
- NumFormat(value) {
- //处理金额
- if (value) {
- return Number(value).toFixed(2)
- } else {
- return '0.00'
- }
- }
- },
- methods: {
- initData(e) {
- console.log(e)
- this.orderId = e.orderId
- this.payOrderId = '#' + e.orderId + '#'
- this.PayOrderShoporders(this.orderId)
- },
- PayOrderShoporders(orderId) {
- this.PayService.PayOrderShoporders({ orderId: orderId })
- .then(response => {
- this.list = response.data
- this.PayOrderCheckoutCounter(orderId)
- })
- .catch(error => {
- this.$util.msg(error.msg, 2000)
- })
- },
- PayOrderCheckoutCounter(orderId){
- this.PayService.PayOrderCheckoutCounter({orderId:orderId}).then(response =>{
- let data = response.data
- if(data.discernReceipt.length>0){
- this.showPayUnder = true
- }
- }).catch(error =>{
- this.$util.msg(error.msg,2000)
- })
- },
- handlePayOrder(shopOrderId){
- this.$api.navigateTo(`/pages/user/pay/card-order?shopOrderId=${shopOrderId}`)
- },
- handlePayunder(){
- this.$api.navigateTo(`/pages/user/pay/card-under?orderId=${this.orderId}`)
- }
- },
- onShow() {}
- }
- </script>
- <style lang="scss">
- page {
- height: auto !important;
- background-color: #f7f7f7;
- }
- .cashier {
- width: 100%;
- }
- .pay-title {
- width: 100%;
- height: 182rpx;
- box-sizing: border-box;
- padding: 24rpx 24rpx 0 24rpx;
- background-color: #ffffff;
- .content {
- width: 100%;
- height: 100%;
- position: relative;
- box-sizing: border-box;
- padding: 20rpx 100rpx 20rpx 24rpx;
- background: url(https://static.caimei365.com/app/img/bg/pay-bgtitle@2x.png) no-repeat;
- background-size: cover;
- line-height: 40rpx;
- font-size: $font-size-26;
- text-align: justify;
- color: $color-system;
- .content-icon {
- width: 40rpx;
- height: 100%;
- position: absolute;
- top: 0;
- right: 24rpx;
- line-height: 158rpx;
- .iconfont {
- font-size: $font-size-34;
- color: $color-system;
- text-align: right;
- }
- }
- }
- }
- .pay-content {
- width: 100%;
- height: auto;
- .pay-list {
- width: 100%;
- height: auto;
- padding: 30rpx 24rpx 30rpx 24rpx;
- box-sizing: border-box;
- background-color: #ffffff;
- margin-bottom: 20rpx;
- .pay-list-title {
- width: 100%;
- height: 42rpx;
- line-height: 42rpx;
- font-size: $font-size-30;
- color: #333333;
- margin-bottom: 20rpx;
- }
- .pay-list-goods {
- width: 100%;
- height: 180rpx;
- margin-bottom: 30rpx;
- .pay-list-image {
- width: 180rpx;
- height: 180rpx;
- box-sizing: border-box;
- border: 1px solid #e1e1e1;
- border-radius: 8rpx;
- float: left;
- margin-right: 13rpx;
- .image {
- width: 100%;
- height: 100%;
- display: block;
- border-radius: 8rpx;
- }
- }
- .pay-list-info {
- width: 508rpx;
- height: 100%;
- float: right;
- .info-title {
- width: 100%;
- display: inline-block;
- height: auto;
- text-overflow: ellipsis;
- display: -webkit-box;
- word-break: break-all;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- line-height: 38rpx;
- font-size: $font-size-28;
- color: #333333;
- }
- .info-view {
- height: 40rpx;
- line-height: 40rpx;
- color: #999999;
- text-overflow: ellipsis;
- display: -webkit-box;
- word-break: break-all;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- font-size: $font-size-22;
- color: #999999;
- }
- .info-price {
- height: 40rpx;
- width: 100%;
- float: left;
- line-height: 40rpx;
- font-size: $font-size-26;
- .price {
- color: #333333;
- float: left;
- }
- .count {
- float: right;
- color: #666666;
- .sm{
- font-size: $font-size-22;
- }
- }
- }
- }
- }
- .pay-list-msg {
- width: 100%;
- height: 40rpx;
- line-height: 40rpx;
- font-size: $font-size-26;
- margin-bottom: 30rpx;
- .list-msg {
- float: right;
- margin-left: 30rpx;
- font-size: $font-size-26;
- color: #333333;
- font-weight: bold;
- .text {
- font-weight: normal;
- &.red {
- color: #f94b4b;
- }
- }
- }
- }
- .pay-list-btn {
- width: 100%;
- height: 64rpx;
- .btn {
- width: 160rpx;
- height: 64rpx;
- line-height: 64rpx;
- background: $btn-confirm;
- font-size: $font-size-26;
- text-align: center;
- float: right;
- color: #ffffff;
- border-radius: 32rpx;
- }
- .list-msg {
- float: right;
- line-height: 64rpx;
- margin-right: 40rpx;
- font-size: $font-size-26;
- color: #333333;
- font-weight: bold;
- .text {
- font-weight: normal;
- &.red {
- color: #f94b4b;
- }
- }
- }
- }
- }
- }
- </style>
|