|
@@ -13,15 +13,17 @@
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
- <a-form-item label="起止日期">
|
|
|
+ <a-form-item label="起止月份">
|
|
|
<a-range-picker
|
|
|
style="width: 100%"
|
|
|
v-model="timeRange"
|
|
|
format="YYYY-MM"
|
|
|
+ valueFormat="YYYY-MM"
|
|
|
:mode="mode2"
|
|
|
+ :open="open"
|
|
|
:placeholder="['开始时间', '结束时间']"
|
|
|
@panelChange="handlePanelChange2"
|
|
|
- @change="onDateChange"
|
|
|
+ @openChange="onDateChange"
|
|
|
/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
@@ -227,6 +229,7 @@ export default {
|
|
|
pageNo: '1',
|
|
|
pageSize: '10'
|
|
|
},
|
|
|
+ open:false,
|
|
|
// 分页
|
|
|
pagination: {
|
|
|
// total: '',
|
|
@@ -237,10 +240,19 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
+ this.getData()
|
|
|
this.getSupplyCapList() // 渲染 供应链产能报表
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ getData(){
|
|
|
+ var month = moment(moment(new Date()).format('YYYY-MM'))
|
|
|
+ var year =new Date().getFullYear()
|
|
|
+ year = moment(year+'-'+'12')
|
|
|
+ this.timeRange=[month,year]
|
|
|
+ this.queryParam.startDate = this.timeRange[0].format('YYYY-MM')
|
|
|
+ this.queryParam.endDate = this.timeRange[1].format('YYYY-MM')
|
|
|
+ },
|
|
|
// 供应商产能数据
|
|
|
getSupplyCapList() {
|
|
|
this.$nextTick(() => {
|
|
@@ -349,15 +361,22 @@ export default {
|
|
|
this.queryParam = {
|
|
|
CVenCodeType:'成衣厂'
|
|
|
}
|
|
|
+ this.getData()
|
|
|
this.getSupplyCapList()
|
|
|
},
|
|
|
// 查询条件 月范围份转换成字符串并赋值
|
|
|
- onDateChange(value, dateString) {
|
|
|
- this.queryParam.startDate = dateString[0]
|
|
|
- this.queryParam.endDate = dateString[1]
|
|
|
- console.log('起始日期', this.queryParam.startDate, this.queryParam.endDate)
|
|
|
+ onDateChange(status) {
|
|
|
+ if(status){
|
|
|
+ this.open = true;
|
|
|
+ }else{
|
|
|
+ this.open = false
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
handlePanelChange2(value,mode){
|
|
|
+ if (this.timeRange[1] && this.timeRange[1]._d != value[1]._d) {
|
|
|
+ this.open = false;
|
|
|
+ }
|
|
|
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')
|