diff --git a/stdiet-ui/src/views/custom/customer/index.vue b/stdiet-ui/src/views/custom/customer/index.vue index e41791e88..4e8870811 100644 --- a/stdiet-ui/src/views/custom/customer/index.vue +++ b/stdiet-ui/src/views/custom/customer/index.vue @@ -641,6 +641,12 @@ export default { this.physicalSignsList = response.rows; }); }, + activated() { + if (this.$route.query.cusName) { + this.queryParams.name = this.$route.query.cusName; + this.handleQuery(); + } + }, computed: { isPartner() { return this.roles && this.roles.includes("partner"); diff --git a/stdiet-ui/src/views/custom/wxUserLog/index.vue b/stdiet-ui/src/views/custom/wxUserLog/index.vue index 4c1a87f42..b1a6fbee8 100644 --- a/stdiet-ui/src/views/custom/wxUserLog/index.vue +++ b/stdiet-ui/src/views/custom/wxUserLog/index.vue @@ -32,37 +32,51 @@ /> - + - + - - + + + v-model="logTimeScope" + type="daterange" + range-separator="至" + start-placeholder="打卡开始日期" + end-placeholder="打卡结束日期" + format="yyyy-MM-dd" + value-format="yyyy-MM-dd" + :picker-options="logTimePickerOptions" + > @@ -87,7 +101,7 @@ icon="el-icon-s-flag" size="mini" @click="showNotLunch()" - >未打卡客户列表 + >未打卡客户列表 @@ -153,7 +167,16 @@ {{ parseTime(scope.row.logTime, "{y}-{m}-{d}") }} - + + + + {{ scope.row.customerName }} + + + {{ `${scope.row.weight} 斤` }} @@ -166,12 +189,11 @@ width="120" :formatter="appidFormat" />--> - + - - + - - - - + + + + - - - + + + dayjs() + return time.getTime() > dayjs(); }, }, - logTimeScope: null + logTimeScope: null, }; }, - components:{ - PunchLogDetail,AutoHideMessage,PunchLogEdit,NotPunchCustomer + components: { + PunchLogDetail, + AutoHideMessage, + PunchLogEdit, + NotPunchCustomer, }, created() { this.getList(); @@ -396,15 +422,21 @@ export default { // 售后字典 "afterSaleIdOptions", // 主营养师字典 - "nutritionistIdOptions" + "nutritionistIdOptions", ]), }, methods: { /** 查询微信用户记录列表 */ getList() { - this.loading = true; - this.queryParams.beginTime = this.logTimeScope && this.logTimeScope.length > 0 ? this.logTimeScope[0] : null; - this.queryParams.endTime = this.logTimeScope && this.logTimeScope.length > 0 ? this.logTimeScope[1] : null; + this.loading = true; + this.queryParams.beginTime = + 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) => { this.wxUserLogList = response.rows; this.total = response.total; @@ -495,7 +527,7 @@ export default { /** 修改按钮操作 */ handleUpdate(row) { this.$refs.punchLogEditRef.showDialog(row, () => { - this.getList(); + this.getList(); }); }, /** 提交按钮 */ @@ -526,15 +558,11 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const ids = row.id || this.ids; - this.$confirm( - '是否确认删除该用户的打卡记录?', - "警告", - { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", - } - ) + this.$confirm("是否确认删除该用户的打卡记录?", "警告", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) .then(function () { return delWxUserLog(ids); }) @@ -544,9 +572,9 @@ export default { }) .catch(function () {}); }, - showPunchLogDetail(data){ - this.$refs.punchLogDetailRef.showDialog(data,() => { - this.getList(); + showPunchLogDetail(data) { + this.$refs.punchLogDetailRef.showDialog(data, () => { + this.getList(); }); }, /** 导出按钮操作 */ @@ -565,10 +593,28 @@ export default { }) .catch(function () {}); }, - showNotLunch(){ - this.queryParams.startDate = this.logTimeScope && this.logTimeScope.length > 0 ? this.logTimeScope[0] : null; - this.$refs.notPunchCustomerRef.showDialog(this.queryParams, this.nutritionistIdOptions,this.afterSaleIdOptions); - } + handleOnNameClick(name) { + // console.log({ name }); + 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 + ); + }, }, }; +