index.vue 28 KB

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