paintOrderDetail.vue 29 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312
  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.data.sheetState == 1">待付款</view>
  20. <view class="SheetState" v-if="orderData.data.sheetState == 2">待服务</view>
  21. <view class="SheetState" v-if="orderData.data.sheetState == 3">已完成</view>
  22. <view class="SheetState" v-if="orderData.data.sheetState == 4">已取消</view>
  23. </view>
  24. </view>
  25. <!-- 店铺信息 -->
  26. <view class="shopBox">
  27. <image src="../../static/img/icon_store.png" mode="" class="shopBoximg"></image>
  28. <view class="shopCont">
  29. <view class="shopName">{{orderData.shopInfo.shopName}}</view>
  30. <view class="Address">
  31. {{orderData.shopInfo.provinceName}}{{orderData.shopInfo.cityName}}{{orderData.shopInfo.areaName}}{{orderData.shopInfo.address}}
  32. </view>
  33. </view>
  34. <!-- <view class="shopRightBox" @click="map"> -->
  35. <view class="shopRightBox">
  36. <image src="../../static/img/icon_ditu.png" mode="" class="shopRightImg"></image>
  37. <view class="shopRihgtTxt">地图</view>
  38. </view>
  39. <view class="shopsx"></view>
  40. <view class="shopRightBox" @click="call">
  41. <image src="../../static/img/icon_phone.png" mode="" class="shopRightImg"></image>
  42. <view class="shopRihgtTxt">电话</view>
  43. </view>
  44. </view>
  45. <!-- 订单内容 -->
  46. <view class="information">
  47. <view class="detailedTitle">订单内容</view>
  48. <view v-if="orderData.openSheetDetail.length>0" v-for="(item,index) in orderData.openSheetDetail" :key="index">
  49. <view class="informationLine2">
  50. <view class="goodsName">{{item.itemName}}</view>
  51. <view class="salePrice"><span class="informationNum">¥</span>{{item.salePrice}}</view>
  52. </view>
  53. </view>
  54. <view v-if="orderData.data.sheetState != 1 && orderData.data.sheetState != 4" class="line"></view>
  55. <view v-if="orderData.data.sheetState != 1 && orderData.data.sheetState != 4">
  56. <view class="goodsName2">
  57. 券码信息({{quanMaList.length?quanMaList.length:0}}张可用)
  58. </view>
  59. <view class="detailedLineBox" v-for="(v,index) in orderData.OpenSheetQRCode">
  60. <view class="detailedLine">
  61. <view v-if="v.writeoffState==1" class="detailedName">
  62. <view class="redPoint"></view>
  63. <view class="code">{{v.qrCode}}</view>
  64. <view class="quanState">待使用</view>
  65. </view>
  66. <view v-if="v.writeoffState==3" class="detailedName">
  67. <view class="redPoint"></view>
  68. <view class="code old" >{{v.qrCode}}</view>
  69. <view class="quanState2">已使用</view>
  70. </view>
  71. <image src="../../static/img/icon_erweima.png" mode="" style="width: 36rpx;height: 36rpx;"
  72. v-if="v.writeoffState==1" @click="isShowMaSHow"></image>
  73. </view>
  74. <view class="writeoffLineBox" v-if="v.writeoffState==3">
  75. <view class="writeoffLine">
  76. <view class="writeoffLineTxt">核销时间:{{v.writeoffTime}}</view>
  77. <view class="writeoffLineTxt">核销人:{{v.writeoffName}}</view>
  78. </view>
  79. <view class="writeoffLine">
  80. <view class="writeoffLineTxt">核销门店:{{v.writeoffShopName?v.writeoffShopName:''}}</view>
  81. </view>
  82. </view>
  83. </view>
  84. </view>
  85. </view>
  86. <!-- 实付款 -->
  87. <view class="money">
  88. <view class="informationNum">实付款:</view>
  89. <view class="informationNum" style="color: #FF0000;font-weight: bold;">¥{{orderData.data.realMoney}}</view>
  90. </view>
  91. <!-- 订单信息 -->
  92. <view class="information">
  93. <view class="detailedTitle">订单信息</view>
  94. <view class="informationLine">
  95. <view class="informationTxt">车牌号:</view>
  96. <view class="informationNum">{{orderData.data.plateNumber}}</view>
  97. </view>
  98. <view class="informationLine">
  99. <view class="informationTxt">车型:</view>
  100. <view class="informationNum" style="width: 480rpx;">{{orderData.data.carModel}}</view>
  101. </view>
  102. <view class="informationLine">
  103. <view class="informationTxt">联系人:</view>
  104. <view class="informationNum">{{orderData.data.customerName}}</view>
  105. </view>
  106. <view class="informationLine">
  107. <view class="informationTxt">手机号:</view>
  108. <view class="informationNum">{{orderData.data.mobilePhone}}</view>
  109. </view>
  110. <view class="informationLine">
  111. <view class="informationTxt">预约时间:</view>
  112. <view class="informationNum">{{orderData.data.hTime}}</view>
  113. </view>
  114. <view class="informationLine">
  115. <view class="informationTxt">订单单号:</view>
  116. <view class="informationNum">{{orderData.data.code}}<span class="codeCopy"
  117. @click="copy(orderData.data.code)">复制</span></view>
  118. </view>
  119. <view class="informationLine">
  120. <view class="informationTxt">下单人:</view>
  121. <view class="informationNum">{{orderData.data.userMobilePhone}}</view>
  122. </view>
  123. <view class="informationLine">
  124. <view class="informationTxt">下单时间:</view>
  125. <view class="informationNum">{{orderData.data.createTime}}</view>
  126. </view>
  127. <view class="informationLine">
  128. <view class="informationTxt">订单类型:</view>
  129. <view class="informationNum" style="width: 480rpx;">钣喷</view>
  130. </view>
  131. </view>
  132. <!-- 支付信息 -->
  133. <view class="information">
  134. <view class="detailedTitle">支付信息</view>
  135. <view class="informationLine">
  136. <view class="informationTxt">支付状态:</view>
  137. <view class="informationNum" v-if="orderData.data.payState==1">未支付</view>
  138. <view class="informationNum" v-if="orderData.data.payState==2">已支付</view>
  139. </view>
  140. <view class="informationLine">
  141. <view class="informationTxt">支付方式:</view>
  142. <view class="informationNum" v-if="orderData.data.payType==1">在线支付</view>
  143. <view class="informationNum" v-if="orderData.data.payType==2">线下支付</view>
  144. </view>
  145. <view class="informationLine">
  146. <view class="informationTxt">支付时间:</view>
  147. <view class="informationNum">{{orderData.data.payTime?orderData.data.payTime:'-'}}</view>
  148. </view>
  149. </view>
  150. <!-- 核销信息 -->
  151. <view class="information writeoffXx" v-if="orderData.data.sheetState == 3">
  152. <view class="detailedTitle">核销信息</view>
  153. <view class="informationLine">
  154. <view class="informationTxt">核销状态:</view>
  155. <view class="informationNum" v-if="orderData.data.writeoffState==1">未核销</view>
  156. <view class="informationNum" v-if="orderData.data.writeoffState==2">部分核销</view>
  157. <view class="informationNum" v-if="orderData.data.writeoffState==3">已核销</view>
  158. </view>
  159. <view class="informationLine">
  160. <view class="informationTxt">核销时间:</view>
  161. <view class="informationNum">{{orderData.data.writeoffTime?orderData.data.writeoffTime:'-'}} {{orderData.data.writeoffName}}</view>
  162. </view>
  163. <view class="informationLine">
  164. <view class="informationTxt">核销门店:</view>
  165. <view class="informationNum">{{orderData.data.writeoffShopName?orderData.data.writeoffShopName:'-'}}</view>
  166. </view>
  167. </view>
  168. <view style="height: 50rpx;background-color: #F4F5F7;"></view>
  169. <!-- 待付款 -->
  170. <view class="bottom" v-if="orderData.data.sheetState == 1">
  171. <view v-if="iOSInfo.indexOf('Q030')!=-1||!iOSInfo" class="cancel" @click="cancelBespeak">取消订单</view>
  172. </view>
  173. <!-- 待服务 -->
  174. <view class="bottom" v-if="orderData.data.sheetState == 2">
  175. <view v-if="(iOSInfo.indexOf('Q030')!=-1||!iOSInfo) && orderData.data.payType==2" class="cancel" @click="cancelBespeak">取消订单</view>
  176. <view v-if="(iOSInfo.indexOf('Q031')!=-1||!iOSInfo) && orderData.data.payType==1" class="defer" @click="isShowTui=true">退款</view>
  177. <view v-if="(iOSInfo.indexOf('Q035')!=-1||!iOSInfo) && (orderData.data.payType==2) && (orderData.data.payState==1)" class="defer" @click="payDone">支付完成</view>
  178. <!-- 在线支付 -->
  179. <view v-if="(iOSInfo.indexOf('Q032')!=-1||!iOSInfo) && (orderData.data.payType==1)" class="defer" @click="goHeXiao">核销</view>
  180. <!-- 线下支付 -->
  181. <view v-if="(iOSInfo.indexOf('Q032')!=-1||!iOSInfo) && (orderData.data.payType==2) && (orderData.data.payState==2)" class="defer" @click="goHeXiao">核销</view>
  182. <!-- <view v-if="iOSInfo.indexOf('Q033')!=-1||!iOSInfo" class="defer" @click="">开单</view> -->
  183. <!-- <view v-if="iOSInfo.indexOf('Q034')!=-1||!iOSInfo" class="defer" @click="">开卡</view> -->
  184. </view>
  185. <!-- 券码 -->
  186. <view class="maBox" v-if="isShowMa==true" @click="isShowMa=false">
  187. <view class="querenMa">
  188. <view class="maTop">
  189. <view class="maTitle">请到店出示券码即可开始服务</view>
  190. <image @click="isShowMa=false" src="../../static/img/icon_delete.png" mode=""
  191. style="width: 26rpx;height: 26rpx;margin-left: 10rpx;"></image>
  192. </view>
  193. <swiper class="swiper" circular :autoplay="false" :indicator-dots="true" indicator-color="#CCCCCC" indicator-active-color="#D53533">
  194. <swiper-item v-for="(item,index) in quanMaList">
  195. <view class="swiper-item">
  196. <view class="maCode">{{item}}</view>
  197. <view class="maBoximg">
  198. <tki-qrcode cid="qrcode1" ref="qrcode" :val="item" :size="400" :unit="unit"
  199. :pdground="pdground" :icon="icon" :iconSize="iconsize" :lv="lv" :onval="onval"
  200. :loadMake="loadMake" :usingComponents="true" @result="qrR" />
  201. </view>
  202. </view>
  203. </swiper-item>
  204. </swiper>
  205. </view>
  206. </view>
  207. <!-- 退款原因 -->
  208. <view class="tuikuanBox" v-if="isShowTui==true">
  209. <view class="tuikuan">
  210. <view class="tuiTop">
  211. <view class="tuiTitle">退款</view>
  212. <image @click="isShowTui=false" src="../../static/img/icon_close.png" mode="" style="width: 26rpx; height: 26rpx;"></image>
  213. </view>
  214. <view class="contLine">
  215. <view class="contlineLeft">
  216. <image src="../../static/img/icon_star.png" mode="" class="star"></image>
  217. 退款原因
  218. </view>
  219. <view class="contlineRight carModelRight" @click="">
  220. <picker class="carModel" @change="bindChange" mode="selector" :value="index" :range="tuicauseList" range-key="contents">
  221. <view class="uni-input">{{tuicauseList[index].contents}}</view>
  222. </picker>
  223. <image src="../../static/img/little_rightArrow.png" mode="" class="contlineRightJt"></image>
  224. </view>
  225. </view>
  226. <view class="contLine">
  227. <view class="contlineLeft">
  228. <image src="../../static/img/icon_star.png" mode="" class="star"></image>
  229. 退款金额
  230. </view>
  231. <view class="contlineRight carModelRight" @click="cktime">
  232. <span class="carModel">{{orderData.data.realMoney}}</span>
  233. </view>
  234. </view>
  235. <view class="contLine">
  236. <view class="contlineLeft">
  237. <image src="" mode="" class="star"></image>
  238. 补充描述
  239. </view>
  240. <view class="contlineRight">
  241. <textarea placeholder-style="color:#999999" placeholder="请输入" v-model="tuikuanContent"
  242. class="contlineRightInput" maxlength="-1" auto-height="true" @confirm="feedDone" />
  243. </view>
  244. </view>
  245. <view class="tuiBtns">
  246. <view class="btn" @click="isShowTui=false">取消</view>
  247. <view class="btn2" @click="goTui">确认退款</view>
  248. </view>
  249. </view>
  250. </view>
  251. </view>
  252. </template>
  253. <script>
  254. import tkiQrcode from "@/components/tki-qrcode/tki-qrcode.vue"
  255. export default {
  256. components: {
  257. tkiQrcode
  258. },
  259. data() {
  260. return {
  261. id: '',
  262. iStatusBarHeight:'',
  263. orderData: '',
  264. onval: true, // val值变化时自动重新生成二维码
  265. loadMake: true, // 组件加载完成后自动生成二维码
  266. size: 500,
  267. qrcodeShow: false,
  268. qrcodeTop: '-100vh',
  269. qrcodeTopVal: '',
  270. ifShow: false,
  271. val: '二维码', // 要生成的二维码值
  272. unit: 'upx', // 单位
  273. background: '#b4e9e2', // 背景色
  274. foreground: '#309286', // 前景色
  275. pdground: '#262637', // 角标色
  276. icon: '', // 二维码图标
  277. iconsize: 40, // 二维码图标大小
  278. lv: 3, // 二维码容错级别 , 一般不用设置,默认就行
  279. src: '', // 二维码生成后的图片地址或base64
  280. isShowMa: false,
  281. quanMaList:[],
  282. isShowTui: false,
  283. tuicauseList:[],
  284. tuikuanContent:'',
  285. index: 0,
  286. iOSInfo:'',
  287. }
  288. },
  289. onLoad(opt) {
  290. this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
  291. this.id = opt.id
  292. if (this.id) {
  293. this.getData()
  294. }
  295. this.getTuiKuanData()
  296. var qxnum = uni.getStorageSync("quanxian");
  297. if (qxnum == 1) {
  298. this.iOSInfo = JSON.parse(JSON.stringify(window.iOSInfo));
  299. }else if(qxnum==2){
  300. window.getAndroid=this.getAndroid;
  301. }
  302. },
  303. methods: {
  304. getAndroid(e){
  305. this.iOSInfo=e
  306. },
  307. payDone(){
  308. var that = this
  309. uni.showModal({
  310. title: '提示',
  311. content: '确认已支付完成吗',
  312. success: function (res) {
  313. if (res.confirm) {
  314. uni.showLoading({
  315. title: '加载中'
  316. })
  317. that.$http('openH5Indent/complete', {
  318. id: that.id,
  319. }, 'POST').then(res => {
  320. uni.hideLoading();
  321. // var list = res.data.Items
  322. setTimeout(function() {
  323. that.getData();
  324. }, 1000);
  325. })
  326. } else if (res.cancel) {
  327. }
  328. }
  329. });
  330. },
  331. goTui(){
  332. let yuanyin = this.tuicauseList[this.index].contents
  333. if (!yuanyin) {
  334. uni.showToast({
  335. title: '请选择退款原因',
  336. icon: 'none',
  337. duration: 3000
  338. });
  339. return false;
  340. }
  341. uni.showLoading({
  342. title: '加载中'
  343. })
  344. var that = this
  345. this.$http('openH5Indent/reimburse', {
  346. id: this.id,
  347. refundReason: yuanyin,
  348. refundComment: this.tuikuanContent,
  349. realMoney:this.orderData.data.realMoney
  350. }, 'GET').then(res => {
  351. uni.hideLoading();
  352. // var list = res.data.Items
  353. // var list = res.data
  354. console.log("result+=", res);
  355. if (res.code == 1) {
  356. that.isShowTui = false
  357. uni.showToast({
  358. title: '退款成功',
  359. icon: 'none',
  360. duration: 2000
  361. });
  362. setTimeout(function() {
  363. that.getData();
  364. }, 1000);
  365. }
  366. })
  367. },
  368. bindChange(e) {
  369. console.log(e);
  370. this.index = e.detail.value
  371. },
  372. feedDone(e) {
  373. this.tuikuanContent = e.target.value
  374. },
  375. // 核销
  376. goHeXiao(){
  377. //app交互
  378. var standalone = window.navigator.standalone
  379. var userAgent = window.navigator.userAgent.toLowerCase()
  380. var safari = /safari/.test(userAgent)
  381. var ios = /iphone|ipod|ipad|mac/.test(userAgent)
  382. var android = /android/.test(userAgent)
  383. if (ios) {
  384. if ( true) {//!standalone&& !safari
  385. window.webkit.messageHandlers.goHeXiao.postMessage({"id":this.id?this.id:''})
  386. }
  387. } else if (android) {
  388. window.android.writeoff(this.id)
  389. }
  390. },
  391. getTuiKuanData() {
  392. uni.showLoading({
  393. title: '加载中'
  394. });
  395. this.$http('openH5Indent/getOpenReason', {
  396. // id: this.id,
  397. }, 'GET').then(res => {
  398. uni.hideLoading();
  399. this.tuicauseList = res.data;
  400. })
  401. },
  402. pay(){
  403. this.$http('openMallOrder/unifiedPay', {
  404. sheetId:this.id
  405. },'POST').then(res => {
  406. if(res.code==0){
  407. this.requestPayment(res.data)
  408. }else{
  409. uni.showToast({
  410. title: res.msg,
  411. icon: 'none',
  412. duration: 3000
  413. });
  414. }
  415. })
  416. },
  417. requestPayment(res){
  418. var payInfo=res;
  419. //console.log(payInfo)
  420. //console.log(String(Date.now()))
  421. var that=this;
  422. uni.requestPayment({
  423. provider: 'wxpay',
  424. //timeStamp: String(Date.now()),
  425. timeStamp: payInfo.timeStamp,
  426. nonceStr: payInfo.nonceStr,
  427. package:payInfo.package,
  428. signType: payInfo.signType,
  429. paySign: payInfo.paySign,
  430. appid:payInfo.appId,
  431. success: function (res) {
  432. console.log('success:' + JSON.stringify(res));
  433. uni.showToast({
  434. title: '支付成功',
  435. icon:'none',
  436. duration: 2000
  437. });
  438. that.getData()
  439. },
  440. fail: function (err) {
  441. console.log(err)
  442. uni.showToast({
  443. title: '支付失败',
  444. icon:'none',
  445. duration: 2000
  446. });
  447. }
  448. });
  449. },
  450. copy(txt) {
  451. uni.setClipboardData({
  452. data: txt,
  453. success: function() {
  454. uni.showToast({
  455. title: '复制成功',
  456. icon: 'none',
  457. duration: 2000
  458. });
  459. }
  460. });
  461. },
  462. upTime() {
  463. uni.showLoading({
  464. title: '加载中'
  465. })
  466. var that = this
  467. this.$http('openH5Indent/carOwner/updateTimeOfAppointment', {
  468. id: this.id,
  469. shopId: this.orderData.shopInfo.id,
  470. billDate: this.billDate
  471. }, 'POST').then(res => {
  472. uni.hideLoading();
  473. // var list = res.data.Items
  474. var list = res.data
  475. console.log("result+=", res.data);
  476. uni.showToast({
  477. title: '延期成功',
  478. icon: 'none',
  479. duration: 2000
  480. });
  481. setTimeout(function() {
  482. that.getData();
  483. }, 1000);
  484. })
  485. },
  486. cancelBespeak(){
  487. var that = this
  488. uni.showModal({
  489. title: '提示',
  490. content: '是否取消该订单',
  491. cancelText:'否',
  492. confirmText:'是',
  493. success: function (res) {
  494. if (res.confirm) {
  495. uni.showLoading({
  496. title: '加载中'
  497. })
  498. that.$http('openH5Indent/updateSheetState', {
  499. id: that.id,
  500. }, 'POST').then(res => {
  501. uni.hideLoading();
  502. // var list = res.data.Items
  503. uni.showToast({
  504. title: '取消成功',
  505. icon: 'none',
  506. duration: 2000
  507. });
  508. setTimeout(function() {
  509. that.getData();
  510. }, 1000);
  511. })
  512. } else if (res.cancel) {
  513. }
  514. }
  515. });
  516. },
  517. map() {
  518. console.log("打开地图")
  519. var that = this;
  520. if (!that.orderData.shopInfo.lat || !that.orderData.shopInfo.lng) {
  521. uni.showToast({
  522. title: '该店铺未设置定位',
  523. icon: 'none',
  524. duration: 3000
  525. });
  526. } else {
  527. uni.openLocation({
  528. latitude: Number(that.orderData.shopInfo.lat),
  529. longitude: Number(that.orderData.shopInfo.lng),
  530. name: that.orderData.shopInfo.shopName,
  531. address: that.orderData.shopInfo.provinceName + that.orderData.shopInfo.cityName + that
  532. .orderData.shopInfo.areaName + that.orderData.shopInfo.address,
  533. success: function() {
  534. console.log('success');
  535. },
  536. fail(err) {
  537. console.log(err)
  538. }
  539. });
  540. }
  541. },
  542. call() {
  543. uni.makePhoneCall({
  544. phoneNumber: this.orderData.shopInfo.mobilePhone
  545. });
  546. },
  547. getData() {
  548. uni.showLoading({
  549. title: '加载中'
  550. });
  551. this.$http('openH5Indent/queryOpenSheet', {
  552. id: this.id,
  553. }, 'GET').then(res => {
  554. uni.hideLoading();
  555. this.orderData = res.data;
  556. if (this.quanMaList) {
  557. this.quanMaList = [];
  558. }
  559. let maList = this.orderData.OpenSheetQRCode;
  560. if (maList) {
  561. maList.forEach(item =>{
  562. if (item.writeoffState==1) {
  563. this.quanMaList.push(item.qrCode);
  564. }
  565. })
  566. }
  567. console.log('可用券码--',this.quanMaList);
  568. })
  569. },
  570. goback() {
  571. uni.navigateBack({
  572. delta: 1
  573. })
  574. },
  575. gohome(){
  576. uni.switchTab({
  577. url:'../../index/index'
  578. })
  579. },
  580. },
  581. onPullDownRefresh() {
  582. this.getData()
  583. setTimeout(function() {
  584. uni.stopPullDownRefresh();
  585. }, 1000);
  586. },
  587. }
  588. </script>
  589. <style scoped>
  590. .box {
  591. min-height: 100vh;
  592. background: #F4F5F7;
  593. padding-bottom: 135rpx;
  594. }
  595. .zdyNavBox{
  596. width: 100vw;
  597. background: #FFFFFF;
  598. position: fixed;
  599. top: 0;
  600. left: 0;
  601. z-index: 9999999;
  602. }
  603. .zdyNav{
  604. height: 44px;
  605. display: flex;
  606. justify-content: space-between;
  607. align-items: center;
  608. }
  609. .backImg{
  610. width: 44rpx;
  611. height: 44rpx;
  612. margin-left: 10rpx;
  613. margin-right: 20rpx;
  614. }
  615. .homeImg{
  616. width: 44rpx;
  617. height: 44rpx;
  618. }
  619. .zdyNavLeft{
  620. display: flex;
  621. align-items: center;
  622. }
  623. .zdyNavTitle{
  624. height: 44px;
  625. background: #FFFFFF;
  626. text-align: center;
  627. font-size: 34rpx;
  628. line-height: 44px;
  629. }
  630. .top {
  631. height: 190rpx;
  632. background-color: #FF0000;
  633. }
  634. .orderState {
  635. display: flex;
  636. justify-content: center;
  637. align-items: center;
  638. padding-top: 40rpx;
  639. }
  640. .SheetState {
  641. display: flex;
  642. justify-content: center;
  643. font-size: 36rpx;
  644. font-weight: 500;
  645. color: #FFFFFF;
  646. margin-left: 15rpx;
  647. }
  648. .timeEditImg {
  649. width: 25rpx;
  650. height: 25rpx;
  651. padding-left: 20rpx;
  652. }
  653. .shopBoximg {
  654. width: 40rpx;
  655. height: 40rpx;
  656. }
  657. .shopRightImg {
  658. width: 44rpx;
  659. height: 45rpx;
  660. }
  661. .shopsx {
  662. width: 1px;
  663. height: 50rpx;
  664. background: #EEEEEE;
  665. margin-top: 30rpx;
  666. margin-left: 28rpx;
  667. }
  668. .shopBox {
  669. display: flex;
  670. padding: 30rpx 20rpx;
  671. margin: 0rpx 24rpx;
  672. margin-top: -60rpx;
  673. background-color: #FFFFFF;
  674. border-radius: 10rpx;
  675. }
  676. .shopCont {
  677. width: 405rpx;
  678. padding-left: 20rpx;
  679. }
  680. .shopName {
  681. font-size: 30rpx;
  682. font-weight: bold;
  683. color: #3C3C3C;
  684. line-height: 42rpx;
  685. }
  686. .Address {
  687. color: #999999;
  688. font-size: 24rpx;
  689. margin-top: 10rpx;
  690. }
  691. .shopRihgtTxt {
  692. color: #999999;
  693. font-size: 24rpx;
  694. }
  695. .shopRightBox {
  696. padding-left: 28rpx;
  697. }
  698. .detailedTitle {
  699. padding: 23rpx 20rpx;
  700. display: flex;
  701. text-align: center;
  702. align-content: flex-start;
  703. border-bottom: 1rpx solid #EEEEEE;
  704. font-size: 30rpx;
  705. font-weight: bold;
  706. color: #3C3C3C;
  707. }
  708. .detailedLine {
  709. display: flex;
  710. padding: 16rpx 20rpx;
  711. justify-content: space-between;
  712. align-items: center;
  713. }
  714. .detailedImg {
  715. width: 120rpx;
  716. height: 120rpx;
  717. border-radius: 10rpx;
  718. }
  719. .detailedName {
  720. display: flex;
  721. align-items: center;
  722. }
  723. .code {
  724. font-size: 26rpx;
  725. color: #333333;
  726. font-weight: bold;
  727. width: 180rpx
  728. }
  729. .old {
  730. color: #999999;
  731. font-weight: 400;
  732. text-decoration: line-through;
  733. }
  734. .redPoint {
  735. width: 10rpx;
  736. height: 10rpx;
  737. background: #FF0000;
  738. border-radius: 10rpx;
  739. margin-right: 10rpx;
  740. }
  741. .quanState {
  742. font-size: 22rpx;
  743. color: #F19D01;
  744. padding: 0 10rpx;
  745. border: 1rpx solid #F19D01;
  746. border-radius: 4rpx;
  747. margin-left: 20rpx;
  748. }
  749. .quanState2{
  750. font-size: 22rpx;
  751. color: #999999;
  752. padding: 0 10rpx;
  753. border: 1rpx solid #DDDDDD;
  754. border-radius: 4rpx;
  755. margin-left: 20rpx;
  756. }
  757. .information {
  758. background: #FFFFFF;
  759. border-radius: 10rpx;
  760. margin: 20rpx 24rpx;
  761. padding-bottom: 15rpx;
  762. }
  763. .informationLine {
  764. display: flex;
  765. padding: 15rpx 20rpx;
  766. }
  767. .informationLine2 {
  768. display: flex;
  769. justify-content: space-between;
  770. font-size: 26rpx;
  771. padding: 20rpx;
  772. align-items: center;
  773. padding-bottom: 0;
  774. }
  775. .salePrice {
  776. font-size: 26rpx;
  777. font-weight: 500;
  778. color: #333333;
  779. line-height: 45rpx;
  780. }
  781. .money {
  782. background: #FFFFFF;
  783. border-radius: 10rpx;
  784. margin: 20rpx 24rpx;
  785. display: flex;
  786. justify-content: space-between;
  787. font-size: 26rpx;
  788. padding: 30rpx 20rpx;
  789. }
  790. .informationTxt {
  791. width: 190rpx;
  792. font-size: 26rpx;
  793. color: #999999;
  794. }
  795. .line {
  796. height: 20rpx;
  797. background-color: #FFFFFF;
  798. border-bottom: 1rpx solid #EEEEEE;
  799. }
  800. .goodsName {
  801. width: 80%;
  802. color: #333333;
  803. font-size: 26rpx;
  804. }
  805. .goodsName2{
  806. padding: 20rpx 20rpx 15rpx;
  807. color: #333333;
  808. font-size: 26rpx;
  809. }
  810. .informationNum {
  811. color: #333333;
  812. font-size: 26rpx;
  813. }
  814. .codeCopy {
  815. width: 77rpx;
  816. height: 36rpx;
  817. background: #F4F5F7;
  818. border-radius: 22rpx;
  819. font-size: 24rpx;
  820. color: #333333;
  821. text-align: center;
  822. line-height: 33rpx;
  823. padding: 0 15rpx;
  824. margin-left: 20rpx;
  825. }
  826. .bottom {
  827. display: flex;
  828. justify-content: flex-end;
  829. padding: 20rpx;
  830. background-color: #FFFFFF;
  831. align-items: center;
  832. height: 98rpx;
  833. width: 100vw;
  834. position: fixed;
  835. bottom: 0rpx;
  836. padding-bottom: constant(safe-area-inset-bottom);
  837. padding-bottom: env(safe-area-inset-bottom);
  838. }
  839. .cancel {
  840. color: #3C3C3C;
  841. font-size: 28rpx;
  842. width: 150rpx;
  843. height: 56rpx;
  844. border-radius: 36rpx;
  845. border: 1rpx solid #DDDDDD;
  846. text-align: center;
  847. line-height: 56rpx;
  848. margin-right: 40rpx;
  849. }
  850. .defer {
  851. color: #D53533;
  852. font-size: 28rpx;
  853. width: 150rpx;
  854. height: 56rpx;
  855. border-radius: 36rpx;
  856. border: 1rpx solid #D53533;
  857. text-align: center;
  858. line-height: 56rpx;
  859. margin-right: 40rpx;
  860. }
  861. .itemBox {
  862. margin: 20rpx;
  863. border-radius: 10rpx;
  864. border: 2rpx solid #EEEEEE;
  865. }
  866. .itemTop {
  867. padding: 18rpx 20rpx;
  868. padding-right: 0;
  869. background-color: #FFEFD5;
  870. display: flex;
  871. justify-content: space-between;
  872. align-content: center;
  873. }
  874. .topTitle {
  875. width: 104rpx;
  876. font-size: 26rpx;
  877. color: #333333;
  878. margin-right: 20rpx;
  879. text-align: right;
  880. }
  881. .leftItem {
  882. font-size: 26rpx;
  883. color: #333333;
  884. margin-right: 20rpx;
  885. flex-grow: 1;
  886. /* 隐藏文字显示 ...不换行 */
  887. overflow: hidden;
  888. text-overflow: ellipsis;
  889. white-space: nowrap;
  890. }
  891. .itemContent {
  892. padding: 20rpx;
  893. padding-right: 0;
  894. background-color: #FFFFFF;
  895. display: flex;
  896. justify-content: space-between;
  897. align-content: center;
  898. }
  899. .maBox {
  900. width: 100%;
  901. height: 100vh;
  902. background: rgba(0, 0, 0, 0.4);
  903. position: fixed;
  904. left: 0;
  905. top: 0;
  906. z-index: 9999;
  907. }
  908. .querenMa {
  909. width: 578;
  910. height: 640rpx;
  911. background: #ffffff;
  912. margin: 0 86rpx;
  913. margin-top: 50%;
  914. border-radius: 24rpx;
  915. }
  916. .maTop {
  917. display: flex;
  918. justify-content: space-between;
  919. align-items: center;
  920. padding: 30rpx 20rpx 15rpx;
  921. }
  922. .maTitle {
  923. color: #666666;
  924. font-size: 26rpx;
  925. text-align: center;
  926. padding-left: 100rpx;
  927. }
  928. .swiper{
  929. width: 100%;
  930. height: 85%;
  931. background: #FFFFFF;
  932. }
  933. .swiper-item{
  934. width: 100%;
  935. height: 100%;
  936. }
  937. .maCode {
  938. font-size: 30rpx;
  939. font-weight: 500;
  940. color: #333333;
  941. line-height: 42rpx;
  942. margin-bottom: 40rpx;
  943. text-align: center;
  944. }
  945. .maBoximg {
  946. width: 400rpx;
  947. height: 400rpx;
  948. margin-left: 86rpx;
  949. }
  950. .tuikuanBox {
  951. width: 100%;
  952. height: 100vh;
  953. background: rgba(0, 0, 0, 0.4);
  954. position: fixed;
  955. left: 0;
  956. top: 0;
  957. z-index: 999;
  958. }
  959. .tuikuan {
  960. width: 638rpx;
  961. height: 664rpx;
  962. background: #ffffff;
  963. margin: 0 36rpx;
  964. margin-top: 50%;
  965. border-radius: 24rpx;
  966. padding: 30rpx 20rpx;
  967. }
  968. .tuiTop {
  969. display: flex;
  970. justify-content: space-between;
  971. margin-bottom: 36rpx;
  972. }
  973. .tuiTitle {
  974. width: 56rpx;
  975. height: 40rpx;
  976. font-size: 28rpx;
  977. font-weight: 500;
  978. color: #3C3C3C;
  979. line-height: 40rpx;
  980. }
  981. .contLine {
  982. display: flex;
  983. justify-content: space-between;
  984. font-size: 28rpx;
  985. padding: 30rpx 0;
  986. border-bottom: 1px solid #EEEEEE;
  987. }
  988. .contlineLeft {
  989. color: #666666;
  990. line-height: 40rpx;
  991. align-items: center;
  992. }
  993. .star {
  994. width: 14rpx;
  995. height: 14rpx;
  996. padding-bottom: 5rpx;
  997. }
  998. .carModel {
  999. width: 350rpx;
  1000. text-align: left;
  1001. }
  1002. .noColor {
  1003. color: #CCCCCC;
  1004. }
  1005. .carModelRight {
  1006. display: flex;
  1007. justify-content: flex-start;
  1008. align-items: center;
  1009. }
  1010. .contlineRight {
  1011. color: #333333;
  1012. line-height: 40rpx;
  1013. width: 400rpx;
  1014. text-align: right;
  1015. }
  1016. .contlineRightInput {
  1017. color: #333333;
  1018. text-align: left;
  1019. font-size: 28rpx;
  1020. min-height: 182rpx;
  1021. width: 400rpx;
  1022. }
  1023. .contlineRightJt {
  1024. width: 30rpx;
  1025. height: 30rpx;
  1026. }
  1027. .tuiBtns {
  1028. display: flex;
  1029. padding: 40rpx 20rpx 10rpx;
  1030. }
  1031. .btn {
  1032. width: 288rpx;
  1033. height: 98rpx;
  1034. background: #F4F5F7;
  1035. border-radius: 10rpx;
  1036. margin-right: 22rpx;
  1037. font-size: 30rpx;
  1038. font-weight: 500;
  1039. color: #3C3C3C;
  1040. line-height: 98rpx;
  1041. text-align: center;
  1042. }
  1043. .btn2 {
  1044. width: 288rpx;
  1045. height: 98rpx;
  1046. background: #3F90F7;
  1047. border-radius: 10rpx;
  1048. font-size: 30rpx;
  1049. font-weight: 500;
  1050. color: #FFFFFF;
  1051. line-height: 98rpx;
  1052. text-align: center;
  1053. }
  1054. .writeoffLine{
  1055. display: flex;justify-content: space-between;
  1056. color: #999999;font-size: 24rpx;
  1057. line-height: 33rpx;padding-top: 8rpx;
  1058. }
  1059. .writeoffLineBox{
  1060. padding: 0 20rpx;
  1061. }
  1062. .detailedLineBox .detailedLine{
  1063. padding-bottom: 0rpx;
  1064. }
  1065. .writeoffXx .informationNum{
  1066. width: 500rpx;
  1067. }
  1068. .detailedLineBox{
  1069. padding-bottom: 10rpx;
  1070. }
  1071. </style>