Commit 09cd6786 authored by songrui's avatar songrui

工作台日期选择修改

parent b595e781
...@@ -70,6 +70,19 @@ ...@@ -70,6 +70,19 @@
<div class="my-3">居民姓名</div> <div class="my-3">居民姓名</div>
<van-field v-model="form.residentName" placeholder="输入居民姓名" maxlength="100" <van-field v-model="form.residentName" placeholder="输入居民姓名" maxlength="100"
class="doc-input"/> class="doc-input"/>
<div class="my-3">初筛日期</div>
<div class="flex items-center">
<van-field v-model="form.startDate" placeholder="开始日期" readonly
class="doc-input"
@click="() => { dateShow = true, dateMark = 1 }"/>
<span class="px-2">~</span>
<van-field v-model="form.endDate" placeholder="结束日期" readonly
class="doc-input"
@click="() => { dateShow = true, dateMark = 2 }"/>
</div>
<van-popup v-model:show="dateShow" position="bottom">
<van-date-picker @confirm="onDateConfirm" @cancel="dateShow = false" />
</van-popup>
<div class="my-3">数据来源</div> <div class="my-3">数据来源</div>
<CheckBtn :options="store.getDict('CP00124')" v-model:value="form.source" column-2 <CheckBtn :options="store.getDict('CP00124')" v-model:value="form.source" column-2
class="check-btn-workbench"/> class="check-btn-workbench"/>
...@@ -127,8 +140,11 @@ export default { ...@@ -127,8 +140,11 @@ export default {
isRefreshDisable: false, isRefreshDisable: false,
// 搜索弹出框 // 搜索弹出框
searchVisible: false, searchVisible: false,
// 时间选择
dateShow: false,
// 判断对哪一个日期赋值
dateMark: 0,
form: { ...DefaultForm }, form: { ...DefaultForm },
rangeDate: [],
} }
}, },
computed: { computed: {
...@@ -151,7 +167,6 @@ export default { ...@@ -151,7 +167,6 @@ export default {
}, },
methods: { methods: {
load(loading = true) { load(loading = true) {
this.dateHandle()
const query = { const query = {
pageIndex: this.pagination.pageIndex, pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize, pageSize: this.pagination.pageSize,
...@@ -192,6 +207,16 @@ export default { ...@@ -192,6 +207,16 @@ export default {
openSearch() { openSearch() {
this.searchVisible = true this.searchVisible = true
}, },
onDateConfirm({ selectedValues }) {
const result = selectedValues.join('-')
if (this.dateMark === 1) {
this.form.startDate = result
} else if (this.dateMark === 2) {
this.form.endDate = result
}
this.dateShow = false
this.dateMark = 0
},
toDetail(record) { toDetail(record) {
if (!record) return if (!record) return
if (record.residentInfoId == null) { if (record.residentInfoId == null) {
...@@ -216,16 +241,7 @@ export default { ...@@ -216,16 +241,7 @@ export default {
showToast('操作成功') showToast('操作成功')
}, 800); }, 800);
}) })
},
dateHandle() {
if (this.rangeDate && this.rangeDate.length) {
this.form.startDate = this.rangeDate[0]
this.form.endDate = this.rangeDate[1]
return
} }
this.form.startDate = undefined
this.form.endDate = undefined
},
} }
} }
</script> </script>
......
...@@ -74,6 +74,19 @@ ...@@ -74,6 +74,19 @@
<div class="my-3">居民姓名</div> <div class="my-3">居民姓名</div>
<van-field v-model="form.residentName" placeholder="输入居民姓名" maxlength="100" <van-field v-model="form.residentName" placeholder="输入居民姓名" maxlength="100"
class="doc-input"/> class="doc-input"/>
<div class="my-3">复筛日期</div>
<div class="flex items-center">
<van-field v-model="form.startDate" placeholder="开始日期" readonly
class="doc-input"
@click="() => { dateShow = true, dateMark = 1 }"/>
<span class="px-2">~</span>
<van-field v-model="form.endDate" placeholder="结束日期" readonly
class="doc-input"
@click="() => { dateShow = true, dateMark = 2 }"/>
</div>
<van-popup v-model:show="dateShow" position="bottom">
<van-date-picker @confirm="onDateConfirm" @cancel="dateShow = false" />
</van-popup>
<div class="my-3">数据来源</div> <div class="my-3">数据来源</div>
<CheckBtn :options="store.getDict('CP00124')" v-model:value="form.source" column-2 <CheckBtn :options="store.getDict('CP00124')" v-model:value="form.source" column-2
class="check-btn-workbench"/> class="check-btn-workbench"/>
...@@ -142,8 +155,11 @@ export default { ...@@ -142,8 +155,11 @@ export default {
activeTab: 0, activeTab: 0,
// 搜索弹出框 // 搜索弹出框
searchVisible: false, searchVisible: false,
// 时间选择
dateShow: false,
// 判断对哪一个日期赋值
dateMark: 0,
form: { ...DefaultForm }, form: { ...DefaultForm },
rangeDate: [],
} }
}, },
computed: { computed: {
...@@ -175,7 +191,6 @@ export default { ...@@ -175,7 +191,6 @@ export default {
}, },
methods: { methods: {
load(loading = true) { load(loading = true) {
this.dateHandle()
const query = { const query = {
pageIndex: this.pagination.pageIndex, pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize, pageSize: this.pagination.pageSize,
...@@ -203,7 +218,6 @@ export default { ...@@ -203,7 +218,6 @@ export default {
}, },
reset() { reset() {
this.form = { ...DefaultForm } this.form = { ...DefaultForm }
this.rangeDate = []
this.search() this.search()
}, },
onMore() { onMore() {
...@@ -221,6 +235,16 @@ export default { ...@@ -221,6 +235,16 @@ export default {
openSearch() { openSearch() {
this.searchVisible = true this.searchVisible = true
}, },
onDateConfirm({ selectedValues }) {
const result = selectedValues.join('-')
if (this.dateMark === 1) {
this.form.startDate = result
} else if (this.dateMark === 2) {
this.form.endDate = result
}
this.dateShow = false
this.dateMark = 0
},
toDetail(record) { toDetail(record) {
if (!record) return if (!record) return
if (record.residentInfoId == null) { if (record.residentInfoId == null) {
...@@ -247,15 +271,6 @@ export default { ...@@ -247,15 +271,6 @@ export default {
}, 800); }, 800);
}) })
}, },
dateHandle() {
if (this.rangeDate && this.rangeDate.length) {
this.form.startDate = this.rangeDate[0]
this.form.endDate = this.rangeDate[1]
return
}
this.form.startDate = undefined
this.form.endDate = undefined
},
} }
} }
</script> </script>
......
...@@ -80,6 +80,19 @@ ...@@ -80,6 +80,19 @@
class="doc-input"> class="doc-input">
</van-field> </van-field>
<DocUnit v-model:show='unitShow' v-model:value='form.outUnitId' @change='e => form._unitName = e.unitName'/> <DocUnit v-model:show='unitShow' v-model:value='form.outUnitId' @change='e => form._unitName = e.unitName'/>
<div class="my-3">创建日期</div>
<div class="flex items-center">
<van-field v-model="form.startDate" placeholder="开始日期" readonly
class="doc-input"
@click="() => { dateShow = true, dateMark = 1 }"/>
<span class="px-2">~</span>
<van-field v-model="form.endDate" placeholder="结束日期" readonly
class="doc-input"
@click="() => { dateShow = true, dateMark = 2 }"/>
</div>
<van-popup v-model:show="dateShow" position="bottom">
<van-date-picker @confirm="onDateConfirm" @cancel="dateShow = false" />
</van-popup>
<div class="my-3">转诊类型</div> <div class="my-3">转诊类型</div>
<CheckBtn :options="store.getDict('CP00184')" v-model:value="form.referralType" column-2 <CheckBtn :options="store.getDict('CP00184')" v-model:value="form.referralType" column-2
class="check-btn-workbench"/> class="check-btn-workbench"/>
...@@ -142,8 +155,11 @@ export default { ...@@ -142,8 +155,11 @@ export default {
searchVisible: false, searchVisible: false,
// 单位选择 // 单位选择
unitShow: false, unitShow: false,
// 时间选择
dateShow: false,
// 判断对哪一个日期赋值
dateMark: 0,
form: { ...DefaultForm }, form: { ...DefaultForm },
rangeDate: [],
} }
}, },
computed: { computed: {
...@@ -166,7 +182,6 @@ export default { ...@@ -166,7 +182,6 @@ export default {
}, },
methods: { methods: {
load(loading = true) { load(loading = true) {
this.dateHandle()
const query = { const query = {
pageIndex: this.pagination.pageIndex, pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize, pageSize: this.pagination.pageSize,
...@@ -206,6 +221,16 @@ export default { ...@@ -206,6 +221,16 @@ export default {
openSearch() { openSearch() {
this.searchVisible = true this.searchVisible = true
}, },
onDateConfirm({ selectedValues }) {
const result = selectedValues.join('-')
if (this.dateMark === 1) {
this.form.startDate = result
} else if (this.dateMark === 2) {
this.form.endDate = result
}
this.dateShow = false
this.dateMark = 0
},
toDetail(record) { toDetail(record) {
if (!record) return if (!record) return
if (record.residentInfoId == null) { if (record.residentInfoId == null) {
...@@ -230,16 +255,7 @@ export default { ...@@ -230,16 +255,7 @@ export default {
showToast('操作成功') showToast('操作成功')
}, 800); }, 800);
}) })
},
dateHandle() {
if (this.rangeDate && this.rangeDate.length) {
this.form.startDate = this.rangeDate[0]
this.form.endDate = this.rangeDate[1]
return
} }
this.form.startDate = undefined
this.form.endDate = undefined
},
} }
} }
</script> </script>
......
...@@ -87,6 +87,19 @@ ...@@ -87,6 +87,19 @@
<div class="my-3">居民姓名</div> <div class="my-3">居民姓名</div>
<van-field v-model="form.residentName" placeholder="输入居民姓名" maxlength="100" <van-field v-model="form.residentName" placeholder="输入居民姓名" maxlength="100"
class="doc-input"/> class="doc-input"/>
<div class="my-3">下次随访日期</div>
<div class="flex items-center">
<van-field v-model="form.nextVisitDateStart" placeholder="开始日期" readonly
class="doc-input"
@click="() => { dateShow = true, dateMark = 1 }"/>
<span class="px-2">~</span>
<van-field v-model="form.nextVisitDateEnd" placeholder="结束日期" readonly
class="doc-input"
@click="() => { dateShow = true, dateMark = 2 }"/>
</div>
<van-popup v-model:show="dateShow" position="bottom">
<van-date-picker @confirm="onDateConfirm" @cancel="dateShow = false" />
</van-popup>
<div class="my-3">数据来源</div> <div class="my-3">数据来源</div>
<CheckBtn :options="store.getDict('CP00124')" v-model:value="form.source" column-3 <CheckBtn :options="store.getDict('CP00124')" v-model:value="form.source" column-3
class="check-btn-workbench"/> class="check-btn-workbench"/>
...@@ -160,8 +173,11 @@ export default { ...@@ -160,8 +173,11 @@ export default {
activeTab: 0, activeTab: 0,
// 搜索弹出框 // 搜索弹出框
searchVisible: false, searchVisible: false,
form: { ...DefaultForm }, // 时间选择
rangeDate: [], dateShow: false,
// 判断对哪一个日期赋值
dateMark: 0,
form: { ...DefaultForm }
} }
}, },
computed: { computed: {
...@@ -193,7 +209,6 @@ export default { ...@@ -193,7 +209,6 @@ export default {
}, },
methods: { methods: {
load(loading = true) { load(loading = true) {
this.dateHandle()
const query = { const query = {
pageIndex: this.pagination.pageIndex, pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize, pageSize: this.pagination.pageSize,
...@@ -220,7 +235,6 @@ export default { ...@@ -220,7 +235,6 @@ export default {
}, },
reset() { reset() {
this.form = { ...DefaultForm } this.form = { ...DefaultForm }
this.rangeDate = []
this.search() this.search()
}, },
onMore() { onMore() {
...@@ -238,6 +252,16 @@ export default { ...@@ -238,6 +252,16 @@ export default {
openSearch() { openSearch() {
this.searchVisible = true this.searchVisible = true
}, },
onDateConfirm({ selectedValues }) {
const result = selectedValues.join('-')
if (this.dateMark === 1) {
this.form.nextVisitDateStart = result
} else if (this.dateMark === 2) {
this.form.nextVisitDateEnd = result
}
this.dateShow = false
this.dateMark = 0
},
toDetail(record) { toDetail(record) {
if (!record) return if (!record) return
if (record.residentInfoId == null) { if (record.residentInfoId == null) {
...@@ -266,16 +290,7 @@ export default { ...@@ -266,16 +290,7 @@ export default {
path: `/doctor/followUp/generalFU/add`, path: `/doctor/followUp/generalFU/add`,
query: {...others} query: {...others}
}) })
},
dateHandle() {
if (this.rangeDate && this.rangeDate.length) {
this.form.nextVisitDateStart = this.rangeDate[0]
this.form.nextVisitDateEnd = this.rangeDate[1]
return
} }
this.form.nextVisitDateStart = undefined
this.form.nextVisitDateEnd = undefined
},
} }
} }
</script> </script>
......
...@@ -64,14 +64,28 @@ ...@@ -64,14 +64,28 @@
<div class="px-4 py-3 grow overflow-y-auto" style=""> <div class="px-4 py-3 grow overflow-y-auto" style="">
<div class="mb-3">身份证号</div> <div class="mb-3">身份证号</div>
<van-field v-model="form.idCard" placeholder="请输入身份证号" maxlength="20" <van-field v-model="form.idCard" placeholder="请输入身份证号" maxlength="20"
clearable
class="doc-input"> class="doc-input">
<template #right-icon> <template #right-icon>
<IdCardScan /> <IdCardScan />
</template> </template>
</van-field> </van-field>
<div class="my-3">居民姓名</div> <div class="my-3">居民姓名</div>
<van-field v-model="form.patientName" placeholder="输入居民姓名" maxlength="100" <van-field v-model="form.patientName" placeholder="输入居民姓名" maxlength="100" clearable
class="doc-input"/> class="doc-input"/>
<div class="my-3">服务日期</div>
<div class="flex items-center">
<van-field v-model="form.startDate" placeholder="开始日期" readonly
class="doc-input"
@click="() => { dateShow = true, dateMark = 1 }"/>
<span class="px-2">~</span>
<van-field v-model="form.endDate" placeholder="结束日期" readonly
class="doc-input"
@click="() => { dateShow = true, dateMark = 2 }"/>
</div>
<van-popup v-model:show="dateShow" position="bottom">
<van-date-picker @confirm="onDateConfirm" @cancel="dateShow = false" />
</van-popup>
<div class="my-3">数据来源</div> <div class="my-3">数据来源</div>
<CheckBtn :options="store.getDict('CP00124')" v-model:value="form.source" column-3 <CheckBtn :options="store.getDict('CP00124')" v-model:value="form.source" column-3
class="check-btn-workbench"/> class="check-btn-workbench"/>
...@@ -132,8 +146,11 @@ export default { ...@@ -132,8 +146,11 @@ export default {
isRefreshDisable: false, isRefreshDisable: false,
// 搜索弹出框 // 搜索弹出框
searchVisible: false, searchVisible: false,
form: { ...DefaultForm }, // 时间选择
rangeDate: [], dateShow: false,
// 判断对哪一个日期赋值
dateMark: 0,
form: { ...DefaultForm }
} }
}, },
computed: { computed: {
...@@ -156,7 +173,6 @@ export default { ...@@ -156,7 +173,6 @@ export default {
}, },
methods: { methods: {
load(loading = true) { load(loading = true) {
this.dateHandle()
const query = { const query = {
pageIndex: this.pagination.pageIndex, pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize, pageSize: this.pagination.pageSize,
...@@ -182,7 +198,6 @@ export default { ...@@ -182,7 +198,6 @@ export default {
}, },
reset() { reset() {
this.form = { ...DefaultForm } this.form = { ...DefaultForm }
this.rangeDate = []
this.search() this.search()
}, },
onMore() { onMore() {
...@@ -196,6 +211,16 @@ export default { ...@@ -196,6 +211,16 @@ export default {
openSearch() { openSearch() {
this.searchVisible = true this.searchVisible = true
}, },
onDateConfirm({ selectedValues }) {
const result = selectedValues.join('-')
if (this.dateMark === 1) {
this.form.startDate = result
} else if (this.dateMark === 2) {
this.form.endDate = result
}
this.dateShow = false
this.dateMark = 0
},
toDetail(record) { toDetail(record) {
if (!record) return if (!record) return
if (record.residentInfoId == null) { if (record.residentInfoId == null) {
...@@ -208,16 +233,7 @@ export default { ...@@ -208,16 +233,7 @@ export default {
residentInfoId: record.residentInfoId residentInfoId: record.residentInfoId
} }
}) })
},
dateHandle() {
if (this.rangeDate && this.rangeDate.length) {
this.form.startDate = this.rangeDate[0]
this.form.endDate = this.rangeDate[1]
return
} }
this.form.startDate = undefined
this.form.endDate = undefined
},
} }
} }
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment