| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545 |
- <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)
- }
- })
- },
- }
- </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>
|