paintOrderDetail.vue 32 KB

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