Commit 0df7ec6b authored by 高滢's avatar 高滢

feat(月度): 累计支付数精度

parent d5a554ea
...@@ -233,7 +233,7 @@ ...@@ -233,7 +233,7 @@
let formSchema = tabsFormSchema[i].Form[1]; let formSchema = tabsFormSchema[i].Form[1];
const { updateSchema } = formSchema; const { updateSchema } = formSchema;
await nextTick(() => { await nextTick(() => {
if (isSubmit == '0') { if (isSubmit == '0' || tabsFormSchema[i].show == false) {
updateSchema([ updateSchema([
{ field: 'projectName', required: false }, { field: 'projectName', required: false },
{ field: 'fundingSource', required: false }, { field: 'fundingSource', required: false },
......
...@@ -378,7 +378,7 @@ const params = ref({ tenderYear: '', biddingQuarter: '', companyName: '' }); ...@@ -378,7 +378,7 @@ const params = ref({ tenderYear: '', biddingQuarter: '', companyName: '' });
width: 180, width: 180,
}, },
{ {
title: '中标金额(元)', title: '中标金额(元)',
dataIndex: 'winningAmount', dataIndex: 'winningAmount',
width: 180, width: 180,
}, },
......
...@@ -251,7 +251,7 @@ ...@@ -251,7 +251,7 @@
let formSchema = tabsFormSchema[i].Form[1]; let formSchema = tabsFormSchema[i].Form[1];
const { updateSchema } = formSchema; const { updateSchema } = formSchema;
await nextTick(() => { await nextTick(() => {
if (isSubmit == '0') { if (isSubmit == '0' || tabsFormSchema[i].show == false) {
updateSchema([ updateSchema([
{ field: 'projectName', required: false }, { field: 'projectName', required: false },
{ field: 'projectInitiator', required: false }, { field: 'projectInitiator', required: false },
......
...@@ -174,7 +174,7 @@ export const subFormSchema: FormSchema[] = [ ...@@ -174,7 +174,7 @@ export const subFormSchema: FormSchema[] = [
componentProps: ({ formModel }) => ({ componentProps: ({ formModel }) => ({
addonAfter: '万元', addonAfter: '万元',
onChange: (value) => { onChange: (value) => {
formModel.accumulatePayment = (formModel.accumulatePaymentReserve || 0) + value; formModel.accumulatePayment = numberAdd(formModel.accumulatePaymentReserve || 0, value);
}, },
}), }),
colProps: { span: 5, offset: 1 }, colProps: { span: 5, offset: 1 },
...@@ -343,3 +343,19 @@ export const subFormSchema: FormSchema[] = [ ...@@ -343,3 +343,19 @@ export const subFormSchema: FormSchema[] = [
colProps: { span: 7, offset: 1 }, colProps: { span: 7, offset: 1 },
}, },
]; ];
function numberAdd(arg1, arg2) {
let r1, r2, m, n;
try {
r1 = arg1.toString().split('.')[1].length;
} catch (e) {
r1 = 0;
}
try {
r2 = arg2.toString().split('.')[1].length;
} catch (e) {
r2 = 0;
}
m = Math.pow(10, Math.max(r1, r2));
n = r1 >= r2 ? r1 : r2;
return ((arg1 * m + arg2 * m) / m).toFixed(n);
}
import { BasicColumn, FormSchema } from '@/components/Table'; import { BasicColumn, FormSchema } from '@/components/Table';
import { h } from 'vue';
import { Switch } from 'ant-design-vue';
import { setRoleStatus } from '@/api/demo/system';
import { useMessage } from '@/hooks/web/useMessage';
import { getDepartmentList } from '@/api/project/settlementManage'; import { getDepartmentList } from '@/api/project/settlementManage';
import { useUserStore } from '@/store/modules/user'; import { useUserStore } from '@/store/modules/user';
import { FormActionType } from '@/components/Form';
const deptId = '' + useUserStore().userInfo.deptParentId; const deptId = useUserStore().userInfo.deptParentId;
type CheckedType = boolean | string | number;
//主模块-结算管理列表页 //主模块-结算管理列表页
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
......
...@@ -181,7 +181,7 @@ ...@@ -181,7 +181,7 @@
width: 180, width: 180,
}, },
{ {
title: '中标金额(元)', title: '中标金额(元)',
dataIndex: 'winningAmount', dataIndex: 'winningAmount',
width: 180, width: 180,
}, },
......
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