瀏覽代碼

新增采集需求

xiebaomin 2 年之前
父節點
當前提交
8a8957ccda

+ 20 - 0
pages.json

@@ -57,6 +57,26 @@
                         "enablePullDownRefresh": true,
                         "enablePullDownRefresh": true,
                         "navigationStyle": "custom"
                         "navigationStyle": "custom"
                     }
                     }
+                },
+                {
+                    "path": "procurement",
+                    "style": {
+                        "navigationBarTitleText": "采集需求",
+                        "enablePullDownRefresh": true
+                    }
+                },{
+                    "path" : "procurement_info",
+                    "style" : {
+                        "navigationBarTitleText": "需求详情",
+                        "enablePullDownRefresh": false
+                    }
+                }, {
+                    "path" : "procurementAdd",
+                    "style" : {
+                        "navigationBarTitleText": "发布需求",
+                        "enablePullDownRefresh": false
+                    }
+                    
                 }
                 }
             ]
             ]
         },
         },

+ 58 - 0
pages/goods/components/procurement-btn.vue

@@ -0,0 +1,58 @@
+<template>
+    <button class="pro-btn" :style="{
+        width,
+        height,
+        background,
+        color,
+        fontSize,
+        borderRadius: border ? borderRadius : '',
+        lineHeight: height
+    }">
+        <span><slot></slot></span>
+    </button>
+</template>
+
+<script>
+    export default {
+        props: {
+            border: {
+                type: Boolean,
+                default: () => true
+            },
+            width: {
+                type: String,
+                default: () => '280rpx'
+            },
+            height: {
+                type: String,
+                default: () => '84rpx'
+            },
+            background: {
+                type: String,
+                default: () => '#FFF4E6'
+            },
+            color: {
+                type: String,
+                default: () => '#F3B574'
+            },
+            fontSize: {
+                type: String,
+                default: () => '32rpx'
+            },
+            borderRadius: {
+                type: String,
+                default: () => '45rpx'
+            },
+        }
+    }
+</script>
+
+<style scoped lang="scss">
+    .pro-btn {
+        display: inline-block;/*变为行内块:*/
+        line-height: 1;
+        white-space: nowrap;/*规定段落中的文本不进行换行:*/
+        cursor: pointer;
+        text-align: center;
+    }
+</style>

+ 24 - 10
pages/goods/components/procurement_card.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-    <view class="card">
+    <view class="card" :style="{padding: proStatus ? '32rpx 32rpx 0 32rpx' : '32rpx'}">
         <view class="card_title">
         <view class="card_title">
             <view class="card_user_icon">
             <view class="card_user_icon">
                 发起者
                 发起者
@@ -49,7 +49,7 @@
                 </view>
                 </view>
             </view>
             </view>
         </view>
         </view>
-        <view class="card_foot">
+        <view class="card_foot" v-if='proStatus'>
             <view class="foot_title">
             <view class="foot_title">
                 您已参与
                 您已参与
             </view>
             </view>
@@ -65,7 +65,7 @@
                 </view>
                 </view>
             </view>
             </view>
         </view>
         </view>
-<!--        <view class="card_foot_2">
+<!--        <view class="card_foot_2" @click="procurementAdd">
             <view class="foot_title">
             <view class="foot_title">
                 我要参与
                 我要参与
             </view>
             </view>
@@ -76,16 +76,17 @@
             </view>
             </view>
         </view> -->
         </view> -->
         <view class="card_status">
         <view class="card_status">
-            <image style="width: 100%;height: 100%;" src="@/static/procurement/success.png" mode="aspectFill"></image>
+            <image v-if='proStatus' style="width: 100%;height: 100%;" src="@/static/procurement/success.png" mode="aspectFill"></image>
+            <image v-else style="width: 100%;height: 100%;" src="@/static/procurement/delete.png" mode="aspectFill"></image>
         </view>
         </view>
-        <!-- <view class="card_bg"></view> -->
+        <view class="card_bg" v-if='!proStatus'></view>
     </view>
     </view>
 </template>
 </template>
 
 
 <script>
 <script>
     export default {
     export default {
         props: {
         props: {
-            item: {
+            procuretInfo: {
                 id: 1,
                 id: 1,
                 msg: '12313'
                 msg: '12313'
             }
             }
@@ -94,20 +95,33 @@
             return {
             return {
                 //data 数据
                 //data 数据
                 card: {},
                 card: {},
-                status: ['已实现', '已删除']
             }
             }
         },
         },
+        computed: {
+            // 状态
+            proStatus() {
+                return this.procuretInfo % 2 === 0
+            },
+        },
         methods: {
         methods: {
             handlerChange() {
             handlerChange() {
-                this.$emit('modelData', this.item)
+                
             },
             },
             handlerDelete() {},
             handlerDelete() {},
             // 删除
             // 删除
             procurementDelete() {},
             procurementDelete() {},
             // 修改
             // 修改
-            procurementChange() {},
+            procurementChange() {
+                this.$emit('popupChange', this.procuretInfo)
+            },
+            // 参与
+            procurementAdd() {
+                this.$emit('popupAdd', this.procuretInfo)
+            },
             // 退出
             // 退出
-            procurementExit() {},
+            procurementExit() {
+                this.$emit('modelData', this.procuretInfo)
+            },
         }
         }
     }
     }
 </script>
 </script>

