orderDetail.vue 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238
  1. <template>
  2. <view class="box">
  3. <view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
  4. <view class="top">
  5. <view class="nav" :style="{top: iStatusBarHeight + 'px'}">
  6. <view>
  7. <image src="../../static/img/baiback22.png" mode="" class="gobackImg" @click="goback"></image>
  8. </view>
  9. <view>订单详情</view>
  10. <view style="width: 130rpx;"></view>
  11. </view>
  12. <view style="height: 44px;"></view>
  13. <view :style="{height: iStatusBarHeight + 'px'}"></view>
  14. <view class="SheetState" v-if="orderData.SheetState==1">等待付款</view>
  15. <view class="SheetState" v-if="orderData.SheetState==2">等待门店确认</view>
  16. <view class="SheetState" v-if="orderData.SheetState==3">等待门店收货</view>
  17. <view class="SheetState" v-if="orderData.SheetState==4">请尽快到店享受服务</view>
  18. <view class="SheetState" v-if="orderData.SheetState==5">订单已完成</view>
  19. <view class="SheetState" v-if="orderData.SheetState==0">订单已取消</view>
  20. </view>
  21. <view v-if="orderData">
  22. <view style="margin-top: -84rpx;"></view>
  23. <!-- 服务确认码 -->
  24. <view class="orderTop" v-if="orderData.SheetState==4 || orderData.SheetState==5">
  25. <view class="maBox">
  26. <view class="timeLeft">
  27. <span>服务确认码</span>
  28. </view>
  29. <view style="text-decoration:line-through; color: #999999; font-size: 26rpx;"
  30. v-if="orderData.SheetState==5 && orderData.ServiceCode!=null">{{orderData.ServiceCode}}</view>
  31. <view class="rightShou" v-if="orderData.SheetState==4">
  32. <view class="timeRight" style="color: #FF2400;" @click="showMa">收起</view>
  33. <image src="../../static/img/icon_arrow_up_orange.png" style="width: 17rpx; height: 11rpx;">
  34. </image>
  35. </view>
  36. <view style="color: #999999; font-size: 26rpx;" v-if="orderData.SheetState==5">已使用</view>
  37. </view>
  38. <!-- 确认码 -->
  39. <view class="querenMa" v-if="isShowMa==true && orderData.SheetState==4">
  40. <view style="color: #FF2400; font-size: 24rpx; text-align: center;">请到店出示券码即可开始服务</view>
  41. <view class="maBoximg">
  42. <tki-qrcode cid="qrcode1" ref="qrcode" :val="orderData.ServiceCode" :size="308" :unit="unit"
  43. :pdground="pdground" :icon="icon" :iconSize="iconsize" :lv="lv" :onval="onval"
  44. :loadMake="loadMake" :usingComponents="true" @result="qrR" />
  45. </view>
  46. <view style="color: #333333; font-size: 26rpx; font-weight: bold; text-align: center;">
  47. {{orderData.ServiceCode}}
  48. </view>
  49. </view>
  50. </view>
  51. <!-- 服务信息 -->
  52. <view class="orderTop">
  53. <view class="timeBox">
  54. <view class="timeLeft">
  55. <span>服务信息</span>
  56. </view>
  57. <view class="timeRight" @click="qrcodeClick">订单码</view>
  58. </view>
  59. <!-- 客户信息 -->
  60. <view class="people">
  61. <image src="../../static/img/icon_ren.png" mode="" class="shopBoximg"></image>
  62. <view class="peopleCont">{{orderData.ContactName}}</view>
  63. <view class="peopleCont" style="padding-left: 20rpx;">{{orderData.ContactPhone}}</view>
  64. </view>
  65. <!-- 车辆信息 -->
  66. <view class="PlateNumberBox">
  67. <image src="../../static/img/icon_che.png" mode="" class="shopBoximg"></image>
  68. <view class="">
  69. <view class="PlateNumberBoxTop">
  70. <view class="PlateNumbercx"> <span v-if="orderData.Brand">{{orderData.Brand}}</span>
  71. <span style="padding-left: 20rpx;" v-if="orderData.Series">{{orderData.Series}}</span>
  72. </view>
  73. <view class="PlateNumber">{{orderData.PlateNumber}}</view>
  74. </view>
  75. <view class="CarModel">{{orderData.CarModel}}</view>
  76. </view>
  77. </view>
  78. <!-- 店铺信息 -->
  79. <view class="shopBox">
  80. <image src="../../static/img/icon_store.png" mode="" class="shopBoximg"></image>
  81. <view class="shopCont">
  82. <view class="shopName">{{orderData.ShopName}}</view>
  83. <view class="Address">
  84. {{orderData.ProvinceName}}{{orderData.CityName}}{{orderData.AreaName}}{{orderData.Address}}
  85. </view>
  86. <view v-if="orderData.SheetState==2">
  87. <!-- ChangeState 更换门店:1待处理2更换成功3更换关闭 3的不展示 -->
  88. <view style="color: #3F90F7; font-size: 26rpx;" v-if="orderData.ChangeState==1" @click="changeDetail">更换门店中</view>
  89. <view style="color: #3F90F7; font-size: 26rpx;" v-else @click="changeStore">申请更换服务门店</view>
  90. </view>
  91. </view>
  92. <view class="shopRightBox" @click="map">
  93. <image src="../../static/img/icon_ditu.png" mode="" class="shopRightImg"></image>
  94. <view class="shopRihgtTxt">地图</view>
  95. </view>
  96. <view class="shopsx"></view>
  97. <view class="shopRightBox" @click="call">
  98. <image src="../../static/img/icon_phone.png" mode="" class="shopRightImg"></image>
  99. <view class="shopRihgtTxt">电话</view>
  100. </view>
  101. </view>
  102. </view>
  103. <!-- 预约信息 -->
  104. <view class="yuyueBox"
  105. v-if="orderData.SheetState==4 && (orderData.OrderState==2 || orderData.OrderState==3)">
  106. <view class="timeBox">
  107. <view class="timeLeft">
  108. <span>预约信息</span>
  109. </view>
  110. </view>
  111. <view class="yuyueTime">
  112. <image src="../../static/img/icon_time.png" mode="" class="shopBoximg"></image>
  113. <view class="peopleCont">预约到店</view>
  114. <view class="peopleCont" style="padding-left: 20rpx;">{{orderData.OrderTime}}</view>
  115. <image v-if="orderData.OrderState==2" src="../../static/img/icon_edit.png" mode=""
  116. class="timeEditImg" @click="timeShowClick"></image>
  117. </view>
  118. <view class="yuyueState">
  119. <image src="../../static/img/icon_state.png" mode="" class="shopBoximg"></image>
  120. <view class="peopleCont">预约状态</view>
  121. <view class="peopleCont" style="padding-left: 20rpx;" v-if="orderData.OrderState==2">待确认</view>
  122. <view class="peopleCont" style="padding-left: 20rpx;" v-if="orderData.OrderState==3">已确认</view>
  123. </view>
  124. </view>
  125. <!-- 商品明细-->
  126. <view class="detailedBox itemBox" v-if="orderData.goods.length!=0">
  127. <view class="detailedTitle">商品明细</view>
  128. <view class="detailedLineBox">
  129. <view class="detailedLine" v-for="(item,index) in orderData.goods">
  130. <view>
  131. <image :src="item.Url" mode="" class="detailedImg" v-if="item.Url"></image>
  132. <image src="../../static/img/noimg.png" mode="" class="detailedImg" v-else></image>
  133. </view>
  134. <view class="detailedCont">
  135. <view class="detailedName">{{item.GoodsName}}</view>
  136. <view class="detailedContBottom">
  137. <span class="SalePrice">¥{{item.SalePrice}}</span>
  138. <span>x{{item.SaleQty}}</span>
  139. </view>
  140. </view>
  141. </view>
  142. </view>
  143. </view>
  144. <!-- 项目明细 -->
  145. <view class="detailedBox itemBox" v-if=" orderData.items.length!=0">
  146. <view class="detailedTitle">项目明细</view>
  147. <view class="detailedLineBox">
  148. <view class="detailedLine" v-for="(item,index) in orderData.items">
  149. <view>
  150. <image :src="item.Url" mode="" class="detailedImg" v-if="item.Url"></image>
  151. <image src="../../static/img/icon_xiangmu.png" mode="" class="detailedImg" v-else></image>
  152. </view>
  153. <view class="detailedCont">
  154. <view class="detailedName">{{item.ItemName}}</view>
  155. <view class="detailedContBottom">
  156. <span class="SalePrice">¥{{item.SalePrice}}</span>
  157. <span>x1</span>
  158. </view>
  159. </view>
  160. </view>
  161. </view>
  162. </view>
  163. <!-- 费用明细 -->
  164. <view class="goodscost">
  165. <view class="goodscostLine">
  166. <view class="goodscostTxt">商品费</view>
  167. <view class="goodsCostNum">¥{{orderData.GoodsMoney}}</view>
  168. </view>
  169. <view class="goodscostLine">
  170. <view class="goodscostTxt">项目费</view>
  171. <view class="goodsCostNum">¥{{orderData.ItemMoney}}</view>
  172. </view>
  173. <view class="goodscostLine">
  174. <view class="goodscostTxt">优惠券优惠</view>
  175. <view class="goodsCostNum">-¥{{orderData.CouponMoney}}</view>
  176. </view>
  177. <view class="goodscostLine">
  178. <view class="goodscostTxt">实付款</view>
  179. <view class="goodsCostNum" style="color: #FF4F00;">¥{{orderData.PayMoney}}</view>
  180. </view>
  181. </view>
  182. <!-- 订单信息 -->
  183. <view class="information">
  184. <view class="detailedTitle">订单信息</view>
  185. <view class="informationLine">
  186. <view class="informationTxt">订单编号:</view>
  187. <view class="informationNum">{{orderData.Code}}</view>
  188. <view class="copyBtn" @click="copy(orderData.Code)">复制</view>
  189. </view>
  190. <view class="informationLine">
  191. <view class="informationTxt">下单人:</view>
  192. <view class="informationNum">{{orderData.MemberName}}</view>
  193. </view>
  194. <view class="informationLine">
  195. <view class="informationTxt">下单时间:</view>
  196. <view class="informationNum">{{orderData.CreateTime}}</view>
  197. </view>
  198. <view class="informationLine">
  199. <view class="informationTxt">下单备注:</view>
  200. <view class="informationNum">{{orderData.Comment}}</view>
  201. </view>
  202. <view class="informationLine">
  203. <view class="informationTxt">确认订单时间:</view>
  204. <view class="informationNum" v-if="orderData.ConfirmTime != null">{{orderData.ConfirmTime}}</view>
  205. </view>
  206. <view class="informationLine">
  207. <view class="informationTxt">确认收货时间:</view>
  208. <view class="informationNum" v-if="orderData.ReceivingTime != null">{{orderData.ReceivingTime}}
  209. </view>
  210. </view>
  211. <view class="informationLine">
  212. <view class="informationTxt">服务完成时间:</view>
  213. <view class="informationNum" v-if="orderData.ServiceTime != null">{{orderData.ServiceTime}}</view>
  214. </view>
  215. </view>
  216. <!-- 支付信息 -->
  217. <view class="information">
  218. <view class="detailedTitle">支付信息</view>
  219. <view class="informationLine">
  220. <view class="informationTxt">支付方式:</view>
  221. <view class="informationNum">在线支付</view>
  222. </view>
  223. <view class="informationLine">
  224. <view class="informationTxt">支付时间:</view>
  225. <view class="informationNum" v-if="orderData.PayTime">{{orderData.PayTime}}</view>
  226. </view>
  227. </view>
  228. <!-- 底部按钮 操作 -->
  229. <view style="height: 150rpx;"></view>
  230. <view class="orderBottom" v-if="orderData.SheetState==1">
  231. <view class="cancelBtn" @click="cancelOrder">取消订单</view>
  232. <view class="payBtn" @click="$noMultipleClicks(orderPay)">立即支付</view>
  233. </view>
  234. <view class="orderBottom" v-if="orderData.SheetState==2">
  235. <view class="cancelBtn" v-if="(orderData.ServiceState == null || orderData.ServiceState == 3) && orderData.PayMoney>0" @click="$noMultipleClicks(refundMoney)">申请退款</view>
  236. <view class="cancelBtn" v-else-if="orderData.ServiceState == 1 || orderData.ServiceState == 2" @click="refundDetail">退款详情</view>
  237. </view>
  238. <view class="orderBottom" v-if="orderData.SheetState==3">
  239. <view class="cancelBtn" v-if="(orderData.ServiceState == null || orderData.ServiceState == 3) && orderData.PayMoney>0" @click="$noMultipleClicks(refundMoney)">申请退款</view>
  240. <view class="cancelBtn" v-else-if="orderData.ServiceState == 1 || orderData.ServiceState == 2" @click="refundDetail">退款详情</view>
  241. </view>
  242. <view class="orderBottom" v-if="orderData.SheetState==4">
  243. <view class="cancelBtn" v-if="(orderData.ServiceState == null || orderData.ServiceState == 3) && orderData.PayMoney>0" @click="$noMultipleClicks(refundMoney)">申请退款</view>
  244. <view class="cancelBtn" v-else-if="orderData.ServiceState == 1 || orderData.ServiceState == 2" @click="refundDetail">退款详情</view>
  245. <view class="payBtn" @click="timeShowClick" v-if="orderData.OrderState==1">立即预约</view>
  246. </view>
  247. <view class="orderBottom" v-if="orderData.SheetState==5&&orderData.EvaluateState==0&&orderData.EState==1">
  248. <view class="payBtn" @click="evaluate">立即评价</view>
  249. </view>
  250. <view class="orderBottom" v-if="orderData.SheetState==5&&orderData.EvaluateState==1">
  251. <view class="cancelBtn" style="margin-right: 16rpx;" @click="gopingjia">查看评价</view>
  252. </view>
  253. <!-- 二维码 -->
  254. <view v-if="qrcodeShow" class="qrcodeBox" @click="qrcodeShow=false">
  255. <view @click.stop="qrc">
  256. <tki-qrcode cid="qrcode1" ref="qrcode" :val="qrcodeTopVal" :size="size" :unit="unit"
  257. :pdground="pdground" :icon="icon" :iconSize="iconsize" :lv="lv" :onval="onval"
  258. :loadMake="loadMake" :usingComponents="true" @result="qrR" />
  259. </view>
  260. </view>
  261. <!-- 预约时间 -->
  262. <view class="timeBox2" v-if="timeShow&&OrderTimes" @click="timeShow=false">
  263. <view class="timeMain">
  264. <view class="timeTop">
  265. <view class="timeTopTitle">选择预约时间</view>
  266. <view class="close" @click="timeShow=false">X</view>
  267. </view>
  268. <view class="timeCont">
  269. <view class="timeLeft2">
  270. <scroll-view scroll-y="true" class="timeSv">
  271. <view class="timeleftLine" v-for="(item,index) in OrderTimes"
  272. :class="{timeLeftActive:index==orderTimeIndex1}"
  273. @click.stop="orderTimeIndex1=index,orderTimeIndex2=-1">{{item.date.substring(5,10)}}
  274. </view>
  275. </scroll-view>
  276. </view>
  277. <view class="timeRight2">
  278. <scroll-view scroll-y="true" class="timeSv">
  279. <view class="timerightBox">
  280. <view class="timesf" v-for="(item,index) in OrderTimes[orderTimeIndex1].timeList"
  281. :class="{timesfNo:item.type!=1,timesfActive:index==orderTimeIndex2}"
  282. @click.stop="timeSfCk(item,index)">
  283. <view class="timeSfNum">{{item.time}}</view>
  284. <view class="timeyy" v-if="item.type==1">可预约</view>
  285. <view class="timeyy" v-if="item.type==2">已约满</view>
  286. <view class="timeyy" v-if="item.type==3">已过期</view>
  287. </view>
  288. </view>
  289. </scroll-view>
  290. </view>
  291. </view>
  292. <view class="timeBottom">
  293. <view class="timecomplete" @click="timeCk">完成</view>
  294. </view>
  295. </view>
  296. </view>
  297. </view>
  298. </view>
  299. </template>
  300. <script>
  301. import tkiQrcode from "@/components/tki-qrcode/tki-qrcode.vue"
  302. export default {
  303. components: {
  304. tkiQrcode
  305. },
  306. data() {
  307. return {
  308. location: '',
  309. isload: false,
  310. id: '',
  311. iStatusBarHeight: '',
  312. orderData: '',
  313. type: '',
  314. onval: true, // val值变化时自动重新生成二维码
  315. loadMake: true, // 组件加载完成后自动生成二维码
  316. size: 500,
  317. qrcodeShow: false,
  318. qrcodeTop: '-100vh',
  319. qrcodeTopVal: '',
  320. ifShow: false,
  321. val: '二维码', // 要生成的二维码值
  322. unit: 'upx', // 单位
  323. background: '#b4e9e2', // 背景色
  324. foreground: '#309286', // 前景色
  325. pdground: '#262637', // 角标色
  326. icon: '', // 二维码图标
  327. iconsize: 40, // 二维码图标大小
  328. lv: 3, // 二维码容错级别 , 一般不用设置,默认就行
  329. src: '', // 二维码生成后的图片地址或base64
  330. timeShow: false,
  331. orderTime: '',
  332. OrderTimes: '',
  333. orderTimeIndex1: 0,
  334. orderTimeIndex2: -1,
  335. isShowMa: true,
  336. noClick:true,
  337. }
  338. },
  339. onLoad(opt) {
  340. this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
  341. this.location = uni.getStorageSync("locationCity");
  342. this.id = opt.id
  343. this.getData()
  344. this.type = opt.type;
  345. },
  346. onShow() {
  347. if (this.id) {
  348. this.getData()
  349. }
  350. },
  351. methods: {
  352. refundDetail() {
  353. uni.navigateTo({
  354. url: '../refundMoney/refundMoneyDetail?id=' + this.orderData.AfterServiceID
  355. })
  356. },
  357. changeDetail() {
  358. uni.navigateTo({
  359. url: '../changeStore/changeStoreDetail?id=' + this.orderData.ChangeShopID
  360. })
  361. },
  362. changeStore() {
  363. // 是否可以更换门店
  364. this.haveChangeStore();
  365. },
  366. haveChangeStore() {
  367. uni.showLoading({
  368. title: '加载中'
  369. });
  370. this.$http('worldKeepCar/orderChangeShop/queryIfConChangeShop', {
  371. sheetId: this.id,
  372. }, 'GET').then(res => {
  373. if (res.code == 0) {
  374. uni.navigateTo({
  375. url: '../changeStore/changeStore?sheetId=' + this.id +'&oldShopID='+this.orderData.ShopID+ '&oldStoreName=' + this
  376. .orderData.ShopName + '&oldStoreAddress=' + this.orderData.ProvinceName +
  377. this.orderData.CityName + this.orderData.AreaName + this.orderData.Address +'&brand='+this.orderData.Brand
  378. })
  379. }
  380. })
  381. },
  382. showMa() {
  383. this.isShowMa = !this.isShowMa
  384. },
  385. gopingjia() {
  386. uni.navigateTo({
  387. url: '../me/myAppraiseDetail?id=' + this.id
  388. })
  389. },
  390. timeShowClick() {
  391. if (this.OrderTimes) {
  392. this.timeShow = true
  393. } else {
  394. uni.showToast({
  395. title: '当前店铺尚未设置可预约时间',
  396. icon: 'none',
  397. duration: 3000
  398. });
  399. }
  400. },
  401. map() {
  402. console.log("打开地图")
  403. var that = this;
  404. if (!that.orderData.Lat || !that.orderData.Lng) {
  405. uni.showToast({
  406. title: '该店铺未设置定位',
  407. icon: 'none',
  408. duration: 3000
  409. });
  410. } else {
  411. uni.openLocation({
  412. latitude: Number(that.orderData.Lat),
  413. longitude: Number(that.orderData.Lng),
  414. name: that.orderData.ShopName,
  415. address: that.orderData.Address,
  416. success: function() {
  417. console.log('success');
  418. },
  419. fail(err) {
  420. console.log(err)
  421. }
  422. });
  423. }
  424. },
  425. qrR() {
  426. },
  427. qrc() {
  428. console.log(111)
  429. },
  430. call() {
  431. uni.makePhoneCall({
  432. phoneNumber: this.orderData.MobilePhone
  433. });
  434. },
  435. qrcodeClick() {
  436. this.ifShow = true;
  437. this.qrcodeShow = true;
  438. this.qrcodeTopVal = this.orderData.Code;
  439. //this.$refs.qrcode._makeCode()
  440. },
  441. copy(txt) {
  442. uni.setClipboardData({
  443. data: txt,
  444. success: function() {
  445. uni.showToast({
  446. title: '复制成功',
  447. icon: 'none',
  448. duration: 2000
  449. });
  450. }
  451. });
  452. },
  453. getData() {
  454. uni.showLoading({
  455. title: '加载中'
  456. });
  457. this.$http('worldKeepCar/keepCarMy/queryMiNiAppTSheetDetail', {
  458. lat: this.location.lat,
  459. lng: this.location.lng,
  460. id: this.id,
  461. }, 'GET').then(res => {
  462. uni.hideLoading();
  463. this.orderData = res.data;
  464. this.getOrderTimes();
  465. })
  466. },
  467. goback() {
  468. if (this.type == 2) {
  469. uni.switchTab({
  470. url: '../index/index'
  471. })
  472. } else {
  473. uni.navigateBack({})
  474. }
  475. },
  476. evaluate() {
  477. uni.navigateTo({
  478. url: 'evaluate?sheetID=' + this.id + '&shopID=' + this.orderData.ShopID
  479. })
  480. },
  481. cancelOrder() {
  482. var that = this;
  483. uni.showModal({
  484. title: '提示',
  485. content: '确定要取消订单吗',
  486. success: function(res) {
  487. if (res.confirm) {
  488. uni.showLoading({
  489. title: '取消中'
  490. })
  491. that.$http('worldKeepCar/keepCarMy/cancelMiNiTMSheet', {
  492. id: that.orderData.ID
  493. }, 'POST').then(res => {
  494. uni.hideLoading();
  495. uni.showModal({
  496. title: '提示',
  497. content: '订单取消成功',
  498. showCancel:false,
  499. success: function(res) {
  500. that.getData()
  501. }
  502. });
  503. })
  504. } else if (res.cancel) {
  505. }
  506. }
  507. });
  508. },
  509. refundMoney() {
  510. console.log('退款');
  511. // 是否可以退款
  512. this.haveRefundMoney();
  513. },
  514. haveRefundMoney() {
  515. uni.showLoading({
  516. title: '加载中'
  517. });
  518. this.$http('worldKeepCar/orderRefund/queryIfConRefund', {
  519. sheetId: this.id,
  520. }, 'GET').then(res => {
  521. if (res.code == 0) {
  522. uni.navigateTo({
  523. url: '../refundMoney/refundMoney?sheetId=' + this.id + '&maxMoney=' + this
  524. .orderData.PayMoney
  525. })
  526. }
  527. })
  528. },
  529. orderPay() {
  530. uni.showLoading({
  531. title: '支付中'
  532. })
  533. var that = this;
  534. this.$http('worldKeepCar/maintainOrder/orderPay', {
  535. sheetID: this.orderData.ID
  536. }, 'POST').then(res => {
  537. uni.hideLoading();
  538. if (res.isPay == 0) {
  539. uni.showToast({
  540. title: '支付成功',
  541. icon: 'none',
  542. duration: 2000
  543. });
  544. that.getData()
  545. } else {
  546. var payInfo = JSON.parse(res.data.payInfo)
  547. uni.requestPayment({
  548. provider: 'wxpay',
  549. // timeStamp: String(Date.now()),
  550. timeStamp: payInfo.timeStamp,
  551. nonceStr: payInfo.nonceStr,
  552. package: payInfo.package,
  553. signType: payInfo.signType,
  554. paySign: payInfo.paySign,
  555. success: function(res) {
  556. console.log('success:' + JSON.stringify(res));
  557. uni.showToast({
  558. title: '支付成功',
  559. icon: 'none',
  560. duration: 2000
  561. });
  562. that.getData()
  563. },
  564. fail: function(err) {
  565. console.log('fail:' + JSON.stringify(err));
  566. }
  567. });
  568. }
  569. })
  570. },
  571. timeSfCk(item, index) {
  572. if (item.type == 1) {
  573. this.orderTimeIndex2 = index;
  574. var orderTime = this.OrderTimes[this.orderTimeIndex1].date + ' ' + item.time
  575. this.orderTime = orderTime
  576. }
  577. },
  578. timeCk() {
  579. this.timeShow = false;
  580. var urlStr = ''
  581. if (this.orderData.OrderState == 1) {
  582. urlStr = 'worldKeepCar/keepCarMy/saveOrderTime'
  583. }
  584. if (this.orderData.OrderState == 2) {
  585. urlStr = 'worldKeepCar/keepCarMy/changeTSheetTime'
  586. }
  587. this.$http(urlStr, {
  588. id: this.id,
  589. orderTime: this.orderTime
  590. }, 'POST').then(res => {
  591. if (res.code == 0) {
  592. uni.showToast({
  593. title: '预约成功',
  594. icon: 'none',
  595. duration: 2000
  596. });
  597. }
  598. this.getData()
  599. })
  600. },
  601. getOrderTimes() {
  602. this.$http('worldKeepCar/keepCarMy/getTSheetTimes', {
  603. shopId: this.orderData.ShopID,
  604. }, 'GET').then(res => {
  605. this.OrderTimes = res.data;
  606. })
  607. }
  608. },
  609. onPullDownRefresh() {
  610. this.getOrderTimes()
  611. this.getData()
  612. setTimeout(function() {
  613. uni.stopPullDownRefresh();
  614. }, 1000);
  615. },
  616. }
  617. </script>
  618. <style scoped>
  619. .box {
  620. min-height: 100vh;
  621. background: #F4F5F7;
  622. }
  623. .status_bar {
  624. background: #FF4F00;
  625. width: 100vw;
  626. position: fixed;
  627. top: 0;
  628. left: 0;
  629. z-index: 1111;
  630. }
  631. .qrcodeBox {
  632. width: 100vw;
  633. height: 100vh;
  634. display: flex;
  635. justify-content: center;
  636. align-items: center;
  637. position: fixed;
  638. top: 0;
  639. left: 0;
  640. background: rgba(0, 0, 0, 0.7);
  641. }
  642. .top {
  643. width: 750rpx;
  644. height: 342rpx;
  645. background: #FF4F00;
  646. /* background: linear-gradient(134deg, #FF8635 0%, #FF4828 100%); */
  647. }
  648. .nav {
  649. line-height: 44px;
  650. font-size: 34rpx;
  651. font-weight: 600;
  652. display: flex;
  653. justify-content: space-between;
  654. color: #FFFFFF;
  655. position: fixed;
  656. width: 100vw;
  657. left: 0;
  658. z-index: 1111;
  659. background: #FF4F00;
  660. }
  661. .gobackImg {
  662. width: 92rpx;
  663. height: 88rpx;
  664. /* padding: 12px; */
  665. }
  666. .SheetState {
  667. font-size: 44rpx;
  668. font-weight: 500;
  669. color: #FFFFFF;
  670. padding-left: 24rpx;
  671. padding-top: 30rpx;
  672. }
  673. .orderTop {
  674. background: #FFFFFF;
  675. border-radius: 10rpx;
  676. margin: 20rpx 24rpx;
  677. }
  678. .timeEditImg {
  679. width: 25rpx;
  680. height: 25rpx;
  681. padding-left: 20rpx;
  682. }
  683. .timeLeft {
  684. font-size: 32rpx;
  685. color: #3C3C3C;
  686. }
  687. .timeRight {
  688. font-size: 26rpx;
  689. color: #3F90F7;
  690. }
  691. .timeBox {
  692. display: flex;
  693. justify-content: space-between;
  694. padding: 24rpx 20rpx;
  695. border-bottom: 1rpx solid #EEEEEE;
  696. }
  697. .shopBoximg {
  698. width: 40rpx;
  699. height: 40rpx;
  700. }
  701. .shopRightImg {
  702. width: 38rpx;
  703. height: 38rpx;
  704. }
  705. .shopsx {
  706. width: 1px;
  707. height: 50rpx;
  708. background: #EEEEEE;
  709. margin-top: 30rpx;
  710. margin-left: 28rpx;
  711. }
  712. .shopBox {
  713. display: flex;
  714. padding: 0rpx 20rpx 36rpx 20rpx;
  715. }
  716. .shopCont {
  717. width: 418rpx;
  718. padding-left: 20rpx;
  719. }
  720. .shopName {
  721. font-size: 28rpx;
  722. color: #3C3C3C;
  723. }
  724. .Address {
  725. color: #999999;
  726. font-size: 26rpx;
  727. padding-top: 10rpx;
  728. }
  729. .shopRihgtTxt {
  730. color: #999999;
  731. font-size: 22rpx;
  732. }
  733. .shopRightBox {
  734. padding-top: 30rpx;
  735. padding-left: 28rpx;
  736. }
  737. .peopleCont {
  738. font-size: 28rpx;
  739. color: #3C3C3C;
  740. padding-left: 20rpx;
  741. }
  742. .people {
  743. display: flex;
  744. padding-left: 20rpx;
  745. padding-top: 30rpx;
  746. padding-bottom: 36rpx;
  747. }
  748. .PlateNumberBox {
  749. display: flex;
  750. padding-left: 20rpx;
  751. padding-bottom: 30rpx;
  752. }
  753. .PlateNumbercx {
  754. font-size: 28rpx;
  755. color: #3C3C3C;
  756. padding-left: 20rpx;
  757. }
  758. .PlateNumber {
  759. width: 130rpx;
  760. height: 32rpx;
  761. border-radius: 4rpx;
  762. border: 1px solid #F19D01;
  763. line-height: 32rpx;
  764. text-align: center;
  765. font-size: 22rpx;
  766. color: #F19D01;
  767. margin-left: 26rpx;
  768. }
  769. .PlateNumberBoxTop {
  770. display: flex;
  771. }
  772. .CarModel {
  773. font-size: 26rpx;
  774. color: #999999;
  775. padding-left: 20rpx;
  776. padding-top: 6rpx;
  777. padding-right: 20rpx;
  778. padding-bottom: 15rpx;
  779. width: 600rpx;
  780. }
  781. .detailedBox {
  782. background: #FFFFFF;
  783. border-radius: 10px;
  784. margin: 20rpx 24rpx;
  785. padding-bottom: 20rpx;
  786. }
  787. .itemBox {
  788. margin-top: 20rpx;
  789. }
  790. .detailedTitle {
  791. font-size: 32rpx;
  792. color: #3C3C3C;
  793. padding-left: 20rpx;
  794. padding-top: 30rpx;
  795. }
  796. .detailedLine {
  797. display: flex;
  798. padding-left: 20rpx;
  799. padding-top: 40rpx;
  800. }
  801. .detailedImg {
  802. width: 120rpx;
  803. height: 120rpx;
  804. border-radius: 10rpx;
  805. }
  806. .detailedCont {
  807. padding-left: 20rpx;
  808. display: flex;
  809. flex-direction: column;
  810. justify-content: space-between;
  811. }
  812. .detailedName {
  813. font-size: 26rpx;
  814. color: #3C3C3C;
  815. }
  816. .detailedContBottom {
  817. display: flex;
  818. justify-content: space-between;
  819. font-size: 26rpx;
  820. color: #999999;
  821. width: 500rpx;
  822. line-height: 40rpx;
  823. padding-bottom: 10rpx;
  824. }
  825. .SalePrice {
  826. font-size: 32rpx;
  827. font-weight: 500;
  828. color: #3C3C3C;
  829. }
  830. .goodscost {
  831. width: 702rpx;
  832. background: #FFFFFF;
  833. border-radius: 10px;
  834. margin-left: 24rpx;
  835. margin-top: 20rpx;
  836. padding: 15rpx 0;
  837. }
  838. .goodscostLine {
  839. display: flex;
  840. justify-content: space-between;
  841. font-size: 28rpx;
  842. padding: 20rpx 20rpx;
  843. color: #666666;
  844. }
  845. .goodsCostNum {
  846. color: #3C3C3C;
  847. }
  848. .information {
  849. width: 702rpx;
  850. background: #FFFFFF;
  851. border-radius: 10px;
  852. margin-left: 24rpx;
  853. margin-top: 20rpx;
  854. padding: 0rpx 0 15rpx 0;
  855. }
  856. .informationLine {
  857. display: flex;
  858. font-size: 26rpx;
  859. padding: 15rpx 20rpx;
  860. }
  861. .informationTxt {
  862. width: 190rpx;
  863. color: #666666;
  864. }
  865. .informationNum {
  866. color: #333333;
  867. }
  868. .copyBtn {
  869. width: 86rpx;
  870. height: 40rpx;
  871. background: #F4F5F7;
  872. border-radius: 20rpx;
  873. font-size: 24rpx;
  874. color: #333333;
  875. text-align: center;
  876. line-height: 40rpx;
  877. margin-left: 20rpx;
  878. }
  879. .orderBottom {
  880. width: 750rpx;
  881. height: 98rpx;
  882. background: #FFFFFF;
  883. position: fixed;
  884. left: 0;
  885. bottom: 0;
  886. display: flex;
  887. justify-content: flex-end;
  888. }
  889. .cancelBtn {
  890. width: 150rpx;
  891. height: 56rpx;
  892. border-radius: 36rpx;
  893. border: 2rpx solid #DDDDDD;
  894. text-align: center;
  895. line-height: 56rpx;
  896. font-size: 28rpx;
  897. color: #3C3C3C;
  898. margin-top: 21rpx;
  899. margin-right: 16rpx;
  900. margin-left: 20rpx;
  901. }
  902. .payBtn {
  903. width: 150rpx;
  904. height: 56rpx;
  905. border-radius: 36rpx;
  906. border: 2rpx solid #FF4F00;
  907. text-align: center;
  908. line-height: 56rpx;
  909. font-size: 28rpx;
  910. color: #FF4F00;
  911. margin-top: 21rpx;
  912. margin-right: 16rpx;
  913. margin-left: 20rpx;
  914. }
  915. .timeBox2 {
  916. width: 100vw;
  917. height: 100vh;
  918. background: rgba(0, 0, 0, 0.5);
  919. position: fixed;
  920. top: 0;
  921. left: 0;
  922. }
  923. .timeLeftActive {
  924. background: #FFFFFF;
  925. }
  926. .timeMain {
  927. width: 100vw;
  928. height: 70vh;
  929. margin-top: 30vh;
  930. background: #FFFFFF;
  931. border-radius: 24rpx 24rpx 0px 0px;
  932. }
  933. .timesfNo {
  934. background: #F5F5F5;
  935. }
  936. .timesfActive {
  937. background: #FF4F00;
  938. }
  939. .timesfActive .timeSfNum {
  940. color: #FFFFFF;
  941. }
  942. .timesfActive .timeyy {
  943. color: #FFFFFF;
  944. }
  945. .topBox {
  946. padding: 20rpx 24rpx;
  947. }
  948. .timeTop {
  949. display: flex;
  950. line-height: 90rpx;
  951. padding-left: 24rpx;
  952. padding-right: 24rpx;
  953. justify-content: space-between;
  954. }
  955. .timeTopTitle {
  956. font-size: 30rpx;
  957. font-family: PingFangSC-Medium, PingFang SC;
  958. font-weight: 600;
  959. color: #3C3C3C;
  960. }
  961. .close {
  962. color: #999999;
  963. font-size: 30rpx;
  964. padding-left: 30rpx;
  965. }
  966. .timeCont {
  967. height: calc(70vh - 210rpx);
  968. }
  969. .timeSv {
  970. height: calc(70vh - 210rpx);
  971. }
  972. .timeLeft2 {
  973. width: 162rpx;
  974. background: #F4F5F7;
  975. border-top: 1px soid #F4F5F7;
  976. border-right: 1px soid #F4F5F7;
  977. }
  978. .timeRight2 {
  979. width: 588rpx;
  980. }
  981. .timesf {
  982. width: 165rpx;
  983. height: 98rpx;
  984. border-radius: 7rpx;
  985. border: 2rpx solid #EEEEEE;
  986. text-align: center;
  987. margin-left: 20rpx;
  988. margin-bottom: 24rpx;
  989. }
  990. .timeBottom {
  991. width: 750rpx;
  992. height: 120rpx;
  993. background: #FFFFFF;
  994. box-shadow: 0px -2px 20rpx 0px rgba(153, 153, 153, 0.2);
  995. display: flex;
  996. align-items: center;
  997. }
  998. .timerightBox {
  999. display: flex;
  1000. flex-wrap: wrap;
  1001. }
  1002. .timeCont {
  1003. display: flex;
  1004. }
  1005. .timeSfNum {
  1006. color: #666666;
  1007. font-size: 28rpx;
  1008. padding-top: 15rpx;
  1009. }
  1010. .timeyy {
  1011. font-size: 24rpx;
  1012. color: #999999;
  1013. }
  1014. .timecomplete {
  1015. width: 690rpx;
  1016. height: 74rpx;
  1017. background: linear-gradient(124deg, #FF8700 0%, #FF4F00 100%);
  1018. border-radius: 37rpx;
  1019. line-height: 74rpx;
  1020. text-align: center;
  1021. font-size: 30rpx;
  1022. color: #FFFFFF;
  1023. margin-left: 30rpx;
  1024. }
  1025. .timeleftLine {
  1026. font-size: 30rpx;
  1027. color: #999999;
  1028. text-align: center;
  1029. padding: 28rpx 10rpx;
  1030. border-bottom: 1px solid #EEEEEE;
  1031. }
  1032. .yuyueBox {
  1033. background: #FFFFFF;
  1034. border-radius: 10rpx;
  1035. margin-left: 24rpx;
  1036. margin-right: 24rpx;
  1037. }
  1038. .yuyueTime {
  1039. display: flex;
  1040. padding-left: 20rpx;
  1041. padding-top: 30rpx;
  1042. padding-bottom: 36rpx;
  1043. align-items: center;
  1044. }
  1045. .yuyueState {
  1046. display: flex;
  1047. padding-left: 20rpx;
  1048. padding-top: 30rpx;
  1049. padding-bottom: 36rpx;
  1050. }
  1051. .maBox {
  1052. display: flex;
  1053. justify-content: space-between;
  1054. padding: 24rpx 20rpx;
  1055. }
  1056. .querenMa {
  1057. margin: 20rpx 0;
  1058. padding-bottom: 30rpx;
  1059. }
  1060. .maBoximg {
  1061. width: 308rpx;
  1062. height: 308rpx;
  1063. margin: 30rpx 197rpx;
  1064. }
  1065. .rightShou {
  1066. display: flex;
  1067. justify-content: flex-start;
  1068. align-items: center;
  1069. }
  1070. </style>