二级库相关导出

This commit is contained in:
zhouzy062 2024-03-07 16:46:16 +08:00
parent 0fffbb2433
commit 7f03a31a87
10 changed files with 18 additions and 22 deletions

View File

@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit">
<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>
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
<style>

View File

@ -104,6 +104,7 @@ export default {
}).then(() => {
this.$store.dispatch('LogOut').then(() => {
location.href = '/login';
// location.href = '/gl/';
})
}).catch(() => {});
}

View File

@ -12,7 +12,7 @@ import store from './store'
import router from './router'
import directive from './directive' // directive
import plugins from './plugins' // plugins
import { download,downloadCost } from '@/utils/request'
import { download,downloadJson } from '@/utils/request'
import './assets/icons' // icon
import './permission' // permission control
@ -48,7 +48,7 @@ Vue.prototype.addDateRange = addDateRange
Vue.prototype.selectDictLabel = selectDictLabel
Vue.prototype.selectDictLabels = selectDictLabels
Vue.prototype.download = download
Vue.prototype.downloadCost = downloadCost
Vue.prototype.downloadJson = downloadJson
Vue.prototype.handleTree = handleTree
// 全局组件挂载

View File

@ -33,6 +33,7 @@ router.beforeEach((to, from, next) => {
store.dispatch('LogOut').then(() => {
Message.error(err)
next({ path: '/login' })
// next({ path: '/gl/' })
})
})
} else {

View File

@ -88,6 +88,7 @@ service.interceptors.response.use(res => {
isRelogin.show = false;
store.dispatch('LogOut').then(() => {
location.href = '/login';
// location.href = '/gl/';
})
}).catch(() => {
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)", })
return service.post(url, params, {
transformRequest: [(params) => { return params }],

View File

@ -211,9 +211,7 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
this.download('system/dict/type/export', {
...this.queryParams
}, `type_${new Date().getTime()}.xlsx`)
this.downloadJson('material/secondaryWarehouse/exportIntOperateList',JSON.stringify(this.queryParams), `回库台账_${new Date().getTime()}.xlsx`)
},
}
};

View File

@ -210,9 +210,7 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
this.download('system/dict/type/export', {
...this.queryParams
}, `type_${new Date().getTime()}.xlsx`)
this.downloadJson('material/secondaryWarehouse/exportOperateList',JSON.stringify(this.queryParams), `出库台账_${new Date().getTime()}.xlsx`)
},
}
};

View File

@ -61,7 +61,6 @@
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['store:labelType:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
@ -482,9 +481,7 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
this.download('system/dict/type/export', {
...this.queryParams
}, `type_${new Date().getTime()}.xlsx`)
this.downloadJson('material/secondaryWarehouse/exportList',JSON.stringify(this.queryParams), `二级库_${new Date().getTime()}.xlsx`)
},
}
};

View File

@ -391,19 +391,19 @@
/** 导出按钮操作 */
//
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() {
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() {
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() {
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() {
this.handleExport1()

View File

@ -352,19 +352,19 @@ export default {
/** 导出按钮操作 */
//
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() {
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() {
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() {
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() {
this.handleExport1()