fix: 出厂日期可以晚于采购日期与到货日期
This commit is contained in:
parent
f75f3107ea
commit
67d7bea4ce
|
|
@ -30,6 +30,14 @@
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="出厂日期"
|
placeholder="出厂日期"
|
||||||
|
:picker-options="{
|
||||||
|
// 设置当前时间为 采购日期的前一天
|
||||||
|
disabledDate: time => {
|
||||||
|
const currentDate = new Date(maForm.purchaseTime || new Date())
|
||||||
|
currentDate.setDate(currentDate.getDate() - 1)
|
||||||
|
return time.getTime() > currentDate.getTime()
|
||||||
|
}
|
||||||
|
}"
|
||||||
@change="changeTime"
|
@change="changeTime"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -67,6 +75,7 @@
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="请选择采购日期"
|
placeholder="请选择采购日期"
|
||||||
|
@change="changeTimePurchase"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="到货日期" prop="arrivalTime">
|
<el-form-item label="到货日期" prop="arrivalTime">
|
||||||
|
|
@ -74,9 +83,16 @@
|
||||||
v-model="maForm.arrivalTime"
|
v-model="maForm.arrivalTime"
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
:picker-options="pickerOptions"
|
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="请选择到货日期"
|
placeholder="请选择到货日期"
|
||||||
|
:picker-options="{
|
||||||
|
// 设置当前时间为 采购日期的前一天
|
||||||
|
disabledDate: time => {
|
||||||
|
const currentDate = new Date(maForm.purchaseTime || new Date())
|
||||||
|
currentDate.setDate(currentDate.getDate())
|
||||||
|
return time.getTime() < currentDate.getTime()
|
||||||
|
}
|
||||||
|
}"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="采购员" prop="purchaser">
|
<el-form-item label="采购员" prop="purchaser">
|
||||||
|
|
@ -202,6 +218,14 @@
|
||||||
type="date"
|
type="date"
|
||||||
range-separator="-"
|
range-separator="-"
|
||||||
placeholder="出厂日期"
|
placeholder="出厂日期"
|
||||||
|
:picker-options="{
|
||||||
|
// 设置当前时间为 采购日期的前一天
|
||||||
|
disabledDate: time => {
|
||||||
|
const currentDate = new Date(maForm.purchaseTime || new Date())
|
||||||
|
currentDate.setDate(currentDate.getDate() - 1)
|
||||||
|
return time.getTime() > currentDate.getTime()
|
||||||
|
}
|
||||||
|
}"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -703,6 +727,13 @@ export default {
|
||||||
// ...this.queryParams
|
// ...this.queryParams
|
||||||
// }, `role_${new Date().getTime()}.xlsx`)
|
// }, `role_${new Date().getTime()}.xlsx`)
|
||||||
},
|
},
|
||||||
|
// 采购日期变化
|
||||||
|
changeTimePurchase() {
|
||||||
|
this.queryParams.productionTime = ''
|
||||||
|
this.equipmentList.forEach((item) => {
|
||||||
|
this.$set(item, 'productionTime', '')
|
||||||
|
})
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue