details.vue 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476
  1. <template>
  2. <!-- <view class="page" :style="{'min-height':h+'px'}"> -->
  3. <view class="page">
  4. <view class="" style="height: 100%; padding-bottom: 260rpx;">
  5. <view class="head">
  6. <text v-if='list.state==0' class="orange">待支付</text>
  7. <text v-else-if='list.state==1' class="red">已支付</text>
  8. <text v-else-if='list.state==-1' class="red">已取消</text>
  9. <text v-else-if='list.state==-2' class="green">退款中</text>
  10. <text v-else-if='list.state==3' class="green">已完成</text>
  11. <text v-else-if='list.state==-3' class="green">已退款</text>
  12. <text v-else-if='list.state==4' class="red">待使用</text>
  13. <text v-else-if='list.state==5' class="green">已预约</text>
  14. <text v-else :class="statusClass[list.state]">{{status[list.state]}}</text>
  15. <!-- <text>¥</text> -->
  16. <!-- <text>{{list.totalPrice}}</text> -->
  17. </view>
  18. <view class="ticketInfo">
  19. <view class="hander-titles">
  20. <view class="image">
  21. <image src="https://i.ringzle.com/file/20240225/0db2e93d80054b459c6e40466fa852c0.png" mode="">
  22. </image>
  23. </view>
  24. <view class="names">
  25. {{list.fishermanName}}
  26. </view>
  27. <view class="rights">
  28. <u-icon name="arrow-right"></u-icon>
  29. </view>
  30. </view>
  31. <view class="ticketInfo-hander">
  32. <view class="image">
  33. <image :src="list.pic" mode="aspectFill"></image>
  34. </view>
  35. <view class="" style="width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between;">
  36. <view class="name" style="display: flex; justify-content: space-between;">
  37. <view class="">
  38. {{list.thingName}}
  39. </view>
  40. <view class="" style="display: flex;align-items: center;;" @click="cardBtn(list)">
  41. <!-- <text style="color: #01B9F9; font-size: 26rpx ; font-weight: 500;">
  42. </text><u-icon name="arrow-right" color="#808080" size="26rpx"></u-icon> -->
  43. ¥{{list.totalPrice}}
  44. </view>
  45. </view>
  46. <view class="date">
  47. <view class="">
  48. 价格:<text>¥{{list.totalPrice}}/人</text>
  49. </view>
  50. <view class="">
  51. 数量:<text>X{{list.num}}</text>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. <view class="ticketInfo-demo">
  57. </view>
  58. </view>
  59. <!-- 订单信息 -->
  60. <view class="orderInfo " style="padding-bottom: 30rpx;">
  61. <view class="tit">订单信息</view>
  62. <u-cell :border="true">
  63. <text slot="icon" class="txt">订单编号</text>
  64. >
  65. <text slot="title" class="val">{{list.orderCode}}</text>
  66. <text slot="right-icon" class="icon"
  67. style="border: 1rpx solid #007A69; border-radius: 50rpx; box-sizing: border-box; color: #007A69;padding: 2rpx 10rpx; font-size: 22rpx; font-weight: Regular;"
  68. @tap="copyOrderNo(list)">复制</text>
  69. </u-cell>
  70. <u-cell :border="true">
  71. <text slot="icon" class="txt">下单时间</text>
  72. >
  73. <text slot="title" class="val">{{list.orderTime}}</text>
  74. </u-cell>
  75. <u-cell :border="true">
  76. <text slot="icon" class="txt">联系人</text>
  77. >
  78. <text slot="title" class="val">{{list.userName}}</text>
  79. </u-cell>
  80. <u-cell :border="true">
  81. <text slot="icon" class="txt">联系方式</text>
  82. >
  83. <text slot="title" class="val">{{list.phone}}</text>
  84. </u-cell>
  85. <u-cell :border="true">
  86. <text slot="icon" class="txt">支付方式</text>
  87. >
  88. <text slot="title" class="val">微信支付</text>
  89. </u-cell>
  90. </view>
  91. </view>
  92. <view class="btns">
  93. <template @click="handleDetail(list)" v-if="list.state==4||list.state==5">
  94. <view class="detail del">
  95. 核销订单
  96. </view>
  97. </template>
  98. <template @click="Detail(list)" v-else>
  99. <view class="detail">
  100. 删除订单
  101. </view>
  102. </template>
  103. </view>
  104. </view>
  105. </template>
  106. <script>
  107. export default {
  108. data() {
  109. return {
  110. h: uni.getSystemInfoSync().windowHeight,
  111. mt: uni.getSystemInfoSync().statusBarHeight + 44,
  112. list: {},
  113. statusClass: [
  114. '',
  115. 'green',
  116. 'blue',
  117. 'grey',
  118. 'grey',
  119. ],
  120. }
  121. },
  122. onLoad(option) {
  123. // console.log(JSON.parse(option.list));
  124. this.list = JSON.parse(option.list)
  125. console.log('-----', this.list);
  126. },
  127. methods: {
  128. copyOrderNo(item) {
  129. let that = this;
  130. // #ifdef H5
  131. this.$copyText(item.orderCode).then(res => {
  132. this.$showToast('复制成功');
  133. })
  134. // #endif
  135. // #ifdef MP-WEIXIN
  136. uni.setClipboardData({
  137. data: item.orderCode,
  138. success(res) {
  139. that.$showToast('复制成功');
  140. },
  141. fail(err) {
  142. that.$showToast('复制失败');
  143. }
  144. })
  145. // #endif
  146. },
  147. // 删除订单
  148. toStatus() {
  149. this.$refs.uToast.show({
  150. type: 'success',
  151. title: '',
  152. message: "正在开发",
  153. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  154. })
  155. },
  156. }
  157. }
  158. </script>
  159. <style lang="scss" scoped>
  160. * {
  161. margin: 0;
  162. padding: 0;
  163. box-sizing: border-box;
  164. }
  165. .page {
  166. box-sizing: border-box;
  167. // height: 100%;
  168. background-color: #F5F8FA;
  169. }
  170. .ticketInfo-demo {
  171. // border-bottom: 2rpx solid #EFEFEF;
  172. margin-top: 40rpx;
  173. .demo-layout {
  174. display: flex;
  175. align-items: center;
  176. text-align: center;
  177. margin: 0 80rpx;
  178. }
  179. }
  180. .orderInfo {
  181. box-sizing: border-box;
  182. background-color: #fff;
  183. border-radius: 16rpx;
  184. width: 96%;
  185. margin: 0 auto 20rpx;
  186. .tit {
  187. font-size: 32rpx;
  188. color: #333;
  189. padding-left: 30rpx;
  190. padding-top: 40rpx;
  191. font-weight: 600;
  192. margin-bottom: 20rpx;
  193. }
  194. .txt {
  195. font-size: 28rpx;
  196. color: #808080;
  197. width: 115rpx;
  198. font-weight: Regular;
  199. }
  200. .icon {
  201. font-size: 28rpx;
  202. color: #333;
  203. font-weight: Regular;
  204. }
  205. .val {
  206. font-size: 28rpx;
  207. color: #333;
  208. font-weight: Regular;
  209. margin: 0 20rpx 0 30rpx;
  210. }
  211. }
  212. .ticketInfo {
  213. box-sizing: border-box;
  214. width: 96%;
  215. margin: 0 auto 20rpx;
  216. padding: 40rpx 24rpx 4rpx;
  217. border-radius: 20rpx;
  218. position: relative;
  219. background-color: #fff;
  220. z-index: 2;
  221. .hander-titles {
  222. display: flex;
  223. height: 32rpx;
  224. line-height: 32rpx;
  225. margin: 20rpx 0 30rpx 0;
  226. .image {
  227. width: 32rpx;
  228. height: 32rpx;
  229. border-radius: 16rpx;
  230. image {
  231. width: 100%;
  232. height: 100%;
  233. }
  234. }
  235. .names {
  236. font-size: 32rpx;
  237. color: #333333;
  238. font-weight: Bold;
  239. margin: 0rpx 16rpx 0rpx 10rpx;
  240. }
  241. }
  242. .ticketInfo-hander {
  243. display: flex;
  244. .image {
  245. width: 136rpx;
  246. height: 136rpx;
  247. border-radius: 12rpx;
  248. margin-right: 20rpx;
  249. image {
  250. width: 100%;
  251. height: 100%;
  252. }
  253. }
  254. }
  255. .name {
  256. font-size: 32rpx;
  257. color: #333;
  258. font-weight: bold;
  259. width: 100%;
  260. }
  261. .date {
  262. // padding: 20rpx 0 32rpx;
  263. padding-top: 20rpx;
  264. text {
  265. font-size: 26rpx;
  266. &:nth-child(1) {
  267. color: #808080;
  268. }
  269. &:nth-child(2) {
  270. color: #FF7D01;
  271. margin-left: 30rpx;
  272. }
  273. }
  274. }
  275. .topHead {
  276. width: 96%;
  277. margin: 0 auto;
  278. background-color: #F5F8FA;
  279. padding: 28rpx 0 28rpx 84rpx;
  280. border-radius: 16rpx;
  281. position: relative;
  282. text {
  283. position: absolute;
  284. left: 0;
  285. top: 0;
  286. z-index: 1;
  287. border-radius: 16rpx 0 0 16rpx;
  288. width: 48rpx;
  289. color: #fff;
  290. font-size: 20rpx;
  291. background-color: #484F61;
  292. text-align: center;
  293. height: 100%;
  294. padding: 15rpx 10rpx 0;
  295. }
  296. .p {
  297. font-size: 28rpx;
  298. color: #333;
  299. &:nth-of-type(1) {
  300. font-weight: 600;
  301. margin-bottom: 16rpx;
  302. }
  303. }
  304. }
  305. .code {
  306. margin-top: 40rpx;
  307. text-align: center;
  308. position: relative;
  309. .cover,
  310. .sx {
  311. position: absolute;
  312. background-color: rgba(255, 255, 255, 0.5);
  313. width: 340rpx;
  314. height: 340rpx;
  315. top: 66rpx;
  316. left: 50%;
  317. transform: translate(-50%, 0);
  318. }
  319. .sx {
  320. width: 120rpx;
  321. height: 120rpx;
  322. top: 150rpx;
  323. background: transparent;
  324. }
  325. .txt {
  326. font-size: 28rpx;
  327. }
  328. image {
  329. width: 340rpx;
  330. height: 340rpx;
  331. margin: 30rpx 0;
  332. }
  333. }
  334. }
  335. .head {
  336. box-sizing: border-box;
  337. padding: 34rpx 24rpx 40rpx;
  338. // display: flex;
  339. // position: relative;
  340. // z-index: 2;
  341. text {
  342. color: #fff;
  343. &:nth-child(1),
  344. &:nth-child(3) {
  345. font-size: 44rpx;
  346. font-weight: Bold;
  347. }
  348. &:nth-child(2) {
  349. flex: 1;
  350. text-align: right;
  351. width: 100px;
  352. font-size: 36rpx;
  353. }
  354. }
  355. .red {
  356. color: indianred;
  357. }
  358. .green {
  359. color: #111111;
  360. }
  361. .blue {
  362. color: #1372FF;
  363. }
  364. .grey {
  365. color: #4C5F76;
  366. }
  367. .orange {
  368. color: #FF9100;
  369. }
  370. }
  371. .btns {
  372. box-sizing: border-box;
  373. width: 100%;
  374. position: fixed;
  375. bottom: 0;
  376. z-index: 4;
  377. left: 0;
  378. display: flex;
  379. padding: 32rpx 32rpx 50rpx;
  380. background-color: #fff;
  381. gap: 0 20rpx;
  382. box-shadow: 0 -8rpx 16rpx rgba(0, 0, 0, 0.06);
  383. &>view {
  384. // width: calc(50% - 15rpx);
  385. width: 100%;
  386. height: 80rpx;
  387. border-radius: 46rpx;
  388. // border: 1rpx solid #999999;
  389. line-height: 80rpx;
  390. text-align: center;
  391. font-size: 28rpx;
  392. font-family: PingFangSC-Regular, PingFang SC;
  393. font-weight: Bold;
  394. color: #FFFFFF;
  395. // background-color: #F6F6F6;
  396. background-color: #007A69;
  397. }
  398. }
  399. </style>