修复问题

feature-JimuReport-1106-yjl
sunzehua 1 month ago
parent 5773acae6c
commit 3b893fc5dd

@ -144,7 +144,7 @@ export function PaymentFreeSettlementGet(parameter) {
export function PaymentFreeSettlementGetExchangesAsync(parameter) {
return request({
url: '/feeApi/PaymentFreeSettlement/GetExchangesAsync',
url: '/feeApi/PaymentFreeSettlement/GetCurrencies',
method: 'post',
data: parameter,
})

@ -360,9 +360,18 @@ export const detailForm: FormSchema[] = [
colProps: { span: 4 },
show: false
},
{
field: 'orgBankId',
label: '',
colProps: { span: 4 },
show: false
},
{
field: 'customerBankName',
label: '银行账号',
label: '客户银行',
show: ({ values }) => {
return values.mode=='free';
},
colProps: { span: 4 },
component: 'ApiSelect',
componentProps: ({ formModel }) => {
@ -385,20 +394,82 @@ export const detailForm: FormSchema[] = [
queryCondition: JSON.stringify(queryStr),
}
GetClientBankList(data).then((res) => {
res.data.forEach(item=>{
item.showName = item.bankName + ' ' + item.bankAccountNo
})
resolve(res)
})
})
},
immediate: false,
labelField: 'bankName',
labelField: 'showName',
valueField: 'bankName',
resultField: 'data',
onChange: (e, obj) => {
if (obj) {
formModel.customerBankId = obj.id
formModel.customerAccount = obj.bankAccountNo
}
if (!obj && !e) {
formModel.customerBankId = ''
formModel.customerAccount = ''
}
},
}
},
},
{
field: 'customerAccount',
label: '客户账号',
show: ({ values }) => {
return values.mode=='free';
},
colProps: { span: 4 },
dynamicDisabled:true,
component: 'Input'
},
{
field: 'orgBankName',
label: '银行账号',
colProps: { span: 4 },
component: 'ApiSelect',
componentProps: ({ formModel }) => {
return {
api: () => {
return new Promise((resolve) => {
const queryStr = [
{
FieldName: 'ClientId',
FieldValue: formModel.customerId,
ConditionalType: '0',
},
]
const data = {
pageCondition: {
pageIndex: 1,
pageSize: 20,
sortConditions: [],
},
queryCondition: JSON.stringify(queryStr),
}
GetClientBankList(data).then((res) => {
res.data.forEach(item=>{
item.showName = item.bankName + ' ' + item.bankAccountNo
})
resolve(res)
})
})
},
immediate: false,
labelField: 'showName',
valueField: 'showName',
resultField: 'data',
onChange: (e, obj) => {
if (obj) {
formModel.orgBankId = obj.id
}
if (!obj && !e) {
formModel.orgBankId = ''
}
},
}
@ -472,6 +543,12 @@ export const detailForm: FormSchema[] = [
}
},
},
{
field: 'ledgerVoucherNO',
label: '总账凭证号',
colProps: { span: 4 },
component: 'Input'
},
]
export const markForm: FormSchema[] = [

@ -60,7 +60,7 @@
<BasicForm @register="registerFormMark">
</BasicForm>
<BasicTable v-if="route.query.type=='invoice'" class="ds-table" @row-click="handleClick" @register="registerTable">
<BasicTable class="ds-table" @row-click="handleClick" @register="registerTable">
<template #right>
<div style="width: 40%;margin-left: 10px;">
<div>
@ -101,54 +101,6 @@
</div>
</template>
<template v-slot:bodyCell="{ column, record }">
<template v-if="column.dataIndex == 'businessType'">
<span v-if="record.businessType == 1"></span>
</template>
</template>
</BasicTable>
<BasicTable v-if="route.query.type=='free'" class="ds-table" @row-click="handleClick" @register="registerTableFree">
<template #right>
<div style="width: 40%;margin-left: 10px;">
<div>
<BasicTable class="ds-table" @register="registerTableFree1">
<template #tableTitle>
<div>
<span class="bold">费用明细</span>
</div>
</template>
<template v-slot:bodyCell="{ column, record }">
<template v-if="column.dataIndex == 'feeType'">
<span v-if="record.feeType == 1"></span>
<span v-if="record.feeType == 2"></span>
</template>
</template>
</BasicTable>
</div>
</div>
</template>
<template #tableTitle>
<div>
<div>
<span class="bold">结算明细</span>
<a-button v-repeat type="link" @click="addDetailed()">
<span class="iconfont icon-jia"></span>
添加
</a-button>
<a-popconfirm title="确定要删除勾选的数据?" ok-text="" cancel-text="" @confirm="deleteRow">
<a-button v-repeat type="link">
<span class="iconfont icon-shanchu1"></span>删除
</a-button>
</a-popconfirm>
<a-button v-repeat type="link" @click="openFile">
<span class="iconfont icon-fujian1"></span>附件
</a-button>
</div>
</div>
</template>
<template v-slot:bodyCell="{ column, record }">
<template v-if="column.dataIndex == 'businessType'">
@ -158,7 +110,8 @@
</BasicTable>
</div>
</a-spin>
<invoiceTable ref="invoiceTableRef" @updateList="updateList" @updateListFree="updateListFree"></invoiceTable>
<invoiceTable ref="invoiceTableRef" @updateListFreeLeft="updateListFreeLeft" @updateList="updateList"
@updateListFree="updateListFree"></invoiceTable>
<invoiceFile ref="invoiceFileRef"></invoiceFile>
</div>
</template>
@ -175,7 +128,7 @@ import invoiceFile from '../../../operation/invoiceIssue/detail/invoiceFile.vue'
import { useRoute, useRouter } from 'vue-router'
import { BasicTable, useTable, TableAction } from '/@/components/Table'
import { useGo } from '/@/hooks/web/usePage'
import { detailForm, markForm, invoiceColum, invoiceDetailColum,freeColum,freeDetailColum } from '../columns'
import { detailForm, markForm, invoiceColum, invoiceDetailColum, freeColum, freeDetailColum } from '../columns'
import { BasicForm, useForm } from '/@/components/Form/index'
import { useUserStore } from '/@/store/modules/user'
import { useMultipleTabStore } from '/@/store/modules/multipleTab'
@ -209,7 +162,7 @@ const [registerTable, { setTableData, setSelectedRowKeys, getSelectRows }] = use
},
canResize: true,
showTableSetting: true,
id: '1',
id: getTableId(),
immediate: false,
})
const [registerTable1, { getSelectRows: getSelectRowsFee, setProps: setPropsFee, setTableData: setTableData1 }] = useTable({
@ -224,52 +177,35 @@ const [registerTable1, { getSelectRows: getSelectRowsFee, setProps: setPropsFee,
width: 60,
},
showTableSetting: true,
id: '2',
canResize: true,
immediate: false,
})
const [registerTableFree, { setTableData:setTableDataFree, setSelectedRowKeys:setSelectedRowKeysFree, getSelectRows:getSelectRowsFree }] = useTable({
columns: getColums(),
useSearchForm: false,
showIndexColumn: false,
pagination: true,
rowSelection: {},
striped: true,
bordered: true,
indexColumnProps: {
width: 60,
},
canResize: true,
showTableSetting: true,
id: '5',
immediate: false,
})
const [registerTableFree1, { setTableData: setTableDataFree1 }] = useTable({
columns: getColumsDetail(),
useSearchForm: false,
showIndexColumn: false,
pagination: false,
striped: true,
rowKey: 'recordId',
bordered: true,
indexColumnProps: {
width: 60,
},
showTableSetting: true,
id: '6',
id: getTableDetailId(),
canResize: true,
immediate: false,
})
function getColums() {
if (route.query.type == 'invoice') {
return freeDetailColum
return invoiceColum
}
if (route.query.type == 'free') {
return freeColum
}
}
function getTableId() {
if (route.query.type == 'invoice') {
return 1
}
if (route.query.type == 'free') {
return 5
}
}
function getTableDetailId() {
if (route.query.type == 'invoice') {
return 2
}
if (route.query.type == 'free') {
return 6
}
}
function getColumsDetail() {
if (route.query.type == 'invoice') {
return invoiceDetailColum
@ -278,6 +214,36 @@ function getColumsDetail() {
return freeDetailColum
}
}
// --
function updateListFreeLeft(arr, currency) {
const data = {
settlement: {
...getFieldsValue(),
...getFieldsValueMark(),
},
documents: arr
}
data.settlement.billType = 1
data.settlement.mode = 3
data.settlement.currency = currency
loading.value = true
PaymentFreeSettlementSave(data).then(res => {
if (!route.query.id) {
const { fullPath } = route //
tabStore.closeTabByKey(fullPath, router)
let type = route.query.type
setTimeout(() => {
go(`/feeSettlementDetail?id=${res.data.id}&type=${type}`)
}, 50)
} else {
getDetail()
}
loading.value = false
}).catch(() => {
loading.value = false
})
}
function ClickLast(type) {
const data = {
@ -297,7 +263,6 @@ function ClickLast(type) {
indexQuery = index
}
})
console.log(indexQuery, list)
if (type == 'next') {
if (indexQuery == 0) {
createMessage.warning('已经是第一条了')
@ -342,15 +307,18 @@ const deleteRow = async () => {
})
}
function handleClick(record) {
setSelectedRowKeys([record.id])
const data = {
id: record.id,
}
GeneralInvoiceGet(data).then(res => {
if (res.succeeded) {
setTableData1(res.data.details)
if (route.query.type == 'invoice') {
setSelectedRowKeys([record.id])
const data = {
id: record.id,
}
})
GeneralInvoiceGet(data).then(res => {
if (res.succeeded) {
setTableData1(res.data.details)
}
})
}
}
const invoiceTableRef = ref(null) as any
onMounted(() => {
@ -395,7 +363,7 @@ function updateList(arr, currency) {
loading.value = false
})
}
//
// --
function updateListFree(arr, currency) {
const data = {
settlement: {
@ -436,22 +404,43 @@ function handleSave() {
data.settlement.billType = 1
data.settlement.mode = 4
loading.value = true
InvoiceSettlementSave(data).then(res => {
loading.value = false
createMessage.success('保存成功')
if (!route.query.id) {
const { fullPath } = route //
tabStore.closeTabByKey(fullPath, router)
let type = route.query.type
setTimeout(() => {
go(`/feeSettlementDetail?id=${res.data.id}&type=${type}`)
}, 50)
} else {
getDetail()
}
}).catch(() => {
loading.value = false
})
if (route.query.type == 'invoice') {
InvoiceSettlementSave(data).then(res => {
loading.value = false
createMessage.success('保存成功')
if (!route.query.id) {
const { fullPath } = route //
tabStore.closeTabByKey(fullPath, router)
let type = route.query.type
setTimeout(() => {
go(`/feeSettlementDetail?id=${res.data.id}&type=${type}`)
}, 50)
} else {
getDetail()
}
}).catch(() => {
loading.value = false
})
}
if (route.query.type == 'free') {
PaymentFreeSettlementSave(data).then(res => {
loading.value = false
createMessage.success('保存成功')
if (!route.query.id) {
const { fullPath } = route //
tabStore.closeTabByKey(fullPath, router)
let type = route.query.type
setTimeout(() => {
go(`/feeSettlementDetail?id=${res.data.id}&type=${type}`)
}, 50)
} else {
getDetail()
}
}).catch(() => {
loading.value = false
})
}
}
const form = ref({ settlementNO: '' }) as any
function getDetail() {
@ -459,11 +448,12 @@ function getDetail() {
if (route.query.type == 'free') {
PaymentFreeSettlementGet({ id: route.query.id }).then(res => {
if (res.succeeded) {
res.data.mode = 'free'
form.value = JSON.parse(JSON.stringify(res.data))
res.data.currencyAmount = res.data.currency + '/' + res.data.amount
setFieldsValueMark(res.data)
setFieldsValue(res.data)
setTableDataFree(res.data.details)
setTableData(res.data.settlementDetails)
}
loading.value = false
})
@ -471,6 +461,7 @@ function getDetail() {
if (route.query.type == 'invoice') {
InvoiceSettlementGet({ id: route.query.id }).then(res => {
if (res.succeeded) {
res.data.mode = 'invoice'
form.value = JSON.parse(JSON.stringify(res.data))
delete form.value.details
res.data.currencyAmount = res.data.currency + '/' + res.data.amount

@ -140,7 +140,7 @@ import ExchangeRate from './exchangeRate.vue'
import { useMessage } from '/@/hooks/web/useMessage'
import { Divider } from 'ant-design-vue'
import { formatParams } from '/@/hooks/web/common'
const emits = defineEmits(['updateList', 'refresh', 'updateListFree'])
const emits = defineEmits(['updateList', 'refresh', 'updateListFree','updateListFreeLeft'])
import { useRoute, useRouter } from 'vue-router'
import { get } from 'lodash'
const route = useRoute()
@ -153,6 +153,10 @@ const [registerTable, { getForm, getSelectRows, setSelectedRowKeys }] = useTable
let res = {} as any
if (route.query.type == 'free') {
res = await PaymentFreeSettlementGetBizList(p)
res.data.forEach((item, index) => {
item.freeIndex = String(index)
})
console.log(res.data)
}
if (route.query.type == 'invoice') {
res = await InvoiceSettlementGetInvoiceList(p)
@ -236,7 +240,7 @@ function getId() {
return 'id'
}
if (route.query.type == 'free') {
return 'businessId'
return 'freeIndex'
}
}
function getColumsDetail() {
@ -278,7 +282,8 @@ const onRowClick = (record, index) => {
})
}
if (route.query.type == 'free') {
setSelectedRowKeys([record.businessId])
setSelectedRowKeys([String(index)])
console.log(getSelectRows())
const data = [{
id: record.businessId,
businessType: record.businessType,
@ -374,12 +379,58 @@ function addInfos() {
})
}
if (route.query.type == 'free') {
const data = {
details: getSelectRows() ? getSelectRows() : [],
settlement: {}
}
const data = [] as any
arr.forEach(item => {
data.push({
id: item.businessId,
businessType: item.businessType,
customerName: item.customerName,
customerId: item.customerId
})
})
currenciesData.value = []
exchangarr.value = []
PaymentFreeSettlementGetExchangesAsync(data).then(res => {
const cuArr = [] as any
currenciesData.value = res.data
res.data.forEach(item => {
item.exchangeRates.forEach(ite => {
if (ite.currency != 'RMB') {
cuArr.push({
currency: ite.currency,
id: item.id
})
}
if (ite.currency == 'RMB') {
ite.exchangeRate = 1
}
})
})
if (cuArr.length > 0) {
const filteredItems = cuArr.filter((item, index, self) =>
index === self.findIndex((t) => t.currency === item.currency)
);
const promises = filteredItems.map(item => {
return new Promise((resolve) => {
const data = {
currencyFrom: 'RMB',
currencyTo: item.currency,
}
GetExchangeRate(data).then(res => {
exchangarr.value.push(res.data)
resolve(true);
})
});
});
return Promise.all(promises).then(() => {
addFreetype.value = 'left'
exchangeFlag.value = true
});
}
if (cuArr.length == 0) {
openFlag.value = false
emits('updateListFreeLeft', res.data, currency.value)
}
})
}
@ -435,6 +486,7 @@ function handleSureExhange() {
currenciesData.value.forEach(item => {
item.exchangeRates.forEach(itemC => {
exchangarr.value.forEach(ite => {
if (itemC.currency == ite.currencyTo) {
itemC.exchangeRate = ite.reverseRate
}
@ -449,21 +501,41 @@ function handleSureExhange() {
emits('updateList', currenciesData.value, currency.value)
}
if (route.query.type == 'free') {
const list = JSON.parse(JSON.stringify(getSelectRowsDetail()))
list.forEach(item => {
exchangarr.value.forEach(ite => {
if (item.currency == ite.currencyTo) {
item.exchangeRate = ite.reverseRate
}
if (addFreetype.value == 'right') {
const list = JSON.parse(JSON.stringify(getSelectRowsDetail()))
list.forEach(item => {
exchangarr.value.forEach(ite => {
if (item.currency == ite.currencyTo) {
item.exchangeRate = ite.reverseRate
}
})
})
})
list.forEach(item => {
item.originalCurrency = item.currency
item.currency = currency.value
item.originalAmount = item.amount
item.amount = Number((Number(item.amount) * Number(item.exchangeRate)).toFixed(2))
})
emits('updateListFree', list, currency.value)
list.forEach(item => {
item.originalCurrency = item.currency
item.currency = currency.value
item.originalAmount = item.amount
item.amount = Number((Number(item.amount) * Number(item.exchangeRate)).toFixed(2))
})
emits('updateListFree', list, currency.value)
}
if (addFreetype.value == 'left') {
currenciesData.value.forEach(item => {
item.exchangeRates.forEach(itemC => {
exchangarr.value.forEach(ite => {
if (itemC.currency == ite.currencyTo) {
itemC.exchangeRate = ite.reverseRate
}
if (itemC.currency == 'RMB') {
itemC.exchangeRate = 1
}
})
})
})
openFlag.value = false
exchangeFlag.value = false
emits('updateListFreeLeft', currenciesData.value, currency.value)
}
}
}
const srmb = ref(0)

@ -479,6 +479,21 @@ export const applyColums: BasicColumn[] = [
dataIndex: 'invoiceAmount',
width: 100,
},
{
title: 'RMB开出',
dataIndex: 'amountRMB',
width: 100,
},
{
title: 'USD开出',
dataIndex: 'amountUSD',
width: 100,
},
{
title: '其他开出',
dataIndex: 'amountOther',
width: 100,
},
{
title: '原币金额',
dataIndex: 'originalAmount',

@ -616,6 +616,9 @@ function addDetailed() {
const arr = item.currency.split(' ')
arr.forEach(ite => {
applications.value.push({
amountOther:item.amountOther,
amountRMB:item.amountRMB,
amountUSD:item.amountUSD,
applicationId: item.id,
currency: ite,
exchangeRate: 0

@ -2,7 +2,7 @@
<div class="operation-area">
<div>
<template v-if="status === 'WAIT_BC'">
<a-button @click="fileFlag = true" type="link"
<a-button @click="openfile" type="link"
><i class="iconfont icon-52" style="margin-left: 30px"></i>上传BC并放舱</a-button
>
</template>
@ -600,6 +600,7 @@
import { BookingTruckGetTruckListByBooking } from '/@/views/operation/seaexport/api/SendCar.js'
import { ref, reactive, h, watch, nextTick } from 'vue'
import { Modal } from 'ant-design-vue'
import { GetCarrierSelectList } from '/@/api/common'
import { useModal } from '/@/components/Modal'
import { useAppStore } from '/@/store/modules/app'
const appStore = useAppStore()
@ -774,6 +775,16 @@
function cancelRefresh() {
return false
}
function openfile(){
fileFlag.value = true
setTimeout(() => {
setFieldsValueL({
carrierId:props.details.carrierId,
carrierCode:props.details.carrier,
carrier:props.details.carrier
})
}, 100)
}
function copyBooking() {
emit('copy')
}
@ -1057,7 +1068,8 @@
const [
registerForm,
{
getFieldsValue: getFieldsValueL
getFieldsValue: getFieldsValueL,
setFieldsValue:setFieldsValueL
},
] = useForm({
labelWidth: 100,

@ -144,6 +144,7 @@
<!-- 下货纸比对 -->
<template v-if="column.dataIndex == 'lstShipOrderCompareRlt'">
<div class="goods-status">
<RedoOutlined style="margin-left: 10px" @click="excuteShippingOrderCompareBatch(record)"/>
<a-popover>
<template #content>
<p>
@ -182,7 +183,6 @@
</div>
</div>
</a-popover>
<RedoOutlined style="margin-left: 10px" @click="excuteShippingOrderCompareBatch(record)"/>
</div>
</template>
<template v-if="column.key === 'action'">
@ -234,7 +234,7 @@
<div class="TaskShippingOrderCompareMain">
<div class="TaskShippingOrderCompareMainHeader">
<div>
<p>提单号本地数据</p>
<p>提单号系统数据</p>
<p>--------------------------</p>
<p>{{ TaskShippingOrderCompareData.mBlNo }}</p>
</div>
@ -258,7 +258,7 @@
<div class="TaskShippingOrderCompareMain">
<div class="TaskShippingOrderCompareMainHeader Box">
<div>
<p>箱信息本地数据</p>
<p>箱信息系统数据</p>
</div>
<div></div>
<div>
@ -509,7 +509,7 @@ const TaskShippingOrderCompareData = ref({
showDetailList: '',
total: '',
isExistsDiff: false,
})
}) as any
const TaskShippingOrderCompareVisible = ref(false)
const formatSheetVisible = ref(false)

@ -414,7 +414,6 @@ export const fileForm: FormSchema[] = [
immediate: false,
onChange: (e, obj) => {
if (e && obj) {
console.log(obj)
formModel.carrierId = obj.id
formModel.carrierCode = obj.code
}

Loading…
Cancel
Save