SupplyDeclarationList.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. <template>
  2. <view>
  3. <view >
  4. <template v-if="showType == 0">
  5. <view v-for="(item,index) in newsList" :key="index" class="box" >
  6. <view style="margin-left: 24rpx;">
  7. <checkbox :checked="item.check" @click="checkitem(item)" shape="circle"></checkbox>
  8. </view>
  9. <view >
  10. <u--image radius='16rpx' width="80rpx" height="80rpx" :src="item.pic" ></u--image>
  11. </view>
  12. <view class="box_right">
  13. <view >
  14. {{item.businessName}}
  15. </view>
  16. </view>
  17. </view>
  18. </template>
  19. <template v-if="showType == 1">
  20. <view v-for="(item,index) in newsList" :key="index" class="box2" >
  21. <view class="box_TOP">
  22. <view >
  23. <u--image radius='16rpx' width="128rpx" height="128rpx" :src="item.pic" ></u--image>
  24. </view>
  25. <view class="box_right">
  26. <view class="box_title2">
  27. {{item.supplierName}}
  28. </view>
  29. <!-- <view class="box_specifications">
  30. 规格:{{item.price}} g/只
  31. </view> -->
  32. <view class="box_num">
  33. <view class="box_num_item">
  34. <text>售价:</text><text style="color:#333;">{{'¥' + item.price}}</text>
  35. </view>
  36. <view class="box_num_item">
  37. <text>数量:</text><text style="color:#333;">{{item.num + '个'}}</text>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. <view class="divider"></view>
  43. <view class="box_BOTTOM">
  44. <view class="box_time">
  45. 时间: {{item.createTime}}
  46. </view>
  47. <view :class="'box_type'+item.static">
  48. <text v-if="item.updownStatus == '0'">正在审核</text>
  49. <text v-if="item.updownStatus == '1'">上架</text>
  50. <text v-if="item.updownStatus == '2'">下架</text>
  51. <text v-if="item.updownStatus == '3'">审核不通过</text>
  52. </view>
  53. </view>
  54. </view>
  55. </template>
  56. <view v-if="showType == 0" class="btnBox">
  57. <view class="btn" @click="openFrom()">
  58. 添加供应申报
  59. </view>
  60. </view>
  61. </view>
  62. </view>
  63. </template>
  64. <script>
  65. export default {
  66. components: {
  67. },
  68. props: {
  69. listdata: {
  70. type: Array,
  71. default: [],
  72. },
  73. showType: {
  74. type: Number,
  75. default: 0,
  76. },
  77. },
  78. watch:{
  79. listdata: {
  80. immediate: true,
  81. handler(val) {
  82. console.log(val);
  83. this.newsList = val
  84. },
  85. }
  86. },
  87. data() {
  88. return {
  89. newsList:[],
  90. selectData:null,
  91. showFrom:false,
  92. }
  93. },
  94. onLoad(e) {
  95. },
  96. methods: {
  97. openFrom(){
  98. let data = this.newsList.find(item => item.check == true);
  99. uni.setStorageSync('checkSupplierData',data)
  100. uni.navigateTo({
  101. url: '/supplierPages/pages/supplier/base/SupplyDeclarationFrom'
  102. });
  103. },
  104. async checkitem(item){
  105. console.log('item',item);
  106. this.newsList.forEach(Listitem => {
  107. if (Listitem.id == item.id) {
  108. Listitem.check = true
  109. }else{
  110. Listitem.check = false
  111. }
  112. });
  113. },
  114. }
  115. }
  116. </script>
  117. <style lang="less" scoped>
  118. .box{
  119. width: 700rpx;
  120. height: 128rpx;
  121. background: #ffffff;
  122. border-radius: 16rpx;
  123. margin: 24rpx;
  124. display: flex;
  125. align-items: center;
  126. }
  127. .box_right{
  128. width: 500rpx;
  129. margin-left: 24rpx;
  130. }
  131. .box2{
  132. width: 700rpx;
  133. height: 273rpx;
  134. background: #ffffff;
  135. border-radius: 16rpx;
  136. margin: 24rpx;
  137. }
  138. .box_TOP{
  139. width: 676rpx;
  140. height: 152rpx;
  141. display: flex;
  142. align-items: center;
  143. margin-left: 12rpx;
  144. }
  145. .box_BOTTOM{
  146. width: 666rpx;
  147. display: flex;
  148. align-items: center;
  149. margin-left: 12rpx;
  150. justify-content: space-between;
  151. }
  152. .box_title2{
  153. font-size: 28rpx;
  154. font-weight: 500;
  155. text-align: left;
  156. color: #333333;
  157. }
  158. .box_specifications{
  159. margin-top: 6rpx;
  160. font-size: 24rpx;
  161. font-weight: 500;
  162. text-align: left;
  163. color: #999999;
  164. }
  165. .box_num{
  166. margin-top: 10rpx;
  167. display: flex;
  168. justify-content: space-between;
  169. }
  170. .box_num_item{
  171. display: flex;
  172. font-size: 28rpx;
  173. color: #999999;
  174. }
  175. .box_time{
  176. font-size: 28rpx;
  177. font-weight: 400;
  178. text-align: left;
  179. color: #999999;
  180. }
  181. .box_type1{
  182. width: 140rpx;
  183. height: 56rpx;
  184. background: #ffedec;
  185. border-radius: 8rpx;
  186. font-size: 28rpx;
  187. font-family: PingFang SC, PingFang SC-Medium;
  188. font-weight: 500;
  189. text-align: left;
  190. color: #ff655b;
  191. line-height: 56rpx;
  192. text-align: center;
  193. }
  194. .box_type2{
  195. width: 140rpx;
  196. height: 56rpx;
  197. background: #deeefc;
  198. border-radius: 8rpx;
  199. font-size: 28rpx;
  200. font-family: PingFang SC, PingFang SC-Medium;
  201. font-weight: 500;
  202. text-align: left;
  203. color: #0084FF;
  204. line-height: 56rpx;
  205. text-align: center;
  206. }
  207. .box_type3{
  208. width: 140rpx;
  209. height: 56rpx;
  210. background: #eee;
  211. border-radius: 8rpx;
  212. font-size: 28rpx;
  213. font-family: PingFang SC, PingFang SC-Medium;
  214. font-weight: 500;
  215. text-align: left;
  216. color: #999;
  217. line-height: 56rpx;
  218. text-align: center;
  219. }
  220. .btnBox{
  221. width: 750rpx;
  222. height: 100rpx;
  223. background: #FFFFFF;
  224. border-radius: 0rpx 0rpx 0rpx 0rpx;
  225. opacity: 1;
  226. display: flex;
  227. flex-direction: row;
  228. justify-content: center;
  229. align-items: center;
  230. position: fixed;
  231. bottom: 0;
  232. }
  233. .btn{
  234. width: 702rpx;
  235. height: 80rpx;
  236. background: #46A6FF;
  237. border-radius: 64rpx 64rpx 64rpx 64rpx;
  238. opacity: 1;
  239. font-weight: 500;
  240. color: #FFFFFF;
  241. line-height: 80rpx;
  242. text-align: center;
  243. }
  244. .divider{
  245. width: 100%;
  246. border-top: 1rpx solid #eee;
  247. margin: 20rpx 0;
  248. }
  249. </style>