| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550 |
- <template>
- <view class="order">
- <view class="fix">
- <view class="top"></view>
- <view class="head">
- <view class="case">
- <view class="select_type">
- <div class="tab-item" :class="tabIndex == 0?'active':''"
- @click="getList(servicePage),tabIndex=0;productName='';productStatus=0;merchantUserInfo = '';orderList = [];buyStartTime = '';buyEndTime = ''">
- 普通订单</div>
- <div class="tab-item" :class="tabIndex == 1?'active':''"
- @click="getserviceList(servicePage),tabIndex=1;productName='';productStatus=0;merchantUserInfo = '';serviceList = [];buyStartTime = '';buyEndTime = ''">
- 服务订单</div>
- </view>
- </view>
- </view>
- <view class="manage">
- <view class="search">
- <image src="/static/index/search.png" mode=""></image>
- <u-input type="text" v-model="merchantUserInfo" placeholder="请输入关键词" />
- <span @click="searchList">搜索</span>
- </view>
- <view class="action " @click="selectTime">
- <view class="cuIcon-filter"></view>
- </view>
- </view>
- <view class="select" v-if="tabIndex == 0">
- <view class="type" :class="currentIndex == index?'active':''" v-for="(item,index) in typeList" :key="index"
- @click="selectType(item,index)">
- {{item.name}}
- </view>
- </view>
- <view class="select" v-if="tabIndex == 1">
- <view class="type" :class="currentIndex == index?'active':''" v-for="(item,index) in statusList" :key="index"
- @click="selectSeiviceType(item,index)">
- {{item.name}}
- </view>
- </view>
- </view>
- <mescroll-uni class="list" :fixed="false" ref="mescrollRef" @up="getList" @init="mescrollInit" :use="false"
- v-if="tabIndex ==0">
- <view class="order_item" v-for="(item,index) in orderList" :key="item.id" @click="geDetail(item)">
- <view class="order_id">
- <view class="id_left">
- 订单编号:{{item.orderId}}
- </view>
- <view class="id_right" v-if="item.stateCode ==0" style="color: #ff9900;">
- 待使用
- </view>
- <view class="id_right" v-if="item.stateCode ==1">
- 已使用
- </view>
- <!-- <view class="id_right" v-if="item.stateCode == 2">
- 待评价
- </view>
- <view class="id_right" v-if="item.stateCode ==3">
- 已过期
- </view> -->
- <view class="id_right" v-if="item.stateCode == 5">
- 待付款
- </view>
- <view class="id_right" v-if="item.stateCode == 6">
- 支付中
- </view>
- <view class="id_right" v-if="item.stateCode == 7">
- 支付失败
- </view>
- <view class="id_right" v-if="item.stateCode == 8">
- 已撤销
- </view>
- <view class="id_right" v-if="item.stateCode == 9">
- 已退款
- </view>
- <view class="id_right" v-if="item.stateCode == 10">
- 订单关闭
- </view>
- <view class="id_right" v-if="item.stateCode == 11">
- 已取消
- </view>
- <!-- <view class="id_right" v-if="item.stateCode == 4 && item.refundType !=1" style="color:#449AFF ;">
- 退款/售后
- </view> -->
- <view class="id_right" v-if="item.refundType ==0 && item.stateCode == 4">
- 售后申请中
- </view>
- <view class="id_right" v-if="item.refundType ==1 && item.stateCode == 4">
- 退款成功
- </view>
- <view class="id_right" v-if="item.refundType ==2 && item.stateCode == 4">
- 退款中
- </view>
- <view class="id_right" v-if="item.refundType ==3 && item.stateCode == 4">
- 退款失败
- </view>
- <view class="id_right" v-if="item.refundType ==4 && item.stateCode == 4">
- 拒绝退款
- </view>
- <view class="id_right" v-if="item.refundType ==99 && item.stateCode == 4">
- 挂起
- </view>
- </view>
- <!-- <view class="order_id" v-if="item.stateCode == 4 && item.refundType ">
-
- </view> -->
- <!-- 普通订单 -->
- <view class="order_product" v-if="item.categoryId != 1945013773786701826">
- <view class="img" >
- <image :src="item.productImage" mode=""></image>
- </view>
- <view class="name">
- {{item.productName}}
- <span class="exceed" v-if="item.orderType == 4"
- style="color: #999999;">适用范围:{{item.remark==1?'本店可用':item.remark==2?'部分分类商品可用':'部分分类商品不可用'}}</span>
- <span v-if="item.orderType == 4" style="color: #999999;"> 使用期限:{{item.startTime}} --{{item.endTime}}</span>
- <span v-if="item.orderType != 4">¥{{item.orderPrice}}</span>
- </view>
- <view class="ticket" v-if="item.isUseRights">
- <image src="/static/product/ticket.png" mode=""></image>
- </view>
- </view>
- <!-- 钣金喷漆订单 -->
- <view class="spec" v-if="item.categoryId == 1945013773786701826">
- <view class="" v-if="item.orderLinkCategorySpecItems && item.orderLinkCategorySpecItems.length>0">
- <view class="order_product"
- v-for="(specitem, specIndex) in item.orderLinkCategorySpecItems.slice(0, item.isShow ? item.orderLinkCategorySpecItems.length : 2)"
- :key="specIndex">
- <view class="img">
- <image :src="item.productImage" mode=""></image>
- </view>
- <view class="spec_item">
- <view class="top">
- {{item.productName}}
- </view>
- <view class="content">
- <view class="left">
- <view class="cventer">
- {{specitem.partName}} {{specitem.positionName}}
- </view>
- <view class="foot">
- {{specitem.craftName}}
- </view>
- </view>
- <view class="right">
- <span style="font-size: 22rpx;color: #333333;">¥{{specitem.soldPrice}}</span>
- <span
- style="text-decoration: line-through;font-size: 18rpx;color: #999999;">¥{{specitem.price}}</span>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="is_show" @click.stop="unfold(index)"
- v-if="item.orderLinkCategorySpecItems&&item.orderLinkCategorySpecItems.length > 2">
- {{item.isShow?'收起查看':'展开查看'}}
- <image src="/static/order/hidden.png" mode="" v-if="item.isShow"></image>
- <image src="/static/order/show.png" mode="" v-else></image>
- </view>
- </view>
- <view class="time">
- <view class="time_left">
- {{item.orderStateTimeName}}:{{item.orderStateTime}}
- </view>
- <view class="time_right" @click.stop="goRecord(item)" v-if="item.auditType =='0'">
- 去处理
- </view>
- <view class="all_price" v-if="item.categoryId == 1945013773786701826">
- <span style="font-size: 22rpx;color: #FD4912;margin-right: 10rpx;">¥已优惠{{item.couponPrice}}</span>
- <span style="font-size: 26rpx;color: #FD4912;"><text
- style="font-size: 22rpx;">¥</text>{{item.orderPrice}}</span>
- </view>
- </view>
- </view>
- </mescroll-uni>
- <!-- 服务订单 -->
- <mescroll-uni class="list" :fixed="false" ref="mescrollRef" @up="getserviceList" @init="mescrollInit" :use="false"
- v-if="tabIndex == 1">
- <view class="service_order" v-for="item in serviceList" :key="item.orderNo" @click="goDetail(item)">
- <view class="item_title">
- <span>订单编号:{{item.orderNo}}</span>
- <span>{{item.status}}</span>
- </view>
- <view class="car_id">
- {{item.licenseNo}}
- <!-- <span>{{item.checkType==0?'上门取车':'送车到站'}}</span> -->
- <span v-if="item.checkType==0">上门取车</span>
- <span v-if="item.checkType==1">送车到站</span>
- <span v-if="item.checkType==21">搭电救援</span>
- <span v-if="item.checkType==22">换胎救援</span>
- <span v-if="item.checkType==23">拖车救援</span>
- </view>
- <view class="name">
- {{item.productName}}
- <span @click.stop="goGetCar(item)" v-if="item.checkType == 0">取车地点</span>
- </view>
- <view class="time">
- <span>{{item.date}}</span>
- <span> <text>¥</text> {{item.rightsId?0:item.price}}</span>
- </view>
- <view class="btn_box">
- <view class="btn" @click.stop="goLive(item)">
- 实况记录
- </view>
- <view class="btn" style="margin-left: 16rpx;" @click.stop="callService(item)">
- 联系客服
- </view>
- <view class="btn border" @click.stop="callUser(item)">
- 联系客户
- </view>
- <!-- 03显示救援接单 -->
- <view class="btn join" @click.stop="receive(item)" v-if="item.checkType<20 && item.statusCode ==2"
- style="margin-left: 16rpx;">
- 接单
- </view>
- <view class="btn join" @click.stop="receive(item)" v-if="item.checkType>20 && item.flowStatus =='03'"
- style="margin-left: 16rpx;">
- 接单
- </view>
- <!-- 送车到站按钮区域开始item.checkType==1 -->
- <view class="" v-if="item.checkType==1" style="flex:1;display: flex;justify-content: space-around;">
- <view class="btn join" @click.stop="collect(item)" v-if="item.statusCode ==3 && item.flowStatus =='05'">
- 确认收车
- </view>
- <view class="btn join" @click.stop="finish(item)" v-if="item.statusCode ==4">
- 检测完成
- </view>
- <view class="btn join" @click.stop="takeCar(item)" v-if="item.statusCode ==5 && item.flowStatus =='12'">
- 确认取车
- </view>
- <view class="btn join" @click.stop="evaluate(item)" v-if="item.flowStatus =='16' ">
- 去评价
- </view>
- </view>
- <!-- 送车到站按钮区域结束
- 上门取车按钮区域开始item.checkType==0 -->
- <view class="" v-if="item.checkType == 0" style="flex:1;display: flex;justify-content: space-around;">
- <view class="btn join" @click.stop="goGetCar(item)" v-if="item.statusCode ==5 && item.flowStatus == 4">
- 去取车
- </view>
- <view class="btn join" @click.stop="collect(item)" v-if="item.statusCode ==5 && item.flowStatus == 5">
- 确认取车
- </view>
- <view class="btn join" @click.stop="finish(item)"
- v-if="item.statusCode ==4 && item.flowStatus==7 || item.flowStatus==8">
- 检测完成
- </view>
- <view class="btn join" @click.stop="goAlso(item)" v-if="item.statusCode ==3 && item.flowStatus==12">
- 去送车
- </view>
- <view class="btn join" @click.stop="delivered(item)" v-if="item.statusCode ==3&& item.flowStatus==13">
- 车已送达
- </view>
- <view class="btn join" @click.stop="evaluate(item)" v-if=" item.flowStatus =='16' ">
- 去评价
- </view>
- </view>
- <!-- 上门取车按钮区域结束 -->
- <!-- 救援相关按钮 -->
- <view class="" v-if="item.checkType >20 " style="flex:1;display: flex;justify-content: space-around;">
- <!--flowStatus == 04 显示-->
- <view class="btn join" @click.stop="depart(item)" v-if="item.flowStatus == '04'">
- 出发
- </view>
- <view class="btn join" @click.stop="arrive(item)" v-if="item.flowStatus == '05'">
- 到达现场
- </view>
- <view class="btn join" @click.stop="help(item)"
- v-if="item.statusCode ==4 && item.flowStatus=='07' || item.flowStatus=='06'|| item.flowStatus=='08'">
- 救援完成
- </view>
- <view class="btn join" @click.stop="evaluate(item)" v-if=" item.flowStatus =='12' ">
- 去评价
- </view>
- </view>
- </view>
- <!-- 年审 -->
- <view class="add_service" @click.stop="addService(item)" v-if="item.checkType<20 &&item.statusCode==4 ">
- <span>添加收费服务</span>
- </view>
- <!-- 救援 -->
- <view class="add_service" @click.stop="addService(item)"
- v-if="item.checkType>20&&(item.flowStatus== '06'||item.flowStatus== '07'||item.flowStatus== '08') ">
- <span>添加收费服务</span>
- </view>
- <view class="child_order">
- <view class="row" v-for="row in item.children" :key="row.orderNo">
- <view class="row_title">
- <span>订单编号:{{row.orderNo}}</span>
- <span class="row_status">{{row.status}}</span>
- </view>
- <view class="row_name">
- {{row.productName}}
- </view>
- <view class="row_price">
- <span><text>¥</text>{{row.price}}</span>
- <view class="row_detail" @click.stop="lookDetail(row)">
- 服务明细
- </view>
- </view>
- <view class="row_time">
- {{row.date}}
- </view>
- <view class="row_btn" @click.stop="editProject(row)"
- v-if="(row.statusCode == '0'|| row.statusCode == '7')&&item.count==0 ">
- <span>修改收费服务</span>
- </view>
- </view>
- </view>
- </view>
- </mescroll-uni>
- <rangTime ref="rangTime" :mode="mode" :isYear="true" @onSubmit="onEndTimeChange" @cut="cutPopup" />
- <receive @cut="isReceive =false" v-if="isReceive" :titleCheckType="titleCheckType" />
- <serviceDetail :subOrderId="subOrderId" @cut="cutsubOrderId" v-if="isServiceDeatil" />
- <upload :type="uptype" :taskId="taskId" v-if="isUpload" @cut="isUpload = false" @upSuccess="upSuccess" />
- <evaluate :userId="userId" :taskId="taskId" v-if="iseEvaluate" @cut="cutEvaluate" />
- </view>
- </template>
- <script>
- import receive from '../order/components/receiveOrder.vue'
- import upload from '../order/components/upload.vue'
- import evaluate from '../order/components/evaluate.vue'
- import serviceDetail from '../order/components/serviceDetail.vue'
- import rangTime from '../../components/dengrq-datetime-picker/dateSelector/index.vue'
- export default {
- components: {
- rangTime,
- receive,
- serviceDetail,
- upload,
- evaluate
- },
- data() {
- return {
- search: '',
- mode: 1,
- currentIndex: 0,
- merchantId: '',
- buyStartTime: '',
- buyEndTime: '',
- typeList: [{
- type: '',
- name: '全部'
- },
- {
- type: 5,
- name: '待付款'
- },
- {
- type: 0,
- name: '待使用'
- },
- {
- type: 1,
- name: '已使用'
- },
- {
- type: 4,
- name: '售后'
- }
- ],
- statusList: [{
- type: '',
- name: '全部'
- },
- {
- type: 1,
- name: '待接单'
- },
- {
- type: 2,
- name: '服务中'
- },
- {
- type: 3,
- name: '已完成'
- },
- {
- type: 4,
- name: '售后'
- }
- ],
- ststusCode: '', //审车策划状态
- orderList: [],
- state: '',
- merchantUserInfo: '',
- upOption: {
- page: {
- num: 0,
- size: 10 // 每页数据的数量,默认10
- },
- noMoreSize: 5, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- empty: {
- tip: '暂无相关数据'
- }
- },
- tabIndex: 0,
- serviceList: [],
- isReceive: false, //接单成功弹窗
- isServiceDeatil: false, //服务明细弹窗
- isUpload: false, //上传图片弹窗显隐
- uptype: '', //上传图片类型
- taskId: '', //上传图片传值
- checkType: '', //上传图片修改状态用
- subOrderId: '', //服务明细传递数据
- paramState: '', //上传完图片修改状态
- serveType: '', //服务类型
- iseEvaluate: false, //评价弹窗显隐
- userId: '', //评论用户id
- servicePage: {
- num: 1,
- size: 10
- },
- titleCheckType: null, //接单提示区分
- }
- },
- methods: {
- //展开/收起查看钣金喷漆子选项
- unfold(index) {
- this.orderList[index].isShow = !this.orderList[index].isShow;
- this.$forceUpdate();
- },
- //联系客户
- callUser(item) {
- uni.makePhoneCall({
- phoneNumber: item.contactsPhone,
- success: () => {
- uni.showToast({
- title: '正在拨号',
- icon: 'none'
- })
- },
- fail: (err) => {
- uni.showToast({
- title: '拨打失败: ' + err.errMsg,
- icon: 'none'
- })
- }
- })
- },
- //俩系客服
- callService(item) {
- uni.makePhoneCall({
- phoneNumber: item.custSerPhone,
- success: () => {
- uni.showToast({
- title: '正在拨号',
- icon: 'none'
- })
- },
- fail: (err) => {
- uni.showToast({
- title: '拨打失败: ' + err.errMsg,
- icon: 'none'
- })
- }
- })
- },
- //跳转实况记录
- goLive(item) {
- uni.navigateTo({
- url: '/pages/order/serviceOrder/live?taskId=' + item.taskId + '&checkType=' + item.checkType
- })
- },
- selectTime() {
- this.$refs.rangTime.open()
- uni.hideTabBar()
- },
- onEndTimeChange(val) {
- this.buyStartTime = val.startDate
- this.buyEndTime = val.endDate
- if (this.tabIndex == 0) {
- this.orderList = []
- let page = {
- num: 1,
- size: 10
- }
- this.getList(page)
- } else {
- this.serviceList = []
- let page = {
- num: 1,
- size: 10
- }
- this.getserviceList(page)
- }
- },
- cutPopup() {
- this.isYear = false
- uni.showTabBar()
- },
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- InputBlur(e) {
- this.search = e.detail.value
- },
- //普通订单
- selectType(item, index) {
- this.currentIndex = index
- this.state = item.type
- this.orderList = []
- // this.mescroll.resetUpScroll();
- let page = {
- num: 1,
- size: 10
- }
- this.getList(page)
- },
- //服务订单
- selectSeiviceType(item, index) {
- this.currentIndex = index
- this.statusCode = item.type
- this.serviceList = []
- let page = {
- num: 1,
- size: 10
- }
- this.getserviceList(page)
- // this.mescroll.resetUpScroll();
- },
- searchList() {
- if (this.tabIndex == 0) {
- let page = {
- num: 1,
- size: 10
- }
- this.orderList = []
- this.getList(page)
- } else {
- this.serviceList = []
- let page = {
- num: 1,
- size: 10
- }
- this.getserviceList(page)
- }
- },
- //跳转至订单详情页
- goRecord(item) {
- console.log(item)
- uni.navigateTo({
- url: '/pages/order/record?orderId=' + item.orderId
- })
- },
- //跳转至服务订单详情页
- goDetail(item) {
- uni.navigateTo({
- url: '/pages/order/serviceOrder/orderDetail?taskId=' + item.taskId + '&checkType=' + item.checkType +
- '&rightsId=' + item.rightsId
- })
- },
- getList(page) {
- let data = {
- merchantId: this.merchantId,
- pageSize: page.size,
- pageNo: page.num,
- state: this.state,
- merchantUserInfo: this.merchantUserInfo,
- buyStartTime: this.buyStartTime,
- buyEndTime: this.buyEndTime
- }
- this.$http.post("/app/order/locaOrder/list", data).then(res => {
- this.orderList = this.orderList.concat(res.data.result.records)
- // 展开/收起
- this.orderList.forEach(item => {
- item.isShow = false
- })
- console.log(this.orderList)
- this.mescroll.endSuccess(res.data.result.records.length, res.data.result.total);
- uni.showTabBar()
- }).catch(() => {
- this.mescroll.endErr()
- })
- },
- geDetail(item) {
- uni.navigateTo({
- url: '/pages/order/details?orderId=' + item.orderId
- })
- },
- //获取服务订单列表
- getserviceList(page) {
- let data = {
- merchantId: this.merchantId,
- pageSize: page.size,
- pageNo: page.num,
- status: this.statusCode,
- searchContent: this.merchantUserInfo,
- buyStartTime: this.buyStartTime,
- buyEndTime: this.buyEndTime
- }
- this.$http.post("/ts/merchant/serviceOrder", data).then(res => {
- this.serviceList = this.serviceList.concat(res.data.result.records)
- this.mescroll.endSuccess(res.data.result.records.length, res.data.result.total);
- })
- .catch(() => {
- this.mescroll.endErr()
- })
- },
- // 接单
- receive(item) {
- console.log(item)
- this.titleCheckType = item.checkType
- let data = {
- taskId: item.taskId,
- checkType: item.checkType,
- paramState: '04', //商户接单成功
- // serveType: '01'//救援02
- }
- item.checkType < 20 ? data.serveType = '01' : data.serveType = '02'
- this.$http.post("/ts/merchant/update/Serve", data).then(res => {
- if (res.data.code == 200) {
- this.isReceive = true
- this.serviceList = []
- let page = {
- num: 1,
- size: 10
- }
- this.getserviceList(page)
- }
- })
- },
- //收车上传照片
- collect(item) {
- console.log(item)
- this.taskId = item.taskId
- this.checkType = item.checkType
- //0 取车,1送车
- if (item.checkType == 0) {
- //收车
- // if (item.statusCode == 5) {
- this.uptype = 1
- // }
- // else if (item.statusCode == 4) {
- // this.uptype = 3
- // }
- } else if (item.checkType == 1) {
- //客户送车,商户收车
- // if (item.statusCode == 3) {
- this.uptype = 2
- // }
- /* else {
- this.uptype = 3
- } */
- }
- this.paramState = '07'
- this.serveType = '01'
- this.isUpload = true
- // this.upSuccess('07','01')
- },
- //送车到站————检测完成
- upSuccess() {
- let data = {
- taskId: this.taskId,
- checkType: this.checkType,
- paramState: this.paramState, //商户上传图片成功
- serveType: this.serveType
- }
- this.$http.post("/ts/merchant/update/Serve", data).then(res => {
- if (res.data.code == 200) {
- this.isUpload = false
- this.serviceList = []
- let page = {
- num: 1,
- size: 10
- }
- this.getserviceList(page)
- } else {
- this.isUpload = false
- this.serviceList = []
- let page = {
- num: 1,
- size: 10
- }
- this.getserviceList(page)
- uni.showToast({
- icon: 'none',
- title: res.data.message
- })
- }
- })
- },
- //检测完成上传检测图片
- finish(item) {
- console.log(item)
- this.taskId = item.taskId
- this.checkType = item.checkType
- this.uptype = 3
- //0 取车,1送车
- // if (item.checkType == 0) {
- // // if (item.statusCode == 5) {
- // this.uptype = 1
- // // }
- // } else if (item.checkType == 1) {
- // //客户送车,商户收车
- // if (item.statusCode == 4) {
- // this.uptype = 3
- // }
- // }
- this.isUpload = true
- this.paramState = '12'
- this.serveType = '01'
- this.serviceList = []
- let page = {
- num: 1,
- size: 10
- }
- this.getserviceList(page)
- },
- //送车到站--确认取车
- takeCar(item) {
- console.log(item)
- let data = {
- taskId: item.taskId,
- checkType: item.checkType,
- paramState: '14', //
- serveType: '01'
- }
- this.$http.post("/ts/merchant/update/Serve", data).then(res => {
- if (res.data.code == 200) {
- this.isUpload = false
- this.serviceList = []
- let page = {
- num: 1,
- size: 10
- }
- this.getserviceList(page)
- }
- })
- },
- //评价弹窗显示
- evaluate(item) {
- console.log(item)
- this.iseEvaluate = true
- this.taskId = item.taskId
- this.userId = item.userId
- uni.hideTabBar()
- },
- //评价弹窗隐藏
- cutEvaluate() {
- this.iseEvaluate = false
- uni.showTabBar()
- this.serviceList = []
- let page = {
- num: 1,
- size: 10
- }
- this.getserviceList(page)
- },
- //查看收费服务明细
- lookDetail(item) {
- this.subOrderId = item.orderNo
- this.isServiceDeatil = true
- uni.hideTabBar()
- },
- //修改服务明细
- editProject(row) {
- console.log(row)
- uni.navigateTo({
- url: '/pages/order/serviceOrder/project?orderNo=' + row.orderNo + '&checkType=' + row.checkType +
- '&taskId=' + row.taskId + '&productName=' + row.productName +
- '&type=' + 0
- })
- },
- cutsubOrderId() {
- this.isServiceDeatil = false
- uni.showTabBar()
- },
- //商户去取车
- goGetCar(item) {
- // 清除之前的定时器,实现防抖
- if (this.getCarDebounceTimer) {
- clearTimeout(this.getCarDebounceTimer);
- }
- // 2000ms后执行真正的逻辑
- this.getCarDebounceTimer = setTimeout(() => {
- console.log(item);
- let data = {
- taskId: item.taskId,
- checkType: item.checkType,
- paramState: '05', //商户接单成功
- serveType: '01'
- };
- let that = this;
- this.serviceList = [];
- let page = {
- num: 1,
- size: 10
- };
- this.getserviceList(page);
- uni.openLocation({
- longitude: Number(item.userLongitude),
- latitude: Number(item.userLatitude),
- name: item.carAddres, // 位置名称(注意:原代码可能笔误,应该是carAddress?)
- // address: e.F_Address, // 位置地点
- success: function(res) {
- console.log('打开系统位置地图成功');
- that.$http.post("/ts/merchant/update/Serve", data).then(res => {
- if (res.data.code == 200) {
- // this.isReceive = true
- }
- });
- },
- fail: function(error) {
- console.log(error);
- },
- });
- // 执行完成后清空定时器(可选,防止内存泄漏)
- this.getCarDebounceTimer = null;
- }, 2000); // 防抖间隔2000ms
- },
- // goGetCar(item) {
- // console.log(item)
- // let data = {
- // taskId: item.taskId,
- // checkType: item.checkType,
- // paramState: '05', //商户接单成功
- // serveType: '01'
- // }
- // let that = this
- // // uni.navigateTo({
- // // url: (window.location.href = `https://uri.amap.com/navigation?to=${item.userLongitude},${item.userLatitude},${item.carAddress}&mode=car&policy=1&src=https://gawl.gazhcs.com/wap/index.html&callnative=0`)
- // // })
- // this.serviceList = []
- // let page = {
- // num: 1,
- // size: 10
- // }
- // this.getserviceList(page)
- // uni.openLocation({
- // longitude: Number(item.userLongitude),
- // latitude: Number(item.userLatitude),
- // name: item.carAddres, // 位置名称
- // // address: e.F_Address, // 位置地点
- // success: function(res) {
- // console.log('打开系统位置地图成功')
- // that.$http.post("/ts/merchant/update/Serve", data).then(res => {
- // if (res.data.code == 200) {
- // // this.isReceive = true
- // }
- // })
- // },
- // fail: function(error) {
- // console.log(error)
- // },
- // })
- // },
- //救援出发
- depart(item) {
- console.log(item)
- let data = {
- taskId: item.taskId,
- checkType: item.checkType,
- paramState: '05', //商户出发成功
- serveType: '02'
- }
- this.$http.post("/ts/merchant/update/Serve", data).then(res => {
- if (res.data.code == 200) {
- // this.isReceive = true
- this.serviceList = []
- let page = {
- num: 1,
- size: 10
- }
- this.getserviceList(page)
- }
- })
- },
- //救援到达现场
- arrive(item) {
- // this.taskId = item.taskId
- // this.checkType = item.checkType
- // this.uptype = 4 //道路救援
- // this.paramState = '06'
- // this.serveType = '02'
- let params = {
- taskId: item.taskId,
- checkType: item.checkType,
- uptype: 4, // 道路救援
- paramState: '06',
- serveType: '02',
- // isUpload: true
- }
- let queryString = Object.keys(params)
- .map(key => `${key}=${encodeURIComponent(params[key])}`)
- .join('&');
- uni.navigateTo({
- // url:'/pages/order/arriveUpload、${queryString}' paramState
- url: `/pages/order/arriveUpload?taskId=${item.taskId}&checkType=${item.checkType}&uptype=4¶mState=06&serveType=02&jumptype=0`
- })
- },
- //救援完成拍照
- help(item) {
- console.log(item)
- this.taskId = item.taskId
- this.checkType = item.checkType
- this.uptype = 3
- this.isUpload = true
- this.paramState = '11'
- this.serveType = '02'
- this.serviceList = []
- let page = {
- num: 1,
- size: 10
- }
- this.getserviceList(page)
- },
- //添加收费服务
- addService(item) {
- this.$http.get("/ts/merchant/addPaidServiceCheck?taskId=" + item.taskId).then(res => {
- console.log(res)
- if (res.data.result) {
- uni.navigateTo({
- url: '/pages/order/serviceOrder/project?checkType=' + item.checkType + '&taskId=' + item.taskId +
- '&orderNo=' + item.orderNo + '&productName=' + item.productName + '&type=' + 1
- })
- } else {
- uni.showToast({
- icon: 'none',
- title: '存在未支付服务项'
- })
- }
- })
- },
- //去送车修改状态
- goAlso(item) {
- let data = {
- taskId: item.taskId,
- checkType: item.checkType,
- paramState: '13', //商户点击去送车
- serveType: '01'
- }
- this.$http.post("/ts/merchant/update/Serve", data).then(res => {
- if (res.data.code == 200) {
- this.serviceList = []
- let page = {
- num: 1,
- size: 10
- }
- this.getserviceList(page)
- }
- })
- },
- //商户点击车已送达
- delivered(item) {
- let data = {
- taskId: item.taskId,
- checkType: item.checkType,
- paramState: '14', //商户点击车已送达
- serveType: '01'
- }
- this.$http.post("/ts/merchant/update/Serve", data).then(res => {
- if (res.data.code == 200) {
- this.serviceList = []
- let page = {
- num: 1,
- size: 10
- }
- this.getserviceList(page)
- }
- })
- }
- },
- mounted() {
- this.mescroll.optDown.use = false
- // this.getList()
- },
- onShow() {
- let that = this
- uni.getStorage({
- key: 'login_user_info',
- success: function(res) {
- that.merchantId = res.data.merchantId
- that.serviceList = []
- that.orderList = []
- let page = {
- num: 1,
- size: 10
- }
- that.getList(page)
- that.getserviceList(page)
- }
- })
- const app = getApp();
- this.currentIndex=app.globalData.currentIndex
- this.tabIndex=app.globalData.tabIndex
- app.globalData.currentIndex=''
- app.globalData.tabIndex=''
- },
- }
- </script>
- <style lang="scss" scoped>
- .order {
- width: 100%;
- height: 100vh;
- background: #F7F8FC;
- display: flex;
- flex-direction: column;
- position: fixed;
- .fix {
- width: 100%;
- height: auto;
- background: #ffffff;
- position: sticky;
- top: 0px;
- border-bottom: 1px solid #EEEEEE;
- /*#ifdef APP-PLUS*/
- .top {
- width: 100%;
- height: var(--status-bar-height);
- background: #FFFFFF;
- }
- /*#endif*/
- .head {
- width: 100%;
- height: 112rpx;
- padding: 20rpx;
- display: flex;
- align-items: center;
- background: #fff;
- position: relative;
- background: #FFFFFF;
- .cuIcon-back {
- font-size: 40rpx;
- margin-right: 40rpx;
- }
- .case {
- width: 100%;
- position: absolute;
- left: 50%;
- transform: translateX(-50%);
- font-size: 36rpx;
- font-weight: 600;
- .select_type {
- display: flex;
- justify-content: space-around;
- .tab-item {
- position: relative;
- padding: 18rpx 0;
- cursor: pointer;
- color: #333;
- font-weight: 400;
- font-size: 28rpx;
- }
- .tab-item.active {
- color: #449AFF;
- font-weight: 600;
- }
- .tab-item.active::after {
- content: '';
- position: absolute;
- bottom: -28px;
- left: 35%;
- width: 38rpx;
- height: 100%;
- background: url(/static/product/tab-act.png) no-repeat;
- background-size: contain;
- }
- }
- }
- // .action {
- // position: absolute;
- // right: 24rpx;
- // }
- }
- .manage {
- display: flex;
- align-items: center;
- width: 100%;
- padding: 0 24rpx;
- .search {
- width: 93%;
- height: 55rpx;
- background: #F7F8FC;
- border-radius: 12rpx;
- padding: 0rpx 24rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-right: 20rpx;
- // margin: 16rpx auto 0px;
- image {
- width: 36rpx;
- height: 36rpx;
- }
- input {
- // height: 36rpx;
- font-size: 26rpx;
- }
- span {
- font-size: 26rpx;
- color: #333333;
- }
- }
- }
- .select {
- width: 100%;
- height: 85rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 0px 24rpx;
- background-color: #FFFFFF;
- .type {
- height: 54rpx;
- padding: 8rpx 12rpx;
- background: #F2F3F5;
- border-radius: 8rpx;
- }
- .active {
- background: #ECF5FF;
- color: #2D88F4;
- }
- }
- }
- .list {
- flex: 1;
- width: 100%;
- overflow-y: auto;
- padding-bottom: var(--window-bottom);
- .order_item {
- width: 100%;
- background-color: #fff;
- padding: 20rpx 40rpx;
- margin-bottom: 20rpx;
- .order_id {
- width: 100%;
- height: 41rpx;
- font-size: 26rpx;
- color: #8B91A4;
- display: flex;
- justify-content: space-between;
- align-items: center;
- .id_right {}
- }
- .order_product {
- width: 100%;
- height: 132rpx;
- display: flex;
- margin: 10rpx 0px;
- margin-bottom: 20rpx;
- .img {
- width: 132rpx;
- height: 132rpx;
- border-radius: 12rpx;
- overflow: hidden;
- image {
- width: 132rpx;
- height: 132rpx;
- }
- }
- .name {
- height: 100%;
- flex: 1;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- margin-left: 20rpx;
- font-size: 28rpx;
- color: #000000;
- span {
- font-size: 22rpx;
- color: #F0761D;
- }
- .exceed {
- width: 500rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- }
- .ticket {
- image {
- width: 50rpx;
- height: 50rpx;
- }
- }
- .schedule {
- width: 15%;
- }
- .spec_item {
- flex: 1;
- margin-left: 20rpx;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- .top {
- font-size: 26rpx;
- height: 38rpx;
- color: #000000;
- margin-bottom: 6rpx;
- }
- .content {
- width: 100%;
- flex: 1;
- display: flex;
- justify-content: space-between;
- padding-top: 15rpx;
- .left {
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- font-size: 22rpx;
- color: #333333;
- }
- .right {
- text-align: right;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- }
- }
- }
- }
- .is_show {
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 24rpx;
- color: #2D88F4;
- image {
- width: 20rpx;
- height: 20rpx;
- margin-left: 10rpx;
- }
- }
- .time {
- width: 100%;
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-top: 20rpx;
- .time_left {
- // width: 30%;
- font-size: 24rpx;
- color: #8A91A8;
- }
- .time_right {
- min-width: 126rpx;
- height: 50rpx;
- background: rgba(240, 118, 29, 0.05);
- border-radius: 8rpx;
- border: 1px solid #F0761D;
- font-size: 26rpx;
- color: #F0761D;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .all_price {
- min-width: 33%;
- margin-left: 10rpx;
- }
- }
- }
- .service_order {
- background: #FFFFFF;
- padding: 22rpx 32rpx;
- margin-bottom: 20rpx;
- .item_title {
- width: 100%;
- display: flex;
- justify-content: space-between;
- margin-bottom: 22rpx;
- span {
- font-size: 26rpx;
- color: #8B91A4;
- }
- }
- .car_id {
- font-size: 30rpx;
- color: #333333;
- font-weight: 600;
- display: flex;
- align-items: center;
- margin-bottom: 8rpx;
- span {
- width: 120rpx;
- height: 40rpx;
- background: #FDF6F2;
- border-radius: 8rpx;
- font-size: 24rpx;
- line-height: 40rpx;
- color: #FD4912;
- text-align: center;
- margin-left: 16rpx;
- }
- }
- .name {
- width: 100%;
- height: 62rpx;
- background: linear-gradient(90deg, #F8F9FB 0%, #FBFCFD 100%);
- border-radius: 12rpx;
- padding: 12rpx;
- font-size: 26rpx;
- color: #333333;
- font-weight: 600;
- margin-bottom: 8rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- span {
- display: inline-block;
- width: 152rpx;
- height: 50rpx;
- background: rgba(240, 118, 29, 0.05);
- border-radius: 35rpx;
- border: 1px solid #F0761D;
- font-size: 26rpx;
- color: #F0761D;
- text-align: center;
- line-height: 50rpx;
- }
- }
- .time {
- display: flex;
- align-items: center;
- justify-content: space-between;
- font-size: 24rpx;
- color: #8A91A8;
- span {
- text {
- font-size: 16rpx;
- }
- color: #FD4912;
- }
- }
- .btn_box {
- display: flex;
- align-items: center;
- justify-content: end;
- margin-top: 20rpx;
- .btn {
- height: 51rpx;
- padding: 6rpx 24rpx;
- border-radius: 61rpx;
- font-size: 26rpx;
- border: 1px solid #CCCCCC;
- display: flex;
- align-items: center;
- }
- .border {
- border: 1px solid #2D88F4;
- color: #2D88F4;
- margin-left: 16rpx;
- }
- .join {
- background: #2D88F4;
- color: #FFFFFF;
- border: none;
- }
- }
- .add_service {
- width: 100%;
- height: 100rpx;
- background: linear-gradient(180deg, #EEF7FF 0%, #F6FBFF 100%);
- border-radius: 12rpx;
- margin-top: 20rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- span {
- width: 204rpx;
- height: 50rpx;
- background: linear-gradient(90deg, #53A2FF 0%, #2589FF 100%);
- border-radius: 49rpx;
- font-size: 26rpx;
- color: #FFFFFF;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- }
- .child_order {
- width: 100%;
- border-radius: 12rpx;
- margin: 20rpx 0px;
- .row {
- margin-bottom: 20rpx;
- background: linear-gradient(180deg, #EEF7FF 0%, #F6FBFF 100%);
- padding: 10rpx 12rpx;
- .row_title {
- width: 100%;
- display: flex;
- align-items: center;
- justify-content: space-between;
- font-size: 26rpx;
- color: #8B91A4;
- margin-bottom: 20rpx;
- .row_status {
- font-size: 28rpx;
- color: #FF9900;
- }
- }
- .row_name {
- font-size: 26rpx;
- color: #333333;
- margin-bottom: 7rpx;
- font-weight: 600;
- }
- .row_price {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-bottom: 7rpx;
- span {
- font-size: 26rpx;
- color: #FD4912;
- font-weight: 600;
- text {
- font-size: 16rpx;
- }
- }
- .row_detail {
- padding: 6rpx 24rpx;
- background: #FFFFFF;
- border-radius: 61rpx;
- border: 1px solid #2D88F4;
- font-size: 24rpx;
- color: #2D88F4;
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
- }
- .row_time {
- font-size: 22rpx;
- color: #888888;
- margin-bottom: 16rpx;
- }
- .row_btn {
- display: flex;
- align-items: center;
- justify-content: end;
- span {
- width: 204rpx;
- height: 50rpx;
- background: #2D88F4;
- border-radius: 8rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 26rpx;
- color: #FFFFFF;
- }
- }
- }
- }
- }
- }
- }
- </style>
|