9.24禅道bug修复

szh-new
lijingjia 2 months ago
parent bbe79d13fd
commit 270ad12af5

@ -31,7 +31,7 @@
<template #footer> <template #footer>
<!-- 费用申请显示币别合计 --> <!-- 费用申请显示币别合计 -->
<div v-if="page == 'apply'" class="count-calc"> <div v-if="page == 'apply'" class="count-calc">
选中金额<span v-for="(value, key) in currencyList" class="ml10" :key="value">{{ key }}: {{ value }}</span> 选中金额<span v-for="(value, key) in currencyList" class="ml10" :key="value"><span class="title">{{ key }}:</span> <span class="count">{{ value }}</span></span>
</div> </div>
</template> </template>
</a-table> </a-table>
@ -93,10 +93,11 @@
row.amount = Number(e * row.originalRate).toFixed(6) row.amount = Number(e * row.originalRate).toFixed(6)
} }
// (Auth) // (Auth)
const getFees = async (id, businessType) => { const getFees = async (id, businessType, customerId) => {
const postData = [{ const postData = [{
id, id,
businessType businessType,
customerId
}] }]
loading.value = true loading.value = true
await GetFees(postData).then(res => { await GetFees(postData).then(res => {
@ -167,7 +168,7 @@
}) })
} }
const page = ref() const page = ref()
const init = async (ids, source, businessType) => { const init = async (ids, source, businessType, customerId) => {
page.value = source page.value = source
if (ids.length) { if (ids.length) {
if (ids[0] == undefined) { if (ids[0] == undefined) {
@ -187,7 +188,7 @@
} }
if (source == 'apply') { if (source == 'apply') {
nowFeeColumns.value = feeApplyColumns nowFeeColumns.value = feeApplyColumns
await getFees(ids[0], businessType) await getFees(ids[0].slice(0, -1), businessType, customerId)
return feeData.value return feeData.value
} }
} }
@ -259,13 +260,16 @@
.title { .title {
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: 600;
margin-left: 20px;
} }
.count { .count {
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: 600;
color: #257AFA; color: #257AFA;
} }
.ml10 {
background: #F5F9FC;
padding: 0 5px;
}
} }
} }
</style> </style>

@ -30,7 +30,7 @@
<a-col :span="schema?.colProps?.span || 24" v-if="schema.show !== false && schema.isEdit == 1 && schema.component != 'Divider' && schema.component != 'InputTextArea'"> <a-col :span="schema?.colProps?.span || 24" v-if="schema.show !== false && schema.isEdit == 1 && schema.component != 'Divider' && schema.component != 'InputTextArea'">
<div class="ds-form-onlyread"> <div class="ds-form-onlyread">
<span class="label">{{ schema.label }}</span> {{ formModel[schema.field] || '-' }} <span class="label">{{ schema.label }}</span> {{ formModel[schema.field] || '-' }}
<span class="iconfont icon-bianji1" @click="editFormItem(schema)"></span> <span v-if="!schema.dynamicDisabled" class="iconfont icon-bianji1" @click="editFormItem(schema)"></span>
</div> </div>
</a-col> </a-col>
</template> </template>

