123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761 |
- <template>
- <view class="page" :style="{'min-height':h+'px','padding-top':(mt)+'px'}">
- <c-nav-bar title="订单详情" showIcon="true" :titleStyle="titleStyle"></c-nav-bar>
- <view class="content" style="background-color: #F5F8FA;">
- <view class="head">
- <text class="status" v-if="list.orderStatus=='1'">未核销</text>
- <text class="status" v-if="list.orderStatus=='-2'">待支付</text>
- <text class="status" v-if="list.orderStatus=='2'">已核销</text>
- <text class="status" v-if="list.orderStatus=='4'">已取消</text>
- <text class="status" v-if="list.orderStatus=='5'">已退款</text>
- <text>¥</text>
- <text>{{list.orderAmount}}</text>
- </view>
- <view class="ticketInfo">
- <view class="ticketInfo-hander">
- <view class="images">
- <image class="image" :src="list.cover" mode="aspectFill"></image>
- </view>
- <view class="" style="width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between;">
- <view class="name">
- {{list.homestayName}}
- </view>
- <view class="date">
- <text>{{list.comboName}}</text>
- </view>
- </view>
- </view>
- <view class="ticketInfo-demo">
- <u-row customStyle="margin-bottom: 10px">
- <u-col span="3">
- <view class="demo-layout bg-purple">
- 套餐说明
- </view>
- </u-col>
- <u-col span="9">
- <view class="demo-layout bg-purple-light">
- {{list.comboExplain}}
- </view>
- </u-col>
- </u-row>
- </view>
- </view>
- <!-- 订单信息 -->
- <view class="orderInfo">
- <view class="tit">订单信息</view>
- <u-cell :border="false">
- <text slot="icon" class="txt">订单编号</text>
- >
- <text slot="title" class="val">{{list.orderCode}}</text>
- <text slot="right-icon" class="icon"
- style="border: 1rpx solid #1372FF; border-radius: 50rpx; box-sizing: border-box; color: #1372FF;padding: 2rpx 10rpx; font-size: 22rpx; font-weight: Regular;"
- @tap="copyOrderNo(list)">复制</text>
- </u-cell>
- <u-cell :border="false">
- <text slot="icon" class="txt">关联房间</text>
- >
- <text slot="title" class="val">{{list.roomNumber==null?'暂无':list.roomNumber}}</text>
- </u-cell>
- <u-cell :border="false">
- <text slot="icon" class="txt">预约时间</text>
- >
- <text slot="title" class="val">{{list.repastTime}}</text>
- </u-cell>
- <u-cell :border="false" v-if="list.orderStatus==2">
- <text slot="icon" class="txt">核销时间</text>
- >
- <text slot="title" class="val">{{list.checkinTime}}</text>
- </u-cell>
- <u-cell :border="false">
- <text slot="icon" class="txt">预约人姓名</text>
- >
- <text slot="title" class="val">{{list.guestName}}</text>
- </u-cell>
- <u-cell :border="false">
- <text slot="icon" class="txt">预约手机号</text>
- >
- <text slot="title" class="val">{{list.guestPhoneCopy}}</text>
- <image style="width: 48rpx;height: 48rpx;" slot="right-icon" src="https://i.ringzle.com/file/20240605/20affd94bb514035b654823fefcaba2e.png" @click="callPhone(list.guestPhone)"></image>
- </u-cell>
- <u-cell :border="false" v-if="list.comboType==2">
- <text slot="icon" class="txt">就餐份数</text>
- >
- <text slot="title" class="val">{{list.num}}</text>
- </u-cell>
- <u-cell :border="false" v-if="list.comboType==1">
- <text slot="icon" class="txt">成人人数</text>
- >
- <text slot="title" class="val">{{list.num}}</text>
- </u-cell>
- <u-cell :border="false" v-if="list.comboType==1">
- <text slot="icon" class="txt">儿童人数</text>
- >
- <text slot="title" class="val">{{list.repastNum}}</text>
- </u-cell>
- <u-cell :border="false">
- <text slot="icon" class="txt">备注</text>
- >
- <text slot="title" class="val">{{list.remarks==null?'':list.remarks}}</text>
- </u-cell>
- <u-cell :border="false">
- <text slot="icon" class="txt">合计金额</text>
- >
- <text slot="title" class="val">{{list.orderAmount}}</text>
- </u-cell>
- </view>
- </view>
- <view class="btns">
- <template v-if="list.orderStatus==1&&isDel!=0">
- <view class="" @click="toStatus0(list)"
- style="color:#fff ; border-color: #1372FF; background-color: #1372FF; width: 100%;">
- 确定核销
- </view>
- </template>
- <!-- <template v-if="list.orderStatus==-2||list.orderStatus==5||list.orderStatus==4">
- <view class="" style="color:#fff ; border-color: #1372FF; background-color: #1372FF; width: 100%;"
- @click="applyAfterSales(list)">
- 删除订单
- </view>
- </template> -->
- </view>
- <u-toast ref="uToast"></u-toast>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- titles: '订单详情',
- h: uni.getSystemInfoSync().windowHeight,
- mt: uni.getSystemInfoSync().statusBarHeight + 44,
- value: 1,
- status: 1,
- id: '',
- list: {},
- bedData: {},
- id: '',
- arriveTime: '',
- arriveTimes: '',
- leaveTime: '',
- leaveTimes: '',
- count: '',
- orderId: '',
- price: '',
- form: {
- initiator: 2,
- orderCode: '',
- status: ''
- },
- num: 0,
- checkInTimeStart: '',
- checkOutTime: '',
- checkInRooms: 0,
- isDel: null,
- }
- },
- onLoad(option) {
- console.log('+++++++++++', JSON.parse(option.obj));
- let obj = JSON.parse(option.obj)
- this.id = obj.orderId
- this.isDel = obj.isDel
- this.getList()
- },
- methods: {
- callPhone(phoneNumber){
- uni.makePhoneCall({
- phoneNumber
- })
- },
- copyOrderNo(no) {
- let that = this;
- // #ifdef H5
- this.$copyText(no).then(res => {
- this.$showToast('复制成功');
- })
- // #endif
- // #ifdef MP-WEIXIN
- uni.setClipboardData({
- data: no,
- success(res) {
- that.$showToast('复制成功');
- },
- fail(err) {
- that.$showToast('复制失败');
- }
- })
- // #endif
- },
- // 获取详情
- getList() {
- this.$api.get(`/merchant/hotel/repast/getRepastOrderInfo/${this.id}`)
- .then(res => {
- this.list = res.data.data;
- if(this.list.guestPhone) this.list.guestPhoneCopy = this.$aesTm.tuomin(this.list.guestPhone,2)
- })
- },
- // 删除
- applyAfterSales(item) {
- let ids = []
- ids.push(item.id)
- this.$api.del('/merchant/hotel/repast', ids).then(res => {
- console.log(res);
- if (res.data.code == 0) {
- uni.navigateTo({
- url: '/pagesMy/orderList/orderList'
- })
- } else this.$showToast(res.data.msg);
- })
- },
- toStatus0(item) {
- // this.$api.get('/merchant/hotel/repast/writeOffOrder/' + res.result)
- // .then(res => {
- // console.log('0000', res);
- // if (res.data.code == 0) {
- // uni.setStorageSync('list', res.data.data);
- // } else {
- // this.$showToast(res.data.msg)
- // }
- // })
- this.$api.get('/merchant/hotel/repast/writeOffOrder/' + item.orderCode)
- .then(res => {
- if (res.data.code == 0) {
- uni.navigateTo({
- url: '/pages/house/WriteOffResults?price=' + item.orderAmount
- })
- } else {
- this.$showToast(res.data.msg)
- }
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .listItemed {
- padding: 13rpx 0;
- font-size: 26rpx;
- color: #666;
- align-items: center;
- .name {
- font-size: 28rpx;
- color: #111111;
- font-weight: bold;
- }
- .verityInfo {
- margin: 30rpx 0;
- line-height: 28rpx;
- height: 28rpx;
- }
- .top {
- margin-bottom: 30rpx;
- }
- .ticketType {
- margin-left: 20rpx;
- font-weight: 400;
- color: #94A9C8;
- line-height: 33rpx;
- height: 33rpx;
- font-size: 24rpx;
- background: #F5F8FA;
- border-radius: 8rpx;
- padding: 4rpx;
- }
- }
- .voucherCode_colse {
- padding: 20rpx;
- .title {
- height: 80rpx;
- font-weight: 600;
- font-size: 31rpx;
- color: #333;
- padding: 20rpx 30rpx;
- line-height: 80rpx;
- background: #fff;
- border-radius: 20rpx;
- }
- .title_info {
- line-height: 80rpx;
- font-weight: 600;
- font-size: 34rpx;
- color: #333;
- padding: 0 10rpx;
- }
- .codeList {
- // margin-top: 19rpx;
- padding: 20rpx;
- background: #fff;
- border-radius: 20rpx;
- }
- .listItem {
- display: flex;
- justify-content: space-between;
- padding: 13rpx 19rpx;
- flex-direction: row;
- font-size: 26rpx;
- color: #666;
- align-items: center;
- .verityInfo {
- margin: 30rpx 0;
- line-height: 28rpx;
- height: 28rpx;
- }
- .top {
- margin-bottom: 30rpx;
- }
- .ticketType {
- margin-left: 20rpx;
- font-weight: 400;
- color: #94A9C8;
- line-height: 33rpx;
- height: 33rpx;
- font-size: 24rpx;
- background: #F5F8FA;
- border-radius: 8rpx;
- padding: 4rpx;
- }
- }
- }
- .ci_bottom {
- text-align: center;
- width: 100%;
- padding: 0 24rpx 30rpx;
- box-sizing: border-box;
- font-weight: 600;
- font-size: 30rpx;
- color: #111111;
- // display: flex;
- // justify-content: space-between;
- }
- .ci_code {
- width: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .voucherCode {
- margin: 20rpx 23rpx 0;
- padding: 44rpx 24rpx 20rpx;
- border-radius: 20rpx;
- background-color: #fff;
- z-index: 2;
- .title {
- font-weight: 600;
- font-size: 34rpx;
- color: #333;
- }
- .orange {
- margin: 0 30rpx;
- font-weight: Regular;
- font-size: 24rpx;
- color: #AAAAAA;
- }
- }
- .bottom-list {
- display: flex;
- margin: 37rpx auto;
- justify-content: center;
- .image {
- width: 36rpx;
- height: 36rpx;
- margin: 0 8rpx;
- image {
- width: 100%;
- height: 100%;
- }
- }
- .text {
- font-size: 26rpx;
- color: #999999;
- font-weight: Regular;
- }
- }
- .minus,
- .plus {
- display: flex;
- align-items: center;
- // width: 44rpx;
- // height: 44rpx;
- // line-height: 44rpx;
- padding: 10rpx 10rpx;
- // padding-left: 8rpx;
- border: 1px solid #999;
- border-radius: 6rpx;
- text-align: center;
- }
- page {
- box-sizing: border-box;
- background-color: #F5F8FA;
- .content {
- position: relative;
- z-index: 3;
- padding-bottom: 160rpx;
- background-color: content;
- .hand-title {
- position: absolute;
- left: 20rpx;
- top: 100rpx;
- font-size: 24rpx;
- color: #fff;
- }
- }
- }
- .ticketInfo-demo {
- // border-bottom: 2rpx solid #EFEFEF;
- margin-top: 40rpx;
- .bg-purple {
- font-size: 26rpx;
- color: #808080;
- font-weight: Regular;
- }
- .bg-purple-light {
- font-size: 30rpx;
- color: #111111;
- font-weight: Regular;
- }
- }
- .two-center-two {
- box-sizing: border-box;
- .tit {
- font-size: 32rpx;
- color: #333333;
- margin: 20rpx 0;
- }
- .df-one {
- font-size: 32rpx;
- color: #333333;
- font-weight: bold;
- // .bg-purple-dark {
- // margin-left: 140rpx;
- // }
- // .demo-layout {
- // margin-left: 30rpx;
- // }
- }
- .df-two {
- border-bottom: 2rpx solid #EFEFEF;
- .bg-purple {
- // margin-right: 100rpx;
- width: 182rpx;
- margin-left: -13rpx;
- }
- .bg-purple-dark {
- // margin-left: 50rpx;
- }
- .bg-purple,
- .bg-purple-dark {
- font-size: 26rpx;
- color: #777777;
- font-weight: Regular;
- text-align: center;
- text {
- margin: 0 8rpx;
- }
- }
- .bg-purple-light {
- font-size: 24rpx;
- color: #666666;
- border: 1rpx solid #666666;
- text-align: center;
- border-radius: 50rpx;
- }
- }
- }
- .prices-content {
- margin: 24rpx 0;
- .txt1 {
- font-size: 32rpx;
- color: #111111;
- font-weight: bold;
- }
- .txt2 {
- margin: 12rpx 0;
- font-size: 26rpx;
- color: #777777;
- font-weight: Regular;
- }
- }
- .orderInfo {
- box-sizing: border-box;
- background-color: #fff;
- border-radius: 16rpx;
- width: 96%;
- margin: 0 auto 20rpx;
- padding: 0 0 30rpx;
- .tit {
- font-size: 32rpx;
- color: #333;
- padding-left: 30rpx;
- padding-top: 40rpx;
- font-weight: 600;
- margin-bottom: 20rpx;
- }
- .txt {
- font-size: 28rpx;
- color: #666;
- width: 140rpx;
- }
- .icon {
- font-size: 28rpx;
- color: #666;
- }
- .val {
- font-size: 28rpx;
- color: #333333;
- margin: 0 20rpx 0 30rpx;
- font-weight: Regular;
- }
- }
- .ticketInfo {
- box-sizing: border-box;
- width: 96%;
- margin: 0 auto 20rpx;
- padding: 44rpx 24rpx 10rpx;
- border-radius: 20rpx;
- position: relative;
- background-color: #fff;
- z-index: 2;
- .ticketInfo-hander {
- display: flex;
- .images {
- width: 136rpx;
- height: 136rpx;
- border-radius: 12rpx;
- margin-right: 20rpx;
- .image {
- border-radius: 12rpx;
- // width: 100%;
- // height: 100%;
- width: 136rpx;
- height: 136rpx;
- }
- }
- }
- .name {
- font-size: 32rpx;
- color: #333;
- font-weight: bold;
- width: 100%;
- }
- .date {
- // padding: 20rpx 0 32rpx;
- padding-top: 30rpx;
- font-size: 28rpx;
- color: #666666;
- font-weight: Regular;
- }
- .topHead {
- width: 96%;
- margin: 0 auto;
- background-color: #F5F8FA;
- padding: 28rpx 0 28rpx 84rpx;
- border-radius: 16rpx;
- position: relative;
- text {
- position: absolute;
- left: 0;
- top: 0;
- z-index: 1;
- border-radius: 16rpx 0 0 16rpx;
- width: 48rpx;
- color: #fff;
- font-size: 20rpx;
- background-color: #484F61;
- text-align: center;
- height: 100%;
- padding: 15rpx 10rpx 0;
- }
- .p {
- font-size: 28rpx;
- color: #333;
- &:nth-of-type(1) {
- font-weight: 600;
- margin-bottom: 16rpx;
- }
- }
- }
- .code {
- margin-top: 40rpx;
- text-align: center;
- position: relative;
- .cover,
- .sx {
- position: absolute;
- background-color: rgba(255, 255, 255, 0.5);
- width: 340rpx;
- height: 340rpx;
- top: 66rpx;
- left: 50%;
- transform: translate(-50%, 0);
- }
- .sx {
- width: 120rpx;
- height: 120rpx;
- top: 150rpx;
- background: transparent;
- }
- .txt {
- font-size: 28rpx;
- }
- image {
- width: 340rpx;
- height: 340rpx;
- margin: 30rpx 0;
- }
- }
- }
- .head {
- box-sizing: border-box;
- padding: 34rpx 24rpx 60rpx;
- display: flex;
- position: relative;
- z-index: 2;
- text {
- color: #111111;
- &:nth-child(1),
- &:nth-child(3) {
- font-size: 44rpx;
- }
- &:nth-child(2) {
- flex: 1;
- text-align: right;
- width: 100px;
- font-size: 36rpx;
- }
- }
- }
- .btns {
- box-sizing: border-box;
- width: 100%;
- position: fixed;
- bottom: 0;
- z-index: 4;
- left: 0;
- display: flex;
- padding: 32rpx 32rpx 50rpx;
- background-color: #fff;
- gap: 0 20rpx;
- box-shadow: 0 -8rpx 16rpx rgba(0, 0, 0, 0.06);
- &>view {
- width: calc(50% - 15rpx);
- height: 80rpx;
- border-radius: 46rpx;
- // border: 1rpx solid #999999;
- line-height: 80rpx;
- text-align: center;
- font-size: 28rpx;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: Bold;
- color: #111111;
- background-color: #F6F6F6;
- }
- }
- </style>
|