Commit cb1bc107 by yuzhenWang

Merge branch 'feature-20260408-拆分出账' into 'test'

添加禁用

See merge request !105
parents a1f3ef61 a06d41d7
// 格式化金额为货币格式
export function formatCurrency(value, currency = '',fixedDigits = 2) {
export function formatCurrency(value, currency = '', fixedDigits = 2) {
if (value === undefined || value === null) return currency + '0.00'
return currency + value.toFixed(fixedDigits).replace(/\d(?=(\d{3})+\.)/g, '$&,')
}
......@@ -198,9 +198,19 @@ export function formatThousandsSimple(value) {
return result
}
export function inputThousands(value) {
if (value === undefined || value === null || value === '') {
return ''
}
const parts = String(value).split('.')
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',')
return parts.join('.')
}
export default {
formatCurrency,
numberFormat,
formatThousands,
formatThousandsSimple
formatThousandsSimple,
inputThousands
}
......@@ -106,14 +106,14 @@
<el-row :gutter="16">
<el-col :xs="24" :sm="12" :md="6" class="text-center mb-4">
<el-statistic
title="原币种金额"
title="原币种金额"
:value="currentRow.hkdAmount"
:formatter="value => formatCurrency(value, '', 4)"
/>
</el-col>
<el-col :xs="24" :sm="12" :md="6" class="text-center mb-4">
<el-statistic
title="剩余原币种金额"
title="剩余原币种金额"
:value="billStatistic.beSplitAmount"
:formatter="value => formatCurrency(value, '', 4)"
/>
......@@ -144,7 +144,12 @@
></el-table-column>
<el-table-column label="发放编号" prop="salarySplitNo" width="150" fixed="left">
<template #default="scope">
<el-input v-model="scope.row.salarySplitNo" placeholder="请输入" clearable />
<el-input
v-model="scope.row.salarySplitNo"
placeholder="请输入"
clearable
:disabled="true"
/>
</template>
</el-table-column>
<el-table-column label="转介人" prop="brokerName" width="150">
......@@ -181,7 +186,7 @@
@clear="clearInput('fromAmount', scope.row)"
@input="val => (scope.row.fromAmount = amountInput.filterInput(val, 4))"
@blur="billInputBlur('fromAmount', scope.row)"
:formatter="value => `${value}`.replace(/\d(?=(\d{3})+\.)/g, '$&,')"
:formatter="value => inputThousands(value)"
:parser="value => value.replace(/\$\s?|(,*)/g, '')"
/>
</template>
......@@ -224,7 +229,7 @@
placeholder="请输入"
clearable
@input="val => (scope.row.toAmount = amountInput.filterInput(val, 4))"
:formatter="value => `${value}`.replace(/\d(?=(\d{3})+\.)/g, '$&,')"
:formatter="value => inputThousands(value)"
:parser="value => value.replace(/\$\s?|(,*)/g, '')"
/>
</template>
......@@ -302,7 +307,7 @@ import {
billBatchSave,
billCalculateToAmount
} from '@/api/financial/commission'
import { formatCurrency, formatThousands } from '@/utils/number'
import { formatCurrency, inputThousands } from '@/utils/number'
import { generateId } from '@/utils/common'
import { ElMessageBox, ElMessage } from 'element-plus'
import SearchForm from '@/components/SearchForm/SearchForm.vue'
......@@ -452,6 +457,10 @@ const changeToAmount = async row => {
}
const handleBillConfirm = async () => {
submitBillLoading.value = true
billTableList.value = billTableList.value.map(item => {
item.brokerBizId = currentRow.value.brokerBizId
return item
})
try {
const params = {
fortuneAccountBizId: currentRow.value.fortuneAccountBizId,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment