details.vue 9.2 KB

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