Commit c7ee3900 by xin.yang

some update

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