index.vue 28 KB

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