cargoOwnerSee.vue 11 KB

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