淘汰数量、二氧化碳系数

This commit is contained in:
jiangyinzhi
2025-05-26 16:11:23 +08:00
parent 91be51e568
commit c633e1edce
12 changed files with 50 additions and 14 deletions
@@ -41,7 +41,7 @@
<van-popup v-model="datePicker" position="bottom">
<van-datetime-picker v-model="currentDate" type="date" :min-date="minDate" @confirm="onConfirm" @cancel="datePicker = false" />
<van-datetime-picker v-model="currentDate" type="date" :min-date="minDate" :max-date="maxDate" @confirm="onConfirm" @cancel="datePicker = false" />
</van-popup>
@@ -49,7 +49,7 @@
<van-popup v-model="datePicker2" position="bottom">
<van-datetime-picker v-model="currentDate2" type="date" :min-date="minDate" @confirm="onConfirm2" @cancel="datePicker2 = false" />
<van-datetime-picker v-model="currentDate2" type="date" :min-date="minDate2" @confirm="onConfirm2" @cancel="datePicker2 = false" />
</van-popup>
@@ -82,6 +82,16 @@ export default {
computedTime: "请选择"
};
},
computed:{
maxDate(){
const now = new Date()
return new Date(now.getFullYear(), 11, 31)
},
minDate2(){
return new Date(this.currentDate)
},
},
created() {
let customer = sessionStorage.getItem("customer");
let customerMsg = JSON.parse(customer)
@@ -109,6 +119,10 @@ export default {
d = d < 10 ? "0" + d : d;
this.dateTime = y + "-" + m + "-" + d;
this.datePicker = false;
if (this.computedTime&&!(Date.parse(this.computedTime) > Date.parse(this.dateTime))) {
console.log('true');
this.computedTime = '请选择'
}
},
// 日期选择赋值
onConfirm2(val) {