|
@@ -9,22 +9,26 @@
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-item label="开始年月">
|
|
|
<!-- :disabled-date="disabledDate" 不可选择的日期 -->
|
|
|
- <a-month-picker
|
|
|
- placeholder="请选择开始年月"
|
|
|
- format="YYYY-MM"
|
|
|
+ <a-date-picker
|
|
|
+ placeholder="请选择开始年月日"
|
|
|
+ format="YYYY-MM-DD"
|
|
|
style="width:100%;"
|
|
|
v-model="queryParam.beginDate"
|
|
|
+ @change="orderDataChange"
|
|
|
+ :allowClear="false"
|
|
|
/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-item label="结束年月">
|
|
|
- <a-month-picker
|
|
|
+ <a-date-picker
|
|
|
placeholder="请选择结束年月"
|
|
|
- format="YYYY-MM"
|
|
|
+ format="YYYY-MM-DD"
|
|
|
style="width:100%;"
|
|
|
v-model="queryParam.endDate"
|
|
|
+ @change="orderDataChange"
|
|
|
+ :allowClear="false"
|
|
|
/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
@@ -207,7 +211,10 @@ export default {
|
|
|
title: '交期',
|
|
|
dataIndex: 'deliveryDate',
|
|
|
width: 120,
|
|
|
- className: 'replacecolor'
|
|
|
+ className: 'replacecolor',
|
|
|
+ customRender: text => {
|
|
|
+ return moment(text).format('YYYY-MM-DD')
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
title: '部门',
|
|
@@ -262,20 +269,30 @@ export default {
|
|
|
dataIndex: 'estimatedDeliveryDate',
|
|
|
width: 120,
|
|
|
customRender: t => ellipsis(t),
|
|
|
- className: 'replacecolor'
|
|
|
+ className: 'replacecolor',
|
|
|
+ customRender: text => {
|
|
|
+ return moment(text).format('YYYY-MM-DD')
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
{
|
|
|
title: '最早出库日期',
|
|
|
dataIndex: 'earliestIssueDate',
|
|
|
width: 120,
|
|
|
- className: 'replacecolor'
|
|
|
+ className: 'replacecolor',
|
|
|
+ customRender: text => {
|
|
|
+ return moment(text).format('YYYY-MM-DD')
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
title: '最晚出库日期',
|
|
|
dataIndex: 'latestIssueDate',
|
|
|
width: 120,
|
|
|
- className: 'replacecolor'
|
|
|
+ className: 'replacecolor',
|
|
|
+ customRender: text => {
|
|
|
+ return moment(text).format('YYYY-MM-DD')
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
{
|
|
|
title: '出库率',
|
|
@@ -336,14 +353,8 @@ export default {
|
|
|
getfullrateData(){
|
|
|
this.$nextTick(() => {
|
|
|
fullRateList(this.queryParam).then(res => {
|
|
|
- debugger
|
|
|
if (res.success) {
|
|
|
this.fullrateData = res.result.records;
|
|
|
- this.pagination = {
|
|
|
- total: res.result.total,
|
|
|
- current: res.result.current,
|
|
|
- pageSize: res.result.size
|
|
|
- }
|
|
|
}else{
|
|
|
this.$message.error(res.message);
|
|
|
}
|
|
@@ -372,13 +383,27 @@ export default {
|
|
|
},
|
|
|
|
|
|
searchQuery() {
|
|
|
- if(this.queryParam.beginDate !=='' && this.queryParam.beginDate){
|
|
|
- this.queryParam.beginDate = moment(this.queryParam.beginDate).startOf("month").format("YYYY-MM-DD");
|
|
|
- }
|
|
|
- if(this.queryParam.endDate !=='' && this.queryParam.endDate){
|
|
|
- this.queryParam.endDate = moment(this.queryParam.endDate).endOf("month").format("YYYY-MM-DD");
|
|
|
+ console.log(this.queryParam)
|
|
|
+ debugger
|
|
|
+ if(this.queryParam.beginDate == '' || !this.queryParam.beginDate){
|
|
|
+ debugger
|
|
|
+ this.$message.error('请选择开始日期');
|
|
|
+ }else if(this.queryParam.endDate == '' || !this.queryParam.endDate){
|
|
|
+ this.$message.error('请选择结束日期');
|
|
|
+ }else{
|
|
|
+ debugger
|
|
|
+ var separator = "-"; //日期分隔符
|
|
|
+ var beginDates = this.queryParam.beginDate.split(separator);
|
|
|
+ var endDates = this.queryParam.endDate.split(separator);
|
|
|
+ var beginDate = new Date(beginDates[0], beginDates[1]-1, beginDates[2]);
|
|
|
+ var endDate = new Date(endDates[0], endDates[1]-1, endDates[2]);
|
|
|
+ var timeInterval= parseInt(Math.abs(endDate - beginDate ) / 1000 / 60 / 60 /24) + 1;
|
|
|
+ if(timeInterval > 31){
|
|
|
+ this.$message.error('时间间隔超过31天,请重新选择!');
|
|
|
+ }else {
|
|
|
+ this.getfullrateData()
|
|
|
+ }
|
|
|
}
|
|
|
- this.getfullrateData()
|
|
|
},
|
|
|
// 重置
|
|
|
searchReset() {
|
|
@@ -389,19 +414,21 @@ export default {
|
|
|
var iSOsID = record.soIDsID.toString()
|
|
|
fullRateDestail({iSOsID}).then(res => {
|
|
|
if (res.success) {
|
|
|
+ debugger
|
|
|
this.$refs.detail.detailModVis = true
|
|
|
- this.$refs.detail.detailData = res.result.record
|
|
|
- this.pagination = {
|
|
|
- total: res.result.total,
|
|
|
- current: res.result.current,
|
|
|
- pageSize: res.result.size
|
|
|
- }
|
|
|
+ res.result.map(item =>{item.deliveryDate = moment(item.deliveryDate).format("YYYY-MM-DD")})
|
|
|
+ this.$refs.detail.detailData = res.result
|
|
|
+
|
|
|
}else{
|
|
|
this.$message.error(res.message);
|
|
|
}
|
|
|
|
|
|
})
|
|
|
},
|
|
|
+ orderDataChange(){
|
|
|
+ this.queryParam.beginDate = moment(this.queryParam.beginDate).format("YYYY-MM-DD")
|
|
|
+ this.queryParam.endDate = moment(this.queryParam.endDate).format("YYYY-MM-DD")
|
|
|
+ },
|
|
|
|
|
|
// 选中行
|
|
|
// onSelectChange(keys, rows) {
|