优化
This commit is contained in:
@ -173,18 +173,16 @@
|
||||
{ title: t('批复量(方)'), dataIndex: 'qtySalesM3', width: 200},
|
||||
{ title: t('备注'), dataIndex: 'note', width: 200},
|
||||
]);
|
||||
const formState = ref({
|
||||
datePlan: null,
|
||||
lastVerSign: 'Y',
|
||||
validSign: 'N',
|
||||
alterSign: 'I',
|
||||
approCode: 'WTJ'
|
||||
})
|
||||
const formState = ref({})
|
||||
const dataList = ref([])
|
||||
const contractList = ref([])
|
||||
const pointDelyList = ref([])
|
||||
onMounted(async () =>{
|
||||
if (!pageType.value) {
|
||||
formState.value.lastVerSign = 'Y'
|
||||
formState.value.validSign = 'N'
|
||||
formState.value.alterSign = 'I'
|
||||
formState.value.approCode = 'WTJ'
|
||||
const res = await getCompDept(userInfo.id)
|
||||
formState.value.cuCode = res?.comp?.code
|
||||
formState.value.comId = res?.comp?.id
|
||||
@ -213,7 +211,6 @@
|
||||
}
|
||||
const datePlanChange = async (val) => {
|
||||
if (!val) {
|
||||
formState.value = {}
|
||||
dataList.value = []
|
||||
return
|
||||
}
|
||||
@ -314,7 +311,7 @@
|
||||
today.setHours(0, 0, 0, 0); // 清除时分秒,确保比较时不考虑时间部分
|
||||
// 获取明天的日期
|
||||
const tomorrow = new Date();
|
||||
tomorrow.setDate(tomorrow.getDate() + (pageId ? 1 : 2));
|
||||
tomorrow.setDate(tomorrow.getDate() + ( 2));
|
||||
tomorrow.setHours(0, 0, 0, 0); // 清除时分秒
|
||||
// 当前日期小于今天或大于明天,则禁用
|
||||
return current < today || current > tomorrow;
|
||||
@ -330,7 +327,7 @@
|
||||
watch(
|
||||
() => props.formObj,
|
||||
(val) => {
|
||||
if (val) {
|
||||
if (val && !pageType.value) {
|
||||
formState.value = val
|
||||
}
|
||||
},
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<a-button style="margin-right: 10px" @click="close">
|
||||
<slot name="icon"><close-outlined /></slot>关闭
|
||||
</a-button>
|
||||
<template v-if="pageType=='edit'||pageType=='update' ">
|
||||
<template v-if="pageType=='edit'||pageType=='update' || !pageType ">
|
||||
<a-button style="margin-right: 10px" type="primary" @click="checkBtn('save')">
|
||||
<slot name="icon"><save-outlined /></slot>保存
|
||||
</a-button>
|
||||
|
||||
Reference in New Issue
Block a user