@ -140,6 +140,7 @@ export default {
// 币别 // 币别
GetFeeCurrencySelectList: () => { GetFeeCurrencySelectList: () => {
return GetFeeCurrencySelectList().then((res) => { return GetFeeCurrencySelectList().then((res) => {
console.log(res.data)
return res.data return res.data
}) })
}, },

@ -19,7 +19,7 @@
<template #toolbar> <template #toolbar>
<MainActionBar <MainActionBar
ref="mainActionBar" ref="mainActionBar"
:ids="busId" :ids="state.BRowKeys"
:selectedBusiness="selectedBusiness" :selectedBusiness="selectedBusiness"
:data="data" :data="data"
:reload="reload" :reload="reload"

@ -9,7 +9,7 @@ import { useOptionsStore } from '/@/store/modules/options'
const optionsStore = useOptionsStore() const optionsStore = useOptionsStore()
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
const route = useRoute() const route = useRoute()
import { GetClientListByCode, getOrgList, GetClientBank } from '/@/api/common' import { GetClientListByCode, getOrgList, GetClientBank, GetFeeCurrencySelectList } from '/@/api/common'
// 引入字典数据 // 引入字典数据
import { getDictOption } from '/@/utils/dictUtil' import { getDictOption } from '/@/utils/dictUtil'
import { placeholderSign } from 'element-plus/es/components/table-v2/src/private' import { placeholderSign } from 'element-plus/es/components/table-v2/src/private'
@ -204,15 +204,17 @@ export const formSchema: FormSchema[] = [
label: 'RMB金额', label: 'RMB金额',
component: 'InputNumber', component: 'InputNumber',
colProps: { span: 4 }, colProps: { span: 4 },
dynamicDisabled: true,
componentProps: { componentProps: {
min: 0, min: 0,
precision: 6 precision: 2
} }
}, },
{ {
field: 'amountUSD', field: 'amountUSD',
label: 'USD金额', label: 'USD金额',
component: 'InputNumber', component: 'InputNumber',
dynamicDisabled: true,
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: { componentProps: {
min: 0, min: 0,
@ -223,6 +225,7 @@ export const formSchema: FormSchema[] = [
field: 'amountOther', field: 'amountOther',
label: '其他外币金额', label: '其他外币金额',
component: 'InputNumber', component: 'InputNumber',
dynamicDisabled: true,
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: { componentProps: {
min: 0, min: 0,
@ -358,7 +361,7 @@ export const formSchema: FormSchema[] = [
return { return {
api: getOrgList, api: getOrgList,
labelField: 'label', labelField: 'label',
valueField: 'value', valueField: 'id',
resultField: 'data', resultField: 'data',
immediate: false, immediate: false,
onChange: (e, obj) => { onChange: (e, obj) => {
@ -370,7 +373,7 @@ export const formSchema: FormSchema[] = [
formModel.saleOrgName = null formModel.saleOrgName = null
formModel.saleOrgId = null formModel.saleOrgId = null
} }
}, }
} }
}, },
}, },
@ -449,6 +452,26 @@ export const formSchema: FormSchema[] = [
// } // }
// } // }
// }, // },
{
field: 'createByName',
label: '申请人',
component: 'Input',
dynamicDisabled: true,
colProps: { span: 4 }
},
{
field: 'createTime',
label: '申请日期',
component: 'DatePicker',
dynamicDisabled: true,
colProps: { span: 4 },
componentProps: {
showTime: true,
allowClear: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss'
}
},
{ {
field: 'paymentDate', field: 'paymentDate',
label: '申请支付日期', label: '申请支付日期',
@ -462,6 +485,29 @@ export const formSchema: FormSchema[] = [
valueFormat: 'YYYY-MM-DD HH:mm:ss' valueFormat: 'YYYY-MM-DD HH:mm:ss'
} }
}, },
{
field: 'invoiceDate',
label: '发票日期',
component: 'DatePicker',
dynamicDisabled: false,
colProps: { span: 4 },
componentProps: {
showTime: true,
allowClear: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss'
}
},
{
field: 'invoiceAmount',
label: '发票金额',
component: 'InputNumber',
colProps: { span: 4 },
componentProps: {
min: 0,
precision: 2
}
},
{ {
field: 'line2', field: 'line2',
component: 'Divider', component: 'Divider',
@ -589,3 +635,26 @@ export const searchFormSchema: FormSchema[] = [
} }
} }
] ]
export const currencyFormSchema: FormSchema[] = [
{
field: 'currency',
label: '币别选择',
defaultValue: null,
component: 'ApiSelect',
colProps: { span: 5 },
placeholder: '原币申请',
componentProps: () => {
return {
allowClear: true,
showSearch: true,
option: optionsStore.getOptionsByCode('GetFeeCurrencySelectList'),
labelField: 'codeName',
valueField: 'codeName',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
}
}
]

@ -4,24 +4,27 @@
* @Description: * @Description:
--> -->
<template> <template>
<div class="ds-bus-table"> <div id="ds-fee-info-table" class="ds-bus-table">
<a-spin :spinning="loading"> <a-spin :spinning="loading">
<BasicTable <BasicTable
class="ds-table-detail" class="ds-table-detail"
:canRowSelect="true" :canRowSelect="true"
:scroll="{ x: '100%', y: 400 }" :scroll="{ x: '100%', y: 400 }"
:row-selection="{ selectedRowKeys: state.historyRowKeys, onChange: historyChange }" :row-selection="{ selectedRowKeys: state.historyRowKeys, onChange: historyChange }"
rowKey="id" rowKey="idIndex"
@register="registerTable" @register="registerTable"
@row-click="onRowClick" @row-click="onRowClick"
> >
<template #toolbar> <template #toolbar>
<div class="flex"> <div style="width: 100%;">
<h4>结算明细</h4> <BasicForm class="currency-form" @register="registerForm" />
<a-button class="ml15" type="link" @click="addInfos"> <div class="flex">
<span class="iconfont icon-zengjiatianjiajiajian" :style="{ fontSize: '12px' }"></span> <h4>结算明细</h4>
增加结算明细 <a-button class="ml15" type="link" @click="addInfos">
</a-button> <span class="iconfont icon-zengjiatianjiajiajian" :style="{ fontSize: '12px' }"></span>
增加结算明细
</a-button>
</div>
</div> </div>
</template> </template>
<template #right> <template #right>
@ -29,7 +32,7 @@
type="vertical" type="vertical"
/> />
<div class="info"> <div class="info">
<div style="height: 48px;"> <div style="height: 48px; margin-top: 47px;">
<a-button type="link" @click="save" style="margin: 8px -10px;"> <a-button type="link" @click="save" style="margin: 8px -10px;">
<span class="iconfont icon-zengjiatianjiajiajian" :style="{ fontSize: '12px' }"></span> <span class="iconfont icon-zengjiatianjiajiajian" :style="{ fontSize: '12px' }"></span>
增加申请费用明细 增加申请费用明细
@ -45,27 +48,27 @@
<template #footer> <template #footer>
<div class="main-statistic"> <div class="main-statistic">
<span>选中合计</span> <span>选中合计</span>
<span> <span class="box">
<span class="title">未收RMB:</span> <span class="title">未收RMB:</span>
<span class="count">{{ rrmb }}</span> <span class="count">{{ rrmb }}</span>
</span> </span>
<span> <span class="box">
<span class="title">未付RMB:</span> <span class="title">未付RMB:</span>
<span class="count">{{ prmb }}</span> <span class="count">{{ prmb }}</span>
</span> </span>
<span> <span class="box">
<span class="title">未收USD:</span> <span class="title">未收USD:</span>
<span class="count">{{ rusd }}</span> <span class="count">{{ rusd }}</span>
</span> </span>
<span> <span class="box">
<span class="title">未付USD:</span> <span class="title">未付USD:</span>
<span class="count">{{ pusd }}</span> <span class="count">{{ pusd }}</span>
</span> </span>
<span> <span class="box">
<span class="title">未收其他:</span> <span class="title">未收其他:</span>
<span class="count">{{ rother }}</span> <span class="count">{{ rother }}</span>
</span> </span>
<span> <span class="box">
<span class="title">未付其他:</span> <span class="title">未付其他:</span>
<span class="count">{{ pother }}</span> <span class="count">{{ pother }}</span>
</span> </span>
@ -92,8 +95,9 @@
import { onMounted, ref, reactive, watch, defineExpose, defineProps, defineEmits, h } from 'vue' import { onMounted, ref, reactive, watch, defineExpose, defineProps, defineEmits, h } from 'vue'
import { BasicTable, useTable } from '/@/components/Table' import { BasicTable, useTable } from '/@/components/Table'
import { GetBizList, BizSave } from '../../api' import { GetBizList, BizSave } from '../../api'
import { businessColumns, searchFormSchema } from '../columns' import { businessColumns, searchFormSchema, currencyFormSchema } from '../columns'
import feeTable from '/@/components/CostEntry/components/feeTable.vue' import feeTable from '/@/components/CostEntry/components/feeTable.vue'
import { BasicForm, useForm } from '/@/components/Form'
import ExchangeRate from './exchangeRate.vue' import ExchangeRate from './exchangeRate.vue'
// //
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
@ -131,7 +135,7 @@
res.data.forEach((item, index) => { res.data.forEach((item, index) => {
item['idIndex'] = item.id + index item['idIndex'] = item.id + index
}) })
if (res?.data?.length) state.historyRowKeys = [res.data[0].id] if (res?.data?.length) state.historyRowKeys = [res.data[0].id + 0]
setSelectedRows([res.data[0]]) setSelectedRows([res.data[0]])
return new Promise((resolve) => { return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count }) resolve({ data: [...res.data], total: res.count })
@ -157,6 +161,11 @@
canResize: false, canResize: false,
immediate: false immediate: false
}) })
const [registerForm, { validate, getFieldsValue, setFieldsValue }] = useForm({
labelWidth: 150,
schemas: currencyFormSchema,
showActionButtonGroup: false
})
// //
const state = reactive({ const state = reactive({
historyRowKeys: [] historyRowKeys: []
@ -188,7 +197,7 @@
} }
// //
const onRowClick = (record) => { const onRowClick = (record) => {
state.historyRowKeys = [record?.id] state.historyRowKeys = [record?.idIndex]
setSelectedRows([record]) setSelectedRows([record])
} }
const feeData = () => { const feeData = () => {
@ -340,10 +349,11 @@
diffIds.forEach(item => { diffIds.forEach(item => {
// //
let btype = rows.filter(row => { let btype = rows.filter(row => {
return item == row.id return item == row.idIndex
}) })
let customerId = btype[0]?.customerId
btype = btype[0]?.businessType btype = btype[0]?.businessType
feeTabel.value.init([item], 'apply', btype).then(res => { feeTabel.value.init([item], 'apply', btype, customerId).then(res => {
allFeeData[item] = res allFeeData[item] = res
}) })
}) })
@ -355,12 +365,14 @@
if (v.length) { if (v.length) {
// //
let btype = rows[0].businessType let btype = rows[0].businessType
feeTabel.value.init([v[v.length - 1]], 'apply', btype) let customerId = rows[0].customerId
feeTabel.value.init([v[v.length - 1]], 'apply', btype, customerId)
} }
} else { } else {
// //
let btype = rows[0].businessType let btype = rows[0].businessType
feeTabel.value.init(v, 'apply', btype) let customerId = rows[0].customerId
feeTabel.value.init(v, 'apply', btype, customerId)
} }
rrmb.value = 0 rrmb.value = 0
prmb.value = 0 prmb.value = 0
@ -407,13 +419,17 @@
.title { .title {
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: 600;
margin-left: 20px;
} }
.count { .count {
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: 600;
color: #257AFA; color: #257AFA;
} }
.box {
background: #F5F9FC;
margin-left: 10px;
padding: 0 5px;
}
} }
.ant-table-container { .ant-table-container {
height: 400px; height: 400px;
@ -422,7 +438,6 @@
height: 364px!important; height: 364px!important;
} }
.flex { .flex {
height: 48px;
align-items: center; align-items: center;
h4 { h4 {
margin-bottom: 0; margin-bottom: 0;
@ -442,5 +457,19 @@
margin-bottom: 0; margin-bottom: 0;
padding-bottom: 0; padding-bottom: 0;
} }
#ds-fee-info-table {
.vben-basic-table-header__toolbar {
>div {
width: 100%!important;
}
}
}
.currency-form {
background: #ffffff!important;
padding-left: 0!important;
.ant-form-item-no-colon {
font-weight: 600;
}
}
} }
</style> </style>

