二级库相关导出
This commit is contained in:
parent
0fffbb2433
commit
7f03a31a87
|
|
@ -5,7 +5,7 @@
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
<meta name="renderer" content="webkit">
|
<meta name="renderer" content="webkit">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
<link rel="icon" href="favicon.ico">
|
||||||
<title><%= webpackConfig.name %></title>
|
<title><%= webpackConfig.name %></title>
|
||||||
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
|
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
|
||||||
<style>
|
<style>
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,7 @@ export default {
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$store.dispatch('LogOut').then(() => {
|
this.$store.dispatch('LogOut').then(() => {
|
||||||
location.href = '/login';
|
location.href = '/login';
|
||||||
|
// location.href = '/gl/';
|
||||||
})
|
})
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import store from './store'
|
||||||
import router from './router'
|
import router from './router'
|
||||||
import directive from './directive' // directive
|
import directive from './directive' // directive
|
||||||
import plugins from './plugins' // plugins
|
import plugins from './plugins' // plugins
|
||||||
import { download,downloadCost } from '@/utils/request'
|
import { download,downloadJson } from '@/utils/request'
|
||||||
|
|
||||||
import './assets/icons' // icon
|
import './assets/icons' // icon
|
||||||
import './permission' // permission control
|
import './permission' // permission control
|
||||||
|
|
@ -48,7 +48,7 @@ Vue.prototype.addDateRange = addDateRange
|
||||||
Vue.prototype.selectDictLabel = selectDictLabel
|
Vue.prototype.selectDictLabel = selectDictLabel
|
||||||
Vue.prototype.selectDictLabels = selectDictLabels
|
Vue.prototype.selectDictLabels = selectDictLabels
|
||||||
Vue.prototype.download = download
|
Vue.prototype.download = download
|
||||||
Vue.prototype.downloadCost = downloadCost
|
Vue.prototype.downloadJson = downloadJson
|
||||||
Vue.prototype.handleTree = handleTree
|
Vue.prototype.handleTree = handleTree
|
||||||
|
|
||||||
// 全局组件挂载
|
// 全局组件挂载
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ router.beforeEach((to, from, next) => {
|
||||||
store.dispatch('LogOut').then(() => {
|
store.dispatch('LogOut').then(() => {
|
||||||
Message.error(err)
|
Message.error(err)
|
||||||
next({ path: '/login' })
|
next({ path: '/login' })
|
||||||
|
// next({ path: '/gl/' })
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,7 @@ service.interceptors.response.use(res => {
|
||||||
isRelogin.show = false;
|
isRelogin.show = false;
|
||||||
store.dispatch('LogOut').then(() => {
|
store.dispatch('LogOut').then(() => {
|
||||||
location.href = '/login';
|
location.href = '/login';
|
||||||
|
// location.href = '/gl/';
|
||||||
})
|
})
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
isRelogin.show = false;
|
isRelogin.show = false;
|
||||||
|
|
@ -150,7 +151,7 @@ export function download(url, params, filename, config) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 通用下载方法
|
// 通用下载方法
|
||||||
export function downloadCost(url, params, filename, config) {
|
export function downloadJson(url, params, filename, config) {
|
||||||
downloadLoadingInstance = Loading.service({ text: "正在下载数据,请稍候", spinner: "el-icon-loading", background: "rgba(0, 0, 0, 0.7)", })
|
downloadLoadingInstance = Loading.service({ text: "正在下载数据,请稍候", spinner: "el-icon-loading", background: "rgba(0, 0, 0, 0.7)", })
|
||||||
return service.post(url, params, {
|
return service.post(url, params, {
|
||||||
transformRequest: [(params) => { return params }],
|
transformRequest: [(params) => { return params }],
|
||||||
|
|
|
||||||
|
|
@ -211,9 +211,7 @@ export default {
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download('system/dict/type/export', {
|
this.downloadJson('material/secondaryWarehouse/exportIntOperateList',JSON.stringify(this.queryParams), `回库台账_${new Date().getTime()}.xlsx`)
|
||||||
...this.queryParams
|
|
||||||
}, `type_${new Date().getTime()}.xlsx`)
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -210,9 +210,7 @@ export default {
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download('system/dict/type/export', {
|
this.downloadJson('material/secondaryWarehouse/exportOperateList',JSON.stringify(this.queryParams), `出库台账_${new Date().getTime()}.xlsx`)
|
||||||
...this.queryParams
|
|
||||||
}, `type_${new Date().getTime()}.xlsx`)
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,6 @@
|
||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
v-hasPermi="['store:labelType:export']"
|
|
||||||
>导出</el-button>
|
>导出</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
|
@ -482,9 +481,7 @@ export default {
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download('system/dict/type/export', {
|
this.downloadJson('material/secondaryWarehouse/exportList',JSON.stringify(this.queryParams), `二级库_${new Date().getTime()}.xlsx`)
|
||||||
...this.queryParams
|
|
||||||
}, `type_${new Date().getTime()}.xlsx`)
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -391,19 +391,19 @@
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
//租赁
|
//租赁
|
||||||
handleExport1() {
|
handleExport1() {
|
||||||
this.downloadCost('material/sltAgreementInfo/exportLease',JSON.stringify(this.rowData), `租赁费用明细_${new Date().getTime()}.xlsx`)
|
this.downloadJson('material/sltAgreementInfo/exportLease',JSON.stringify(this.rowData), `租赁费用明细_${new Date().getTime()}.xlsx`)
|
||||||
},
|
},
|
||||||
//丢失
|
//丢失
|
||||||
handleExport2() {
|
handleExport2() {
|
||||||
this.downloadCost('material/sltAgreementInfo/exportLose',JSON.stringify(this.rowData), `丢失费用明细_${new Date().getTime()}.xlsx`)
|
this.downloadJson('material/sltAgreementInfo/exportLose',JSON.stringify(this.rowData), `丢失费用明细_${new Date().getTime()}.xlsx`)
|
||||||
},
|
},
|
||||||
// 维修
|
// 维修
|
||||||
handleExport3() {
|
handleExport3() {
|
||||||
this.downloadCost('material/sltAgreementInfo/exportRepair',JSON.stringify(this.rowData), `维修费用明细_${new Date().getTime()}.xlsx`)
|
this.downloadJson('material/sltAgreementInfo/exportRepair',JSON.stringify(this.rowData), `维修费用明细_${new Date().getTime()}.xlsx`)
|
||||||
},
|
},
|
||||||
//报废
|
//报废
|
||||||
handleExport4() {
|
handleExport4() {
|
||||||
this.downloadCost('material/sltAgreementInfo/exportScrap',JSON.stringify(this.rowData), `报废费用明细_${new Date().getTime()}.xlsx`)
|
this.downloadJson('material/sltAgreementInfo/exportScrap',JSON.stringify(this.rowData), `报废费用明细_${new Date().getTime()}.xlsx`)
|
||||||
},
|
},
|
||||||
handleExportAll() {
|
handleExportAll() {
|
||||||
this.handleExport1()
|
this.handleExport1()
|
||||||
|
|
|
||||||
|
|
@ -352,19 +352,19 @@ export default {
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
//租赁
|
//租赁
|
||||||
handleExport1() {
|
handleExport1() {
|
||||||
this.downloadCost('material/sltAgreementInfo/exportLease',JSON.stringify(this.rowData), `租赁费用明细_${new Date().getTime()}.xlsx`)
|
this.downloadJson('material/sltAgreementInfo/exportLease',JSON.stringify(this.rowData), `租赁费用明细_${new Date().getTime()}.xlsx`)
|
||||||
},
|
},
|
||||||
//丢失
|
//丢失
|
||||||
handleExport2() {
|
handleExport2() {
|
||||||
this.downloadCost('material/sltAgreementInfo/exportLose',JSON.stringify(this.rowData), `丢失费用明细_${new Date().getTime()}.xlsx`)
|
this.downloadJson('material/sltAgreementInfo/exportLose',JSON.stringify(this.rowData), `丢失费用明细_${new Date().getTime()}.xlsx`)
|
||||||
},
|
},
|
||||||
// 维修
|
// 维修
|
||||||
handleExport3() {
|
handleExport3() {
|
||||||
this.downloadCost('material/sltAgreementInfo/exportRepair',JSON.stringify(this.rowData), `维修费用明细_${new Date().getTime()}.xlsx`)
|
this.downloadJson('material/sltAgreementInfo/exportRepair',JSON.stringify(this.rowData), `维修费用明细_${new Date().getTime()}.xlsx`)
|
||||||
},
|
},
|
||||||
//报废
|
//报废
|
||||||
handleExport4() {
|
handleExport4() {
|
||||||
this.downloadCost('material/sltAgreementInfo/exportScrap',JSON.stringify(this.rowData), `报废费用明细_${new Date().getTime()}.xlsx`)
|
this.downloadJson('material/sltAgreementInfo/exportScrap',JSON.stringify(this.rowData), `报废费用明细_${new Date().getTime()}.xlsx`)
|
||||||
},
|
},
|
||||||
handleExportAll() {
|
handleExportAll() {
|
||||||
this.handleExport1()
|
this.handleExport1()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue