| | |
| | | * 规则与后端 AttachmentNameValidator 同口径:不强制含中文 / 去掉扩展名后主干 ≤20 字 / |
| | | * 不含空格及 / \ : * ? " < > | # % 等特殊字符。 |
| | | */ |
| | | /** |
| | | * 2026-11-17:附件名是否必须含中文 |
| | | * 专家劳务费(1)、伦理专家费(2) 不要求;绩效及其他类型必须含中文 |
| | | */ |
| | | requireChineseName() { |
| | | return !(this.businessType == "1" || this.businessType == "2"); |
| | | }, |
| | | checkUploadFileName(file) { |
| | | const raw = file && file.raw ? file.raw.name : file && file.name; |
| | | const r = checkFileName(raw); |
| | | const r = checkFileName(raw, { requireChinese: this.requireChineseName() }); |
| | | if (!r.ok) { |
| | | this.$modal.msgError(r.msg); |
| | | return false; |
| | |
| | | if (this.form && this.form.id) { |
| | | return true; |
| | | } |
| | | const c = checkDetails(this.rbDetails); |
| | | const c = checkDetails(this.rbDetails, { |
| | | requireChinese: this.requireChineseName() |
| | | }); |
| | | if (!c.ok) { |
| | | this.$modal.msgError(c.msg); |
| | | return false; |