优化
This commit is contained in:
@ -56,7 +56,7 @@ span {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
input.ant-input-disabled:placeholder-shown{
|
||||
input.ant-input-disabled:placeholder-shown, .ant-input-disabled:placeholder-shown{
|
||||
opacity: 0 !important;
|
||||
}
|
||||
.ant-picker-input > input[disabled], .ant-radio-disabled + span {
|
||||
|
||||
10
src/hooks/web/useCommon.ts
Normal file
10
src/hooks/web/useCommon.ts
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
|
||||
export function numToThousands(number) {
|
||||
if (number === null || number === undefined || number === '') return ''
|
||||
let arr = number.toString().split('.')
|
||||
let num = arr[0]
|
||||
let float = arr[1]
|
||||
let str = num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")
|
||||
return float ? (str + '.'+ float) : str;
|
||||
}
|
||||
@ -25,7 +25,7 @@
|
||||
<a-form-item label="合同量(吉焦)" name="qtyContractGj" :class="diffResultList.includes('qtyContractGj')?'changeStyle':''">{{ formState.qtyContractGj }}</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':''">{{ formState.qtyContractM3 }}</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>
|
||||
@ -34,7 +34,7 @@
|
||||
<a-form-item label="计划量(吉焦)" name="qtyPlanGj" :class="diffResultList.includes('qtyPlanGj')?'changeStyle':''">{{ formState.qtyPlanGj }}</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':''">{{ formState.qtyPlanM3 }}</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>
|
||||
@ -43,7 +43,7 @@
|
||||
<a-form-item label="指定量(吉焦)" name="qtyDemandGj" :class="diffResultList.includes('qtyDemandGj')?'changeStyle':''">{{ formState.qtyDemandGj }}</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':''">{{ formState.qtyDemandM3 }}</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>
|
||||
@ -52,7 +52,7 @@
|
||||
<a-form-item label="批复量(吉焦)" name="qtySalesGj" :class="diffResultList.includes('qtySalesGj')?'changeStyle':''">{{ formState.qtySalesGj }}</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':''">{{ formState.qtySalesM3 }}</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>
|
||||
@ -170,9 +170,9 @@
|
||||
{ title: t('供应商'), dataIndex: 'suName', width: 300},
|
||||
{ title: t('上载点'), dataIndex: 'pointUpName', width:300},
|
||||
{ title: t('指定量(吉焦)'), dataIndex: 'qtyDemandGj', width: 200},
|
||||
{ title: t('指定量(方)'), dataIndex: 'qtyDemandM3', width: 200},
|
||||
{ title: t('指定量(万方)'), dataIndex: 'qtyDemandM3', width: 200},
|
||||
{ title: t('批复量(吉焦)'), dataIndex: 'qtySalesGj', width: 200},
|
||||
{ title: t('批复量(方)'), dataIndex: 'qtySalesM3', width: 200},
|
||||
{ title: t('批复量(万方)'), dataIndex: 'qtySalesM3', width: 200},
|
||||
{ title: t('备注'), dataIndex: 'note', width: 200},
|
||||
]);
|
||||
const formState = ref({})
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
<a-form-item label="合同量(吉焦)" name="qtyContractGj" :class="diffResultList.includes('qtyContractGj') ? 'changeStyle': ''">{{ formState.qtyContractGj }}</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': ''">{{ formState.qtyContractM3 }}</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>
|
||||
@ -22,7 +22,7 @@
|
||||
<a-form-item label="计划量(吉焦)" name="qtyPlanGj" :class="diffResultList.includes('qtyPlanGj') ? 'changeStyle': ''">{{ formState.qtyPlanGj }}</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': ''">{{ formState.qtyPlanM3 }}</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>
|
||||
@ -31,7 +31,7 @@
|
||||
<a-form-item label="指定量(吉焦)" name="qtyDemandGj" :class="diffResultList.includes('qtyDemandGj') ? 'changeStyle': ''">{{ formState.qtyDemandGj }}</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': ''">{{ formState.qtyDemandM3 }}</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>
|
||||
@ -40,7 +40,7 @@
|
||||
<a-form-item label="批复量(吉焦)" name="qtySalesGj" :class="diffResultList.includes('qtySalesGj') ? 'changeStyle': ''">{{ formState.qtySalesGj }}</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': ''">{{ formState.qtySalesM3 }}</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>
|
||||
@ -126,9 +126,9 @@
|
||||
{ title: t('供应商'), dataIndex: 'suName', width: 400},
|
||||
{ title: t('采购合同'), dataIndex: 'kpName', width: 400},
|
||||
{ title: t('指定量(吉焦)'), dataIndex: 'qtyDemandGj', width: 300},
|
||||
{ title: t('指定量(方)'), dataIndex: 'qtyDemandM3', width: 200},
|
||||
{ title: t('指定量(万方)'), dataIndex: 'qtyDemandM3', width: 200},
|
||||
{ title: t('批复量(吉焦)'), dataIndex: 'qtySalesGj', width: 200},
|
||||
{ title: t('批复量(方)'), dataIndex: 'qtySalesM3', width: 200},
|
||||
{ title: t('批复量(万方)'), dataIndex: 'qtySalesM3', width: 200},
|
||||
{ title: t('备注'), dataIndex: 'note', width: 300},
|
||||
]);
|
||||
const formState = ref()
|
||||
|
||||
@ -234,7 +234,7 @@ export const columns: BasicColumn[] = [
|
||||
|
||||
{
|
||||
dataIndex: 'qtyDemandM3',
|
||||
title: '指定量(方)',
|
||||
title: '指定量(万方)',
|
||||
componentType: 'input',
|
||||
align: 'left',
|
||||
|
||||
@ -252,7 +252,7 @@ export const columns: BasicColumn[] = [
|
||||
|
||||
{
|
||||
dataIndex: 'qtySalesM3',
|
||||
title: '批复量(方)',
|
||||
title: '批复量(万方)',
|
||||
componentType: 'input',
|
||||
align: 'left',
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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();
|
||||
|
||||
|
||||
@ -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({
|
||||
|
||||
Reference in New Issue
Block a user