|
@@ -12,7 +12,7 @@
|
|
|
<div style="border: 1px solid black">
|
|
|
<div style="display: flex; border-bottom: 1px solid black">
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
max-width: 140px;
|
|
|
min-width: 140px;
|
|
|
border-right: 1px solid black;
|
|
@@ -27,7 +27,7 @@
|
|
|
</div>
|
|
|
<div style="display: flex; border-bottom: 1px solid black">
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
max-width: 140px;
|
|
|
min-width: 140px;
|
|
|
border-right: 1px solid black;
|
|
@@ -41,11 +41,11 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div
|
|
|
- style="display: flex; border-bottom: 1px solid black"
|
|
|
- v-if="printDetails.type != '3'"
|
|
|
+ style="display: flex; border-bottom: 1px solid black"
|
|
|
+ v-if="printDetails.type != '3'"
|
|
|
>
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
max-width: 140px;
|
|
|
min-width: 140px;
|
|
|
border-right: 1px solid black;
|
|
@@ -59,7 +59,7 @@
|
|
|
<div style="width: calc(100% - 140px)">
|
|
|
<div style="border-bottom: 1px solid black; display: flex">
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
max-width: 140px;
|
|
|
min-width: 140px;
|
|
|
padding: 4px 8px;
|
|
@@ -70,7 +70,7 @@
|
|
|
费用类型
|
|
|
</div>
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
width: calc(100% - 300px);
|
|
|
padding: 4px 8px;
|
|
|
border-right: 1px solid black;
|
|
@@ -80,7 +80,7 @@
|
|
|
款项说明
|
|
|
</div>
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
width: 60px;
|
|
|
padding: 4px 8px;
|
|
|
border-right: 1px solid black;
|
|
@@ -92,21 +92,21 @@
|
|
|
<div style="width: 100px; padding: 4px 8px; text-align: center">付款金额</div>
|
|
|
</div>
|
|
|
<template
|
|
|
- v-if="
|
|
|
+ v-if="
|
|
|
printDetails.paymentRequestsDetailList &&
|
|
|
printDetails.paymentRequestsDetailList.length > 0
|
|
|
"
|
|
|
>
|
|
|
<div v-for="(item, index) in printDetails.paymentRequestsDetailList" :key="index">
|
|
|
<div
|
|
|
- :style="
|
|
|
+ :style="
|
|
|
index + 1 !== printDetails.paymentRequestsDetailList.length
|
|
|
? 'border-bottom: 1px solid black; display: flex'
|
|
|
: ' display: flex'
|
|
|
"
|
|
|
>
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
max-width: 140px;
|
|
|
min-width: 140px;
|
|
|
padding: 4px 8px;
|
|
@@ -117,7 +117,7 @@
|
|
|
{{ dictValueLabel(item.expenseType, expenseType) }}
|
|
|
</div>
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
width: calc(100% - 300px);
|
|
|
padding: 4px 8px;
|
|
|
border-right: 1px solid black;
|
|
@@ -128,7 +128,7 @@
|
|
|
{{ item.remark }}
|
|
|
</div>
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
width: 60px;
|
|
|
padding: 4px 8px;
|
|
|
border-right: 1px solid black;
|
|
@@ -148,7 +148,7 @@
|
|
|
</div>
|
|
|
<div style="display: flex; border-bottom: 1px solid black" v-else>
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
max-width: 140px;
|
|
|
min-width: 140px;
|
|
|
border-right: 1px solid black;
|
|
@@ -162,7 +162,7 @@
|
|
|
<div style="width: calc(100% - 140px)">
|
|
|
<div style="border-bottom: 1px solid black; display: flex">
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
max-width: 140px;
|
|
|
min-width: 140px;
|
|
|
padding: 4px 8px;
|
|
@@ -173,7 +173,7 @@
|
|
|
费用类型
|
|
|
</div>
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
width: calc(100% - 360px);
|
|
|
padding: 4px 8px;
|
|
|
border-right: 1px solid black;
|
|
@@ -183,7 +183,7 @@
|
|
|
款项说明
|
|
|
</div>
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
width: 60px;
|
|
|
padding: 4px 8px;
|
|
|
border-right: 1px solid black;
|
|
@@ -193,7 +193,7 @@
|
|
|
货币
|
|
|
</div>
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
width: 80px;
|
|
|
padding: 4px 8px;
|
|
|
border-right: 1px solid black;
|
|
@@ -205,21 +205,21 @@
|
|
|
<div style="width: 80px; padding: 4px 8px; text-align: center">付款金额</div>
|
|
|
</div>
|
|
|
<template
|
|
|
- v-if="
|
|
|
+ v-if="
|
|
|
printDetails.paymentRequestsDetailList &&
|
|
|
printDetails.paymentRequestsDetailList.length > 0
|
|
|
"
|
|
|
>
|
|
|
<div v-for="(item, index) in printDetails.paymentRequestsDetailList" :key="index">
|
|
|
<div
|
|
|
- :style="
|
|
|
+ :style="
|
|
|
index + 1 !== printDetails.paymentRequestsDetailList.length
|
|
|
? 'border-bottom: 1px solid black; display: flex'
|
|
|
: ' display: flex'
|
|
|
"
|
|
|
>
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
max-width: 140px;
|
|
|
min-width: 140px;
|
|
|
padding: 4px 8px;
|
|
@@ -230,7 +230,7 @@
|
|
|
{{ dictValueLabel(item.expenseType, expenseType) }}
|
|
|
</div>
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
width: calc(100% - 360px);
|
|
|
padding: 4px 8px;
|
|
|
border-right: 1px solid black;
|
|
@@ -241,7 +241,7 @@
|
|
|
{{ item.remark }}
|
|
|
</div>
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
width: 60px;
|
|
|
padding: 4px 8px;
|
|
|
border-right: 1px solid black;
|
|
@@ -252,7 +252,7 @@
|
|
|
人民币
|
|
|
</div>
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
width: 80px;
|
|
|
padding: 4px 8px;
|
|
|
border-right: 1px solid black;
|
|
@@ -271,11 +271,11 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div
|
|
|
- style="display: flex; border-bottom: 1px solid black"
|
|
|
- v-if="printDetails.type !== '3'"
|
|
|
+ style="display: flex; border-bottom: 1px solid black"
|
|
|
+ v-if="printDetails.type !== '3'"
|
|
|
>
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
max-width: 140px;
|
|
|
min-width: 140px;
|
|
|
border-right: 1px solid black;
|
|
@@ -296,7 +296,7 @@
|
|
|
<div v-else>
|
|
|
<div style="display: flex; border-bottom: 1px solid black">
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
max-width: 140px;
|
|
|
min-width: 140px;
|
|
|
border-right: 1px solid black;
|
|
@@ -316,7 +316,7 @@
|
|
|
</div>
|
|
|
<div style="display: flex; border-bottom: 1px solid black">
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
max-width: 140px;
|
|
|
min-width: 140px;
|
|
|
border-right: 1px solid black;
|
|
@@ -336,7 +336,7 @@
|
|
|
</div>
|
|
|
<div style="display: flex; border-bottom: 1px solid black">
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
max-width: 140px;
|
|
|
min-width: 140px;
|
|
|
border-right: 1px solid black;
|
|
@@ -357,7 +357,7 @@
|
|
|
</div>
|
|
|
<div style="display: flex; border-bottom: 1px solid black">
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
max-width: 140px;
|
|
|
min-width: 140px;
|
|
|
border-right: 1px solid black;
|
|
@@ -372,7 +372,7 @@
|
|
|
</div>
|
|
|
<div style="display: flex; border-bottom: 1px solid black">
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
max-width: 140px;
|
|
|
min-width: 140px;
|
|
|
border-right: 1px solid black;
|
|
@@ -386,7 +386,7 @@
|
|
|
<div style="width: calc(100% - 140px)">
|
|
|
<div style="border-bottom: 1px solid black; display: flex">
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
width: 19%;
|
|
|
padding: 0 8px;
|
|
|
border-right: 1px solid black;
|
|
@@ -396,7 +396,7 @@
|
|
|
支付方式
|
|
|
</div>
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
width: 27%;
|
|
|
padding: 0 8px;
|
|
|
border-right: 1px solid black;
|
|
@@ -406,7 +406,7 @@
|
|
|
收款方户名
|
|
|
</div>
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
width: 27%;
|
|
|
padding: 0 8px;
|
|
|
border-right: 1px solid black;
|
|
@@ -419,7 +419,7 @@
|
|
|
</div>
|
|
|
<div style="display: flex">
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
width: 19%;
|
|
|
padding: 0 8px;
|
|
|
border-right: 1px solid black;
|
|
@@ -430,7 +430,7 @@
|
|
|
{{ dictValueLabel(printDetails.payType, payType) }}
|
|
|
</div>
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
width: 27%;
|
|
|
padding: 0 8px;
|
|
|
border-right: 1px solid black;
|
|
@@ -441,7 +441,7 @@
|
|
|
{{ printDetails.accountName }}
|
|
|
</div>
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
width: 27%;
|
|
|
padding: 0 8px;
|
|
|
border-right: 1px solid black;
|
|
@@ -459,7 +459,7 @@
|
|
|
</div>
|
|
|
<div style="display: flex; border-bottom: 1px solid black">
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
max-width: 140px;
|
|
|
min-width: 140px;
|
|
|
border-right: 1px solid black;
|
|
@@ -474,7 +474,7 @@
|
|
|
</div>
|
|
|
<div style="display: flex">
|
|
|
<div
|
|
|
- style="
|
|
|
+ style="
|
|
|
max-width: 140px;
|
|
|
min-width: 140px;
|
|
|
border-right: 1px solid black;
|
|
@@ -489,7 +489,7 @@
|
|
|
<template v-if="recordList && recordList.length > 0">
|
|
|
<div v-for="(item, index) in recordList" :key="index">
|
|
|
<div
|
|
|
- :style="
|
|
|
+ :style="
|
|
|
index + 1 !== recordList.length
|
|
|
? 'border-bottom: 1px solid black; padding: 4px 8px; display: flex'
|
|
|
: 'padding: 4px 8px; display: flex'
|
|
@@ -518,11 +518,11 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { getDoneListTwoApi } from '@/api/flow/execute'
|
|
|
-import { getDetailApi } from '@/api/business/payment/requests'
|
|
|
-import { getDictByCode } from '@/utils/dict'
|
|
|
-import { getPageApi as getCorporationPageApi } from '@/api/business/corporation/corporation'
|
|
|
-import { useUserStore } from '@/stores/modules/user'
|
|
|
+import {getDoneListTwoApi} from '@/api/flow/execute'
|
|
|
+import {getDetailApi} from '@/api/business/payment/requests'
|
|
|
+import {getDictByCode} from '@/utils/dict'
|
|
|
+import {getPageApi as getCorporationPageApi} from '@/api/business/corporation/corporation'
|
|
|
+import {useUserStore} from '@/stores/modules/user'
|
|
|
|
|
|
const props = defineProps({
|
|
|
rowData: Object
|
|
@@ -535,6 +535,7 @@ const expenseType = ref([])
|
|
|
const printDetails = ref({})
|
|
|
const recordList = ref({})
|
|
|
const presentTime = ref('')
|
|
|
+
|
|
|
function formatDate(date) {
|
|
|
const year = date.getFullYear()
|
|
|
const month = String(date.getMonth() + 1).padStart(2, '0') // 月份从0开始,所以需要加1
|
|
@@ -544,6 +545,7 @@ function formatDate(date) {
|
|
|
const seconds = String(date.getSeconds()).padStart(2, '0')
|
|
|
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
|
|
|
}
|
|
|
+
|
|
|
function dictValueLabel(value, arr) {
|
|
|
if ((value || value === 0) && arr) {
|
|
|
const current = arr.filter((x) => x.value == value)
|
|
@@ -554,6 +556,7 @@ function dictValueLabel(value, arr) {
|
|
|
}
|
|
|
return ''
|
|
|
}
|
|
|
+
|
|
|
function getDictData() {
|
|
|
getDictByCode('payment_requests_type').then((res) => {
|
|
|
paymentType.value = res
|
|
@@ -564,7 +567,7 @@ function getDictData() {
|
|
|
getDictByCode('expense_type').then((res) => {
|
|
|
expenseType.value = res
|
|
|
})
|
|
|
- getCorporationPageApi({ searchAll: true }).then((res) => {
|
|
|
+ getCorporationPageApi({searchAll: true}).then((res) => {
|
|
|
if (res?.records && res.records.length > 0) {
|
|
|
companyData.value = res.records.map((item) => {
|
|
|
return {
|
|
@@ -577,25 +580,27 @@ function getDictData() {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
getDictData()
|
|
|
const computeMoney = (label) => {
|
|
|
let amount = 0
|
|
|
if (
|
|
|
- printDetails.value.paymentRequestsDetailList &&
|
|
|
- printDetails.value.paymentRequestsDetailList.length > 0
|
|
|
+ printDetails.value.paymentRequestsDetailList &&
|
|
|
+ printDetails.value.paymentRequestsDetailList.length > 0
|
|
|
) {
|
|
|
for (let i = 0; i < printDetails.value.paymentRequestsDetailList.length; i++) {
|
|
|
if (printDetails.value.paymentRequestsDetailList[i][label]) {
|
|
|
amount = Number(
|
|
|
- parseFloat(
|
|
|
- Number(amount) + Number(printDetails.value.paymentRequestsDetailList[i][label])
|
|
|
- ).toFixed(2)
|
|
|
+ parseFloat(
|
|
|
+ Number(amount) + Number(printDetails.value.paymentRequestsDetailList[i][label])
|
|
|
+ ).toFixed(2)
|
|
|
)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
return amount
|
|
|
}
|
|
|
+
|
|
|
function toDx(n) {
|
|
|
//阿拉伯数字转换函数
|
|
|
switch (n) {
|
|
@@ -621,6 +626,7 @@ function toDx(n) {
|
|
|
return '玖'
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
// 金额转大写
|
|
|
function NumberToChinese(m) {
|
|
|
let unit = ['仟', '佰', '拾', '', '仟', '佰', '拾', '', '角', '分', '厘']
|
|
@@ -648,6 +654,7 @@ function NumberToChinese(m) {
|
|
|
result += result.charAt(result.length - 1) == '元' ? '整' : ''
|
|
|
return result
|
|
|
}
|
|
|
+
|
|
|
const computeBalance = () => {
|
|
|
let balance = 0
|
|
|
let advanceAmount = computeMoney('advanceAmount')
|
|
@@ -671,6 +678,10 @@ const getAtts = (atts) => {
|
|
|
return text
|
|
|
}
|
|
|
const getStatus = (row) => {
|
|
|
+ if (row.skipType == 'PASS') {
|
|
|
+ return '审批通过'
|
|
|
+ }
|
|
|
+
|
|
|
switch (row.flowStatus) {
|
|
|
case '0':
|
|
|
return '待提交'
|
|
@@ -691,7 +702,7 @@ const getStatus = (row) => {
|
|
|
onMounted(() => {
|
|
|
presentTime.value = formatDate(new Date())
|
|
|
if (props?.rowData?.id) {
|
|
|
- getDetailApi({ id: props.rowData.id }).then((res) => {
|
|
|
+ getDetailApi({id: props.rowData.id}).then((res) => {
|
|
|
printDetails.value = res
|
|
|
})
|
|
|
getDoneListTwoApi(props.rowData.id).then((res) => {
|