Commit 7ca6b796 by xin.yang
parents 1a6d2f31 6de01783
...@@ -455,7 +455,7 @@ export default { ...@@ -455,7 +455,7 @@ export default {
return false; return false;
} }
let data = { let data = {
section: 13, section: this.sectionid,
}; };
this.request( this.request(
"/acc/AutomationOperate/CompalateAssemble", "/acc/AutomationOperate/CompalateAssemble",
......
...@@ -106,8 +106,7 @@ ...@@ -106,8 +106,7 @@
class="tableClass" class="tableClass"
:columns="columns1" :columns="columns1"
:data="data1" :data="data1"
highlight-row
@on-current-change="handleRowChange"
@on-row-click="onExpand" @on-row-click="onExpand"
></Table> ></Table>
<div class="pageDiv"> <div class="pageDiv">
...@@ -276,7 +275,10 @@ export default { ...@@ -276,7 +275,10 @@ export default {
highlightRow: true, highlightRow: true,
}, },
on: { on: {
onCurrentChange: () => {}, 'on-current-change': (currentRow,oldCurrentRow) => {
this.childObj = currentRow;
console.log(currentRow);
},
}, },
}); });
}, },
...@@ -429,6 +431,8 @@ export default { ...@@ -429,6 +431,8 @@ export default {
}, },
created() { created() {
this.columns1 = this.$time.initTableTitle(this.columns1); this.columns1 = this.$time.initTableTitle(this.columns1);
this.columns2 = this.$time.initTableTitle(this.columns2);
this.initFrockType(); this.initFrockType();
this.search(1, 10); this.search(1, 10);
}, },
...@@ -473,6 +477,7 @@ export default { ...@@ -473,6 +477,7 @@ export default {
this.type = 1; this.type = 1;
}, },
addPost() { addPost() {
let url = '';
let data = { let data = {
parentid: this.toolingId1, //父级工装ID parentid: this.toolingId1, //父级工装ID
fixturetoolid: this.toolingId2, //工装ID fixturetoolid: this.toolingId2, //工装ID
...@@ -480,6 +485,12 @@ export default { ...@@ -480,6 +485,12 @@ export default {
filename: this.filename, //附件名称 filename: this.filename, //附件名称
status: 1, status: 1,
}; };
if (this.type == 1) {
url = '/acc/FixtureToolsAssembly/Add'
}
if (this.type == 2) {
data.id = this.childObj.id;
}
this.request("/acc/FixtureToolsAssembly/Add", data, "post").then( this.request("/acc/FixtureToolsAssembly/Add", data, "post").then(
(res) => { (res) => {
if (res.data.ret == 1) { if (res.data.ret == 1) {
...@@ -489,7 +500,25 @@ export default { ...@@ -489,7 +500,25 @@ export default {
} }
); );
}, },
edit() {}, edit() {
if(!this.childObj.id){
this.$Message.error('请先选择子工装信息');
return false;
}
this.parentType = this.childObj.parentcategoryids;
this.sonType = this.childObj.categoryids;
this.parentId = this.childObj.parentcategoryid;
this.getToolingList(1);
this.sonId = this.childObj.categoryid;
this.getToolingList(2);
this.$nextTick(()=>{
this.toolingId1 = this.childObj.parentid;
this.toolingId2 = this.childObj.fixturetoolid;
})
this.modal = true;
},
dele() {}, dele() {},
loadExcel() {}, loadExcel() {},
exportEecel() {}, exportEecel() {},
...@@ -581,7 +610,7 @@ export default { ...@@ -581,7 +610,7 @@ export default {
}, },
onExpand(row, index) { onExpand(row, index) {
this.detailobj = row; this.detailobj = row;
console.log(this.detailobj);
this.data1.forEach((item, i) => { this.data1.forEach((item, i) => {
//这个循环是为了每次只能展开一个,其他自动收起,不需要可以去掉 //这个循环是为了每次只能展开一个,其他自动收起,不需要可以去掉
i !== index ? (this.data1[i]._expanded = false) : ""; i !== index ? (this.data1[i]._expanded = false) : "";
......
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