123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930 |
- <template>
- <div class="mine">
- <div class="left">
- <div class="user-info">
- <div class="title">
- <div class="txt">个人信息</div>
- <div class="test-record" @click="toTestRecord" v-if="userInfo.analysis_id">测肤记录</div>
- </div>
- <div class="detail-info">
- <div class="user-img">
- <img :src="userInfo.avatar_url" alt="">
- </div>
- <div class="user-span">
- <div class="info">
- <div class="name"><span>{{userInfo.nickname}}</span></div>
- <div class="sex"><img :src="gender"
- alt=""></div>
- <div class="age"><span>{{userInfo.skin_age}}</span><span>肤龄</span></div>
- </div>
- <div class="real-name">姓名:
- <span v-show="!nameInpVisible">{{userInfo.real_name}}</span>
- <el-input size="mini" ref="realNameInp" v-show="nameInpVisible" @change="updateRealName" v-model="userInfo.real_name" type="text"></el-input>
- <img class="edit-name" @click="editName" src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/eidt.png" alt="" srcset="">
- </div>
- <div class="skin-type">肤质:<span>{{userInfo.skin_type}}</span></div>
- <div class="skin-color">肤色:<span>{{userInfo.skin_color}}</span></div>
- <div class="skin-color">上传报告时间:<span>{{userInfo.check_time}}</span></div>
- </div>
- </div>
- </div>
-
- <div class="personage-data">
- <div class="myDataList">
- 出生日期:
- <span>{{userInfo.birthday}}</span>
- </div>
- <div class="myDataList">
- 联系电话:
- <span>{{userInfo.mobile}}</span>
- </div>
-
- <div class="myDataList">
- 所在地:
- <span>{{userInfo.city}}</span>
- </div>
-
- <div class="myDataList">
- 开卡店铺:
- <span>{{userInfo.store_name}}</span>
- </div>
-
- <div class="myDataList coupon-num">
- 优惠券数量:
- <span>{{userInfo.card_num}}</span>
- </div>
-
- <div class="myDataList">
- 储值金额:
- <span class="JEcolor">
- ¥
- <span class="bigSixe">{{userInfo.amount}}</span>
- <!-- .00 -->
- </span>
- </div>
- <div class="myDataList">
- 积分:
- <span>{{userInfo.coin}}</span>
- </div>
- <div class="myDataList" @click="remarkPupopVisible=true">
- 备注:
- <span>{{userInfo.remark | ellipsis(20)}}</span>
- </div>
- </div>
- </div>
- <div class="right">
- <div class="right-top">
- <div class="right-top-data">
- <div class="lable">
- <div class="lable-title">面诊标签</div>
- <div class="problem">
- <div class="problem-title">问题标签</div>
- <div class="problem-lable">
- <div class="lable-text problem-text">{{problem}}</div>
- </div>
- </div>
- <div class="problem">
- <div class="problem-title">面部标签</div>
- <div class="problem-lable">
- <div class="lable-text"
- v-for="item,index in lableList"
- :key="index"
- :style="{background:item.bgcolor,borderColor:item.bdcolor}">{{item.text}}</div>
- </div>
- </div>
- </div>
- </div>
- <div class="right-top-list">
- <div class="dataList"
- @click="toOrder(1)">
- <div class="">
- <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/project_icon.png" />
- <div>项目订单</div>
- </div>
- <span>{{order_total.project}}</span>
- </div>
- <div class="dataList"
- style="margin:18px 0px"
- @click="toOrder(2)">
- <div class="">
- <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/coupon_icon.png" />
- <div>次卡订单</div>
- </div>
- <span>{{order_total.card_order}}</span>
- </div>
- <div class="dataList"
- @click="toOrder(3)">
- <div class="">
- <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/order_total_icon.png" />
- <div>商品订单</div>
- </div>
- <span>{{order_total.goods}}</span>
- </div>
- </div>
- </div>
- <div class="right-bottom">
- <div class="programme">
- <div class="tab">
- <div class="tab-title">执行方案</div>
- </div>
- <div class="programmeList"
- v-if="programmeList.length>0">
- <div class="programmeWeek">
- <div class="programmeItem"
- v-for="item,index in programmeList"
- :key="index">
- <div :class="selectWeek==index?'weekItemSelect':'weekItem'"
- @click="weekSelect(index)">{{item.name}}</div>
- <div class="weekLine"
- v-if="index==3?false:true"></div>
- </div>
- </div>
- <div class="doTime">{{programmeList[selectWeek].time}}</div>
- <div class="weekDetails"
- v-if="programmeList.length>0">
- <div class="contentItem"
- v-for="item,index1 in programmeList[selectWeek].list"
- :key="index1">
- <div class="itemTitle">
- <div>{{item.name}}</div>
- <div>{{item.classify_name}}</div>
- <!-- <div>{{item.time}}</div> -->
- </div>
- <div class="itemContent"
- v-for="items,index2 in item.list"
- :key="index2">
- <img class="itemContent-img"
- :src="items.cover_url" />
- <div class="itemContent-right">
- <div class="right-content">
- <div class="right-name">{{items.name |ellipsis(14)}}</div>
- <div class="right-price">{{items.price |doubleNum(2)}}</div>
- </div>
- <div class="right-project">{{items.product_name}}</div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- 备注 -->
- <mine-pupop :show="remarkPupopVisible">
- <div class="block">
- <div class="delete-pupop"
- @click="remarkPupopVisible=false">
- <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
- alt />
- </div>
- <div class="pupop-title">备注</div>
- <textarea type="text"
- class="noticeInput"
- placeholder="备注"
- v-model="userInfo.remark"></textarea>
- <div class="noticeSubmit">
- <div class="submit-notice" @click="submitRemark">确定</div>
- </div>
- </div>
- </mine-pupop>
- </div>
- </template>
-
- <script>
- import api from "../../../server/home";
- import minePupop from "../../../components/minePupop/index.vue";
-
- export default {
- data () {
- return {
- userInfo: {
- image:
- "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png",
- name: "张三",
- sex: "女",
- age: "23",
- skinType: "中性皮肤",
- real_name: '',
- remark: '',
- },
- problem: "",
- //面部标签
- lableList: [
- ],
- //执行方案
- programmeList: [],
-
- // remarks: {},
- //项目列表
- projectList: [],
-
- order_total: {},
- selectWeek: 0,
- timesInfo: "",
- projectInfo: "",
- weekInfo: "",
- programmeIndex: "",
- isPupop: false,
- nameInpVisible: false,
- remarkPupopVisible: false
- };
- },
- components: { minePupop },
- computed: {
- gender () {
- // 性别,1男,2女,0保密
- return this.userInfo.sex == 1 ?
- 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220610/male.png' :
- 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220610/female.png'
- }
- },
- watch: {},
-
- methods: {
- getPadUserInfo () {
- api.getPadUserInfo({ id: this.id }).then(res => {
- this.userInfo = res.data.user;
- // this.userInfo.remarks = res.data.remark;
- this.problem = res.data.skin_name;
- let _problem = []
- res.data.face_names.forEach(item => {
- let info = {}
- info['text'] = item
- _problem.push(info)
- console.log(_problem, '_problem');
- })
- this.lableList = _problem
- this.randomColor();
- this.order_total = res.data.order_total;
- this.programmeList = res.data.scheme_list;
- // this.programmeList = res.data.order_data.project_list;
- // this.coupon_list = res.data.order_data.coupon_list;
- });
- },
- randomColor (type) {
- let arr = [
- {
- background: "rgba(244, 247, 255, 1)",
- border: "rgba(85, 124, 255, 1)"
- },
- {
- background: "rgba(245, 252, 245, 1)",
- border: "rgba(66, 211, 81, 1)"
- },
- {
- background: "rgba(254, 244, 237, 1)",
- border: "rgba(250, 125, 34, 1)"
- },
- {
- background: "rgba(249, 245, 255, 1)",
- border: "rgba(136, 50, 255, 1)"
- },
- {
- background: "rgba(255, 252, 245, 1)",
- border: "rgba(204, 116, 42, 1)"
- }
- ];
- this.lableList.forEach(res => {
- let color = Math.floor(Math.random() * arr.length);
- this.$set(res, "bgcolor", arr[color].background);
- this.$set(res, "bdcolor", arr[color].border);
- });
- },
- weekSelect (index) {
- console.log("xxxx");
- this.selectWeek = index;
- },
- onOperation (index) {
- if (this.programmeList[index].onSelect) {
- this.$set(
- this.programmeList[index],
- "onSelect",
- !this.programmeList[index].onSelect
- );
- } else {
- this.$set(this.programmeList[index], "onSelect", true);
- }
- },
- toOrder (index) {
- let activeName = 'first'
- if (index == 3) {
- activeName = 'third'
- } else if (index == 2) {
- activeName = 'second'
- }
- this.$router.push({
- path: "/customerMan/projectOrder",
- query: {
- id: this.id,
- activeName: activeName
- }
- });
- },
- toTestRecord () {
- this.$router.push({
- path: '/testSkin/details',
- query: {
- id: this.userInfo.analysis_id
- }
- })
- },
- editName () {
- this.nameInpVisible = true
- this.$refs.realNameInp.focus()
- },
- async updateRealName() {
- let resp = await api.updateUserProfile({
- id: this.id,
- real_name: this.userInfo.real_name
- })
- if (resp.code === 200) {
- this.$message.success('保存成功!')
- }
- this.nameInpVisible = false
- },
- async submitRemark () {
- let resp = await api.updateUserProfile({
- id: this.id,
- remark: this.userInfo.remark
- })
- if (resp.code === 200) {
- this.$message.success('保存成功!')
- }
- this.remarkPupopVisible = false
- }
- },
-
- created () {
- let id = this.$route.query.id;
- this.id = id;
- this.getPadUserInfo();
- },
-
- mounted () { }
- };
- </script>
-
- <style lang='less' scoped>
- .mine {
- height: 100%;
- display: flex;
- .left {
- width: 276px;
- padding: 12px 12px 0 12px;
- background: #ffffff;
- box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
- border-radius: 8px;
- font-size: 13px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #999999;
- line-height: 18px;
- overflow: scroll;
- height: 100%;
- .user-info {
- display: flex;
- flex-direction: column;
- align-items: center;
- .title {
- width: 100%;
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 10px;
- .txt {
- color: #333333;
- }
- .test-record {
- font-size: 12px;
- color: #FA7D22;
- }
- }
- .detail-info {
- display: flex;
- .user-img {
- width: 96px;
- img {
- width: 100%;
- display: block;
- border-radius: 6px;
- }
- }
- .user-span {
- margin-left: 12px;
-
- span {
- color: #333333;
- }
- .info {
- display: flex;
- justify-content: space-between;
-
- .name {
- font-size: 16px;
- }
- .sex {
- img {
- width: 24px;
- height: 24px;
- }
- }
- .age {
- margin-left: 13px;
- span:nth-child(1) {
- font-size: 22px;
- }
- span:nth-child(2) {
- margin-left: 4px;
- color: #999999;
- }
- }
- }
- .real-name {
- display: flex;
- justify-content: space-between;
- align-items: center;
- .real-name-inp {
- width: 35px !important;
- height: 25px !important;
- }
- .edit-name {
- width: 20px;
- height: 20px;
- }
- }
- div:nth-child(2),
- div:nth-child(3) {
- margin-bottom: 8px;
- }
- }
- }
- }
- .personage-data {
- margin-top: 30px;
- .myDataList {
- margin-top: 15px;
- .bigSixe {
- font-size: 18px;
- color: #fa7d22;
- }
- span {
- color: #333333;
- }
- .JEcolor {
- color: #fa7d22;
- }
- }
- .coupon-num {
- span {
- color: #FA7D22;
- font-size: 16px;
- font-weight: 500;
- }
- }
- }
- }
-
- .right {
- margin-left: 18px;
- position: relative;
- flex: 1;
- .right-top {
- height: 205px;
- // border: 1px solid red;
- display: flex;
- .right-top-list {
- width: 239ppx;
- margin-left: 18px;
- display: flex;
- flex-direction: column;
- .dataList {
- height: 56px;
- width: 193px;
- background: #ffffff;
- box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
- border-radius: 8px;
- padding: 12px 20px 12px 14px;
- display: flex;
- justify-content: space-between;
- align-items: center;
- div:nth-child(1) {
- display: flex;
- align-items: center;
- img {
- margin-right: 14px;
- }
- }
- img {
- width: 33px;
- height: 33px;
- }
- p {
- font-size: 14px;
- margin-left: 14px;
- margin-right: 80px;
- }
- span {
- font-size: 16px;
- // margin-right: 20px;
- }
- }
- }
- .right-top-data {
- background: #ffffff;
- box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
- border-radius: 8px;
- padding: 16px 12px 12px 12px;
- width: 358px;
- height: 100%;
- .lable {
- // margin-top: 23px;
- width: 100%;
- overflow: scroll;
- background: #ffffff;
- .lable-title {
- font-size: 14px;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #333333;
- line-height: 20px;
- margin-bottom: 14px;
- }
- .problem {
- display: flex;
- .problem-title {
- font-size: 13px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 18px;
- }
- .problem-lable {
- flex: 1;
- overflow-y: hidden;
- width: 100%;
- height: 68px;
- font-size: 12px;
- font-family: PingFang-SC-Regular, PingFang-SC;
- font-weight: 400;
- color: #333333;
- line-height: 17px;
- display: flex;
- flex-flow: column wrap;
- list-style-type: none;
- overflow-x: scroll;
- align-items: baseline;
-
- .lable-text {
- margin-left: 10px;
- margin-bottom: 10px;
- border: 1px solid #42d351;
- padding: 0 12px;
- border-radius: 2px;
- }
- .problem-text {
- background: rgba(244, 247, 255, 1);
- border: 1px solid rgba(85, 124, 255, 1);
- }
- }
- }
- .lable-list {
- width: 100%;
- min-height: 105rpx;
- .lable-info {
- display: inline-block;
- padding: 0 12px;
- margin-left: 10px;
- height: 24px;
- line-height: 24px;
- border-radius: 2px;
- border: 1px solid #d6d6d6;
- margin-bottom: 10px;
- }
- .add-lable {
- display: inline-block;
- width: 27px;
- height: 24px;
- line-height: 24px;
- font-size: 12px;
- font-family: PingFang-SC-Regular, PingFang-SC;
- font-weight: 400;
- color: #333333;
- text-align: center;
- margin-left: 10px;
- border-radius: 2px;
- border: 1px solid #d6d6d6;
- }
- }
- .remarks {
- /deep/ .el-textarea__inner:focus {
- border-color: #fa852f;
- }
- }
- }
- .ps {
- font-size: 14px;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #333333;
- line-height: 20px;
- .ps-text {
- margin-top: 10px;
- font-size: 12px;
- font-weight: 400;
- color: #666666;
- line-height: 17px;
- }
- }
- }
- }
- .right-bottom {
- margin-top: 18px;
- width: 575px;
- height: 286px;
- background: #ffffff;
- box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
- border-radius: 8px;
- padding: 16px 12px 12px 12px;
- .programme {
- // margin-top: 20px;
- width: 100%;
- background: #ffffff;
- border-radius: 8px;
- .programmeList {
- width: 550px;
- .programmeWeek {
- display: flex;
- align-items: center;
- }
-
- .programmeItem {
- margin-top: 20px;
- flex: 1;
- display: flex;
- }
- .weekItem {
- text-align: center;
- font-size: 13px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #999999;
- flex: 1;
- }
-
- .weekItemSelect {
- text-align: center;
- font-size: 13px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #fa7d22;
- flex: 1;
- }
-
- .weekLine {
- width: 1px;
- height: 12px;
- background: #f0f0f0;
- }
- .doTime {
- // margin-left: 20px;
- line-height: 30px;
- font-size: 12px;
- font-weight: 500;
- color: #333333;
- }
- .weekDetails {
- height: 180px;
- border-radius: 6px;
- border: 1px solid #f5f5f5;
- display: flex;
- align-items: center;
- overflow: scroll;
- }
-
- .contentItem {
- margin-left: 10px;
- width: 317px;
- min-height: 211px;
- border-right: 1px solid #f5f5f5;
- // overflow-y: scroll;
- }
-
- .line-hor {
- margin-top: 30px;
- margin-left: 10px;
- width: 1px;
- height: 261px;
- background: #f0f0f0;
- }
-
- .itemTitle {
- display: flex;
- padding-right: 10px;
- justify-content: space-between;
- width: 100%;
- line-height: 20px;
- font-size: 12px;
- font-weight: 400;
- color: #333333;
- }
-
- .itemContent {
- width: 317px;
- margin-top: 10px;
- display: flex;
- align-items: center;
- height: 49px;
- }
-
- .itemContent-img {
- width: 49px;
- height: 49px;
- background: #d8d8d8;
- border-radius: 2px;
- }
-
- .itemContent-right {
- margin-left: 10px;
- display: flex;
- flex-direction: column;
- height: 49px;
- flex: 1;
- }
-
- .right-content {
- flex: 1;
- display: flex;
- }
-
- .right-name {
- font-size: 12px;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #333333;
- flex: 1;
- }
-
- .right-price {
- margin-right: 10px;
- margin-left: 20px;
- font-size: 12px;
- font-family: OPPOSans-B, OPPOSans;
- font-weight: normal;
- color: #ff3007;
- }
-
- .right-project {
- font-size: 12px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #ffc630;
- }
- }
- .tab {
- display: flex;
- align-items: center;
- justify-content: space-between;
- .tab-title {
- font-size: 14px;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #333333;
- line-height: 20px;
- }
- }
- .programme-list {
- margin-top: 10px;
- position: relative;
- z-index: 1;
- .programme-info {
- position: relative;
- margin-bottom: 10px;
- border-radius: 4px;
- border: 1px solid #f5f5f5;
- display: flex;
- justify-content: space-between;
- padding: 8px 8px 8px 10px;
- align-items: center;
- .programme-left {
- display: flex;
- align-items: center;
- .programme-img {
- width: 48px;
- display: inline-block;
- img {
- width: 100%;
- display: block;
- }
- }
- .programme-tips {
- display: inline-block;
- margin-left: 10px;
- font-size: 10px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #999999;
- line-height: 14px;
- zoom: 0.83;
- }
- }
- .programme-right {
- font-size: 12px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 17px;
- .duration {
- margin-top: 14px;
- }
- }
- .operation {
- position: absolute;
- left: 50%;
- transform: translateX(-50%);
- top: 10px;
- z-index: 10;
- width: 44px;
- background: #ffffff;
- box-shadow: 0px 9px 28px 8px rgba(0, 0, 0, 0.05),
- 0px 6px 16px 0px rgba(0, 0, 0, 0.08),
- 0px 3px 6px -4px rgba(0, 0, 0, 0.12);
- border-radius: 2px;
- padding: 10px;
- font-size: 12px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 17px;
- .delete {
- margin-top: 20px;
- }
- }
- }
- .programme-active {
- border: 1px solid #fa852f;
- }
- }
- }
- }
- }
- .block {
- width: 540px;
- background: #ffffff;
- border-radius: 8px;
- position: relative;
- padding: 42px;
- .delete-pupop {
- position: absolute;
- width: 32px;
- height: 32px;
- top: 5px;
- right: 5px;
- img {
- width: 100%;
- height: 100%;
- display: block;
- }
- }
- .pupop-title {
- font-size: 14px;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #333333;
- line-height: 20px;
- text-align: center;
- }
-
- .noticeInput {
- margin-top: 50px;
- margin-left: 80px;
- padding: 10px;
- width: 307px;
- height: 184px;
- border: 1px solid #f5f5f5;
- }
-
- .noticeSubmit {
- margin-top: 20px;
- width: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- }
-
-
- .submit-notice {
- width: 100px;
- height: 29px;
- border-radius: 14px;
- font-size: 14px;
- font-weight: 500;
- background: #fa7d22;
- color: white;
- line-height: 29px;
- text-align: center;
- margin-left: 22px;
- }
- }
- }
- </style>
|