master
xy 3 years ago
parent bee07ab22d
commit 5b1789c93d

@ -117,9 +117,11 @@
size="mini" size="mini"
v-model="scope.row.status" v-model="scope.row.status"
placeholder="状态标识" placeholder="状态标识"
@change="e => { @change="
save(scope.row).then(res => getCustomers) (e) => {
}" save(scope.row).then((res) => getCustomers);
}
"
> >
<el-option <el-option
v-for="item in [ v-for="item in [
@ -156,11 +158,11 @@
</template> </template>
<script> <script>
import { getList, destroy,save } from "@/api/customer"; import { getList, destroy, save } from "@/api/customer";
import { getparameter } from "@/api/system/dictionary"; import { getparameter } from "@/api/system/dictionary";
import { getList as getUnit } from "@/api/payUnit"; import { getList as getUnit } from "@/api/payUnit";
import { getList as getTypes } from "@/api/productType"; import { getList as getTypes } from "@/api/productType";
import { deepCopy } from "@/utils"; import { deepCopy, getBirth, getAgeByIdcard } from "@/utils";
import { getAuthAreas, getAuthTypes } from "@/utils/auth"; import { getAuthAreas, getAuthTypes } from "@/utils/auth";
import addCustomer from "@/views/customer/component/addCustomer"; import addCustomer from "@/views/customer/component/addCustomer";
@ -276,9 +278,19 @@ export default {
}, },
}, },
{ {
prop: "name",
label: "姓名", label: "姓名",
width: "180", 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: "订单产品", label: "订单产品",
@ -451,7 +463,7 @@ export default {
async mounted() { async mounted() {
await this.getTypes(); await this.getTypes();
await this.getCustomers(); await this.getCustomers();
} },
}; };
</script> </script>

@ -13,7 +13,7 @@
filterable filterable
size="small" size="small"
v-model="select.nurse_name" v-model="select.nurse_name"
placeholder="选择护姓名" placeholder="选择护理人姓名"
clearable clearable
style="width: 160px;margin-right: 10px;" style="width: 160px;margin-right: 10px;"
> >
@ -210,7 +210,7 @@ export default {
}, },
data() { data() {
return { return {
pickedMonth:"", pickedMonth:new Date(),
selectedRow:{}, selectedRow:{},
customers:[], customers:[],
nurses:[], nurses:[],
@ -278,11 +278,12 @@ export default {
align:'left' align:'left'
}, },
{ {
prop:'sec',
width: 140, width: 140,
label:'实际服务时间', label:'实际服务时间',
formatter:(cell,data,val) => { customFn:row => {
return val ? Number(val) % 60 : 0 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: {}, computed: {},
created() { created() {
this.pickMonth(new Date())
this.getNurses() this.getNurses()
this.getCustomers() this.getCustomers()
this.getList() this.getList()

Loading…
Cancel
Save