打卡记录跳转搜索
This commit is contained in:
parent
9594c9222c
commit
1af737fe87
@ -641,6 +641,12 @@ export default {
|
|||||||
this.physicalSignsList = response.rows;
|
this.physicalSignsList = response.rows;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
activated() {
|
||||||
|
if (this.$route.query.cusName) {
|
||||||
|
this.queryParams.name = this.$route.query.cusName;
|
||||||
|
this.handleQuery();
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
isPartner() {
|
isPartner() {
|
||||||
return this.roles && this.roles.includes("partner");
|
return this.roles && this.roles.includes("partner");
|
||||||
|
@ -32,7 +32,12 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="营养师" prop="nutritionistId">
|
<el-form-item label="营养师" prop="nutritionistId">
|
||||||
<el-select v-model="queryParams.nutritionistId" clearable filterable placeholder="请选择">
|
<el-select
|
||||||
|
v-model="queryParams.nutritionistId"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in nutritionistIdOptions.slice(1)"
|
v-for="dict in nutritionistIdOptions.slice(1)"
|
||||||
:key="dict.dictValue"
|
:key="dict.dictValue"
|
||||||
@ -42,7 +47,12 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="售后" prop="afterNutritionistId">
|
<el-form-item label="售后" prop="afterNutritionistId">
|
||||||
<el-select v-model="queryParams.afterNutritionistId" clearable filterable placeholder="请选择">
|
<el-select
|
||||||
|
v-model="queryParams.afterNutritionistId"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in afterSaleIdOptions.slice(1)"
|
v-for="dict in afterSaleIdOptions.slice(1)"
|
||||||
:key="dict.dictValue"
|
:key="dict.dictValue"
|
||||||
@ -52,17 +62,21 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="打卡日期" prop="logTimeScope" style="margin-left:15px">
|
<el-form-item
|
||||||
|
label="打卡日期"
|
||||||
|
prop="logTimeScope"
|
||||||
|
style="margin-left: 15px"
|
||||||
|
>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="logTimeScope"
|
v-model="logTimeScope"
|
||||||
type="daterange"
|
type="daterange"
|
||||||
range-separator="至"
|
range-separator="至"
|
||||||
start-placeholder="打卡开始日期"
|
start-placeholder="打卡开始日期"
|
||||||
end-placeholder="打卡结束日期"
|
end-placeholder="打卡结束日期"
|
||||||
format="yyyy-MM-dd"
|
format="yyyy-MM-dd"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
:picker-options="logTimePickerOptions"
|
:picker-options="logTimePickerOptions"
|
||||||
>
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
@ -87,7 +101,7 @@
|
|||||||
icon="el-icon-s-flag"
|
icon="el-icon-s-flag"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="showNotLunch()"
|
@click="showNotLunch()"
|
||||||
>未打卡客户列表
|
>未打卡客户列表
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="1.5">-->
|
<!-- <el-col :span="1.5">-->
|
||||||
@ -153,7 +167,16 @@
|
|||||||
<span>{{ parseTime(scope.row.logTime, "{y}-{m}-{d}") }}</span>
|
<span>{{ parseTime(scope.row.logTime, "{y}-{m}-{d}") }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="姓名" align="center" prop="customerName" />
|
<el-table-column label="姓名" align="center" prop="customerName">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div
|
||||||
|
@click="handleOnNameClick(scope.row.customerName)"
|
||||||
|
class="user_name_style"
|
||||||
|
>
|
||||||
|
{{ scope.row.customerName }}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="当天体重" align="center" prop="weight">
|
<el-table-column label="当天体重" align="center" prop="weight">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ `${scope.row.weight} 斤` }}</span>
|
<span>{{ `${scope.row.weight} 斤` }}</span>
|
||||||
@ -171,7 +194,6 @@
|
|||||||
<el-table-column label="营养师" align="center" prop="nutritionist" />
|
<el-table-column label="营养师" align="center" prop="nutritionist" />
|
||||||
<el-table-column label="售后" align="center" prop="afterNutritionist" />
|
<el-table-column label="售后" align="center" prop="afterNutritionist" />
|
||||||
|
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="睡觉时间"
|
label="睡觉时间"
|
||||||
align="center"
|
align="center"
|
||||||
@ -192,15 +214,13 @@
|
|||||||
prop="sport"
|
prop="sport"
|
||||||
:formatter="sportFormat"
|
:formatter="sportFormat"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column label="情绪" align="center" prop="emotion" width="120">
|
||||||
label="情绪"
|
<template slot-scope="scope">
|
||||||
align="center"
|
<AutoHideMessage
|
||||||
prop="emotion"
|
:maxLength="4"
|
||||||
width="120"
|
:data="scope.row.emotion"
|
||||||
>
|
></AutoHideMessage>
|
||||||
<template slot-scope="scope">
|
</template>
|
||||||
<AutoHideMessage :maxLength="4" :data="scope.row.emotion"></AutoHideMessage>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@ -213,11 +233,14 @@
|
|||||||
label="其他食物"
|
label="其他食物"
|
||||||
align="center"
|
align="center"
|
||||||
prop="slyEatFood"
|
prop="slyEatFood"
|
||||||
width="120"
|
width="120"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<AutoHideMessage :maxLength="4" :data="scope.row.slyEatFood"></AutoHideMessage>
|
<AutoHideMessage
|
||||||
</template>
|
:maxLength="4"
|
||||||
|
:data="scope.row.slyEatFood"
|
||||||
|
></AutoHideMessage>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="熬夜失眠"
|
label="熬夜失眠"
|
||||||
@ -315,7 +338,7 @@ import { mapGetters } from "vuex";
|
|||||||
import PunchLogDetail from "@/components/PunchLog/PunchLogDetail";
|
import PunchLogDetail from "@/components/PunchLog/PunchLogDetail";
|
||||||
import PunchLogEdit from "@/components/PunchLog/PunchLogEdit";
|
import PunchLogEdit from "@/components/PunchLog/PunchLogEdit";
|
||||||
import AutoHideMessage from "@/components/AutoHideMessage";
|
import AutoHideMessage from "@/components/AutoHideMessage";
|
||||||
import NotPunchCustomer from "@/components/PunchLog/NotPunchCustomer"
|
import NotPunchCustomer from "@/components/PunchLog/NotPunchCustomer";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
export default {
|
export default {
|
||||||
name: "WxUserLog",
|
name: "WxUserLog",
|
||||||
@ -356,7 +379,7 @@ export default {
|
|||||||
appid: null,
|
appid: null,
|
||||||
phone: null,
|
phone: null,
|
||||||
nutritionistId: null,
|
nutritionistId: null,
|
||||||
afterNutritionistId: null
|
afterNutritionistId: null,
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
@ -364,14 +387,17 @@ export default {
|
|||||||
rules: {},
|
rules: {},
|
||||||
logTimePickerOptions: {
|
logTimePickerOptions: {
|
||||||
disabledDate(time) {
|
disabledDate(time) {
|
||||||
return time.getTime() > dayjs()
|
return time.getTime() > dayjs();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
logTimeScope: null
|
logTimeScope: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
components:{
|
components: {
|
||||||
PunchLogDetail,AutoHideMessage,PunchLogEdit,NotPunchCustomer
|
PunchLogDetail,
|
||||||
|
AutoHideMessage,
|
||||||
|
PunchLogEdit,
|
||||||
|
NotPunchCustomer,
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
@ -396,15 +422,21 @@ export default {
|
|||||||
// 售后字典
|
// 售后字典
|
||||||
"afterSaleIdOptions",
|
"afterSaleIdOptions",
|
||||||
// 主营养师字典
|
// 主营养师字典
|
||||||
"nutritionistIdOptions"
|
"nutritionistIdOptions",
|
||||||
]),
|
]),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询微信用户记录列表 */
|
/** 查询微信用户记录列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.queryParams.beginTime = this.logTimeScope && this.logTimeScope.length > 0 ? this.logTimeScope[0] : null;
|
this.queryParams.beginTime =
|
||||||
this.queryParams.endTime = this.logTimeScope && this.logTimeScope.length > 0 ? this.logTimeScope[1] : null;
|
this.logTimeScope && this.logTimeScope.length > 0
|
||||||
|
? this.logTimeScope[0]
|
||||||
|
: null;
|
||||||
|
this.queryParams.endTime =
|
||||||
|
this.logTimeScope && this.logTimeScope.length > 0
|
||||||
|
? this.logTimeScope[1]
|
||||||
|
: null;
|
||||||
listWxUserLog(this.queryParams).then((response) => {
|
listWxUserLog(this.queryParams).then((response) => {
|
||||||
this.wxUserLogList = response.rows;
|
this.wxUserLogList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
@ -495,7 +527,7 @@ export default {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.$refs.punchLogEditRef.showDialog(row, () => {
|
this.$refs.punchLogEditRef.showDialog(row, () => {
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
@ -526,15 +558,11 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const ids = row.id || this.ids;
|
const ids = row.id || this.ids;
|
||||||
this.$confirm(
|
this.$confirm("是否确认删除该用户的打卡记录?", "警告", {
|
||||||
'是否确认删除该用户的打卡记录?',
|
confirmButtonText: "确定",
|
||||||
"警告",
|
cancelButtonText: "取消",
|
||||||
{
|
type: "warning",
|
||||||
confirmButtonText: "确定",
|
})
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning",
|
|
||||||
}
|
|
||||||
)
|
|
||||||
.then(function () {
|
.then(function () {
|
||||||
return delWxUserLog(ids);
|
return delWxUserLog(ids);
|
||||||
})
|
})
|
||||||
@ -544,9 +572,9 @@ export default {
|
|||||||
})
|
})
|
||||||
.catch(function () {});
|
.catch(function () {});
|
||||||
},
|
},
|
||||||
showPunchLogDetail(data){
|
showPunchLogDetail(data) {
|
||||||
this.$refs.punchLogDetailRef.showDialog(data,() => {
|
this.$refs.punchLogDetailRef.showDialog(data, () => {
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
@ -565,10 +593,28 @@ export default {
|
|||||||
})
|
})
|
||||||
.catch(function () {});
|
.catch(function () {});
|
||||||
},
|
},
|
||||||
showNotLunch(){
|
handleOnNameClick(name) {
|
||||||
this.queryParams.startDate = this.logTimeScope && this.logTimeScope.length > 0 ? this.logTimeScope[0] : null;
|
// console.log({ name });
|
||||||
this.$refs.notPunchCustomerRef.showDialog(this.queryParams, this.nutritionistIdOptions,this.afterSaleIdOptions);
|
this.$router.push(`/customer?cusName=${name}`);
|
||||||
}
|
},
|
||||||
|
showNotLunch() {
|
||||||
|
this.queryParams.startDate =
|
||||||
|
this.logTimeScope && this.logTimeScope.length > 0
|
||||||
|
? this.logTimeScope[0]
|
||||||
|
: null;
|
||||||
|
this.$refs.notPunchCustomerRef.showDialog(
|
||||||
|
this.queryParams,
|
||||||
|
this.nutritionistIdOptions,
|
||||||
|
this.afterSaleIdOptions
|
||||||
|
);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.app-container {
|
||||||
|
.user_name_style {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user