Commit 5cb5262d by yiyu.li

add

parent e0c0ef05
...@@ -29,7 +29,15 @@ ...@@ -29,7 +29,15 @@
:class="{ active: b == index }" :class="{ active: b == index }"
> >
<p>{{ item.title }}</p> <p>{{ item.title }}</p>
<p>{{ item.status == 1 ? "待上料" : "运行中" }}</p> <p>
{{
item.status == 1
? "待上料"
: orderDetail.status == 2
? "运行中"
: "待下料"
}}
</p>
</div> </div>
</div> </div>
</div> </div>
...@@ -80,10 +88,10 @@ ...@@ -80,10 +88,10 @@
<span class="infoLabel">状态:</span> <span class="infoLabel">状态:</span>
<span class="info">{{ <span class="info">{{
orderDetail.status == 1 orderDetail.status == 1
? "待上料" ? "待上料"
: orderDetail.status == 2 : orderDetail.status == 2
? "运行中" ? "运行中"
: "待下料" : "待下料"
}}</span> }}</span>
</p> </p>
<p class="flex"> <p class="flex">
...@@ -107,7 +115,9 @@ ...@@ -107,7 +115,9 @@
<Button type="primary" @click="feedReady()" <Button type="primary" @click="feedReady()"
>准备上料</Button >准备上料</Button
> >
<Button type="primary" @click="installOver()">安装完成</Button> <Button type="primary" @click="installOver()"
>安装完成</Button
>
</div> </div>
</TabPane> </TabPane>
<TabPane label="下料" :disabled="attr2" name="2" <TabPane label="下料" :disabled="attr2" name="2"
......
...@@ -106,8 +106,11 @@ ...@@ -106,8 +106,11 @@
class="tableClass" class="tableClass"
:columns="columns1" :columns="columns1"
:data="data1" :data="data1"
highlight-row
@on-row-click="onExpand" @on-row-click="onExpand"
></Table> ></Table>
<!-- @on-row-click="onExpand" -->
<div class="pageDiv"> <div class="pageDiv">
<div class="pageDirection"> <div class="pageDirection">
<Page <Page
...@@ -283,7 +286,6 @@ export default { ...@@ -283,7 +286,6 @@ export default {
) => { ) => {
this.childObj = {}; this.childObj = {};
this.childObj = currentRow; this.childObj = currentRow;
console.log(currentRow);
}, },
}, },
}); });
...@@ -432,6 +434,7 @@ export default { ...@@ -432,6 +434,7 @@ export default {
fileurl: "", fileurl: "",
filename: "", filename: "",
UploadAction: this.axios.publicPath + "config/upload/UploadImage", UploadAction: this.axios.publicPath + "config/upload/UploadImage",
detailobj: {},
childObj: {}, childObj: {},
}; };
}, },
...@@ -472,15 +475,25 @@ export default { ...@@ -472,15 +475,25 @@ export default {
}); });
}, },
add() { add() {
this.parentType = [];
this.parentId = 0;
this.sonType = []; this.sonType = [];
this.sonId = 0; this.sonId = 0;
this.remark = ""; this.remark = "";
this.fileurl = ""; this.fileurl = "";
this.filename = ""; this.filename = "";
this.modal = true; this.modal = true;
this.toolingId2 = 0;
this.disabled = false; this.disabled = false;
if (!this.detailobj.id) {
this.parentType = [];
this.parentId = 0;
} else {
this.parentType = this.detailobj.categoryids;
this.parentId = this.detailobj.categoryid;
this.getToolingList(1);
this.$nextTick(() => {
this.toolingId1 = this.detailobj.fixturetoolid;
});
}
this.type = 1; this.type = 1;
}, },
addPost() { addPost() {
...@@ -504,6 +517,8 @@ export default { ...@@ -504,6 +517,8 @@ export default {
if (res.data.ret == 1) { if (res.data.ret == 1) {
this.$Message.success(this.$t(res.data.msg)); this.$Message.success(this.$t(res.data.msg));
this.modal = false; this.modal = false;
this.detailobj = {};
this.childObj = {};
this.search(this.page, this.pagesize); this.search(this.page, this.pagesize);
} else { } else {
this.$Message.error(this.$t(res.data.msg)); this.$Message.error(this.$t(res.data.msg));
...@@ -540,12 +555,12 @@ export default { ...@@ -540,12 +555,12 @@ export default {
this.$Message.error(this.$t("1017")); this.$Message.error(this.$t("1017"));
return false; return false;
} else { } else {
if (!this.childObj.id) { // if (!this.childObj.id) {
this.$Message.error("请选择子工装信息"); // this.$Message.error("请选择子工装信息");
return false; // return false;
} // }
var params = { var params = {
id: this.childObj.id, id: this.childObj.id ? this.childObj.id : this.detailobj.id,
}; };
this.$Modal.confirm({ this.$Modal.confirm({
title: this.$t("1018"), title: this.$t("1018"),
...@@ -655,6 +670,14 @@ export default { ...@@ -655,6 +670,14 @@ export default {
}, },
handleRowChange(currentRow, oldCurrentRow) { handleRowChange(currentRow, oldCurrentRow) {
this.detailobj = currentRow; this.detailobj = currentRow;
console.log(currentRow);
// this.data1.forEach((item, i) => {
// //这个循环是为了每次只能展开一个,其他自动收起,不需要可以去掉
// i !== currentRow.index ? (this.data1[currentRow.index]._expanded = false) : "";
// });
// this.data1[currentRow.index]._expanded = !this.data1[currentRow.index]._expanded;
// this.data1.sort();
// this.childObj = {};
}, },
onExpand(row, index) { onExpand(row, index) {
this.detailobj = row; this.detailobj = row;
...@@ -664,8 +687,12 @@ export default { ...@@ -664,8 +687,12 @@ export default {
i !== index ? (this.data1[i]._expanded = false) : ""; i !== index ? (this.data1[i]._expanded = false) : "";
}); });
this.data1[index]._expanded = !this.data1[index]._expanded; this.data1[index]._expanded = !this.data1[index]._expanded;
if (this.data1[index]._expanded == false) {
this.detailobj = {};
this.toolingId1 = 0;
this.childObj = {};
}
this.data1.sort(); this.data1.sort();
this.childObj = {};
}, },
handlePageSize(value) { handlePageSize(value) {
this.page = 1; this.page = 1;
......
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