From 809d6049efb836214c7e538d66cfeb4b59503cd7 Mon Sep 17 00:00:00 2001 From: Vergil <974548713@qq.com> Date: Thu, 26 Mar 2020 17:06:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=90=8C=E8=AF=B7=E6=AC=BE=E6=8F=90?= =?UTF-8?q?=E9=86=92=E9=87=8D=E5=81=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PurchaseContractRequestFund.js | 25 ++++++++++++ src/views/layout/components/Navbar.vue | 38 +++++++++---------- 2 files changed, 44 insertions(+), 19 deletions(-) diff --git a/src/api/PurchasingCenter/PurchaseContractRequestFund.js b/src/api/PurchasingCenter/PurchaseContractRequestFund.js index 1d7928ef..b8b9fc57 100644 --- a/src/api/PurchasingCenter/PurchaseContractRequestFund.js +++ b/src/api/PurchasingCenter/PurchaseContractRequestFund.js @@ -113,3 +113,28 @@ export function searchPurchaseContract(check1, check, num) { } }) } +// 请款审批查看状态 +export function RequestFund() { + return request({ + url: '', + method: 'post', + data: { + UserID: state.state.user.id, + ModularID: router.currentRoute.path, + type: '1', + name: '采购管理_离线合同_请款查看状态_查询数据' + } + }) +} +export function setChakan2() { + return request({ + url: '', + method: 'post', + data: { + UserID: state.state.user.id, + ModularID: router.currentRoute.path, + type: '2', + name: '采购管理_离线合同_更新查看状态_修改数据' + } + }) +} diff --git a/src/views/layout/components/Navbar.vue b/src/views/layout/components/Navbar.vue index 433377e8..bb3b5976 100644 --- a/src/views/layout/components/Navbar.vue +++ b/src/views/layout/components/Navbar.vue @@ -32,7 +32,7 @@ import { getMaterial, getMaterial_NOTES, setChakan } from '@/api/PurchasingCente import { initApproval, initApprovalOffline } from '@/api/PurchasingCenter/FundApproval' import { searchUrgentItem } from '@/api/ManufacturingCenter/InitialProduction' import { searchTable1 as searchTableInvoice } from '@/api/PurchasingCenter/InvoiceSettlementApprove' -import { searchRequestFund } from '@/api/PurchasingCenter/PurchaseContractRequestFund' +import { RequestFund, setChakan2 } from '@/api/PurchasingCenter/PurchaseContractRequestFund' import { getPickingList, setPickingList } from '@/api/Inventory/MaterialOut' import { searchTable } from '@/api/PurchasingCenter/PurchaseMaterielModify' export default { @@ -126,21 +126,21 @@ export default { } }) if (this.token.toString() === '2') { - searchRequestFund(1, 9999, 0, 0, 0, 0, 0).then(res => { - // if (res.data.length) { - // this.noticeContract2 = null - // this.noticeContract2 = this.$notify.success({ - // title: '提示', - // message: '有合同请款申请审批结果,点击查看', - // onClick: () => { - // setChakan().then(res => { - // this.$router.push({ path: '/PurchasingCenter/PurchaseContractRequestFund' }) - // setTimeout(this.noticeContract2.close(), 1000) - // }) - // }, - // duration: 1000 * 60 - // }) - // } + RequestFund().then(res => { + if (res.data[0].数量 > 0) { + this.noticeContract2 = null + this.noticeContract2 = this.$notify.success({ + title: '提示', + message: '有合同请款申请审批结果,点击查看', + onClick: () => { + setChakan2().then(res => { + this.$router.push({ path: '/PurchasingCenter/PurchaseContractRequestFund' }) + setTimeout(this.noticeContract2.close(), 1000) + }) + }, + duration: 1000 * 60 + }) + } }) initApproval(1, 999, 1).then(res => { if (res.data.rows.length) { @@ -159,14 +159,14 @@ export default { } }) } else if (this.token.toString() === '3') { - searchRequestFund(1, 99999, 0, 0, 0, 0, 0).then(res => { - if (res.data.length) { + RequestFund().then(res => { + if (res.data[0].数量 > 0) { this.noticeContract4 = null this.noticeContract4 = this.$notify.success({ title: '提示', message: '有合同请款申请审批结果,点击查看', onClick: () => { - setChakan().then(res => { + setChakan2().then(res => { this.$router.push({ path: '/PurchasingCenter/PurchaseContractRequestFund' }) setTimeout(this.noticeContract4.close(), 1000) })