|
|
@ -748,6 +748,10 @@ export default { |
|
|
inData.importance = this.normalizeImportanceValue(inData.importance) |
|
|
inData.importance = this.normalizeImportanceValue(inData.importance) |
|
|
// 清除按钮会把打样单号变成空字符串。显式传 null,后端才能把库里的原单号写成空。
|
|
|
// 清除按钮会把打样单号变成空字符串。显式传 null,后端才能把库里的原单号写成空。
|
|
|
inData.proofingNo = this.isBlankValue(inData.proofingNo) ? null : String(inData.proofingNo).trim() |
|
|
inData.proofingNo = this.isBlankValue(inData.proofingNo) ? null : String(inData.proofingNo).trim() |
|
|
|
|
|
// 数量允许留空。空字符串要转成 null,否则后端会把空数量补成默认 1。
|
|
|
|
|
|
inData.proofingNumber = this.isBlankValue(inData.proofingNumber) ? null : Number(String(inData.proofingNumber).trim()) |
|
|
|
|
|
// 项目阶段允许留空。空字符串要转成 null,否则后端会把没选的阶段补成 Sample。
|
|
|
|
|
|
inData.projectPhase = this.isBlankValue(inData.projectPhase) ? null : String(inData.projectPhase).trim() |
|
|
// 打样开始日期随打样单号清空。空字符串要转成 null,否则日期字段无法把库里的原值清掉。
|
|
|
// 打样开始日期随打样单号清空。空字符串要转成 null,否则日期字段无法把库里的原值清掉。
|
|
|
inData.planStartDate = this.isBlankValue(inData.planStartDate) ? null : this.formatDate(inData.planStartDate) |
|
|
inData.planStartDate = this.isBlankValue(inData.planStartDate) ? null : this.formatDate(inData.planStartDate) |
|
|
if (this.oneKeyDialogMode === 'create') { |
|
|
if (this.oneKeyDialogMode === 'create') { |
|
|
@ -795,11 +799,12 @@ export default { |
|
|
this.$message.error('Engineer不能为空') |
|
|
this.$message.error('Engineer不能为空') |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
// 创建和修改都允许数量留空;一旦填写仍必须是正整数。
|
|
|
if (!this.isBlankValue(inData.proofingNumber) && !/^[1-9]\d*$/.test(String(inData.proofingNumber))) { |
|
|
if (!this.isBlankValue(inData.proofingNumber) && !/^[1-9]\d*$/.test(String(inData.proofingNumber))) { |
|
|
this.$message.error('打样数量必须是正整数') |
|
|
this.$message.error('打样数量必须是正整数') |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
return true |
|
|
return true |
|
|
}, |
|
|
}, |
|
|
buildOneKeyEditForm (current, projectData, partData) { |
|
|
buildOneKeyEditForm (current, projectData, partData) { |
|
|
|