master
xy 3 years ago
parent f68f2e75ba
commit 1f71521ff3

@ -1,6 +1,7 @@
<script>
export default {
props:{
zIndex:Number,
type:{
type:String,
default:"normal"
@ -130,6 +131,7 @@ export default {
const {okText,okClick,footerRender,width,type,$scopedSlots,rules,form,showChange,isShow,title} = this
return (
<Modal
z-index={this.zIndex}
ok-text={okText}
class-name={'vertical-center-modal'}
width={width}

@ -1,6 +1,6 @@
<template>
<div>
<xy-dialog ref="dialog" :width="60" :is-show.sync="isShow" type="form" :title="type === 'add' ? '新增打卡记录' : '编辑打卡记录'" :form="form" :rules="rules" @submit="submit">
<xy-dialog :z-index="5000" ref="dialog" :width="60" :is-show.sync="isShow" type="form" :title="type === 'add' ? '新增打卡记录' : '编辑打卡记录'" :form="form" :rules="rules" @submit="submit">
<template v-slot:schedule_list_id>
</template>
<template v-slot:lat>

@ -131,7 +131,6 @@ export default {
},
methods: {
editor(scope){
console.log(scope)
this.$refs['addScheduleListLog'].fileList = scope.row.upload_list.map(item => {
return {
url:item.upload?.url,

@ -4,19 +4,72 @@
<template>
<div style="overflow-y: scroll; height: 100%; padding-bottom: 100px">
<drawInfoItem title="被护理人" :info="rowFormat[0]"></drawInfoItem>
<drawInfoItem v-if="type === 2" title="护理人" :info="rowFormat[1]"></drawInfoItem>
<drawInfoItem
v-if="type === 2"
title="护理人"
:info="rowFormat[1]"
></drawInfoItem>
<div class="draw-title">
{{ type === 1 ? "服务列表" : "本次服务信息" }}
</div>
<div style="padding: 0 10px">
<template v-if="type === 1">
<div style="display: flex;justify-content: space-between;align-items: center;">
<el-select v-model="select.type" size="small" placeholder="请选择状态类型" @change="getList">
<el-option v-for="item in [{label:'签到',value:1},{label:'过程打卡',value:2},{label:'签退',value:3}]" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-button
style="margin: 10px 0"
size="small"
round
type="primary"
@click="
($refs['addScheduleListLog'].type = 'add'),
($refs['addScheduleListLog'].isShow = true)
"
>录入服务记录</el-button
>
</div>
<xy-table
:height="300"
:is-page="false"
:list="list"
:table-item="table"
>
<template v-slot:btns> </template>
<template v-slot:btns>
<el-table-column
align="center"
width="180"
label="操作"
header-align="center"
>
<template v-slot:default="scope">
<Button
type="primary"
size="small"
style="margin-left: 4px"
@click="editor(scope)"
>编辑</Button
>
<Poptip
popper-class="pop-confirm"
transfer
confirm
title="确认要删除?"
@on-ok="destroy(scope.row)"
>
<Button
size="small"
type="error"
ghost
style="margin-left: 4px"
>删除</Button
>
</Poptip>
</template>
</el-table-column>
</template>
</xy-table>
</template>
<template v-else>
@ -47,6 +100,7 @@
</el-drawer>
<detail ref="detail" @close="isShow = true"></detail>
<addScheduleListLog ref="addScheduleListLog"></addScheduleListLog>
</div>
</template>
@ -57,10 +111,13 @@ import { getAgeByIdcard } from "@/utils";
import detail from "./detailServe";
import drawInfoItem from "./drawInfoItem.vue";
import addScheduleListLog from "./addScheduleListLog.vue";
import { destroy } from "@/api/scheduleListLog";
export default {
components: {
detail,
drawInfoItem,
addScheduleListLog,
},
inject: ["selectedRow"],
provide() {
@ -158,6 +215,27 @@ export default {
};
},
methods: {
editor(scope) {
this.$refs["addScheduleListLog"].fileList = scope.row.upload_list.map(
(item) => {
return {
url: item.upload?.url,
name: item.upload?.name,
upload_id: item.upload?.id,
};
}
);
this.$refs["addScheduleListLog"].id = scope.row.id;
this.$refs["addScheduleListLog"].type = "editor";
this.$refs["addScheduleListLog"].isShow = true;
},
destroy(row) {
destroy(row.id).then((res) => {
this.$successMessage("destroy", "打卡记录");
this.getList();
});
},
init() {
this.select = {
customer_id: "",
@ -180,7 +258,7 @@ export default {
computed: {
rowFormat() {
if (this.selectedRow()) {
if(this.type === 1){
if (this.type === 1) {
return [
{
姓名: this.selectedRow().customer?.name,
@ -188,10 +266,10 @@ export default {
年龄: getAgeByIdcard(this.selectedRow().customer?.idcard),
联系人: this.selectedRow().customer?.contact_name,
联系人电话: this.selectedRow().customer?.contact_phone,
}
]
},
];
}
if(this.type === 2){
if (this.type === 2) {
return [
{
姓名: this.selectedRow().customer?.name,
@ -268,3 +346,8 @@ export default {
font-weight: 600;
}
</style>
<style>
.pop-confirm {
z-index: 3000 !important;
}
</style>

@ -117,16 +117,16 @@
<div class="select-item">
<div class="select-item__label">状态</div>
<el-radio v-model="select.schedule_status" :label="0"
<el-radio v-model="select.status" :label="0"
>待护理</el-radio
>
<el-radio v-model="select.schedule_status" :label="1"
<el-radio v-model="select.status" :label="1"
>进行中</el-radio
>
<el-radio v-model="select.schedule_status" :label="2"
<el-radio v-model="select.status" :label="2"
>已完成</el-radio
>
<el-radio v-model="select.schedule_status" label=""
<el-radio v-model="select.status" label=""
>全部</el-radio
>
</div>
@ -229,6 +229,7 @@ export default {
end_sign_in:"",
start_start_time:"",
end_start_time:"",
status:"",
is_export:0
},
list: [],
@ -399,6 +400,7 @@ export default {
download('/api/admin/chart/schedule-list-log','get',{
page: 1,
page_size: 9999,
status:this.select.status,
nurse_name:this.select.nurse_name,
customer_name:this.select.customer_name,
address_name:this.select.address_name,
@ -421,6 +423,7 @@ export default {
end_sign_in:"",
start_start_time:"",
end_start_time:"",
status:"",
is_export:0
}
},

Loading…
Cancel
Save