Commit f83cdba7 by yiyu.li

add

parent f9b4e17e
...@@ -461,7 +461,7 @@ export default { ...@@ -461,7 +461,7 @@ export default {
"/acc/AutomationOperate/CompalateAssemble", "/acc/AutomationOperate/CompalateAssemble",
data, data,
"post" "post"
).thne((res) => { ).then((res) => {
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));
} else { } else {
......
...@@ -144,6 +144,7 @@ ...@@ -144,6 +144,7 @@
v-model="parentType" v-model="parentType"
change-on-select change-on-select
@on-change="getCategory1" @on-change="getCategory1"
:disabled="disabled"
></Cascader> ></Cascader>
</div> </div>
<div class="filter"> <div class="filter">
...@@ -155,6 +156,7 @@ ...@@ -155,6 +156,7 @@
filterable filterable
filter-by-label filter-by-label
class="searchSelect" class="searchSelect"
:disabled="disabled"
> >
<Option <Option
v-for="(item, index) in toolingList1" v-for="(item, index) in toolingList1"
...@@ -256,6 +258,7 @@ export default { ...@@ -256,6 +258,7 @@ export default {
nonce: localStorage.getItem("nonce"), nonce: localStorage.getItem("nonce"),
sign: localStorage.getItem("sign"), sign: localStorage.getItem("sign"),
}, },
disabled: false,
columns1: [ columns1: [
{ {
type: "expand", type: "expand",
...@@ -278,6 +281,7 @@ export default { ...@@ -278,6 +281,7 @@ export default {
currentRow, currentRow,
oldCurrentRow oldCurrentRow
) => { ) => {
this.childObj = {};
this.childObj = currentRow; this.childObj = currentRow;
console.log(currentRow); console.log(currentRow);
}, },
...@@ -476,6 +480,7 @@ export default { ...@@ -476,6 +480,7 @@ export default {
this.fileurl = ""; this.fileurl = "";
this.filename = ""; this.filename = "";
this.modal = true; this.modal = true;
this.disabled = false;
this.type = 1; this.type = 1;
}, },
addPost() { addPost() {
...@@ -486,21 +491,24 @@ export default { ...@@ -486,21 +491,24 @@ export default {
fileurl: this.fileurl, //url fileurl: this.fileurl, //url
filename: this.filename, //附件名称 filename: this.filename, //附件名称
status: 1, status: 1,
remark: this.remark,
}; };
if (this.type == 1) { if (this.type == 1) {
url = "/acc/FixtureToolsAssembly/Add"; url = "/acc/FixtureToolsAssembly/Add";
} }
if (this.type == 2) { if (this.type == 2) {
data.id = this.childObj.id; data.id = this.childObj.id;
url = "/acc/FixtureToolsAssembly/Update";
} }
this.request("/acc/FixtureToolsAssembly/Add", data, "post").then( this.request(url, data, "post").then((res) => {
(res) => { if (res.data.ret == 1) {
if (res.data.ret == 1) { this.$Message.success(this.$t(res.data.msg));
} else { this.modal = false;
this.$Message.error(this.$t(res.data.msg)); this.search(this.page, this.pagesize);
} } else {
this.$Message.error(this.$t(res.data.msg));
} }
); });
}, },
edit() { edit() {
if (!this.childObj.id) { if (!this.childObj.id) {
...@@ -511,25 +519,33 @@ export default { ...@@ -511,25 +519,33 @@ export default {
this.sonType = this.childObj.categoryids; this.sonType = this.childObj.categoryids;
this.parentId = this.childObj.parentcategoryid; this.parentId = this.childObj.parentcategoryid;
this.getToolingList(1); this.getToolingList(1);
this.$nextTick(() => {
this.toolingId1 = this.childObj.parentid;
});
this.sonId = this.childObj.categoryid; this.sonId = this.childObj.categoryid;
this.getToolingList(2); this.getToolingList(2);
this.$nextTick(() => { this.$nextTick(() => {
this.toolingId1 = this.childObj.parentid;
this.toolingId2 = this.childObj.fixturetoolid; this.toolingId2 = this.childObj.fixturetoolid;
}); });
this.filename = this.childObj.filename; this.filename = this.childObj.filename;
this.fileurl = this.childObj.fileurl; this.fileurl = this.childObj.fileurl;
this.remark = this.childObj.remark; this.remark = this.childObj.remark;
this.disabled = true;
this.type = 2;
this.modal = true; this.modal = true;
}, },
dele() { dele() {
return;
if (this.detailobj.id === undefined || this.detailobj.id === null) { if (this.detailobj.id === undefined || this.detailobj.id === null) {
this.$Message.error(this.$t("1017")); this.$Message.error(this.$t("1017"));
return false; return false;
} else { } else {
if (!this.childObj.id) {
this.$Message.error("请选择子工装信息");
return false;
}
var params = { var params = {
id: this.detailobj.id, id: this.childObj.id,
}; };
this.$Modal.confirm({ this.$Modal.confirm({
title: this.$t("1018"), title: this.$t("1018"),
...@@ -540,7 +556,7 @@ export default { ...@@ -540,7 +556,7 @@ export default {
onOk: () => { onOk: () => {
this.axios this.axios
.request({ .request({
url: "/acc/FixtureToolsProduct/Delete", url: "/acc/FixtureToolsAssembly/Delete",
params, params,
method: "get", method: "get",
}) })
...@@ -586,9 +602,6 @@ export default { ...@@ -586,9 +602,6 @@ export default {
this.parentType.length > 0 this.parentType.length > 0
? this.parentType[this.parentType.length - 1] ? this.parentType[this.parentType.length - 1]
: 0; : 0;
console.log(val);
console.log(this.parentId);
if (this.parentId != 0) { if (this.parentId != 0) {
this.getToolingList(1); this.getToolingList(1);
...@@ -607,7 +620,6 @@ export default { ...@@ -607,7 +620,6 @@ export default {
getToolingList(index) { getToolingList(index) {
let id = 0; let id = 0;
id = index == 1 ? this.parentId : this.sonId; id = index == 1 ? this.parentId : this.sonId;
console.log(index);
this.request( this.request(
"/acc/FixtureTools/GetFixtureToolList?categoryid=" + id, "/acc/FixtureTools/GetFixtureToolList?categoryid=" + id,
"", "",
......
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