SupplyDeclaration.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. <template>
  2. <view class="bg">
  3. <!-- 供应申报 -->
  4. <view class="head">
  5. <view class="margintb w750" >
  6. <view v-if="list1.length>0" class="w700">
  7. <u-tabs :scrollable="false" :current="tabCurrent" :list="list1" @change="tabsChange"></u-tabs>
  8. </view>
  9. </view>
  10. </view>
  11. <view style="height: 120rpx;"></view>
  12. <view v-if="tabCurrent == 0">
  13. <DeclarationList :listdata="supplierListData" :showType="0"></DeclarationList>
  14. </view>
  15. <view v-if="tabCurrent == 1">
  16. <DeclarationList :listdata="myDeclareSupplierData" :showType="1"></DeclarationList>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. import DeclarationList from './base/SupplyDeclarationList.vue'
  22. import * as util from '@/pages/util/util.js'
  23. import {supplierList,myDeclareSupplier} from '@/http/api/common.js'
  24. export default {
  25. components: {
  26. DeclarationList,
  27. },
  28. data() {
  29. return {
  30. list1:[
  31. {
  32. name:'可申报商品',
  33. id:'可申报商品',
  34. },
  35. {
  36. name:'申报记录',
  37. id:'申报记录',
  38. },
  39. ],
  40. tabCurrent:0,
  41. jiazaitext:'加载更多',
  42. newsList:[],
  43. loadingType:false,
  44. supplierListData:[],
  45. myDeclareSupplierData:[],
  46. }
  47. },
  48. onReachBottom() {
  49. },
  50. onUnload(){
  51. },
  52. async onLoad() {
  53. this.getSupplierList()
  54. this.getmyDeclareSupplier()
  55. },
  56. async onShow(){
  57. },
  58. methods: {
  59. //tab第一级页签选择
  60. tabsChange(e) {
  61. console.log('22222',e);
  62. this.tabCurrent = e.index;
  63. },
  64. async getSupplierList(){
  65. let res = await supplierList()
  66. if (res.data.code == 200) {
  67. this.supplierListData = res.data.data?.rows || []
  68. }
  69. },
  70. async getmyDeclareSupplier(){
  71. let res = await myDeclareSupplier({
  72. pageNum:100
  73. })
  74. if (res.data.code == 200) {
  75. this.myDeclareSupplierData = res.data.data?.rows || []
  76. }
  77. },
  78. }
  79. }
  80. </script>
  81. <style>
  82. .bg{
  83. background-color: #F6F6F6;
  84. width: 100vw;
  85. height: 100vh;
  86. }
  87. .head{
  88. display: flex;
  89. flex-direction: column;
  90. align-items: center;
  91. justify-content: center;
  92. background: #FFFFFF;
  93. opacity: 1;
  94. height: 120rpx;
  95. margin-bottom: 32rpx;
  96. position: fixed;
  97. z-index: 1;
  98. }
  99. .u-notice-bar{
  100. width: 90vw;
  101. margin: 0 auto;
  102. }
  103. .u-search{
  104. width: 702rpx;
  105. margin: 0 auto;
  106. }
  107. .margintb{
  108. margin: 16rpx 0;
  109. display: flex;
  110. align-items: center;
  111. }
  112. .list2{
  113. display: flex;
  114. justify-content: flex-start;
  115. width: 90vw;
  116. overflow-x: auto;
  117. scroll-snap-type: x mandatory;
  118. scroll-padding: 50rpx; /* 为滚动容器提供内边距,确保内容不会紧贴边缘 */
  119. }
  120. .content{
  121. width: 100vw;
  122. background-color: #FFFFFF;
  123. padding: 30rpx 0 30rpx 0;
  124. }
  125. .box{
  126. display: flex;
  127. margin: 20rpx auto;
  128. justify-content: flex-start;
  129. width: 90vw;
  130. height: 160rpx;
  131. }
  132. .box_img{
  133. width: 224rpx;
  134. height: 150rpx;
  135. border-radius: 16rpx;
  136. background-color: #999999;
  137. }
  138. .box_right{
  139. margin-left: 10rpx;
  140. display: flex;
  141. flex-direction: column;
  142. justify-content: space-evenly;
  143. }
  144. .box_title{
  145. width: 454rpx;
  146. height: 80rpx;
  147. font-size: 28rpx;
  148. font-weight: bold;
  149. color: #333333;
  150. line-height: 40rpx;
  151. display: -webkit-box;
  152. word-break: break-all;
  153. text-overflow: ellipsis;
  154. overflow: hidden;
  155. -webkit-box-orient: vertical;
  156. -webkit-line-clamp:2;
  157. }
  158. .box_type{
  159. display: flex;
  160. justify-content: space-between;
  161. font-size: 28rpx;
  162. font-weight: 400;
  163. color: #999999;
  164. line-height: 40rpx;
  165. }
  166. .checkbtnview{
  167. width: 160rpx;
  168. height: 64rpx;
  169. background: #DEEEFC;
  170. border-radius: 40rpx 40rpx 40rpx 40rpx;
  171. opacity: 1;
  172. font-size: 28rpx;
  173. font-weight: 400;
  174. color: #46A6FF;
  175. line-height: 64rpx;
  176. text-align: center;
  177. margin-right: 20rpx;
  178. flex: 0 0 auto;
  179. scroll-snap-align: start;
  180. }
  181. .btnview{
  182. width: 160rpx;
  183. height: 64rpx;
  184. background: #F1F1F1;
  185. border-radius: 40rpx 40rpx 40rpx 40rpx;
  186. opacity: 1;
  187. font-size: 28rpx;
  188. font-weight: 400;
  189. color: #999;
  190. line-height: 64rpx;
  191. text-align: center;
  192. margin-right: 20rpx;
  193. flex: 0 0 auto;
  194. scroll-snap-align: start;
  195. }
  196. .btnBox{
  197. width: 750rpx;
  198. height: 100rpx;
  199. background: #FFFFFF;
  200. border-radius: 0rpx 0rpx 0rpx 0rpx;
  201. opacity: 1;
  202. display: flex;
  203. flex-direction: row;
  204. justify-content: center;
  205. align-items: center;
  206. position: fixed;
  207. bottom: 0;
  208. }
  209. .btn{
  210. width: 702rpx;
  211. height: 80rpx;
  212. background: #46A6FF;
  213. border-radius: 64rpx 64rpx 64rpx 64rpx;
  214. opacity: 1;
  215. font-weight: 500;
  216. color: #FFFFFF;
  217. line-height: 80rpx;
  218. text-align: center;
  219. }
  220. </style>