mallOrderDetail.vue 31 KB

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