|
|
|
|
@ -85,20 +85,21 @@
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div class="slot-btns">
|
|
|
|
|
<Button class="slot-btns-item" type="primary" size="small" @click="$refs['paymentRegistration'].isShowPaymentRegistration = true,$refs['paymentRegistration'].getContract(scope.row)">付款登记</Button>
|
|
|
|
|
<template v-if="scope.row.status === 1">
|
|
|
|
|
<template v-if="scope.row.status === 1 && scope.row.join_status === 3">
|
|
|
|
|
<Button class="slot-btns-item" type="primary" size="small" @click="$refs['contractSign'].isShow = true,$refs['contractSign'].contractId = scope.row.id">签订合同</Button>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-if="scope.row.invite_status === 1">
|
|
|
|
|
<template v-if="scope.row.invite_status === 1 && scope.row.purchase_status === 3">
|
|
|
|
|
<Button class="slot-btns-item" type="primary" size="small" @click="bidding(scope.row)">招标文件审查</Button>
|
|
|
|
|
</template>
|
|
|
|
|
<Button class="slot-btns-item" type="primary" size="small">附件管理</Button>
|
|
|
|
|
<template v-if="scope.row.req_status === 1 && scope.row.is_plan === 0">
|
|
|
|
|
<Button class="slot-btns-item" type="primary" size="small" @click="askProcess(scope.row)">请示流程</Button>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-if="scope.row.join_status === 1">
|
|
|
|
|
<template v-if="scope.row.join_status === 1 && scope.row.invite_status === 3">
|
|
|
|
|
<Button class="slot-btns-item" type="primary" size="small" @click="signProcess(scope.row)">合同会签流程申请</Button>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-if="scope.row.purchase_status === 1">
|
|
|
|
|
<template
|
|
|
|
|
v-if="scope.row.purchase_status === 1 && ((scope.row.req_status === 3 && scope.row.is_plan === 0)||scope.row.is_plan === 1)">
|
|
|
|
|
<Button class="slot-btns-item" type="primary" size="small" @click="buyProcess(scope.row)">采购流程申请</Button>
|
|
|
|
|
</template>
|
|
|
|
|
<Poptip
|
|
|
|
|
@ -108,12 +109,15 @@
|
|
|
|
|
title="确认要删除吗"
|
|
|
|
|
@on-ok="()=>deleteContract(scope.row.id)">
|
|
|
|
|
<i-button
|
|
|
|
|
class="slot-btns-item"
|
|
|
|
|
type="error"
|
|
|
|
|
size="small"
|
|
|
|
|
ghost>删除</i-button>
|
|
|
|
|
</Poptip>
|
|
|
|
|
<Button class="slot-btns-item" type="primary" size="small" @click="$refs['detailContract'].isShowDetail = true,$refs['detailContract'].getDetail(scope.row.id)">查看</Button>
|
|
|
|
|
<Button class="slot-btns-item" type="primary" size="small" @click="$refs['editor'].isShowEditor = true,$refs['editor'].getDetail(scope.row.id)">编辑</Button>
|
|
|
|
|
<template v-if="scope.row.status != 2">
|
|
|
|
|
<Button class="slot-btns-item" type="primary" size="small" @click="$refs['editor'].isShowEditor = true,$refs['editor'].getDetail(scope.row.id)">编辑</Button>
|
|
|
|
|
</template>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
@ -210,7 +214,7 @@
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>关联预算计划
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<div class="contract-add-plan" style="width: 300px;" @click="isShowPlan = true,getBudgets()">
|
|
|
|
|
<div class="contract-add-plan" style="width: 300px;" @click="showPlan">
|
|
|
|
|
<template v-if="form.plan.length > 0">
|
|
|
|
|
<template v-for="item in form.plan">
|
|
|
|
|
<Tag closable color="primary" @on-close="delPlan(item)">{{item.label}}</Tag>
|
|
|
|
|
@ -230,7 +234,7 @@
|
|
|
|
|
<template v-slot:normalContent>
|
|
|
|
|
<Input v-model="planSearch" search enter-button="搜 索" placeholder="搜索预算计划.." @on-search="getBudgets"/>
|
|
|
|
|
|
|
|
|
|
<xy-table :list="plans" :show-index="false" :table-item="planTable" :height="300" style="margin-top: 10px;">
|
|
|
|
|
<xy-table :list="plans" :show-index="false" :table-item="planTable" :height="300" style="margin-top: 10px;" ref="planTable" @select="selectPlan">
|
|
|
|
|
<template v-slot:btns>
|
|
|
|
|
<el-table-column label="使用金额" header-align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
@ -277,6 +281,7 @@ import editor from "./components/editorContract"
|
|
|
|
|
import detail from "./components/detailContract"
|
|
|
|
|
import paymentRegistration from "./components/paymentRegistration";
|
|
|
|
|
import contractSign from "@/views/contract/components/contractSign";
|
|
|
|
|
import {login} from "@/api/user";
|
|
|
|
|
export default {
|
|
|
|
|
components:{
|
|
|
|
|
editor,
|
|
|
|
|
@ -499,15 +504,9 @@ export default {
|
|
|
|
|
|
|
|
|
|
planTable:[
|
|
|
|
|
{
|
|
|
|
|
sortable:false,
|
|
|
|
|
width:36,
|
|
|
|
|
customFn:(row)=>{
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<Checkbox on={{['on-change']:(e)=>this.selectPlan(e,row)}}></Checkbox>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
width: 36,
|
|
|
|
|
sortable: false,
|
|
|
|
|
type:'selection'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label:"分类",
|
|
|
|
|
@ -705,24 +704,43 @@ export default {
|
|
|
|
|
this.total = res.total
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//新建合同
|
|
|
|
|
//显示
|
|
|
|
|
async showPlan(){
|
|
|
|
|
this.isShowPlan = true
|
|
|
|
|
await this.getBudgets()
|
|
|
|
|
this.toggleSelection(this.form.plan.map(item => {
|
|
|
|
|
return item.value.plan_id
|
|
|
|
|
}))
|
|
|
|
|
},
|
|
|
|
|
//选择计划
|
|
|
|
|
selectPlan(e,row){
|
|
|
|
|
if(e){
|
|
|
|
|
this.form.plan.push({
|
|
|
|
|
label:row.name,
|
|
|
|
|
value:{
|
|
|
|
|
plan_id:row.id,
|
|
|
|
|
use_money:row.useMoney ?? row.money,
|
|
|
|
|
new_money:row.money
|
|
|
|
|
selectPlan(sel,row){
|
|
|
|
|
if(sel){
|
|
|
|
|
this.form.plan = sel.map(item => {
|
|
|
|
|
return {
|
|
|
|
|
label:item.name,
|
|
|
|
|
value:{
|
|
|
|
|
plan_id:item.id,
|
|
|
|
|
use_money:item.useMoney ?? item.money,
|
|
|
|
|
new_money:item.money
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.form.plan.map((item,index)=>{
|
|
|
|
|
if(item.value.plan_id === row.id){
|
|
|
|
|
this.form.plan.splice(index,1)
|
|
|
|
|
}
|
|
|
|
|
this.form.plan = []
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//默认选择计划
|
|
|
|
|
toggleSelection(plans) {
|
|
|
|
|
if (plans) {
|
|
|
|
|
this.plans.filter(plan => {
|
|
|
|
|
return plans.includes(plan.id)
|
|
|
|
|
}).map(row => {
|
|
|
|
|
this.$refs.planTable.toggleRowSelection(row)
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.$refs.planTable.clearSelection()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
delPlan(val){
|
|
|
|
|
@ -753,6 +771,7 @@ export default {
|
|
|
|
|
message:'操作成功'
|
|
|
|
|
})
|
|
|
|
|
this.$refs['addContract'].reset()
|
|
|
|
|
this.$refs['planTable'].clearSelection()
|
|
|
|
|
this.getContracts()
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
@ -779,6 +798,11 @@ export default {
|
|
|
|
|
this.getDepartment()
|
|
|
|
|
this.getPurchaseWay()
|
|
|
|
|
this.getMoneyWay()
|
|
|
|
|
|
|
|
|
|
//页面激活后刷新合同列表
|
|
|
|
|
window.onfocus = () => {
|
|
|
|
|
this.getContracts()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|