paintOrderDetail.vue 31 KB

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