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) })