diff --git a/src/api/PurchasingCenter/MaterialManagement.js b/src/api/PurchasingCenter/MaterialManagement.js index 9845ba63..97f1e973 100644 --- a/src/api/PurchasingCenter/MaterialManagement.js +++ b/src/api/PurchasingCenter/MaterialManagement.js @@ -259,3 +259,23 @@ export function Tongguo(num) { } }) } +export function getMaterial_NOTES() { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '库存管理_物料主文件_基本_采购部_未查看' + } + }) +} +export function setChakan() { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '库存管理_物料主文件_基本_采购部_查看变更' + } + }) +} diff --git a/src/views/layout/components/Navbar.vue b/src/views/layout/components/Navbar.vue index ceb6d264..c47317c7 100644 --- a/src/views/layout/components/Navbar.vue +++ b/src/views/layout/components/Navbar.vue @@ -28,7 +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 { getMaterial, getMaterial_NOTES, setChakan } from '@/api/PurchasingCenter/MaterialManagement' import { initApproval, initApprovalOffline } from '@/api/PurchasingCenter/FundApproval' import { searchTable1 as searchTableInvoice } from '@/api/PurchasingCenter/InvoiceSettlementApprove' export default { @@ -61,12 +61,33 @@ export default { } else if (this.token.toString() === '11' || this.token.toString() === '12') { this.comfirmMaterial() this.timer = setInterval(this.comfirmMaterial, 1000 * 60 * 5) + } else if (this.token.toString() === '2' || this.token.toString() === '3') { + this.comfirmMaterial_CG() + this.timer = setInterval(this.comfirmMaterial_CG, 1000 * 60 * 5) } }, beforeDestroy() { clearInterval(this.timer) }, methods: { + comfirmMaterial_CG() { + getMaterial_NOTES().then(res => { + if (res.data.length) { + this.noticeContract = null + this.noticeContract = this.$notify.success({ + title: '提示', + message: '有新采购物料审批结果,点击查看', + onClick: () => { + setChakan().then(res => { + this.$router.push({ path: '/PurchasingCenter/MaterialMProcure' }) + setTimeout(this.noticeContract.close(), 1000) + }) + }, + duration: 1000 * 60 + }) + } + }) + }, comfirmMaterial() { getMaterial().then(res => { if (res.data.length) {