41b5527c by yangwei

bug2785

1 parent 8a0c6b9d
...@@ -19,13 +19,13 @@ ...@@ -19,13 +19,13 @@
19 <el-col :span="6"> 19 <el-col :span="6">
20 <el-form-item label="接收日期" prop="receiveStartTime"> 20 <el-form-item label="接收日期" prop="receiveStartTime">
21 <el-date-picker type="date" class="width100" placeholder="开始日期" :picker-options="pickerOptionsStart" 21 <el-date-picker type="date" class="width100" placeholder="开始日期" :picker-options="pickerOptionsStart"
22 clearable v-model="form.receiveStartTime" value-format="yyyy-MM-dd"></el-date-picker> 22 clearable v-model="form.receiveStartTime" value-format="yyyy/MM/dd HH:mm:ss"></el-date-picker>
23 </el-form-item> 23 </el-form-item>
24 </el-col> 24 </el-col>
25 <el-col :span="6"> 25 <el-col :span="6">
26 <el-form-item label="至" prop="receiveEndTime" label-width="35px"> 26 <el-form-item label="至" prop="receiveEndTime" label-width="35px">
27 <el-date-picker type="date" class="width100" placeholder="结束日期" :picker-options="pickerOptionsEnd" 27 <el-date-picker type="date" class="width100" placeholder="结束日期" :picker-options="pickerOptionsEnd"
28 clearable v-model="form.receiveEndTime" value-format="yyyy-MM-dd"></el-date-picker> 28 clearable v-model="form.receiveEndTime" value-format="yyyy/MM/dd HH:mm:ss" @change="endTimeChange"></el-date-picker>
29 </el-form-item> 29 </el-form-item>
30 </el-col> 30 </el-col>
31 <el-col :span="6"> 31 <el-col :span="6">
...@@ -107,6 +107,8 @@ import tableMixin from "@/mixins/tableMixin.js"; ...@@ -107,6 +107,8 @@ import tableMixin from "@/mixins/tableMixin.js";
107 import { getReceiveDataReportPage } from "@/api/dataReport.js"; 107 import { getReceiveDataReportPage } from "@/api/dataReport.js";
108 // 引入详情弹框 108 // 引入详情弹框
109 import dataDetails from "@/components/EditDialog"; 109 import dataDetails from "@/components/EditDialog";
110 //引入日期处理方法
111 import {timeFormat } from "@/utils/operation";
110 export default { 112 export default {
111 name: "jsbwcx", 113 name: "jsbwcx",
112 mixins: [tableMixin], 114 mixins: [tableMixin],
...@@ -121,8 +123,8 @@ export default { ...@@ -121,8 +123,8 @@ export default {
121 let endDateVal = this.form.receiveEndTime; 123 let endDateVal = this.form.receiveEndTime;
122 if (endDateVal) { 124 if (endDateVal) {
123 return ( 125 return (
124 time.getTime() > 126 time.getTime() >=
125 new Date(endDateVal).getTime() - 1 * 24 * 60 * 60 * 1000 127 new Date(endDateVal).getTime()
126 ); 128 );
127 } 129 }
128 }, 130 },
...@@ -133,7 +135,7 @@ export default { ...@@ -133,7 +135,7 @@ export default {
133 if (beginDateVal) { 135 if (beginDateVal) {
134 return ( 136 return (
135 time.getTime() < 137 time.getTime() <
136 new Date(beginDateVal).getTime() + 1 * 24 * 60 * 60 * 1000 138 new Date(beginDateVal).getTime()
137 ); 139 );
138 } 140 }
139 }, 141 },
...@@ -213,6 +215,10 @@ export default { ...@@ -213,6 +215,10 @@ export default {
213 }; 215 };
214 }, 216 },
215 methods: { 217 methods: {
218 //截止日期变化
219 endTimeChange(val){
220 this.form.receiveEndTime = timeFormat(new Date(val),true)
221 },
216 // 初始化数据 222 // 初始化数据
217 queryClick () { 223 queryClick () {
218 getReceiveDataReportPage({ ...this.form, ...this.formData }).then( 224 getReceiveDataReportPage({ ...this.form, ...this.formData }).then(
......
...@@ -19,13 +19,13 @@ ...@@ -19,13 +19,13 @@
19 <el-col :span="6"> 19 <el-col :span="6">
20 <el-form-item label="开始日期" prop="startTime"> 20 <el-form-item label="开始日期" prop="startTime">
21 <el-date-picker type="date" class="width100" placeholder="开始日期" :picker-options="pickerOptionsStart" 21 <el-date-picker type="date" class="width100" placeholder="开始日期" :picker-options="pickerOptionsStart"
22 clearable v-model="form.startTime" value-format="yyyy-MM-dd"></el-date-picker> 22 clearable v-model="form.startTime" value-format="yyyy/MM/dd HH:mm:ss"></el-date-picker>
23 </el-form-item> 23 </el-form-item>
24 </el-col> 24 </el-col>
25 <el-col :span="6"> 25 <el-col :span="6">
26 <el-form-item label="结束日期" prop="endTime"> 26 <el-form-item label="结束日期" prop="endTime">
27 <el-date-picker type="date" class="width100" placeholder="结束日期" :picker-options="pickerOptionsEnd" 27 <el-date-picker type="date" class="width100" placeholder="结束日期" :picker-options="pickerOptionsEnd"
28 clearable v-model="form.endTime" value-format="yyyy-MM-dd"></el-date-picker> 28 clearable v-model="form.endTime" value-format="yyyy/MM/dd HH:mm:ss" @change="endTimeChange"></el-date-picker>
29 </el-form-item> 29 </el-form-item>
30 </el-col> 30 </el-col>
31 <!-- 操作按钮 --> 31 <!-- 操作按钮 -->
...@@ -54,6 +54,8 @@ import { datas, sendThis } from "./data" ...@@ -54,6 +54,8 @@ import { datas, sendThis } from "./data"
54 import table from "@/utils/mixin/table" 54 import table from "@/utils/mixin/table"
55 import { getRecordLogPage } from "@/api/recordLog.js"; 55 import { getRecordLogPage } from "@/api/recordLog.js";
56 import { mapGetters } from 'vuex' 56 import { mapGetters } from 'vuex'
57 //引入日期处理方法
58 import {timeFormat } from "@/utils/operation";
57 export default { 59 export default {
58 name: "dbrzcx", 60 name: "dbrzcx",
59 mixins: [table], 61 mixins: [table],
...@@ -66,9 +68,7 @@ export default { ...@@ -66,9 +68,7 @@ export default {
66 pickerOptionsStart: { 68 pickerOptionsStart: {
67 disabledDate: (time) => { 69 disabledDate: (time) => {
68 if (this.form.endTime) { 70 if (this.form.endTime) {
69 return ( 71 return time.getTime() >= new Date(this.form.endTime).getTime()
70 time.getTime() >= new Date(this.form.endTime).getTime()
71 );
72 } 72 }
73 } 73 }
74 }, 74 },
...@@ -76,17 +76,15 @@ export default { ...@@ -76,17 +76,15 @@ export default {
76 pickerOptionsEnd: { 76 pickerOptionsEnd: {
77 disabledDate: (time) => { 77 disabledDate: (time) => {
78 if (this.form.startTime) { 78 if (this.form.startTime) {
79 return ( 79 return time.getTime() < new Date(this.form.startTime).getTime()
80 time.getTime() <= new Date(this.form.startTime).getTime()
81 );
82 } 80 }
83 } 81 }
84 }, 82 },
85 // 表单 83 // 表单
86 form: { 84 form: {
87 areacode: '', 85 areacode: '',
88 startTime: '', 86 startTime: null,
89 endTime: '', 87 endTime: null,
90 }, 88 },
91 // table数据 89 // table数据
92 tableData: { 90 tableData: {
...@@ -102,6 +100,10 @@ export default { ...@@ -102,6 +100,10 @@ export default {
102 sendThis(this); 100 sendThis(this);
103 }, 101 },
104 methods: { 102 methods: {
103 //截止日期变化
104 endTimeChange(val){
105 this.form.endTime = timeFormat(new Date(val),true)
106 },
105 // 重置表单 107 // 重置表单
106 resetForm () { 108 resetForm () {
107 this.$refs.ruleForm.resetFields(); 109 this.$refs.ruleForm.resetFields();
......
...@@ -20,14 +20,14 @@ ...@@ -20,14 +20,14 @@
20 <el-form-item label="汇交时间" prop="exchangeStartTime"> 20 <el-form-item label="汇交时间" prop="exchangeStartTime">
21 <el-date-picker type="date" class="width100" placeholder="开始日期" clearable 21 <el-date-picker type="date" class="width100" placeholder="开始日期" clearable
22 :picker-options="pickerOptionsStart" v-model="form.exchangeStartTime" 22 :picker-options="pickerOptionsStart" v-model="form.exchangeStartTime"
23 value-format="yyyy-MM-dd"></el-date-picker> 23 value-format="yyyy/MM/dd HH:mm:ss"></el-date-picker>
24 </el-form-item> 24 </el-form-item>
25 </el-col> 25 </el-col>
26 <el-col :span="6"> 26 <el-col :span="6">
27 <el-form-item label="至" prop="exchangeStartTime" label-width="35px"> 27 <el-form-item label="至" prop="exchangeStartTime" label-width="35px">
28 <el-date-picker type="date" class="width100" placeholder="结束日期" clearable 28 <el-date-picker type="date" class="width100" placeholder="结束日期" clearable
29 :picker-options="pickerOptionsEnd" v-model="form.exchangeEndTime" 29 :picker-options="pickerOptionsEnd" v-model="form.exchangeEndTime"
30 value-format="yyyy-MM-dd"></el-date-picker> 30 value-format="yyyy/MM/dd HH:mm:ss" @change="endTimeChange"></el-date-picker>
31 </el-form-item> 31 </el-form-item>
32 </el-col> 32 </el-col>
33 <el-col :span="6"> 33 <el-col :span="6">
...@@ -90,7 +90,8 @@ import table from "@/utils/mixin/table"; ...@@ -90,7 +90,8 @@ import table from "@/utils/mixin/table";
90 // 引入详情弹框 90 // 引入详情弹框
91 import dataDetails from "@/components/EditDialog"; 91 import dataDetails from "@/components/EditDialog";
92 import { getDataReportPage } from "@/api/dataReport.js"; 92 import { getDataReportPage } from "@/api/dataReport.js";
93 93 //引入日期处理方法
94 import {timeFormat } from "@/utils/operation";
94 export default { 95 export default {
95 name: "sbbwcx", 96 name: "sbbwcx",
96 mixins: [table], 97 mixins: [table],
...@@ -113,7 +114,7 @@ export default { ...@@ -113,7 +114,7 @@ export default {
113 pickerOptionsEnd: { 114 pickerOptionsEnd: {
114 disabledDate: (time) => { 115 disabledDate: (time) => {
115 if (this.form.exchangeStartTime) { 116 if (this.form.exchangeStartTime) {
116 return time.getTime() <= new Date(this.form.exchangeStartTime).getTime(); 117 return time.getTime() < new Date(this.form.exchangeStartTime).getTime();
117 } 118 }
118 }, 119 },
119 }, 120 },
...@@ -164,9 +165,14 @@ export default { ...@@ -164,9 +165,14 @@ export default {
164 sendThis(this); 165 sendThis(this);
165 }, 166 },
166 methods: { 167 methods: {
168 //截止日期变化
169 endTimeChange(val){
170 this.form.exchangeEndTime = timeFormat(new Date(val),true)
171 },
167 // 重置表单 172 // 重置表单
168 resetForm () { 173 resetForm () {
169 this.$refs.ruleForm.resetFields(); 174 this.$refs.ruleForm.resetFields();
175 this.form.exchangeEndTime = ""
170 }, 176 },
171 // 初始化数据 177 // 初始化数据
172 queryClick () { 178 queryClick () {
......