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