|
|
|
|
@ -0,0 +1,611 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<!-- 付款登记-->
|
|
|
|
|
<xy-dialog
|
|
|
|
|
title="付款登记"
|
|
|
|
|
:is-show.sync="isShowPaymentRegistration"
|
|
|
|
|
type="form"
|
|
|
|
|
class="payment-registration"
|
|
|
|
|
:form="paymentRegistrationForm"
|
|
|
|
|
:rules="paymentRegistrationRules"
|
|
|
|
|
@submit="submit"
|
|
|
|
|
ref="paymentRegistration"
|
|
|
|
|
>
|
|
|
|
|
<template v-slot:extraFormTop>
|
|
|
|
|
<div class="payment-registration-row">
|
|
|
|
|
<div class="payment-registration-row-title">出差名称</div>
|
|
|
|
|
<div class="payment-registration-row-content">
|
|
|
|
|
{{ contract.title }}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:applyMoney>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red; font-weight: 600; padding-right: 4px"
|
|
|
|
|
>*</span
|
|
|
|
|
>申请付款金额
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content xy-table-item-price">
|
|
|
|
|
<el-input
|
|
|
|
|
clearable
|
|
|
|
|
placeholder="请填写付款金额"
|
|
|
|
|
v-model="paymentRegistrationForm.applyMoney"
|
|
|
|
|
style="width: 150px"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template v-slot:audit_money>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">审计金额</div>
|
|
|
|
|
<div class="xy-table-item-content xy-table-item-price">
|
|
|
|
|
<el-input
|
|
|
|
|
clearable
|
|
|
|
|
placeholder="请填写审计金额"
|
|
|
|
|
v-model="form.audit_money"
|
|
|
|
|
style="width: 150px"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:deductionMoney>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red; font-weight: 600; padding-right: 4px"
|
|
|
|
|
>*</span
|
|
|
|
|
>本期扣款金额
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content xy-table-item-price">
|
|
|
|
|
<el-input
|
|
|
|
|
clearable
|
|
|
|
|
placeholder="请填写扣款金额"
|
|
|
|
|
v-model="paymentRegistrationForm.deductionMoney"
|
|
|
|
|
style="width: 150px"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template v-slot:remark>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">备注</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input
|
|
|
|
|
type="textarea"
|
|
|
|
|
clearable
|
|
|
|
|
placeholder="备注"
|
|
|
|
|
v-model="paymentRegistrationForm.remark"
|
|
|
|
|
style="width: 300px"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:type>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red; font-weight: 600; padding-right: 4px"
|
|
|
|
|
>*</span
|
|
|
|
|
>款项类型
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-select
|
|
|
|
|
placeholder="选择款项类型或直接录入其他类型"
|
|
|
|
|
v-model="paymentRegistrationForm.type"
|
|
|
|
|
style="width: 150px"
|
|
|
|
|
filterable
|
|
|
|
|
allow-create
|
|
|
|
|
clearable
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in paymentType"
|
|
|
|
|
:key="item"
|
|
|
|
|
:label="item"
|
|
|
|
|
:value="item"
|
|
|
|
|
>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:isLast>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label" style="width: 200px">
|
|
|
|
|
<span style="color: red; font-weight: 600; padding-right: 4px"
|
|
|
|
|
>*</span
|
|
|
|
|
>是否为最后一笔
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-switch v-model="paymentRegistrationForm.isLast" />
|
|
|
|
|
<!-- @change="toggleSelection"-->
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template #files v-if="paymentRegistrationForm.type === '结算款'">
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
附件 :
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-upload
|
|
|
|
|
style="width: 300px"
|
|
|
|
|
ref="upload"
|
|
|
|
|
multiple
|
|
|
|
|
:on-success="successHandle"
|
|
|
|
|
:before-upload="uploadBefore"
|
|
|
|
|
accept=".rar,.zip,.doc,.docx,.pdf,.jpg,.png,.gif,.mp4,.xls,.xlsx"
|
|
|
|
|
:action="action"
|
|
|
|
|
:file-list="fileList"
|
|
|
|
|
:auto-upload="false"
|
|
|
|
|
:on-remove="removeHande"
|
|
|
|
|
:limit="10"
|
|
|
|
|
>
|
|
|
|
|
<el-button slot="trigger" size="small" type="primary"
|
|
|
|
|
>选取文件</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
style="margin-left: 10px"
|
|
|
|
|
size="small"
|
|
|
|
|
type="success"
|
|
|
|
|
@click="$refs['upload'].submit()"
|
|
|
|
|
>开始上传</el-button
|
|
|
|
|
>
|
|
|
|
|
<div slot="tip" class="el-upload__tip">
|
|
|
|
|
支持文件格式:.rar .zip .doc .docx .pdf .jpg .png .gif .mp4 .xls
|
|
|
|
|
.xlsx
|
|
|
|
|
<br />单个文件不能超过20M
|
|
|
|
|
</div>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:extraFormBottom>
|
|
|
|
|
<div style="display: flex;align-items: center;">
|
|
|
|
|
<el-select
|
|
|
|
|
placeholder="科室选择"
|
|
|
|
|
clearable
|
|
|
|
|
size="small"
|
|
|
|
|
v-model="plansSelect.plan_department_id"
|
|
|
|
|
style="width: 160px"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in departments"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.id"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
<el-cascader
|
|
|
|
|
:options="planTypes"
|
|
|
|
|
:props="{
|
|
|
|
|
checkStrictly: false,
|
|
|
|
|
label: 'name',
|
|
|
|
|
value: 'id',
|
|
|
|
|
}"
|
|
|
|
|
:value="plansSelect.type"
|
|
|
|
|
clearable
|
|
|
|
|
size="small"
|
|
|
|
|
style="width: 160px;margin-left: 6px;"
|
|
|
|
|
@change="(e) => (plansSelect.type = e[e.length - 1] || '')"
|
|
|
|
|
/>
|
|
|
|
|
<Input style="margin-left: 6px;" search enter-button="搜 索" placeholder="搜索预算计划.." v-model="plansSelect.name" @on-search="getBudgets" />
|
|
|
|
|
</div>
|
|
|
|
|
<xy-table
|
|
|
|
|
:list="plans"
|
|
|
|
|
:show-index="false"
|
|
|
|
|
:table-item="planTable"
|
|
|
|
|
:height="310"
|
|
|
|
|
style="margin-top: 10px"
|
|
|
|
|
ref="planTable"
|
|
|
|
|
@select="selectPlan"
|
|
|
|
|
>
|
|
|
|
|
<template v-slot:btns>
|
|
|
|
|
<el-table-column label="使用金额(元)" header-align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<Input
|
|
|
|
|
:value="scope.row.useMoney"
|
|
|
|
|
@input="(e) => (scope.row.useMoney = e)"
|
|
|
|
|
/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
</xy-table>
|
|
|
|
|
|
|
|
|
|
<div style="display: flex; justify-content: flex-end">
|
|
|
|
|
<Page :total="planTotal" show-elevator @on-change="pageChange" />
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</xy-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {getparameter, getparameterTree} from "@/api/system/dictionary";
|
|
|
|
|
import { getFundLog, addFundLog } from "@/api/paymentRegistration/fundLog";
|
|
|
|
|
import { getBudget } from "@/api/budget/budget";
|
|
|
|
|
import { detailContract, editorContract } from "@/api/contract/contract";
|
|
|
|
|
import { Message } from "element-ui";
|
|
|
|
|
import {deepCopy, parseTime} from "@/utils";
|
|
|
|
|
import {getOatoken} from "@/api/oatoken";
|
|
|
|
|
import {listdeptNoAuth} from "@/api/system/department";
|
|
|
|
|
import { save } from "@/api/away";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
departments: [],
|
|
|
|
|
plansSelect: {
|
|
|
|
|
page: 1,
|
|
|
|
|
page_size: 10,
|
|
|
|
|
name: '',
|
|
|
|
|
plan_department_id: "",
|
|
|
|
|
type: ""
|
|
|
|
|
},
|
|
|
|
|
flowIds: [
|
|
|
|
|
{
|
|
|
|
|
flow_id: 14,
|
|
|
|
|
name: "供应品验收",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
flow_id: 57,
|
|
|
|
|
name: "固定资产验收"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
fileList: [],
|
|
|
|
|
action: process.env.VUE_APP_UPLOAD_API,
|
|
|
|
|
searchContent: "",
|
|
|
|
|
planTotal: 0,
|
|
|
|
|
pageIndex: 1,
|
|
|
|
|
//付款登记
|
|
|
|
|
plans: [],
|
|
|
|
|
planTypes: [],
|
|
|
|
|
contract: {},
|
|
|
|
|
payment: [], //合同关联的付款登记
|
|
|
|
|
payTable: [
|
|
|
|
|
{
|
|
|
|
|
label: "申请金额",
|
|
|
|
|
prop: "apply_money",
|
|
|
|
|
sortable: false,
|
|
|
|
|
width: 160,
|
|
|
|
|
align: "right",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "已付金额",
|
|
|
|
|
prop: "act_money",
|
|
|
|
|
sortable: false,
|
|
|
|
|
width: 160,
|
|
|
|
|
align: "right",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "时间",
|
|
|
|
|
prop: "created_at",
|
|
|
|
|
sortable: false,
|
|
|
|
|
width: 120,
|
|
|
|
|
formatter: (t1, t2, value) => {
|
|
|
|
|
return parseTime(new Date(value), "{y}-{m}-{d}");
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
paymentType: ["进度款", "结算款", "质保金"],
|
|
|
|
|
isShowPaymentRegistration: false,
|
|
|
|
|
paymentRegistrationForm: {
|
|
|
|
|
applyMoney: "",
|
|
|
|
|
plan: [],
|
|
|
|
|
remark: "",
|
|
|
|
|
files: []
|
|
|
|
|
},
|
|
|
|
|
form: {
|
|
|
|
|
audit_money: 0,
|
|
|
|
|
},
|
|
|
|
|
paymentRegistrationRules: {
|
|
|
|
|
applyMoney: [
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: "必填",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
pattern: /^\d+(\.\d+)?$/,
|
|
|
|
|
message: "必须为数字",
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
planTable: [
|
|
|
|
|
{
|
|
|
|
|
sortable: false,
|
|
|
|
|
width: 46,
|
|
|
|
|
type: "selection",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "分类",
|
|
|
|
|
prop: "type_detail.value",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "名称",
|
|
|
|
|
prop: "name",
|
|
|
|
|
align: "left",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "计划金额",
|
|
|
|
|
prop: "money",
|
|
|
|
|
align: "right",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
//上传
|
|
|
|
|
successHandle(response, file, fileList) {
|
|
|
|
|
this.fileList = fileList;
|
|
|
|
|
},
|
|
|
|
|
removeHande(file, fileList) {
|
|
|
|
|
this.fileList = fileList;
|
|
|
|
|
},
|
|
|
|
|
uploadBefore(file) {
|
|
|
|
|
console.log(file);
|
|
|
|
|
if ((file.size / 1000) > (20 * 1024)) {
|
|
|
|
|
this.$message({
|
|
|
|
|
type: "warning",
|
|
|
|
|
message: "上传图片大小超过2M!",
|
|
|
|
|
});
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async getPlanTypes() {
|
|
|
|
|
const res = await getparameterTree({
|
|
|
|
|
id: 3
|
|
|
|
|
});
|
|
|
|
|
const dataHandler = (data) => {
|
|
|
|
|
data.forEach(i => {
|
|
|
|
|
if (i.hasOwnProperty('detail')) {
|
|
|
|
|
i.children = i.detail.map(j => {
|
|
|
|
|
j.name = j.value
|
|
|
|
|
return j;
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
dataHandler(i['children'])
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
this.planTypes = dataHandler(res?.children) || []
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//翻页
|
|
|
|
|
pageChange(e) {
|
|
|
|
|
this.pageIndex = e;
|
|
|
|
|
this.getBudgets();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//合计申请金额
|
|
|
|
|
totalApplyMoney() {
|
|
|
|
|
let total = 0.0;
|
|
|
|
|
this.payment.map((item) => {
|
|
|
|
|
total += Number(item.apply_money);
|
|
|
|
|
});
|
|
|
|
|
return total.toFixed(2);
|
|
|
|
|
},
|
|
|
|
|
//合计金额
|
|
|
|
|
totalMoney() {
|
|
|
|
|
let total = 0.0;
|
|
|
|
|
this.payment.map((item) => {
|
|
|
|
|
total += Number(item.act_money);
|
|
|
|
|
});
|
|
|
|
|
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();
|
|
|
|
|
return ((total / this.contract.money) * 100 || 0).toFixed(2) || 0;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//获取合同信息
|
|
|
|
|
async getContract(info) {
|
|
|
|
|
this.contract = await info;
|
|
|
|
|
|
|
|
|
|
const res = await getFundLog({
|
|
|
|
|
away_id: this.contract.id,
|
|
|
|
|
fund_type: 2
|
|
|
|
|
})
|
|
|
|
|
this.payment = res.data;
|
|
|
|
|
|
|
|
|
|
this.paymentRegistrationForm.plan = [];
|
|
|
|
|
|
|
|
|
|
this.payment = [];
|
|
|
|
|
this.fileList = []
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
submit() {
|
|
|
|
|
let data = {
|
|
|
|
|
fund_type: 2,
|
|
|
|
|
away_id: this.contract.id,
|
|
|
|
|
apply_money: this.paymentRegistrationForm.applyMoney,
|
|
|
|
|
//discount_money: this.paymentRegistrationForm.deductionMoney,
|
|
|
|
|
remark: this.paymentRegistrationForm.remark,
|
|
|
|
|
contract_plan_act_links: this.paymentRegistrationForm.plan,
|
|
|
|
|
};
|
|
|
|
|
addFundLog(data).then((res) => {
|
|
|
|
|
save({
|
|
|
|
|
...this.contract,
|
|
|
|
|
financial_status: 2
|
|
|
|
|
})
|
|
|
|
|
//付款申请后同时更新一下合同中审计金额
|
|
|
|
|
// editorContract({
|
|
|
|
|
// id: this.contract.id,
|
|
|
|
|
// audit_money: this.form.audit_money,
|
|
|
|
|
// }).then((r) => {
|
|
|
|
|
// this.$emit("paid", {
|
|
|
|
|
// name: this.contract?.name,
|
|
|
|
|
// type: this.contract?.type,
|
|
|
|
|
// number: this.contract?.number,
|
|
|
|
|
// id: this.contract?.id,
|
|
|
|
|
// reason: this.paymentRegistrationForm.remark,
|
|
|
|
|
// yizhifucishu: this.actNumsTotal(),
|
|
|
|
|
// yizhifujine: this.totalMoney(),
|
|
|
|
|
// zongjia: this.contract?.money,
|
|
|
|
|
// zhifucishu: this.contract?.sign_plan?.length || 0,
|
|
|
|
|
// total: data.apply_money,
|
|
|
|
|
// out_pay_id: res,
|
|
|
|
|
// });
|
|
|
|
|
// this.isShowPaymentRegistration = false;
|
|
|
|
|
// Message({
|
|
|
|
|
// type: "success",
|
|
|
|
|
// message: "操作成功",
|
|
|
|
|
// });
|
|
|
|
|
// });
|
|
|
|
|
this.$refs["paymentRegistration"].reset();
|
|
|
|
|
|
|
|
|
|
this.$emit('refresh')
|
|
|
|
|
this.$message.success("操作成功");
|
|
|
|
|
this.isShowPaymentRegistration = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
//计划
|
|
|
|
|
//获取预算计划
|
|
|
|
|
async getBudgets() {
|
|
|
|
|
let res = await getBudget({
|
|
|
|
|
top_pid: 1,
|
|
|
|
|
...this.plansSelect
|
|
|
|
|
});
|
|
|
|
|
this.plans = res.list.data;
|
|
|
|
|
this.planTotal = res.list.total;
|
|
|
|
|
|
|
|
|
|
// this.toggleSelection(this.paymentRegistrationForm.plan.map(item => {
|
|
|
|
|
// return item.plan_id
|
|
|
|
|
// }))
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.$nextTick(() => this.$refs["planTable"].doLayout())
|
|
|
|
|
},500)
|
|
|
|
|
},
|
|
|
|
|
planPageChange(e) {
|
|
|
|
|
this.plansSelect.page = e
|
|
|
|
|
this.getBudgets();
|
|
|
|
|
},
|
|
|
|
|
selectPlan(sel, row) {
|
|
|
|
|
if (sel) {
|
|
|
|
|
this.paymentRegistrationForm.plan = sel.map((item) => {
|
|
|
|
|
return {
|
|
|
|
|
plan_id: item.id,
|
|
|
|
|
use_money: item.useMoney,
|
|
|
|
|
new_money: item.money,
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.paymentRegistrationForm.plan = [];
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
toggleSelection(e) {
|
|
|
|
|
if (!e) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let plans = this.paymentRegistrationForm.plan.map((item) => {
|
|
|
|
|
return item.plan_id;
|
|
|
|
|
});
|
|
|
|
|
if (plans) {
|
|
|
|
|
this.plans
|
|
|
|
|
.filter((plan) => {
|
|
|
|
|
return plans.includes(plan.id);
|
|
|
|
|
})
|
|
|
|
|
.map((row) => {
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.$refs["planTable"].toggleRowSelection(row);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.$refs["planTable"].clearSelection();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//获取科室
|
|
|
|
|
getDepartment() {
|
|
|
|
|
listdeptNoAuth().then((res) => {
|
|
|
|
|
this.departments = res;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
priceFormat() {
|
|
|
|
|
return function (price) {
|
|
|
|
|
return Number(price)
|
|
|
|
|
.toFixed(2)
|
|
|
|
|
.replace(/(\d)(?=(\d{3})+\.)/g, "$1,");
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
nameFormat () {
|
|
|
|
|
return function(index) {
|
|
|
|
|
if (index == 2) {
|
|
|
|
|
return '报销'
|
|
|
|
|
}
|
|
|
|
|
if (index == 3) {
|
|
|
|
|
return '其他支出'
|
|
|
|
|
}
|
|
|
|
|
return '合同'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
isShowPaymentRegistration(newVal) {
|
|
|
|
|
if (newVal) {
|
|
|
|
|
this.getBudgets();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.getPlanTypes();
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getDepartment()
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
.payment-registration {
|
|
|
|
|
&-row {
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
|
|
padding: 6px 0;
|
|
|
|
|
|
|
|
|
|
&-title {
|
|
|
|
|
padding: 0 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-content {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.xy-table-item-label {
|
|
|
|
|
width: 200px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.xy-table-item-price {
|
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
|
|
&::after {
|
|
|
|
|
z-index: 1;
|
|
|
|
|
position: absolute;
|
|
|
|
|
right: 0;
|
|
|
|
|
top: 0;
|
|
|
|
|
content: "(元)";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep .el-input__clear {
|
|
|
|
|
position: relative;
|
|
|
|
|
right: 30px;
|
|
|
|
|
z-index: 2;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|