activityOrderDetail.vue 34 KB

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