paintOrderDetail.vue 32 KB

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