From 5b1789c93de73b5e86913b5e7cd44e2448a5b315 Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Fri, 3 Mar 2023 17:09:35 +0800 Subject: [PATCH] 2023-3-3 --- src/views/customer/customer.vue | 26 +++++++++++++++++++------- src/views/finance/scheduleList.vue | 12 +++++++----- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/src/views/customer/customer.vue b/src/views/customer/customer.vue index 3941fad..7039245 100644 --- a/src/views/customer/customer.vue +++ b/src/views/customer/customer.vue @@ -117,9 +117,11 @@ size="mini" v-model="scope.row.status" placeholder="状态标识" - @change="e => { - save(scope.row).then(res => getCustomers) - }" + @change=" + (e) => { + save(scope.row).then((res) => getCustomers); + } + " > { + let getColor = () => { + if (getAgeByIdcard(row.idcard) >= row.max_age) { + return "orange"; + } + if (row.near_age) { + return "yellow"; + } + }; + return {row.name}; + }, }, { label: "订单产品", @@ -451,7 +463,7 @@ export default { async mounted() { await this.getTypes(); await this.getCustomers(); - } + }, }; diff --git a/src/views/finance/scheduleList.vue b/src/views/finance/scheduleList.vue index 2bd2d97..5c8c3a7 100644 --- a/src/views/finance/scheduleList.vue +++ b/src/views/finance/scheduleList.vue @@ -13,7 +13,7 @@ filterable size="small" v-model="select.nurse_name" - placeholder="选择护工姓名" + placeholder="选择护理人姓名" clearable style="width: 160px;margin-right: 10px;" > @@ -210,7 +210,7 @@ export default { }, data() { return { - pickedMonth:"", + pickedMonth:new Date(), selectedRow:{}, customers:[], nurses:[], @@ -278,11 +278,12 @@ export default { align:'left' }, { - prop:'sec', width: 140, label:'实际服务时间', - formatter:(cell,data,val) => { - return val ? Number(val) % 60 : 0 + customFn:row => { + return ( + { (row.sign_out && row.sign_in) ? this.$moment(row.sign_out).diff(row.sign_in,'minutes') : 0 } + ) } }, { @@ -463,6 +464,7 @@ export default { }, computed: {}, created() { + this.pickMonth(new Date()) this.getNurses() this.getCustomers() this.getList()