This commit is contained in:
jiask 2025-12-18 09:01:39 +08:00
parent 9743f82248
commit 2f9d908e07
1 changed files with 41 additions and 9 deletions

View File

@ -218,10 +218,10 @@
<el-row>
<el-col :span="12">
<el-form-item label="姓名" prop="name">
<el-input v-model="baseForm.name" readonly="true" placeholder="请选择" maxlength="30" clearable/>
<el-input style="background-color;:#E7EAEE" v-model="baseForm.name" readonly="true" placeholder="请选择" maxlength="30" clearable/>
</el-form-item>
</el-col>
<el-col el-col :span="12" v-if="baseForm.deptId !== 0">
<el-col el-col :span="12" v-if="baseForm.deptId !== 0&&!isUpdate">
<el-form-item label="">
<el-button
type="success"
@ -244,14 +244,14 @@
</el-col>
<el-col :span="12">
<el-form-item label="手机号码" prop="phone">
<el-input v-model="baseForm.phone" placeholder="请输入" maxlength="30" readonly="true" />
<el-input style="background-color:#E7EAEE" v-model="baseForm.phone" placeholder="请输入" maxlength="30" readonly="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="身份证号" prop="idNumber">
<el-input v-model="baseForm.idNumber" placeholder="请输入" maxlength="30" readonly="true"/>
<el-input style="background-color:#E7EAEE" v-model="baseForm.idNumber" placeholder="请输入" maxlength="30" readonly="true"/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -297,6 +297,8 @@
v-model="baseForm.issueDay"
type="date"
placeholder="选择日期"
:picker-options="pickerOptionsIssueLifespan"
@focus="issueDayDateFocus"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
@ -435,6 +437,7 @@
components: { Treeselect },
data() {
return {
isUpdate:false,
//
loading: true,
//
@ -582,11 +585,10 @@
},
pickerOptionsToday: {
disabledDate(time) {
//
const today = new Date();
today.setHours(0, 0, 0, 0); // 00:00:00
//
return time.getTime() < today.getTime();
const today = new Date();
today.setHours(0, 0, 0, 0); // 00:00:00
//
return time.getTime() < today.getTime();
}
},
pickerOptionsStart: {
@ -599,6 +601,20 @@
return time.getTime() < today.getTime();
}
},
pickerOptionsIssueLifespan: {
disabledDate(time) {
//
const startTime=this.baseForm.issueLifespan;
if (!startTime){
return true;
}else{
const today = new Date(startTime);
today.setHours(0, 0, 0, 0); // 00:00:00
//
return time.getTime() > today.getTime();
}
},
},
pickerOptionsIssueDay:{
disabledDate(time) {
//
@ -673,6 +689,20 @@
},
};
},
issueDayDateFocus(){
let startTime = this.baseForm.issueLifespan;
let that = this;
that.pickerOptionsIssueLifespan = {
disabledDate(time) {
//
const startTime=that.baseForm.issueLifespan;
const today = new Date(startTime);
today.setHours(0, 0, 0, 0); // 00:00:00
//
return time.getTime() > today.getTime();
},
};
},
handleRadioChange(val){
if(val==1){
this.userNameFlage=true;
@ -800,6 +830,7 @@
handleAdd() {
this.reset();
this.open = true;
this.isUpdate=false;
this.isReadOnly=false;
this.title = "新增";
listDept().then((response) => {
@ -829,6 +860,7 @@
handleUpdate(row) {
this.reset();
this.open = true;
this.isUpdate=true;
this.isReadOnly=true;
this.baseForm = Object.assign({}, row)
listDept().then((response) => {