Commit f83cdba7 by yiyu.li

add

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