41b5527c by yangwei

bug2785

1 parent 8a0c6b9d
......@@ -19,13 +19,13 @@
<el-col :span="6">
<el-form-item label="接收日期" prop="receiveStartTime">
<el-date-picker type="date" class="width100" placeholder="开始日期" :picker-options="pickerOptionsStart"
clearable v-model="form.receiveStartTime" value-format="yyyy-MM-dd"></el-date-picker>
clearable v-model="form.receiveStartTime" value-format="yyyy/MM/dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="至" prop="receiveEndTime" label-width="35px">
<el-date-picker type="date" class="width100" placeholder="结束日期" :picker-options="pickerOptionsEnd"
clearable v-model="form.receiveEndTime" value-format="yyyy-MM-dd"></el-date-picker>
clearable v-model="form.receiveEndTime" value-format="yyyy/MM/dd HH:mm:ss" @change="endTimeChange"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
......@@ -107,6 +107,8 @@ import tableMixin from "@/mixins/tableMixin.js";
import { getReceiveDataReportPage } from "@/api/dataReport.js";
// 引入详情弹框
import dataDetails from "@/components/EditDialog";
//引入日期处理方法
import {timeFormat } from "@/utils/operation";
export default {
name: "jsbwcx",
mixins: [tableMixin],
......@@ -121,8 +123,8 @@ export default {
let endDateVal = this.form.receiveEndTime;
if (endDateVal) {
return (
time.getTime() >
new Date(endDateVal).getTime() - 1 * 24 * 60 * 60 * 1000
time.getTime() >=
new Date(endDateVal).getTime()
);
}
},
......@@ -133,7 +135,7 @@ export default {
if (beginDateVal) {
return (
time.getTime() <
new Date(beginDateVal).getTime() + 1 * 24 * 60 * 60 * 1000
new Date(beginDateVal).getTime()
);
}
},
......@@ -213,6 +215,10 @@ export default {
};
},
methods: {
//截止日期变化
endTimeChange(val){
this.form.receiveEndTime = timeFormat(new Date(val),true)
},
// 初始化数据
queryClick () {
getReceiveDataReportPage({ ...this.form, ...this.formData }).then(
......
......@@ -19,13 +19,13 @@
<el-col :span="6">
<el-form-item label="开始日期" prop="startTime">
<el-date-picker type="date" class="width100" placeholder="开始日期" :picker-options="pickerOptionsStart"
clearable v-model="form.startTime" value-format="yyyy-MM-dd"></el-date-picker>
clearable v-model="form.startTime" value-format="yyyy/MM/dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="结束日期" prop="endTime">
<el-date-picker type="date" class="width100" placeholder="结束日期" :picker-options="pickerOptionsEnd"
clearable v-model="form.endTime" value-format="yyyy-MM-dd"></el-date-picker>
clearable v-model="form.endTime" value-format="yyyy/MM/dd HH:mm:ss" @change="endTimeChange"></el-date-picker>
</el-form-item>
</el-col>
<!-- 操作按钮 -->
......@@ -54,6 +54,8 @@ import { datas, sendThis } from "./data"
import table from "@/utils/mixin/table"
import { getRecordLogPage } from "@/api/recordLog.js";
import { mapGetters } from 'vuex'
//引入日期处理方法
import {timeFormat } from "@/utils/operation";
export default {
name: "dbrzcx",
mixins: [table],
......@@ -66,9 +68,7 @@ export default {
pickerOptionsStart: {
disabledDate: (time) => {
if (this.form.endTime) {
return (
time.getTime() >= new Date(this.form.endTime).getTime()
);
return time.getTime() >= new Date(this.form.endTime).getTime()
}
}
},
......@@ -76,17 +76,15 @@ export default {
pickerOptionsEnd: {
disabledDate: (time) => {
if (this.form.startTime) {
return (
time.getTime() <= new Date(this.form.startTime).getTime()
);
return time.getTime() < new Date(this.form.startTime).getTime()
}
}
},
// 表单
form: {
areacode: '',
startTime: '',
endTime: '',
startTime: null,
endTime: null,
},
// table数据
tableData: {
......@@ -102,6 +100,10 @@ export default {
sendThis(this);
},
methods: {
//截止日期变化
endTimeChange(val){
this.form.endTime = timeFormat(new Date(val),true)
},
// 重置表单
resetForm () {
this.$refs.ruleForm.resetFields();
......
......@@ -20,14 +20,14 @@
<el-form-item label="汇交时间" prop="exchangeStartTime">
<el-date-picker type="date" class="width100" placeholder="开始日期" clearable
:picker-options="pickerOptionsStart" v-model="form.exchangeStartTime"
value-format="yyyy-MM-dd"></el-date-picker>
value-format="yyyy/MM/dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="至" prop="exchangeStartTime" label-width="35px">
<el-date-picker type="date" class="width100" placeholder="结束日期" clearable
:picker-options="pickerOptionsEnd" v-model="form.exchangeEndTime"
value-format="yyyy-MM-dd"></el-date-picker>
value-format="yyyy/MM/dd HH:mm:ss" @change="endTimeChange"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
......@@ -90,7 +90,8 @@ import table from "@/utils/mixin/table";
// 引入详情弹框
import dataDetails from "@/components/EditDialog";
import { getDataReportPage } from "@/api/dataReport.js";
//引入日期处理方法
import {timeFormat } from "@/utils/operation";
export default {
name: "sbbwcx",
mixins: [table],
......@@ -113,7 +114,7 @@ export default {
pickerOptionsEnd: {
disabledDate: (time) => {
if (this.form.exchangeStartTime) {
return time.getTime() <= new Date(this.form.exchangeStartTime).getTime();
return time.getTime() < new Date(this.form.exchangeStartTime).getTime();
}
},
},
......@@ -164,9 +165,14 @@ export default {
sendThis(this);
},
methods: {
//截止日期变化
endTimeChange(val){
this.form.exchangeEndTime = timeFormat(new Date(val),true)
},
// 重置表单
resetForm () {
this.$refs.ruleForm.resetFields();
this.form.exchangeEndTime = ""
},
// 初始化数据
queryClick () {
......