mallOrderDetail.vue 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390
  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.loginInfo){
  424. this.userInfo=data.loginInfo.openUser;
  425. this.wxOpenData=data.loginInfo;
  426. this.$store.commit('mutationswxOpenData', data)
  427. this.$store.commit('mutationsuserInfo', this.userInfo)
  428. this.getData()
  429. }
  430. })
  431. },
  432. pay(){
  433. this.$http('openMallOrder/unifiedPay', {
  434. sheetId:this.id
  435. },'POST').then(res => {
  436. if(res.code==0){
  437. this.requestPayment(res.data)
  438. }else{
  439. uni.showToast({
  440. title: res.msg,
  441. icon: 'none',
  442. duration: 3000
  443. });
  444. }
  445. })
  446. },
  447. requestPayment(res){
  448. var payInfo=res;
  449. //console.log(payInfo)
  450. //console.log(String(Date.now()))
  451. var that=this;
  452. uni.requestPayment({
  453. provider: 'wxpay',
  454. //timeStamp: String(Date.now()),
  455. timeStamp: payInfo.timeStamp,
  456. nonceStr: payInfo.nonceStr,
  457. package:payInfo.package,
  458. signType: payInfo.signType,
  459. paySign: payInfo.paySign,
  460. appid:payInfo.appId,
  461. success: function (res) {
  462. console.log('success:' + JSON.stringify(res));
  463. uni.showToast({
  464. title: '支付成功',
  465. icon:'none',
  466. duration: 2000
  467. });
  468. that.getData()
  469. },
  470. fail: function (err) {
  471. console.log(err)
  472. uni.showToast({
  473. title: '支付失败',
  474. icon:'none',
  475. duration: 2000
  476. });
  477. }
  478. });
  479. },
  480. copy(txt) {
  481. uni.setClipboardData({
  482. data: txt,
  483. success: function() {
  484. uni.showToast({
  485. title: '复制成功',
  486. icon: 'none',
  487. duration: 2000
  488. });
  489. }
  490. });
  491. },
  492. upTime() {
  493. uni.showLoading({
  494. title: '加载中'
  495. })
  496. var that = this
  497. this.$http('openreservation/carOwner/updateTimeOfAppointment', {
  498. id: this.id,
  499. shopId: this.orderData.shopInfo.id,
  500. billDate: this.billDate
  501. }, 'POST').then(res => {
  502. uni.hideLoading();
  503. // var list = res.data.Items
  504. var list = res.data
  505. console.log("result+=", res.data);
  506. uni.showToast({
  507. title: '延期成功',
  508. icon: 'none',
  509. duration: 2000
  510. });
  511. setTimeout(function() {
  512. that.getData();
  513. }, 1000);
  514. })
  515. },
  516. cancelBespeak(){
  517. var that = this
  518. uni.showModal({
  519. title: '提示',
  520. content: '是否取消该订单',
  521. cancelText:'否',
  522. confirmText:'是',
  523. success: function (res) {
  524. if (res.confirm) {
  525. uni.showLoading({
  526. title: '加载中'
  527. })
  528. that.$http('openOrderManagement/updateSheetState', {
  529. id: that.id,
  530. }, 'POST').then(res => {
  531. uni.hideLoading();
  532. // var list = res.data.Items
  533. uni.showToast({
  534. title: '取消成功',
  535. icon: 'none',
  536. duration: 2000
  537. });
  538. setTimeout(function() {
  539. that.getData();
  540. }, 1000);
  541. })
  542. } else if (res.cancel) {
  543. }
  544. }
  545. });
  546. },
  547. map() {
  548. console.log("打开地图")
  549. var that = this;
  550. if (!that.orderData.shopInfo.lat || !that.orderData.shopInfo.lng) {
  551. uni.showToast({
  552. title: '该店铺未设置定位',
  553. icon: 'none',
  554. duration: 3000
  555. });
  556. } else {
  557. uni.openLocation({
  558. latitude: Number(that.orderData.shopInfo.lat),
  559. longitude: Number(that.orderData.shopInfo.lng),
  560. name: that.orderData.shopInfo.shopName,
  561. address: that.orderData.shopInfo.provinceName + that.orderData.shopInfo.cityName + that
  562. .orderData.shopInfo.areaName + that.orderData.shopInfo.address,
  563. success: function() {
  564. console.log('success');
  565. },
  566. fail(err) {
  567. console.log(err)
  568. }
  569. });
  570. }
  571. },
  572. call() {
  573. uni.makePhoneCall({
  574. phoneNumber: this.orderData.shopInfo.mobilePhone
  575. });
  576. },
  577. getData() {
  578. uni.showLoading({
  579. title: '加载中'
  580. });
  581. this.$http('openOrderManagement/queryOpenSheet', {
  582. id: this.id,
  583. }, 'GET').then(res => {
  584. uni.hideLoading();
  585. this.orderData = res.data;
  586. if (this.quanMaList) {
  587. this.quanMaList = [];
  588. }
  589. let maList = this.orderData.OpenSheetQRCode;
  590. if (maList) {
  591. maList.forEach(item =>{
  592. if (item.writeoffState==1) {
  593. this.quanMaList.push(item.qrCode);
  594. }
  595. })
  596. }
  597. if(this.sx&&this.sxNum){
  598. uni.showToast({
  599. title: '刷新成功',
  600. icon: 'none',
  601. duration: 3000
  602. });
  603. }
  604. console.log('可用券码--',this.quanMaList);
  605. })
  606. },
  607. goback() {
  608. uni.navigateBack({
  609. delta: 1
  610. })
  611. },
  612. gohome(){
  613. uni.switchTab({
  614. url:'../../index/index'
  615. })
  616. },
  617. },
  618. onPullDownRefresh() {
  619. this.getData()
  620. setTimeout(function() {
  621. uni.stopPullDownRefresh();
  622. }, 1000);
  623. },
  624. }
  625. </script>
  626. <style scoped>
  627. .box {
  628. min-height: 100vh;
  629. background: #F4F5F7;
  630. padding-bottom: 135rpx;
  631. }
  632. .zdyNavBox{
  633. width: 100vw;
  634. background: #FFFFFF;
  635. position: fixed;
  636. top: 0;
  637. left: 0;
  638. z-index: 9999999;
  639. }
  640. .zdyNav{
  641. height: 44px;
  642. display: flex;
  643. justify-content: space-between;
  644. align-items: center;
  645. }
  646. .backImg{
  647. width: 44rpx;
  648. height: 44rpx;
  649. margin-left: 10rpx;
  650. margin-right: 20rpx;
  651. }
  652. .homeImg{
  653. width: 44rpx;
  654. height: 44rpx;
  655. }
  656. .zdyNavLeft{
  657. display: flex;
  658. align-items: center;
  659. }
  660. .zdyNavTitle{
  661. width: 100vw;
  662. height: 44px;
  663. background: #FFFFFF;
  664. text-align: center;
  665. font-size: 34rpx;
  666. line-height: 44px;
  667. }
  668. .top {
  669. height: 190rpx;
  670. background: #FF0000;
  671. }
  672. .orderState {
  673. display: flex;
  674. justify-content: center;
  675. align-items: center;
  676. padding-top: 40rpx;
  677. }
  678. .SheetState {
  679. display: flex;
  680. justify-content: center;
  681. font-size: 36rpx;
  682. font-weight: 500;
  683. color: #FFFFFF;
  684. margin-left: 15rpx;
  685. }
  686. .timeEditImg {
  687. width: 25rpx;
  688. height: 25rpx;
  689. padding-left: 20rpx;
  690. }
  691. .shopBoximg {
  692. width: 40rpx;
  693. height: 40rpx;
  694. }
  695. .shopRightImg {
  696. width: 44rpx;
  697. height: 45rpx;
  698. }
  699. .shopsx {
  700. width: 1px;
  701. height: 50rpx;
  702. background: #EEEEEE;
  703. margin-top: 30rpx;
  704. margin-left: 28rpx;
  705. }
  706. .shopBox {
  707. display: flex;
  708. padding: 30rpx 20rpx;
  709. margin: 0rpx 24rpx;
  710. margin-top: -60rpx;
  711. background-color: #FFFFFF;
  712. border-radius: 10rpx;
  713. }
  714. .shopCont {
  715. width: 405rpx;
  716. padding-left: 20rpx;
  717. }
  718. .shopName {
  719. font-size: 30rpx;
  720. font-weight: bold;
  721. color: #3C3C3C;
  722. line-height: 42rpx;
  723. }
  724. .Address {
  725. color: #999999;
  726. font-size: 24rpx;
  727. margin-top: 10rpx;
  728. }
  729. .shopRihgtTxt {
  730. color: #999999;
  731. font-size: 24rpx;
  732. }
  733. .shopRightBox {
  734. padding-left: 28rpx;
  735. }
  736. .detailedTitle {
  737. padding: 23rpx 20rpx;
  738. display: flex;
  739. text-align: center;
  740. align-content: flex-start;
  741. border-bottom: 1rpx solid #EEEEEE;
  742. font-size: 30rpx;
  743. font-weight: bold;
  744. color: #3C3C3C;
  745. }
  746. .detailedLine {
  747. display: flex;
  748. padding: 16rpx 20rpx;
  749. justify-content: space-between;
  750. align-items: center;
  751. }
  752. .detailedImg {
  753. width: 120rpx;
  754. height: 120rpx;
  755. border-radius: 10rpx;
  756. }
  757. .detailedName {
  758. display: flex;
  759. align-items: center;
  760. }
  761. .code {
  762. font-size: 26rpx;
  763. color: #333333;
  764. font-weight: bold;
  765. width: 180rpx
  766. }
  767. .old {
  768. color: #999999;
  769. font-weight: 400;
  770. text-decoration: line-through;
  771. }
  772. .redPoint {
  773. width: 10rpx;
  774. height: 10rpx;
  775. background: #FF0000;
  776. border-radius: 10rpx;
  777. margin-right: 10rpx;
  778. }
  779. .quanState {
  780. font-size: 22rpx;
  781. color: #F19D01;
  782. padding: 0 10rpx;
  783. border: 1rpx solid #F19D01;
  784. border-radius: 4rpx;
  785. margin-left: 20rpx;
  786. }
  787. .quanState2{
  788. font-size: 22rpx;
  789. color: #999999;
  790. padding: 0 10rpx;
  791. border: 1rpx solid #DDDDDD;
  792. border-radius: 4rpx;
  793. margin-left: 20rpx;
  794. }
  795. .information {
  796. background: #FFFFFF;
  797. border-radius: 10rpx;
  798. margin: 20rpx 24rpx;
  799. padding-bottom: 15rpx;
  800. }
  801. .informationLine {
  802. display: flex;
  803. padding: 15rpx 20rpx;
  804. }
  805. .informationLine2 {
  806. display: flex;
  807. justify-content: space-between;
  808. font-size: 26rpx;
  809. padding: 0 20rpx;
  810. }
  811. .salePrice {
  812. font-size: 26rpx;
  813. font-weight: 500;
  814. color: #333333;
  815. line-height: 45rpx;
  816. }
  817. .money {
  818. background: #FFFFFF;
  819. border-radius: 10rpx;
  820. margin: 20rpx 24rpx;
  821. display: flex;
  822. justify-content: space-between;
  823. font-size: 26rpx;
  824. padding: 30rpx 20rpx;
  825. }
  826. .informationTxt {
  827. width: 190rpx;
  828. font-size: 26rpx;
  829. color: #999999;
  830. }
  831. .line {
  832. height: 20rpx;
  833. background-color: #FFFFFF;
  834. border-bottom: 1rpx solid #EEEEEE;
  835. }
  836. .goodsName {
  837. padding: 20rpx 20rpx 15rpx;
  838. color: #333333;
  839. font-size: 26rpx;
  840. }
  841. .informationNum {
  842. color: #333333;
  843. font-size: 26rpx;
  844. }
  845. .codeCopy {
  846. width: 77rpx;
  847. height: 36rpx;
  848. background: #F4F5F7;
  849. border-radius: 22rpx;
  850. font-size: 24rpx;
  851. color: #333333;
  852. text-align: center;
  853. line-height: 33rpx;
  854. padding: 0 15rpx;
  855. margin-left: 20rpx;
  856. }
  857. .orderBottom {
  858. width: 750rpx;
  859. height: 98rpx;
  860. background: #FFFFFF;
  861. position: fixed;
  862. left: 0;
  863. bottom: 0;
  864. display: flex;
  865. justify-content: flex-end;
  866. }
  867. .bottom {
  868. display: flex;
  869. justify-content: flex-end;
  870. padding: 20rpx;
  871. background-color: #FFFFFF;
  872. align-items: center;
  873. height: 98rpx;
  874. width: 100vw;
  875. position: fixed;
  876. bottom: 0rpx;
  877. padding-bottom: constant(safe-area-inset-bottom);
  878. padding-bottom: env(safe-area-inset-bottom);
  879. }
  880. .cancel {
  881. color: #3C3C3C;
  882. font-size: 28rpx;
  883. width: 150rpx;
  884. height: 56rpx;
  885. border-radius: 36rpx;
  886. border: 1rpx solid #DDDDDD;
  887. text-align: center;
  888. line-height: 56rpx;
  889. margin-right: 40rpx;
  890. }
  891. .defer {
  892. color: #D53533;
  893. font-size: 28rpx;
  894. width: 150rpx;
  895. height: 56rpx;
  896. border-radius: 36rpx;
  897. border: 1rpx solid #D53533;
  898. text-align: center;
  899. line-height: 56rpx;
  900. margin-right: 40rpx;
  901. }
  902. .itemBox {
  903. margin: 20rpx;
  904. border-radius: 10rpx;
  905. border: 2rpx solid #EEEEEE;
  906. }
  907. .itemTop {
  908. padding: 18rpx 20rpx;
  909. padding-right: 0;
  910. background-color: #FFEFD5;
  911. display: flex;
  912. justify-content: space-between;
  913. align-content: center;
  914. }
  915. .topTitle {
  916. width: 104rpx;
  917. font-size: 26rpx;
  918. color: #333333;
  919. margin-right: 20rpx;
  920. text-align: right;
  921. }
  922. .leftItem {
  923. font-size: 26rpx;
  924. color: #333333;
  925. margin-right: 20rpx;
  926. flex-grow: 1;
  927. /* 隐藏文字显示 ...不换行 */
  928. overflow: hidden;
  929. text-overflow: ellipsis;
  930. white-space: nowrap;
  931. }
  932. .itemContent {
  933. padding: 20rpx;
  934. padding-right: 0;
  935. background-color: #FFFFFF;
  936. display: flex;
  937. justify-content: space-between;
  938. align-content: center;
  939. }
  940. .maBox {
  941. width: 100%;
  942. height: 100vh;
  943. background: rgba(0, 0, 0, 0.4);
  944. position: fixed;
  945. left: 0;
  946. top: 0;
  947. z-index: 9999;
  948. }
  949. .querenMa {
  950. width: 578;
  951. height: 640rpx;
  952. background: #ffffff;
  953. margin: 0 86rpx;
  954. margin-top: 50%;
  955. border-radius: 24rpx;
  956. }
  957. .maTop {
  958. display: flex;
  959. justify-content: space-between;
  960. align-items: center;
  961. padding: 30rpx 20rpx 15rpx;
  962. }
  963. .maTitle {
  964. color: #666666;
  965. font-size: 26rpx;
  966. text-align: center;
  967. padding-left: 100rpx;
  968. }
  969. .swiper{
  970. width: 100%;
  971. height: 85%;
  972. background: #FFFFFF;
  973. }
  974. .swiper-item{
  975. width: 100%;
  976. height: 100%;
  977. }
  978. .maCode {
  979. font-size: 30rpx;
  980. font-weight: 500;
  981. color: #333333;
  982. line-height: 42rpx;
  983. margin-bottom: 40rpx;
  984. text-align: center;
  985. }
  986. .maBoximg {
  987. width: 400rpx;
  988. height: 400rpx;
  989. margin-left: 86rpx;
  990. }
  991. .authorizBox{
  992. width: 100vw;
  993. height: 100vh;
  994. background: rgba(0, 0, 0, 0.5);
  995. position: fixed;
  996. top: 0;
  997. left: 0;
  998. }
  999. .authorizCont{
  1000. margin-top: 30vh;
  1001. width: 564rpx;
  1002. height: 408rpx;
  1003. background: #FFFFFF;
  1004. border-radius: 24rpx;
  1005. margin-left: 93rpx;
  1006. position: relative;
  1007. }
  1008. .authorizCloseImg{
  1009. width: 62rpx;
  1010. height: 62rpx;
  1011. }
  1012. .sqLogoBox{
  1013. width: 180rpx;
  1014. height: 180rpx;
  1015. background: #FFFFFF;
  1016. border-radius: 90rpx;
  1017. text-align: center;
  1018. position: absolute;
  1019. top: -50rpx;
  1020. left: 192rpx;
  1021. }
  1022. .authorizName{
  1023. color: #333333;
  1024. line-height: 42rpx;
  1025. font-size: 30rpx;
  1026. text-align: center;
  1027. padding-top: 58rpx;
  1028. }
  1029. .authorizMs{
  1030. color: #999999;
  1031. line-height: 36rpx;
  1032. font-size: 26rpx;
  1033. width: 452rpx;
  1034. padding-top: 24rpx;
  1035. text-align: center;
  1036. margin-left: 56rpx;
  1037. }
  1038. .authorizContbutton{
  1039. width: 422rpx;
  1040. height: 88rpx;
  1041. background: #D53533;
  1042. border-radius: 44rpx;
  1043. line-height: 88rpx;
  1044. text-align: center;
  1045. font-size:30rpx;
  1046. color: #FFFFFF;
  1047. margin-top: 62rpx;
  1048. margin-left:71rpx;
  1049. }
  1050. .tuikuanBox {
  1051. width: 100%;
  1052. height: 100vh;
  1053. background: rgba(0, 0, 0, 0.4);
  1054. position: fixed;
  1055. left: 0;
  1056. top: 0;
  1057. z-index: 999;
  1058. }
  1059. .tuikuan {
  1060. width: 638rpx;
  1061. height: 664rpx;
  1062. background: #ffffff;
  1063. margin: 0 36rpx;
  1064. margin-top: 50%;
  1065. border-radius: 24rpx;
  1066. padding: 30rpx 20rpx;
  1067. }
  1068. .tuiTop {
  1069. display: flex;
  1070. justify-content: space-between;
  1071. margin-bottom: 36rpx;
  1072. }
  1073. .tuiTitle {
  1074. width: 56rpx;
  1075. height: 40rpx;
  1076. font-size: 28rpx;
  1077. font-weight: 500;
  1078. color: #3C3C3C;
  1079. line-height: 40rpx;
  1080. }
  1081. .contLine {
  1082. display: flex;
  1083. justify-content: space-between;
  1084. font-size: 28rpx;
  1085. padding: 30rpx 0;
  1086. border-bottom: 1px solid #EEEEEE;
  1087. }
  1088. .contlineLeft {
  1089. color: #666666;
  1090. line-height: 40rpx;
  1091. align-items: center;
  1092. }
  1093. .star {
  1094. width: 14rpx;
  1095. height: 14rpx;
  1096. padding-bottom: 5rpx;
  1097. }
  1098. .carModel {
  1099. width: 350rpx;
  1100. text-align: left;
  1101. }
  1102. .noColor {
  1103. color: #CCCCCC;
  1104. }
  1105. .carModelRight {
  1106. display: flex;
  1107. justify-content: flex-start;
  1108. align-items: center;
  1109. }
  1110. .contlineRight {
  1111. color: #333333;
  1112. line-height: 40rpx;
  1113. width: 400rpx;
  1114. text-align: right;
  1115. }
  1116. .contlineRightInput {
  1117. color: #333333;
  1118. text-align: left;
  1119. font-size: 28rpx;
  1120. min-height: 182rpx;
  1121. width: 400rpx;
  1122. }
  1123. .contlineRightJt {
  1124. width: 30rpx;
  1125. height: 30rpx;
  1126. }
  1127. .tuiBtns {
  1128. display: flex;justify-content: space-around;
  1129. padding: 40rpx 20rpx 10rpx;
  1130. }
  1131. .btn {
  1132. width: 250rpx;
  1133. height: 70rpx;
  1134. background: #F4F5F7;
  1135. border-radius: 10rpx;
  1136. font-size: 28rpx;
  1137. font-weight: 500;
  1138. color: #3C3C3C;
  1139. line-height: 70rpx;
  1140. text-align: center;
  1141. }
  1142. .btn2 {
  1143. width: 250rpx;
  1144. height: 70rpx;
  1145. background: #3F90F7;
  1146. border-radius: 10rpx;
  1147. font-size: 28rpx;
  1148. font-weight: 500;
  1149. color: #FFFFFF;
  1150. line-height: 70rpx;
  1151. text-align: center;
  1152. }
  1153. .writeoffLine{
  1154. display: flex;justify-content: space-between;
  1155. color: #999999;font-size: 24rpx;
  1156. line-height: 33rpx;padding-top: 8rpx;
  1157. }
  1158. .writeoffLineBox{
  1159. padding: 0 20rpx;
  1160. }
  1161. .detailedLineBox .detailedLine{
  1162. padding-bottom: 0rpx;
  1163. }
  1164. .writeoffXx .informationNum{
  1165. width: 500rpx;
  1166. }
  1167. .detailedLineBox{
  1168. padding-bottom: 10rpx;
  1169. }
  1170. .shuaxin{
  1171. color: #333333;
  1172. height: 72rpx;
  1173. background: #FDF7EB;
  1174. line-height: 72rpx;
  1175. padding-left: 24rpx;
  1176. font-size: 26rpx;
  1177. }
  1178. </style>