|
@@ -1,13 +1,7 @@
|
|
|
<template>
|
|
|
<!--点击【物料编号】 出入库详细数据 抽屉 -->
|
|
|
<div id="outInDetailDataDrawer">
|
|
|
- <a-drawer
|
|
|
- title="出入库详细数据"
|
|
|
- width="67%"
|
|
|
- placement="right"
|
|
|
- :closable="true"
|
|
|
- :visible="visible"
|
|
|
- @close="onClose">
|
|
|
+ <a-drawer title="出入库详细数据" width="67%" placement="right" :closable="true" :visible="visible" @close="onClose">
|
|
|
<!-- 查询 -->
|
|
|
<a-card :bordered="true">
|
|
|
<div class="table-page-search-wrapper">
|
|
@@ -44,23 +38,18 @@
|
|
|
</div>
|
|
|
</a-card>
|
|
|
|
|
|
- <!-- 子表 入库单 -->
|
|
|
<a-card :bordered="true" style="margin:10px 0;">
|
|
|
- <div style="marginTop:30px;">
|
|
|
- <h6 class="table-title" style="float:left">入库单</h6>
|
|
|
- <!-- 导出 -->
|
|
|
- <a-row style="float:right">
|
|
|
- <a-col :md="24" :sm="12">
|
|
|
- <span style="float: right;" class="table-operator">
|
|
|
- <a-button
|
|
|
- type="primary"
|
|
|
- icon="download"
|
|
|
- @click="handleExportXls('出入库详细数据 - 入库单')"
|
|
|
- >导出</a-button
|
|
|
- >
|
|
|
- </span>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
+ <!-- 子表 入库单 -->
|
|
|
+ <div>
|
|
|
+ <h6 class="table-title" style="float:left;">入库单</h6>
|
|
|
+ <a-button
|
|
|
+ type="primary"
|
|
|
+ icon="download"
|
|
|
+ @click="inOrderDataXls('出入库详细数据 - 入库单')"
|
|
|
+ style="marginLeft:960px;"
|
|
|
+ >导出</a-button
|
|
|
+ >
|
|
|
+
|
|
|
<a-table
|
|
|
bordered
|
|
|
rowKey="id"
|
|
@@ -74,21 +63,16 @@
|
|
|
</div>
|
|
|
|
|
|
<!-- 子表 出库单 -->
|
|
|
- <div style="margin:80px 0;">
|
|
|
+ <div style="margin:50px 0;">
|
|
|
<h6 class="table-title" style="float:left">出库单</h6>
|
|
|
- <!-- 导出 -->
|
|
|
- <a-row style="float:right">
|
|
|
- <a-col :md="24" :sm="12">
|
|
|
- <span style="float: right;" class="table-operator">
|
|
|
- <a-button
|
|
|
- type="primary"
|
|
|
- icon="download"
|
|
|
- @click="handleExportXls('出入库详细数据 - 出库单')"
|
|
|
- >导出</a-button
|
|
|
- >
|
|
|
- </span>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
+ <a-button
|
|
|
+ type="primary"
|
|
|
+ icon="download"
|
|
|
+ @click="outOrderDataXls('出入库详细数据 - 出库单')"
|
|
|
+ style="marginLeft:960px;"
|
|
|
+ >导出</a-button
|
|
|
+ >
|
|
|
+
|
|
|
<a-table
|
|
|
bordered
|
|
|
rowKey="id"
|
|
@@ -104,16 +88,15 @@
|
|
|
<!-- 子表 材料出库单-->
|
|
|
<div>
|
|
|
<h6 class="table-title" style="float:left">材料出库单</h6>
|
|
|
- <!-- 导出 -->
|
|
|
- <a-row style="float:right">
|
|
|
- <a-col :md="24" :sm="12">
|
|
|
- <span style="float: right;" class="table-operator">
|
|
|
- <a-button type="primary" icon="download" @click="handleExportXls('出入库详细数据 - 材料出库单')">
|
|
|
- 导出
|
|
|
- </a-button>
|
|
|
- </span>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
+ <a-button
|
|
|
+ type="primary"
|
|
|
+ icon="download"
|
|
|
+ @click="materialsOutOrderDataXls('出入库详细数据 - 材料出库单')"
|
|
|
+ style="marginLeft:960px;"
|
|
|
+ >
|
|
|
+ 导出
|
|
|
+ </a-button>
|
|
|
+
|
|
|
<a-table
|
|
|
bordered
|
|
|
rowKey="id"
|
|
@@ -134,6 +117,9 @@
|
|
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
|
import JEllipsis from '@/components/jeecg/JEllipsis'
|
|
|
import moment from 'moment'
|
|
|
+
|
|
|
+// import { outInDetailData } from '@api/reportForms/pro-progress-report.js'
|
|
|
+
|
|
|
export default {
|
|
|
name: 'OutInDetailDataDrawer', // 出入库详细数据 抽屉
|
|
|
mixins: [JeecgListMixin],
|
|
@@ -142,8 +128,8 @@ export default {
|
|
|
return {
|
|
|
loading: false, // 表格加载
|
|
|
visible: false, // 抽屉
|
|
|
-
|
|
|
- // 查询条件
|
|
|
+ record: {}, //点击的对象
|
|
|
+ // 物料卡查询条件
|
|
|
queryParam: {
|
|
|
orderData: '', // 订单日期
|
|
|
customerShortName: '' // 客户简称
|
|
@@ -248,34 +234,113 @@ export default {
|
|
|
materialsOutOrderData: [{}]
|
|
|
}
|
|
|
},
|
|
|
- created() {},
|
|
|
+ created() {
|
|
|
+ this.getoutInDetailData()
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ // 查询出入库详细数据
|
|
|
+ getoutInDetailData() {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ console.log('出入库详情', this.record)
|
|
|
+ // outInDetailData({}).then(res => {
|
|
|
+ // if (res.success) {
|
|
|
+ // console.log('出入库详细数据', res.result)
|
|
|
+ // // 需要三个页签的table数据,res返回的数据是怎样的
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ // 入库单 导出
|
|
|
+ inOrderDataXls(fileName) {
|
|
|
+ console.log('需导出文件名', fileName)
|
|
|
+ const params = this.inOrderData
|
|
|
+ console.log('导出参数', params)
|
|
|
+ // downFile('/scas/supplierCapacity/excel1', params).then(data => {
|
|
|
+ // if (!data) {
|
|
|
+ // this.$message.warning('文件下载失败')
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
|
|
+ // window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls')
|
|
|
+ // } else {
|
|
|
+ // let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
|
|
|
+ // let link = document.createElement('a')
|
|
|
+ // link.style.display = 'none'
|
|
|
+ // link.href = url
|
|
|
+ // link.setAttribute('download', fileName + '.xls')
|
|
|
+ // document.body.appendChild(link)
|
|
|
+ // link.click()
|
|
|
+ // document.body.removeChild(link) // 下载完成移除元素
|
|
|
+ // window.URL.revokeObjectURL(url) // 释放掉blob对象
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ },
|
|
|
+
|
|
|
+ // 出库单 导出
|
|
|
+ outOrderDataXls(fileName) {
|
|
|
+ console.log('需导出文件名', fileName)
|
|
|
+ const params = this.outOrderData
|
|
|
+ console.log('导出参数', params)
|
|
|
+ // downFile('/scas/supplierCapacity/excel1', params).then(data => {
|
|
|
+ // if (!data) {
|
|
|
+ // this.$message.warning('文件下载失败')
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
|
|
+ // window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls')
|
|
|
+ // } else {
|
|
|
+ // let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
|
|
|
+ // let link = document.createElement('a')
|
|
|
+ // link.style.display = 'none'
|
|
|
+ // link.href = url
|
|
|
+ // link.setAttribute('download', fileName + '.xls')
|
|
|
+ // document.body.appendChild(link)
|
|
|
+ // link.click()
|
|
|
+ // document.body.removeChild(link) // 下载完成移除元素
|
|
|
+ // window.URL.revokeObjectURL(url) // 释放掉blob对象
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ },
|
|
|
+
|
|
|
+ // 材料出库单 导出
|
|
|
+ materialsOutOrderDataXls(fileName) {
|
|
|
+ console.log('需导出文件名', fileName)
|
|
|
+ const params = this.materialsOutOrderData
|
|
|
+ console.log('导出参数', params)
|
|
|
+ // downFile('/scas/supplierCapacity/excel1', params).then(data => {
|
|
|
+ // if (!data) {
|
|
|
+ // this.$message.warning('文件下载失败')
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
|
|
+ // window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls')
|
|
|
+ // } else {
|
|
|
+ // let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
|
|
|
+ // let link = document.createElement('a')
|
|
|
+ // link.style.display = 'none'
|
|
|
+ // link.href = url
|
|
|
+ // link.setAttribute('download', fileName + '.xls')
|
|
|
+ // document.body.appendChild(link)
|
|
|
+ // link.click()
|
|
|
+ // document.body.removeChild(link) // 下载完成移除元素
|
|
|
+ // window.URL.revokeObjectURL(url) // 释放掉blob对象
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ },
|
|
|
+
|
|
|
// 查询按钮
|
|
|
searchQuery() {
|
|
|
- // 渲染订单销售列表
|
|
|
+ this.getoutInDetailData()
|
|
|
},
|
|
|
searchReset() {
|
|
|
- // console.log('>>>>重置')
|
|
|
this.queryParam = {}
|
|
|
+ this.getoutInDetailData()
|
|
|
},
|
|
|
- // 入库单 导出
|
|
|
- // inOrderExportXls() {},
|
|
|
-
|
|
|
- // // 出库单 导出
|
|
|
- // outOrderExportXls() {
|
|
|
- // console.log(' 出入库详细数据-出库单 导出')
|
|
|
- // },
|
|
|
-
|
|
|
- // // 材料出库单 导出
|
|
|
- // materialsOutOrderExportXls() {},
|
|
|
-
|
|
|
onClose() {
|
|
|
- // 关闭抽屉
|
|
|
this.visible = false
|
|
|
}
|
|
|
- },
|
|
|
- computed: {},
|
|
|
- mounted() {}
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="less" scoped>
|