diff --git a/src/components/search/SearchForm.jsx b/src/components/search/SearchForm.jsx
index 9dca78c..36bccbe 100644
--- a/src/components/search/SearchForm.jsx
+++ b/src/components/search/SearchForm.jsx
@@ -278,14 +278,6 @@ function getFields(props) {
,
2
),
- item(
- 'dates',
- 99,
-
-
- ,
- midCol
- ),
item(
'years',
99,
@@ -303,6 +295,14 @@ function getFields(props) {
,
2
),
+ item(
+ 'dates',
+ 99,
+
+
+ ,
+ midCol
+ ),
item(
'operator',
99,
diff --git a/src/stores/DatePickerStore.js b/src/stores/DatePickerStore.js
index d4f24eb..1609148 100644
--- a/src/stores/DatePickerStore.js
+++ b/src/stores/DatePickerStore.js
@@ -10,23 +10,6 @@ class DatePickerStore {
makeAutoObservable(this);
}
- formValues = {
- 'DepartmentList': { 'key': 'ALL', 'label': '所有小组' },
- 'WebCode': { 'key': 'ALL', 'label': '所有来源' },
- 'IncludeTickets': { 'key': '1', 'label': '含门票' },
- 'DateType': { 'key': 'applyDate', 'label': '提交日期' },
- 'year': moment(),
- };
-
- formValuesToSub = {
- DepartmentList: 'ALL',
- WebCode: 'ALL',
- IncludeTickets: '1',
- DateType: 'applyDate',
- Date1: moment().startOf('year').format('YYYY-MM-DD'),
- Date2: moment().endOf('year').format('YYYY-MM-DD 23:59'),
- };
-
start_date = moment().startOf('week').subtract(7, 'days');
end_date = moment().endOf('week').subtract(7, 'days');
start_date_cp = false;
@@ -57,6 +40,26 @@ class DatePickerStore {
return [moment(this.start_date).subtract(1, 'year'), moment(this.end_date).subtract(1, 'year')];
}
+
+ formValues = {
+ 'DepartmentList': { 'key': 'ALL', 'label': '所有小组' },
+ 'WebCode': { 'key': 'ALL', 'label': '所有来源' },
+ 'IncludeTickets': { 'key': '1', 'label': '含门票' },
+ 'DateType': { 'key': 'applyDate', 'label': '提交日期' },
+ 'years': this.start_date,
+ // 'months': [moment(), moment()],
+ 'dates': [this.start_date, this.end_date],
+ };
+
+ formValuesToSub = {
+ DepartmentList: 'ALL',
+ WebCode: 'ALL',
+ IncludeTickets: '1',
+ DateType: 'applyDate',
+ Date1: this.start_date.format('YYYY-MM-DD'),
+ Date2: this.end_date.format('YYYY-MM-DD 23:59'),
+ };
+
setFormValues(data){
this.formValues = data;
}