+ 33 - 0
pages/goods/components/upload.vue

@@ -0,0 +1,33 @@
+<template>
+    <view class="upload" @click="handlerUpload">
+        <input type="file" ref='upload_inp' class="upload_inp">
+    </view>
+</template>
+
+<script>
+    export default {
+        data() {
+            return {}
+        },
+        methods: {
+            handlerUpload() {
+                const upload = this.$refs.upload_inp
+                upload.onclick = function (e) {
+                    console.log(e)
+                }
+            }
+        }
+    }
+</script>
+
+<style scoped lang="scss">
+    .upload {
+        width: 210rpx;
+        height: 210rpx;
+        border-radius: 6rpx 6rpx 6rpx 6rpx;
+        border: 1rpx dotted #B2B2B2;
+    }
+    .upload_inp {
+        display: none;
+    }
+</style>

+ 158 - 7
pages/goods/procurement.vue

@@ -9,8 +9,8 @@
         ></tui-skeleton>
         ></tui-skeleton>
         <view v-else>
         <view v-else>
             <tui-tabs :tabs="tabs" :currentTab="currentTab" @change="handlerTabs" class="tab"></tui-tabs>
             <tui-tabs :tabs="tabs" :currentTab="currentTab" @change="handlerTabs" class="tab"></tui-tabs>
-            <view class="tabsContent" @modelData='modelData' v-for="(item, index) in 5" :key="index" :style="{marginTop: index === 0 ? '40px' : ''}">
-                <proCard />
+            <view class="tabsContent" v-for="(item, index) in 5" :key="index" :style="{marginTop: index === 0 ? '40px' : ''}">
+                <proCard @modelData="modelData" :procuretInfo='item' @popupAdd="popupAdd" @popupChange='popupChange'/>
             </view>
             </view>
         </view>
         </view>
         <!-- 弹窗提示 -->
         <!-- 弹窗提示 -->
@@ -26,9 +26,58 @@
         	:maskClosable="false"
         	:maskClosable="false"
         >
         >
         </tui-modal>
         </tui-modal>
-        <view class="add_btn">
+        <view class="add_btn" @click="procurementAdd">
             <image style="width: 100%;height: 100%;" src="@/static/procurement/add_pro.png"></image>
             <image style="width: 100%;height: 100%;" src="@/static/procurement/add_pro.png"></image>
         </view>
         </view>
+        <tui-bottom-popup  :zIndex="1002" :maskZIndex="1001" :show="popupShow" @close="handlerPopupClose">
+        	<view class="popup_content">
+        	    <view class="pro_popup_title">
+        	        参与需求
+        	    </view>
+                <view class="popup_form">
+                    <view class="popup_form_item">
+                        商品图片:
+                    </view>
+                    <view class="popup_img">
+                        <image style="width: 100%;height: 100%;" src="" mode="aspectFill"></image>
+                    </view>
+                </view>
+                <view class="popup_form">
+                    <view class="popup_form_item">
+                        商品名称:
+                    </view>
+                    <view class="popup_form_name">
+                        韩国恩盛进口氢洁气小气泡清韩进口氢洁气小气泡清
+                        口氢洁气小气泡清韩进口氢洁气小气泡
+                    </view>
+                </view>
+                <form>
+                    <view class="uni-form-item uni-column">
+                        <view class="title"><text style="font-size: 26rpx;color: #F85050;">*</text>期望单价:</view>
+                        <view style="position: relative;">
+                            <view class="input_icon">
+                                ¥
+                            </view>
+                            <input class="uni-input" focus placeholder="自动获得焦点" />
+                        </view>
+                    </view>
+                    <view class="uni-form-item uni-column">
+                        <view class="title"><text style="font-size: 26rpx;color: #F85050;">*</text>采购数量:</view>
+                        <view style="position: relative;">
+                            <input class="uni-input" focus placeholder="自动获得焦点" />
+                        </view>
+                    </view>
+                    <view class="submit_btn">
+                        <button class="popup_btn cancel">取消</button>
+                        <button class="popup_btn submit">确定</button>
+                    </view>
+                </form>
+        	</view>
+        </tui-bottom-popup>
+        <!--加载loadding-->
+        <tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
+        <tui-nomore :visible="!pullUpOn" :backgroundColor="'#F7F7F7'" :text="nomoreText"></tui-nomore>
+        <!--加载loadding-->
     </view>
     </view>
 </template>
 </template>
 
 
@@ -69,7 +118,11 @@
                         },
                         },
                         plain: false
                         plain: false
                     }
                     }
-                ]
+                ],
+                proDataInfo: {},
+                popupShow: false,
+                loadding: true,
+                pullUpOn: true,
             }
             }
         },
         },
         mounted() {
         mounted() {
@@ -77,22 +130,46 @@
         },
         },
         methods:{
         methods:{
             handlerTabs($event) {
             handlerTabs($event) {
-                console.log($event)
                 this.currentTab = $event.index
                 this.currentTab = $event.index
             },
             },
             handleClick($event) {
             handleClick($event) {
-                console.log($event.index)
                 this.modal = false
                 this.modal = false
+                if ($event.index === 1) {}
             },
             },
             hideMobel($event) {},
             hideMobel($event) {},
             modelData(proData) {
             modelData(proData) {
-                console.log(proData)
+                this.modal = true
+                this.proDataInfo = proData
+            },
+            // 关闭底部
+            handlerPopupClose() {
+                this.popupShow = false
+            },
+            // 我要参与
+            popupAdd($event) {
+                console.log($event)
+                this.popupShow = true
+            },
+            // 修改
+            popupChange($event) {
+                uni.navigateTo({
+                	url: '/pages/goods/procurement_info'
+                })
+            },
+            // 发布
+            procurementAdd() {
+                uni.navigateTo({
+                	url: '/pages/goods/procurementAdd'
+                })
             },
             },
         },
         },
     }
     }
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
+.proInit {
+    background-color: #F7F7F7;
+}
 .proInit .tab {
 .proInit .tab {
     position: fixed;
     position: fixed;
     left: 0;
     left: 0;
@@ -117,4 +194,78 @@
     bottom: 129rpx;
     bottom: 129rpx;
     right: 34rpx;
     right: 34rpx;
 }
 }
+.popup_content {
+    padding: 0 64rpx;
+}
+.pro_popup_title {
+    font-size: 32rpx;
+    font-weight: bold;
+    color: #333333;
+    margin: 40rpx auto;
+    text-align: center;
+}
+.popup_form {
+    margin-bottom: 32rpx;
+}
+.popup_form .popup_form_item {
+    color: #999999;
+    font-size: 26rpx;
+    margin-bottom: 16rpx;
+}
+.popup_form .popup_img {
+    width: 136rpx;
+    height: 136rpx;
+    border: 1px dotted black;
+}
+.popup_form .popup_form_name {
+    color: #333333;
+    font-size: 26rpx;
+    font-weight: 400;
+    line-height: 44rpx;
+}
+.uni-form-item .title {
+    color: #999999;
+    font-size: 26rpx;
+    margin-bottom: 16rpx;
+}
+.input_icon {
+    position: absolute;
+    left: 15rpx;
+    top: 24rpx;
+    color: #B2B2B2;
+    font-size: 26rpx;
+}
+.uni-form-item .uni-input {
+    height: 80rpx;
+    border: 1px solid #B2B2B2;
+    border-radius: 6rpx 6rpx 6rpx 6rpx;
+    font-size: 26rpx;
+    padding-left: 47rpx;
+    margin-bottom: 32rpx;
+}
+.submit_btn {
+    margin-top: 56rpx;
+    height: 84rpx;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    margin-bottom: 50rpx;
+}
+.submit_btn .popup_btn {
+    width: 280rpx;
+    height: 100%;
+    border-radius: 45rpx 45rpx 45rpx 45rpx;
+    text-align: center;
+    line-height: 84rpx;
+}
+::v-deep .submit_btn .cancel {
+    background-color: #FFF4E6;
+    color: #F3B574;
+    font-size: 32rpx;
+}
+::v-deep .submit_btn .submit {
+    background-color: #F3B574;
+    color: #FFFFFF;
+    font-size: 32rpx;
+}
 </style>
 </style>

+ 82 - 0
pages/goods/procurementAdd.vue

