Browse Source

新增采集需求

xiebaomin 2 years ago
parent
commit
6ed233057e

+ 10 - 10
components/thorui/tui-card/tui-card.vue

@@ -22,7 +22,7 @@
 
 
 <script>
 <script>
 	export default {
 	export default {
-		name: "tuiCard",
+		name: 'tuiCard',
 		props: {
 		props: {
 			//是否铺满
 			//是否铺满
 			full: {
 			full: {
@@ -33,7 +33,7 @@
 				type: Object,
 				type: Object,
 				default: function() {
 				default: function() {
 					return {
 					return {
-						url: "", //图片地址
+						url: '', //图片地址
 						height: 60, //图片高度
 						height: 60, //图片高度
 						width: 60, //图片宽度
 						width: 60, //图片宽度
 						circle: false
 						circle: false
@@ -45,9 +45,9 @@
 				type: Object,
 				type: Object,
 				default: function() {
 				default: function() {
 					return {
 					return {
-						text: "", //标题文字
+						text: '', //标题文字
 						size: 30, //字体大小
 						size: 30, //字体大小
-						color: "#7A7A7A" //字体颜色
+						color: '#7A7A7A' //字体颜色
 					}
 					}
 				}
 				}
 			},
 			},
@@ -56,9 +56,9 @@
 				type: Object,
 				type: Object,
 				default: function() {
 				default: function() {
 					return {
 					return {
-						text: "", //标签文字
+						text: '', //标签文字
 						size: 24, //字体大小
 						size: 24, //字体大小
-						color: "#b2b2b2" //字体颜色
+						color: '#b2b2b2' //字体颜色
 					}
 					}
 				}
 				}
 			},
 			},
@@ -66,7 +66,7 @@
 				type: Object,
 				type: Object,
 				default: function() {
 				default: function() {
 					return {
 					return {
-						bgcolor: "#fff", //背景颜色
+						bgcolor: '#fff', //背景颜色
 						line: false //是否去掉底部线条
 						line: false //是否去掉底部线条
 					}
 					}
 				}
 				}
@@ -85,12 +85,12 @@
 			handleClick() {
 			handleClick() {
 				this.$emit('click', {
 				this.$emit('click', {
 					index: this.index
 					index: this.index
-				});
+				})
 			},
 			},
 			longTap() {
 			longTap() {
 				this.$emit('longclick', {
 				this.$emit('longclick', {
 					index: this.index
 					index: this.index
-				});
+				})
 			}
 			}
 		}
 		}
 	}
 	}
@@ -108,7 +108,7 @@
 	}
 	}
 
 
 	.tui-card-full {
 	.tui-card-full {
-		margin: 0 !important;
+		margin: 8rpx !important;
 		border-radius: 0 !important;
 		border-radius: 0 !important;
 	}
 	}
 
 

+ 6 - 0
pages.json

@@ -103,6 +103,12 @@
 						"enablePullDownRefresh": false,
 						"enablePullDownRefresh": false,
 						"navigationStyle": "custom"
 						"navigationStyle": "custom"
 					}
 					}
+				}, {
+					"path": "procurement",
+					"style": {
+						"navigationBarTitleText": "采集需求",
+						"enablePullDownRefresh": true
+					}
 				}
 				}
 			]
 			]
 		},
 		},

+ 269 - 0
pages/goods/components/procurement_card.vue

