Commit 08dbd69e authored by zhuli's avatar zhuli

# ipqc模板配置更新

parent 8a66b8a5
......@@ -195,9 +195,9 @@
</el-col>
</el-row>
</el-form>
<el-tabs type="border-card" v-if="form.templateId != null">
<el-tabs type="border-card" v-if="form.id != null">
<el-tab-pane label="检测项">
<TemplateIndex ref="indexTab" :templateId="form.templateId" :optType="optType"></TemplateIndex>
<TemplateIndex ref="indexTab" :templateId="form.id" :optType="optType"></TemplateIndex>
</el-tab-pane>
<!-- <el-tab-pane label="物料产品">
<TemplateProduct ref="productTab" :templateId="form.templateId" :optType="optType"></TemplateProduct>
......@@ -294,7 +294,7 @@ export default {
// 表单重置
reset() {
this.form = {
templateId: null,
id: null,
templateCode: null,
templateName: null,
qcTypesParam: [],
......@@ -320,7 +320,7 @@ export default {
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.templateId)
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
......@@ -334,7 +334,7 @@ export default {
// 查询明细按钮操作
handleView(row){
this.reset();
const templateId = row.templateId || this.ids;
const templateId = row.id || this.ids;
getQctemplate(templateId).then(response => {
this.form = response.data;
this.open = true;
......@@ -345,7 +345,7 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const templateId = row.templateId || this.ids
const templateId = row.id || this.ids
getQctemplate(templateId).then(response => {
debugger;
this.form = response.data;
......@@ -358,7 +358,7 @@ export default {
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.templateId != null) {
if (this.form.id != null) {
updateQctemplate(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
......@@ -376,7 +376,7 @@ export default {
},
/** 删除按钮操作 */
handleDelete(row) {
const templateIds = row.templateId || this.ids;
const templateIds = row.id || this.ids;
this.$modal.confirm('是否确认删除检测模板编号为"' + templateIds + '"的数据项?').then(function() {
return delQctemplate(templateIds);
}).then(() => {
......
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