Browse Source

修复信件核对的表单效果

master
21819 2 years ago
parent
commit
a625d8e469
  1. 13
      src/views/work/components/MailCheck.vue

13
src/views/work/components/MailCheck.vue

@ -12,7 +12,7 @@
<el-col span="6">
<el-form-item label="来信时间">
<el-date-picker v-model="query.mailTime" value-format="YYYY-MM-DD" type="daterange"
range-separator="~" start-placeholder="开始日期" end-placeholder="结束日期" />
range-separator="~" start-placeholder="开始日期" end-placeholder="结束日期" @change="handleMailTimeQuery"/>
</el-form-item>
</el-col>
<el-col span="6">
@ -144,6 +144,8 @@ const importData = ref([])
const handleUpload: UploadProps['httpRequest'] = (file) => {
const formData = new FormData(); //
formData.append("mailTimeStart",query.value.mailTimeStart)
formData.append("mailTimeStartEnd",query.value.mailTimeEnd)
formData.append("file", file.file); //
return axios.post("/lan-api/api/work/check", formData) // 使 axios post
.then((res) => {
@ -190,6 +192,15 @@ const handleExceed: UploadProps['onExceed'] = (files) => {
function resetView(){
ifShow.value = false
}
const handleMailTimeQuery = (val: any) => {
if (val) {
query.value.mailTimeStart = val[0];
query.value.mailTimeEnd = val[1];
}else{
delete query.value.mailTimeStart
delete query.value.mailTimeEnd
}
}
</script>
<style lang="scss" scoped>

Loading…
Cancel
Save