Commit 5c711f66 authored by yanzhengyang's avatar yanzhengyang

bug修复

parent 7c725798
......@@ -2,7 +2,7 @@
<div class="app-container">
<div class="formSearch">
<div style="padding-left: 10px">
<span class="bold-text" style="border-bottom: 2px solid #0062FF;">发起报销</span>
<span class="bold-text">发起报销</span>
</div>
<div style="padding-top: 40px">
<el-form
......@@ -413,13 +413,10 @@ onMounted(() => {
width: 160px;
}
.bold-text {
width: 72px;
height: 15px;
font-family: PingFangSC-Medium;
font-weight: 900;
font-size: 18px;
font-size: 19px;
color: #0D162A;
letter-spacing: 0;
line-height: 15px;
border-bottom: 4px solid #0062FF;
}
</style>
......@@ -122,17 +122,17 @@
<div class="contentTable">
<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>
<el-tooltip content="草稿箱" placement="top">
<el-button
type="text"
plain
@click="handleDraft"
v-hasPermi="['system:project:draft']"
><img src="@/assets/icons/common/rightone.png" height="38" width="38"/></el-button>
</el-tooltip>
</span>
<!-- <span>-->
<!-- <el-tooltip content="草稿箱" placement="top">-->
<!-- <el-button-->
<!-- type="text"-->
<!-- plain-->
<!-- @click="handleDraft"-->
<!-- v-hasPermi="['system:project:draft']"-->
<!-- ><img src="@/assets/icons/common/rightone.png" height="38" width="38"/></el-button>-->
<!-- </el-tooltip>-->
<!-- </span>-->
</div>
<!-- 表格数据 -->
<el-card class="box-card" v-for="item in costManageList">
......
......@@ -74,6 +74,7 @@
clearable
placeholder="选择预计结束时间"
style="width: 100%"
:disabled-date="pickerOptions.disabledDate"
/>
</el-form-item>
<el-form-item label="项目经理:" prop="projectManager">
......@@ -215,15 +216,25 @@ function back(){
// 初始化 pickerOptions
const pickerOptions = ref({
disabledDate: (time) => {
const defaultDate = ruleForm.value.reimbursement;
const selectedMonth = new Date(defaultDate).getMonth();
// console.log("获得的月份",selectedMonth)// 月份从0开始
const selectedYear = new Date(defaultDate).getFullYear();
const startDate = ruleForm.value.tripStartDate;
if (!startDate) return false; // 如果还没有选择开始日期,则不禁用任何日期
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(() => {
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