xy 1 year ago
parent 7c0c4dbda8
commit 049ce19adb

@ -297,7 +297,6 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<div class="slot-btns"> <div class="slot-btns">
<Button v-if="$store.state.user.min_allow_level === 0" class="slot-btns-item" size="small" type="primary" @click="resetMoney(scope.row)"></Button>
<template v-if="scope.row.FLOWSTATUS['zhifu'].isEnabled() && !/contractLedger/g.test($route.path)"> <template v-if="scope.row.FLOWSTATUS['zhifu'].isEnabled() && !/contractLedger/g.test($route.path)">
<template v-if="scope.row.is_assurance === 1"> <template v-if="scope.row.is_assurance === 1">
<!-- 如果是 履约文件--> <!-- 如果是 履约文件-->
@ -580,6 +579,7 @@
签订修改 签订修改
</Button> </Button>
</template> </template>
<Button v-if="$store.state.user.min_allow_level === 0" class="slot-btns-item" size="small" type="primary" @click="resetMoney(scope.row)"></Button>
</div> </div>
</Poptip> </Poptip>
</div> </div>

@ -245,9 +245,6 @@ import {
import { import {
detailContract, resetMoney detailContract, resetMoney
} from "@/api/contract/contract"; } from "@/api/contract/contract";
import {
Message
} from "element-ui";
import { import {
parseTime, parseTime,
moneyFormatter moneyFormatter
@ -350,7 +347,7 @@ import { listdeptNoAuth } from '@/api/system/department'
planTable: [{ planTable: [{
sortable: false, sortable: false,
width: 44, width: 44,
type: 'selection' type: 'selection',
}, },
{ {
label: "年份", label: "年份",
@ -422,14 +419,7 @@ import { listdeptNoAuth } from '@/api/system/department'
moneyWayChange(e) { moneyWayChange(e) {
this.paymentRegistrationForm.moneyWay = e; this.paymentRegistrationForm.moneyWay = e;
let page = 1 this.plansSelect.page = 1;
let pageSize = this.plansSelect.page_size
let name = this.plansSelect.name
this.plansSelect = {
page: page,
page_size: pageSize,
name: name
}
if (this.paymentRegistrationForm.moneyWay) { if (this.paymentRegistrationForm.moneyWay) {
let _arr = []; let _arr = [];
this.paymentRegistrationForm.moneyWay.forEach((item, index) => { this.paymentRegistrationForm.moneyWay.forEach((item, index) => {
@ -437,7 +427,9 @@ import { listdeptNoAuth } from '@/api/system/department'
}); });
this.plansSelect[`type`]=_arr +''; this.plansSelect[`type`]=_arr +'';
} }
if (this.paymentRegistrationForm.plan.length === 0) {
this.getBudgets() this.getBudgets()
}
}, },
inputMoney(e, row) { inputMoney(e, row) {
@ -474,7 +466,7 @@ import { listdeptNoAuth } from '@/api/system/department'
}, },
// //
pageChange(e) { pageChange(e) {
this.pageIndex = e this.plansSelect.page = e
this.getBudgets() this.getBudgets()
}, },
@ -530,8 +522,12 @@ import { listdeptNoAuth } from '@/api/system/department'
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) this.getContract(res.contract)
await this.moneyWayChange(this.paymentRegistrationForm.moneyWay) this.moneyWayChange(this.paymentRegistrationForm.moneyWay)
if (res.plan_link.length > 0) {
await this.getBudgets(1)
}
}, },
// //
@ -577,7 +573,13 @@ import { listdeptNoAuth } from '@/api/system/department'
apply_money: this.paymentRegistrationForm.applyMoney, apply_money: this.paymentRegistrationForm.applyMoney,
discount_money: this.paymentRegistrationForm.deductionMoney, discount_money: this.paymentRegistrationForm.deductionMoney,
money_way_id: this.paymentRegistrationForm.moneyWay.toString(), money_way_id: this.paymentRegistrationForm.moneyWay.toString(),
contract_plan_act_links: this.paymentRegistrationForm.plan contract_plan_act_links: this.$refs["planTable"].getSelection().map(item => ({
contract_id: this.contract.id,
plan_id: item.id,
use_money: item.use_money,
new_money: item.money,
label: item.name
}))
}).then(res => { }).then(res => {
resetMoney({ resetMoney({
id: this.contract.id, id: this.contract.id,
@ -585,7 +587,7 @@ import { listdeptNoAuth } from '@/api/system/department'
}) })
this.$emit('refresh') this.$emit('refresh')
this.isShow = false this.isShow = false
Message({ this.$message({
type: 'success', type: 'success',
message: '操作成功' message: '操作成功'
}) })
@ -594,17 +596,18 @@ import { listdeptNoAuth } from '@/api/system/department'
// //
// //
async getBudgets() { async getBudgets(is_tree=0) {
let res = await getBudget({ let res = await getBudget({
top_pid: 1, top_pid: is_tree ? 0 : 1,
...this.plansSelect ...this.plansSelect,
pid: is_tree ? this.paymentRegistrationForm.plan?.map(i => i.plan_id)?.toString() : ""
}) })
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.plansSelect.page = e this.plansSelect.page = e
@ -688,10 +691,9 @@ import { listdeptNoAuth } from '@/api/system/department'
}, },
created() { created() {
this.getDepartment() this.getDepartment()
this.getPlanTypes()
}, },
async mounted() { mounted() {
//await this.getBudgets()
await this.getPlanTypes()
} }
} }
</script> </script>

@ -481,12 +481,17 @@ export default {
this.isShow = false; this.isShow = false;
}, },
init() { init() {
for (let key in this.form) { this.form = {
if (this.form[key] instanceof Array) { name: "",
this.form[key] = []; outcome_type: "",
} else { report_type: "",
this.form[key] = ""; other_type: "",
} money: undefined,
files: [],
remark: "",
oa: [],
plan_link: [],
has_act_links:1
} }
this.$refs["dialog"].clearValidate(); this.$refs["dialog"].clearValidate();
}, },

@ -97,7 +97,7 @@
<span style="padding: 0 6px"> 其他支出类型 </span> <span style="padding: 0 6px"> 其他支出类型 </span>
<span> <span>
<Select <Select
v-model="select.type" v-model="select.other_type"
clearable clearable
placeholder="选择其他支出类型" placeholder="选择其他支出类型"
style="width: 130px" style="width: 130px"

Loading…
Cancel
Save