整票提交

dev
lijingjia 3 weeks ago
parent 7d9574efa7
commit 4906218734

@ -261,13 +261,6 @@
type: String, type: String,
default: null, default: null,
}, },
//
printData: {
type: Array,
default: () => {
return []
}
},
// //
create: { create: {
type: Function, type: Function,
@ -319,7 +312,7 @@
const saveFlag = ref(false) const saveFlag = ref(false)
const copyFlag = ref(false) const copyFlag = ref(false)
const openPrint = () => { const openPrint = () => {
dsPrint.value.init(props.printData) dsPrint.value.init()
} }
// //
const copyHandle = async () => { const copyHandle = async () => {

@ -925,7 +925,7 @@ import { Item } from 'ant-design-vue/lib/menu'
if (v === 1) { if (v === 1) {
let flag = false let flag = false
selectData.forEach((item) => { selectData.forEach((item) => {
item = clearCopyRow(Item) item = clearCopyRow(item)
if (props.tbType == 'receive') { if (props.tbType == 'receive') {
item.feeType = 2 item.feeType = 2
} else { } else {

@ -128,7 +128,7 @@
// //
const printData = ref([]) const printData = ref([])
const init = (v) => { const init = (v) => {
printData.value = v printData.value = v || []
visible.value = true visible.value = true
if (v && v.length) { if (v && v.length) {
// ids // ids
@ -213,11 +213,13 @@
visible.value = false visible.value = false
} }
// /* (2)
1. 打印表格数据通过数据调取接口获取打印数据然后跳转打印单
2. 通过数据源打印
*/
const toPrint = (item, type) => { const toPrint = (item, type) => {
console.log(item)
// //
if (item.templateCode == 'BOOKING' && !printData.value) { if (item.templateCode == 'BOOKING' && printData.value.length == 0) {
const postData = { const postData = {
pageCondition: { pageCondition: {
pageIndex: 1, pageIndex: 1,
@ -225,8 +227,8 @@
sortConditions: [], sortConditions: [],
}, },
queryCondition: JSON.stringify([ queryCondition: JSON.stringify([
{ FieldName: 'BusinessId', FieldValue: props.bookingData.id, ConditionalType: 1 }, { FieldName: 'BusinessId', FieldValue: props.bookingData.id, ConditionalType: 1 }
]), ])
} }
GetList(postData).then((res) => { GetList(postData).then((res) => {
const ids = res.data.map((item) => { const ids = res.data.map((item) => {
@ -265,6 +267,7 @@
}) })
}) })
} else { } else {
// 使
if (item.isUseDataSource) { if (item.isUseDataSource) {
const userStore = useUserStore() const userStore = useUserStore()
const postData = { const postData = {

@ -141,12 +141,13 @@
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
import { GetFees, Audit, SetInvoiceEnabled, AuditByBiz } from '../api' import { GetFees, Audit, SetInvoiceEnabled, AuditByBiz } from '../api'
import { Divider } from 'ant-design-vue' import { Divider } from 'ant-design-vue'
import FeeActionBar from './feeActionBar.vue' import { numberThousandFormat } from '/@/utils/commonUtil'
import AlterNewValue from './AlterNewValue.vue' // import FeeActionBar from './feeActionBar.vue'
// import AlterNewValue from './AlterNewValue.vue'
import { useModal } from '/@/components/Modal' import { useModal } from '/@/components/Modal'
import FeeRejectModal from './feeRejectModal.vue' import FeeRejectModal from './feeRejectModal.vue'
import { formatTableData } from '/@/hooks/web/common' // import { formatTableData } from '/@/hooks/web/common'
import emitter from '/@/utils/Bus' // import emitter from '/@/utils/Bus'
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
const route = useRoute() const route = useRoute()
// //
@ -182,13 +183,13 @@
dataIndex: 'RMB', dataIndex: 'RMB',
title: 'RMB', title: 'RMB',
align: 'left', align: 'left',
minWidth: 70 width: 80
}, },
{ {
dataIndex: 'USD', dataIndex: 'USD',
title: 'USD', title: 'USD',
align: 'left', align: 'left',
minWidth: 70 width: 80
}, },
{ {
dataIndex: 'customerFullName', dataIndex: 'customerFullName',
@ -218,7 +219,7 @@
dataIndex: 'exchangeRate', dataIndex: 'exchangeRate',
title: '汇率', title: '汇率',
align: 'left', align: 'left',
width: 40 width: 80
} }
] ]
} }
@ -244,7 +245,7 @@
// //
const columns = feeColumns(1) const columns = feeColumns(1)
columns[0].children.forEach(column => { columns[0].children.forEach(column => {
if (['RMB', 'USD', 'other'].includes(column.dataIndex)) { if (['RMB', 'USD'].includes(column.dataIndex)) {
console.log(column) console.log(column)
// 0 // 0
sums[column.dataIndex] = 0 sums[column.dataIndex] = 0
@ -275,7 +276,7 @@
// //
const columns = feeColumns(2) const columns = feeColumns(2)
columns[0].children.forEach(column => { columns[0].children.forEach(column => {
if (['RMB', 'USD', 'other'].includes(column.dataIndex)) { if (['RMB', 'USD'].includes(column.dataIndex)) {
console.log(column) console.log(column)
// 0 // 0
sums[column.dataIndex] = 0 sums[column.dataIndex] = 0
@ -346,12 +347,11 @@
} }
item.items.forEach(row => { item.items.forEach(row => {
if (row.currency == 'RMB') { if (row.currency == 'RMB') {
row['RMB'] = row.amount row['RMB'] = numberThousandFormat(row.amount, 2, false)
} else if (row.currency == 'USD') { } else if (row.currency == 'USD') {
row['USD'] = row.amount row['USD'] = numberThousandFormat(row.amount, 2, false)
} else {
row['other'] = row.amount
} }
row.exchangeRate = numberThousandFormat(row.exchangeRate, 6, false)
// //
if (row.feeType === 1) { if (row.feeType === 1) {
RData.value.push(row) RData.value.push(row)

@ -65,10 +65,10 @@
<FeeTable ref="mainFeeTable" :status="status"></FeeTable> <FeeTable ref="mainFeeTable" :status="status"></FeeTable>
<!-- 费用统计 --> <!-- 费用统计 -->
<div class="fee-statistic" :class="{'approve-fee-statustic': status == 'BILL_RECV_AUDIT' || status == 'BILL_PAY_AUDIT'}"> <div class="fee-statistic" :class="{'approve-fee-statustic': status == 'BILL_RECV_AUDIT' || status == 'BILL_PAY_AUDIT'}">
<span class="item">RMB利润<span class="item-val" :class="{ warnText: statisticData.profitCNY < 0 }">{{ statisticData.profitCNY }}</span></span> <span class="item">RMB利润<span class="item-val" :class="{ warnText: statisticData.profitCNY < 0 }">{{ statisticData.profitCNY || '-' }}</span></span>
<span class="item">USD利润<span class="item-val" :class="{ warnText: statisticData.profitUSD < 0 }">{{ statisticData.profitUSD }}</span></span> <span class="item">USD利润<span class="item-val" :class="{ warnText: statisticData.profitUSD < 0 }">{{ statisticData.profitUSD || '-' }}</span></span>
<span class="item">合计利润<span class="item-val" :class="{ warnText: statisticData.payableTotal < 0 }">{{ statisticData.payableTotal }}</span></span> <span class="item">合计利润<span class="item-val" :class="{ warnText: statisticData.profitTotal < 0 }">{{ statisticData.profitTotal || '-' }}</span></span>
<span class="item">利润率<span class="item-val">{{ statisticData.profitMargin }}</span></span> <span class="item">利润率<span class="item-val">{{ statisticData.profitMargin || '-' }}</span></span>
</div> </div>
<ApproveBtns <ApproveBtns
agreeText="费用确认" agreeText="费用确认"
@ -206,9 +206,8 @@
GetStat(postData).then(res => { GetStat(postData).then(res => {
const { data } = res const { data } = res
if (data.profitCNY) data.profitCNY = data.profitCNY.toLocaleString() if (data.profitCNY) data.profitCNY = data.profitCNY.toLocaleString()
if (data.payableUSD) data.payableUSD = data.payableUSD.toLocaleString() if (data.profitUSD) data.profitUSD = data.profitUSD.toLocaleString()
// if (data.profitCNY) data.profitCNY = data.profitCNY.toLocaleString() if (data.profitTotal) data.profitTotal = data.profitTotal.toLocaleString()
if (data.payableTotal) data.payableTotal = data.payableTotal.toLocaleString()
statisticData.value = data statisticData.value = data
}) })
} }

@ -77,8 +77,8 @@
return false return false
} }
for(let i = 0; i < select.length; i++) { for(let i = 0; i < select.length; i++) {
if (select[i].status !== 0) { if (!(select[i].status == 0 || select[i].status == 3)) {
return createMessage.warning('仅允许删除未提交状态的数据!') return createMessage.warning('仅允许删除未提交、驳回状态的数据!')
} }
} }
const ids = select.map((item) => { const ids = select.map((item) => {

@ -225,13 +225,12 @@
const openGoodsNameModel = () => { const openGoodsNameModel = () => {
goodsNameVisible.value = true goodsNameVisible.value = true
const data = getFieldsValue2() const data = getFieldsValue2()
console.log(data)
let gData = [{}] 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 ctnGoodsInfo.value = gData
} }
const handleOk = () => { const handleOk = () => {
console.log(ctnGoodsInfo.value)
setFieldsValue2({ setFieldsValue2({
ctnGoodsInfo: ctnGoodsInfo.value ctnGoodsInfo: ctnGoodsInfo.value
}) })
@ -679,6 +678,7 @@
} }
// //
const handleCreate = (arr) => { const handleCreate = (arr) => {
console.log(arr)
arr.push({}) arr.push({})
} }
// //

Loading…
Cancel
Save