index.vue 27 KB

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