orderDetail.vue 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226
  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/noimg.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="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" @click="refundMoney">申请退款</view>
  236. <view class="cancelBtn" v-else @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" @click="refundMoney">申请退款</view>
  240. <view class="cancelBtn" v-else @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" @click="refundMoney">申请退款</view>
  244. <view class="cancelBtn" v-else @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. }
  337. },
  338. onLoad(opt) {
  339. this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
  340. this.location = uni.getStorageSync("location");
  341. this.id = opt.id
  342. this.getData()
  343. this.type = opt.type;
  344. },
  345. onShow() {
  346. if (this.id) {
  347. this.getData()
  348. }
  349. },
  350. methods: {
  351. refundDetail() {
  352. uni.navigateTo({
  353. url: '../refundMoney/refundMoneyDetail?id=' + this.orderData.AfterServiceID
  354. })
  355. },
  356. changeDetail() {
  357. uni.navigateTo({
  358. url: '../changeStore/changeStoreDetail?id=' + this.orderData.ChangeShopID
  359. })
  360. },
  361. changeStore() {
  362. // 是否可以更换门店
  363. this.haveChangeStore();
  364. },
  365. haveChangeStore() {
  366. uni.showLoading({
  367. title: '加载中'
  368. });
  369. this.$http('worldKeepCar/orderChangeShop/queryIfConChangeShop', {
  370. sheetId: this.id,
  371. }, 'GET').then(res => {
  372. uni.hideLoading();
  373. if (res.code == 0) {
  374. uni.navigateTo({
  375. url: '../changeStore/changeStore?sheetId=' + this.id + '&oldStoreName=' + this
  376. .orderData.ShopName + '&oldStoreAddress=' + this.orderData.ProvinceName +
  377. this.orderData.CityName + this.orderData.AreaName + this.orderData.Address
  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. that.$http('worldKeepCar/keepCarMy/cancelMiNiTMSheet', {
  490. id: that.orderData.ID
  491. }, 'POST').then(res => {
  492. uni.hideLoading();
  493. that.getData()
  494. })
  495. } else if (res.cancel) {
  496. }
  497. }
  498. });
  499. },
  500. refundMoney() {
  501. console.log('退款');
  502. // 是否可以退款
  503. this.haveRefundMoney();
  504. },
  505. haveRefundMoney() {
  506. uni.showLoading({
  507. title: '加载中'
  508. });
  509. this.$http('worldKeepCar/orderRefund/queryIfConRefund', {
  510. sheetId: this.id,
  511. }, 'GET').then(res => {
  512. uni.hideLoading();
  513. if (res.code == 0) {
  514. uni.navigateTo({
  515. url: '../refundMoney/refundMoney?sheetId=' + this.id + '&maxMoney=' + this
  516. .orderData.PayMoney
  517. })
  518. }
  519. })
  520. },
  521. orderPay() {
  522. uni.showLoading({});
  523. var that = this;
  524. this.$http('worldKeepCar/maintainOrder/orderPay', {
  525. sheetID: this.orderData.ID
  526. }, 'POST').then(res => {
  527. uni.hideLoading();
  528. if (res.isPay == 0) {
  529. uni.showToast({
  530. title: '支付成功',
  531. icon: 'none',
  532. duration: 2000
  533. });
  534. that.getData()
  535. } else {
  536. var payInfo = JSON.parse(res.data.payInfo)
  537. uni.requestPayment({
  538. provider: 'wxpay',
  539. // timeStamp: String(Date.now()),
  540. timeStamp: payInfo.timeStamp,
  541. nonceStr: payInfo.nonceStr,
  542. package: payInfo.package,
  543. signType: payInfo.signType,
  544. paySign: payInfo.paySign,
  545. success: function(res) {
  546. console.log('success:' + JSON.stringify(res));
  547. uni.showToast({
  548. title: '支付成功',
  549. icon: 'none',
  550. duration: 2000
  551. });
  552. that.getData()
  553. },
  554. fail: function(err) {
  555. console.log('fail:' + JSON.stringify(err));
  556. }
  557. });
  558. }
  559. })
  560. },
  561. timeSfCk(item, index) {
  562. if (item.type == 1) {
  563. this.orderTimeIndex2 = index;
  564. var orderTime = this.OrderTimes[this.orderTimeIndex1].date + ' ' + item.time
  565. this.orderTime = orderTime
  566. }
  567. },
  568. timeCk() {
  569. this.timeShow = false;
  570. var urlStr = ''
  571. if (this.orderData.OrderState == 1) {
  572. urlStr = 'worldKeepCar/keepCarMy/saveOrderTime'
  573. }
  574. if (this.orderData.OrderState == 2) {
  575. urlStr = 'worldKeepCar/keepCarMy/changeTSheetTime'
  576. }
  577. this.$http(urlStr, {
  578. id: this.id,
  579. orderTime: this.orderTime
  580. }, 'POST').then(res => {
  581. if (res.code == 0) {
  582. uni.showToast({
  583. title: '预约成功',
  584. icon: 'none',
  585. duration: 2000
  586. });
  587. }
  588. this.getData()
  589. })
  590. },
  591. getOrderTimes() {
  592. this.$http('worldKeepCar/keepCarMy/getTSheetTimes', {
  593. shopId: this.orderData.ShopID,
  594. }, 'GET').then(res => {
  595. this.OrderTimes = res.data;
  596. })
  597. }
  598. },
  599. onPullDownRefresh() {
  600. this.getOrderTimes()
  601. this.getData()
  602. setTimeout(function() {
  603. uni.stopPullDownRefresh();
  604. }, 1000);
  605. },
  606. }
  607. </script>
  608. <style scoped>
  609. .box {
  610. min-height: 100vh;
  611. background: #F4F5F7;
  612. }
  613. .status_bar {
  614. background: #FF4F00;
  615. width: 100vw;
  616. position: fixed;
  617. top: 0;
  618. left: 0;
  619. z-index: 1111;
  620. }
  621. .qrcodeBox {
  622. width: 100vw;
  623. height: 100vh;
  624. display: flex;
  625. justify-content: center;
  626. align-items: center;
  627. position: fixed;
  628. top: 0;
  629. left: 0;
  630. background: rgba(0, 0, 0, 0.7);
  631. }
  632. .top {
  633. width: 750rpx;
  634. height: 342rpx;
  635. background: #FF4F00;
  636. /* background: linear-gradient(134deg, #FF8635 0%, #FF4828 100%); */
  637. }
  638. .nav {
  639. line-height: 44px;
  640. font-size: 34rpx;
  641. font-weight: 600;
  642. display: flex;
  643. justify-content: space-between;
  644. color: #FFFFFF;
  645. position: fixed;
  646. width: 100vw;
  647. left: 0;
  648. z-index: 1111;
  649. background: #FF4F00;
  650. }
  651. .gobackImg {
  652. width: 92rpx;
  653. height: 88rpx;
  654. /* padding: 12px; */
  655. }
  656. .SheetState {
  657. font-size: 44rpx;
  658. font-weight: 500;
  659. color: #FFFFFF;
  660. padding-left: 24rpx;
  661. padding-top: 30rpx;
  662. }
  663. .orderTop {
  664. background: #FFFFFF;
  665. border-radius: 10rpx;
  666. margin: 20rpx 24rpx;
  667. }
  668. .timeEditImg {
  669. width: 25rpx;
  670. height: 25rpx;
  671. padding-left: 20rpx;
  672. }
  673. .timeLeft {
  674. font-size: 32rpx;
  675. color: #3C3C3C;
  676. }
  677. .timeRight {
  678. font-size: 26rpx;
  679. color: #3F90F7;
  680. }
  681. .timeBox {
  682. display: flex;
  683. justify-content: space-between;
  684. padding: 24rpx 20rpx;
  685. border-bottom: 1rpx solid #EEEEEE;
  686. }
  687. .shopBoximg {
  688. width: 40rpx;
  689. height: 40rpx;
  690. }
  691. .shopRightImg {
  692. width: 54rpx;
  693. height: 52rpx;
  694. }
  695. .shopsx {
  696. width: 1px;
  697. height: 50rpx;
  698. background: #EEEEEE;
  699. margin-top: 30rpx;
  700. margin-left: 28rpx;
  701. }
  702. .shopBox {
  703. display: flex;
  704. padding: 0rpx 20rpx 36rpx 20rpx;
  705. }
  706. .shopCont {
  707. width: 418rpx;
  708. padding-left: 20rpx;
  709. }
  710. .shopName {
  711. font-size: 28rpx;
  712. color: #3C3C3C;
  713. }
  714. .Address {
  715. color: #999999;
  716. font-size: 26rpx;
  717. padding-top: 10rpx;
  718. }
  719. .shopRihgtTxt {
  720. color: #999999;
  721. font-size: 22rpx;
  722. margin-top: -20rpx;
  723. }
  724. .shopRightBox {
  725. padding-top: 30rpx;
  726. padding-left: 28rpx;
  727. }
  728. .peopleCont {
  729. font-size: 28rpx;
  730. color: #3C3C3C;
  731. padding-left: 20rpx;
  732. }
  733. .people {
  734. display: flex;
  735. padding-left: 20rpx;
  736. padding-top: 30rpx;
  737. padding-bottom: 36rpx;
  738. }
  739. .PlateNumberBox {
  740. display: flex;
  741. padding-left: 20rpx;
  742. padding-bottom: 30rpx;
  743. }
  744. .PlateNumbercx {
  745. font-size: 28rpx;
  746. color: #3C3C3C;
  747. padding-left: 20rpx;
  748. }
  749. .PlateNumber {
  750. width: 130rpx;
  751. height: 32rpx;
  752. border-radius: 4rpx;
  753. border: 1px solid #F19D01;
  754. line-height: 32rpx;
  755. text-align: center;
  756. font-size: 22rpx;
  757. color: #F19D01;
  758. margin-left: 26rpx;
  759. }
  760. .PlateNumberBoxTop {
  761. display: flex;
  762. }
  763. .CarModel {
  764. font-size: 26rpx;
  765. color: #999999;
  766. padding-left: 20rpx;
  767. padding-top: 6rpx;
  768. padding-right: 20rpx;
  769. padding-bottom: 15rpx;
  770. width: 600rpx;
  771. }
  772. .detailedBox {
  773. background: #FFFFFF;
  774. border-radius: 10px;
  775. margin: 20rpx 24rpx;
  776. padding: 20rpx 0;
  777. }
  778. .itemBox {
  779. margin-top: 20rpx;
  780. }
  781. .detailedTitle {
  782. font-size: 32rpx;
  783. color: #3C3C3C;
  784. padding-left: 20rpx;
  785. padding-top: 30rpx;
  786. }
  787. .detailedLine {
  788. display: flex;
  789. padding-left: 20rpx;
  790. padding-top: 40rpx;
  791. }
  792. .detailedImg {
  793. width: 120rpx;
  794. height: 120rpx;
  795. border-radius: 10rpx;
  796. }
  797. .detailedCont {
  798. padding-left: 20rpx;
  799. display: flex;
  800. flex-direction: column;
  801. justify-content: space-between;
  802. }
  803. .detailedName {
  804. font-size: 26rpx;
  805. color: #3C3C3C;
  806. }
  807. .detailedContBottom {
  808. display: flex;
  809. justify-content: space-between;
  810. font-size: 26rpx;
  811. color: #999999;
  812. width: 500rpx;
  813. line-height: 40rpx;
  814. padding-bottom: 10rpx;
  815. }
  816. .SalePrice {
  817. font-size: 32rpx;
  818. font-weight: 500;
  819. color: #3C3C3C;
  820. }
  821. .goodscost {
  822. width: 702rpx;
  823. background: #FFFFFF;
  824. border-radius: 10px;
  825. margin-left: 24rpx;
  826. margin-top: 20rpx;
  827. padding: 15rpx 0;
  828. }
  829. .goodscostLine {
  830. display: flex;
  831. justify-content: space-between;
  832. font-size: 28rpx;
  833. padding: 20rpx 20rpx;
  834. color: #666666;
  835. }
  836. .goodsCostNum {
  837. color: #3C3C3C;
  838. }
  839. .information {
  840. width: 702rpx;
  841. background: #FFFFFF;
  842. border-radius: 10px;
  843. margin-left: 24rpx;
  844. margin-top: 20rpx;
  845. padding: 0rpx 0 15rpx 0;
  846. }
  847. .informationLine {
  848. display: flex;
  849. font-size: 26rpx;
  850. padding: 15rpx 20rpx;
  851. }
  852. .informationTxt {
  853. width: 190rpx;
  854. color: #666666;
  855. }
  856. .informationNum {
  857. color: #333333;
  858. }
  859. .copyBtn {
  860. width: 86rpx;
  861. height: 40rpx;
  862. background: #F4F5F7;
  863. border-radius: 20rpx;
  864. font-size: 24rpx;
  865. color: #333333;
  866. text-align: center;
  867. line-height: 40rpx;
  868. margin-left: 20rpx;
  869. }
  870. .orderBottom {
  871. width: 750rpx;
  872. height: 98rpx;
  873. background: #FFFFFF;
  874. position: fixed;
  875. left: 0;
  876. bottom: 0;
  877. display: flex;
  878. justify-content: flex-end;
  879. }
  880. .cancelBtn {
  881. width: 150rpx;
  882. height: 56rpx;
  883. border-radius: 36rpx;
  884. border: 2rpx solid #DDDDDD;
  885. text-align: center;
  886. line-height: 56rpx;
  887. font-size: 28rpx;
  888. color: #3C3C3C;
  889. margin-top: 21rpx;
  890. margin-right: 16rpx;
  891. margin-left: 20rpx;
  892. }
  893. .payBtn {
  894. width: 150rpx;
  895. height: 56rpx;
  896. border-radius: 36rpx;
  897. border: 2rpx solid #FF4F00;
  898. text-align: center;
  899. line-height: 56rpx;
  900. font-size: 28rpx;
  901. color: #FF4F00;
  902. margin-top: 21rpx;
  903. margin-right: 16rpx;
  904. margin-left: 20rpx;
  905. }
  906. .timeBox2 {
  907. width: 100vw;
  908. height: 100vh;
  909. background: rgba(0, 0, 0, 0.5);
  910. position: fixed;
  911. top: 0;
  912. left: 0;
  913. }
  914. .timeLeftActive {
  915. background: #FFFFFF;
  916. }
  917. .timeMain {
  918. width: 100vw;
  919. height: 70vh;
  920. margin-top: 30vh;
  921. background: #FFFFFF;
  922. border-radius: 24rpx 24rpx 0px 0px;
  923. }
  924. .timesfNo {
  925. background: #F5F5F5;
  926. }
  927. .timesfActive {
  928. background: #FF4F00;
  929. }
  930. .timesfActive .timeSfNum {
  931. color: #FFFFFF;
  932. }
  933. .timesfActive .timeyy {
  934. color: #FFFFFF;
  935. }
  936. .topBox {
  937. padding: 20rpx 24rpx;
  938. }
  939. .timeTop {
  940. display: flex;
  941. line-height: 90rpx;
  942. padding-left: 24rpx;
  943. padding-right: 24rpx;
  944. justify-content: space-between;
  945. }
  946. .timeTopTitle {
  947. font-size: 30rpx;
  948. font-family: PingFangSC-Medium, PingFang SC;
  949. font-weight: 600;
  950. color: #3C3C3C;
  951. }
  952. .close {
  953. color: #999999;
  954. font-size: 30rpx;
  955. padding-left: 30rpx;
  956. }
  957. .timeCont {
  958. height: calc(70vh - 210rpx);
  959. }
  960. .timeSv {
  961. height: calc(70vh - 210rpx);
  962. }
  963. .timeLeft2 {
  964. width: 162rpx;
  965. background: #F4F5F7;
  966. border-top: 1px soid #F4F5F7;
  967. border-right: 1px soid #F4F5F7;
  968. }
  969. .timeRight2 {
  970. width: 588rpx;
  971. }
  972. .timesf {
  973. width: 165rpx;
  974. height: 98rpx;
  975. border-radius: 7rpx;
  976. border: 2rpx solid #EEEEEE;
  977. text-align: center;
  978. margin-left: 20rpx;
  979. margin-bottom: 24rpx;
  980. }
  981. .timeBottom {
  982. width: 750rpx;
  983. height: 120rpx;
  984. background: #FFFFFF;
  985. box-shadow: 0px -2px 20rpx 0px rgba(153, 153, 153, 0.2);
  986. display: flex;
  987. align-items: center;
  988. }
  989. .timerightBox {
  990. display: flex;
  991. flex-wrap: wrap;
  992. }
  993. .timeCont {
  994. display: flex;
  995. }
  996. .timeSfNum {
  997. color: #666666;
  998. font-size: 28rpx;
  999. padding-top: 15rpx;
  1000. }
  1001. .timeyy {
  1002. font-size: 24rpx;
  1003. color: #999999;
  1004. }
  1005. .timecomplete {
  1006. width: 690rpx;
  1007. height: 74rpx;
  1008. background: linear-gradient(124deg, #FF8700 0%, #FF4F00 100%);
  1009. border-radius: 37rpx;
  1010. line-height: 74rpx;
  1011. text-align: center;
  1012. font-size: 30rpx;
  1013. color: #FFFFFF;
  1014. margin-left: 30rpx;
  1015. }
  1016. .timeleftLine {
  1017. font-size: 30rpx;
  1018. color: #999999;
  1019. text-align: center;
  1020. padding: 28rpx 10rpx;
  1021. border-bottom: 1px solid #EEEEEE;
  1022. }
  1023. .yuyueBox {
  1024. background: #FFFFFF;
  1025. border-radius: 10rpx;
  1026. margin-left: 24rpx;
  1027. margin-right: 24rpx;
  1028. }
  1029. .yuyueTime {
  1030. display: flex;
  1031. padding-left: 20rpx;
  1032. padding-top: 30rpx;
  1033. padding-bottom: 36rpx;
  1034. align-items: center;
  1035. }
  1036. .yuyueState {
  1037. display: flex;
  1038. padding-left: 20rpx;
  1039. padding-top: 30rpx;
  1040. padding-bottom: 36rpx;
  1041. }
  1042. .maBox {
  1043. display: flex;
  1044. justify-content: space-between;
  1045. padding: 24rpx 20rpx;
  1046. }
  1047. .querenMa {
  1048. margin: 20rpx 0;
  1049. padding-bottom: 30rpx;
  1050. }
  1051. .maBoximg {
  1052. width: 308rpx;
  1053. height: 308rpx;
  1054. margin: 30rpx 197rpx;
  1055. }
  1056. .rightShou {
  1057. display: flex;
  1058. justify-content: flex-start;
  1059. align-items: center;
  1060. }
  1061. </style>