Commit 7f953817 by LJM

add

parent aea99c25
Showing with 7 additions and 21 deletions
......@@ -289,23 +289,9 @@
<script>
import { API } from '@/util/api.js';
import { formatDate } from '@/util/util.js';
import debounce from 'lodash/debounce';
// 获取当前日期
const currentDate = new Date();
// 获取前一个月的日期
const lastMonthDate = new Date(currentDate);
lastMonthDate.setMonth(currentDate.getMonth() - 1);
// 格式化日期为 YYYY-MM-DD
const formatDate = (date) => {
const year = date.getFullYear();
const month = (date.getMonth() + 1).toString().padStart(2, '0');
const day = date.getDate().toString().padStart(2, '0');
return `${year}-${month}-${day}`;
};
export default {
data() {
return {
......@@ -327,8 +313,8 @@
real_shipping_mode_data: [], //物流模式数据
searchParams: {
stock_out_sn: '',
create_start_time: formatDate(lastMonthDate), //开始时间
create_end_time: formatDate(currentDate) //结束时间
create_start_time: formatDate(new Date()), //开始时间
create_end_time: formatDate(new Date()) //结束时间
},
shipping_payment_type_data: [{ name: '寄件月结', value: 1 }, { name: '寄件到付', value: 2 }],
shipping_payment_type_index: -1,
......@@ -401,12 +387,12 @@
}
},
/**
* 时间选择
* 时间选择监听
*/
bindTimeChange(type, e) {
this.resetChange();
if (type == 1) {
this.searchParams.create_end_time = e.detail.value;
this.searchParams.create_start_time = e.detail.value;
} else if (type == 2) {
this.searchParams.create_end_time = e.detail.value;
}
......@@ -485,10 +471,10 @@
this.resetChange();
if (type == 'start') {
//清除起始时间
this.searchParams.exec_start_time = '';
this.searchParams.create_start_time = '';
} else if (type == 'end') {
//清除结束时间
this.searchParams.exec_end_time = '';
this.searchParams.create_end_time = '';
} else {
this.input_flag = false;
this.searchParams.stock_out_sn = '';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment