index.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644
  1. <template>
  2. <div class="mine">
  3. <div class="left">
  4. <div class="user-info">
  5. <div class="user-img"><img :src="userInfo.avatar_url"
  6. alt=""></div>
  7. <div class="user-span">
  8. <div class="info">
  9. <div class="name"><span>{{userInfo.nickname}}</span></div>
  10. <div class="sex"><img :src="gender"
  11. alt=""></div>
  12. <div class="age"><span>{{userInfo.skin_age}}</span><span>肤龄</span></div>
  13. </div>
  14. <div class="skin-type">肤质:<span>{{userInfo.skin_type}}</span></div>
  15. <div class="skin-color">肤色:<span>{{userInfo.skin_color}}</span></div>
  16. <div class="skin-color">上传报告时间:<span>{{userInfo.check_time}}</span></div>
  17. </div>
  18. </div>
  19. <div class="ps">
  20. <div class="ps-title">
  21. 备注
  22. </div>
  23. <div class="ps-text">{{remarks || '无' | ellipsis(20)}}</div>
  24. </div>
  25. <div class="lable">
  26. <div class="lable-title">
  27. 问题标签
  28. </div>
  29. <div class="problem-lable">
  30. <div class="lable-text problem-text">{{problem}}</div>
  31. </div>
  32. </div>
  33. <div class="lable">
  34. <div class="lable-title">
  35. 面部标签
  36. </div>
  37. <div class="lable-list">
  38. <div v-for="(item,index) in lableList"
  39. :key="index"
  40. :style='{background:item.bgcolor,borderColor:item.bdcolor}'
  41. class='lable-info'>
  42. {{item.text}}
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. <div class="right">
  48. <div class="shop-info">
  49. <div class="shpo-name">
  50. 预约店铺:
  51. <span>{{order_data.store_name}}</span>
  52. </div>
  53. <div class="shpo-address">
  54. 门店地址:
  55. <span>{{order_data.address}}</span>
  56. </div>
  57. <div class="shpo-ts">
  58. 美容时间:
  59. <span>{{order_data.order_time}}</span>
  60. </div>
  61. </div>
  62. <div class="project">
  63. <div class="project-title">
  64. <span>{{order_data.project_num}}个</span>项目
  65. </div>
  66. <div class="project-list">
  67. <div class="project-info"
  68. v-for="(item,index) in programmeList"
  69. :key="index">
  70. <div class="project-image">
  71. <img :src="item.cover_url" />
  72. </div>
  73. <div class="project-content">
  74. <div class="title-price">
  75. <div class="project-tit">{{item.name}}</div>
  76. <div class="project-price">
  77. <span class="min-size">¥</span>
  78. {{item.price}}
  79. </div>
  80. </div>
  81. <div class="project-tips">{{item.product_names}}</div>
  82. <div class="project-zoom">{{item.room}}{{item.use_time}}分钟</div>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. <div class="cost">
  88. <div class="cost-title">
  89. <div>预约费用</div>
  90. <div>¥{{order_data.original_price}}</div>
  91. </div>
  92. <div class="cost-coupon-list">
  93. <div class="coupon">
  94. <div class="coupon-tips">
  95. <div class="coupon-icon">
  96. <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/couponIcon.png"
  97. alt />
  98. </div>
  99. <div class="coupon-title">优惠卷</div>
  100. <div class="coupon-tip">已选推荐优惠</div>
  101. </div>
  102. <div class="on-icon">></div>
  103. </div>
  104. <div class="coupon-ps"
  105. v-for="(item,index) in coupon_list"
  106. :key="index">
  107. <div>{{item.coupon_name}}</div>
  108. <div class="cou-price">-¥{{item.price}}</div>
  109. </div>
  110. </div>
  111. <div class="over-price">
  112. 合计:
  113. <span>
  114. <span class="min-size">¥</span>{{order_data.price}}
  115. <!-- <span class="min-size">.00</span> -->
  116. </span>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. </template>
  122. <script>
  123. import api from "../../../server/home";
  124. export default {
  125. data () {
  126. return {
  127. userInfo: {
  128. },
  129. lableList: [],
  130. programmeList: {},
  131. scheme_list: {},
  132. timesInfo: "",
  133. projectInfo: "",
  134. weekInfo: "",
  135. programmeIndex: "",
  136. remarks: "",
  137. coupon_list: "",
  138. order_data: "",
  139. isPupop: false,
  140. id: "",
  141. problem: '',
  142. };
  143. },
  144. computed: {
  145. gender () {
  146. // 性别,1男,2女,0保密
  147. return this.userInfo.sex == 1 ?
  148. 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220610/male.png' :
  149. 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220610/female.png'
  150. }
  151. },
  152. watch: {},
  153. methods: {
  154. getOrderInfo () {
  155. api.getOrderInfo({ id: this.id }).then(res => {
  156. this.userInfo = res.data.user;
  157. this.order_data = res.data.order_data;
  158. this.problem = res.data.skin_name
  159. let _problem = []
  160. res.data.face_names.forEach(item => {
  161. let info = {}
  162. info['text'] = item
  163. _problem.push(info)
  164. console.log(_problem, '_problem');
  165. })
  166. this.lableList = _problem
  167. this.randomColor();
  168. this.programmeList = res.data.order_data.project_list;
  169. this.coupon_list = res.data.order_data.coupon_list;
  170. this.remarks = res.data.remark;
  171. });
  172. },
  173. onOperation (index) {
  174. if (this.programmeList[index].onSelect) {
  175. this.$set(
  176. this.programmeList[index],
  177. "onSelect",
  178. !this.programmeList[index].onSelect
  179. );
  180. } else {
  181. this.$set(this.programmeList[index], "onSelect", true);
  182. }
  183. },
  184. randomColor (type) {
  185. let arr = [
  186. { background: 'rgba(244, 247, 255, 1)', border: 'rgba(85, 124, 255, 1)' },
  187. { background: 'rgba(245, 252, 245, 1)', border: 'rgba(66, 211, 81, 1)' },
  188. { background: 'rgba(254, 244, 237, 1)', border: 'rgba(250, 125, 34, 1)' },
  189. { background: 'rgba(249, 245, 255, 1)', border: 'rgba(136, 50, 255, 1)' },
  190. { background: 'rgba(255, 252, 245, 1)', border: 'rgba(204, 116, 42, 1)' },]
  191. this.lableList.forEach(res => {
  192. let color = Math.floor((Math.random() * arr.length))
  193. this.$set(res, 'bgcolor', arr[color].background)
  194. this.$set(res, 'bdcolor', arr[color].border)
  195. })
  196. },
  197. onSubmit () { },
  198. submitFrequency () { }
  199. },
  200. created () {
  201. let id = this.$route.query.id;
  202. this.id = id;
  203. this.getOrderInfo();
  204. },
  205. mounted () { }
  206. };
  207. </script>
  208. <style lang='less' scoped>
  209. .mine {
  210. height: 100%;
  211. display: flex;
  212. .left {
  213. width: 318px;
  214. padding: 12px 12px 0 12px;
  215. background: #ffffff;
  216. box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
  217. border-radius: 8px;
  218. font-size: 13px;
  219. font-family: PingFangSC-Regular, PingFang SC;
  220. font-weight: 400;
  221. color: #999999;
  222. line-height: 18px;
  223. overflow: scroll;
  224. height: 100%;
  225. .user-info {
  226. display: flex;
  227. align-items: center;
  228. .user-img {
  229. width: 96px;
  230. img {
  231. width: 100%;
  232. display: block;
  233. border-radius: 6px;
  234. }
  235. }
  236. .user-span {
  237. margin-left: 12px;
  238. span {
  239. color: #333333;
  240. }
  241. .info {
  242. display: flex;
  243. justify-content: space-between;
  244. .name {
  245. font-size: 22px;
  246. }
  247. .sex {
  248. img {
  249. width: 24px;
  250. height: 24px;
  251. }
  252. }
  253. .age {
  254. margin-left: 13px;
  255. span:nth-child(1) {
  256. font-size: 22px;
  257. }
  258. span:nth-child(2) {
  259. margin-left: 4px;
  260. color: #999999;
  261. }
  262. }
  263. }
  264. div:nth-child(2),
  265. div:nth-child(3) {
  266. margin-bottom: 8px;
  267. }
  268. }
  269. }
  270. .user-record {
  271. margin-top: 16px;
  272. display: flex;
  273. justify-content: space-between;
  274. .num {
  275. font-size: 18px;
  276. font-family: OPPOSans-B, OPPOSans;
  277. font-weight: normal;
  278. color: #fa7d22;
  279. line-height: 29px;
  280. }
  281. .tips {
  282. font-size: 13px;
  283. font-family: PingFangSC-Regular, PingFang SC;
  284. font-weight: 400;
  285. color: #333333;
  286. line-height: 30px;
  287. }
  288. .ts {
  289. font-size: 13px;
  290. font-family: PingFangSC-Regular, PingFang SC;
  291. font-weight: 400;
  292. color: #333333;
  293. line-height: 30px;
  294. }
  295. }
  296. .lable {
  297. margin-top: 23px;
  298. width: 100%;
  299. overflow: scroll;
  300. background: #ffffff;
  301. .lable-title {
  302. font-size: 14px;
  303. font-family: PingFangSC-Medium, PingFang SC;
  304. font-weight: 500;
  305. color: #333333;
  306. line-height: 20px;
  307. }
  308. .problem-lable {
  309. flex: 1;
  310. overflow-y: hidden;
  311. width: 100%;
  312. font-size: 12px;
  313. font-family: PingFang-SC-Regular, PingFang-SC;
  314. font-weight: 400;
  315. color: #333333;
  316. line-height: 17px;
  317. display: flex;
  318. flex-flow: column wrap;
  319. list-style-type: none;
  320. overflow-x: scroll;
  321. align-items: baseline;
  322. .lable-text {
  323. margin-top: 10px;
  324. margin-bottom: 10px;
  325. height: 24px;
  326. line-height: 24px;
  327. border: 1px solid #42d351;
  328. padding: 0 12px;
  329. border-radius: 2px;
  330. }
  331. .problem-text {
  332. background: rgba(244, 247, 255, 1);
  333. border: 1px solid rgba(85, 124, 255, 1);
  334. }
  335. }
  336. .lable-list {
  337. width: 100%;
  338. min-height: 105rpx;
  339. .lable-info {
  340. padding: 3px 12px;
  341. display: inline-block;
  342. line-height: 17px;
  343. border-radius: 2px;
  344. border: 1px solid #d6d6d6;
  345. margin-top: 10px;
  346. margin-right: 10px;
  347. }
  348. .add-lable {
  349. display: inline-block;
  350. width: 27px;
  351. height: 24px;
  352. line-height: 24px;
  353. font-size: 12px;
  354. font-family: PingFang-SC-Regular, PingFang-SC;
  355. font-weight: 400;
  356. color: #333333;
  357. text-align: center;
  358. margin-left: 10px;
  359. border-radius: 2px;
  360. border: 1px solid #d6d6d6;
  361. }
  362. }
  363. .remarks {
  364. /deep/ .el-textarea__inner:focus {
  365. border-color: #fa852f;
  366. }
  367. }
  368. }
  369. .ps {
  370. font-size: 14px;
  371. font-family: PingFangSC-Medium, PingFang SC;
  372. font-weight: 500;
  373. color: #333333;
  374. line-height: 20px;
  375. margin-top: 20px;
  376. .ps-text {
  377. margin-top: 10px;
  378. font-size: 12px;
  379. font-family: PingFang-SC-Regular, PingFang-SC;
  380. font-weight: 400;
  381. color: #666666;
  382. line-height: 17px;
  383. }
  384. }
  385. .programme {
  386. margin-top: 20px;
  387. width: 100%;
  388. background: #ffffff;
  389. border-radius: 8px;
  390. .tab {
  391. display: flex;
  392. align-items: center;
  393. justify-content: space-between;
  394. .tab-title {
  395. font-size: 14px;
  396. font-family: PingFangSC-Medium, PingFang SC;
  397. font-weight: 500;
  398. color: #333333;
  399. line-height: 20px;
  400. }
  401. }
  402. .programme-list {
  403. margin-top: 10px;
  404. position: relative;
  405. z-index: 1;
  406. .programme-info {
  407. position: relative;
  408. margin-bottom: 10px;
  409. border-radius: 4px;
  410. border: 1px solid #f5f5f5;
  411. display: flex;
  412. justify-content: space-between;
  413. padding: 8px 8px 8px 10px;
  414. align-items: center;
  415. .programme-left {
  416. display: flex;
  417. align-items: center;
  418. .programme-img {
  419. width: 48px;
  420. display: inline-block;
  421. img {
  422. width: 100%;
  423. display: block;
  424. }
  425. }
  426. .programme-tips {
  427. display: inline-block;
  428. margin-left: 10px;
  429. font-size: 10px;
  430. font-family: PingFangSC-Regular, PingFang SC;
  431. font-weight: 400;
  432. color: #999999;
  433. line-height: 14px;
  434. zoom: 0.83;
  435. }
  436. }
  437. .programme-right {
  438. font-size: 12px;
  439. font-family: PingFangSC-Regular, PingFang SC;
  440. font-weight: 400;
  441. color: #333333;
  442. line-height: 17px;
  443. .duration {
  444. margin-top: 14px;
  445. }
  446. }
  447. .operation {
  448. position: absolute;
  449. left: 50%;
  450. transform: translateX(-50%);
  451. top: 10px;
  452. z-index: 10;
  453. width: 44px;
  454. background: #ffffff;
  455. box-shadow: 0px 9px 28px 8px rgba(0, 0, 0, 0.05),
  456. 0px 6px 16px 0px rgba(0, 0, 0, 0.08),
  457. 0px 3px 6px -4px rgba(0, 0, 0, 0.12);
  458. border-radius: 2px;
  459. padding: 10px;
  460. font-size: 12px;
  461. font-family: PingFangSC-Regular, PingFang SC;
  462. font-weight: 400;
  463. color: #333333;
  464. line-height: 17px;
  465. .delete {
  466. margin-top: 20px;
  467. }
  468. }
  469. }
  470. .programme-active {
  471. border: 1px solid #fa852f;
  472. }
  473. }
  474. }
  475. }
  476. .right {
  477. margin-left: 18px;
  478. position: relative;
  479. flex: 1;
  480. .shop-info {
  481. background: #ffffff;
  482. box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
  483. border-radius: 8px;
  484. padding: 12px;
  485. font-size: 13px;
  486. font-family: PingFangSC-Regular, PingFang SC;
  487. font-weight: 400;
  488. color: #999999;
  489. line-height: 28px;
  490. span {
  491. font-weight: 500;
  492. color: #333333;
  493. }
  494. }
  495. .project {
  496. margin-top: 18px;
  497. background: #ffffff;
  498. box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
  499. border-radius: 8px;
  500. padding: 16px 12px 12px 12px;
  501. .project-title {
  502. font-size: 14px;
  503. font-family: PingFangSC-Medium, PingFang SC;
  504. font-weight: 500;
  505. color: #333333;
  506. line-height: 20px;
  507. span {
  508. color: #fa7d22;
  509. }
  510. }
  511. .project-list {
  512. padding-top: 10px;
  513. height: 130px;
  514. overflow: scroll;
  515. .project-info {
  516. margin-bottom: 10px;
  517. display: flex;
  518. .project-image {
  519. width: 60px;
  520. height: 60px;
  521. img {
  522. width: 100%;
  523. display: block;
  524. }
  525. }
  526. .project-content {
  527. flex: 1;
  528. margin-left: 10px;
  529. .title-price {
  530. display: flex;
  531. justify-content: space-between;
  532. font-size: 14px;
  533. font-family: PingFangSC-Medium, PingFang SC;
  534. font-weight: 500;
  535. color: #292929;
  536. line-height: 22px;
  537. }
  538. .project-tips {
  539. font-size: 12px;
  540. font-family: PingFangSC-Regular, PingFang SC;
  541. font-weight: 400;
  542. color: #999999;
  543. line-height: 18px;
  544. }
  545. .project-zoom {
  546. font-size: 12px;
  547. font-family: PingFangSC-Regular, PingFang SC;
  548. font-weight: 400;
  549. color: #fa7d22;
  550. line-height: 18px;
  551. }
  552. }
  553. }
  554. }
  555. }
  556. .cost {
  557. height: 186px;
  558. overflow: scroll;
  559. background: #ffffff;
  560. border-radius: 8px;
  561. margin-top: 18px;
  562. padding: 10px 19px 11px 12px;
  563. font-size: 14px;
  564. font-family: PingFangSC-Regular, PingFang SC;
  565. font-weight: 400;
  566. color: #333333;
  567. line-height: 20px;
  568. .cost-coupon-list {
  569. height: 110px;
  570. overflow: scroll;
  571. border-bottom: 1px solid #f9f9f9;
  572. }
  573. .cost-title {
  574. display: flex;
  575. justify-content: space-between;
  576. }
  577. .coupon {
  578. margin-top: 10px;
  579. display: flex;
  580. justify-content: space-between;
  581. .coupon-tips {
  582. display: flex;
  583. align-items: center;
  584. .coupon-icon {
  585. width: 16px;
  586. img {
  587. width: 100%;
  588. display: block;
  589. }
  590. }
  591. .coupon-title {
  592. margin-left: 3px;
  593. }
  594. .coupon-tip {
  595. margin-left: 10px;
  596. background: #ffefeb;
  597. border-radius: 4px;
  598. border: 1px solid #ff3007;
  599. font-size: 10px;
  600. font-family: PingFangSC-Regular, PingFang SC;
  601. font-weight: 400;
  602. color: #ff3007;
  603. line-height: 14px;
  604. padding: 2px 6px;
  605. zoom: 0.83;
  606. }
  607. }
  608. }
  609. .coupon-ps {
  610. margin-left: -6px;
  611. margin-top: 11px;
  612. display: flex;
  613. justify-content: space-between;
  614. font-size: 12px;
  615. font-family: PingFangSC-Regular, PingFang SC;
  616. font-weight: 400;
  617. color: #333333;
  618. line-height: 17px;
  619. .cou-price {
  620. font-weight: 500;
  621. color: #ff3007;
  622. }
  623. }
  624. .over-price {
  625. margin-top: 14px;
  626. text-align: right;
  627. }
  628. }
  629. }
  630. }
  631. </style>