paintOrderDetail.vue 30 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342
  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(index)"></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 :current='swiperIndex' :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. swiperIndex:0,
  288. back:'',
  289. }
  290. },
  291. onLoad(opt) {
  292. this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
  293. this.id = opt.id
  294. this.back=opt.back;
  295. if (this.id) {
  296. this.getData()
  297. }
  298. this.getTuiKuanData()
  299. /* var qxnum = uni.getStorageSync("quanxian");
  300. if (qxnum == 1) {
  301. this.iOSInfo = JSON.parse(JSON.stringify(window.iOSInfo));
  302. }else if(qxnum==2){
  303. window.getAndroid=this.getAndroid;
  304. } */
  305. this.getpermission()
  306. },
  307. methods: {
  308. getpermission(){
  309. this.$http('openH5ShopHelpSheetOrder/permission', {
  310. },'POST').then(res => {
  311. this.iOSInfo=res.data;
  312. })
  313. },
  314. isShowMaSHow(index){
  315. this.swiperIndex=index
  316. this.isShowMa=true
  317. },
  318. getAndroid(e){
  319. this.iOSInfo=e
  320. },
  321. payDone(){
  322. var that = this
  323. uni.showModal({
  324. title: '提示',
  325. content: '确认已支付完成吗',
  326. success: function (res) {
  327. if (res.confirm) {
  328. uni.showLoading({
  329. title: '加载中'
  330. })
  331. that.$http('openH5Indent/complete', {
  332. id: that.id,
  333. }, 'POST').then(res => {
  334. uni.hideLoading();
  335. // var list = res.data.Items
  336. setTimeout(function() {
  337. that.getData();
  338. }, 1000);
  339. })
  340. } else if (res.cancel) {
  341. }
  342. }
  343. });
  344. },
  345. goTui(){
  346. let yuanyin = this.tuicauseList[this.index].contents
  347. if (!yuanyin) {
  348. uni.showToast({
  349. title: '请选择退款原因',
  350. icon: 'none',
  351. duration: 3000
  352. });
  353. return false;
  354. }
  355. uni.showLoading({
  356. title: '加载中'
  357. })
  358. var that = this
  359. this.$http('openH5Indent/reimburse', {
  360. id: this.id,
  361. refundReason: yuanyin,
  362. refundComment: this.tuikuanContent,
  363. realMoney:this.orderData.data.realMoney
  364. }, 'GET').then(res => {
  365. uni.hideLoading();
  366. // var list = res.data.Items
  367. // var list = res.data
  368. console.log("result+=", res);
  369. if (res.code == 1) {
  370. that.isShowTui = false
  371. uni.showToast({
  372. title: '退款成功',
  373. icon: 'none',
  374. duration: 2000
  375. });
  376. setTimeout(function() {
  377. that.getData();
  378. }, 1000);
  379. }
  380. })
  381. },
  382. bindChange(e) {
  383. console.log(e);
  384. this.index = e.detail.value
  385. },
  386. feedDone(e) {
  387. this.tuikuanContent = e.target.value
  388. },
  389. // 核销
  390. goHeXiao(){
  391. //app交互
  392. var standalone = window.navigator.standalone
  393. var userAgent = window.navigator.userAgent.toLowerCase()
  394. var safari = /safari/.test(userAgent)
  395. var ios = /iphone|ipod|ipad|mac/.test(userAgent)
  396. var android = /android/.test(userAgent)
  397. if (ios) {
  398. if ( true) {//!standalone&& !safari
  399. window.webkit.messageHandlers.goHeXiao.postMessage({"id":this.id?this.id:''})
  400. }
  401. } else if (android) {
  402. window.android.writeoff(this.id)
  403. }
  404. },
  405. getTuiKuanData() {
  406. uni.showLoading({
  407. title: '加载中'
  408. });
  409. this.$http('openH5Indent/getOpenReason', {
  410. // id: this.id,
  411. }, 'GET').then(res => {
  412. uni.hideLoading();
  413. this.tuicauseList = res.data;
  414. })
  415. },
  416. pay(){
  417. this.$http('openMallOrder/unifiedPay', {
  418. sheetId:this.id
  419. },'POST').then(res => {
  420. if(res.code==0){
  421. this.requestPayment(res.data)
  422. }else{
  423. uni.showToast({
  424. title: res.msg,
  425. icon: 'none',
  426. duration: 3000
  427. });
  428. }
  429. })
  430. },
  431. requestPayment(res){
  432. var payInfo=res;
  433. //console.log(payInfo)
  434. //console.log(String(Date.now()))
  435. var that=this;
  436. uni.requestPayment({
  437. provider: 'wxpay',
  438. //timeStamp: String(Date.now()),
  439. timeStamp: payInfo.timeStamp,
  440. nonceStr: payInfo.nonceStr,
  441. package:payInfo.package,
  442. signType: payInfo.signType,
  443. paySign: payInfo.paySign,
  444. appid:payInfo.appId,
  445. success: function (res) {
  446. console.log('success:' + JSON.stringify(res));
  447. uni.showToast({
  448. title: '支付成功',
  449. icon:'none',
  450. duration: 2000
  451. });
  452. that.getData()
  453. },
  454. fail: function (err) {
  455. console.log(err)
  456. uni.showToast({
  457. title: '支付失败',
  458. icon:'none',
  459. duration: 2000
  460. });
  461. }
  462. });
  463. },
  464. copy(txt) {
  465. uni.setClipboardData({
  466. data: txt,
  467. success: function() {
  468. uni.showToast({
  469. title: '复制成功',
  470. icon: 'none',
  471. duration: 2000
  472. });
  473. }
  474. });
  475. },
  476. upTime() {
  477. uni.showLoading({
  478. title: '加载中'
  479. })
  480. var that = this
  481. this.$http('openH5Indent/carOwner/updateTimeOfAppointment', {
  482. id: this.id,
  483. shopId: this.orderData.shopInfo.id,
  484. billDate: this.billDate
  485. }, 'POST').then(res => {
  486. uni.hideLoading();
  487. // var list = res.data.Items
  488. var list = res.data
  489. console.log("result+=", res.data);
  490. uni.showToast({
  491. title: '延期成功',
  492. icon: 'none',
  493. duration: 2000
  494. });
  495. setTimeout(function() {
  496. that.getData();
  497. }, 1000);
  498. })
  499. },
  500. cancelBespeak(){
  501. var that = this
  502. uni.showModal({
  503. title: '提示',
  504. content: '是否取消该订单',
  505. cancelText:'否',
  506. confirmText:'是',
  507. success: function (res) {
  508. if (res.confirm) {
  509. uni.showLoading({
  510. title: '加载中'
  511. })
  512. that.$http('openH5Indent/updateSheetState', {
  513. id: that.id,
  514. }, 'POST').then(res => {
  515. uni.hideLoading();
  516. // var list = res.data.Items
  517. uni.showToast({
  518. title: '取消成功',
  519. icon: 'none',
  520. duration: 2000
  521. });
  522. setTimeout(function() {
  523. that.getData();
  524. }, 1000);
  525. })
  526. } else if (res.cancel) {
  527. }
  528. }
  529. });
  530. },
  531. map() {
  532. console.log("打开地图")
  533. var that = this;
  534. if (!that.orderData.shopInfo.lat || !that.orderData.shopInfo.lng) {
  535. uni.showToast({
  536. title: '该店铺未设置定位',
  537. icon: 'none',
  538. duration: 3000
  539. });
  540. } else {
  541. uni.openLocation({
  542. latitude: Number(that.orderData.shopInfo.lat),
  543. longitude: Number(that.orderData.shopInfo.lng),
  544. name: that.orderData.shopInfo.shopName,
  545. address: that.orderData.shopInfo.provinceName + that.orderData.shopInfo.cityName + that
  546. .orderData.shopInfo.areaName + that.orderData.shopInfo.address,
  547. success: function() {
  548. console.log('success');
  549. },
  550. fail(err) {
  551. console.log(err)
  552. }
  553. });
  554. }
  555. },
  556. call() {
  557. uni.makePhoneCall({
  558. phoneNumber: this.orderData.shopInfo.mobilePhone
  559. });
  560. },
  561. getData() {
  562. uni.showLoading({
  563. title: '加载中'
  564. });
  565. this.$http('openH5Indent/queryOpenSheet', {
  566. id: this.id,
  567. }, 'GET').then(res => {
  568. uni.hideLoading();
  569. this.orderData = res.data;
  570. if (this.quanMaList) {
  571. this.quanMaList = [];
  572. }
  573. let maList = this.orderData.OpenSheetQRCode;
  574. if (maList) {
  575. maList.forEach(item =>{
  576. if (item.writeoffState==1) {
  577. this.quanMaList.push(item.qrCode);
  578. }
  579. })
  580. }
  581. console.log('可用券码--',this.quanMaList);
  582. })
  583. },
  584. goback() {
  585. if(this.back==1){
  586. uni.navigateBack({
  587. delta: 1
  588. })
  589. }else{
  590. var standalone = window.navigator.standalone
  591. var userAgent = window.navigator.userAgent.toLowerCase()
  592. var safari = /safari/.test(userAgent)
  593. var ios = /iphone|ipod|ipad|mac/.test(userAgent)
  594. var android = /android/.test(userAgent)
  595. if (ios) {
  596. if ( true) {//!standalone&& !safari
  597. window.webkit.messageHandlers.goMyNav.postMessage(null)
  598. }
  599. } else if (android) {
  600. window.android.postMessage()
  601. }
  602. }
  603. },
  604. gohome(){
  605. uni.switchTab({
  606. url:'../../index/index'
  607. })
  608. },
  609. },
  610. onPullDownRefresh() {
  611. this.getData()
  612. setTimeout(function() {
  613. uni.stopPullDownRefresh();
  614. }, 1000);
  615. },
  616. }
  617. </script>
  618. <style scoped>
  619. .box {
  620. min-height: 100vh;
  621. background: #F4F5F7;
  622. padding-bottom: 135rpx;
  623. }
  624. .zdyNavBox{
  625. width: 100vw;
  626. background: #FFFFFF;
  627. position: fixed;
  628. top: 0;
  629. left: 0;
  630. z-index: 9999999;
  631. }
  632. .zdyNav{
  633. height: 44px;
  634. display: flex;
  635. justify-content: space-between;
  636. align-items: center;
  637. }
  638. .backImg{
  639. width: 44rpx;
  640. height: 44rpx;
  641. margin-left: 10rpx;
  642. margin-right: 20rpx;
  643. }
  644. .homeImg{
  645. width: 44rpx;
  646. height: 44rpx;
  647. }
  648. .zdyNavLeft{
  649. display: flex;
  650. align-items: center;
  651. }
  652. .zdyNavTitle{
  653. height: 44px;
  654. background: #FFFFFF;
  655. text-align: center;
  656. font-size: 34rpx;
  657. line-height: 44px;
  658. }
  659. .top {
  660. height: 190rpx;
  661. background-color: #FF0000;
  662. }
  663. .orderState {
  664. display: flex;
  665. justify-content: center;
  666. align-items: center;
  667. padding-top: 40rpx;
  668. }
  669. .SheetState {
  670. display: flex;
  671. justify-content: center;
  672. font-size: 36rpx;
  673. font-weight: 500;
  674. color: #FFFFFF;
  675. margin-left: 15rpx;
  676. }
  677. .timeEditImg {
  678. width: 25rpx;
  679. height: 25rpx;
  680. padding-left: 20rpx;
  681. }
  682. .shopBoximg {
  683. width: 40rpx;
  684. height: 40rpx;
  685. }
  686. .shopRightImg {
  687. width: 44rpx;
  688. height: 45rpx;
  689. }
  690. .shopsx {
  691. width: 1px;
  692. height: 50rpx;
  693. background: #EEEEEE;
  694. margin-top: 30rpx;
  695. margin-left: 28rpx;
  696. }
  697. .shopBox {
  698. display: flex;
  699. padding: 30rpx 20rpx;
  700. margin: 0rpx 24rpx;
  701. margin-top: -60rpx;
  702. background-color: #FFFFFF;
  703. border-radius: 10rpx;
  704. }
  705. .shopCont {
  706. width: 405rpx;
  707. padding-left: 20rpx;
  708. }
  709. .shopName {
  710. font-size: 30rpx;
  711. font-weight: bold;
  712. color: #3C3C3C;
  713. line-height: 42rpx;
  714. }
  715. .Address {
  716. color: #999999;
  717. font-size: 24rpx;
  718. margin-top: 10rpx;
  719. }
  720. .shopRihgtTxt {
  721. color: #999999;
  722. font-size: 24rpx;
  723. }
  724. .shopRightBox {
  725. padding-left: 28rpx;
  726. }
  727. .detailedTitle {
  728. padding: 23rpx 20rpx;
  729. display: flex;
  730. text-align: center;
  731. align-content: flex-start;
  732. border-bottom: 1rpx solid #EEEEEE;
  733. font-size: 30rpx;
  734. font-weight: bold;
  735. color: #3C3C3C;
  736. }
  737. .detailedLine {
  738. display: flex;
  739. padding: 16rpx 20rpx;
  740. justify-content: space-between;
  741. align-items: center;
  742. }
  743. .detailedImg {
  744. width: 120rpx;
  745. height: 120rpx;
  746. border-radius: 10rpx;
  747. }
  748. .detailedName {
  749. display: flex;
  750. align-items: center;
  751. }
  752. .code {
  753. font-size: 26rpx;
  754. color: #333333;
  755. font-weight: bold;
  756. width: 180rpx
  757. }
  758. .old {
  759. color: #999999;
  760. font-weight: 400;
  761. text-decoration: line-through;
  762. }
  763. .redPoint {
  764. width: 10rpx;
  765. height: 10rpx;
  766. background: #FF0000;
  767. border-radius: 10rpx;
  768. margin-right: 10rpx;
  769. }
  770. .quanState {
  771. font-size: 22rpx;
  772. color: #F19D01;
  773. padding: 0 10rpx;
  774. border: 1rpx solid #F19D01;
  775. border-radius: 4rpx;
  776. margin-left: 20rpx;
  777. }
  778. .quanState2{
  779. font-size: 22rpx;
  780. color: #999999;
  781. padding: 0 10rpx;
  782. border: 1rpx solid #DDDDDD;
  783. border-radius: 4rpx;
  784. margin-left: 20rpx;
  785. }
  786. .information {
  787. background: #FFFFFF;
  788. border-radius: 10rpx;
  789. margin: 20rpx 24rpx;
  790. padding-bottom: 15rpx;
  791. }
  792. .informationLine {
  793. display: flex;
  794. padding: 15rpx 20rpx;
  795. }
  796. .informationLine2 {
  797. display: flex;
  798. justify-content: space-between;
  799. font-size: 26rpx;
  800. padding: 20rpx;
  801. align-items: center;
  802. padding-bottom: 0;
  803. }
  804. .salePrice {
  805. font-size: 26rpx;
  806. font-weight: 500;
  807. color: #333333;
  808. line-height: 45rpx;
  809. }
  810. .money {
  811. background: #FFFFFF;
  812. border-radius: 10rpx;
  813. margin: 20rpx 24rpx;
  814. display: flex;
  815. justify-content: space-between;
  816. font-size: 26rpx;
  817. padding: 30rpx 20rpx;
  818. }
  819. .informationTxt {
  820. width: 190rpx;
  821. font-size: 26rpx;
  822. color: #999999;
  823. }
  824. .line {
  825. height: 20rpx;
  826. background-color: #FFFFFF;
  827. border-bottom: 1rpx solid #EEEEEE;
  828. }
  829. .goodsName {
  830. width: 80%;
  831. color: #333333;
  832. font-size: 26rpx;
  833. }
  834. .goodsName2{
  835. padding: 20rpx 20rpx 15rpx;
  836. color: #333333;
  837. font-size: 26rpx;
  838. }
  839. .informationNum {
  840. color: #333333;
  841. font-size: 26rpx;
  842. }
  843. .codeCopy {
  844. width: 77rpx;
  845. height: 36rpx;
  846. background: #F4F5F7;
  847. border-radius: 22rpx;
  848. font-size: 24rpx;
  849. color: #333333;
  850. text-align: center;
  851. line-height: 33rpx;
  852. padding: 0 15rpx;
  853. margin-left: 20rpx;
  854. }
  855. .bottom {
  856. display: flex;
  857. justify-content: flex-end;
  858. padding: 20rpx;
  859. background-color: #FFFFFF;
  860. align-items: center;
  861. height: 98rpx;
  862. width: 100vw;
  863. position: fixed;
  864. bottom: 0rpx;
  865. padding-bottom: constant(safe-area-inset-bottom);
  866. padding-bottom: env(safe-area-inset-bottom);
  867. }
  868. .cancel {
  869. color: #3C3C3C;
  870. font-size: 28rpx;
  871. width: 150rpx;
  872. height: 56rpx;
  873. border-radius: 36rpx;
  874. border: 1rpx solid #DDDDDD;
  875. text-align: center;
  876. line-height: 56rpx;
  877. margin-right: 40rpx;
  878. }
  879. .defer {
  880. color: #D53533;
  881. font-size: 28rpx;
  882. width: 150rpx;
  883. height: 56rpx;
  884. border-radius: 36rpx;
  885. border: 1rpx solid #D53533;
  886. text-align: center;
  887. line-height: 56rpx;
  888. margin-right: 40rpx;
  889. }
  890. .itemBox {
  891. margin: 20rpx;
  892. border-radius: 10rpx;
  893. border: 2rpx solid #EEEEEE;
  894. }
  895. .itemTop {
  896. padding: 18rpx 20rpx;
  897. padding-right: 0;
  898. background-color: #FFEFD5;
  899. display: flex;
  900. justify-content: space-between;
  901. align-content: center;
  902. }
  903. .topTitle {
  904. width: 104rpx;
  905. font-size: 26rpx;
  906. color: #333333;
  907. margin-right: 20rpx;
  908. text-align: right;
  909. }
  910. .leftItem {
  911. font-size: 26rpx;
  912. color: #333333;
  913. margin-right: 20rpx;
  914. flex-grow: 1;
  915. /* 隐藏文字显示 ...不换行 */
  916. overflow: hidden;
  917. text-overflow: ellipsis;
  918. white-space: nowrap;
  919. }
  920. .itemContent {
  921. padding: 20rpx;
  922. padding-right: 0;
  923. background-color: #FFFFFF;
  924. display: flex;
  925. justify-content: space-between;
  926. align-content: center;
  927. }
  928. .maBox {
  929. width: 100%;
  930. height: 100vh;
  931. background: rgba(0, 0, 0, 0.4);
  932. position: fixed;
  933. left: 0;
  934. top: 0;
  935. z-index: 9999;
  936. }
  937. .querenMa {
  938. width: 578;
  939. height: 640rpx;
  940. background: #ffffff;
  941. margin: 0 86rpx;
  942. margin-top: 50%;
  943. border-radius: 24rpx;
  944. }
  945. .maTop {
  946. display: flex;
  947. justify-content: space-between;
  948. align-items: center;
  949. padding: 30rpx 20rpx 15rpx;
  950. }
  951. .maTitle {
  952. color: #666666;
  953. font-size: 26rpx;
  954. text-align: center;
  955. padding-left: 100rpx;
  956. }
  957. .swiper{
  958. width: 100%;
  959. height: 85%;
  960. background: #FFFFFF;
  961. }
  962. .swiper-item{
  963. width: 100%;
  964. height: 100%;
  965. }
  966. .maCode {
  967. font-size: 30rpx;
  968. font-weight: 500;
  969. color: #333333;
  970. line-height: 42rpx;
  971. margin-bottom: 40rpx;
  972. text-align: center;
  973. }
  974. .maBoximg {
  975. width: 400rpx;
  976. height: 400rpx;
  977. margin-left: 86rpx;
  978. }
  979. .tuikuanBox {
  980. width: 100%;
  981. height: 100vh;
  982. background: rgba(0, 0, 0, 0.4);
  983. position: fixed;
  984. left: 0;
  985. top: 0;
  986. z-index: 999;
  987. }
  988. .tuikuan {
  989. width: 638rpx;
  990. height: 664rpx;
  991. background: #ffffff;
  992. margin: 0 36rpx;
  993. margin-top: 50%;
  994. border-radius: 24rpx;
  995. padding: 30rpx 20rpx;
  996. }
  997. .tuiTop {
  998. display: flex;
  999. justify-content: space-between;
  1000. margin-bottom: 36rpx;
  1001. }
  1002. .tuiTitle {
  1003. width: 56rpx;
  1004. height: 40rpx;
  1005. font-size: 28rpx;
  1006. font-weight: 500;
  1007. color: #3C3C3C;
  1008. line-height: 40rpx;
  1009. }
  1010. .contLine {
  1011. display: flex;
  1012. justify-content: space-between;
  1013. font-size: 28rpx;
  1014. padding: 30rpx 0;
  1015. border-bottom: 1px solid #EEEEEE;
  1016. }
  1017. .contlineLeft {
  1018. color: #666666;
  1019. line-height: 40rpx;
  1020. align-items: center;
  1021. }
  1022. .star {
  1023. width: 14rpx;
  1024. height: 14rpx;
  1025. padding-bottom: 5rpx;
  1026. }
  1027. .carModel {
  1028. width: 350rpx;
  1029. text-align: left;
  1030. }
  1031. .noColor {
  1032. color: #CCCCCC;
  1033. }
  1034. .carModelRight {
  1035. display: flex;
  1036. justify-content: flex-start;
  1037. align-items: center;
  1038. }
  1039. .contlineRight {
  1040. color: #333333;
  1041. line-height: 40rpx;
  1042. width: 400rpx;
  1043. text-align: right;
  1044. }
  1045. .contlineRightInput {
  1046. color: #333333;
  1047. text-align: left;
  1048. font-size: 28rpx;
  1049. min-height: 182rpx;
  1050. width: 400rpx;
  1051. }
  1052. .contlineRightJt {
  1053. width: 30rpx;
  1054. height: 30rpx;
  1055. }
  1056. .tuiBtns {
  1057. display: flex;
  1058. padding: 40rpx 20rpx 10rpx;
  1059. }
  1060. .btn {
  1061. width: 288rpx;
  1062. height: 98rpx;
  1063. background: #F4F5F7;
  1064. border-radius: 10rpx;
  1065. margin-right: 22rpx;
  1066. font-size: 30rpx;
  1067. font-weight: 500;
  1068. color: #3C3C3C;
  1069. line-height: 98rpx;
  1070. text-align: center;
  1071. }
  1072. .btn2 {
  1073. width: 288rpx;
  1074. height: 98rpx;
  1075. background: #3F90F7;
  1076. border-radius: 10rpx;
  1077. font-size: 30rpx;
  1078. font-weight: 500;
  1079. color: #FFFFFF;
  1080. line-height: 98rpx;
  1081. text-align: center;
  1082. }
  1083. .writeoffLine{
  1084. display: flex;justify-content: space-between;
  1085. color: #999999;font-size: 24rpx;
  1086. line-height: 33rpx;padding-top: 8rpx;
  1087. }
  1088. .writeoffLineBox{
  1089. padding: 0 20rpx;
  1090. }
  1091. .detailedLineBox .detailedLine{
  1092. padding-bottom: 0rpx;
  1093. }
  1094. .writeoffXx .informationNum{
  1095. width: 500rpx;
  1096. }
  1097. .detailedLineBox{
  1098. padding-bottom: 10rpx;
  1099. }
  1100. </style>