master
xy 3 years ago
parent bee07ab22d
commit 5b1789c93d

@ -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);
}
"
>
<el-option
v-for="item in [
@ -156,11 +158,11 @@
</template>
<script>
import { getList, destroy,save } from "@/api/customer";
import { getList, destroy, save } from "@/api/customer";
import { getparameter } from "@/api/system/dictionary";
import { getList as getUnit } from "@/api/payUnit";
import { getList as getTypes } from "@/api/productType";
import { deepCopy } from "@/utils";
import { deepCopy, getBirth, getAgeByIdcard } from "@/utils";
import { getAuthAreas, getAuthTypes } from "@/utils/auth";
import addCustomer from "@/views/customer/component/addCustomer";
@ -276,9 +278,19 @@ export default {
},
},
{
prop: "name",
label: "姓名",
width: "180",
customFn: (row) => {
let getColor = () => {
if (getAgeByIdcard(row.idcard) >= row.max_age) {
return "orange";
}
if (row.near_age) {
return "yellow";
}
};
return <span style={{ color: getColor() }}>{row.name}</span>;
},
},
{
label: "订单产品",
@ -451,7 +463,7 @@ export default {
async mounted() {
await this.getTypes();
await this.getCustomers();
}
},
};
</script>

@ -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 (
<span>{ (row.sign_out && row.sign_in) ? this.$moment(row.sign_out).diff(row.sign_in,'minutes') : 0 }</span>
)
}
},
{
@ -463,6 +464,7 @@ export default {
},
computed: {},
created() {
this.pickMonth(new Date())
this.getNurses()
this.getCustomers()
this.getList()

Loading…
Cancel
Save