paintOrderDetail.vue 32 KB

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