procurement.vue 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  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. import jumpMixins from '@/mixins/jumpMixins.js'
  85. export default {
  86. components: {
  87. proCard,
  88. },
  89. mixins: [jumpMixins],
  90. data() {
  91. return {
  92. skeletonShow: true,
  93. tabs: [
  94. {
  95. name: '全部'
  96. },
  97. {
  98. name:'我参与的'
  99. },
  100. {
  101. name: '我发起的'
  102. }
  103. ],
  104. currentTab: 0,
  105. modal: false,
  106. contentModalText: '确定退出参与该需求吗?',
  107. modalButton: [
  108. {
  109. text: '取消',
  110. type: 'gray',
  111. plain: true, //是否空心
  112. },
  113. {
  114. text: '确认',
  115. customStyle: {
  116. color: '#fff',
  117. bgColor: 'linear-gradient(90deg, #F28F31 0%, #F3B574 100%)'
  118. },
  119. plain: false
  120. }
  121. ],
  122. proDataInfo: {},
  123. popupShow: false,
  124. loadding: true,
  125. pullUpOn: true,
  126. }
  127. },
  128. mounted() {
  129. this.skeletonShow = false
  130. },
  131. methods:{
  132. handlerTabs($event) {
  133. this.currentTab = $event.index
  134. },
  135. handleClick($event) {
  136. this.modal = false
  137. if ($event.index === 1) {}
  138. },
  139. hideMobel($event) {},
  140. modelData(proData) {
  141. this.modal = true
  142. this.proDataInfo = proData
  143. },
  144. // 关闭底部
  145. handlerPopupClose() {
  146. this.popupShow = false
  147. },
  148. // 我要参与
  149. popupAdd($event) {
  150. console.log($event)
  151. this.popupShow = true
  152. },
  153. // 修改
  154. popupChange($event) {
  155. uni.navigateTo({
  156. url: '/pages/goods/procurement_info'
  157. })
  158. },
  159. // 发布
  160. procurementAdd() {
  161. uni.navigateTo({
  162. url: '/pages/goods/procurementAdd'
  163. })
  164. },
  165. },
  166. }
  167. </script>
  168. <style lang="scss" scoped>
  169. .proInit {
  170. background-color: #F7F7F7;
  171. }
  172. .proInit .tab {
  173. position: fixed;
  174. left: 0;
  175. top: 0;
  176. z-index: 9;
  177. }
  178. ::v-deep .tui-tabs-slider.data-v-9311a734 {
  179. background: #F3B574 !important;
  180. }
  181. ::v-deep .tui-tabs-title.tui-tabs-active {
  182. color: #F3B574 !important;
  183. }
  184. .tabsContent {
  185. background-color: #F7F7F7;
  186. padding: 16rpx 32rpx;
  187. // margin-bottom: 32rpx;
  188. }
  189. .add_btn {
  190. width: 100rpx;
  191. height: 100rpx;
  192. position: fixed;
  193. bottom: 129rpx;
  194. right: 34rpx;
  195. }
  196. .popup_content {
  197. padding: 0 64rpx;
  198. }
  199. .pro_popup_title {
  200. font-size: 32rpx;
  201. font-weight: bold;
  202. color: #333333;
  203. margin: 40rpx auto;
  204. text-align: center;
  205. }
  206. .popup_form {
  207. margin-bottom: 32rpx;
  208. }
  209. .popup_form .popup_form_item {
  210. color: #999999;
  211. font-size: 26rpx;
  212. margin-bottom: 16rpx;
  213. }
  214. .popup_form .popup_img {
  215. width: 136rpx;
  216. height: 136rpx;
  217. border: 1px dotted black;
  218. }
  219. .popup_form .popup_form_name {
  220. color: #333333;
  221. font-size: 26rpx;
  222. font-weight: 400;
  223. line-height: 44rpx;
  224. }
  225. .uni-form-item .title {
  226. color: #999999;
  227. font-size: 26rpx;
  228. margin-bottom: 16rpx;
  229. }
  230. .input_icon {
  231. position: absolute;
  232. left: 15rpx;
  233. top: 24rpx;
  234. color: #B2B2B2;
  235. font-size: 26rpx;
  236. }
  237. .uni-form-item .uni-input {
  238. height: 80rpx;
  239. border: 1px solid #B2B2B2;
  240. border-radius: 6rpx 6rpx 6rpx 6rpx;
  241. font-size: 26rpx;
  242. padding-left: 47rpx;
  243. margin-bottom: 32rpx;
  244. }
  245. .submit_btn {
  246. margin-top: 56rpx;
  247. height: 84rpx;
  248. display: flex;
  249. justify-content: space-between;
  250. align-items: center;
  251. margin-bottom: 50rpx;
  252. }
  253. .submit_btn .popup_btn {
  254. width: 280rpx;
  255. height: 100%;
  256. border-radius: 45rpx 45rpx 45rpx 45rpx;
  257. text-align: center;
  258. line-height: 84rpx;
  259. }
  260. ::v-deep .submit_btn .cancel {
  261. background-color: #FFF4E6;
  262. color: #F3B574;
  263. font-size: 32rpx;
  264. }
  265. ::v-deep .submit_btn .submit {
  266. background-color: #F3B574;
  267. color: #FFFFFF;
  268. font-size: 32rpx;
  269. }
  270. </style>