paintOrderDetail.vue 31 KB

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