index.vue 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370
  1. <template>
  2. <!--申请已提交-->
  3. <!--签署协议:初始化、待签约、已提交待核对、已提交审核通过-->
  4. <!--欢迎您成功加入房客邦:初始化、去推广-->
  5. <div class="wrapper">
  6. <div class="header">
  7. <h2>申请进度</h2>
  8. <a :href="'tel:' + commanyPhone">
  9. <img src="./image/btn_dianhua@2x.png" alt="">
  10. <span>专属客服</span>
  11. </a>
  12. </div>
  13. <ul class="content">
  14. <li class="flow flow-0 has-border" :class="checks[0].checkStatus === 0 ? 'init' : 'active'" v-if="checks[0]">
  15. <div class="left-wrap"></div>
  16. <div class="right-wrap" v-if="orderUserName">
  17. <p class="title">
  18. <span>已提交申请成为合伙人</span>
  19. </p>
  20. <p class="description">
  21. <span>{{ orderUserPhone }}</span>
  22. <span class="line">|</span>
  23. <span>{{ orderUserName }}</span>
  24. </p>
  25. <p class="time">{{ checks[0].updatedAt }}</p>
  26. <p class="tip">1个工作日内会有专席客服与您取得联系</p>
  27. </div>
  28. </li>
  29. <template v-if="orderFinalStatus !== 2">
  30. <!--checkStatus: 0-初始化 1-进行中 2-成功 3-失败-->
  31. <li class="flow flow-1 has-border" :class="checks[1].checkStatus === 0 ? 'init' : 'active'" v-if="checks[1]">
  32. <div class="left-wrap"></div>
  33. <div class="right-wrap">
  34. <p class="title">
  35. <span>签署协议</span>
  36. <template v-if="checks[1].checkStatus === 2">
  37. <span style="font-weight: 600; color: #D73634;" v-if="checks[2].checkStatus === 0">(等待核对)</span>
  38. <span style="color: #4BD863;" v-if="checks[2].checkStatus === 1">(通过审核)</span>
  39. </template>
  40. </p>
  41. <router-link class="jump-compact" :to="{path: '/partner/compact?id=' + id}" v-if="checks[1].checkStatus === 1">
  42. 在线签约
  43. </router-link>
  44. <template v-if="checks[1].checkStatus === 2">
  45. <p class="description">
  46. <span v-if="checks[2].checkStatus === 0">您已完成在线签约</span>
  47. <span style="color: #4BD863;" v-else>您已签约成功</span>
  48. </p>
  49. <p class="time">{{ checks[1].updatedAt }}</p>
  50. </template>
  51. </div>
  52. </li>
  53. <li class="flow flow-4" :class="checks[2].checkStatus === 0 ? 'init' : 'active'" v-if="checks[2]">
  54. <div class="left-wrap"></div>
  55. <div class="right-wrap">
  56. <p class="title">
  57. <span v-if="checks[2].checkStatus === 2">欢迎您成功加入房客邦</span>
  58. <span v-else>加入成功</span>
  59. </p>
  60. <router-link class="jump-goods" :to="{path: '/partner/goods'}" v-if="checks[2].checkStatus === 2">去推广
  61. </router-link>
  62. </div>
  63. </li>
  64. </template>
  65. <li class="fail" v-if="orderFinalStatus === 2">{{ orderFinalRemark }}</li>
  66. <li class="order-info border-top-1px">
  67. <p v-if="orderFinalStatus === 1">合伙人编号:{{ inviteCode }}</p>
  68. <template v-else>
  69. <p>创建时间:{{ createdAt }}</p>
  70. <p>申请单号:{{ orderNumber }}</p>
  71. </template>
  72. </li>
  73. </ul>
  74. </div>
  75. </template>
  76. <script>
  77. import { Toast } from 'vant'
  78. import { orderDetail } from './api'
  79. export default {
  80. name: 'detail',
  81. props: ['id'],
  82. data () {
  83. return {
  84. orderUserPhone: '',
  85. orderUserName: '',
  86. createdAt: '',
  87. orderNumber: '',
  88. orderFinalStatus: 0, // 订单最终状态: 0-进行中 1-成功 2-失败
  89. commanyPhone: '',
  90. orderFinalRemark: '',
  91. checks: [],
  92. inviteCode: ''
  93. }
  94. },
  95. created () {
  96. this.funInit()
  97. },
  98. async mounted () {
  99. await this.$nextTick()
  100. this.$refreshTitle('申请进度')
  101. },
  102. methods: {
  103. funInit () {
  104. const id = this.id
  105. orderDetail(id).then(res => {
  106. if (res.status) {
  107. const { orderUserPhone, orderUserName, createdAt, orderNumber, orderFinalStatus, commanyPhone, orderFinalRemark, checks, inviteCode } = res.data
  108. this.orderUserPhone = orderUserPhone
  109. this.orderUserName = orderUserName
  110. this.createdAt = createdAt
  111. this.orderNumber = orderNumber
  112. this.orderFinalStatus = orderFinalStatus
  113. this.commanyPhone = commanyPhone
  114. this.orderFinalRemark = orderFinalRemark
  115. this.checks = checks
  116. this.inviteCode = inviteCode
  117. } else {
  118. Toast(res.msg)
  119. }
  120. }).catch(err => {
  121. Toast(err)
  122. })
  123. }
  124. }
  125. }
  126. </script>
  127. <style lang="scss" scoped>
  128. .wrapper {
  129. display: flex;
  130. flex-direction: column;
  131. align-items: center;
  132. width: 100%;
  133. padding: 15px 0 91px;
  134. }
  135. .header {
  136. display: flex;
  137. justify-content: space-between;
  138. align-items: center;
  139. width: 343px;
  140. h2 {
  141. padding-left: 8px;
  142. line-height: 33px;
  143. font-size: 24px;
  144. font-weight: 500;
  145. color: #333;
  146. }
  147. a {
  148. display: flex;
  149. align-items: center;
  150. padding: 11px 12px;
  151. background: #FFFFFF;
  152. border-radius: 100px 0 0 100px;
  153. img {
  154. width: 29px;
  155. height: 29px;
  156. }
  157. span {
  158. margin-left: 3px;
  159. line-height: 22px;
  160. font-size: 16px;
  161. font-weight: 500;
  162. color: #C7AC8B;
  163. }
  164. }
  165. }
  166. .content {
  167. display: flex;
  168. flex-direction: column;
  169. align-items: center;
  170. width: 343px;
  171. padding-top: 28px;
  172. margin-top: 16px;
  173. border-radius: 4px;
  174. background: #FFFFFF;
  175. }
  176. .flow {
  177. position: relative;
  178. left: 0;
  179. top: 0;
  180. display: flex;
  181. width: 295px;
  182. min-height: 68px;
  183. margin-top: 24px;
  184. &:nth-of-type(1) {
  185. margin-top: 0;
  186. }
  187. }
  188. .init {
  189. &.has-border:before {
  190. position: absolute;
  191. left: 7px;
  192. top: 3px;
  193. content: '';
  194. width: 1px;
  195. height: calc(100% - 3px);
  196. border-left: 1px dashed #D8D8D8;
  197. }
  198. .left-wrap {
  199. border: 4px solid #FAF9FA;
  200. background: #D8D8D8;
  201. }
  202. .title {
  203. color: #999;
  204. }
  205. }
  206. .active {
  207. &.has-border:before {
  208. position: absolute;
  209. left: 7px;
  210. top: 3px;
  211. content: '';
  212. width: 1px;
  213. height: calc(100% - 3px);
  214. border-left: 1px dashed #CBB091;
  215. }
  216. .left-wrap {
  217. border: 4px solid #EEEDEE;
  218. background: linear-gradient(90deg, #DBC3A9 0%, #C7AB8A 100%);
  219. }
  220. .title {
  221. color: #333;
  222. }
  223. }
  224. .flow-0 {
  225. .time {
  226. margin-top: 18px;
  227. }
  228. }
  229. .flow-1 {
  230. .title {
  231. span:nth-of-type(2) {
  232. padding-top: 3px;
  233. line-height: 20px;
  234. font-size: 14px;
  235. }
  236. }
  237. .time {
  238. margin-top: 6px;
  239. }
  240. }
  241. .flow-4 {
  242. margin-bottom: 14px;
  243. }
  244. .left-wrap {
  245. position: relative;
  246. left: 0;
  247. top: 3px;
  248. z-index: 1;
  249. width: 16px;
  250. height: 16px;
  251. border-radius: 50%;
  252. }
  253. .right-wrap {
  254. margin-left: 24px;
  255. }
  256. .title {
  257. display: flex;
  258. span {
  259. line-height: 22px;
  260. font-size: 16px;
  261. font-weight: 500;
  262. color: inherit;
  263. }
  264. }
  265. .description {
  266. display: flex;
  267. margin-top: 6px;
  268. span {
  269. line-height: 20px;
  270. font-size: 15px;
  271. color: #333;
  272. &.line {
  273. margin: 0 6px;
  274. }
  275. }
  276. }
  277. .jump-compact,
  278. .jump-goods {
  279. display: block;
  280. width: 106px;
  281. height: 44px;
  282. margin: 20px 0 23px;
  283. border-radius: 4px;
  284. line-height: 44px;
  285. font-size: 14px;
  286. text-align: center;
  287. color: #fff;
  288. background: linear-gradient(90deg, #DBC3A9 0%, #C7AB8A 100%);
  289. box-shadow: 0 14px 9px -10px rgba(219, 208, 194, 1);
  290. }
  291. .time {
  292. line-height: 17px;
  293. font-size: 12px;
  294. color: #666;
  295. }
  296. .tip {
  297. margin-top: 15px;
  298. line-height: 20px;
  299. font-size: 15px;
  300. font-weight: 600;
  301. color: #D73634;
  302. }
  303. .success,
  304. .fail {
  305. line-height: 25px;
  306. font-size: 18px;
  307. font-weight: 600;
  308. word-break: break-all;
  309. color: #D73634;
  310. }
  311. .success {
  312. margin-top: 2px;
  313. }
  314. .fail {
  315. width: 311px;
  316. padding-left: 8px;
  317. margin: 12px 0 23px;
  318. }
  319. .order-info {
  320. width: 329px;
  321. padding: 20px 0 24px;
  322. @include border-top-1px(#E8E8E8);
  323. p {
  324. padding-left: 17px;
  325. line-height: 20px;
  326. font-size: 14px;
  327. color: #666;
  328. &:nth-of-type(2) {
  329. margin-top: 2px;
  330. }
  331. }
  332. }
  333. </style>