Browse Source

新增患者相关修改

360view
bianyaqi 2 years ago
parent
commit
735fd08bd4
  1. 383
      src/page-subspecialty/views/modules/formList/laserSurgery.vue
  2. 28
      src/page-subspecialty/views/modules/nurseManagement/reservation/schedule/addPatientOrder.vue
  3. 18
      src/page-subspecialty/views/modules/nurseManagement/reservation/schedule/doctor-schedule.vue
  4. 4
      src/page-subspecialty/views/modules/nurseManagement/reservation/subSetting/addProject.vue
  5. 20
      src/page-subspecialty/views/modules/optometryManagement/dioptric/patient-add-or-update.vue
  6. 28
      src/page-subspecialty/views/modules/outpatientManagement/call/patient-add-or-update.vue
  7. 20
      src/page-subspecialty/views/modules/outpatientManagement/treat/patient-add-or-update.vue

383
src/page-subspecialty/views/modules/formList/laserSurgery.vue

@ -15,106 +15,134 @@
</p> </p>
<!--患者信息--> <!--患者信息-->
<div> <div>
<div class="flex">
<div class="flex a-c item">姓名<el-input v-model="confirmData.patientName" style="flex: 1" /></div>
<div class="flex a-c item">年龄<el-input v-model="confirmData.patientAge" style="flex: 1" /></div>
<div class="flex a-c item">性别<el-input v-model="confirmData.patientSex" style="flex: 1" /></div>
<div class="flex a-c item">登记号<el-input v-model="confirmData.patientId" style="flex: 1" /></div>
<div class="flex m-b">
<div class="flex a-c item">
<div class="label_width">姓名:</div>
<el-input v-model="confirmData.patientName" style="flex: 1" /></div>
<div class="flex a-c item">年龄:<el-input v-model="confirmData.patientAge" style="flex: 1" /></div>
<div class="flex a-c item">性别:<el-input v-model="confirmData.patientSex" style="flex: 1" /></div>
<div class="flex a-c item">登记号:<el-input v-model="confirmData.patientId" style="flex: 1" /></div>
</div> </div>
<div class="flex">
<div class="flex a-c">联系电话<el-input v-model="confirmData.patientPhone" style="flex: 1" /></div>
<div class="flex a-c item">家庭住址<el-input v-model="confirmData.patientAddress" style="flex: 1" /></div>
<div class="flex m-b">
<div class="flex a-c">
<div class="label_width">联系电话:</div>
<el-input v-model="confirmData.patientPhone" style="flex: 1" />
</div>
<div class="flex a-c item">家庭住址:<el-input v-model="confirmData.patientAddress" style="flex: 1" /></div>
</div>
<div class="flex a-c m-b">
<div class="label_width">诊断:</div>
<el-input v-model="confirmData.diagnostic" :autosize="{ minRows: 3, maxRows: 3}" type="textarea" style="flex: 1;border-bottom: 1px solid #8e8c8c" />
</div>
<div class="flex a-c m-b">
<div class="label_width">
治疗眼别:
</div>
<el-select v-model="confirmData.eyeType" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div> </div>
<div class="flex a-c item">诊断<el-input v-model="confirmData.diagnostic" style="flex: 1" /></div>
</div> </div>
<!-- 治疗前--> <!-- 治疗前-->
<div class="subTitle">治疗前</div>
<table class="treatAction">
<thead>
<tr>
<th colspan="2">OD</th>
<th colspan="2">OS</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<div class="flex a-c">视力1<el-input v-model="confirmData.zlqSlOd" style="flex: 1" /></div>
<div class="flex a-c">疾病分期<el-input v-model="confirmData.zlqJbfqOd" style="flex: 1" /></div>
</td>
<td>
<div class="descImg" @click="editImg('OD')">
<div>示意图</div>
<img v-if="confirmData.zlqSytOd" :src="confirmData.zlqSytOd">
</div>
</td>
<td>
<div class="flex a-c">视力2<el-input v-model="confirmData.zlqSlOs" style="flex: 1" /></div>
<div class="flex a-c">疾病分期<el-input v-model="confirmData.zlqJbfqOs" style="flex: 1" /></div>
</td>
<td>
<div class="descImg" @click="editImg('OS')">
<div>示意图</div>
<img v-if="confirmData.zlqSytOs" :src="confirmData.zlqSytOs">
</div>
</td>
</tr>
</tbody>
</table>
<div class="flex m-b">
<div class="label_width">
治疗前:
</div>
<table class="treatAction">
<tbody>
<tr>
<td>
视力
</td>
<td>
疾病分期
</td>
</tr>
<tr>
<td>
<el-input v-model="confirmData.zlqSlOd" style="flex: 1" />
</td>
<td>
<el-input v-model="confirmData.zlqJbfqOd" style="flex: 1" />
</td>
</tr>
</tbody>
</table>
</div>
<!-- 激光治疗--> <!-- 激光治疗-->
<div class="subTitle">激光治疗</div>
<table class="treatAction">
<thead>
<tr>
<th colspan="2">OD</th>
<th colspan="2">OS</th>
</tr>
</thead>
<tbody>
<tr v-for="(item,index) in treatData" :key="index">
<td>
<div class="flex a-c">日期
<el-date-picker
v-model="item.OD.date"
type="date"
value-format="yyyy-MM-dd"
/>
</div>
<div class="flex a-c">次数<el-input v-model="item.OD.order" style="flex: 1" /></div>
<div class="flex a-c">视力<el-input v-model="item.OD.vision" style="flex: 1" /></div>
<div class="flex a-c">光斑大小<el-input v-model="item.OD.flareSize" style="flex: 1" /></div>
<div class="flex a-c">功率<el-input v-model="item.OD.power" style="flex: 1" /></div>
<div class="flex a-c">点数<el-input v-model="item.OD.count" style="flex: 1" /></div>
</td>
<td>
<div class="descImg" @click="editImg('treat-OD',index)">
<div>示意图</div>
<img v-if="item.OD.imgSrc" :src="item.OD.imgSrc">
</div>
</td>
<td>
<div class="flex a-c">日期
<el-date-picker
v-model="item.OS.date"
type="date"
value-format="yyyy-MM-dd"
/>
</div>
<div class="flex a-c">次数<el-input v-model="item.OS.order" style="flex: 1" /></div>
<div class="flex a-c">视力<el-input v-model="item.OS.vision" style="flex: 1" /></div>
<div class="flex a-c">光斑大小<el-input v-model="item.OS.flareSize" style="flex: 1" /></div>
<div class="flex a-c">功率<el-input v-model="item.OS.power" style="flex: 1" /></div>
<div class="flex a-c">点数<el-input v-model="item.OS.count" style="flex: 1" /></div>
</td>
<td>
<div class="descImg" @click="editImg('treat-OS',index)">
<div>示意图</div>
<img v-if="item.OS.imgSrc" :src="item.OS.imgSrc">
</div>
</td>
</tr>
</tbody>
</table>
<div class="flex m-b" style="margin-top: 20px">
<div class="label_width">
激光治疗:
</div>
<table class="treatAction">
<tbody>
<tr>
<td>
次数
</td>
<td>
<el-input v-model="treatData.order" style="flex: 1" />
</td>
</tr>
<tr>
<td>
曝光时间
</td>
<td>
<el-input v-model="treatData.vision" style="flex: 1" />
</td>
</tr>
<tr>
<td>
光斑大小
</td>
<td>
<el-input v-model="treatData.flareSize" style="flex: 1" />
</td>
</tr>
<tr>
<td>
功率
</td>
<td>
<el-input v-model="treatData.power" style="flex: 1" />
</td>
</tr>
<tr>
<td>
点数
</td>
<td>
<el-input v-model="treatData.count" style="flex: 1" />
</td>
</tr>
</tbody>
</table>
<div class="descImg" @click="editImg()">
<div>示意图</div>
<img v-if="treatData.imgSrc" :src="treatData.imgSrc">
</div>
</div>
<div class="flex a-c">
<div class="flex a-c item">
<div class="label_width">操作人:</div>
<el-input v-model="confirmData.operator" style="flex: 1" />
</div>
<div class="flex a-c item">
<div class="label_width">操作时间:</div>
<el-date-picker
v-model="treatData.date"
style="flex: 1"
type="date"
value-format="yyyy-MM-dd"
/>
</div>
</div>
<img-editor ref="imgEditorRef" @fullImgBack="fullImgBack" /> <img-editor ref="imgEditorRef" @fullImgBack="fullImgBack" />
</div> </div>
</div> </div>
@ -145,8 +173,6 @@ export default {
}, },
data() { data() {
return { return {
curType: '',
curIndex: '',
origin: '', origin: '',
confirmData: { confirmData: {
patientAddress: '', patientAddress: '',
@ -158,85 +184,36 @@ export default {
jzNumber: '', jzNumber: '',
diagnostic: '', diagnostic: '',
idList: [], idList: [],
eyeType: '',
// //
zlqSlOd: '', zlqSlOd: '',
zlqJbfqOd: '', zlqJbfqOd: '',
zlqSytOd: '',
zlqSlOs: '',
zlqJbfqOs: '',
zlqSytOs: '',
// //
jgzlCountOd1: '', jgzlCountOd1: '',
jgzlDateOd1: '',
jgzlDsOd1: '', jgzlDsOd1: '',
jgzlGbOd1: '', jgzlGbOd1: '',
jgzlGlOd1: '', jgzlGlOd1: '',
jgzlSlOd1: '', jgzlSlOd1: '',
jgzlSytOd1: ''
operator: '',
operationDate: ''
}, },
// //
treatData: [
{
OD: {
date: '',
order: '',
vision: '',
flareSize: '',
power: '',
count: '',
imgSrc: ''
},
OS: {
date: '',
order: '',
vision: '',
flareSize: '',
power: '',
count: '',
imgSrc: ''
}
},
{
OD: {
date: '',
order: '',
vision: '',
flareSize: '',
power: '',
count: '',
imgSrc: ''
},
OS: {
date: '',
order: '',
vision: '',
flareSize: '',
power: '',
count: '',
imgSrc: ''
}
},
{
OD: {
date: '',
order: '',
vision: '',
flareSize: '',
power: '',
count: '',
imgSrc: ''
},
OS: {
date: '',
order: '',
vision: '',
flareSize: '',
power: '',
count: '',
imgSrc: ''
}
}
]
options: [{
value: 'OD',
label: 'OD'
}, {
value: 'OS',
label: 'OS'
}],
treatData: {
date: '',
order: '',
vision: '',
flareSize: '',
power: '',
count: '',
imgSrc: ''
}
} }
}, },
watch: { watch: {
@ -257,24 +234,12 @@ export default {
this.getConfirmDetail() this.getConfirmDetail()
}, },
methods: { methods: {
editImg(val, index) {
this.curType = val
this.curIndex = index
editImg() {
this.$refs.imgEditorRef.init() this.$refs.imgEditorRef.init()
}, },
fullImgBack(val) { fullImgBack(val) {
switch (this.curType) {
case 'OD':
this.confirmData.zlqSytOd = val
break
case 'OS':
this.confirmData.zlqSytOs = val
break
case 'treat-OD':
this.formData.treatData[this.curIndex].OD.imgSrc = val
break
case 'treat-OS':
this.formData.treatData[this.curIndex].OS.imgSrc = val
if (val) {
this.treatData.imgSrc = val
} }
}, },
getConfirmDetail() { getConfirmDetail() {
@ -290,43 +255,10 @@ export default {
this.confirmData.zlqSlOs = detail.zlqSlOs || '' this.confirmData.zlqSlOs = detail.zlqSlOs || ''
this.confirmData.zlqJbfqOs = detail.zlqJbfqOs || '' this.confirmData.zlqJbfqOs = detail.zlqJbfqOs || ''
this.confirmData.zlqSytOs = detail.zlqSytOs || '' this.confirmData.zlqSytOs = detail.zlqSytOs || ''
//
this.treatData.forEach((item, index) => {
item.OD.date = detail[`jgzlDateOd${index + 1}`]
item.OD.order = detail[`jgzlCountOd${index + 1}`]
item.OD.count = detail[`jgzlDsOd${index + 1}`]
item.OD.vision = detail[`jgzlSlOd${index + 1}`]
item.OD.power = detail[`jgzlGlOd${index + 1}`]
item.OD.flareSize = detail[`jgzlGbOd${index + 1}`]
item.OD.imgSrc = detail[`jgzlSytOd${index + 1}`]
item.OS.date = detail[`jgzlDateOs${index + 1}`]
item.OS.order = detail[`jgzlCountOs${index + 1}`]
item.OS.count = detail[`jgzlDsOs${index + 1}`]
item.OS.vision = detail[`jgzlSlOs${index + 1}`]
item.OS.power = detail[`jgzlGlOs${index + 1}`]
item.OS.flareSize = detail[`jgzlGbOs${index + 1}`]
item.OS.imgSrc = detail[`jgzlSytOs${index + 1}`]
})
}) })
}, },
// //
handleConfirmData() { handleConfirmData() {
this.treatData.forEach((item, index) => {
this.confirmData[`jgzlDateOd${index + 1}`] = item.OD.date
this.confirmData[`jgzlCountOd${index + 1}`] = item.OD.order
this.confirmData[`jgzlDsOd${index + 1}`] = item.OD.count
this.confirmData[`jgzlSlOd${index + 1}`] = item.OD.vision
this.confirmData[`jgzlGlOd${index + 1}`] = item.OD.power
this.confirmData[`jgzlGbOd${index + 1}`] = item.OD.flareSize
this.confirmData[`jgzlSytOd${index + 1}`] = item.OD.imgSrc
this.confirmData[`jgzlDateOS${index + 1}`] = item.OS.date
this.confirmData[`jgzlCountOS${index + 1}`] = item.OS.order
this.confirmData[`jgzlDsOS${index + 1}`] = item.OS.count
this.confirmData[`jgzlSlOS${index + 1}`] = item.OS.vision
this.confirmData[`jgzlGlOS${index + 1}`] = item.OS.power
this.confirmData[`jgzlGbOS${index + 1}`] = item.OS.flareSize
this.confirmData[`jgzlSytOS${index + 1}`] = item.OS.imgSrc
})
}, },
// //
handleSaveTable() { handleSaveTable() {
@ -355,6 +287,11 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.label_width{
width: 100px;
text-align: right;
margin-right: 10px;
}
#laserFunc{ #laserFunc{
padding: 20px; padding: 20px;
} }
@ -373,15 +310,16 @@ export default {
margin-right: 15px; margin-right: 15px;
} }
} }
.subTitle{
text-align: center;
font-size: 16px;
font-weight: 500;
margin: 30px 0 10px 0;
.m-b{
margin-bottom: 10px;
} }
.descImg{ .descImg{
font-size: 12px; font-size: 12px;
height: 140px;
padding: 10px;
flex: 1;
border: 1px solid #ccc;
margin-left: 20px;
height: 200px;
div{ div{
height: 20px; height: 20px;
text-align: left; text-align: left;
@ -392,6 +330,7 @@ export default {
} }
.treatAction{ .treatAction{
width: 100%; width: 100%;
flex: 1;
tr td,tr th{ tr td,tr th{
border: 1px solid #ccc; border: 1px solid #ccc;
padding: 5px; padding: 5px;
@ -416,7 +355,13 @@ export default {
border-radius: 0; border-radius: 0;
padding: 0; padding: 0;
} }
::v-deep .el-textarea__inner{
border: none;
}
::v-deep .el-input__prefix { ::v-deep .el-input__prefix {
display: none; display: none;
} }
::v-deep .el-icon-arrow-up{
display: none;
}
</style> </style>

28
src/page-subspecialty/views/modules/nurseManagement/reservation/schedule/addPatientOrder.vue

@ -81,6 +81,28 @@
placeholder="选择日期时间" placeholder="选择日期时间"
/> />
</el-form-item> </el-form-item>
<!-- <el-form-item label="活动时间" required>-->
<!-- <el-col :span="11">-->
<!-- <el-form-item prop="date1">-->
<!-- <el-date-picker v-model="form.date1" type="date" placeholder="选择日期" style="width: 100%;" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col class="line" style="text-align: center" :span="2">-</el-col>-->
<!-- <el-col :span="11">-->
<!-- <el-form-item prop="date2">-->
<!-- <el-time-select-->
<!-- v-model="form.date2"-->
<!-- :picker-options="{-->
<!-- start: '07:30',-->
<!-- step:'00:15',-->
<!-- end: '13:30'-->
<!-- }"-->
<!-- placeholder="选择时间"-->
<!-- style="width: 100%;"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-form-item>-->
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button v-if="print" v-print="print" size="small">打印</el-button> <el-button v-if="print" v-print="print" size="small">打印</el-button>
@ -123,7 +145,9 @@ export default {
eyeType: '', eyeType: '',
pupilDilate: '', pupilDilate: '',
pupilShrink: '', pupilShrink: '',
date: ''
date: '',
date1: '',
date2: ''
}, },
doctorList: [], doctorList: [],
print: { print: {
@ -155,6 +179,8 @@ export default {
this.form.remark = this.patientDetail.remark this.form.remark = this.patientDetail.remark
this.form.yzOpen = this.patientDetail.yzOpen this.form.yzOpen = this.patientDetail.yzOpen
this.form.date = this.patientDetail.appointDate this.form.date = this.patientDetail.appointDate
this.form.date1 = this.patientDetail.appointDate.split(' ')[0]
this.form.date2 = this.patientDetail.appointDate.split(' ')[1]
this.patientInfo = this.patientDetail this.patientInfo = this.patientDetail
} }
}, },

18
src/page-subspecialty/views/modules/nurseManagement/reservation/schedule/doctor-schedule.vue

@ -411,14 +411,16 @@ export default {
if (res.code === 0) { if (res.code === 0) {
this.pageLoading = false this.pageLoading = false
this.doctorList = res.data this.doctorList = res.data
if (this.curTime===1){
const weekInfoItem = this.doctorList[this.curIndex].weekInfo[this.curWeekInfoIndex]
this.curPatients = weekInfoItem.morning.appointPatients
this.canAdd = weekInfoItem.morning.maxNumber>weekInfoItem.morning.orderNum
}else {
const weekInfoItem = this.doctorList[this.curIndex].weekInfo[this.curWeekInfoIndex]
this.curPatients = weekInfoItem.after.appointPatients
this.canAdd = weekInfoItem.after.maxNumber>weekInfoItem.after.orderNum
if (typeof this.curIndex === 'number'){
if (this.curTime===1){
const weekInfoItem = this.doctorList.length && this.doctorList[this.curIndex].weekInfo[this.curWeekInfoIndex]
this.curPatients = weekInfoItem.morning.appointPatients
this.canAdd = weekInfoItem.morning.maxNumber>weekInfoItem.morning.orderNum
}else {
const weekInfoItem = this.doctorList.length && this.doctorList[this.curIndex].weekInfo[this.curWeekInfoIndex]
this.curPatients = weekInfoItem.after.appointPatients
this.canAdd = weekInfoItem.after.maxNumber>weekInfoItem.after.orderNum
}
} }
} else { } else {
this.pageLoading = false this.pageLoading = false

4
src/page-subspecialty/views/modules/nurseManagement/reservation/subSetting/addProject.vue

@ -17,7 +17,7 @@
v-model="form.workTimeAm" v-model="form.workTimeAm"
:picker-options="{ :picker-options="{
start: '07:30', start: '07:30',
end: '12:00'
end: '13:30'
}" }"
placeholder="选择时间" placeholder="选择时间"
style="width: 100%;" style="width: 100%;"
@ -34,7 +34,7 @@
<el-time-select <el-time-select
v-model="form.workTimePm" v-model="form.workTimePm"
:picker-options="{ :picker-options="{
start: '12:00',
start: '13:30',
end: '21:00' end: '21:00'
}" }"
placeholder="选择时间" placeholder="选择时间"

20
src/page-subspecialty/views/modules/optometryManagement/dioptric/patient-add-or-update.vue

@ -14,7 +14,7 @@
<el-input v-model="dataForm.patientName" placeholder="请输入姓名" /> <el-input v-model="dataForm.patientName" placeholder="请输入姓名" />
</el-form-item> </el-form-item>
<el-form-item label="身份证号:" label-width="120px" prop="patientIdNumber"> <el-form-item label="身份证号:" label-width="120px" prop="patientIdNumber">
<el-input v-model="dataForm.patientIdNumber" placeholder="请输入身份证号 " />
<el-input v-model="dataForm.patientIdNumber" placeholder="请输入身份证号" @change="handleBirth" />
</el-form-item> </el-form-item>
<el-form-item label="出生日期:" label-width="120px" prop="patientBirthday"> <el-form-item label="出生日期:" label-width="120px" prop="patientBirthday">
<el-date-picker <el-date-picker
@ -160,6 +160,14 @@ export default {
} }
callback() callback()
} }
var validataIDNumber = (rule, value, callback) => {
if (value && !isIDNumber(value)) {
return callback(new Error('您输入的身份证格式不正确'))
} else if (!value) {
return callback(new Error('请输入身份证号'))
}
callback()
}
return { return {
patientId: [ patientId: [
{ required: true, message: '请输入登记号', trigger: 'blur' } { required: true, message: '请输入登记号', trigger: 'blur' }
@ -168,7 +176,7 @@ export default {
{ required: true, message: '请输入患者姓名', trigger: 'blur' } { required: true, message: '请输入患者姓名', trigger: 'blur' }
], ],
patientIdNumber: [ patientIdNumber: [
{ required: true, message: '请输入患者身份证号', trigger: 'blur' }
{ validator: validataIDNumber, trigger: 'blur' }
], ],
sgDoctorId: [ sgDoctorId: [
{ required: true, message: '请选择视光医师', trigger: 'blur' } { required: true, message: '请选择视光医师', trigger: 'blur' }
@ -198,6 +206,14 @@ export default {
} }
}) })
}, },
handleBirth(value) {
if (value) {
const year = value.substr(6, 4)
const month = value.substr(10, 2)
const day = value.substr(12, 2)
this.dataForm.patientBirthday = `${year}-${month}-${day}`
}
},
// //
getDoctorList(val) { getDoctorList(val) {
this.$http.get('/sys/user', { params: { position: val }}).then(data => { this.$http.get('/sys/user', { params: { position: val }}).then(data => {

28
src/page-subspecialty/views/modules/outpatientManagement/call/patient-add-or-update.vue

@ -14,7 +14,7 @@
<el-input v-model="dataForm.patientName" placeholder="请输入姓名" /> <el-input v-model="dataForm.patientName" placeholder="请输入姓名" />
</el-form-item> </el-form-item>
<el-form-item label="身份证号:" label-width="120px" prop="patientIdNumber"> <el-form-item label="身份证号:" label-width="120px" prop="patientIdNumber">
<el-input v-model="dataForm.patientIdNumber" placeholder="请输入身份证号 " />
<el-input v-model="dataForm.patientIdNumber" placeholder="请输入身份证号 " @change="handleBirth" />
</el-form-item> </el-form-item>
<el-form-item label="出生日期:" label-width="120px" prop="patientBirthday"> <el-form-item label="出生日期:" label-width="120px" prop="patientBirthday">
<el-date-picker <el-date-picker
@ -160,14 +160,14 @@ export default {
} }
callback() callback()
} }
// var validataIDNumber = (rule, value, callback) => {
// if (value && !isIDNumber(value)) {
// return callback(new Error(''))
// } else if (!value) {
// return callback(new Error(''))
// }
// callback()
// }
var validataIDNumber = (rule, value, callback) => {
if (value && !isIDNumber(value)) {
return callback(new Error('您输入的身份证格式不正确'))
} else if (!value) {
return callback(new Error('请输入身份证号'))
}
callback()
}
return { return {
patientId: [ patientId: [
{ required: true, message: '请输入登记号', trigger: 'blur' } { required: true, message: '请输入登记号', trigger: 'blur' }
@ -176,7 +176,7 @@ export default {
{ required: true, message: '请输入患者姓名', trigger: 'blur' } { required: true, message: '请输入患者姓名', trigger: 'blur' }
], ],
patientIdNumber: [ patientIdNumber: [
{ required: true, message: '请输入患者身份证号', trigger: 'blur' }
{ validator: validataIDNumber, trigger: 'blur' }
], ],
sgDoctorId: [ sgDoctorId: [
{ required: true, message: '请选择视光医师', trigger: 'blur' } { required: true, message: '请选择视光医师', trigger: 'blur' }
@ -206,6 +206,14 @@ export default {
} }
}) })
}, },
handleBirth(value) {
if (value) {
const year = value.substr(6, 4)
const month = value.substr(10, 2)
const day = value.substr(12, 2)
this.dataForm.patientBirthday = `${year}-${month}-${day}`
}
},
// //
getDoctorList(val) { getDoctorList(val) {
this.$http.get('/sys/user', { params: { position: val }}).then(data => { this.$http.get('/sys/user', { params: { position: val }}).then(data => {

20
src/page-subspecialty/views/modules/outpatientManagement/treat/patient-add-or-update.vue

@ -14,7 +14,7 @@
<el-input v-model="dataForm.patientName" placeholder="请输入姓名" /> <el-input v-model="dataForm.patientName" placeholder="请输入姓名" />
</el-form-item> </el-form-item>
<el-form-item label="身份证号:" label-width="120px" prop="patientIdNumber"> <el-form-item label="身份证号:" label-width="120px" prop="patientIdNumber">
<el-input v-model="dataForm.patientIdNumber" placeholder="请输入身份证号 " />
<el-input v-model="dataForm.patientIdNumber" placeholder="请输入身份证号" @change="handleBirth" />
</el-form-item> </el-form-item>
<el-form-item label="出生日期:" label-width="120px" prop="patientBirthday"> <el-form-item label="出生日期:" label-width="120px" prop="patientBirthday">
<el-date-picker <el-date-picker
@ -156,6 +156,14 @@ export default {
} }
callback() callback()
} }
var validataIDNumber = (rule, value, callback) => {
if (value && !isIDNumber(value)) {
return callback(new Error('您输入的身份证格式不正确'))
} else if (!value) {
return callback(new Error('请输入身份证号'))
}
callback()
}
return { return {
patientId: [ patientId: [
{ required: true, message: '请输入登记号', trigger: 'blur' } { required: true, message: '请输入登记号', trigger: 'blur' }
@ -164,7 +172,7 @@ export default {
{ required: true, message: '请输入患者姓名', trigger: 'blur' } { required: true, message: '请输入患者姓名', trigger: 'blur' }
], ],
patientIdNumber: [ patientIdNumber: [
{ required: true, message: '请输入患者身份证号', trigger: 'blur' }
{ validator: validataIDNumber, trigger: 'blur' }
], ],
sgDoctorId: [ sgDoctorId: [
{ required: true, message: '请选择视光医师', trigger: 'blur' } { required: true, message: '请选择视光医师', trigger: 'blur' }
@ -194,6 +202,14 @@ export default {
} }
}) })
}, },
handleBirth(value) {
if (value) {
const year = value.substr(6, 4)
const month = value.substr(10, 2)
const day = value.substr(12, 2)
this.dataForm.patientBirthday = `${year}-${month}-${day}`
}
},
// //
getDoctorList(val) { getDoctorList(val) {
this.$http.get('/sys/user', { params: { position: val }}).then(data => { this.$http.get('/sys/user', { params: { position: val }}).then(data => {

Loading…
Cancel
Save