master
271556543@qq.com 3 years ago
parent 875e3e136e
commit 242657fec6

@ -84,19 +84,14 @@
</div>
</template>
</xy-dialog>
<scheduleList ref="scheduleList"></scheduleList>
</div>
</template>
<script>
import {getForm, save} from '@/api/productType'
import scheduleList from "@/views/finance/component/scheduleList";
export default {
components:{
scheduleList
},
props:{
skus:{
type:Array,

@ -78,7 +78,7 @@
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>排班信息
</div>
<div class="xy-table-item-content">
<div class="xy-table-item-content-schedule">
<div class="xy-table-item-content-schedule" @click="$refs['scheduleList'].isShow = true">
<template v-if="form.schedule_links.length > 0">
</template>
@ -90,12 +90,19 @@
</div>
</template>
</xy-dialog>
<scheduleList ref="scheduleList"></scheduleList>
</div>
</template>
<script>
import {save,getForm} from '@/api/collectMoney'
import scheduleList from "@/views/finance/component/scheduleList";
export default {
components:{
scheduleList
},
data() {
return {
isShow:false,

@ -1,18 +1,127 @@
<template>
<div>
<xy-dialog :is-show.sync="isShow"></xy-dialog>
<xy-dialog :width="72" :is-show.sync="isShow" type="normal" title="排班列表">
<xy-table
:height="400"
:list="list"
:table-item="table"
@select="colSelect"
@pageSizeChange="e => select.page_size = e"
@pageIndexChange="e => {select.page = e;getList()}">
<template v-slot:btns>
<div></div>
</template>
</xy-table>
</xy-dialog>
</div>
</template>
<script>
import {scheduleList} from '@/api/collectMoney'
import {parseTime} from '@/utils'
export default {
data() {
return {
isShow:false
isShow:false,
select:{
page:1,
page_size:10
},
form:[],
list:[],
table:[
{
type:'selection',
width:46
},
{
label:'第三方结算对象',
prop:'orders.account_id',
minWidth: 160
},
{
label:'护工',
prop:'nurse.name',
width: 160
},
{
label:'服务日期',
prop:'date',
width: 200
},
{
label:'时间段',
width: 180,
customFn:(row)=>{
return (
<div>{parseTime(row.start_time,'{h}:{i}')}~{parseTime(row.end_time,'{h}:{i}')}</div>
)
}
},
{
label:'订单编号',
prop:'orders.no',
width: 220
},
{
label:'服务对象',
prop:'customer.name',
width: 200
},
{
label:'服务状态',
prop:'status',
width: 160,
formatter:(cell,data,value) => {
switch (value){
case 0:
return '已排班未服务'
break;
case 1:
return '已排班未服务'
break;
case 2:
return '已服务'
break;
default:
return value
}
}
},
methods: {},
{
label:'结算单',
width: 160
}
]
}
},
methods: {
async getList(){
const res = await scheduleList(this.select)
this.list = res.data
console.log(this.list)
},
colSelect(selection, row){
console.log(selection, row)
this.form = selection.map(item => {
return {
schedule_id:item.id,
order_id:item.orders.id
}
})
console.log(this.form)
},
},
watch:{
isShow(val){
if(val){
this.getList()
}else{
this.form = []
}
}
}
}
</script>

@ -5,8 +5,7 @@
:is-show.sync="isShow"
:width='72'
title="排班"
type="normal"
@reset="pickType = 1,dateStartPick = '',dateEndPick = ''">
type="normal">
<template>
<el-row type="flex" align="middle">
<el-col :span="4" :push="1">
@ -83,7 +82,7 @@
<div>{{timeFormat(date)}}</div>
<template v-if="data.type === 'current-month'">
<template v-if="scheduleCount(data.day)">
<div class="schedule-time" @click="datePick(date,data,2,scheduleCount(data.day)[0])">{{scheduleCount(data.day)[0].nurse_id}} {{timeFormat(scheduleCount(data.day)[0].start_time,'{h}:{m}')}}~{{timeFormat(scheduleCount(data.day)[0].end_time,'{h}:{m}')}}</div>
<div class="schedule-time" @click="datePick(date,data,2,scheduleCount(data.day)[0])">{{scheduleCount(data.day)[0].nurse.name}} {{timeFormat(scheduleCount(data.day)[0].start_time,'{h}:{m}')}}~{{timeFormat(scheduleCount(data.day)[0].end_time,'{h}:{m}')}}</div>
</template>
<template v-else>
<i class="el-icon-plus" style="padding:10px;" @click="datePick(date,data,1)"></i>
@ -175,9 +174,9 @@ export default {
datePick(date,data,type,schedule){
console.log(date,data)
this.date = data.day
if(data.type === 'current-month'){
if(type === 1){
this.date = data.day
this.isShowTime = true
}
if(type === 2){
@ -199,16 +198,6 @@ export default {
this.detail = res.detail
},
datePicked(data,date){
if(this.pickType === 1){
this.dateStartPick = data.day
}
if(this.pickType === 2){
this.dateEndPick = data.day
}
},
},
computed: {
ageComputed() {

@ -7,21 +7,25 @@
<div style="font-weight: 600">{{ date }}</div>
<el-time-picker
size="small"
value-format="yyyy-MM-dd HH:mm:ss"
value-format="HH:mm:ss"
v-model="form.start_time"
arrow-control
:picker-options="{
selectableRange: '00:00:00 - 23:59:59'
}"
placeholder="开始时间">
placeholder="开始时间"
@change="startTimePick">
</el-time-picker>
<el-time-picker
size="small"
value-format="yyyy-MM-dd HH:mm:ss"
value-format="HH:mm:ss"
v-model="form.end_time"
arrow-control
:picker-options="{
selectableRange: '00:00:00 - 23:59:59'
}"
placeholder="结束时间">
placeholder="结束时间"
@change="endTimePick">
</el-time-picker>
</el-form-item>
<el-form-item label="护工选择" prop="nurse_id">
@ -96,7 +100,6 @@ export default {
end_time: '',
schedule_list_skus: []
},
time: [new Date(), new Date()],
rules: {
nurse_id: [
{required: true, message: '请选择护工'}
@ -114,6 +117,15 @@ export default {
}
},
methods: {
startTimePick(e){
this.form.start_time = `${this.date} ${e}`
console.log(this.form)
},
endTimePick(e){
this.form.end_time = `${this.date} ${e}`
console.log(this.form)
},
handleCheckAllChange(val){
this.form.schedule_list_skus = val ? this.skus.map(item => {
return item.sku.id
@ -153,6 +165,7 @@ export default {
isShow(val) {
if (val) {
} else {
this.$emit('update:date','')
this.$refs['elForm'].resetFields()
}
}

Loading…
Cancel
Save