|
|
@ -47,8 +47,20 @@ |
|
|
|
:apiUpdate="SupplierApbalanceCalendarApi.updateSupplierApbalanceCalendar" |
|
|
|
:apiCreate="SupplierApbalanceCalendarApi.createSupplierApbalanceCalendar" |
|
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
|
@onChange="onChange" |
|
|
|
:isBusiness="false" |
|
|
|
/> |
|
|
|
> |
|
|
|
<template #beginDay> |
|
|
|
<el-select v-model="beginDay" placeholder="请选择开始日期" @change="(value)=>selectChange(value,'beginDay')"> |
|
|
|
<el-option v-for="dict in daysInMonths" :key="dict.value" :label="dict.label" :value="dict.value"/> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
<template #endDay> |
|
|
|
<el-select v-model="endDay" placeholder="请选择结束日期" @change="(value)=>selectChange(value,'endDay')"> |
|
|
|
<el-option v-for="dict in daysInMonths" :key="dict.value" :label="dict.label" :value="dict.value"/> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</BasicForm> |
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
|
<Detail ref="detailRef" :isBasic="true" :allSchemas="SupplierApbalanceCalendar.allSchemas" /> |
|
|
@ -65,6 +77,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
|
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|
|
|
import Detail from '@/components/Detail/src/Detail.vue' |
|
|
|
import dayjs from 'dayjs' |
|
|
|
|
|
|
|
defineOptions({ name: 'SupplierApbalanceCalendar' }) |
|
|
|
|
|
|
@ -235,6 +248,27 @@ const searchFormClick = (searchData) => { |
|
|
|
getList() // 刷新当前列表 |
|
|
|
} |
|
|
|
|
|
|
|
const beginDay = ref('') |
|
|
|
const endDay = ref('') |
|
|
|
const selectChange = (value,field)=>{ |
|
|
|
basicFormRef.value.formRef.formModel[field] = value |
|
|
|
} |
|
|
|
const daysInMonths = ref([]) |
|
|
|
const onChange = (field, value, formRef)=>{ |
|
|
|
if(field=='month'){ |
|
|
|
let days = [] |
|
|
|
for (let i=1;i<=dayjs(`${value}-01`).daysInMonth();i++){ |
|
|
|
days.push({ |
|
|
|
value:i, |
|
|
|
label:i |
|
|
|
}) |
|
|
|
} |
|
|
|
basicFormRef.value.formRef.formModel['beginDay'] = '' |
|
|
|
basicFormRef.value.formRef.formModel['endDay'] = '' |
|
|
|
daysInMonths.value = days |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 初始化 **/ |
|
|
|
onMounted(async () => { |
|
|
|
getList() |
|
|
|