|
@@ -77,7 +77,7 @@
|
|
|
<h1 class="title">处理日期</h1>
|
|
|
<div class="system-btn-container">
|
|
|
<div class="system-btn" :class="item.text === '自定义'?'self-btn':''" v-for="(item, index) in fillinList" :key="index">
|
|
|
- <van-button class="m-btn" :class="item.active" @click="changeFillinDate(item)">{{ item.text }}</van-button>
|
|
|
+ <van-button class="m-btn" :class="item.active" @click="changeFillinDate(item)">{{ `${item.text} ${(item.text==='自定义' && handleDate)?'('+handleDate+')':''}` }}</van-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -87,7 +87,7 @@
|
|
|
<h1 class="title">记录日期</h1>
|
|
|
<div class="system-btn-container">
|
|
|
<div class="system-btn" :class="item.text === '自定义'?'self-btn':''" v-for="(item, index) in acceptanceList" :key="index">
|
|
|
- <van-button class="m-btn" :class="item.active" @click="changeAcceptanceDate(item)">{{ item.text }}</van-button>
|
|
|
+ <van-button class="m-btn" :class="item.active" @click="changeAcceptanceDate(item)">{{ `${item.text} ${(item.text==='自定义' && createDate)?'('+createDate+')':''}` }}</van-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -98,8 +98,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</van-popup>
|
|
|
- <van-calendar color="#025baa" v-model="showHandleDate" :min-date="minDate" type="range" @confirm="onConfirmHandleDate" />
|
|
|
- <van-calendar color="#025baa" v-model="showCreateDate" :min-date="minDate" type="range" @confirm="onConfirmCreateDate" />
|
|
|
+ <van-calendar ref="handleDate" color="#025baa" v-model="showHandleDate" :min-date="minDate" type="range" @confirm="onConfirmHandleDate" />
|
|
|
+ <van-calendar ref="createDate" color="#025baa" v-model="showCreateDate" :min-date="minDate" type="range" @confirm="onConfirmCreateDate" />
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -159,7 +159,9 @@ export default {
|
|
|
showHandleDate: false,
|
|
|
showCreateDate: false,
|
|
|
handleDate: "",
|
|
|
- CreateDate: "",
|
|
|
+ createDate: "",
|
|
|
+ handleDateList: [],
|
|
|
+ createDateList: [],
|
|
|
};
|
|
|
},
|
|
|
props: {},
|
|
@@ -223,8 +225,11 @@ export default {
|
|
|
break;
|
|
|
// 自定义
|
|
|
case 6:
|
|
|
- getParams.handledateStartDate = moment() .subtract(1, "years").format("YYYYMMDD000000");
|
|
|
- getParams.handledateEndDate = moment().format("YYYYMMDD000000");
|
|
|
+ const [start, end] = this.handleDateList;
|
|
|
+ if(start && end) {
|
|
|
+ getParams.handledateStartDate = moment(start.getTime()).format('YYYYMMDD000000');
|
|
|
+ getParams.handledateEndDate = moment(end.getTime()).format('YYYYMMDD000000');
|
|
|
+ }
|
|
|
break;
|
|
|
// 默认 全部
|
|
|
default:
|
|
@@ -259,8 +264,11 @@ export default {
|
|
|
break;
|
|
|
// 一年
|
|
|
case 6:
|
|
|
- getParams.createdateStartDate = moment().subtract(1, "years").format("YYYYMMDD000000");
|
|
|
- getParams.createdateEndDate = moment().format("YYYYMMDD000000");
|
|
|
+ const [start, end] = this.createDateList;
|
|
|
+ if(start && end) {
|
|
|
+ getParams.createdateStartDate = moment(start.getTime()).format('YYYYMMDD000000');
|
|
|
+ getParams.createdateEndDate = moment(end.getTime()).format('YYYYMMDD000000');
|
|
|
+ }
|
|
|
break;
|
|
|
// 默认 全部
|
|
|
default:
|
|
@@ -333,16 +341,17 @@ export default {
|
|
|
},
|
|
|
// 自定义填报日期
|
|
|
onConfirmHandleDate(date) {
|
|
|
- console.log(date)
|
|
|
+ this.handleDateList = date;
|
|
|
const [start, end] = date;
|
|
|
this.showHandleDate = false;
|
|
|
+ this.handleDate = `${this.formatDate(start)} - ${this.formatDate(end)}`;
|
|
|
},
|
|
|
// 自定义验收日期
|
|
|
onConfirmCreateDate(date) {
|
|
|
- console.log(date)
|
|
|
+ this.createDateList = date;
|
|
|
const [start, end] = date;
|
|
|
- console.log()
|
|
|
this.showCreateDate = false;
|
|
|
+ this.createDate = `${this.formatDate(start)} - ${this.formatDate(end)}`;
|
|
|
},
|
|
|
/**
|
|
|
* 重置
|
|
@@ -362,6 +371,12 @@ export default {
|
|
|
this.acceptanceDate = item.value;
|
|
|
}
|
|
|
});
|
|
|
+ this.$refs.handleDate.reset();
|
|
|
+ this.$refs.createDate.reset();
|
|
|
+ this.handleDate = "";
|
|
|
+ this.createDate = "";
|
|
|
+ this.createDateList = [];
|
|
|
+ this.handleDateList = [];
|
|
|
this.getData();
|
|
|
this.showPopup = false;
|
|
|
},
|