|
@@ -9,6 +9,8 @@
|
|
|
<template slot="menuLeft">
|
|
|
<!-- <el-button type="primary" size="mini" @click.stop="newAdd()">新建产品
|
|
|
</el-button> -->
|
|
|
+ <el-button type="info" size="small" @click="outExport">导出
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
<!-- <template slot-scope="{ row, index }" slot="id">
|
|
|
<span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 2)">{{ row.cname }}
|
|
@@ -45,12 +47,13 @@
|
|
|
<details-page v-if="!show" @goBack="goBack()" :detailData="detailData" />
|
|
|
</div>
|
|
|
</template>
|
|
|
-
|
|
|
+
|
|
|
<script>
|
|
|
import detailsPage from "./detailsPage";
|
|
|
import { option } from "./js/optionList";
|
|
|
import { getList, getAllgoods, submit } from "@/api/basicData/Inventory";
|
|
|
import { multiply, sum, subtract, divide } from "@/util/calculate";
|
|
|
+import {getToken} from "@/util/auth";
|
|
|
export default {
|
|
|
name: "index",
|
|
|
data() {
|
|
@@ -121,6 +124,31 @@ export default {
|
|
|
newAdd() {
|
|
|
this.show = false;
|
|
|
},
|
|
|
+ //导出
|
|
|
+ outExport() {
|
|
|
+ let config = {params: {...this.search}}
|
|
|
+ if (config.params) {
|
|
|
+ for (const propName of Object.keys(config.params)) {
|
|
|
+ const value = config.params[propName];
|
|
|
+ if (value !== null && typeof (value) !== "undefined") {
|
|
|
+ if (value instanceof Array) {
|
|
|
+ for (const key of Object.keys(value)) {
|
|
|
+ let params = propName + '[' + key + ']';
|
|
|
+ config.params[params] = value[key]
|
|
|
+ }
|
|
|
+ delete config.params[propName]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ const routeData = this.$router.resolve({
|
|
|
+ path: '/api/blade-stock/stockgoods/leading-out', //跳转目标窗口的地址
|
|
|
+ query: {
|
|
|
+ ...config.params, //括号内是要传递给新窗口的参数
|
|
|
+ }
|
|
|
+ })
|
|
|
+ window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
|
|
|
+ },
|
|
|
onLoad(page, params = {}) {
|
|
|
let data = this.deepClone(Object.assign(params, this.search));
|
|
|
this.loading = true;
|
|
@@ -207,7 +235,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
-
|
|
|
+
|
|
|
<style lang="scss" scoped>
|
|
|
.page-crad ::v-deep .basic-container__card {
|
|
|
height: 94.2vh;
|
|
@@ -244,4 +272,3 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
</style>
|
|
|
-
|