index.vue 27 KB

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