|
@@ -233,6 +233,7 @@ export default {
|
|
|
if(this.plat_cp_companies.length === 4){ this.plat_cp_companies = [{ value: "", label: "所有平台公司" }, ...this.plat_cp_companies] }
|
|
|
|
|
|
this.companyNo = this.plat_cp_companies[0].value;
|
|
|
+ // this.daytime = "2024-07-31"
|
|
|
this.daytime = this.transformTime();
|
|
|
this.requestData();
|
|
|
},
|
|
@@ -268,14 +269,26 @@ export default {
|
|
|
const oneDay = Number(division(total_tips, days)).toFixed(2);
|
|
|
const currentDay = dayjs(this.daytime).date();
|
|
|
const currentTotalTip = Number(multiplication(currentDay, oneDay)).toFixed(2);
|
|
|
+
|
|
|
+ console.log(current,currentTotalTip)
|
|
|
return Number(currentTotalTip) > Number(current) ? 'color: red' : '';
|
|
|
},
|
|
|
getTotalRateStyle(row, prop) {
|
|
|
const days = dayjs(this.daytime).daysInMonth();
|
|
|
const oneDay = Number(division(100, days)).toFixed(2);
|
|
|
const currentDay = dayjs(this.daytime).date();
|
|
|
- const currentTotalTip = Number(multiplication(currentDay, oneDay)).toFixed(2);
|
|
|
- const current = this.calcAmount(prop,row.companyNo)
|
|
|
+ let currentTotalTip = Number(multiplication(currentDay, oneDay))
|
|
|
+ currentTotalTip = Number(currentTotalTip > 100 ? 100 : currentTotalTip).toFixed(2)
|
|
|
+ let current = ''
|
|
|
+
|
|
|
+ if(prop === 'completion_rate'){
|
|
|
+ current = this.calcAmountCompletionRate(row.companyNo)
|
|
|
+ }{
|
|
|
+ current = this.calcAmountGrossCompletionRate(row.companyNo)
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if(String(current).indexOf('%')) current = current.replace('%','')
|
|
|
return Number(currentTotalTip) > Number(current) ? 'color:red' : ''
|
|
|
},
|
|
|
getCurrentRateStyle(current) {
|