activityOrderDetail.vue 32 KB

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