cargoOwnerSee.vue 7.9 KB

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