paintOrderDetail.vue 31 KB

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