index.vue 35 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433
  1. <template>
  2. <view class="order">
  3. <view class="fix">
  4. <view class="top"></view>
  5. <view class="head">
  6. <view class="case">
  7. <view class="select_type">
  8. <div class="tab-item" :class="tabIndex == 0?'active':''"
  9. @click="getList(servicePage),tabIndex=0;productName='';productStatus=0;merchantUserInfo = '';orderList = [];buyStartTime = '';buyEndTime = ''">
  10. 普通订单</div>
  11. <div class="tab-item" :class="tabIndex == 1?'active':''"
  12. @click="getserviceList(servicePage),tabIndex=1;productName='';productStatus=0;merchantUserInfo = '';serviceList = [];buyStartTime = '';buyEndTime = ''">
  13. 服务订单</div>
  14. </view>
  15. </view>
  16. </view>
  17. <view class="manage">
  18. <view class="search">
  19. <image src="/static/index/search.png" mode=""></image>
  20. <u-input type="text" v-model="merchantUserInfo" placeholder="请输入关键词" />
  21. <span @click="searchList">搜索</span>
  22. </view>
  23. <view class="action " @click="selectTime">
  24. <view class="cuIcon-filter"></view>
  25. </view>
  26. </view>
  27. <view class="select" v-if="tabIndex == 0">
  28. <view class="type" :class="currentIndex == index?'active':''" v-for="(item,index) in typeList" :key="index"
  29. @click="selectType(item,index)">
  30. {{item.name}}
  31. </view>
  32. </view>
  33. <view class="select" v-if="tabIndex == 1">
  34. <view class="type" :class="currentIndex == index?'active':''" v-for="(item,index) in statusList" :key="index"
  35. @click="selectSeiviceType(item,index)">
  36. {{item.name}}
  37. </view>
  38. </view>
  39. </view>
  40. <mescroll-uni class="list" :fixed="false" ref="mescrollRef" @up="getList" @init="mescrollInit" :use="false"
  41. v-if="tabIndex ==0">
  42. <view class="order_item" v-for="(item,index) in orderList" :key="item.id" @click="geDetail(item)">
  43. <view class="order_id">
  44. <view class="id_left">
  45. 订单编号:{{item.orderId}}
  46. </view>
  47. <view class="id_right" v-if="item.stateCode ==5">
  48. <!-- {{item.state}} -->
  49. 待付款
  50. </view>
  51. <view class="id_right" v-if="item.stateCode ==0" style="color: #ff9900;">
  52. 待使用
  53. </view>
  54. <view class="id_right" v-if="item.stateCode == 4" style="color:#449AFF ;">
  55. 退款/售后
  56. </view>
  57. <view class="id_right" v-if="item.stateCode ==1">
  58. 已使用
  59. </view>
  60. </view>
  61. <!-- 普通订单 -->
  62. <view class="order_product" v-if="item.categoryId != 1945013773786701826">
  63. <view class="img">
  64. <image :src="item.productImage" mode=""></image>
  65. </view>
  66. <view class="name">
  67. {{item.productName}}
  68. <span>¥{{item.orderPrice}}</span>
  69. </view>
  70. <view class="ticket" v-if="item.isUseRights">
  71. <image src="/static/product/ticket.png" mode=""></image>
  72. </view>
  73. </view>
  74. <!-- 钣金喷漆订单 -->
  75. <view class="spec" v-if="item.categoryId == 1945013773786701826">
  76. <view class="" v-if="item.orderLinkCategorySpecItems && item.orderLinkCategorySpecItems.length>0">
  77. <view class="order_product"
  78. v-for="(specitem, specIndex) in item.orderLinkCategorySpecItems.slice(0, item.isShow ? item.orderLinkCategorySpecItems.length : 2)"
  79. :key="specIndex">
  80. <view class="img">
  81. <image :src="item.productImage" mode=""></image>
  82. </view>
  83. <view class="spec_item">
  84. <view class="top">
  85. {{item.productName}}
  86. </view>
  87. <view class="content">
  88. <view class="left">
  89. <view class="cventer">
  90. {{specitem.partName}} {{specitem.positionName}}
  91. </view>
  92. <view class="foot">
  93. {{specitem.craftName}}
  94. </view>
  95. </view>
  96. <view class="right">
  97. <span style="font-size: 22rpx;color: #333333;">¥{{specitem.soldPrice}}</span>
  98. <span
  99. style="text-decoration: line-through;font-size: 18rpx;color: #999999;">¥{{specitem.price}}</span>
  100. </view>
  101. </view>
  102. </view>
  103. </view>
  104. </view>
  105. <view class="is_show" @click.stop="unfold(index)" v-if="item.orderLinkCategorySpecItems&&item.orderLinkCategorySpecItems.length > 2">
  106. {{item.isShow?'收起查看':'展开查看'}}
  107. <image src="/static/order/hidden.png" mode="" v-if="item.isShow"></image>
  108. <image src="/static/order/show.png" mode="" v-else></image>
  109. </view>
  110. </view>
  111. <view class="time">
  112. <view class="time_left">
  113. {{item.orderStateTimeName}}:{{item.orderStateTime}}
  114. </view>
  115. <view class="time_right" @click.stop="goRecord(item)" v-if="item.auditType =='0'">
  116. 去处理
  117. </view>
  118. <view class="all_price" v-if="item.categoryId == 1945013773786701826">
  119. <span style="font-size: 22rpx;color: #FD4912;margin-right: 10rpx;">¥已优惠{{item.couponPrice}}</span>
  120. <span style="font-size: 26rpx;color: #FD4912;"><text
  121. style="font-size: 22rpx;">¥</text>{{item.orderPrice}}</span>
  122. </view>
  123. </view>
  124. </view>
  125. </mescroll-uni>
  126. <!-- 服务订单 -->
  127. <mescroll-uni class="list" :fixed="false" ref="mescrollRef" @up="getserviceList" @init="mescrollInit" :use="false"
  128. v-if="tabIndex == 1">
  129. <view class="service_order" v-for="item in serviceList" :key="item.orderNo" @click="goDetail(item)">
  130. <view class="item_title">
  131. <span>订单编号:{{item.orderNo}}</span>
  132. <span>{{item.status}}</span>
  133. </view>
  134. <view class="car_id">
  135. {{item.licenseNo}}
  136. <!-- <span>{{item.checkType==0?'上门取车':'送车到站'}}</span> -->
  137. <span v-if="item.checkType==0">上门取车</span>
  138. <span v-if="item.checkType==1">送车到站</span>
  139. <span v-if="item.checkType==21">搭电救援</span>
  140. <span v-if="item.checkType==22">换胎救援</span>
  141. <span v-if="item.checkType==23">拖车救援</span>
  142. </view>
  143. <view class="name">
  144. {{item.productName}}
  145. <span @click.stop="goGetCar(item)" v-if="item.checkType == 0">取车地点</span>
  146. </view>
  147. <view class="time">
  148. <span>{{item.date}}</span>
  149. <span> <text>¥</text> {{item.rightsId?0:item.price}}</span>
  150. </view>
  151. <view class="btn_box">
  152. <view class="btn" @click.stop="goLive(item)">
  153. 实况记录
  154. </view>
  155. <view class="btn" style="margin-left: 16rpx;" @click.stop="callService(item)">
  156. 联系客服
  157. </view>
  158. <view class="btn border" @click.stop="callUser(item)">
  159. 联系客户
  160. </view>
  161. <!-- 03显示救援接单 -->
  162. <view class="btn join" @click.stop="receive(item)" v-if="item.checkType<20 && item.statusCode ==2"
  163. style="margin-left: 16rpx;">
  164. 接单
  165. </view>
  166. <view class="btn join" @click.stop="receive(item)" v-if="item.checkType>20 && item.flowStatus =='03'"
  167. style="margin-left: 16rpx;">
  168. 接单
  169. </view>
  170. <!-- 送车到站按钮区域开始item.checkType==1 -->
  171. <view class="" v-if="item.checkType==1" style="flex:1;display: flex;justify-content: space-around;">
  172. <view class="btn join" @click.stop="collect(item)" v-if="item.statusCode ==3 && item.flowStatus =='05'">
  173. 确认收车
  174. </view>
  175. <view class="btn join" @click.stop="finish(item)" v-if="item.statusCode ==4">
  176. 检测完成
  177. </view>
  178. <view class="btn join" @click.stop="takeCar(item)" v-if="item.statusCode ==5 && item.flowStatus =='12'">
  179. 确认取车
  180. </view>
  181. <view class="btn join" @click.stop="evaluate(item)" v-if="item.flowStatus =='16' ">
  182. 去评价
  183. </view>
  184. </view>
  185. <!-- 送车到站按钮区域结束
  186. 上门取车按钮区域开始item.checkType==0 -->
  187. <view class="" v-if="item.checkType == 0" style="flex:1;display: flex;justify-content: space-around;">
  188. <view class="btn join" @click.stop="goGetCar(item)" v-if="item.statusCode ==5 && item.flowStatus == 4">
  189. 去取车
  190. </view>
  191. <view class="btn join" @click.stop="collect(item)" v-if="item.statusCode ==5 && item.flowStatus == 5">
  192. 确认取车
  193. </view>
  194. <view class="btn join" @click.stop="finish(item)"
  195. v-if="item.statusCode ==4 && item.flowStatus==7 || item.flowStatus==8">
  196. 检测完成
  197. </view>
  198. <view class="btn join" @click.stop="goAlso(item)" v-if="item.statusCode ==3 && item.flowStatus==12">
  199. 去送车
  200. </view>
  201. <view class="btn join" @click.stop="delivered(item)" v-if="item.statusCode ==3&& item.flowStatus==13">
  202. 车已送达
  203. </view>
  204. <view class="btn join" @click.stop="evaluate(item)" v-if=" item.flowStatus =='16' ">
  205. 去评价
  206. </view>
  207. </view>
  208. <!-- 上门取车按钮区域结束 -->
  209. <!-- 救援相关按钮 -->
  210. <view class="" v-if="item.checkType >20 " style="flex:1;display: flex;justify-content: space-around;">
  211. <!--flowStatus == 04 显示-->
  212. <view class="btn join" @click.stop="depart(item)" v-if="item.flowStatus == '04'">
  213. 出发
  214. </view>
  215. <view class="btn join" @click.stop="arrive(item)" v-if="item.flowStatus == '05'">
  216. 到达现场
  217. </view>
  218. <view class="btn join" @click.stop="help(item)"
  219. v-if="item.statusCode ==4 && item.flowStatus=='07' || item.flowStatus=='06'|| item.flowStatus=='08'">
  220. 救援完成
  221. </view>
  222. <view class="btn join" @click.stop="evaluate(item)" v-if=" item.flowStatus =='12' ">
  223. 去评价
  224. </view>
  225. </view>
  226. </view>
  227. <!-- 年审 -->
  228. <view class="add_service" @click.stop="addService(item)" v-if="item.checkType<20 &&item.statusCode==4 ">
  229. <span>添加收费服务</span>
  230. </view>
  231. <!-- 救援 -->
  232. <view class="add_service" @click.stop="addService(item)"
  233. v-if="item.checkType>20&&(item.flowStatus== '06'||item.flowStatus== '07'||item.flowStatus== '08') ">
  234. <span>添加收费服务</span>
  235. </view>
  236. <view class="child_order">
  237. <view class="row" v-for="row in item.children" :key="row.orderNo">
  238. <view class="row_title">
  239. <span>订单编号:{{row.orderNo}}</span>
  240. <span class="row_status">{{row.status}}</span>
  241. </view>
  242. <view class="row_name">
  243. {{row.productName}}
  244. </view>
  245. <view class="row_price">
  246. <span><text>¥</text>{{row.price}}</span>
  247. <view class="row_detail" @click.stop="lookDetail(row)">
  248. 服务明细
  249. </view>
  250. </view>
  251. <view class="row_time">
  252. {{row.date}}
  253. </view>
  254. <view class="row_btn" @click.stop="editProject(row)"
  255. v-if="(row.statusCode == '0'|| row.statusCode == '7')&&item.count==0 ">
  256. <span>修改收费服务</span>
  257. </view>
  258. </view>
  259. </view>
  260. </view>
  261. </mescroll-uni>
  262. <rangTime ref="rangTime" :mode="mode" :isYear="true" @onSubmit="onEndTimeChange" @cut="cutPopup" />
  263. <receive @cut="isReceive =false" v-if="isReceive" :titleCheckType="titleCheckType" />
  264. <serviceDetail :subOrderId="subOrderId" @cut="cutsubOrderId" v-if="isServiceDeatil" />
  265. <upload :type="uptype" :taskId="taskId" v-if="isUpload" @cut="isUpload = false" @upSuccess="upSuccess" />
  266. <evaluate :userId="userId" :taskId="taskId" v-if="iseEvaluate" @cut="cutEvaluate" />
  267. </view>
  268. </template>
  269. <script>
  270. import receive from '../order/components/receiveOrder.vue'
  271. import upload from '../order/components/upload.vue'
  272. import evaluate from '../order/components/evaluate.vue'
  273. import serviceDetail from '../order/components/serviceDetail.vue'
  274. import rangTime from '../../components/dengrq-datetime-picker/dateSelector/index.vue'
  275. export default {
  276. components: {
  277. rangTime,
  278. receive,
  279. serviceDetail,
  280. upload,
  281. evaluate
  282. },
  283. data() {
  284. return {
  285. search: '',
  286. mode: 1,
  287. currentIndex: 0,
  288. merchantId: '',
  289. buyStartTime: '',
  290. buyEndTime: '',
  291. typeList: [{
  292. type: '',
  293. name: '全部'
  294. },
  295. {
  296. type: 5,
  297. name: '待付款'
  298. },
  299. {
  300. type: 0,
  301. name: '待使用'
  302. },
  303. {
  304. type: 1,
  305. name: '已使用'
  306. },
  307. {
  308. type: 4,
  309. name: '售后'
  310. }
  311. ],
  312. statusList: [{
  313. type: '',
  314. name: '全部'
  315. },
  316. {
  317. type: 1,
  318. name: '待接单'
  319. },
  320. {
  321. type: 2,
  322. name: '服务中'
  323. },
  324. {
  325. type: 3,
  326. name: '已完成'
  327. },
  328. {
  329. type: 4,
  330. name: '售后'
  331. }
  332. ],
  333. ststusCode: '', //审车策划状态
  334. orderList: [],
  335. state: '',
  336. merchantUserInfo: '',
  337. upOption: {
  338. page: {
  339. num: 0,
  340. size: 10 // 每页数据的数量,默认10
  341. },
  342. noMoreSize: 5, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  343. empty: {
  344. tip: '暂无相关数据'
  345. }
  346. },
  347. tabIndex: 0,
  348. serviceList: [],
  349. isReceive: false, //接单成功弹窗
  350. isServiceDeatil: false, //服务明细弹窗
  351. isUpload: false, //上传图片弹窗显隐
  352. uptype: '', //上传图片类型
  353. taskId: '', //上传图片传值
  354. checkType: '', //上传图片修改状态用
  355. subOrderId: '', //服务明细传递数据
  356. paramState: '', //上传完图片修改状态
  357. serveType: '', //服务类型
  358. iseEvaluate: false, //评价弹窗显隐
  359. userId: '', //评论用户id
  360. servicePage: {
  361. num: 1,
  362. size: 10
  363. },
  364. titleCheckType: null, //接单提示区分
  365. }
  366. },
  367. methods: {
  368. //展开/收起查看钣金喷漆子选项
  369. unfold(index) {
  370. this.orderList[index].isShow = !this.orderList[index].isShow;
  371. this.$forceUpdate();
  372. },
  373. //联系客户
  374. callUser(item) {
  375. uni.makePhoneCall({
  376. phoneNumber: item.contactsPhone,
  377. success: () => {
  378. uni.showToast({
  379. title: '正在拨号',
  380. icon: 'none'
  381. })
  382. },
  383. fail: (err) => {
  384. uni.showToast({
  385. title: '拨打失败: ' + err.errMsg,
  386. icon: 'none'
  387. })
  388. }
  389. })
  390. },
  391. //俩系客服
  392. callService(item) {
  393. uni.makePhoneCall({
  394. phoneNumber: item.custSerPhone,
  395. success: () => {
  396. uni.showToast({
  397. title: '正在拨号',
  398. icon: 'none'
  399. })
  400. },
  401. fail: (err) => {
  402. uni.showToast({
  403. title: '拨打失败: ' + err.errMsg,
  404. icon: 'none'
  405. })
  406. }
  407. })
  408. },
  409. //跳转实况记录
  410. goLive(item) {
  411. uni.navigateTo({
  412. url: '/pages/order/serviceOrder/live?taskId=' + item.taskId+'&checkType='+item.checkType
  413. })
  414. },
  415. selectTime() {
  416. this.$refs.rangTime.open()
  417. uni.hideTabBar()
  418. },
  419. onEndTimeChange(val) {
  420. this.buyStartTime = val.startDate
  421. this.buyEndTime = val.endDate
  422. if (this.tabIndex == 0) {
  423. this.orderList = []
  424. let page = {
  425. num: 1,
  426. size: 10
  427. }
  428. this.getList(page)
  429. } else {
  430. this.serviceList = []
  431. let page = {
  432. num: 1,
  433. size: 10
  434. }
  435. this.getserviceList(page)
  436. }
  437. },
  438. cutPopup() {
  439. this.isYear = false
  440. uni.showTabBar()
  441. },
  442. mescrollInit(mescroll) {
  443. this.mescroll = mescroll;
  444. },
  445. InputBlur(e) {
  446. this.search = e.detail.value
  447. },
  448. //普通订单
  449. selectType(item, index) {
  450. this.currentIndex = index
  451. this.state = item.type
  452. this.orderList = []
  453. // this.mescroll.resetUpScroll();
  454. let page = {
  455. num: 1,
  456. size: 10
  457. }
  458. this.getList(page)
  459. },
  460. //服务订单
  461. selectSeiviceType(item, index) {
  462. this.currentIndex = index
  463. this.statusCode = item.type
  464. this.serviceList = []
  465. let page = {
  466. num: 1,
  467. size: 10
  468. }
  469. this.getserviceList(page)
  470. // this.mescroll.resetUpScroll();
  471. },
  472. searchList() {
  473. if (this.tabIndex == 0) {
  474. let page = {
  475. num: 1,
  476. size: 10
  477. }
  478. this.orderList = []
  479. this.getList(page)
  480. } else {
  481. this.serviceList = []
  482. let page = {
  483. num: 1,
  484. size: 10
  485. }
  486. this.getserviceList(page)
  487. }
  488. },
  489. //跳转至订单详情页
  490. goRecord(item) {
  491. console.log(item)
  492. uni.navigateTo({
  493. url: '/pages/order/record?orderId=' + item.orderId
  494. })
  495. },
  496. //跳转至服务订单详情页
  497. goDetail(item) {
  498. uni.navigateTo({
  499. url: '/pages/order/serviceOrder/orderDetail?taskId=' + item.taskId + '&checkType=' + item.checkType +
  500. '&rightsId=' + item.rightsId
  501. })
  502. },
  503. getList(page) {
  504. let data = {
  505. merchantId: this.merchantId,
  506. pageSize: page.size,
  507. pageNo: page.num,
  508. state: this.state,
  509. merchantUserInfo: this.merchantUserInfo,
  510. buyStartTime: this.buyStartTime,
  511. buyEndTime: this.buyEndTime
  512. }
  513. this.$http.post("/app/order/locaOrder/list", data).then(res => {
  514. this.orderList = this.orderList.concat(res.data.result.records)
  515. // 展开/收起
  516. this.orderList.forEach(item => {
  517. item.isShow = false
  518. })
  519. console.log(this.orderList)
  520. this.mescroll.endSuccess(res.data.result.records.length, res.data.result.total);
  521. uni.showTabBar()
  522. }).catch(() => {
  523. this.mescroll.endErr()
  524. })
  525. },
  526. geDetail(item) {
  527. uni.navigateTo({
  528. url: '/pages/order/details?orderId=' + item.orderId
  529. })
  530. },
  531. //获取服务订单列表
  532. getserviceList(page) {
  533. let data = {
  534. merchantId: this.merchantId,
  535. pageSize: page.size,
  536. pageNo: page.num,
  537. status: this.statusCode,
  538. searchContent: this.merchantUserInfo,
  539. buyStartTime: this.buyStartTime,
  540. buyEndTime: this.buyEndTime
  541. }
  542. this.$http.post("/ts/merchant/serviceOrder", data).then(res => {
  543. this.serviceList = this.serviceList.concat(res.data.result.records)
  544. this.mescroll.endSuccess(res.data.result.records.length, res.data.result.total);
  545. })
  546. .catch(() => {
  547. this.mescroll.endErr()
  548. })
  549. },
  550. // 接单
  551. receive(item) {
  552. console.log(item)
  553. this.titleCheckType = item.checkType
  554. let data = {
  555. taskId: item.taskId,
  556. checkType: item.checkType,
  557. paramState: '04', //商户接单成功
  558. // serveType: '01'//救援02
  559. }
  560. item.checkType < 20 ? data.serveType = '01' : data.serveType = '02'
  561. this.$http.post("/ts/merchant/update/Serve", data).then(res => {
  562. if (res.data.code == 200) {
  563. this.isReceive = true
  564. this.serviceList = []
  565. let page = {
  566. num: 1,
  567. size: 10
  568. }
  569. this.getserviceList(page)
  570. }
  571. })
  572. },
  573. //收车上传照片
  574. collect(item) {
  575. console.log(item)
  576. this.taskId = item.taskId
  577. this.checkType = item.checkType
  578. //0 取车,1送车
  579. if (item.checkType == 0) {
  580. //收车
  581. // if (item.statusCode == 5) {
  582. this.uptype = 1
  583. // }
  584. // else if (item.statusCode == 4) {
  585. // this.uptype = 3
  586. // }
  587. } else if (item.checkType == 1) {
  588. //客户送车,商户收车
  589. // if (item.statusCode == 3) {
  590. this.uptype = 2
  591. // }
  592. /* else {
  593. this.uptype = 3
  594. } */
  595. }
  596. this.paramState = '07'
  597. this.serveType = '01'
  598. this.isUpload = true
  599. // this.upSuccess('07','01')
  600. },
  601. //送车到站————检测完成
  602. upSuccess() {
  603. let data = {
  604. taskId: this.taskId,
  605. checkType: this.checkType,
  606. paramState: this.paramState, //商户上传图片成功
  607. serveType: this.serveType
  608. }
  609. this.$http.post("/ts/merchant/update/Serve", data).then(res => {
  610. if (res.data.code == 200) {
  611. this.isUpload = false
  612. this.serviceList = []
  613. let page = {
  614. num: 1,
  615. size: 10
  616. }
  617. this.getserviceList(page)
  618. } else {
  619. this.isUpload = false
  620. this.serviceList = []
  621. let page = {
  622. num: 1,
  623. size: 10
  624. }
  625. this.getserviceList(page)
  626. uni.showToast({
  627. icon: 'none',
  628. title: res.data.message
  629. })
  630. }
  631. })
  632. },
  633. //检测完成上传检测图片
  634. finish(item) {
  635. console.log(item)
  636. this.taskId = item.taskId
  637. this.checkType = item.checkType
  638. this.uptype = 3
  639. //0 取车,1送车
  640. // if (item.checkType == 0) {
  641. // // if (item.statusCode == 5) {
  642. // this.uptype = 1
  643. // // }
  644. // } else if (item.checkType == 1) {
  645. // //客户送车,商户收车
  646. // if (item.statusCode == 4) {
  647. // this.uptype = 3
  648. // }
  649. // }
  650. this.isUpload = true
  651. this.paramState = '12'
  652. this.serveType = '01'
  653. this.serviceList = []
  654. let page = {
  655. num: 1,
  656. size: 10
  657. }
  658. this.getserviceList(page)
  659. },
  660. //送车到站--确认取车
  661. takeCar(item) {
  662. console.log(item)
  663. let data = {
  664. taskId: item.taskId,
  665. checkType: item.checkType,
  666. paramState: '14', //
  667. serveType: '01'
  668. }
  669. this.$http.post("/ts/merchant/update/Serve", data).then(res => {
  670. if (res.data.code == 200) {
  671. this.isUpload = false
  672. this.serviceList = []
  673. let page = {
  674. num: 1,
  675. size: 10
  676. }
  677. this.getserviceList(page)
  678. }
  679. })
  680. },
  681. //评价弹窗显示
  682. evaluate(item) {
  683. console.log(item)
  684. this.iseEvaluate = true
  685. this.taskId = item.taskId
  686. this.userId = item.userId
  687. uni.hideTabBar()
  688. },
  689. //评价弹窗隐藏
  690. cutEvaluate() {
  691. this.iseEvaluate = false
  692. uni.showTabBar()
  693. this.serviceList = []
  694. let page = {
  695. num: 1,
  696. size: 10
  697. }
  698. this.getserviceList(page)
  699. },
  700. //查看收费服务明细
  701. lookDetail(item) {
  702. this.subOrderId = item.orderNo
  703. this.isServiceDeatil = true
  704. uni.hideTabBar()
  705. },
  706. //修改服务明细
  707. editProject(row) {
  708. console.log(row)
  709. uni.navigateTo({
  710. url: '/pages/order/serviceOrder/project?orderNo=' + row.orderNo + '&checkType=' + row.checkType +
  711. '&taskId=' + row.taskId + '&productName=' + row.productName +
  712. '&type=' + 0
  713. })
  714. },
  715. cutsubOrderId() {
  716. this.isServiceDeatil = false
  717. uni.showTabBar()
  718. },
  719. //商户去取车
  720. goGetCar(item) {
  721. console.log(item)
  722. let data = {
  723. taskId: item.taskId,
  724. checkType: item.checkType,
  725. paramState: '05', //商户接单成功
  726. serveType: '01'
  727. }
  728. let that = this
  729. // uni.navigateTo({
  730. // 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`)
  731. // })
  732. this.serviceList = []
  733. let page = {
  734. num: 1,
  735. size: 10
  736. }
  737. this.getserviceList(page)
  738. uni.openLocation({
  739. longitude: Number(item.userLongitude),
  740. latitude: Number(item.userLatitude),
  741. name: item.carAddres, // 位置名称
  742. // address: e.F_Address, // 位置地点
  743. success: function(res) {
  744. console.log('打开系统位置地图成功')
  745. that.$http.post("/ts/merchant/update/Serve", data).then(res => {
  746. if (res.data.code == 200) {
  747. // this.isReceive = true
  748. }
  749. })
  750. },
  751. fail: function(error) {
  752. console.log(error)
  753. },
  754. })
  755. },
  756. //救援出发
  757. depart(item) {
  758. console.log(item)
  759. let data = {
  760. taskId: item.taskId,
  761. checkType: item.checkType,
  762. paramState: '05', //商户出发成功
  763. serveType: '02'
  764. }
  765. this.$http.post("/ts/merchant/update/Serve", data).then(res => {
  766. if (res.data.code == 200) {
  767. // this.isReceive = true
  768. this.serviceList = []
  769. let page = {
  770. num: 1,
  771. size: 10
  772. }
  773. this.getserviceList(page)
  774. }
  775. })
  776. },
  777. //救援到达现场
  778. arrive(item) {
  779. // this.taskId = item.taskId
  780. // this.checkType = item.checkType
  781. // this.uptype = 4 //道路救援
  782. // this.paramState = '06'
  783. // this.serveType = '02'
  784. let params = {
  785. taskId: item.taskId,
  786. checkType: item.checkType,
  787. uptype: 4, // 道路救援
  788. paramState: '06',
  789. serveType: '02',
  790. // isUpload: true
  791. }
  792. let queryString = Object.keys(params)
  793. .map(key => `${key}=${encodeURIComponent(params[key])}`)
  794. .join('&');
  795. uni.navigateTo({
  796. // url:'/pages/order/arriveUpload、${queryString}' paramState
  797. url: `/pages/order/arriveUpload?taskId=${item.taskId}&checkType=${item.checkType}&uptype=4&paramState=06&serveType=02&jumptype=0`
  798. })
  799. },
  800. //救援完成拍照
  801. help(item) {
  802. console.log(item)
  803. this.taskId = item.taskId
  804. this.checkType = item.checkType
  805. this.uptype = 3
  806. this.isUpload = true
  807. this.paramState = '11'
  808. this.serveType = '02'
  809. this.serviceList = []
  810. let page = {
  811. num: 1,
  812. size: 10
  813. }
  814. this.getserviceList(page)
  815. },
  816. //添加收费服务
  817. addService(item) {
  818. this.$http.get("/ts/merchant/addPaidServiceCheck?taskId=" + item.taskId).then(res => {
  819. console.log(res)
  820. if (res.data.result) {
  821. uni.navigateTo({
  822. url: '/pages/order/serviceOrder/project?checkType=' + item.checkType + '&taskId=' + item.taskId +
  823. '&orderNo=' + item.orderNo + '&productName=' + item.productName + '&type=' + 1
  824. })
  825. } else {
  826. uni.showToast({
  827. icon: 'none',
  828. title: '存在未支付服务项'
  829. })
  830. }
  831. })
  832. },
  833. //去送车修改状态
  834. goAlso(item) {
  835. let data = {
  836. taskId: item.taskId,
  837. checkType: item.checkType,
  838. paramState: '13', //商户点击去送车
  839. serveType: '01'
  840. }
  841. this.$http.post("/ts/merchant/update/Serve", data).then(res => {
  842. if (res.data.code == 200) {
  843. this.serviceList = []
  844. let page = {
  845. num: 1,
  846. size: 10
  847. }
  848. this.getserviceList(page)
  849. }
  850. })
  851. },
  852. //商户点击车已送达
  853. delivered(item) {
  854. let data = {
  855. taskId: item.taskId,
  856. checkType: item.checkType,
  857. paramState: '14', //商户点击车已送达
  858. serveType: '01'
  859. }
  860. this.$http.post("/ts/merchant/update/Serve", data).then(res => {
  861. if (res.data.code == 200) {
  862. this.serviceList = []
  863. let page = {
  864. num: 1,
  865. size: 10
  866. }
  867. this.getserviceList(page)
  868. }
  869. })
  870. }
  871. },
  872. mounted() {
  873. this.mescroll.optDown.use = false
  874. // this.getList()
  875. },
  876. onShow() {
  877. let that = this
  878. uni.getStorage({
  879. key: 'login_user_info',
  880. success: function(res) {
  881. that.merchantId = res.data.merchantId
  882. that.serviceList = []
  883. let page = {
  884. num: 1,
  885. size: 10
  886. }
  887. that.getserviceList(page)
  888. }
  889. })
  890. },
  891. }
  892. </script>
  893. <style lang="scss" scoped>
  894. .order {
  895. width: 100%;
  896. height: 100vh;
  897. background: #F7F8FC;
  898. display: flex;
  899. flex-direction: column;
  900. position: fixed;
  901. .fix {
  902. width: 100%;
  903. height: auto;
  904. background: #ffffff;
  905. position: sticky;
  906. top: 0px;
  907. border-bottom: 1px solid #EEEEEE;
  908. /*#ifdef APP-PLUS*/
  909. .top {
  910. width: 100%;
  911. height: var(--status-bar-height);
  912. background: #FFFFFF;
  913. }
  914. /*#endif*/
  915. .head {
  916. width: 100%;
  917. height: 112rpx;
  918. padding: 20rpx;
  919. display: flex;
  920. align-items: center;
  921. background: #fff;
  922. position: relative;
  923. background: #FFFFFF;
  924. .cuIcon-back {
  925. font-size: 40rpx;
  926. margin-right: 40rpx;
  927. }
  928. .case {
  929. width: 100%;
  930. position: absolute;
  931. left: 50%;
  932. transform: translateX(-50%);
  933. font-size: 36rpx;
  934. font-weight: 600;
  935. .select_type {
  936. display: flex;
  937. justify-content: space-around;
  938. .tab-item {
  939. position: relative;
  940. padding: 18rpx 0;
  941. cursor: pointer;
  942. color: #333;
  943. font-weight: 400;
  944. font-size: 28rpx;
  945. }
  946. .tab-item.active {
  947. color: #449AFF;
  948. font-weight: 600;
  949. }
  950. .tab-item.active::after {
  951. content: '';
  952. position: absolute;
  953. bottom: -28px;
  954. left: 35%;
  955. width: 38rpx;
  956. height: 100%;
  957. background: url(/static/product/tab-act.png) no-repeat;
  958. background-size: contain;
  959. }
  960. }
  961. }
  962. // .action {
  963. // position: absolute;
  964. // right: 24rpx;
  965. // }
  966. }
  967. .manage {
  968. display: flex;
  969. align-items: center;
  970. width: 100%;
  971. padding: 0 24rpx;
  972. .search {
  973. width: 93%;
  974. height: 55rpx;
  975. background: #F7F8FC;
  976. border-radius: 12rpx;
  977. padding: 0rpx 24rpx;
  978. display: flex;
  979. align-items: center;
  980. justify-content: space-between;
  981. margin-right: 20rpx;
  982. // margin: 16rpx auto 0px;
  983. image {
  984. width: 36rpx;
  985. height: 36rpx;
  986. }
  987. input {
  988. // height: 36rpx;
  989. font-size: 26rpx;
  990. }
  991. span {
  992. font-size: 26rpx;
  993. color: #333333;
  994. }
  995. }
  996. }
  997. .select {
  998. width: 100%;
  999. height: 85rpx;
  1000. display: flex;
  1001. align-items: center;
  1002. justify-content: space-between;
  1003. padding: 0px 24rpx;
  1004. background-color: #FFFFFF;
  1005. .type {
  1006. height: 54rpx;
  1007. padding: 8rpx 12rpx;
  1008. background: #F2F3F5;
  1009. border-radius: 8rpx;
  1010. }
  1011. .active {
  1012. background: #ECF5FF;
  1013. color: #2D88F4;
  1014. }
  1015. }
  1016. }
  1017. .list {
  1018. flex: 1;
  1019. width: 100%;
  1020. overflow-y: auto;
  1021. padding-bottom: var(--window-bottom);
  1022. .order_item {
  1023. width: 100%;
  1024. background-color: #fff;
  1025. padding: 20rpx 40rpx;
  1026. margin-bottom: 20rpx;
  1027. .order_id {
  1028. width: 100%;
  1029. height: 41rpx;
  1030. font-size: 26rpx;
  1031. color: #8B91A4;
  1032. display: flex;
  1033. justify-content: space-between;
  1034. align-items: center;
  1035. .id_right {}
  1036. }
  1037. .order_product {
  1038. width: 100%;
  1039. height: 132rpx;
  1040. display: flex;
  1041. margin: 10rpx 0px;
  1042. margin-bottom: 20rpx;
  1043. .img {
  1044. width: 132rpx;
  1045. height: 132rpx;
  1046. border-radius: 12rpx;
  1047. overflow: hidden;
  1048. image {
  1049. width: 132rpx;
  1050. height: 132rpx;
  1051. }
  1052. }
  1053. .name {
  1054. height: 100%;
  1055. flex: 1;
  1056. display: flex;
  1057. flex-direction: column;
  1058. justify-content: space-between;
  1059. margin-left: 20rpx;
  1060. font-size: 28rpx;
  1061. color: #000000;
  1062. span {
  1063. font-size: 22rpx;
  1064. color: #F0761D;
  1065. }
  1066. }
  1067. .ticket {
  1068. image {
  1069. width: 50rpx;
  1070. height: 50rpx;
  1071. }
  1072. }
  1073. .schedule {
  1074. width: 15%;
  1075. }
  1076. .spec_item {
  1077. flex: 1;
  1078. margin-left: 20rpx;
  1079. display: flex;
  1080. flex-direction: column;
  1081. justify-content: space-between;
  1082. .top {
  1083. font-size: 26rpx;
  1084. height: 38rpx;
  1085. color: #000000;
  1086. margin-bottom: 6rpx;
  1087. }
  1088. .content {
  1089. width: 100%;
  1090. flex: 1;
  1091. display: flex;
  1092. justify-content: space-between;
  1093. padding-top: 15rpx;
  1094. .left {
  1095. display: flex;
  1096. flex-direction: column;
  1097. justify-content: space-between;
  1098. font-size: 22rpx;
  1099. color: #333333;
  1100. }
  1101. .right {
  1102. text-align: right;
  1103. display: flex;
  1104. flex-direction: column;
  1105. justify-content: space-between;
  1106. }
  1107. }
  1108. }
  1109. }
  1110. .is_show {
  1111. display: flex;
  1112. align-items: center;
  1113. justify-content: center;
  1114. font-size: 24rpx;
  1115. color: #2D88F4;
  1116. image {
  1117. width: 20rpx;
  1118. height: 20rpx;
  1119. margin-left: 10rpx;
  1120. }
  1121. }
  1122. .time {
  1123. width: 100%;
  1124. display: flex;
  1125. align-items: center;
  1126. justify-content: space-between;
  1127. margin-top: 20rpx;
  1128. .time_left {
  1129. font-size: 24rpx;
  1130. color: #8A91A8;
  1131. }
  1132. .time_right {
  1133. width: 126rpx;
  1134. height: 50rpx;
  1135. background: rgba(240, 118, 29, 0.05);
  1136. border-radius: 8rpx;
  1137. border: 1px solid #F0761D;
  1138. font-size: 26rpx;
  1139. color: #F0761D;
  1140. display: flex;
  1141. align-items: center;
  1142. justify-content: center;
  1143. }
  1144. }
  1145. }
  1146. .service_order {
  1147. background: #FFFFFF;
  1148. padding: 22rpx 32rpx;
  1149. margin-bottom: 20rpx;
  1150. .item_title {
  1151. width: 100%;
  1152. display: flex;
  1153. justify-content: space-between;
  1154. margin-bottom: 22rpx;
  1155. span {
  1156. font-size: 26rpx;
  1157. color: #8B91A4;
  1158. }
  1159. }
  1160. .car_id {
  1161. font-size: 30rpx;
  1162. color: #333333;
  1163. font-weight: 600;
  1164. display: flex;
  1165. align-items: center;
  1166. margin-bottom: 8rpx;
  1167. span {
  1168. width: 120rpx;
  1169. height: 40rpx;
  1170. background: #FDF6F2;
  1171. border-radius: 8rpx;
  1172. font-size: 24rpx;
  1173. line-height: 40rpx;
  1174. color: #FD4912;
  1175. text-align: center;
  1176. margin-left: 16rpx;
  1177. }
  1178. }
  1179. .name {
  1180. width: 100%;
  1181. height: 62rpx;
  1182. background: linear-gradient(90deg, #F8F9FB 0%, #FBFCFD 100%);
  1183. border-radius: 12rpx;
  1184. padding: 12rpx;
  1185. font-size: 26rpx;
  1186. color: #333333;
  1187. font-weight: 600;
  1188. margin-bottom: 8rpx;
  1189. display: flex;
  1190. justify-content: space-between;
  1191. align-items: center;
  1192. span {
  1193. display: inline-block;
  1194. width: 152rpx;
  1195. height: 50rpx;
  1196. background: rgba(240, 118, 29, 0.05);
  1197. border-radius: 35rpx;
  1198. border: 1px solid #F0761D;
  1199. font-size: 26rpx;
  1200. color: #F0761D;
  1201. text-align: center;
  1202. line-height: 50rpx;
  1203. }
  1204. }
  1205. .time {
  1206. display: flex;
  1207. align-items: center;
  1208. justify-content: space-between;
  1209. font-size: 24rpx;
  1210. color: #8A91A8;
  1211. span {
  1212. text {
  1213. font-size: 16rpx;
  1214. }
  1215. color: #FD4912;
  1216. }
  1217. }
  1218. .btn_box {
  1219. display: flex;
  1220. align-items: center;
  1221. justify-content: end;
  1222. margin-top: 20rpx;
  1223. .btn {
  1224. height: 51rpx;
  1225. padding: 6rpx 24rpx;
  1226. border-radius: 61rpx;
  1227. font-size: 26rpx;
  1228. border: 1px solid #CCCCCC;
  1229. display: flex;
  1230. align-items: center;
  1231. }
  1232. .border {
  1233. border: 1px solid #2D88F4;
  1234. color: #2D88F4;
  1235. margin-left: 16rpx;
  1236. }
  1237. .join {
  1238. background: #2D88F4;
  1239. color: #FFFFFF;
  1240. border: none;
  1241. }
  1242. }
  1243. .add_service {
  1244. width: 100%;
  1245. height: 100rpx;
  1246. background: linear-gradient(180deg, #EEF7FF 0%, #F6FBFF 100%);
  1247. border-radius: 12rpx;
  1248. margin-top: 20rpx;
  1249. display: flex;
  1250. align-items: center;
  1251. justify-content: center;
  1252. span {
  1253. width: 204rpx;
  1254. height: 50rpx;
  1255. background: linear-gradient(90deg, #53A2FF 0%, #2589FF 100%);
  1256. border-radius: 49rpx;
  1257. font-size: 26rpx;
  1258. color: #FFFFFF;
  1259. display: flex;
  1260. align-items: center;
  1261. justify-content: center;
  1262. }
  1263. }
  1264. .child_order {
  1265. width: 100%;
  1266. border-radius: 12rpx;
  1267. margin: 20rpx 0px;
  1268. .row {
  1269. margin-bottom: 20rpx;
  1270. background: linear-gradient(180deg, #EEF7FF 0%, #F6FBFF 100%);
  1271. padding: 10rpx 12rpx;
  1272. .row_title {
  1273. width: 100%;
  1274. display: flex;
  1275. align-items: center;
  1276. justify-content: space-between;
  1277. font-size: 26rpx;
  1278. color: #8B91A4;
  1279. margin-bottom: 20rpx;
  1280. .row_status {
  1281. font-size: 28rpx;
  1282. color: #FF9900;
  1283. }
  1284. }
  1285. .row_name {
  1286. font-size: 26rpx;
  1287. color: #333333;
  1288. margin-bottom: 7rpx;
  1289. font-weight: 600;
  1290. }
  1291. .row_price {
  1292. display: flex;
  1293. align-items: center;
  1294. justify-content: space-between;
  1295. margin-bottom: 7rpx;
  1296. span {
  1297. font-size: 26rpx;
  1298. color: #FD4912;
  1299. font-weight: 600;
  1300. text {
  1301. font-size: 16rpx;
  1302. }
  1303. }
  1304. .row_detail {
  1305. padding: 6rpx 24rpx;
  1306. background: #FFFFFF;
  1307. border-radius: 61rpx;
  1308. border: 1px solid #2D88F4;
  1309. font-size: 24rpx;
  1310. color: #2D88F4;
  1311. display: flex;
  1312. align-items: center;
  1313. justify-content: space-between;
  1314. }
  1315. }
  1316. .row_time {
  1317. font-size: 22rpx;
  1318. color: #888888;
  1319. margin-bottom: 16rpx;
  1320. }
  1321. .row_btn {
  1322. display: flex;
  1323. align-items: center;
  1324. justify-content: end;
  1325. span {
  1326. width: 204rpx;
  1327. height: 50rpx;
  1328. background: #2D88F4;
  1329. border-radius: 8rpx;
  1330. display: flex;
  1331. align-items: center;
  1332. justify-content: center;
  1333. font-size: 26rpx;
  1334. color: #FFFFFF;
  1335. }
  1336. }
  1337. }
  1338. }
  1339. }
  1340. }
  1341. }
  1342. </style>