| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291 |
- <template>
- <view>
- <uni-popup ref="chooseServiceTeacherPopup" :catchtouchmove="true" type="bottom">
- <view class="chooseServiceTeacherView">
- <view class="chooseServiceTeacherTitle">
- <text>选择服务人员</text>
- </view>
- <scroll-view class="scrollY" scroll-y>
- <view class="serviceTeacherView" v-for="(item,index) in workPersonList" @click="selectworkPerson(index)">
- <view v-if="item.personId === -1" class="serviceTeacher flex-col justify-center" :class="{selectBack: index == selectIndex}">
- <view class="flex-row">
- <text class="teacherName">{{item.personName}} </text>
- <u-icon name="rmb-circle" color="#666666"></u-icon>
- <text class="teacherMsg">预约费用:{{item.fee}}</text>
- </view>
- </view>
- <view v-else class="serviceTeacher1 flex-row" :class="{selectBack: index == selectIndex}">
- <image class="teacherImg" src="/static/order/nvren.png"></image>
- <view class="flex-col justify-around teacherR ">
- <view class="flex-row">
- <text class="teacherName1">{{item.personName}}</text>
- <text class="teacherTag">造型总监</text>
- </view>
- <view>
- <text class="teacherMsg1">优质服务,从我做起</text>
- </view>
- <view class="flex-row ">
- <view :style="{'marginTop':'7rpx'}">
- <u-icon name="rmb-circle" color="#666666"></u-icon>
- </view>
- <text class="teacherMsg">预约费用:</text>
- <text class="teacherMsg" :style="{'color':'#ED569F'}">{{item.fee}}</text>
- </view>
- </view>
- </view>
- <view class="serobV" v-if="index == selectIndex">
- <image class="serobVicon" src="/static/order/ud20.png"></image>
- </view>
- </view>
- </scroll-view>
- <view class="flex-row justify-between chooseServiceTeacherButton">
- <view class="chooseServiceTeacherButtonL" @click="closePopup">
- <text>取消</text>
- </view>
- <view class="chooseServiceTeacherButtonR" @click="submit">
- <text>确定</text>
- </view>
- </view>
- </view>
- </uni-popup>
- </view>
- </template>
- <script>
- export default {
- name: 'chooseServiceTeacher',
- props: {
- storeId: {
- type: String,
- default () {
- return ''
- }
- },
- date: {
- type: String,
- default () {
- return ''
- }
- }
- },
- data() {
- return {
- selectIndex:0,
- workPersonList: []
- }
- },
- methods: {
- submit(){
- this.$emit("getWorkPerson",this.workPersonList[this.selectIndex])
- this.closePopup()
- },
- closePopup() {
- this.$refs.chooseServiceTeacherPopup.close()
- },
- selectworkPerson(e){
- this.selectIndex = e
- },
- openPopup() {
- this.$refs.chooseServiceTeacherPopup.open()
- this.getServicePerson()
- },
- // 查询服务工作人员列表
- getServicePerson() {
- this.$api.getServicePerson({
- date: this.date,
- storeId: this.storeId,
- }).then((res) => {
- console.log(res)
- this.workPersonList = res.data.data;
- this.getImgUrlByOssId(res.data.data)
- })
- },
- // 获取图片
- getImgUrlByOssId(data) {
- for (let i = 0; i < data.length; i++) {
- if (data[i].facePhoto) {
- this.$api.getImage(data[i].facePhoto).then(res => {
- data[i].imgUrl = res.data.data[0].url.replace(/^http:/, "https:")
- this.$set(this.workPersonList, i, data[i])
- });
- }
- }
- },
- }
- }
- </script>
- <style scoped lang="scss">
- .chooseServiceTeacherView {
- width: 750rpx;
- height: 850rpx;
- background: #FFFFFF;
- border-radius: 24rpx 24rpx 0rpx 0rpx;
- }
- .chooseServiceTeacherTitle {
- font-size: 32rpx;
- font-weight: bold;
- color: #333333;
- line-height: 44rpx;
- margin-left: 34rpx;
- padding-top: 26rpx;
- }
- .scrollY {
- width: 686rpx;
- height: 604rpx;
- margin-left: 32rpx;
- margin-top: 32rpx;
- }
- .serviceTeacherView {
- position: relative;
- }
- .serviceTeacher {
- width: 678rpx;
- height: 92rpx;
- background: #FAFAFA;
- border-radius: 8rpx;
- border: 4rpx solid #FAFAFA;
- position: relative;
- }
- .teacherName {
- padding-right: 26rpx;
- font-size: 32rpx;
- font-weight: bold;
- color: #111111;
- margin-left: 24rpx;
- }
- .teacherName1 {
- font-size: 32rpx;
- font-weight: bold;
- color: #111111;
- }
- .teacherTag {
- padding: 6rpx 24rpx;
- background: #FFF6CE;
- border-radius: 8rpx;
- border: 2rpx solid #FFE05C;
- font-size: 20rpx;
- font-weight: 400;
- color: #333333;
- line-height: 32rpx;
- margin-left: 16rpx;
- }
- .teacherMsg {
- font-size: 24rpx;
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- color: #999999;
- margin-left: 8rpx;
- margin-top: 5rpx;
- }
- .teacherR {
- width: 400rpx;
- height: 180rpx;
- margin-top: 24rpx;
- margin-left: 24rpx;
- }
- .teacherMsg1 {
- font-size: 24rpx;
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- color: #999999;
- line-height: 40rpx;
- }
- .teacherImg {
- width: 180rpx;
- height: 180rpx;
- border-radius: 8rpx;
- margin-top: 22rpx;
- margin-left: 22rpx;
- }
- .serviceTeacher1 {
- width: 678rpx;
- height: 222rpx;
- background: #FAFAFA;
- border-radius: 16rpx;
- border: 4rpx solid #FAFAFA;
- margin-top: 24rpx;
- }
- .chooseServiceTeacherButton {
- width: 686rpx;
- height: 80rpx;
- margin-left: 32rpx;
- margin-top: 32rpx;
- }
- .chooseServiceTeacherButtonL {
- width: 332rpx;
- height: 80rpx;
- background: #F5F5F5;
- border-radius: 54rpx;
- text-align: center;
- line-height: 80rpx;
- font-size: 28rpx;
- font-weight: 400;
- color: #666666;
- }
- .chooseServiceTeacherButtonR {
- width: 332rpx;
- height: 80rpx;
- background: #FFE05C;
- border-radius: 54rpx;
- text-align: center;
- line-height: 80rpx;
- font-size: 28rpx;
- font-weight: 400;
- color: #333333;
- }
- .serobV {
- width: 32rpx;
- height: 32rpx;
- position: absolute;
- top: 0;
- right: 0;
- }
- .serobVicon {
- width: 32rpx;
- height: 32rpx;
- }
- .selectBack {
- background: rgba(255, 224, 92, 0.1);
- border: 4rpx solid #FFE05C;
- }
- </style>
|