|
@@ -16,11 +16,12 @@
|
|
|
<a-form-item label="起止日期">
|
|
|
<a-range-picker
|
|
|
style="width: 100%"
|
|
|
- v-model="queryParam.timeRange"
|
|
|
- format="YYYY-MM-DD"
|
|
|
+ v-model="timeRange"
|
|
|
+ format="YYYY-MM"
|
|
|
+ :mode="mode2"
|
|
|
:placeholder="['开始时间', '结束时间']"
|
|
|
+ @panelChange="handlePanelChange2"
|
|
|
@change="onDateChange"
|
|
|
- @ok="onDateOk"
|
|
|
/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
@@ -112,7 +113,7 @@
|
|
|
:data-source="supplyCapacityData"
|
|
|
:loading="loading"
|
|
|
:pagination="pagination"
|
|
|
- :scroll="{ x: 1900,y: 500 }"
|
|
|
+ :scroll="{ x: 1800}"
|
|
|
@change="handleTableChange"
|
|
|
>
|
|
|
</a-table>
|
|
@@ -136,17 +137,19 @@ export default {
|
|
|
// let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
|
|
|
return {
|
|
|
description: '供应商产能报表',
|
|
|
+ mode2:['month', 'month'],
|
|
|
+ timeRange:[],
|
|
|
supplyCapacityColumns: [
|
|
|
{
|
|
|
title: '账套号',
|
|
|
- width: 80,
|
|
|
+ width: 60,
|
|
|
align: 'left',
|
|
|
dataIndex: 'account',
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '订单号',
|
|
|
- width: 140,
|
|
|
+ width: 150,
|
|
|
align: 'left',
|
|
|
dataIndex: 'csrccode',
|
|
|
className: 'replacecolor',
|
|
@@ -168,14 +171,14 @@ export default {
|
|
|
},
|
|
|
{ title: '部门', width: 80, dataIndex: 'cdepCode', className: 'replacecolor' },
|
|
|
{ title: '业务员', width: 80, dataIndex: 'cpersonCode', className: 'replacecolor' },
|
|
|
- { title: '供应商', width: 230, dataIndex: 'cvenCode', className: 'replacecolor'},
|
|
|
+ { title: '供应商', width: 250, dataIndex: 'cvenCode', className: 'replacecolor'},
|
|
|
|
|
|
{ title: '供应商类型', width: 80, dataIndex: 'cvenCodeType', className: 'replacecolor' },
|
|
|
{ title: '订单类型', width: 80, dataIndex: 'iorderType', className: 'replacecolor' },
|
|
|
|
|
|
{
|
|
|
title: '计划到货月份',
|
|
|
- width: 85,
|
|
|
+ width: 95,
|
|
|
dataIndex: 'darriveDate',
|
|
|
// customRender: text => {
|
|
|
// return moment(text).format('YYYY-MM')
|
|
@@ -193,7 +196,13 @@ export default {
|
|
|
// },
|
|
|
// className: 'replacecolor'
|
|
|
// },
|
|
|
- { title: '系数', width: 80, dataIndex: 'coefficient', className: 'replacecolor' },
|
|
|
+ { title: '工时(分)', width: 80, dataIndex: 'coefficient', className: 'replacecolor' },
|
|
|
+ {
|
|
|
+ title: '件数',
|
|
|
+ width: 70,
|
|
|
+ dataIndex: 'total',
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
{
|
|
|
title: '数量',
|
|
|
width: 70,
|
|
@@ -259,7 +268,7 @@ export default {
|
|
|
console.log('需导出的fileName:', fileName)
|
|
|
const params = this.supplyCapacityData
|
|
|
console.log('导出参数', params)
|
|
|
- downFile('/scas/supplierCapacity/excel1', params).then(data => {
|
|
|
+ downFile('/scas/supplierCapacity/excel1', this.queryParam).then(data => {
|
|
|
if (!data) {
|
|
|
this.$message.warning('文件下载失败')
|
|
|
return
|
|
@@ -285,7 +294,7 @@ export default {
|
|
|
console.log('需导出的fileName:', fileName)
|
|
|
const params = this.supplyCapacityData
|
|
|
console.log('导出参数', params)
|
|
|
- downFile('/scas/supplierCapacity/excel3', params).then(data => {
|
|
|
+ downFile('/scas/supplierCapacity/excel3', this.queryParamrams).then(data => {
|
|
|
if (!data) {
|
|
|
this.$message.warning('文件下载失败')
|
|
|
return
|
|
@@ -310,7 +319,7 @@ export default {
|
|
|
console.log('需导出的fileName:', fileName)
|
|
|
const params = this.supplyCapacityData
|
|
|
console.log('导出参数', params)
|
|
|
- downFile('/scas/supplierCapacity/excel2', params).then(data => {
|
|
|
+ downFile('/scas/supplierCapacity/excel2', this.queryParam).then(data => {
|
|
|
if (!data) {
|
|
|
this.$message.warning('文件下载失败')
|
|
|
return
|
|
@@ -348,6 +357,12 @@ export default {
|
|
|
this.queryParam.endDate = dateString[1]
|
|
|
console.log('起始日期', this.queryParam.startDate, this.queryParam.endDate)
|
|
|
},
|
|
|
+ handlePanelChange2(value,mode){
|
|
|
+ this.timeRange = value
|
|
|
+ this.mode2 = [mode[0] === 'date' ? 'month' : mode[0], mode[1] === 'date' ? 'month' : mode[1]];
|
|
|
+ this.queryParam.startDate = value[0].format('YYYY-MM')
|
|
|
+ this.queryParam.endDate = value[1].format('YYYY-MM')
|
|
|
+ },
|
|
|
onDateOk(value) {
|
|
|
console.log('value', value)
|
|
|
},
|