mallOrderDetail.vue 33 KB

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