index.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. <template>
  2. <!-- 核销订单下拉列表 -->
  3. <view>
  4. <view class="product-window"
  5. :class="(attr.cartAttr === true ? 'on' : '') + ' ' + (iSbnt?'join':'') + ' ' + (iScart?'joinCart':'')">
  6. <view class="textpic acea-row row-between-wrapper">
  7. <view class="iconfont icon-guanbi" @click="closeAttr"></view>
  8. </view>
  9. <view class="rollTop">
  10. <view class="scan">
  11. <view class="header" :style="{backgroundImage:'url('+imgHost+'/statics/images/banner.png'+')'}">
  12. 请选择当前核销订单
  13. </view>
  14. <view class="box">
  15. <view class="content" v-for="(item,index) in list" :key="index" @click="sure(item.id)">
  16. <view class="content_box">
  17. <image :src="item.image" mode=""></image>
  18. <view class="content_box_title">
  19. <p class="textbox">订单号:{{ item.order_id }}</p>
  20. <p class="attribute mar">下单时间:{{ item.add_time }}</p>
  21. <view class="txt">
  22. <p class="attribute">订单实付:¥{{ item.pay_price }}</p>
  23. <p class="orange" v-if="item._status == 12">部分核销</p>
  24. <p class="attributes blue" v-if="item._status == 11">未核销</p>
  25. <slot name="bottom"></slot>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. import {orderWriteoffInfo} from '@/api/admin'
  38. import {HTTP_REQUEST_URL} from '@/config/app';
  39. export default {
  40. props: {
  41. attr: {
  42. type: Object,
  43. default: () => {}
  44. },
  45. iSbnt: {
  46. type: Number,
  47. value: 0
  48. },
  49. iScart: {
  50. type: Number,
  51. value: 0
  52. },
  53. },
  54. data() {
  55. return {
  56. verify_code:'',
  57. list: [],
  58. imgHost:HTTP_REQUEST_URL,
  59. };
  60. },
  61. mounted() {},
  62. methods: {
  63. closeAttr: function() {
  64. this.$emit('myevent');
  65. },
  66. getList:function(type) {
  67. this.attr.type = type;
  68. // uni.showLoading({
  69. // title: '加载中'
  70. // });
  71. orderWriteoffInfo(type,{verify_code:this.attr.code,code_type:2}).then(res=>{
  72. // uni.hideLoading();
  73. this.list = res.data;
  74. }).catch(err=>{
  75. // uni.hideLoading();
  76. this.$util.Tips({
  77. title: err
  78. });
  79. })
  80. },
  81. sure:function(data) {
  82. this.$emit('dataId',data);
  83. this.$emit('myevent');
  84. }
  85. }
  86. }
  87. </script>
  88. <style scoped lang="scss">
  89. .vip-money {
  90. color: #282828;
  91. font-size: 28rpx;
  92. font-weight: 700;
  93. margin-left: 6rpx;
  94. }
  95. .vipImg {
  96. width: 68rpx;
  97. height: 27rpx;
  98. image {
  99. width: 100%;
  100. height: 100%;
  101. }
  102. }
  103. .product-window {
  104. position: fixed;
  105. bottom: 0;
  106. width: 100%;
  107. left: 0;
  108. background-color: #f5f5f5;
  109. z-index: 100;
  110. border-radius: 16rpx 16rpx 0 0;
  111. transform: translate3d(0, 100%, 0);
  112. transition: all .3s cubic-bezier(.25, .5, .5, .9);
  113. padding-bottom: 140rpx;
  114. padding-bottom: calc(140rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  115. padding-bottom: calc(140rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  116. }
  117. .product-window.on {
  118. transform: translate3d(0, 0, 0);
  119. }
  120. .product-window.join {
  121. padding-bottom: 30rpx;
  122. }
  123. .product-window.joinCart {
  124. // padding-bottom: 30rpx;
  125. z-index: 10000;
  126. }
  127. .product-window .textpic {
  128. padding: 0 130rpx 0 30rpx;
  129. margin-top: 29rpx;
  130. position: relative;
  131. }
  132. .product-window .textpic .pictrue {
  133. width: 150rpx;
  134. height: 150rpx;
  135. }
  136. .product-window .textpic .pictrue image {
  137. width: 100%;
  138. height: 100%;
  139. border-radius: 10rpx;
  140. }
  141. .product-window .textpic .text {
  142. width: 410rpx;
  143. font-size: 32rpx;
  144. color: #202020;
  145. }
  146. .product-window .textpic .text .money {
  147. font-size: 24rpx;
  148. margin-top: 40rpx;
  149. }
  150. .product-window .textpic .text .money .num {
  151. font-size: 36rpx;
  152. }
  153. .product-window .textpic .text .money .stock {
  154. color: #999;
  155. margin-left: 6rpx;
  156. }
  157. .product-window .textpic .iconfont {
  158. position: absolute;
  159. right: 30rpx;
  160. top: -5rpx;
  161. font-size: 35rpx;
  162. color: #8a8a8a;
  163. }
  164. .product-window .rollTop {
  165. max-height: 700rpx;
  166. overflow: auto;
  167. margin-top: 36rpx;
  168. .scan{
  169. padding-bottom: 160upx;
  170. .header {
  171. width: 100%;
  172. height: 220upx;
  173. // background-image: url(../../static/images/banner.png);
  174. background-repeat: no-repeat; //不重复
  175. background-size: 100% 100%;
  176. color: #FFFFFF;
  177. font-size: 32upx;
  178. text-align: center;
  179. line-height: 160upx;
  180. margin: 0 auto;
  181. }
  182. .box{
  183. margin: -64upx auto 0 auto;
  184. }
  185. .content{
  186. margin: 16upx auto 16upx auto;
  187. width: 694upx;
  188. // height: 428upx;
  189. padding: 28upx 24upx 32upx;
  190. background: #FFFFFF;
  191. border-radius: 12upx;
  192. .pad{padding: 20upx 20upx 22upx;}
  193. .content_box{
  194. height: 70px;
  195. border-radius: 8upx;
  196. padding-right: 22upx;
  197. display: flex;
  198. justify-content: start;
  199. align-items: center;
  200. image{
  201. width: 140upx;
  202. height: 140upx;
  203. border-radius: 8upx;
  204. }
  205. .content_box_title{
  206. flex: 1;
  207. margin-left: 18upx;
  208. font-size: 20upx;
  209. font-weight: 400;
  210. .textbox{
  211. white-space: nowrap;
  212. text-overflow: ellipsis;
  213. overflow: hidden;
  214. word-break: break-all;
  215. width: 466upx;
  216. font-size: 30upx;
  217. font-weight: bold;
  218. line-height: 21px;
  219. }
  220. .mar{margin: 16upx 0upx;}
  221. .attribute{
  222. color: #999999;
  223. // margin: 4upx 0upx 10upx;
  224. }
  225. .txt{
  226. display: flex;
  227. justify-content: space-between;
  228. font-size: 24upx;
  229. .orange{color: #FF7E00;}
  230. .blue{color: #1890FF;}
  231. }
  232. }
  233. }
  234. .content_bottom{
  235. display: flex;
  236. justify-content: space-between;
  237. font-size: 22upx;
  238. padding: 0upx 20upx;
  239. color: #666666;
  240. .money{
  241. font-size: 26upx;
  242. color: #F5222D;
  243. }
  244. }
  245. }
  246. }
  247. }
  248. </style>