orderDetail.vue 28 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217
  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;" v-if="orderData.SheetState==5 && orderData.ServiceCode!=null">{{orderData.ServiceCode}}</view>
  30. <view class="rightShou" v-if="orderData.SheetState==4">
  31. <view class="timeRight" style="color: #FF2400;" @click="showMa">收起</view>
  32. <image src="../../static/img/icon_arrow_up_orange.png" style="width: 17rpx; height: 11rpx;"></image>
  33. </view>
  34. <view style="color: #999999; font-size: 26rpx;" v-if="orderData.SheetState==5">已使用</view>
  35. </view>
  36. <!-- 确认码 -->
  37. <view class="querenMa" v-if="isShowMa==true && orderData.SheetState==4">
  38. <view style="color: #FF2400; font-size: 24rpx; text-align: center;">请到店出示券码即可开始服务</view>
  39. <view class="maBoximg">
  40. <tki-qrcode cid="qrcode1" ref="qrcode" :val="orderData.ServiceCode" :size="308" :unit="unit"
  41. :pdground="pdground" :icon="icon" :iconSize="iconsize" :lv="lv" :onval="onval"
  42. :loadMake="loadMake" :usingComponents="true" @result="qrR" />
  43. </view>
  44. <view style="color: #333333; font-size: 26rpx; font-weight: bold; text-align: center;">{{orderData.ServiceCode}}
  45. </view>
  46. </view>
  47. </view>
  48. <!-- 服务信息 -->
  49. <view class="orderTop">
  50. <view class="timeBox">
  51. <view class="timeLeft">
  52. <span>服务信息</span>
  53. </view>
  54. <view class="timeRight" @click="qrcodeClick">订单码</view>
  55. </view>
  56. <!-- 客户信息 -->
  57. <view class="people">
  58. <image src="../../static/img/icon_ren.png" mode="" class="shopBoximg"></image>
  59. <view class="peopleCont">{{orderData.ContactName}}</view>
  60. <view class="peopleCont" style="padding-left: 20rpx;">{{orderData.ContactPhone}}</view>
  61. </view>
  62. <!-- 车辆信息 -->
  63. <view class="PlateNumberBox">
  64. <image src="../../static/img/icon_che.png" mode="" class="shopBoximg"></image>
  65. <view class="">
  66. <view class="PlateNumberBoxTop">
  67. <view class="PlateNumbercx"> <span v-if="orderData.Brand">{{orderData.Brand}}</span>
  68. <span style="padding-left: 20rpx;" v-if="orderData.Series">{{orderData.Series}}</span>
  69. </view>
  70. <view class="PlateNumber">{{orderData.PlateNumber}}</view>
  71. </view>
  72. <view class="CarModel">{{orderData.CarModel}}</view>
  73. </view>
  74. </view>
  75. <!-- 店铺信息 -->
  76. <view class="shopBox">
  77. <image src="../../static/img/icon_store.png" mode="" class="shopBoximg"></image>
  78. <view class="shopCont">
  79. <view class="shopName">{{orderData.ShopName}}</view>
  80. <view class="Address">
  81. {{orderData.ProvinceName}}{{orderData.CityName}}{{orderData.AreaName}}{{orderData.Address}}
  82. </view>
  83. <view v-if="orderData.SheetState==2">
  84. <!-- ChangeState 更换门店:1待处理2更换成功3更换关闭 3的不展示 -->
  85. <view style="color: #3F90F7; font-size: 26rpx;" v-if="orderData.ChangeState==null" @click="changeStore">申请更换服务门店</view>
  86. <view style="color: #3F90F7; font-size: 26rpx;" v-else-if="orderData.ChangeState==1" @click="changeDetail">更换门店中</view>
  87. </view>
  88. </view>
  89. <view class="shopRightBox" @click="map">
  90. <view>
  91. <image src="../../static/img/icon_ditu.png" mode="" class="shopRightImg"></image>
  92. </view>
  93. <view class="shopRihgtTxt">地图</view>
  94. </view>
  95. <view class="shopsx"></view>
  96. <view class="shopRightBox" @click="call">
  97. <view>
  98. <image src="../../static/img/icon_phone.png" mode="" class="shopRightImg"></image>
  99. </view>
  100. <view class="shopRihgtTxt">电话</view>
  101. </view>
  102. </view>
  103. </view>
  104. <!-- 预约信息 -->
  105. <view class="yuyueBox" 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="" class="timeEditImg"
  116. @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" @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" @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" @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.orderData.ShopName+'&oldStoreAddress='+ this.orderData.ProvinceName+ this.orderData.CityName+this.orderData.AreaName+this.orderData.Address
  376. })
  377. }
  378. })
  379. },
  380. showMa(){
  381. this.isShowMa = !this.isShowMa
  382. },
  383. gopingjia() {
  384. uni.navigateTo({
  385. url: '../me/myAppraiseDetail?id=' + this.id
  386. })
  387. },
  388. timeShowClick() {
  389. if (this.OrderTimes) {
  390. this.timeShow = true
  391. } else {
  392. uni.showToast({
  393. title: '当前店铺尚未设置可预约时间',
  394. icon: 'none',
  395. duration: 3000
  396. });
  397. }
  398. },
  399. map() {
  400. console.log("打开地图")
  401. var that = this;
  402. if (!that.orderData.Lat || !that.orderData.Lng) {
  403. uni.showToast({
  404. title: '该店铺未设置定位',
  405. icon: 'none',
  406. duration: 3000
  407. });
  408. } else {
  409. uni.openLocation({
  410. latitude: Number(that.orderData.Lat),
  411. longitude: Number(that.orderData.Lng),
  412. name: that.orderData.ShopName,
  413. address: that.orderData.Address,
  414. success: function() {
  415. console.log('success');
  416. },
  417. fail(err) {
  418. console.log(err)
  419. }
  420. });
  421. }
  422. },
  423. qrR() {
  424. },
  425. qrc() {
  426. console.log(111)
  427. },
  428. call() {
  429. uni.makePhoneCall({
  430. phoneNumber: this.orderData.MobilePhone
  431. });
  432. },
  433. qrcodeClick() {
  434. this.ifShow = true;
  435. this.qrcodeShow = true;
  436. this.qrcodeTopVal = this.orderData.Code;
  437. //this.$refs.qrcode._makeCode()
  438. },
  439. copy(txt) {
  440. uni.setClipboardData({
  441. data: txt,
  442. success: function() {
  443. uni.showToast({
  444. title: '复制成功',
  445. icon: 'none',
  446. duration: 2000
  447. });
  448. }
  449. });
  450. },
  451. getData() {
  452. uni.showLoading({
  453. title: '加载中'
  454. });
  455. this.$http('worldKeepCar/keepCarMy/queryMiNiAppTSheetDetail', {
  456. lat: this.location.lat,
  457. lng: this.location.lng,
  458. id: this.id,
  459. }, 'GET').then(res => {
  460. uni.hideLoading();
  461. this.orderData = res.data;
  462. this.getOrderTimes();
  463. })
  464. },
  465. goback() {
  466. if (this.type == 2) {
  467. uni.switchTab({
  468. url: '../index/index'
  469. })
  470. } else {
  471. uni.navigateBack({})
  472. }
  473. },
  474. evaluate() {
  475. uni.navigateTo({
  476. url: 'evaluate?sheetID=' + this.id + '&shopID=' + this.orderData.ShopID
  477. })
  478. },
  479. cancelOrder() {
  480. var that = this;
  481. uni.showModal({
  482. title: '提示',
  483. content: '确定要取消订单吗',
  484. success: function(res) {
  485. if (res.confirm) {
  486. uni.showLoading({});
  487. that.$http('worldKeepCar/keepCarMy/cancelMiNiTMSheet', {
  488. id: that.orderData.ID
  489. }, 'POST').then(res => {
  490. uni.hideLoading();
  491. that.getData()
  492. })
  493. } else if (res.cancel) {
  494. }
  495. }
  496. });
  497. },
  498. refundMoney(){
  499. console.log('退款');
  500. // 是否可以退款
  501. this.haveRefundMoney();
  502. },
  503. haveRefundMoney(){
  504. uni.showLoading({
  505. title: '加载中'
  506. });
  507. this.$http('worldKeepCar/orderRefund/queryIfConRefund', {
  508. sheetId: this.id,
  509. }, 'GET').then(res => {
  510. uni.hideLoading();
  511. if (res.code == 0) {
  512. uni.navigateTo({
  513. url:'../refundMoney/refundMoney?sheetId='+ this.id +'&maxMoney=' + this.orderData.PayMoney
  514. })
  515. }
  516. })
  517. },
  518. orderPay() {
  519. uni.showLoading({});
  520. var that = this;
  521. this.$http('worldKeepCar/maintainOrder/orderPay', {
  522. sheetID: this.orderData.ID
  523. }, 'POST').then(res => {
  524. uni.hideLoading();
  525. if(res.isPay==0){
  526. uni.showToast({
  527. title: '支付成功',
  528. icon: 'none',
  529. duration: 2000
  530. });
  531. that.getData()
  532. }else{
  533. var payInfo = JSON.parse(res.data.payInfo)
  534. uni.requestPayment({
  535. provider: 'wxpay',
  536. // timeStamp: String(Date.now()),
  537. timeStamp: payInfo.timeStamp,
  538. nonceStr: payInfo.nonceStr,
  539. package: payInfo.package,
  540. signType: payInfo.signType,
  541. paySign: payInfo.paySign,
  542. success: function(res) {
  543. console.log('success:' + JSON.stringify(res));
  544. uni.showToast({
  545. title: '支付成功',
  546. icon: 'none',
  547. duration: 2000
  548. });
  549. that.getData()
  550. },
  551. fail: function(err) {
  552. console.log('fail:' + JSON.stringify(err));
  553. }
  554. });
  555. }
  556. })
  557. },
  558. timeSfCk(item, index) {
  559. if (item.type == 1) {
  560. this.orderTimeIndex2 = index;
  561. var orderTime = this.OrderTimes[this.orderTimeIndex1].date + ' ' + item.time
  562. this.orderTime = orderTime
  563. }
  564. },
  565. timeCk() {
  566. this.timeShow = false;
  567. var urlStr = ''
  568. if (this.orderData.OrderState==1) {
  569. urlStr = 'worldKeepCar/keepCarMy/saveOrderTime'
  570. }
  571. if (this.orderData.OrderState==2) {
  572. urlStr = 'worldKeepCar/keepCarMy/changeTSheetTime'
  573. }
  574. this.$http(urlStr, {
  575. id: this.id,
  576. orderTime: this.orderTime
  577. }, 'POST').then(res => {
  578. if (res.code == 0) {
  579. uni.showToast({
  580. title: '预约成功',
  581. icon: 'none',
  582. duration: 2000
  583. });
  584. }
  585. this.getData()
  586. })
  587. },
  588. getOrderTimes() {
  589. this.$http('worldKeepCar/keepCarMy/getTSheetTimes', {
  590. shopId: this.orderData.ShopID,
  591. }, 'GET').then(res => {
  592. this.OrderTimes = res.data;
  593. })
  594. }
  595. },
  596. onPullDownRefresh() {
  597. this.getOrderTimes()
  598. this.getData()
  599. setTimeout(function() {
  600. uni.stopPullDownRefresh();
  601. }, 1000);
  602. },
  603. }
  604. </script>
  605. <style scoped>
  606. .box {
  607. min-height: 100vh;
  608. background: #F4F5F7;
  609. }
  610. .status_bar {
  611. background: #FF4F00;
  612. width: 100vw;
  613. position: fixed;
  614. top: 0;
  615. left: 0;
  616. z-index: 1111;
  617. }
  618. .qrcodeBox {
  619. width: 100vw;
  620. height: 100vh;
  621. display: flex;
  622. justify-content: center;
  623. align-items: center;
  624. position: fixed;
  625. top: 0;
  626. left: 0;
  627. background: rgba(0, 0, 0, 0.7);
  628. }
  629. .top {
  630. width: 750rpx;
  631. height: 342rpx;
  632. background: #FF4F00;
  633. /* background: linear-gradient(134deg, #FF8635 0%, #FF4828 100%); */
  634. }
  635. .nav {
  636. line-height: 44px;
  637. font-size: 34rpx;
  638. font-weight: 600;
  639. display: flex;
  640. justify-content: space-between;
  641. color: #FFFFFF;
  642. position: fixed;
  643. width: 100vw;
  644. left: 0;
  645. z-index: 1111;
  646. background: #FF4F00;
  647. }
  648. .gobackImg {
  649. width: 92rpx;
  650. height: 88rpx;
  651. /* padding: 12px; */
  652. }
  653. .SheetState {
  654. font-size: 44rpx;
  655. font-weight: 500;
  656. color: #FFFFFF;
  657. padding-left: 24rpx;
  658. padding-top: 50rpx;
  659. }
  660. .orderTop {
  661. background: #FFFFFF;
  662. border-radius: 10rpx;
  663. margin: 20rpx 24rpx;
  664. }
  665. .timeEditImg {
  666. width: 25rpx;
  667. height: 25rpx;
  668. padding-left: 20rpx;
  669. }
  670. .timeLeft {
  671. font-size: 32rpx;
  672. color: #3C3C3C;
  673. }
  674. .timeRight {
  675. font-size: 26rpx;
  676. color: #3F90F7;
  677. }
  678. .timeBox {
  679. display: flex;
  680. justify-content: space-between;
  681. padding: 24rpx 20rpx;
  682. border-bottom: 1rpx solid #EEEEEE;
  683. }
  684. .shopBoximg {
  685. width: 40rpx;
  686. height: 40rpx;
  687. }
  688. .shopRightImg {
  689. width: 52rpx;
  690. height: 60rpx;
  691. }
  692. .shopsx {
  693. width: 1px;
  694. height: 50rpx;
  695. background: #EEEEEE;
  696. margin-top: 30rpx;
  697. margin-left: 28rpx;
  698. }
  699. .shopBox {
  700. display: flex;
  701. padding: 0rpx 20rpx 36rpx 20rpx;
  702. }
  703. .shopCont {
  704. width: 418rpx;
  705. padding-left: 20rpx;
  706. }
  707. .shopName {
  708. font-size: 28rpx;
  709. color: #3C3C3C;
  710. }
  711. .Address {
  712. color: #999999;
  713. font-size: 26rpx;
  714. padding-top: 10rpx;
  715. }
  716. .shopRihgtTxt {
  717. color: #999999;
  718. font-size: 22rpx;
  719. padding-top: 5rpx;
  720. }
  721. .shopRightBox {
  722. padding-top: 30rpx;
  723. padding-left: 28rpx;
  724. }
  725. .peopleCont {
  726. font-size: 28rpx;
  727. color: #3C3C3C;
  728. padding-left: 20rpx;
  729. }
  730. .people {
  731. display: flex;
  732. padding-left: 20rpx;
  733. padding-top: 30rpx;
  734. padding-bottom: 36rpx;
  735. }
  736. .PlateNumberBox {
  737. display: flex;
  738. padding-left: 20rpx;
  739. padding-bottom: 30rpx;
  740. }
  741. .PlateNumbercx {
  742. font-size: 28rpx;
  743. font-weight: bold;
  744. color: #3C3C3C;
  745. padding-left: 20rpx;
  746. }
  747. .PlateNumber {
  748. width: 130rpx;
  749. height: 32rpx;
  750. border-radius: 4rpx;
  751. border: 1px solid #F19D01;
  752. line-height: 32rpx;
  753. text-align: center;
  754. font-size: 22rpx;
  755. color: #F19D01;
  756. margin-left: 26rpx;
  757. }
  758. .PlateNumberBoxTop {
  759. display: flex;
  760. }
  761. .CarModel {
  762. font-size: 26rpx;
  763. color: #999999;
  764. padding-left: 20rpx;
  765. padding-top: 6rpx;
  766. padding-right: 20rpx;
  767. padding-bottom: 15rpx;
  768. width: 600rpx;
  769. }
  770. .detailedBox {
  771. background: #FFFFFF;
  772. border-radius: 10px;
  773. margin: 20rpx 24rpx;
  774. padding: 20rpx 0;
  775. }
  776. .itemBox {
  777. margin-top: 20rpx;
  778. }
  779. .detailedTitle {
  780. font-size: 32rpx;
  781. color: #3C3C3C;
  782. padding-left: 20rpx;
  783. padding-top: 30rpx;
  784. padding-bottom: 10rpx;
  785. }
  786. .detailedLine {
  787. display: flex;
  788. padding-left: 20rpx;
  789. padding-top: 40rpx;
  790. }
  791. .detailedImg {
  792. width: 120rpx;
  793. height: 120rpx;
  794. border-radius: 10rpx;
  795. }
  796. .detailedCont {
  797. padding-left: 20rpx;
  798. display: flex;
  799. flex-direction: column;
  800. justify-content: space-between;
  801. }
  802. .detailedName {
  803. font-size: 26rpx;
  804. color: #3C3C3C;
  805. }
  806. .detailedContBottom {
  807. display: flex;
  808. justify-content: space-between;
  809. font-size: 26rpx;
  810. color: #999999;
  811. width: 500rpx;
  812. line-height: 40rpx;
  813. }
  814. .SalePrice {
  815. font-size: 32rpx;
  816. font-weight: 500;
  817. color: #3C3C3C;
  818. }
  819. .goodscost {
  820. width: 702rpx;
  821. background: #FFFFFF;
  822. border-radius: 10px;
  823. margin-left: 24rpx;
  824. margin-top: 20rpx;
  825. padding: 15rpx 0;
  826. }
  827. .goodscostLine {
  828. display: flex;
  829. justify-content: space-between;
  830. font-size: 28rpx;
  831. padding: 20rpx 20rpx;
  832. color: #666666;
  833. }
  834. .goodsCostNum {
  835. color: #3C3C3C;
  836. }
  837. .information {
  838. width: 702rpx;
  839. background: #FFFFFF;
  840. border-radius: 10px;
  841. margin-left: 24rpx;
  842. margin-top: 20rpx;
  843. padding: 0rpx 0 15rpx 0;
  844. }
  845. .informationLine {
  846. display: flex;
  847. font-size: 26rpx;
  848. padding: 15rpx 20rpx;
  849. }
  850. .informationTxt {
  851. width: 190rpx;
  852. color: #666666;
  853. }
  854. .informationNum {
  855. color: #333333;
  856. }
  857. .copyBtn {
  858. width: 86rpx;
  859. height: 40rpx;
  860. background: #F4F5F7;
  861. border-radius: 20rpx;
  862. font-size: 24rpx;
  863. color: #333333;
  864. text-align: center;
  865. line-height: 40rpx;
  866. margin-left: 20rpx;
  867. }
  868. .orderBottom {
  869. width: 750rpx;
  870. height: 98rpx;
  871. background: #FFFFFF;
  872. position: fixed;
  873. left: 0;
  874. bottom: 0;
  875. display: flex;
  876. justify-content: flex-end;
  877. }
  878. .cancelBtn {
  879. width: 150rpx;
  880. height: 56rpx;
  881. border-radius: 36rpx;
  882. border: 2rpx solid #DDDDDD;
  883. text-align: center;
  884. line-height: 56rpx;
  885. font-size: 28rpx;
  886. color: #3C3C3C;
  887. margin-top: 21rpx;
  888. margin-right: 16rpx;
  889. margin-left: 20rpx;
  890. }
  891. .payBtn {
  892. width: 150rpx;
  893. height: 56rpx;
  894. border-radius: 36rpx;
  895. border: 2rpx solid #FF4F00;
  896. text-align: center;
  897. line-height: 56rpx;
  898. font-size: 28rpx;
  899. color: #FF4F00;
  900. margin-top: 21rpx;
  901. margin-right: 16rpx;
  902. margin-left: 20rpx;
  903. }
  904. .timeBox2 {
  905. width: 100vw;
  906. height: 100vh;
  907. background: rgba(0, 0, 0, 0.5);
  908. position: fixed;
  909. top: 0;
  910. left: 0;
  911. }
  912. .timeLeftActive {
  913. background: #FFFFFF;
  914. }
  915. .timeMain {
  916. width: 100vw;
  917. height: 70vh;
  918. margin-top: 30vh;
  919. background: #FFFFFF;
  920. border-radius: 24rpx 24rpx 0px 0px;
  921. }
  922. .timesfNo {
  923. background: #F5F5F5;
  924. }
  925. .timesfActive {
  926. background: #FF4F00;
  927. }
  928. .timesfActive .timeSfNum {
  929. color: #FFFFFF;
  930. }
  931. .timesfActive .timeyy {
  932. color: #FFFFFF;
  933. }
  934. .topBox {
  935. padding: 20rpx 24rpx;
  936. }
  937. .timeTop {
  938. display: flex;
  939. line-height: 90rpx;
  940. padding-left: 24rpx;
  941. padding-right: 24rpx;
  942. justify-content: space-between;
  943. }
  944. .timeTopTitle {
  945. font-size: 30rpx;
  946. font-family: PingFangSC-Medium, PingFang SC;
  947. font-weight: 600;
  948. color: #3C3C3C;
  949. }
  950. .close {
  951. color: #999999;
  952. font-size: 30rpx;
  953. padding-left: 30rpx;
  954. }
  955. .timeCont {
  956. height: calc(70vh - 210rpx);
  957. }
  958. .timeSv {
  959. height: calc(70vh - 210rpx);
  960. }
  961. .timeLeft2 {
  962. width: 162rpx;
  963. background: #F4F5F7;
  964. border-top: 1px soid #F4F5F7;
  965. border-right: 1px soid #F4F5F7;
  966. }
  967. .timeRight2 {
  968. width: 588rpx;
  969. }
  970. .timesf {
  971. width: 165rpx;
  972. height: 98rpx;
  973. border-radius: 7rpx;
  974. border: 2rpx solid #EEEEEE;
  975. text-align: center;
  976. margin-left: 20rpx;
  977. margin-bottom: 24rpx;
  978. }
  979. .timeBottom {
  980. width: 750rpx;
  981. height: 120rpx;
  982. background: #FFFFFF;
  983. box-shadow: 0px -2px 20rpx 0px rgba(153, 153, 153, 0.2);
  984. display: flex;
  985. align-items: center;
  986. }
  987. .timerightBox {
  988. display: flex;
  989. flex-wrap: wrap;
  990. }
  991. .timeCont {
  992. display: flex;
  993. }
  994. .timeSfNum {
  995. color: #666666;
  996. font-size: 28rpx;
  997. padding-top: 15rpx;
  998. }
  999. .timeyy {
  1000. font-size: 24rpx;
  1001. color: #999999;
  1002. }
  1003. .timecomplete {
  1004. width: 690rpx;
  1005. height: 74rpx;
  1006. background: linear-gradient(124deg, #FF8700 0%, #FF4F00 100%);
  1007. border-radius: 37rpx;
  1008. line-height: 74rpx;
  1009. text-align: center;
  1010. font-size: 30rpx;
  1011. color: #FFFFFF;
  1012. margin-left: 30rpx;
  1013. }
  1014. .timeleftLine {
  1015. font-size: 30rpx;
  1016. color: #999999;
  1017. text-align: center;
  1018. padding: 28rpx 10rpx;
  1019. border-bottom: 1px solid #EEEEEE;
  1020. }
  1021. .yuyueBox {
  1022. background: #FFFFFF;
  1023. border-radius: 10rpx;
  1024. margin-left: 24rpx;
  1025. margin-right: 24rpx;
  1026. }
  1027. .yuyueTime {
  1028. display: flex;
  1029. padding-left: 20rpx;
  1030. padding-top: 30rpx;
  1031. padding-bottom: 36rpx;
  1032. align-items: center;
  1033. }
  1034. .yuyueState {
  1035. display: flex;
  1036. padding-left: 20rpx;
  1037. padding-top: 30rpx;
  1038. padding-bottom: 36rpx;
  1039. }
  1040. .maBox {
  1041. display: flex;
  1042. justify-content: space-between;
  1043. padding: 24rpx 20rpx;
  1044. }
  1045. .querenMa {
  1046. margin: 20rpx 0;
  1047. padding-bottom: 30rpx;
  1048. }
  1049. .maBoximg {
  1050. width: 308rpx;
  1051. height: 308rpx;
  1052. margin: 30rpx 197rpx;
  1053. }
  1054. .rightShou{
  1055. display: flex;
  1056. justify-content: flex-start;
  1057. align-items: center;
  1058. }
  1059. </style>