客户需求对比
This commit is contained in:
@ -14,11 +14,71 @@ enum Api {
|
|||||||
PurList = '/magic-api/dayPlan/queryPngDemandPurList',
|
PurList = '/magic-api/dayPlan/queryPngDemandPurList',
|
||||||
Rate = '/magic-api/dayPlan/queryPngDemandRate',
|
Rate = '/magic-api/dayPlan/queryPngDemandRate',
|
||||||
saveAndSubmit = '/dayPlan/demand/saveAndSubmit',
|
saveAndSubmit = '/dayPlan/demand/saveAndSubmit',
|
||||||
|
toChange = '/dayPlan/demand/toChange',
|
||||||
|
compare = '/dayPlan/demand/compare',
|
||||||
|
withdraw = '/dayPlan/demand/withdraw',
|
||||||
|
submit = '/dayPlan/demand/submit',
|
||||||
|
cancel = 'dayPlan/demand/cancel',
|
||||||
Export = '/dayPlan/demand/export',
|
Export = '/dayPlan/demand/export',
|
||||||
|
|
||||||
|
|
||||||
DataLog = '/dayPlan/demand/datalog',
|
DataLog = '/dayPlan/demand/datalog',
|
||||||
}
|
}
|
||||||
|
export async function cancelLngPng(id: String, mode: ErrorMessageMode = 'modal') {
|
||||||
|
return defHttp.get<LngPngDemandPageModel>(
|
||||||
|
{
|
||||||
|
url: Api.cancel,
|
||||||
|
params: { id },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorMessageMode: mode,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
export async function submitLngPng(ids: string[], mode: ErrorMessageMode = 'modal') {
|
||||||
|
return defHttp.post<boolean>(
|
||||||
|
{
|
||||||
|
url: Api.submit,
|
||||||
|
data: ids,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorMessageMode: mode,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
export async function withdrawLngPng(ids: string[], mode: ErrorMessageMode = 'modal') {
|
||||||
|
return defHttp.post<boolean>(
|
||||||
|
{
|
||||||
|
url: Api.withdraw,
|
||||||
|
data: ids,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorMessageMode: mode,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
export async function getLngPngDemandCompare(id: String, mode: ErrorMessageMode = 'modal') {
|
||||||
|
return defHttp.get<LngPngDemandPageModel>(
|
||||||
|
{
|
||||||
|
url: Api.compare,
|
||||||
|
params: { id },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorMessageMode: mode,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
export async function getLngPngDemandUpdate(id: String, mode: ErrorMessageMode = 'modal') {
|
||||||
|
return defHttp.get<LngPngDemandPageModel>(
|
||||||
|
{
|
||||||
|
url: Api.toChange,
|
||||||
|
params: { id },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorMessageMode: mode,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
export async function submitLngPngDemand(lngPngDemand: Recordable, mode: ErrorMessageMode = 'modal') {
|
export async function submitLngPngDemand(lngPngDemand: Recordable, mode: ErrorMessageMode = 'modal') {
|
||||||
return defHttp.post<boolean>(
|
return defHttp.post<boolean>(
|
||||||
{
|
{
|
||||||
|
|||||||
@ -74,7 +74,7 @@
|
|||||||
|
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
//所有按钮
|
//所有按钮
|
||||||
const buttons = ref([{"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true},{"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true,"isUse":true},{"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"name":"发起审批","code":"startwork","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"查看流转记录","code":"flowRecord","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"审批","code":"approve","icon":"ant-design:check-outlined","isDefault":false,"isUse":true},{"name":"变更","code":"update","icon":"ant-design:edit-filled","isDefault":false,"isUse":true},{"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true}]);
|
const buttons = ref([{"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true,"type":"primary"},{"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true,"isUse":true},{"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"name":"发起审批","code":"startwork","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"查看流转记录","code":"flowRecord","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"审批","code":"approve","icon":"ant-design:check-outlined","isDefault":false,"isUse":true},{"name":"变更","code":"update","icon":"ant-design:edit-filled","isDefault":false,"isUse":true},{"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true}]);
|
||||||
//展示在列表内的按钮
|
//展示在列表内的按钮
|
||||||
const actionButtons = ref<string[]>(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord', 'approve', 'update']);
|
const actionButtons = ref<string[]>(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord', 'approve', 'update']);
|
||||||
const buttonConfigs = computed(()=>{
|
const buttonConfigs = computed(()=>{
|
||||||
|
|||||||
@ -3,96 +3,121 @@
|
|||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="计划日期" name="datePlan">
|
<a-form-item label="计划日期" name="datePlan">
|
||||||
<a-date-picker v-model:value="formState.datePlan" :disabled-date="disabledDateStart" style="width: 100%" :disabled="disable" placeholder="请选择计划日期" @change="datePlanChange" />
|
<div v-if="pageType=='compare'" :class="diffResultList.includes('datePlan')?'changeStyle':''">
|
||||||
|
{{ formState.datePlan ? dayjs(formState.datePlan).format('YYYY-MM-DD'): null }}
|
||||||
|
</div>
|
||||||
|
<a-date-picker v-else v-model:value="formState.datePlan" :disabled-date="disabledDateStart" style="width: 100%" :disabled="disable" placeholder="请选择计划日期" @change="datePlanChange" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="合同" name="kName">
|
<a-form-item label="合同" name="kName">
|
||||||
<a-input-search v-model:value="formState.kName" :disabled="disable" placeholder="请选择合同" readonly @search="onSearch"/>
|
<div v-if="pageType=='compare'" :class="diffResultList.includes('kName')?'changeStyle':''">{{ formState.kName }}</div>
|
||||||
|
<a-input-search v-else v-model:value="formState.kName" :disabled="disable" placeholder="请选择合同" readonly @search="onSearch"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="下载点" name="pointDelyName">
|
<a-form-item label="下载点" name="pointDelyName">
|
||||||
<a-input-search v-model:value="formState.pointDelyName" :disabled="disable" placeholder="请选择下载点" readonly @search="onSearchUpLoad"/>
|
<div v-if="pageType=='compare'" :class="diffResultList.includes('pointDelyName')?'changeStyle':''">{{ formState.pointDelyName }}</div>
|
||||||
|
<a-input-search v-else v-model:value="formState.pointDelyName" :disabled="disable" placeholder="请选择下载点" readonly @search="onSearchUpLoad"/>
|
||||||
</a-form-item>
|
</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="name">{{ formState.name }}</a-form-item>
|
<a-form-item label="交易主体" name="comName" :class="diffResultList.includes('comName')?'changeStyle':''">{{ formState.name }}</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="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>连运<a-input-number v-model:value="formState.powerCont" :disabled="disable" :precision="0"/>台</div>
|
<div class="dot"><span style="background:#04F21C"></span>连运<a-input-number v-model:value="formState.powerCont" :class="diffResultList.includes('powerCont')?'changeStyle':''" :disabled="disable" :precision="0"/>台</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:#FFFF00"></span>调峰<a-input-number v-model:value="formState.powerPeak" :class="diffResultList.includes('powerPeak')?'changeStyle':''" :disabled="disable" :precision="0"/>台</div>
|
||||||
<div class="dot"><span style="background:#D9001B"></span>停机<a-input-number v-model:value="formState.powerStop" :disabled="disable" :precision="0"/>台</div>
|
<div class="dot"><span style="background:#D9001B"></span>停机<a-input-number v-model:value="formState.powerStop" :class="diffResultList.includes('powerStop')?'changeStyle':''" :disabled="disable" :precision="0"/>台</div>
|
||||||
<div class="dot"><span style="background:#CA90FF"></span>其他<a-input-number v-model:value="formState.powerOther" :disabled="disable" :precision="0"/>台</div>
|
<div class="dot"><span style="background:#CA90FF"></span>其他<a-input-number v-model:value="formState.powerOther" :class="diffResultList.includes('powerOther')?'changeStyle':''" :disabled="disable" :precision="0"/>台</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 }">
|
||||||
<a-textarea v-model:value="formState.note" placeholder="请输入备注" :auto-size="{ minRows: 2, maxRows: 5 }"/>
|
<div v-if="pageType=='compare'" :class="diffResultList.includes('note')?'changeStyle':''">{{ formState.note }}</div>
|
||||||
|
<a-textarea v-else v-model:value="formState.note" :disabled="disable" placeholder="请输入备注" :auto-size="{ minRows: 2, maxRows: 5 }"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-item label="批复意见" name="reply" :label-col="{ span: 3 }" :wrapper-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 }"/>
|
<div v-if="pageType=='compare'" :class="diffResultList.includes('reply')?'changeStyle':''">{{ formState.reply }}</div>
|
||||||
|
<a-textarea v-else v-model:value="formState.reply" disabled :auto-size="{ minRows: 1, maxRows: 5 }"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</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 === 'pointUpName'">
|
||||||
|
<div :class="diffResultList.includes('lngPngDemandPurList[' + index + '].pointUpName') ? 'changeStyle': ''">{{ record.pointUpName }}</div>
|
||||||
|
</template>
|
||||||
|
<template v-if="column.dataIndex === 'suName'">
|
||||||
|
<div :class="diffResultList.includes('lngPngDemandPurList[' + index + '].suName') ? 'changeStyle': ''">{{ record.suName }}</div>
|
||||||
|
</template>
|
||||||
|
<template v-if="column.dataIndex === 'kpName'">
|
||||||
|
<div :class="diffResultList.includes('lngPngDemandPurList[' + index + '].kpName') ? 'changeStyle': ''">{{ record.kpName }}</div>
|
||||||
|
</template>
|
||||||
|
<template v-if="column.dataIndex === 'qtySalesGj'">
|
||||||
|
<div :class="diffResultList.includes('lngPngDemandPurList[' + index + '].qtySalesGj') ? 'changeStyle': ''">{{ record.qtySalesGj }}</div>
|
||||||
|
</template>
|
||||||
|
<template v-if="column.dataIndex === 'qtySalesM3'">
|
||||||
|
<div :class="diffResultList.includes('lngPngDemandPurList[' + index + '].qtySalesM3') ? 'changeStyle': ''">{{ record.qtySalesM3 }}</div>
|
||||||
|
</template>
|
||||||
<template v-if="column.dataIndex === 'qtyDemandGj'">
|
<template v-if="column.dataIndex === 'qtyDemandGj'">
|
||||||
<a-input-number v-model:value="record.qtyDemandGj" :disabled="disable" :min="0" @change="numChange('qtyDemandGj', record)" style="width: 100%" />
|
<a-input-number v-model:value="record.qtyDemandGj" :class="diffResultList.includes('lngPngDemandPurList[' + index + '].qtyDemandGj')?'changeStyle':''" :disabled="disable" :min="0" @change="numChange('qtyDemandGj', record)" style="width: 100%" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.dataIndex === 'qtyDemandM3'">
|
<template v-if="column.dataIndex === 'qtyDemandM3'">
|
||||||
<a-input-number v-model:value="record.qtyDemandM3" :disabled="disable" :min="0" @change="numChange('qtyDemandM3', record)" style="width: 100%" />
|
<a-input-number v-model:value="record.qtyDemandM3" :class="diffResultList.includes('lngPngDemandPurList[' + index + '].qtyDemandM3')?'changeStyle':''" :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" style="width: 100%" />
|
<div v-if="pageType=='compare'" :class="diffResultList.includes('lngPngDemandPurList[' + index + '].note')?'changeStyle':''">
|
||||||
|
{{ record.note }}
|
||||||
|
</div>
|
||||||
|
<a-input v-else v-model:value="record.note" :disabled="disable" style="width: 100%" />
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
@ -117,6 +142,7 @@
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { currentRoute } = router;
|
const { currentRoute } = router;
|
||||||
const pageId = ref(currentRoute.value.query?.id)
|
const pageId = ref(currentRoute.value.query?.id)
|
||||||
|
const pageType = ref(currentRoute.value.query?.type)
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
const rules= reactive({
|
const rules= reactive({
|
||||||
pointDelyName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
pointDelyName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
@ -133,9 +159,10 @@
|
|||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
formObj: {},
|
formObj: {},
|
||||||
list: [],
|
list: [],
|
||||||
disable: false
|
disable: false,
|
||||||
|
changeList: []
|
||||||
});
|
});
|
||||||
|
const diffResultList = ref([])
|
||||||
const columns= ref([
|
const columns= ref([
|
||||||
{ title: t('序号'), dataIndex: 'index', key: 'index', customRender: (column) => `${column.index + 1}` ,width: 100},
|
{ title: t('序号'), dataIndex: 'index', key: 'index', customRender: (column) => `${column.index + 1}` ,width: 100},
|
||||||
{ title: t('供应商'), dataIndex: 'suName', width: 300},
|
{ title: t('供应商'), dataIndex: 'suName', width: 300},
|
||||||
@ -157,11 +184,15 @@
|
|||||||
const contractList = ref([])
|
const contractList = ref([])
|
||||||
const pointDelyList = ref([])
|
const pointDelyList = ref([])
|
||||||
onMounted(async () =>{
|
onMounted(async () =>{
|
||||||
|
if (!pageType.value) {
|
||||||
const res = await getCompDept(userInfo.id)
|
const res = await getCompDept(userInfo.id)
|
||||||
formState.value.cuCode = res?.comp?.code
|
formState.value.cuCode = res?.comp?.code
|
||||||
formState.value.comId = res?.comp?.id
|
formState.value.comId = res?.comp?.id
|
||||||
|
}
|
||||||
|
if (pageType.value!=='view' && pageType.value!=='compare') {
|
||||||
const res1 = await getLngPngDemandRate({}) || []
|
const res1 = await getLngPngDemandRate({}) || []
|
||||||
formState.value.rateM3Gj = res1[0].rateM3Gj
|
formState.value.rateM3Gj = res1[0].rateM3Gj
|
||||||
|
}
|
||||||
})
|
})
|
||||||
async function numChange (k, record) {
|
async function numChange (k, record) {
|
||||||
if (k == 'qtyDemandGj') {
|
if (k == 'qtyDemandGj') {
|
||||||
@ -312,7 +343,16 @@
|
|||||||
() => props.list,
|
() => props.list,
|
||||||
(val) => {
|
(val) => {
|
||||||
dataList.value = val
|
dataList.value = val
|
||||||
console.log(dataList.value, 88888888888)
|
},
|
||||||
|
{
|
||||||
|
immediate: true,
|
||||||
|
deep: true,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
watch(
|
||||||
|
() => props.changeList,
|
||||||
|
(val) => {
|
||||||
|
diffResultList.value = val || []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
immediate: true,
|
immediate: true,
|
||||||
@ -343,4 +383,7 @@
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.changeStyle {
|
||||||
|
color: red !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -5,21 +5,21 @@
|
|||||||
<a-button style="margin-right: 10px" @click="close">
|
<a-button style="margin-right: 10px" @click="close">
|
||||||
<slot name="icon"><close-outlined /></slot>关闭
|
<slot name="icon"><close-outlined /></slot>关闭
|
||||||
</a-button>
|
</a-button>
|
||||||
<template v-if="currentRoute.query.type!=='compare'">
|
<template v-if="pageType=='edit'||pageType=='update' ">
|
||||||
<a-button style="margin-right: 10px" type="primary" @click="checkBtn('save')" v-if="!currentRoute.query.type">
|
<a-button style="margin-right: 10px" type="primary" @click="checkBtn('save')">
|
||||||
<slot name="icon"><save-outlined /></slot>保存
|
<slot name="icon"><save-outlined /></slot>保存
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button style="margin-right: 10px" @click="checkBtn('submit')" v-if="!currentRoute.query.type">
|
<a-button style="margin-right: 10px" @click="checkBtn('submit')">
|
||||||
<slot name="icon"><send-outlined /></slot>保存并提交
|
<slot name="icon"><send-outlined /></slot>保存并提交
|
||||||
</a-button>
|
</a-button>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Card :title="title" :bordered="false" >
|
<Card :title="title" :bordered="false" v-if="pageType=='compare'&&titleNew">
|
||||||
<basicForm ref="formRef" :formObj="formState" :list="dataList" :disable="currentRoute.query.type"></basicForm>
|
<basicForm :formObj="formStateNew" :changeList="diffResultList" :list="dataListNew" :disable="true"></basicForm>
|
||||||
</Card>
|
</Card>
|
||||||
<Card :title="title" :bordered="false" v-if="currentRoute.query.type=='compare'">
|
<Card :title="title" :bordered="false" v-if="title">
|
||||||
<basicForm :formObj="formState" :list="dataList" :disable="currentRoute.query.type"></basicForm>
|
<basicForm ref="formRef" :formObj="formState" :list="dataList" :disable="pageType=='view' || pageType=='compare'"></basicForm>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -39,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 { addLngPngDemand, submitLngPngDemand,getLngPngDemand } from '/@/api/dayPlan/Demand';
|
import { addLngPngDemand, submitLngPngDemand,getLngPngDemand,getLngPngDemandUpdate,getLngPngDemandCompare } 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';
|
||||||
@ -48,66 +48,73 @@
|
|||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const userInfo = userStore.getUserInfo;
|
const userInfo = userStore.getUserInfo;
|
||||||
|
|
||||||
const formType = ref('2'); // 0 新建 1 修改 2 查看
|
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const props = defineProps({
|
|
||||||
disabled: false,
|
|
||||||
id: ''
|
|
||||||
|
|
||||||
});
|
|
||||||
const { bus, FORM_LIST_MODIFIED } = useEventBus();
|
const { bus, FORM_LIST_MODIFIED } = useEventBus();
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { currentRoute } = router;
|
const { currentRoute } = router
|
||||||
const isDisable = ref(false);
|
|
||||||
const { formPath } = currentRoute.value.query;
|
|
||||||
const pathArr = [];
|
|
||||||
|
|
||||||
const tabStore = useMultipleTabStore();
|
const tabStore = useMultipleTabStore();
|
||||||
const formProps = ref(null);
|
const formProps = ref(null);
|
||||||
const formId = ref(currentRoute.value?.params?.id);
|
|
||||||
const pageType = ref(currentRoute.value.query?.type);
|
|
||||||
const pageId = ref(currentRoute.value.query?.id)
|
const pageId = ref(currentRoute.value.query?.id)
|
||||||
|
const pageType = ref(currentRoute.value.query?.type)
|
||||||
|
|
||||||
const contractQty = ref()
|
|
||||||
const spinning = ref(false);
|
const spinning = ref(false);
|
||||||
const curIdx = ref(null)
|
|
||||||
const { notification } = useMessage();
|
const { notification } = useMessage();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const hasDel = ref(false)
|
|
||||||
const formState = reactive({
|
const formState = reactive({
|
||||||
datePlan: null
|
datePlan: null
|
||||||
});
|
});
|
||||||
|
const formStateNew = reactive({})
|
||||||
const [register, { openModal:openModal}] = useModal();
|
const [register, { openModal:openModal}] = useModal();
|
||||||
|
|
||||||
const title = ref('管道气需求')
|
const title = ref('管道气需求')
|
||||||
const dataList = ref([])
|
const titleNew = ref('')
|
||||||
|
const dataListNew = ref([])
|
||||||
const basicFormRef = ref()
|
const basicFormRef = ref()
|
||||||
let optionSelect= reactive({
|
const diffResultList = ref([])
|
||||||
approCodeList: [],
|
const dataList = ref([])
|
||||||
});
|
|
||||||
watch(
|
|
||||||
() => props.id,
|
|
||||||
(val) => {
|
|
||||||
if (val) {
|
|
||||||
getInfo(val)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
immediate: true
|
|
||||||
}
|
|
||||||
);
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (pageId.value) {
|
if (pageId.value) {
|
||||||
|
if (pageType.value=='compare') {
|
||||||
|
getCompareInfo(pageId.value)
|
||||||
|
return
|
||||||
|
}
|
||||||
getInfo(pageId.value)
|
getInfo(pageId.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
async function getCompareInfo(id) {
|
||||||
|
spinning.value = true
|
||||||
|
try {
|
||||||
|
let data = await getLngPngDemandCompare(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 = formState.verNo? ('版本V'+ formState.verNo) : ''
|
||||||
|
|
||||||
|
let obj1 = changeData(data.newBean || {})
|
||||||
|
Object.assign(formStateNew, {...obj1.params})
|
||||||
|
Object.assign(dataListNew.value, obj1.list || [])
|
||||||
|
titleNew.value = formStateNew.verNo ? ('版本V'+ formStateNew.verNo) : ''
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error,'error555555')
|
||||||
|
spinning.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
async function getInfo(id) {
|
async function getInfo(id) {
|
||||||
spinning.value = true
|
spinning.value = true
|
||||||
try {
|
try {
|
||||||
let data = await getLngPngDemand(id)
|
let data = {}
|
||||||
|
if (pageType.value == 'update') {
|
||||||
|
data = await getLngPngDemandUpdate(id)
|
||||||
|
} else {
|
||||||
|
data = await getLngPngDemand(id)
|
||||||
|
}
|
||||||
spinning.value = false
|
spinning.value = false
|
||||||
let obj = changeData(data)
|
let obj = changeData(data)
|
||||||
Object.assign(formState, {...obj.params})
|
Object.assign(formState, {...obj.params})
|
||||||
@ -119,14 +126,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const changeData = (obj) => {
|
const changeData = (obj) => {
|
||||||
let arr = obj.lngPngDemandPurList || [{}]
|
let arr = obj.lngPngDemandPurList || []
|
||||||
obj.datePlan = obj.datePlan ? dayjs(obj.datePlan) : null
|
obj.datePlan = obj.datePlan ? dayjs(obj.datePlan) : null
|
||||||
obj.qtyContractM3 = Number(obj.qtyContractM3)/10000
|
obj.qtyContractM3 = Number(obj.qtyContractM3)/10000
|
||||||
obj.qtyPlanM3 = Number(obj.qtyPlanM3)/10000
|
obj.qtyPlanM3 = Number(obj.qtyPlanM3)/10000
|
||||||
obj.qtyDemandM3 = Number(obj.qtyDemandM3)/10000
|
obj.qtyDemandM3 = Number(obj.qtyDemandM3)/10000
|
||||||
obj.qtySalesM3 = Number(obj.qtySalesM3)/10000
|
obj.qtySalesM3 = Number(obj.qtySalesM3)/10000
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,7 @@
|
|||||||
import { Modal } from 'ant-design-vue';
|
import { Modal } from 'ant-design-vue';
|
||||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||||
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table';
|
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table';
|
||||||
import { getLngPngDemandPage, deleteLngPngDemand, exportLngPngDemand} from '/@/api/dayPlan/Demand';
|
import { getLngPngDemandPage, deleteLngPngDemand, exportLngPngDemand,withdrawLngPng,submitLngPng,cancelLngPng} from '/@/api/dayPlan/Demand';
|
||||||
import { PageWrapper } from '/@/components/Page';
|
import { PageWrapper } from '/@/components/Page';
|
||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
import { useI18n } from '/@/hooks/web/useI18n';
|
import { useI18n } from '/@/hooks/web/useI18n';
|
||||||
@ -78,9 +78,9 @@
|
|||||||
|
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
//所有按钮
|
//所有按钮
|
||||||
const buttons = ref([{"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true,"type":"primary"},{"name":"提交","code":"submit","icon":"ant-design:check-outlined","isDefault":true,"isUse":true},{"name":"撤回","code":"back","icon":"ant-design:rollback-outlined","isDefault":true,"isUse":true},{"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true,"isUse":true},{"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"name":"数据日志","code":"datalog","icon":"ant-design:profile-outlined","isDefault":true,"isUse":true},{"name":"快速导入","code":"import","icon":"ant-design:import-outlined","isDefault":true,"isUse":true},{"name":"快速导出","code":"export","icon":"ant-design:export-outlined","isDefault":true,"isUse":true},{"name":"发起审批","code":"startwork","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"查看流转记录","code":"flowRecord","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"变更","code":"update","icon":"ant-design:edit-filled","isDefault":true,"isUse":true},{"name":"取消","code":"update","icon":"ant-design:close-outlined","isDefault":true,"isUse":true},{"name":"对比","code":"compare","icon":"ant-design:file-done-outlined","isDefault":true,"isUse":true},{"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true}]);
|
const buttons = ref([{"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true,"type":"primary"},{"name":"提交","code":"batchsubmit","icon":"ant-design:check-outlined","isDefault":true,"isUse":true},{"name":"撤回","code":"batchback","icon":"ant-design:rollback-outlined","isDefault":true,"isUse":true},{"name":"提交","code":"submit","icon":"ant-design:check-outlined","isDefault":true,"isUse":true},{"name":"撤回","code":"back","icon":"ant-design:rollback-outlined","isDefault":true,"isUse":true},{"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"导入","code":"import","icon":"ant-design:import-outlined","isDefault":true,"isUse":true},{"name":"导出","code":"export","icon":"ant-design:export-outlined","isDefault":true,"isUse":true},{"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true,"isUse":true},{"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"name":"数据日志","code":"datalog","icon":"ant-design:profile-outlined","isDefault":true,"isUse":true},{"name":"发起审批","code":"startwork","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"查看流转记录","code":"flowRecord","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"变更","code":"update","icon":"ant-design:edit-filled","isDefault":true,"isUse":true},{"name":"取消","code":"update","icon":"ant-design:close-outlined","isDefault":true,"isUse":true},{"name":"对比","code":"compare","icon":"ant-design:file-done-outlined","isDefault":true,"isUse":true},{"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true}]);
|
||||||
//展示在列表内的按钮
|
//展示在列表内的按钮
|
||||||
const actionButtons = ref<string[]>(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord', 'update', 'back', 'compare', 'submit', 'cancel']);
|
const actionButtons = ref<string[]>(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord', 'update', 'compare', 'cancel','submit','back']);
|
||||||
const buttonConfigs = computed(()=>{
|
const buttonConfigs = computed(()=>{
|
||||||
return filterButtonAuth(buttons.value);
|
return filterButtonAuth(buttons.value);
|
||||||
})
|
})
|
||||||
@ -93,7 +93,9 @@
|
|||||||
return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code));
|
return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code));
|
||||||
});
|
});
|
||||||
|
|
||||||
const btnEvent = {add : handleAdd,edit : handleEdit,refresh : handleRefresh,view : handleView,datalog : handleDatalog,import : handleImport,export : handleExport,startwork : handleStartwork,flowRecord : handleFlowRecord,delete : handleDelete,}
|
const btnEvent = {add : handleAdd,edit : handleEdit,refresh : handleRefresh,view : handleView,datalog : handleDatalog,import : handleImport,export : handleExport,startwork : handleStartwork,flowRecord : handleFlowRecord,delete : handleDelete,
|
||||||
|
compare:handleCompare,submit:handleSubmit,cancel:handleCancel,batchsubmit: handleBatchSubmit,batchback:handleBatchBack,back:handleBack,update:handleUpdate
|
||||||
|
}
|
||||||
|
|
||||||
const { currentRoute } = useRouter();
|
const { currentRoute } = useRouter();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@ -109,6 +111,7 @@
|
|||||||
const formDataRef = ref();
|
const formDataRef = ref();
|
||||||
const rowKeyData = ref();
|
const rowKeyData = ref();
|
||||||
const draftsId = ref();
|
const draftsId = ref();
|
||||||
|
const selectedKeys = ref([])
|
||||||
|
|
||||||
const visibleApproveProcessRef = ref(false);
|
const visibleApproveProcessRef = ref(false);
|
||||||
const taskIdRef = ref('');
|
const taskIdRef = ref('');
|
||||||
@ -117,7 +120,7 @@
|
|||||||
const [registerImportModal, { openModal: openImportModal }] = useModal();
|
const [registerImportModal, { openModal: openImportModal }] = useModal();
|
||||||
|
|
||||||
const formName='日计划-客户需求';
|
const formName='日计划-客户需求';
|
||||||
const [registerTable, { reload, }] = useTable({
|
const [registerTable, { reload, clearSelectedRowKeys }] = useTable({
|
||||||
title: '' || (formName + '列表'),
|
title: '' || (formName + '列表'),
|
||||||
api: getLngPngDemandPage,
|
api: getLngPngDemandPage,
|
||||||
rowKey: 'id',
|
rowKey: 'id',
|
||||||
@ -129,6 +132,18 @@
|
|||||||
schemas: customSearchFormSchema,
|
schemas: customSearchFormSchema,
|
||||||
fieldMapToTime: [],
|
fieldMapToTime: [],
|
||||||
showResetButton: true,
|
showResetButton: true,
|
||||||
|
submitButtonOptions: {
|
||||||
|
text: '搜索',
|
||||||
|
onClick: () => {
|
||||||
|
clearSelectedRowKeys()
|
||||||
|
},
|
||||||
|
},
|
||||||
|
resetButtonOptions: {
|
||||||
|
text: '重置',
|
||||||
|
onClick: () => {
|
||||||
|
clearSelectedRowKeys()
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
beforeFetch: (params) => {
|
beforeFetch: (params) => {
|
||||||
return { ...params, FormId: formIdComputedRef.value, PK: 'id',page:params.limit };
|
return { ...params, FormId: formIdComputedRef.value, PK: 'id',page:params.limit };
|
||||||
@ -147,13 +162,19 @@
|
|||||||
dataIndex: 'action',
|
dataIndex: 'action',
|
||||||
slots: { customRender: 'action' },
|
slots: { customRender: 'action' },
|
||||||
},
|
},
|
||||||
|
rowSelection: {
|
||||||
|
type: 'checkbox',
|
||||||
|
onChange: onSelectChange
|
||||||
|
},
|
||||||
tableSetting: {
|
tableSetting: {
|
||||||
size: false,
|
size: false,
|
||||||
setting: false,
|
setting: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
});
|
});
|
||||||
|
function onSelectChange(rowKeys: string[]) {
|
||||||
|
selectedKeys.value = rowKeys;
|
||||||
|
}
|
||||||
function dbClickRow(record) {
|
function dbClickRow(record) {
|
||||||
if (!actionButtonConfig?.value.some(element => element.code == 'view')) {
|
if (!actionButtonConfig?.value.some(element => element.code == 'view')) {
|
||||||
return;
|
return;
|
||||||
@ -225,7 +246,91 @@
|
|||||||
formPath: 'dayPlan/Demand',
|
formPath: 'dayPlan/Demand',
|
||||||
formName: formName,
|
formName: formName,
|
||||||
formId:currentRoute.value.meta.formId,
|
formId:currentRoute.value.meta.formId,
|
||||||
id: record.Id
|
id: record.id,
|
||||||
|
type: 'edit'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleCompare(record: Recordable) {
|
||||||
|
router.push({
|
||||||
|
path: '/dayPlan/Demand/createForm',
|
||||||
|
query: {
|
||||||
|
formPath: 'dayPlan/Demand',
|
||||||
|
formName: formName,
|
||||||
|
formId:currentRoute.value.meta.formId,
|
||||||
|
id: record.id,
|
||||||
|
type: 'compare'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function handleCancel(record: Recordable) {
|
||||||
|
await cancelLngPng(record.id)
|
||||||
|
handleSuccess();
|
||||||
|
notification.success({
|
||||||
|
message: 'Tip',
|
||||||
|
description: t('已取消!'),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
async function handleSubmit(record: Recordable) {
|
||||||
|
await submitLngPng([record.id])
|
||||||
|
handleSuccess();
|
||||||
|
notification.success({
|
||||||
|
message: 'Tip',
|
||||||
|
description: t('已提交!'),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
async function handleBatchSubmit() {
|
||||||
|
if (!selectedKeys.value.length) {
|
||||||
|
notification.warning({
|
||||||
|
message: 'Tip',
|
||||||
|
description: t('请选择需要提交的数据'),
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await submitLngPng(selectedKeys.value)
|
||||||
|
handleSuccess();
|
||||||
|
notification.success({
|
||||||
|
message: 'Tip',
|
||||||
|
description: t('已提交!'),
|
||||||
|
});
|
||||||
|
clearSelectedRowKeys()
|
||||||
|
}
|
||||||
|
async function handleBatchBack() {
|
||||||
|
if (!selectedKeys.value.length) {
|
||||||
|
notification.warning({
|
||||||
|
message: 'Tip',
|
||||||
|
description: t('请选择需要撤回的数据'),
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await withdrawLngPng(selectedKeys.value)
|
||||||
|
handleSuccess();
|
||||||
|
notification.success({
|
||||||
|
message: 'Tip',
|
||||||
|
description: t('已撤回!'),
|
||||||
|
});
|
||||||
|
clearSelectedRowKeys()
|
||||||
|
|
||||||
|
}
|
||||||
|
async function handleBack(record: Recordable) {
|
||||||
|
await withdrawLngPng([record.id])
|
||||||
|
handleSuccess();
|
||||||
|
notification.success({
|
||||||
|
message: 'Tip',
|
||||||
|
description: t('已撤回!'),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function handleUpdate(record: Recordable) {
|
||||||
|
router.push({
|
||||||
|
path: '/dayPlan/Demand/createForm',
|
||||||
|
query: {
|
||||||
|
formPath: 'dayPlan/Demand',
|
||||||
|
formName: formName,
|
||||||
|
formId:currentRoute.value.meta.formId,
|
||||||
|
id: record.id,
|
||||||
|
type: 'update'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -307,16 +412,18 @@
|
|||||||
|
|
||||||
let actionsList: ActionItem[] = [];
|
let actionsList: ActionItem[] = [];
|
||||||
let editAndDelBtn: ActionItem[] = [];
|
let editAndDelBtn: ActionItem[] = [];
|
||||||
|
let updateBtn: ActionItem[] = [];
|
||||||
|
let backBtn: ActionItem[] = [];
|
||||||
let hasFlowRecord = false;
|
let hasFlowRecord = false;
|
||||||
actionButtonConfig.value?.map((button) => {
|
actionButtonConfig.value?.map((button) => {
|
||||||
if (['view', 'copyData'].includes(button.code)) {
|
if (['view', 'copyData', 'compare'].includes(button.code)) {
|
||||||
actionsList.push({
|
actionsList.push({
|
||||||
icon: button?.icon,
|
icon: button?.icon,
|
||||||
tooltip: button?.name,
|
tooltip: button?.name,
|
||||||
onClick: btnEvent[button.code].bind(null, record),
|
onClick: btnEvent[button.code].bind(null, record),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (['edit', 'delete'].includes(button.code)) {
|
if (['edit', 'delete','submit'].includes(button.code)) {
|
||||||
editAndDelBtn.push({
|
editAndDelBtn.push({
|
||||||
icon: button?.icon,
|
icon: button?.icon,
|
||||||
tooltip: button?.name,
|
tooltip: button?.name,
|
||||||
@ -324,21 +431,46 @@
|
|||||||
onClick: btnEvent[button.code].bind(null, record),
|
onClick: btnEvent[button.code].bind(null, record),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (['update', 'cancel'].includes(button.code)) {
|
||||||
|
updateBtn.push({
|
||||||
|
icon: button?.icon,
|
||||||
|
tooltip: button?.name,
|
||||||
|
onClick: btnEvent[button.code].bind(null, record),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (['back'].includes(button.code)) {
|
||||||
|
backBtn.push({
|
||||||
|
icon: button?.icon,
|
||||||
|
tooltip: button?.name,
|
||||||
|
onClick: btnEvent[button.code].bind(null, record),
|
||||||
|
});
|
||||||
|
}
|
||||||
if (button.code === 'flowRecord') hasFlowRecord = true;
|
if (button.code === 'flowRecord') hasFlowRecord = true;
|
||||||
});
|
});
|
||||||
if (record.workflowData?.enabled) {
|
if (record.approCode == 'YSP') {
|
||||||
//与工作流有关联的表单
|
actionsList = actionsList.concat(updateBtn);
|
||||||
if (record.workflowData.status) {
|
}
|
||||||
actionsList.unshift(setIndexFlowStatus(record.workflowData))
|
// || record.approCode == 'YBH'
|
||||||
} else {
|
if (record.approCode == 'WTJ'|| record.approCode == 'YBH' ) {
|
||||||
actionsList = actionsList.concat(editAndDelBtn);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!record.workflowData?.processId) {
|
|
||||||
//与工作流没有关联的表单并且在当前页面新增的数据 如选择编辑、删除按钮则加上
|
|
||||||
actionsList = actionsList.concat(editAndDelBtn);
|
actionsList = actionsList.concat(editAndDelBtn);
|
||||||
}
|
}
|
||||||
|
if (record.approCode == 'SPZ') {
|
||||||
|
actionsList = actionsList.concat(backBtn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if (record.workflowData?.enabled) {
|
||||||
|
// //与工作流有关联的表单
|
||||||
|
// if (record.workflowData.status) {
|
||||||
|
// actionsList.unshift(setIndexFlowStatus(record.workflowData))
|
||||||
|
// } else {
|
||||||
|
// actionsList = actionsList.concat(editAndDelBtn);
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// if (!record.workflowData?.processId) {
|
||||||
|
// //与工作流没有关联的表单并且在当前页面新增的数据 如选择编辑、删除按钮则加上
|
||||||
|
// actionsList = actionsList.concat(editAndDelBtn);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
return actionsList;
|
return actionsList;
|
||||||
}
|
}
|
||||||
function handleStartwork(record: Recordable) {
|
function handleStartwork(record: Recordable) {
|
||||||
@ -445,4 +577,11 @@
|
|||||||
width: 160px !important;
|
width: 160px !important;
|
||||||
max-width: 160px !important;
|
max-width: 160px !important;
|
||||||
}
|
}
|
||||||
|
:deep( .ant-col-8:nth-child(1)) {
|
||||||
|
width: 220px !important;
|
||||||
|
max-width: 220px !important;;
|
||||||
|
}
|
||||||
|
:deep(.ant-col-8:nth-child(1) .ant-form-item-label) {
|
||||||
|
width: 70px !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -25,7 +25,7 @@
|
|||||||
<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" :changeList="diffResultList" :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" v-if="title">
|
||||||
<basicForm ref="basicFormRef" :formObj="formState" :list="dataList" :disable="currentRoute.query.type"></basicForm>
|
<basicForm ref="basicFormRef" :formObj="formState" :list="dataList" :disable="currentRoute.query.type"></basicForm>
|
||||||
</Card>
|
</Card>
|
||||||
</a-form>
|
</a-form>
|
||||||
@ -56,33 +56,20 @@
|
|||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const userInfo = userStore.getUserInfo;
|
const userInfo = userStore.getUserInfo;
|
||||||
|
|
||||||
const formType = ref('2'); // 0 新建 1 修改 2 查看
|
|
||||||
const formRef = ref();
|
|
||||||
const props = defineProps({
|
|
||||||
disabled: false,
|
|
||||||
id: ''
|
|
||||||
|
|
||||||
});
|
|
||||||
const { bus, FORM_LIST_MODIFIED } = useEventBus();
|
const { bus, FORM_LIST_MODIFIED } = useEventBus();
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { currentRoute } = router;
|
const { currentRoute } = router;
|
||||||
const isDisable = ref(false);
|
|
||||||
const { formPath } = currentRoute.value.query;
|
const { formPath } = currentRoute.value.query;
|
||||||
const pathArr = [];
|
const pathArr = [];
|
||||||
|
|
||||||
const tabStore = useMultipleTabStore();
|
const tabStore = useMultipleTabStore();
|
||||||
const formProps = ref(null);
|
|
||||||
const formId = ref(currentRoute.value?.params?.id);
|
|
||||||
const pageType = ref(currentRoute.value.query?.type);
|
|
||||||
const pageId = ref(currentRoute.value.query?.id)
|
const pageId = ref(currentRoute.value.query?.id)
|
||||||
|
|
||||||
const contractQty = ref()
|
|
||||||
const spinning = ref(false);
|
const spinning = ref(false);
|
||||||
const curIdx = ref(null)
|
|
||||||
const { notification } = useMessage();
|
const { notification } = useMessage();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const hasDel = ref(false)
|
|
||||||
const formState = reactive({
|
const formState = reactive({
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -103,11 +90,7 @@
|
|||||||
const dataListNew = ref([])
|
const dataListNew = ref([])
|
||||||
const basicFormRef = ref()
|
const basicFormRef = ref()
|
||||||
const diffResultList = ref([])
|
const diffResultList = ref([])
|
||||||
let optionSelect= reactive({
|
|
||||||
approCodeList: [],
|
|
||||||
});
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getOption()
|
|
||||||
if (pageId.value) {
|
if (pageId.value) {
|
||||||
if (currentRoute.value.query.type=='compare') {
|
if (currentRoute.value.query.type=='compare') {
|
||||||
getCompareInfo(pageId.value)
|
getCompareInfo(pageId.value)
|
||||||
@ -120,17 +103,17 @@
|
|||||||
async function getCompareInfo(id) {
|
async function getCompareInfo(id) {
|
||||||
spinning.value = true
|
spinning.value = true
|
||||||
try {
|
try {
|
||||||
let data = await getLngPngApproCompare(id) || []
|
let data = await getLngPngApproCompare(id) || {}
|
||||||
spinning.value = false
|
spinning.value = false
|
||||||
diffResultList.value = data.diffResultList || []
|
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 = formState.verNo? ('版本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 = formStateNew.verNo ? ('版本V'+ formStateNew.verNo) : ''
|
titleNew.value = formStateNew.verNo ? ('版本V'+ formStateNew.verNo) : ''
|
||||||
|
|
||||||
|
|
||||||
@ -147,26 +130,13 @@
|
|||||||
spinning.value = false
|
spinning.value = false
|
||||||
let obj = changeData(data)
|
let obj = changeData(data)
|
||||||
Object.assign(formState, {...obj.params})
|
Object.assign(formState, {...obj.params})
|
||||||
Object.assign(dataList.value, obj.list || [{}])
|
Object.assign(dataList.value, obj.list || [])
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
spinning.value = false
|
spinning.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
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 endDate = dayjs(new Date());
|
|
||||||
// const diffInDays = endDate.diff(startDate, 'day');
|
|
||||||
// if (diffInDays == 0) {
|
|
||||||
// obj.dayDesc = '当日'
|
|
||||||
// } else if (diffInDays == 1) {
|
|
||||||
// obj.dayDesc = '次日'
|
|
||||||
// } else if (diffInDays > 1) {
|
|
||||||
// obj.dayDesc = diffInDays + '日后'
|
|
||||||
// } else {
|
|
||||||
// obj.dayDesc = ''
|
|
||||||
// }
|
|
||||||
obj.qtyContractM3 = Number(obj.qtyContractM3)/10000
|
obj.qtyContractM3 = Number(obj.qtyContractM3)/10000
|
||||||
obj.qtyPlanM3 = Number(obj.qtyPlanM3)/10000
|
obj.qtyPlanM3 = Number(obj.qtyPlanM3)/10000
|
||||||
obj.qtyDemandM3 = Number(obj.qtyDemandM3)/10000
|
obj.qtyDemandM3 = Number(obj.qtyDemandM3)/10000
|
||||||
@ -186,10 +156,6 @@
|
|||||||
params: obj
|
params: obj
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async function getOption() {
|
|
||||||
optionSelect.approCodeList = await getDictionary('LNG_APPRO')
|
|
||||||
|
|
||||||
}
|
|
||||||
function close() {
|
function close() {
|
||||||
tabStore.closeTab(currentRoute.value, router);
|
tabStore.closeTab(currentRoute.value, router);
|
||||||
}
|
}
|
||||||
@ -213,7 +179,7 @@
|
|||||||
remark: formState.reply,
|
remark: formState.reply,
|
||||||
data: [obj]
|
data: [obj]
|
||||||
}
|
}
|
||||||
spinning.value = true;
|
|
||||||
try {
|
try {
|
||||||
if (type == 'reject') {
|
if (type == 'reject') {
|
||||||
if (!formState.reply) {
|
if (!formState.reply) {
|
||||||
@ -231,6 +197,7 @@
|
|||||||
if (formPath.includes('dayPlan/pngReceiveStationAppro/index')) {
|
if (formPath.includes('dayPlan/pngReceiveStationAppro/index')) {
|
||||||
request = approveLngPngApproSZ
|
request = approveLngPngApproSZ
|
||||||
}
|
}
|
||||||
|
spinning.value = true;
|
||||||
await request(params);
|
await request(params);
|
||||||
spinning.value = false;
|
spinning.value = false;
|
||||||
notification.success({
|
notification.success({
|
||||||
|
|||||||
Reference in New Issue
Block a user