cargoOwnerSee.vue 10 KB

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