index.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <template>
  2. <view>
  3. <view class="scan">
  4. <view class="header" :style="{backgroundImage:'url('+imgHost+'/statics/images/banner.png'+')'}">
  5. 请选择当前核销订单
  6. </view>
  7. <view class="box">
  8. <view class="content" v-for="(item,index) in list" :key="index" @click="jump(item.id)">
  9. <view class="content_box">
  10. <image :src="item.image" mode=""></image>
  11. <view class="content_box_title">
  12. <p class="textbox">订单号:{{ item.order_id }}</p>
  13. <p class="attribute mar">下单时间:{{ item.add_time }}</p>
  14. <view class="txt">
  15. <p class="attribute">订单实付:¥{{ item.pay_price }}</p>
  16. <p class="orange" v-if="(item._status == 4 || item._status == 12) && item.status == 5">部分核销</p>
  17. <p class="attributes blue" v-if="item._status == 4 && item.status == 1">未核销</p>
  18. <p class="attributes blue" v-if="item._status == 11">未核销</p>
  19. <p class="attributes blue" v-if="item._status == 5">已核销</p>
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. import { orderWriteoffInfo } from '@/api/admin'
  30. import {HTTP_REQUEST_URL} from '@/config/app';
  31. export default {
  32. name: 'scanning',
  33. data() {
  34. return {
  35. verify_code:'',
  36. list: [],
  37. imgHost:HTTP_REQUEST_URL,
  38. }
  39. },
  40. onLoad: function(options) {
  41. this.verify_code = options.code
  42. },
  43. onShow(options){
  44. this.getList()
  45. },
  46. methods:{
  47. getList:function() {
  48. orderWriteoffInfo(2,{verify_code:this.verify_code,code_type:2}).then(res=>{
  49. this.list = res.data;
  50. if(this.list.length == 1){
  51. uni.redirectTo({
  52. url:'./detail/index?id='+this.list[0].id+'&let='+this.list.length+'&code='+this.verify_code
  53. })
  54. }
  55. }).catch(err=>{
  56. this.$util.Tips({
  57. title: err
  58. });
  59. })
  60. },
  61. jump:function(id) {
  62. uni.navigateTo({
  63. url:'./detail/index?id='+id+'&let='+this.list.length+'&code='+this.verify_code
  64. })
  65. }
  66. }
  67. }
  68. </script>
  69. <style lang="scss" scoped>
  70. .scan{
  71. padding-bottom: 160upx;
  72. .header {
  73. width: 100%;
  74. height: 220upx;
  75. // background-image: url(../../../../static/images/banner.png);
  76. background-repeat: no-repeat; //不重复
  77. background-size: 100% 100%;
  78. color: #FFFFFF;
  79. font-size: 32upx;
  80. text-align: center;
  81. line-height: 160upx;
  82. margin: 0 auto;
  83. }
  84. .box{
  85. margin: -64upx auto 0 auto;
  86. }
  87. .content{
  88. margin: 16upx auto 16upx auto;
  89. width: 694upx;
  90. // height: 428upx;
  91. padding: 28upx 24upx 32upx;
  92. background: #FFFFFF;
  93. border-radius: 12upx;
  94. .pad{padding: 20upx 20upx 22upx;}
  95. .content_box{
  96. height: 70px;
  97. border-radius: 8upx;
  98. padding-right: 22upx;
  99. display: flex;
  100. justify-content: start;
  101. align-items: center;
  102. image{
  103. width: 140upx;
  104. height: 140upx;
  105. border-radius: 8upx;
  106. }
  107. .content_box_title{
  108. flex: 1;
  109. margin-left: 18upx;
  110. font-size: 20upx;
  111. font-weight: 400;
  112. .textbox{
  113. white-space: nowrap;
  114. text-overflow: ellipsis;
  115. overflow: hidden;
  116. word-break: break-all;
  117. width: 466upx;
  118. font-size: 30upx;
  119. font-weight: bold;
  120. line-height: 21px;
  121. }
  122. .mar{margin: 16upx 0upx;}
  123. .attribute{
  124. color: #999999;
  125. // margin: 4upx 0upx 10upx;
  126. }
  127. .txt{
  128. display: flex;
  129. justify-content: space-between;
  130. font-size: 24upx;
  131. .orange{color: #FF7E00;}
  132. .blue{color: #1890FF;}
  133. }
  134. }
  135. }
  136. .content_bottom{
  137. display: flex;
  138. justify-content: space-between;
  139. font-size: 22upx;
  140. padding: 0upx 20upx;
  141. color: #666666;
  142. .money{
  143. font-size: 26upx;
  144. color: #F5222D;
  145. }
  146. }
  147. }
  148. }
  149. </style>