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

@@ -120,7 +120,7 @@
size="small"
style="margin-left: 10px"
@click="pageCurrent=1;searchMaterial()">查询</el-button>
<el-button type="primary" style="margin-bottom: 3px;margin-top: 10px" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd()">申请</el-button>
<el-button type="primary" style="margin-bottom: 3px;margin-top: 10px" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd()">新增采购物料申请</el-button>
</el-col>
</el-row>
</el-card>

View File

@@ -132,7 +132,7 @@
</el-button>
<el-button type="primary" style="margin-bottom: 3px;margin-top: 10px" icon="el-icon-circle-plus-outline" size="small" @click="open()">新增供货商</el-button>
<el-badge :value="weishenhe" class="item">
<el-button type="primary" size="small" @click="daishenhe()">审核</el-button>
<el-button type="primary" size="small" @click="daishenhe()">采购物料审核</el-button>
</el-badge>
</el-col>
</el-row>

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