|
|
@ -6,7 +6,6 @@ const formatCurrentAndLastMonthDay = () => { |
|
|
|
const year = today.getFullYear(); |
|
|
|
const month = today.getMonth() + 1; |
|
|
|
const day = today.getDate(); |
|
|
|
|
|
|
|
// 上个月的日期
|
|
|
|
const lastMonthDate = new Date(year, month - 1, day); |
|
|
|
const lastYear = lastMonthDate.getFullYear(); |
|
|
@ -23,25 +22,122 @@ Component({ |
|
|
|
type: String, |
|
|
|
value: '1', |
|
|
|
observer: function () { |
|
|
|
const { currentDay, lastMonthDay } = formatCurrentAndLastMonthDay(); |
|
|
|
console.log(currentDay, lastMonthDay, "sdflkjdslfkj"); |
|
|
|
this.setData({ |
|
|
|
day: lastMonthDay, |
|
|
|
day2: currentDay |
|
|
|
}) |
|
|
|
console.log(this.data.day, this.data.day2, "123"); |
|
|
|
this.getList(); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
data: { |
|
|
|
orderBy:"", |
|
|
|
sortList:[ |
|
|
|
{ |
|
|
|
lable:"收件数", |
|
|
|
value:1, |
|
|
|
type:0 //0为正常排序, 1为正序,2为倒叙
|
|
|
|
}, |
|
|
|
{ |
|
|
|
lable:"不满意", |
|
|
|
value:2, |
|
|
|
type:0 |
|
|
|
}, |
|
|
|
{ |
|
|
|
lable:"未解决", |
|
|
|
value:3, |
|
|
|
type:0 |
|
|
|
}, |
|
|
|
{ |
|
|
|
lable:"退件次数", |
|
|
|
value:4, |
|
|
|
type:0 |
|
|
|
}, |
|
|
|
{ |
|
|
|
lable:"超期退件", |
|
|
|
value:5, |
|
|
|
type:0 |
|
|
|
}, |
|
|
|
], |
|
|
|
list: [], |
|
|
|
sortNameList: [ |
|
|
|
{ |
|
|
|
label:"total", |
|
|
|
value:1 |
|
|
|
}, |
|
|
|
{ |
|
|
|
label:"notSatisfiedTotal", |
|
|
|
value:2 |
|
|
|
}, |
|
|
|
{ |
|
|
|
label:"unresolveTotal", |
|
|
|
value:3 |
|
|
|
}, |
|
|
|
{ |
|
|
|
label:"overTimeTotal", |
|
|
|
value:4 |
|
|
|
}, |
|
|
|
{ |
|
|
|
label:"returnTotal", |
|
|
|
value:5 |
|
|
|
}, |
|
|
|
], |
|
|
|
day: '', |
|
|
|
day2: '', |
|
|
|
showitem: 3, |
|
|
|
}, |
|
|
|
ready() { |
|
|
|
const { currentDay, lastMonthDay } = formatCurrentAndLastMonthDay(); |
|
|
|
console.log(currentDay,lastMonthDay,"sdflkjdslfkj"); |
|
|
|
this.setData({ |
|
|
|
day:lastMonthDay, |
|
|
|
day2: currentDay |
|
|
|
}) |
|
|
|
console.log(this.data.day,this.data.day2,"123"); |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
toSort(value){ |
|
|
|
let sortlist= value.currentTarget.dataset.sortlist |
|
|
|
const evenNumbers= this.data.sortNameList.filter(item=>{ |
|
|
|
return item.value===sortlist.value |
|
|
|
})[0].label |
|
|
|
if (this.data.sortList[sortlist.value-1].type==1) { |
|
|
|
this.data.sortList[sortlist.value-1].type=2 |
|
|
|
this.setData({ |
|
|
|
sortList:this.data.sortList, |
|
|
|
orderBy:evenNumbers+"Down" |
|
|
|
} |
|
|
|
) |
|
|
|
}else if (this.data.sortList[sortlist.value-1].type==2) { |
|
|
|
let sortlist= value.currentTarget.dataset.sortlist |
|
|
|
this.data.sortList[sortlist.value-1].type=1 |
|
|
|
this.setData({ |
|
|
|
sortList:this.data.sortList, |
|
|
|
orderBy:evenNumbers+"Up" |
|
|
|
|
|
|
|
} |
|
|
|
) |
|
|
|
}else{ |
|
|
|
this.data.sortList.map(item=>{ |
|
|
|
if (item.type==1||item.type==2) { |
|
|
|
item.type=0 |
|
|
|
} |
|
|
|
}) |
|
|
|
let sortlist= value.currentTarget.dataset.sortlist |
|
|
|
this.data.sortList[sortlist.value-1].type=1 |
|
|
|
this.setData({ |
|
|
|
sortList:this.data.sortList, |
|
|
|
orderBy:evenNumbers+"Up" |
|
|
|
} |
|
|
|
) |
|
|
|
} |
|
|
|
this.getEventList() |
|
|
|
}, |
|
|
|
|
|
|
|
toNumber(data) { |
|
|
|
let type=data.currentTarget.dataset.type |
|
|
|
let staffId=data.currentTarget.dataset.staffid |
|
|
@ -90,9 +186,11 @@ Component({ |
|
|
|
} |
|
|
|
}, |
|
|
|
getEventList(deptFlag) { |
|
|
|
console.log(this.data.day,this.data.day2,"这里的值"); |
|
|
|
let parm = { |
|
|
|
orderBy: this.data.orderBy, |
|
|
|
startDate: this.data.day.toString() + ' ' + '00:00:00', |
|
|
|
endDate: this.data.day2.toString() + ' ' + '23:59:59', |
|
|
|
endDate: this.data.day2.toString() + ' ' + '23:59:59', |
|
|
|
usableFlag: true, |
|
|
|
} |
|
|
|
|
|
|
@ -100,7 +198,7 @@ Component({ |
|
|
|
parm.recountFlag=1 |
|
|
|
} |
|
|
|
event12345Rates(parm).then(res => { |
|
|
|
console.log('++++++++++++',res.data) |
|
|
|
console.log(res.data) |
|
|
|
// res.data.list.forEach(item => {
|
|
|
|
// item.reportTime = this.formatTime(item.reportTime)
|
|
|
|
// })
|
|
|
|