procurement.vue 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. <template>
  2. <view class="proInit">
  3. <tui-skeleton
  4. v-if="skeletonShow"
  5. backgroundColor="#fafafa"
  6. borderRadius="10rpx"
  7. :isLoading="true"
  8. :loadingType="5"
  9. ></tui-skeleton>
  10. <view v-else>
  11. <tui-tabs :tabs="tabs" :currentTab="currentTab" @change="handlerTabs" class="tab"></tui-tabs>
  12. <view class="tabsContent" v-for="(item, index) in 5" :key="index" :style="{marginTop: index === 0 ? '40px' : ''}">
  13. <proCard @modelData="modelData" :procuretInfo='item' @popupAdd="popupAdd" @popupChange='popupChange'/>
  14. </view>
  15. </view>
  16. <!-- 弹窗提示 -->
  17. <tui-modal
  18. :show="modal"
  19. @click="handleClick"
  20. @cancel="hideMobel"
  21. :content="contentModalText"
  22. :button="modalButton"
  23. color="#333"
  24. :size="32"
  25. shape="circle"
  26. :maskClosable="false"
  27. >
  28. </tui-modal>
  29. <view class="add_btn" @click="procurementAdd">
  30. <image style="width: 100%;height: 100%;" src="@/static/procurement/add_pro.png"></image>
  31. </view>
  32. <tui-bottom-popup :zIndex="1002" :maskZIndex="1001" :show="popupShow" @close="handlerPopupClose">
  33. <view class="popup_content">
  34. <view class="pro_popup_title">
  35. 参与需求
  36. </view>
  37. <view class="popup_form">
  38. <view class="popup_form_item">
  39. 商品图片:
  40. </view>
  41. <view class="popup_img">
  42. <image style="width: 100%;height: 100%;" src="" mode="aspectFill"></image>
  43. </view>
  44. </view>
  45. <view class="popup_form">
  46. <view class="popup_form_item">
  47. 商品名称:
  48. </view>
  49. <view class="popup_form_name">
  50. 韩国恩盛进口氢洁气小气泡清韩进口氢洁气小气泡清
  51. 口氢洁气小气泡清韩进口氢洁气小气泡
  52. </view>
  53. </view>
  54. <form>
  55. <view class="uni-form-item uni-column">
  56. <view class="title"><text style="font-size: 26rpx;color: #F85050;">*</text>期望单价:</view>
  57. <view style="position: relative;">
  58. <view class="input_icon">
  59. </view>
  60. <input class="uni-input" focus placeholder="自动获得焦点" />
  61. </view>
  62. </view>
  63. <view class="uni-form-item uni-column">
  64. <view class="title"><text style="font-size: 26rpx;color: #F85050;">*</text>采购数量:</view>
  65. <view style="position: relative;">
  66. <input class="uni-input" focus placeholder="自动获得焦点" />
  67. </view>
  68. </view>
  69. <view class="submit_btn">
  70. <button class="popup_btn cancel">取消</button>
  71. <button class="popup_btn submit">确定</button>
  72. </view>
  73. </form>
  74. </view>
  75. </tui-bottom-popup>
  76. <!--加载loadding-->
  77. <tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
  78. <tui-nomore :visible="!pullUpOn" :backgroundColor="'#F7F7F7'" :text="nomoreText"></tui-nomore>
  79. <!--加载loadding-->
  80. </view>
  81. </template>
  82. <script>
  83. import proCard from './components/procurement_card.vue'
  84. export default {
  85. components: {
  86. proCard,
  87. },
  88. data() {
  89. return {
  90. skeletonShow: true,
  91. tabs: [
  92. {
  93. name: '全部'
  94. },
  95. {
  96. name:'我参与的'
  97. },
  98. {
  99. name: '我发起的'
  100. }
  101. ],
  102. currentTab: 0,
  103. modal: false,
  104. contentModalText: '确定退出参与该需求吗?',
  105. modalButton: [
  106. {
  107. text: '取消',
  108. type: 'gray',
  109. plain: true, //是否空心
  110. },
  111. {
  112. text: '确认',
  113. customStyle: {
  114. color: '#fff',
  115. bgColor: 'linear-gradient(90deg, #F28F31 0%, #F3B574 100%)'
  116. },
  117. plain: false
  118. }
  119. ],
  120. proDataInfo: {},
  121. popupShow: false,
  122. loadding: true,
  123. pullUpOn: true,
  124. }
  125. },
  126. mounted() {
  127. this.skeletonShow = false
  128. },
  129. methods:{
  130. handlerTabs($event) {
  131. this.currentTab = $event.index
  132. },
  133. handleClick($event) {
  134. this.modal = false
  135. if ($event.index === 1) {}
  136. },
  137. hideMobel($event) {},
  138. modelData(proData) {
  139. this.modal = true
  140. this.proDataInfo = proData
  141. },
  142. // 关闭底部
  143. handlerPopupClose() {
  144. this.popupShow = false
  145. },
  146. // 我要参与
  147. popupAdd($event) {
  148. console.log($event)
  149. this.popupShow = true
  150. },
  151. // 修改
  152. popupChange($event) {
  153. uni.navigateTo({
  154. url: '/pages/goods/procurement_info'
  155. })
  156. },
  157. // 发布
  158. procurementAdd() {
  159. uni.navigateTo({
  160. url: '/pages/goods/procurementAdd'
  161. })
  162. },
  163. },
  164. }
  165. </script>
  166. <style lang="scss" scoped>
  167. .proInit {
  168. background-color: #F7F7F7;
  169. }
  170. .proInit .tab {
  171. position: fixed;
  172. left: 0;
  173. top: 0;
  174. z-index: 9;
  175. }
  176. ::v-deep .tui-tabs-slider.data-v-9311a734 {
  177. background: #F3B574 !important;
  178. }
  179. ::v-deep .tui-tabs-title.tui-tabs-active {
  180. color: #F3B574 !important;
  181. }
  182. .tabsContent {
  183. background-color: #F7F7F7;
  184. padding: 16rpx 32rpx;
  185. // margin-bottom: 32rpx;
  186. }
  187. .add_btn {
  188. width: 100rpx;
  189. height: 100rpx;
  190. position: fixed;
  191. bottom: 129rpx;
  192. right: 34rpx;
  193. }
  194. .popup_content {
  195. padding: 0 64rpx;
  196. }
  197. .pro_popup_title {
  198. font-size: 32rpx;
  199. font-weight: bold;
  200. color: #333333;
  201. margin: 40rpx auto;
  202. text-align: center;
  203. }
  204. .popup_form {
  205. margin-bottom: 32rpx;
  206. }
  207. .popup_form .popup_form_item {
  208. color: #999999;
  209. font-size: 26rpx;
  210. margin-bottom: 16rpx;
  211. }
  212. .popup_form .popup_img {
  213. width: 136rpx;
  214. height: 136rpx;
  215. border: 1px dotted black;
  216. }
  217. .popup_form .popup_form_name {
  218. color: #333333;
  219. font-size: 26rpx;
  220. font-weight: 400;
  221. line-height: 44rpx;
  222. }
  223. .uni-form-item .title {
  224. color: #999999;
  225. font-size: 26rpx;
  226. margin-bottom: 16rpx;
  227. }
  228. .input_icon {
  229. position: absolute;
  230. left: 15rpx;
  231. top: 24rpx;
  232. color: #B2B2B2;
  233. font-size: 26rpx;
  234. }
  235. .uni-form-item .uni-input {
  236. height: 80rpx;
  237. border: 1px solid #B2B2B2;
  238. border-radius: 6rpx 6rpx 6rpx 6rpx;
  239. font-size: 26rpx;
  240. padding-left: 47rpx;
  241. margin-bottom: 32rpx;
  242. }
  243. .submit_btn {
  244. margin-top: 56rpx;
  245. height: 84rpx;
  246. display: flex;
  247. justify-content: space-between;
  248. align-items: center;
  249. margin-bottom: 50rpx;
  250. }
  251. .submit_btn .popup_btn {
  252. width: 280rpx;
  253. height: 100%;
  254. border-radius: 45rpx 45rpx 45rpx 45rpx;
  255. text-align: center;
  256. line-height: 84rpx;
  257. }
  258. ::v-deep .submit_btn .cancel {
  259. background-color: #FFF4E6;
  260. color: #F3B574;
  261. font-size: 32rpx;
  262. }
  263. ::v-deep .submit_btn .submit {
  264. background-color: #F3B574;
  265. color: #FFFFFF;
  266. font-size: 32rpx;
  267. }
  268. </style>