合同请款提醒重做

This commit is contained in:
Vergil
2020-03-26 17:06:38 +08:00
parent 6254e490ba
commit 809d6049ef
2 changed files with 44 additions and 19 deletions

View File

@@ -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: '采购管理_离线合同_更新查看状态_修改数据'
}
})
}

View File

@@ -32,7 +32,7 @@ import { getMaterial, getMaterial_NOTES, setChakan } from '@/api/PurchasingCente
import { initApproval, initApprovalOffline } from '@/api/PurchasingCenter/FundApproval' import { initApproval, initApprovalOffline } from '@/api/PurchasingCenter/FundApproval'
import { searchUrgentItem } from '@/api/ManufacturingCenter/InitialProduction' import { searchUrgentItem } from '@/api/ManufacturingCenter/InitialProduction'
import { searchTable1 as searchTableInvoice } from '@/api/PurchasingCenter/InvoiceSettlementApprove' 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 { getPickingList, setPickingList } from '@/api/Inventory/MaterialOut'
import { searchTable } from '@/api/PurchasingCenter/PurchaseMaterielModify' import { searchTable } from '@/api/PurchasingCenter/PurchaseMaterielModify'
export default { export default {
@@ -126,21 +126,21 @@ export default {
} }
}) })
if (this.token.toString() === '2') { if (this.token.toString() === '2') {
searchRequestFund(1, 9999, 0, 0, 0, 0, 0).then(res => { RequestFund().then(res => {
// if (res.data.length) { if (res.data[0].数量 > 0) {
// this.noticeContract2 = null this.noticeContract2 = null
// this.noticeContract2 = this.$notify.success({ this.noticeContract2 = this.$notify.success({
// title: '提示', title: '提示',
// message: '有合同请款申请审批结果,点击查看', message: '有合同请款申请审批结果,点击查看',
// onClick: () => { onClick: () => {
// setChakan().then(res => { setChakan2().then(res => {
// this.$router.push({ path: '/PurchasingCenter/PurchaseContractRequestFund' }) this.$router.push({ path: '/PurchasingCenter/PurchaseContractRequestFund' })
// setTimeout(this.noticeContract2.close(), 1000) setTimeout(this.noticeContract2.close(), 1000)
// }) })
// }, },
// duration: 1000 * 60 duration: 1000 * 60
// }) })
// } }
}) })
initApproval(1, 999, 1).then(res => { initApproval(1, 999, 1).then(res => {
if (res.data.rows.length) { if (res.data.rows.length) {
@@ -159,14 +159,14 @@ export default {
} }
}) })
} else if (this.token.toString() === '3') { } else if (this.token.toString() === '3') {
searchRequestFund(1, 99999, 0, 0, 0, 0, 0).then(res => { RequestFund().then(res => {
if (res.data.length) { if (res.data[0].数量 > 0) {
this.noticeContract4 = null this.noticeContract4 = null
this.noticeContract4 = this.$notify.success({ this.noticeContract4 = this.$notify.success({
title: '提示', title: '提示',
message: '有合同请款申请审批结果,点击查看', message: '有合同请款申请审批结果,点击查看',
onClick: () => { onClick: () => {
setChakan().then(res => { setChakan2().then(res => {
this.$router.push({ path: '/PurchasingCenter/PurchaseContractRequestFund' }) this.$router.push({ path: '/PurchasingCenter/PurchaseContractRequestFund' })
setTimeout(this.noticeContract4.close(), 1000) setTimeout(this.noticeContract4.close(), 1000)
}) })