master
xy 3 years ago
parent 6c3026aa49
commit 76b5cb86e3

@ -119,6 +119,9 @@ export default {
}, },
toggleAllSelection(){ toggleAllSelection(){
this.$refs.table.toggleAllSelection() this.$refs.table.toggleAllSelection()
},
setCurrentRow (row) {
this.$refs.table.setCurrentRow(row)
} }
}, },
created() { created() {

@ -1,478 +1,489 @@
<template> <template>
<div> <div>
<!-- 付款登记--> <!-- 付款登记-->
<xy-dialog title="付款登记" :is-show.sync="isShowPaymentRegistration" type="form" class="payment-registration" <xy-dialog title="付款登记" :is-show.sync="isShowPaymentRegistration" type="form" class="payment-registration"
:form="paymentRegistrationForm" :rules="paymentRegistrationRules" @submit="submit" ref="paymentRegistration"> :form="paymentRegistrationForm" :rules="paymentRegistrationRules" @submit="submit" ref="paymentRegistration">
<template v-slot:extraFormTop> <template v-slot:extraFormTop>
<div class="payment-registration-row"> <div class="payment-registration-row">
<div class="payment-registration-row-title">受款单位</div> <div class="payment-registration-row-title">受款单位</div>
<div class="payment-registration-row-content">{{contract.supply}}</div> <div class="payment-registration-row-content">{{contract.supply}}</div>
</div> </div>
<div class="payment-registration-row"> <div class="payment-registration-row">
<div class="payment-registration-row-title">合同名称</div> <div class="payment-registration-row-title">合同名称</div>
<div class="payment-registration-row-content">{{contract.name}}</div> <div class="payment-registration-row-content">{{contract.name}}</div>
</div> </div>
<div class="payment-registration-row"> <div class="payment-registration-row">
<div class="payment-registration-row-title">合同金额</div> <div class="payment-registration-row-title">合同金额</div>
<div class="payment-registration-row-content">{{priceFormat(contract.money)}} </div> <div class="payment-registration-row-content">{{priceFormat(contract.money)}} </div>
</div> </div>
<div style="display: flex"> <div style="display: flex">
<div class="payment-registration-row"> <div class="payment-registration-row">
<div class="payment-registration-row-title">已申请金额</div> <div class="payment-registration-row-title">已申请金额</div>
<div class="payment-registration-row-content">{{totalApplyMoney()}} </div> <div class="payment-registration-row-content">{{totalApplyMoney()}} </div>
</div> </div>
<div class="payment-registration-row"> <div class="payment-registration-row">
<div class="payment-registration-row-title">已申请笔数</div> <div class="payment-registration-row-title">已申请笔数</div>
<div class="payment-registration-row-content">{{payment.length}}</div> <div class="payment-registration-row-content">{{payment.length}}</div>
</div> </div>
</div> </div>
<div style="display: flex"> <div style="display: flex">
<div class="payment-registration-row"> <div class="payment-registration-row">
<div class="payment-registration-row-title">已付金额</div> <div class="payment-registration-row-title">已付金额</div>
<div class="payment-registration-row-content">{{totalMoney()}} </div> <div class="payment-registration-row-content">{{totalMoney()}} </div>
</div> </div>
<div class="payment-registration-row"> <div class="payment-registration-row">
<div class="payment-registration-row-title">支付占比</div> <div class="payment-registration-row-title">支付占比</div>
<div class="payment-registration-row-content">{{percentPay()}}%</div> <div class="payment-registration-row-content">{{percentPay()}}%</div>
</div> </div>
<div class="payment-registration-row"> <div class="payment-registration-row">
<div class="payment-registration-row-title">已付笔数</div> <div class="payment-registration-row-title">已付笔数</div>
<div class="payment-registration-row-content">{{actNumsTotal()}}</div> <div class="payment-registration-row-content">{{actNumsTotal()}}</div>
<div class="payment-registration-row-content" style="color: #ff0000;padding-left: 16px;cursor: pointer;"> <div class="payment-registration-row-content" style="color: #ff0000;padding-left: 16px;cursor: pointer;">
<Poptip :transfer="true"> <Poptip :transfer="true">
<div>点击查看列表</div> <div>点击查看列表</div>
<template v-slot:content> <template v-slot:content>
<template v-if="payment&&payment.length>0"> <template v-if="payment&&payment.length>0">
<xy-table :height="200" :list="payment" :table-item="payTable"> <xy-table :height="200" :list="payment" :table-item="payTable">
<template v-slot:btns> <template v-slot:btns>
<p></p> <p></p>
</template> </template>
</xy-table> </xy-table>
</template> </template>
<template v-else> <template v-else>
<div style="text-align: center">暂无已付笔数</div> <div style="text-align: center">暂无已付笔数</div>
</template> </template>
</template> </template>
</Poptip> </Poptip>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<template v-slot:applyMoney> <template #act_date>
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label"> <div class="xy-table-item-label">实付日期
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>申请付款金额 </div>
</div> <div class="xy-table-item-content">
<div class="xy-table-item-content xy-table-item-price"> <el-date-picker v-model="paymentRegistrationForm.act_date" value-format="yyyy-MM-dd" style="width: 150px;">
<el-input clearable placeholder="请填写付款金额" v-model="paymentRegistrationForm.applyMoney" </el-date-picker>
style="width: 150px;" /> </div>
</div> </div>
</div> </template>
</template> <template v-slot:applyMoney>
<div class="xy-table-item">
<template v-slot:audit_money> <div class="xy-table-item-label">
<div class="xy-table-item"> <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>申请付款金额
<div class="xy-table-item-label">审计金额 </div>
</div> <div class="xy-table-item-content xy-table-item-price">
<div class="xy-table-item-content xy-table-item-price"> <el-input clearable placeholder="请填写付款金额" v-model="paymentRegistrationForm.applyMoney"
<el-input clearable placeholder="请填写审计金额" v-model="form.audit_money" style="width: 150px;" /> style="width: 150px;" />
</div> </div>
</div> </div>
</template> </template>
<template v-slot:deductionMoney>
<div class="xy-table-item"> <template v-slot:audit_money>
<div class="xy-table-item-label"> <div class="xy-table-item">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>本期扣款金额 <div class="xy-table-item-label">审计金额
</div> </div>
<div class="xy-table-item-content xy-table-item-price"> <div class="xy-table-item-content xy-table-item-price">
<el-input clearable placeholder="请填写扣款金额" v-model="paymentRegistrationForm.deductionMoney" <el-input clearable placeholder="请填写审计金额" v-model="form.audit_money" style="width: 150px;" />
style="width: 150px;" /> </div>
</div> </div>
</div> </template>
</template> <template v-slot:deductionMoney>
<div class="xy-table-item">
<template v-slot:remark> <div class="xy-table-item-label">
<div class="xy-table-item"> <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>本期扣款金额
<div class="xy-table-item-label">备注 </div>
</div> <div class="xy-table-item-content xy-table-item-price">
<div class="xy-table-item-content"> <el-input clearable placeholder="请填写扣款金额" v-model="paymentRegistrationForm.deductionMoney"
<el-input type="textarea" clearable placeholder="进度款日期2022.6.8-2022.7.7" style="width: 150px;" />
v-model="paymentRegistrationForm.remark" style="width: 300px;" /> </div>
</div> </div>
</div> </template>
</template>
<template v-slot:type> <template v-slot:remark>
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label"> <div class="xy-table-item-label">备注
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>款项类型 </div>
</div> <div class="xy-table-item-content">
<div class="xy-table-item-content"> <el-input type="textarea" clearable placeholder="进度款日期2022.6.8-2022.7.7"
<el-select placeholder="选择款项类型或直接录入其他类型" v-model="paymentRegistrationForm.type" style="width: 150px;" v-model="paymentRegistrationForm.remark" style="width: 300px;" />
filterable allow-create clearable> </div>
<el-option v-for="item in paymentType" :key="item" :label="item" :value="item"> </div>
</el-option> </template>
</el-select> <template v-slot:type>
</div> <div class="xy-table-item">
</div> <div class="xy-table-item-label">
</template> <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>款项类型
<template v-slot:isLast> </div>
<div class="xy-table-item"> <div class="xy-table-item-content">
<div class="xy-table-item-label" style="width: 200px"> <el-select placeholder="选择款项类型或直接录入其他类型" v-model="paymentRegistrationForm.type" style="width: 150px;"
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>是否为最后一笔 filterable allow-create clearable>
</div> <el-option v-for="item in paymentType" :key="item" :label="item" :value="item">
<div class="xy-table-item-content"> </el-option>
<el-switch v-model="paymentRegistrationForm.isLast" /> </el-select>
<!-- @change="toggleSelection"--> </div>
</div> </div>
</div> </template>
</template> <template v-slot:isLast>
<template v-slot:extraFormBottom v-if="false"> <div class="xy-table-item">
<Input search enter-button=" " placeholder="搜索预算计划.." v-model="searchContent" @on-search="getBudgets" /> <div class="xy-table-item-label" style="width: 200px">
<xy-table :list="plans" :show-index="false" :table-item="planTable" :height="310" style="margin-top: 10px;" <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>是否为最后一笔
ref="planTable" @select="selectPlan"> </div>
<template v-slot:btns> <div class="xy-table-item-content">
<el-table-column label="使用金额" header-align="center"> <el-switch v-model="paymentRegistrationForm.isLast" />
<template slot-scope="scope"> <!-- @change="toggleSelection"-->
<Input :value="scope.row.useMoney" @input="(e)=>scope.row.useMoney = e" /> </div>
</template> </div>
</el-table-column> </template>
</template> <template v-slot:extraFormBottom v-if="false">
</xy-table> <Input search enter-button=" " placeholder="搜索预算计划.." v-model="searchContent" @on-search="getBudgets" />
<xy-table :list="plans" :show-index="false" :table-item="planTable" :height="310" style="margin-top: 10px;"
<div style="display: flex;justify-content: flex-end;"> ref="planTable" @select="selectPlan">
<Page :total="planTotal" show-elevator @on-change="pageChange" /> <template v-slot:btns>
</div> <el-table-column label="使用金额" header-align="center">
</template> <template slot-scope="scope">
</xy-dialog> <Input :value="scope.row.useMoney" @input="(e)=>scope.row.useMoney = e" />
</div> </template>
</template> </el-table-column>
</template>
<script> </xy-table>
import {
getparameter <div style="display: flex;justify-content: flex-end;">
} from "@/api/system/dictionary" <Page :total="planTotal" show-elevator @on-change="pageChange" />
import { </div>
getFundLog, </template>
addFundLog </xy-dialog>
} from "@/api/paymentRegistration/fundLog" </div>
import { </template>
getBudget
} from "@/api/budget/budget"; <script>
import { import {
detailContract, getparameter
editorContract } from "@/api/system/dictionary"
} from "@/api/contract/contract"; import {
import { getFundLog,
Message addFundLog
} from "element-ui"; } from "@/api/paymentRegistration/fundLog"
import { import {
parseTime getBudget
} from "@/utils"; } from "@/api/budget/budget";
import {
export default { detailContract,
data() { editorContract
return { } from "@/api/contract/contract";
searchContent: "", import {
planTotal: 0, Message
pageIndex: 1, } from "element-ui";
// import {
plans: [], parseTime
planTypes: [], } from "@/utils";
contract: {},
payment: [], // export default {
payTable: [{ data() {
label: '申请金额', return {
prop: 'apply_money', searchContent: "",
sortable: false, planTotal: 0,
width: 160, pageIndex: 1,
align: 'right' //
}, plans: [],
{ planTypes: [],
label: '已付金额', contract: {},
prop: 'act_money', payment: [], //
sortable: false, payTable: [{
width: 160, label: '申请金额',
align: 'right' prop: 'apply_money',
}, sortable: false,
{ width: 160,
label: '时间', align: 'right'
prop: 'created_at', },
sortable: false, {
width: 120, label: '已付金额',
formatter: (t1, t2, value) => { prop: 'act_money',
return parseTime(new Date(value), '{y}-{m}-{d}') sortable: false,
} width: 160,
} align: 'right'
], },
paymentType: ["进度款", "结算款", "质保金"], {
isShowPaymentRegistration: false, label: '时间',
paymentRegistrationForm: { prop: 'created_at',
applyMoney: "", sortable: false,
deductionMoney: "", width: 120,
audit_money: "", formatter: (t1, t2, value) => {
type: "", return parseTime(new Date(value), '{y}-{m}-{d}')
isLast: false, }
plan: [], }
remark: "" ],
}, paymentType: ["进度款", "结算款", "质保金"],
form: { isShowPaymentRegistration: false,
audit_money: 0 paymentRegistrationForm: {
}, applyMoney: "",
paymentRegistrationRules: { deductionMoney: "",
applyMoney: [{ audit_money: "",
required: true, act_date: `${this.$moment(new Date()).format('YYYY-MM-DD')}`,
message: "必填" type: "",
}, isLast: false,
{ plan: [],
pattern: /(^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d{1,2})?$)/, remark: ""
message: '必须为数字' },
} form: {
], audit_money: 0
deductionMoney: [{ },
required: true, paymentRegistrationRules: {
message: "必填" applyMoney: [{
}, required: true,
{ message: "必填"
pattern: /(^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d{1,2})?$)/, },
message: '必须为数字' {
} pattern: /(^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d{1,2})?$)/,
], message: '必须为数字'
type: [{ }
required: true, ],
message: "必选" deductionMoney: [{
}] required: true,
}, message: "必填"
planTable: [{ },
sortable: false, {
width: 36, pattern: /(^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d{1,2})?$)/,
type: 'selection' message: '必须为数字'
}, }
{ ],
label: "分类", type: [{
prop: 'type', required: true,
formatter: (cell, data, value) => { message: "必选"
let res = this.planTypes.filter(item => { }]
return item.id === value },
}) planTable: [{
return res[0]?.value || '未知' sortable: false,
} width: 36,
}, type: 'selection'
{ },
label: "名称", {
prop: 'name', label: "分类",
align: 'left' prop: 'type',
}, formatter: (cell, data, value) => {
{ let res = this.planTypes.filter(item => {
label: "计划金额", return item.id === value
prop: 'money', })
align: 'right' return res[0]?.value || '未知'
} }
], },
} {
}, label: "名称",
methods: { prop: 'name',
async getPlanTypes() { align: 'left'
const res = await getparameter({ },
number: 'money_way' {
}) label: "计划金额",
this.planTypes = res.detail prop: 'money',
}, align: 'right'
}
// ],
pageChange(e) { }
this.pageIndex = e },
this.getBudgets() methods: {
}, async getPlanTypes() {
const res = await getparameter({
// number: 'money_way'
totalApplyMoney() { })
let total = 0.00 this.planTypes = res.detail
this.payment.map(item => { },
total += Number(item.apply_money)
}) //
return total.toFixed(2) pageChange(e) {
}, this.pageIndex = e
// this.getBudgets()
totalMoney() { },
let total = 0.00
this.payment.map(item => { //
total += Number(item.act_money) totalApplyMoney() {
}) let total = 0.00
return total.toFixed(2) this.payment.map(item => {
}, total += Number(item.apply_money)
// })
actNumsTotal() { return total.toFixed(2)
let total = 0 },
this.payment.map(item => { //
if (Number(item.act_money)) { totalMoney() {
total++ let total = 0.00
} this.payment.map(item => {
}) total += Number(item.act_money)
return total })
}, return total.toFixed(2)
// },
percentPay() { //
let total = this.totalMoney() actNumsTotal() {
return ((total / this.contract.money) * 100).toFixed(2) || 0 let total = 0
}, this.payment.map(item => {
if (Number(item.act_money)) {
// total++
async getContract(info) { }
this.contract = await detailContract({ })
id: info.id return total
},
//
percentPay() {
let total = this.totalMoney()
return ((total / this.contract.money) * 100).toFixed(2) || 0
},
//
async getContract(info) {
this.contract = await detailContract({
id: info.id
}); });
this.paymentRegistrationForm.plan = this.contract.plans.map(item => { this.paymentRegistrationForm.plan = this.contract.plans.map(item => {
return { return {
plan_id: item.id, plan_id: item.id,
use_money: item.useMoney, use_money: item.useMoney,
new_money: item.money, new_money: item.money,
} }
}); });
this.form.audit_money = this.contract.audit_money; this.form.audit_money = this.contract.audit_money;
const res = await getFundLog({ const res = await getFundLog({
contract_id: this.contract.id contract_id: this.contract.id
}) })
this.payment = res.data this.payment = res.data
}, },
submit() { submit() {
let data = { let data = {
contract_id: this.contract.id, contract_id: this.contract.id,
apply_money: this.paymentRegistrationForm.applyMoney, apply_money: this.paymentRegistrationForm.applyMoney,
discount_money: this.paymentRegistrationForm.deductionMoney, discount_money: this.paymentRegistrationForm.deductionMoney,
type: this.paymentRegistrationForm.type, type: this.paymentRegistrationForm.type,
is_end: this.paymentRegistrationForm.isLast ? 1 : 0, is_end: this.paymentRegistrationForm.isLast ? 1 : 0,
remark: this.paymentRegistrationForm.remark, remark: this.paymentRegistrationForm.remark,
audit_money: this.paymentRegistrationForm.audit_money audit_money: this.paymentRegistrationForm.audit_money
} }
addFundLog(data).then(res => { addFundLog(data).then(res => {
this.isShowPaymentRegistration = false this.isShowPaymentRegistration = false
// //
editorContract({ editorContract({
id: this.contract.id, id: this.contract.id,
audit_money: this.form.audit_money audit_money: this.form.audit_money
}).then(r => { }).then(r => {
Message({ Message({
type: 'success', type: 'success',
message: "操作成功" message: "操作成功"
}) })
}); });
this.$refs['paymentRegistration'].reset() this.$refs['paymentRegistration'].reset()
}) })
}, },
// //
// //
async getBudgets() { async getBudgets() {
let res = await getBudget({ let res = await getBudget({
name: this.searchContent, name: this.searchContent,
page_size: 10, page_size: 10,
page: this.pageIndex page: this.pageIndex
}) })
this.plans = res.list.data this.plans = res.list.data
this.planTotal = res.list.total this.planTotal = res.list.total
// this.toggleSelection(this.paymentRegistrationForm.plan.map(item => { // this.toggleSelection(this.paymentRegistrationForm.plan.map(item => {
// return item.plan_id // return item.plan_id
// })) // }))
}, },
planPageChange(e) { planPageChange(e) {
this.plansPageIndex = e this.plansPageIndex = e
this.getBudgets() this.getBudgets()
}, },
selectPlan(sel, row) { selectPlan(sel, row) {
if (sel) { if (sel) {
this.paymentRegistrationForm.plan = sel.map(item => { this.paymentRegistrationForm.plan = sel.map(item => {
return { return {
plan_id: item.id, plan_id: item.id,
use_money: item.useMoney, use_money: item.useMoney,
new_money: item.money new_money: item.money
} }
}) })
} else { } else {
this.paymentRegistrationForm.plan = [] this.paymentRegistrationForm.plan = []
} }
}, },
toggleSelection(e) { toggleSelection(e) {
if (!e) { if (!e) {
return return
} }
let plans = this.paymentRegistrationForm.plan.map(item => { let plans = this.paymentRegistrationForm.plan.map(item => {
return item.plan_id return item.plan_id
}) })
if (plans) { if (plans) {
this.plans.filter(plan => { this.plans.filter(plan => {
return plans.includes(plan.id) return plans.includes(plan.id)
}).map(row => { }).map(row => {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['planTable'].toggleRowSelection(row); this.$refs['planTable'].toggleRowSelection(row);
}) })
}) })
} else { } else {
this.$refs['planTable'].clearSelection(); this.$refs['planTable'].clearSelection();
} }
}, },
}, },
computed: { computed: {
priceFormat() { priceFormat() {
return function(price) { return function(price) {
return Number(price).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,') return Number(price).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
} }
} }
}, },
watch: { watch: {
isShowPaymentRegistration(newVal) { isShowPaymentRegistration(newVal) {
if (newVal) { if (newVal) {
this.getBudgets() this.getBudgets()
} }
} }
}, },
mounted() { mounted() {
this.getPlanTypes() this.getPlanTypes()
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.payment-registration { .payment-registration {
&-row { &-row {
display: flex; display: flex;
padding: 6px 0; padding: 6px 0;
&-title { &-title {
padding: 0 10px; padding: 0 10px;
} }
&-content {} &-content {}
} }
} }
.xy-table-item-label { .xy-table-item-label {
width: 140px; width: 140px;
} }
.xy-table-item-price { .xy-table-item-price {
position: relative; position: relative;
&::after { &::after {
z-index: 1; z-index: 1;
position: absolute; position: absolute;
right: 0; right: 0;
top: 0; top: 0;
content: '(元)' content: '(元)'
} }
::v-deep .el-input__clear { ::v-deep .el-input__clear {
position: relative; position: relative;
right: 30px; right: 30px;
z-index: 2; z-index: 2;
} }
} }
</style> </style>

@ -131,7 +131,7 @@
</el-card> </el-card>
<div class="demo-split"> <div class="demo-split">
<div v-for="(sitem, index) in this.typeList"> <div v-for="(sitem, index) in typeList">
<Split v-model="split" style="height: 580px"> <Split v-model="split" style="height: 580px">
<template #left> <template #left>
<div class="demo-split-pane" style="padding-right: 5px"> <div class="demo-split-pane" style="padding-right: 5px">
@ -325,6 +325,15 @@ export default {
return `¥ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ","); return `¥ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}, },
}, },
{
label: "已付金额",
width: 160,
prop: "fund_log_total",
align: "right",
formatter: (cell, data, value) => {
return `¥ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
},
},
{ {
prop: "supply", prop: "supply",
label: "承包商/供货商", label: "承包商/供货商",
@ -343,15 +352,6 @@ export default {
); );
}, },
}, },
{
label: "已付金额",
width: 160,
prop: "fund_log_total",
align: "right",
formatter: (cell, data, value) => {
return `¥ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
},
},
], ],
departmentTotal: [], departmentTotal: [],
departmentTotalTable: [ departmentTotalTable: [
@ -1045,10 +1045,9 @@ export default {
async getNopay() { async getNopay() {
const res = await nopayTotal({ const res = await nopayTotal({
is_auth: 1, is_auth: 1,
year: this.select.year //year: this.select.year
}); });
this.nopay = res; this.nopay = res.filter(i => i.momey != 0);
console.log(222, this.nopay);
}, },
async getDepartmnetTotal() { async getDepartmnetTotal() {
const res = await departmentTotal({ const res = await departmentTotal({

File diff suppressed because it is too large Load Diff

@ -56,7 +56,7 @@
</div> </div>
</div> </div>
</template> </template>
<template v-slot:public_plane_date> <template v-slot:public_plane_date v-if="role == 0">
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label">采购意向公开计划时间 </div> <div class="xy-table-item-label">采购意向公开计划时间 </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
@ -69,7 +69,7 @@
</div> </div>
</div> </div>
</template> </template>
<template v-slot:public_act_date> <template v-slot:public_act_date v-if="role == 1">
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label">采购意向公开实际时间 </div> <div class="xy-table-item-label">采购意向公开实际时间 </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
@ -82,7 +82,7 @@
</div> </div>
</div> </div>
</template> </template>
<template v-slot:invite_plane_date> <template v-slot:invite_plane_date v-if="role == 0">
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label">招标文件挂网计划时间 </div> <div class="xy-table-item-label">招标文件挂网计划时间 </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
@ -95,7 +95,7 @@
</div> </div>
</div> </div>
</template> </template>
<template v-slot:invite_act_date> <template v-slot:invite_act_date v-if="role == 1">
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label">招标文件挂网实际时间 </div> <div class="xy-table-item-label">招标文件挂网实际时间 </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
@ -108,7 +108,7 @@
</div> </div>
</div> </div>
</template> </template>
<template v-slot:open_plane_date> <template v-slot:open_plane_date v-if="role == 0">
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label">项目开标计划时间 </div> <div class="xy-table-item-label">项目开标计划时间 </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
@ -121,7 +121,7 @@
</div> </div>
</div> </div>
</template> </template>
<template v-slot:open_act_date> <template v-slot:open_act_date v-if="role == 1">
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label">项目开标实际时间 </div> <div class="xy-table-item-label">项目开标实际时间 </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
@ -134,16 +134,174 @@
</div> </div>
</div> </div>
</template> </template>
<template #plan_id>
<div class="xy-table-item">
<div class="xy-table-item-label">
关联预算计划
</div>
<div class="xy-table-item-content">
<div
class="contract-add-plan"
style="width: 300px"
@click="isShowPlan = true"
>
<template>
<el-input
readonly
:value="form.plan ? form.plan.name : form.plan_id"
clearable
placeholder="请选择关联计划"
style="width: 300px"
@focus="isShowPlan = true"
></el-input>
</template>
</div>
</div>
</div>
</template>
</xy-dialog>
<!-- 新增表 预算计划 -->
<xy-dialog
:is-show.sync="isShowPlan"
:width="720"
title="预算计划"
@on-ok="isShowPlan = false"
>
<template v-slot:normalContent>
<div style="display: flex">
<el-select
placeholder="科室选择"
clearable
size="small"
v-model="planSearch.plan_department_id"
style="width: 160px"
>
<el-option
v-for="item in departments"
:label="item.name"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
<Input
v-model="planSearch.name"
enter-button="搜 索"
placeholder="搜索预算计划.."
search
@on-search="searchBudgets"
/>
</div>
<xy-table
highlight-current-row
ref="planTable"
:height="300"
:list="plans"
:show-index="false"
:table-item="planTable"
style="margin-top: 10px"
@cellClick="row => { form.plan_id = row.id;form.plan = row; }"
>
<template #btns>
</template>
</xy-table>
<div style="display: flex; justify-content: flex-end">
<Page :total="planTotal" show-elevator @on-change="e => { planSearch.page = e;getBudgets(); }" />
</div>
</template>
<template v-slot:footerContent>
<Button type="primary" @click="isShowPlan = false">确定</Button>
</template>
</xy-dialog> </xy-dialog>
</div> </div>
</template> </template>
<script> <script>
import { show, save, store } from "@/api/govPlane"; import { show, save, store } from "@/api/govPlane";
import {getBudget} from "@/api/budget/budget";
import {listdeptNoAuth} from "@/api/system/department";
import {getparameter} from "@/api/system/dictionary";
export default { export default {
props: {}, props: {
role: Number
},
data() { data() {
return { return {
isShowPlan: false,
departments: [],
moneyWay: [],
planTotal: 0,
plans: [],
planSearch: {
name: "",
plan_department_id: "",
page: 1,
page_size: 10,
top_pid: 1
},
planTable: [
{
label: "分类",
prop: "type",
formatter: (cell, data, value) => {
let res = this.moneyWay.filter((item) => {
return item.id === value;
});
return res[0]?.value || "未知";
},
width: 100,
fixed: "left",
},
{
label: "科室",
prop: "plan_department.name",
width: 100,
align: "center",
},
{
label: "年份",
prop: "year",
width: 80,
align: "center",
},
{
label: "隶属",
prop: "pid_info.name",
width: 180,
align: "left",
},
{
label: "名称",
prop: "name",
width: 320,
align: "left",
},
{
label: "计划金额",
prop: "money",
align: "right",
width: 120,
customFn: (row) => {
let m1 = row.money;
let m2 = row.update_money;
return m2 == 0 ? m1 : m2;
},
},
{
label: "已用金额",
prop: "use_money_total",
width: 120,
align: "right",
},
],
isShow: false, isShow: false,
id: "", id: "",
type: "", type: "",
@ -158,6 +316,8 @@ export default {
invite_act_date: "", invite_act_date: "",
open_plane_date: "", open_plane_date: "",
open_act_date: "", open_act_date: "",
plan_id: "",
plan: {}
}, },
rules: { rules: {
name: [ name: [
@ -260,6 +420,43 @@ export default {
}); });
} }
}, },
//
async getDepartment() {
this.departments = await listdeptNoAuth();
},
//
async getMoneyWay() {
this.moneyWay = (
await getparameter({
number: "money_way",
})
).detail;
},
//
planSelect(row) {
console.log(row)
// if (this.plan.length === 0) {
// this.$message({
// type: "warning",
// message: "",
// });
// return;
// }
//
// this.isShowPlan = false;
},
searchBudgets() {
this.getBudgets();
},
//
async getBudgets() {
let res = await getBudget(this.planSearch);
this.plans = res.list.data;
this.planTotal = res.list.total;
},
}, },
watch: { watch: {
isShow(val) { isShow(val) {
@ -275,7 +472,17 @@ export default {
delete this.form.id; delete this.form.id;
} }
}, },
isShowPlan(val) {
if (val) {
this.$refs['planTable'].setCurrentRow(this.plans.find(row => row.id === this.form.plan_id))
}
}
}, },
created() {
this.getMoneyWay();
this.getDepartment();
this.getBudgets();
}
}; };
</script> </script>

@ -34,6 +34,7 @@
</lx-header> </lx-header>
<xy-table <xy-table
:cell-style="cellStyle"
:list="list" :list="list"
:table-item="table" :table-item="table"
@ -62,7 +63,7 @@
/> />
</div> </div>
<addGovPlane ref="addGovPlane" @refresh="getList"></addGovPlane> <addGovPlane ref="addGovPlane" :role="type" @refresh="getList"></addGovPlane>
</div> </div>
</template> </template>
@ -75,7 +76,7 @@ export default {
}, },
data() { data() {
return { return {
type: 0, type: 0,//01
select: { select: {
page: 1, page: 1,
page_size: 10, page_size: 10,
@ -93,6 +94,7 @@ export default {
prop: "name", prop: "name",
label: "项目名称", label: "项目名称",
width: 180, width: 180,
align: 'left'
}, },
{ {
prop: "content", prop: "content",
@ -114,7 +116,7 @@ export default {
label: "采购意向公开计划时间", label: "采购意向公开计划时间",
width: 190, width: 190,
formatter: (cell, data, value) => { formatter: (cell, data, value) => {
return this.$moment(new Date(value)).format("YYYY年MM月DD"); return value ? this.$moment(new Date(value)).format("YYYY年MM月DD") : '未完成';
}, },
}, },
{ {
@ -122,7 +124,7 @@ export default {
label: "采购意向公开实际时间", label: "采购意向公开实际时间",
width: 190, width: 190,
formatter: (cell, data, value) => { formatter: (cell, data, value) => {
return this.$moment(new Date(value)).format("YYYY年MM月DD"); return value ? this.$moment(new Date(value)).format("YYYY年MM月DD") : '未完成';
}, },
}, },
{ {
@ -130,7 +132,7 @@ export default {
label: "招标文件挂网计划时间", label: "招标文件挂网计划时间",
width: 190, width: 190,
formatter: (cell, data, value) => { formatter: (cell, data, value) => {
return this.$moment(new Date(value)).format("YYYY年MM月DD"); return value ? this.$moment(new Date(value)).format("YYYY年MM月DD") : '未完成';
}, },
}, },
{ {
@ -138,7 +140,7 @@ export default {
label: "招标文件挂网实际时间", label: "招标文件挂网实际时间",
width: 190, width: 190,
formatter: (cell, data, value) => { formatter: (cell, data, value) => {
return this.$moment(new Date(value)).format("YYYY年MM月DD"); return value ? this.$moment(new Date(value)).format("YYYY年MM月DD") : '未完成';
}, },
}, },
{ {
@ -146,7 +148,7 @@ export default {
label: "项目开标计划时间", label: "项目开标计划时间",
width: 180, width: 180,
formatter: (cell, data, value) => { formatter: (cell, data, value) => {
return this.$moment(new Date(value)).format("YYYY年MM月DD"); return value ? this.$moment(new Date(value)).format("YYYY年MM月DD") : '未完成';
}, },
}, },
{ {
@ -154,13 +156,37 @@ export default {
label: "项目开标实际时间", label: "项目开标实际时间",
width: 180, width: 180,
formatter: (cell, data, value) => { formatter: (cell, data, value) => {
return this.$moment(new Date(value)).format("YYYY年MM月DD"); return value ? this.$moment(new Date(value)).format("YYYY年MM月DD") : '未完成';
}, },
}, },
{
prop: 'plan.name',
label: '关联计划',
width: 220,
align: 'left'
},
{
prop: 'department.name',
label: '部门',
width: 150
}
], ],
}; };
}, },
methods: { methods: {
cellStyle ({ column }) {
if (/计划时间/g.test(column.label)) {
return {
background: 'rgba(200,0,0,.1)'
}
}
if (/实际时间/g.test(column.label)) {
return {
background: 'rgba(0,200,0,.1)'
}
}
},
async getList() { async getList() {
const res = await index(this.select); const res = await index(this.select);
this.total = res.total; this.total = res.total;

Loading…
Cancel
Save