@@ -0,0 +1,269 @@
+<template>
+    <view class="card">
+        <view class="card_title">
+            <view class="card_user_icon">
+                发起者
+            </view>
+            <view class="card_user">
+                科医人医疗激光设备贸易公司
+            </view>
+        </view>
+        <view class="card_time">2023-04-26   16:20:10</view>
+        <view class="card_content">
+            <image class="card_content_img" src="" mode=""></image>
+            <view class="card_content_title">
+                韩国恩盛进口氢洁气小气泡清韩进口氢
+                洁气小气泡清...
+            </view>
+        </view>
+        <view class="card_form">
+            <view class="form">
+                <view class="form_title">
+                    期望单价:
+                </view>
+                <view class="form_price">
+                    ¥100.00
+                </view>
+            </view>
+        </view>
+        <view class="card_form">
+            <view class="form">
+                <view class="form_title">
+                    采购数量:
+                </view>
+                <view class="form_price">
+                    ¥100.00
+                </view>
+            </view>
+            <view class="form_title">
+                >
+            </view>
+        </view>
+        <view class="card_form">
+            <view class="form">
+                <view class="form_title">
+                    参与机构数:
+                </view>
+                <view class="form_price">
+                    ¥100.00
+                </view>
+            </view>
+        </view>
+        <view class="card_foot">
+            <view class="foot_title">
+                您已参与
+            </view>
+            <view class="foot_continue">
+               <view class="foot_change" @click="procurementChange">
+                    修改
+                </view>
+                <!-- <view class="foot_delete" @click="procurementDelete">
+                    删除
+                </view> -->
+                <view class="foot_exit" @click="procurementExit">
+                    退出
+                </view>
+            </view>
+        </view>
+<!--        <view class="card_foot_2">
+            <view class="foot_title">
+                我要参与
+            </view>
+        </view>
+        <view class="card_foot_2">
+            <view class="foot_title_2">
+                您已参与
+            </view>
+        </view> -->
+        <view class="card_status">
+            <image style="width: 100%;height: 100%;" src="@/static/procurement/success.png" mode="aspectFill"></image>
+        </view>
+        <!-- <view class="card_bg"></view> -->
+    </view>
+</template>
+
+<script>
+    export default {
+        props: {
+            item: {
+                id: 1,
+                msg: '12313'
+            }
+        },
+        data() {
+            return {
+                //data 数据
+                card: {},
+                status: ['已实现', '已删除']
+            }
+        },
+        methods: {
+            handlerChange() {
+                this.$emit('modelData', this.item)
+            },
+            handlerDelete() {},
+            // 删除
+            procurementDelete() {},
+            // 修改
+            procurementChange() {},
+            // 退出
+            procurementExit() {},
+        }
+    }
+</script>
+
+<style scoped lang="scss">
+.card{
+    border-radius: 8rpx;
+    width: 100%;
+    background: #fff;
+    padding: 32rpx 32rpx 0 32rpx;
+    box-sizing: border-box;
+    position: relative;
+}
+.card_title {
+    display: flex;
+    align-items: center;
+    margin-bottom: 32rpx;
+}
+.card .card_user_icon {
+    width: 96rpx;
+    height: 40rpx;
+    border-radius: 8rpx;
+    font-size: 24rpx;
+    background-color: #F3B574;
+    color: #fff;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+}
+.card .card_user {
+    margin-left: 32rpx;
+    height: 40rpx;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    color: black;
+    font-size: 32rpx;
+}
+.card .card_time {
+    height: 37rpx;
+    font-size: 26rpx;
+    font-weight: 400;
+    color: #999999;
+    margin-bottom: 32rpx;
+}
+.card .card_content{
+    radius: 8rpx 8rpx 8rpx 8rpx;
+    opacity: 1;
+    background: #FFF8EF;
+    height: 160rpx;
+    padding: 12rpx 16rpx;
+    display: flex;
+    justify-content: space-around;
+    align-items: center;
+    box-sizing: border-box;
+    margin-bottom: 32rpx;
+}
+.card .card_content_img {
+    width: 136rpx;
+    height: 136rpx;
+    border-radius: 8rpx;
+}
+.card_content .card_content_title {
+    width: 442rpx;
+    height: 85rpx;
+    font-size: 26rpx;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #333333;
+    line-height: 48rpx;
+}
+.card .card_form {
+    margin-bottom: 32rpx;
+    height: 37rpx;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+}
+.card_form .form {
+    display: flex;
+    height: 100%;
+}
+.card_form .form_title {
+    color: #999999;
+    height: 100%;
+    line-height: 37rpx;
+    font-size: 26rpx;
+}
+.card_form .form_price {
+    height: 100%;
+    line-height: 37rpx;
+    color: #333333;
+    font-size: 26rpx;
+}
+.card .card_foot {
+    height: 100rpx;
+    display: flex;
+    justify-content: space-between;
+    align-content: center;
+    border-top: 1px solid #E1E1E1;
+}
+.card_foot .foot_title {
+    color: #999999;
+    height: 100%;
+    line-height: 100rpx;
+    font-size: 26rpx;
+}
+.card .foot_continue {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    height: 100%;
+}
+.foot_continue .foot_change {
+    color: #F3B574;
+    font-size: 26rpx;
+    margin-right: 32rpx;
+}
+.foot_continue .foot_delete {
+    font-size: 26rpx;
+    color: #F85050;
+}
+.foot_continue .foot_exit {
+    font-size: 26rpx;
+    color: #F85050;
+}
+.card_foot_2 { 
+    border-top: 1px solid #E1E1E1;
+    height: 100rpx;
+    justify-content: center;
+    align-items: center;
+    display: flex;
+}
+.card_foot_2 .foot_title {
+    color: #F3B574;
+    font-size: 32rpx;
+    font-weight: 500;
+}
+.card_foot_2 .foot_title_2 {
+    color: #999999;
+    font-size: 32rpx;
+    font-weight: 400;
+}
+.card_status {
+    position: absolute;
+    width: 150rpx;
+    height: 100rpx;
+    top: 48rpx;
+    right: 48rpx;
+}
+.card_bg {
+    position: absolute;
+    left: 0;
+    top: 0;
+    height: 100%;
+    width: 100%;
+    background-color: rgba(255, 255, 255, 0.7);
+}
+</style>

+ 120 - 0
pages/goods/procurement.vue

@@ -0,0 +1,120 @@
+<template>
+    <view class="proInit">
+        <tui-skeleton
+        	v-if="skeletonShow"
+        	backgroundColor="#fafafa"
+        	borderRadius="10rpx"
+        	:isLoading="true"
+        	:loadingType="5"
+        ></tui-skeleton>
+        <view v-else>
+            <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>
+        </view>
+        <!-- 弹窗提示 -->
+        <tui-modal
+        	:show="modal"
+        	@click="handleClick"
+        	@cancel="hideMobel"
+        	:content="contentModalText"
+        	:button="modalButton"
+        	color="#333"
+        	:size="32"
+        	shape="circle"
+        	:maskClosable="false"
+        >
+        </tui-modal>
+        <view class="add_btn">
+            <image style="width: 100%;height: 100%;" src="@/static/procurement/add_pro.png"></image>
+        </view>
+    </view>
+</template>
+
+<script>
+    import proCard from './components/procurement_card.vue'
+    export default {
+        components: {
+            proCard,
+        },
+        data() {
+            return {
+                skeletonShow: true,
+                tabs: [
+                    {
+                        name: '全部'
+                    },
+                    {
+                        name:'我参与的'
+                    },
+                    {
+                        name: '我发起的'
+                    }
+                ],
+                currentTab: 0,
+                modal: false,
+                contentModalText: '确定退出参与该需求吗?',
+                modalButton: [
+                    {
+                        text: '取消',
+                        type: 'gray',
+                        plain: true, //是否空心
+                    },
+                    {
+                        text: '确认',
+                        customStyle: {
+                            color: '#fff',
+                            bgColor: 'linear-gradient(90deg, #F28F31 0%, #F3B574 100%)'
+                        },
+                        plain: false
+                    }
+                ]
+            }
+        },
+        mounted() {
+            this.skeletonShow = false
+        },
+        methods:{
+            handlerTabs($event) {
+                console.log($event)
+                this.currentTab = $event.index
+            },
+            handleClick($event) {
+                console.log($event.index)
+                this.modal = false
+            },
+            hideMobel($event) {},
+            modelData(proData) {
+                console.log(proData)
+            },
+        },
+    }
+</script>
+
+<style lang="scss" scoped>
+.proInit .tab {
+    position: fixed;
+    left: 0;
+    top: 0;
+    z-index: 9;
+}
+::v-deep .tui-tabs-slider.data-v-9311a734 {
+    background: #F3B574 !important;
+}
+::v-deep .tui-tabs-title.tui-tabs-active {
+    color: #F3B574 !important;
+}
+.tabsContent {
+    background-color: #F7F7F7;
+    padding: 16rpx 32rpx;
+    // margin-bottom: 32rpx;
+}
+.add_btn {
+    width: 100rpx;
+    height: 100rpx;
+    position: fixed;
+    bottom: 129rpx;
+    right: 34rpx;
+}
+</style>

BIN
static/procurement/add_pro.png


BIN
static/procurement/delete.png


BIN
static/procurement/success.png