cargoOwnerSee.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440
  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. {{item.company?item.company:item.companyName}}
  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.cargoCommonId
  154. this.objectInfo = options
  155. this.objectInfo.orderId=this.objectInfo.id
  156. console.log(options)
  157. this.getList()
  158. },
  159. onNavigationBarButtonTap(e) {
  160. console.log("success")
  161. this.show = true
  162. },
  163. methods: {
  164. ylImg(src) {
  165. uni.previewImage({
  166. urls: src,
  167. longPressActions: {
  168. itemList: ['发送给朋友', '保存图片', '收藏'],
  169. success: function(data) {
  170. console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
  171. },
  172. fail: function(err) {
  173. console.log(err.errMsg);
  174. }
  175. }
  176. });
  177. },
  178. selectTypeClose() {
  179. this.show = false
  180. },
  181. upCallback(page) {
  182. console.log(this.commonId,11111111)
  183. this.$request.baseRequest('get', '/cargoOwnerCompInfo/cargoOwnerList', {
  184. commonId: this.commonId
  185. }).then(res => {
  186. console.log(res)
  187. // 可用企业货主
  188. this.companyList = []
  189. // 自己法人
  190. // let _self = res.data.companyInfoList
  191. let _self = res.data.hyCompanyInfoList
  192. //代理货主
  193. // let _dlhz = res.data.cargoOwnerCompInfoList
  194. let _dlhz = res.data.hyCargoOwnerCompInfoList
  195. if (!_dlhz) _dlhz = []
  196. if (!_self) _self = []
  197. if (_self.length > 0) {
  198. for (let i = 0; i < _self.length; i++) {
  199. if (_self[i].status == '已认证') {
  200. this.companyList.push(_self[i])
  201. }
  202. }
  203. }
  204. if (_dlhz.length > 0) {
  205. for (let i = 0; i < _dlhz.length; i++) {
  206. if (_dlhz[i].status == '已认证') {
  207. this.companyList.push(_dlhz[i])
  208. }
  209. }
  210. }
  211. console.log(this.companyList)
  212. this.$forceUpdate()
  213. })
  214. .catch(res => {});
  215. that.$request.baseRequest('get', '/evaluateInfo/selectEvaluateInfo', {
  216. evaluatoredId: this.objectInfo.cargoCommonId,
  217. flag: 2,
  218. haoType:this.haoType,
  219. searchType:2,
  220. pageSize: page.size,
  221. currentPage: page.num
  222. }).then(res => {
  223. if (page.num == 1) that.list = [];
  224. that.list = that.list.concat(res.data.records); //追加新数据
  225. if(this.haoType==''){
  226. that.totalPL = res.data.total
  227. }
  228. for (let i = 0; i < that.list.length; i++) {
  229. if (that.list[i].driverUrl) {
  230. that.list[i].imgList = that.list[i].driverUrl.split(',')
  231. }
  232. // that.list[i].count = (Number(that.list[i].ownerCredit) + Number(that.list[i]
  233. // .tranEfficiency) + Number(that.list[i].freightPayment) + Number(that.list[i]
  234. // .serviceQuality) + Number(that.list[i].comprehensiveSatisfaction)) / 15 * 5
  235. }
  236. that.mescroll.endBySize(res.data.records.length, res.data.total);
  237. uni.hideLoading()
  238. })
  239. .catch(res => {
  240. uni.$u.toast(res.message);
  241. });
  242. },
  243. getList() {
  244. this.$request.baseRequest('get', '/orderInfo/selectHaoPing', {
  245. commonId: this.objectInfo.cargoCommonId,
  246. evaluateFlag: 2
  247. }).then(res => {
  248. if (res.code == 200) {
  249. this.dataObj = res.data
  250. } else {
  251. this.$refs.uToast.show({
  252. type: 'error',
  253. message: res.message,
  254. })
  255. }
  256. })
  257. .catch(res => {
  258. uni.$u.toast(res.message);
  259. });
  260. },
  261. switchsubmit(num) {
  262. this.indexBtn = num
  263. this.getList()
  264. },
  265. confirmBtn(e) {
  266. console.log(e.value)
  267. if (e.value == '投诉') {
  268. uni.$u.route('/pages/goodSource/fk', {
  269. val: JSON.stringify(this.objectInfo),
  270. type:1
  271. });
  272. } else {
  273. uni.$u.route('/pages/goodSource/jb', {
  274. val: JSON.stringify(this.objectInfo),
  275. type:1
  276. });
  277. }
  278. this.show = false
  279. },
  280. btnChange(num) {
  281. this.haoType=num
  282. this.btnData = num
  283. this.getList()
  284. this.upCallback({size:10,num:1})
  285. }
  286. }
  287. }
  288. </script>
  289. <style lang="scss">
  290. .center {
  291. padding: 40rpx;
  292. }
  293. .center_top {
  294. .name {
  295. margin: 40rpx;
  296. font-size: 48rpx;
  297. font-weight: 600;
  298. }
  299. .title_css {
  300. width: 50rpx;
  301. height: 50rpx;
  302. border-radius: 10rpx;
  303. text-align: center;
  304. line-height: 50rpx;
  305. margin-top: 44rpx;
  306. }
  307. .feedback_css {
  308. margin-top: 44rpx;
  309. margin-left: 50px;
  310. }
  311. }
  312. .switchbtn {
  313. margin-right: 40rpx;
  314. margin-top: 20rpx;
  315. font-weight: 600;
  316. }
  317. .switchbtn1 {
  318. color: #2772FB;
  319. position: relative;
  320. }
  321. .switchbtn1:before {
  322. width: 20px;
  323. height: 3px;
  324. content: '';
  325. position: absolute;
  326. bottom: -7px;
  327. background: #2772FB;
  328. left: 0;
  329. right: 0;
  330. margin: 0 auto;
  331. }
  332. .enterprise {
  333. margin-top: 30rpx;
  334. .enterprise_title {
  335. font-weight: 700;
  336. margin-top: 80rpx;
  337. }
  338. .enterprise_name {
  339. margin-top: 10rpx;
  340. }
  341. .recordInfo {
  342. margin-top: 20rpx;
  343. font-weight: 600;
  344. }
  345. }
  346. .evaluate_css {
  347. margin-top: 30rpx;
  348. display: flex;
  349. width: 100%;
  350. padding-bottom: 40rpx;
  351. border-bottom: 1px solid #E6E6E6;
  352. .evaluate_name {}
  353. .branch_css {
  354. // margin: 0;
  355. margin-right: 20rpx;
  356. }
  357. .evaluate_date {}
  358. .row1 {
  359. .right {
  360. display: flex;
  361. flex-direction: column;
  362. margin-left: 40rpx;
  363. }
  364. }
  365. }
  366. .pf-row {
  367. margin: 20rpx 0;
  368. .text {
  369. color: #999;
  370. margin-right: 20rpx;
  371. }
  372. .number {
  373. color: #2772FB;
  374. }
  375. .flex {
  376. margin-right: 20rpx;
  377. }
  378. }
  379. .pl-style {
  380. margin-top: 40rpx;
  381. }
  382. .btn-active {
  383. background-color: #2772FB;
  384. color: white;
  385. border-radius: 50rpx;
  386. display: flex;
  387. align-items: center;
  388. justify-content: center;
  389. padding: 10rpx 20rpx;
  390. }
  391. .btn {
  392. background: #F8F9FB;
  393. color: #363636;
  394. border-radius: 50rpx;
  395. display: flex;
  396. align-items: center;
  397. justify-content: center;
  398. padding: 10rpx 20rpx;
  399. }
  400. .pf-number {
  401. color: #363636;
  402. font-size: 60rpx;
  403. margin-right: 30rpx;
  404. }
  405. .pf {
  406. margin-bottom: 20rpx;
  407. }
  408. </style>