调整基础数据模块
This commit is contained in:
@@ -195,6 +195,17 @@
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #contactPhone-form>
|
||||
<el-input
|
||||
v-model="form.contactPhone"
|
||||
:disabled="dialogReadonly"
|
||||
inputmode="numeric"
|
||||
maxlength="20"
|
||||
placeholder="请输入"
|
||||
@input="handleContactPhoneInput"
|
||||
/>
|
||||
</template>
|
||||
</avue-crud>
|
||||
|
||||
<el-dialog
|
||||
@@ -326,7 +337,7 @@ export default {
|
||||
initDeptTree() {
|
||||
getDeptTree(this.userInfo.tenantId).then(res => {
|
||||
this.deptOptions = this.flattenDept(res.data.data || []);
|
||||
const deptColumn = this.findColumn(this.option.column, 'deptId');
|
||||
const deptColumn = this.findColumn(this.option.column, 'searchDeptId');
|
||||
deptColumn.dicData = this.deptOptions;
|
||||
});
|
||||
},
|
||||
@@ -736,6 +747,9 @@ export default {
|
||||
const numberValue = Number(value);
|
||||
return Number.isFinite(numberValue) ? numberValue.toFixed(6) : '';
|
||||
},
|
||||
handleContactPhoneInput(value) {
|
||||
this.form.contactPhone = String(value || '').replace(/\D/g, '');
|
||||
},
|
||||
normalizeRow(row) {
|
||||
const trimValue = value => String(value || '').trim();
|
||||
const submitRow = {
|
||||
@@ -820,6 +834,10 @@ export default {
|
||||
this.$message.warning('联系方式不能超过20个字');
|
||||
return false;
|
||||
}
|
||||
if (row.contactPhone && !/^\d+$/.test(row.contactPhone)) {
|
||||
this.$message.warning('联系方式只能输入数字');
|
||||
return false;
|
||||
}
|
||||
if (row.remark && row.remark.length > 200) {
|
||||
this.$message.warning('备注不能超过200个字');
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user