Commit 09cd6786 authored by songrui's avatar songrui

工作台日期选择修改

parent b595e781
......@@ -70,6 +70,19 @@
<div class="my-3">居民姓名</div>
<van-field v-model="form.residentName" placeholder="输入居民姓名" maxlength="100"
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>
<CheckBtn :options="store.getDict('CP00124')" v-model:value="form.source" column-2
class="check-btn-workbench"/>
......@@ -127,8 +140,11 @@ export default {
isRefreshDisable: false,
// 搜索弹出框
searchVisible: false,
// 时间选择
dateShow: false,
// 判断对哪一个日期赋值
dateMark: 0,
form: { ...DefaultForm },
rangeDate: [],
}
},
computed: {
......@@ -151,7 +167,6 @@ export default {
},
methods: {
load(loading = true) {
this.dateHandle()
const query = {
pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize,
......@@ -192,6 +207,16 @@ export default {
openSearch() {
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) {
if (!record) return
if (record.residentInfoId == null) {
......@@ -216,16 +241,7 @@ export default {
showToast('操作成功')
}, 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>
......
......@@ -74,6 +74,19 @@
<div class="my-3">居民姓名</div>
<van-field v-model="form.residentName" placeholder="输入居民姓名" maxlength="100"
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>
<CheckBtn :options="store.getDict('CP00124')" v-model:value="form.source" column-2
class="check-btn-workbench"/>
......@@ -142,8 +155,11 @@ export default {
activeTab: 0,
// 搜索弹出框
searchVisible: false,
// 时间选择
dateShow: false,
// 判断对哪一个日期赋值
dateMark: 0,
form: { ...DefaultForm },
rangeDate: [],
}
},
computed: {
......@@ -175,7 +191,6 @@ export default {
},
methods: {
load(loading = true) {
this.dateHandle()
const query = {
pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize,
......@@ -203,7 +218,6 @@ export default {
},
reset() {
this.form = { ...DefaultForm }
this.rangeDate = []
this.search()
},
onMore() {
......@@ -221,6 +235,16 @@ export default {
openSearch() {
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) {
if (!record) return
if (record.residentInfoId == null) {
......@@ -247,15 +271,6 @@ export default {
}, 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>
......
......@@ -80,6 +80,19 @@
class="doc-input">
</van-field>
<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>
<CheckBtn :options="store.getDict('CP00184')" v-model:value="form.referralType" column-2
class="check-btn-workbench"/>
......@@ -142,8 +155,11 @@ export default {
searchVisible: false,
// 单位选择
unitShow: false,
// 时间选择
dateShow: false,
// 判断对哪一个日期赋值
dateMark: 0,
form: { ...DefaultForm },
rangeDate: [],
}
},
computed: {
......@@ -166,7 +182,6 @@ export default {
},
methods: {
load(loading = true) {
this.dateHandle()
const query = {
pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize,
......@@ -206,6 +221,16 @@ export default {
openSearch() {
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) {
if (!record) return
if (record.residentInfoId == null) {
......@@ -230,16 +255,7 @@ export default {
showToast('操作成功')
}, 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>
......
......@@ -87,6 +87,19 @@
<div class="my-3">居民姓名</div>
<van-field v-model="form.residentName" placeholder="输入居民姓名" maxlength="100"
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>
<CheckBtn :options="store.getDict('CP00124')" v-model:value="form.source" column-3
class="check-btn-workbench"/>
......@@ -160,8 +173,11 @@ export default {
activeTab: 0,
// 搜索弹出框
searchVisible: false,
form: { ...DefaultForm },
rangeDate: [],
// 时间选择
dateShow: false,
// 判断对哪一个日期赋值
dateMark: 0,
form: { ...DefaultForm }
}
},
computed: {
......@@ -193,7 +209,6 @@ export default {
},
methods: {
load(loading = true) {
this.dateHandle()
const query = {
pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize,
......@@ -220,7 +235,6 @@ export default {
},
reset() {
this.form = { ...DefaultForm }
this.rangeDate = []
this.search()
},
onMore() {
......@@ -238,6 +252,16 @@ export default {
openSearch() {
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) {
if (!record) return
if (record.residentInfoId == null) {
......@@ -266,16 +290,7 @@ export default {
path: `/doctor/followUp/generalFU/add`,
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>
......
......@@ -64,14 +64,28 @@
<div class="px-4 py-3 grow overflow-y-auto" style="">
<div class="mb-3">身份证号</div>
<van-field v-model="form.idCard" placeholder="请输入身份证号" maxlength="20"
clearable
class="doc-input">
<template #right-icon>
<IdCardScan />
</template>
</van-field>
<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"/>
<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>
<CheckBtn :options="store.getDict('CP00124')" v-model:value="form.source" column-3
class="check-btn-workbench"/>
......@@ -132,8 +146,11 @@ export default {
isRefreshDisable: false,
// 搜索弹出框
searchVisible: false,
form: { ...DefaultForm },
rangeDate: [],
// 时间选择
dateShow: false,
// 判断对哪一个日期赋值
dateMark: 0,
form: { ...DefaultForm }
}
},
computed: {
......@@ -156,7 +173,6 @@ export default {
},
methods: {
load(loading = true) {
this.dateHandle()
const query = {
pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize,
......@@ -182,7 +198,6 @@ export default {
},
reset() {
this.form = { ...DefaultForm }
this.rangeDate = []
this.search()
},
onMore() {
......@@ -196,6 +211,16 @@ export default {
openSearch() {
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) {
if (!record) return
if (record.residentInfoId == null) {
......@@ -208,16 +233,7 @@ export default {
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>
......
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