master
xy 3 years ago
parent 01dafe6055
commit c374a7f434

@ -69,35 +69,70 @@
title="护工排班"
:visible.sync="isShowDrawer"
direction="rtl">
<div class="draw-title">护工信息</div>
<div style="margin-left: 2%;">
<div style="margin-bottom: 8px;">
<span class="info-title">姓名</span>
<span class="info-content">{{ worker.name }}</span>
</div>
<div style="margin-bottom: 8px;">
<span class="info-title">性别</span>
<span class="info-content">{{ worker.sex }}</span>
</div>
<div style="margin-bottom: 8px;">
<span class="info-title">手机号</span>
<span class="info-content">{{ worker.mobile }}</span>
</div>
<div style="margin-bottom: 8px;">
<span class="info-title">年龄</span>
<span class="info-content">{{ $moment().diff(worker.birthday,'year') }}</span>
</div>
</div>
<xy-table :height="400" style="margin-top: 20px;" :list="schedules" :table-item="scheduleTable" :is-page="false">
<template v-slot:btns>
<!-- <el-table-column :width="130" align="center" label="操作" fixed="right" header-align="center">-->
<!-- <template v-slot:default="scope">-->
<!-- <Button size="small" type="primary" ghost style="margin-right: 6px;">编辑</Button>-->
<!-- <template v-if="scope.row.status === 0">-->
<!-- <Poptip-->
<!-- transfer-->
<!-- confirm-->
<!-- title="确认要删除订单?"-->
<!-- @on-ok="deleteSchedule(scope.row)">-->
<!-- <Button size="small" type="primary" ghost>删除</Button>-->
<!-- </Poptip>-->
<!-- </template>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column :width="130" align="center" label="操作" header-align="center">
<template v-slot:default="scope">
<el-popover
placement="right"
width="300"
trigger="click">
<el-table :data="skus" :height="300">
<el-table-column width="120" property="sku_info.name" label="明细名称"></el-table-column>
<el-table-column width="100" property="time" label="时长(分)"></el-table-column>
</el-table>
<Button size="small" type="primary" ghost slot="reference" style="margin-right: 4px" @click="showDialog(scope.row)"></Button>
</el-popover>
<template v-if="scope.row.status === 0">
<Poptip
v-model="isShowSku"
transfer
confirm
title="确认要删除订单?"
@on-ok="deleteSchedule(scope.row)">
<Button size="small" type="primary" ghost>删除</Button>
</Poptip>
</template>
</template>
</el-table-column>
</template>
</xy-table>
</el-drawer>
</div>
</template>
<script>
import { nurseSchedule,scheduleIndex,scheduleDelete } from '@/api/schedule'
import { getList } from '@/api/serveDetail'
export default {
data() {
return {
worker:{},
isShowDrawer:false,
isShowSku:false,
skus:[],
select: {
page: 1,
page_size: 10,
@ -204,6 +239,16 @@ export default {
editor(){
},
showDialog(row){
getList({
customer_id:row.customer_id
}).then(res => {
this.skus = res.data.filter(item => {
return row.id === item.id
})[0]?.sku ?? []
this.isShowSku = true
})
},
deleteSchedule(row){
scheduleDelete({
@ -217,6 +262,7 @@ export default {
})
},
show(e){
this.worker = e
scheduleIndex({
nurse_name:e.name,
page_size:9999
@ -243,4 +289,30 @@ export default {
padding: 10px 10px;
}
}
.draw-title{
letter-spacing: 2px;
font-weight: 600;
position: relative;
padding: 10px 8px 10px 30px;
&::after{
content: '';
width: 10px;
height: 10px;
border-radius: 100%;
background: #B3241D;
transform: translateY(-50%);
position: absolute;
top: 50%;
left: 10px;
}
}
.info-title{
font-weight: 600;
}
.info-content{
padding-left: 10px;
}
</style>

Loading…
Cancel
Save