cargoOwnerSee.vue 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379
  1. <template>
  2. <view class="center">
  3. <mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
  4. class="mescroll">
  5. <view class="center_top">
  6. <view class="flex">
  7. <u--image
  8. :src="objectInfo.cargoOwnerPortrait?objectInfo.cargoOwnerPortrait:'../../static/images/mine/tx.png'"
  9. width='170rpx' height='170rpx' shape="circle">
  10. </u--image>
  11. <view class="name">{{objectInfo.cargoOwnerName}}</view>
  12. <image src="../../static/qy@2x.png" mode="widthFix" class="title_css" v-show="objectInfo.cargoOwner">
  13. </image>
  14. <view class="feedback_css"></view>
  15. </view>
  16. </view>
  17. <view class="pf-row flex">
  18. <view class="flex">
  19. <view class="text">评分</view>
  20. <view class="number">{{dataObj.zong}}</view>
  21. </view>
  22. <view class="flex">
  23. <view class="text">发运次数</view>
  24. <view class="number">{{dataObj.countFa}}</view>
  25. </view>
  26. <!-- <view class="flex">
  27. <view class="text">好评率</view>
  28. <view class="number">{{dataObj.haoPingLv}}</view>
  29. </view> -->
  30. <view class="flex">
  31. <view class="text">评价</view>
  32. <view class="number">{{totalPL}}</view>
  33. </view>
  34. </view>
  35. <u-line></u-line>
  36. <view class="flex">
  37. <view class="switchbtn" @click="switchsubmit(1)" :class="indexBtn == 1 ? 'switchbtn1':''">货主信息</view>
  38. <view class="switchbtn" @click="switchsubmit(2)" :class="indexBtn == 2 ? 'switchbtn1':''">评价</view>
  39. </view>
  40. <!-- 货主信息 -->
  41. <view v-if="indexBtn == 1" class="enterprise">
  42. <view>
  43. <view class="enterprise_title" v-if="objectInfo.cargoOwner">所属企业</view>
  44. <view class="enterprise_title" v-if="!objectInfo.cargoOwner">个人货主,暂未代理企业</view>
  45. <view class="enterprise_name" v-if="objectInfo.cargoOwner">{{objectInfo.cargoOwner}}</view>
  46. </view>
  47. </view>
  48. <!-- 评价信息 -->
  49. <view v-if="indexBtn == 2" class="pl-style">
  50. <view class="pf flex-space-between flex">
  51. <view class="left flex align-center" style="margin-right: 20rpx;">
  52. <view class="pf-number">
  53. {{dataObj.zong}}
  54. </view>
  55. <view>
  56. <view>
  57. <start count="5" v-model="dataObj.zong" size="35" activeColor="#ffaa00" :size="18" :allowHalf='true'
  58. :readonly='true'>
  59. </start>
  60. </view>
  61. <view class="gray fontsize-24">累计发运{{dataObj.countFa}}次</view>
  62. </view>
  63. </view>
  64. <view class="right">
  65. <view>{{dataObj.haoPingLv}}%</view>
  66. <view class="gray fontsize-24">好评率</view>
  67. </view>
  68. </view>
  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. </view>
  106. <u-picker :show="show" :columns="columns" :closeOnClickOverlay='true' @close='selectTypeClose'
  107. @cancel='selectTypeClose' @confirm='confirmBtn'></u-picker>
  108. <u-toast ref="uToast"></u-toast>
  109. </mescroll-body>
  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. evaluatoredId: this.objectInfo.commonId,
  162. flag: 2,
  163. haoType:'',
  164. searchType:'',
  165. pageSize: page.size,
  166. currentPage: page.num
  167. }).then(res => {
  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.objectInfo.commonId,
  189. evaluateFlag: 2
  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. console.log(e.value)
  210. if (e.value == '反馈') {
  211. uni.$u.route('/pages/goodSource/fk', {
  212. val: JSON.stringify(this.objectInfo)
  213. });
  214. } else {
  215. uni.$u.route('/pages/goodSource/jb', {
  216. val: JSON.stringify(this.objectInfo)
  217. });
  218. }
  219. this.show = false
  220. },
  221. btnChange(num) {
  222. this.btnData = num
  223. this.getList()
  224. }
  225. }
  226. }
  227. </script>
  228. <style lang="scss">
  229. .center {
  230. padding: 40rpx;
  231. }
  232. .center_top {
  233. .name {
  234. margin: 40rpx;
  235. font-size: 48rpx;
  236. font-weight: 600;
  237. }
  238. .title_css {
  239. width: 50rpx;
  240. height: 50rpx;
  241. border-radius: 10rpx;
  242. text-align: center;
  243. line-height: 50rpx;
  244. margin-top: 44rpx;
  245. }
  246. .feedback_css {
  247. margin-top: 44rpx;
  248. margin-left: 50px;
  249. }
  250. }
  251. .switchbtn {
  252. margin-right: 40rpx;
  253. margin-top: 20rpx;
  254. font-weight: 600;
  255. }
  256. .switchbtn1 {
  257. color: #2772FB;
  258. position: relative;
  259. }
  260. .switchbtn1:before {
  261. width: 20px;
  262. height: 3px;
  263. content: '';
  264. position: absolute;
  265. bottom: -7px;
  266. background: #2772FB;
  267. left: 0;
  268. right: 0;
  269. margin: 0 auto;
  270. }
  271. .enterprise {
  272. margin-top: 30rpx;
  273. .enterprise_title {
  274. font-weight: 700;
  275. margin-top: 80rpx;
  276. }
  277. .enterprise_name {
  278. margin-top: 10rpx;
  279. }
  280. .recordInfo {
  281. margin-top: 20rpx;
  282. font-weight: 600;
  283. }
  284. }
  285. .evaluate_css {
  286. margin-top: 30rpx;
  287. display: flex;
  288. width: 100%;
  289. padding-bottom: 40rpx;
  290. border-bottom: 1px solid #E6E6E6;
  291. .evaluate_name {}
  292. .branch_css {
  293. // margin: 0;
  294. margin-right: 20rpx;
  295. }
  296. .evaluate_date {}
  297. .row1 {
  298. .right {
  299. display: flex;
  300. flex-direction: column;
  301. margin-left: 40rpx;
  302. }
  303. }
  304. }
  305. .pf-row {
  306. margin: 20rpx 0;
  307. .text {
  308. color: #999;
  309. margin-right: 20rpx;
  310. }
  311. .number {
  312. color: #2772FB;
  313. }
  314. .flex {
  315. margin-right: 20rpx;
  316. }
  317. }
  318. .pl-style {
  319. margin-top: 40rpx;
  320. }
  321. .btn-active {
  322. background-color: #2772FB;
  323. color: white;
  324. border-radius: 50rpx;
  325. display: flex;
  326. align-items: center;
  327. justify-content: center;
  328. padding: 10rpx 20rpx;
  329. }
  330. .btn {
  331. background: #F8F9FB;
  332. color: #363636;
  333. border-radius: 50rpx;
  334. display: flex;
  335. align-items: center;
  336. justify-content: center;
  337. padding: 10rpx 20rpx;
  338. }
  339. .pf-number {
  340. color: #363636;
  341. font-size: 60rpx;
  342. margin-right: 30rpx;
  343. }
  344. .pf {
  345. margin-bottom: 20rpx;
  346. }
  347. </style>