|
|
|
@ -107,6 +107,16 @@ export default { |
|
|
|
required: true, |
|
|
|
required: true, |
|
|
|
message: "请输入零件编号", |
|
|
|
message: "请输入零件编号", |
|
|
|
trigger: "blur", |
|
|
|
trigger: "blur", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
validator: (rule, value, callback) => { |
|
|
|
|
|
|
|
if (!value || !value.trim()) { |
|
|
|
|
|
|
|
callback(new Error('零件编号不能为空或纯空格')); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
callback(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
trigger: "blur" |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
] |
|
|
|
}, |
|
|
|
}, |
|
|
|
@ -142,6 +152,9 @@ export default { |
|
|
|
this.onLoad(this.page); |
|
|
|
this.onLoad(this.page); |
|
|
|
}, |
|
|
|
}, |
|
|
|
rowSave(row, done, loading){ |
|
|
|
rowSave(row, done, loading){ |
|
|
|
|
|
|
|
if (row.partCode) { |
|
|
|
|
|
|
|
row.partCode = row.partCode.trim(); |
|
|
|
|
|
|
|
} |
|
|
|
addPlatedPart(row).then(res =>{ |
|
|
|
addPlatedPart(row).then(res =>{ |
|
|
|
if(res.data.code == 200){ |
|
|
|
if(res.data.code == 200){ |
|
|
|
this.$message.success('新增成功') |
|
|
|
this.$message.success('新增成功') |
|
|
|
@ -151,6 +164,9 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
rowUpdate(row, index, done, loading){ |
|
|
|
rowUpdate(row, index, done, loading){ |
|
|
|
|
|
|
|
if (row.partCode) { |
|
|
|
|
|
|
|
row.partCode = row.partCode.trim(); |
|
|
|
|
|
|
|
} |
|
|
|
updatePlatedPart(row).then(res =>{ |
|
|
|
updatePlatedPart(row).then(res =>{ |
|
|
|
if(res.data.code == 200){ |
|
|
|
if(res.data.code == 200){ |
|
|
|
this.$message.success('修改成功') |
|
|
|
this.$message.success('修改成功') |
|
|
|
|