driverSee.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466
  1. <template>
  2. <view class="content">
  3. <view class="item3 flex align-center flex-space-between">
  4. <view class="flex align-center flex-space-between row1">
  5. <view class="flex align-center">
  6. <u--image :showLoading="true" :src="dataObj.avatarUrl" width="100rpx" height="100rpx" @click=""
  7. shape='circle'>
  8. </u--image>
  9. <view class="name">{{dataObj.driverName}}</view>
  10. </view>
  11. <view class="right flex s-row align-center phone">
  12. <view class="bgc flex flex-space-between">
  13. <u-icon class="phone" name="phone-fill" color="#2772FB" size="20" @click="toPhone"></u-icon>
  14. <view class="hz-name">联系司机</view>
  15. </view>
  16. </view>
  17. </view>
  18. </view>
  19. <!-- <view class="row2 flex">
  20. <view class="flex item">
  21. <view class="pf-name">评分</view>
  22. <view class="pf-number">4.98</view>
  23. </view>
  24. <view class="flex item">
  25. <view class="pf-name">发运次数</view>
  26. <view class="pf-number">4.98</view>
  27. </view>
  28. <view class="flex item">
  29. <view class="pf-name">评价</view>
  30. <view class="pf-number">4.98</view>
  31. </view>
  32. </view> -->
  33. <view class="row3 flex">
  34. <view :class="index==1?'row3-active':''" @click="clickTap(1)">司机信息</view>
  35. <view :class="index==2?'row3-active':''" @click="clickTap(2)">评价</view>
  36. <!-- <u-tabs :list="list1" @click="click"></u-tabs> -->
  37. </view>
  38. <view class="carInfo" v-if="index==1">
  39. <view class="flex flex-center row4">
  40. <view class="title">
  41. <text class="item" :class="tabIndex==1?'item-active':1" @click="clickTab(1)">车辆信息</text>
  42. <text class="item" :class="tabIndex==2?'item-active':2" @click="clickTab(2)">发运记录</text>
  43. </view>
  44. </view>
  45. </view>
  46. <view v-show="index == 2" class="pl-style">
  47. <view class="pf flex-space-between flex">
  48. <view class="left flex align-center" style="margin-right: 20rpx;">
  49. <view class="pf-number1">
  50. 4.8
  51. </view>
  52. <view>
  53. <!-- <view>
  54. <start count="5" v-model="zhpf" size="35" activeColor="#ffaa00" :size="18" :allowHalf='true'
  55. :readonly='true'>
  56. </start>
  57. </view> -->
  58. <view class="gray fontsize-24">累计发运150次</view>
  59. </view>
  60. </view>
  61. <view class="right">
  62. <view>98%</view>
  63. <view class="gray fontsize-24">好评率</view>
  64. </view>
  65. </view>
  66. <mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
  67. class="mescroll">
  68. <view class="flex flex-space-between">
  69. <view :class="btnData == '' ? 'btn-active':'btn'" @click="btnChange('')">全部({{list.length}})</view>
  70. <!-- <view :class="btnData == 2 ? 'btn-active':'btn'" @click="btnChange(2)">最新(1)</view> -->
  71. <view :class="btnData == 1 ? 'btn-active':'btn'" @click="btnChange(1)">好评({{list3.length}})</view>
  72. <view :class="btnData == 2 ? 'btn-active':'btn'" @click="btnChange(2)">差评({{list4.length}})</view>
  73. </view>
  74. <view class="evaluate_css" v-for="(item,index) in list">
  75. <view class="flex">
  76. <view class="row1 flex">
  77. <u--image :src="item.ownerPortrait?item.ownerPortrait:'../../static/images/mine/tx.png'"
  78. width='70rpx' height='70rpx' shape="circle">
  79. </u--image>
  80. <view class="right">
  81. <view class="evaluate_name">{{item.ownerName}}</view>
  82. <view class="evaluate_date m-top10">
  83. {{item.createDate?item.createDate.split(' ')[0]:''}}
  84. </view>
  85. <view class="flex m-top10">
  86. <view class="branch_css ">{{item.count}}</view>
  87. <view class="">
  88. <start count="5" v-model="item.count" size="35" activeColor="#ffaa00" :size="18"
  89. :allowHalf='true' :readonly='true'>
  90. </start>
  91. </view>
  92. </view>
  93. <view class="">
  94. {{item.driverContent}}
  95. </view>
  96. <view>
  97. <u--image v-for="(item,index) in item.imgList" :src="item" width='170rpx'
  98. height='170rpx' class="img-style">
  99. </u--image>
  100. </view>
  101. </view>
  102. </view>
  103. </view>
  104. </view>
  105. </mescroll-body>
  106. </view>
  107. <view class="row5">
  108. <view class="">
  109. <view v-if="tabIndex==1&&index==1" v-for="(items,index) in dataObj.driverCarInfoList" :key="index">
  110. <view class="">
  111. <view>{{items.carNumber}}</view>
  112. <view class="flex align-center">{{items.carType}} | 车长{{items.carLong/1000}}米 | 载重{{items.carApprovedWeight/1000}}吨</view>
  113. </view>
  114. </view>
  115. <view class="carInfo" v-if="tabIndex==2&index==1">
  116. <view>
  117. 累计发运150次,好评率90%
  118. </view>
  119. </view>
  120. </view>
  121. </view>
  122. <u-toast ref="uToast"></u-toast>
  123. <u-picker :show="show" :columns="columns" :closeOnClickOverlay='true' @cancel='cancel' @close='cancel'
  124. @confirm='confirmBtn'></u-picker>
  125. </view>
  126. </template>
  127. <script>
  128. var that
  129. import {
  130. mapState
  131. } from 'vuex';
  132. import start from '../../common/components/uni-rate.vue'
  133. import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
  134. export default {
  135. mixins: [MescrollMixin], // 使用mixin
  136. components: {
  137. start
  138. },
  139. data() {
  140. return {
  141. btnData: '',
  142. tabIndex: 1,
  143. index: 1,
  144. show: false,
  145. objectInfo: {},
  146. columns: [
  147. ['反馈', '举报']
  148. ],
  149. list: [],
  150. list1: [{
  151. name: '司机',
  152. }, {
  153. name: '评价',
  154. }],
  155. list3: [],
  156. list4: [],
  157. dataObj: {},
  158. commonId: "",
  159. };
  160. },
  161. onNavigationBarButtonTap(e) {
  162. console.log("success")
  163. this.show = true
  164. },
  165. onLoad(options) {
  166. this.commonId = options.commonId
  167. console.log(this.dataObj)
  168. that = this
  169. this.getList()
  170. },
  171. computed: {
  172. ...mapState(['hasLogin', 'userInfo', 'firstAuthentication'])
  173. },
  174. methods: {
  175. getList() {
  176. that.$request.baseRequest('get', '/driverInfo/getDriver', {
  177. commonId: this.commonId
  178. }).then(res => {
  179. this.dataObj = res.data
  180. })
  181. },
  182. confirmBtn(e) {
  183. console.log(e.value)
  184. if (e.value == '反馈') {
  185. uni.$u.route('/pages/order/fk', {
  186. val: JSON.stringify(this.dataObj)
  187. });
  188. } else {
  189. uni.$u.route('/pages/order/jb', {
  190. val: JSON.stringify(this.dataObj)
  191. });
  192. }
  193. this.show = false
  194. },
  195. cancel() {
  196. this.show = false
  197. },
  198. clickTap(index) {
  199. this.index = index
  200. },
  201. clickTab(index) {
  202. this.tabIndex = index
  203. },
  204. btnChange(num) {
  205. this.btnData = num
  206. this.upCallback({
  207. size:10,
  208. num:1,
  209. })
  210. },
  211. upCallback(page) {
  212. that.$request.baseRequest('get', '/evaluateInfo/selectEvaluateInfo', {
  213. evaluatoredId: this.dataObj.id,
  214. flag: 2,
  215. pageSize: page.size,
  216. // 1好2差
  217. haoType: 1,
  218. searchType:1,
  219. currentPage: page.num
  220. }).then(res => {
  221. if (page.num == 1) that.list3 = [];
  222. that.list3 = that.list3.concat(res.data.records); //追加新数据
  223. })
  224. that.$request.baseRequest('get', '/evaluateInfo/selectEvaluateInfo', {
  225. evaluatoredId: this.dataObj.id,
  226. flag: 2,
  227. pageSize: page.size,
  228. haoType: 2,
  229. searchType:1,
  230. currentPage: page.num
  231. }).then(res => {
  232. if (page.num == 1) that.list4 = [];
  233. that.list4 = that.list4.concat(res.data.records); //追加新数据
  234. })
  235. that.$request.baseRequest('get', '/evaluateInfo/selectEvaluateInfo', {
  236. evaluatoredId: this.dataObj.id,
  237. flag: 2,
  238. searchType:1,
  239. pageSize: page.size,
  240. currentPage: page.num
  241. }).then(res => {
  242. if (page.num == 1) that.list = [];
  243. that.list = that.list.concat(res.data.records); //追加新数据
  244. for (let i = 0; i < that.list.length; i++) {
  245. if (that.list[i].ownerUrl) {
  246. that.list[i].imgList = that.list[i].ownerUrl.split(',')
  247. }
  248. that.list[i].count = (Number(that.list[i].ownerCredit) + Number(that.list[i]
  249. .tranEfficiency) + Number(that.list[i].freightPayment) + Number(that.list[i]
  250. .serviceQuality) + Number(that.list[i].comprehensiveSatisfaction)) / 15 * 5
  251. }
  252. that.mescroll.endBySize(res.data.records.length, res.data.total);
  253. uni.hideLoading()
  254. })
  255. .catch(res => {
  256. uni.$u.toast(res.message);
  257. });
  258. that.$request.baseRequest('get', '/orderInfo/selectHaoPing', {
  259. commonId: this.userInfo.id,
  260. haoType: ''
  261. }).then(res => {
  262. })
  263. .catch(res => {
  264. uni.$u.toast(res.message);
  265. });
  266. },
  267. // getList() {
  268. // debugger
  269. // this.$request.baseRequest('get', '/orderInfo/selectHaoPing', {
  270. // commonId: this.userInfo.id,
  271. // haoType:''
  272. // }).then(res => {
  273. // if (res.code == 200) {
  274. // this.dataObj = res.data
  275. // } else {
  276. // this.$refs.uToast.show({
  277. // type: 'error',
  278. // message: res.message,
  279. // })
  280. // }
  281. // })
  282. // .catch(res => {
  283. // uni.$u.toast(res.message);
  284. // });
  285. // },
  286. },
  287. }
  288. </script>
  289. <style lang="scss">
  290. .content {
  291. height: 100vh;
  292. }
  293. .item3,
  294. .row3 {
  295. background: white;
  296. }
  297. .name {
  298. font-size: 46rpx;
  299. font-weight: 500;
  300. margin-left: 20rpx;
  301. }
  302. .row1 {
  303. width: 100%;
  304. padding: 30rpx;
  305. }
  306. .phone {
  307. .bgc {
  308. background: #E5F0FE;
  309. display: flex;
  310. align-items: center;
  311. justify-content: center;
  312. border-radius: 50rpx;
  313. padding: 10rpx 20rpx;
  314. align-items: center;
  315. }
  316. .hz-name {
  317. font-size: 26rpx;
  318. color: #2772FB;
  319. }
  320. }
  321. .row2 {
  322. padding: 0 20rpx;
  323. background: white;
  324. .item {
  325. margin-right: 20rpx;
  326. }
  327. .pf-name {
  328. color: #999999;
  329. margin-right: 10rpx;
  330. }
  331. .pf-number {
  332. color: #2772FB;
  333. }
  334. }
  335. .row3 {
  336. justify-content: space-around;
  337. padding: 40rpx 0;
  338. }
  339. .row3-active {
  340. font-weight: 700;
  341. position: relative;
  342. }
  343. .row3-active:before {
  344. font-weight: 700;
  345. content: '';
  346. position: absolute;
  347. bottom: -10rpx;
  348. width: 40rpx;
  349. height: 6rpx;
  350. background: #2772FB;
  351. left: 0;
  352. right: 0;
  353. margin: auto;
  354. }
  355. .row4 {
  356. .title {
  357. background: #EFF1F7;
  358. border-radius: 20rpx;
  359. margin-top: 20rpx;
  360. .item {
  361. display: inline-block;
  362. color: #AFB3BF;
  363. border-radius: 20rpx;
  364. padding: 4rpx 60rpx;
  365. }
  366. .item-active {
  367. background: white;
  368. color: #363636;
  369. }
  370. }
  371. }
  372. .row5 {
  373. padding: 20rpx;
  374. }
  375. .evaluate_css {
  376. margin-top: 30rpx;
  377. display: flex;
  378. width: 100%;
  379. padding-bottom: 40rpx;
  380. border-bottom: 1px solid #E6E6E6;
  381. .evaluate_name {}
  382. .branch_css {
  383. // margin: 0;
  384. margin-right: 20rpx;
  385. }
  386. .evaluate_date {}
  387. .row1 {
  388. .right {
  389. display: flex;
  390. flex-direction: column;
  391. margin-left: 40rpx;
  392. }
  393. }
  394. }
  395. .btn-active {
  396. background-color: #2772FB;
  397. color: white;
  398. border-radius: 50rpx;
  399. display: flex;
  400. align-items: center;
  401. justify-content: center;
  402. padding: 10rpx 20rpx;
  403. }
  404. .btn {
  405. background: #F8F9FB;
  406. color: #363636;
  407. border-radius: 50rpx;
  408. display: flex;
  409. align-items: center;
  410. justify-content: center;
  411. padding: 10rpx 20rpx;
  412. }
  413. .pl-style {
  414. padding: 40rpx;
  415. background: white;
  416. }
  417. .img-style {
  418. display: inline-block;
  419. margin-right: 20rpx;
  420. }
  421. .pf-number1 {
  422. color: #363636;
  423. font-size: 60rpx;
  424. margin-right: 30rpx;
  425. }
  426. .pf {
  427. margin-bottom: 20rpx;
  428. }
  429. </style>