|
@@ -0,0 +1,613 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <div id="pdfDom" ref="pdfDom" style="padding: 0px 20px; text-align: center;font-size:12px;color:#333333" v-loading="loading">
|
|
|
+ <!-- <div class="title">
|
|
|
+ 费控
|
|
|
+ </div> -->
|
|
|
+ <div class="title-info">
|
|
|
+ <div class="vertical-bar"></div>
|
|
|
+ <div class="content">费控</div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <table border="1" style="width: 100%;" class="table">
|
|
|
+ <tr>
|
|
|
+ <td :colspan="4">
|
|
|
+ <div style="font-weight:700;text-align:center;font-size:16px">
|
|
|
+ 基本信息
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td style="width:15%">收付款类型</td>
|
|
|
+ <td style="width:35%">{{pdfData.costTypeName}}</td>
|
|
|
+ <td style="width:15%">记账凭证号</td>
|
|
|
+ <td style="width:35%">{{pdfData.voucherNo}}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td style="width:15%">申请日期</td>
|
|
|
+ <td style="width:35%">{{pdfData.applyTime}}</td>
|
|
|
+ <td style="width:15%">流水号</td>
|
|
|
+ <td style="width:35%">{{pdfData.code}}</td>
|
|
|
+ </tr>
|
|
|
+ <tr v-if="isShowAtt('isAdvance', 'mainObj') || isShowAtt('isVoucher', 'mainObj') ">
|
|
|
+ <td style="width:15%" v-if="isShowAtt('isAdvance', 'mainObj')">是否预付</td>
|
|
|
+ <td style="width:35%" v-if="isShowAtt('isAdvance', 'mainObj')" :colspan="isShowAtt('isVoucher', 'mainObj')?1:3">
|
|
|
+ {{dictValueLabel(pdfData.isAdvance ,isAfterSubmit)}}</td>
|
|
|
+ <td style="width:15%" v-if="isShowAtt('isVoucher', 'mainObj')">是否后提交凭证</td>
|
|
|
+ <td style="width:35%" v-if="isShowAtt('isVoucher', 'mainObj')" :colspan="isShowAtt('isAdvance', 'mainObj')?1:3">
|
|
|
+ {{dictValueLabel(pdfData.isVoucher ,isAfterSubmit)}}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td style="width:15%">业务公司</td>
|
|
|
+ <td style="width:35%">{{pdfData.companyName}}</td>
|
|
|
+ <td style="width:15%">业务部门</td>
|
|
|
+ <td style="width:35%">{{pdfData.deptName}}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td style="width:15%">申请人</td>
|
|
|
+ <td style="width:35%" :colspan="3">{{pdfData.applyUserName}}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td :colspan="4">
|
|
|
+ <div style="font-weight:700;text-align:center;font-size:16px">
|
|
|
+ 收付款明细
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ <!-- <div style="border-left:1px solid gray;border-right:1px solid gray;font-weight:700;text-align:center;padding: 2px 4px;font-size:16px">
|
|
|
+ 收付款明细
|
|
|
+ </div> -->
|
|
|
+ <table style="width: 100%;" class="tableOne">
|
|
|
+ <tr>
|
|
|
+ <td v-if="isShowAtt('remark','detailObj' )">
|
|
|
+ 收付款说明
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('applyRemark','detailObj' )">
|
|
|
+ 申请事由
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('deductionMonth','detailObj' )">
|
|
|
+ 抵扣工资月份
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('logisticsCompanyId','detailObj' )">
|
|
|
+ 快递公司
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('supplierId','detailObj' )">
|
|
|
+ 供应商
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('payeeAccountId','detailObj' )">
|
|
|
+ 收款单位
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('invoiceTaxPoint','detailObj' )">
|
|
|
+ 开票税点
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('balancePrepaidTax','detailObj' )">
|
|
|
+ 结存预付款(含税)
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('balancePrepaid','detailObj' )">
|
|
|
+ 结存预付款(不含税)
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('currentPrepaidTax','detailObj' )">
|
|
|
+ 本期预付款(含税)
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('currentPrepaid','detailObj' )">
|
|
|
+ 本期预付款(不含税)
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('accountPeriod','detailObj' )">
|
|
|
+ 账期
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('accountPeriodAmountTax','detailObj' )">
|
|
|
+ 本账期金额(含税)
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('accountPeriodAmount','detailObj' )">
|
|
|
+ 本账期金额(不含税)
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('accountPeriodAdjustAmount','detailObj' )">
|
|
|
+ 本账期调整金额
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('deductionPrepaidTax','detailObj' )">
|
|
|
+ 抵扣预付款(含税)
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('deductionPrepaid','detailObj' )">
|
|
|
+ 抵扣预付款(不含税)
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('taxation','detailObj' )">
|
|
|
+ 税费
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('shopId','detailObj' )">
|
|
|
+ 店铺名称
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('costType','detailObj' )">
|
|
|
+ 费用类型
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('brushingTime','detailObj' )||isShowAtt( 'promotionFeeType','detailObj' )">
|
|
|
+ 刷单时间/推广费类别
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('currentPayableDeductionBefore','detailObj' )">
|
|
|
+ 本期应付(抵扣前)
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('currentPayableDeduction','detailObj' )">
|
|
|
+ 本期应付(抵扣后)
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('currentPayable','detailObj' )">
|
|
|
+ 本期应付
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('returnAmount','detailObj' )">
|
|
|
+ 归还金额
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('costMoneyTax','detailObj' )">
|
|
|
+ 费用金额(含税)
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('costMoney','detailObj' )">
|
|
|
+ 费用金额(不含税)
|
|
|
+ </td>
|
|
|
+ <!-- <td v-if="isShowAtt('costMoneySum','detailObj' )">
|
|
|
+ 费用合计
|
|
|
+ </td> -->
|
|
|
+ <td v-if="isShowAtt('paymentAccountNumber','detailObj' )">
|
|
|
+ 汇款账号
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('paymentAccountName','detailObj' )">
|
|
|
+ 汇款账户名
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('paymentAccountBank','detailObj' )">
|
|
|
+ 汇款银行
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('accountSubjectsId','detailObj' )">
|
|
|
+ 记账科目
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('accountSubjectsId','detailObj' )">
|
|
|
+ 核算项目名称
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('accountSubjectsId','detailObj' )">
|
|
|
+ 核算项目
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('money','detailObj' )">
|
|
|
+ 记账金额
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr v-if="pdfData.costControlDetailList && pdfData.costControlDetailList.length > 0" v-for="(item, index) in pdfData.costControlDetailList"
|
|
|
+ :key="item.id" :class="{isLastRow:index==pdfData.costControlDetailList.length-1}">
|
|
|
+ <td v-if="isShowAtt('remark','detailObj' )">
|
|
|
+ {{item.remark}}
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('applyRemark','detailObj' )">
|
|
|
+ {{item.applyRemark}}
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('deductionMonth','detailObj' )">
|
|
|
+ {{item.deductionMonth}}
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('logisticsCompanyId','detailObj' )">
|
|
|
+ {{item.businessName}}
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('supplierId','detailObj' )">
|
|
|
+ {{item.businessName}}
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('payeeAccountId','detailObj' )">
|
|
|
+ {{item.businessName}}
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('invoiceTaxPoint','detailObj' )">
|
|
|
+ {{item.invoiceTaxPoint}}
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('balancePrepaidTax','detailObj' )">
|
|
|
+ {{item.balancePrepaidTax}}
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('balancePrepaid','detailObj' )">
|
|
|
+ {{item.balancePrepaid}}
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('currentPrepaidTax','detailObj' )">
|
|
|
+ {{item.currentPrepaidTax}}
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('currentPrepaid','detailObj' )">
|
|
|
+ {{item.currentPrepaid}}
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('accountPeriod','detailObj' )">
|
|
|
+ {{item.accountPeriod}}
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('accountPeriodAmountTax','detailObj' )">
|
|
|
+ {{item.accountPeriodAmountTax}}
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('accountPeriodAmount','detailObj' )">
|
|
|
+ {{item.accountPeriodAmount}}
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('accountPeriodAdjustAmount','detailObj' )">
|
|
|
+ {{item.accountPeriodAdjustAmount}}
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('deductionPrepaidTax','detailObj' )">
|
|
|
+ {{item.deductionPrepaidTax}}
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('deductionPrepaid','detailObj' )">
|
|
|
+ {{item.deductionPrepaid}}
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('taxation','detailObj' )">
|
|
|
+ {{item.taxation}}
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('shopId','detailObj' )">
|
|
|
+ {{item.businessName}}
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('costType','detailObj' )">
|
|
|
+ {{dictKeyValue(item.costType,expenseType)}}
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('brushingTime','detailObj' ) || isShowAtt('promotionFeeType','detailObj' )">
|
|
|
+ <span v-if="item.costType=='1'">{{item.brushingTime}}</span>
|
|
|
+ <span v-if="item.costType=='2'">{{dictKeyValue(item.promotionFeeType,promotionFeeType)}}</span>
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('currentPayableDeductionBefore','detailObj' )">
|
|
|
+ {{item.currentPayableDeductionBefore}}
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('currentPayableDeduction','detailObj' )">
|
|
|
+ {{item.currentPayableDeduction}}
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('currentPayable','detailObj' )">
|
|
|
+ {{item.currentPayable}}
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('returnAmount','detailObj' )">
|
|
|
+ {{item.returnAmount}}
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('costMoneyTax','detailObj' )">
|
|
|
+ {{item.costMoneyTax}}
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('costMoney','detailObj' )">
|
|
|
+ {{item.costMoney}}
|
|
|
+ </td>
|
|
|
+ <!-- <td v-if="isShowAtt('costMoneySum','detailObj' )">
|
|
|
+ {{item.costMoneySum}}
|
|
|
+ </td> -->
|
|
|
+ <td v-if="isShowAtt('paymentAccountNumber','detailObj' )">
|
|
|
+ {{item.paymentAccountNumber}}
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('paymentAccountName','detailObj' )">
|
|
|
+ {{item.paymentAccountName}}
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('paymentAccountBank','detailObj' )">
|
|
|
+ {{item.paymentAccountBank}}
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('accountSubjectsId','detailObj' )">
|
|
|
+ {{item.accountSubjectsName}}
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('accountSubjectsId','detailObj' )">
|
|
|
+ {{item.accountSubjectsNames}}
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('accountSubjectsId','detailObj' )">
|
|
|
+ <!-- {{item.subjectsCalculateItemNameList}} -->
|
|
|
+ <div v-for="e in item.calculateItemList" :key="e.id">
|
|
|
+ {{e.type}}:{{e.businessName}}
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ <td v-if="isShowAtt('money','detailObj' )">
|
|
|
+ {{item.money}}
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+
|
|
|
+ </table>
|
|
|
+ <!-- <div style="border-left:1px solid gray;border-right:1px solid gray;font-weight:700;text-align:center;padding: 2px 4px;font-size:16px"
|
|
|
+ v-if="isShowAtt('isPublicTransfer', 'mainObj') || isShowAtt('paymentMethod', 'mainObj')">
|
|
|
+ 付款信息
|
|
|
+ </div> -->
|
|
|
+ <table border="1" style="width: 100%;" class="table">
|
|
|
+ <tr v-if="isShowAtt('isPublicTransfer', 'mainObj') || isShowAtt('paymentMethod', 'mainObj')">
|
|
|
+ <td :colspan="4">
|
|
|
+ <div style="font-weight:700;text-align:center;font-size:16px">
|
|
|
+ 付款信息
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td style="width:15%" v-if="isShowAtt('isPublicTransfer', 'mainObj')">是否公户转出</td>
|
|
|
+ <td style="width:35%" v-if="isShowAtt('isPublicTransfer', 'mainObj')" :colspan="isShowAtt('paymentMethod', 'mainObj')?1:3">
|
|
|
+ {{dictValueLabel(pdfData.isPublicTransfer ,isAfterSubmit)}}</td>
|
|
|
+ <td style="width:15%" v-if="isShowAtt('paymentMethod', 'mainObj')">付款方式</td>
|
|
|
+ <td style="width:35%" v-if="isShowAtt('paymentMethod', 'mainObj')" :colspan="isShowAtt('isPublicTransfer', 'mainObj')?1:3">
|
|
|
+ {{dictKeyValue(pdfData.paymentMethod ,paymentMethod)}}</td>
|
|
|
+ </tr>
|
|
|
+ <tr v-if="(isShowAtt('paymentMethod', 'mainObj') && pdfData.paymentMethod == '1') || isShowAtt('paymentAccountId', 'mainObj')">
|
|
|
+ <td style="width:15%" v-if="isShowAtt('paymentMethod', 'mainObj') && pdfData.paymentMethod == '1'">充值店铺名称</td>
|
|
|
+ <td style="width:35%" v-if="isShowAtt('paymentMethod', 'mainObj') && pdfData.paymentMethod == '1'"
|
|
|
+ :colspan="isShowAtt('paymentAccountId', 'mainObj')?1:3">{{pdfData.shopName}}</td>
|
|
|
+ <td style="width:15%" v-if="isShowAtt('paymentAccountId', 'mainObj')">公司账户</td>
|
|
|
+ <td style="width:35%" v-if="isShowAtt('paymentAccountId', 'mainObj')"
|
|
|
+ :colspan="(isShowAtt('paymentMethod', 'mainObj') && pdfData.paymentMethod == '1')?1:3">{{pdfData.paymentAccountId}}</td>
|
|
|
+ </tr>
|
|
|
+ <tr v-if="isShowAtt('paymentAccountId', 'mainObj')">
|
|
|
+ <td style="width:15%">开户行</td>
|
|
|
+ <td style="width:35%">{{pdfData.paymentAccountBank}}</td>
|
|
|
+ <td style="width:15%">开户名</td>
|
|
|
+ <td style="width:35%">{{pdfData.paymentAccountName}}</td>
|
|
|
+ </tr>
|
|
|
+ <tr v-if="isShowAtt('paymentAccountId', 'mainObj')">
|
|
|
+ <td style="width:15%">账号</td>
|
|
|
+ <td style="width:35%" :colspan="3">{{pdfData.paymentAccountNumber}}</td>
|
|
|
+ </tr>
|
|
|
+ <tr v-if="getIsShowData('accountBank')">
|
|
|
+ <td :colspan="4">
|
|
|
+ <div style="font-weight:700;text-align:center;font-size:16px">
|
|
|
+ 收款信息
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr v-if="getIsShowData('accountBank')">
|
|
|
+ <td style="width:15%">开户行</td>
|
|
|
+ <td style="width:35%">{{pdfData.accountBank}}</td>
|
|
|
+ <td style="width:15%">开户名</td>
|
|
|
+ <td style="width:35%">{{pdfData.accountName}}</td>
|
|
|
+ </tr>
|
|
|
+ <tr v-if="getIsShowData('accountBank')">
|
|
|
+ <td style="width:15%">账号</td>
|
|
|
+ <td style="width:35%" :colspan="3">{{pdfData.accountNumber}}</td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ <div style="text-align: center;margin-top:20px">
|
|
|
+ <el-button type="primary" v-print="printObj" size="default" v-debounce>打印</el-button>
|
|
|
+ <el-button type="primary" @click="clickDownload()" size="default" v-debounce>下载PDF</el-button>
|
|
|
+ <el-button type="primary" @click="exportExcel()" size="default" v-debounce>导出Excel</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup>
|
|
|
+import { NumberToChinese } from "@/utils/util.js";
|
|
|
+import { calculationWeek } from "@/utils/util.js";
|
|
|
+import { async } from "@antv/x6/lib/registry/marker/main";
|
|
|
+import $ from "jquery";
|
|
|
+import { nextTick } from "vue";
|
|
|
+const { proxy } = getCurrentInstance();
|
|
|
+const pdfData = ref({});
|
|
|
+const props = defineProps({
|
|
|
+ rowData: Object,
|
|
|
+});
|
|
|
+
|
|
|
+const paymentMethod = computed(
|
|
|
+ () => proxy.useUserStore().allDict["payment_method"]
|
|
|
+);
|
|
|
+const promotionFeeType = computed(
|
|
|
+ () => proxy.useUserStore().allDict["promotion_fee_type"]
|
|
|
+);
|
|
|
+const expenseType = computed(
|
|
|
+ () => proxy.useUserStore().allDict["expense_type"]
|
|
|
+);
|
|
|
+const isAfterSubmit = ref([
|
|
|
+ {
|
|
|
+ label: "是",
|
|
|
+ value: 1,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "否",
|
|
|
+ value: 0,
|
|
|
+ },
|
|
|
+]);
|
|
|
+const loading = ref(false);
|
|
|
+const checkBoxMap = ref({});
|
|
|
+const getCheckBoxMap = (val) => {
|
|
|
+ if (!val) return;
|
|
|
+ proxy.post("/paymentType/detail", { id: val }).then((res) => {
|
|
|
+ if (res && res.dynamicFieldJson) {
|
|
|
+ let obj = JSON.parse(res.dynamicFieldJson);
|
|
|
+ obj.mainObj = {};
|
|
|
+ obj.detailObj = {};
|
|
|
+ if (obj.mainCheckList) {
|
|
|
+ obj.mainCheckList.map((x) => (obj.mainObj[x] = true));
|
|
|
+ }
|
|
|
+ if (obj.detailCheckList) {
|
|
|
+ obj.detailCheckList.map((x) => (obj.detailObj[x] = true));
|
|
|
+ }
|
|
|
+ checkBoxMap.value = obj;
|
|
|
+ }
|
|
|
+ });
|
|
|
+};
|
|
|
+const paymentTypeData = ref([]);
|
|
|
+const currentCostTypeData = ref({});
|
|
|
+const getPdfData = async (query) => {
|
|
|
+ loading.value = true;
|
|
|
+ const { rows } = await proxy.post("/paymentType/page", {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 999,
|
|
|
+ });
|
|
|
+ paymentTypeData.value = rows.map((item) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ name: item.name,
|
|
|
+ label: item.name,
|
|
|
+ value: item.id,
|
|
|
+ };
|
|
|
+ });
|
|
|
+
|
|
|
+ proxy.post("/costControl/detail", query).then((res) => {
|
|
|
+ if (res.costControlDetailList && res.costControlDetailList.length) {
|
|
|
+ for (let i = 0; i < res.costControlDetailList.length; i++) {
|
|
|
+ const row = res.costControlDetailList[i];
|
|
|
+ row.fileList = [];
|
|
|
+ row.invoiceFileList = [];
|
|
|
+ // 名称列表
|
|
|
+ if (row.subjectsCalculateItemName) {
|
|
|
+ row.subjectsCalculateItemNameList =
|
|
|
+ row.subjectsCalculateItemName.split(",");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ getCheckBoxMap(res.costType);
|
|
|
+ if (paymentTypeData.value && paymentTypeData.value.length > 0) {
|
|
|
+ currentCostTypeData.value = paymentTypeData.value.find(
|
|
|
+ (x) => x.value == res.costType
|
|
|
+ );
|
|
|
+ if (
|
|
|
+ currentCostTypeData.value.name &&
|
|
|
+ currentCostTypeData.value.name.indexOf("店铺") != -1
|
|
|
+ ) {
|
|
|
+ res.shopName = res.costControlDetailList[0].businessName;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ pdfData.value = res;
|
|
|
+ loading.value = false;
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+const isShowAtt = (formAtt, att = "mainObj") => {
|
|
|
+ if (checkBoxMap.value[att]) {
|
|
|
+ return checkBoxMap.value[att][formAtt] != undefined;
|
|
|
+ } else {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+const getIsShowData = (formAtt, att = "mainObj") => {
|
|
|
+ if (
|
|
|
+ currentCostTypeData.value &&
|
|
|
+ currentCostTypeData.value.name &&
|
|
|
+ currentCostTypeData.value.name.indexOf("店铺") != -1
|
|
|
+ ) {
|
|
|
+ if (
|
|
|
+ pdfData.value &&
|
|
|
+ pdfData.value.paymentMethod &&
|
|
|
+ pdfData.value.paymentMethod == "2"
|
|
|
+ ) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ } else {
|
|
|
+ return isShowAtt(formAtt, att);
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+const getHtmlVal = (val) => {
|
|
|
+ if (val) {
|
|
|
+ return val.replace(/<p>/g, "<div>").replace(/<\/p>/g, "</div>");
|
|
|
+ }
|
|
|
+ return "";
|
|
|
+};
|
|
|
+
|
|
|
+watch(
|
|
|
+ () => props.rowData,
|
|
|
+ (val) => {
|
|
|
+ if (props.rowData.id) {
|
|
|
+ getPdfData({ id: props.rowData.id });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ immediate: true,
|
|
|
+ deep: true,
|
|
|
+ }
|
|
|
+);
|
|
|
+
|
|
|
+const printObj = ref({
|
|
|
+ id: "pdfDom",
|
|
|
+ popTitle: "",
|
|
|
+ extraCss:
|
|
|
+ "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css",
|
|
|
+ extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>',
|
|
|
+});
|
|
|
+
|
|
|
+const clickDownload = () => {
|
|
|
+ proxy.getPdf("费控PDF文件");
|
|
|
+};
|
|
|
+
|
|
|
+const pdfDom = ref(null);
|
|
|
+const exportExcel = () => {
|
|
|
+ // pdfDom.value.exportExcel();
|
|
|
+ // isShowImg.value = false;
|
|
|
+ loading.value = true;
|
|
|
+ setTimeout(() => {
|
|
|
+ $("#pdfDom").table2excel({
|
|
|
+ exclude: ".noExl",
|
|
|
+ sheetName: `费控${pdfData.value.code}`,
|
|
|
+ filename: `费控${pdfData.value.code}`,
|
|
|
+ exclude_img: false,
|
|
|
+ exclude_links: false,
|
|
|
+ exclude_inputs: true,
|
|
|
+ });
|
|
|
+ // isShowImg.value = true;
|
|
|
+ loading.value = false;
|
|
|
+ }, 500);
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.title {
|
|
|
+ font-size: 28px;
|
|
|
+ // font-weight: 700;
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
+.title-info {
|
|
|
+ text-align: center;
|
|
|
+ width: 100%;
|
|
|
+ margin: 20px 0 50px 0;
|
|
|
+ .vertical-bar {
|
|
|
+ width: 6px;
|
|
|
+ height: 18px;
|
|
|
+ background-color: #0084ff;
|
|
|
+ // background-color: #000;
|
|
|
+ margin-right: 9px;
|
|
|
+ display: inline-block;
|
|
|
+ }
|
|
|
+ .content {
|
|
|
+ // font-weight: 600;
|
|
|
+ font-size: 32px;
|
|
|
+ color: #333333;
|
|
|
+ display: inline-block;
|
|
|
+ }
|
|
|
+}
|
|
|
+.row {
|
|
|
+ display: flex;
|
|
|
+ // line-height: 28px;
|
|
|
+ .left {
|
|
|
+ width: 120px;
|
|
|
+ text-align: justify;
|
|
|
+ display: inline-block;
|
|
|
+ &::after {
|
|
|
+ content: "";
|
|
|
+ display: inline-block;
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .right {
|
|
|
+ width: calc(100% - 120px);
|
|
|
+ text-align: left;
|
|
|
+ line-height: 18px;
|
|
|
+ }
|
|
|
+}
|
|
|
+.rowOne {
|
|
|
+ display: flex;
|
|
|
+ line-height: 32px;
|
|
|
+ .left {
|
|
|
+ width: 120px;
|
|
|
+ text-align: left;
|
|
|
+ // text-align: justify;
|
|
|
+ // display: inline-block;
|
|
|
+ // &::after {
|
|
|
+ // content: "";
|
|
|
+ // display: inline-block;
|
|
|
+ // width: 100%;
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ .right {
|
|
|
+ width: calc(100% - 120px);
|
|
|
+ text-align: left;
|
|
|
+ }
|
|
|
+}
|
|
|
+.table {
|
|
|
+ border-collapse: collapse;
|
|
|
+ border-spacing: 0;
|
|
|
+
|
|
|
+ td {
|
|
|
+ text-align: left;
|
|
|
+ padding: 2px 4px;
|
|
|
+ // padding: 5px 10px;
|
|
|
+ }
|
|
|
+}
|
|
|
+.tableOne {
|
|
|
+ border-collapse: collapse;
|
|
|
+ border-spacing: 0;
|
|
|
+ border-left: 1px solid gray;
|
|
|
+ border-right: 1px solid gray;
|
|
|
+ td {
|
|
|
+ text-align: left;
|
|
|
+ padding: 2px 4px;
|
|
|
+ // padding: 5px 10px;
|
|
|
+ border-right: 1px solid gray;
|
|
|
+ border-bottom: 1px solid gray;
|
|
|
+ }
|
|
|
+ .isLastRow td {
|
|
|
+ border-bottom: none;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|