diff --git a/src/components/ActionBar/index.vue b/src/components/ActionBar/index.vue
index adc3c56a..a4702530 100644
--- a/src/components/ActionBar/index.vue
+++ b/src/components/ActionBar/index.vue
@@ -261,13 +261,6 @@
type: String,
default: null,
},
- // 没有数据源的数据(需要传入打印的数据)
- printData: {
- type: Array,
- default: () => {
- return []
- }
- },
// 新建
create: {
type: Function,
@@ -319,7 +312,7 @@
const saveFlag = ref(false)
const copyFlag = ref(false)
const openPrint = () => {
- dsPrint.value.init(props.printData)
+ dsPrint.value.init()
}
// 复制
const copyHandle = async () => {
diff --git a/src/components/CostEntry/feeTable.vue b/src/components/CostEntry/feeTable.vue
index 0d2469e5..80a8ee7f 100644
--- a/src/components/CostEntry/feeTable.vue
+++ b/src/components/CostEntry/feeTable.vue
@@ -925,7 +925,7 @@ import { Item } from 'ant-design-vue/lib/menu'
if (v === 1) {
let flag = false
selectData.forEach((item) => {
- item = clearCopyRow(Item)
+ item = clearCopyRow(item)
if (props.tbType == 'receive') {
item.feeType = 2
} else {
diff --git a/src/components/Print/index.vue b/src/components/Print/index.vue
index fdec977b..51a73fae 100644
--- a/src/components/Print/index.vue
+++ b/src/components/Print/index.vue
@@ -128,7 +128,7 @@
// 传入的打印数据
const printData = ref([])
const init = (v) => {
- printData.value = v
+ printData.value = v || []
visible.value = true
if (v && v.length) {
// 储存选中的ids
@@ -213,11 +213,13 @@
visible.value = false
}
- // 跳转打印
+ /* 跳转打印(目前有2种打印方式) 这块看不明白,找李工沟通一下,这块容易出错。
+ 1. 打印表格数据,通过数据调取接口获取打印数据,然后跳转打印单
+ 2. 通过数据源打印
+ */
const toPrint = (item, type) => {
- console.log(item)
// 如果是业务联系单并且没有传入打印数据,在主单页面打印
- if (item.templateCode == 'BOOKING' && !printData.value) {
+ if (item.templateCode == 'BOOKING' && printData.value.length == 0) {
const postData = {
pageCondition: {
pageIndex: 1,
@@ -225,8 +227,8 @@
sortConditions: [],
},
queryCondition: JSON.stringify([
- { FieldName: 'BusinessId', FieldValue: props.bookingData.id, ConditionalType: 1 },
- ]),
+ { FieldName: 'BusinessId', FieldValue: props.bookingData.id, ConditionalType: 1 }
+ ])
}
GetList(postData).then((res) => {
const ids = res.data.map((item) => {
@@ -265,6 +267,7 @@
})
})
} else {
+ // 使用打印模版数据源
if (item.isUseDataSource) {
const userStore = useUserStore()
const postData = {
diff --git a/src/views/approve/fee/components/feeTable.vue b/src/views/approve/fee/components/feeTable.vue
index 67477919..c1de680d 100644
--- a/src/views/approve/fee/components/feeTable.vue
+++ b/src/views/approve/fee/components/feeTable.vue
@@ -141,12 +141,13 @@
import { useMessage } from '/@/hooks/web/useMessage'
import { GetFees, Audit, SetInvoiceEnabled, AuditByBiz } from '../api'
import { Divider } from 'ant-design-vue'
- import FeeActionBar from './feeActionBar.vue'
- import AlterNewValue from './AlterNewValue.vue'
+ import { numberThousandFormat } from '/@/utils/commonUtil'
+ // import FeeActionBar from './feeActionBar.vue'
+ // import AlterNewValue from './AlterNewValue.vue'
import { useModal } from '/@/components/Modal'
import FeeRejectModal from './feeRejectModal.vue'
- import { formatTableData } from '/@/hooks/web/common'
- import emitter from '/@/utils/Bus'
+ // import { formatTableData } from '/@/hooks/web/common'
+ // import emitter from '/@/utils/Bus'
import { useRoute } from 'vue-router'
const route = useRoute()
// 当前页面状态
@@ -182,13 +183,13 @@
dataIndex: 'RMB',
title: 'RMB',
align: 'left',
- minWidth: 70
+ width: 80
},
{
dataIndex: 'USD',
title: 'USD',
align: 'left',
- minWidth: 70
+ width: 80
},
{
dataIndex: 'customerFullName',
@@ -218,7 +219,7 @@
dataIndex: 'exchangeRate',
title: '汇率',
align: 'left',
- width: 40
+ width: 80
}
]
}
@@ -244,7 +245,7 @@
// 遍历所有列,找出需要合计的列
const columns = feeColumns(1)
columns[0].children.forEach(column => {
- if (['RMB', 'USD', 'other'].includes(column.dataIndex)) {
+ if (['RMB', 'USD'].includes(column.dataIndex)) {
console.log(column)
// 初始化合计值为0
sums[column.dataIndex] = 0
@@ -275,7 +276,7 @@
// 遍历所有列,找出需要合计的列
const columns = feeColumns(2)
columns[0].children.forEach(column => {
- if (['RMB', 'USD', 'other'].includes(column.dataIndex)) {
+ if (['RMB', 'USD'].includes(column.dataIndex)) {
console.log(column)
// 初始化合计值为0
sums[column.dataIndex] = 0
@@ -346,12 +347,11 @@
}
item.items.forEach(row => {
if (row.currency == 'RMB') {
- row['RMB'] = row.amount
+ row['RMB'] = numberThousandFormat(row.amount, 2, false)
} else if (row.currency == 'USD') {
- row['USD'] = row.amount
- } else {
- row['other'] = row.amount
+ row['USD'] = numberThousandFormat(row.amount, 2, false)
}
+ row.exchangeRate = numberThousandFormat(row.exchangeRate, 6, false)
// 应收
if (row.feeType === 1) {
RData.value.push(row)
diff --git a/src/views/approve/fee/index.vue b/src/views/approve/fee/index.vue
index 55bb4d45..8fb6b343 100644
--- a/src/views/approve/fee/index.vue
+++ b/src/views/approve/fee/index.vue
@@ -65,10 +65,10 @@