detail.php 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  1. <div id="app" v-cloak>
  2. <el-card shadow="never" style="border:0;min-width: 1000px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  3. <div slot="header">
  4. <span>{{ custom_text }}管理/{{ custom_text }}详情</span>
  5. </div>
  6. <!-- 技师数据概况 -->
  7. <el-card style="margin-top: 10px" shadow="never">
  8. <div slot="header">
  9. 数据概况
  10. </div>
  11. <el-row :gutter="10" style="margin-top: 20px; text-align: center" v-loading="statisticsLoading">
  12. <el-col :span="6">
  13. <div>
  14. <strong>{{statistics.total_order}}</strong>
  15. </div>
  16. <div style="margin-top: 20px">
  17. <strong>累计接单</strong>
  18. </div>
  19. </el-col>
  20. <el-col :span="6">
  21. <div>
  22. <strong>{{statistics.total_commission}}</strong>
  23. </div>
  24. <div style="margin-top: 20px">
  25. <strong>累计收益</strong>
  26. </div>
  27. </el-col>
  28. <el-col :span="6">
  29. <div>
  30. <strong>{{statistics.month_order}}</strong>
  31. </div>
  32. <div style="margin-top: 20px">
  33. <strong>本月接单</strong>
  34. </div>
  35. </el-col>
  36. <el-col :span="6">
  37. <div>
  38. <strong>{{statistics.month_commission}}</strong>
  39. </div>
  40. <div style="margin-top: 20px">
  41. <strong>本月收益</strong>
  42. </div>
  43. </el-col>
  44. </el-row>
  45. </el-card>
  46. <!-- 技师详情 -->
  47. <el-card style="margin-top: 20px" shadow="never">
  48. <div slot="header">
  49. 基本信息
  50. </div>
  51. <el-form v-loading="loading">
  52. <el-row :gutter="20">
  53. <el-col :span="12">
  54. <!-- <el-form-item label="门店接单状态">-->
  55. <!-- <el-switch-->
  56. <!-- @change="onChangeStatus"-->
  57. <!-- v-model="data.store_status"-->
  58. <!-- :active-value="1"-->
  59. <!-- :inactive-value="0"-->
  60. <!-- >-->
  61. <!-- </el-switch>-->
  62. <!-- </el-form-item>-->
  63. <el-form-item label="姓名">
  64. {{data.name}}
  65. </el-form-item>
  66. <el-form-item label="手机号码">
  67. {{data.mobile}}
  68. </el-form-item>
  69. <el-form-item label="性别">
  70. <el-tag size="mini" :type="gender[data.gender].type">{{gender[data.gender].title}}</el-tag>
  71. </el-form-item>
  72. <el-form-item label="年龄">
  73. {{data.age}}
  74. </el-form-item>
  75. <el-form-item label="服务地址">
  76. {{data.address}}
  77. </el-form-item>
  78. <el-form-item :label="custom_text + '等级'">
  79. {{data.level ? data.level.name : '默认等级'}}
  80. </el-form-item>
  81. </el-col>
  82. <el-col :span="12">
  83. <el-form-item label="证件号码">
  84. {{data.idcard}}
  85. </el-form-item>
  86. <el-form-item label="证件图片">
  87. <el-image
  88. v-for="(img, index) in data.idcard_images"
  89. :key="index"
  90. style="width: 50px; height: 50px; margin-left: 5px"
  91. :src="img"
  92. :preview-src-list="data.idcard_images">
  93. </el-image>
  94. </el-form-item>
  95. <el-form-item label="资格证书">
  96. <el-image
  97. v-for="(img, index) in data.qualification_certificate"
  98. :key="index"
  99. style="width: 50px; height: 50px; margin-left: 5px"
  100. :src="img"
  101. :preview-src-list="data.qualification_certificate">
  102. </el-image>
  103. </el-form-item>
  104. <el-form-item label="绑定门店">
  105. {{data.settle.store.store_name}}
  106. </el-form-item>
  107. <el-form-item label="创建时间">
  108. {{data.created_at|dateTimeFormat('Y-m-d H:i:s')}}
  109. </el-form-item>
  110. </el-col>
  111. </el-row>
  112. </el-form>
  113. </el-card>
  114. <!-- 技师评价 -->
  115. <el-card style="margin-top: 20px" shadow="never">
  116. <div slot="header">
  117. <span>服务评价</span><span style="margin-left: 10px; font-size: 12px; color: #999">综合评分:{{data.service_rating}}</span>
  118. </div>
  119. <div v-loading="commentLoading">
  120. <el-row :gutter="20">
  121. <el-col :span="8" v-for="(item, index) in commentList" :key="index" style="padding-bottom: 20px">
  122. <el-card shadow="hover">
  123. <template #header>
  124. <div class="table-info-img-text">
  125. <el-image class="table-info-img" :src="item.orderDetail.pic_url">
  126. <div slot="error" class="image-slot">
  127. <com-image src="/resources/img/common/default-avatar.png"></com-image>
  128. </div>
  129. </el-image>
  130. <div class="table-info-text" style="width: 100%;">
  131. <div class="view-text" style="color:#999;">{{item.orderDetail.goods_name}}
  132. <span style="float: right">×{{item.orderDetail.num}}</span>
  133. </div>
  134. <div style="font-size: 12px;color:#999;">{{item.orderDetail.goods_attr_name ? item.orderDetail.goods_attr_name : '--'}}</div>
  135. </div>
  136. </div>
  137. </template>
  138. <template>
  139. <el-row>
  140. <el-col :span="12">
  141. <span style="float: left">
  142. {{item.user.nickname ? item.user.nickname : item.user.mobile}}
  143. </span>
  144. <span style="float: left">
  145. <el-rate
  146. :value="item.comment.score"
  147. disabled
  148. text-color="#ff9900">
  149. </el-rate>
  150. </span>
  151. </el-col>
  152. <el-col :span="12">
  153. <div style="color: #999; text-align: right">{{item.created_at}}</div>
  154. </el-col>
  155. </el-row>
  156. <el-row>
  157. 专业性{{item.major_score}} 服务态度{{item.attitude_score}} 时效性{{item.aging_score}}
  158. </el-row>
  159. <div style="color: #999; margin-top: 10px">
  160. <com-ellipsis :line="1" :text="item.comment.content ? item.comment.content : '无评价内容'"></com-ellipsis>
  161. </div>
  162. <div style="margin-top: 10px; height: 20px; width: 100%; overflow: hidden;">
  163. <el-tag style="margin-right: 10px" size="mini" type="info" v-for="(tag, tIndex) in item.tags" :key="tIndex">{{tag}}</el-tag>
  164. </div>
  165. </template>
  166. </el-card>
  167. </el-col>
  168. </el-row>
  169. <div style="text-align: center">
  170. <el-button size="small" @click="getCommentList" type="primary" icon="el-icon-arrow-down"
  171. :loading="commentLoading" :disabled="commentLoading || commentBtnDisabled">查看更多</el-button>
  172. </div>
  173. </div>
  174. </el-card>
  175. <div style="padding: 10px"></div>
  176. </el-card>
  177. </div>
  178. <script>
  179. const app = new Vue({
  180. el: '#app',
  181. data: {
  182. list: [],
  183. loading: false,
  184. btnLoading: false,
  185. activeName: '-1',
  186. pagination: null,
  187. page_size: 10,
  188. currentItem: null,
  189. statisticsLoading: false,
  190. commentLoading: false,
  191. commentBtnDisabled: false,
  192. id: '',
  193. data: {
  194. service_rating: 5.0
  195. },
  196. gender: [
  197. {
  198. title: '保密',
  199. type: 'primary'
  200. },
  201. {
  202. title: '男',
  203. type: 'success'
  204. },
  205. {
  206. title: '女',
  207. type: 'danger'
  208. }
  209. ],
  210. statistics: {
  211. total_order: 0,
  212. total_commission: 0,
  213. month_order: 0,
  214. month_commission: 0,
  215. },
  216. commentList: [],
  217. page: 0,
  218. custom_text: ''
  219. },
  220. computed: {
  221. },
  222. mounted() {
  223. this.id = getQuery('id');
  224. this.loadData();
  225. this.getStatistics()
  226. this.getCommentList()
  227. },
  228. methods: {
  229. getStatistics() {
  230. this.statisticsLoading = true
  231. request({
  232. params: {
  233. r: 'reservation-service/user/statistics',
  234. id: this.id
  235. },
  236. method: 'get',
  237. }).then(e => {
  238. this.statisticsLoading = false;
  239. if (e.data.code == 0) {
  240. this.statistics = e.data.data
  241. } else {
  242. this.$message.error(e.data.msg);
  243. }
  244. }).catch(e => {
  245. this.statisticsLoading = false;
  246. });
  247. },
  248. loadData() {
  249. this.loading = true;
  250. let params = {
  251. r: 'reservation-service/user/detail',
  252. id: this.id
  253. };
  254. params = Object.assign(params, this.searchInfo);
  255. request({
  256. params: params,
  257. method: 'get',
  258. }).then(e => {
  259. this.loading = false;
  260. if (e.data.code == 0) {
  261. this.data = e.data.data
  262. this.custom_text = this.data.custom_text
  263. } else {
  264. this.$message.error(e.data.msg);
  265. }
  266. }).catch(e => {
  267. this.loading = false;
  268. });
  269. },
  270. getCommentList() {
  271. this.commentLoading = true
  272. this.page += 1;
  273. request({
  274. params: {
  275. r: 'reservation-service/reserve-order-comment/index',
  276. id: this.id,
  277. limit: 12,
  278. page: this.page
  279. },
  280. method: 'get',
  281. }).then(e => {
  282. this.commentLoading = false;
  283. if (e.data.code == 0) {
  284. this.commentList = this.commentList.concat(e.data.data.list);
  285. if (e.data.data.list.length < 12) this.commentBtnDisabled = true;
  286. this.pagination = e.data.data.pagination;
  287. this.page_size = e.data.data.page_size;
  288. this.data.service_rating = e.data.data.service_rating
  289. } else {
  290. this.$message.error(e.data.msg);
  291. }
  292. }).catch(e => {
  293. this.commentLoading = false;
  294. });
  295. },
  296. pageChange(page) {
  297. this.search.page = page;
  298. this.loadData();
  299. },
  300. onChangeStatus() {
  301. this.btnLoading = false;
  302. request({
  303. params: {
  304. r: 'reservation-service/user/set-status'
  305. },
  306. method: 'post',
  307. data: {
  308. id: this.id,
  309. }
  310. }).then(e => {
  311. this.btnLoading = false;
  312. if (e.data.code == 0) {
  313. this.$message.success(e.data.msg);
  314. } else {
  315. this.$message.error(e.data.msg);
  316. }
  317. }).catch(e => {
  318. this.btnLoading = false;
  319. });
  320. }
  321. }
  322. });
  323. </script>
  324. <style>
  325. .el-tabs__header {
  326. font-size: 16px;
  327. }
  328. .table-body {
  329. padding: 20px;
  330. background-color: #fff;
  331. }
  332. .table-body .el-button {
  333. padding: 0 !important;
  334. border: 0;
  335. margin: 0 5px;
  336. }
  337. .input-item {
  338. width: 250px;
  339. margin: 0 0 20px;
  340. display: inline-block;
  341. }
  342. /*.input-item .el-input__inner {*/
  343. /* border-right: 0;*/
  344. /*}*/
  345. .input-item .el-input__inner:hover {
  346. border: 1px solid #dcdfe6;
  347. /*border-right: 0;*/
  348. outline: 0;
  349. }
  350. .input-item .el-input__inner:focus {
  351. border: 1px solid #dcdfe6;
  352. /*border-right: 0;*/
  353. outline: 0;
  354. }
  355. .input-item .el-input-group__append {
  356. background-color: #fff;
  357. border-left: 0;
  358. width: 10%;
  359. padding: 0;
  360. }
  361. .input-item .el-input-group__append .el-button {
  362. padding: 0;
  363. }
  364. .input-item .el-input-group__append .el-button {
  365. margin: 0;
  366. }
  367. .batch {
  368. margin: 0 0 20px;
  369. display: inline-block;
  370. }
  371. .batch .el-button {
  372. padding: 9px 15px !important;
  373. }
  374. .el-table th>.cell{
  375. color: #333;
  376. font-weight: bold;
  377. font-size: 14px;
  378. }
  379. .el-table__footer-wrapper, .el-table__header-wrapper{
  380. border-bottom: 1.4px solid #D6D6D6;
  381. }
  382. .el-table th>.cell {
  383. color: #333;
  384. font-weight: bold;
  385. font-size: 14px;
  386. }
  387. .table1 .el-table__footer-wrapper,
  388. .table1 .el-table__header-wrapper {
  389. border-bottom: 1.4px solid #D6D6D6;
  390. }
  391. .user_img{
  392. position: relative;
  393. margin-right: 8px;
  394. /* height: 50px;
  395. width: 50px; */
  396. }
  397. .default-avatar{
  398. width: 50px;
  399. height: 50px;
  400. border-radius: 50%;
  401. margin-right: 8px;
  402. }
  403. .uer-nickname {
  404. flex: 1;
  405. }
  406. </style>