master
xy 2 years ago
parent efce408990
commit 0bd258cbb9

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

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

@ -185,7 +185,66 @@
$refs['addExpenseAccount'].show(); $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"> <div style="display: flex; justify-content: flex-end; padding: 10px 0">
<Page <Page
@ -214,6 +273,9 @@
ref="addExpenseAccount" ref="addExpenseAccount"
@refresh="getList" @refresh="getList"
></addExpenseAccount> ></addExpenseAccount>
<detailContract ref="detailContract"></detailContract>
<paymentRegistration ref="paymentRegistration" @refresh="getList"></paymentRegistration>
</div> </div>
</template> </template>
@ -223,9 +285,11 @@ import { getparameter } from "@/api/system/dictionary";
import { listdeptNoAuth } from "@/api/system/department"; import { listdeptNoAuth } from "@/api/system/department";
import addExpenseAccount from "@/views/inOut/component/addExpenseAccount.vue"; 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 { export default {
components: { components: {
addExpenseAccount, addExpenseAccount,detailContract,paymentRegistration
}, },
data() { data() {
return { return {
@ -277,39 +341,41 @@ export default {
}, },
{ {
prop: "money", prop: "money",
label: this.$route.path.split("_")[1] == 2 ? "报销金额(元)" : "支出金额(元)", label:
this.$route.path.split("_")[1] == 2
? "报销金额(元)"
: "支出金额(元)",
width: 140, width: 140,
align: "right", align: "right",
}, },
{ {
prop: "use_money_total", prop: "use_money_total",
label: this.$route.path.split("_")[1] == 2 ? "实际报销金额(元)" : "实际支出金额(元)", label:
this.$route.path.split("_")[1] == 2
? "实际报销金额(元)"
: "实际支出金额(元)",
width: 140, width: 140,
align: "right", align: "right",
customFn:row => { customFn: (row) => {
let total = 0 let total = 0;
row.plans?.forEach(i => { row.plans?.forEach((i) => {
total += Number(i.money) || 0 total += Number(i.money) || 0;
}) });
return ( return <span>{total}</span>;
<span>{ total }</span> },
)
}
}, },
{ {
prop: "has_money_total", prop: "has_money_total",
label: "已付金额", label: "已付金额",
width: 140, width: 140,
align: "right", align: "right",
customFn:row => { customFn: (row) => {
let total = 0 let total = 0;
row.plans?.forEach(i => { row.plans?.forEach((i) => {
total += Number(i.end_money) || 0 total += Number(i.end_money) || 0;
}) });
return ( return <span>{total}</span>;
<span>{ total }</span> },
)
}
}, },
{ {
prop: "department.name", prop: "department.name",

Loading…
Cancel
Save