index.vue 28 KB

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