index.vue 27 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117
  1. <!-- 货源 -->
  2. <template>
  3. <view class="content">
  4. <!-- <view v-if="!isSearch"> -->
  5. <!-- <view class="fixed">
  6. <view class='title flex flex-center'>
  7. <view>订单</view>
  8. <u-icon class="search" name="search" color="" size="28" @click="search"></u-icon>
  9. </view>
  10. <u-tabs :list="tabList" @click="clickTab" lineColor='#2772FB' :current='tabIndex' :activeStyle="{
  11. color: '#2772FB',
  12. fontWeight: 'bold',
  13. transform: 'scale(1.05)'
  14. }"></u-tabs>
  15. </view> -->
  16. <view class="top-content">
  17. <view class="fixed1"></view>
  18. <view class="fix-content">
  19. <u-search placeholder="搜索订单"
  20. v-model="searchKeyWord" bgColor='white' :actionStyle='searchStyle'
  21. @custom="getSearch" @search="getSearch" :clearabled="true"></u-search>
  22. <view class="tab-content">
  23. <u-tabs :list="tabList" @click="clickTab" lineColor='transparent' :current='tabIndex'
  24. :inactiveStyle="{color:'white'}" :activeStyle="{
  25. color: '#2772FB',
  26. fontWeight: 'bold',
  27. transform: 'scale(1.05)',
  28. background:'white',
  29. padding:'10rpx 20rpx',
  30. 'border-radius':'40rpx'
  31. }" class="tabs"></u-tabs>
  32. <view class="right-btn" @click="showMenu=true">
  33. <!-- <u-icon name="grid-fill" color="white" size="28"></u-icon> -->
  34. <image class="quanbu" src="@/static/images/order/quanbuyewu.png"></image>
  35. <view class="">
  36. 全部
  37. </view>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. <view class="all-menu">
  43. <u-transition :show="showMenu" mode="fade">
  44. <view class="transition">
  45. <view v-for="(item,index) in tabList" :key='index' class="transition-item-style"
  46. :class="tabIndex==index?'menu-active':''" @click="clickTab({index:index})">
  47. {{item.name}}
  48. </view>
  49. </view>
  50. </u-transition>
  51. <view class="modal-black" v-show="showMenu" @click="closeMenu"></view>
  52. </view>
  53. <mescroll-body ref="mescrollRef" :up="upOption" @init="mescrollInit" @down="downCallback" @up="upCallback" class="mescroll">
  54. <view class="evaluatePage flex flex-space-between" v-show="tabIndex == 10" @click="evaluationRecord">
  55. <view class="left flex flex-space-between">
  56. <!-- <u-icon size="20" name="edit-pen"></u-icon> -->
  57. <image class="pingjia" src="@/static/images/order/pingjia.png"></image>
  58. <view style="margin-left: 20prx;">我的评价</view>
  59. </view>
  60. <view class="right">
  61. <image style='width:12px;height:12px;' src="@/static/images/order/right.png"></image>
  62. <!-- <u-icon size="20" name="arrow-right"></u-icon> -->
  63. </view>
  64. </view>
  65. <view :id="'good'+good.id" class="good-list" v-for="good in goods" :key="good.id"
  66. @click="toDetail(good.id)">
  67. <view style="padding: 0 35rpx 20rpx 35rpx;">
  68. <view class="flex flex-space-between row1">
  69. <view class="item1">
  70. {{good.orderNo}}
  71. <!-- {{good.goodsName}} -->
  72. </view>
  73. <view class="item2">
  74. {{good.cargoOwnerStatus}}
  75. </view>
  76. </view>
  77. <view class="flex row2">
  78. <view class="left">
  79. <view class="top">
  80. <view class="ssx">{{$helper.getProvinceAbbreviation(good.sendPrivate?good.sendPrivate:good.sendCity)}}</view>
  81. <view class="level2-title">{{$helper.filterUrban(good.sendCity)}}</view>
  82. </view>
  83. <view class="bottom">{{$helper.filterArea(good.sendArea)}}</view>
  84. </view>
  85. <view class="jt-image">
  86. <image class="jt-icon" src="@/static/images/order/jt.png" mode='widthFix'>
  87. </image>
  88. </view>
  89. <view class="right">
  90. <view class="top">
  91. <view class="ssx">
  92. {{$helper.getProvinceAbbreviation(good.unloadPrivate?good.unloadPrivate:good.unloadCity)}}
  93. </view>
  94. <view class="level2-title">{{$helper.filterUrban(good.unloadCity)}}</view>
  95. </view>
  96. <view class="bottom">
  97. {{$helper.filterArea(good.unloadArea)}}
  98. </view>
  99. </view>
  100. </view>
  101. <view class="flex row3 s-row">
  102. <view class="flex align-center">
  103. <image class="hz" src="@/static/images/news/sj.png"></image>
  104. <view style="margin-right: 20rpx;" @click.stop="goTodriverDetail(good)">{{good.driverName}}</view>
  105. <!-- <view style="margin-right: 20rpx;">{{good.driverCall}}</view> -->
  106. <image class="hz-good" src="@/static/images/order/good-img.png"></image>
  107. <view>{{good.goodsName}}</view>
  108. </view>
  109. <view class="flex align-center">
  110. <view style="margin-right: 20rpx;">运距 {{good.distance}}km</view>
  111. <view v-if="good.cargoOwnerStatus!='已完结'" class="car">{{good.freight?good.freight:good.freightInfo.freight}}{{good.billingMethod==0?'元/吨':'元/车'}}</view>
  112. <view v-else class="car">{{good.freight?good.freight:good.freightInfo.freight}}{{good.billingMethod==0?'元/吨':'元/车'}}</view>
  113. </view>
  114. <!-- <view class="right">
  115. <view class="flex fontsize-26 row">
  116. <view>{{good.compName}}</view>
  117. <view class="sline"></view>
  118. <view>{{good.cargoOwner}}</view>
  119. </view>
  120. <view class="flex align-center">
  121. <view class="fontsize-26 ">运距 {{good.distance}}km</view>
  122. </view>
  123. </view> -->
  124. </view>
  125. <view class="row4 flex align-center">
  126. <view class="time">{{good.updateDate}}</view>
  127. </view>
  128. <view class="row5 flex flex-end">
  129. <!-- <image class="jt-icon" src="@/static/images/order/position.png" mode='widthFix'
  130. @click.stop="toMap(good)">
  131. </image> -->
  132. <view v-if="good.cargoOwnerStatus=='运输中'||good.cargoOwnerStatus=='已完结'" class="start normal look-map" @click.stop="toMap(good)">
  133. 查看轨迹</view>
  134. <view class="stop" @click.stop="accept(good,1)" v-if="good.cargoOwnerStatus=='待接单'">接受
  135. </view>
  136. <!-- <view class="stop active" @click.stop="accept(good,1)">接受</view> -->
  137. <view class="normal" @click.stop="accept(good,2)" v-if="good.cargoOwnerStatus=='待接单'">拒绝
  138. </view>
  139. <view class="normal" @click.stop="stop(good)" v-if="good.cargoOwnerStatus=='未装车'">终止</view>
  140. <!-- <view class="stop active" @click.stop="stop(good)">终止</view> -->
  141. <!-- confirmLoading(good,3) -->
  142. <view v-if="good.cargoOwnerStatus=='待确认装车'" class="start normal" @click.stop="toDetail(good.id)"
  143. >确认装车</view>
  144. <view v-if="good.cargoOwnerStatus=='司机驳回运费信息'" class="start normal" @click.stop="toDetail(good.id)">确认运费</view>
  145. <!-- <view class="start normal" @click.stop="confirmLoading(good,1)">确认装车</view> -->
  146. <view class="start normal" v-if="good.cargoOwnerStatus!='待接单'&&good.cargoOwnerStatus!='未装车'" @click.stop="$helper.contactCustomerService()">
  147. 联系客服</view>
  148. <view class="start normal" @click.stop="toDetail(good.id)"
  149. v-if="good.cargoOwnerStatus=='待收货'">确认卸车</view>
  150. <!-- <view class="start normal" @click.stop="confirmLoading(good,4)"
  151. v-if="good.cargoOwnerStatus=='待收货'">确认卸车</view> -->
  152. <!-- <view class="start normal" @click.stop="confirmLoading(good,2)">确认卸车</view> -->
  153. <!-- <view class="normal" @click.stop="stop(good)" v-if="good.cargoOwnerStatus=='已结算'">付款</view> -->
  154. <!-- <view class="normal" @click.stop="stop(good)"
  155. v-if="good.cargoOwnerStatus=='待还款'||good.cargoOwnerStatus=='已还款'">还款</view> -->
  156. <!-- <view class="start normal" @click.stop="addevaluation(good)" v-if="good.cargoOwnerStatus=='已完结'">评价</view> --><!-- driverEvaluated 为1是已评价过-->
  157. <view class="start normal" @click.stop="addevaluation(good)" v-if="good.cargoOwnerStatus=='已完结' && good.ownerEvaluated != 1" >评价</view>
  158. </view>
  159. </view>
  160. </view>
  161. </mescroll-body>
  162. <!-- </view> -->
  163. <!-- <view v-else class="search-view">
  164. <view class="flex">
  165. <u-icon name="arrow-left" color="" size="20" class="back-icon" @click="back()"></u-icon>
  166. <u-search placeholder="可按编号、货主、收发地查找" placeholderColor="#AFB3BF" :actionStyle="textColor"
  167. bgColor="#F5F6FA" v-model="searchKeyWord" actionText='取消' @custom="cancel" @search="getSearch">
  168. </u-search>
  169. </view>
  170. <view class="near-search">
  171. <view class="flex flex-space-between">
  172. <view class="near-search-text">最近搜索</view>
  173. <u-icon name="trash-fill" color="#AFB3BF" size="20" class="back-icon" @click="del"></u-icon>
  174. </view>
  175. <view class="">
  176. <view v-for="(item,index) in useSearchList" :key="index" class="item-style inline-block">
  177. {{item}}
  178. </view>
  179. </view>
  180. </view>
  181. </view> -->
  182. <u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :confirmText='confirmText'
  183. :closeOnClickOverlay='true' :showCancelButton='showCancelButton' @confirm="confirmClick"
  184. @close="cancelClick" @cancel="cancelClick" class="modal">
  185. </u-modal>
  186. <u-popup :show="show" mode="bottom" @close="close" @open="open">
  187. <view class="">
  188. <view >
  189. <image style='width:12px;height:12px;' @click='closepopup' class='close' src="../../static/images/order/guanbi@3x.png" mode=""></image>
  190. <!-- <u-icon @click="closepopup" class='close' name="close" size="20"></u-icon> -->
  191. </view>
  192. <view style='fon-size:34rpx;margin-bottom:20px;text-align:center;font-weight: 600;'>确认终止订单</view>
  193. <view style="margin: 0 auto;">
  194. <u-radio-group iconPlacement="right" v-model="radiovalue1" placement="" >
  195. <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in radiolist1" :key="index"
  196. :label="item.name" :name="item.name" @change="radioChange" >
  197. </u-radio>
  198. </u-radio-group>
  199. </view>
  200. <view style='border-top:10px solid #F2F4F7;position:absolute;left:0;height:0;width:100%;'></view>
  201. <view style='padding:40rpx 0 30rpx;'>终止原因描述</view>
  202. <u--textarea class="row" v-model="value2" placeholder="终止原因描述" count maxlength='50'>
  203. </u--textarea>
  204. <view class='termination' :class="{'active':value2.length>0}" @click='termination'>终止</view>
  205. </view>
  206. </u-popup>
  207. <u-toast ref="uToast"></u-toast>
  208. </view>
  209. </template>
  210. <script>
  211. var that
  212. import {
  213. mapState
  214. } from 'vuex';
  215. import uniPopup from '@/components/uni-popup/uni-popup.vue'
  216. import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
  217. import {
  218. apiGoods
  219. } from "@/api/mock.js"
  220. export default {
  221. components:{
  222. uniPopup
  223. },
  224. mixins: [MescrollMixin], // 使用mixin
  225. data() {
  226. return {
  227. confirmText: '',
  228. show:false,
  229. showCancelButton: true,
  230. type: null,
  231. objData: {},
  232. showMenu: false,
  233. searchStyle: {
  234. background: "#317AFE",
  235. color: 'white',
  236. position: "absolute",
  237. right: "30rpx",
  238. padding: "6rpx 20rpx",
  239. margin:'0 20rpx 0 0',
  240. "border-radius": '30rpx'
  241. },
  242. upOption: {
  243. page: {
  244. size: 10 // 每页数据的数量,默认10
  245. },
  246. noMoreSize: 0, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  247. empty: {
  248. tip: '暂无相关数据'
  249. }
  250. },
  251. searchKeyWord: '',
  252. useSearchList: [],
  253. mescroll: null,
  254. isShowTerminationReason: false,
  255. id: '',
  256. value2: '',
  257. radiolist1: [{
  258. name: '已与货主协商',
  259. disabled: false
  260. },
  261. {
  262. name: '货主原因终止',
  263. disabled: false
  264. },
  265. {
  266. name: '司机个人原因终止',
  267. disabled: false
  268. }, {
  269. name: '其他',
  270. disabled: false
  271. }
  272. ],
  273. radiovalue1: '已与货主协商',
  274. confirmText: '终止',
  275. alertTitle: '确定终止订单?',
  276. alertContent: "",
  277. isShowAlert: false,
  278. textColor: {
  279. "color": "#AFB3BF"
  280. },
  281. isSearch: false,
  282. startPlace: '齐齐哈尔齐齐哈尔',
  283. endPlace: '全国',
  284. goods: [], // 数据列表
  285. src: 'https://cdn.uviewui.com/uview/album/1.jpg',
  286. height: "", // 需要固定swiper的高度
  287. tabList: [{
  288. name: '全部'
  289. }, {
  290. name: '待接单'
  291. }, {
  292. name: '未发运'
  293. }, {
  294. name: '运输中'
  295. }, {
  296. name: '待收货'
  297. },
  298. {
  299. name: '待结算'
  300. },
  301. {
  302. name: '已结算'
  303. },
  304. {
  305. name: '待还款'
  306. },
  307. {
  308. name: '已还款'
  309. },
  310. {
  311. name: '已完结'
  312. },
  313. {
  314. name: '评价'
  315. },
  316. ],
  317. tabIndex: 0,
  318. scrollTop: 0
  319. }
  320. },
  321. computed: {
  322. ...mapState(['hasLogin', 'userInfo', 'firstAuthentication'])
  323. },
  324. onTabItemTap(e) {
  325. // tab 点击时执行,此处直接接收单击事件
  326. uni.pageScrollTo({
  327. scrollTop: 0,
  328. duration: 300
  329. });
  330. },
  331. created() {
  332. //#ifdef APP-PLUS
  333. // this.getLngLat();
  334. //#endif
  335. },
  336. // async onLoad() {
  337. // that = this
  338. // // #ifdef APP-PLUS
  339. // let _status = await that.$request.baseRequest('get', '/cargoOwnerInfo/firstAuthentication', {
  340. // phone: this.userInfo.phone,
  341. // }).then(res => {
  342. // if(res.data){
  343. // return res.data.authenticationStatus
  344. // }
  345. // })
  346. // if (_status == '已禁用') {
  347. // this.isShowAlert = true
  348. // this.alertTitle = '账号审核中'
  349. // this.confirmText = '退出APP'
  350. // this.showCancelButton = false
  351. // } else {
  352. // console.log(1231233212332312312213)
  353. // }
  354. // // #endif
  355. // },
  356. onShow() {
  357. this.upCallback({
  358. size: 10,
  359. num: 1
  360. })
  361. that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
  362. reCommonId: this.userInfo.id,
  363. }).then(res3 => {
  364. if (res3.data||res3.data==0) {
  365. let name = 'myTip';
  366. let value = res3.data
  367. if (value == 0) {
  368. uni.removeTabBarBadge({
  369. index: 2
  370. })
  371. }
  372. that.$store.commit('$uStore', {
  373. name,
  374. value
  375. });
  376. if (value != 0 && value) {
  377. uni.setTabBarBadge({
  378. index: 2,
  379. text: value + ""
  380. })
  381. }
  382. }
  383. })
  384. },
  385. // onPageScroll(res) {
  386. // this.scrollTop = res.scrollTop
  387. // console.log("页面滚动了", res.scrollTop)
  388. // if (this.scrollTop > 1200) {
  389. // uni.setTabBarItem({
  390. // index: 1,
  391. // text: '返回顶部',
  392. // iconPath: 'static/images/common/top@2x.png',
  393. // selectedIconPath: 'static/images/common/top@2x.png'
  394. // })
  395. // } else {
  396. // uni.setTabBarItem({
  397. // index: 1,
  398. // text: '订单',
  399. // iconPath: 'static/images/common/dingdan@2x(1).png',
  400. // selectedIconPath: 'static/images/common/dingdan@2x.png'
  401. // })
  402. // }
  403. // },
  404. methods: {
  405. closepopup(){
  406. this.show=false
  407. },
  408. close(){
  409. this.show=false
  410. },
  411. goTodriverDetail(val){
  412. uni.$u.route('/pages/order/driverDetail',{
  413. driver:JSON.stringify(val)
  414. });
  415. },
  416. addevaluation(val){
  417. uni.$u.route('/pages/order/addEvaluation',{val:JSON.stringify(val)});
  418. },
  419. evaluationRecord(){
  420. uni.$u.route('/pages/order/evaluationRecord');
  421. },
  422. toMap(val) {
  423. uni.$u.route('/pages/order/map', val);
  424. },
  425. closeMenu() {
  426. this.showMenu = false
  427. },
  428. accept(item, type) {
  429. this.objData = item
  430. this.type = type
  431. if (type == 1) {
  432. this.alertTitle = '确定接受订单?'
  433. this.confirmText = '确定'
  434. } else if (type == 2) {
  435. this.alertTitle = '确定拒绝订单?'
  436. this.confirmText = '确定'
  437. } else {
  438. this.alertTitle = '确定终止订单?'
  439. this.confirmText = '终止'
  440. }
  441. this.isShowAlert = true
  442. },
  443. // 完结
  444. closed(item) {
  445. let that = this
  446. this.$request.baseRequest('post', '/orderInfo/api/editEnd', {
  447. id: item.id,
  448. }).then(res => {
  449. if (res.code == 200) {
  450. this.$refs.uToast.show({
  451. type: 'success',
  452. message: "提交成功",
  453. complete() {
  454. that.upCallback({
  455. size: 10,
  456. num: 1
  457. })
  458. }
  459. })
  460. }
  461. })
  462. .catch(res => {
  463. uni.$u.toast(res.message);
  464. });
  465. },
  466. confirmLoading(item, type) {
  467. this.objData = item
  468. this.type = type
  469. if (type == 3) {
  470. this.alertTitle = '确认装车?'
  471. this.confirmText = '确定'
  472. } else if (type == 4) {
  473. this.alertTitle = '确认卸车?'
  474. this.confirmText = '确定'
  475. }
  476. this.isShowAlert = true
  477. // uni.$u.route('/pages/order/confirmLoading', item);
  478. },
  479. // confirmUnLoading(item) {
  480. // uni.$u.route('/pages/order/confirmUnloading', item);
  481. // },
  482. back() {
  483. uni.navigateBack(-1)
  484. },
  485. mescrollInit(mescroll) {
  486. this.mescroll = mescroll;
  487. },
  488. radioChange(n) {
  489. console.log('radioChange', n);
  490. },
  491. stop(item) {
  492. // // 货主接单
  493. // if (item.orderStatusKey == 1) {
  494. // this.isShowTerminationReason = false
  495. // } else {
  496. // this.isShowTerminationReason = true
  497. // }
  498. // this.alertTitle = '确定终止订单?'
  499. this.id = item.id
  500. this.show = true
  501. },
  502. init() {
  503. },
  504. del() {
  505. this.isShowAlert = true
  506. },
  507. termination(){
  508. var that=this
  509. let _terminationReason = ''
  510. if (this.radiovalue1 == '已与货主协商') {
  511. _terminationReason = 1
  512. } else if (this.radiovalue1 == '货主原因终止') {
  513. _terminationReason = 2
  514. } else if (this.radiovalue1 == '司机个人原因终止') {
  515. _terminationReason = 3
  516. } else if (this.radiovalue1 == '其他') {
  517. _terminationReason = 4
  518. }
  519. this.$request.baseRequest('post', '/orderInfo/api/end', {
  520. id: this.id,
  521. terminator: 2,
  522. terminationReason: _terminationReason,
  523. terminationReasonDescription: this.value2
  524. }).then(res => {
  525. if (res.code == 200) {
  526. this.show=false
  527. this.$refs.uToast.show({
  528. type: 'success',
  529. message: '终止订单成功',
  530. })
  531. } else {
  532. this.$refs.uToast.show({
  533. type: 'success',
  534. message: '终止订单失败',
  535. })
  536. }
  537. that.mescroll.resetUpScroll()
  538. })
  539. .catch(res => {
  540. uni.$u.toast(res.message);
  541. });
  542. },
  543. confirmClick() {
  544. var that =this
  545. // // #ifdef APP-PLUS
  546. // if (this.alertTitle == '账号审核中') {
  547. // if (uni.getSystemInfoSync().platform == 'ios') {
  548. // plus.ios.import("UIApplication").sharedApplication().performSelector("exit")
  549. // } else if (uni.getSystemInfoSync().platform == 'android') {
  550. // plus.runtime.quit();
  551. // }
  552. // return
  553. // }
  554. // // #endif
  555. that.isShowAlert = false
  556. if (this.type == 1 || this.type == 2) {
  557. let _title = ''
  558. this.$request.baseRequest('post', '/orderInfo/api/orderReceiving', {
  559. id: this.objData.id,
  560. flag: this.type
  561. }).then(res => {
  562. if (res.code == 200) {
  563. if (this.type == 1) {
  564. _title = '接单成功!'
  565. } else {
  566. _title = '拒绝订单成功!'
  567. }
  568. this.$refs.uToast.show({
  569. type: 'success',
  570. message: _title,
  571. complete() {
  572. that.upCallback({size: 10,num: 1})
  573. that.mescroll.resetUpScroll()
  574. }
  575. })
  576. } else {
  577. if (this.type == 1) {
  578. _title = '接单失败'
  579. } else {
  580. _title = '拒绝订单失败'
  581. }
  582. this.$refs.uToast.show({
  583. type: 'success',
  584. message: _title,
  585. complete() {
  586. that.upCallback({size: 10,num: 1})
  587. that.mescroll.resetUpScroll()
  588. }
  589. })
  590. }
  591. })
  592. .catch(res => {
  593. uni.$u.toast(res.message);
  594. });
  595. } else if (this.type == 3 || this.type == 4) {
  596. let _flag = ''
  597. if (this.type == 3) _flag = 1
  598. if (this.type == 4) _flag = 2
  599. this.$request.baseRequest('post', '/carrierInfo/cargoOwnerLoadingAdd', {
  600. id: this.objData.id,
  601. loadingFlag: _flag,
  602. flag: 1
  603. }).then(res => {
  604. if (res.code == 200) {
  605. this.$refs.uToast.show({
  606. type: 'success',
  607. message: "提交成功",
  608. complete() {
  609. that.upCallback({
  610. size: 10,
  611. num: 1
  612. })
  613. }
  614. })
  615. }
  616. })
  617. .catch(res => {
  618. uni.$u.toast(res.message);
  619. });
  620. }
  621. },
  622. cancelClick() {
  623. this.isShowAlert = false
  624. },
  625. getSearch(e) {
  626. console.log("点击搜索", e)
  627. this.upCallback({
  628. size: 10,
  629. num: 1
  630. })
  631. },
  632. cancel() {
  633. this.isSearch = false
  634. },
  635. toDetail(id) {
  636. uni.$u.route('/pages/order/orderDetails', {
  637. id: id,
  638. });
  639. },
  640. upCallback(page) {
  641. if (!this.searchType) {
  642. this.searchType = 0
  643. }
  644. this.$request.baseRequest('get', '/orderInfo/selectCargoOwnerOrder', {
  645. cargoCommonId: this.userInfo.id,
  646. searchKeyWord: this.searchKeyWord,
  647. searchType: this.searchType,
  648. pageSize: page.size,
  649. currentPage: page.num
  650. }).then(res => {
  651. this.isSearch = false
  652. if (page.num == 1) this.goods = [];
  653. this.goods = this.goods.concat(res.data.records); //追加新数据
  654. this.mescroll.endBySize(res.data.records.length, res.data.total);
  655. uni.hideLoading()
  656. })
  657. .catch(res => {
  658. uni.$u.toast(res.message);
  659. });
  660. },
  661. clickTab(val) {
  662. uni.showLoading({
  663. mask: true
  664. })
  665. console.log(val)
  666. this.searchType = val.index
  667. this.tabIndex = val.index
  668. this.upCallback({
  669. size: 10,
  670. num: 1
  671. })
  672. this.showMenu = false
  673. },
  674. search() {
  675. this.isSearch = true
  676. //获取缓存搜索数据
  677. this.useSearchList = uni.getStorageSync('useSearchList')
  678. if (!this.useSearchList) this.useSearchList = [];
  679. }
  680. }
  681. }
  682. </script>
  683. <style scoped lang="scss">
  684. .content{
  685. padding-bottom: 160px;
  686. }
  687. .ssx{
  688. position:relative;top:3rpx;
  689. }
  690. .top-content {
  691. background: url(../../static/images/order/bg.png) no-repeat;
  692. background-size: cover;
  693. padding: 20rpx;
  694. position: fixed;
  695. z-index: 99;
  696. width: 100%;
  697. // margin-top: var(--status-bar-height);
  698. // padding-bottom: 320rpx;
  699. }
  700. .fix-content{
  701. // width: 96%;
  702. margin-right: 20rpx;
  703. }
  704. // .banner {
  705. // width: 100%;
  706. // position: relative;
  707. // }
  708. // .fixed,
  709. // .fixed1 {
  710. // background: #2772FB;
  711. // position: fixed;
  712. // top: var(--status-bar-height);
  713. // z-index: 999;
  714. // width: 100%;
  715. // }
  716. // .fixed {
  717. // .title {
  718. // background: white;
  719. // position: relative;
  720. // font-size: 36rpx;
  721. // font-weight: 500;
  722. // color: rgba(0, 0, 0, 0.85);
  723. // .search {
  724. // position: absolute;
  725. // right: 20rpx;
  726. // }
  727. // }
  728. // }
  729. .fixed1 {
  730. top: 0;
  731. height: var(--status-bar-height);
  732. background: #317AFE;
  733. // position: fixed;
  734. // z-index: 9999;
  735. }
  736. // .banner-img {
  737. // width: 100%;
  738. // }
  739. // .head {
  740. // position: absolute;
  741. // width: calc(100% - 108rpx);
  742. // bottom: 0;
  743. // background: white;
  744. // margin: 0 20rpx;
  745. // border-radius: 20rpx;
  746. // .item1,
  747. // .item3 {
  748. // width: 40%;
  749. // .text {
  750. // text-overflow: ellipsis;
  751. // overflow: hidden;
  752. // white-space: nowrap;
  753. // }
  754. // }
  755. // .item1 .text {
  756. // text-align: left;
  757. // }
  758. // .item3 .text {
  759. // text-align: right;
  760. // }
  761. // }
  762. .change-btn {
  763. width: 86rpx;
  764. height: 86rpx;
  765. }
  766. .good-list {
  767. background-color: white;
  768. margin: 20rpx;
  769. padding: 20rpx 0rpx 0 0;
  770. border-radius: 20rpx;
  771. .row1 {
  772. .item1 {
  773. color: #333333;
  774. }
  775. .item2 {
  776. color: #FE6300;
  777. }
  778. }
  779. .row2 {
  780. margin: 30rpx 0;
  781. display: flex;
  782. justify-content: center;
  783. .left {
  784. float: left;
  785. width: 40%;
  786. display: flex;
  787. flex-direction: column;
  788. align-items: center;
  789. .top {
  790. display: flex;
  791. justify-content: flex-start;
  792. }
  793. .bottom {
  794. display: flex;
  795. justify-content: flex-start;
  796. font-size: 24rpx;
  797. color: #878787;
  798. margin-top: 10rpx;
  799. }
  800. }
  801. .right {
  802. float: right;
  803. display: flex;
  804. flex-direction: column;
  805. align-items: center;
  806. width: 40%;
  807. .top {
  808. display: flex;
  809. justify-content: flex-end;
  810. }
  811. .bottom {
  812. display: flex;
  813. justify-content: flex-end;
  814. font-size: 24rpx;
  815. color: #878787;
  816. margin-top: 10rpx;
  817. }
  818. }
  819. }
  820. .row3 {
  821. background: #F5F6FA;
  822. padding: 20rpx;
  823. border-radius: 10rpx;
  824. color: #333333;
  825. .hz {
  826. width: 74rpx;
  827. height: 74rpx;
  828. margin-right: 30rpx;
  829. }
  830. .hz-good {
  831. width: 44rpx;
  832. height: 44rpx;
  833. margin: 0 30rpx;
  834. }
  835. }
  836. .row4 {
  837. margin: 20rpx 0;
  838. .time {
  839. color: #999999;
  840. margin-right: 20rpx;
  841. }
  842. .car {
  843. font-size: 28rpx;
  844. color: #000000;
  845. }
  846. }
  847. .row5 {
  848. margin: 20rpx 0;
  849. font-size: 28rpx;
  850. .stop {
  851. border-radius: 33px;
  852. border: 1px solid #FE6300;
  853. padding: 13rpx 31rpx;
  854. margin-right: 20rpx;
  855. color: #FE6300;
  856. }
  857. .normal {
  858. border-radius: 33px;
  859. border: 1px solid #CDCDCD;
  860. padding: 6px 15px;
  861. margin-right: 10px;
  862. }
  863. }
  864. }
  865. .jt-icon {
  866. position: relative;
  867. top: 6rpx;
  868. width: 60rpx;
  869. margin: 0 20rpx;
  870. }
  871. .row {
  872. margin: 10rpx 0;
  873. align-items: center;
  874. }
  875. // .item-bottom {
  876. // background: #F0F5FF;
  877. // padding: 0 30rpx;
  878. // .name {
  879. // font-size: 26rpx;
  880. // font-weight: 700;
  881. // color: #000000;
  882. // margin-left: 30rpx;
  883. // }
  884. // .hp {
  885. // margin: 30rpx;
  886. // }
  887. // .number-color {
  888. // margin: 0 10rpx;
  889. // }
  890. // .qd {
  891. // background: linear-gradient(97deg, #4FABFD 0%, #2772FB 100%);
  892. // border-radius: 13px;
  893. // font-size: 29rpx;
  894. // font-weight: 400;
  895. // color: #FFFFFF;
  896. // padding: 10rpx 35rpx;
  897. // }
  898. // }
  899. .dw {
  900. align-items: center;
  901. }
  902. .mescroll {
  903. // margin-top: calc(var(--status-bar-height) + 140rpx);
  904. top: 280rpx;
  905. }
  906. .sline {
  907. height: 28rpx;
  908. width: 1px;
  909. background: black;
  910. margin: 0 20rpx;
  911. }
  912. .search-view {
  913. margin-top: var(--status-bar-height);
  914. background: white;
  915. padding: 0 20rpx;
  916. }
  917. .back-icon {
  918. margin-right: 20rpx;
  919. }
  920. .near-search-text {
  921. margin: 20rpx 0;
  922. }
  923. .item-style {
  924. background: #F5F6FA;
  925. padding: 11rpx 24rpx;
  926. margin-right: 20rpx;
  927. border-radius: 10px;
  928. font-size: 26rpx;
  929. color: #333333;
  930. }
  931. /deep/.u-modal__content {
  932. flex-direction: column;
  933. }
  934. .tab-content {
  935. position: relative;
  936. padding-right: 100rpx;
  937. }
  938. .right-btn {
  939. position: absolute;
  940. width: 88rpx;
  941. height: 88rpx;
  942. background: #317AFE;
  943. box-shadow: -14px 0px 8px -8px rgba(0, 53, 149, 0.21);
  944. display: flex;
  945. flex-direction: column;
  946. right: 0;
  947. top: 0;
  948. bottom: 0;
  949. margin: auto;
  950. color: white;
  951. align-items: center;
  952. justify-content: center;
  953. }
  954. .tabs {
  955. // background: red;
  956. margin-top: 20rpx;
  957. overflow-x: scroll;
  958. }
  959. /deep/.u-transition {
  960. border-radius: 0 0 50rpx 50rpx;
  961. }
  962. .transition {
  963. background: white;
  964. padding-bottom: 40rpx;
  965. .transition-item-style {
  966. display: inline-block;
  967. width: calc(25% - 40rpx);
  968. text-align: center;
  969. box-sizing: border-box;
  970. background: #F7F8FA;
  971. border-radius: 40px;
  972. margin: 20rpx 20rpx 0 20rpx;
  973. padding: 16rpx 0;
  974. }
  975. .menu-active {
  976. background: #2772FB;
  977. color: white;
  978. }
  979. }
  980. .modal-black {
  981. background: black;
  982. height: 100vh;
  983. width: 100vw;
  984. position: absolute;
  985. z-index: 999;
  986. opacity: 0.3;
  987. }
  988. .all-menu {
  989. position: absolute;
  990. z-index: 99;
  991. top: 260rpx;
  992. }
  993. .look-map {
  994. background: #2772FB;
  995. border:1px solid #2772FB;
  996. color: white;
  997. }
  998. .evaluatePage{
  999. background: white;
  1000. margin: 20rpx;
  1001. padding: 20rpx;
  1002. border-radius: 20rpx;
  1003. }
  1004. /deep/.u-popup__content{
  1005. border-radius: 10px;
  1006. padding:20px;
  1007. }
  1008. /deep/.u-radio{
  1009. margin:40rpx 0;
  1010. }
  1011. .close{
  1012. position:absolute;
  1013. right:20px;
  1014. top:26px;
  1015. }
  1016. .termination{
  1017. background:#F1F3F6;
  1018. color:#C5CAD4;
  1019. padding:10px;
  1020. border-radius:30px;
  1021. text-align: center;
  1022. margin-top:30rpx;
  1023. }
  1024. .termination.active{
  1025. background: #2772FB;
  1026. color: white;
  1027. }
  1028. .quanbu{
  1029. width:16px;
  1030. height:16px;
  1031. }
  1032. .pingjia{
  1033. width:14px;
  1034. height:14px;
  1035. }
  1036. </style>