master
xy 2 years ago
parent efce408990
commit 0bd258cbb9

@ -19,13 +19,13 @@
</div>
</div>
<div class="payment-registration-row">
<div class="payment-registration-row-title">合同名称</div>
<div class="payment-registration-row-title">{{ nameFormat($route.path.split('_')[1]) }}名称</div>
<div class="payment-registration-row-content">
{{ contract.name }}
</div>
</div>
<div class="payment-registration-row">
<div class="payment-registration-row-title">合同金额</div>
<div class="payment-registration-row-title">{{ nameFormat($route.path.split('_')[1]) }}金额</div>
<div class="payment-registration-row-content">
{{ priceFormat(contract.money) }}
</div>
@ -521,6 +521,18 @@ export default {
.replace(/(\d)(?=(\d{3})+\.)/g, "$1,");
};
},
nameFormat () {
return function(index) {
if (index == 2) {
return '报销'
}
if (index == 3) {
return '其他支出'
}
return '合同'
}
}
},
watch: {
isShowPaymentRegistration(newVal) {

@ -375,6 +375,7 @@ export default {
startDate: "",
endDate: "",
type: "",
outcome_type: 1,
department_id: "",
purchaseModality: "",
purchaseMethods: "",
@ -398,6 +399,7 @@ export default {
startDate: "",
endDate: "",
type: "",
outcome_type: 1,
department_id: "",
purchaseModality: "",
purchaseMethods: "",

@ -185,7 +185,66 @@
$refs['addExpenseAccount'].show();
}
"
></xy-table>
>
<template #btns>
<el-table-column label="操作" width="220" fixed="right">
<template #default="scope">
<Button
class="slot-btns-item"
size="small"
type="primary"
@click="
$refs['paymentRegistration'].getContract(scope.row),
($refs[
'paymentRegistration'
].isShowPaymentRegistration = true)
"
>
付款登记
</Button>
<template v-if="!scope.row.status === 2">
<Poptip
:transfer="true"
confirm
placement="bottom"
title="确认要删除吗"
@on-ok="() => destroy(scope.row.id)"
>
<i-button style="margin-left: 4px" ghost size="small" type="error"
>删除
</i-button>
</Poptip>
</template>
<Button
style="margin-left: 4px"
size="small"
type="primary"
@click="
$refs['detailContract'].getDetail(scope.row.id),
($refs['detailContract'].isShowDetail = true)
"
>
查看
</Button>
<template v-if="scope.row.status != 2">
<Button
style="margin-left: 4px"
size="small"
type="primary"
@click="
() => {
$refs['addExpenseAccount'].setType('editor');
$refs['addExpenseAccount'].setId(scope.row.id);
$refs['addExpenseAccount'].show();
}
"
>编辑
</Button>
</template>
</template>
</el-table-column>
</template>
</xy-table>
<div style="display: flex; justify-content: flex-end; padding: 10px 0">
<Page
@ -214,6 +273,9 @@
ref="addExpenseAccount"
@refresh="getList"
></addExpenseAccount>
<detailContract ref="detailContract"></detailContract>
<paymentRegistration ref="paymentRegistration" @refresh="getList"></paymentRegistration>
</div>
</template>
@ -223,9 +285,11 @@ import { getparameter } from "@/api/system/dictionary";
import { listdeptNoAuth } from "@/api/system/department";
import addExpenseAccount from "@/views/inOut/component/addExpenseAccount.vue";
import detailContract from '@/views/contract/components/detailContract.vue';
import paymentRegistration from '@/views/contract/components/paymentRegistration.vue'
export default {
components: {
addExpenseAccount,
addExpenseAccount,detailContract,paymentRegistration
},
data() {
return {
@ -277,39 +341,41 @@ export default {
},
{
prop: "money",
label: this.$route.path.split("_")[1] == 2 ? "报销金额(元)" : "支出金额(元)",
label:
this.$route.path.split("_")[1] == 2
? "报销金额(元)"
: "支出金额(元)",
width: 140,
align: "right",
},
{
prop: "use_money_total",
label: this.$route.path.split("_")[1] == 2 ? "实际报销金额(元)" : "实际支出金额(元)",
label:
this.$route.path.split("_")[1] == 2
? "实际报销金额(元)"
: "实际支出金额(元)",
width: 140,
align: "right",
customFn:row => {
let total = 0
row.plans?.forEach(i => {
total += Number(i.money) || 0
})
return (
<span>{ total }</span>
)
}
customFn: (row) => {
let total = 0;
row.plans?.forEach((i) => {
total += Number(i.money) || 0;
});
return <span>{total}</span>;
},
},
{
prop: "has_money_total",
label: "已付金额",
width: 140,
align: "right",
customFn:row => {
let total = 0
row.plans?.forEach(i => {
total += Number(i.end_money) || 0
})
return (
<span>{ total }</span>
)
}
customFn: (row) => {
let total = 0;
row.plans?.forEach((i) => {
total += Number(i.end_money) || 0;
});
return <span>{total}</span>;
},
},
{
prop: "department.name",

Loading…
Cancel
Save