111
This commit is contained in:
@@ -118,7 +118,12 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :xs="24" :sm="8">
|
||||
<el-form-item label="模板编码" required>
|
||||
<el-input v-model="form.templateCode" placeholder="如:FULLTIME_DEV" />
|
||||
<el-input
|
||||
v-model="form.templateCode"
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
placeholder="如:FULLTIME_DEV(纯字母也可以)"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="8">
|
||||
@@ -593,6 +598,7 @@ async function openEdit(row: OnboardingTemplate) {
|
||||
}
|
||||
|
||||
async function save() {
|
||||
form.templateCode = form.templateCode.trim();
|
||||
if (
|
||||
!form.templateCode
|
||||
|| !form.templateName
|
||||
@@ -602,6 +608,9 @@ async function save() {
|
||||
) {
|
||||
return ElMessage.warning("请完整填写模板编码、名称、公司、部门及适用岗位");
|
||||
}
|
||||
if (!/^[A-Za-z][A-Za-z0-9._-]{0,99}$/.test(form.templateCode)) {
|
||||
return ElMessage.warning("模板编码须以字母开头,最长 100 位,仅支持字母、数字、点、下划线和短横线");
|
||||
}
|
||||
if (!form.contracts.length || form.contracts.some(item => !item.contractTemplateId || !item.contractTemplateVersionId)) {
|
||||
return ElMessage.warning("请完整选择至少一份签署材料模板及版本");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user