|
|
|
|
@ -113,24 +113,30 @@
|
|
|
|
|
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>
|
|
|
|
|
<template v-if="!(scope.row.req_status != 1 || scope.row.join_status != 1 || scope.row.invite_status != 1 || scope.row.purchase_status != 1 || scope.row.status === 2)">
|
|
|
|
|
<Poptip
|
|
|
|
|
placement="bottom"
|
|
|
|
|
:transfer="true"
|
|
|
|
|
confirm
|
|
|
|
|
title="确认要删除吗"
|
|
|
|
|
@on-ok="()=>deleteContract(scope.row.id)">
|
|
|
|
|
<i-button
|
|
|
|
|
class="slot-btns-item"
|
|
|
|
|
type="error"
|
|
|
|
|
size="small"
|
|
|
|
|
ghost>删除</i-button>
|
|
|
|
|
</Poptip>
|
|
|
|
|
</template>
|
|
|
|
|
<Button class="slot-btns-item" type="primary" size="small" @click="$refs['detailContract'].isShowDetail = true,$refs['detailContract'].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>
|
|
|
|
|
|
|
|
|
|
<Poptip transfer placement="bottom">
|
|
|
|
|
<Button type="primary" size="small" ghost>更多</Button>
|
|
|
|
|
<div slot="content">
|
|
|
|
|
<template v-if="!(scope.row.req_status != 1 || scope.row.join_status != 1 || scope.row.invite_status != 1 || scope.row.purchase_status != 1 || scope.row.status === 2)">
|
|
|
|
|
<Poptip
|
|
|
|
|
placement="bottom"
|
|
|
|
|
:transfer="true"
|
|
|
|
|
confirm
|
|
|
|
|
title="确认要删除吗"
|
|
|
|
|
@on-ok="()=>deleteContract(scope.row.id)">
|
|
|
|
|
<i-button
|
|
|
|
|
class="slot-btns-item"
|
|
|
|
|
type="error"
|
|
|
|
|
size="small"
|
|
|
|
|
ghost>删除</i-button>
|
|
|
|
|
</Poptip>
|
|
|
|
|
</template>
|
|
|
|
|
<Button class="slot-btns-item" type="primary" size="small" @click="$refs['detailContract'].isShowDetail = true,$refs['detailContract'].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>
|
|
|
|
|
</Poptip>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
@ -406,7 +412,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label:"合同预算价(万元)",
|
|
|
|
|
width: 180,
|
|
|
|
|
width: 200,
|
|
|
|
|
prop:"plan_price",
|
|
|
|
|
align:'right',
|
|
|
|
|
formatter:(v1,v2,value)=>{
|
|
|
|
|
@ -415,7 +421,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label:'合同签订价(万元)',
|
|
|
|
|
width: 180,
|
|
|
|
|
width: 200,
|
|
|
|
|
prop:'money',
|
|
|
|
|
align:'right'
|
|
|
|
|
},
|
|
|
|
|
@ -556,6 +562,12 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
//总计
|
|
|
|
|
tableTotal:{
|
|
|
|
|
fundLogTotal:0,
|
|
|
|
|
moneyTotal:0,
|
|
|
|
|
planPriceTotal:0
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
planTable:[
|
|
|
|
|
{
|
|
|
|
|
@ -647,20 +659,26 @@ export default {
|
|
|
|
|
sums[index] = '总计'
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
const values = data.map(item => Number(item[column.property]));
|
|
|
|
|
if (!values.every(value => isNaN(value)) && (column.property === 'money' || column.property === 'plan_price'|| column.property === 'fund_log_total')) {
|
|
|
|
|
sums[index] = values.reduce((prev, curr) => {
|
|
|
|
|
const value = Number(curr);
|
|
|
|
|
if (!isNaN(value)) {
|
|
|
|
|
return prev + curr;
|
|
|
|
|
} else {
|
|
|
|
|
return prev;
|
|
|
|
|
}
|
|
|
|
|
}, 0);
|
|
|
|
|
sums[index] = sums[index].toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
|
|
|
|
|
} else {
|
|
|
|
|
sums[index] = '';
|
|
|
|
|
if(column.property === 'fund_log_total'){
|
|
|
|
|
sums[index] = this.tableTotal.fundLogTotal
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if(column.property === 'plan_price'){
|
|
|
|
|
sums[index] = this.tableTotal.planPriceTotal
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if(column.property === 'money'){
|
|
|
|
|
sums[index] = this.tableTotal.moneyTotal
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// const values = data.map(item => Number(item[column.property]));
|
|
|
|
|
// if (!values.every(value => isNaN(value)) && (column.property === 'money' || column.property === 'plan_price'|| column.property === 'fund_log_total')) {
|
|
|
|
|
//
|
|
|
|
|
// sums[index] = sums[index].toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
|
|
|
|
|
// } else {
|
|
|
|
|
// sums[index] = '';
|
|
|
|
|
// }
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
return sums
|
|
|
|
|
@ -853,8 +871,11 @@ export default {
|
|
|
|
|
end_plan_price:this.select.priceMax,
|
|
|
|
|
status:this.select.status
|
|
|
|
|
})
|
|
|
|
|
this.list = res.data
|
|
|
|
|
this.total = res.total
|
|
|
|
|
this.list = res.list.data
|
|
|
|
|
this.total = res.list.total
|
|
|
|
|
this.tableTotal.fundLogTotal = res.fund_log_total
|
|
|
|
|
this.tableTotal.moneyTotal = Number(res.money_total).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
|
|
|
|
|
this.tableTotal.planPriceTotal = Number(res.plan_price_total).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|