rescueOrderDetail.vue 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468
  1. <template>
  2. <view class="box">
  3. <!-- 自定义导航 -->
  4. <view class="zdyNavBox">
  5. <view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
  6. <view class="zdyNav">
  7. <view class="zdyNavLeft">
  8. <image src="../../static/img/nav_icon_back.png" mode="aspectFit" class="backImg" @click="goback"></image>
  9. </view>
  10. <view class="zdyNavTitle">订单详情</view>
  11. <view style="width: 50px;"></view>
  12. </view>
  13. </view>
  14. <view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
  15. <view style="height: 44px;"></view>
  16. <view class="top">
  17. <view class="orderState">
  18. <image src="../../static/img/icon_order_def.png" mode="" style="width: 44rpx;height: 44rpx;"></image>
  19. <view class="SheetState" v-if="orderData.openShopHelpSheet.sheetState == 0">待确认</view>
  20. <view class="SheetState" v-if="orderData.openShopHelpSheet.sheetState == 1">已接单</view>
  21. <view class="SheetState" v-if="orderData.openShopHelpSheet.sheetState == 2">已出发</view>
  22. <view class="SheetState" v-if="orderData.openShopHelpSheet.sheetState == 3">已完成</view>
  23. <view class="SheetState" v-if="orderData.openShopHelpSheet.sheetState == 4">已取消</view>
  24. <view class="SheetState" v-if="orderData.openShopHelpSheet.sheetState == 5">已评价</view>
  25. </view>
  26. </view>
  27. <!-- 拖车起始点 -->
  28. <view class="startPointBox" v-if="orderData.openShopHelpSheet.helpType==2">
  29. <div class="hStartAddressBox">
  30. <div class="hStartAddressYd"></div>
  31. <div class="startPointTitle">起点</div>
  32. <div class="hStartAddress">{{orderData.openShopHelpSheet.hStartAddress}}</div>
  33. <img src="../../static/img/icon_ditu.png" alt="" class="mapImg" @click="goMapStart"/>
  34. </div>
  35. <div class="hEndAddressBox">
  36. <div class="hEndAddressYd"></div>
  37. <div class="startPointTitle">终点</div>
  38. <div class="hStartAddress">{{orderData.openShopHelpSheet.hEndAddress}}</div>
  39. <img src="../../static/img/icon_ditu.png" alt="" class="mapImg" @click="goMapEnd"/>
  40. </div>
  41. </view>
  42. <!-- 救援信息 -->
  43. <!-- 救援信息 -->
  44. <view class="information">
  45. <view class="detailedTitle">救援信息</view>
  46. <view class="informationLine">
  47. <view class="informationTxt">救援单号:</view>
  48. <view class="informationNum">{{orderData.openShopHelpSheet.code}}<span class="codeCopy"
  49. @click="copy(orderData.openShopHelpSheet.code)">复制</span></view>
  50. </view>
  51. <view class="informationLine">
  52. <view class="informationTxt">救援时间:</view>
  53. <view class="informationNum" v-if="orderData.openShopHelpSheet.orderType==1">立刻</view>
  54. <view class="informationNum" v-else>{{orderData.openShopHelpSheet.hTime}}</view>
  55. </view>
  56. <view class="informationLine">
  57. <view class="informationTxt">救援类型:</view>
  58. <view class="informationNum2" v-if="orderData.openShopHelpSheet.helpType==1">搭电</view>
  59. <view class="informationNum2" v-if="orderData.openShopHelpSheet.helpType==2">拖车</view>
  60. <view class="informationNum2" v-if="orderData.openShopHelpSheet.helpType==3">换胎</view>
  61. <view class="informationNum2" v-if="orderData.openShopHelpSheet.helpType==4">未知原因</view>
  62. <view class="informationNum2">-</view>
  63. <view class="informationNum2" v-if="orderData.openShopHelpSheet.hscene==1">地面</view>
  64. <view class="informationNum2" v-if="orderData.openShopHelpSheet.hscene==2">车库</view>
  65. <view class="informationNum2" v-if="orderData.openShopHelpSheet.hscene==3">其他</view>
  66. </view>
  67. <view class="informationLine" v-if="orderData.openShopHelpSheet.plateNumber">
  68. <view class="informationTxt">车牌号:</view>
  69. <view class="informationNum">{{orderData.openShopHelpSheet.plateNumber}}</view>
  70. </view>
  71. <view class="informationLine">
  72. <view class="informationTxt">车型:</view>
  73. <view class="informationNum">{{orderData.openShopHelpSheet.carModel}}</view>
  74. </view>
  75. <view class="informationLine">
  76. <view class="informationTxt">救援联系人:</view>
  77. <view class="informationNum">{{orderData.openShopHelpSheet.customerName}}/{{orderData.openShopHelpSheet.mobilePhone}}</view>
  78. </view>
  79. <view class="informationLine" >
  80. <view class="informationTxt">救援门店:</view>
  81. <view class="informationNum">{{orderData.shopInfo.shopName}}</view>
  82. </view>
  83. <view class="informationLine" >
  84. <view class="informationTxt">起点:</view>
  85. <view class="informationNum">{{orderData.openShopHelpSheet.hStartAddress}}</view>
  86. </view>
  87. <view class="informationLine">
  88. <view class="informationTxt">终点:</view>
  89. <view class="informationNum">{{orderData.openShopHelpSheet.hEndAddress}}</view>
  90. </view>
  91. </view>
  92. <view class="information">
  93. <view class="detailedTitle">订单信息</view>
  94. <view class="informationLine">
  95. <view class="informationTxt">下单时间:</view>
  96. <view class="informationNum" >{{orderData.openShopHelpSheet.createTime}}</view>
  97. </view>
  98. <view class="informationLine">
  99. <view class="informationTxt">下单人:</view>
  100. <view class="informationNum" >{{orderData.openUser.nickName|| '未知'}} / {{orderData.openShopHelpSheet.mobilePhone}}</view>
  101. </view>
  102. <view class="informationLine" v-if="orderData.openShopHelpSheet.confirmTime">
  103. <view class="informationTxt">确认时间:</view>
  104. <view class="informationNum" >{{orderData.openShopHelpSheet.confirmTime}}/{{orderData.openShopHelpSheet.confirmOperator}}</view>
  105. </view>
  106. <view class="informationLine" v-if="orderData.openShopHelpSheet.goingTime">
  107. <view class="informationTxt">出发时间:</view>
  108. <view class="informationNum" >{{orderData.openShopHelpSheet.goingTime}}/{{orderData.openShopHelpSheet.goingOperator}}</view>
  109. </view>
  110. <view class="informationLine" v-if="orderData.openShopHelpSheet.finishTime">
  111. <view class="informationTxt">完成时间:</view>
  112. <view class="informationNum" >{{orderData.openShopHelpSheet.finishTime}}/orderData.openShopHelpSheet.finishOperator</view>
  113. </view>
  114. <view class="informationLine" v-if="orderData.openShopHelpSheet.finishComment">
  115. <view class="informationTxt">完成备注:</view>
  116. <view class="informationNum" >{{orderData.openShopHelpSheet.finishComment}}</view>
  117. </view>
  118. <view class="informationLine" v-if="orderData.openShopHelpSheet.evaluateTime">
  119. <view class="informationTxt">评价时间:</view>
  120. <view class="informationNum">{{orderData.openShopHelpSheet.evaluateTime}}</view>
  121. </view>
  122. <view class="informationLine" v-if="orderData.openShopHelpSheet.evaluateComment">
  123. <view class="informationTxt">评价内容:</view>
  124. <view class="informationNum">{{orderData.openShopHelpSheet.evaluateComment}}</view>
  125. </view>
  126. <view class="informationLine" v-if="orderData.openShopHelpSheet.cancelTime">
  127. <view class="informationTxt">取消时间:</view>
  128. <view class="informationNum">{{orderData.openShopHelpSheet.cancelTime}}/{{orderData.openShopHelpSheet.cancelOperator}}</view>
  129. </view>
  130. <view class="informationLine" v-if="orderData.openShopHelpSheet.cancelComment">
  131. <view class="informationTxt">取消备注:</view>
  132. <view class="informationNum" >{{orderData.openShopHelpSheet.cancelComment}}</view>
  133. </view>
  134. </view>
  135. <view style="height: 50rpx;background-color: #F4F5F7;"></view>
  136. <!-- 待付款 -->
  137. <!-- <view class="bottom" v-if="orderData.openShopHelpSheet.sheetState == 0">
  138. <view class="cancel" @click="cancelBespeak">取消订单</view>
  139. </view> -->
  140. <!-- 待服务 -->
  141. <view class="bottom">
  142. <view class="cancel" v-if="orderData.openShopHelpSheet.sheetState == 0||orderData.openShopHelpSheet.sheetState == 1||orderData.openShopHelpSheet.sheetState == 2" @click="cancelBespeak">取消订单</view>
  143. <view class="defer" v-if="orderData.openShopHelpSheet.sheetState == 0||orderData.openShopHelpSheet.sheetState == 1" @click="updateShop">更换门店</view>
  144. <view class="defer" v-if="orderData.openShopHelpSheet.sheetState == 0" @click="confirmOrder">确认</view>
  145. <view class="defer" v-if="orderData.openShopHelpSheet.sheetState == 1||orderData.openShopHelpSheet.sheetState == 2" @click="completeOrder">完成</view>
  146. <view class="defer" v-if="orderData.openShopHelpSheet.sheetState == 1" @click="goingOrder">出发</view>
  147. </view>
  148. <!-- 完成-->
  149. <view class="tuikuanBox" v-if="completeShow">
  150. <view class="tuikuan">
  151. <view class="tuiTop">
  152. <view class="tuiTitle">完成</view>
  153. <image @click="completeShow=false" src="../../static/img/icon_close.png" mode="" style="width: 26rpx; height: 26rpx;"></image>
  154. </view>
  155. <view class="contLine">
  156. <view class="contlineRight">
  157. <textarea placeholder-style="color:#999999" placeholder="备注" v-model="finishComment"
  158. class="contlineRightInput" maxlength="-1" auto-height="true" />
  159. </view>
  160. </view>
  161. <view class="tuiBtns">
  162. <view class="btn" @click="completeShow=false">取消</view>
  163. <view class="btn2" @click="complete">确认完成</view>
  164. </view>
  165. </view>
  166. </view>
  167. <!-- 更换门店 -->
  168. <view class="tuikuanBox" v-if="updateShopShow">
  169. <view class="shopGhBox">
  170. <view class="shopGhTitle">更换门店</view>
  171. <view class="">
  172. <picker @change="bindPickerChange" :value="pickerindex" :range-key="'shopName'" :range="pickerarray">
  173. <view class="uniPicker">
  174. <view class="uniPickerName">
  175. {{shopName}}
  176. </view>
  177. <image src="../../static/img/arrow_down.png" mode=" " class="jtShopImg"></image>
  178. </view>
  179. </picker>
  180. </view>
  181. <view class="tuiBtns">
  182. <view class="btn" @click="updateShopShow=false">取消</view>
  183. <view class="btn2" @click="completeupdateShop">更换门店</view>
  184. </view>
  185. </view>
  186. </view>
  187. </view>
  188. </template>
  189. <script>
  190. import tkiQrcode from "@/components/tki-qrcode/tki-qrcode.vue"
  191. export default {
  192. components: {
  193. tkiQrcode
  194. },
  195. data() {
  196. return {
  197. id: '',
  198. iStatusBarHeight:'',
  199. orderData: '',
  200. onval: true, // val值变化时自动重新生成二维码
  201. loadMake: true, // 组件加载完成后自动生成二维码
  202. size: 500,
  203. qrcodeShow: false,
  204. qrcodeTop: '-100vh',
  205. qrcodeTopVal: '',
  206. ifShow: false,
  207. val: '二维码', // 要生成的二维码值
  208. unit: 'upx', // 单位
  209. background: '#b4e9e2', // 背景色
  210. foreground: '#309286', // 前景色
  211. pdground: '#262637', // 角标色
  212. icon: '', // 二维码图标
  213. iconsize: 40, // 二维码图标大小
  214. lv: 3, // 二维码容错级别 , 一般不用设置,默认就行
  215. src: '', // 二维码生成后的图片地址或base64
  216. isShowMa: false,
  217. quanMaList:[],
  218. completeShow: false,
  219. tuicauseList:[],
  220. tuikuanContent:'',
  221. index: 0,
  222. iOSInfo:'',
  223. swiperIndex:0,
  224. back:'',
  225. finishComment:'',
  226. shopName:'',
  227. shopId:'',
  228. pickerarray:'',
  229. pickerindex:'',
  230. changeOldShopID:'',
  231. updateShopShow:false,
  232. }
  233. },
  234. onLoad(opt) {
  235. this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
  236. this.id = opt.id
  237. this.back=opt.back;
  238. if (this.id) {
  239. this.getData()
  240. }
  241. //this.getTuiKuanData()
  242. this.getShopinfo();
  243. var qxnum = uni.getStorageSync("quanxian");
  244. if (qxnum == 1) {
  245. this.iOSInfo = JSON.parse(JSON.stringify(window.iOSInfo));
  246. }else if(qxnum==2){
  247. window.getAndroid=this.getAndroid;
  248. }
  249. },
  250. methods: {
  251. goMapStart(){
  252. var obj={
  253. Lat:this.orderData.openShopHelpSheet.startLat,
  254. Lng:this.orderData.openShopHelpSheet.startLng,
  255. Address:this.orderData.openShopHelpSheet.hStartAddress
  256. }
  257. //app交互
  258. var standalone = window.navigator.standalone
  259. var userAgent = window.navigator.userAgent.toLowerCase()
  260. var safari = /safari/.test(userAgent)
  261. var ios = /iphone|ipod|ipad|mac/.test(userAgent)
  262. var android = /android/.test(userAgent)
  263. if (ios) {
  264. if ( true) {//!standalone&& !safari
  265. window.webkit.messageHandlers.goMap.postMessage(obj)
  266. }
  267. } else if (android) {
  268. window.android.goMap(JSON.stringify(obj))
  269. }
  270. },
  271. goMapEnd(){
  272. var obj={
  273. Lat:this.orderData.openShopHelpSheet.endLat,
  274. Lng:this.orderData.openShopHelpSheet.endLng,
  275. Address:this.orderData.openShopHelpSheet.hEndAddress
  276. }
  277. //app交互
  278. var standalone = window.navigator.standalone
  279. var userAgent = window.navigator.userAgent.toLowerCase()
  280. var safari = /safari/.test(userAgent)
  281. var ios = /iphone|ipod|ipad|mac/.test(userAgent)
  282. var android = /android/.test(userAgent)
  283. if (ios) {
  284. if ( true) {//!standalone&& !safari
  285. window.webkit.messageHandlers.goMap.postMessage(obj)
  286. }
  287. } else if (android) {
  288. window.android.goMap(JSON.stringify(obj))
  289. }
  290. },
  291. goingOrder(){
  292. var that = this
  293. uni.showModal({
  294. title: '提示',
  295. content: '是否出发',
  296. cancelText:'否',
  297. confirmText:'是',
  298. success: function (res) {
  299. if (res.confirm) {
  300. uni.showLoading({
  301. title: '加载中'
  302. })
  303. that.$http('openH5ShopHelpSheetOrder/goingOrder', {
  304. id: that.id,
  305. }, 'POST').then(res => {
  306. uni.hideLoading();
  307. if(res.code==0){
  308. uni.showToast({
  309. title: '操作成功',
  310. icon: 'none',
  311. duration: 2000
  312. });
  313. }else{
  314. uni.showToast({
  315. title: res.msg,
  316. icon: 'none',
  317. duration: 2000
  318. });
  319. }
  320. setTimeout(function() {
  321. that.getData();
  322. }, 1000);
  323. })
  324. } else if (res.cancel) {
  325. }
  326. }
  327. });
  328. },
  329. completeOrder(){
  330. var that = this
  331. uni.showModal({
  332. title: '提示',
  333. content: '是否完成该订单',
  334. cancelText:'否',
  335. confirmText:'是',
  336. success: function (res) {
  337. if (res.confirm) {
  338. uni.showLoading({
  339. title: '加载中'
  340. })
  341. that.$http('openH5ShopHelpSheetOrder/completeOrder', {
  342. id: that.id,
  343. }, 'POST').then(res => {
  344. uni.hideLoading();
  345. if(res.code==0){
  346. uni.showToast({
  347. title: '完成成功',
  348. icon: 'none',
  349. duration: 2000
  350. });
  351. }else{
  352. uni.showToast({
  353. title: res.msg,
  354. icon: 'none',
  355. duration: 2000
  356. });
  357. }
  358. setTimeout(function() {
  359. that.getData();
  360. }, 1000);
  361. })
  362. } else if (res.cancel) {
  363. }
  364. }
  365. });
  366. },
  367. bindPickerChange(e){
  368. console.log(e)
  369. this.shopName=this.pickerarray[e.detail.value].shopName
  370. this.shopId=this.pickerarray[e.detail.value].id
  371. },
  372. completeupdateShop(){
  373. uni.showLoading({
  374. title: '加载中'
  375. })
  376. this.$http('openH5ShopHelpSheetOrder/updateShop', {
  377. id: this.id,shopID:this.shopId,changeOldShopID:this.changeOldShopID,
  378. }, 'POST').then(res => {
  379. uni.hideLoading();
  380. this.updateShopShow=false;
  381. if(res.code==0){
  382. uni.showToast({
  383. title: '更换成功',
  384. icon: 'none',
  385. duration: 2000
  386. });
  387. }else{
  388. uni.showToast({
  389. title: res.msg,
  390. icon: 'none',
  391. duration: 2000
  392. });
  393. }
  394. setTimeout(function() {
  395. this.getData();
  396. }, 1000);
  397. })
  398. },
  399. confirmOrder(){
  400. var that = this
  401. uni.showModal({
  402. title: '提示',
  403. content: '是否确定该订单',
  404. cancelText:'否',
  405. confirmText:'是',
  406. success: function (res) {
  407. if (res.confirm) {
  408. uni.showLoading({
  409. title: '加载中'
  410. })
  411. that.$http('openH5ShopHelpSheetOrder/confirmOrder', {
  412. id: that.id,
  413. }, 'POST').then(res => {
  414. uni.hideLoading();
  415. // var list = res.data.Items
  416. uni.showToast({
  417. title: '确定成功',
  418. icon: 'none',
  419. duration: 2000
  420. });
  421. setTimeout(function() {
  422. that.getData();
  423. }, 1000);
  424. })
  425. } else if (res.cancel) {
  426. this.updateShopShow=false;
  427. }
  428. }
  429. });
  430. },
  431. getShopinfo(){
  432. this.$http('openH5SetTheGuest/getShopInfo',{},'GET').then(res => {
  433. this.shopName=res.data.shopName;
  434. this.shopId=res.data.id
  435. this.getShopList();
  436. })
  437. },
  438. getShopList(){
  439. this.$http('openH5SetTheGuest/getShopList', {
  440. },'GET').then(res => {
  441. this.pickerarray=res.data;
  442. })
  443. },
  444. complete(){
  445. this.completeShow=false;
  446. },
  447. updateShop(){
  448. this.updateShopShow=true;
  449. },
  450. isShowMaSHow(index){
  451. this.swiperIndex=index
  452. this.isShowMa=true
  453. },
  454. getAndroid(e){
  455. this.iOSInfo=e
  456. },
  457. payDone(){
  458. var that = this
  459. uni.showModal({
  460. title: '提示',
  461. content: '确认已支付完成吗',
  462. success: function (res) {
  463. if (res.confirm) {
  464. uni.showLoading({
  465. title: '加载中'
  466. })
  467. that.$http('openH5Indent/complete', {
  468. id: that.id,
  469. }, 'POST').then(res => {
  470. uni.hideLoading();
  471. // var list = res.data.Items
  472. setTimeout(function() {
  473. that.getData();
  474. }, 1000);
  475. })
  476. } else if (res.cancel) {
  477. }
  478. }
  479. });
  480. },
  481. goTui(){
  482. let yuanyin = this.tuicauseList[this.index].contents
  483. if (!yuanyin) {
  484. uni.showToast({
  485. title: '请选择退款原因',
  486. icon: 'none',
  487. duration: 3000
  488. });
  489. return false;
  490. }
  491. uni.showLoading({
  492. title: '加载中'
  493. })
  494. var that = this
  495. this.$http('openH5Indent/reimburse', {
  496. id: this.id,
  497. refundReason: yuanyin,
  498. refundComment: this.tuikuanContent,
  499. realMoney:this.orderData.data.realMoney
  500. }, 'GET').then(res => {
  501. uni.hideLoading();
  502. // var list = res.data.Items
  503. // var list = res.data
  504. console.log("result+=", res);
  505. if (res.code == 1) {
  506. that.isShowTui = false
  507. uni.showToast({
  508. title: '退款成功',
  509. icon: 'none',
  510. duration: 2000
  511. });
  512. setTimeout(function() {
  513. that.getData();
  514. }, 1000);
  515. }
  516. })
  517. },
  518. bindChange(e) {
  519. console.log(e);
  520. this.index = e.detail.value
  521. },
  522. feedDone(e) {
  523. this.tuikuanContent = e.target.value
  524. },
  525. // 核销
  526. goHeXiao(){
  527. //app交互
  528. var standalone = window.navigator.standalone
  529. var userAgent = window.navigator.userAgent.toLowerCase()
  530. var safari = /safari/.test(userAgent)
  531. var ios = /iphone|ipod|ipad|mac/.test(userAgent)
  532. var android = /android/.test(userAgent)
  533. if (ios) {
  534. if ( true) {//!standalone&& !safari
  535. window.webkit.messageHandlers.goHeXiao.postMessage({"id":this.id?this.id:''})
  536. }
  537. } else if (android) {
  538. window.android.writeoff(this.id)
  539. }
  540. },
  541. getTuiKuanData() {
  542. uni.showLoading({
  543. title: '加载中'
  544. });
  545. this.$http('openH5Indent/getOpenReason', {
  546. // id: this.id,
  547. }, 'GET').then(res => {
  548. uni.hideLoading();
  549. this.tuicauseList = res.data;
  550. })
  551. },
  552. copy(txt) {
  553. uni.setClipboardData({
  554. data: txt,
  555. success: function() {
  556. uni.showToast({
  557. title: '复制成功',
  558. icon: 'none',
  559. duration: 2000
  560. });
  561. }
  562. });
  563. },
  564. upTime() {
  565. uni.showLoading({
  566. title: '加载中'
  567. })
  568. var that = this
  569. this.$http('openH5Indent/carOwner/updateTimeOfAppointment', {
  570. id: this.id,
  571. shopId: this.orderData.shopInfo.id,
  572. billDate: this.billDate
  573. }, 'POST').then(res => {
  574. uni.hideLoading();
  575. // var list = res.data.Items
  576. var list = res.data
  577. console.log("result+=", res.data);
  578. uni.showToast({
  579. title: '延期成功',
  580. icon: 'none',
  581. duration: 2000
  582. });
  583. setTimeout(function() {
  584. that.getData();
  585. }, 1000);
  586. })
  587. },
  588. cancelBespeak(){
  589. var that = this
  590. uni.showModal({
  591. title: '提示',
  592. content: '是否取消该订单',
  593. cancelText:'否',
  594. confirmText:'是',
  595. success: function (res) {
  596. if (res.confirm) {
  597. uni.showLoading({
  598. title: '加载中'
  599. })
  600. that.$http('openH5ShopHelpSheetOrder/cancelOrder', {
  601. id: that.id,
  602. }, 'POST').then(res => {
  603. uni.hideLoading();
  604. // var list = res.data.Items
  605. uni.showToast({
  606. title: '取消成功',
  607. icon: 'none',
  608. duration: 2000
  609. });
  610. setTimeout(function() {
  611. that.getData();
  612. }, 1000);
  613. })
  614. } else if (res.cancel) {
  615. }
  616. }
  617. });
  618. },
  619. map() {
  620. console.log("打开地图")
  621. var that = this;
  622. if (!that.orderData.shopInfo.lat || !that.orderData.shopInfo.lng) {
  623. uni.showToast({
  624. title: '该店铺未设置定位',
  625. icon: 'none',
  626. duration: 3000
  627. });
  628. } else {
  629. uni.openLocation({
  630. latitude: Number(that.orderData.shopInfo.lat),
  631. longitude: Number(that.orderData.shopInfo.lng),
  632. name: that.orderData.shopInfo.shopName,
  633. address: that.orderData.shopInfo.provinceName + that.orderData.shopInfo.cityName + that
  634. .orderData.shopInfo.areaName + that.orderData.shopInfo.address,
  635. success: function() {
  636. console.log('success');
  637. },
  638. fail(err) {
  639. console.log(err)
  640. }
  641. });
  642. }
  643. },
  644. call() {
  645. uni.makePhoneCall({
  646. phoneNumber: this.orderData.shopInfo.mobilePhone
  647. });
  648. },
  649. getData() {
  650. uni.showLoading({
  651. title: '加载中'
  652. });
  653. this.$http('openH5ShopHelpSheetOrder/getOpenShopHelpSheetOrderInfo', {
  654. id: this.id,
  655. }, 'GET').then(res => {
  656. uni.hideLoading();
  657. this.orderData = res.data;
  658. this.changeOldShopID=res.data.shopInfo.id;
  659. if (this.quanMaList) {
  660. this.quanMaList = [];
  661. }
  662. let maList = this.orderData.OpenSheetQRCode;
  663. if (maList) {
  664. maList.forEach(item =>{
  665. if (item.writeoffState==1) {
  666. this.quanMaList.push(item.qrCode);
  667. }
  668. })
  669. }
  670. console.log('可用券码--',this.quanMaList);
  671. })
  672. },
  673. goback() {
  674. if(this.back==1){
  675. uni.navigateBack({
  676. delta: 1
  677. })
  678. }else{
  679. var standalone = window.navigator.standalone
  680. var userAgent = window.navigator.userAgent.toLowerCase()
  681. var safari = /safari/.test(userAgent)
  682. var ios = /iphone|ipod|ipad|mac/.test(userAgent)
  683. var android = /android/.test(userAgent)
  684. if (ios) {
  685. if ( true) {//!standalone&& !safari
  686. window.webkit.messageHandlers.goMyNav.postMessage(null)
  687. }
  688. } else if (android) {
  689. window.android.postMessage()
  690. }
  691. }
  692. },
  693. gohome(){
  694. uni.switchTab({
  695. url:'../../index/index'
  696. })
  697. },
  698. },
  699. onPullDownRefresh() {
  700. this.getData()
  701. setTimeout(function() {
  702. uni.stopPullDownRefresh();
  703. }, 1000);
  704. },
  705. }
  706. </script>
  707. <style scoped>
  708. .informationNum2{
  709. color: #333333;
  710. font-size: 26rpx;
  711. }
  712. .startPointBox{
  713. width: 678rpx;
  714. background: #FFFFFF;
  715. border-radius: 10rpx;
  716. margin-top: 20rpx;
  717. margin-left: 24rpx;
  718. padding:30rpx 12rpx ;
  719. }
  720. .mapImg{
  721. width: 44rpx;height: 44rpx;
  722. }
  723. .hStartAddressBox{
  724. border-bottom: 1px solid #EEEEEE;
  725. display: flex;padding-bottom: 30rpx;
  726. }
  727. .hEndAddressBox{
  728. display: flex;padding-top: 30rpx;
  729. }
  730. .hEndAddressYd{
  731. width: 14rpx;
  732. height: 14rpx;
  733. background: #F03B3B;
  734. border-radius: 50%;
  735. margin-top: 12rpx;
  736. margin-right: 20rpx;
  737. }
  738. .hStartAddressYd{
  739. width: 14rpx;
  740. height: 14rpx;
  741. background: #3F90F7;
  742. border-radius: 50%;
  743. margin-top: 12rpx;
  744. margin-right: 20rpx;
  745. }
  746. .hStartAddress{
  747. font-weight: 400;font-size: 28rpx;
  748. color: #333333;padding-left: 30rpx;
  749. line-height: 40rpx;
  750. width: 500rpx;
  751. }
  752. .startPointTitle{
  753. color: #666666;line-height: 40rpx;font-size: 28rpx;
  754. }
  755. .shopGhTitle{
  756. font-size: 30rpx;color: #333333;padding: 24rpx;
  757. }
  758. .jtShopImg{
  759. width: 24rpx;height: 24rpx;margin-top: 26rpx;margin-right: 26rpx;
  760. }
  761. .uniPicker{
  762. display: flex;
  763. }
  764. .uniPickerName{
  765. padding: 16rpx;font-size: 28rpx;color: #666666;
  766. }
  767. .box {
  768. min-height: 100vh;
  769. background: #F4F5F7;
  770. padding-bottom: 135rpx;
  771. }
  772. .zdyNavBox{
  773. width: 100vw;
  774. background: #FFFFFF;
  775. position: fixed;
  776. top: 0;
  777. left: 0;
  778. z-index: 9999999;
  779. }
  780. .zdyNav{
  781. height: 44px;
  782. display: flex;
  783. justify-content: space-between;
  784. align-items: center;
  785. }
  786. .backImg{
  787. width: 44rpx;
  788. height: 44rpx;
  789. margin-left: 10rpx;
  790. margin-right: 20rpx;
  791. }
  792. .homeImg{
  793. width: 44rpx;
  794. height: 44rpx;
  795. }
  796. .zdyNavLeft{
  797. display: flex;
  798. align-items: center;
  799. }
  800. .zdyNavTitle{
  801. height: 44px;
  802. background: #FFFFFF;
  803. text-align: center;
  804. font-size: 34rpx;
  805. line-height: 44px;
  806. }
  807. .top {
  808. height: 190rpx;
  809. background-color: #FF0000;
  810. }
  811. .orderState {
  812. display: flex;
  813. justify-content: center;
  814. align-items: center;
  815. padding-top: 40rpx;
  816. }
  817. .SheetState {
  818. display: flex;
  819. justify-content: center;
  820. font-size: 36rpx;
  821. font-weight: 500;
  822. color: #FFFFFF;
  823. margin-left: 15rpx;
  824. }
  825. .timeEditImg {
  826. width: 25rpx;
  827. height: 25rpx;
  828. padding-left: 20rpx;
  829. }
  830. .shopBoximg {
  831. width: 40rpx;
  832. height: 40rpx;
  833. }
  834. .shopRightImg {
  835. width: 44rpx;
  836. height: 45rpx;
  837. }
  838. .shopsx {
  839. width: 1px;
  840. height: 50rpx;
  841. background: #EEEEEE;
  842. margin-top: 30rpx;
  843. margin-left: 28rpx;
  844. }
  845. .shopBox {
  846. display: flex;
  847. padding: 30rpx 20rpx;
  848. margin: 0rpx 24rpx;
  849. margin-top: -60rpx;
  850. background-color: #FFFFFF;
  851. border-radius: 10rpx;
  852. }
  853. .shopCont {
  854. width: 405rpx;
  855. padding-left: 20rpx;
  856. }
  857. .shopName {
  858. font-size: 30rpx;
  859. font-weight: bold;
  860. color: #3C3C3C;
  861. line-height: 42rpx;
  862. }
  863. .Address {
  864. color: #999999;
  865. font-size: 24rpx;
  866. margin-top: 10rpx;
  867. }
  868. .shopRihgtTxt {
  869. color: #999999;
  870. font-size: 24rpx;
  871. }
  872. .shopRightBox {
  873. padding-left: 28rpx;
  874. }
  875. .detailedTitle {
  876. padding: 23rpx 20rpx;
  877. display: flex;
  878. text-align: center;
  879. align-content: flex-start;
  880. border-bottom: 1rpx solid #EEEEEE;
  881. font-size: 30rpx;
  882. font-weight: bold;
  883. color: #3C3C3C;
  884. }
  885. .detailedLine {
  886. display: flex;
  887. padding: 16rpx 20rpx;
  888. justify-content: space-between;
  889. align-items: center;
  890. }
  891. .detailedImg {
  892. width: 120rpx;
  893. height: 120rpx;
  894. border-radius: 10rpx;
  895. }
  896. .detailedName {
  897. display: flex;
  898. align-items: center;
  899. }
  900. .code {
  901. font-size: 26rpx;
  902. color: #333333;
  903. font-weight: bold;
  904. width: 180rpx
  905. }
  906. .old {
  907. color: #999999;
  908. font-weight: 400;
  909. text-decoration: line-through;
  910. }
  911. .redPoint {
  912. width: 10rpx;
  913. height: 10rpx;
  914. background: #FF0000;
  915. border-radius: 10rpx;
  916. margin-right: 10rpx;
  917. }
  918. .quanState {
  919. font-size: 22rpx;
  920. color: #F19D01;
  921. padding: 0 10rpx;
  922. border: 1rpx solid #F19D01;
  923. border-radius: 4rpx;
  924. margin-left: 20rpx;
  925. }
  926. .quanState2{
  927. font-size: 22rpx;
  928. color: #999999;
  929. padding: 0 10rpx;
  930. border: 1rpx solid #DDDDDD;
  931. border-radius: 4rpx;
  932. margin-left: 20rpx;
  933. }
  934. .information {
  935. background: #FFFFFF;
  936. border-radius: 10rpx;
  937. margin: 20rpx 24rpx;
  938. padding-bottom: 15rpx;
  939. }
  940. .informationLine {
  941. display: flex;
  942. padding: 15rpx 20rpx;
  943. }
  944. .informationLine2 {
  945. display: flex;
  946. justify-content: space-between;
  947. font-size: 26rpx;
  948. padding: 20rpx;
  949. align-items: center;
  950. padding-bottom: 0;
  951. }
  952. .salePrice {
  953. font-size: 26rpx;
  954. font-weight: 500;
  955. color: #333333;
  956. line-height: 45rpx;
  957. }
  958. .money {
  959. background: #FFFFFF;
  960. border-radius: 10rpx;
  961. margin: 20rpx 24rpx;
  962. display: flex;
  963. justify-content: space-between;
  964. font-size: 26rpx;
  965. padding: 30rpx 20rpx;
  966. }
  967. .informationTxt {
  968. width: 190rpx;
  969. font-size: 26rpx;
  970. color: #999999;
  971. }
  972. .line {
  973. height: 20rpx;
  974. background-color: #FFFFFF;
  975. border-bottom: 1rpx solid #EEEEEE;
  976. }
  977. .goodsName {
  978. width: 80%;
  979. color: #333333;
  980. font-size: 26rpx;
  981. }
  982. .goodsName2{
  983. padding: 20rpx 20rpx 15rpx;
  984. color: #333333;
  985. font-size: 26rpx;
  986. }
  987. .informationNum {
  988. color: #333333;
  989. font-size: 26rpx;
  990. width: 500rpx;
  991. }
  992. .codeCopy {
  993. width: 77rpx;
  994. height: 36rpx;
  995. background: #F4F5F7;
  996. border-radius: 22rpx;
  997. font-size: 24rpx;
  998. color: #333333;
  999. text-align: center;
  1000. line-height: 33rpx;
  1001. padding: 0 15rpx;
  1002. margin-left: 20rpx;
  1003. }
  1004. .bottom {
  1005. display: flex;
  1006. justify-content: flex-end;
  1007. padding: 20rpx;
  1008. background-color: #FFFFFF;
  1009. align-items: center;
  1010. height: 98rpx;
  1011. width: 100vw;
  1012. position: fixed;
  1013. bottom: 0rpx;
  1014. padding-bottom: constant(safe-area-inset-bottom);
  1015. padding-bottom: env(safe-area-inset-bottom);
  1016. }
  1017. .cancel {
  1018. color: #3C3C3C;
  1019. font-size: 28rpx;
  1020. width: 150rpx;
  1021. height: 56rpx;
  1022. border-radius: 36rpx;
  1023. border: 1rpx solid #DDDDDD;
  1024. text-align: center;
  1025. line-height: 56rpx;
  1026. margin-right: 40rpx;
  1027. }
  1028. .defer {
  1029. color: #D53533;
  1030. font-size: 28rpx;
  1031. width: 150rpx;
  1032. height: 56rpx;
  1033. border-radius: 36rpx;
  1034. border: 1rpx solid #D53533;
  1035. text-align: center;
  1036. line-height: 56rpx;
  1037. margin-right: 40rpx;
  1038. }
  1039. .itemBox {
  1040. margin: 20rpx;
  1041. border-radius: 10rpx;
  1042. border: 2rpx solid #EEEEEE;
  1043. }
  1044. .itemTop {
  1045. padding: 18rpx 20rpx;
  1046. padding-right: 0;
  1047. background-color: #FFEFD5;
  1048. display: flex;
  1049. justify-content: space-between;
  1050. align-content: center;
  1051. }
  1052. .topTitle {
  1053. width: 104rpx;
  1054. font-size: 26rpx;
  1055. color: #333333;
  1056. margin-right: 20rpx;
  1057. text-align: right;
  1058. }
  1059. .leftItem {
  1060. font-size: 26rpx;
  1061. color: #333333;
  1062. margin-right: 20rpx;
  1063. flex-grow: 1;
  1064. /* 隐藏文字显示 ...不换行 */
  1065. overflow: hidden;
  1066. text-overflow: ellipsis;
  1067. white-space: nowrap;
  1068. }
  1069. .itemContent {
  1070. padding: 20rpx;
  1071. padding-right: 0;
  1072. background-color: #FFFFFF;
  1073. display: flex;
  1074. justify-content: space-between;
  1075. align-content: center;
  1076. }
  1077. .maBox {
  1078. width: 100%;
  1079. height: 100vh;
  1080. background: rgba(0, 0, 0, 0.4);
  1081. position: fixed;
  1082. left: 0;
  1083. top: 0;
  1084. z-index: 9999;
  1085. }
  1086. .querenMa {
  1087. width: 578;
  1088. height: 640rpx;
  1089. background: #ffffff;
  1090. margin: 0 86rpx;
  1091. margin-top: 50%;
  1092. border-radius: 24rpx;
  1093. }
  1094. .maTop {
  1095. display: flex;
  1096. justify-content: space-between;
  1097. align-items: center;
  1098. padding: 30rpx 20rpx 15rpx;
  1099. }
  1100. .maTitle {
  1101. color: #666666;
  1102. font-size: 26rpx;
  1103. text-align: center;
  1104. padding-left: 100rpx;
  1105. }
  1106. .swiper{
  1107. width: 100%;
  1108. height: 85%;
  1109. background: #FFFFFF;
  1110. }
  1111. .swiper-item{
  1112. width: 100%;
  1113. height: 100%;
  1114. }
  1115. .maCode {
  1116. font-size: 30rpx;
  1117. font-weight: 500;
  1118. color: #333333;
  1119. line-height: 42rpx;
  1120. margin-bottom: 40rpx;
  1121. text-align: center;
  1122. }
  1123. .maBoximg {
  1124. width: 400rpx;
  1125. height: 400rpx;
  1126. margin-left: 86rpx;
  1127. }
  1128. .tuikuanBox {
  1129. width: 100%;
  1130. height: 100vh;
  1131. background: rgba(0, 0, 0, 0.4);
  1132. position: fixed;
  1133. left: 0;
  1134. top: 0;
  1135. z-index: 999;
  1136. }
  1137. .shopGhBox{
  1138. width: 638rpx;
  1139. height: 300rpx;
  1140. background: #ffffff;
  1141. margin: 0 36rpx;
  1142. margin-top: 50%;
  1143. border-radius: 24rpx;
  1144. padding: 30rpx 20rpx;
  1145. }
  1146. .tuikuan {
  1147. width: 638rpx;
  1148. height: 500rpx;
  1149. background: #ffffff;
  1150. margin: 0 36rpx;
  1151. margin-top: 50%;
  1152. border-radius: 24rpx;
  1153. padding: 30rpx 20rpx;
  1154. }
  1155. .tuiTop {
  1156. display: flex;
  1157. justify-content: space-between;
  1158. margin-bottom: 36rpx;
  1159. }
  1160. .tuiTitle {
  1161. width: 56rpx;
  1162. height: 40rpx;
  1163. font-size: 28rpx;
  1164. font-weight: 500;
  1165. color: #3C3C3C;
  1166. line-height: 40rpx;
  1167. }
  1168. .contLine {
  1169. display: flex;
  1170. justify-content: space-between;
  1171. font-size: 28rpx;
  1172. padding: 30rpx 0;
  1173. border-bottom: 1px solid #EEEEEE;
  1174. }
  1175. .contlineLeft {
  1176. color: #666666;
  1177. line-height: 40rpx;
  1178. align-items: center;
  1179. }
  1180. .star {
  1181. width: 14rpx;
  1182. height: 14rpx;
  1183. padding-bottom: 5rpx;
  1184. }
  1185. .carModel {
  1186. width: 350rpx;
  1187. text-align: left;
  1188. }
  1189. .noColor {
  1190. color: #CCCCCC;
  1191. }
  1192. .carModelRight {
  1193. display: flex;
  1194. justify-content: flex-start;
  1195. align-items: center;
  1196. }
  1197. .contlineRight {
  1198. color: #333333;
  1199. line-height: 40rpx;
  1200. width: 400rpx;
  1201. text-align: right;
  1202. }
  1203. .contlineRightInput {
  1204. color: #333333;
  1205. text-align: left;
  1206. font-size: 28rpx;
  1207. min-height: 182rpx;
  1208. width: 600rpx;
  1209. }
  1210. .contlineRightJt {
  1211. width: 30rpx;
  1212. height: 30rpx;
  1213. }
  1214. .tuiBtns {
  1215. display: flex;
  1216. padding: 40rpx 20rpx 10rpx;
  1217. }
  1218. .btn {
  1219. width: 288rpx;
  1220. height: 98rpx;
  1221. background: #F4F5F7;
  1222. border-radius: 10rpx;
  1223. margin-right: 22rpx;
  1224. font-size: 30rpx;
  1225. font-weight: 500;
  1226. color: #3C3C3C;
  1227. line-height: 98rpx;
  1228. text-align: center;
  1229. }
  1230. .btn2 {
  1231. width: 288rpx;
  1232. height: 98rpx;
  1233. background: #3F90F7;
  1234. border-radius: 10rpx;
  1235. font-size: 30rpx;
  1236. font-weight: 500;
  1237. color: #FFFFFF;
  1238. line-height: 98rpx;
  1239. text-align: center;
  1240. }
  1241. .writeoffLine{
  1242. display: flex;justify-content: space-between;
  1243. color: #999999;font-size: 24rpx;
  1244. line-height: 33rpx;padding-top: 8rpx;
  1245. }
  1246. .writeoffLineBox{
  1247. padding: 0 20rpx;
  1248. }
  1249. .detailedLineBox .detailedLine{
  1250. padding-bottom: 0rpx;
  1251. }
  1252. .writeoffXx .informationNum{
  1253. width: 500rpx;
  1254. }
  1255. .detailedLineBox{
  1256. padding-bottom: 10rpx;
  1257. }
  1258. </style>