调整 基础数据、运力、车船务

This commit is contained in:
2026-09-14 01:49:23 +08:00
parent dbeb174ae2
commit acbc9d3322
12 changed files with 1157 additions and 15 deletions
+21 -1
View File
@@ -143,7 +143,7 @@
maxlength="18"
show-word-limit
placeholder="请输入"
@input="driverForm.idCardNo = String(driverForm.idCardNo || '').toUpperCase()"
@input="handleIdCardInput"
/>
</el-form-item>
</el-col>
@@ -1121,6 +1121,26 @@ export default {
removeDigits(value = '') {
return String(value).replace(/\d/g, '');
},
handleIdCardInput(value) {
const idCardNo = String(value || '').toUpperCase();
this.driverForm.idCardNo = idCardNo;
const idCardInfo = this.parseIdCardInfo(idCardNo);
if (idCardInfo.birthday) {
this.driverForm.birthday = idCardInfo.birthday;
} else {
this.driverForm.birthday = '';
}
if (idCardInfo.gender) {
this.driverForm.gender = idCardInfo.gender;
} else {
this.driverForm.gender = '';
}
if (this.submitAttempted) {
this.$nextTick(() => {
this.$refs.driverForm?.validateField(['idCardNo', 'birthday', 'gender']);
});
}
},
openDriver(row, readonly = false) {
this.readonly = readonly;
this.submitAttempted = false;