@@ -0,0 +1,82 @@
+<template>
+    <view class="release">
+        <form>
+            <view class="uni-form-item uni-column">
+                <view class="title"><span>*</span>商品图片</view>
+                <view class="uploadComp">
+                    <proUpload />
+                </view>
+            </view>
+            <view class="uni-form-item uni-column">
+                <view class="title"><span>*</span>商品名称</view>
+                <view>
+                    <input class="uni-input" focus placeholder="自动获得焦点" />
+                </view>
+            </view>
+            <view class="uni-form-item uni-column">
+                <view class="title"><span>*</span>期望单价</view>
+                <view>
+                    <input class="uni-input" focus placeholder="自动获得焦点" />
+                </view>
+            </view>
+            <view class="uni-form-item uni-column">
+                <view class="title"><span>*</span>采购数量</view>
+                <view>
+                    <input class="uni-input" focus placeholder="自动获得焦点" />
+                </view>
+            </view>
+        </form>
+        <view class="release_btn">
+            <proBtn width="600rpx" height="90rpx" background='#E2E2E2' color='#999999' fontSize='32rpx'>发布</proBtn>
+        </view>
+    </view>
+</template>
+
+<script>
+    import proBtn from './components/procurement-btn.vue'
+    import proUpload from './components/upload.vue'
+    export default {
+        components: {
+            proUpload,
+            proBtn
+        },
+    }
+</script>
+
+<style lang="scss" scoped>
+    .release {
+        padding: 24rpx;
+    }
+    span{
+        color: #F85050;
+        font-size: 28rpx;
+    }
+    .title {
+        font-size: 28rpx;
+        color: #666666;
+        margin-bottom: 24rpx;
+    }
+    .uploadComp {
+        margin-bottom: 40rpx;
+    }
+    .uni-input {
+        border-radius: 6rpx 6rpx 6rpx 6rpx;
+        border: 1rpx solid #B2B2B2;
+        height: 90rpx;
+        font-size: 28rpx;
+        padding: 24rpx;
+        margin-bottom: 40rpx;
+        box-sizing: border-box;
+        line-height: 40rpx;
+    }
+    .release_btn {
+        position: fixed;
+        left: 0;
+        bottom: 0;
+        margin-bottom: 76rpx;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        width: 100%;
+    }
+</style>

+ 258 - 0
pages/goods/procurement_info.vue

