mallOrderDetail.vue 33 KB

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