paintOrderDetail.vue 31 KB

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