|
|
|
@ -1048,7 +1048,7 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="项目分类" required> |
|
|
|
<el-form-item label="项目分类"> |
|
|
|
<el-select v-model="proofDialogData.cProjectTypeDb" placeholder="请选择" clearable style="width: 100%"> |
|
|
|
<el-option |
|
|
|
v-for="item in cProjectTypeDbList" |
|
|
|
@ -1075,7 +1075,7 @@ |
|
|
|
|
|
|
|
<el-row :gutter="16"> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="打样单号" required> |
|
|
|
<el-form-item label="打样单号"> |
|
|
|
<el-select |
|
|
|
v-model="proofDialogData.proofingNo" |
|
|
|
placeholder="请选择试验单号" |
|
|
|
@ -1095,7 +1095,7 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="打样开始日期" required> |
|
|
|
<el-form-item label="打样开始日期"> |
|
|
|
<el-date-picker |
|
|
|
v-model="proofDialogData.planStartDate" |
|
|
|
type="date" |
|
|
|
@ -1128,7 +1128,7 @@ |
|
|
|
|
|
|
|
<el-row :gutter="16"> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="数量" required> |
|
|
|
<el-form-item label="数量"> |
|
|
|
<el-input v-model="proofDialogData.proofingNumber" style="width: 100%" /> |
|
|
|
</el-form-item> |
|
|
|
<!-- 提示放在 form-item 外:全局 medium 内容区高度固定 24px,写在内部会溢出并挡住下一行 Importance。 --> |
|
|
|
@ -5972,9 +5972,6 @@ export default { |
|
|
|
createBy: this.$store.state.user.name, |
|
|
|
updateBy: this.$store.state.user.name |
|
|
|
}) |
|
|
|
if (this.isBlankValue(projectCategory)) { |
|
|
|
this.$message.warning('未获取到项目分类,请手动选择') |
|
|
|
} |
|
|
|
this.proofDialogVisible = true |
|
|
|
this.loadProofDialogApplyOptions(this.proofDialogData.projectNo) |
|
|
|
}, |
|
|
|
@ -6152,36 +6149,23 @@ export default { |
|
|
|
}).catch(() => {}) |
|
|
|
}, |
|
|
|
validateProofDialogData () { |
|
|
|
// 新增打样挂在已选物料上,缺少项目或物料主键时无法落跟踪记录。 |
|
|
|
if (!this.proofDialogData.projectId || !this.proofDialogData.projectPartId) { |
|
|
|
this.$message.warning('项目或项目料号信息不完整') |
|
|
|
return false |
|
|
|
} |
|
|
|
if (!this.proofDialogData.cProjectTypeDb) { |
|
|
|
this.$message.warning('项目分类不能为空') |
|
|
|
return false |
|
|
|
} |
|
|
|
if (!this.proofDialogData.projectPhase) { |
|
|
|
if (this.isBlankValue(this.proofDialogData.projectPhase)) { |
|
|
|
this.$message.warning('项目阶段不能为空') |
|
|
|
return false |
|
|
|
} |
|
|
|
if (!this.proofDialogData.proofingNo) { |
|
|
|
this.$message.warning('打样单号不能为空') |
|
|
|
return false |
|
|
|
} |
|
|
|
if (!this.proofDialogData.proofingNumber) { |
|
|
|
this.$message.warning('数量不能为空') |
|
|
|
return false |
|
|
|
} |
|
|
|
if (!/^[1-9]\d*$/.test(String(this.proofDialogData.proofingNumber))) { |
|
|
|
// 数量允许留空;一旦填写仍必须是正整数,避免把 0、小数或文本写入打样数量。 |
|
|
|
const proofingNumber = this.proofDialogData.proofingNumber |
|
|
|
if (!this.isBlankValue(proofingNumber) && !/^[1-9]\d*$/.test(String(proofingNumber).trim())) { |
|
|
|
this.$alert('数量必需是大于等于0的正整数', '提示', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false |
|
|
|
} |
|
|
|
if (!this.proofDialogData.planStartDate) { |
|
|
|
this.$message.warning('打样开始日期不能为空') |
|
|
|
return false |
|
|
|
} |
|
|
|
return true |
|
|
|
}, |
|
|
|
resolveProofDialogBaseline () { |
|
|
|
@ -6202,17 +6186,17 @@ export default { |
|
|
|
testPartNo: this.proofDialogData.testPartNo, |
|
|
|
customerNo: this.proofDialogData.customerNo, |
|
|
|
buNo: this.proofDialogData.buNo, |
|
|
|
projectCategory: this.proofDialogData.cProjectTypeDb, |
|
|
|
projectCategory: this.isBlankValue(this.proofDialogData.cProjectTypeDb) ? null : this.proofDialogData.cProjectTypeDb, |
|
|
|
projectPhase: this.proofDialogData.projectPhase, |
|
|
|
proofingNo: this.proofDialogData.proofingNo, |
|
|
|
proofingNumber: Number(this.proofDialogData.proofingNumber), |
|
|
|
planStartDate: this.proofDialogData.planStartDate, |
|
|
|
proofingNo: this.isBlankValue(this.proofDialogData.proofingNo) ? null : String(this.proofDialogData.proofingNo).trim(), |
|
|
|
proofingNumber: this.isBlankValue(this.proofDialogData.proofingNumber) ? null : Number(String(this.proofDialogData.proofingNumber).trim()), |
|
|
|
planStartDate: this.isBlankValue(this.proofDialogData.planStartDate) ? null : this.proofDialogData.planStartDate, |
|
|
|
requiredDeliveryDate: this.isBlankValue(this.proofDialogData.requiredDeliveryDate) ? null : this.proofDialogData.requiredDeliveryDate, |
|
|
|
baseline: this.resolveProofDialogBaseline(), |
|
|
|
actualityDeliveryDate: this.proofDialogData.actualityDeliveryDate || null, |
|
|
|
pmInqueryTime: this.isBlankValue(this.proofDialogData.pmInqueryTime) ? null : this.proofDialogData.pmInqueryTime, |
|
|
|
importance: this.normalizeImportanceValue(this.proofDialogData.importance), |
|
|
|
proofingStatus: this.proofDialogData.proofingStatus || '草稿', |
|
|
|
proofingStatus: this.isBlankValue(this.proofDialogData.proofingStatus) ? null : this.proofDialogData.proofingStatus, |
|
|
|
remark: this.proofDialogData.remark, |
|
|
|
tracker: this.proofDialogData.projectOwner, |
|
|
|
engineer: this.proofDialogData.engineer, |
|
|
|
|