index.vue 25 KB

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