From 4906218734b741a4a37f7002ca9fba83b06f5d86 Mon Sep 17 00:00:00 2001 From: lijingjia Date: Wed, 6 Nov 2024 13:03:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=A5=A8=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ActionBar/index.vue | 9 +------ src/components/CostEntry/feeTable.vue | 2 +- src/components/Print/index.vue | 15 ++++++----- src/views/approve/fee/components/feeTable.vue | 26 +++++++++---------- src/views/approve/fee/index.vue | 13 +++++----- .../paidApply/components/tableActionBar.vue | 4 +-- .../seaexport/detail/modules/cargoInfo.vue | 6 ++--- 7 files changed, 35 insertions(+), 40 deletions(-) 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 @@
- RMB利润:{{ statisticData.profitCNY }} - USD利润:{{ statisticData.profitUSD }} - 合计利润:{{ statisticData.payableTotal }} - 利润率:{{ statisticData.profitMargin }} + RMB利润:{{ statisticData.profitCNY || '-' }} + USD利润:{{ statisticData.profitUSD || '-' }} + 合计利润:{{ statisticData.profitTotal || '-' }} + 利润率:{{ statisticData.profitMargin || '-' }}
{ const { data } = res if (data.profitCNY) data.profitCNY = data.profitCNY.toLocaleString() - if (data.payableUSD) data.payableUSD = data.payableUSD.toLocaleString() - // if (data.profitCNY) data.profitCNY = data.profitCNY.toLocaleString() - if (data.payableTotal) data.payableTotal = data.payableTotal.toLocaleString() + if (data.profitUSD) data.profitUSD = data.profitUSD.toLocaleString() + if (data.profitTotal) data.profitTotal = data.profitTotal.toLocaleString() statisticData.value = data }) } diff --git a/src/views/operation/paidApply/components/tableActionBar.vue b/src/views/operation/paidApply/components/tableActionBar.vue index 56f5cfaf..f8ad9a41 100644 --- a/src/views/operation/paidApply/components/tableActionBar.vue +++ b/src/views/operation/paidApply/components/tableActionBar.vue @@ -77,8 +77,8 @@ return false } for(let i = 0; i < select.length; i++) { - if (select[i].status !== 0) { - return createMessage.warning('仅允许删除未提交状态的数据!') + if (!(select[i].status == 0 || select[i].status == 3)) { + return createMessage.warning('仅允许删除未提交、驳回状态的数据!') } } const ids = select.map((item) => { diff --git a/src/views/operation/seaexport/detail/modules/cargoInfo.vue b/src/views/operation/seaexport/detail/modules/cargoInfo.vue index 377b2151..fcb73043 100644 --- a/src/views/operation/seaexport/detail/modules/cargoInfo.vue +++ b/src/views/operation/seaexport/detail/modules/cargoInfo.vue @@ -225,13 +225,12 @@ const openGoodsNameModel = () => { goodsNameVisible.value = true const data = getFieldsValue2() - console.log(data) let gData = [{}] - if (data?.ctnGoodsInfo?.length != 0) gData = data.ctnGoodsInfo + if (data.ctnGoodsInfo && data?.ctnGoodsInfo?.length != 0) gData = data.ctnGoodsInfo + console.log(gData) ctnGoodsInfo.value = gData } const handleOk = () => { - console.log(ctnGoodsInfo.value) setFieldsValue2({ ctnGoodsInfo: ctnGoodsInfo.value }) @@ -679,6 +678,7 @@ } // 添加多品名 const handleCreate = (arr) => { + console.log(arr) arr.push({}) } // 删除箱型价格