details.vue 9.4 KB

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