9.24禅道bug修复

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

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

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

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

@ -9,7 +9,7 @@ import { useOptionsStore } from '/@/store/modules/options'
const optionsStore = useOptionsStore()
import { useRoute } from 'vue-router'
const route = useRoute()
import { GetClientListByCode, getOrgList, GetClientBank } from '/@/api/common'
import { GetClientListByCode, getOrgList, GetClientBank, GetFeeCurrencySelectList } from '/@/api/common'
// 引入字典数据
import { getDictOption } from '/@/utils/dictUtil'
import { placeholderSign } from 'element-plus/es/components/table-v2/src/private'
@ -204,15 +204,17 @@ export const formSchema: FormSchema[] = [
label: 'RMB金额',
component: 'InputNumber',
colProps: { span: 4 },
dynamicDisabled: true,
componentProps: {
min: 0,
precision: 6
precision: 2
}
},
{
field: 'amountUSD',
label: 'USD金额',
component: 'InputNumber',
dynamicDisabled: true,
colProps: { span: 4 },
componentProps: {
min: 0,
@ -223,6 +225,7 @@ export const formSchema: FormSchema[] = [
field: 'amountOther',
label: '其他外币金额',
component: 'InputNumber',
dynamicDisabled: true,
colProps: { span: 4 },
componentProps: {
min: 0,
@ -358,7 +361,7 @@ export const formSchema: FormSchema[] = [
return {
api: getOrgList,
labelField: 'label',
valueField: 'value',
valueField: 'id',
resultField: 'data',
immediate: false,
onChange: (e, obj) => {
@ -370,7 +373,7 @@ export const formSchema: FormSchema[] = [
formModel.saleOrgName = 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',
label: '申请支付日期',
@ -462,6 +485,29 @@ export const formSchema: FormSchema[] = [
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',
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,18 +4,20 @@
* @Description:
-->
<template>
<div class="ds-bus-table">
<div id="ds-fee-info-table" class="ds-bus-table">
<a-spin :spinning="loading">
<BasicTable
class="ds-table-detail"
:canRowSelect="true"
:scroll="{ x: '100%', y: 400 }"
:row-selection="{ selectedRowKeys: state.historyRowKeys, onChange: historyChange }"
rowKey="id"
rowKey="idIndex"
@register="registerTable"
@row-click="onRowClick"
>
<template #toolbar>
<div style="width: 100%;">
<BasicForm class="currency-form" @register="registerForm" />
<div class="flex">
<h4>结算明细</h4>
<a-button class="ml15" type="link" @click="addInfos">
@ -23,13 +25,14 @@
增加结算明细
</a-button>
</div>
</div>
</template>
<template #right>
<Divider
type="vertical"
/>
<div class="info">
<div style="height: 48px;">
<div style="height: 48px; margin-top: 47px;">
<a-button type="link" @click="save" style="margin: 8px -10px;">
<span class="iconfont icon-zengjiatianjiajiajian" :style="{ fontSize: '12px' }"></span>
增加申请费用明细
@ -45,27 +48,27 @@
<template #footer>
<div class="main-statistic">
<span>选中合计</span>
<span>
<span class="box">
<span class="title">未收RMB:</span>
<span class="count">{{ rrmb }}</span>
</span>
<span>
<span class="box">
<span class="title">未付RMB:</span>
<span class="count">{{ prmb }}</span>
</span>
<span>
<span class="box">
<span class="title">未收USD:</span>
<span class="count">{{ rusd }}</span>
</span>
<span>
<span class="box">
<span class="title">未付USD:</span>
<span class="count">{{ pusd }}</span>
</span>
<span>
<span class="box">
<span class="title">未收其他:</span>
<span class="count">{{ rother }}</span>
</span>
<span>
<span class="box">
<span class="title">未付其他:</span>
<span class="count">{{ pother }}</span>
</span>
@ -92,8 +95,9 @@
import { onMounted, ref, reactive, watch, defineExpose, defineProps, defineEmits, h } from 'vue'
import { BasicTable, useTable } from '/@/components/Table'
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 { BasicForm, useForm } from '/@/components/Form'
import ExchangeRate from './exchangeRate.vue'
//
import { useMessage } from '/@/hooks/web/useMessage'
@ -131,7 +135,7 @@
res.data.forEach((item, 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]])
return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count })
@ -157,6 +161,11 @@
canResize: false,
immediate: false
})
const [registerForm, { validate, getFieldsValue, setFieldsValue }] = useForm({
labelWidth: 150,
schemas: currencyFormSchema,
showActionButtonGroup: false
})
//
const state = reactive({
historyRowKeys: []
@ -188,7 +197,7 @@
}
//
const onRowClick = (record) => {
state.historyRowKeys = [record?.id]
state.historyRowKeys = [record?.idIndex]
setSelectedRows([record])
}
const feeData = () => {
@ -340,10 +349,11 @@
diffIds.forEach(item => {
//
let btype = rows.filter(row => {
return item == row.id
return item == row.idIndex
})
let customerId = btype[0]?.customerId
btype = btype[0]?.businessType
feeTabel.value.init([item], 'apply', btype).then(res => {
feeTabel.value.init([item], 'apply', btype, customerId).then(res => {
allFeeData[item] = res
})
})
@ -355,12 +365,14 @@
if (v.length) {
//
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 {
//
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
prmb.value = 0
@ -407,13 +419,17 @@
.title {
font-size: 14px;
font-weight: 600;
margin-left: 20px;
}
.count {
font-size: 14px;
font-weight: 600;
color: #257AFA;
}
.box {
background: #F5F9FC;
margin-left: 10px;
padding: 0 5px;
}
}
.ant-table-container {
height: 400px;
@ -422,7 +438,6 @@
height: 364px!important;
}
.flex {
height: 48px;
align-items: center;
h4 {
margin-bottom: 0;
@ -442,5 +457,19 @@
margin-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>

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

@ -42,10 +42,37 @@
</template>
</template>
</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>
</template>
<script lang="ts" setup>
import { onMounted, ref, watch } from 'vue'
import { onMounted, ref, reactive } from 'vue'
import { BasicTable, useTable, TableAction } from '/@/components/Table'
import TableActionBar from './components/tableActionBar.vue'
import { useMessage } from '/@/hooks/web/useMessage'
@ -57,12 +84,21 @@
import { exportExcel } from '/@/hooks/web/common'
const go = useGo()
const params = ref([])
const statisData = reactive({
rmb: 0,
usd: 0,
other: 0,
srmb: 0,
susd: 0,
sother: 0
})
const [registerTable, { reload, getSelectRows, getColumns }] = useTable({
title: '',
api: async (p) => {
params.value = 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.amountUSD) item.amountUSD = item.amountUSD.toLocaleString()
if (item.amountOther) item.amountOther = item.amountOther.toLocaleString()
@ -70,8 +106,14 @@
if (item.settlementUSD) item.settlementUSD = item.settlementUSD.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) => {
resolve({ data: [...res.data], total: res.count })
resolve({ data: [...data], total: res.count })
})
},
beforeFetch: (p) => {
@ -146,5 +188,25 @@
color: #257AFA;
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>
Loading…
Cancel
Save