xy 2 years ago
parent 10d27d4d0a
commit 2165dd66bd

@ -152,25 +152,7 @@
}, },
{ {
label: "分类", label: "分类",
prop: 'type', prop: 'type_detail.value',
formatter: (cell, data, value) => {
switch (value) {
case 1:
return "部门预算"
break;
case 2:
return "水务计划"
break;
case 3:
return '补助经费'
break;
case 4:
return '其他'
break;
default:
return "未知"
}
}
}, },
{ {
label: "名称", label: "名称",
@ -180,7 +162,10 @@
{ {
label: "计划金额", label: "计划金额",
prop: 'money', prop: 'money',
align: 'right' align: 'right',
formatter: (v1, v2, value) => {
return `${(value && parseFloat(value) !== 0) ? value : v1.update_money }`.replace(/\B(?=(\d{3})+(?!\d))/g, ",")
}
} }
], ],
rules: { rules: {

@ -199,25 +199,7 @@ export default {
}, },
{ {
label:"分类", label:"分类",
prop:'type', prop: 'type_detail.value',
formatter:(cell,data,value)=>{
switch (value){
case 1:
return "部门预算"
break;
case 2:
return "水务计划"
break;
case 3:
return '补助经费'
break;
case 4:
return '其他'
break;
default:
return "未知"
}
}
}, },
{ {
label:"名称", label:"名称",
@ -227,7 +209,10 @@ export default {
{ {
label:"计划金额", label:"计划金额",
prop:'money', prop:'money',
align:'right' align:'right',
formatter: (v1, v2, value) => {
return `${(value && parseFloat(value) !== 0) ? value : v1.update_money }`.replace(/\B(?=(\d{3})+(?!\d))/g, ",")
}
} }
], ],
} }

