index.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522
  1. <template>
  2. <div class="mine">
  3. <div class="left">
  4. <div class="user-info">
  5. <div class="user-img">
  6. <img :src="userInfo.avatar_url"
  7. alt />
  8. </div>
  9. <div class="user-span">
  10. <div class="name">
  11. 昵称:
  12. <span>{{userInfo.nickname}}</span>
  13. </div>
  14. <div class="sex">
  15. 性别:
  16. <span>{{userInfo.sex==1?'男':'女'}}</span>
  17. </div>
  18. <div class="age">
  19. 肤龄:
  20. <span>{{userInfo.age||'--'}}</span>
  21. </div>
  22. <div class="skin-type">
  23. 肤质:
  24. <span>{{userInfo.skin}}</span>
  25. </div>
  26. </div>
  27. </div>
  28. <div class="personage-data">
  29. <div class="myDataList">
  30. 肌肤得分:
  31. <span class="bigSixe">{{userInfo.scorec}}分</span>
  32. </div>
  33. <div class="myDataList">
  34. 皮肤状态:
  35. <span>{{userInfo.skin_status}}</span>
  36. </div>
  37. <div class="myDataList">
  38. 上传检测时间:
  39. <span>{{userInfo.check_time}}</span>
  40. </div>
  41. <div class="myDataList">
  42. 出生日期:
  43. <span>{{userInfo.birthday}}</span>
  44. </div>
  45. <div class="myDataList">
  46. 联系电话:
  47. <span>{{userInfo.mobile}}</span>
  48. </div>
  49. <div class="myDataList">
  50. 所在地:
  51. <span>{{userInfo.city}}</span>
  52. </div>
  53. <div class="myDataList">
  54. 开卡店铺:
  55. <span>{{userInfo.store_name}}</span>
  56. </div>
  57. <div class="myDataList">
  58. 卡卷数量:
  59. <span>{{userInfo.card_num}}</span>
  60. </div>
  61. <div class="myDataList">
  62. 储值金额:
  63. <span class="JEcolor">
  64. <span class="bigSixe">{{userInfo.amount}}</span>
  65. <!-- .00 -->
  66. </span>
  67. </div>
  68. <div class="myDataList">
  69. 积分:
  70. <span>{{userInfo.coin}}</span>
  71. </div>
  72. </div>
  73. </div>
  74. <div class="right">
  75. <div class="right-top">
  76. <div class="right-top-data">
  77. <div class="lable">
  78. <div class="lable-title">面诊标签</div>
  79. <div class="lable-list">
  80. <div v-for="(item,index) in lableList"
  81. :key="index"
  82. class="lable-info">{{item.text}}</div>
  83. </div>
  84. </div>
  85. <div class="ps">
  86. <div class="ps-title">备注</div>
  87. <div class="ps-text">{{remarks | ellipsis(20)}}</div>
  88. </div>
  89. </div>
  90. <div class="right-top-list">
  91. <div class="dataList"
  92. @click="toOrder(1)">
  93. <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/project_icon.png" />
  94. <p>项目订单</p>
  95. <span>{{order_total.project}}</span>
  96. </div>
  97. <div class="dataList"
  98. style="margin:18px 0px"
  99. @click="toOrder(2)">
  100. <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/coupon_icon.png" />
  101. <p>优惠券</p>
  102. <span>{{order_total.coupon}}</span>
  103. </div>
  104. <div class="dataList"
  105. @click="toOrder(3)">
  106. <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/order_total_icon.png" />
  107. <p>商品订单</p>
  108. <span>{{order_total.goods}}</span>
  109. </div>
  110. </div>
  111. </div>
  112. <div class="right-bottom">
  113. <div class="programme">
  114. <div class="tab">
  115. <div class="tab-title">执行方案</div>
  116. </div>
  117. <div class="programme-list">
  118. <div :class="['programme-info',item.onSelect?'programme-active':'']"
  119. v-for="(item,index) in programmeList"
  120. :key="index"
  121. @click="onOperation(index)">
  122. <div class="programme-left">
  123. <div class="programme-img">
  124. <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png"
  125. alt />
  126. </div>
  127. <div class="programme-tips">
  128. <div class="tips-title">{{'【清洁补水】华熙智慧…'|ellipsis(9)}}</div>
  129. <div class="tips-title">{{'美白、祛痘、抗皱'|ellipsis(9)}}</div>
  130. <div class="tips-title">
  131. 仪器:
  132. <span>{{'无创水光'|ellipsis(9)}}</span>
  133. </div>
  134. </div>
  135. </div>
  136. <div class="programme-right">
  137. <div class="frequency">
  138. 执行频率:
  139. <span>一周一次</span>
  140. </div>
  141. <div class="duration">
  142. 持续时长:
  143. <span>28天</span>
  144. </div>
  145. </div>
  146. <div class="operation"
  147. v-if="item.onSelect">
  148. <div class="edit">编辑</div>
  149. <div class="delete">删除</div>
  150. </div>
  151. </div>
  152. </div>
  153. </div>
  154. </div>
  155. </div>
  156. </div>
  157. </template>
  158. <script>
  159. import api from "../../../server/home";
  160. export default {
  161. data () {
  162. return {
  163. userInfo: {
  164. image:
  165. "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png",
  166. name: "张三",
  167. sex: "女",
  168. age: "23",
  169. skinType: "中性皮肤"
  170. },
  171. //面部标签
  172. lableList: [],
  173. //执行方案
  174. programmeList: [],
  175. remarks: {},
  176. //项目列表
  177. projectList: [],
  178. order_total: {},
  179. timesInfo: "",
  180. projectInfo: "",
  181. weekInfo: "",
  182. programmeIndex: "",
  183. remarks: "",
  184. isPupop: false
  185. };
  186. },
  187. computed: {},
  188. watch: {},
  189. methods: {
  190. getPadUserInfo () {
  191. api.getPadUserInfo({ id: this.id }).then(res => {
  192. this.userInfo = res.data.user;
  193. this.remarks = res.data.remark;
  194. this.lableList = res.data.tags;
  195. this.order_total = res.data.order_total;
  196. this.programmeList = res.data.scheme_list;
  197. // this.programmeList = res.data.order_data.project_list;
  198. // this.coupon_list = res.data.order_data.coupon_list;
  199. });
  200. },
  201. onOperation (index) {
  202. if (this.programmeList[index].onSelect) {
  203. this.$set(
  204. this.programmeList[index],
  205. "onSelect",
  206. !this.programmeList[index].onSelect
  207. );
  208. } else {
  209. this.$set(this.programmeList[index], "onSelect", true);
  210. }
  211. },
  212. toOrder (index) {
  213. let activeName = 'first'
  214. if (index == 3) {
  215. activeName = 'third'
  216. } else if (index == 2) {
  217. activeName = 'second'
  218. }
  219. this.$router.push({
  220. path: "/customerMan/projectOrder",
  221. query: {
  222. id: this.id,
  223. activeName: activeName
  224. }
  225. });
  226. },
  227. },
  228. created () {
  229. let id = this.$route.query.id;
  230. this.id = id;
  231. this.getPadUserInfo();
  232. },
  233. mounted () { }
  234. };
  235. </script>
  236. <style lang='less' scoped>
  237. .mine {
  238. height: 100%;
  239. display: flex;
  240. .left {
  241. width: 276px;
  242. padding: 12px 12px 0 12px;
  243. background: #ffffff;
  244. box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
  245. border-radius: 8px;
  246. font-size: 13px;
  247. font-family: PingFangSC-Regular, PingFang SC;
  248. font-weight: 400;
  249. color: #999999;
  250. line-height: 18px;
  251. overflow: scroll;
  252. height: 100%;
  253. .user-info {
  254. display: flex;
  255. align-items: center;
  256. .user-img {
  257. width: 98px;
  258. img {
  259. width: 100%;
  260. display: block;
  261. }
  262. }
  263. .user-span {
  264. margin-left: 12px;
  265. .sex {
  266. margin-top: 8px;
  267. }
  268. .age {
  269. margin-top: 8px;
  270. }
  271. .skin-type {
  272. margin-top: 8px;
  273. }
  274. span {
  275. color: #333333;
  276. }
  277. }
  278. }
  279. .personage-data {
  280. margin-top: 30px;
  281. .myDataList {
  282. margin-top: 15px;
  283. .bigSixe {
  284. font-size: 18px;
  285. color: #fa7d22;
  286. }
  287. span {
  288. color: #333333;
  289. }
  290. .JEcolor {
  291. color: #fa7d22;
  292. }
  293. }
  294. }
  295. }
  296. .right {
  297. margin-left: 18px;
  298. position: relative;
  299. flex: 1;
  300. .right-top {
  301. height: 205px;
  302. // border: 1px solid red;
  303. display: flex;
  304. .right-top-list {
  305. width: 239ppx;
  306. margin-left: 18px;
  307. display: flex;
  308. flex-direction: column;
  309. .dataList {
  310. height: 56px;
  311. // width: 239ppx;
  312. background: #ffffff;
  313. box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
  314. border-radius: 8px;
  315. padding: 16px 12px 12px 12px;
  316. display: flex;
  317. align-items: center;
  318. img {
  319. width: 33px;
  320. height: 33px;
  321. }
  322. p {
  323. font-size: 14px;
  324. margin-left: 14px;
  325. margin-right: 80px;
  326. }
  327. span {
  328. font-size: 16px;
  329. margin-right: 20px;
  330. }
  331. }
  332. }
  333. .right-top-data {
  334. background: #ffffff;
  335. box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
  336. border-radius: 8px;
  337. padding: 16px 12px 12px 12px;
  338. width: 310px;
  339. height: 100%;
  340. .lable {
  341. // margin-top: 23px;
  342. width: 100%;
  343. overflow: scroll;
  344. background: #ffffff;
  345. .lable-title {
  346. font-size: 14px;
  347. font-family: PingFangSC-Medium, PingFang SC;
  348. font-weight: 500;
  349. color: #333333;
  350. line-height: 20px;
  351. margin-bottom: 14px;
  352. }
  353. .lable-list {
  354. width: 100%;
  355. min-height: 105rpx;
  356. .lable-info {
  357. display: inline-block;
  358. padding: 0 12px;
  359. margin-left: 10px;
  360. height: 24px;
  361. line-height: 24px;
  362. border-radius: 2px;
  363. border: 1px solid #d6d6d6;
  364. margin-bottom: 10px;
  365. }
  366. .add-lable {
  367. display: inline-block;
  368. width: 27px;
  369. height: 24px;
  370. line-height: 24px;
  371. font-size: 12px;
  372. font-family: PingFang-SC-Regular, PingFang-SC;
  373. font-weight: 400;
  374. color: #333333;
  375. text-align: center;
  376. margin-left: 10px;
  377. border-radius: 2px;
  378. border: 1px solid #d6d6d6;
  379. }
  380. }
  381. .remarks {
  382. /deep/ .el-textarea__inner:focus {
  383. border-color: #fa852f;
  384. }
  385. }
  386. }
  387. .ps {
  388. font-size: 14px;
  389. font-family: PingFangSC-Medium, PingFang SC;
  390. font-weight: 500;
  391. color: #333333;
  392. line-height: 20px;
  393. .ps-text {
  394. margin-top: 10px;
  395. font-size: 12px;
  396. font-weight: 400;
  397. color: #666666;
  398. line-height: 17px;
  399. }
  400. }
  401. }
  402. }
  403. .right-bottom {
  404. margin-top: 18px;
  405. background: #ffffff;
  406. box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
  407. border-radius: 8px;
  408. padding: 16px 61px 12px 12px;
  409. .programme {
  410. // margin-top: 20px;
  411. width: 100%;
  412. background: #ffffff;
  413. border-radius: 8px;
  414. .tab {
  415. display: flex;
  416. align-items: center;
  417. justify-content: space-between;
  418. .tab-title {
  419. font-size: 14px;
  420. font-family: PingFangSC-Medium, PingFang SC;
  421. font-weight: 500;
  422. color: #333333;
  423. line-height: 20px;
  424. }
  425. }
  426. .programme-list {
  427. margin-top: 10px;
  428. position: relative;
  429. z-index: 1;
  430. .programme-info {
  431. position: relative;
  432. margin-bottom: 10px;
  433. border-radius: 4px;
  434. border: 1px solid #f5f5f5;
  435. display: flex;
  436. justify-content: space-between;
  437. padding: 8px 8px 8px 10px;
  438. align-items: center;
  439. .programme-left {
  440. display: flex;
  441. align-items: center;
  442. .programme-img {
  443. width: 48px;
  444. display: inline-block;
  445. img {
  446. width: 100%;
  447. display: block;
  448. }
  449. }
  450. .programme-tips {
  451. display: inline-block;
  452. margin-left: 10px;
  453. font-size: 10px;
  454. font-family: PingFangSC-Regular, PingFang SC;
  455. font-weight: 400;
  456. color: #999999;
  457. line-height: 14px;
  458. zoom: 0.83;
  459. }
  460. }
  461. .programme-right {
  462. font-size: 12px;
  463. font-family: PingFangSC-Regular, PingFang SC;
  464. font-weight: 400;
  465. color: #333333;
  466. line-height: 17px;
  467. .duration {
  468. margin-top: 14px;
  469. }
  470. }
  471. .operation {
  472. position: absolute;
  473. left: 50%;
  474. transform: translateX(-50%);
  475. top: 10px;
  476. z-index: 10;
  477. width: 44px;
  478. background: #ffffff;
  479. box-shadow: 0px 9px 28px 8px rgba(0, 0, 0, 0.05),
  480. 0px 6px 16px 0px rgba(0, 0, 0, 0.08),
  481. 0px 3px 6px -4px rgba(0, 0, 0, 0.12);
  482. border-radius: 2px;
  483. padding: 10px;
  484. font-size: 12px;
  485. font-family: PingFangSC-Regular, PingFang SC;
  486. font-weight: 400;
  487. color: #333333;
  488. line-height: 17px;
  489. .delete {
  490. margin-top: 20px;
  491. }
  492. }
  493. }
  494. .programme-active {
  495. border: 1px solid #fa852f;
  496. }
  497. }
  498. }
  499. }
  500. }
  501. }
  502. </style>