Commit 08dbd69e authored by zhuli's avatar zhuli

# ipqc模板配置更新

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