客户需求

This commit is contained in:
‘huanghaiixia’
2026-01-22 17:31:32 +08:00
parent 021b5074b5
commit acdc3555ac
11 changed files with 527 additions and 284 deletions

View File

@ -1,90 +1,108 @@
<template>
<a-row>
<a-col :span="8">
<a-form-item label="计划日期" name="datePlan">{{ formState.datePlan }}</a-form-item>
<a-form-item label="计划日期" name="datePlan" :class="diffResultList.includes('datePlan') ? 'changeStyle': ''">{{ formState.datePlan }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="当日/次日" name="daysSign">{{ formState.daysSign }}</a-form-item>
<a-form-item label="当日/次日" name="daysSign" :class="diffResultList.includes('daysSign') ? 'changeStyle': ''">{{ formState.daysSign }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="合同" name="kName">{{ formState.kName}}</a-form-item>
<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">{{ formState.qtyContractGj }}</a-form-item>
<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">{{ 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">{{ formState.rateK }}</a-form-item>
<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">{{ formState.qtyPlanGj }}</a-form-item>
<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">{{ 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">{{ formState.rateMp }}</a-form-item>
<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">{{ formState.qtyDemandGj }}</a-form-item>
<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">{{ 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">{{ formState.rateS }}</a-form-item>
<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">{{ formState.qtySalesGj }}</a-form-item>
<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">{{ 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">{{ formState.rateM3Gj }}</a-form-item>
<a-form-item label="比值(方/吉焦)" name="rateM3Gj" :class="diffResultList.includes('rateM3Gj') ? 'changeStyle': ''">{{ formState.rateM3Gj }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="交易主体" name="comName">{{ formState.comName }}</a-form-item>
<a-form-item label="交易主体" name="comName" :class="diffResultList.includes('comName') ? 'changeStyle': ''">{{ formState.comName }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="版本号" name="verNo">{{ formState.verNo }}</a-form-item>
<a-form-item label="版本号" name="verNo" :class="diffResultList.includes('verNo') ? 'changeStyle': ''">{{ formState.verNo }}</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="下载点" name="poinDelyName" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
<a-col :span="8">
<a-form-item label="下载点" name="poinDelyName" :class="diffResultList.includes('poinDelyName') ? 'changeStyle': ''">
{{ formState.pointDelyName }}
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="审批状态" name="approName">{{ formState.approName }}</a-form-item>
<a-form-item label="审批状态" name="approName" :class="diffResultList.includes('approName') ? 'changeStyle': ''">{{ formState.approName }}</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="开机方式" name="" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
<div style="display: flex;">
<div class="dot"><span style="background:#04F21C"></span>连运<i>{{ formState.powerCont }}</i></div>
<div class="dot"><span style="background:#FFFF00"></span>调峰<i>{{ formState.powerCont }}</i></div>
<div class="dot"><span style="background:#D9001B"></span>停机<i>{{ formState.powerStop }}</i></div>
<div class="dot"><span style="background:#CA90FF"></span>其他<i>{{ formState.powerOther }}</i></div>
<div class="dot"><span style="background:#04F21C"></span>连运<i :class="diffResultList.includes('powerCont') ? 'changeStyle': ''">{{ formState.powerCont }}</i></div>
<div class="dot"><span style="background:#FFFF00"></span>调峰<i :class="diffResultList.includes('powerPeak') ? 'changeStyle': ''">{{ formState.powerPeak }}</i></div>
<div class="dot"><span style="background:#D9001B"></span>停机<i :class="diffResultList.includes('powerStop') ? 'changeStyle': ''">{{ formState.powerStop }}</i></div>
<div class="dot"><span style="background:#CA90FF"></span>其他<i :class="diffResultList.includes('powerOther') ? 'changeStyle': ''">{{ formState.powerOther }}</i></div>
</div>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="备注" name="note" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
<a-form-item label="备注" name="note" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }" :class="diffResultList.includes('note') ? 'changeStyle': ''">
{{ formState.note }}
</a-form-item>
</a-col>
</a-row>
<a-table style="width: 100%" :columns="columns" :data-source="dataList" :pagination="false" :scroll="{x: 100}">
<template #bodyCell="{ column, record, index }">
<template v-if="column.dataIndex === 'pointUpName'">
<div :class="diffResultList.includes('lngPngApproPurList[' + index + '].pointUpName') ? 'changeStyle': ''">{{ record.pointUpName }}</div>
</template>
<template v-if="column.dataIndex === 'suName'">
<div :class="diffResultList.includes('lngPngApproPurList[' + index + '].suName') ? 'changeStyle': ''">{{ record.suName }}</div>
</template>
<template v-if="column.dataIndex === 'kpName'">
<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>
</template>
<template v-if="column.dataIndex === 'qtyDemandM3'">
<div :class="diffResultList.includes('lngPngApproPurList[' + index + '].qtyDemandM3') ? 'changeStyle': ''">{{ record.qtyDemandM3 }}</div>
</template>
<template v-if="column.dataIndex === 'qtySalesGj'">
<a-input-number v-model:value="record.qtySalesGj" :disabled="record.alterSign=='D' || disable" :min="0" @change="numChange" style="width: 100%" />
<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%" />
</template>
<template v-if="column.dataIndex === 'qtySalesM3'">
<a-input-number v-model:value="record.qtySalesM3" :disabled="record.alterSign=='D' || disable" :min="0" @change="numChange" style="width: 100%" />
<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%" />
</template>
<template v-if="column.dataIndex === 'note'">
<a-input v-model:value="record.note" :disabled="record.alterSign=='D' || disable" style="width: 100%" />
<template v-if="column.dataIndex === 'note'" >
<div v-if="record.alterSign=='D' || disable" :class="diffResultList.includes('lngPngApproPurList[' + index + '].note') ? 'changeStyle': ''">{{ record.qtyDemandM3 }}</div>
<a-input v-model:value="record.note" v-else style="width: 100%" />
</template>
</template>
</a-table>
@ -92,14 +110,14 @@
</template>
<script lang="ts" setup>
import { json } from 'stream/consumers';
import { useI18n } from '/@/hooks/web/useI18n';
import { useI18n } from '/@/hooks/web/useI18n';
import { ref, computed, onMounted, onBeforeMount, nextTick, defineAsyncComponent, reactive, defineComponent, watch} from 'vue';
const { t } = useI18n();
const props = defineProps({
formObj: {},
list: [],
disable: false
disable: false,
changeList: []
});
const columns= ref([
@ -115,6 +133,7 @@ import { useI18n } from '/@/hooks/web/useI18n';
]);
const formState = ref()
const dataList = ref([])
const diffResultList = ref([])
async function numChange () {
let num = 0;
let num1 = 0;
@ -154,6 +173,16 @@ import { useI18n } from '/@/hooks/web/useI18n';
deep: true,
}
);
watch(
() => props.changeList,
(val) => {
diffResultList.value = val || []
},
{
immediate: true,
deep: true,
}
);
defineExpose({
getFormValue
});
@ -178,4 +207,7 @@ import { useI18n } from '/@/hooks/web/useI18n';
display: block;
}
}
.changeStyle {
color: red !important;
}
</style>

