|
@@ -1,19 +1,19 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<BaseDialog
|
|
|
- :width="activeData.type == 1 || type == 1 ? '1100px' : '1300px'"
|
|
|
+ :width="printType == 1 || type == 1 ? '1100px' : '1300px'"
|
|
|
:isShow.sync="isShow"
|
|
|
- :title="activeData.type == 1 ? '单据打印' : '明细打印'"
|
|
|
+ :title="printType == 1 ? '单据打印' : '明细打印'"
|
|
|
@submit="submitForm"
|
|
|
@close="close"
|
|
|
@open="init"
|
|
|
:confirmStatus="false"
|
|
|
>
|
|
|
- <div id="print">
|
|
|
+ <div id="print" v-loading="loading">
|
|
|
<h3 style="text-align: center">
|
|
|
- {{ activeData.type == 1 ? "费用支出单据" : "费用支出明细" }}
|
|
|
+ {{ printType == 1 ? "费用支出单据" : "费用支出明细" }}
|
|
|
</h3>
|
|
|
- <template v-if="activeData.type == 1">
|
|
|
+ <template v-if="printType == 1">
|
|
|
<table
|
|
|
class="table1"
|
|
|
border
|
|
@@ -27,8 +27,8 @@
|
|
|
["", "机构分成", "业务提成", "佣金结算", "供应商结算"][type]
|
|
|
}}
|
|
|
</td>
|
|
|
- <td>付款日期:2022-12-12 12:12:12</td>
|
|
|
- <td>付款金额:¥8000.00</td>
|
|
|
+ <td>付款日期:{{ $methodsTools.onlyForma(formData.payTime) }}</td>
|
|
|
+ <td>付款金额:{{ formData.payMoney | formatPrice }}</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>
|
|
@@ -44,7 +44,7 @@
|
|
|
["", "月份", "季度", "半年", "年度"][formData.billType]
|
|
|
}}
|
|
|
</p>
|
|
|
- <p>账款时间:{{ formData.remark }}</p>
|
|
|
+ <p>账款时间:{{ activeData.monthTime }}</p>
|
|
|
</template>
|
|
|
<template v-if="type == 3">
|
|
|
<p>订单单号:{{ formData.orderSn }}</p>
|
|
@@ -57,9 +57,9 @@
|
|
|
收款方式:{{ ["", "账号支付", "扫码支付", "现金支付"][1] }}
|
|
|
</p>
|
|
|
<template v-if="true">
|
|
|
- <p>收款账户:{{ formData.bankName }}</p>
|
|
|
- <p>收款银行:{{ formData.bank }}</p>
|
|
|
- <p>收款账号:{{ formData.bankAccount }}</p>
|
|
|
+ <p>收款账户:{{ formData.toBankName }}</p>
|
|
|
+ <p>收款银行:{{ formData.toBankTypeName }}</p>
|
|
|
+ <p>收款账号:{{ formData.toBankAcount }}</p>
|
|
|
</template>
|
|
|
</td>
|
|
|
<td>
|
|
@@ -84,13 +84,14 @@
|
|
|
<td colspan="3">
|
|
|
<p>审核进度:</p>
|
|
|
<el-steps
|
|
|
+ style="padding-left: 30px"
|
|
|
:space="200"
|
|
|
- :active="formData.checkRoles.length"
|
|
|
+ :active="checkRoles.length"
|
|
|
finish-status="success"
|
|
|
align-center
|
|
|
>
|
|
|
<el-step
|
|
|
- v-for="(item, index) in formData.checkRoles"
|
|
|
+ v-for="(item, index) in checkRoles"
|
|
|
:title="item"
|
|
|
:key="index"
|
|
|
></el-step>
|
|
@@ -99,7 +100,7 @@
|
|
|
</tr>
|
|
|
</table>
|
|
|
</template>
|
|
|
- <template v-if="activeData.type == 2">
|
|
|
+ <template v-if="printType == 2">
|
|
|
<table
|
|
|
border
|
|
|
width="100%"
|
|
@@ -132,13 +133,13 @@
|
|
|
<span v-else-if="items.scope === 'type'">
|
|
|
{{ items.values[item[items.prop]] }}
|
|
|
</span>
|
|
|
- <div v-else-if="items.scope === 'businessNames'">
|
|
|
+ <div v-else-if="items.scope === 'businessList'">
|
|
|
<div v-for="(bus, i) in item[items.prop]" :key="i">
|
|
|
{{ bus }}
|
|
|
</div>
|
|
|
</div>
|
|
|
<span v-else>
|
|
|
- {{ item[items.prop] }}
|
|
|
+ {{ item[items.prop] || "-" }}
|
|
|
</span>
|
|
|
</td>
|
|
|
</tr>
|
|
@@ -168,6 +169,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { withPrint, monthOrderListWithPrint } from "@/api/financed/index";
|
|
|
export default {
|
|
|
name: "",
|
|
|
props: {
|
|
@@ -184,65 +186,39 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- formData: {
|
|
|
- checkRoles: [],
|
|
|
- },
|
|
|
- tableData: [
|
|
|
- {
|
|
|
- createUsername: "张三",
|
|
|
- createNo: "6280305",
|
|
|
- brokerage: 97,
|
|
|
- businessList: null,
|
|
|
- checkStatus: 2,
|
|
|
- createSysUserId: null,
|
|
|
- deductMoney: null,
|
|
|
- divideCompanyMoney: 1065.6,
|
|
|
- divideLogId: 1701,
|
|
|
- divideMoney: null,
|
|
|
- divideSellerMoney: 0,
|
|
|
- divideType: 1,
|
|
|
- id: 218,
|
|
|
- orderCreateTime: 1685672071,
|
|
|
- orderFrom: 3,
|
|
|
- orderPrice: 1580,
|
|
|
- orderSn: "10002306021014201758856",
|
|
|
- orderTime: 1682905393,
|
|
|
- orderType: 1,
|
|
|
- payMoney: null,
|
|
|
- payStatus: 0,
|
|
|
- pretaxBrokerage: 100,
|
|
|
- refundSn: null,
|
|
|
- refundTime: null,
|
|
|
- remark: null,
|
|
|
- roleId: 16,
|
|
|
- roleName: "出纳",
|
|
|
- status: 1,
|
|
|
- tenantId: null,
|
|
|
- tenantName: "祥粤云学堂(旧系统)",
|
|
|
- businessNames: [
|
|
|
- "继续教育 / 施工现场专业人员(七大员)",
|
|
|
- "考前培训 / 一级建造师",
|
|
|
- ],
|
|
|
- purchaseOrg: "广东南粤有限公司",
|
|
|
- payType: 1,
|
|
|
- },
|
|
|
- ],
|
|
|
+ formData: {},
|
|
|
+ checkRoles: ["统计", "会计/财务", "总经理", "出纳"],
|
|
|
+ tableData: [],
|
|
|
+ loading: false,
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
init() {
|
|
|
- this.$api[
|
|
|
- this.activeData.type == 1
|
|
|
- ? "settlereceiptsdata"
|
|
|
- : "settlereceiptsdetaildata"
|
|
|
- ](this.activeData.settleId).then((res) => {
|
|
|
- if (this.activeData.type == 1) {
|
|
|
- this.formData = res.data;
|
|
|
- }
|
|
|
- if (this.activeData.type == 2) {
|
|
|
- this.tableData = res.data;
|
|
|
- }
|
|
|
- });
|
|
|
+ this.loading = true;
|
|
|
+ let { id } = this.activeData;
|
|
|
+ if (this.printType == 2) {
|
|
|
+ id = {
|
|
|
+ divideLogId: id,
|
|
|
+ };
|
|
|
+ }
|
|
|
+ const fn = [withPrint, monthOrderListWithPrint][this.printType - 1];
|
|
|
+ fn(id)
|
|
|
+ .then((res) => {
|
|
|
+ console.log(
|
|
|
+ "🚀 ~ file: dislogPrint.vue:207 ~ .then ~ res:",
|
|
|
+ res.data,
|
|
|
+ this.activeData
|
|
|
+ );
|
|
|
+ if (this.printType == 1) {
|
|
|
+ this.formData = res.data;
|
|
|
+ }
|
|
|
+ if (this.printType == 2) {
|
|
|
+ this.tableData = res.data;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
},
|
|
|
close() {},
|
|
|
submitForm() {},
|
|
@@ -262,8 +238,11 @@ export default {
|
|
|
this.$emit("update:dialogVisible", false);
|
|
|
},
|
|
|
},
|
|
|
+ printType() {
|
|
|
+ return this.activeData.printType;
|
|
|
+ },
|
|
|
type() {
|
|
|
- return 3;
|
|
|
+ return this.printType;
|
|
|
},
|
|
|
tableSet() {
|
|
|
if (this.type != 3) {
|
|
@@ -280,8 +259,8 @@ export default {
|
|
|
{ label: "业务号", prop: "createNo", width: "80" },
|
|
|
{
|
|
|
label: "业务类型",
|
|
|
- prop: "businessNames",
|
|
|
- scope: "businessNames",
|
|
|
+ prop: "businessList",
|
|
|
+ scope: "businessList",
|
|
|
width: "160",
|
|
|
},
|
|
|
{
|
|
@@ -315,8 +294,8 @@ export default {
|
|
|
{ label: "下单企业", prop: "purchaseOrg", width: "130" },
|
|
|
{
|
|
|
label: "业务类型",
|
|
|
- prop: "businessNames",
|
|
|
- scope: "businessNames",
|
|
|
+ prop: "businessList",
|
|
|
+ scope: "businessList",
|
|
|
width: "160",
|
|
|
},
|
|
|
{
|