cargoOwnerSee.vue 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  1. <template>
  2. <view class="center">
  3. <view class="center_top">
  4. <view class="flex">
  5. <u--image
  6. :src="objectInfo.cargoOwnerPortrait?objectInfo.cargoOwnerPortrait:'../../static/images/mine/tx.png'"
  7. width='170rpx' height='170rpx' shape="circle">
  8. </u--image>
  9. <view class="name">{{objectInfo.cargoOwnerName}}</view>
  10. <image src="../../static/qy@2x.png" mode="widthFix" class="title_css" v-show="objectInfo.cargoOwner">
  11. </image>
  12. <view class="feedback_css"></view>
  13. </view>
  14. </view>
  15. <view class="pf-row flex">
  16. <view class="flex">
  17. <view class="text">评分</view>
  18. <view class="number">{{dataObj.zong}}</view>
  19. </view>
  20. <view class="flex">
  21. <view class="text">发运次数</view>
  22. <view class="number">{{dataObj.countFa}}</view>
  23. </view>
  24. <!-- <view class="flex">
  25. <view class="text">好评率</view>
  26. <view class="number">{{dataObj.haoPingLv}}</view>
  27. </view> -->
  28. <view class="flex">
  29. <view class="text">评价</view>
  30. <view class="number">{{totalPL}}</view>
  31. </view>
  32. </view>
  33. <u-line></u-line>
  34. <view class="flex">
  35. <view class="switchbtn" @click="switchsubmit(1)" :class="indexBtn == 1 ? 'switchbtn1':''">货主信息</view>
  36. <view class="switchbtn" @click="switchsubmit(2)" :class="indexBtn == 2 ? 'switchbtn1':''">评价</view>
  37. </view>
  38. <!-- 货主信息 -->
  39. <view v-if="indexBtn == 1" class="enterprise">
  40. <view>
  41. <view class="enterprise_title" v-if="objectInfo.cargoOwner">所属企业</view>
  42. <view class="enterprise_title" v-if="!objectInfo.cargoOwner">个人货主,暂未代理企业</view>
  43. <view class="enterprise_name" v-if="objectInfo.cargoOwner">{{objectInfo.cargoOwner}}</view>
  44. </view>
  45. </view>
  46. <!-- 评价信息 -->
  47. <view v-if="indexBtn == 2" class="pl-style">
  48. <view class="pf flex-space-between flex">
  49. <view class="left flex align-center" style="margin-right: 20rpx;">
  50. <view class="pf-number">
  51. {{dataObj.zong}}
  52. </view>
  53. <view>
  54. <view>
  55. <start count="5" v-model="dataObj.zong" size="35" activeColor="#ffaa00" :size="18" :allowHalf='true'
  56. :readonly='true'>
  57. </start>
  58. </view>
  59. <view class="gray fontsize-24">累计发运{{dataObj.countFa}}次</view>
  60. </view>
  61. </view>
  62. <view class="right">
  63. <view>{{dataObj.haoPingLv}}%</view>
  64. <view class="gray fontsize-24">好评率</view>
  65. </view>
  66. </view>
  67. <mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
  68. class="mescroll">
  69. <view class="flex flex-space-between">
  70. <view :class="btnData == 1 ? 'btn-active':'btn'" @click="btnChange(1)">全部({{totalPL}})</view>
  71. <view :class="btnData == 2 ? 'btn-active':'btn'" @click="btnChange(2)">最新</view>
  72. <view :class="btnData == 3 ? 'btn-active':'btn'" @click="btnChange(3)">好评({{dataObj.haoPing}})</view>
  73. <view :class="btnData == 4 ? 'btn-active':'btn'" @click="btnChange(4)">差评({{dataObj.chaPing}})</view>
  74. </view>
  75. <view class="evaluate_css" v-for="(item,index) in list">
  76. <view class="flex">
  77. <view class="row1 flex">
  78. <u--image
  79. :src="objectInfo.cargoOwnerPortrait?objectInfo.cargoOwnerPortrait:'../../static/images/mine/tx.png'"
  80. width='70rpx' height='70rpx' shape="circle">
  81. </u--image>
  82. <view class="right">
  83. <view class="evaluate_name">{{item.driverName}}</view>
  84. <view class="evaluate_date m-top10">{{objectInfo.createDate.split(' ')[0]}}</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'>
  99. </u--image>
  100. </view>
  101. </view>
  102. </view>
  103. </view>
  104. </view>
  105. </mescroll-body>
  106. </view>
  107. <u-picker :show="show" :columns="columns" :closeOnClickOverlay='true' @close='selectTypeClose'
  108. @cancel='selectTypeClose' @confirm='confirmBtn'></u-picker>
  109. <u-toast ref="uToast"></u-toast>
  110. </view>
  111. </template>
  112. <script>
  113. var that
  114. import start from '../../common/components/uni-rate.vue'
  115. import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
  116. import {
  117. mapState
  118. } from 'vuex';
  119. export default {
  120. mixins: [MescrollMixin], // 使用mixin
  121. components: {
  122. start
  123. },
  124. data() {
  125. return {
  126. zhpf: '5',
  127. list: [],
  128. dataObj: {},
  129. show: false,
  130. columns: [
  131. ['反馈', '举报']
  132. ],
  133. id: "",
  134. objectInfo: {},
  135. indexBtn: 1,
  136. btnData: 1,
  137. totalPL:'0'
  138. }
  139. },
  140. computed: {
  141. ...mapState(['hasLogin', 'userInfo', 'firstAuthentication'])
  142. },
  143. onShow() {
  144. },
  145. onLoad(options) {
  146. that = this
  147. this.objectInfo = options
  148. console.log(options)
  149. this.getList()
  150. },
  151. onNavigationBarButtonTap(e) {
  152. console.log("success")
  153. this.show = true
  154. },
  155. methods: {
  156. selectTypeClose() {
  157. this.show = false
  158. },
  159. upCallback(page) {
  160. that.$request.baseRequest('get', '/evaluateInfo/selectEvaluateInfo', {
  161. ownerId: this.objectInfo.commonId,
  162. flag: 1,
  163. pageSize: page.size,
  164. currentPage: page.num
  165. }).then(res => {
  166. if (page.num == 1) that.list = [];
  167. that.list = that.list.concat(res.data.records); //追加新数据
  168. that.totalPL = res.data.total
  169. for (let i = 0; i < that.list.length; i++) {
  170. if (that.list[i].driverUrl) {
  171. that.list[i].imgList = that.list[i].driverUrl.split(',')
  172. }
  173. that.list[i].count = (Number(that.list[i].ownerCredit) + Number(that.list[i]
  174. .tranEfficiency) + Number(that.list[i].freightPayment) + Number(that.list[i]
  175. .serviceQuality) + Number(that.list[i].comprehensiveSatisfaction)) / 15 * 5
  176. }
  177. that.mescroll.endBySize(res.data.records.length, res.data.total);
  178. uni.hideLoading()
  179. })
  180. .catch(res => {
  181. uni.$u.toast(res.message);
  182. });
  183. },
  184. getList() {
  185. this.$request.baseRequest('get', '/orderInfo/selectHaoPing', {
  186. commonId: this.userInfo.id,
  187. haoType: ''
  188. }).then(res => {
  189. if (res.code == 200) {
  190. this.dataObj = res.data
  191. } else {
  192. this.$refs.uToast.show({
  193. type: 'error',
  194. message: res.message,
  195. })
  196. }
  197. })
  198. .catch(res => {
  199. uni.$u.toast(res.message);
  200. });
  201. },
  202. switchsubmit(num) {
  203. this.indexBtn = num
  204. this.getList()
  205. },
  206. confirmBtn(e) {
  207. console.log(e.value)
  208. if (e.value == '反馈') {
  209. uni.$u.route('/pages/goodSource/fk', {
  210. val: JSON.stringify(this.objectInfo)
  211. });
  212. } else {
  213. uni.$u.route('/pages/goodSource/jb', {
  214. val: JSON.stringify(this.objectInfo)
  215. });
  216. }
  217. this.show = false
  218. },
  219. btnChange(num) {
  220. this.btnData = num
  221. this.getList()
  222. }
  223. }
  224. }
  225. </script>
  226. <style lang="scss">
  227. .center {
  228. padding: 40rpx;
  229. }
  230. .center_top {
  231. .name {
  232. margin: 40rpx;
  233. font-size: 48rpx;
  234. font-weight: 600;
  235. }
  236. .title_css {
  237. width: 50rpx;
  238. height: 50rpx;
  239. border-radius: 10rpx;
  240. text-align: center;
  241. line-height: 50rpx;
  242. margin-top: 44rpx;
  243. }
  244. .feedback_css {
  245. margin-top: 44rpx;
  246. margin-left: 50px;
  247. }
  248. }
  249. .switchbtn {
  250. margin-right: 40rpx;
  251. margin-top: 20rpx;
  252. font-weight: 600;
  253. }
  254. .switchbtn1 {
  255. color: #2772FB;
  256. position: relative;
  257. }
  258. .switchbtn1:before {
  259. width: 20px;
  260. height: 3px;
  261. content: '';
  262. position: absolute;
  263. bottom: -7px;
  264. background: #2772FB;
  265. left: 0;
  266. right: 0;
  267. margin: 0 auto;
  268. }
  269. .enterprise {
  270. margin-top: 30rpx;
  271. .enterprise_title {
  272. font-weight: 700;
  273. margin-top: 80rpx;
  274. }
  275. .enterprise_name {
  276. margin-top: 10rpx;
  277. }
  278. .recordInfo {
  279. margin-top: 20rpx;
  280. font-weight: 600;
  281. }
  282. }
  283. .evaluate_css {
  284. margin-top: 30rpx;
  285. display: flex;
  286. width: 100%;
  287. padding-bottom: 40rpx;
  288. border-bottom: 1px solid #E6E6E6;
  289. .evaluate_name {}
  290. .branch_css {
  291. // margin: 0;
  292. margin-right: 20rpx;
  293. }
  294. .evaluate_date {}
  295. .row1 {
  296. .right {
  297. display: flex;
  298. flex-direction: column;
  299. margin-left: 40rpx;
  300. }
  301. }
  302. }
  303. .pf-row {
  304. margin: 20rpx 0;
  305. .text {
  306. color: #999;
  307. margin-right: 20rpx;
  308. }
  309. .number {
  310. color: #2772FB;
  311. }
  312. .flex {
  313. margin-right: 20rpx;
  314. }
  315. }
  316. .pl-style {
  317. margin-top: 40rpx;
  318. }
  319. .btn-active {
  320. background-color: #2772FB;
  321. color: white;
  322. border-radius: 50rpx;
  323. display: flex;
  324. align-items: center;
  325. justify-content: center;
  326. padding: 10rpx 20rpx;
  327. }
  328. .btn {
  329. background: #F8F9FB;
  330. color: #363636;
  331. border-radius: 50rpx;
  332. display: flex;
  333. align-items: center;
  334. justify-content: center;
  335. padding: 10rpx 20rpx;
  336. }
  337. .pf-number {
  338. color: #363636;
  339. font-size: 60rpx;
  340. margin-right: 30rpx;
  341. }
  342. .pf {
  343. margin-bottom: 20rpx;
  344. }
  345. </style>