|
@@ -44,7 +44,8 @@
|
|
:header-row-style="{ color: '#333333' }" style="
|
|
:header-row-style="{ color: '#333333' }" style="
|
|
border-left: 1px solid #ebeced;
|
|
border-left: 1px solid #ebeced;
|
|
border-right: 1px solid #ebeced;
|
|
border-right: 1px solid #ebeced;
|
|
- color: #333333;">
|
|
|
|
|
|
+ color: #333333;" :row-style="isCurrentDate"
|
|
|
|
+ @cell-mouse-enter="enter" @cell-mouse-leave="leave" >
|
|
<el-table-column label="业务类型" align="center">
|
|
<el-table-column label="业务类型" align="center">
|
|
<template slot-scope="{row}">
|
|
<template slot-scope="{row}">
|
|
<span>{{ row.businessType}}</span>
|
|
<span>{{ row.businessType}}</span>
|
|
@@ -544,6 +545,7 @@
|
|
<script>
|
|
<script>
|
|
import YPageListLayout from '@/components/YPageListLayout'
|
|
import YPageListLayout from '@/components/YPageListLayout'
|
|
import Breadcrumb from '@/components/Breadcrumb'
|
|
import Breadcrumb from '@/components/Breadcrumb'
|
|
|
|
+import utils from '@/utils/utils'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: 'invoiceCheck',
|
|
name: 'invoiceCheck',
|
|
@@ -690,10 +692,12 @@ export default {
|
|
}
|
|
}
|
|
}]
|
|
}]
|
|
},
|
|
},
|
|
|
|
+ currentDate:null
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.getList1();
|
|
this.getList1();
|
|
|
|
+ this.currentDate = new Date().getTime();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
|
|
@@ -999,7 +1003,66 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
})
|
|
})
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ isCurrentDate({row,rowIndex}){
|
|
|
|
+ var date = new Date(row.planMakeDate);
|
|
|
|
+ var date1 = date.getTime();
|
|
|
|
+ let styleJosn = {}
|
|
|
|
+ if (row.state=='审核中' && date1 > this.currentDate){
|
|
|
|
+ styleJosn.color = '#99a9bf'
|
|
|
|
+ }else{
|
|
|
|
+ styleJosn.color = 'red'
|
|
|
|
+ }
|
|
|
|
+ return styleJosn;
|
|
|
|
+ },
|
|
|
|
+ enter (row, column, cell) {
|
|
|
|
+ this.createTips(event, row, `当日开票`)
|
|
|
|
+ },
|
|
|
|
+ leave (row, column, cell) {
|
|
|
|
+ this.removeTips(row)
|
|
|
|
+ },
|
|
|
|
+ // 创建toolTip
|
|
|
|
+ createTips(el, row, value) {
|
|
|
|
+ var date = new Date(row.planMakeDate);
|
|
|
|
+ var date1 = date.getTime();
|
|
|
|
+ if (row.state=='审核中' && date1 <= this.currentDate){
|
|
|
|
+ const { detailId } = row
|
|
|
|
+ const tooltipDom = document.createElement('div')
|
|
|
|
+ tooltipDom.style.cssText = `
|
|
|
|
+ display: inline-block;
|
|
|
|
+ max-width: 400px;
|
|
|
|
+ max-height: 400px;
|
|
|
|
+ position: absolute;
|
|
|
|
+ top: ${el.clientY + 5}px;
|
|
|
|
+ left: ${el.clientX}px;
|
|
|
|
+ padding:5px 10px;
|
|
|
|
+ overflow: auto;
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ font-family: PingFangSC-Regular, PingFang SC;
|
|
|
|
+ font-weight: 400;
|
|
|
|
+ color: #595959;
|
|
|
|
+ background: #fff;
|
|
|
|
+ border-radius: 5px;
|
|
|
|
+ z-index: 19999;
|
|
|
|
+ box-shadow: 0 4px 12px 1px #ccc;
|
|
|
|
+ `
|
|
|
|
+ tooltipDom.innerHTML = value
|
|
|
|
+ tooltipDom.setAttribute('id', `tooltip-${detailId}`)
|
|
|
|
+ // 将浮层插入到body中
|
|
|
|
+ document.body.appendChild(tooltipDom)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ // 删除tooltip
|
|
|
|
+ removeTips(row) {
|
|
|
|
+ const { detailId } = row
|
|
|
|
+ const tooltipDomLeave = document.querySelectorAll(`#tooltip-${detailId}`)
|
|
|
|
+ if (tooltipDomLeave.length) {
|
|
|
|
+ tooltipDomLeave.forEach(dom => {
|
|
|
|
+ document.body.removeChild(dom)
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
},
|
|
},
|
|
|
|
|
|
}
|
|
}
|