orderDetail.vue 31 KB

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