|
@@ -15,12 +15,21 @@
|
|
|
<div class="table-page-search-wrapper">
|
|
|
<a-form-model layout="inline" ref="form" :model="formState" >
|
|
|
<a-row :gutter="24">
|
|
|
- <a-col :md="24" >
|
|
|
+ <a-col :md="24" v-if="formState.type =='考勤表'">
|
|
|
<a-form-model-item label="年月" prop="yearMonth ">
|
|
|
<a-month-picker placeholder="请选择" :allowClear="false" v-model="formState.yearWithMonth" @change="onChange" style="width:100% !important"/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
+ <a-col :md="24" v-if="formState.type =='年休表'">
|
|
|
+ <a-form-model-item label="年度" prop="yearMonth2 ">
|
|
|
+
|
|
|
+ <a-date-picker placeholder="请选择" :allowClear="true" :open="isopen" mode="year" format="YYYY" v-model="yearWith"
|
|
|
+ @openChange="changeopen2" @panelChange="handlePanelChange2" @change="onChange2" style="width:100% !important"/>
|
|
|
+
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+
|
|
|
<a-col :md="24">
|
|
|
<a-form-model-item label="类型" prop="totalNum">
|
|
|
<a-select v-model="formState.type">
|
|
@@ -62,6 +71,8 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ yearWith:moment().subtract(0, 'year'),
|
|
|
+ isopen:false,
|
|
|
checked: ref(false),
|
|
|
formState:{
|
|
|
type:'考勤表',
|
|
@@ -84,6 +95,7 @@
|
|
|
methods: {
|
|
|
handleCancel(){
|
|
|
this.visible = false
|
|
|
+ this.yearWith = moment().subtract(0, 'year')
|
|
|
this.formState={
|
|
|
type:'考勤表',
|
|
|
yearWithMonth:moment().subtract(1, 'months')
|
|
@@ -95,7 +107,11 @@
|
|
|
onChange(data){
|
|
|
},
|
|
|
beforeUpload(){
|
|
|
+ if(this.formState.type=='年休表'){
|
|
|
+ this.formState.yearWithMonth=moment(this.yearWith).format('YYYY')
|
|
|
+ }else{
|
|
|
this.formState.yearWithMonth=moment(this.formState.yearWithMonth).format('YYYY-MM')
|
|
|
+ }
|
|
|
},
|
|
|
handleUploadChange({ file, fileList }){
|
|
|
if (file.status === 'done'&&file.response.success) {
|
|
@@ -110,6 +126,20 @@
|
|
|
this.checked = false
|
|
|
}
|
|
|
|
|
|
+ },
|
|
|
+ handlePanelChange2(value){
|
|
|
+ this.isopen = false
|
|
|
+ this.yearWith = value
|
|
|
+ this.queryParam.yearWithMonth = this.yearWith?moment(this.yearWith).format('YYYY'):''
|
|
|
+ },
|
|
|
+ changeopen2(status){
|
|
|
+ if(status){
|
|
|
+ this.isopen = true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onChange2(data){
|
|
|
+ this.yearWith = data
|
|
|
+ this.queryParam.yearWithMonth = this.yearWith?moment(this.yearWith).format('YYYY'):''
|
|
|
}
|
|
|
}
|
|
|
}
|