提交 52084d9e 编写于 作者: 张磊's avatar 张磊

Merge branch 'feat/zl' into 'develop'

change date

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