12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064 |
- <!-- 订单 -->
- <template>
- <view class="content">
- <view class="fixed1"></view>
- <view v-if="!isSearch">
- <view class="fixed">
- <view class='title flex flex-center'>
- <view>订单</view>
- <image class="search" style='width:18px;height:18px;' src="../../static/images/search_icon.png"
- @click="search" mode=""></image>
- <!-- <u-icon class="search" name="search" color="" size="28" @click="search"></u-icon> -->
- </view>
- <view class="tab-content">
- <u-tabs :list="tabList" @click="clickTab" lineColor='#2772FB' :current='tabIndex' :activeStyle="{
- color: '#2772FB',
- fontWeight: 'bold',
- transform: 'scale(1.05)'
- }"></u-tabs>
- <view class="right-btn flex align-center" @click="showMenu=!showMenu">
- <!-- <view class="">
- 全部类型
- </view> -->
- <image style='width:8px;height:8px;'
- :src="!showMenu?'../../static/images/order/xiala.png':'../../static/images/order/shangla.png'"
- mode=""></image>
- <!-- <u-icon :name="!showMenu?'arrow-down-fill':'arrow-up-fill'" color="#333333" size="12"></u-icon> -->
- </view>
- </view>
- </view>
- <view class="all-menu">
- <u-transition :show="showMenu" mode="fade">
- <view class="" style="background: white;padding:71rpx 0 23rpx 20rpx;font-weight: 700;">
- 类型
- </view>
- <view class="transition">
- <view v-for="(item,index) in tabList" class="transition-item-style"
- :class="tabIndex==index?'menu-active':''" @click="clickTab({index:index})">
- {{item.name}}
- </view>
- </view>
- </u-transition>
- <view @touchmove.stop.prevent="moveHandle" class="modal-black" v-show="showMenu"></view>
- </view>
- <mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
- class="mescroll">
- <view class="evaluatePage flex flex-space-between" v-show="tabIndex == 6" @click="evaluateClick">
- <view class="left flex flex-space-between" @click="evaluateClick">
- <!-- <u-icon size="20" name="edit-pen"></u-icon> -->
- <image style='width:14px;height:14px;margin-right:7px;'
- src="../../static/images/order/pingjiabianji.png" mode=""></image>
- <view style="margin-left: 20prx;">我的评价</view>
- </view>
- <view class="right">
- <image style='width:12px;height:12px;' src="../../static/images/order/right.png" mode="">
- </image>
- </view>
- </view>
- <view :id="'good'+good.id" class="good-list" v-for="good in goods" @click="toDetail(good)">
- <view style="padding: 0 35rpx 20rpx 35rpx;">
- <view class="flex flex-space-between row1">
- <view class="item1">
- {{good.orderNo}} {{good.goodsName}}
- </view>
- <view class="item2">
- {{good.orderStatus}}
- </view>
- </view>
- <view class="flex row2">
- <view class="left flex flex-space-between">
- <view class="ssx">
- {{$helper.getProvinceAbbreviation(good.sendPrivate?good.sendPrivate:good.sendCity)}}
- </view>
- <view class="level2-title">{{$helper.filterUrban(good.sendCity)}}
- {{$helper.filterArea(good.sendArea)}}
- </view>
- <view>
- <image class="jt-icon" src="@/static/images/goodSource/jt.png" mode='widthFix'>
- </image>
- </view>
- <view class="ssx">
- {{$helper.getProvinceAbbreviation(good.unloadPrivate?good.unloadPrivate:good.unloadCity)}}
- </view>
- <view class="level2-title">{{$helper.filterUrban(good.unloadCity)}}
- {{$helper.filterArea(good.unloadArea)}}
- </view>
- </view>
- </view>
- <view class="flex row3">
- <view class="left">
- <image class="hz" src="@/static/images/news/hz.png"></image>
- </view>
- <view class="right">
- <view class="flex row">
- <view>{{good.compName}}</view>
- <view class="sline"></view>
- <view style="min-width: 100rpx;">{{good.cargoOwner}}</view>
- </view>
- <view class="flex align-center">
- <view class="">运距 {{good.distance}}km</view>
- </view>
- </view>
- </view>
- <view class="row4 flex flex-end align-center">
- <view class="time">{{good.updateDate}}</view>
- <!-- 货主装车确认前运费 -->
- <view class="car"
- v-if="good.orderStatus=='待货主确认'||good.orderStatus=='未装车'||good.orderStatus=='待货主确认装车'||good.orderStatus=='货主驳回装车信息'||good.orderStatus=='已终止'">
- <!-- {{good.freightPrice?good.illingMethod==0?good.freight:good.freightCar:good.freight}}{{good.illingMethod==0?'元/吨':'元/车'}} -->
- <!-- {{good.billingMethod==0?good.freightInfo.freight?good.freightInfo.freight:good.freight:good.freightCar}}{{good.billingMethod==0?'元/吨':'元/车'}} -->
- {{good.freight}}{{good.billingMethod==0?'元/吨':'元/车'}}
- </view>
- <!-- 货主装车确认后卸车确认前运费 -->
- <view class="car"
- v-if="good.orderStatus=='待平台确认装车'||good.orderStatus=='平台驳回装车信息'||good.orderStatus=='运输中'||good.orderStatus=='待货主确认卸车'||good.orderStatus=='货主驳回卸车信息'">
- <!-- {{good.estimatedFreight}}{{good.illingMethod==0?'元/吨':'元/车'}} -->
- {{good.freight}}{{good.billingMethod==0?'元/吨':'元/车'}}
- </view>
- <!-- 货主装车卸车确认后 -->
- <view class="car"
- v-if="good.orderStatus=='待平台确认卸车'||good.orderStatus=='平台驳回卸车信息'||good.orderStatus=='待结算'||good.orderStatus=='已完结'||good.orderStatus=='结算中'||good.orderStatus=='待结算'">
- <!-- {{good.totalFreight}}{{good.illingMethod==0?'元/吨':'元/车'}} -->
- {{good.freight}}{{good.billingMethod==0?'元/吨':'元/车'}}
- </view>
- <!-- <view class='pay flex'
- v-if="good.orderStatus=='运输中'||good.orderStatus=='待货主确认卸车'||good.orderStatus=='待平台确认卸车'||good.orderStatus=='货主驳回卸车信息'||good.orderStatus=='平台驳回卸车信息'||good.orderStatus=='结算中'||good.orderStatus=='待结算'">
- <div>已付</div>
- <div class='number'>¥{{good.totalRepayable}}</div>
- <div class='number'>11</div>
- </view> -->
- </view>
- <view class="row5 flex flex-end">
- <view class="stop active" @click.stop="toggle(good)"
- v-if="good.orderStatus=='待货主确认'||good.orderStatus=='未装车'">终止</view>
- <!-- <view class="stop active" @click.stop="stop(good)"
- v-if="good.orderStatus=='待货主确认'||good.orderStatus=='未装车'">终止</view> -->
- <!-- <view class="start normal" @click.stop="confirmLoading(good)"
- v-if="good.orderStatus=='未装车'||good.orderStatus=='货主驳回装车信息'||good.orderStatus=='平台驳回装车信息'">
- 确认装车</view> -->
- <view class="start normal" @click.stop="toDetail(good)"
- v-if="good.orderStatus=='未装车'||good.orderStatus=='货主驳回装车信息'||good.orderStatus=='平台驳回装车信息'">
- 确认装车</view>
- <view class="start normal" v-if="good.orderStatus!='未装车'&&good.orderStatus!='待货主确认'"
- @click.stop="$helper.contactCustomerService()">联系客服
- </view>
- <view class="start normal" @click.stop="confirmUnLoading(good)"
- v-if="good.orderStatus=='运输中'||good.orderStatus=='货主驳回卸车信息'||good.orderStatus=='平台驳回卸车信息'">
- 确认卸车</view>
- <view class="start normal" @click.stop="closed(good)" v-if="good.orderStatus=='结算中'">完结
- </view>
- <view class="start normal" @click.stop="toDetail(good)" v-if="good.orderStatus=='待确认运费'">
- 确认运费
- </view>
- <!-- <view class="start normal" @click.stop="addevaluation(good)" v-if="good.orderStatus=='已完结'">评价</view> -->
- <view class="start normal" @click.stop="addevaluation(good)"
- v-if="good.orderStatus=='已完结' && good.driverEvaluated != 1">
- <!-- driverEvaluated 为1是已评价过-->
- 评价
- </view>
- </view>
- </view>
- </view>
- </mescroll-body>
- </view>
- <view v-else class="search-view">
- <view class="flex">
- <u-icon name="arrow-left" color="" size="20" class="back-icon" @click="back()"></u-icon>
- <u-search placeholder="可按编号、货主、收发地查找" placeholderColor="#AFB3BF" :actionStyle="textColor"
- bgColor="#F5F6FA" v-model="searchKeyWord" actionText='取消' @custom="cancel" @search="getSearch">
- </u-search>
- </view>
- <view class="near-search">
- <view class="flex flex-space-between">
- <view class="near-search-text">最近搜索</view>
- <u-icon name="trash-fill" color="#AFB3BF" size="20" class="back-icon" @click="del"></u-icon>
- </view>
- <view class="">
- <view v-for="(item,index) in useSearchList" :key="index" class="item-style inline-block"
- @click="getSearch(item)">
- {{item}}
- </view>
- </view>
- </view>
- </view>
- <u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :closeOnClickOverlay='true'
- :showCancelButton='showCancelButton' confirmColor='#2772FB' @confirm="$u.throttle(confirmClick, 1000)"
- @close="cancelClick" @cancel="cancelClick">
- <view style="margin: 0 auto;">
- <u-radio-group v-model="radiovalue1" placement="" v-if='isShowTerminationReason'>
- <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in radiolist1" :key="index"
- :label="item.name" :name="item.name" @change="radioChange">
- </u-radio>
- </u-radio-group>
- </view>
- <u--textarea class="row" v-model="value2" placeholder="终止原因描述" count maxlength='50'
- v-if='isShowTerminationReason'>
- </u--textarea>
- </u-modal>
- <!-- 普通弹窗 -->
- <u-popup :show="show" mode="bottom" @close="close" @open="open">
- <view class="u-popup-wrap">
- <view>
- <image style='width:12px;height:12px;' @click='closepopup' class='close'
- src="../../static/images/order/guanbi@3x.png" mode=""></image>
- <!-- <u-icon @click="closepopup" class='close' name="close" size="20"></u-icon> -->
- </view>
- <view style='fon-size:34rpx;margin-bottom:20px;text-align:center;font-weight: 600;'>确认终止订单</view>
- <view style="margin: 0 auto;">
- <u-radio-group iconPlacement="right" v-model="radiovalue1" placement=""
- v-if='isShowTerminationReason'>
- <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in radiolist1" :key="index"
- :label="item.name" :name="item.name" @change="radioChange">
- </u-radio>
- </u-radio-group>
- </view>
- <view style='border-top:10px solid #F2F4F7;position:absolute;left:0;height:0;width:100%;'></view>
- <view style='padding:40rpx 0 30rpx;'>终止原因描述</view>
- <u--textarea class="row" v-model="value2" placeholder="终止原因描述" count maxlength='50'
- v-if='isShowTerminationReason'>
- </u--textarea>
- <view class='termination' :class="{'active':value2.length>0}" @click='$u.throttle(confirmClick, 1000)'>
- 终止</view>
- </view>
- </u-popup>
- <u-toast ref="uToast"></u-toast>
- <!-- <view class="modal-black" v-show="showMenu" @click="closeMenu"></view> -->
- </view>
- </template>
- <script>
- var that
- import {
- mapState
- } from 'vuex';
- import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
- import {
- apiGoods
- } from "@/api/mock.js"
- import uniPopup from '@/components/uni-popup/uni-popup.vue'
- export default {
- components: {
- uniPopup
- },
- mixins: [MescrollMixin], // 使用mixin
- data() {
- return {
- confirmText: '确定',
- showCancelButton: true,
- showMenu: false,
- show: false,
- type: 'bottom',
- searchStyle: {
- background: "#317AFE",
- color: 'white',
- position: "absolute",
- right: "30rpx",
- padding: "6rpx 20rpx",
- "border-radius": '30rpx'
- },
- // isShowStopBtn: false,
- // isConfirmLoadingBtn:false,
- // isShowCustomerServiceBtn:false,
- // isConfirmUnLoadingBtn:false,
- // isClosedBtn:false,
- searchKeyWord: '',
- useSearchList: [],
- mescroll: null,
- isShowTerminationReason: false,
- id: '',
- value2: '',
- radiolist1: [{
- name: '已与货主协商',
- disabled: false
- },
- {
- name: '货主原因终止',
- disabled: false
- },
- {
- name: '司机个人原因终止',
- disabled: false
- }, {
- name: '其他',
- disabled: false
- }
- ],
- radiovalue1: '已与货主协商',
- confirmText: '终止',
- alertTitle: '确定终止订单?',
- alertContent: "",
- isShowAlert: false,
- textColor: {
- "color": "#AFB3BF"
- },
- isSearch: false,
- startPlace: '齐齐哈尔齐齐哈尔',
- endPlace: '全国',
- isdblclick: 0,
- goods: [], // 数据列表
- src: 'https://cdn.uviewui.com/uview/album/1.jpg',
- height: "", // 需要固定swiper的高度
- tabList: [{
- name: '全部'
- }, {
- name: '未发运'
- }, {
- name: '运输中'
- }, {
- name: '待收货'
- }, {
- name: '待结算'
- },
- {
- name: '已完结'
- },
- {
- name: '评价'
- },
- ],
- tabIndex: 0,
- scrollTop: 0
- }
- },
- computed: {
- ...mapState(['hasLogin', 'userInfo', 'firstAuthentication'])
- },
- onTabItemTap(e) {
- this.isdblclick++
- // tab 点击时执行,此处直接接收单击事件
- if (this.scrollTop > 1200) {
- if (this.isdblclick > 1) {
- uni.pageScrollTo({
- scrollTop: 0,
- duration: 300
- });
- }
- }
- },
- created() {
- //#ifdef APP-PLUS
- // this.getLngLat();
- //#endif
- },
- // async onLoad() {
- // that = this
- // // #ifdef APP-PLUS
- // let _status = await that.$request.baseRequest('get', '/driverInfo/firstAuthentication', {
- // driverPhone: this.userInfo.phone,
- // }).then(res => {
- // return res.data.authenticationStatus
- // })
- // // if (_status == '已禁用') {
- // // this.isShowAlert = true
- // // this.alertTitle = '账号审核中'
- // // this.confirmText = '退出APP'
- // // this.showCancelButton = false
- // // } else {
- // // console.log(1231233212332312312213)
- // // }
- // // #endif
- // },
- onHide() {
- this.isdblclick = 0
- },
- onShow() {
- if (this.scrollTop > 1200) {
- uni.setTabBarItem({
- index: 2,
- text: '返回顶部',
- iconPath: 'static/images/common/top@2x.png',
- selectedIconPath: 'static/images/common/top@2x.png'
- })
- }
- uni.setTabBarItem({
- index: 0,
- text: '货源',
- iconPath: 'static/images/common/huoyuan@2x(1).png',
- selectedIconPath: 'static/images/common/huoyuan@2x.png'
- })
- var that = this
- that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
- reCommonId: this.userInfo.id,
- }).then(res3 => {
- if (res3.data || res3.data == 0) {
- let name = 'myTip';
- let value = res3.data
- if (value == 0) {
- uni.removeTabBarBadge({
- index: 3
- })
- }
- that.$store.commit('$uStore', {
- name,
- value
- });
- if (value != 0 && value) {
- uni.setTabBarBadge({
- index: 3,
- text: value + ""
- })
- }
- }
- })
- this.upCallback({
- size: 10,
- num: 1
- })
- },
- onPageScroll(res) {
- this.scrollTop = res.scrollTop
- // console.log("页面滚动了", res.scrollTop)
- if (this.scrollTop > 1200) {
- uni.setTabBarItem({
- index: 2,
- text: '返回顶部',
- iconPath: 'static/images/common/top@2x.png',
- selectedIconPath: 'static/images/common/top@2x.png'
- })
- } else {
- uni.setTabBarItem({
- index: 2,
- text: '订单',
- iconPath: 'static/images/common/dingdan@2x(1).png',
- selectedIconPath: 'static/images/common/dingdan@2x.png'
- })
- }
- },
- methods: {
- moveHandle() {
- // this.closeMenu()
- // console.log(1111)
- },
- closepopup() {
- this.show = false
- },
- toggle(item) {
- this.id = item.id
- if (item.orderStatusKey == 1) {
- this.isShowTerminationReason = false
- } else {
- this.isShowTerminationReason = true
- }
- if (item.orderStatus == '未装车') {
- this.show = true
- } else {
- this.isShowAlert = true
- }
- },
- open() {
- // console.log('open');
- },
- close() {
- this.show = false
- // console.log('close');
- },
- addevaluation(good) {
- uni.$u.route('/pages/order/addEvaluation', {
- val: JSON.stringify(good)
- });
- },
- evaluateClick() {
- //我的评价记录
- uni.$u.route('/pages/order/evaluateList');
- },
- closeMenu() {
- this.showMenu = false
- },
- // 完结
- closed(item) {
- this.$request.baseRequest('post', '/orderInfo/api/editEnd', {
- id: item.id,
- }).then(res => {
- if (res.code == 200) {
- this.$refs.uToast.show({
- type: 'success',
- message: "提交成功",
- complete() {
- that.upCallback({
- size: 10,
- num: 1
- })
- }
- })
- }
- })
- .catch(res => {
- uni.$u.toast(res.message);
- });
- },
- confirmLoading(item) {
- uni.$u.route('/pages/order/confirmLoading', item);
- },
- confirmUnLoading(item) {
- uni.$u.route('/pages/order/confirmUnloading', {
- obj: JSON.stringify(item)
- });
- },
- back() {
- uni.navigateBack(-1)
- },
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- radioChange(n) {
- console.log('radioChange', n);
- },
- stop(item) {
- // 货主接单
- if (item.orderStatusKey == 1) {
- this.isShowTerminationReason = false
- } else {
- this.isShowTerminationReason = true
- }
- this.id = item.id
- this.isShowAlert = true
- },
- init() {
- },
- del() {
- this.isShowAlert = true
- this.alertTitle = '确定删除全部历史记录?'
- this.confirmText = '确定'
- },
- confirmClick() {
- // #ifdef APP-PLUS
- if (this.alertTitle == '账号审核中') {
- if (uni.getSystemInfoSync().platform == 'ios') {
- plus.ios.import("UIApplication").sharedApplication().performSelector("exit")
- } else if (uni.getSystemInfoSync().platform == 'android') {
- plus.runtime.quit();
- }
- return
- }
- // #endif
- var that = this
- if (this.alertTitle == '确定删除全部历史记录?') {
- uni.removeStorageSync('useSearchList');
- this.useSearchList = [];
- this.isShowAlert = false
- } else {
- console.log('终止', this.radiovalue1 == '其他' && !this.value2)
- if (this.radiovalue1 == '其他' && !this.value2) {
- uni.showToast({
- title: '请填写终止原因描述',
- icon: 'none',
- duration: 2000
- });
- return
- }
- let _terminationReason = ''
- if (this.radiovalue1 == '已与货主协商') {
- _terminationReason = 1
- } else if (this.radiovalue1 == '货主原因终止') {
- _terminationReason = 2
- } else if (this.radiovalue1 == '司机个人原因终止') {
- _terminationReason = 3
- } else if (this.radiovalue1 == '其他') {
- _terminationReason = 4
- }
- this.$request.baseRequest('post', '/orderInfo/api/end', {
- id: this.id,
- terminator: 1,
- terminationReason: _terminationReason,
- terminationReasonDescription: this.value2
- }).then(res => {
- console.log(res)
- if (res.code == 200) {
- this.$refs.uToast.show({
- type: 'success',
- message: "终止订单成功",
- complete() {
- that.mescroll.resetUpScroll()
- }
- })
- } else {
- uni.$u.toast("终止订单失败!");
- }
- this.show = false
- this.isShowAlert = false
- })
- .catch(res => {
- uni.$u.toast(res.message);
- });
- }
- },
- cancelClick() {
- this.isShowAlert = false
- },
- getSearch(e) {
- console.log(e)
- if (!e) {
- this.$refs.uToast.show({
- type: 'error',
- message: "搜索内容不能为空!",
- })
- return
- }
- this.useSearchList.unshift(e)
- this.useSearchList = [...new Set(this.useSearchList)]
- uni.setStorageSync("useSearchList", this.useSearchList)
- if (this.useSearchList.length > 9) {
- this.carList.splice(this.useSearchList.length, 1)
- }
- console.log("点击搜索", e)
- this.upCallback({
- size: 10,
- num: 1
- })
- },
- cancel() {
- this.isSearch = false
- },
- toDetail(item) {
- if (item.orderStatus != '待货主确认') {
- uni.$u.route('/pages/order/orderDetails', {
- id: item.id,
- });
- }
- },
- /*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
- upCallback(page) {
- // uni.$u.sleep(300).then(() => {
- uni.showLoading({
- mask: true,
- title: '加载中'
- })
- // })
- // 此处可以继续请求其他接口
- // if(page.num == 1){
- // // 请求其他接口...
- // }
- // 如果希望先请求其他接口,再触发upCallback,可参考以下写法
- // if(!this.isInitxx){
- // apiGetxx().then(res=>{
- // this.isInitxx = true
- // this.mescroll.resetUpScroll() // 重新触发upCallback
- // }).catch(()=>{
- // this.mescroll.endErr()
- // })
- // return // 此处return,先获取xx
- // }
- // 订单状态12345
- this.$request.baseRequest('get', '/orderInfo/selectOrderInfo', {
- commonId: this.userInfo.id,
- searchKeyWord: this.searchKeyWord,
- searchType: this.searchType,
- pageSize: page.size,
- currentPage: page.num
- }).then(res => {
- this.isSearch = false
- if (page.num == 1) this.goods = []; //如果是第一页需手动制空列表
- this.goods = this.goods.concat(res.data.records); //追加新数据
- this.mescroll.endBySize(res.data.records.length, res.data.total);
- this.searchKeyWord = "" //搜索完成之后清空筛选内容
- })
- .catch(res => {
- uni.$u.toast(res.message);
- });
- uni.$u.sleep(500).then(() => {
- uni.hideLoading()
- })
- },
- clickTab(val) {
- uni.showLoading({
- mask: true
- })
- console.log(val)
- this.searchType = val.index
- this.tabIndex = val.index
- this.upCallback({
- size: 10,
- num: 1
- })
- this.showMenu = false
- },
- search() {
- this.isSearch = true
- //获取缓存搜索数据
- this.useSearchList = uni.getStorageSync('useSearchList')
- if (!this.useSearchList) this.useSearchList = [];
- }
- }
- }
- </script>
- <style scoped lang="scss">
- .banner {
- width: 100%;
- position: relative;
- }
- .fixed,
- .fixed1 {
- background: white;
- position: fixed;
- top: var(--status-bar-height);
- z-index: 999;
- width: 100%;
- }
- /deep/.u-popup__content {
- border-radius: 10px;
- // padding:20px;
- }
- .fixed {
- .title {
- background: white;
- position: relative;
- font-size: 36rpx;
- font-weight: 500;
- color: rgba(0, 0, 0, 0.85);
- .search {
- position: absolute;
- right: 20rpx;
- }
- }
- }
- .fixed1 {
- top: 0;
- height: var(--status-bar-height);
- background: white;
- }
- .banner-img {
- width: 100%;
- }
- .head {
- position: absolute;
- width: calc(100% - 108rpx);
- bottom: 0;
- background: white;
- margin: 0 20rpx;
- border-radius: 20rpx;
- .item1,
- .item3 {
- width: 40%;
- .text {
- text-overflow: ellipsis;
- overflow: hidden;
- white-space: nowrap;
- }
- }
- .item1 .text {
- text-align: left;
- }
- .item3 .text {
- text-align: right;
- }
- }
- .change-btn {
- width: 86rpx;
- height: 86rpx;
- }
- .good-list {
- background-color: white;
- margin: 20rpx;
- padding: 20rpx 0rpx 0 0;
- border-radius: 20rpx;
- .row1 {
- font-size: 26rpx;
- .item1 {
- color: #333333;
- }
- .item2 {
- color: #FE6300;
- }
- }
- .row2 {
- margin: 30rpx 0;
- }
- .row3 {
- background: #F5F6FA;
- padding: 20rpx;
- border-radius: 10rpx;
- color: #333333;
- .hz {
- width: 74rpx;
- height: 74rpx;
- margin-right: 30rpx;
- }
- }
- .row4 {
- margin: 20rpx 0;
- .time {
- color: #999999;
- margin-right: 20rpx;
- }
- .car {
- color: #000000;
- }
- .pay {
- margin-left: 20rpx;
- .number {
- color: #FE6300;
- margin-left: 20rpx;
- }
- }
- }
- .row5 {
- margin: 20rpx 0;
- font-size: 28rpx;
- .stop {
- border-radius: 33px;
- border: 1px solid #FE6300;
- padding: 13rpx 31rpx;
- margin-right: 20rpx;
- color: #FE6300;
- }
- .normal {
- border: 1px solid #CDCDCD;
- border-radius: 33px;
- padding: 13rpx 31rpx;
- margin: 0 10rpx;
- }
- }
- }
- .jt-icon {
- position: relative;
- top: 6rpx;
- width: 60rpx;
- margin: 0 20rpx;
- }
- .row {
- margin: 10rpx 0;
- align-items: center;
- }
- // .item-bottom {
- // background: #F0F5FF;
- // padding: 0 30rpx;
- // .name {
- // font-size: 26rpx;
- // font-weight: 700;
- // color: #000000;
- // margin-left: 30rpx;
- // }
- // .hp {
- // margin: 30rpx;
- // }
- // .number-color {
- // margin: 0 10rpx;
- // }
- // .qd {
- // background: linear-gradient(97deg, #4FABFD 0%, #2772FB 100%);
- // border-radius: 13px;
- // font-size: 29rpx;
- // font-weight: 400;
- // color: #FFFFFF;
- // padding: 10rpx 35rpx;
- // }
- // }
- .dw {
- align-items: center;
- }
- .mescroll {
- margin-top: calc(var(--status-bar-height) + 140rpx);
- }
- .sline {
- height: 28rpx;
- width: 1px;
- background: black;
- margin: 0 10rpx;
- }
- .search-view {
- margin-top: var(--status-bar-height);
- background: white;
- padding: 0 20rpx;
- }
- .back-icon {
- margin-right: 20rpx;
- }
- .near-search-text {
- margin: 20rpx 0;
- }
- .item-style {
- margin-top: 20rpx;
- background: #F5F6FA;
- padding: 11rpx 24rpx;
- margin-right: 20rpx;
- border-radius: 10px;
- font-size: 26rpx;
- color: #333333;
- }
- /deep/.u-modal__content {
- flex-direction: column;
- }
- .tab-content {
- position: relative;
- padding-right: 100rpx;
- }
- .right-btn {
- position: absolute;
- background: #F3F3F3;
- // box-shadow: -14px 0px 8px -8px rgba(0, 53, 149, 0.21);
- display: flex;
- right: 20rpx;
- height: 60rpx;
- top: 0;
- bottom: 0;
- margin: auto;
- color: #333333;
- align-items: center;
- justify-content: center;
- padding: 0rpx 20rpx;
- box-sizing: border-box;
- border-radius: 6rpx;
- }
- .all-menu {
- position: absolute;
- z-index: 99;
- top: 136rrpx;
- }
- /deep/.u-transition {
- border-radius: 0 0 50rpx 50rpx;
- }
- .transition {
- background: white;
- padding-bottom: 40rpx;
- .transition-item-style {
- display: inline-block;
- width: calc(25% - 40rpx);
- text-align: center;
- box-sizing: border-box;
- background: #F7F8FA;
- border-radius: 6px;
- margin: 20rpx 20rpx 0 20rpx;
- padding: 22rpx 0;
- font-size: 26rpx;
- }
- .menu-active {
- background: #2772FB;
- color: white;
- }
- }
- .modal-black {
- background: black;
- height: 100vh;
- width: 100vw;
- position: fixed;
- z-index: 999;
- opacity: 0.3;
- }
- .all-menu {
- position: fixed;
- z-index: 99;
- top: 136rpx;
- }
- .menu-active {
- background: #2772FB;
- color: white;
- }
- .evaluatePage {
- background: white;
- margin: 20rpx;
- padding: 20rpx;
- border-radius: 20rpx;
- }
- /deep/.u-radio {
- margin: 40rpx 0;
- }
- .close {
- position: absolute;
- right: 20px;
- top: 26px;
- }
- .termination {
- background: #F1F3F6;
- color: #C5CAD4;
- padding: 10px;
- border-radius: 30px;
- text-align: center;
- margin-top: 30rpx;
- }
- .termination.active {
- background: #2772FB;
- color: white;
- }
- .u-popup-wrap {
- padding: 20px;
- }
- </style>
|