This commit is contained in:
‘huanghaiixia’
2026-01-29 18:16:02 +08:00
parent 3a441823c9
commit 9643a693a2
8 changed files with 51 additions and 19 deletions

View File

@ -101,7 +101,7 @@ export const columns: BasicColumn[] = [
{
dataIndex: 'qtySalesM3',
title: '批复量(方)',
title: '批复量(方)',
componentType: 'input',
align: 'left',
width: 120,
@ -119,7 +119,7 @@ export const columns: BasicColumn[] = [
{
dataIndex: 'qtyMeaM3',
title: '完成量(方)',
title: '完成量(方)',
componentType: 'input',
align: 'left',
width: 120,

View File

@ -10,7 +10,16 @@
</a-button>
</div>
<searchForm @search="onSearch" @reset="onReset" ></searchForm>
<BasicTable @register="registerTable"></BasicTable>
<BasicTable @register="registerTable">
<template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'qtySalesM3'">
{{ NP.divide(Number(record.qtySalesM3), 10000) }}
</template>
<template v-if="column.dataIndex === 'qtyMeaM3'">
{{ NP.divide(Number(record.qtyMeaM3), 10000) }}
</template>
</template>
</BasicTable>
</div>
</a-spin>
</template>
@ -31,6 +40,7 @@
import { getLngPngMeasureSalesPurPageAdd, addLngPngMeasureSalesPur } from '/@/api/dayPlan/PngMeasureSalesPur';
import {formConfig, searchFormSchema, columns } from './config';
import searchForm from './searchForm.vue';
import NP from 'number-precision';
const userStore = useUserStore();

View File

@ -83,7 +83,7 @@
import { downloadByUrl } from '/@/utils/file/download';
import { DeleteOutlined } from '@ant-design/icons-vue';
import searchForm from './components/searchForm.vue'
import NP from 'number-precision';
const { bus, CREATE_FLOW, FLOW_PROCESSED, FORM_LIST_MODIFIED } = useEventBus();
@ -168,6 +168,10 @@
...formState.value,
});
tableData.value = res.list || [];
tableData.value.forEach(v=> {
v.qtySalesM3 = NP.divide(Number(v.qtySalesM3), 10000)
v.qtyMeaM3 = NP.divide(Number(v.qtyMeaM3), 10000)
})
total.value = res.total || res.length || 0;
} catch (error) {
console.error('获取列表失败:', error);
@ -260,6 +264,10 @@
});
return;
}
selectedRowsData.value.forEach(v => {
v.qtyMeaM3 = NP.times(Number(v.qtyMeaM3), 10000)
v.qtySalesM3 = NP.times(Number(v.qtySalesM3), 10000)
})
await updateLngPngMeasureSalesPur(selectedRowsData.value)
handleSuccess();
notification.success({
@ -275,6 +283,10 @@
});
return;
}
selectedRowsData.value.forEach(v => {
v.qtyMeaM3 = NP.times(Number(v.qtyMeaM3), 10000)
v.qtySalesM3 = NP.times(Number(v.qtySalesM3), 10000)
})
await addLngPngMeasureSalesPur(selectedRowsData.value)
handleSuccess();
notification.success({