Commit 33965f4b authored by 沈翠玲's avatar 沈翠玲

检测模版 检测种类

parent f0ca3fe9
......@@ -370,7 +370,6 @@ export default {
this.reset();
const templateId = row.id || this.ids
getQctemplate(templateId).then(response => {
debugger;
this.form = response.data;
this.open = true;
this.title = "修改检测模板";
......@@ -380,15 +379,21 @@ export default {
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
const params = JSON.parse(JSON.stringify(this.form))
if (params.qcType === 'IQC') {
params.qcTypesParam = null
} else {
if (!params.qcTypesParam || params.qcTypesParam.length === 0) return this.$message.warning('检测种类必选')
}
if (valid) {
if (this.form.id != null) {
updateQctemplate(this.form).then(response => {
updateQctemplate(params).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addQctemplate(this.form).then(response => {
addQctemplate(params).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment