cargoOwnerSee.vue 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380
  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. debugger
  147. that = this
  148. this.objectInfo = options
  149. console.log(options)
  150. this.getList()
  151. },
  152. onNavigationBarButtonTap(e) {
  153. console.log("success")
  154. this.show = true
  155. },
  156. methods: {
  157. selectTypeClose() {
  158. this.show = false
  159. },
  160. upCallback(page) {
  161. that.$request.baseRequest('get', '/evaluateInfo/selectEvaluateInfo', {
  162. ownerId: this.objectInfo.commonId,
  163. flag: 1,
  164. pageSize: page.size,
  165. currentPage: page.num
  166. }).then(res => {
  167. debugger
  168. if (page.num == 1) that.list = [];
  169. that.list = that.list.concat(res.data.records); //追加新数据
  170. that.totalPL = res.data.total
  171. for (let i = 0; i < that.list.length; i++) {
  172. if (that.list[i].driverUrl) {
  173. that.list[i].imgList = that.list[i].driverUrl.split(',')
  174. }
  175. that.list[i].count = (Number(that.list[i].ownerCredit) + Number(that.list[i]
  176. .tranEfficiency) + Number(that.list[i].freightPayment) + Number(that.list[i]
  177. .serviceQuality) + Number(that.list[i].comprehensiveSatisfaction)) / 15 * 5
  178. }
  179. that.mescroll.endBySize(res.data.records.length, res.data.total);
  180. uni.hideLoading()
  181. })
  182. .catch(res => {
  183. uni.$u.toast(res.message);
  184. });
  185. },
  186. getList() {
  187. this.$request.baseRequest('get', '/orderInfo/selectHaoPing', {
  188. commonId: this.userInfo.id,
  189. haoType: ''
  190. }).then(res => {
  191. if (res.code == 200) {
  192. this.dataObj = res.data
  193. } else {
  194. this.$refs.uToast.show({
  195. type: 'error',
  196. message: res.message,
  197. })
  198. }
  199. })
  200. .catch(res => {
  201. uni.$u.toast(res.message);
  202. });
  203. },
  204. switchsubmit(num) {
  205. this.indexBtn = num
  206. this.getList()
  207. },
  208. confirmBtn(e) {
  209. debugger
  210. console.log(e.value)
  211. if (e.value == '反馈') {
  212. uni.$u.route('/pages/goodSource/fk', {
  213. val: JSON.stringify(this.objectInfo)
  214. });
  215. } else {
  216. uni.$u.route('/pages/goodSource/jb', {
  217. val: JSON.stringify(this.objectInfo)
  218. });
  219. }
  220. this.show = false
  221. },
  222. btnChange(num) {
  223. debugger
  224. this.btnData = num
  225. this.getList()
  226. }
  227. }
  228. }
  229. </script>
  230. <style lang="scss">
  231. .center {
  232. padding: 40rpx;
  233. }
  234. .center_top {
  235. .name {
  236. margin: 40rpx;
  237. font-size: 48rpx;
  238. font-weight: 600;
  239. }
  240. .title_css {
  241. width: 50rpx;
  242. height: 50rpx;
  243. border-radius: 10rpx;
  244. text-align: center;
  245. line-height: 50rpx;
  246. margin-top: 44rpx;
  247. }
  248. .feedback_css {
  249. margin-top: 44rpx;
  250. margin-left: 50px;
  251. }
  252. }
  253. .switchbtn {
  254. margin-right: 40rpx;
  255. margin-top: 20rpx;
  256. font-weight: 600;
  257. }
  258. .switchbtn1 {
  259. color: #2772FB;
  260. position: relative;
  261. }
  262. .switchbtn1:before {
  263. width: 20px;
  264. height: 3px;
  265. content: '';
  266. position: absolute;
  267. bottom: -7px;
  268. background: #2772FB;
  269. left: 0;
  270. right: 0;
  271. margin: 0 auto;
  272. }
  273. .enterprise {
  274. margin-top: 30rpx;
  275. .enterprise_title {
  276. font-weight: 700;
  277. margin-top: 80rpx;
  278. }
  279. .enterprise_name {
  280. margin-top: 10rpx;
  281. }
  282. .recordInfo {
  283. margin-top: 20rpx;
  284. font-weight: 600;
  285. }
  286. }
  287. .evaluate_css {
  288. margin-top: 30rpx;
  289. display: flex;
  290. width: 100%;
  291. padding-bottom: 40rpx;
  292. border-bottom: 1px solid #E6E6E6;
  293. .evaluate_name {}
  294. .branch_css {
  295. // margin: 0;
  296. margin-right: 20rpx;
  297. }
  298. .evaluate_date {}
  299. .row1 {
  300. .right {
  301. display: flex;
  302. flex-direction: column;
  303. margin-left: 40rpx;
  304. }
  305. }
  306. }
  307. .pf-row {
  308. margin: 20rpx 0;
  309. .text {
  310. color: #999;
  311. margin-right: 20rpx;
  312. }
  313. .number {
  314. color: #2772FB;
  315. }
  316. .flex {
  317. margin-right: 20rpx;
  318. }
  319. }
  320. .pl-style {
  321. margin-top: 40rpx;
  322. }
  323. .btn-active {
  324. background-color: #2772FB;
  325. color: white;
  326. border-radius: 50rpx;
  327. display: flex;
  328. align-items: center;
  329. justify-content: center;
  330. padding: 10rpx 20rpx;
  331. }
  332. .btn {
  333. background: #F8F9FB;
  334. color: #363636;
  335. border-radius: 50rpx;
  336. display: flex;
  337. align-items: center;
  338. justify-content: center;
  339. padding: 10rpx 20rpx;
  340. }
  341. .pf-number {
  342. color: #363636;
  343. font-size: 60rpx;
  344. margin-right: 30rpx;
  345. }
  346. .pf {
  347. margin-bottom: 20rpx;
  348. }
  349. </style>