diff --git a/src/api/dayPlan/Demand/index.ts b/src/api/dayPlan/Demand/index.ts index c043234..91f0f5f 100644 --- a/src/api/dayPlan/Demand/index.ts +++ b/src/api/dayPlan/Demand/index.ts @@ -18,7 +18,7 @@ enum Api { compare = '/dayPlan/demand/compare', withdraw = '/dayPlan/demand/withdraw', submit = '/dayPlan/demand/submit', - cancel = 'dayPlan/demand/cancel', + cancel = '/dayPlan/demand/cancel', Export = '/dayPlan/demand/export', diff --git a/src/views/dayPlan/Demand/components/basicForm.vue b/src/views/dayPlan/Demand/components/basicForm.vue index 4aa2706..afe4d43 100644 --- a/src/views/dayPlan/Demand/components/basicForm.vue +++ b/src/views/dayPlan/Demand/components/basicForm.vue @@ -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 } }, diff --git a/src/views/dayPlan/Demand/components/createForm.vue b/src/views/dayPlan/Demand/components/createForm.vue index aedf49f..47e6fd4 100644 --- a/src/views/dayPlan/Demand/components/createForm.vue +++ b/src/views/dayPlan/Demand/components/createForm.vue @@ -5,7 +5,7 @@ 关闭 -