123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370 |
- <template>
- <!--申请已提交-->
- <!--签署协议:初始化、待签约、已提交待核对、已提交审核通过-->
- <!--欢迎您成功加入房客邦:初始化、去推广-->
- <div class="wrapper">
- <div class="header">
- <h2>申请进度</h2>
- <a :href="'tel:' + commanyPhone">
- <img src="./image/btn_dianhua@2x.png" alt="">
- <span>专属客服</span>
- </a>
- </div>
- <ul class="content">
- <li class="flow flow-0 has-border" :class="checks[0].checkStatus === 0 ? 'init' : 'active'" v-if="checks[0]">
- <div class="left-wrap"></div>
- <div class="right-wrap" v-if="orderUserName">
- <p class="title">
- <span>已提交申请成为合伙人</span>
- </p>
- <p class="description">
- <span>{{ orderUserPhone }}</span>
- <span class="line">|</span>
- <span>{{ orderUserName }}</span>
- </p>
- <p class="time">{{ checks[0].updatedAt }}</p>
- <p class="tip">1个工作日内会有专席客服与您取得联系</p>
- </div>
- </li>
- <template v-if="orderFinalStatus !== 2">
- <!--checkStatus: 0-初始化 1-进行中 2-成功 3-失败-->
- <li class="flow flow-1 has-border" :class="checks[1].checkStatus === 0 ? 'init' : 'active'" v-if="checks[1]">
- <div class="left-wrap"></div>
- <div class="right-wrap">
- <p class="title">
- <span>签署协议</span>
- <template v-if="checks[1].checkStatus === 2">
- <span style="font-weight: 600; color: #D73634;" v-if="checks[2].checkStatus === 0">(等待核对)</span>
- <span style="color: #4BD863;" v-if="checks[2].checkStatus === 1">(通过审核)</span>
- </template>
- </p>
- <router-link class="jump-compact" :to="{path: '/partner/compact?id=' + id}" v-if="checks[1].checkStatus === 1">
- 在线签约
- </router-link>
- <template v-if="checks[1].checkStatus === 2">
- <p class="description">
- <span v-if="checks[2].checkStatus === 0">您已完成在线签约</span>
- <span style="color: #4BD863;" v-else>您已签约成功</span>
- </p>
- <p class="time">{{ checks[1].updatedAt }}</p>
- </template>
- </div>
- </li>
- <li class="flow flow-4" :class="checks[2].checkStatus === 0 ? 'init' : 'active'" v-if="checks[2]">
- <div class="left-wrap"></div>
- <div class="right-wrap">
- <p class="title">
- <span v-if="checks[2].checkStatus === 2">欢迎您成功加入房客邦</span>
- <span v-else>加入成功</span>
- </p>
- <router-link class="jump-goods" :to="{path: '/partner/goods'}" v-if="checks[2].checkStatus === 2">去推广
- </router-link>
- </div>
- </li>
- </template>
- <li class="fail" v-if="orderFinalStatus === 2">{{ orderFinalRemark }}</li>
- <li class="order-info border-top-1px">
- <p v-if="orderFinalStatus === 1">合伙人编号:{{ inviteCode }}</p>
- <template v-else>
- <p>创建时间:{{ createdAt }}</p>
- <p>申请单号:{{ orderNumber }}</p>
- </template>
- </li>
- </ul>
- </div>
- </template>
- <script>
- import { Toast } from 'vant'
- import { orderDetail } from './api'
- export default {
- name: 'detail',
- props: ['id'],
- data () {
- return {
- orderUserPhone: '',
- orderUserName: '',
- createdAt: '',
- orderNumber: '',
- orderFinalStatus: 0, // 订单最终状态: 0-进行中 1-成功 2-失败
- commanyPhone: '',
- orderFinalRemark: '',
- checks: [],
- inviteCode: ''
- }
- },
- created () {
- this.funInit()
- },
- async mounted () {
- await this.$nextTick()
- this.$refreshTitle('申请进度')
- },
- methods: {
- funInit () {
- const id = this.id
- orderDetail(id).then(res => {
- if (res.status) {
- const { orderUserPhone, orderUserName, createdAt, orderNumber, orderFinalStatus, commanyPhone, orderFinalRemark, checks, inviteCode } = res.data
- this.orderUserPhone = orderUserPhone
- this.orderUserName = orderUserName
- this.createdAt = createdAt
- this.orderNumber = orderNumber
- this.orderFinalStatus = orderFinalStatus
- this.commanyPhone = commanyPhone
- this.orderFinalRemark = orderFinalRemark
- this.checks = checks
- this.inviteCode = inviteCode
- } else {
- Toast(res.msg)
- }
- }).catch(err => {
- Toast(err)
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .wrapper {
- display: flex;
- flex-direction: column;
- align-items: center;
- width: 100%;
- padding: 15px 0 91px;
- }
- .header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- width: 343px;
- h2 {
- padding-left: 8px;
- line-height: 33px;
- font-size: 24px;
- font-weight: 500;
- color: #333;
- }
- a {
- display: flex;
- align-items: center;
- padding: 11px 12px;
- background: #FFFFFF;
- border-radius: 100px 0 0 100px;
- img {
- width: 29px;
- height: 29px;
- }
- span {
- margin-left: 3px;
- line-height: 22px;
- font-size: 16px;
- font-weight: 500;
- color: #C7AC8B;
- }
- }
- }
- .content {
- display: flex;
- flex-direction: column;
- align-items: center;
- width: 343px;
- padding-top: 28px;
- margin-top: 16px;
- border-radius: 4px;
- background: #FFFFFF;
- }
- .flow {
- position: relative;
- left: 0;
- top: 0;
- display: flex;
- width: 295px;
- min-height: 68px;
- margin-top: 24px;
- &:nth-of-type(1) {
- margin-top: 0;
- }
- }
- .init {
- &.has-border:before {
- position: absolute;
- left: 7px;
- top: 3px;
- content: '';
- width: 1px;
- height: calc(100% - 3px);
- border-left: 1px dashed #D8D8D8;
- }
- .left-wrap {
- border: 4px solid #FAF9FA;
- background: #D8D8D8;
- }
- .title {
- color: #999;
- }
- }
- .active {
- &.has-border:before {
- position: absolute;
- left: 7px;
- top: 3px;
- content: '';
- width: 1px;
- height: calc(100% - 3px);
- border-left: 1px dashed #CBB091;
- }
- .left-wrap {
- border: 4px solid #EEEDEE;
- background: linear-gradient(90deg, #DBC3A9 0%, #C7AB8A 100%);
- }
- .title {
- color: #333;
- }
- }
- .flow-0 {
- .time {
- margin-top: 18px;
- }
- }
- .flow-1 {
- .title {
- span:nth-of-type(2) {
- padding-top: 3px;
- line-height: 20px;
- font-size: 14px;
- }
- }
- .time {
- margin-top: 6px;
- }
- }
- .flow-4 {
- margin-bottom: 14px;
- }
- .left-wrap {
- position: relative;
- left: 0;
- top: 3px;
- z-index: 1;
- width: 16px;
- height: 16px;
- border-radius: 50%;
- }
- .right-wrap {
- margin-left: 24px;
- }
- .title {
- display: flex;
- span {
- line-height: 22px;
- font-size: 16px;
- font-weight: 500;
- color: inherit;
- }
- }
- .description {
- display: flex;
- margin-top: 6px;
- span {
- line-height: 20px;
- font-size: 15px;
- color: #333;
- &.line {
- margin: 0 6px;
- }
- }
- }
- .jump-compact,
- .jump-goods {
- display: block;
- width: 106px;
- height: 44px;
- margin: 20px 0 23px;
- border-radius: 4px;
- line-height: 44px;
- font-size: 14px;
- text-align: center;
- color: #fff;
- background: linear-gradient(90deg, #DBC3A9 0%, #C7AB8A 100%);
- box-shadow: 0 14px 9px -10px rgba(219, 208, 194, 1);
- }
- .time {
- line-height: 17px;
- font-size: 12px;
- color: #666;
- }
- .tip {
- margin-top: 15px;
- line-height: 20px;
- font-size: 15px;
- font-weight: 600;
- color: #D73634;
- }
- .success,
- .fail {
- line-height: 25px;
- font-size: 18px;
- font-weight: 600;
- word-break: break-all;
- color: #D73634;
- }
- .success {
- margin-top: 2px;
- }
- .fail {
- width: 311px;
- padding-left: 8px;
- margin: 12px 0 23px;
- }
- .order-info {
- width: 329px;
- padding: 20px 0 24px;
- @include border-top-1px(#E8E8E8);
- p {
- padding-left: 17px;
- line-height: 20px;
- font-size: 14px;
- color: #666;
- &:nth-of-type(2) {
- margin-top: 2px;
- }
- }
- }
- </style>
|