hallorderDetail.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505
  1. <template>
  2. <view class="content">
  3. <view class="order-item">
  4. <view class="goods-box-single">
  5. <image class="goods-img" :src="item.image" mode="aspectFill"></image>
  6. <view class="right position-relative">
  7. <view class="flex">
  8. <text class="title">{{ item.name }}</text>
  9. <view class="title-right">
  10. <view class="price">{{ item.price }}</view>
  11. </view>
  12. </view>
  13. </view>
  14. </view>
  15. </view>
  16. <view class="row b-b flex">
  17. <text class="tit">订单总价</text>
  18. <view class="input">¥{{ item.price }}</view>
  19. </view>
  20. <view class="orderDetialBox">
  21. <view class="f-header m-t">
  22. <view class="f-left-icon"></view>
  23. <view class="tit-box"><text class="tit">订单信息</text></view>
  24. </view>
  25. <view class="item flex">
  26. <view class="title-left flex">
  27. <text class="title">订单编号:</text>
  28. <view class="text">{{ item.order_id }}</view>
  29. </view>
  30. <view class="buttom-right" @click="copyOrderId(item.order_id)">复制单号</view>
  31. </view>
  32. <view class="item flex">
  33. <view class="title-left flex">
  34. <text class="title">下单时间:</text>
  35. <view class="text">{{ item.create_time }}</view>
  36. </view>
  37. </view>
  38. <view class="item flex">
  39. <view class="title-left flex">
  40. <text class="title">完成时间:</text>
  41. <view class="text">{{ item.update_time }}</view>
  42. </view>
  43. </view>
  44. <view class="item flex">
  45. <view class="title-left flex">
  46. <text class="title">卖家昵称:</text>
  47. <view class="text">{{ item.c_nickname }}</view>
  48. </view>
  49. </view>
  50. <view class="item flex">
  51. <view class="title-left flex">
  52. <text class="title">卖家电话:</text>
  53. <view class="text">{{ item.phone }}</view>
  54. </view>
  55. </view>
  56. <view class="main">
  57. <view class="main-tip">卖家收款方式</view>
  58. <view class="main-title flex">
  59. <view class="main-item">
  60. <view class="mt-item" @click="change('0')" :class="{ current: tabCurrentIndex === 0 }" v-if="zfb != ''">
  61. <image class="mt-image" :src="tabCurrentIndex == 0 ? '../../static/img/aliD.png' : '../../static/img/ali.png'" mode=""></image>
  62. <view class="mt-font" :class="{ current: tabCurrentIndex === 0 }">支付宝</view>
  63. </view>
  64. </view>
  65. <view class="main-item">
  66. <view class="mt-item" @click="change('1')" :class="{ current: tabCurrentIndex === 1 }" v-if="bank != ''">
  67. <image class="mt-image1" :src="tabCurrentIndex == 1 ? '../../static/img/bankD.png' : '../../static/img/bank.png'" mode=""></image>
  68. <view class="mt-font" :class="{ current: tabCurrentIndex === 1 }">银行卡</view>
  69. </view>
  70. </view>
  71. <view class="main-item">
  72. <view class="mt-item" @click="change('2')" :class="{ current: tabCurrentIndex === 2 }" v-if="wx != ''">
  73. <image class="mt-image2" :src="tabCurrentIndex == 2 ? '../../static/img/yueD.png' : '../../static/img/yue.png'" mode=""></image>
  74. <view class="mt-font" :class="{ current: tabCurrentIndex === 2 }">微信</view>
  75. </view>
  76. </view>
  77. </view>
  78. <swiper class="swiper-box" :duration="500" @change="changeTab" :style="{ height: tabCurrentIndex == 2 ? '450rpx' : '280rpx' }" :current="tabCurrentIndex" disable-touch>
  79. <swiper-item class="tab-content" v-if="zfb != ''">
  80. <view class="tc-item flex">
  81. <view class="tcitem-name">账号</view>
  82. <view class="ali-name">{{ zfb.payment }}</view>
  83. <image class="tcitem-image" src="../../static/img/copy.png" mode="" @click="copy(zfb.payment)"></image>
  84. </view>
  85. <view class="tc-item flex">
  86. <view class="tcitem-name">姓名</view>
  87. <view class="ali-name">{{ zfb.name }}</view>
  88. <image class="tcitem-image" src="../../static/img/copy.png" mode="" @click="copy(zfb.name)"></image>
  89. </view>
  90. </swiper-item>
  91. <swiper-item class="tab-content" v-else></swiper-item>
  92. <swiper-item class="tab-content" v-if="bank != ''">
  93. <view class="tc-item flex">
  94. <view class="tcitem-name">姓名</view>
  95. <view class="ali-name">{{ bank.name }}</view>
  96. <image class="tcitem-image" src="../../static/img/copy.png" mode="" @click="copy(bank.name)"></image>
  97. </view>
  98. <view class="tc-item flex">
  99. <view class="tcitem-name">银行</view>
  100. <view class="ali-name">{{ bank.bank }}</view>
  101. <image class="tcitem-image" src="../../static/img/copy.png" mode="" @click="copy(bank.bank)"></image>
  102. </view>
  103. <!-- <view class="tc-item flex">
  104. <view class="tcitem-name">开户行</view>
  105. <view class="ali-name">椒江支行</view>
  106. <image class="tcitem-image" src="../../static/img/copy.png" mode=""></image>
  107. </view> -->
  108. <view class="tc-item flex">
  109. <view class="tcitem-name">账号</view>
  110. <view class="ali-name">{{ bank.payment }}</view>
  111. <image class="tcitem-image" src="../../static/img/copy.png" mode="" @click="copy(bank.payment)"></image>
  112. </view>
  113. </swiper-item>
  114. <swiper-item class="tab-content" v-else></swiper-item>
  115. <swiper-item class="tab-content" v-if="wx != ''">
  116. <view class="tc-item flex">
  117. <view class="tcitem-name">账号</view>
  118. <view class="ali-name">{{ wx.payment }}</view>
  119. <image class="tcitem-image" src="../../static/img/copy.png" mode="" @click="copy(wx.payment)"></image>
  120. </view>
  121. <view class="tc-item flex">
  122. <view class="tcitem-name">姓名</view>
  123. <view class="ali-name">{{ wx.name }}</view>
  124. <image class="tcitem-image" src="../../static/img/copy.png" mode="" @click="copy(wx.name)"></image>
  125. </view>
  126. <view class="tc-item">
  127. <view class="upload-title" style="color: #9d9d9d;">微信二维码</view>
  128. <view class="upload-main" @click="lookimg(wx.image)"><image class="upload-image" :src="wx.image" mode="aspectFit"></image></view>
  129. </view>
  130. </swiper-item>
  131. <swiper-item class="tab-content" v-else></swiper-item>
  132. </swiper>
  133. </view>
  134. <view class="zf flex">
  135. <view class="title-left">
  136. <text class="title">支付凭证(点击右边图片查看大图):</text>
  137. </view>
  138. <image class="zfpz" @click="lookimg(item.upload_image)" :src="item.upload_image" mode=""></image>
  139. </view>
  140. </view>
  141. <view class="btHeight">
  142. </view>
  143. </view>
  144. </template>
  145. <script>
  146. import { user_auction_order } from '@/api/order.js';
  147. export default {
  148. data() {
  149. return {
  150. id:'',
  151. item: '',
  152. tabCurrentIndex: 0,
  153. info: '',
  154. bank: '',
  155. wx: '',
  156. zfb: '',
  157. }
  158. },
  159. onLoad(opt) {
  160. this.id = opt.id
  161. this.loadData()
  162. },
  163. methods: {
  164. loadData() {
  165. user_auction_order({order_id: this.id}).then(({data}) =>{
  166. console.log(data);
  167. this.item = data;
  168. this.bank = data.bank;
  169. this.wx = data.wx;
  170. this.zfb = data.zfb;
  171. })
  172. },
  173. // 查看大图
  174. lookimg(src) {
  175. console.log(src);
  176. let arr = [src];
  177. uni.previewImage({
  178. current: src,
  179. urls: arr
  180. });
  181. },
  182. //swiper 切换
  183. changeTab(e) {
  184. this.tabCurrentIndex = e.target.current;
  185. },
  186. change(num) {
  187. this.tabCurrentIndex = num * 1;
  188. },
  189. // 复制订单编号
  190. copyOrderId(text) {
  191. // #ifndef H5
  192. uni.setClipboardData({
  193. data: text,
  194. success: e => {
  195. uni.showToast({
  196. title: '复制成功',
  197. duration: 1500
  198. });
  199. }
  200. });
  201. // #endif
  202. // #ifdef H5
  203. // 获取需要复制的文字
  204. const copyStr = text;
  205. // 创建input标签存放需要复制的文字
  206. const oInput = document.createElement('input');
  207. // 把文字放进input中,供复制
  208. oInput.value = copyStr;
  209. // 添加文
  210. document.body.appendChild(oInput);
  211. // 选中创建的input
  212. oInput.select();
  213. // 执行复制方法, 该方法返回bool类型的结果,告诉我们是否复制成功
  214. const copyResult = document.execCommand('copy');
  215. // 操作中完成后 从Dom中删除创建的input
  216. document.body.removeChild(oInput);
  217. // 根据返回的复制结果 给用户不同的提示
  218. if (copyResult) {
  219. uni.showToast({
  220. title: '已复制到粘贴板',
  221. duration: 2000
  222. });
  223. } else {
  224. this.$api.msg('复制失败');
  225. }
  226. // #endif
  227. }
  228. }
  229. }
  230. </script>
  231. <style lang="scss">
  232. page {
  233. background: $page-color-base;
  234. }
  235. // 订单详细
  236. .orderDetialBox {
  237. margin-top: 20rpx;
  238. padding: 0 30rpx;
  239. background-color: #ffffff;
  240. font-size: $font-base;
  241. color: $font-color-base;
  242. .item {
  243. height: 80rpx;
  244. .text {
  245. padding-left: 10rpx;
  246. }
  247. .buttom-right {
  248. width: 180rpx;
  249. border-radius: 99rpx;
  250. padding: 10rpx;
  251. text-align: center;
  252. border: 1px solid $border-color-light;
  253. }
  254. }
  255. .zf {
  256. .zfpz {
  257. width: 160rpx;
  258. height: 160rpx;
  259. }
  260. }
  261. }
  262. .row {
  263. display: flex;
  264. align-items: center;
  265. position: relative;
  266. padding: 0 30rpx;
  267. height: 80rpx;
  268. background: #fff;
  269. .order-status {
  270. font-size: $font-lg;
  271. color: $color-red;
  272. font-weight: 500;
  273. }
  274. .refund {
  275. font-size: 30rpx;
  276. color: $font-color-dark;
  277. }
  278. .noRefund {
  279. font-size: 30rpx;
  280. color: $font-color-light;
  281. }
  282. .tit {
  283. flex-shrink: 0;
  284. width: 120rpx;
  285. font-size: 30rpx;
  286. color: $font-color-dark;
  287. }
  288. .input {
  289. text-align: right;
  290. flex: 1;
  291. font-size: 30rpx;
  292. color: $font-color-dark;
  293. &.payColor {
  294. color: $color-red;
  295. }
  296. }
  297. .iconlocation {
  298. font-size: 36rpx;
  299. color: $font-color-light;
  300. }
  301. }
  302. .add-btn {
  303. display: flex;
  304. align-items: center;
  305. justify-content: center;
  306. width: 690rpx;
  307. height: 80rpx;
  308. margin: 60rpx auto;
  309. font-size: $font-lg;
  310. color: #fff;
  311. background-color: $base-color;
  312. border-radius: 10rpx;
  313. // box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
  314. }
  315. /* 多条商品 */
  316. .order-item {
  317. display: flex;
  318. flex-direction: column;
  319. padding-left: 30rpx;
  320. background: #fff;
  321. margin-top: 20rpx;
  322. /* 单条商品 */
  323. .goods-box-single {
  324. display: flex;
  325. padding: 20rpx 0;
  326. .goods-img {
  327. display: block;
  328. width: 120rpx;
  329. height: 120rpx;
  330. }
  331. .right {
  332. flex: 1;
  333. display: flex;
  334. flex-direction: column;
  335. padding: 0 30rpx 0 24rpx;
  336. overflow: hidden;
  337. height: 100%;
  338. .title {
  339. align-self: flex-start;
  340. font-size: $font-base + 2rpx;
  341. color: $font-color-dark;
  342. }
  343. .title-right {
  344. flex-shrink: 0;
  345. text-align: right;
  346. align-self: flex-start;
  347. }
  348. .attr-box {
  349. font-size: $font-sm + 2rpx;
  350. color: $font-color-light;
  351. }
  352. .evaluate{
  353. color:#FFFFFF;
  354. font-size: 24rpx;
  355. display: inline-block;
  356. text-align: right;
  357. text{
  358. background:#FA2740;
  359. padding: 5rpx 15rpx;
  360. }
  361. }
  362. .yesevaluate{
  363. color:#333333;
  364. font-size: 24rpx;
  365. display: inline-block;
  366. text-align: right;
  367. text{
  368. border: 2rpx solid #333333;
  369. padding: 5rpx 15rpx;
  370. }
  371. }
  372. .price {
  373. font-size: $font-base + 2rpx;
  374. color: $font-color-dark;
  375. &:before {
  376. content: '¥';
  377. font-size: $font-sm;
  378. margin: 0 2rpx 0 8rpx;
  379. }
  380. }
  381. }
  382. }
  383. }
  384. // 标题头
  385. .f-header {
  386. display: flex;
  387. align-items: center;
  388. height: 80rpx;
  389. .tit-box {
  390. @extend %font-title-box;
  391. }
  392. .tit {
  393. @extend %font-title;
  394. }
  395. .f-left-icon {
  396. @extend %f-left-icon;
  397. }
  398. }
  399. // 共有底部高度
  400. $btHeight:100rpx;
  401. .btHeight{
  402. height: $btHeight;
  403. }
  404. // 拼团按钮
  405. .group-nav {
  406. position: fixed;
  407. bottom: 0;
  408. left: 0;
  409. height:$btHeight;
  410. width: 100%;
  411. justify-content: flex-end;
  412. padding-right: 30rpx;
  413. .bottom {
  414. }
  415. }
  416. .main {
  417. margin-top: 20rpx;
  418. padding: 30rpx 0 40rpx;
  419. background: #ffffff;
  420. .main-tip {
  421. padding: 0 30rpx;
  422. font-size: 30rpx;
  423. font-family: PingFang SC;
  424. font-weight: 500;
  425. color: #999999;
  426. }
  427. .main-title {
  428. margin-top: 34rpx;
  429. justify-content: flex-start;
  430. .current {
  431. background: linear-gradient(143.2747deg, #ff6a00, #ee0979) !important;
  432. color: #ffffff !important;
  433. }
  434. .main-item {
  435. width: 33%;
  436. }
  437. .mt-item {
  438. margin: 0 auto;
  439. width: 160rpx;
  440. height: 60rpx;
  441. background: #f8f8f8;
  442. border-radius: 10rpx;
  443. display: flex;
  444. justify-content: center;
  445. align-items: center;
  446. .mt-image {
  447. width: 32rpx;
  448. height: 32rpx;
  449. }
  450. .mt-image1 {
  451. width: 38rpx;
  452. height: 32rpx;
  453. }
  454. .mt-image2 {
  455. width: 36rpx;
  456. height: 32rpx;
  457. }
  458. .mt-font {
  459. margin-left: 10rpx;
  460. font-size: 30rpx;
  461. font-family: PingFang SC;
  462. font-weight: bold;
  463. color: #333333;
  464. }
  465. }
  466. }
  467. .swiper-box {
  468. width: 100%;
  469. padding: 14rpx 30rpx 0;
  470. .tc-item {
  471. padding: 50rpx 2rpx 0;
  472. line-height: 1;
  473. .tcitem-name {
  474. width: 118rpx;
  475. font-size: 30rpx;
  476. font-family: PingFang SC;
  477. font-weight: 500;
  478. color: #999999;
  479. }
  480. .ali-name {
  481. width: 380rpx;
  482. font-size: 30rpx;
  483. font-family: PingFang SC;
  484. font-weight: 500;
  485. color: #333333;
  486. }
  487. .tcitem-image {
  488. width: 26rpx;
  489. height: 28rpx;
  490. }
  491. }
  492. }
  493. }
  494. </style>