|
@@ -68,6 +68,14 @@
|
|
|
@click.stop="LockingQuantity"
|
|
|
>计算内贸锁定
|
|
|
</el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="userInfo"
|
|
|
+ type="info"
|
|
|
+ icon="el-icon-printer"
|
|
|
+ size="small"
|
|
|
+ @click.stop="exportInventory"
|
|
|
+ >导出库存账
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
<el-dialog title="导入库存"
|
|
@@ -311,6 +319,37 @@ export default {
|
|
|
this.loading = false;
|
|
|
})
|
|
|
},
|
|
|
+ //导出库存账
|
|
|
+ exportInventory() {
|
|
|
+ let params = { ...this.search }
|
|
|
+ console.log(params);
|
|
|
+ let queryParams = Object.assign({}, params);
|
|
|
+ if(params.storageId !== null && params.storageId !== undefined){
|
|
|
+ queryParams.storageId = params.storageId;
|
|
|
+ }else{
|
|
|
+ delete queryParams.storageId
|
|
|
+ }
|
|
|
+ console.log(queryParams);
|
|
|
+ this.$confirm('是否导出库存账?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ const routeData = this.$router.resolve({
|
|
|
+ path: '/api/blade-stock/stockgoods/export', //跳转目标窗口的地址
|
|
|
+ query: {
|
|
|
+ 'Blade-Auth': getToken(),
|
|
|
+ ...queryParams //括号内是要传递给新窗口的参数
|
|
|
+ }
|
|
|
+ })
|
|
|
+ window.open(routeData.href.slice(1, routeData.href.length));
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消' //
|
|
|
+ });
|
|
|
+ })
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|