detailsewm.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493
  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. console.log('111111111111111111',option)
  125. //this.list = uni.getStorageSync('list');
  126. // this.list = JSON.parse(option.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. uni.navigateTo({
  157. url: '/pagesHouse/Mine/ordersList/outcome'
  158. })
  159. }
  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. width: 100%;
  266. height: 100%;
  267. }
  268. }
  269. }
  270. .name {
  271. font-size: 32rpx;
  272. color: #333;
  273. font-weight: bold;
  274. width: 100%;
  275. }
  276. .date {
  277. // padding: 20rpx 0 32rpx;
  278. padding-top: 20rpx;
  279. text {
  280. font-size: 26rpx;
  281. &:nth-child(1) {
  282. color: #808080;
  283. }
  284. &:nth-child(2) {
  285. color: #FF7D01;
  286. margin-left: 30rpx;
  287. }
  288. }
  289. }
  290. .topHead {
  291. width: 96%;
  292. margin: 0 auto;
  293. background-color: #F5F8FA;
  294. padding: 28rpx 0 28rpx 84rpx;
  295. border-radius: 16rpx;
  296. position: relative;
  297. text {
  298. position: absolute;
  299. left: 0;
  300. top: 0;
  301. z-index: 1;
  302. border-radius: 16rpx 0 0 16rpx;
  303. width: 48rpx;
  304. color: #fff;
  305. font-size: 20rpx;
  306. background-color: #484F61;
  307. text-align: center;
  308. height: 100%;
  309. padding: 15rpx 10rpx 0;
  310. }
  311. .p {
  312. font-size: 28rpx;
  313. color: #333;
  314. &:nth-of-type(1) {
  315. font-weight: 600;
  316. margin-bottom: 16rpx;
  317. }
  318. }
  319. }
  320. .code {
  321. margin-top: 40rpx;
  322. text-align: center;
  323. position: relative;
  324. .cover,
  325. .sx {
  326. position: absolute;
  327. background-color: rgba(255, 255, 255, 0.5);
  328. width: 340rpx;
  329. height: 340rpx;
  330. top: 66rpx;
  331. left: 50%;
  332. transform: translate(-50%, 0);
  333. }
  334. .sx {
  335. width: 120rpx;
  336. height: 120rpx;
  337. top: 150rpx;
  338. background: transparent;
  339. }
  340. .txt {
  341. font-size: 28rpx;
  342. }
  343. image {
  344. width: 340rpx;
  345. height: 340rpx;
  346. margin: 30rpx 0;
  347. }
  348. }
  349. }
  350. .head {
  351. box-sizing: border-box;
  352. padding: 34rpx 24rpx 40rpx;
  353. // display: flex;
  354. // position: relative;
  355. // z-index: 2;
  356. text {
  357. color: #fff;
  358. &:nth-child(1),
  359. &:nth-child(3) {
  360. font-size: 44rpx;
  361. font-weight: Bold;
  362. }
  363. &:nth-child(2) {
  364. flex: 1;
  365. text-align: right;
  366. width: 100px;
  367. font-size: 36rpx;
  368. }
  369. }
  370. .red {
  371. color: indianred;
  372. }
  373. .green {
  374. color: #111111;
  375. }
  376. .blue {
  377. color: #1372FF;
  378. }
  379. .grey {
  380. color: #4C5F76;
  381. }
  382. .orange {
  383. color: #FF9100;
  384. }
  385. }
  386. .btns {
  387. box-sizing: border-box;
  388. width: 100%;
  389. position: fixed;
  390. bottom: 0;
  391. z-index: 4;
  392. left: 0;
  393. display: flex;
  394. padding: 32rpx 32rpx 50rpx;
  395. background-color: #fff;
  396. gap: 0 20rpx;
  397. box-shadow: 0 -8rpx 16rpx rgba(0, 0, 0, 0.06);
  398. &>view {
  399. // width: calc(50% - 15rpx);
  400. width: 100%;
  401. height: 80rpx;
  402. border-radius: 46rpx;
  403. // border: 1rpx solid #999999;
  404. line-height: 80rpx;
  405. text-align: center;
  406. font-size: 28rpx;
  407. font-family: PingFangSC-Regular, PingFang SC;
  408. font-weight: Bold;
  409. color: #FFFFFF;
  410. // background-color: #F6F6F6;
  411. background-color: #007A69;
  412. }
  413. }
  414. </style>