View File

@ -23,7 +23,7 @@
</a-col>
</a-row>
<Card :title="titleNew" :bordered="false" v-if="currentRoute.query.type=='compare'&&titleNew">
<basicForm ref="basicFormRef" :formObj="formStateNew" :list="dataListNew" :disable="currentRoute.query.type"></basicForm>
<basicForm ref="basicFormRef" :formObj="formStateNew" :changeList="diffResultList" :list="dataListNew" :disable="currentRoute.query.type"></basicForm>
</Card>
<Card :title="title" :bordered="false" >
<basicForm ref="basicFormRef" :formObj="formState" :list="dataList" :disable="currentRoute.query.type"></basicForm>
@ -102,6 +102,7 @@
const dataList = ref([])
const dataListNew = ref([])
const basicFormRef = ref()
const diffResultList = ref([])
let optionSelect= reactive({
approCodeList: [],
});
@ -121,17 +122,18 @@
try {
let data = await getLngPngApproCompare(id) || []
spinning.value = false
diffResultList.value = data.diffResultList || []
let obj = changeData(data.oldBean)
Object.assign(formState, {...obj.params})
Object.assign(dataList.value, obj.list || [{}])
title.value = '版本V'+ formState.verNo
let obj1 = changeData(data.newBean)
let obj1 = changeData(data.newBean || {})
Object.assign(formStateNew, {...obj1.params})
Object.assign(dataListNew.value, obj1.list || [{}])
titleNew.value = '版本V'+ formStateNew.verNo
titleNew.value = formStateNew.verNo ? ('版本V'+ formStateNew.verNo) : ''
} catch (error) {
spinning.value = false
@ -151,6 +153,7 @@
}
}
const changeData = (obj) => {
console.log(obj.lngPngApproPurList, 9999)
let arr = obj.lngPngApproPurList || [{}]
// const startDate = dayjs(obj.datePlan);
// const endDate = dayjs(new Date());
@ -170,7 +173,7 @@
obj.qtySalesM3 = Number(obj.qtySalesM3)/10000
let num = 0;
let num1 = 0;
arr.forEach(v => {
arr.length && arr.forEach(v => {
v.qtyDemandM3 = Number(v.qtyDemandM3)/10000
v.qtySalesM3 = Number(v.qtySalesM3)/10000
num+=(Number(v.qtySalesGj) || 0)