提交 1b0c6b93 编写于 作者: 张磊's avatar 张磊

change date

上级 c2a97e02
...@@ -57,13 +57,12 @@ ...@@ -57,13 +57,12 @@
<el-input v-model="formData.outsideDoctor" placeholder="请输入外部医生姓名" class="set-width" style="width: 135%;"></el-input> <el-input v-model="formData.outsideDoctor" placeholder="请输入外部医生姓名" class="set-width" style="width: 135%;"></el-input>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item label="接诊意向时间"> <el-form-item label="问诊时间" class="required-label">
<el-col :span="15"> <el-col :span="15">
<div @click="openDiagnosisStartTimeDialog" class="set-width grey-bg" style="width: 100%;"> <div @click="openDiagnosisStartTimeDialog" class="set-width grey-bg" style="width: 100%;">
<i class="el-icon-alarm-clock"></i> <i class="el-icon-alarm-clock"></i>
<span v-if="startTimeValue === ''">接诊开始时间</span> <span v-if="startTimeValue === ''">请选择问诊时间</span>
<span v-else>{{dayFormatWithoutSecond(startTimeValue)}} -- {{dayFormatWithoutSecond(endTimeValue)}}</span> <span v-else>{{dayFormatWithoutSecond(startTimeValue)}} -- {{dayFormatWithoutSecond(endTimeValue)}}</span>
</div> </div>
</el-col> </el-col>
</el-form-item> </el-form-item>
...@@ -85,8 +84,7 @@ ...@@ -85,8 +84,7 @@
</el-dialog> </el-dialog>
<el-dialog <el-dialog
title="问诊开始时间" title="问诊开始时间"
:visible.sync="diagnosisStartTimeDialog" @close="cancelDiagnosisStartTimeDialog" :visible.sync="diagnosisStartTimeDialog"
@open="openDiagnosisStartTimeDialog"
> >
<div class="startTime-wrap"> <div class="startTime-wrap">
<div class="line-wrap"> <div class="line-wrap">
...@@ -131,8 +129,8 @@ ...@@ -131,8 +129,8 @@
</div> </div>
</div> </div>
<div class="startTime-footer" style="text-align: center;"> <div class="startTime-footer" style="text-align: center;">
<el-button @click="cancelDiagnosisStartTimeDialog">取 消</el-button> <el-button @click="startTimeConfirm('cancel')">取 消</el-button>
<el-button type="primary" @click="startTimeConfirm" :disabled="isClick">确定</el-button> <el-button type="primary" @click="startTimeConfirm('submit')" :disabled="isClick">确定</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
...@@ -181,7 +179,7 @@ export default { ...@@ -181,7 +179,7 @@ export default {
receptionBeginTime:"", receptionBeginTime:"",
receptionEndTime:'', receptionEndTime:'',
bizType:'', bizType:'',
diagnoseChannel:'' diagnoseChannel:1,
}, },
doctorList:[], doctorList:[],
rangeTime:'', rangeTime:'',
...@@ -233,6 +231,14 @@ export default { ...@@ -233,6 +231,14 @@ export default {
methods: { methods: {
confirm() { confirm() {
this.$refs.setForm.validate((valid) => { this.$refs.setForm.validate((valid) => {
if(!this.startTimeValue || !this.endTimeValue){
this.$message({
message: "请选择问诊时间",
type: "warning",
duration: 1000,
});
return false;
}
if (valid) { if (valid) {
let req = null; let req = null;
if(this.formData.receptionName == "站外医生" || this.formData.receptionName == "云鹊医助"){ if(this.formData.receptionName == "站外医生" || this.formData.receptionName == "云鹊医助"){
...@@ -297,6 +303,7 @@ export default { ...@@ -297,6 +303,7 @@ export default {
this.formData.doctorHospital = "" this.formData.doctorHospital = ""
this.formData.doctorDepartment = "" this.formData.doctorDepartment = ""
this.formData.doctorMobile = "" this.formData.doctorMobile = ""
// this.formData.diagnoseChannel = 1
this.doctorChanged(this.doctorId) this.doctorChanged(this.doctorId)
}, },
doctorChanged(value) { doctorChanged(value) {
...@@ -331,20 +338,32 @@ export default { ...@@ -331,20 +338,32 @@ export default {
openDiagnosisStartTimeDialog (){ openDiagnosisStartTimeDialog (){
this.diagnosisStartTimeDialog = true; this.diagnosisStartTimeDialog = true;
}, },
cancelDiagnosisStartTimeDialog () { startTimeConfirm(isCancle) {
console.log('isCancle-', isCancle)
this.diagnosisStartTimeDialog = false; if(isCancle == 'cancel'){
}, this.startTimeValue = '';
startTimeConfirm() { this.endTimeValue = '';
if(String(this.startTimeValue).trim() === '' || String(this.timeRange).trim() === ''){ this.timeRange = '';
this.$message({ }
message: "请选择接诊开始时间", if(isCancle == 'submit'){
type: "warning", if(String(this.startTimeValue).trim() === '' || !this.startTimeValue){
duration: 1000, this.$message({
}); message: "请选择问诊开始时间",
return false; type: "warning",
duration: 1000,
});
return false;
}
if(String(this.timeRange).trim() === ''){
this.$message({
message: "请选择问诊时长",
type: "warning",
duration: 1000,
});
return false;
}
this.endTimeValue = dayjs(this.startTimeValue).add(this.timeRange, 'minute').format('YYYY-MM-DD HH:mm:ss');
} }
this.endTimeValue = dayjs(this.startTimeValue).add(this.timeRange, 'minute').format('YYYY-MM-DD HH:mm:ss');
this.diagnosisStartTimeDialog = false; this.diagnosisStartTimeDialog = false;
}, },
dayFormat (v){ dayFormat (v){
...@@ -357,12 +376,14 @@ export default { ...@@ -357,12 +376,14 @@ export default {
return dayjs(v).format('YYYY-MM-DD HH:mm'); return dayjs(v).format('YYYY-MM-DD HH:mm');
}, },
timeRangeChange (v) { timeRangeChange (v) {
console.log('---v', v);
if(this.startTimeValue && v){ if(this.startTimeValue && v){
this.endTimeValue = dayjs(this.startTimeValue).add(v, 'minute').format('YYYY-MM-DD HH:mm:ss'); this.endTimeValue = dayjs(this.startTimeValue).add(v, 'minute').format('YYYY-MM-DD HH:mm:ss');
} }
}, },
startTimeChange (v) { startTimeChange (v) {
if(!v){
this.endTimeValue = '';
}
if(this.timeRange && v){ if(this.timeRange && v){
this.endTimeValue = dayjs(v).add(this.timeRange, 'minute').format('YYYY-MM-DD HH:mm:ss'); this.endTimeValue = dayjs(v).add(this.timeRange, 'minute').format('YYYY-MM-DD HH:mm:ss');
} }
...@@ -378,14 +399,13 @@ export default { ...@@ -378,14 +399,13 @@ export default {
} }
.grey-bg{ .grey-bg{
padding: 0px 15px; padding: 0px 15px;
//background-color: #F5F7FA;
color: rgb(96, 98, 102); color: rgb(96, 98, 102);
cursor: not-allowed;
height: 28px; height: 28px;
line-height: 28px; line-height: 28px;
border-radius: 4px; border-radius: 4px;
border: 1px solid #DCDFE6; border: 1px solid #DCDFE6;
font-size: 12px; font-size: 12px;
cursor: pointer;
} }
.startTime-wrap{ .startTime-wrap{
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册