mallOrderDetail.vue 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328
  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">
  9. </image>
  10. </view>
  11. <view class="zdyNavTitle">订单详情</view>
  12. <view style="width: 50px;"></view>
  13. </view>
  14. </view>
  15. <view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
  16. <view style="height: 44px;"></view>
  17. <view class="top">
  18. <view class="orderState">
  19. <image src="../../static/img/icon_order_def.png" mode="" style="width: 44rpx;height: 44rpx;"></image>
  20. <view class="SheetState" v-if="orderData.data.sheetState == 1">待付款</view>
  21. <view class="SheetState" v-if="orderData.data.sheetState == 2">待服务</view>
  22. <view class="SheetState" v-if="orderData.data.sheetState == 3">已完成</view>
  23. <view class="SheetState" v-if="orderData.data.sheetState == 4">已取消</view>
  24. </view>
  25. </view>
  26. <!-- 店铺信息 -->
  27. <view class="shopBox">
  28. <image src="../../static/img/icon_store.png" mode="" class="shopBoximg"></image>
  29. <view class="shopCont">
  30. <view class="shopName">{{orderData.shopInfo.shopName}}</view>
  31. <view class="Address">
  32. {{orderData.shopInfo.provinceName}}{{orderData.shopInfo.cityName}}{{orderData.shopInfo.areaName}}{{orderData.shopInfo.address}}
  33. </view>
  34. </view>
  35. <!-- <view class="shopRightBox" @click="map"> -->
  36. <view class="shopRightBox">
  37. <image src="../../static/img/icon_ditu.png" mode="" class="shopRightImg"></image>
  38. <view class="shopRihgtTxt">地图</view>
  39. </view>
  40. <view class="shopsx"></view>
  41. <view class="shopRightBox" @click="call">
  42. <image src="../../static/img/icon_phone.png" mode="" class="shopRightImg"></image>
  43. <view class="shopRihgtTxt">电话</view>
  44. </view>
  45. </view>
  46. <!-- 订单内容 -->
  47. <view class="information">
  48. <view class="detailedTitle">订单内容</view>
  49. <view v-if="orderData.openSheetDetail.length>0" v-for="(item,index) in orderData.openSheetDetail"
  50. :key="index">
  51. <view class="goodsName">{{item.itemName}}</view>
  52. <view class="informationLine2">
  53. <view class="salePrice"><span class="informationNum">¥</span>{{item.salePrice}}</view>
  54. <view class="informationNum" style="color: #999999;">
  55. x{{item.itemQty}}</view>
  56. </view>
  57. </view>
  58. <view v-if="orderData.data.sheetState != 1 && orderData.data.sheetState != 4" class="line"></view>
  59. <view v-if="orderData.data.sheetState != 1 && orderData.data.sheetState != 4">
  60. <view class="goodsName">
  61. 券码信息({{quanMaList.length?quanMaList.length:0}}张可用)
  62. </view>
  63. <view class="detailedLineBox" v-for="(v,index) in orderData.OpenSheetQRCode">
  64. <view class="detailedLine">
  65. <view v-if="v.writeoffState==1" class="detailedName">
  66. <view class="redPoint"></view>
  67. <view class="code">{{v.qrCode}}</view>
  68. <view class="quanState">待使用</view>
  69. </view>
  70. <view v-if="v.writeoffState==3" class="detailedName">
  71. <view class="redPoint"></view>
  72. <view class="code old" >{{v.qrCode}}</view>
  73. <view class="quanState2">已使用</view>
  74. </view>
  75. <image src="../../static/img/icon_erweima.png" mode="" style="width: 36rpx;height: 36rpx;"
  76. v-if="v.writeoffState==1" @click="isShowMaSHow(index)"></image>
  77. </view>
  78. <view class="writeoffLineBox" v-if="v.writeoffState==3">
  79. <view class="writeoffLine">
  80. <view class="writeoffLineTxt">核销时间:{{v.writeoffTime}}</view>
  81. <view class="writeoffLineTxt">核销人:{{v.writeoffName}}</view>
  82. </view>
  83. <view class="writeoffLine">
  84. <view class="writeoffLineTxt">核销门店:{{v.writeoffShopName?v.writeoffShopName:''}}</view>
  85. </view>
  86. </view>
  87. </view>
  88. </view>
  89. </view>
  90. <!-- 套餐内容 -->
  91. <view class="information" v-if="SheetType==3">
  92. <view class="detailedTitle">套餐内容</view>
  93. <!-- 项目 -->
  94. <view class="itemBox" v-if="orderData.projectList.length>0">
  95. <!-- 头 -->
  96. <view class="itemTop">
  97. <view class="leftItem">项目名称</view>
  98. <view class="topTitle">数量</view>
  99. <view class="topTitle">有效期</view>
  100. </view>
  101. <view v-for="(item,index) in orderData.projectList" :key="index">
  102. <view class="itemContent">
  103. <view class="leftItem">{{item.flowName}}</view>
  104. <view class="topTitle">{{item.flowQty}}</view>
  105. <view class="topTitle">{{item.date}}</view>
  106. </view>
  107. </view>
  108. </view>
  109. <!-- 商品 -->
  110. <view class="itemBox" v-if="orderData.shopList.length>0">
  111. <!-- 头 -->
  112. <view class="itemTop">
  113. <view class="leftItem">商品名称</view>
  114. <view class="topTitle">数量</view>
  115. <view class="topTitle">有效期</view>
  116. </view>
  117. <view v-for="(item,index) in orderData.shopList" :key="index">
  118. <view class="itemContent">
  119. <view class="leftItem">{{item.flowName}}</view>
  120. <view class="topTitle">{{item.flowQty}}</view>
  121. <view class="topTitle">{{item.date}}</view>
  122. </view>
  123. </view>
  124. </view>
  125. </view>
  126. <!-- 实付款 -->
  127. <view class="money">
  128. <view class="informationNum">实付款:</view>
  129. <view class="informationNum" style="color: #FF0000;font-weight: bold;">¥{{orderData.data.realMoney}}</view>
  130. </view>
  131. <!-- 订单信息 -->
  132. <view class="information">
  133. <view class="detailedTitle">订单信息</view>
  134. <view class="informationLine">
  135. <view class="informationTxt">订单单号:</view>
  136. <view class="informationNum">{{orderData.data.code}}<span class="codeCopy"
  137. @click="copy(orderData.data.code)">复制</span></view>
  138. </view>
  139. <view class="informationLine">
  140. <view class="informationTxt">下单人:</view>
  141. <view class="informationNum">{{orderData.data.userMobilePhone}}</view>
  142. </view>
  143. <view class="informationLine">
  144. <view class="informationTxt">下单时间:</view>
  145. <view class="informationNum">{{orderData.data.createTime}}</view>
  146. </view>
  147. <view class="informationLine">
  148. <view class="informationTxt">订单备注:</view>
  149. <view class="informationNum" style="width: 510rpx;">{{orderData.data.comment?orderData.data.comment:''}}
  150. </view>
  151. </view>
  152. </view>
  153. <!-- 支付信息 -->
  154. <view class="information">
  155. <view class="detailedTitle">支付信息</view>
  156. <view class="informationLine">
  157. <view class="informationTxt">支付状态:</view>
  158. <view class="informationNum" v-if="orderData.data.payState==1">未支付</view>
  159. <view class="informationNum" v-if="orderData.data.payState==2">已支付</view>
  160. </view>
  161. <view class="informationLine">
  162. <view class="informationTxt">支付方式:</view>
  163. <view class="informationNum" v-if="orderData.data.payType==1">在线支付</view>
  164. <view class="informationNum" v-if="orderData.data.payType==2">线下支付</view>
  165. </view>
  166. <view class="informationLine">
  167. <view class="informationTxt">支付时间:</view>
  168. <view class="informationNum">{{orderData.data.payTime?orderData.data.payTime:'-'}}</view>
  169. </view>
  170. </view>
  171. <!-- 核销信息 -->
  172. <view class="information writeoffXx" v-if="orderData.data.sheetState == 3">
  173. <view class="detailedTitle">核销信息</view>
  174. <view class="informationLine">
  175. <view class="informationTxt">核销状态:</view>
  176. <view class="informationNum" v-if="orderData.data.writeoffState==1">未核销</view>
  177. <view class="informationNum" v-if="orderData.data.writeoffState==2">部分核销</view>
  178. <view class="informationNum" v-if="orderData.data.writeoffState==3">已核销</view>
  179. </view>
  180. <view class="informationLine">
  181. <view class="informationTxt">核销时间:</view>
  182. <view class="informationNum">{{orderData.data.writeoffTime?orderData.data.writeoffTime:'-'}} {{orderData.data.writeoffName}}</view>
  183. </view>
  184. <view class="informationLine">
  185. <view class="informationTxt">核销门店:</view>
  186. <view class="informationNum">{{orderData.data.writeoffShopName?orderData.data.writeoffShopName:'-'}}</view>
  187. </view>
  188. </view>
  189. <view style="height: 50rpx;background-color: #F4F5F7;"></view>
  190. <!-- 待付款 -->
  191. <view class="bottom" v-if="orderData.data.sheetState == 1">
  192. <view v-if="iOSInfo.indexOf('Q030')!=-1||!iOSInfo" class="cancel" @click="cancelBespeak">取消订单</view>
  193. </view>
  194. <!-- 待服务 -->
  195. <view class="bottom" v-if="orderData.data.sheetState == 2">
  196. <view v-if="(iOSInfo.indexOf('Q031')!=-1||!iOSInfo) && orderData.data.payType==1" class="defer" @click="isShowTui=true">退款</view>
  197. <view v-if="iOSInfo.indexOf('Q032')!=-1||!iOSInfo" class="defer" @click="goHeXiao">核销</view>
  198. <!-- <view v-if="iOSInfo.indexOf('Q033')!=-1||!iOSInfo" class="defer" @click="">开单</view> -->
  199. </view>
  200. <!-- 券码 -->
  201. <view class="maBox" v-if="isShowMa==true" @click="isShowMa=false">
  202. <view class="querenMa">
  203. <view class="maTop">
  204. <view class="maTitle">请到店出示券码即可开始服务</view>
  205. <image @click="isShowMa=false" src="../../static/img/icon_delete.png" mode=""
  206. style="width: 26rpx;height: 26rpx;margin-left: 10rpx;"></image>
  207. </view>
  208. <swiper class="swiper" circular :current='swiperIndex' :autoplay="false" :indicator-dots="true" indicator-color="#CCCCCC"
  209. indicator-active-color="#D53533">
  210. <swiper-item v-for="(item,index) in quanMaList">
  211. <view class="swiper-item">
  212. <view class="maCode">{{item}}</view>
  213. <view class="maBoximg">
  214. <tki-qrcode cid="qrcode1" ref="qrcode" :val="item" :size="400" :unit="unit"
  215. :pdground="pdground" :icon="icon" :iconSize="iconsize" :lv="lv" :onval="onval"
  216. :loadMake="loadMake" :usingComponents="true" @result="qrR" />
  217. </view>
  218. </view>
  219. </swiper-item>
  220. </swiper>
  221. </view>
  222. </view>
  223. <!-- 退款原因 -->
  224. <view class="tuikuanBox" v-if="isShowTui==true">
  225. <view class="tuikuan">
  226. <view class="tuiTop">
  227. <view class="tuiTitle">退款</view>
  228. <image @click="isShowTui=false" src="../../static/img/icon_close.png" mode=""
  229. style="width: 26rpx; height: 26rpx;"></image>
  230. </view>
  231. <view class="contLine">
  232. <view class="contlineLeft">
  233. <image src="../../static/img/icon_star.png" mode="" class="star"></image>
  234. 退款原因
  235. </view>
  236. <view class="contlineRight carModelRight" @click="">
  237. <picker class="carModel" @change="bindChange" mode="selector" :value="index"
  238. :range="tuicauseList" range-key="contents">
  239. <view class="uni-input">{{tuicauseList[index].contents}}</view>
  240. <!-- <view class="uni-input noColor" v-else>请选择</view> -->
  241. </picker>
  242. <image src="../../static/img/little_rightArrow.png" mode="" class="contlineRightJt"></image>
  243. </view>
  244. </view>
  245. <view class="contLine">
  246. <view class="contlineLeft">
  247. <image src="../../static/img/icon_star.png" mode="" class="star"></image>
  248. 退款金额
  249. </view>
  250. <view class="contlineRight carModelRight" @click="cktime">
  251. <span class="carModel">{{orderData.data.realMoney}}</span>
  252. </view>
  253. </view>
  254. <view class="contLine">
  255. <view class="contlineLeft">
  256. <image src="" mode="" class="star"></image>
  257. 补充描述
  258. </view>
  259. <view class="contlineRight">
  260. <textarea placeholder-style="color:#999999" placeholder="请输入" v-model="tuikuanContent"
  261. class="contlineRightInput" maxlength="-1" auto-height="true" @confirm="feedDone" />
  262. </view>
  263. </view>
  264. <view class="tuiBtns">
  265. <view class="btn" @click="isShowTui=false">取消</view>
  266. <view class="btn2" @click="goTui">确认退款</view>
  267. </view>
  268. </view>
  269. </view>
  270. </view>
  271. </template>
  272. <script>
  273. import tkiQrcode from "@/components/tki-qrcode/tki-qrcode.vue"
  274. export default {
  275. components: {
  276. tkiQrcode,
  277. },
  278. data() {
  279. return {
  280. id: '',
  281. iStatusBarHeight: '',
  282. SheetType: '', //SheetType 1 商品2项目3套餐4救援5钣喷6集客
  283. orderData: '',
  284. onval: true, // val值变化时自动重新生成二维码
  285. loadMake: true, // 组件加载完成后自动生成二维码
  286. size: 500,
  287. qrcodeShow: false,
  288. qrcodeTop: '-100vh',
  289. qrcodeTopVal: '',
  290. ifShow: false,
  291. val: '二维码', // 要生成的二维码值
  292. unit: 'upx', // 单位
  293. background: '#b4e9e2', // 背景色
  294. foreground: '#309286', // 前景色
  295. pdground: '#262637', // 角标色
  296. icon: '', // 二维码图标
  297. iconsize: 40, // 二维码图标大小
  298. lv: 3, // 二维码容错级别 , 一般不用设置,默认就行
  299. src: '', // 二维码生成后的图片地址或base64
  300. isShowMa: false,
  301. quanMaList: [],
  302. isShowTui: false,
  303. tuicauseList: [],
  304. tuikuanContent: '',
  305. index: 0,
  306. iOSInfo:'',
  307. swiperIndex:0,
  308. back:'',
  309. }
  310. },
  311. onLoad(opt) {
  312. this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
  313. this.id = opt.id
  314. this.back=opt.back;
  315. this.SheetType = opt.SheetType
  316. if (this.id) {
  317. this.getData()
  318. }
  319. this.getTuiKuanData()
  320. /* var qxnum = uni.getStorageSync("quanxian");
  321. if (qxnum == 1) {
  322. this.iOSInfo = JSON.parse(JSON.stringify(window.iOSInfo));
  323. }else if(qxnum==2){
  324. window.getAndroid=this.getAndroid;
  325. } */
  326. this.getpermission()
  327. },
  328. methods: {
  329. getpermission(){
  330. this.$http('openH5ShopHelpSheetOrder/permission', {
  331. },'POST').then(res => {
  332. this.iOSInfo=res.data;
  333. })
  334. },
  335. isShowMaSHow(index){
  336. this.swiperIndex=index
  337. this.isShowMa=true
  338. },
  339. getAndroid(e){
  340. this.iOSInfo=e
  341. },
  342. goTui() {
  343. let yuanyin = this.tuicauseList[this.index].contents
  344. if (!yuanyin) {
  345. uni.showToast({
  346. title: '请选择退款原因',
  347. icon: 'none',
  348. duration: 3000
  349. });
  350. return false;
  351. }
  352. uni.showLoading({
  353. title: '加载中'
  354. })
  355. var that = this
  356. this.$http('openH5Indent/reimburse', {
  357. id: this.id,
  358. refundReason: yuanyin,
  359. refundComment: this.tuikuanContent,
  360. realMoney: this.orderData.data.realMoney
  361. }, 'GET').then(res => {
  362. uni.hideLoading();
  363. // var list = res.data.Items
  364. // var list = res.data
  365. console.log("result+=", res);
  366. if (res.code == 0) {
  367. that.isShowTui = false
  368. uni.showToast({
  369. title: '退款成功',
  370. icon: 'none',
  371. duration: 2000
  372. });
  373. setTimeout(function() {
  374. that.getData();
  375. }, 1000);
  376. }
  377. })
  378. },
  379. bindChange(e) {
  380. console.log(e);
  381. this.index = e.detail.value
  382. },
  383. feedDone(e) {
  384. this.tuikuanContent = e.target.value
  385. },
  386. // 核销
  387. goHeXiao() {
  388. console.log(this.id)
  389. //app交互
  390. var standalone = window.navigator.standalone
  391. var userAgent = window.navigator.userAgent.toLowerCase()
  392. var safari = /safari/.test(userAgent)
  393. var ios = /iphone|ipod|ipad|mac/.test(userAgent)
  394. var android = /android/.test(userAgent)
  395. if (ios) {
  396. if (true) { //!standalone&& !safari
  397. window.webkit.messageHandlers.goHeXiao.postMessage({
  398. "id": this.id ? this.id : ''
  399. })
  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. },
  605. onPullDownRefresh() {
  606. this.getData()
  607. setTimeout(function() {
  608. uni.stopPullDownRefresh();
  609. }, 1000);
  610. },
  611. }
  612. </script>
  613. <style scoped>
  614. .box {
  615. min-height: 100vh;
  616. background: #F4F5F7;
  617. padding-bottom: 135rpx;
  618. }
  619. .zdyNavBox {
  620. width: 100vw;
  621. background: #FFFFFF;
  622. position: fixed;
  623. top: 0;
  624. left: 0;
  625. z-index: 9999999;
  626. }
  627. .zdyNav {
  628. height: 44px;
  629. display: flex;
  630. justify-content: space-between;
  631. align-items: center;
  632. }
  633. .backImg {
  634. width: 44rpx;
  635. height: 44rpx;
  636. margin-left: 10rpx;
  637. margin-right: 20rpx;
  638. }
  639. .homeImg {
  640. width: 44rpx;
  641. height: 44rpx;
  642. }
  643. .zdyNavLeft {
  644. display: flex;
  645. align-items: center;
  646. }
  647. .zdyNavTitle {
  648. height: 44px;
  649. background: #FFFFFF;
  650. text-align: center;
  651. font-size: 34rpx;
  652. line-height: 44px;
  653. }
  654. .top {
  655. height: 190rpx;
  656. background-color: #FF0000;
  657. }
  658. .orderState {
  659. display: flex;
  660. justify-content: center;
  661. align-items: center;
  662. padding-top: 40rpx;
  663. }
  664. .SheetState {
  665. display: flex;
  666. justify-content: center;
  667. font-size: 36rpx;
  668. font-weight: 500;
  669. color: #FFFFFF;
  670. margin-left: 15rpx;
  671. }
  672. .timeEditImg {
  673. width: 25rpx;
  674. height: 25rpx;
  675. padding-left: 20rpx;
  676. }
  677. .shopBoximg {
  678. width: 40rpx;
  679. height: 40rpx;
  680. }
  681. .shopRightImg {
  682. width: 44rpx;
  683. height: 45rpx;
  684. }
  685. .shopsx {
  686. width: 1px;
  687. height: 50rpx;
  688. background: #EEEEEE;
  689. margin-top: 30rpx;
  690. margin-left: 28rpx;
  691. }
  692. .shopBox {
  693. display: flex;
  694. padding: 30rpx 20rpx;
  695. margin: 0rpx 24rpx;
  696. margin-top: -60rpx;
  697. background-color: #FFFFFF;
  698. border-radius: 10rpx;
  699. }
  700. .shopCont {
  701. width: 405rpx;
  702. padding-left: 20rpx;
  703. }
  704. .shopName {
  705. font-size: 30rpx;
  706. font-weight: bold;
  707. color: #3C3C3C;
  708. line-height: 42rpx;
  709. }
  710. .Address {
  711. color: #999999;
  712. font-size: 24rpx;
  713. margin-top: 10rpx;
  714. }
  715. .shopRihgtTxt {
  716. color: #999999;
  717. font-size: 24rpx;
  718. }
  719. .shopRightBox {
  720. padding-left: 28rpx;
  721. }
  722. .detailedTitle {
  723. padding: 23rpx 20rpx;
  724. display: flex;
  725. text-align: center;
  726. align-content: flex-start;
  727. border-bottom: 1rpx solid #EEEEEE;
  728. font-size: 30rpx;
  729. font-weight: bold;
  730. color: #3C3C3C;
  731. }
  732. .detailedLine {
  733. display: flex;
  734. padding: 16rpx 20rpx;
  735. justify-content: space-between;
  736. align-items: center;
  737. }
  738. .detailedImg {
  739. width: 120rpx;
  740. height: 120rpx;
  741. border-radius: 10rpx;
  742. }
  743. .detailedName {
  744. display: flex;
  745. align-items: center;
  746. }
  747. .code {
  748. font-size: 26rpx;
  749. color: #333333;
  750. font-weight: bold;
  751. width: 180rpx
  752. }
  753. .old {
  754. color: #999999;
  755. font-weight: 400;
  756. text-decoration: line-through;
  757. }
  758. .redPoint {
  759. width: 10rpx;
  760. height: 10rpx;
  761. background: #FF0000;
  762. border-radius: 10rpx;
  763. margin-right: 10rpx;
  764. }
  765. .quanState {
  766. font-size: 22rpx;
  767. color: #F19D01;
  768. padding: 0 10rpx;
  769. border: 1rpx solid #F19D01;
  770. border-radius: 4rpx;
  771. margin-left: 20rpx;
  772. }
  773. .quanState2 {
  774. font-size: 22rpx;
  775. color: #999999;
  776. padding: 0 10rpx;
  777. border: 1rpx solid #DDDDDD;
  778. border-radius: 4rpx;
  779. margin-left: 20rpx;
  780. }
  781. .information {
  782. background: #FFFFFF;
  783. border-radius: 10rpx;
  784. margin: 20rpx 24rpx;
  785. padding-bottom: 15rpx;
  786. }
  787. .informationLine {
  788. display: flex;
  789. padding: 15rpx 20rpx;
  790. }
  791. .informationLine2 {
  792. display: flex;
  793. justify-content: space-between;
  794. font-size: 26rpx;
  795. padding: 0 20rpx;
  796. }
  797. .salePrice {
  798. font-size: 26rpx;
  799. font-weight: 500;
  800. color: #333333;
  801. line-height: 45rpx;
  802. }
  803. .money {
  804. background: #FFFFFF;
  805. border-radius: 10rpx;
  806. margin: 20rpx 24rpx;
  807. display: flex;
  808. justify-content: space-between;
  809. font-size: 26rpx;
  810. padding: 30rpx 20rpx;
  811. }
  812. .informationTxt {
  813. width: 190rpx;
  814. font-size: 26rpx;
  815. color: #999999;
  816. }
  817. .line {
  818. height: 20rpx;
  819. background-color: #FFFFFF;
  820. border-bottom: 1rpx solid #EEEEEE;
  821. }
  822. .goodsName {
  823. padding: 20rpx 20rpx 15rpx;
  824. color: #333333;
  825. font-size: 26rpx;
  826. }
  827. .informationNum {
  828. color: #333333;
  829. font-size: 26rpx;
  830. }
  831. .codeCopy {
  832. width: 77rpx;
  833. height: 36rpx;
  834. background: #F4F5F7;
  835. border-radius: 22rpx;
  836. font-size: 24rpx;
  837. color: #333333;
  838. text-align: center;
  839. line-height: 33rpx;
  840. padding: 0 15rpx;
  841. margin-left: 20rpx;
  842. }
  843. .bottom {
  844. display: flex;
  845. justify-content: flex-end;
  846. padding: 20rpx;
  847. background-color: #FFFFFF;
  848. align-items: center;
  849. height: 98rpx;
  850. width: 100vw;
  851. position: fixed;
  852. bottom: 0rpx;
  853. padding-bottom: constant(safe-area-inset-bottom);
  854. padding-bottom: env(safe-area-inset-bottom);
  855. }
  856. .cancel {
  857. color: #3C3C3C;
  858. font-size: 28rpx;
  859. width: 150rpx;
  860. height: 56rpx;
  861. border-radius: 36rpx;
  862. border: 1rpx solid #DDDDDD;
  863. text-align: center;
  864. line-height: 56rpx;
  865. margin-right: 40rpx;
  866. }
  867. .defer {
  868. color: #D53533;
  869. font-size: 28rpx;
  870. width: 150rpx;
  871. height: 56rpx;
  872. border-radius: 36rpx;
  873. border: 1rpx solid #D53533;
  874. text-align: center;
  875. line-height: 56rpx;
  876. margin-right: 40rpx;
  877. }
  878. .itemBox {
  879. margin: 20rpx;
  880. border-radius: 10rpx;
  881. border: 2rpx solid #EEEEEE;
  882. }
  883. .itemTop {
  884. padding: 18rpx 20rpx;
  885. padding-right: 0;
  886. background-color: #FFEFD5;
  887. display: flex;
  888. justify-content: space-between;
  889. align-content: center;
  890. }
  891. .topTitle {
  892. width: 104rpx;
  893. font-size: 26rpx;
  894. color: #333333;
  895. margin-right: 20rpx;
  896. text-align: right;
  897. }
  898. .leftItem {
  899. font-size: 26rpx;
  900. color: #333333;
  901. margin-right: 20rpx;
  902. flex-grow: 1;
  903. /* 隐藏文字显示 ...不换行 */
  904. overflow: hidden;
  905. text-overflow: ellipsis;
  906. white-space: nowrap;
  907. }
  908. .itemContent {
  909. padding: 20rpx;
  910. padding-right: 0;
  911. background-color: #FFFFFF;
  912. display: flex;
  913. justify-content: space-between;
  914. align-content: center;
  915. }
  916. .maBox {
  917. width: 100%;
  918. height: 100vh;
  919. background: rgba(0, 0, 0, 0.4);
  920. position: fixed;
  921. left: 0;
  922. top: 0;
  923. z-index: 9999;
  924. }
  925. .querenMa {
  926. width: 578rpx;
  927. height: 640rpx;
  928. background: #ffffff;
  929. margin: 0 86rpx;
  930. margin-top: 50%;
  931. border-radius: 24rpx;
  932. }
  933. .maTop {
  934. display: flex;
  935. justify-content: space-between;
  936. align-items: center;
  937. padding: 30rpx 20rpx 15rpx;
  938. }
  939. .maTitle {
  940. color: #666666;
  941. font-size: 26rpx;
  942. text-align: center;
  943. padding-left: 100rpx;
  944. }
  945. .swiper {
  946. width: 100%;
  947. height: 85%;
  948. background: #FFFFFF;
  949. }
  950. .swiper-item {
  951. width: 100%;
  952. height: 100%;
  953. }
  954. .maCode {
  955. font-size: 30rpx;
  956. font-weight: 500;
  957. color: #333333;
  958. line-height: 42rpx;
  959. margin-bottom: 40rpx;
  960. text-align: center;
  961. }
  962. .maBoximg {
  963. width: 400rpx;
  964. height: 400rpx;
  965. margin-left: 86rpx;
  966. }
  967. .tuikuanBox {
  968. width: 100%;
  969. height: 100vh;
  970. background: rgba(0, 0, 0, 0.4);
  971. position: fixed;
  972. left: 0;
  973. top: 0;
  974. z-index: 999;
  975. }
  976. .tuikuan {
  977. width: 638rpx;
  978. height: 664rpx;
  979. background: #ffffff;
  980. margin: 0 36rpx;
  981. margin-top: 50%;
  982. border-radius: 24rpx;
  983. padding: 30rpx 20rpx;
  984. }
  985. .tuiTop {
  986. display: flex;
  987. justify-content: space-between;
  988. margin-bottom: 36rpx;
  989. }
  990. .tuiTitle {
  991. width: 56rpx;
  992. height: 40rpx;
  993. font-size: 28rpx;
  994. font-weight: 500;
  995. color: #3C3C3C;
  996. line-height: 40rpx;
  997. }
  998. .contLine {
  999. display: flex;
  1000. justify-content: space-between;
  1001. font-size: 28rpx;
  1002. padding: 30rpx 0;
  1003. border-bottom: 1px solid #EEEEEE;
  1004. }
  1005. .contlineLeft {
  1006. color: #666666;
  1007. line-height: 40rpx;
  1008. align-items: center;
  1009. }
  1010. .star {
  1011. width: 14rpx;
  1012. height: 14rpx;
  1013. padding-bottom: 5rpx;
  1014. }
  1015. .carModel {
  1016. width: 350rpx;
  1017. text-align: left;
  1018. }
  1019. .noColor {
  1020. color: #CCCCCC;
  1021. }
  1022. .carModelRight {
  1023. display: flex;
  1024. justify-content: flex-start;
  1025. align-items: center;
  1026. }
  1027. .contlineRight {
  1028. color: #333333;
  1029. line-height: 40rpx;
  1030. width: 400rpx;
  1031. text-align: right;
  1032. }
  1033. .contlineRightInput {
  1034. color: #333333;
  1035. text-align: left;
  1036. font-size: 28rpx;
  1037. min-height: 182rpx;
  1038. width: 400rpx;
  1039. }
  1040. .contlineRightJt {
  1041. width: 30rpx;
  1042. height: 30rpx;
  1043. }
  1044. .tuiBtns {
  1045. display: flex;
  1046. padding: 40rpx 20rpx 10rpx;
  1047. }
  1048. .btn {
  1049. width: 288rpx;
  1050. height: 98rpx;
  1051. background: #F4F5F7;
  1052. border-radius: 10rpx;
  1053. margin-right: 22rpx;
  1054. font-size: 30rpx;
  1055. font-weight: 500;
  1056. color: #3C3C3C;
  1057. line-height: 98rpx;
  1058. text-align: center;
  1059. }
  1060. .btn2 {
  1061. width: 288rpx;
  1062. height: 98rpx;
  1063. background: #3F90F7;
  1064. border-radius: 10rpx;
  1065. font-size: 30rpx;
  1066. font-weight: 500;
  1067. color: #FFFFFF;
  1068. line-height: 98rpx;
  1069. text-align: center;
  1070. }
  1071. .writeoffLine{
  1072. display: flex;justify-content: space-between;
  1073. color: #999999;font-size: 24rpx;
  1074. line-height: 33rpx;padding-top: 8rpx;
  1075. }
  1076. .writeoffLineBox{
  1077. padding: 0 20rpx;
  1078. }
  1079. .detailedLineBox .detailedLine{
  1080. padding-bottom: 0rpx;
  1081. }
  1082. .writeoffXx .informationNum{
  1083. width: 500rpx;
  1084. }
  1085. .detailedLineBox{
  1086. padding-bottom: 10rpx;
  1087. }
  1088. </style>