index.vue 25 KB

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