This commit is contained in:
zhangdingyu
2019-10-12 17:25:52 +08:00
parent fee437d2d5
commit 9f836fb06b
3 changed files with 24 additions and 2 deletions

View File

@@ -28,6 +28,7 @@ import { mapGetters } from 'vuex'
import Breadcrumb from '@/components/Breadcrumb'
import Hamburger from '@/components/Hamburger'
import { searchTable1 } from '@/api/PurchasingCenter/PurchaseContractApproval'
import { getMaterial } from '@/api/PurchasingCenter/MaterialManagement'
import { initApproval, initApprovalOffline } from '@/api/PurchasingCenter/FundApproval'
import { searchTable1 as searchTableInvoice } from '@/api/PurchasingCenter/InvoiceSettlementApprove'
export default {
@@ -57,11 +58,32 @@ export default {
this.checkApproval()
this.timer = setInterval(this.checkApproval, 1000 * 60 * 5)
}
if (this.id.toString() === '11') {
this.comfirmMaterial()
this.timer = setInterval(this.comfirmMaterial, 1000 * 60 * 5)
}
},
beforeDestroy() {
clearInterval(this.timer)
},
methods: {
comfirmMaterial() {
getMaterial().then(res => {
console.log(res)
if (res.data.total) {
this.noticeContract = null
this.noticeContract = this.$notify.success({
title: '提示',
message: '您有采购物料申请待审批,请及时处理,点击查看',
onClick: () => {
this.$router.push({ path: '/PurchasingCenter/MaterialManagement' })
setTimeout(this.noticeContract.close(), 1000)
},
duration: 1000 * 60
})
}
})
},
checkApproval() {
searchTable1(1, 999, 0, null, null, 0, 0, 0, 0, 0, 0).then(res => {
if (res.data.total) {