@ -95,10 +95,11 @@
const visible = ref(false) const visible = ref(false)
import { formSchema } from './columns' import { formSchema } from './columns'
import { Save, Get } from '../api' import { Save, Get } from '../api'
console.log(route)
const [registerForm, { validate, getFieldsValue, setFieldsValue }] = useForm({ const [registerForm, { validate, getFieldsValue, setFieldsValue }] = useForm({
labelWidth: 150, labelWidth: 150,
schemas: formSchema, schemas: formSchema,
readonly: true, readonly: route.path != '/paid-apply/create',
showActionButtonGroup: false showActionButtonGroup: false
}) })
// loading // loading
@ -108,8 +109,8 @@
const busTable = ref(null) const busTable = ref(null)
const feeData = ref([]) const feeData = ref([])
const handleOk = () => { const handleOk = () => {
feeData.value = busTable.value.feeData() // feeData.value = busTable.value.feeData()
visible.value = false // visible.value = false
} }
// const [registerTable, { reload, getForm, getPaginationRef, getSelectRows }] = useTable({ // const [registerTable, { reload, getForm, getPaginationRef, getSelectRows }] = useTable({
// title: '', // title: '',
@ -213,6 +214,7 @@
const init = () => { const init = () => {
const id = route.query.id || getFieldsValue().id const id = route.query.id || getFieldsValue().id
if (id) { if (id) {
//
dloading.value = true dloading.value = true
Get({ id }).then(res => { Get({ id }).then(res => {
dloading.value = false dloading.value = false
@ -224,6 +226,9 @@
bid.value = res.data.id bid.value = res.data.id
feeData.value = res.data.details feeData.value = res.data.details
}) })
} else {
//
visible.value = true
} }
} }
onMounted(() => { onMounted(() => {
@ -263,13 +268,17 @@
.title { .title {
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: 600;
margin-left: 20px;
} }
.count { .count {
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: 600;
color: #257AFA; color: #257AFA;
} }
.box {
background: #F5F9FC;
margin-left: 10px;
padding: 0 5px;
}
} }
.fee-modal { .fee-modal {
.ant-modal-body { .ant-modal-body {

@ -42,10 +42,37 @@
</template> </template>
</template> </template>
</BasicTable> </BasicTable>
<div class="calc">
<span style="font-size: 12px;">合计</span>
<span class="box">
<span class="title">RMB:</span>
<span class="count">{{ statisData.rmb }}</span>
</span>
<span class="box">
<span class="title">USD:</span>
<span class="count">{{ statisData.usd }}</span>
</span>
<span class="box">
<span class="title">其他外币:</span>
<span class="count">{{ statisData.other }}</span>
</span>
<span class="box">
<span class="title">结算RMB:</span>
<span class="count">{{ statisData.srmb }}</span>
</span>
<span class="box">
<span class="title">结算USD:</span>
<span class="count">{{ statisData.susd }}</span>
</span>
<span class="box">
<span class="title">结算其他外币:</span>
<span class="count">{{ statisData.other }}</span>
</span>
</div>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { onMounted, ref, watch } from 'vue' import { onMounted, ref, reactive } from 'vue'
import { BasicTable, useTable, TableAction } from '/@/components/Table' import { BasicTable, useTable, TableAction } from '/@/components/Table'
import TableActionBar from './components/tableActionBar.vue' import TableActionBar from './components/tableActionBar.vue'
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
@ -57,12 +84,21 @@
import { exportExcel } from '/@/hooks/web/common' import { exportExcel } from '/@/hooks/web/common'
const go = useGo() const go = useGo()
const params = ref([]) const params = ref([])
const statisData = reactive({
rmb: 0,
usd: 0,
other: 0,
srmb: 0,
susd: 0,
sother: 0
})
const [registerTable, { reload, getSelectRows, getColumns }] = useTable({ const [registerTable, { reload, getSelectRows, getColumns }] = useTable({
title: '', title: '',
api: async (p) => { api: async (p) => {
params.value = p params.value = p
const res: API.DataResult = await GetList(p) const res: API.DataResult = await GetList(p)
res.data.forEach(item => { const data = res.data.list
data.forEach(item => {
if (item.amountRMB) item.amountRMB = item.amountRMB.toLocaleString() if (item.amountRMB) item.amountRMB = item.amountRMB.toLocaleString()
if (item.amountUSD) item.amountUSD = item.amountUSD.toLocaleString() if (item.amountUSD) item.amountUSD = item.amountUSD.toLocaleString()
if (item.amountOther) item.amountOther = item.amountOther.toLocaleString() if (item.amountOther) item.amountOther = item.amountOther.toLocaleString()
@ -70,8 +106,14 @@
if (item.settlementUSD) item.settlementUSD = item.settlementUSD.toLocaleString() if (item.settlementUSD) item.settlementUSD = item.settlementUSD.toLocaleString()
if (item.settlementOther) item.settlementOther = item.settlementOther.toLocaleString() if (item.settlementOther) item.settlementOther = item.settlementOther.toLocaleString()
}) })
statisData.rmb = res.data.totalCNY.toLocaleString()
statisData.usd = res.data.totalUSD.toLocaleString()
statisData.other = res.data.totalOther.toLocaleString()
statisData.srmb = res.data.settlementCNY.toLocaleString()
statisData.susd = res.data.settlementUSD.toLocaleString()
statisData.sother = res.data.settlementOther.toLocaleString()
return new Promise((resolve) => { return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count }) resolve({ data: [...data], total: res.count })
}) })
}, },
beforeFetch: (p) => { beforeFetch: (p) => {
@ -146,5 +188,25 @@
color: #257AFA; color: #257AFA;
margin-right: 5px; margin-right: 5px;
} }
.calc {
position: fixed;
display: flex;
bottom: 10px;
margin-left: 20px;
.title {
font-size: 14px;
font-weight: 700;
}
.count {
font-size: 14px;
font-weight: 700;
color: #257AFA;
}
.box {
background: #F5F9FC;
margin-left: 10px;
padding: 0 5px;
}
}
} }
</style> </style>
Loading…
Cancel
Save