You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
254 lines
7.0 KiB
254 lines
7.0 KiB
<template>
|
|
<view class="project">
|
|
<!-- 项目列表 -->
|
|
<view class="project-list">
|
|
<view v-for="(project, index) in filteredProjects" :key="index" class="project-card">
|
|
<view class="attr-item project-title">{{ project.name }}</view>
|
|
<view class="attr-item">
|
|
<view class="attr-title">合同名称</view>
|
|
<view class="attr-value">{{ project.code }}</view>
|
|
</view>
|
|
<view class="attr-item">
|
|
<view class="attr-title">起始年月</view>
|
|
<view class="attr-value">{{ project.district }}</view>
|
|
</view>
|
|
<view class="attr-item">
|
|
<view class="attr-title">支付时间</view>
|
|
<view class="attr-value">{{ project.type }}</view>
|
|
</view>
|
|
<view class="attr-item">
|
|
<view class="attr-title">本期应付金额(万元)</view>
|
|
<view class="attr-value">{{ project.code }}</view>
|
|
</view>
|
|
<view class="attr-item">
|
|
<view class="attr-title">本期实付金额(万元)</view>
|
|
<view class="attr-value">{{ project.district }}</view>
|
|
</view>
|
|
<view class="attr-item">
|
|
<view class="attr-title">本期暂扣款(万元)</view>
|
|
<view class="attr-value">{{ project.type }}</view>
|
|
</view>
|
|
<view class="operate-buttons">
|
|
<view class="buttons-group">
|
|
<view class="primary-button__text button" @click="handlePayEditPage(project)">修改</view>
|
|
<view class="error-button__text button" @click="handlePayDeletePage(project)">删除</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 操作按钮 -->
|
|
<view class="operation-buttons">
|
|
<view class="buttons-group">
|
|
<view class="primary-button button" @click="handlePayEditPage()">资金支付</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
activeTab: 0, // 当前选中的Tab索引
|
|
searchQuery: '', // 搜索框的内容
|
|
selectedDistrict: 0, // 行政区划选择的索引
|
|
selectedProjectType: 0, // 项目类型选择的索引
|
|
districts: ['请选择', '北京市', '上海市', '广州市'], // 行政区划数据
|
|
projectTypes: ['请选择', '建筑', 'IT', '教育'], // 项目类型数据
|
|
projects: [ // 项目列表
|
|
{ name: '标段名称xxx', code: 'P001', district: '北京市', type: '建筑', status: 1 },
|
|
{ name: '项目2', code: 'P002', district: '上海市', type: 'IT', status: 0},
|
|
{ name: '项目3', code: 'P003', district: '广州市', type: '教育', status: 1},
|
|
{ name: '项目4', code: 'P004', district: '北京市', type: '建筑', status: 1}
|
|
]
|
|
};
|
|
},
|
|
computed: {
|
|
filteredProjects() {
|
|
return this.projects.filter(project => {
|
|
// 根据搜索内容、行政区划和项目类型进行筛选
|
|
const matchesSearch = project.name.toLowerCase().includes(this.searchQuery.toLowerCase());
|
|
const matchesDistrict = this.selectedDistrict === 0 || project.district === this.districts[this.selectedDistrict];
|
|
const matchesType = this.selectedProjectType === 0 || project.type === this.projectTypes[this.selectedProjectType];
|
|
return matchesSearch && matchesDistrict && matchesType;
|
|
});
|
|
}
|
|
},
|
|
methods: {
|
|
changeTab(index) {
|
|
this.activeTab = index;
|
|
},
|
|
handleAddProject() {
|
|
// 跳转到新增项目页面
|
|
this.$tab.navigateTo(`/pages/project/edit/index`);
|
|
},
|
|
handlePayEditPage() {
|
|
// 跳转到资金支付页面
|
|
this.$tab.navigateTo(`/pages/capital/payment/edit`);
|
|
},
|
|
handlePayDeletePage() {}
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.project {
|
|
// padding: 20px;
|
|
.tabs {
|
|
height: 48px;
|
|
display: flex;
|
|
justify-content: space-around;
|
|
background-color: #fff;
|
|
.tab {
|
|
flex: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
text-align: center;
|
|
justify-content: center;
|
|
color: #595959;
|
|
cursor: pointer;
|
|
&.active {
|
|
color: #00B39D;
|
|
.tab-text {
|
|
position: relative;
|
|
height: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
&::after {
|
|
content: '';
|
|
position: absolute;
|
|
bottom: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 3px;
|
|
background: #00B39D;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// .search-bar {
|
|
// padding: 12px 25px;
|
|
// background: #fff;
|
|
// border-top: 1px solid #f0f0f0;
|
|
// border-bottom: 1px solid #f0f0f0;
|
|
// .search-box {
|
|
// padding: 8px 20px;
|
|
// background: #f7f8fa;
|
|
// border-radius: 8px;
|
|
// }
|
|
// input {
|
|
// width: 100%;
|
|
// border: none;
|
|
// border-radius: 5px;
|
|
// }
|
|
// }
|
|
.dropdowns {
|
|
height: 48px;
|
|
background: #fff;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
uni-picker {
|
|
flex: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
.dropdown {
|
|
flex: 1;
|
|
}
|
|
}
|
|
.project-list {
|
|
padding: 0 20px 95px;
|
|
.project-card {
|
|
background-color: #fff;
|
|
padding: 20px 0 0 0;
|
|
margin-top: 10px;
|
|
border-radius: 8px;
|
|
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
|
margin-top: 15px;
|
|
.attr-item {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
color: #262626;
|
|
padding: 0 20px 20px 20px;
|
|
padding-bottom: 15px;
|
|
.attr-title {
|
|
font-size: 16px;
|
|
color: #595959;
|
|
}
|
|
.attr-value {
|
|
&.no-done {
|
|
color: #FF0000;
|
|
}
|
|
}
|
|
}
|
|
.operate-buttons {
|
|
border-top: 1px solid #f0f0f0;
|
|
display: flex;
|
|
height: 48px;
|
|
box-sizing: border-box;
|
|
.buttons-group {
|
|
width: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
&:nth-child(1) {
|
|
.button {
|
|
border-right: 1px solid #f0f0f0;
|
|
&:nth-last-child(1) {
|
|
border-right: 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.button {
|
|
flex: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
&.primary-button__text {
|
|
color: #00B39D;
|
|
}
|
|
&.error-button__text {
|
|
color: #E04040;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.project-title {
|
|
font-size: 18px;
|
|
}
|
|
}
|
|
.operation-buttons {
|
|
position: fixed;
|
|
bottom: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 80px;
|
|
padding: 16px 20px;
|
|
background: #fff;
|
|
border-top: 1px solid #f0f0f0;
|
|
.buttons-group {
|
|
height: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-around;
|
|
.button {
|
|
cursor: pointer;
|
|
}
|
|
.primary-button {
|
|
flex: 1;
|
|
height: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: #fff;
|
|
background-color: #00B39D;
|
|
border-radius: 8px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|