master
xy 3 years ago
parent f68f2e75ba
commit 1f71521ff3

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

@ -1,6 +1,6 @@
<template> <template>
<div> <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 v-slot:schedule_list_id>
</template> </template>
<template v-slot:lat> <template v-slot:lat>

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

@ -4,19 +4,72 @@
<template> <template>
<div style="overflow-y: scroll; height: 100%; padding-bottom: 100px"> <div style="overflow-y: scroll; height: 100%; padding-bottom: 100px">
<drawInfoItem title="被护理人" :info="rowFormat[0]"></drawInfoItem> <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"> <div class="draw-title">
{{ type === 1 ? "服务列表" : "本次服务信息" }} {{ type === 1 ? "服务列表" : "本次服务信息" }}
</div> </div>
<div style="padding: 0 10px"> <div style="padding: 0 10px">
<template v-if="type === 1"> <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 <xy-table
:height="300" :height="300"
:is-page="false" :is-page="false"
:list="list" :list="list"
:table-item="table" :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> </xy-table>
</template> </template>
<template v-else> <template v-else>
@ -47,6 +100,7 @@
</el-drawer> </el-drawer>
<detail ref="detail" @close="isShow = true"></detail> <detail ref="detail" @close="isShow = true"></detail>
<addScheduleListLog ref="addScheduleListLog"></addScheduleListLog>
</div> </div>
</template> </template>
@ -57,10 +111,13 @@ import { getAgeByIdcard } from "@/utils";
import detail from "./detailServe"; import detail from "./detailServe";
import drawInfoItem from "./drawInfoItem.vue"; import drawInfoItem from "./drawInfoItem.vue";
import addScheduleListLog from "./addScheduleListLog.vue";
import { destroy } from "@/api/scheduleListLog";
export default { export default {
components: { components: {
detail, detail,
drawInfoItem, drawInfoItem,
addScheduleListLog,
}, },
inject: ["selectedRow"], inject: ["selectedRow"],
provide() { provide() {
@ -158,6 +215,27 @@ export default {
}; };
}, },
methods: { 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() { init() {
this.select = { this.select = {
customer_id: "", customer_id: "",
@ -180,7 +258,7 @@ export default {
computed: { computed: {
rowFormat() { rowFormat() {
if (this.selectedRow()) { if (this.selectedRow()) {
if(this.type === 1){ if (this.type === 1) {
return [ return [
{ {
姓名: this.selectedRow().customer?.name, 姓名: this.selectedRow().customer?.name,
@ -188,10 +266,10 @@ export default {
年龄: getAgeByIdcard(this.selectedRow().customer?.idcard), 年龄: getAgeByIdcard(this.selectedRow().customer?.idcard),
联系人: this.selectedRow().customer?.contact_name, 联系人: this.selectedRow().customer?.contact_name,
联系人电话: this.selectedRow().customer?.contact_phone, 联系人电话: this.selectedRow().customer?.contact_phone,
} },
] ];
} }
if(this.type === 2){ if (this.type === 2) {
return [ return [
{ {
姓名: this.selectedRow().customer?.name, 姓名: this.selectedRow().customer?.name,
@ -268,3 +346,8 @@ export default {
font-weight: 600; font-weight: 600;
} }
</style> </style>
<style>
.pop-confirm {
z-index: 3000 !important;
}
</style>

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

Loading…
Cancel
Save