paintOrderDetail.vue 31 KB

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