index.vue 28 KB

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