@ -323,7 +323,7 @@ export default {
isLast: false, isLast: false,
plan: [], plan: [],
remark: "", remark: "",
files: [] //files: []
}, },
form: { form: {
audit_money: 0, audit_money: 0,
@ -364,13 +364,7 @@ export default {
}, },
{ {
label: "分类", label: "分类",
prop: "type", prop: "type_detail.value"
formatter: (cell, data, value) => {
let res = this.planTypes.filter((item) => {
return item.id === value;
});
return res[0]?.value || "未知";
},
}, },
{ {
label: "名称", label: "名称",
@ -381,6 +375,9 @@ export default {
label: "计划金额", label: "计划金额",
prop: "money", prop: "money",
align: "right", align: "right",
formatter: (v1, v2, value) => {
return `${(value && parseFloat(value) !== 0) ? value : v1.update_money }`.replace(/\B(?=(\d{3})+(?!\d))/g, ",")
}
}, },
], ],
}; };
@ -490,7 +487,7 @@ export default {
remark: this.paymentRegistrationForm.remark, remark: this.paymentRegistrationForm.remark,
audit_money: '', audit_money: '',
//audit_money: this.paymentRegistrationForm.audit_money, //audit_money: this.paymentRegistrationForm.audit_money,
files:this.fileList? this.fileList.map(i => i?.response?.id):[] //files:this.fileList? this.fileList.map(i => i?.response?.id):[]
}; };
addFundLog(data).then((res) => { addFundLog(data).then((res) => {
// //

@ -1121,8 +1121,9 @@ export default {
prop: "money", prop: "money",
align: "right", align: "right",
width: 120, width: 120,
formatter: (v1, v2, value) => formatter: (v1, v2, value) => {
value ? `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ",") : "", return `${(value && parseFloat(value) !== 0) ? value : v1.update_money }`.replace(/\B(?=(\d{3})+(?!\d))/g, ",")
}
}, },
{ {
label: "实付金额", label: "实付金额",
@ -1296,7 +1297,7 @@ export default {
}); });
return; return;
} }
if (i._inputMoney > Number(i.money) - Number(i.has_money_total)) { if (i._inputMoney > ((Number(i.money) || Number(i.update_money)) - Number(i.has_money_total))) {
this.$message({ this.$message({
type: "warning", type: "warning",
message: `${i.year}${i.name} 使用金额大于剩余预算!`, message: `${i.year}${i.name} 使用金额大于剩余预算!`,

@ -841,13 +841,7 @@ export default {
planTableSearch: [ planTableSearch: [
{ {
label: "分类", label: "分类",
prop: "type", prop: "type_detail.value",
formatter: (cell, data, value) => {
let res = this.moneyWay.filter((item) => {
return item.id === value;
});
return res[0]?.value || "未知";
},
}, },
{ {
label: "年份", label: "年份",
@ -863,6 +857,9 @@ export default {
label: "计划金额", label: "计划金额",
prop: "money", prop: "money",
align: "right", align: "right",
formatter: (v1, v2, value) => {
return `${(value && parseFloat(value) !== 0) ? value : v1.update_money }`.replace(/\B(?=(\d{3})+(?!\d))/g, ",")
}
}, },
], ],
planTable: [ planTable: [
@ -874,13 +871,7 @@ export default {
}, },
{ {
label: "分类", label: "分类",
prop: "type", prop: "type_detail.value",
formatter: (cell, data, value) => {
let res = this.moneyWay.filter((item) => {
return item.id === value;
});
return res[0]?.value || "未知";
},
width: 100, width: 100,
fixed: "left", fixed: "left",
}, },
@ -908,6 +899,9 @@ export default {
prop: "money", prop: "money",
align: "right", align: "right",
width: 120, width: 120,
formatter: (v1, v2, value) => {
return `${(value && parseFloat(value) !== 0) ? value : v1.update_money }`.replace(/\B(?=(\d{3})+(?!\d))/g, ",")
}
}, },
], ],

@ -395,7 +395,7 @@ import { listdeptNoAuth } from '@/api/system/department'
}, },
{ {
label: "已经使用", label: "已经使用",
prop: 'use_money_total', prop: 'has_money_total',
width: 136, width: 136,
align: 'right', align: 'right',
} }
@ -441,12 +441,17 @@ import { listdeptNoAuth } from '@/api/system/department'
}, },
inputMoney(e, row) { inputMoney(e, row) {
if ((parseFloat(e) + parseFloat(row.has_money_total)) > (parseFloat(row.money) || parseFloat(row.update_money))) {
this.$message.warning("使用金额不能大于计划金额");
return
}
row.use_money = e row.use_money = e
this.paymentRegistrationForm.plan.forEach(item => { this.paymentRegistrationForm.plan.forEach(item => {
if (item.plan_id == row.id) { if (item.plan_id == row.id) {
item.use_money = e item.use_money = e
} }
}) })
}, },
async getPlanTypes() { async getPlanTypes() {
const res = await getparameterTree({ const res = await getparameterTree({
@ -523,10 +528,10 @@ import { listdeptNoAuth } from '@/api/system/department'
this.paymentRegistrationForm.plan = res.plan_link this.paymentRegistrationForm.plan = res.plan_link
this.paymentRegistrationForm.actMoney = res.apply_money this.paymentRegistrationForm.actMoney = res.apply_money
this.paymentRegistrationForm.moneyWay = res.money_way_id?.split(',').map(item => Number(item)) this.paymentRegistrationForm.moneyWay = res.money_way_id?.split(',')?.map(item => Number(item))
await this.getContract(res.contract) await this.getContract(res.contract)
await this.moneyWayChange() await this.moneyWayChange(this.paymentRegistrationForm.moneyWay)
}, },
// //

@ -229,6 +229,9 @@ export default {
prop: "money", prop: "money",
align: "right", align: "right",
width: 160, width: 160,
formatter: (v1, v2, value) => {
return `${(value && parseFloat(value) !== 0) ? value : v1.update_money }`.replace(/\B(?=(\d{3})+(?!\d))/g, ",")
}
}, },
], ],
plans: [], // plans: [], //

Loading…
Cancel
Save