@@ -0,0 +1,258 @@
+<template>
+   <view style="background-color: #fff;position: relative;">
+       <view class="procure_info">
+           <view class="info_card">
+               <view class="card_title">
+                   采购商品
+               </view>
+               <view class="card_line"></view>
+               <view class="card_store">
+                   <image class="img" src="" mode="aspectFill"></image>
+                   <view class="store_title">
+                      韩国恩盛进口氢洁气小气泡清韩进口氢洁气小气泡清...
+                   </view>
+               </view>
+               <view class="back-filter"></view>
+           </view>
+           <view class="info_Initiator">
+               <view class="card_title">
+                   发起者需求
+               </view>
+               <view class="card_line"></view>
+               <view class="Initiator_contant">
+                   <view class="Initiator_name">
+                       <view class="Initiator_icon">
+                           发起者
+                       </view>
+                       <view class="user">
+                           科医人医疗激光设备贸易公司
+                       </view>
+                   </view>
+                   <view class="Initiator_price">
+                       <view class="unit_price">
+                           <view class="title">
+                               期望单价:
+                           </view>
+                           <view class="price">
+                               ¥500.00
+                           </view>
+                       </view>
+                       <view class="unit_sum">
+                           <view class="title">
+                               采购数量:
+                           </view>
+                           <view class="price">
+                               50
+                           </view>
+                       </view>
+                   </view>
+               </view>
+               <view class="status">
+<!--                   <image style="width: 100%;height: 100%;" src="@/static/procurement/success.png" mode="aspectFill"></image> -->
+                    <image style="width: 100%;height: 100%;" src="@/static/procurement/delete.png" mode="aspectFill"></image>
+               </view>
+               <view class="back-filter"></view>
+           </view>
+           <view class="info_Participant">
+               <view class="card_title">
+                   参与者需求(3)
+               </view>
+               <view class="card_line"></view>
+               <view class="Initiator_contant" v-for="(item, index) in 3" :key="item" :style="{margin: index!== 0 ? '24rpx 8rpx 16rpx 8rpx' : '40rpx 8rpx 16rpx 8rpx'}">
+                   <view class="Initiator_name">
+                       <view class="Initiator_icon">
+                           参与者
+                       </view>
+                       <view class="user">
+                           科医人医疗激光设备贸易公司
+                       </view>
+                   </view>
+                   <view class="Initiator_price">
+                       <view class="unit_price">
+                           <view class="title">
+                               期望单价:
+                           </view>
+                           <view class="price">
+                               ¥500.00
+                           </view>
+                       </view>
+                       <view class="unit_sum">
+                           <view class="title">
+                               采购数量:
+                           </view>
+                           <view class="price">
+                               50
+                           </view>
+                       </view>
+                   </view>
+               </view>
+               <view class="empty" v-if='false'>
+                   暂无参与者~
+               </view>
+               <view class="back-filter"></view>
+           </view>
+       </view>
+       <view class="info_btn">
+           <proBtn>删除</proBtn>
+           <proBtn color='#FFFFFF' background='#F3B574'>修改</proBtn>
+       </view>
+   </view>
+</template>
+
+<script>
+    import proBtn from './components/procurement-btn.vue'
+    export default {
+        components: {
+            proBtn,
+        },
+        data() {
+            return {
+                
+            }
+        }
+    }
+</script>
+
+<style lang="scss" scoped>
+.img {
+    width: 136rpx;
+    height: 136rpx;
+    border: 1px dotted black;
+    margin-right: 24rpx;
+}
+.procure_info {
+    background-color: #F7F7F7;
+    padding: 24rpx;
+}
+.procure_info .info_card {
+    height: 340rpx;
+    padding: 24rpx;
+    background-color: #fff;
+    border-radius: 16rpx 16rpx 16rpx 16rpx;
+    box-sizing: border-box;
+    position: relative;
+}
+.card_title {
+    color: #333333;
+    font-size: 32rpx;
+    font-weight: bold;
+}
+.card_line {
+    border: 1rpx solid #E1E1E1;
+    margin-top: 24rpx;
+}
+.info_card .card_store {
+    margin: 40rpx 8px;
+    padding: 12rpx;
+    background-color: #F7F7F7;
+    display: flex;
+    align-items: center;
+    border-radius: 8rpx 8rpx 8rpx 8rpx;
+}
+.info_card .store_title {
+    width: 442rpx;
+    font-size: 26rpx;
+    color: #333333;
+    line-height: 48rpx;
+}
+.procure_info .info_Initiator {
+    background-color: #fff;
+    border-radius: 16rpx 16rpx 16rpx 16rpx;
+    padding: 24rpx;
+    margin: 24rpx 0;
+    box-sizing: border-box;
+    position: relative;
+}
+.Initiator_contant {
+    height: 220rpx;
+    background-color: #F7F7F7;
+    margin: 40rpx 8rpx 16rpx 8rpx;
+    border-radius: 8rpx 8rpx 8rpx 8rpx;
+    padding: 40rpx 24rpx;
+    box-sizing: border-box;
+}
+.Initiator_contant .Initiator_name {
+    display: flex;
+    align-items: center;
+}
+.Initiator_contant .Initiator_icon {
+    width: 96rpx;
+    height: 40rpx;
+    line-height: 40rpx;
+    font-size: 24rpx;
+    text-align: center;
+    color: #fff;
+    background-color: #F3B574;
+    border-radius: 8rpx;
+    margin-right: 24rpx;
+}
+.Initiator_name .user{
+    color: #333333;
+    font-size: 32rpx;
+    font-weight: bold;
+}
+.Initiator_contant .Initiator_price {
+    margin-top: 48rpx;
+    display: flex;
+    align-items: center;
+}
+.Initiator_price .unit_price,
+.Initiator_price .unit_sum{
+    display: flex;
+    align-items: center;
+}
+.Initiator_price .unit_sum {
+    margin-left: 120rpx;
+}
+.title {
+    color: #999999;
+    font-size: 26rpx;
+    font-weight: 400;
+}
+.price {
+    color: #333333;
+    font-size: 26rpx;
+}
+.info_Participant {
+    background-color: #fff;
+    padding: 24rpx;
+    border-radius: 16rpx;
+    margin-bottom: 256rpx;
+    position: relative;
+}
+.empty {
+    height: 250rpx;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    font-size: 26rpx;
+    color: #B2B2B2;
+}
+.info_btn {
+    position: fixed;
+    bottom: 0%;
+    left: 0;
+    padding: 16rpx 56rpx 84rpx 56rpx;
+    justify-content: space-between;
+    display: flex;
+    align-items: center;
+    background-color: #fff;
+    width: 100%;
+    box-sizing: border-box;
+}
+.status {
+    position: absolute;
+    width: 150rpx;
+    height: 100rpx;
+    right: 48rpx;
+    top: 48rpx;
+}
+.back-filter {
+    position: absolute;
+    left: 0;
+    top: 0;
+    background-color: rgba(255, 255, 255, 0.7);
+    height: 100%;
+    width: 100%;
+}
+</style>