diff --git a/src/views/budget/budgetList.vue b/src/views/budget/budgetList.vue index 477bb1d..235b0cc 100644 --- a/src/views/budget/budgetList.vue +++ b/src/views/budget/budgetList.vue @@ -1,22 +1,22 @@ @@ -88,9 +91,10 @@ *科室
- + + + +
@@ -100,7 +104,7 @@ *内容
- +
@@ -110,7 +114,8 @@ *金额
- +
@@ -120,21 +125,21 @@ 备注
- +
- + @@ -144,9 +149,9 @@ *预算类型
- + + :value="item.id">
@@ -157,8 +162,8 @@ *项目所属年份
- +
@@ -168,9 +173,9 @@ *科室
- +
@@ -180,8 +185,8 @@ *内容
- +
@@ -191,7 +196,8 @@ *金额
- +
@@ -201,8 +207,8 @@ 备注
- +
@@ -214,333 +220,334 @@ - diff --git a/src/views/budget/seeBudget.vue b/src/views/budget/seeBudget.vue index 652c5d6..c5bf9eb 100644 --- a/src/views/budget/seeBudget.vue +++ b/src/views/budget/seeBudget.vue @@ -22,15 +22,10 @@ 科室 - + + + + diff --git a/src/views/contract/components/paymentRegistration.vue b/src/views/contract/components/paymentRegistration.vue index 5140414..517a403 100644 --- a/src/views/contract/components/paymentRegistration.vue +++ b/src/views/contract/components/paymentRegistration.vue @@ -15,6 +15,16 @@
合同金额
{{priceFormat(contract.money)}} (元)
+
+
+
已申请金额
+
{{totalApplyMoney()}} (元)
+
+
+
已申请笔数
+
{{payment.length}}
+
+
已付金额
@@ -26,7 +36,7 @@
已付笔数
-
{{payment.length}}
+
{{actNumsTotal()}}
点击查看列表
@@ -139,11 +149,17 @@ export default { payment:[],//合同关联的付款登记 payTable:[ { - label:'支付金额', + label:'申请金额', prop:'apply_money', sortable:false, align:'right' }, + { + label:'已付金额', + prop:'act_money', + sortable: false, + align:'right' + }, { label:'时间', prop:'created_at', @@ -217,6 +233,14 @@ export default { this.getBudgets() }, + //合计申请金额 + totalApplyMoney(){ + let total = 0.00 + this.payment.map(item => { + total += Number(item.apply_money) + }) + return total.toFixed(2) + }, //合计金额 totalMoney(){ let total = 0.00 @@ -225,6 +249,16 @@ export default { }) return total.toFixed(2) }, + //已付笔数 + actNumsTotal(){ + let total = 0 + this.payment.map(item => { + if(Number(item.act_money)){ + total ++ + } + }) + return total + }, //支付占比 percentPay(){ let total = this.totalMoney() @@ -271,9 +305,9 @@ export default { this.plans = res.list.data this.planTotal = res.list.total - this.toggleSelection(this.paymentRegistrationForm.plan.map(item => { - return item.plan_id - })) + // this.toggleSelection(this.paymentRegistrationForm.plan.map(item => { + // return item.plan_id + // })) }, planPageChange(e){ this.plansPageIndex = e diff --git a/src/views/contract/contractList.vue b/src/views/contract/contractList.vue index 7c91d69..af1a582 100644 --- a/src/views/contract/contractList.vue +++ b/src/views/contract/contractList.vue @@ -31,15 +31,10 @@ 业务科室 - + + + +
@@ -516,6 +511,18 @@ export default { return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,') } }, + { + label:'支付占比', + width: 180, + customFn:(row)=>{ + let per = ((((row.fund_log_total)/row.money)||0)*100)?.toFixed(2) || 0 + return ( +
110 ? 'red' : 'green'}}> + {per.padStart(5,'0')}% +
+ ) + } + }, { label:"合同预算价(元)", width: 180, diff --git a/src/views/contract/seeContract.vue b/src/views/contract/seeContract.vue index d13ab67..99575e4 100644 --- a/src/views/contract/seeContract.vue +++ b/src/views/contract/seeContract.vue @@ -31,15 +31,10 @@ 业务科室 - + + + +
diff --git a/src/views/finance/components/examineRegistration.vue b/src/views/finance/components/examineRegistration.vue index d8a6a92..9e4fea3 100644 --- a/src/views/finance/components/examineRegistration.vue +++ b/src/views/finance/components/examineRegistration.vue @@ -26,7 +26,7 @@
已付笔数
-
{{payment.length}}
+
{{actNumsTotal()}}
点击查看列表
@@ -115,7 +115,7 @@ *资金列支渠道
- +
@@ -134,7 +134,7 @@
- +
@@ -187,7 +187,7 @@ export default { //isLast:false, plan:[], actMoney:'', - moneyWay:'',//资金列支渠道 + moneyWay:[],//资金列支渠道 }, paymentRegistrationRules:{ applyMoney:[ @@ -209,6 +209,10 @@ export default { {required:true,message:"必填"} ] }, + plansSelect:{ + page:1, + page_size:10 + }, planTable:[ { sortable:false, @@ -239,6 +243,20 @@ export default { } }, methods: { + //资金列支渠道选择后变化 + moneyWayChange(){ + let page = this.plansSelect.page + let pageSize = this.plansSelect.page_size + this.plansSelect = { + page:page, + page_size:pageSize + } + this.paymentRegistrationForm.moneyWay.forEach((item,index)=>{ + this.plansSelect[`type[${index}]`] = item + }) + this.getBudgets() + }, + inputMoney(e,row){ row.use_money = e this.paymentRegistrationForm.plan.forEach(item => { @@ -265,6 +283,16 @@ export default { }) return moneyFormatter(total) }, + //已付笔数 + actNumsTotal(){ + let total = 0 + this.payment.map(item => { + if(Number(item.act_money)){ + total ++ + } + }) + return total + }, //支付占比 percentPay(){ let total = 0 @@ -283,9 +311,11 @@ export default { this.paymentRegistrationForm.applyMoney = res.apply_money this.paymentRegistrationForm.plan = res.plan_link this.paymentRegistrationForm.discountMoney = res.discount_money - this.paymentRegistrationForm.actMoney = res.apply_money - res.discount_money + this.paymentRegistrationForm.actMoney = (res.apply_money - res.discount_money)?.toFixed(2) + this.paymentRegistrationForm.moneyWay = res.money_way_id?.split(',').map(item=>Number(item)) await this.getContract(res.contract) + await this.moneyWayChange() }, //获取合同信息 @@ -302,6 +332,19 @@ export default { //确认审核 editor(){ + console.log(this.paymentRegistrationForm) + let total = 0 + this.paymentRegistrationForm.plan.forEach(item => { + total += Number(item.use_money) + }) + console.log(Number(this.paymentRegistrationForm.actMoney),total) + if(Number(this.paymentRegistrationForm.actMoney) !== total){ + Message({ + type:'warning', + message:'实际付款金额与计划总金额不符' + }) + return + } editorFundLog({ id:this.registrationId, contract_id:this.contract.id, @@ -322,7 +365,7 @@ export default { //计划 //获取预算计划 async getBudgets(){ - let res = await getBudget({name:this.searchContent,page_size:10,page:this.plansPageIndex}) + let res = await getBudget(this.plansSelect) this.plans = res.list.data this.planTotal = res.list.total @@ -381,7 +424,7 @@ export default { } }, async mounted() { - await this.getBudgets() + //await this.getBudgets() await this.getPlanTypes() } } diff --git a/src/views/statisticalReport/budgetProgress.vue b/src/views/statisticalReport/budgetProgress.vue index 69c2af2..bebbf9f 100644 --- a/src/views/statisticalReport/budgetProgress.vue +++ b/src/views/statisticalReport/budgetProgress.vue @@ -19,15 +19,10 @@ 科室 - + + + + @@ -35,7 +30,7 @@ - + @@ -51,6 +46,7 @@ import {getProgress} from "@/api/budget/budget" import {listdeptNoAuth} from "@/api/system/department"; import {getparameter} from "@/api/system/dictionary"; +import {moneyFormatter} from "@/utils"; export default { data() { @@ -63,6 +59,8 @@ export default { type:'', department:'' }, + rateTotal:'0%', + moneyTotal:0, total:0, list:[], table:[ @@ -98,7 +96,7 @@ export default { prop:'content', label:'描述', align:'left', - minWidth:250 + minWidth:300 }, { prop:'rate', @@ -107,11 +105,41 @@ export default { formatter:(cell,data,value)=>{ return value + '%' } + }, + { + prop:'use_money_total', + label:'使用金额', + align:'right', + width: 180 } ] } }, methods: { + //统计 + summary(param){ + this.$nextTick(()=>{ + this.$refs['xyTable'].$children[0].doLayout() + }) + const { columns, data } = param + const sums = [] + columns.map((column,index) => { + if(index === 0){ + sums[index] = '总计' + return + } + if(column.property === 'rate'){ + sums[index] = this.rateTotal+'%' + return + } + if(column.property === 'use_money_total'){ + sums[index] = moneyFormatter(this.moneyTotal) + } + }) + + return sums + }, + async getType(){ const res = await getparameter({number:'money_way'}) this.type = res.detail @@ -136,8 +164,10 @@ export default { type:this.select.type, plan_department_id:this.select.department }) - this.list = res.data - this.total = res.total + this.list = res.list.data + this.total = res.list.total + this.rateTotal = res.rate + this.moneyTotal = res.use_money_total console.log(res) } },