This commit is contained in:
qsh
2023-05-11 00:46:52 +08:00
parent 9800001876
commit 155f9009fc
15 changed files with 726 additions and 528 deletions

View File

@@ -22,7 +22,10 @@
</el-select>
</el-form-item>
<el-form-item label="创建时间">
<el-date-picker v-model="dateRange" style="width: 240px" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="pickDateChange" />
<el-date-picker v-model="createDateRange" style="width: 240px" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="pickDateChange" />
</el-form-item>
<el-form-item label="下次跟进日期">
<el-date-picker v-model="nextDateRange" style="width: 240px" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="nextDateChange" />
</el-form-item>
<el-form-item label-width="0">
<el-button type="primary" icon="el-icon-search" @click="$emit('search')">搜索</el-button>
@@ -41,16 +44,20 @@ export default {
props: {
userOptions: {
type: Array,
default: []
default: () => ([])
},
sourceOptions: {
type: Array,
default: []
default: () => ([])
},
form: {
type: Object,
default: () => ({})
}
},
data() {
return {
searchForm: {},
searchForm: { ...this.form },
quickList: [
{ value: 1, label: '我创建的' },
{ value: 2, label: '我的有效' },
@@ -62,27 +69,34 @@ export default {
{ value: 8, label: '撞单线索' }
],
intentionOptions: [],
dateRange: []
createDateRange: [],
nextDateRange: []
};
},
watch: {
searchForm: {
handler(val) {
this.$emit('update:form', val);
},
deep: true
}
},
created() {
// 意向状态
this.getDicts('dm_intention_state').then((response) => {
let list = response.data
this.intentionOptions = []
const list = response.data;
this.intentionOptions = [];
list.map(item => {
this.intentionOptions.push({
value: item.dictValue,
label: item.dictLabel
})
})
})
});
});
});
},
methods: {
resetQuery() {
this.searchForm = {
createTime: [],
name: undefined,
intentionState: undefined,
followUser2: undefined,
@@ -90,12 +104,28 @@ export default {
quickSearch: undefined,
total: 0
};
this.dateRange = []
this.createDateRange = [];
this.nextDateRange = [];
},
pickDateChange() {
this.addDateRange(this.searchForm, this.dateRange)
if (this.createDateRange.length) {
this.searchForm.createDateStart = this.createDateRange[0];
this.searchForm.createDateEnd = this.createDateRange[1];
} else {
this.searchForm.createDateStart = undefined;
this.searchForm.createDateEnd = undefined;
}
},
nextDateChange() {
if (this.nextDateRange.length) {
this.searchForm.nextDateStart = this.nextDateRange[0];
this.searchForm.nextDateEnd = this.nextDateRange[1];
} else {
this.searchForm.nextDateStart = undefined;
this.searchForm.nextDateEnd = undefined;
}
}
},
}
}
};
</script>