Commit c7ee3900 by xin.yang

some update

parent cb627cd7
......@@ -41,7 +41,7 @@
type="primary"
class="twoWord"
icon="ios-search"
@click="search(1, 10)"
@click="tosearch()"
>{{ $t("1001") }}</Button
>
<Button
......@@ -95,7 +95,7 @@
type="primary"
class="fourWord"
icon="ios-cloud-download"
@click="exportEecel()"
@click="search(1)"
>{{ $t("1007") }}</Button
>
</div>
......@@ -443,34 +443,45 @@ export default {
this.columns2 = this.$time.initTableTitle(this.columns2);
this.initFrockType();
this.search(1, 10);
this.tosearch();
},
methods: {
search(page, pagesize) {
tosearch(){
this.page = 1;
this.pagesize = 10;
this.search(0);
},
search(toexcel) {
let data = {
category: this.categoryId, //工装类型id
code: this.number,
name: this.name,
// state: this.state, //0停用 1可用
state: this.state, //0停用 1可用
page: this.page,
pagesize: this.pagesize,
// toexcel: 0, //0查询 1导出
toexcel:toexcel //0查询 1导出
};
this.request(
"/acc/FixtureToolsAssembly/GetPageList",
data,
"get"
).then((res) => {
if (res.data.ret == 1) {
this.total = res.data.total;
// let arr = [];
// arr = res.data.data;
// arr.forEach(ele=>{
// ele.parentcate_guid = '';
// })
// this.data1 = arr;
console.log(this.data1);
this.data1 = res.data.data;
if(toexcel === 1){
if (res.data.ret === 1) {
window.location.href =
this.axios.publicPath + "" + res.data.data;
} else {
this.$Message.error(this.$t(res.data.msg));
}
}
else{
this.total = 0;
this.data1 = [];
let data = res.data.data;
if (res.data.ret == 1 &&Array.isArray(data)&&data.length) {
this.total = res.data.total;
this.data1 = res.data.data;
}
}
});
},
......@@ -519,7 +530,7 @@ export default {
this.modal = false;
this.detailobj = {};
this.childObj = {};
this.search(this.page, this.pagesize);
this.search(0);
} else {
this.$Message.error(this.$t(res.data.msg));
}
......@@ -587,7 +598,20 @@ export default {
});
}
},
loadExcel() {},
loadExcel() {
this.axios.request({
url: "/config/Download/GetTemplate?name=FixtureToolsAssmeblyTemplate",
method: "get",
})
.then((res) => {
if (res.data.ret === 1) {
window.location.href =
this.axios.publicPath + "" + res.data.data;
} else {
this.$Message.error(this.$t(res.data.msg));
}
});
},
exportEecel() {},
//工装类型
initFrockType() {
......
......@@ -150,7 +150,7 @@ export default {
data(){
return {
//导入方法
action: this.axios.publicPath + "wms/Upload/Submit?templateName=StorageLocation",
action: this.axios.publicPath + "acc/Upload/Submit?templateName=FixtureToolsProductTemplate",
headers: {
token: localStorage.getItem("token"),
timestamp: localStorage.getItem("timestamp"),
......@@ -595,18 +595,18 @@ export default {
},
//导出模板
loadexcel() {
// this.axios.request({
// url: "/config/Download/GetTemplate?name=StorageLocation",
// method: "get",
// })
// .then((res) => {
// if (res.data.ret === 1) {
// window.location.href =
// this.axios.publicPath + "" + res.data.data;
// } else {
// this.$Message.error(this.$t(res.data.msg));
// }
// });
this.axios.request({
url: "/config/Download/GetTemplate?name=FixtureToolsProductTemplate",
method: "get",
})
.then((res) => {
if (res.data.ret === 1) {
window.location.href =
this.axios.publicPath + "" + res.data.data;
} else {
this.$Message.error(this.$t(res.data.msg));
}
});
},
handleRowChange(currentRow, oldCurrentRow) {
this.detailobj = currentRow;
......
......@@ -154,7 +154,7 @@ export default {
data(){
return {
//导入方法
action: this.axios.publicPath + "wms/Upload/Submit?templateName=StorageLocation",
action: this.axios.publicPath + "acc/Upload/Submit?templateName=FixtureToolsTemplate",
headers: {
token: localStorage.getItem("token"),
timestamp: localStorage.getItem("timestamp"),
......@@ -546,18 +546,18 @@ export default {
},
//导出模板
loadexcel() {
// this.axios.request({
// url: "/config/Download/GetTemplate?name=StorageLocation",
// method: "get",
// })
// .then((res) => {
// if (res.data.ret === 1) {
// window.location.href =
// this.axios.publicPath + "" + res.data.data;
// } else {
// this.$Message.error(this.$t(res.data.msg));
// }
// });
this.axios.request({
url: "/config/Download/GetTemplate?name=FixtureToolsTemplate",
method: "get",
})
.then((res) => {
if (res.data.ret === 1) {
window.location.href =
this.axios.publicPath + "" + res.data.data;
} else {
this.$Message.error(this.$t(res.data.msg));
}
});
},
handleRowChange(currentRow, oldCurrentRow) {
this.detailobj = currentRow;
......
......@@ -275,7 +275,7 @@ export default {
addremark:'',//备注
filename:'',
fileurl:'',
action: this.axios.publicPath + "wms/Upload/Submit?templateName=StorageLocation",
action: this.axios.publicPath + "acc/Upload/Submit?templateName=AutomationLocationTemplate",
UploadAction: this.axios.publicPath + "config/upload/UploadImage",
headers: {
token: localStorage.getItem("token"),
......@@ -665,18 +665,18 @@ export default {
},
//导出模板
loadexcel() {
// this.axios.request({
// url: "/config/Download/GetTemplate?name=StorageLocation",
// method: "get",
// })
// .then((res) => {
// if (res.data.ret === 1) {
// window.location.href =
// this.axios.publicPath + "" + res.data.data;
// } else {
// this.$Message.error(this.$t(res.data.msg));
// }
// });
this.axios.request({
url: "/config/Download/GetTemplate?name=AutomationLocationTemplate",
method: "get",
})
.then((res) => {
if (res.data.ret === 1) {
window.location.href =
this.axios.publicPath + "" + res.data.data;
} else {
this.$Message.error(this.$t(res.data.msg));
}
});
},
/*********文件上传 start******** */
//下载文件
......
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