Commit 5c711f66 authored by yanzhengyang's avatar yanzhengyang

bug修复

parent 7c725798
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<div class="formSearch"> <div class="formSearch">
<div style="padding-left: 10px"> <div style="padding-left: 10px">
<span class="bold-text" style="border-bottom: 2px solid #0062FF;">发起报销</span> <span class="bold-text">发起报销</span>
</div> </div>
<div style="padding-top: 40px"> <div style="padding-top: 40px">
<el-form <el-form
...@@ -413,13 +413,10 @@ onMounted(() => { ...@@ -413,13 +413,10 @@ onMounted(() => {
width: 160px; width: 160px;
} }
.bold-text { .bold-text {
width: 72px;
height: 15px;
font-family: PingFangSC-Medium; font-family: PingFangSC-Medium;
font-weight: 900; font-weight: 900;
font-size: 18px; font-size: 19px;
color: #0D162A; color: #0D162A;
letter-spacing: 0; border-bottom: 4px solid #0062FF;
line-height: 15px;
} }
</style> </style>
...@@ -122,17 +122,17 @@ ...@@ -122,17 +122,17 @@
<div class="contentTable"> <div class="contentTable">
<div style="padding-left: 8px ;margin-bottom: 20px;display: flex;width: 100%;align-items: center;justify-content: space-between"> <div style="padding-left: 8px ;margin-bottom: 20px;display: flex;width: 100%;align-items: center;justify-content: space-between">
<span class="bold-text">日常报销列表</span> <span class="bold-text">日常报销列表</span>
<span> <!-- <span>-->
<el-tooltip content="草稿箱" placement="top"> <!-- <el-tooltip content="草稿箱" placement="top">-->
<el-button <!-- <el-button-->
type="text" <!-- type="text"-->
plain <!-- plain-->
@click="handleDraft" <!-- @click="handleDraft"-->
v-hasPermi="['system:project:draft']" <!-- v-hasPermi="['system:project:draft']"-->
><img src="@/assets/icons/common/rightone.png" height="38" width="38"/></el-button> <!-- ><img src="@/assets/icons/common/rightone.png" height="38" width="38"/></el-button>-->
</el-tooltip> <!-- </el-tooltip>-->
</span> <!-- </span>-->
</div> </div>
<!-- 表格数据 --> <!-- 表格数据 -->
<el-card class="box-card" v-for="item in costManageList"> <el-card class="box-card" v-for="item in costManageList">
......
...@@ -74,6 +74,7 @@ ...@@ -74,6 +74,7 @@
clearable clearable
placeholder="选择预计结束时间" placeholder="选择预计结束时间"
style="width: 100%" style="width: 100%"
:disabled-date="pickerOptions.disabledDate"
/> />
</el-form-item> </el-form-item>
<el-form-item label="项目经理:" prop="projectManager"> <el-form-item label="项目经理:" prop="projectManager">
...@@ -215,15 +216,25 @@ function back(){ ...@@ -215,15 +216,25 @@ function back(){
// 初始化 pickerOptions // 初始化 pickerOptions
const pickerOptions = ref({ const pickerOptions = ref({
disabledDate: (time) => { disabledDate: (time) => {
const defaultDate = ruleForm.value.reimbursement; const startDate = ruleForm.value.tripStartDate;
const selectedMonth = new Date(defaultDate).getMonth(); if (!startDate) return false; // 如果还没有选择开始日期,则不禁用任何日期
// console.log("获得的月份",selectedMonth)// 月份从0开始
const selectedYear = new Date(defaultDate).getFullYear();
return time.getMonth() !== selectedMonth || time.getFullYear() !== selectedYear; // 禁用开始日期之前的日期
return time < new Date(startDate).setHours(0, 0, 0, 0);
}, },
}); });
// 监听开始日期的变化
watch(() => ruleForm.value.tripStartDate, (newStartDate) => {
if (newStartDate) {
// 当开始日期发生变化时,可以在这里做一些额外的处理
// 比如更新禁用的日期
pickerOptions.value.disabledDate = (time) => {
return time < new Date(newStartDate).setHours(0, 0, 0, 0);
};
}
});
onMounted(() => { onMounted(() => {
getProjectList() getProjectList()
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment