mallOrderDetail.vue 29 KB

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