outOrderItem.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477
  1. <style lang="scss">
  2. .panel{
  3. margin: 10px 0;
  4. background: #fff;
  5. padding: 20rpx;
  6. .top-title {
  7. font-size: 16px;
  8. color: #303133;
  9. .i{
  10. height: 19px;
  11. width: 4px;
  12. background-image: linear-gradient(#5dbc7c, #71d094);
  13. margin-right: 5px;
  14. border-radius: 5px;
  15. }
  16. }
  17. }
  18. .goods-item{
  19. .img{
  20. width: 68px;
  21. height: 68px;
  22. }
  23. .info {
  24. margin-left: 10px;
  25. .title{
  26. font-size: 16px;
  27. color: #303133;
  28. }
  29. .price{
  30. color: #ef4034;
  31. font-weight: bold;
  32. text{font-size: 12px;}
  33. }
  34. }
  35. .count{
  36. color: #787878;
  37. font-size: 14px;
  38. }
  39. }
  40. .goods-total{
  41. margin-top: 10px;
  42. border-top: 1px solid #f1f1f1;
  43. padding: 10px 0;
  44. .label{
  45. font-size: 16px;
  46. color: #606266;
  47. }
  48. .rpice{
  49. color: #ef4034;
  50. text{font-size: 12px;}
  51. }
  52. }
  53. .order{
  54. padding: 20px 0;
  55. padding-bottom: 0;
  56. .item{
  57. display: flex;
  58. height: 40px;
  59. .label{
  60. font-size: 14px;
  61. color: #606266;
  62. }
  63. .value {
  64. padding-left: 5px;
  65. font-size: 14px;
  66. color: #606266;
  67. }
  68. .btn{
  69. border-radius: 56px;
  70. padding: 5px 10px;
  71. text-align: center;
  72. border: 1px solid #ebeef5;
  73. font-size: 12px;
  74. line-height: 20px;
  75. height: 20px;
  76. }
  77. }
  78. }
  79. .main{
  80. margin-top: 11px;
  81. padding: 17px 0 22px;
  82. background: #fff;
  83. .main-tip{
  84. padding: 0 17px;
  85. font-size: 17px;
  86. font-family: PingFang SC;
  87. font-weight: 500;
  88. color: #999;
  89. }
  90. .main-items{
  91. margin-top: 19px;
  92. justify-content: flex-start;
  93. height: 40px;
  94. padding:0 40rpx;
  95. .item{
  96. width: calc(33% - 10px);
  97. margin-right: 10px;
  98. height: 34px;
  99. background: #f8f8f8;
  100. border-radius: 5px;
  101. display: flex;
  102. justify-content: center;
  103. align-items: center;
  104. .icon{
  105. width: 21px;
  106. height: 18px;
  107. }
  108. .text{
  109. margin-left: 5px;
  110. font-size: 17px;
  111. font-weight: 700;
  112. color: #333;
  113. }
  114. &.active{
  115. background: linear-gradient(143.2747deg, #ff6a00, #ee0979) !important;
  116. color: #fff !important;
  117. .text{
  118. color: #fff;
  119. }
  120. }
  121. }
  122. }
  123. .swiper-box{
  124. padding: 8px 17px 0;
  125. height: 210px;
  126. swiper{height: 100%;}
  127. .pay-item{
  128. padding: 28px 1px 0;
  129. .label{
  130. width: 67px;
  131. font-size: 17px;
  132. font-family: PingFang SC;
  133. font-weight: 500;
  134. color: #999;
  135. }
  136. .value{
  137. width: calc(100% - 100px);
  138. font-size: 17px;
  139. font-weight: 500;
  140. color: #333;
  141. }
  142. .copy{
  143. image{width: 14px;height: 16px}
  144. }
  145. }
  146. }
  147. }
  148. .upimg{
  149. padding: 20px;
  150. image{width: 100%;}
  151. }
  152. .chat-tip{
  153. position: fixed;
  154. height: 120rpx;
  155. width: 100%;
  156. bottom: 0;
  157. background: #fff;
  158. left: 0;
  159. .chat-btn{
  160. border-radius: 6px;
  161. border:1px solid red;
  162. margin: 0px 40rpx;
  163. width: 100%;
  164. font-size: 16px;
  165. height: 40px;
  166. color: red;
  167. image{width: 20px;height: 20px; margin-right: 10px;}
  168. }
  169. }
  170. </style>
  171. <template>
  172. <view class="app">
  173. <view class="panel">
  174. <view class="top-title fx-r fx-bc"><view class="i"></view>产品信息</view>
  175. <view class="goods-item fx-r fx-bc">
  176. <image class="img" mode="aspectFill" :src="data.image"></image>
  177. <view class="info fx-h fx-bc">
  178. <view class="title">{{ data.name || "" }}</view>
  179. <view class="price"><text>¥</text>{{ data.price || 0 }}</view>
  180. </view>
  181. <view class="fx-g1"></view>
  182. <view class="count">x1</view>
  183. </view>
  184. <view class="goods-total fx-r">
  185. <view class="label">订单总价</view>
  186. <view class="rpice"><text>¥</text>{{ data.price || 0 }}</view>
  187. </view>
  188. </view>
  189. <!--订单信息-->
  190. <view class="panel">
  191. <view class="top-title fx-r fx-bc"><view class="i"></view>订单信息</view>
  192. <view class="order">
  193. <view class="item">
  194. <view class="label">场次:</view>
  195. <view class="value">{{ data.auction_name }} - {{ data.week }}</view>
  196. <view class="fx-g1"></view>
  197. </view>
  198. <view class="item">
  199. <view class="label">订单编号:</view>
  200. <view class="value">{{ data.order_id || '' }}</view>
  201. <view class="fx-g1"></view>
  202. <view class="btn" @tap="tapCopy(data.order_id || '')">复制单号</view>
  203. </view>
  204. <view class="item">
  205. <view class="label">下单时间:</view>
  206. <view class="value">{{ data.create_time }}</view>
  207. </view>
  208. <view class="item">
  209. <view class="label">订单状态:</view>
  210. <view class="value" v-if="data.status == 0" style="color: red;">已过期</view>
  211. <view class="value" v-if="data.status == 1" style="color: red;">待支付</view>
  212. <view class="value" v-if="data.status == 2" style="color: #f9ae3d;">待审核</view>
  213. <view class="value" v-if="data.status == 3" style="color: #5ac725;">已完成</view>
  214. </view>
  215. <view class="item">
  216. <view class="label">完成时间:</view>
  217. <view class="value">{{ data.voucher_time || '-' }}</view>
  218. </view>
  219. <view class="item">
  220. <view class="label">买家昵称:</view>
  221. <view class="value">{{ data.buy_nickname || '' }}</view>
  222. </view>
  223. <view class="item">
  224. <view class="label">买家UID:</view>
  225. <view class="value">{{ data.buy_uid || '' }}</view>
  226. </view>
  227. <view class="item">
  228. <view class="label">买家电话:</view>
  229. <view class="value">{{ data.buy_mobile || '' }}</view>
  230. <view class="fx-g1"></view>
  231. <view class="btn" @tap="tapCopy(data.buy_mobile || '')">复制电话</view>
  232. </view>
  233. </view>
  234. </view>
  235. <view class="panel">
  236. <view class="top-title fx-r fx-bc"><view class="i"></view>卖家收款方式</view>
  237. <view class="main">
  238. <view class="main-tip">请向以下账号自行转账(任选一种方式)</view>
  239. <view class="main-items fx-r">
  240. <view class="item" @tap="tapCurrent(index)" :class="current == index ? 'active' : ''" v-for="(item,index) in data.bank">
  241. <image class="icon" v-if="item.type == 3" :src=" current == index ? '/static/img/bank_active.png' : '/static/img/bank.png'"></image>
  242. <image class="icon" v-if="item.type == 1" :src=" current == index ? '/static/img/bank_active.png' : '/static/img/bank.png'"></image>
  243. <image class="icon" v-if="item.type == 2" :src=" current == index ? '/static/img/alipay_active.png' : '/static/img/alipay.png'"></image>
  244. <view class="text" v-if="item.type == 1">微信</view>
  245. <view class="text" v-if="item.type == 2">支付宝</view>
  246. <view class="text" v-if="item.type == 3">银行卡</view>
  247. </view>
  248. </view>
  249. <!--数据-->
  250. <view class="swiper-box">
  251. <swiper :current="current" :disable-touch="true">
  252. <swiper-item v-for="(item,index) in data.bank">
  253. <template v-if="item.type == 3">
  254. <view class="pay-item">
  255. <view class="tr fx-r">
  256. <view class="td label">姓名</view>
  257. <view class="td value">{{ item.name }}</view>
  258. <view class="fx-g1"></view>
  259. <view class="td copy" @tap="tapCopy(item.name)"><image src="/static/img/ac_copy.png"></image></view>
  260. </view>
  261. </view>
  262. <view class="pay-item">
  263. <view class="tr fx-r">
  264. <view class="td label">银行</view>
  265. <view class="td value">{{item.bank }}</view>
  266. <view class="fx-g1"></view>
  267. <view class="td copy" @tap="tapCopy(item.bank)"><image src="/static/img/ac_copy.png"></image></view>
  268. </view>
  269. </view>
  270. <view class="pay-item">
  271. <view class="tr fx-r">
  272. <view class="td label">支行</view>
  273. <view class="td value">{{item.bank_name }}</view>
  274. <view class="fx-g1"></view>
  275. <view class="td copy" @tap="tapCopy(item.bank_name)"><image src="/static/img/ac_copy.png"></image></view>
  276. </view>
  277. </view>
  278. <view class="pay-item">
  279. <view class="tr fx-r">
  280. <view class="td label">账号</view>
  281. <view class="td value">{{ item.payment }} </view>
  282. <view class="fx-g1"></view>
  283. <view class="td copy" @tap="tapCopy(item.payment)"><image src="/static/img/ac_copy.png"></image></view>
  284. </view>
  285. </view>
  286. </template>
  287. <template v-if="item.type == 2">
  288. <view class="pay-item">
  289. <view class="tr fx-r">
  290. <view class="td label">账号</view>
  291. <view class="td value">{{ item.payment }} </view>
  292. <view class="fx-g1"></view>
  293. <view class="td copy" @tap="tapCopy(item.payment)"><image src="/static/img/ac_copy.png"></image></view>
  294. </view>
  295. </view>
  296. <view class="pay-item">
  297. <view class="tr fx-r">
  298. <view class="td label">姓名</view>
  299. <view class="td value">{{ item.name }}</view>
  300. <view class="fx-g1"></view>
  301. <view class="td copy" @tap="tapCopy(item.name)"><image src="/static/img/ac_copy.png"></image></view>
  302. </view>
  303. </view>
  304. </template>
  305. <template v-if="item.type == 1">
  306. <view class="pay-item">
  307. <view class="tr fx-r">
  308. <view class="td label">账号</view>
  309. <view class="td value">{{ item.payment }} </view>
  310. <view class="fx-g1"></view>
  311. <view class="td copy" @tap="tapCopy(item.payment)"><image src="/static/img/ac_copy.png"></image></view>
  312. </view>
  313. </view>
  314. <view class="pay-item">
  315. <view class="tr fx-r">
  316. <view class="td label">姓名</view>
  317. <view class="td value">{{ item.name }}</view>
  318. <view class="fx-g1"></view>
  319. <view class="td copy" @tap="tapCopy(item.name)"><image src="/static/img/ac_copy.png"></image></view>
  320. </view>
  321. </view>
  322. <view class="pay-item">
  323. <view class="tr fx-r">
  324. <view class="td label">微信二维码</view>
  325. <view class="td value">
  326. <image @tap="tapOpenImg(item.img)" :src="item.img" mode="aspectFill" style="width: 80px;height: 80px"></image>
  327. </view>
  328. </view>
  329. </view>
  330. </template>
  331. </swiper-item>
  332. </swiper>
  333. </view>
  334. </view>
  335. </view>
  336. <view class="panel">
  337. <view class="top-title fx-r fx-bc"><view class="i"></view>支付凭证</view>
  338. <view class="upimg" v-if="data.upload_image != ''">
  339. <image @tap="tapOpenImg(data.upload_image)" :src="data.upload_image" mode="widthFix"></image>
  340. </view>
  341. </view>
  342. <view style="height: 120rpx;"></view>
  343. <view class="fx-r chat-tip">
  344. <view class="chat-btn fx-r fx-bc fx-ac" @tap="tapOpenChat">
  345. <image src="/static/img/msg.png"></image>
  346. 聊天联系
  347. </view>
  348. </view>
  349. </view>
  350. </template>
  351. <script>
  352. import {mapState,mapMutations } from 'vuex';
  353. export default {
  354. computed: mapState(['user']),
  355. data() {
  356. return {
  357. statusBarHeight : 20,
  358. current : 0,
  359. orderId : 0,
  360. data : {
  361. upload_image : ""
  362. }
  363. }
  364. },
  365. onLoad(options) {
  366. this.orderId = options.id || 0;
  367. this.initView();
  368. },
  369. methods: {
  370. /**
  371. * 加载基础配置
  372. */
  373. initView:function(){
  374. uni.showLoading({ title: '获取数据中..' });
  375. var post = {};
  376. post.id = this.orderId;
  377. this
  378. .request
  379. .post("auctionOrderDetail",post)
  380. .then(res => {
  381. uni.hideLoading();
  382. if(res.code == 200) {
  383. this.data = res.data;
  384. } else {
  385. this.utils.Tip(res.msg);
  386. }
  387. })
  388. .catch(res=>{
  389. uni.hideLoading();
  390. uni.showModal({title: '系统提示',content: '加载失败,返回在尝试',showCancel: false});
  391. });
  392. },
  393. /**
  394. * 切换
  395. * @param {Object} index
  396. */
  397. tapCurrent:function(index) {
  398. this.current = index;
  399. },
  400. /**
  401. * 打开图片
  402. */
  403. tapOpenImg:function(img){
  404. uni.previewImage({
  405. current:0,
  406. urls:[img]
  407. });
  408. },
  409. /**
  410. * 复制
  411. * @param {Object} item
  412. */
  413. tapCopy:function(item) {
  414. uni.setClipboardData({
  415. data : item,
  416. showToast : true
  417. });
  418. },
  419. tapOpenChat:function(){
  420. uni.navigateTo({
  421. url:"/pages/chat/friend/info?usercode=" + this.data.buy_usercode
  422. })
  423. }
  424. }
  425. }
  426. </script>
  427. <style>
  428. </style>