mallOrderDetail.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635
  1. <template>
  2. <view class="box">
  3. <view class="top">
  4. <view class="orderState">
  5. <image src="../../../static/img/icon_order_def.png" mode="" style="width: 44rpx;height: 44rpx;"></image>
  6. <view class="SheetState" v-if="orderData.data.sheetState == 1">待付款</view>
  7. <view class="SheetState" v-if="orderData.data.sheetState == 2">待服务</view>
  8. <view class="SheetState" v-if="orderData.data.sheetState == 3">已完成</view>
  9. <view class="SheetState" v-if="orderData.data.sheetState == 4">已取消</view>
  10. </view>
  11. </view>
  12. <!-- 店铺信息 -->
  13. <view class="shopBox">
  14. <image src="../../../static/img/icon_store.png" mode="" class="shopBoximg"></image>
  15. <view class="shopCont">
  16. <view class="shopName">{{orderData.shopInfo.shopName}}</view>
  17. <view class="Address">
  18. {{orderData.shopInfo.provinceName}}{{orderData.shopInfo.cityName}}{{orderData.shopInfo.areaName}}{{orderData.shopInfo.address}}
  19. </view>
  20. </view>
  21. <view class="shopRightBox" @click="map">
  22. <image src="../../../static/img/icon_ditu.png" mode="" class="shopRightImg"></image>
  23. <view class="shopRihgtTxt">地图</view>
  24. </view>
  25. <view class="shopsx"></view>
  26. <view class="shopRightBox" @click="call">
  27. <image src="../../../static/img/icon_phone.png" mode="" class="shopRightImg"></image>
  28. <view class="shopRihgtTxt">电话</view>
  29. </view>
  30. </view>
  31. <!-- 订单内容 -->
  32. <view class="information">
  33. <view class="detailedTitle">订单内容</view>
  34. <view class="goodsName">{{orderData.OpenSheetQRCodeList.itemName}}</view>
  35. <view class="informationLine2">
  36. <view class="informationNum">¥{{orderData.OpenSheetQRCodeList.totalPrice}}</view>
  37. <view class="informationNum">
  38. x{{orderData.OpenSheetQRCodeList.noWriteoffQty+orderData.OpenSheetQRCodeList.writeoffQty}}</view>
  39. </view>
  40. <view>
  41. <view class="goodsName">券码信息({{orderData.OpenSheetQRCodeList.noWriteoffQty}}张可用)</view>
  42. <view class="detailedLine" v-for="(v,index) in orderData.OpenSheetQRCodeList.OpenSheetQRCode">
  43. <view class="detailedName"><span class="redPoint"></span><span class="quanState"
  44. v-if="v.WriteoffState==3">待使用</span></view>
  45. <view class="detailedName old"><span class="redPoint"></span><span class="quanState"
  46. v-if="v.WriteoffState==1">已使用</span></view>
  47. <image src="../../../static/img/icon_erweima.png" mode="" style="width: 36rpx;height: 36rpx;"
  48. v-if="v.WriteoffState==3"></image>
  49. </view>
  50. </view>
  51. </view>
  52. <!-- 套餐内容 -->
  53. <view class="information" v-if="SheetType==3">
  54. <view class="detailedTitle">套餐内容</view>
  55. <!-- 项目 -->
  56. <view class="itemBox">
  57. <!-- 头 -->
  58. <view class="itemTop">
  59. <view class="topTitle leftItem">项目名称</view>
  60. <view class="topTitle">数量</view>
  61. <view class="topTitle">有效期</view>
  62. </view>
  63. <view v-for="(item,index) in orderData.projectList" :key="index">
  64. <view class="itemContent">
  65. <view class="topTitle leftItem">{{item.flowName}}</view>
  66. <view class="topTitle">{{item.flowQty}}</view>
  67. <view class="topTitle">{{item.date}}</view>
  68. </view>
  69. </view>
  70. </view>
  71. <!-- 商品 -->
  72. <view class="itemBox">
  73. <!-- 头 -->
  74. <view class="itemTop">
  75. <view class="topTitle leftItem">商品名称</view>
  76. <view class="topTitle">数量</view>
  77. <view class="topTitle">有效期</view>
  78. </view>
  79. <view v-for="(item,index) in orderData.shopList" :key="index">
  80. <view class="itemContent">
  81. <view class="topTitle leftItem">{{item.flowName}}</view>
  82. <view class="topTitle">{{item.flowQty}}</view>
  83. <view class="topTitle">{{item.date}}</view>
  84. </view>
  85. </view>
  86. </view>
  87. </view>
  88. <!-- 实付款 -->
  89. <view class="money">
  90. <view class="informationNum">实付款:</view>
  91. <view class="informationNum" style="color: #FF0000;">¥{{orderData.data.realMoney}}</view>
  92. </view>
  93. <!-- 订单信息 -->
  94. <view class="information">
  95. <view class="detailedTitle">订单信息</view>
  96. <view class="informationLine">
  97. <view class="informationTxt">订单单号:</view>
  98. <view class="informationNum">{{orderData.data.code}}<span class="codeCopy"
  99. @click="copy(orderData.data.code)">复制</span></view>
  100. </view>
  101. <view class="informationLine">
  102. <view class="informationTxt">下单人:</view>
  103. <view class="informationNum">{{orderData.data.nickName}}</view>
  104. </view>
  105. <view class="informationLine">
  106. <view class="informationTxt">下单时间:</view>
  107. <view class="informationNum">{{orderData.data.createTime}}</view>
  108. </view>
  109. <view class="informationLine">
  110. <view class="informationTxt">订单备注:</view>
  111. <view class="informationNum">{{orderData.data.comment}}</view>
  112. </view>
  113. </view>
  114. <!-- 支付信息 -->
  115. <view class="information">
  116. <view class="detailedTitle">支付信息</view>
  117. <view class="informationLine">
  118. <view class="informationTxt">支付状态:</view>
  119. <view class="informationNum" v-if="orderData.data.payState==1">未支付</view>
  120. <view class="informationNum" v-if="orderData.data.payState==2">已支付</view>
  121. </view>
  122. <view class="informationLine">
  123. <view class="informationTxt">支付方式:</view>
  124. <view class="informationNum" v-if="orderData.data.payType==1">在线支付</view>
  125. <view class="informationNum" v-if="orderData.data.payType==2">线下支付</view>
  126. </view>
  127. <view class="informationLine">
  128. <view class="informationTxt">支付时间:</view>
  129. <view class="informationNum">{{orderData.data.payTime?orderData.data.payTime:'-'}}</view>
  130. </view>
  131. </view>
  132. <view style="height: 50rpx;background-color: #F4F5F7;"></view>
  133. <view class="bottom" v-if="orderData.data.sheetState == 1">
  134. <view class="cancel" @click="cancelBespeak">取消订单</view>
  135. <view class="defer" @click="pay">立即支付</view>
  136. </view>
  137. </view>
  138. </template>
  139. <script>
  140. export default {
  141. data() {
  142. return {
  143. id: '',
  144. SheetType:'',//SheetType 1 商品2项目3套餐4救援5钣喷6集客
  145. orderData: '',
  146. }
  147. },
  148. onLoad(opt) {
  149. this.id = opt.id
  150. this.SheetType = opt.SheetType
  151. if (this.id) {
  152. this.getData()
  153. }
  154. },
  155. methods: {
  156. copy(txt) {
  157. uni.setClipboardData({
  158. data: txt,
  159. success: function() {
  160. uni.showToast({
  161. title: '复制成功',
  162. icon: 'none',
  163. duration: 2000
  164. });
  165. }
  166. });
  167. },
  168. upTime() {
  169. uni.showLoading({
  170. title: '加载中'
  171. })
  172. var that = this
  173. this.$http('openreservation/carOwner/updateTimeOfAppointment', {
  174. id: this.id,
  175. shopId: this.orderData.shopInfo.id,
  176. billDate: this.billDate
  177. }, 'POST').then(res => {
  178. uni.hideLoading();
  179. // var list = res.data.Items
  180. var list = res.data
  181. console.log("result+=", res.data);
  182. uni.showToast({
  183. title: '延期成功',
  184. icon: 'none',
  185. duration: 2000
  186. });
  187. setTimeout(function() {
  188. that.getData();
  189. }, 1000);
  190. })
  191. },
  192. cancelBespeak() {
  193. uni.showLoading({
  194. title: '加载中'
  195. })
  196. var that = this
  197. this.$http('openOrderManagement/updateSheetState', {
  198. id: this.id,
  199. }, 'POST').then(res => {
  200. uni.hideLoading();
  201. // var list = res.data.Items
  202. var list = res.data
  203. uni.showToast({
  204. title: '取消成功',
  205. icon: 'none',
  206. duration: 2000
  207. });
  208. setTimeout(function() {
  209. that.getData();
  210. }, 1000);
  211. })
  212. },
  213. map() {
  214. console.log("打开地图")
  215. var that = this;
  216. if (!that.orderData.shopInfo.lat || !that.orderData.shopInfo.lng) {
  217. uni.showToast({
  218. title: '该店铺未设置定位',
  219. icon: 'none',
  220. duration: 3000
  221. });
  222. } else {
  223. uni.openLocation({
  224. latitude: Number(that.orderData.shopInfo.lat),
  225. longitude: Number(that.orderData.shopInfo.lng),
  226. name: that.orderData.shopInfo.shopName,
  227. address: that.orderData.shopInfo.provinceName + that.orderData.shopInfo.cityName + that
  228. .orderData.shopInfo.areaName + that.orderData.shopInfo.address,
  229. success: function() {
  230. console.log('success');
  231. },
  232. fail(err) {
  233. console.log(err)
  234. }
  235. });
  236. }
  237. },
  238. call() {
  239. uni.makePhoneCall({
  240. phoneNumber: this.orderData.orderSheet.mobilePhone
  241. });
  242. },
  243. getData() {
  244. uni.showLoading({
  245. title: '加载中'
  246. });
  247. this.$http('openOrderManagement/queryOpenSheet', {
  248. id: this.id,
  249. }, 'GET').then(res => {
  250. uni.hideLoading();
  251. this.orderData = res.data;
  252. })
  253. },
  254. goback() {
  255. uni.navigateBack({})
  256. },
  257. },
  258. onPullDownRefresh() {
  259. this.getData()
  260. setTimeout(function() {
  261. uni.stopPullDownRefresh();
  262. }, 1000);
  263. },
  264. }
  265. </script>
  266. <style scoped>
  267. .box {
  268. min-height: 100vh;
  269. background: #F4F5F7;
  270. padding-bottom: 135rpx;
  271. }
  272. .top {
  273. height: 190rpx;
  274. background-color: #FF0000;
  275. }
  276. .orderState {
  277. display: flex;
  278. justify-content: center;
  279. align-items: center;
  280. padding-top: 40rpx;
  281. }
  282. .SheetState {
  283. display: flex;
  284. justify-content: center;
  285. font-size: 36rpx;
  286. font-weight: 500;
  287. color: #FFFFFF;
  288. margin-left: 15rpx;
  289. }
  290. .timeEditImg {
  291. width: 25rpx;
  292. height: 25rpx;
  293. padding-left: 20rpx;
  294. }
  295. .shopBoximg {
  296. width: 40rpx;
  297. height: 40rpx;
  298. }
  299. .shopRightImg {
  300. width: 44rpx;
  301. height: 45rpx;
  302. }
  303. .shopsx {
  304. width: 1px;
  305. height: 50rpx;
  306. background: #EEEEEE;
  307. margin-top: 30rpx;
  308. margin-left: 28rpx;
  309. }
  310. .shopBox {
  311. display: flex;
  312. padding: 30rpx 20rpx;
  313. margin: 0rpx 24rpx;
  314. margin-top: -60rpx;
  315. background-color: #FFFFFF;
  316. border-radius: 10rpx;
  317. }
  318. .shopCont {
  319. width: 405rpx;
  320. padding-left: 20rpx;
  321. }
  322. .shopName {
  323. font-size: 30rpx;
  324. font-weight: bold;
  325. color: #3C3C3C;
  326. line-height: 42rpx;
  327. }
  328. .Address {
  329. color: #999999;
  330. font-size: 24rpx;
  331. margin-top: 10rpx;
  332. }
  333. .shopRihgtTxt {
  334. color: #999999;
  335. font-size: 24rpx;
  336. }
  337. .shopRightBox {
  338. padding-left: 28rpx;
  339. }
  340. .detailedTitle {
  341. padding: 23rpx 20rpx;
  342. display: flex;
  343. text-align: center;
  344. align-content: flex-start;
  345. border-bottom: 1rpx solid #EEEEEE;
  346. font-size: 30rpx;
  347. font-weight: bold;
  348. color: #3C3C3C;
  349. }
  350. .detailedLine {
  351. display: flex;
  352. padding: 15rpx 20rpx;
  353. justify-content: space-between;
  354. align-items: center;
  355. }
  356. .detailedImg {
  357. width: 120rpx;
  358. height: 120rpx;
  359. border-radius: 10rpx;
  360. }
  361. .detailedName {
  362. font-size: 26rpx;
  363. color: #333333;
  364. }
  365. .old {
  366. color: #999999;
  367. text-decoration: line-through;
  368. }
  369. .redPoint {
  370. width: 10rpx;
  371. height: 10rpx;
  372. background: #FF0000;
  373. border-radius: 5rpx;
  374. margin-right: 10rpx;
  375. }
  376. .information {
  377. background: #FFFFFF;
  378. border-radius: 10rpx;
  379. margin: 20rpx 24rpx;
  380. padding-bottom: 15rpx;
  381. }
  382. .informationLine {
  383. display: flex;
  384. padding: 15rpx 20rpx;
  385. }
  386. .informationLine2 {
  387. display: flex;
  388. justify-content: space-between;
  389. font-size: 26rpx;
  390. padding: 15rpx 20rpx;
  391. }
  392. .money {
  393. background: #FFFFFF;
  394. border-radius: 10rpx;
  395. margin: 20rpx 24rpx;
  396. display: flex;
  397. justify-content: space-between;
  398. font-size: 26rpx;
  399. padding: 30rpx 20rpx;
  400. }
  401. .informationTxt {
  402. width: 190rpx;
  403. font-size: 26rpx;
  404. color: #999999;
  405. }
  406. .goodsName {
  407. padding: 20rpx 20rpx 15rpx;
  408. border-top: 1rpx solid #EEEEEE;
  409. color: #333333;
  410. font-size: 26rpx;
  411. }
  412. .informationNum {
  413. color: #333333;
  414. font-size: 26rpx;
  415. }
  416. .codeCopy {
  417. width: 77rpx;
  418. height: 36rpx;
  419. background: #F4F5F7;
  420. border-radius: 22rpx;
  421. font-size: 24rpx;
  422. color: #333333;
  423. text-align: center;
  424. line-height: 33rpx;
  425. padding: 0 15rpx;
  426. }
  427. .orderBottom {
  428. width: 750rpx;
  429. height: 98rpx;
  430. background: #FFFFFF;
  431. position: fixed;
  432. left: 0;
  433. bottom: 0;
  434. display: flex;
  435. justify-content: flex-end;
  436. }
  437. .bottom {
  438. display: flex;
  439. justify-content: flex-end;
  440. padding: 20rpx;
  441. background-color: #FFFFFF;
  442. align-items: center;
  443. height: 98rpx;
  444. width: 100vw;
  445. position: fixed;
  446. bottom: 0rpx;
  447. padding-bottom: constant(safe-area-inset-bottom);
  448. padding-bottom: env(safe-area-inset-bottom);
  449. }
  450. .cancel {
  451. color: #3C3C3C;
  452. font-size: 28rpx;
  453. width: 150rpx;
  454. height: 56rpx;
  455. border-radius: 36rpx;
  456. border: 1rpx solid #DDDDDD;
  457. text-align: center;
  458. line-height: 56rpx;
  459. margin-right: 40rpx;
  460. }
  461. .defer {
  462. color: #D53533;
  463. font-size: 28rpx;
  464. width: 150rpx;
  465. height: 56rpx;
  466. border-radius: 36rpx;
  467. border: 1rpx solid #D53533;
  468. text-align: center;
  469. line-height: 56rpx;
  470. margin-right: 40rpx;
  471. }
  472. .itemBox {
  473. margin: 20rpx;
  474. border-radius: 10rpx;
  475. border: 2rpx solid #EEEEEE;
  476. }
  477. .itemTop {
  478. padding: 18rpx 20rpx;
  479. background-color: #FFEFD5;
  480. display: flex;
  481. justify-content: space-between;
  482. align-content: center;
  483. }
  484. .topTitle {
  485. font-size: 26rpx;
  486. color: #333333;
  487. margin-right: 10rpx;
  488. }
  489. .leftItem {
  490. flex-grow: 1;
  491. }
  492. .itemContent {
  493. padding: 20rpx;
  494. background-color: #FFFFFF;
  495. display: flex;
  496. justify-content: space-between;
  497. align-content: center;
  498. }
  499. </style>