| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422 |
- <div id="app" v-cloak>
- <el-card shadow="never" style="border:0;min-width: 1000px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
- <div slot="header">
- <span>{{ custom_text }}管理/{{ custom_text }}详情</span>
- </div>
- <!-- 技师数据概况 -->
- <el-card style="margin-top: 10px" shadow="never">
- <div slot="header">
- 数据概况
- </div>
- <el-row :gutter="10" style="margin-top: 20px; text-align: center" v-loading="statisticsLoading">
- <el-col :span="6">
- <div>
- <strong>{{statistics.total_order}}</strong>
- </div>
- <div style="margin-top: 20px">
- <strong>累计接单</strong>
- </div>
- </el-col>
- <el-col :span="6">
- <div>
- <strong>{{statistics.total_commission}}</strong>
- </div>
- <div style="margin-top: 20px">
- <strong>累计收益</strong>
- </div>
- </el-col>
- <el-col :span="6">
- <div>
- <strong>{{statistics.month_order}}</strong>
- </div>
- <div style="margin-top: 20px">
- <strong>本月接单</strong>
- </div>
- </el-col>
- <el-col :span="6">
- <div>
- <strong>{{statistics.month_commission}}</strong>
- </div>
- <div style="margin-top: 20px">
- <strong>本月收益</strong>
- </div>
- </el-col>
- </el-row>
- </el-card>
- <!-- 技师详情 -->
- <el-card style="margin-top: 20px" shadow="never">
- <div slot="header">
- 基本信息
- </div>
- <el-form v-loading="loading">
- <el-row :gutter="20">
- <el-col :span="12">
- <!-- <el-form-item label="门店接单状态">-->
- <!-- <el-switch-->
- <!-- @change="onChangeStatus"-->
- <!-- v-model="data.store_status"-->
- <!-- :active-value="1"-->
- <!-- :inactive-value="0"-->
- <!-- >-->
- <!-- </el-switch>-->
- <!-- </el-form-item>-->
- <el-form-item label="姓名">
- {{data.name}}
- </el-form-item>
- <el-form-item label="手机号码">
- {{data.mobile}}
- </el-form-item>
- <el-form-item label="性别">
- <el-tag size="mini" :type="gender[data.gender].type">{{gender[data.gender].title}}</el-tag>
- </el-form-item>
- <el-form-item label="年龄">
- {{data.age}}
- </el-form-item>
- <el-form-item label="服务地址">
- {{data.address}}
- </el-form-item>
- <el-form-item :label="custom_text + '等级'">
- {{data.level ? data.level.name : '默认等级'}}
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="证件号码">
- {{data.idcard}}
- </el-form-item>
- <el-form-item label="证件图片">
- <el-image
- v-for="(img, index) in data.idcard_images"
- :key="index"
- style="width: 50px; height: 50px; margin-left: 5px"
- :src="img"
- :preview-src-list="data.idcard_images">
- </el-image>
- </el-form-item>
- <el-form-item label="资格证书">
- <el-image
- v-for="(img, index) in data.qualification_certificate"
- :key="index"
- style="width: 50px; height: 50px; margin-left: 5px"
- :src="img"
- :preview-src-list="data.qualification_certificate">
- </el-image>
- </el-form-item>
- <el-form-item label="绑定门店">
- {{data.settle.store.store_name}}
- </el-form-item>
- <el-form-item label="创建时间">
- {{data.created_at|dateTimeFormat('Y-m-d H:i:s')}}
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- </el-card>
- <!-- 技师评价 -->
- <el-card style="margin-top: 20px" shadow="never">
- <div slot="header">
- <span>服务评价</span><span style="margin-left: 10px; font-size: 12px; color: #999">综合评分:{{data.service_rating}}</span>
- </div>
- <div v-loading="commentLoading">
- <el-row :gutter="20">
- <el-col :span="8" v-for="(item, index) in commentList" :key="index" style="padding-bottom: 20px">
- <el-card shadow="hover">
- <template #header>
- <div class="table-info-img-text">
- <el-image class="table-info-img" :src="item.orderDetail.pic_url">
- <div slot="error" class="image-slot">
- <com-image src="/resources/img/common/default-avatar.png"></com-image>
- </div>
- </el-image>
- <div class="table-info-text" style="width: 100%;">
- <div class="view-text" style="color:#999;">{{item.orderDetail.goods_name}}
- <span style="float: right">×{{item.orderDetail.num}}</span>
- </div>
- <div style="font-size: 12px;color:#999;">{{item.orderDetail.goods_attr_name ? item.orderDetail.goods_attr_name : '--'}}</div>
- </div>
- </div>
- </template>
- <template>
- <el-row>
- <el-col :span="12">
- <span style="float: left">
- {{item.user.nickname ? item.user.nickname : item.user.mobile}}
- </span>
- <span style="float: left">
- <el-rate
- :value="item.comment.score"
- disabled
- text-color="#ff9900">
- </el-rate>
- </span>
- </el-col>
- <el-col :span="12">
- <div style="color: #999; text-align: right">{{item.created_at}}</div>
- </el-col>
- </el-row>
- <el-row>
- 专业性{{item.major_score}} 服务态度{{item.attitude_score}} 时效性{{item.aging_score}}
- </el-row>
- <div style="color: #999; margin-top: 10px">
- <com-ellipsis :line="1" :text="item.comment.content ? item.comment.content : '无评价内容'"></com-ellipsis>
- </div>
- <div style="margin-top: 10px; height: 20px; width: 100%; overflow: hidden;">
- <el-tag style="margin-right: 10px" size="mini" type="info" v-for="(tag, tIndex) in item.tags" :key="tIndex">{{tag}}</el-tag>
- </div>
- </template>
- </el-card>
- </el-col>
- </el-row>
- <div style="text-align: center">
- <el-button size="small" @click="getCommentList" type="primary" icon="el-icon-arrow-down"
- :loading="commentLoading" :disabled="commentLoading || commentBtnDisabled">查看更多</el-button>
- </div>
- </div>
- </el-card>
- <div style="padding: 10px"></div>
- </el-card>
- </div>
- <script>
- const app = new Vue({
- el: '#app',
- data: {
- list: [],
- loading: false,
- btnLoading: false,
- activeName: '-1',
- pagination: null,
- page_size: 10,
- currentItem: null,
- statisticsLoading: false,
- commentLoading: false,
- commentBtnDisabled: false,
- id: '',
- data: {
- service_rating: 5.0
- },
- gender: [
- {
- title: '保密',
- type: 'primary'
- },
- {
- title: '男',
- type: 'success'
- },
- {
- title: '女',
- type: 'danger'
- }
- ],
- statistics: {
- total_order: 0,
- total_commission: 0,
- month_order: 0,
- month_commission: 0,
- },
- commentList: [],
- page: 0,
- custom_text: ''
- },
- computed: {
- },
- mounted() {
- this.id = getQuery('id');
- this.loadData();
- this.getStatistics()
- this.getCommentList()
- },
- methods: {
- getStatistics() {
- this.statisticsLoading = true
- request({
- params: {
- r: 'reservation-service/user/statistics',
- id: this.id
- },
- method: 'get',
- }).then(e => {
- this.statisticsLoading = false;
- if (e.data.code == 0) {
- this.statistics = e.data.data
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- this.statisticsLoading = false;
- });
- },
- loadData() {
- this.loading = true;
- let params = {
- r: 'reservation-service/user/detail',
- id: this.id
- };
- params = Object.assign(params, this.searchInfo);
- request({
- params: params,
- method: 'get',
- }).then(e => {
- this.loading = false;
- if (e.data.code == 0) {
- this.data = e.data.data
- this.custom_text = this.data.custom_text
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- this.loading = false;
- });
- },
- getCommentList() {
- this.commentLoading = true
- this.page += 1;
- request({
- params: {
- r: 'reservation-service/reserve-order-comment/index',
- id: this.id,
- limit: 12,
- page: this.page
- },
- method: 'get',
- }).then(e => {
- this.commentLoading = false;
- if (e.data.code == 0) {
- this.commentList = this.commentList.concat(e.data.data.list);
- if (e.data.data.list.length < 12) this.commentBtnDisabled = true;
- this.pagination = e.data.data.pagination;
- this.page_size = e.data.data.page_size;
- this.data.service_rating = e.data.data.service_rating
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- this.commentLoading = false;
- });
- },
- pageChange(page) {
- this.search.page = page;
- this.loadData();
- },
- onChangeStatus() {
- this.btnLoading = false;
- request({
- params: {
- r: 'reservation-service/user/set-status'
- },
- method: 'post',
- data: {
- id: this.id,
- }
- }).then(e => {
- this.btnLoading = false;
- if (e.data.code == 0) {
- this.$message.success(e.data.msg);
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- this.btnLoading = false;
- });
- }
- }
- });
- </script>
- <style>
- .el-tabs__header {
- font-size: 16px;
- }
- .table-body {
- padding: 20px;
- background-color: #fff;
- }
- .table-body .el-button {
- padding: 0 !important;
- border: 0;
- margin: 0 5px;
- }
- .input-item {
- width: 250px;
- margin: 0 0 20px;
- display: inline-block;
- }
- /*.input-item .el-input__inner {*/
- /* border-right: 0;*/
- /*}*/
- .input-item .el-input__inner:hover {
- border: 1px solid #dcdfe6;
- /*border-right: 0;*/
- outline: 0;
- }
- .input-item .el-input__inner:focus {
- border: 1px solid #dcdfe6;
- /*border-right: 0;*/
- outline: 0;
- }
- .input-item .el-input-group__append {
- background-color: #fff;
- border-left: 0;
- width: 10%;
- padding: 0;
- }
- .input-item .el-input-group__append .el-button {
- padding: 0;
- }
- .input-item .el-input-group__append .el-button {
- margin: 0;
- }
- .batch {
- margin: 0 0 20px;
- display: inline-block;
- }
- .batch .el-button {
- padding: 9px 15px !important;
- }
- .el-table th>.cell{
- color: #333;
- font-weight: bold;
- font-size: 14px;
- }
- .el-table__footer-wrapper, .el-table__header-wrapper{
- border-bottom: 1.4px solid #D6D6D6;
- }
- .el-table th>.cell {
- color: #333;
- font-weight: bold;
- font-size: 14px;
- }
- .table1 .el-table__footer-wrapper,
- .table1 .el-table__header-wrapper {
- border-bottom: 1.4px solid #D6D6D6;
- }
- .user_img{
- position: relative;
- margin-right: 8px;
- /* height: 50px;
- width: 50px; */
- }
- .default-avatar{
- width: 50px;
- height: 50px;
- border-radius: 50%;
- margin-right: 8px;
- }
- .uer-nickname {
- flex: 1;
- }
- </style>
|