mallOrderDetail.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631
  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.orderSheet.sheetState == 1">待付款</view>
  7. <view class="SheetState" v-if="orderData.orderSheet.sheetState == 2">待服务</view>
  8. <view class="SheetState" v-if="orderData.orderSheet.sheetState == 3">已完成</view>
  9. <view class="SheetState" v-if="orderData.orderSheet.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}}轮毂去污护理(4支)</view>
  35. <view class="informationLine2">
  36. <view class="informationNum">¥{{orderData.OpenSheetQRCodeList.totalPrice}}24</view>
  37. <view class="informationNum">
  38. x2{{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> 938393 <span class="quanState"
  44. v-if="v.WriteoffState==3">待使用</span></view>
  45. <view class="detailedName old"><span class="redPoint"></span> 938393 <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">
  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;">¥235{{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}}</view>
  130. </view>
  131. </view>
  132. <view style="height: 50rpx;background-color: #F4F5F7;"></view>
  133. <view class="bottom" v-if="orderData.orderSheet.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. orderData: '',
  145. }
  146. },
  147. onLoad(opt) {
  148. this.id = opt.id
  149. if (this.id) {
  150. this.getData()
  151. }
  152. },
  153. methods: {
  154. copy(txt) {
  155. uni.setClipboardData({
  156. data: txt,
  157. success: function() {
  158. uni.showToast({
  159. title: '复制成功',
  160. icon: 'none',
  161. duration: 2000
  162. });
  163. }
  164. });
  165. },
  166. upTime() {
  167. uni.showLoading({
  168. title: '加载中'
  169. })
  170. var that = this
  171. this.$http('openreservation/carOwner/updateTimeOfAppointment', {
  172. id: this.id,
  173. shopId: this.orderData.shopInfo.id,
  174. billDate: this.billDate
  175. }, 'POST').then(res => {
  176. uni.hideLoading();
  177. // var list = res.data.Items
  178. var list = res.data
  179. console.log("result+=", res.data);
  180. uni.showToast({
  181. title: '延期成功',
  182. icon: 'none',
  183. duration: 2000
  184. });
  185. setTimeout(function() {
  186. that.getData();
  187. }, 1000);
  188. })
  189. },
  190. cancelBespeak() {
  191. uni.showLoading({
  192. title: '加载中'
  193. })
  194. var that = this
  195. this.$http('openOrderManagement/updateSheetState', {
  196. id: this.id,
  197. }, 'POST').then(res => {
  198. uni.hideLoading();
  199. // var list = res.data.Items
  200. var list = res.data
  201. uni.showToast({
  202. title: '取消成功',
  203. icon: 'none',
  204. duration: 2000
  205. });
  206. setTimeout(function() {
  207. that.getData();
  208. }, 1000);
  209. })
  210. },
  211. map() {
  212. console.log("打开地图")
  213. var that = this;
  214. if (!that.orderData.shopInfo.lat || !that.orderData.shopInfo.lng) {
  215. uni.showToast({
  216. title: '该店铺未设置定位',
  217. icon: 'none',
  218. duration: 3000
  219. });
  220. } else {
  221. uni.openLocation({
  222. latitude: Number(that.orderData.shopInfo.lat),
  223. longitude: Number(that.orderData.shopInfo.lng),
  224. name: that.orderData.shopInfo.shopName,
  225. address: that.orderData.shopInfo.provinceName + that.orderData.shopInfo.cityName + that
  226. .orderData.shopInfo.areaName + that.orderData.shopInfo.address,
  227. success: function() {
  228. console.log('success');
  229. },
  230. fail(err) {
  231. console.log(err)
  232. }
  233. });
  234. }
  235. },
  236. call() {
  237. uni.makePhoneCall({
  238. phoneNumber: this.orderData.orderSheet.mobilePhone
  239. });
  240. },
  241. getData() {
  242. uni.showLoading({
  243. title: '加载中'
  244. });
  245. this.$http('openOrderManagement/queryOpenSheet', {
  246. id: this.id,
  247. }, 'GET').then(res => {
  248. uni.hideLoading();
  249. this.orderData = res.data;
  250. })
  251. },
  252. goback() {
  253. uni.navigateBack({})
  254. },
  255. },
  256. onPullDownRefresh() {
  257. this.getData()
  258. setTimeout(function() {
  259. uni.stopPullDownRefresh();
  260. }, 1000);
  261. },
  262. }
  263. </script>
  264. <style scoped>
  265. .box {
  266. min-height: 100vh;
  267. background: #F4F5F7;
  268. }
  269. .top {
  270. height: 190rpx;
  271. background-color: #FF0000;
  272. }
  273. .orderState {
  274. display: flex;
  275. justify-content: center;
  276. align-items: center;
  277. padding-top: 40rpx;
  278. }
  279. .SheetState {
  280. display: flex;
  281. justify-content: center;
  282. font-size: 36rpx;
  283. font-weight: 500;
  284. color: #FFFFFF;
  285. margin-left: 15rpx;
  286. }
  287. .timeEditImg {
  288. width: 25rpx;
  289. height: 25rpx;
  290. padding-left: 20rpx;
  291. }
  292. .shopBoximg {
  293. width: 40rpx;
  294. height: 40rpx;
  295. }
  296. .shopRightImg {
  297. width: 44rpx;
  298. height: 45rpx;
  299. }
  300. .shopsx {
  301. width: 1px;
  302. height: 50rpx;
  303. background: #EEEEEE;
  304. margin-top: 30rpx;
  305. margin-left: 28rpx;
  306. }
  307. .shopBox {
  308. display: flex;
  309. padding: 30rpx 20rpx;
  310. margin: 0rpx 24rpx;
  311. margin-top: -60rpx;
  312. background-color: #FFFFFF;
  313. border-radius: 10rpx;
  314. }
  315. .shopCont {
  316. width: 405rpx;
  317. padding-left: 20rpx;
  318. }
  319. .shopName {
  320. font-size: 30rpx;
  321. font-weight: bold;
  322. color: #3C3C3C;
  323. line-height: 42rpx;
  324. }
  325. .Address {
  326. color: #999999;
  327. font-size: 24rpx;
  328. margin-top: 10rpx;
  329. }
  330. .shopRihgtTxt {
  331. color: #999999;
  332. font-size: 24rpx;
  333. }
  334. .shopRightBox {
  335. padding-left: 28rpx;
  336. }
  337. .detailedTitle {
  338. padding: 23rpx 20rpx;
  339. display: flex;
  340. text-align: center;
  341. align-content: flex-start;
  342. border-bottom: 1rpx solid #EEEEEE;
  343. font-size: 30rpx;
  344. font-weight: bold;
  345. color: #3C3C3C;
  346. }
  347. .detailedLine {
  348. display: flex;
  349. padding: 15rpx 20rpx;
  350. justify-content: space-between;
  351. align-items: center;
  352. }
  353. .detailedImg {
  354. width: 120rpx;
  355. height: 120rpx;
  356. border-radius: 10rpx;
  357. }
  358. .detailedName {
  359. font-size: 26rpx;
  360. color: #333333;
  361. }
  362. .old {
  363. color: #999999;
  364. text-decoration: line-through;
  365. }
  366. .redPoint {
  367. width: 10rpx;
  368. height: 10rpx;
  369. background: #FF0000;
  370. border-radius: 5rpx;
  371. margin-right: 10rpx;
  372. }
  373. .information {
  374. background: #FFFFFF;
  375. border-radius: 10rpx;
  376. margin: 20rpx 24rpx;
  377. padding-bottom: 15rpx;
  378. }
  379. .informationLine {
  380. display: flex;
  381. padding: 15rpx 20rpx;
  382. }
  383. .informationLine2 {
  384. display: flex;
  385. justify-content: space-between;
  386. font-size: 26rpx;
  387. padding: 15rpx 20rpx;
  388. }
  389. .money {
  390. background: #FFFFFF;
  391. border-radius: 10rpx;
  392. margin: 20rpx 24rpx;
  393. display: flex;
  394. justify-content: space-between;
  395. font-size: 26rpx;
  396. padding: 30rpx 20rpx;
  397. }
  398. .informationTxt {
  399. width: 190rpx;
  400. font-size: 26rpx;
  401. color: #999999;
  402. }
  403. .goodsName {
  404. padding: 20rpx 20rpx 15rpx;
  405. border-top: 1rpx solid #EEEEEE;
  406. color: #333333;
  407. font-size: 26rpx;
  408. }
  409. .informationNum {
  410. color: #333333;
  411. font-size: 26rpx;
  412. }
  413. .codeCopy {
  414. width: 77rpx;
  415. height: 36rpx;
  416. background: #F4F5F7;
  417. border-radius: 22rpx;
  418. font-size: 24rpx;
  419. color: #333333;
  420. text-align: center;
  421. line-height: 33rpx;
  422. padding: 0 15rpx;
  423. }
  424. .orderBottom {
  425. width: 750rpx;
  426. height: 98rpx;
  427. background: #FFFFFF;
  428. position: fixed;
  429. left: 0;
  430. bottom: 0;
  431. display: flex;
  432. justify-content: flex-end;
  433. }
  434. .bottom {
  435. display: flex;
  436. justify-content: flex-end;
  437. padding: 20rpx;
  438. background-color: #FFFFFF;
  439. align-items: center;
  440. height: 98rpx;
  441. width: 100vw;
  442. position: fixed;
  443. bottom: 0rpx;
  444. }
  445. .cancel {
  446. color: #3C3C3C;
  447. font-size: 28rpx;
  448. width: 150rpx;
  449. height: 56rpx;
  450. border-radius: 36rpx;
  451. border: 1rpx solid #DDDDDD;
  452. text-align: center;
  453. line-height: 56rpx;
  454. margin-right: 40rpx;
  455. }
  456. .defer {
  457. color: #D53533;
  458. font-size: 28rpx;
  459. width: 150rpx;
  460. height: 56rpx;
  461. border-radius: 36rpx;
  462. border: 1rpx solid #D53533;
  463. text-align: center;
  464. line-height: 56rpx;
  465. margin-right: 40rpx;
  466. }
  467. .itemBox {
  468. margin: 20rpx;
  469. border-radius: 10rpx;
  470. border: 2rpx solid #EEEEEE;
  471. }
  472. .itemTop {
  473. padding: 18rpx 20rpx;
  474. background-color: #FFEFD5;
  475. display: flex;
  476. justify-content: space-between;
  477. align-content: center;
  478. }
  479. .topTitle {
  480. font-size: 26rpx;
  481. color: #333333;
  482. margin-right: 10rpx;
  483. }
  484. .leftItem {
  485. flex-grow: 1;
  486. }
  487. .itemContent {
  488. padding: 20rpx;
  489. background-color: #FFFFFF;
  490. display: flex;
  491. justify-content: space-between;
  492. align-content: center;
  493. }
  494. </style>