|
@@ -78,18 +78,18 @@
|
|
|
<a-card :bordered="false" style="marginTop:10px;">
|
|
|
<div class="table-operator">
|
|
|
<a-button type="primary" @click="handleExportXls('供应链产能报表')" icon="download">合并导出</a-button>
|
|
|
- <a-button type="primary" @click="monthlySupplyExport" icon="download">月份供应商合计导出</a-button>
|
|
|
- <a-button type="primary" @click="monthlyDepartExport" icon="download">月份部门合计导出</a-button>
|
|
|
+ <a-button type="primary" @click="monthSupplyExport" icon="download">月份供应商合计导出</a-button>
|
|
|
+ <a-button type="primary" @click="monthDepartExport" icon="download">月份部门合计导出</a-button>
|
|
|
</div>
|
|
|
|
|
|
- <!-- 合计 table rowKey="id" :scroll="{ x: 1500 }" -->
|
|
|
+ <!-- 合计 table rowKey="id" :scroll="{ x: 1500 }" :pagination="ipagination -->
|
|
|
<a-table
|
|
|
bordered
|
|
|
:row-key="record => record.id"
|
|
|
:columns="supplyCapacityColumns"
|
|
|
:data-source="supplyCapacityData"
|
|
|
:loading="loading"
|
|
|
- :pagination="ipagination"
|
|
|
+ :pagination="pagination"
|
|
|
@change="handleTableChange"
|
|
|
>
|
|
|
</a-table>
|
|
@@ -102,7 +102,7 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
|
import JEllipsis from '@/components/jeecg/JEllipsis'
|
|
|
import moment from 'moment'
|
|
|
|
|
|
-import { supplyCapList, monthlySupplyXls } from '@api/reportForms/supply-capacity-table'
|
|
|
+import { supplyCapList, handleXls, monthSupplyXls, monthDepartXls } from '@api/reportForms/supply-capacity-table'
|
|
|
|
|
|
export default {
|
|
|
name: 'SupplyCapacityTable', // 供应商产能报表
|
|
@@ -185,20 +185,19 @@ export default {
|
|
|
cVenCode: '',
|
|
|
cPlanLotNumber: '',
|
|
|
pageNo: '', // 当前页
|
|
|
- pageSize: '-1' // 页面大小
|
|
|
},
|
|
|
// 分页
|
|
|
pagination: {
|
|
|
- total: '',
|
|
|
- current: 0,
|
|
|
- pageSize: 0
|
|
|
+ // total: '',
|
|
|
+ // current: 0,
|
|
|
+ // pageSize: 0
|
|
|
},
|
|
|
dateFormat: 'YYYY-MM-DD'
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.getSupplyCapList() // 渲染供应链产能报表
|
|
|
- console.log('000');
|
|
|
+ this.getSupplyCapList() // 渲染 供应链产能报表
|
|
|
+ console.log('000')
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
@@ -206,18 +205,35 @@ export default {
|
|
|
getSupplyCapList() {
|
|
|
this.$nextTick(() => {
|
|
|
supplyCapList(this.queryParam).then(res => {
|
|
|
- console.log('111');
|
|
|
+ console.log('111')
|
|
|
if (res.success) {
|
|
|
- console.log('222');
|
|
|
- console.log('查询结果:', res.result)
|
|
|
- this.supplyCapacityData = res.result
|
|
|
+ console.log('222')
|
|
|
+ this.supplyCapacityData = res.result.records
|
|
|
+ console.log('【供应商产能报表数据】:', this.supplyCapacityData)
|
|
|
+ this.pagination = {
|
|
|
+ total: res.result.total,
|
|
|
+ current: res.result.current,
|
|
|
+ pageSize: res.result.size
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
+ //合并导出
|
|
|
+ handleExportXls() {
|
|
|
+ handleXls().then(res => {
|
|
|
+ console.log('000')
|
|
|
+ if (res.success) {
|
|
|
+ console.log('月份供应链合计导出', res.result)
|
|
|
+ console.log('请求接口成功')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
// 月份供应链合计导出
|
|
|
- monthlySupplyExport() {
|
|
|
- monthlySupplyXls().then(res => {
|
|
|
+ monthSupplyExport() {
|
|
|
+ monthSupplyXls().then(res => {
|
|
|
console.log('000')
|
|
|
if (res.success) {
|
|
|
console.log('月份供应链合计导出', res.result)
|
|
@@ -226,20 +242,36 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
// 月份部门合计导出
|
|
|
- monthlyDepartExport() {},
|
|
|
+ monthDepartExport() {
|
|
|
+ monthDepartXls().then(res => {
|
|
|
+ console.log('000')
|
|
|
+ if (res.success) {
|
|
|
+ console.log('月份供应链合计导出', res.result)
|
|
|
+ console.log('请求接口成功')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
// 查询按钮
|
|
|
searchQuery() {
|
|
|
this.getSupplyCapList()
|
|
|
},
|
|
|
searchReset() {
|
|
|
- // console.log('>>>>重置')
|
|
|
this.queryParam = {}
|
|
|
this.getSupplyCapList()
|
|
|
+ },
|
|
|
+
|
|
|
+ // 分页变化时触发
|
|
|
+ handleTableChange(pagination, filters, sorter) {
|
|
|
+ console.log('分页器信息', pagination)
|
|
|
+ if (Object.keys(sorter).length > 0) {
|
|
|
+ this.isorter.column = sorter.field
|
|
|
+ this.isorter.order = sorter.order == 'ascend' ? 'asc' : 'desc'
|
|
|
+ }
|
|
|
+ this.queryParam.pageNo = pagination.current
|
|
|
+ this.getSupplyCapList()
|
|
|
}
|
|
|
- },
|
|
|
- computed: {},
|
|
|
- mounted() {}
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="less" scoped>
|