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