cargoOwnerSee.vue 10 KB

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