cargoOwnerSee.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493
  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="left">
  6. <u--image
  7. :src="objectInfo.cargoOwnerPortrait?objectInfo.cargoOwnerPortrait:'../../static/images/mine/tx.png'"
  8. width='172rpx' height='172rpx' shape="circle">
  9. </u--image>
  10. <view class="name">{{objectInfo.cargoOwnerName}}</view>
  11. <image src="../../static/qy@2x.png" mode="widthFix" class="title_css"
  12. v-show="objectInfo.cargoOwner=='企业货主'">
  13. </image>
  14. </view>
  15. <!-- <view class="feedback_css">+关注</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="pj-view">
  37. <view class="flex ">
  38. <view class="switchbtn" @click="switchsubmit(1)" :class="indexBtn == 1 ? 'switchbtn1':''">货主信息
  39. </view>
  40. <view class="switchbtn" @click="switchsubmit(2)" :class="indexBtn == 2 ? 'switchbtn1':''">评价</view>
  41. </view>
  42. <!-- 货主信息 -->
  43. <view v-if="indexBtn == 1" class="enterprise">
  44. <view>
  45. <view class="enterprise_title" v-if="companyList.length>0">所属企业:</view>
  46. <view class="enterprise_title" v-else>个人货主,暂未代理企业</view>
  47. <view v-for='item in companyList'>
  48. <view style="color: #999999;margin: 20rpx;">{{item.company?item.company:item.companyName}}
  49. </view>
  50. </view>
  51. <!-- <view class="enterprise_name" v-if="companyList.length>0">{{objectInfo.cargoOwner}}</view> -->
  52. </view>
  53. </view>
  54. <!-- 评价信息 -->
  55. <view v-if="indexBtn == 2" class="pl-style">
  56. <view class="pf flex-space-between flex">
  57. <view class="left flex align-center" style="margin-right: 20rpx;">
  58. <view class="pf-number">
  59. {{dataObj.zong}}
  60. </view>
  61. <view class="pf-number-right">
  62. <start count="5" v-model="dataObj.zong" size="35" activeColor="#ffaa00" :size="18"
  63. :allowHalf='true' :readonly='true'>
  64. </start>
  65. <view class="gray fontsize-24">累计发运{{dataObj.countFa}}次</view>
  66. </view>
  67. </view>
  68. <view v-if='dataObj.haoPing>20' class="right">
  69. <view>{{dataObj.haoPingLv}}%</view>
  70. <view class="gray fontsize-24">好评率</view>
  71. </view>
  72. </view>
  73. <view class="flex">
  74. <view :class="btnData == '' ? 'btn-active':'btn'" @click="btnChange('')">全部({{totalPL}})</view>
  75. <!-- <view :class="btnData == 2 ? 'btn-active':'btn'" @click="btnChange(2)">最新</view> -->
  76. <view :class="btnData == 1 ? 'btn-active':'btn'" @click="btnChange(1)">好评({{dataObj.haoPing}})
  77. </view>
  78. <view :class="btnData == 2 ? 'btn-active':'btn'" @click="btnChange(2)">差评({{dataObj.chaPing}})
  79. </view>
  80. </view>
  81. <view class="evaluate_css" v-for="(item,index) in list">
  82. <view class="flex">
  83. <view class="row1 flex">
  84. <u--image
  85. :src="objectInfo.cargoOwnerPortrait?objectInfo.cargoOwnerPortrait:'../../static/images/mine/tx.png'"
  86. width='68rpx' height='68rpx' shape="circle">
  87. </u--image>
  88. <view class="right">
  89. <view class="evaluate_name">{{item.driverName}}</view>
  90. <view class="evaluate_date m-top10">{{objectInfo.createDate.split(' ')[0]}}</view>
  91. <view class="flex m-top10">
  92. <view class="branch_css">{{item.ownerScoreObtained}}</view>
  93. <view class="">
  94. <start count="5" v-model="item.ownerScoreObtained" size="35"
  95. activeColor="#ffaa00" :size="18" :allowHalf='true' :disabled='true'>
  96. </start>
  97. </view>
  98. </view>
  99. <view class="" style="font-size: 28rpx;">
  100. {{item.driverContent}}
  101. </view>
  102. <view style='flex-wrap: wrap;' class='flex'>
  103. <u--image style='margin:7rpx;border:1px solid #ccc;'
  104. v-for="(item1,index) in item.imgList" @click='ylImg(item.imgList)'
  105. :src="item1" width='170rpx' height='170rpx'>
  106. </u--image>
  107. </view>
  108. </view>
  109. </view>
  110. </view>
  111. </view>
  112. </view>
  113. </view>
  114. <u-picker :show="show" :columns="columns" :closeOnClickOverlay='true' @close='selectTypeClose'
  115. @cancel='selectTypeClose' @confirm='confirmBtn'></u-picker>
  116. <u-toast ref="uToast"></u-toast>
  117. </mescroll-body>
  118. </view>
  119. </template>
  120. <script>
  121. var that
  122. import start from '../../common/components/uni-rate.vue'
  123. import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
  124. import {
  125. mapState
  126. } from 'vuex';
  127. export default {
  128. mixins: [MescrollMixin], // 使用mixin
  129. components: {
  130. start
  131. },
  132. data() {
  133. return {
  134. zhpf: '5',
  135. list: [],
  136. dataObj: {},
  137. show: false,
  138. columns: [
  139. ['投诉', '举报']
  140. ],
  141. id: "",
  142. objectInfo: {},
  143. haoType: '',
  144. companyList: [],
  145. commonId: '',
  146. indexBtn: 1,
  147. btnData: '',
  148. totalPL: '0'
  149. }
  150. },
  151. computed: {
  152. ...mapState(['hasLogin', 'userInfo', 'firstAuthentication'])
  153. },
  154. onShow() {
  155. },
  156. onLoad(options) {
  157. that = this
  158. this.commonId = options.commonId
  159. this.objectInfo = options
  160. console.log(options)
  161. this.getList()
  162. },
  163. onNavigationBarButtonTap(e) {
  164. console.log("success")
  165. this.show = true
  166. },
  167. methods: {
  168. ylImg(src) {
  169. uni.previewImage({
  170. urls: src,
  171. longPressActions: {
  172. itemList: ['发送给朋友', '保存图片', '收藏'],
  173. success: function(data) {
  174. console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
  175. },
  176. fail: function(err) {
  177. console.log(err.errMsg);
  178. }
  179. }
  180. });
  181. },
  182. selectTypeClose() {
  183. this.show = false
  184. },
  185. upCallback(page) {
  186. console.log(this.commonId, 11111111)
  187. this.$request.baseRequest('get', '/cargoOwnerCompInfo/cargoOwnerList', {
  188. commonId: this.commonId
  189. }).then(res => {
  190. console.log(res)
  191. // 可用企业货主
  192. this.companyList = []
  193. // 自己法人
  194. // let _self = res.data.companyInfoList
  195. let _self = res.data.hyCompanyInfoList
  196. //代理货主
  197. // let _dlhz = res.data.cargoOwnerCompInfoList
  198. let _dlhz = res.data.hyCargoOwnerCompInfoList
  199. if (!_dlhz) _dlhz = []
  200. if (!_self) _self = []
  201. if (_self.length > 0) {
  202. for (let i = 0; i < _self.length; i++) {
  203. if (_self[i].status == '已认证') {
  204. this.companyList.push(_self[i])
  205. }
  206. }
  207. }
  208. if (_dlhz.length > 0) {
  209. for (let i = 0; i < _dlhz.length; i++) {
  210. if (_dlhz[i].status == '已认证') {
  211. this.companyList.push(_dlhz[i])
  212. }
  213. }
  214. }
  215. console.log(this.companyList)
  216. this.$forceUpdate()
  217. })
  218. .catch(res => {});
  219. that.$request.baseRequest('get', '/evaluateInfo/selectEvaluateInfo', {
  220. evaluatoredId: this.objectInfo.commonId,
  221. flag: 2,
  222. haoType: this.haoType,
  223. searchType: 2,
  224. pageSize: page.size,
  225. currentPage: page.num
  226. }).then(res => {
  227. if (page.num == 1) that.list = [];
  228. that.list = that.list.concat(res.data.records); //追加新数据
  229. if (this.haoType == '') {
  230. that.totalPL = res.data.total
  231. }
  232. for (let i = 0; i < that.list.length; i++) {
  233. if (that.list[i].driverUrl) {
  234. that.list[i].imgList = that.list[i].driverUrl.split(',')
  235. }
  236. // that.list[i].count = (Number(that.list[i].ownerCredit) + Number(that.list[i]
  237. // .tranEfficiency) + Number(that.list[i].freightPayment) + Number(that.list[i]
  238. // .serviceQuality) + Number(that.list[i].comprehensiveSatisfaction)) / 15 * 5
  239. }
  240. that.mescroll.endBySize(res.data.records.length, res.data.total);
  241. uni.hideLoading()
  242. })
  243. .catch(res => {
  244. uni.$u.toast(res.message);
  245. });
  246. },
  247. getList() {
  248. this.$request.baseRequest('get', '/orderInfo/selectHaoPing', {
  249. commonId: this.objectInfo.commonId,
  250. evaluateFlag: 2
  251. }).then(res => {
  252. if (res.code == 200) {
  253. this.dataObj = res.data
  254. } else {
  255. this.$refs.uToast.show({
  256. type: 'error',
  257. message: res.message,
  258. })
  259. }
  260. })
  261. .catch(res => {
  262. uni.$u.toast(res.message);
  263. });
  264. },
  265. switchsubmit(num) {
  266. this.indexBtn = num
  267. this.getList()
  268. },
  269. confirmBtn(e) {
  270. console.log(e.value)
  271. if (e.value == '投诉') {
  272. uni.$u.route('/pages/goodSource/fk', {
  273. val: JSON.stringify(this.objectInfo)
  274. });
  275. } else {
  276. uni.$u.route('/pages/goodSource/jb', {
  277. val: JSON.stringify(this.objectInfo)
  278. });
  279. }
  280. this.show = false
  281. },
  282. btnChange(num) {
  283. this.haoType = num
  284. this.btnData = num
  285. this.getList()
  286. this.upCallback({
  287. size: 10,
  288. num: 1
  289. })
  290. }
  291. }
  292. }
  293. </script>
  294. <style lang="scss">
  295. .center {
  296. padding: 40rpx 0;
  297. }
  298. .center_top {
  299. padding: 0 53rpx;
  300. display: flex;
  301. align-items: center;
  302. justify-content: space-between;
  303. .left {
  304. display: flex;
  305. align-items: center;
  306. }
  307. .name {
  308. // margin: 40rpx 30rpx;
  309. font-size: 46rpx;
  310. font-weight: 600;
  311. }
  312. .title_css {
  313. width: 50rpx;
  314. height: 50rpx;
  315. border-radius: 10rpx;
  316. text-align: center;
  317. line-height: 50rpx;
  318. margin-top: 44rpx;
  319. }
  320. .feedback_css {
  321. width: 124rpx;
  322. height: 58rpx;
  323. background: #2772FB;
  324. border-radius: 29rpx;
  325. display: flex;
  326. justify-content: center;
  327. align-items: center;
  328. color: #fff;
  329. font-size: 28rpx;
  330. }
  331. }
  332. .switchbtn {
  333. margin-right: 117rpx;
  334. margin-top: 20rpx;
  335. font-weight: 600;
  336. }
  337. .switchbtn1 {
  338. color: #2772FB;
  339. position: relative;
  340. }
  341. .switchbtn1:before {
  342. width: 20px;
  343. height: 3px;
  344. content: '';
  345. position: absolute;
  346. bottom: -7px;
  347. background: #2772FB;
  348. left: 0;
  349. right: 0;
  350. margin: 0 auto;
  351. }
  352. .enterprise {
  353. margin-top: 30rpx;
  354. .enterprise_title {
  355. font-weight: 700;
  356. margin-top: 80rpx;
  357. font-size: 28rpx;
  358. }
  359. .enterprise_name {
  360. margin-top: 10rpx;
  361. }
  362. .recordInfo {
  363. margin-top: 20rpx;
  364. font-weight: 600;
  365. }
  366. }
  367. .evaluate_css {
  368. margin-top: 30rpx;
  369. display: flex;
  370. width: 100%;
  371. padding-bottom: 40rpx;
  372. border-bottom: 1px solid #E6E6E6;
  373. .evaluate_name {
  374. font-size: 26rpx;
  375. }
  376. .branch_css {
  377. // margin: 0;
  378. margin-right: 20rpx;
  379. font-size: 22rpx;
  380. color: #878787;
  381. }
  382. .evaluate_date {
  383. font-size: 22rpx;
  384. font-weight: 400;
  385. color: #999999;
  386. }
  387. .row1 {
  388. .right {
  389. display: flex;
  390. flex-direction: column;
  391. margin-left: 40rpx;
  392. }
  393. }
  394. }
  395. .pf-row {
  396. margin: 20rpx 0;
  397. display: flex;
  398. padding: 0 53rpx;
  399. .text {
  400. color: #999;
  401. margin-right: 20rpx;
  402. font-size: 22rpx;
  403. }
  404. .number {
  405. color: #2772FB;
  406. font-size: 28rpx;
  407. }
  408. .flex {
  409. margin-right: 20rpx;
  410. align-items: center;
  411. }
  412. }
  413. .pl-style {
  414. margin-top: 40rpx;
  415. }
  416. .btn-active {
  417. background-color: #2772FB;
  418. color: white;
  419. border-radius: 50rpx;
  420. display: flex;
  421. align-items: center;
  422. justify-content: center;
  423. padding: 10rpx 20rpx;
  424. font-size: 24rpx;
  425. margin-right: 16rpx;
  426. }
  427. .btn {
  428. background: #F8F9FB;
  429. color: #363636;
  430. border-radius: 50rpx;
  431. display: flex;
  432. align-items: center;
  433. justify-content: center;
  434. padding: 10rpx 20rpx;
  435. font-size: 24rpx;
  436. margin-right: 16rpx;
  437. }
  438. .pf-number {
  439. color: #363636;
  440. font-size: 94rpx;
  441. margin-right: 30rpx;
  442. }
  443. .pf-number-right {
  444. display: flex;
  445. flex-direction: column;
  446. justify-content: space-between;
  447. height: 80rpx;
  448. }
  449. .pf {
  450. margin-bottom: 20rpx;
  451. }
  452. .pj-view {
  453. padding: 0 53rpx;
  454. font-size: 30rpx;
  455. }
  456. </style>