123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706 |
- <template>
- <el-dialog title="记账信息" v-model="visible" width="90%" append-to-body draggable @close="close" class="dialog-form" :close-on-click-modal = "false">
- <!-- <div slot="title" class="dialog-title-container">
- <span class="title-label"><i class="el-icon-document" /> 工资信息</span>
- <i class="el-icon-close" @click="close" />
- </div> -->
- <!-- 功能按钮 -->
- <div style="padding: 8px 24px 16px 24px">
- <el-form size="small" label-width="140px" v-model="form">
- <el-row :gutter="30">
- <el-col :span="12">
- <el-form-item label="客户名称">
- <div>{{ form.companyName }}</div>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="所属月份">
- <div>{{ form.year }}-{{ form.month }}</div>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="服务状态">
- <el-select v-model="form.status" placeholder="请选择">
- <el-option v-for="item in selectStatus" :key="item.value" :value="item.value" :label="item.label" />
- </el-select>
- </el-form-item>
- </el-col>
- <el-divider content-position="left">工资</el-divider>
- <el-col :span="24" class="details-container">
- <!--操作按钮 开始-->
- <div class="details-head" style="margin-bottom: 15px; " >
- <div class="title">
- <i class="fa fa-th-list" aria-hidden="true" /> 工资人员信息
- </div>
- <el-button type="primary" style="margin-top: 15px;" size="small" icon="plus" @click="handleEmployeeCreate">新增</el-button>
- <el-button v-if="selections.length > 0" type="danger" size="small" icon="delete" style="margin-top: 15px;"
- @click="handleEmployeeBatchDelete">
- 删除</el-button>
- </div>
- <div class="details-body">
- <div>
- <el-table ref="sourceTable" :data="form.salary.details" size="small" max-height="490px" border
- show-summary :summary-method="getSummaries" highlight-current-row
- header-row-class-name="list-header-row" row-class-name="list-row" class="salary-table"
- @selection-change="handleCheckChange" @current-change="handleCurrentChange">
- <el-table-column type="selection" width="50" align="center" />
- <el-table-column type="index" label="序号" width="50" align="center" />
- <el-table-column label="员工姓名" width="80" align="center">
- <template #default="scope">
- <div>
- <el-input v-model="scope.row.employeeName" size="small" placeholder="员工姓名"
- style="width: 100%" />
- </div>
- <span style="
- color: red;
- position: absolute;
- z-index: 10;
- top: 4px;
- right: 12px;
- ">*</span>
- </template>
- </el-table-column>
- <el-table-column label="身份证号" width="150" align="center">
- <template #default="scope">
- <div>
- <el-input v-model="scope.row.idCode" size="small" placeholder="身份证号" style="width: 100%" />
- </div>
- <span style="
- color: red;
- position: absolute;
- z-index: 10;
- top: 4px;
- right: 12px;
- ">*</span>
- </template>
- </el-table-column>
- <el-table-column label="应发工资" width="140" align="center" prop="planSalary">
- <template #default="scope">
- <div>
- <el-input-number v-model="scope.row.planSalary" size="small" placeholder="应发工资" :precision="2"
- :controls="false" style="width: 100%" @change="rowChangeSum(scope.row)" />
- </div>
- </template>
- </el-table-column>
- <el-table-column label="实发工资" width="140" align="center" prop="actuallySalary">
- <template #default="scope">
- <div>
- <!-- <el-input-number
- v-model="scope.row.actuallySalary"
- size="small"
- placeholder="实发工资"
- :precision="2"
- :controls="false"
- style="width: 100%"
- /> -->
- {{ rowNum(scope.row.actuallySalary) }}
- </div>
- </template>
- </el-table-column>
- <el-table-column label="奖金及其他" width="120" align="center" prop="bonusAmount">
- <template #default="scope">
- <div>
- <el-input-number v-model="scope.row.bonusAmount" size="small" placeholder="奖金及其他" :precision="2"
- :controls="false" style="width: 100%" @change="rowChangeSum(scope.row)" />
- </div>
- </template>
- </el-table-column>
- <el-table-column label="社保" align="center">
- <el-table-column label="养老保险" width="120" align="center" prop="endowmentInsurance">
- <template #default="scope">
- <div>
- <el-input-number v-model="scope.row.endowmentInsurance" size="small" placeholder="养老保险"
- :precision="2" :controls="false" style="width: 100%" @change="rowChangeSum(scope.row)" />
- </div>
- </template>
- </el-table-column>
- <el-table-column label="医疗保险" width="120" align="center" prop="medicalInsurance">
- <template #default="scope">
- <div>
- <el-input-number v-model="scope.row.medicalInsurance" size="small" placeholder="医疗保险"
- :precision="2" :controls="false" style="width: 100%" @change="rowChangeSum(scope.row)" />
- </div>
- </template>
- </el-table-column>
- <el-table-column label="失业险" width="120" align="center" prop="unemploymentBenefit">
- <template #default="scope">
- <div>
- <el-input-number v-model="scope.row.unemploymentBenefit" size="small" placeholder="失业险"
- :precision="2" :controls="false" style="width: 100%" @change="rowChangeSum(scope.row)" />
- </div>
- </template>
- </el-table-column>
- <el-table-column label="大病险" width="120" align="center" prop="seriousIllnessInsurance">
- <template #default="scope">
- <div>
- <el-input-number v-model="scope.row.seriousIllnessInsurance" size="small" placeholder="大病险"
- :precision="2" :controls="false" style="width: 100%" @change="rowChangeSum(scope.row)" />
- </div>
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column label="公积金" width="120" align="center" prop="housingFund">
- <template #default="scope">
- <div>
- <el-input-number v-model="scope.row.housingFund" size="small" placeholder="住房公积金" :precision="2"
- :controls="false" style="width: 100%" @change="rowChangeSum(scope.row)" />
- </div>
- </template>
- </el-table-column>
- <el-table-column label="个税" align="center" width="90" prop="currentIndividualIncomeTax">
- <template #default="scope">
- <div>
- <el-input-number v-model="scope.row.currentIndividualIncomeTax" size="small" placeholder="个税"
- :precision="2" :controls="false" style="width: 100%" @change="rowChangeSum(scope.row)" />
- </div>
- </template></el-table-column>
- <el-table-column label="其他扣款" width="120" align="center" prop="otherCut">
- <template #default="scope">
- <div>
- <el-input-number v-model="scope.row.otherCut" size="small" placeholder="其他扣款" :precision="2"
- :controls="false" style="width: 100%" @change="rowChangeSum(scope.row)" />
- </div>
- </template>
- </el-table-column>
- <el-table-column label="备注" width="85" header-align="center">
- <template #default="scope">
- <div>
- <el-input v-model="scope.row.remark" size="small" placeholder="备注" />
- </div>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </div>
- </el-col>
- <el-col :span="24">
- <el-divider />
- </el-col>
- <el-col :span="24">
- <el-form-item label="合计工资">
- {{ form.salary.amount }}
- </el-form-item>
- </el-col>
- <el-col :span="24">
- <el-form-item label="工资备注">
- <el-input v-model.trim="form.salary.content" maxlength="200" show-word-limit type="textarea" rows="2" />
- </el-form-item>
- </el-col>
- <el-divider content-position="left">收票</el-divider>
- <el-col :span="12">
- <el-form-item label="收入票">
- <el-input-number v-model="form.ticket.incomeTicket" size="small" placeholder="收入票" :step="1" step-strictly
- :controls="false" style="width: 100%" @change="ticketNumberChange" />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="成本票">
- <el-input-number v-model="form.ticket.costTicket" size="small" placeholder="成本票" :step="1" step-strictly
- :controls="false" style="width: 100%" @change="ticketNumberChange" />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="费用票">
- <el-input-number v-model="form.ticket.feeTicketNumber" size="small" placeholder="费用票" :step="1"
- step-strictly :controls="false" style="width: 100%" @change="ticketNumberChange" />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="银行对账">
- <el-input-number v-model="form.ticket.bankCopyNumber" size="small" placeholder="银行回单" :step="1"
- step-strictly :controls="false" style="width: 100%" @change="ticketNumberChange" />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="银行回单">
- <el-input-number v-model="form.ticket.bankSlipsNumber" size="small" placeholder="银行回单" :step="1"
- step-strictly :controls="false" style="width: 100%" @change="ticketNumberChange" />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="工资单">
- <el-input-number v-model="form.ticket.salaryTicket" size="small" placeholder="工资单" :step="1" step-strictly
- :controls="false" style="width: 100%" @change="ticketNumberChange" />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="社保公积金">
- <el-input-number v-model="form.ticket.ssafTicket" size="small" placeholder="社保公积金" :step="1" step-strictly
- :controls="false" style="width: 100%" @change="ticketNumberChange" />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="其他票">
- <el-input-number v-model="form.ticket.otherTicket" size="small" placeholder="其他票" :step="1" step-strictly
- :controls="false" style="width: 100%" @change="ticketNumberChange" />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="合计">
- <div>{{ form.ticket.sumNumber }}</div>
- <!-- <el-input-number
- v-model="form.ticket.sumNumber"
- size="small"
- placeholder="合计"
- :step="1"
- step-strictly
- :controls="false"
- style="width: 100%"
- /> -->
- </el-form-item>
- </el-col>
- <el-col :span="24">
- <el-form-item label="备注">
- <el-input v-model.trim="form.ticket.content" maxlength="200" show-word-limit type="textarea" rows="2" />
- </el-form-item>
- </el-col>
- <el-divider content-position="left">记账</el-divider>
- <el-col :span="12">
- <el-form-item label="本期收入">
- <el-input-number v-model="form.keepAccount.currentIncome" size="small" placeholder="本期收入" :precision="2"
- :controls="false" style="width: 100%" />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="本年收入">
- <el-input-number v-model="form.keepAccount.currentYearIncome" size="small" placeholder="本年收入"
- :precision="2" :controls="false" style="width: 100%" />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="本年累计成本">
- <el-input-number v-model="form.keepAccount.cumulativeCost" size="small" placeholder="本年累计成本"
- :precision="2" :controls="false" style="width: 100%" />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="本年利润总额">
- <el-input-number v-model="form.keepAccount.currentYearProfit" size="small" placeholder="本年利润总额"
- :precision="2" :controls="false" style="width: 100%" />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="是否暂估">
- <el-checkbox v-model="form.keepAccount.isProvisionalEstimate" :true-label="1" :false-label="0" />
- </el-form-item>
- </el-col>
- <el-col v-if="form.keepAccount.isProvisionalEstimate === 1" :span="12">
- <el-form-item label="暂估金额">
- <el-input-number v-model="form.keepAccount.provisionalEstimateAmount" size="small" placeholder="暂估金额"
- :precision="2" :controls="false" style="width: 100%" />
- </el-form-item>
- </el-col>
- <el-col :span="24">
- <el-form-item label="备注">
- <el-input v-model.trim="form.keepAccount.content" maxlength="200" show-word-limit type="textarea"
- rows="2" />
- </el-form-item>
- </el-col>
- <el-divider content-position="left">报税</el-divider>
- <el-col :span="12">
- <el-form-item label="可弥补之前年度亏损">
- <el-input-number size="small" placeholder="可弥补之前年度亏损" v-model="form.reportTax.previousAnnualLosses"
- :precision="2" :controls="false" style="align: right; text-align: right; width: 100%" />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="增值税">
- <el-input-number placeholder="增值税" v-model="form.reportTax.valueAddedTax" style="
- display: flex;
- align-items: center;
- justify-content: center;
- width: 100%;
- " @change="taxChangeHandler" :controls="false" :precision="2" />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="城建税">
- <el-input-number placeholder="城建税" v-model="form.reportTax.cityConstructTax" :precision="2" style="
- display: flex;
- align-items: center;
- justify-content: center;
- width: 100%;
- " @change="taxChangeHandler" :controls="false" />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="教育费附加">
- <el-input-number placeholder="教育费附加" v-model="form.reportTax.additionsTaxOfEducation" style="
- display: flex;
- align-items: center;
- justify-content: center;
- width: 100%;
- " @change="taxChangeHandler" :precision="2" :controls="false" />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="地方教育费附加">
- <el-input-number placeholder="地方教育费附加" v-model="form.reportTax.ladditionsTaxOfEducation" style="
- display: flex;
- align-items: center;
- justify-content: center;
- width: 100%;
- " @change="taxChangeHandler" :precision="2" :controls="false" />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="企业所得税">
- <el-input-number placeholder="企业所得税" v-model="form.reportTax.businessIncomeTax" style="
- display: flex;
- align-items: center;
- justify-content: center;
- width: 100%;
- " @change="taxChangeHandler" :precision="2" :controls="false" />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="印花税">
- <el-input-number placeholder="印花税" v-model="form.reportTax.stampTax" style="
- display: flex;
- align-items: center;
- width: 100%;
- justify-content: center;
- " @change="taxChangeHandler" :precision="2" :controls="false" />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="文化事业建设税">
- <el-input-number placeholder="文化事业建设税" v-model="form.reportTax.culturalConstructTax" style="
- display: flex;
- align-items: center;
- justify-content: center;
- width: 100%;
- " @change="taxChangeHandler" :precision="2" :controls="false" />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="消费税">
- <el-input-number placeholder="消费税" v-model="form.reportTax.excise" style="
- display: flex;
- align-items: center;
- justify-content: center;
- width: 100%;
- " @change="taxChangeHandler" :precision="2" :controls="false" />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="合计">
- <span>{{ rowNum(form.reportTax.sumTax) }}</span>
- </el-form-item>
- </el-col>
- <el-divider content-position="left">个税</el-divider>
- <el-col :span="12">
- <el-form-item label="个税金额">
- <el-input-number placeholder="个税金额" v-model="form.individual.amount" style="
- display: flex;
- align-items: center;
- justify-content: center;
- width: 100%;
- " :controls="false" :precision="2" />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="备注">
- <el-input type="textarea" maxlength="200" show-word-limit rows="2" v-model="form.individual.remark" />
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- </div>
- <div class="form-btns-container" style="height: 40px">
- <el-button size="small" icon="close" @click="close" style="float: right; margin-left: 12px; margin-right: 12px">
- 取消</el-button>
- <el-button type="primary" size="small" icon="Finished" style="float: right" @click="handleSave">
- 保存</el-button>
- </div>
- <!-- <feedback-dialog ref="feedbackDialogView" :parent="this" />
- <print-dialog ref="printDialog" :parent="this" /> -->
- </el-dialog>
- </template>
- <script setup>
- import {
- getDetail,
- saveDetail,
- updateDetail,
- } from "@/api/business/crm/serviceWorkOrder";
- import { rowNum, numberToCurrencyNo } from "@/utils/index";
- import { ref } from "vue";
- const { proxy } = getCurrentInstance();
- const visible = ref(false);
- const width = ref(1430);
- const selections = ref([]);
- const currentSource = ref(null);
- const props = defineProps({
- getList: {
- type: Function,
- default: () => { },
- },
- });
- const selectStatus = ref([
- {
- label: "未开始",
- value: 0,
- color: "#fff",
- },
- {
- label: "进行中",
- value: 1,
- color: "#FFB836",
- },
- {
- label: "已完成",
- value: 3,
- color: "#2FCB81",
- },
- ]);
- const { getList } = toRefs(props);
- const total = ref(0);
- const employeeEmptyData = {
- id: null,
- title: "",
- remark: "",
- employeeName: "",
- departmentName: "",
- idCode: "",
- salaryAmount: "",
- bonusAmount: "",
- allowanceAmount: "",
- subsidyAmount: "",
- absenceCut: "",
- planSalary: 0,
- actuallySalary: 0,
- endowmentInsurance: 0,
- medicalInsurance: 0,
- unemploymentBenefit: 0,
- seriousIllnessInsurance: 0,
- housingFund: 0,
- otherCut: 0,
- cumulativeIncome: 0,
- cumulativeSpecialCut: 0,
- cumulativeChildEduCut: 0,
- cumulativeHouseLoanInterestCut: 0,
- cumulativeHouseRentCut: 0,
- cumulativeSupportElderCut: 0,
- cumulativeContinuingEduCut: 0,
- cumulativeBabyCareCut: 0,
- sumSpecialCumulativeCut: 0,
- cumulativeOtherCut: 0,
- cumulativeIndividualIncomeTax: 0,
- cumulativeHasPaidIit: 0,
- currentIndividualIncomeTax: 0,
- idiograph: "",
- details: [],
- editStatus: true,
- };
- const form = ref({});
- const emptyForm = {
- salary: {
- details: [],
- },
- ticket: {},
- keepAccount: {},
- reportTax: {},
- individual: {},
- details: [],
- };
- function open(detail) {
- visible.value = true;
- form.value = { ...emptyForm, ...detail };
- loadData();
- }
- function loadData() {
- getDetail(form.value).then((res) => {
- form.value = { ...proxy.deepClone(emptyForm), ...res.data };
- computeTotal();
- });
- }
- function close() {
- visible.value = false;
- reset();
- }
- function reset() {
- form.value = proxy.deepClone(emptyForm);
- }
- function printSalary() { }
- function exportSalary() { }
- function handleCurrentChange(row) {
- currentSource.value = row;
- }
- function handleCheckChange(selection) {
- selections.value = selection.map((item) => item);
- }
- function handleEmployeeCreate() {
- // 此处必须进行深拷贝,否则添加的明细,将都指向了一个对象
- const _newSource = JSON.parse(JSON.stringify(employeeEmptyData));
- form.value.salary.details.push(_newSource);
- handleCurrentChange(_newSource);
- }
- function handleEmployeeBatchDelete() {
- proxy.$modal
- .confirm("确定删除?")
- .then(() => {
- form.value.salary.details = form.value.salary.details.filter(
- (item) => selections.value.indexOf(item) === -1
- );
- })
- .catch(() => {
- proxy.$modal.msg("已取消删除");
- });
- }
- function rowChangeSum(row) {
- let actuallySalary = 0;
- actuallySalary += row.planSalary == null ? 0 : row.planSalary;
- actuallySalary += row.bonusAmount == null ? 0 : row.bonusAmount;
- actuallySalary -= row.endowmentInsurance == null ? 0 : row.endowmentInsurance;
- actuallySalary -= row.medicalInsurance == null ? 0 : row.medicalInsurance;
- actuallySalary -=
- row.unemploymentBenefit == null ? 0 : row.unemploymentBenefit;
- actuallySalary -=
- row.seriousIllnessInsurance == null ? 0 : row.seriousIllnessInsurance;
- actuallySalary -= row.housingFund == null ? 0 : row.housingFund;
- actuallySalary -=
- row.currentIndividualIncomeTax == null ? 0 : row.currentIndividualIncomeTax;
- actuallySalary -= row.otherCut == null ? 0 : row.otherCut;
- row.actuallySalary = actuallySalary;
- computeTotal();
- }
- function computeTotal() {
- let totalSalay = 0;
- form.value.salary.details.forEach((l) => {
- totalSalay += l.actuallySalary == null ? 0 : l.actuallySalary;
- });
- form.value.salary.amount = totalSalay.toFixed(2);
- }
- function getSummaries(param) {
- const { columns, data } = param;
- const sums = [];
- columns.forEach((column, index) => {
- if (index === 0) {
- sums[index] = "合计";
- return;
- } else if (index === 1) {
- sums[index] = "";
- return;
- }
- const values = data.map((item) => Number(item[column.property]));
- if (!values.every((value) => isNaN(value))) {
- sums[index] = values.reduce((prev, curr) => {
- const value = Number(curr);
- if (!isNaN(value)) {
- return (Number(prev) + Number(curr)).toFixed(2);
- } else {
- return Number(prev).toFixed(2);
- }
- }, 0);
- sums[index] = numberToCurrencyNo(sums[index]);
- } else {
- sums[index] = "";
- }
- });
- return sums;
- }
- function handleSave() {
- proxy.$modal
- .confirm("确认保存么?")
- .then(() => {
- const saveValue = proxy.deepClone(form.value);
- saveDetail(saveValue).then((res) => {
- proxy.$modal.msgSuccess("保存成功");
- reset();
- close();
- getList.value();
- });
- })
- .catch((err) => {
- proxy.$modal.msg("取消保存");
- });
- }
- function ticketNumberChange() {
- let amount = 0;
- amount +=
- form.value.ticket.incomeTicket == null ? 0 : form.value.ticket.incomeTicket;
- amount +=
- form.value.ticket.costTicket == null ? 0 : form.value.ticket.costTicket;
- amount +=
- form.value.ticket.feeTicketNumber == null
- ? 0
- : form.value.ticket.feeTicketNumber;
- amount +=
- form.value.ticket.ssafTicket == null ? 0 : form.value.ticket.ssafTicket;
- amount +=
- form.value.ticket.salaryTicket == null ? 0 : form.value.ticket.salaryTicket;
- amount +=
- form.value.ticket.bankSlipsNumber == null
- ? 0
- : form.value.ticket.bankSlipsNumber;
- amount +=
- form.value.ticket.bankCopyNumber == null
- ? 0
- : form.value.ticket.bankCopyNumber;
- amount += form.value.ticket.bankCopy == null ? 0 : form.value.ticket.bankCopy;
- amount +=
- form.value.ticket.otherTicket == null ? 0 : form.value.ticket.otherTicket;
- form.value.ticket.sumNumber = amount;
- console.log("合计", amount);
- console.log("合计1", form.value.ticket.costTicket);
- }
- /** 计算税额 */
- function taxChangeHandler() {
- let amount = 0;
- amount +=
- form.value.reportTax.ladditionsTaxOfEducation == null
- ? 0
- : form.value.reportTax.ladditionsTaxOfEducation;
- amount +=
- form.value.reportTax.valueAddedTax == null
- ? 0
- : form.value.reportTax.valueAddedTax;
- amount +=
- form.value.reportTax.cityConstructTax == null
- ? 0
- : form.value.reportTax.cityConstructTax;
- amount +=
- form.value.reportTax.additionsTaxOfEducation == null
- ? 0
- : form.value.reportTax.additionsTaxOfEducation;
- amount +=
- form.value.reportTax.businessIncomeTax == null
- ? 0
- : form.value.reportTax.businessIncomeTax;
- amount +=
- form.value.reportTax.stampTax == null ? 0 : form.value.reportTax.stampTax;
- amount +=
- form.value.reportTax.culturalConstructTax == null
- ? 0
- : form.value.reportTax.culturalConstructTax;
- amount +=
- form.value.reportTax.excise == null ? 0 : form.value.reportTax.excise;
- form.value.reportTax.sumTax = amount;
- }
- // 暴露给父组件的方法
- defineExpose({
- open,
- });
- </script>
|