style:模具出库/模具入库-出库时间默认当天

main
黄伟杰 3 weeks ago
parent b337c8d654
commit ea588c4657

@ -175,6 +175,8 @@ const ensureWarehouseId = () => {
formData.value.warehouseId = defaultWarehouse?.id ?? (warehouseList.value?.[0] as any)?.id
}
const getTodayTimestamp = () => new Date().setHours(0, 0, 0, 0)
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
dialogVisible.value = true
@ -260,16 +262,16 @@ const submitForm = async () => {
/** 重置表单 */
const resetForm = () => {
formRef.value?.resetFields()
formData.value = {
id: undefined,
customerId: undefined,
outTime: undefined,
outTime: getTodayTimestamp(),
remark: undefined,
fileUrl: undefined,
items: [],
outType: "模具出库",
warehouseId: undefined
}
formRef.value?.resetFields()
}
</script>

@ -156,6 +156,8 @@ const ensureWarehouseId = () => {
formData.value.warehouseId = defaultWarehouse?.id ?? (warehouseList.value?.[0] as any)?.id
}
const getTodayTimestamp = () => new Date().setHours(0, 0, 0, 0)
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
dialogVisible.value = true
@ -241,16 +243,16 @@ const submitForm = async () => {
/** 重置表单 */
const resetForm = () => {
formRef.value?.resetFields()
formData.value = {
id: undefined,
customerId: undefined,
inTime: undefined,
inTime: getTodayTimestamp(),
remark: undefined,
fileUrl: undefined,
items: [],
inType: "模具入库",
warehouseId: undefined
}
formRef.value?.resetFields()
}
</script>

Loading…
Cancel
Save