Commit d7dada67 by yiyu.li

bugd

parent 048d2734
...@@ -325,6 +325,7 @@ export default { ...@@ -325,6 +325,7 @@ export default {
this.$Message.success(this.$t(msg)) this.$Message.success(this.$t(msg))
}, },
adddata () { adddata () {
console.log(this.addmtype);
if (this.addmtype === 1) { if (this.addmtype === 1) {
this.addtypename = this.addtypename this.addtypename = this.addtypename
if (this.addtypename === '') { if (this.addtypename === '') {
...@@ -350,10 +351,12 @@ export default { ...@@ -350,10 +351,12 @@ export default {
return false return false
} }
let data = { let data = {
parentid: this.addparentid, parentid: this.addmtype==2? this.addparentid:0,
description: this.adddescription, description: this.adddescription,
title: this.addtitle title: this.addtitle
} }
console.log(data);
// return;
axios.request({ axios.request({
url: '/config/MachineType/AddDcategory', url: '/config/MachineType/AddDcategory',
data: data, data: data,
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
>{{ $t("1005") }}</Button >{{ $t("1005") }}</Button
> >
<Upload <Upload
style="display:inline-block" style="display: inline-block"
ref="upload" ref="upload"
:action="action" :action="action"
name="excel-file" name="excel-file"
...@@ -81,13 +81,14 @@ ...@@ -81,13 +81,14 @@
:on-format-error="handleFormatError" :on-format-error="handleFormatError"
:on-success="handleSuccess" :on-success="handleSuccess"
:on-error="handleError" :on-error="handleError"
:format="['xlsx','xls']" :format="['xlsx', 'xls']"
> >
<Button <Button
type="primary" type="primary"
class="fourWord" class="fourWord"
icon="md-cloud-upload" icon="md-cloud-upload"
>{{$t('1006')}}</Button> >{{ $t("1006") }}</Button
>
</Upload> </Upload>
<Button <Button
type="primary" type="primary"
...@@ -270,7 +271,7 @@ export default { ...@@ -270,7 +271,7 @@ export default {
columns1: [ columns1: [
{ {
type: "expand", type: "expand",
width: "50", // width: "50",
render: (h, params) => { render: (h, params) => {
// let str = ""; // let str = "";
// if (params.row.managetype === 1) { // if (params.row.managetype === 1) {
...@@ -462,18 +463,18 @@ export default { ...@@ -462,18 +463,18 @@ export default {
UploadAction: this.axios.publicPath + "config/upload/UploadImage", UploadAction: this.axios.publicPath + "config/upload/UploadImage",
detailobj: {}, detailobj: {},
childObj: {}, childObj: {},
addstatus:'1',//状态 1可用 0停用 addstatus: "1", //状态 1可用 0停用
}; };
}, },
created() { created() {
this.columns1 = this.$time.initTableTitle(this.columns1); this.columns1 = this.$time.initTableTitle(this.columns1);
this.columns2 = this.$time.initTableTitle(this.columns2); // this.columns2 = this.$time.initTableTitle(this.columns2);
this.initFrockType(); this.initFrockType();
this.tosearch(); this.tosearch();
}, },
methods: { methods: {
tosearch(){ tosearch() {
this.page = 1; this.page = 1;
this.pagesize = 10; this.pagesize = 10;
this.search(0); this.search(0);
...@@ -486,26 +487,29 @@ export default { ...@@ -486,26 +487,29 @@ export default {
state: this.state, //0停用 1可用 state: this.state, //0停用 1可用
page: this.page, page: this.page,
pagesize: this.pagesize, pagesize: this.pagesize,
toexcel:toexcel //0查询 1导出 toexcel: toexcel, //0查询 1导出
}; };
this.request( this.request(
"/acc/FixtureToolsAssembly/GetPageList", "/acc/FixtureToolsAssembly/GetPageList",
data, data,
"get" "get"
).then((res) => { ).then((res) => {
if(toexcel === 1){ if (toexcel === 1) {
if (res.data.ret === 1) { if (res.data.ret === 1) {
window.location.href = window.location.href =
this.axios.publicPath + "" + res.data.data; this.axios.publicPath + "" + res.data.data;
} else { } else {
this.$Message.error(this.$t(res.data.msg)); this.$Message.error(this.$t(res.data.msg));
} }
} } else {
else{
this.total = 0; this.total = 0;
this.data1 = []; this.data1 = [];
let data = res.data.data; let data = res.data.data;
if (res.data.ret == 1 &&Array.isArray(data)&&data.length) { if (
res.data.ret == 1 &&
Array.isArray(data) &&
data.length
) {
this.total = res.data.total; this.total = res.data.total;
this.data1 = res.data.data; this.data1 = res.data.data;
} }
...@@ -533,14 +537,14 @@ export default { ...@@ -533,14 +537,14 @@ export default {
}); });
} }
this.type = 1; this.type = 1;
this.addstatus = '1';//状态 1可用 0停用 this.addstatus = "1"; //状态 1可用 0停用
}, },
addPost() { addPost() {
if(!this.toolingId1){ if (!this.toolingId1) {
this.$Message.error("请选择父工装"); this.$Message.error("请选择父工装");
return false; return false;
} }
if(!this.toolingId2){ if (!this.toolingId2) {
this.$Message.error("请选择子工装"); this.$Message.error("请选择子工装");
return false; return false;
} }
...@@ -553,7 +557,7 @@ export default { ...@@ -553,7 +557,7 @@ export default {
filename: this.filename, //附件名称 filename: this.filename, //附件名称
status: 1, status: 1,
remark: this.remark, remark: this.remark,
status:this.addstatus, status: this.addstatus,
}; };
if (this.type == 1) { if (this.type == 1) {
url = "/acc/FixtureToolsAssembly/Add"; url = "/acc/FixtureToolsAssembly/Add";
...@@ -597,7 +601,7 @@ export default { ...@@ -597,7 +601,7 @@ export default {
this.remark = this.childObj.remark; this.remark = this.childObj.remark;
this.disabled = true; this.disabled = true;
this.type = 2; this.type = 2;
this.addstatus = this.childObj.status+'';//状态 1可用 0停用 this.addstatus = this.childObj.status + ""; //状态 1可用 0停用
this.modal = true; this.modal = true;
}, },
dele() { dele() {
...@@ -638,18 +642,20 @@ export default { ...@@ -638,18 +642,20 @@ export default {
} }
}, },
loadExcel() { loadExcel() {
this.axios.request({ this.axios
url: "/config/Download/GetTemplate?name=FixtureToolsAssmeblyTemplate", .request({
method: "get", url:
}) "/config/Download/GetTemplate?name=FixtureToolsAssmeblyTemplate",
.then((res) => { method: "get",
if (res.data.ret === 1) { })
window.location.href = .then((res) => {
this.axios.publicPath + "" + res.data.data; if (res.data.ret === 1) {
} else { window.location.href =
this.$Message.error(this.$t(res.data.msg)); this.axios.publicPath + "" + res.data.data;
} } else {
}); this.$Message.error(this.$t(res.data.msg));
}
});
}, },
exportEecel() {}, exportEecel() {},
//工装类型 //工装类型
......
...@@ -302,6 +302,7 @@ export default { ...@@ -302,6 +302,7 @@ export default {
.then((res) => { .then((res) => {
if (res.data.ret === 1) { if (res.data.ret === 1) {
this.$Message.success(this.$t("1058")); this.$Message.success(this.$t("1058"));
this.page = 1;
this.search(0); this.search(0);
} else { } else {
this.$Message.error(this.$t(res.data.msg)); this.$Message.error(this.$t(res.data.msg));
......
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