activityOrderDetail.vue 31 KB

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