客户需求
This commit is contained in:
@ -10,12 +10,59 @@ enum Api {
|
|||||||
LngPngDemand = '/dayPlan/demand',
|
LngPngDemand = '/dayPlan/demand',
|
||||||
ContractList ='/magic-api/dayPlan/queryPngDemandContractList',
|
ContractList ='/magic-api/dayPlan/queryPngDemandContractList',
|
||||||
PointDelyList ='/magic-api/dayPlan/queryPngDemandPointDely',
|
PointDelyList ='/magic-api/dayPlan/queryPngDemandPointDely',
|
||||||
|
ContractQty = '/magic-api/dayPlan/queryPngDemandContractQty',
|
||||||
|
PurList = '/magic-api/dayPlan/queryPngDemandPurList',
|
||||||
|
Rate = '/magic-api/dayPlan/queryPngDemandRate',
|
||||||
|
saveAndSubmit = '/dayPlan/demand/saveAndSubmit',
|
||||||
Export = '/dayPlan/demand/export',
|
Export = '/dayPlan/demand/export',
|
||||||
|
|
||||||
|
|
||||||
DataLog = '/dayPlan/demand/datalog',
|
DataLog = '/dayPlan/demand/datalog',
|
||||||
}
|
}
|
||||||
|
export async function submitLngPngDemand(lngPngDemand: Recordable, mode: ErrorMessageMode = 'modal') {
|
||||||
|
return defHttp.post<boolean>(
|
||||||
|
{
|
||||||
|
url: Api.saveAndSubmit,
|
||||||
|
params: lngPngDemand,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorMessageMode: mode,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
export async function getLngPngDemandRate(params, mode: ErrorMessageMode = 'modal') {
|
||||||
|
return defHttp.get<LngPngDemandPageModel>(
|
||||||
|
{
|
||||||
|
url: Api.Rate,
|
||||||
|
params: params,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorMessageMode: mode,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
export async function getLngPngDemandPurList(params, mode: ErrorMessageMode = 'modal') {
|
||||||
|
return defHttp.get<LngPngDemandPageModel>(
|
||||||
|
{
|
||||||
|
url: Api.PurList,
|
||||||
|
params: params,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorMessageMode: mode,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
export async function getLngPngDemandContractQty(params, mode: ErrorMessageMode = 'modal') {
|
||||||
|
return defHttp.get<LngPngDemandPageModel>(
|
||||||
|
{
|
||||||
|
url: Api.ContractQty,
|
||||||
|
params: params,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorMessageMode: mode,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
export async function getLngPngDemandPointDely(params, mode: ErrorMessageMode = 'modal') {
|
export async function getLngPngDemandPointDely(params, mode: ErrorMessageMode = 'modal') {
|
||||||
return defHttp.get<LngPngDemandPageModel>(
|
return defHttp.get<LngPngDemandPageModel>(
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<BasicModal v-bind="$attrs" @register="registerModal" width="60%" :title="getTitle" @ok="handleSubmit"
|
<BasicModal v-bind="$attrs" @register="registerModal" width="60%" :title="getTitle" @ok="handleSubmit">
|
||||||
@visible-change="handleVisibleChange" >
|
|
||||||
<a-table bordered rowKey="id" :columns="columns" :data-source="dataList" :pagination="false" :row-selection="{ type:'radio', selectedRowKeys: selectedKeys, onChange: onSelectChange }"/>
|
<a-table bordered rowKey="id" :columns="columns" :data-source="dataList" :pagination="false" :row-selection="{ type:'radio', selectedRowKeys: selectedKeys, onChange: onSelectChange }"/>
|
||||||
</BasicModal>
|
</BasicModal>
|
||||||
</div>
|
</div>
|
||||||
@ -15,7 +14,7 @@
|
|||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const columns: BasicColumn[] = [
|
const columns: BasicColumn[] = [
|
||||||
{ title: t('合同号'), dataIndex: 'id', },
|
{ title: t('合同Id'), dataIndex: 'id', },
|
||||||
{ title: t('合同名称'), dataIndex: 'kName', },
|
{ title: t('合同名称'), dataIndex: 'kName', },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<BasicModal v-bind="$attrs" @register="registerModal" width="60%" :title="getTitle" @ok="handleSubmit"
|
<BasicModal v-bind="$attrs" @register="registerModal" width="60%" :title="getTitle" @ok="handleSubmit" >
|
||||||
@visible-change="handleVisibleChange" >
|
|
||||||
<a-table bordered rowKey="id" :columns="columns" :data-source="dataList" :pagination="false" :row-selection="{ type:'radio', selectedRowKeys: selectedKeys, onChange: onSelectChange }"/>
|
<a-table bordered rowKey="id" :columns="columns" :data-source="dataList" :pagination="false" :row-selection="{ type:'radio', selectedRowKeys: selectedKeys, onChange: onSelectChange }"/>
|
||||||
</BasicModal>
|
</BasicModal>
|
||||||
</div>
|
</div>
|
||||||
@ -15,8 +14,8 @@
|
|||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const columns: BasicColumn[] = [
|
const columns: BasicColumn[] = [
|
||||||
{ title: t('合同号'), dataIndex: 'id', },
|
{ title: t('下载点编码'), dataIndex: 'pointDelyCode', },
|
||||||
{ title: t('合同名称'), dataIndex: 'kName', },
|
{ title: t('下载点名称'), dataIndex: 'pointDelyName', },
|
||||||
];
|
];
|
||||||
|
|
||||||
const emit = defineEmits(['success', 'register']);
|
const emit = defineEmits(['success', 'register']);
|
||||||
59
src/components/common/rejectReplyModal.vue
Normal file
59
src/components/common/rejectReplyModal.vue
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<template>
|
||||||
|
<BasicModal v-bind="$attrs" destroyOnClose @register="registerModal" showFooter :title="getTitle" width="40%" @ok="handleSubmit" @cancel="handleCancel">
|
||||||
|
<a-form ref="formRef" :model="formState" :rules="rules" v-bind="{labelCol: { span: 8 },wrapperCol: { span: 16 },}">
|
||||||
|
<a-row>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="批复意见" name="reply" :label-col="{ span: 4 }" :wrapper-col="{ span: 24 }">
|
||||||
|
<a-textarea v-model:value="formState.reply" placeholder="请输入" :auto-size="{ minRows: 2, maxRows: 5 }"/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</BasicModal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, onMounted, computed, unref,reactive } from 'vue';
|
||||||
|
import { BasicModal, useModalInner } from '/@/components/Modal';
|
||||||
|
import { Form, message } from 'ant-design-vue';
|
||||||
|
import { useI18n } from '/@/hooks/web/useI18n';
|
||||||
|
import type { Rule } from 'ant-design-vue/es/form';
|
||||||
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
|
import type { FormInstance } from 'ant-design-vue';
|
||||||
|
const { t } = useI18n();
|
||||||
|
const isUpdate = ref(true);
|
||||||
|
const formRef = ref()
|
||||||
|
const { notification } = useMessage();
|
||||||
|
const emit = defineEmits(['success','register']);
|
||||||
|
const getTitle = computed(() => t('驳回意见') )
|
||||||
|
let formState = reactive({
|
||||||
|
});
|
||||||
|
const rules = {
|
||||||
|
reply: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
|
};
|
||||||
|
const props = defineProps({
|
||||||
|
type: String
|
||||||
|
})
|
||||||
|
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
|
||||||
|
setModalProps({ confirmLoading: false });
|
||||||
|
isUpdate.value = !!data?.isUpdate;
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
|
||||||
|
});
|
||||||
|
const handleCancel = () => {
|
||||||
|
formRef.value.resetFields();
|
||||||
|
}
|
||||||
|
const handleSubmit = async () => {
|
||||||
|
try {
|
||||||
|
await formRef.value.validate();
|
||||||
|
emit('success', formState);
|
||||||
|
formRef.value.resetFields();
|
||||||
|
closeModal();
|
||||||
|
} catch (error) {
|
||||||
|
console.log('验证失败:', error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@ -1,112 +1,132 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-row>
|
<a-form ref="formRef" :model="formState" :rules="rules" v-bind="layout">
|
||||||
<a-col :span="8">
|
<a-row>
|
||||||
<a-form-item label="计划日期" name="datePlan">
|
<a-col :span="8">
|
||||||
<a-date-picker v-model:value="formState.datePlan" :disabled-date="disabledDateStart" style="width: 100%" placeholder="请选择计划日期" @change="datePlanChange" />
|
<a-form-item label="计划日期" name="datePlan">
|
||||||
</a-form-item>
|
<a-date-picker v-model:value="formState.datePlan" :disabled-date="disabledDateStart" style="width: 100%" :disabled="disable" placeholder="请选择计划日期" @change="datePlanChange" />
|
||||||
</a-col>
|
</a-form-item>
|
||||||
<a-col :span="8">
|
</a-col>
|
||||||
<a-form-item label="合同" name="kName">
|
<a-col :span="8">
|
||||||
<a-input-search v-model:value="formState.kName" :disabled="isDisable" placeholder="请选择合同" readonly @search="onSearch"/>
|
<a-form-item label="合同" name="kName">
|
||||||
</a-form-item>
|
<a-input-search v-model:value="formState.kName" :disabled="disable" placeholder="请选择合同" readonly @search="onSearch"/>
|
||||||
</a-col>
|
</a-form-item>
|
||||||
<a-col :span="8">
|
</a-col>
|
||||||
<a-form-item label="下载点" name="pointDelyName" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
|
<a-col :span="8">
|
||||||
<a-input-search v-model:value="formState.pointDelyName" :disabled="isDisable" placeholder="请选择下载点" readonly @search="onSearchUpLoad"/>
|
<a-form-item label="下载点" name="pointDelyName">
|
||||||
</a-form-item>
|
<a-input-search v-model:value="formState.pointDelyName" :disabled="disable" placeholder="请选择下载点" readonly @search="onSearchUpLoad"/>
|
||||||
</a-col>
|
</a-form-item>
|
||||||
<a-col :span="8">
|
</a-col>
|
||||||
<a-form-item label="合同量(吉焦)" name="qtyContractGj">{{ formState.qtyContractGj }}</a-form-item>
|
<a-col :span="8">
|
||||||
</a-col>
|
<a-form-item label="合同量(吉焦)" name="qtyContractGj">{{ formState.qtyContractGj }}</a-form-item>
|
||||||
<a-col :span="8">
|
</a-col>
|
||||||
<a-form-item label="合同量(方)" name="qtyContractM3">{{ formState.qtyContractM3 }}</a-form-item>
|
<a-col :span="8">
|
||||||
</a-col>
|
<a-form-item label="合同量(方)" name="qtyContractM3">{{ formState.qtyContractM3 }}</a-form-item>
|
||||||
<a-col :span="8">
|
</a-col>
|
||||||
<a-form-item label="月合同量执行进度%" name="rateK">{{ formState.rateK }}</a-form-item>
|
<a-col :span="8">
|
||||||
</a-col>
|
<a-form-item label="月合同量执行进度%" name="rateK">{{ formState.rateK }}</a-form-item>
|
||||||
<a-col :span="8">
|
</a-col>
|
||||||
<a-form-item label="计划量(吉焦)" name="qtyPlanGj">{{ formState.qtyPlanGj }}</a-form-item>
|
<a-col :span="8">
|
||||||
</a-col>
|
<a-form-item label="计划量(吉焦)" name="qtyPlanGj">{{ formState.qtyPlanGj }}</a-form-item>
|
||||||
<a-col :span="8">
|
</a-col>
|
||||||
<a-form-item label="计划量(方)" name="qtyPlanM3">{{ formState.qtyPlanM3 }}</a-form-item>
|
<a-col :span="8">
|
||||||
</a-col>
|
<a-form-item label="计划量(方)" name="qtyPlanM3">{{ formState.qtyPlanM3 }}</a-form-item>
|
||||||
<a-col :span="8">
|
</a-col>
|
||||||
<a-form-item label="月计划量执行进度%" name="rateMp">{{ formState.rateMp }}</a-form-item>
|
<a-col :span="8">
|
||||||
</a-col>
|
<a-form-item label="月计划量执行进度%" name="rateMp">{{ formState.rateMp }}</a-form-item>
|
||||||
<a-col :span="8">
|
</a-col>
|
||||||
<a-form-item label="指定量(吉焦)" name="qtyDemandGj">{{ formState.qtyDemandGj }}</a-form-item>
|
<a-col :span="8">
|
||||||
</a-col>
|
<a-form-item label="指定量(吉焦)" name="qtyDemandGj">{{ formState.qtyDemandGj }}</a-form-item>
|
||||||
<a-col :span="8">
|
</a-col>
|
||||||
<a-form-item label="指定量(方)" name="qtyDemandM3">{{ formState.qtyDemandM3 }}</a-form-item>
|
<a-col :span="8">
|
||||||
</a-col>
|
<a-form-item label="指定量(方)" name="qtyDemandM3">{{ formState.qtyDemandM3 }}</a-form-item>
|
||||||
<a-col :span="8">
|
</a-col>
|
||||||
<a-form-item label="月时间进度%" name="rateS">{{ formState.rateS }}</a-form-item>
|
<a-col :span="8">
|
||||||
</a-col>
|
<a-form-item label="月时间进度%" name="rateS">{{ formState.rateS }}</a-form-item>
|
||||||
<a-col :span="8">
|
</a-col>
|
||||||
<a-form-item label="批复量(吉焦)" name="qtySalesGj">{{ formState.qtySalesGj }}</a-form-item>
|
<a-col :span="8">
|
||||||
</a-col>
|
<a-form-item label="批复量(吉焦)" name="qtySalesGj">{{ formState.qtySalesGj }}</a-form-item>
|
||||||
<a-col :span="8">
|
</a-col>
|
||||||
<a-form-item label="批复量(方)" name="qtySalesM3">{{ formState.qtySalesM3 }}</a-form-item>
|
<a-col :span="8">
|
||||||
</a-col>
|
<a-form-item label="批复量(方)" name="qtySalesM3">{{ formState.qtySalesM3 }}</a-form-item>
|
||||||
<a-col :span="8">
|
</a-col>
|
||||||
<a-form-item label="比值(方/吉焦)" name="rateM3Gj">{{ formState.rateM3Gj }}</a-form-item>
|
<a-col :span="8">
|
||||||
</a-col>
|
<a-form-item label="比值(方/吉焦)" name="rateM3Gj">{{ formState.rateM3Gj }}</a-form-item>
|
||||||
<a-col :span="8">
|
</a-col>
|
||||||
<a-form-item label="交易主体" name="name">{{ formState.name }}</a-form-item>
|
<a-col :span="8">
|
||||||
</a-col>
|
<a-form-item label="交易主体" name="name">{{ formState.name }}</a-form-item>
|
||||||
<a-col :span="8">
|
</a-col>
|
||||||
<a-form-item label="版本号" name="verNo">{{ formState.verNo }}</a-form-item>
|
<a-col :span="8">
|
||||||
</a-col>
|
<a-form-item label="版本号" name="verNo">{{ formState.verNo }}</a-form-item>
|
||||||
<a-col :span="8">
|
</a-col>
|
||||||
<a-form-item label="审批状态" name="approName">{{ formState.approName }}</a-form-item>
|
<a-col :span="8">
|
||||||
</a-col>
|
<a-form-item label="审批状态" name="approName">{{ formState.approName }}</a-form-item>
|
||||||
<a-col :span="24">
|
</a-col>
|
||||||
<a-form-item label="开机方式" name="" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
|
<a-col :span="24">
|
||||||
<div style="display: flex;">
|
<a-form-item label="开机方式" name="" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
|
||||||
<div class="dot"><span style="background:#04F21C"></span>连运<i>{{ formState.powerCont }}</i>台</div>
|
<div style="display: flex;">
|
||||||
<div class="dot"><span style="background:#FFFF00"></span>调峰<i>{{ formState.powerCont }}</i>台</div>
|
<div class="dot"><span style="background:#04F21C"></span>连运<a-input-number v-model:value="formState.powerCont" :disabled="disable" :precision="0"/>台</div>
|
||||||
<div class="dot"><span style="background:#D9001B"></span>停机<i>{{ formState.powerStop }}</i>台</div>
|
<div class="dot"><span style="background:#FFFF00"></span>调峰<a-input-number v-model:value="formState.powerPeak" :disabled="disable" :precision="0"/>台</div>
|
||||||
<div class="dot"><span style="background:#CA90FF"></span>其他<i>{{ formState.powerOther }}</i>台</div>
|
<div class="dot"><span style="background:#D9001B"></span>停机<a-input-number v-model:value="formState.powerStop" :disabled="disable" :precision="0"/>台</div>
|
||||||
</div>
|
<div class="dot"><span style="background:#CA90FF"></span>其他<a-input-number v-model:value="formState.powerOther" :disabled="disable" :precision="0"/>台</div>
|
||||||
</a-form-item>
|
</div>
|
||||||
</a-col>
|
</a-form-item>
|
||||||
<a-col :span="24">
|
</a-col>
|
||||||
<a-form-item label="备注" name="note" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
|
<a-col :span="24">
|
||||||
{{ formState.note }}
|
<a-form-item label="备注" name="note" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
|
||||||
</a-form-item>
|
<a-textarea v-model:value="formState.note" placeholder="请输入备注" :auto-size="{ minRows: 2, maxRows: 5 }"/>
|
||||||
</a-col>
|
</a-form-item>
|
||||||
</a-row>
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="批复意见" name="reply" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
|
||||||
|
<a-textarea v-model:value="formState.reply" disabled :auto-size="{ minRows: 1, maxRows: 5 }"/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
<a-table style="width: 100%" :columns="columns" :data-source="dataList" :pagination="false" :scroll="{x: 1000}">
|
<a-table style="width: 100%" :columns="columns" :data-source="dataList" :pagination="false" :scroll="{x: 1000}">
|
||||||
<template #bodyCell="{ column, record, index }">
|
<template #bodyCell="{ column, record, index }">
|
||||||
<template v-if="column.dataIndex === 'qtySalesGj'">
|
<template v-if="column.dataIndex === 'qtyDemandGj'">
|
||||||
<a-input-number v-model:value="record.qtySalesGj" :disabled="record.alterSign=='D' || disable" :min="0" @change="numChange" style="width: 100%" />
|
<a-input-number v-model:value="record.qtyDemandGj" :disabled="disable" :min="0" @change="numChange('qtyDemandGj', record)" style="width: 100%" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.dataIndex === 'qtySalesM3'">
|
<template v-if="column.dataIndex === 'qtyDemandM3'">
|
||||||
<a-input-number v-model:value="record.qtySalesM3" :disabled="record.alterSign=='D' || disable" :min="0" @change="numChange" style="width: 100%" />
|
<a-input-number v-model:value="record.qtyDemandM3" :disabled="disable" :min="0" @change="numChange('qtyDemandM3', record)" style="width: 100%" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.dataIndex === 'note'">
|
<template v-if="column.dataIndex === 'note'">
|
||||||
<a-input v-model:value="record.note" :disabled="record.alterSign=='D' || disable" style="width: 100%" />
|
<a-input v-model:value="record.note" style="width: 100%" />
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
<ContractDemandListModal @register="registerContract" @success="handleSuccessContract" />
|
<contractDemandListModal @register="registerContract" @success="handleSuccessContract" />
|
||||||
<upLoadDemandListModal @register="registerUpLoad" @success="handleSuccessUpLoad" />
|
<pointDelyDemandListModal @register="registerUpLoad" @success="handleSuccessUpLoad" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useI18n } from '/@/hooks/web/useI18n';
|
import { useI18n } from '/@/hooks/web/useI18n';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
import { ref, computed, onMounted, onBeforeMount, nextTick, defineAsyncComponent, reactive, defineComponent, watch} from 'vue';
|
import { ref, computed, onMounted, onBeforeMount, nextTick, defineAsyncComponent, reactive, defineComponent, watch} from 'vue';
|
||||||
import ContractDemandListModal from '/@/components/common/ContractDemandListModal.vue';
|
import contractDemandListModal from '/@/components/common/contractDemandListModal.vue';
|
||||||
import upLoadDemandListModal from '/@/components/common/upLoadDemandListModal.vue';
|
import pointDelyDemandListModal from '/@/components/common/pointDelyDemandListModal.vue';
|
||||||
import { useModal } from '/@/components/Modal';
|
import { useModal } from '/@/components/Modal';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import { getCompDept } from '/@/api/approve/Appro';
|
import { getCompDept } from '/@/api/approve/Appro';
|
||||||
import { useUserStore } from '/@/store/modules/user';
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
import { getLngPngDemandContractList, getLngPngDemandPointDely } from '/@/api/dayPlan/Demand';
|
import { getLngPngDemandContractList, getLngPngDemandPointDely, getLngPngDemandContractQty, getLngPngDemandPurList, getLngPngDemandRate } from '/@/api/dayPlan/Demand';
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const userInfo = userStore.getUserInfo;
|
const userInfo = userStore.getUserInfo;
|
||||||
|
const router = useRouter();
|
||||||
|
const { currentRoute } = router;
|
||||||
|
const pageId = ref(currentRoute.value.query?.id)
|
||||||
|
const formRef = ref()
|
||||||
|
const rules= reactive({
|
||||||
|
pointDelyName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
|
datePlan: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
|
kName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
|
});
|
||||||
|
const layout = {
|
||||||
|
labelCol: { span: 9 },
|
||||||
|
wrapperCol: { span: 18 },
|
||||||
|
}
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const [registerContract, { openModal:openModalContractSales}] = useModal();
|
const [registerContract, { openModal:openModalContractSales}] = useModal();
|
||||||
const [registerUpLoad, { openModal:openModalUpLoad}] = useModal();
|
const [registerUpLoad, { openModal:openModalUpLoad}] = useModal();
|
||||||
@ -117,88 +137,161 @@
|
|||||||
|
|
||||||
});
|
});
|
||||||
const columns= ref([
|
const columns= ref([
|
||||||
{ title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 100},
|
{ title: t('序号'), dataIndex: 'index', key: 'index', customRender: (column) => `${column.index + 1}` ,width: 100},
|
||||||
{ title: t('上载点'), dataIndex: 'pointUpName', sorter: true, width:200},
|
{ title: t('供应商'), dataIndex: 'suName', width: 300},
|
||||||
{ title: t('供应商'), dataIndex: 'suSname', sorter: true, width: 130},
|
{ title: t('上载点'), dataIndex: 'pointUpName', width:300},
|
||||||
{ title: t('采购合同'), dataIndex: 'kName', sorter: true, width: 200},
|
{ title: t('指定量(吉焦)'), dataIndex: 'qtyDemandGj', width: 200},
|
||||||
{ title: t('指定量(吉焦)'), dataIndex: 'qtyDemandGj', sorter: true, width: 300},
|
{ title: t('指定量(方)'), dataIndex: 'qtyDemandM3', width: 200},
|
||||||
{ title: t('指定量(方)'), dataIndex: 'qtyDemandM3', sorter: true, width: 200},
|
{ title: t('批复量(吉焦)'), dataIndex: 'qtySalesGj', width: 200},
|
||||||
{ title: t('批复量(吉焦)'), dataIndex: 'qtySalesGj', sorter: true, width: 200},
|
{ title: t('批复量(方)'), dataIndex: 'qtySalesM3', width: 200},
|
||||||
{ title: t('批复量(方)'), dataIndex: 'qtySalesM3', sorter: true, width: 200},
|
{ title: t('备注'), dataIndex: 'note', width: 200},
|
||||||
{ title: t('备注'), dataIndex: 'note', sorter: true, width: 200},
|
|
||||||
]);
|
]);
|
||||||
const formState = reactive({})
|
const formState = ref({
|
||||||
|
datePlan: null,
|
||||||
|
lastVerSign: 'Y',
|
||||||
|
validSign: 'N',
|
||||||
|
alterSign: 'I',
|
||||||
|
approCode: 'WTJ'
|
||||||
|
})
|
||||||
const dataList = ref([])
|
const dataList = ref([])
|
||||||
const contractList = ref([])
|
const contractList = ref([])
|
||||||
const pointDelyList = ref([])
|
const pointDelyList = ref([])
|
||||||
onMounted(async () =>{
|
onMounted(async () =>{
|
||||||
const res = await getCompDept(userInfo.id)
|
const res = await getCompDept(userInfo.id)
|
||||||
formState.cuCode = res?.comp?.code
|
formState.value.cuCode = res?.comp?.code
|
||||||
|
formState.value.comId = res?.comp?.id
|
||||||
|
const res1 = await getLngPngDemandRate({}) || []
|
||||||
|
formState.value.rateM3Gj = res1[0].rateM3Gj
|
||||||
})
|
})
|
||||||
async function numChange () {
|
async function numChange (k, record) {
|
||||||
|
if (k == 'qtyDemandGj') {
|
||||||
|
record.qtyDemandM3 = Number(formState.value.rateM3Gj) ? Number(record.qtyDemandGj)/Number(formState.value.rateM3Gj) : ''
|
||||||
|
} else {
|
||||||
|
record.qtyDemandGj = Number(record.qtyDemandM3)*Number(formState.value.rateM3Gj) || ''
|
||||||
|
}
|
||||||
|
record.qtyDemandM3 = record.qtyDemandM3 ? record.qtyDemandM3.toFixed(5) : ''
|
||||||
|
record.qtyDemandGj = record.qtyDemandGj ? record.qtyDemandGj.toFixed(5) : ''
|
||||||
let num = 0;
|
let num = 0;
|
||||||
let num1 = 1;
|
let num1 = 0;
|
||||||
dataList.forEach(v => {
|
dataList.value.forEach(v => {
|
||||||
num+=(Number(v.qtySalesGj) || 0)
|
num+=(Number(v.qtyDemandM3) || 0)
|
||||||
num1+=(Number(v.qtySalesM3) || 0)
|
num1+=(Number(v.qtyDemandGj) || 0)
|
||||||
})
|
})
|
||||||
formState.qtySalesGj = num
|
formState.value.qtyDemandM3 = num ? num.toFixed(5) : ''
|
||||||
formState.qtySalesM3 = num1
|
formState.value.qtyDemandGj = num1 ? num1.toFixed(5) : ''
|
||||||
}
|
}
|
||||||
const datePlanChange = async (val) => {
|
const datePlanChange = async (val) => {
|
||||||
if (!val) return
|
if (!val) {
|
||||||
|
formState.value = {}
|
||||||
|
dataList.value = []
|
||||||
|
return
|
||||||
|
}
|
||||||
let obj = {
|
let obj = {
|
||||||
cuCode:formState.cuCode,
|
cuCode:formState.value.cuCode,
|
||||||
datePlan: dayjs(formState.datePlan).format('YYYY-MM-DD')
|
datePlan: dayjs(formState.value.datePlan).format('YYYY-MM-DD')
|
||||||
}
|
}
|
||||||
let res = await getLngPngDemandContractList(obj)
|
let res = await getLngPngDemandContractList(obj)
|
||||||
contractList.value = res || []
|
contractList.value = res || []
|
||||||
if (contractList.value.length == 1) {
|
if (contractList.value.length == 1) {
|
||||||
formState.kName = contractList.value[0].kName
|
formState.value.kName = contractList.value[0].kName
|
||||||
formState.ksId = contractList.value[0].id
|
formState.value.ksId = contractList.value[0].id
|
||||||
|
getPointDely()
|
||||||
|
getContractQty()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const onSearch = (val)=> {
|
const onSearch = ()=> {
|
||||||
if (!formState.datePlan) {
|
if (!formState.value.datePlan) {
|
||||||
message.warn('请选择计划日期')
|
message.warn('请选择计划日期')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
openModalContractSales(true,{isUpdate: false, list: contractList.value})
|
openModalContractSales(true,{isUpdate: false, list: contractList.value})
|
||||||
}
|
}
|
||||||
const handleSuccessContract = async(val) => {
|
const handleSuccessContract = (val) => {
|
||||||
formState.kName = val[0].kName
|
formState.value.kName = val[0].kName
|
||||||
formState.ksId = val[0].id
|
formState.value.ksId = val[0].id
|
||||||
let res = await getLngPngDemandPointDely({kId: formState.ksId})
|
getPointDely()
|
||||||
pointDelyList.value = res || []
|
getContractQty()
|
||||||
if (pointDelyList.value.length == 1) {
|
|
||||||
formState.pointDelyName = contractList.value[0].kName
|
|
||||||
formState.pointDelyCode = contractList.value[0].id
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
const onSearchUpLoad = (val)=> {
|
const onSearchUpLoad = (val)=> {
|
||||||
if (!formState.kName) {
|
if (!formState.value.kName) {
|
||||||
message.warn('请选择合同')
|
message.warn('请选择合同')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
openModalUpLoad(true,{isUpdate: false, list: pointDelyList.value})
|
openModalUpLoad(true,{isUpdate: false, list: pointDelyList.value})
|
||||||
}
|
}
|
||||||
const handleSuccessUpLoad = (val) => {
|
const handleSuccessUpLoad = (val) => {
|
||||||
formState.kName = val[0].kName
|
formState.value.pointDelyName = val[0].pointDelyName
|
||||||
formState.ksId = val[0].id
|
formState.value.pointDelyCode = val[0].pointDelyCode
|
||||||
|
formState.value.ksppId = val[0].id
|
||||||
|
getPurList()
|
||||||
|
}
|
||||||
|
const getPointDely = async () => {
|
||||||
|
let res = await getLngPngDemandPointDely({kId: formState.value.ksId})
|
||||||
|
pointDelyList.value = res || []
|
||||||
|
if (pointDelyList.value.length == 1) {
|
||||||
|
formState.value.pointDelyName = pointDelyList.value[0].pointDelyName
|
||||||
|
formState.value.pointDelyCode = pointDelyList.value[0].pointDelyCode
|
||||||
|
formState.value.ksppId = pointDelyList.value[0].id
|
||||||
|
getPurList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const getPurList = async () => {
|
||||||
|
let obj = {
|
||||||
|
ksppId: formState.value.ksppId,
|
||||||
|
datePlan: dayjs(formState.value.datePlan).format('YYYY-MM-DD')
|
||||||
|
}
|
||||||
|
let res = await getLngPngDemandPurList(obj)
|
||||||
|
dataList.value = res || []
|
||||||
|
|
||||||
|
let num = 0;
|
||||||
|
let num1 = 0;
|
||||||
|
let num2 = 0
|
||||||
|
let num3 = 0
|
||||||
|
|
||||||
|
dataList.value.forEach(v=> {
|
||||||
|
v.qtyDemandGj = Number(v.qtyDemandM3)*Number(formState.value.rateM3Gj) || ''
|
||||||
|
v.qtyDemandM3 = Number(formState.value.rateM3Gj) ? Number(v.qtyDemandGj)/Number(formState.value.rateM3Gj) : ''
|
||||||
|
|
||||||
|
v.qtyDemandM3 = Number(v.qtyDemandM3)? (Number(v.qtyDemandM3) / 10000) : ''
|
||||||
|
v.qtySalesM3 = Number(v.qtySalesM3)? (Number(v.qtySalesM3) / 10000) : ''
|
||||||
|
|
||||||
|
num+=(Number(v.qtySalesGj) || 0)
|
||||||
|
num1+=(Number(v.qtySalesM3) || 0)
|
||||||
|
num2+=(Number(v.qtyDemandM3) || 0)
|
||||||
|
num3+=(Number(v.qtyDemandGj) || 0)
|
||||||
|
|
||||||
|
})
|
||||||
|
formState.value.qtySalesGj = num ? num.toFixed(5) : ''
|
||||||
|
formState.value.qtySalesM3 = num1 ? num1.toFixed(5) : ''
|
||||||
|
formState.value.qtyDemandM3 = num2 ? num2.toFixed(5) : ''
|
||||||
|
formState.value.qtyDemandGj = num3 ? num3.toFixed(5) : ''
|
||||||
|
}
|
||||||
|
const getContractQty = async () => {
|
||||||
|
let obj = {
|
||||||
|
kId: formState.value.ksId,
|
||||||
|
datePlan: dayjs(formState.value.datePlan).format('YYYY-MM-DD')
|
||||||
|
}
|
||||||
|
let res = await getLngPngDemandContractQty(obj)
|
||||||
|
formState.value.qtyContractGj = res?.qtyContractGj
|
||||||
|
formState.value.qtyContractM3 = res?.qtyContractM3
|
||||||
|
formState.value.qtyContractM3 = Number(formState.value.qtyContractM3)? (Number(formState.value.qtyContractM3) / 10000) : ''
|
||||||
|
|
||||||
}
|
}
|
||||||
const disabledDateStart = (current) => {
|
const disabledDateStart = (current) => {
|
||||||
const today = new Date();
|
const today = new Date();
|
||||||
today.setHours(0, 0, 0, 0); // 清除时分秒,确保比较时不考虑时间部分
|
today.setHours(0, 0, 0, 0); // 清除时分秒,确保比较时不考虑时间部分
|
||||||
// 获取明天的日期
|
// 获取明天的日期
|
||||||
const tomorrow = new Date();
|
const tomorrow = new Date();
|
||||||
tomorrow.setDate(tomorrow.getDate() + 2);
|
tomorrow.setDate(tomorrow.getDate() + (pageId ? 1 : 2));
|
||||||
tomorrow.setHours(0, 0, 0, 0); // 清除时分秒
|
tomorrow.setHours(0, 0, 0, 0); // 清除时分秒
|
||||||
// 当前日期小于今天或大于明天,则禁用
|
// 当前日期小于今天或大于明天,则禁用
|
||||||
return current < today || current > tomorrow;
|
return current < today || current > tomorrow;
|
||||||
}
|
}
|
||||||
function getFormValue () {
|
async function getFormValue () {
|
||||||
|
await formRef.value.validateFields();
|
||||||
let obj = {
|
let obj = {
|
||||||
formInfo: formState,
|
formInfo: formState.value,
|
||||||
list: dataList.value
|
list: dataList.value
|
||||||
}
|
}
|
||||||
return obj
|
return obj
|
||||||
@ -207,7 +300,7 @@
|
|||||||
() => props.formObj,
|
() => props.formObj,
|
||||||
(val) => {
|
(val) => {
|
||||||
if (val) {
|
if (val) {
|
||||||
Object.assign(formState, {...val})
|
formState.value = val
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -219,6 +312,7 @@
|
|||||||
() => props.list,
|
() => props.list,
|
||||||
(val) => {
|
(val) => {
|
||||||
dataList.value = val
|
dataList.value = val
|
||||||
|
console.log(dataList.value, 88888888888)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
immediate: true,
|
immediate: true,
|
||||||
@ -237,8 +331,8 @@
|
|||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
i{
|
.ant-input-number{
|
||||||
padding: 5px;
|
margin:0 5px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
span{
|
span{
|
||||||
|
|||||||
@ -1,14 +1,27 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-spin :spinning="spinning" tip="加载中...">
|
<a-spin :spinning="spinning" tip="加载中...">
|
||||||
<div class="page-bg-wrap formViewStyle">
|
<div class="page-bg-wrap formViewStyle pdcss">
|
||||||
<a-form ref="formRef" :model="formState" :rules="rules" v-bind="layout">
|
<div class="top-toolbar" >
|
||||||
|
<a-button style="margin-right: 10px" @click="close">
|
||||||
|
<slot name="icon"><close-outlined /></slot>关闭
|
||||||
|
</a-button>
|
||||||
|
<template v-if="currentRoute.query.type!=='compare'">
|
||||||
|
<a-button style="margin-right: 10px" type="primary" @click="checkBtn('save')" v-if="!currentRoute.query.type">
|
||||||
|
<slot name="icon"><save-outlined /></slot>保存
|
||||||
|
</a-button>
|
||||||
|
<a-button style="margin-right: 10px" @click="checkBtn('submit')" v-if="!currentRoute.query.type">
|
||||||
|
<slot name="icon"><send-outlined /></slot>保存并提交
|
||||||
|
</a-button>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
|
||||||
<Card :title="title" :bordered="false" >
|
<Card :title="title" :bordered="false" >
|
||||||
<basicForm ref="basicFormRef" :formObj="formState" :list="dataList" :disable="currentRoute.query.type"></basicForm>
|
<basicForm ref="formRef" :formObj="formState" :list="dataList" :disable="currentRoute.query.type"></basicForm>
|
||||||
</Card>
|
</Card>
|
||||||
<Card :title="title" :bordered="false" v-if="currentRoute.query.type=='compare'">
|
<Card :title="title" :bordered="false" v-if="currentRoute.query.type=='compare'">
|
||||||
<basicForm ref="basicFormRef" :formObj="formState" :list="dataList" :disable="currentRoute.query.type"></basicForm>
|
<basicForm :formObj="formState" :list="dataList" :disable="currentRoute.query.type"></basicForm>
|
||||||
</Card>
|
</Card>
|
||||||
</a-form>
|
|
||||||
</div>
|
</div>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
</template>
|
</template>
|
||||||
@ -18,7 +31,7 @@
|
|||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { FromPageType, RecordType } from '/@/enums/workflowEnum';
|
import { FromPageType, RecordType } from '/@/enums/workflowEnum';
|
||||||
import { ref, computed, onMounted, onBeforeMount, nextTick, defineAsyncComponent, reactive, defineComponent, watch} from 'vue';
|
import { ref, computed, onMounted, onBeforeMount, nextTick, defineAsyncComponent, reactive, defineComponent, watch} from 'vue';
|
||||||
import { CheckCircleOutlined, StopOutlined, CloseOutlined, } from '@ant-design/icons-vue';
|
import { SendOutlined, SaveOutlined, CloseOutlined, } from '@ant-design/icons-vue';
|
||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
import { useI18n } from '/@/hooks/web/useI18n';
|
import { useI18n } from '/@/hooks/web/useI18n';
|
||||||
import { useMultipleTabStore } from '/@/store/modules/multipleTab';
|
import { useMultipleTabStore } from '/@/store/modules/multipleTab';
|
||||||
@ -26,7 +39,7 @@
|
|||||||
import type { Rule } from 'ant-design-vue/es/form';
|
import type { Rule } from 'ant-design-vue/es/form';
|
||||||
import { getDictionary } from '/@/api/sales/Customer';
|
import { getDictionary } from '/@/api/sales/Customer';
|
||||||
import { useModal } from '/@/components/Modal';
|
import { useModal } from '/@/components/Modal';
|
||||||
import { getLngPngAppro,approveLngPngAppro } from '/@/api/dayPlan/PngAppro';
|
import { addLngPngDemand, submitLngPngDemand,getLngPngDemand } from '/@/api/dayPlan/Demand';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import { getAppEnvConfig } from '/@/utils/env';
|
import { getAppEnvConfig } from '/@/utils/env';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
@ -64,17 +77,11 @@
|
|||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const hasDel = ref(false)
|
const hasDel = ref(false)
|
||||||
const formState = reactive({
|
const formState = reactive({
|
||||||
|
datePlan: null
|
||||||
});
|
});
|
||||||
const [register, { openModal:openModal}] = useModal();
|
const [register, { openModal:openModal}] = useModal();
|
||||||
const rules= reactive({
|
|
||||||
// kNo: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
const title = ref('管道气需求')
|
||||||
});
|
|
||||||
const layout = {
|
|
||||||
labelCol: { span: 9 },
|
|
||||||
wrapperCol: { span: 18 },
|
|
||||||
}
|
|
||||||
const title = ref('日计划审批')
|
|
||||||
const dataList = ref([])
|
const dataList = ref([])
|
||||||
const basicFormRef = ref()
|
const basicFormRef = ref()
|
||||||
let optionSelect= reactive({
|
let optionSelect= reactive({
|
||||||
@ -92,7 +99,6 @@
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getOption()
|
|
||||||
if (pageId.value) {
|
if (pageId.value) {
|
||||||
getInfo(pageId.value)
|
getInfo(pageId.value)
|
||||||
}
|
}
|
||||||
@ -101,97 +107,88 @@
|
|||||||
async function getInfo(id) {
|
async function getInfo(id) {
|
||||||
spinning.value = true
|
spinning.value = true
|
||||||
try {
|
try {
|
||||||
let data = await getLngPngAppro(id)
|
let data = await getLngPngDemand(id)
|
||||||
spinning.value = false
|
spinning.value = false
|
||||||
Object.assign(formState, {...data})
|
let obj = changeData(data)
|
||||||
Object.assign(dataList.value, formState.lngPngApproPurList || [{}])
|
Object.assign(formState, {...obj.params})
|
||||||
const startDate = dayjs(formState.datePlan);
|
Object.assign(dataList.value, obj.list || [{}])
|
||||||
const endDate = dayjs(new Date());
|
|
||||||
const diffInDays = endDate.diff(startDate, 'day');
|
|
||||||
if (diffInDays == 0) {
|
|
||||||
formState.dayDesc = '当日'
|
|
||||||
} else if (diffInDays == 1) {
|
|
||||||
formState.dayDesc = '次日'
|
|
||||||
} else if (diffInDays > 1) {
|
|
||||||
formState.dayDesc = diffInDays + '日后'
|
|
||||||
} else {
|
|
||||||
formState.dayDesc = ''
|
|
||||||
}
|
|
||||||
formState.qtyContractM3 = Number(formState.qtyContractM3)/10000
|
|
||||||
formState.qtyPlanM3 = Number(formState.qtyPlanM3)/10000
|
|
||||||
formState.qtyDemandM3 = Number(formState.qtyDemandM3)/10000
|
|
||||||
formState.qtySalesM3 = Number(formState.qtySalesM3)/10000
|
|
||||||
|
|
||||||
dataList.value.forEach(v => {
|
|
||||||
v.qtyDemandM3 = Number(v.qtyDemandM3)/10000
|
|
||||||
v.qtySalesM3 = Number(v.qtySalesM3)/10000
|
|
||||||
});
|
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error, 'error')
|
console.log(error, 'error')
|
||||||
spinning.value = false
|
spinning.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async function numChange () {
|
const changeData = (obj) => {
|
||||||
let num = 0;
|
let arr = obj.lngPngDemandPurList || [{}]
|
||||||
let num1 = 1;
|
obj.datePlan = obj.datePlan ? dayjs(obj.datePlan) : null
|
||||||
dataList.value.forEach(v => {
|
obj.qtyContractM3 = Number(obj.qtyContractM3)/10000
|
||||||
num+=(Number(v.qtySalesGj) || 0)
|
obj.qtyPlanM3 = Number(obj.qtyPlanM3)/10000
|
||||||
num1+=(Number(v.qtySalesM3) || 0)
|
obj.qtyDemandM3 = Number(obj.qtyDemandM3)/10000
|
||||||
})
|
obj.qtySalesM3 = Number(obj.qtySalesM3)/10000
|
||||||
formState.qtySalesGj = num
|
|
||||||
formState.qtySalesM3 = num1
|
arr.forEach(v => {
|
||||||
}
|
v.qtyDemandM3 = Number(v.qtyDemandM3)/10000
|
||||||
async function getOption() {
|
v.qtySalesM3 = Number(v.qtySalesM3)/10000
|
||||||
optionSelect.approCodeList = await getDictionary('LNG_APPRO')
|
|
||||||
|
|
||||||
}
|
v.qtyDemandM3 = Number(v.qtyDemandM3) ? Number(v.qtyDemandM3).toFixed(5) : ''
|
||||||
|
v.qtySalesM3 = Number(v.qtySalesM3) ? Number(v.qtySalesM3).toFixed(5) : ''
|
||||||
|
});
|
||||||
|
|
||||||
|
obj.qtyContractM3 = Number(obj.qtyContractM3) ? Number(obj.qtyContractM3).toFixed(5) : ''
|
||||||
|
obj.qtyPlanM3 = Number(obj.qtyPlanM3) ? Number(obj.qtyPlanM3).toFixed(5) : ''
|
||||||
|
obj.qtyDemandM3 = Number(obj.qtyDemandM3) ? Number(obj.qtyDemandM3).toFixed(5) : ''
|
||||||
|
obj.qtySalesM3 = Number(obj.qtySalesM3) ? Number(obj.qtySalesM3).toFixed(5) : ''
|
||||||
|
|
||||||
|
return {
|
||||||
|
list : arr,
|
||||||
|
params: obj
|
||||||
|
}
|
||||||
|
}
|
||||||
function close() {
|
function close() {
|
||||||
tabStore.closeTab(currentRoute.value, router);
|
tabStore.closeTab(currentRoute.value, router);
|
||||||
}
|
}
|
||||||
async function checkBtn(type) {
|
async function checkBtn(type) {
|
||||||
let data = basicFormRef.value.getFormValue()
|
|
||||||
console.log(data, 'data')
|
|
||||||
let arr = JSON.parse(JSON.stringify(data.list))
|
|
||||||
arr.forEach(v=> {
|
|
||||||
v.qtyDemandM3 = Number(v.qtyDemandM3)*10000
|
|
||||||
v.qtySalesM3 = Number(v.qtySalesM3)*10000
|
|
||||||
})
|
|
||||||
let obj = {
|
|
||||||
...data.formInfo,
|
|
||||||
qtyContractM3: Number(data.formInfo.qtyContractM3)*10000,
|
|
||||||
qtyPlanM3: Number(data.formInfo.qtyPlanM3)*10000,
|
|
||||||
qtyDemandM3: Number(data.formInfo.qtyDemandM3)*10000,
|
|
||||||
qtySalesM3: Number(data.formInfo.qtySalesM3)*10000,
|
|
||||||
lngPngApproPurList:arr
|
|
||||||
}
|
|
||||||
let params = {
|
|
||||||
result: type == 'agree' ? 'C' : 'R',
|
|
||||||
remark: formState.reply,
|
|
||||||
data: obj
|
|
||||||
}
|
|
||||||
spinning.value = true;
|
|
||||||
try {
|
try {
|
||||||
if (type == 'reject') {
|
const data = await formRef.value.getFormValue();
|
||||||
if (!formState.reply) {
|
let arr = JSON.parse(JSON.stringify(data.list))
|
||||||
message.warn('请输入批复意见')
|
arr.forEach(v=> {
|
||||||
return
|
v.qtyDemandM3 = Number(v.qtyDemandM3)*10000
|
||||||
}
|
v.qtySalesM3 = Number(v.qtySalesM3)*10000
|
||||||
|
})
|
||||||
|
let obj = {
|
||||||
|
...data.formInfo,
|
||||||
|
datePlan: dayjs(data.formInfo.datePlan).format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
qtyContractM3: Number(data.formInfo.qtyContractM3)*10000,
|
||||||
|
qtyPlanM3: Number(data.formInfo.qtyPlanM3)*10000,
|
||||||
|
qtyDemandM3: Number(data.formInfo.qtyDemandM3)*10000,
|
||||||
|
qtySalesM3: Number(data.formInfo.qtySalesM3)*10000,
|
||||||
|
lngPngDemandPurList:arr
|
||||||
}
|
}
|
||||||
await approveLngPngAppro(params);
|
spinning.value = true;
|
||||||
|
let request = ''
|
||||||
|
request = type == 'save'? addLngPngDemand : submitLngPngDemand
|
||||||
|
await request(obj)
|
||||||
spinning.value = false;
|
spinning.value = false;
|
||||||
notification.success({
|
notification.success({
|
||||||
message: 'Tip',
|
message: 'Tip',
|
||||||
description: type == 'agree' ? '审批通过':'已驳回'
|
description: type == 'save' ? '保存成功':'已提交'
|
||||||
}); //提示消息
|
}); //提示消息
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
bus.emit(FORM_LIST_MODIFIED, {});
|
bus.emit(FORM_LIST_MODIFIED, {});
|
||||||
close();
|
close();
|
||||||
}, 500);
|
}, 500);
|
||||||
}catch (errorInfo) {
|
|
||||||
spinning.value = false;
|
} catch (errorInfo) {
|
||||||
|
spinning.value = false;
|
||||||
|
errorInfo?.errorFields?.length && notification.warning({
|
||||||
|
message: 'Tip',
|
||||||
|
description: '请完善信息'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -205,6 +202,9 @@
|
|||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
border-bottom: 1px solid #eee;
|
border-bottom: 1px solid #eee;
|
||||||
}
|
}
|
||||||
|
.pdcss {
|
||||||
|
padding:0px 12px 6px 12px !important;
|
||||||
|
}
|
||||||
.dot {
|
.dot {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@ -180,11 +180,13 @@
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/form/Demand/' + record.id + '/viewForm',
|
path: '/dayPlan/Demand/createForm',
|
||||||
query: {
|
query: {
|
||||||
formPath: 'dayPlan/Demand',
|
formPath: 'dayPlan/Demand',
|
||||||
formName: formName,
|
formName: formName,
|
||||||
formId:currentRoute.value.meta.formId
|
formId:currentRoute.value.meta.formId,
|
||||||
|
id: record.Id,
|
||||||
|
type:'view'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -217,13 +219,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleEdit(record: Recordable) {
|
function handleEdit(record: Recordable) {
|
||||||
|
|
||||||
router.push({
|
router.push({
|
||||||
path: '/form/Demand/' + record.id + '/updateForm',
|
path: '/dayPlan/Demand/createForm',
|
||||||
query: {
|
query: {
|
||||||
formPath: 'dayPlan/Demand',
|
formPath: 'dayPlan/Demand',
|
||||||
formName: formName,
|
formName: formName,
|
||||||
formId:currentRoute.value.meta.formId
|
formId:currentRoute.value.meta.formId,
|
||||||
|
id: record.Id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,90 +1,108 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span="8">
|
<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>
|
||||||
<a-col :span="8">
|
<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>
|
||||||
<a-col :span="8">
|
<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>
|
||||||
<a-col :span="8">
|
<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>
|
||||||
<a-col :span="8">
|
<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>
|
||||||
<a-col :span="8">
|
<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>
|
||||||
<a-col :span="8">
|
<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>
|
||||||
<a-col :span="8">
|
<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>
|
||||||
<a-col :span="8">
|
<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>
|
||||||
<a-col :span="8">
|
<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>
|
||||||
<a-col :span="8">
|
<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>
|
||||||
<a-col :span="8">
|
<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>
|
||||||
<a-col :span="8">
|
<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>
|
||||||
<a-col :span="8">
|
<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>
|
||||||
<a-col :span="8">
|
<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>
|
||||||
<a-col :span="8">
|
<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>
|
||||||
<a-col :span="8">
|
<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>
|
||||||
<a-col :span="24">
|
<a-col :span="8">
|
||||||
<a-form-item label="下载点" name="poinDelyName" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
|
<a-form-item label="下载点" name="poinDelyName" :class="diffResultList.includes('poinDelyName') ? 'changeStyle': ''">
|
||||||
{{ formState.pointDelyName }}
|
{{ formState.pointDelyName }}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<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>
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-item label="开机方式" name="" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
|
<a-form-item label="开机方式" name="" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
|
||||||
<div style="display: flex;">
|
<div style="display: flex;">
|
||||||
<div class="dot"><span style="background:#04F21C"></span>连运<i>{{ formState.powerCont }}</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>{{ 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>{{ formState.powerStop }}</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>{{ formState.powerOther }}</i>台</div>
|
<div class="dot"><span style="background:#CA90FF"></span>其他<i :class="diffResultList.includes('powerOther') ? 'changeStyle': ''">{{ formState.powerOther }}</i>台</div>
|
||||||
</div>
|
</div>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24">
|
<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 }}
|
{{ formState.note }}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</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: 100}">
|
||||||
<template #bodyCell="{ column, record, index }">
|
<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'">
|
<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>
|
||||||
<template v-if="column.dataIndex === 'qtySalesM3'">
|
<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%" />
|
<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>
|
||||||
<template v-if="column.dataIndex === 'note'">
|
<template v-if="column.dataIndex === 'note'" >
|
||||||
<a-input v-model:value="record.note" :disabled="record.alterSign=='D' || disable" style="width: 100%" />
|
<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>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
@ -92,14 +110,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<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';
|
import { ref, computed, onMounted, onBeforeMount, nextTick, defineAsyncComponent, reactive, defineComponent, watch} from 'vue';
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
formObj: {},
|
formObj: {},
|
||||||
list: [],
|
list: [],
|
||||||
disable: false
|
disable: false,
|
||||||
|
changeList: []
|
||||||
|
|
||||||
});
|
});
|
||||||
const columns= ref([
|
const columns= ref([
|
||||||
@ -115,6 +133,7 @@ import { useI18n } from '/@/hooks/web/useI18n';
|
|||||||
]);
|
]);
|
||||||
const formState = ref()
|
const formState = ref()
|
||||||
const dataList = ref([])
|
const dataList = ref([])
|
||||||
|
const diffResultList = ref([])
|
||||||
async function numChange () {
|
async function numChange () {
|
||||||
let num = 0;
|
let num = 0;
|
||||||
let num1 = 0;
|
let num1 = 0;
|
||||||
@ -154,6 +173,16 @@ import { useI18n } from '/@/hooks/web/useI18n';
|
|||||||
deep: true,
|
deep: true,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
watch(
|
||||||
|
() => props.changeList,
|
||||||
|
(val) => {
|
||||||
|
diffResultList.value = val || []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
immediate: true,
|
||||||
|
deep: true,
|
||||||
|
}
|
||||||
|
);
|
||||||
defineExpose({
|
defineExpose({
|
||||||
getFormValue
|
getFormValue
|
||||||
});
|
});
|
||||||
@ -178,4 +207,7 @@ import { useI18n } from '/@/hooks/web/useI18n';
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.changeStyle {
|
||||||
|
color: red !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<Card :title="titleNew" :bordered="false" v-if="currentRoute.query.type=='compare'&&titleNew">
|
<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>
|
||||||
<Card :title="title" :bordered="false" >
|
<Card :title="title" :bordered="false" >
|
||||||
<basicForm ref="basicFormRef" :formObj="formState" :list="dataList" :disable="currentRoute.query.type"></basicForm>
|
<basicForm ref="basicFormRef" :formObj="formState" :list="dataList" :disable="currentRoute.query.type"></basicForm>
|
||||||
@ -102,6 +102,7 @@
|
|||||||
const dataList = ref([])
|
const dataList = ref([])
|
||||||
const dataListNew = ref([])
|
const dataListNew = ref([])
|
||||||
const basicFormRef = ref()
|
const basicFormRef = ref()
|
||||||
|
const diffResultList = ref([])
|
||||||
let optionSelect= reactive({
|
let optionSelect= reactive({
|
||||||
approCodeList: [],
|
approCodeList: [],
|
||||||
});
|
});
|
||||||
@ -121,17 +122,18 @@
|
|||||||
try {
|
try {
|
||||||
let data = await getLngPngApproCompare(id) || []
|
let data = await getLngPngApproCompare(id) || []
|
||||||
spinning.value = false
|
spinning.value = false
|
||||||
|
diffResultList.value = data.diffResultList || []
|
||||||
let obj = changeData(data.oldBean)
|
let obj = changeData(data.oldBean)
|
||||||
Object.assign(formState, {...obj.params})
|
Object.assign(formState, {...obj.params})
|
||||||
Object.assign(dataList.value, obj.list || [{}])
|
Object.assign(dataList.value, obj.list || [{}])
|
||||||
title.value = '版本V'+ formState.verNo
|
title.value = '版本V'+ formState.verNo
|
||||||
|
|
||||||
let obj1 = changeData(data.newBean)
|
let obj1 = changeData(data.newBean || {})
|
||||||
Object.assign(formStateNew, {...obj1.params})
|
Object.assign(formStateNew, {...obj1.params})
|
||||||
Object.assign(dataListNew.value, obj1.list || [{}])
|
Object.assign(dataListNew.value, obj1.list || [{}])
|
||||||
titleNew.value = '版本V'+ formStateNew.verNo
|
titleNew.value = formStateNew.verNo ? ('版本V'+ formStateNew.verNo) : ''
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
spinning.value = false
|
spinning.value = false
|
||||||
@ -151,6 +153,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const changeData = (obj) => {
|
const changeData = (obj) => {
|
||||||
|
console.log(obj.lngPngApproPurList, 9999)
|
||||||
let arr = obj.lngPngApproPurList || [{}]
|
let arr = obj.lngPngApproPurList || [{}]
|
||||||
// const startDate = dayjs(obj.datePlan);
|
// const startDate = dayjs(obj.datePlan);
|
||||||
// const endDate = dayjs(new Date());
|
// const endDate = dayjs(new Date());
|
||||||
@ -170,7 +173,7 @@
|
|||||||
obj.qtySalesM3 = Number(obj.qtySalesM3)/10000
|
obj.qtySalesM3 = Number(obj.qtySalesM3)/10000
|
||||||
let num = 0;
|
let num = 0;
|
||||||
let num1 = 0;
|
let num1 = 0;
|
||||||
arr.forEach(v => {
|
arr.length && arr.forEach(v => {
|
||||||
v.qtyDemandM3 = Number(v.qtyDemandM3)/10000
|
v.qtyDemandM3 = Number(v.qtyDemandM3)/10000
|
||||||
v.qtySalesM3 = Number(v.qtySalesM3)/10000
|
v.qtySalesM3 = Number(v.qtySalesM3)/10000
|
||||||
num+=(Number(v.qtySalesGj) || 0)
|
num+=(Number(v.qtySalesGj) || 0)
|
||||||
|
|||||||
@ -26,6 +26,7 @@
|
|||||||
<PngApproModal @register="registerModal" @success="handleSuccess" />
|
<PngApproModal @register="registerModal" @success="handleSuccess" />
|
||||||
<DataLog :logId="logId" :logPath="logPath" v-model:visible="modalVisible"/>
|
<DataLog :logId="logId" :logPath="logPath" v-model:visible="modalVisible"/>
|
||||||
<approStatusModal @register="registerApproStatus" ></approStatusModal>
|
<approStatusModal @register="registerApproStatus" ></approStatusModal>
|
||||||
|
<rejectReplyModal @register="registerRejectReply" @success="handleRejectReply" />
|
||||||
</PageWrapper>
|
</PageWrapper>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
@ -58,6 +59,7 @@
|
|||||||
import Icon from '/@/components/Icon/index';
|
import Icon from '/@/components/Icon/index';
|
||||||
import FlowRecord from '/@/views/workflow/task/components/flow/FlowRecord.vue';
|
import FlowRecord from '/@/views/workflow/task/components/flow/FlowRecord.vue';
|
||||||
import approStatusModal from '/@/components/common/approStatusModal.vue';
|
import approStatusModal from '/@/components/common/approStatusModal.vue';
|
||||||
|
import rejectReplyModal from '/@/components/common/rejectReplyModal.vue';
|
||||||
|
|
||||||
import useEventBus from '/@/hooks/event/useEventBus';
|
import useEventBus from '/@/hooks/event/useEventBus';
|
||||||
import { cloneDeep } from 'lodash-es';
|
import { cloneDeep } from 'lodash-es';
|
||||||
@ -114,7 +116,9 @@
|
|||||||
const visibleFlowRecordModal = ref(false);
|
const visibleFlowRecordModal = ref(false);
|
||||||
const [registerModal, { openModal}] = useModal();
|
const [registerModal, { openModal}] = useModal();
|
||||||
const [registerApproStatus, { openModal: openModalApproStatus}] = useModal();
|
const [registerApproStatus, { openModal: openModalApproStatus}] = useModal();
|
||||||
|
const [registerRejectReply, { openModal: openModalRejectReply}] = useModal();
|
||||||
|
|
||||||
|
const curData = ref({})
|
||||||
let formName='管道气销售审批';
|
let formName='管道气销售审批';
|
||||||
let curPath = 'dayPlan/PngAppro/index'
|
let curPath = 'dayPlan/PngAppro/index'
|
||||||
let request = ''
|
let request = ''
|
||||||
@ -263,18 +267,22 @@
|
|||||||
description: t('审批成功!'),
|
description: t('审批成功!'),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
async function handleReject (record: Recordable) {
|
function handleReject (record: Recordable) {
|
||||||
|
curData.value = record
|
||||||
|
openModalRejectReply(true,{isUpdate: false});
|
||||||
|
}
|
||||||
|
const handleRejectReply = async (val) => {
|
||||||
let obj = {
|
let obj = {
|
||||||
"result": "R",
|
"result": "R",
|
||||||
"remark": "",
|
"remark": val.reply,
|
||||||
"data": [{datePlan: record.datePlan}]
|
"data": [{datePlan: curData.value.datePlan}]
|
||||||
}
|
}
|
||||||
await requestApprove(obj)
|
await requestApprove(obj)
|
||||||
handleSuccess();
|
handleSuccess();
|
||||||
notification.success({
|
notification.success({
|
||||||
message: 'Tip',
|
message: 'Tip',
|
||||||
description: t('已拒绝!'),
|
description: t('已驳回!'),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
async function handleBatchApprove () {
|
async function handleBatchApprove () {
|
||||||
if (!selectedKeys.value.length) {
|
if (!selectedKeys.value.length) {
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<PageWrapper dense fixedHeight contentFullHeight contentClass="flex" class="PngMeasureSalesPurStyle">
|
<PageWrapper dense fixedHeight contentFullHeight contentClass="flex" class="PngMeasureSalesPurStyle">
|
||||||
<a-table :loading="loading" :columns="columns" :data-source="tableData" :row-selection="{ selectedRowKeys: selectedKeys, onChange: onSelectChange }"
|
<BasicTable :loading="loading" :columns="columns" :data-source="tableData" :row-selection="{ selectedRowKeys: selectedKeys, onChange: onSelectChange }"
|
||||||
rowKey="id" :pagination="pagination" @row-dbClick="dbClickRow" :scroll="{x: 2000}">
|
rowKey="id" :pagination="pagination" @row-dbClick="dbClickRow" :scroll="{x: 2000}">
|
||||||
|
|
||||||
<template #bodyCell="{ column, record, index }">
|
<template #bodyCell="{ column, record, index }">
|
||||||
@ -42,7 +42,7 @@
|
|||||||
<TableAction :actions="getActions(record)" />
|
<TableAction :actions="getActions(record)" />
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</BasicTable>
|
||||||
|
|
||||||
<PngMeasureSalesPurModal @register="registerModal" @success="handleSuccess" />
|
<PngMeasureSalesPurModal @register="registerModal" @success="handleSuccess" />
|
||||||
<ImportModal @register="registerImportModal" importUrl="/dayPlan/pngMeasureSalesPur/import" @success="handleImportSuccess"/>
|
<ImportModal @register="registerImportModal" importUrl="/dayPlan/pngMeasureSalesPur/import" @success="handleImportSuccess"/>
|
||||||
@ -167,7 +167,7 @@
|
|||||||
page: currentPage.value,
|
page: currentPage.value,
|
||||||
...formState.value,
|
...formState.value,
|
||||||
});
|
});
|
||||||
tableData.value = res.list;
|
tableData.value = res.list || [];
|
||||||
total.value = res.total || res.length || 0;
|
total.value = res.total || res.length || 0;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('获取列表失败:', error);
|
console.error('获取列表失败:', error);
|
||||||
|
|||||||
Reference in New Issue
Block a user