details.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492
  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.picList[0]" 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 v-if="list.state==4||list.state==5">
  94. <view class="detail del" @tap="handleDetail(list)">
  95. 核销订单
  96. </view>
  97. </template>
  98. <template v-else>
  99. <view class="detail" @tap="Detail(list)">
  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() {
  123. this.list = uni.getStorageSync('list')
  124. console.log(this.list);
  125. // console.log(JSON.parse(option.list));
  126. // this.list = JSON.parse(option.list)
  127. // console.log('-----', this.list);
  128. },
  129. methods: {
  130. copyOrderNo(item) {
  131. let that = this;
  132. // #ifdef H5
  133. this.$copyText(item.orderCode).then(res => {
  134. this.$showToast('复制成功');
  135. })
  136. // #endif
  137. // #ifdef MP-WEIXIN
  138. uni.setClipboardData({
  139. data: item.orderCode,
  140. success(res) {
  141. that.$showToast('复制成功');
  142. },
  143. fail(err) {
  144. that.$showToast('复制失败');
  145. }
  146. })
  147. // #endif
  148. },
  149. // 核销
  150. handleDetail(item) {
  151. uni.navigateTo({
  152. url: '/pagesHouse/Verification/index'
  153. })
  154. // console.log(item);
  155. // this.$api.post('/merchant/merchantFisherman/home/writeOffOrder', {
  156. // writeOffCode: item.orderCode
  157. // }).then(
  158. // res => {
  159. // console.log(res.data);
  160. // })
  161. },
  162. // 删除订单
  163. toStatus() {
  164. this.$refs.uToast.show({
  165. type: 'success',
  166. title: '',
  167. message: "正在开发",
  168. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  169. })
  170. },
  171. }
  172. }
  173. </script>
  174. <style lang="scss" scoped>
  175. * {
  176. margin: 0;
  177. padding: 0;
  178. box-sizing: border-box;
  179. }
  180. .page {
  181. box-sizing: border-box;
  182. // height: 100%;
  183. background-color: #F5F8FA;
  184. }
  185. .ticketInfo-demo {
  186. // border-bottom: 2rpx solid #EFEFEF;
  187. margin-top: 40rpx;
  188. .demo-layout {
  189. display: flex;
  190. align-items: center;
  191. text-align: center;
  192. margin: 0 80rpx;
  193. }
  194. }
  195. .orderInfo {
  196. box-sizing: border-box;
  197. background-color: #fff;
  198. border-radius: 16rpx;
  199. width: 96%;
  200. margin: 0 auto 20rpx;
  201. .tit {
  202. font-size: 32rpx;
  203. color: #333;
  204. padding-left: 30rpx;
  205. padding-top: 40rpx;
  206. font-weight: 600;
  207. margin-bottom: 20rpx;
  208. }
  209. .txt {
  210. font-size: 28rpx;
  211. color: #808080;
  212. width: 115rpx;
  213. font-weight: Regular;
  214. }
  215. .icon {
  216. font-size: 28rpx;
  217. color: #333;
  218. font-weight: Regular;
  219. }
  220. .val {
  221. font-size: 28rpx;
  222. color: #333;
  223. font-weight: Regular;
  224. margin: 0 20rpx 0 30rpx;
  225. }
  226. }
  227. .ticketInfo {
  228. box-sizing: border-box;
  229. width: 96%;
  230. margin: 0 auto 20rpx;
  231. padding: 40rpx 24rpx 4rpx;
  232. border-radius: 20rpx;
  233. position: relative;
  234. background-color: #fff;
  235. z-index: 2;
  236. .hander-titles {
  237. display: flex;
  238. height: 32rpx;
  239. line-height: 32rpx;
  240. margin: 20rpx 0 30rpx 0;
  241. .image {
  242. width: 32rpx;
  243. height: 32rpx;
  244. border-radius: 16rpx;
  245. image {
  246. width: 100%;
  247. height: 100%;
  248. }
  249. }
  250. .names {
  251. font-size: 32rpx;
  252. color: #333333;
  253. font-weight: Bold;
  254. margin: 0rpx 16rpx 0rpx 10rpx;
  255. }
  256. }
  257. .ticketInfo-hander {
  258. display: flex;
  259. .image {
  260. width: 136rpx;
  261. height: 136rpx;
  262. border-radius: 12rpx;
  263. margin-right: 20rpx;
  264. image {
  265. border-radius: 12rpx;
  266. width: 100%;
  267. height: 100%;
  268. }
  269. }
  270. }
  271. .name {
  272. font-size: 32rpx;
  273. color: #333;
  274. font-weight: bold;
  275. width: 100%;
  276. }
  277. .date {
  278. // padding: 20rpx 0 32rpx;
  279. padding-top: 20rpx;
  280. text {
  281. font-size: 26rpx;
  282. &:nth-child(1) {
  283. color: #808080;
  284. }
  285. &:nth-child(2) {
  286. color: #FF7D01;
  287. margin-left: 30rpx;
  288. }
  289. }
  290. }
  291. .topHead {
  292. width: 96%;
  293. margin: 0 auto;
  294. background-color: #F5F8FA;
  295. padding: 28rpx 0 28rpx 84rpx;
  296. border-radius: 16rpx;
  297. position: relative;
  298. text {
  299. position: absolute;
  300. left: 0;
  301. top: 0;
  302. z-index: 1;
  303. border-radius: 16rpx 0 0 16rpx;
  304. width: 48rpx;
  305. color: #fff;
  306. font-size: 20rpx;
  307. background-color: #484F61;
  308. text-align: center;
  309. height: 100%;
  310. padding: 15rpx 10rpx 0;
  311. }
  312. .p {
  313. font-size: 28rpx;
  314. color: #333;
  315. &:nth-of-type(1) {
  316. font-weight: 600;
  317. margin-bottom: 16rpx;
  318. }
  319. }
  320. }
  321. .code {
  322. margin-top: 40rpx;
  323. text-align: center;
  324. position: relative;
  325. .cover,
  326. .sx {
  327. position: absolute;
  328. background-color: rgba(255, 255, 255, 0.5);
  329. width: 340rpx;
  330. height: 340rpx;
  331. top: 66rpx;
  332. left: 50%;
  333. transform: translate(-50%, 0);
  334. }
  335. .sx {
  336. width: 120rpx;
  337. height: 120rpx;
  338. top: 150rpx;
  339. background: transparent;
  340. }
  341. .txt {
  342. font-size: 28rpx;
  343. }
  344. image {
  345. width: 340rpx;
  346. height: 340rpx;
  347. margin: 30rpx 0;
  348. }
  349. }
  350. }
  351. .head {
  352. box-sizing: border-box;
  353. padding: 34rpx 24rpx 40rpx;
  354. // display: flex;
  355. // position: relative;
  356. // z-index: 2;
  357. text {
  358. color: #fff;
  359. &:nth-child(1),
  360. &:nth-child(3) {
  361. font-size: 44rpx;
  362. font-weight: Bold;
  363. }
  364. &:nth-child(2) {
  365. flex: 1;
  366. text-align: right;
  367. width: 100px;
  368. font-size: 36rpx;
  369. }
  370. }
  371. .red {
  372. color: indianred;
  373. }
  374. .green {
  375. color: #111111;
  376. }
  377. .blue {
  378. color: #1372FF;
  379. }
  380. .grey {
  381. color: #4C5F76;
  382. }
  383. .orange {
  384. color: #FF9100;
  385. }
  386. }
  387. .btns {
  388. box-sizing: border-box;
  389. width: 100%;
  390. position: fixed;
  391. bottom: 0;
  392. z-index: 4;
  393. left: 0;
  394. display: flex;
  395. padding: 32rpx 32rpx 50rpx;
  396. background-color: #fff;
  397. gap: 0 20rpx;
  398. box-shadow: 0 -8rpx 16rpx rgba(0, 0, 0, 0.06);
  399. &>view {
  400. // width: calc(50% - 15rpx);
  401. width: 100%;
  402. height: 80rpx;
  403. border-radius: 46rpx;
  404. // border: 1rpx solid #999999;
  405. line-height: 80rpx;
  406. text-align: center;
  407. font-size: 28rpx;
  408. font-family: PingFangSC-Regular, PingFang SC;
  409. font-weight: Bold;
  410. color: #FFFFFF;
  411. // background-color: #F6F6F6;
  412. background-color: #007A69;
  413. }
  414. }
  415. </style>