千分位

This commit is contained in:
‘huanghaiixia’
2026-02-02 17:52:11 +08:00
parent 58d7079f1d
commit fae05a1342
14 changed files with 250 additions and 86 deletions

View File

@ -10,37 +10,53 @@
<a-form-item label="合同" name="kName" :class="diffResultList.includes('kName') ? 'changeStyle': ''">{{ formState.kName}}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="合同量(吉焦)" name="qtyContractGj" :class="diffResultList.includes('qtyContractGj') ? 'changeStyle': ''">{{ formState.qtyContractGj }}</a-form-item>
<a-form-item label="合同量(吉焦)" name="qtyContractGj" :class="diffResultList.includes('qtyContractGj') ? 'changeStyle': ''">
{{ Number.format(Number.parse(formState.qtyContractGj ||0),numFormat)}}
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="合同量(万方)" name="qtyContractM3" :class="diffResultList.includes('qtyContractM3') ? 'changeStyle': ''">{{ formState.qtyContractM3 }}</a-form-item>
<a-form-item label="合同量(万方)" name="qtyContractM3" :class="diffResultList.includes('qtyContractM3') ? 'changeStyle': ''">
{{ Number.format(Number.parse(formState.qtyContractM3||0 ),numFormat)}}
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="月合同量执行进度%" name="rateK" :class="diffResultList.includes('rateK') ? 'changeStyle': ''">{{ formState.rateK }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="计划量(吉焦)" name="qtyPlanGj" :class="diffResultList.includes('qtyPlanGj') ? 'changeStyle': ''">{{ formState.qtyPlanGj }}</a-form-item>
<a-form-item label="计划量(吉焦)" name="qtyPlanGj" :class="diffResultList.includes('qtyPlanGj') ? 'changeStyle': ''">
{{ Number.format(Number.parse(formState.qtyPlanGj||0 ),numFormat)}}
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="计划量(万方)" name="qtyPlanM3" :class="diffResultList.includes('qtyPlanM3') ? 'changeStyle': ''">{{ formState.qtyPlanM3 }}</a-form-item>
<a-form-item label="计划量(万方)" name="qtyPlanM3" :class="diffResultList.includes('qtyPlanM3') ? 'changeStyle': ''">
{{ Number.format(Number.parse(formState.qtyPlanM3||0 ),numFormat)}}
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="月计划量执行进度%" name="rateMp" :class="diffResultList.includes('rateMp') ? 'changeStyle': ''">{{ formState.rateMp }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="指定量(吉焦)" name="qtyDemandGj" :class="diffResultList.includes('qtyDemandGj') ? 'changeStyle': ''">{{ formState.qtyDemandGj }}</a-form-item>
<a-form-item label="指定量(吉焦)" name="qtyDemandGj" :class="diffResultList.includes('qtyDemandGj') ? 'changeStyle': ''">
{{ Number.format(Number.parse(formState.qtyDemandGj||0 ),numFormat)}}
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="指定量(万方)" name="qtyDemandM3" :class="diffResultList.includes('qtyDemandM3') ? 'changeStyle': ''">{{ formState.qtyDemandM3 }}</a-form-item>
<a-form-item label="指定量(万方)" name="qtyDemandM3" :class="diffResultList.includes('qtyDemandM3') ? 'changeStyle': ''">
{{ Number.format(Number.parse(formState.qtyDemandM3||0 ),numFormat)}}
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="月时间进度%" name="rateS" :class="diffResultList.includes('rateS') ? 'changeStyle': ''">{{ formState.rateS }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="批复量(吉焦)" name="qtySalesGj" :class="diffResultList.includes('qtySalesGj') ? 'changeStyle': ''">{{ formState.qtySalesGj }}</a-form-item>
<a-form-item label="批复量(吉焦)" name="qtySalesGj" :class="diffResultList.includes('qtySalesGj') ? 'changeStyle': ''">
{{ Number.format(Number.parse(formState.qtySalesGj||0 ),numFormat)}}
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="批复量(万方)" name="qtySalesM3" :class="diffResultList.includes('qtySalesM3') ? 'changeStyle': ''">{{ formState.qtySalesM3 }}</a-form-item>
<a-form-item label="批复量(万方)" name="qtySalesM3" :class="diffResultList.includes('qtySalesM3') ? 'changeStyle': ''">
{{ Number.format(Number.parse(formState.qtySalesM3||0),numFormat)}}
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="比值(方/吉焦)" name="rateM3Gj" :class="diffResultList.includes('rateM3Gj') ? 'changeStyle': ''">{{ formState.rateM3Gj }}</a-form-item>
@ -75,7 +91,7 @@
</a-form-item>
</a-col>
</a-row>
<a-table style="width: 100%" :columns="columns" :data-source="dataList" :pagination="false" :scroll="{x: 100}">
<a-table style="width: 100%" :columns="columns" :data-source="dataList" :pagination="false" :scroll="{x: 300}">
<template #bodyCell="{ column, record, index }">
<template v-if="column.dataIndex === 'pointUpName'">
<div :class="diffResultList.includes('lngPngApproPurList[' + index + '].pointUpName') ? 'changeStyle': ''">{{ record.pointUpName }}</div>
@ -87,18 +103,28 @@
<div :class="diffResultList.includes('lngPngApproPurList[' + index + '].kpName') ? 'changeStyle': ''">{{ record.kpName }}</div>
</template>
<template v-if="column.dataIndex === 'qtyDemandGj'">
<div :class="diffResultList.includes('lngPngApproPurList[' + index + '].qtyDemandGj') ? 'changeStyle': ''">{{ record.qtyDemandGj }}</div>
<div :class="diffResultList.includes('lngPngApproPurList[' + index + '].qtyDemandGj') ? 'changeStyle': ''">
{{ Number.format(Number.parse(record.qtyDemandGj ),numFormat)}}
</div>
</template>
<template v-if="column.dataIndex === 'qtyDemandM3'">
<div :class="diffResultList.includes('lngPngApproPurList[' + index + '].qtyDemandM3') ? 'changeStyle': ''">{{ record.qtyDemandM3 }}</div>
<div :class="diffResultList.includes('lngPngApproPurList[' + index + '].qtyDemandM3') ? 'changeStyle': ''">
{{ Number.format(Number.parse(record.qtyDemandM3 ),numFormat)}}
</div>
</template>
<template v-if="column.dataIndex === 'qtySalesGj'">
<a-input-number :class="diffResultList.includes('lngPngApproPurList[' + index + '].qtySalesGj') ? 'changeStyle': ''"
v-model:value="record.qtySalesGj" :disabled="record.alterSign=='D' || disable" :min="0" @change="numChange" style="width: 100%" />
<div v-if="record.alterSign=='D' || disable" :class="diffResultList.includes('lngPngApproPurList[' + index + '].qtySalesGj') ? 'changeStyle': ''">
{{ Number.format(Number.parse(record.qtySalesGj || 0),numFormat) }}
</div>
<a-input-number v-else :class="diffResultList.includes('lngPngApproPurList[' + index + '].qtySalesGj') ? 'changeStyle': ''"
v-model:value="record.qtySalesGj" :precision="3" :formatter="value => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')" :disabled="record.alterSign=='D' || disable" :min="0" @change="numChange" style="width: 100%" />
</template>
<template v-if="column.dataIndex === 'qtySalesM3'">
<a-input-number :class="diffResultList.includes('lngPngApproPurList[' + index + '].qtySalesM3') ? 'changeStyle': ''"
v-model:value="record.qtySalesM3" :disabled="record.alterSign=='D' || disable" :min="0" @change="numChange" style="width: 100%" />
<div v-if="record.alterSign=='D' || disable" :class="diffResultList.includes('lngPngApproPurList[' + index + '].qtySalesM3') ? 'changeStyle': ''">
{{ Number.format(Number.parse(record.qtySalesM3 || 0),numFormat) }}
</div>
<a-input-number v-else :class="diffResultList.includes('lngPngApproPurList[' + index + '].qtySalesM3') ? 'changeStyle': ''"
v-model:value="record.qtySalesM3" :precision="3" :formatter="value => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')" :disabled="record.alterSign=='D' || disable" :min="0" @change="numChange" style="width: 100%" />
</template>
<template v-if="column.dataIndex === 'note'" >
<div v-if="record.alterSign=='D' || disable" :class="diffResultList.includes('lngPngApproPurList[' + index + '].note') ? 'changeStyle': ''">{{ record.note }}</div>
@ -120,6 +146,7 @@
changeList: []
});
const numFormat = "###,###,###,###,###,###.000"
const columns= ref([
{ title: t('序号'), dataIndex: 'index', key: 'index', customRender: (column) => `${column.index + 1}` ,width: 100},
{ title: t('上载点'), dataIndex: 'pointUpName', width:400},
@ -127,8 +154,8 @@
{ title: t('采购合同'), dataIndex: 'kpName', width: 400},
{ title: t('指定量(吉焦)'), dataIndex: 'qtyDemandGj', width: 300},
{ title: t('指定量(万方)'), dataIndex: 'qtyDemandM3', width: 200},
{ title: t('批复量(吉焦)'), dataIndex: 'qtySalesGj', width: 200},
{ title: t('批复量(万方)'), dataIndex: 'qtySalesM3', width: 200},
{ title: t('批复量(吉焦)'), dataIndex: 'qtySalesGj', width: 250},
{ title: t('批复量(万方)'), dataIndex: 'qtySalesM3', width: 250},
{ title: t('备注'), dataIndex: 'note', width: 300},
]);
const formState = ref()
@ -141,8 +168,8 @@
num+=(Number(v.qtySalesGj) || 0)
num1+=(Number(v.qtySalesM3) || 0)
})
formState.value.qtySalesGj = num
formState.value.qtySalesM3 = num1
formState.value.qtySalesGj = num.toFixed(3)
formState.value.qtySalesM3 = num1.toFixed(3)
}
function getFormValue () {
let obj = {

View File

@ -15,6 +15,18 @@
</template>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'qtyDemandGj'">
{{ Number.format(Number.parse(record.qtyDemandGj),numFormat) }}
</template>
<template v-if="column.dataIndex === 'qtyDemandM3'">
{{ Number.format(Number.parse(record.qtyDemandM3),numFormat) }}
</template>
<template v-if="column.dataIndex === 'qtySalesGj'">
{{ Number.format(Number.parse(record.qtySalesGj),numFormat) }}
</template>
<template v-if="column.dataIndex === 'qtySalesM3'">
{{ Number.format(Number.parse(record.qtySalesM3),numFormat) }}
</template>
<template v-if="column.dataIndex === 'approName'">
<a @click="btnCheck(record)">{{ record.approName }}</a>
</template>
@ -61,7 +73,9 @@
import useEventBus from '/@/hooks/event/useEventBus';
import { cloneDeep } from 'lodash-es';
import { DataFormat, FormatOption, DATE_FORMAT, FormatType } from '/@/utils/dataFormat';
const numFormat = "###,###,###,###,###,###.000"
const { bus, CREATE_FLOW, FLOW_PROCESSED, FORM_LIST_MODIFIED } = useEventBus();
const { notification } = useMessage();