投标成本核算
This commit is contained in:
@ -45,6 +45,8 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useUserStoreHook } from '@/store/modules/user';
|
||||
import { listOutTable } from '@/api/out/outTable';
|
||||
|
||||
const userStore = useUserStoreHook();
|
||||
const currentProject = computed(() => userStore.selectedProject);
|
||||
const activeTab = ref('1');
|
||||
@ -71,7 +73,7 @@ const tabList = [
|
||||
//切换表单
|
||||
const handleTabChange = (tab) => {
|
||||
activeTab.value = tab;
|
||||
queryParams.value.month = '';
|
||||
// queryParams.value.month = '';
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
@ -91,10 +93,26 @@ const getList = async () => {
|
||||
const params = {
|
||||
...queryParams.value,
|
||||
projectId: currentProject.value?.id,
|
||||
activeTab: activeTab.value
|
||||
type: activeTab.value
|
||||
};
|
||||
console.log(params);
|
||||
const res = await listOutTable(params);
|
||||
if (res.code == 200) {
|
||||
tableData.value = res.rows;
|
||||
total.value = res.total;
|
||||
}
|
||||
};
|
||||
onMounted(() => {
|
||||
const currentDate = new Date();
|
||||
const year = currentDate.getFullYear();
|
||||
const month = currentDate.getMonth() + 1; // 月份从0开始,所以需要加1
|
||||
|
||||
// 形成"YYYY-M"格式
|
||||
const formattedDate = `${year}-${String(month).padStart(2, '0')}`;
|
||||
queryParams.value.month = formattedDate;
|
||||
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
Reference in New Issue
Block a user