mallOrderDetail.vue 33 KB

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