Commit dcf064cc authored by zhengyi's avatar zhengyi

全部客户列表默认加载当年创建的客户

parent 70e6f6db
......@@ -165,7 +165,7 @@
</el-form-item>
<el-form-item :label="$t('创建时间')" v-show="showSearch">
<el-date-picker type="datetimerange" clearable v-model="dateRangeCreateTime" value-format="yyyy-MM-dd HH:mm:ss" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
<el-date-picker type="datetimerange" clearable v-model="createTime" value-format="yyyy-MM-dd HH:mm:ss" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
</el-form-item>
<el-form-item style="padding-left: 20px">
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t("搜索") }}</el-button>
......@@ -794,7 +794,6 @@ export default {
title: "",
// 是否显示弹出层
open: false,
dateRangeCreateTime: [],
// 查询参数
queryParams: {
pageNo: 1,
......@@ -890,6 +889,7 @@ export default {
enterOpenSeaTime: [],
customerServiceConfirmedTime: [],
firstDealTime: [],
createTime: [],
customerSelect: [],
recommended: [],
getNodeLists: [],
......@@ -966,14 +966,14 @@ export default {
queryParams.beginCustomerServiceConfirmedTime = this.customerServiceConfirmedTime[0]
queryParams.endCustomerServiceConfirmedTime = this.customerServiceConfirmedTime[1]
}
if (this.dateRangeCreateTime && this.dateRangeCreateTime.length == 2) {
queryParams.beginCreateTime = this.dateRangeCreateTime[0]
queryParams.endCreateTime = this.dateRangeCreateTime[1]
}
if (this.firstDealTime && this.firstDealTime.length == 2) {
queryParams.beginFirstDealTime = this.firstDealTime[0]
queryParams.endFirstDealTime = this.firstDealTime[1]
}
if (this.createTime && this.createTime.length == 2) {
queryParams.beginCreateTime = this.createTime[0]
queryParams.endCreateTime = this.createTime[1]
}
if (this.weightYearly.value) {
let key = "eqWeightYearly"
if (this.weightYearly.key == "leNumberKey") {
......@@ -1006,10 +1006,13 @@ export default {
},
created() {
console.log("created")
getCreditPage({ page: 1, rows: 999 }).then((r) => {
this.creditList = r.data.list
})
this.getList()
// 获取当前时间的年份开始时间与结束时间值,并赋值给创建时间,再查询当年创建的客户
this.getCurrentYearList()
// this.getList()
listServiceUser().then((r) => {
this.customerServiceList = r.data
})
......@@ -1062,6 +1065,17 @@ export default {
})
}
},
getCurrentYearList(){
const today = new Date();
const targetday_milliseconds = today.getTime();
today.setTime(targetday_milliseconds); //注意,这行是关键代码
const tYear = today.getFullYear();
console.log("年份:", tYear)
if (tYear){
this.createTime = [(tYear + "-01-01 00:00:00"),(tYear + "-12-31 23:59:59")]
}
this.getList()
},
//合并客户
handleMergeCus() {
this.customerMergeVisible = true
......@@ -1169,12 +1183,7 @@ export default {
this.loading = true
// 处理查询参数}
let params = { ...this.queryParams, ...this.combinedQueryParams }
/*this.addBeginAndEndTime(
params,
this.dateRangeCreateTime,
"createTime",
false
);*/
// 执行查询
switch (this.$route.path) {
case "/customer/customer":
......@@ -1343,10 +1352,10 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.dateRangeCreateTime = []
this.enterOpenSeaTime = []
this.customerServiceConfirmedTime = []
this.firstDealTime = []
this.createTime = []
this.resetForm("queryForm")
this.queryParams = {
pageNo: 1,
......
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 to comment