cargoOwnerSee.vue 10.0 KB

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