|
|
|
|
@ -13,9 +13,9 @@
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<span style="padding: 0 6px;word-break: keep-all;">
|
|
|
|
|
合同类型
|
|
|
|
|
项目类型
|
|
|
|
|
</span>
|
|
|
|
|
<Select placeholder="请选择类型" v-model="select.type" style="width:120px;" clearable>
|
|
|
|
|
<Select placeholder="请选择项目类型" v-model="select.type" style="width:140px;" clearable>
|
|
|
|
|
<Option v-for="item in type" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
|
|
|
|
</Select>
|
|
|
|
|
</div>
|
|
|
|
|
@ -70,6 +70,15 @@
|
|
|
|
|
v-model="select.priceMax"/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<span style="padding: 0 6px;word-break: keep-all;">
|
|
|
|
|
状态
|
|
|
|
|
</span>
|
|
|
|
|
<Select clearable placeholder="请选择合同状态" v-model="select.status" style="width:200px;">
|
|
|
|
|
<Option v-for="item in [{label:'待签订',value:1},{label:'已签订',value:2}]" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
|
|
|
|
</Select>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<Button type="primary" style="margin-left: 10px" @click="isShowAdd = true">新增</Button>
|
|
|
|
|
<Button type="primary" style="margin-left: 10px" @click="getContracts">查询</Button>
|
|
|
|
|
<Button type="primary" style="margin-left: 10px" ghost
|
|
|
|
|
@ -79,7 +88,7 @@
|
|
|
|
|
</slot>
|
|
|
|
|
</lx-header>
|
|
|
|
|
|
|
|
|
|
<xy-table :table-item="table" :list="list" @editor="" @delete="(row)=>deleteContract(row.id)" @cellClick="showPaymentPlan" :cell-style="cellStyle">
|
|
|
|
|
<xy-table :table-item="table" :list="list" @editor="" @delete="(row)=>deleteContract(row.id)" @cellClick="showPaymentPlan" :cell-style="cellStyle" :show-summary="true" :summary-method="summary">
|
|
|
|
|
<template v-slot:btns>
|
|
|
|
|
<el-table-column label="操作" fixed="right" width="220" header-align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
@ -242,7 +251,7 @@
|
|
|
|
|
<template v-slot:btns>
|
|
|
|
|
<el-table-column label="使用金额" header-align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<Input :value="scope.row.useMoney ? scope.row.useMoney: scope.row.money" @input="(e)=>scope.row.useMoney = e"/>
|
|
|
|
|
<Input :value="scope.row.useMoney" @input="(e)=>scope.row.useMoney = e"/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
@ -402,6 +411,12 @@ export default {
|
|
|
|
|
return value.toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label:'合同签订价(万元)',
|
|
|
|
|
width: 200,
|
|
|
|
|
prop:'money',
|
|
|
|
|
align:'right'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label:"合同状态",
|
|
|
|
|
width: 160,
|
|
|
|
|
@ -600,20 +615,12 @@ export default {
|
|
|
|
|
{required:true,message:"必选"}
|
|
|
|
|
],
|
|
|
|
|
price:[
|
|
|
|
|
{required:true,message:"必填"}
|
|
|
|
|
],
|
|
|
|
|
money:[
|
|
|
|
|
{required:true,message:"必填"}
|
|
|
|
|
{required:true,message:"必填"},
|
|
|
|
|
{pattern:/^\d+(\.\d+)?$/, message: '必须为数字'}
|
|
|
|
|
],
|
|
|
|
|
fundingChannels:[
|
|
|
|
|
{required:true,message:"必填"}
|
|
|
|
|
],
|
|
|
|
|
supply:[
|
|
|
|
|
{required:true,message:"必填"}
|
|
|
|
|
],
|
|
|
|
|
carryDepartment:[
|
|
|
|
|
{required:true,message:"必填"}
|
|
|
|
|
],
|
|
|
|
|
plan:[
|
|
|
|
|
{validator:planPass, trigger: 'change'}
|
|
|
|
|
]
|
|
|
|
|
@ -628,79 +635,110 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
//合计
|
|
|
|
|
summary(param){
|
|
|
|
|
const { columns, data } = param
|
|
|
|
|
const sums = []
|
|
|
|
|
columns.map((column,index) => {
|
|
|
|
|
if(index === 0){
|
|
|
|
|
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] = '';
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
return sums
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
cellStyle({row, column, rowIndex, columnIndex}){
|
|
|
|
|
if(columnIndex === 10){
|
|
|
|
|
if(columnIndex === 11){
|
|
|
|
|
if(row.is_plan === 1){
|
|
|
|
|
return {'background':'rgba(240,240,240,0.2)'}
|
|
|
|
|
return {'color':'rgb(140,140,140)'}
|
|
|
|
|
}
|
|
|
|
|
switch (row.req_status){
|
|
|
|
|
case 1:
|
|
|
|
|
return {'background':'rgba(140,197,255,0.2)'}
|
|
|
|
|
return {'color':'rgb(96,109,241)'}
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
return {'background':'rgba(253,226,226,0.2)'}
|
|
|
|
|
return {'color':'rgb(219,122,122)'}
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
return {'background':'rgba(225,243,216,0.2)'}
|
|
|
|
|
return {'color':'rgb(147,201,134)'}
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
return {'background':'rgba(250,236,216,0.2)'}
|
|
|
|
|
return {'color':'rgb(220,185,126)'}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(columnIndex === 11){
|
|
|
|
|
if(columnIndex === 12){
|
|
|
|
|
switch (row.purchase_status){
|
|
|
|
|
case 1:
|
|
|
|
|
return {'background':'rgba(140,197,255,0.2)'}
|
|
|
|
|
return {'color':'rgb(96,109,241)'}
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
return {'background':'rgba(253,226,226,0.2)'}
|
|
|
|
|
return {'color':'rgb(219,122,122)'}
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
return {'background':'rgba(225,243,216,0.2)'}
|
|
|
|
|
return {'color':'rgb(147,201,134)'}
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
return {'background':'rgba(250,236,216,0.2)'}
|
|
|
|
|
return {'color':'rgb(220,185,126)'}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(columnIndex === 12){
|
|
|
|
|
if(columnIndex === 13){
|
|
|
|
|
switch (row.invite_status){
|
|
|
|
|
case 1:
|
|
|
|
|
return {'background':'rgba(140,197,255,0.2)'}
|
|
|
|
|
return {'color':'rgb(96,109,241)'}
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
return {'background':'rgba(253,226,226,0.2)'}
|
|
|
|
|
return {'color':'rgb(219,122,122)'}
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
return {'background':'rgba(225,243,216,0.2)'}
|
|
|
|
|
return {'color':'rgb(147,201,134)'}
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
return {'background':'rgba(250,236,216,0.2)'}
|
|
|
|
|
return {'color':'rgb(220,185,126)'}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(columnIndex === 13){
|
|
|
|
|
if(columnIndex === 14){
|
|
|
|
|
switch (row.join_status){
|
|
|
|
|
case 1:
|
|
|
|
|
return {'background':'rgba(140,197,255,0.2)'}
|
|
|
|
|
return {'color':'rgb(96,109,241)'}
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
return {'background':'rgba(253,226,226,0.2)'}
|
|
|
|
|
return {'color':'rgb(219,122,122)'}
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
return {'background':'rgba(225,243,216,0.2)'}
|
|
|
|
|
return {'color':'rgb(147,201,134)'}
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
return {'background':'rgba(250,236,216,0.2)'}
|
|
|
|
|
return {'color':'rgb(220,185,126)'}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//点击付款计划查看
|
|
|
|
|
showPaymentPlan(row, column, cell){
|
|
|
|
|
if(column.id === 'el-table_1_column_10'){
|
|
|
|
|
console.log(row)
|
|
|
|
|
console.log(column)
|
|
|
|
|
if(column.property === 'plan_link_count'){
|
|
|
|
|
this.$refs['contractPaymentRegistration'].getSignPlan(row.id)
|
|
|
|
|
this.$refs['contractPaymentRegistration'].isShow = true
|
|
|
|
|
}
|
|
|
|
|
if(column.property === 'fund_log_total'){
|
|
|
|
|
this.$router.push(`/contract/paymentRegistrationList?contractId=${row.id}`)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//招标文件审查
|
|
|
|
|
async bidding(row){
|
|
|
|
|
@ -809,7 +847,8 @@ export default {
|
|
|
|
|
purchase_type_id:this.select.purchaseModality,
|
|
|
|
|
purchase_way_id:this.select.purchaseMethods,
|
|
|
|
|
start_plan_price:this.select.priceMin,
|
|
|
|
|
end_plan_price:this.select.priceMax
|
|
|
|
|
end_plan_price:this.select.priceMax,
|
|
|
|
|
status:this.select.status
|
|
|
|
|
})
|
|
|
|
|
this.list = res.data
|
|
|
|
|
this.total = res.total
|
|
|
|
|
@ -828,6 +867,7 @@ export default {
|
|
|
|
|
//选择计划
|
|
|
|
|
selectPlan(sel,row){
|
|
|
|
|
if(sel){
|
|
|
|
|
console.log(sel,row)
|
|
|
|
|
this.form.plan = sel.map(item => {
|
|
|
|
|
return {
|
|
|
|
|
label:item.name,
|
|
|
|
|
|