This commit is contained in:
2026-01-23 10:10:58 +08:00
42 changed files with 1558 additions and 592 deletions

View File

@ -3,17 +3,91 @@ import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios';
enum Api {
Page = '/dayPlan/demand/page',
// Page = '/dayPlan/demand/page',
Page = '/magic-api/dayPlan/pngDemandPageList',
List = '/dayPlan/demand/list',
Info = '/dayPlan/demand/info',
LngPngDemand = '/dayPlan/demand',
ContractList ='/magic-api/dayPlan/queryPngDemandContractList',
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',
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') {
return defHttp.get<LngPngDemandPageModel>(
{
url: Api.PointDelyList,
params: params,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 获取LngPngDemand信息
*/
export async function getLngPngDemandContractList(params, mode: ErrorMessageMode = 'modal') {
return defHttp.get<LngPngDemandPageModel>(
{
url: Api.ContractList,
params: params,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 查询LngPngDemand分页列表

View File

@ -88,4 +88,7 @@
:deep(.w-e-text-container) {
background-color: v-bind("props.disabled ? '#f5f5f5': '#fff'");
}
:deep(.w-e-text p img) {
margin: 0 auto;
}
</style>

View File

@ -0,0 +1,62 @@
<template>
<div>
<BasicModal v-bind="$attrs" @register="registerModal" width="60%" :title="getTitle" @ok="handleSubmit">
<a-table bordered rowKey="id" :columns="columns" :data-source="dataList" :pagination="false" :row-selection="{ type:'radio', selectedRowKeys: selectedKeys, onChange: onSelectChange }"/>
</BasicModal>
</div>
</template>
<script lang="ts" setup>
import { ref, computed, unref, nextTick } from 'vue';
import { BasicModal, useModalInner, useModal } from '/@/components/Modal';
import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n';
const { t } = useI18n();
const columns: BasicColumn[] = [
{ title: t('合同Id'), dataIndex: 'id', },
{ title: t('合同名称'), dataIndex: 'kName', },
];
const emit = defineEmits(['success', 'register']);
const { notification } = useMessage();
const isUpdate = ref(true);
const rowId = ref('');
const selectedKeys = ref<string[]>([]);
const selectedValues = ref([]);
const dataList =ref([])
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ confirmLoading: false });
dataList.value = data.list || []
isUpdate.value = !!data?.isUpdate;
});
function onSelectChange(rowKeys: string[], e) {
selectedKeys.value = rowKeys;
selectedValues.value = e
}
const getTitle = computed(() => (!unref(isUpdate) ? t('合同列表') : t('')));
async function handleSubmit() {
if (!selectedValues.value.length) {
notification.warning({
message: t('提示'),
description: t('请选择合同')
});
return
}
closeModal();
emit('success', selectedValues.value);
}
</script>
<style >
</style>

View File

@ -1,112 +0,0 @@
<template>
<div>
<BasicModal v-bind="$attrs" @register="registerModal" width="60%" :title="getTitle" @ok="handleSubmit"
@visible-change="handleVisibleChange" >
<BasicTable @register="registerTable" class="contractFactListModal"></BasicTable>
</BasicModal>
</div>
</template>
<script lang="ts" setup>
import { ref, computed, unref, nextTick } from 'vue';
import { BasicModal, useModalInner, useModal } from '/@/components/Modal';
import { BasicForm, useForm } from '/@/components/Form/index';
import { BasicTable, useTable, FormSchema, BasicColumn, TableAction } from '/@/components/Table';
import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n';
import { getLngContract } from '/@/api/contract/ContractSales';
const { t } = useI18n();
const codeFormSchema: FormSchema[] = [
{ field: 'kName', label: '合同号/名称', component: 'Input'},
];
const columns: BasicColumn[] = [
{ title: t('合同号'), dataIndex: 'kNo', sorter: true},
{ title: t('合同名称'), dataIndex: 'kName', sorter: true},
{ title: t('客户'), dataIndex: 'cpName', sorter: true},
{ title: t('有效期开始'), dataIndex: 'dateFrom', sorter: true},
{ title: t('有效期结束'), dataIndex: 'dateTo', sorter: true,},
{ title: t('交割点'), dataIndex: 'pointUpName', sorter: true,},
{ title: t('合同主体'), dataIndex: 'comName', sorter: true,},
];
const emit = defineEmits(['success', 'register']);
const { notification } = useMessage();
const isUpdate = ref(true);
const rowId = ref('');
const selectedKeys = ref<string[]>([]);
const selectedValues = ref([]);
const props = defineProps({
selectType: { type: String, default: 'checkbox' },
});
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ confirmLoading: false });
isUpdate.value = !!data?.isUpdate;
});
const [registerTable, { getDataSource, setTableData, updateTableDataRecord, reload }] = useTable({
title: t('管道气销售合同列表'),
api: getLngContract,
columns,
bordered: true,
pagination: true,
canResize: false,
formConfig: {
labelCol:{span: 9, offSet:10},
schemas: codeFormSchema,
showResetButton: true,
},
immediate: false, // 设置为不立即调用
beforeFetch: (params) => {
return { ...params,approCode: 'YSP'};
},
rowSelection: {
type: props.selectType,
onChange: onSelectChange
},
});
const handleVisibleChange = (visible: boolean) => {
if (visible) {
nextTick(() => {
reload();
});
}
};
function onSelectChange(rowKeys: string[], e) {
selectedKeys.value = rowKeys;
selectedValues.value = e
}
const getTitle = computed(() => (!unref(isUpdate) ? t('合同列表') : t('')));
async function handleSubmit() {
if (!selectedValues.value.length) {
notification.warning({
message: t('提示'),
description: t('请选择合同')
});
return
}
closeModal();
emit('success', selectedValues.value);
}
</script>
<style >
.contractFactListModal .basicCol{
position: inherit !important;
top: 0;
}
</style>

View File

@ -21,13 +21,13 @@
];
const columns: BasicColumn[] = [
{ dataIndex: 'title', title: '标题', align: 'left', sorter: true},
{ dataIndex: 'code', title: '编号', align: 'left', sorter: true},
{ dataIndex: 'typeName', title: '签报类型', align: 'left', sorter: true},
{ dataIndex: 'empName', title: '拟稿人', align: 'left', sorter: true},
{ dataIndex: 'bDeptName', title: '拟稿人所属部门', align: 'left', sorter: true},
{ dataIndex: 'dateAppro', title: '拟稿日期', align: 'left', sorter: true},
{ dataIndex: 'file', title: '附件', align: 'left', sorter: true},
{ dataIndex: 'title', title: '标题', align: 'left', },
{ dataIndex: 'code', title: '编号', align: 'left', },
{ dataIndex: 'typeName', title: '签报类型', align: 'left', },
{ dataIndex: 'empName', title: '拟稿人', align: 'left', },
{ dataIndex: 'bDeptName', title: '拟稿人所属部门', align: 'left', },
{ dataIndex: 'dateAppro', title: '拟稿日期', align: 'left', },
{ dataIndex: 'file', title: '附件', align: 'left', },
];

View File

@ -16,10 +16,10 @@
const { t } = useI18n();
const columns: BasicColumn[] = [
{ dataIndex: 'userName', title: '审批人', align: 'left', sorter: true },
{ dataIndex: 'createDate', title: '审批时间', align: 'left', sorter: true },
{ dataIndex: 'cfmRej', title: '通过/驳回', align: 'left', sorter: true },
{ dataIndex: 'reply', title: '驳回原因', align: 'left', sorter: true },
{ dataIndex: 'userName', title: '审批人', align: 'left', },
{ dataIndex: 'createDate', title: '审批时间', align: 'left', },
{ dataIndex: 'cfmRej', title: '通过/驳回', align: 'left', },
{ dataIndex: 'reply', title: '驳回原因', align: 'left', },
];
const emit = defineEmits(['success', 'register']);

View File

@ -22,12 +22,12 @@
];
const columns: BasicColumn[] = [
{ dataIndex: 'code', title: '编码', componentType: 'input', align: 'left', sorter: true},
{ dataIndex: 'fullName', title: '名称', componentType: 'input', align: 'left', sorter: true},
{ dataIndex: 'shortName', title: '简称', componentType: 'input', align: 'left', sorter: true},
{ dataIndex: 'bankCode', title: '联行号', componentType: 'input', align: 'left', sorter: true },
{ dataIndex: 'regionName', title: '所属国家和地区', componentType: 'input', align: 'left', sorter: true},
{ dataIndex: 'swift', title: 'SWIFT', componentType: 'input', align: 'left', sorter: true},
{ dataIndex: 'code', title: '编码', componentType: 'input', align: 'left', },
{ dataIndex: 'fullName', title: '名称', componentType: 'input', align: 'left', },
{ dataIndex: 'shortName', title: '简称', componentType: 'input', align: 'left', },
{ dataIndex: 'bankCode', title: '联行号', componentType: 'input', align: 'left', },
{ dataIndex: 'regionName', title: '所属国家和地区', componentType: 'input', align: 'left', },
{ dataIndex: 'swift', title: 'SWIFT', componentType: 'input', align: 'left', },
];
const emit = defineEmits(['success', 'register']);

View File

@ -34,12 +34,12 @@
];
const columns: BasicColumn[] = [
{ title: t('合同号'), dataIndex: 'kNo', sorter: true},
{ title: t('合同名称'), dataIndex: 'kName', sorter: true},
{ title: t('关联类别'), dataIndex: 'relTypeName', sorter: true},
{ title: t('合同类别'), dataIndex: 'kTypeName1', sorter: true},
{ title: t('承办人'), dataIndex: 'empName', sorter: true,},
{ title: t('承办部门'), dataIndex: 'bDeptName', sorter: true,},
{ title: t('合同号'), dataIndex: 'kNo', },
{ title: t('合同名称'), dataIndex: 'kName', },
{ title: t('关联类别'), dataIndex: 'relTypeName', },
{ title: t('合同类别'), dataIndex: 'kTypeName1', },
{ title: t('承办人'), dataIndex: 'empName' ,},
{ title: t('承办部门'), dataIndex: 'bDeptName' ,},
];

View File

@ -82,19 +82,19 @@
const { t } = useI18n();
const dataListContractAgree = ref([])
const columns= ref([
{ title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 80},
{ title: t('开始日期'), dataIndex: 'dateFrom', sorter: true, width:160},
{ title: t('结束日期'), dataIndex: 'dateTo', sorter: true, width: 160},
{ title: t('基础量/增量'), dataIndex: 'baseInc', sorter: true, width: 130},
{ title: t('优先级'), dataIndex: 'sort', sorter: true, width: 100},
{ title: t('比值(方/吉焦)'), dataIndex: 'rateM3Gj', sorter: true, width: 150},
{ title: t('月气量(吉焦)'), dataIndex: 'qtyGjMonth', sorter: true, width: 150},
{ title: t('月气量(万方)'), dataIndex: 'qtyM3Month', sorter: true, width: 150},
{ title: t('日气量(吉焦)'), dataIndex: 'qtyGjDay', sorter: true, width: 120},
{ title: t('日气量(万方)'), dataIndex: 'qtyM3Day', sorter: true, width: 120},
{ title: t('照付不议类型'), dataIndex: 'zfbyTypeCode', sorter: true, width: 120},
{ title: t('照付不议比例%/量数值'), dataIndex: 'zfbyValue', sorter: true, width: 120},
{ title: t('备注'), dataIndex: 'note', sorter: true, width: 200},
{ title: t('序号'), dataIndex: 'index', key: 'index', customRender: (column) => `${column.index + 1}` ,width: 80},
{ title: t('开始日期'), dataIndex: 'dateFrom', width:160},
{ title: t('结束日期'), dataIndex: 'dateTo', width: 160},
{ title: t('基础量/增量'), dataIndex: 'baseInc', width: 130},
{ title: t('优先级'), dataIndex: 'sort', width: 100},
{ title: t('比值(方/吉焦)'), dataIndex: 'rateM3Gj', width: 150},
{ title: t('月气量(吉焦)'), dataIndex: 'qtyGjMonth', width: 150},
{ title: t('月气量(万方)'), dataIndex: 'qtyM3Month', width: 150},
{ title: t('日气量(吉焦)'), dataIndex: 'qtyGjDay', width: 120},
{ title: t('日气量(万方)'), dataIndex: 'qtyM3Day', width: 120},
{ title: t('照付不议类型'), dataIndex: 'zfbyTypeCode', width: 120},
{ title: t('照付不议比例%/量数值'), dataIndex: 'zfbyValue', width: 120},
{ title: t('备注'), dataIndex: 'note', width: 200},
{ title: t('操作'), dataIndex: 'operation', width: 80, fixed: 'right',align: 'center'},
]);
const [register, { openModal:openModal}] = useModal();

View File

@ -33,14 +33,14 @@
const { t } = useI18n();
const dataList = ref([])
const columns= ref([
{ title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 100},
{ title: t('标题'), dataIndex: 'title', sorter: true, width:100},
{ title: t('编号'), dataIndex: 'code', sorter: true},
{ title: t('签报类型'), dataIndex: 'typeName', sorter: true, width: 140},
{ title: t('拟稿人'), dataIndex: 'empName', sorter: true, width: 140},
{ title: t('拟稿人所属部门'), dataIndex: 'bDeptName', sorter: true, width: 140},
{ title: t('拟稿时间'), dataIndex: 'dateAppro', sorter: true, width: 140},
{ title: t('附件'), dataIndex: 'file', sorter: true, width: 140},
{ title: t('序号'), dataIndex: 'index', key: 'index', customRender: (column) => `${column.index + 1}` ,width: 100},
{ title: t('标题'), dataIndex: 'title', width:100},
{ title: t('编号'), dataIndex: 'code', },
{ title: t('签报类型'), dataIndex: 'typeName', width: 140},
{ title: t('拟稿人'), dataIndex: 'empName', width: 140},
{ title: t('拟稿人所属部门'), dataIndex: 'bDeptName', width: 140},
{ title: t('拟稿时间'), dataIndex: 'dateAppro', width: 140},
{ title: t('附件'), dataIndex: 'file', width: 140},
{ title: t('操作'), dataIndex: 'operation', width: 120, fixed: 'right',align: 'center'},
]);
const [register, { openModal:openModal}] = useModal();

View File

@ -33,16 +33,16 @@
const { t } = useI18n();
const dataList = ref([])
const columns= ref([
{ title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 80},
{ title: t('合同号'), dataIndex: 'kNo', sorter: true, width:180},
{ title: t('合同名称'), dataIndex: 'kName', sorter: true, width: 300},
{ title: t('关联类别'), dataIndex: 'relTypeName', sorter: true, width: 100},
{ title: t('合同类别'), dataIndex: 'kTypeName1', sorter: true, width: 100},
{ title: t('合同主体'), dataIndex: 'comName', sorter: true, width: 250},
{ title: t('我方联系人'), dataIndex: 'empName', sorter: true, width: 140},
{ title: t('联系电话'), dataIndex: 'tel', sorter: true, width: 140},
{ title: t('业务部门'), dataIndex: 'bDeptName', sorter: true, width: 140},
{ title: t('附件'), dataIndex: 'file', sorter: true, width: 140},
{ title: t('序号'), dataIndex: 'index', key: 'index', customRender: (column) => `${column.index + 1}` ,width: 80},
{ title: t('合同号'), dataIndex: 'kNo', width:180},
{ title: t('合同名称'), dataIndex: 'kName', width: 300},
{ title: t('关联类别'), dataIndex: 'relTypeName', width: 100},
{ title: t('合同类别'), dataIndex: 'kTypeName1', width: 100},
{ title: t('合同主体'), dataIndex: 'comName', width: 250},
{ title: t('我方联系人'), dataIndex: 'empName', width: 140},
{ title: t('联系电话'), dataIndex: 'tel', width: 140},
{ title: t('业务部门'), dataIndex: 'bDeptName', width: 140},
{ title: t('附件'), dataIndex: 'file', width: 140},
{ title: t('操作'), dataIndex: 'operation', width: 120, fixed: 'right',align: 'center'},
]);
const [register, { openModal:openModal}] = useModal();

View File

@ -21,11 +21,11 @@
];
const columns: BasicColumn[] = [
{ dataIndex: 'cuCode', title: '客户编码', align: 'left', sorter: true },
{ dataIndex: 'cuName', title: '客户名称', align: 'left', sorter: true },
{ dataIndex: 'cuSname', title: '客户简称', align: 'left', sorter: true },
{ dataIndex: 'dI', title: '国内/国际', align: 'left', sorter: true },
{ dataIndex: 'classCode', title: '客户分类', align: 'left', sorter: true },
{ dataIndex: 'cuCode', title: '客户编码', align: 'left', },
{ dataIndex: 'cuName', title: '客户名称', align: 'left', },
{ dataIndex: 'cuSname', title: '客户简称', align: 'left', },
{ dataIndex: 'dI', title: '国内/国际', align: 'left', },
{ dataIndex: 'classCode', title: '客户分类', align: 'left', },
];
const emit = defineEmits(['success', 'register']);

View File

@ -30,11 +30,11 @@
];
const columns: BasicColumn[] = [
{ dataIndex: 'cuCode', title: '客户编码', align: 'left', sorter: true },
{ dataIndex: 'cuName', title: '客户名称', align: 'left', sorter: true },
{ dataIndex: 'cuSname', title: '客户简称', align: 'left', sorter: true },
{ dataIndex: 'dI', title: '国内/国际', align: 'left', sorter: true },
{ dataIndex: 'classCode', title: '客户分类', align: 'left', sorter: true },
{ dataIndex: 'cuCode', title: '客户编码', align: 'left', },
{ dataIndex: 'cuName', title: '客户名称', align: 'left', },
{ dataIndex: 'cuSname', title: '客户简称', align: 'left', },
{ dataIndex: 'dI', title: '国内/国际', align: 'left', },
{ dataIndex: 'classCode', title: '客户分类', align: 'left', },
];
const codeFormSchemaSupplier: FormSchema[] = [
@ -42,11 +42,11 @@
];
const columnsSupplier: BasicColumn[] = [
{ dataIndex: 'suCode', title: '供应商编码', align: 'left', sorter: true },
{ dataIndex: 'suName', title: '供应商名称', align: 'left', sorter: true },
{ dataIndex: 'suSname', title: '供应商简称', align: 'left', sorter: true },
{ dataIndex: 'dI', title: '国内/国际', align: 'left', sorter: true },
{ dataIndex: 'classCode', title: '供应商分类', align: 'left', sorter: true },
{ dataIndex: 'suCode', title: '供应商编码', align: 'left', },
{ dataIndex: 'suName', title: '供应商名称', align: 'left', },
{ dataIndex: 'suSname', title: '供应商简称', align: 'left', },
{ dataIndex: 'dI', title: '国内/国际', align: 'left', },
{ dataIndex: 'classCode', title: '供应商分类', align: 'left', },
];
const emit = defineEmits(['success', 'register']);

View File

@ -30,8 +30,8 @@
];
const columns: BasicColumn[] = [
{ dataIndex: 'name', title: '组织名称', align: 'left', sorter: true },
{ dataIndex: 'code', title: '组织编码', align: 'left', sorter: true },
{ dataIndex: 'name', title: '组织名称', align: 'left', },
{ dataIndex: 'code', title: '组织编码', align: 'left', },
];
const emit = defineEmits(['success', 'register']);

View File

@ -30,10 +30,10 @@
];
const treeData = ref<TreeItem[]>([]);
const columns: BasicColumn[] = [
{ dataIndex: 'name', title: '姓名', align: 'left', sorter: true },
{ dataIndex: 'genderDesc', title: '性别', align: 'left', sorter: true },
{ dataIndex: 'mobile', title: '手机号', align: 'left', sorter: true },
{ dataIndex: 'email', title: '邮箱', align: 'left', sorter: true },
{ dataIndex: 'name', title: '姓名', align: 'left', },
{ dataIndex: 'genderDesc', title: '性别', align: 'left', },
{ dataIndex: 'mobile', title: '手机号', align: 'left', },
{ dataIndex: 'email', title: '邮箱', align: 'left', },
];
const emit = defineEmits(['success', 'register']);

View File

@ -20,11 +20,11 @@
];
const columns: BasicColumn[] = [
{ dataIndex: 'code', title: '编码', componentType: 'input', align: 'left', sorter: true},
{ dataIndex: 'fullName', title: '名称', componentType: 'input', align: 'left', sorter: true},
{ dataIndex: 'contact', title: '联系人', componentType: 'input', align: 'left', sorter: true},
{ dataIndex: 'tel', title: '电话', componentType: 'input', align: 'left', sorter: true },
{ dataIndex: 'email', title: '邮箱', componentType: 'input', align: 'left', sorter: true}
{ dataIndex: 'code', title: '编码', componentType: 'input', align: 'left', },
{ dataIndex: 'fullName', title: '名称', componentType: 'input', align: 'left', },
{ dataIndex: 'contact', title: '联系人', componentType: 'input', align: 'left', },
{ dataIndex: 'tel', title: '电话', componentType: 'input', align: 'left', },
{ dataIndex: 'email', title: '邮箱', componentType: 'input', align: 'left', }
];
const emit = defineEmits(['success', 'register', 'cancel']);

View File

@ -0,0 +1,62 @@
<template>
<div>
<BasicModal v-bind="$attrs" @register="registerModal" width="60%" :title="getTitle" @ok="handleSubmit" >
<a-table bordered rowKey="id" :columns="columns" :data-source="dataList" :pagination="false" :row-selection="{ type:'radio', selectedRowKeys: selectedKeys, onChange: onSelectChange }"/>
</BasicModal>
</div>
</template>
<script lang="ts" setup>
import { ref, computed, unref, nextTick } from 'vue';
import { BasicModal, useModalInner, useModal } from '/@/components/Modal';
import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n';
const { t } = useI18n();
const columns: BasicColumn[] = [
{ title: t('下载点编码'), dataIndex: 'pointDelyCode', },
{ title: t('下载点名称'), dataIndex: 'pointDelyName', },
];
const emit = defineEmits(['success', 'register']);
const { notification } = useMessage();
const isUpdate = ref(true);
const rowId = ref('');
const selectedKeys = ref<string[]>([]);
const selectedValues = ref([]);
const dataList =ref([])
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ confirmLoading: false });
dataList.value = data.list || []
isUpdate.value = !!data?.isUpdate;
});
function onSelectChange(rowKeys: string[], e) {
selectedKeys.value = rowKeys;
selectedValues.value = e
}
const getTitle = computed(() => (!unref(isUpdate) ? t('合同列表') : t('')));
async function handleSubmit() {
if (!selectedValues.value.length) {
notification.warning({
message: t('提示'),
description: t('请选择合同')
});
return
}
closeModal();
emit('success', selectedValues.value);
}
</script>
<style >
</style>

View 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>

View File

@ -21,11 +21,11 @@
];
const columns: BasicColumn[] = [
{ dataIndex: 'suCode', title: '供应商编码', align: 'left', sorter: true },
{ dataIndex: 'suName', title: '供应商名称', align: 'left', sorter: true },
{ dataIndex: 'suSname', title: '供应商简称', align: 'left', sorter: true },
{ dataIndex: 'dI', title: '国内/国际', align: 'left', sorter: true },
{ dataIndex: 'classCode', title: '供应商分类', align: 'left', sorter: true },
{ dataIndex: 'suCode', title: '供应商编码', align: 'left', },
{ dataIndex: 'suName', title: '供应商名称', align: 'left', },
{ dataIndex: 'suSname', title: '供应商简称', align: 'left', },
{ dataIndex: 'dI', title: '国内/国际', align: 'left', },
{ dataIndex: 'classCode', title: '供应商分类', align: 'left', },
];
const emit = defineEmits(['success', 'register']);

View File

@ -76,4 +76,24 @@ span {
.ant-form-item-label > label {
color: rgba(0, 0, 0, 0.65) !important;
}
}
.ant-table-container {
.ant-table-thead > tr > th, .ant-table-tbody > tr > td, .ant-table tfoot > tr > th, .ant-table tfoot > tr > td {
padding: 0px 8px;
height: 40px;
}
.ant-table-thead {
background: #F6F8FA;
height: 46px;
}
.ant-table-column-title {
font-weight: bold;
color: rgba(0, 0, 0, 0.85) !important;
}
.ant-table-column-sorters {
justify-content: flex-start;
display: inline-flex;
}
}

View File

@ -286,6 +286,14 @@ export const PAGE_CUSTOM_ROUTE: AppRouteRecordRaw[] = [{
title: (route) => route.query.formName
}
},
{
path: '/dayPlan/Demand/createForm',
name: 'Demand',
component: () => import('/@/views/dayPlan/Demand/components/createForm.vue'),
meta: {
title: (route) => route.query.formName
}
},
]

View File

@ -318,17 +318,17 @@
wrapperCol: { span: 16 },
}
const columns= ref([
{ title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 100},
{ title: t('相对方名称'), dataIndex: 'cpName', sorter: true, width:200},
{ title: t('相对方顺序'), dataIndex: 'sort', sorter: true, width: 130},
{ title: t('相对方银行名称'), dataIndex: 'cpBankName', sorter: true, width: 200},
{ title: t('对方银行开户名'), dataIndex: 'cpBankAccountName', sorter: true, width: 300},
{ title: t('对方银行账号'), dataIndex: 'cpBankAccount', sorter: true, width: 200},
{ title: t('对方联系人姓名'), dataIndex: 'contactName', sorter: true, width: 200},
{ title: t('对方联系人电话'), dataIndex: 'contactTel', sorter: true, width: 200},
{ title: t('对方联系人邮箱'), dataIndex: 'contactEmail', sorter: true, width: 200},
{ title: t('对方通讯地址'), dataIndex: 'contactAddress', sorter: true, width: 200},
{ title: t('备注'), dataIndex: 'note', sorter: true, width: 200},
{ title: t('序号'), dataIndex: 'index', key: 'index', customRender: (column) => `${column.index + 1}` ,width: 100},
{ title: t('相对方名称'), dataIndex: 'cpName', width:200},
{ title: t('相对方顺序'), dataIndex: 'sort', width: 130},
{ title: t('相对方银行名称'), dataIndex: 'cpBankName', width: 200},
{ title: t('对方银行开户名'), dataIndex: 'cpBankAccountName', width: 300},
{ title: t('对方银行账号'), dataIndex: 'cpBankAccount', width: 200},
{ title: t('对方联系人姓名'), dataIndex: 'contactName', width: 200},
{ title: t('对方联系人电话'), dataIndex: 'contactTel', width: 200},
{ title: t('对方联系人邮箱'), dataIndex: 'contactEmail', width: 200},
{ title: t('对方通讯地址'), dataIndex: 'contactAddress', width: 200},
{ title: t('备注'), dataIndex: 'note', width: 200},
{ title: t('操作'), dataIndex: 'operation', width: 120, fixed: 'right',align: 'center'},
]);
const dataList = ref([])
@ -434,6 +434,9 @@
} else {
rules.dateTo = [{ required: false, message: "该项为必填项", trigger: 'change' }]
rules.dateFrom = [{ required: false, message: "该项为必填项", trigger: 'change' }]
formState.dateFrom = dayjs('2000-01-01')
formState.dateTo = dayjs('2999-12-31')
}
}
const amountTypeCodeChange = (val) => {

View File

@ -16,7 +16,7 @@
</a-col>
<a-col :span="8">
<a-form-item label="合同期限" name="kPeriod">
<a-select v-model:value="formState.kPeriod" :disabled="isDisable" placeholder="请选择合同期限" style="width: 100%" allow-clear>
<a-select v-model:value="formState.kPeriod" :disabled="isDisable" placeholder="请选择合同期限" @change="periodTypeCodeChange" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.kPeriodList" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
@ -319,6 +319,12 @@
}
});
const periodTypeCodeChange = (val) => {
if (val !== 'Y') {
formState.dateFrom = dayjs('2000-01-01')
formState.dateTo = dayjs('2999-12-31')
}
}
const uploadListChange = (val) => {
dataFile.value = val
}

View File

@ -16,7 +16,7 @@
</a-col>
<a-col :span="8">
<a-form-item label="合同期限" name="kPeriod">
<a-select v-model:value="formState.kPeriod" :disabled="isDisable" placeholder="请选择合同期限" style="width: 100%" allow-clear>
<a-select v-model:value="formState.kPeriod" :disabled="isDisable" placeholder="请选择合同期限" style="width: 100%" allow-clear @change="periodTypeCodeChange">
<a-select-option v-for="item in optionSelect.kPeriodList" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
@ -113,9 +113,9 @@
</Card>
<Card title="业务信息" :bordered="false" >
<h4>交割点</h4>
<a-button type="primary" style="margin-bottom: 10px;margin-right: 10px;" @click="addUpLoad" v-if="!isDisable">新增</a-button>
<a-button type="primary" @click="deleteUpLoad" v-if="!isDisable">删除</a-button>
<div v-for="(item, idx) in dataListPoint" class="tbStyle">
<a-button type="primary" style="margin-bottom: 10px;margin-right: 10px;" @click="addUpLoad" v-if="!isDisable">新增</a-button>
<a-button type="primary" @click="deleteUpLoad(idx)" v-if="!isDisable">删除</a-button>
<a-row>
<a-col :span="8">
<a-form-item name="pointDelyName">
@ -266,27 +266,27 @@
wrapperCol: { span: 16 },
}
const columnsUp = ref([
{ title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 80},
{ title: t('交割点'), dataIndex: 'pointDelyName', sorter: true, width:150},
{ title: t('是否托运'), dataIndex: 'transName', sorter: true, width: 150},
{ title: t('供应商'), dataIndex: 'cpName', sorter: true, width: 130},
{ title: t('合同名称'), dataIndex: 'kName', sorter: true, width: 100},
{ title: t('上载点'), dataIndex: 'pointUpName', sorter: true, width: 150},
{ title: t('有效期开始'), dataIndex: 'dateFrom', sorter: true, width: 150},
{ title: t('有效期结束'), dataIndex: 'dateTo', sorter: true, width: 150},
{ title: t('备注)'), dataIndex: 'note', sorter: true, width: 180}
{ title: t('序号'), dataIndex: 'index', key: 'index', customRender: (column) => `${column.index + 1}` ,width: 80},
{ title: t('交割点'), dataIndex: 'pointDelyName', width:150},
{ title: t('是否托运'), dataIndex: 'transName', width: 150},
{ title: t('供应商'), dataIndex: 'cpName', width: 130},
{ title: t('合同名称'), dataIndex: 'kName', width: 100},
{ title: t('上载点'), dataIndex: 'pointUpName', width: 150},
{ title: t('有效期开始'), dataIndex: 'dateFrom', width: 150},
{ title: t('有效期结束'), dataIndex: 'dateTo', width: 150},
{ title: t('备注)'), dataIndex: 'note', width: 180}
])
const columnsTrans = ref([
{ title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 80},
{ title: t('交割点'), dataIndex: 'pointDelyName', sorter: true, width:150},
{ title: t('是否托运'), dataIndex: 'transName', sorter: true, width: 150},
{ title: t('托运商'), dataIndex: 'cpName', sorter: true, width: 130},
{ title: t('合同名称'), dataIndex: 'kName', sorter: true, width: 100},
{ title: t('管输上载点'), dataIndex: 'pointUpTransName', sorter: true, width: 150},
{ title: t('管输下载点'), dataIndex: 'pointDelyTransName', sorter: true, width: 150},
{ title: t('有效期开始'), dataIndex: 'dateFrom', sorter: true, width: 150},
{ title: t('有效期结束'), dataIndex: 'dateTo', sorter: true, width: 150},
{ title: t('备注)'), dataIndex: 'note', sorter: true, width: 180}
{ title: t('序号'), dataIndex: 'index', key: 'index', customRender: (column) => `${column.index + 1}` ,width: 80},
{ title: t('交割点'), dataIndex: 'pointDelyName', width:150},
{ title: t('是否托运'), dataIndex: 'transName', width: 150},
{ title: t('托运商'), dataIndex: 'cpName', width: 130},
{ title: t('合同名称'), dataIndex: 'kName', width: 100},
{ title: t('管输上载点'), dataIndex: 'pointUpTransName', width: 150},
{ title: t('管输下载点'), dataIndex: 'pointDelyTransName', width: 150},
{ title: t('有效期开始'), dataIndex: 'dateFrom', width: 150},
{ title: t('有效期结束'), dataIndex: 'dateTo', width: 150},
{ title: t('备注)'), dataIndex: 'note', width: 180}
])
const dataListContractAgree = ref([])
const dataFile = ref([]);
@ -339,6 +339,12 @@
}
});
const periodTypeCodeChange = (val) => {
if (val !== 'Y') {
formState.dateFrom = dayjs('2000-01-01')
formState.dateTo = dayjs('2999-12-31')
}
}
const uploadListChange = (val) => {
dataFile.value = val
}
@ -470,12 +476,12 @@
purList: []
})
}
const deleteUpLoad = () => {
const deleteUpLoad = (idx) => {
if (dataListPoint.value[dataListPoint.value.length -1].id) {
hasDel.value = true
}
if (dataListPoint.value.length == 1) return
dataListPoint.value.pop()
dataListPoint.value.splice(idx, 1)
}
const handleSuccess = (val) => {

View File

@ -58,4 +58,7 @@
font-size: 14px;
height: 440px;
}
:deep(.content-box p img) {
margin: 0 auto;
}
</style>

View File

@ -1,105 +1,135 @@
<template>
<a-row>
<a-col :span="8">
<a-form-item label="计划日期" name="datePlan">
<a-date-picker v-model:value="formState.datePlan" :disabled-date="disabledDateStart" style="width: 100%" placeholder="请选择计划日期" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="合同" name="kName">
<a-input-search v-model:value="formState.kName" :disabled="isDisable" placeholder="请选择合同" readonly @search="onSearch"/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="下载点" name="fullName" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
{{ formState.fullName }}
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="合同量(吉焦)" name="qtyContractGj">{{ formState.qtyContractGj }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="合同量(方)" name="qtyContractM3">{{ formState.qtyContractM3 }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="月合同量执行进度%" name="rateK">{{ formState.rateK }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="计划量(吉焦)" name="qtyPlanGj">{{ formState.qtyPlanGj }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="计划量(方)" name="qtyPlanM3">{{ formState.qtyPlanM3 }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="月计划量执行进度%" name="rateMp">{{ formState.rateMp }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="指定量(吉焦)" name="qtyDemandGj">{{ formState.qtyDemandGj }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="指定量(方)" name="qtyDemandM3">{{ formState.qtyDemandM3 }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="月时间进度%" name="rateS">{{ formState.rateS }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="批复量(吉焦)" name="qtySalesGj">{{ formState.qtySalesGj }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="批复量(方)" name="qtySalesM3">{{ formState.qtySalesM3 }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="比值(方/吉焦)" name="rateM3Gj">{{ formState.rateM3Gj }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="交易主体" name="name">{{ formState.name }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="版本号" name="verNo">{{ formState.verNo }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="审批状态" name="approName">{{ formState.approName }}</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="开机方式" name="" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
<div style="display: flex;">
<div class="dot"><span style="background:#04F21C"></span>连运<i>{{ formState.powerCont }}</i></div>
<div class="dot"><span style="background:#FFFF00"></span>调峰<i>{{ formState.powerCont }}</i></div>
<div class="dot"><span style="background:#D9001B"></span>停机<i>{{ formState.powerStop }}</i></div>
<div class="dot"><span style="background:#CA90FF"></span>其他<i>{{ formState.powerOther }}</i></div>
</div>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="备注" name="note" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
{{ formState.note }}
</a-form-item>
</a-col>
</a-row>
<a-form ref="formRef" :model="formState" :rules="rules" v-bind="layout">
<a-row>
<a-col :span="8">
<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" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="合同" name="kName">
<a-input-search v-model:value="formState.kName" :disabled="disable" placeholder="请选择合同" readonly @search="onSearch"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="下载点" name="pointDelyName">
<a-input-search v-model:value="formState.pointDelyName" :disabled="disable" placeholder="请选择下载点" readonly @search="onSearchUpLoad"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="合同量(吉焦)" name="qtyContractGj">{{ formState.qtyContractGj }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="合同量(方)" name="qtyContractM3">{{ formState.qtyContractM3 }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="月合同量执行进度%" name="rateK">{{ formState.rateK }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="计划量(吉焦)" name="qtyPlanGj">{{ formState.qtyPlanGj }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="计划量(方)" name="qtyPlanM3">{{ formState.qtyPlanM3 }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="月计划量执行进度%" name="rateMp">{{ formState.rateMp }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="指定量(吉焦)" name="qtyDemandGj">{{ formState.qtyDemandGj }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="指定量(方)" name="qtyDemandM3">{{ formState.qtyDemandM3 }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="月时间进度%" name="rateS">{{ formState.rateS }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="批复量(吉焦)" name="qtySalesGj">{{ formState.qtySalesGj }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="批复量(方)" name="qtySalesM3">{{ formState.qtySalesM3 }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="比值(方/吉焦)" name="rateM3Gj">{{ formState.rateM3Gj }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="交易主体" name="name">{{ formState.name }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="版本号" name="verNo">{{ formState.verNo }}</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="审批状态" name="approName">{{ formState.approName }}</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="开机方式" name="" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
<div style="display: flex;">
<div class="dot"><span style="background:#04F21C"></span>连运<a-input-number v-model:value="formState.powerCont" :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:#D9001B"></span>停机<a-input-number v-model:value="formState.powerStop" :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>
</a-form-item>
</a-col>
<a-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 }"/>
</a-form-item>
</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}">
<template #bodyCell="{ column, record, index }">
<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%" />
<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%" />
</template>
<template v-if="column.dataIndex === 'qtySalesM3'">
<a-input-number v-model:value="record.qtySalesM3" :disabled="record.alterSign=='D' || disable" :min="0" @change="numChange" style="width: 100%" />
<template v-if="column.dataIndex === 'qtyDemandM3'">
<a-input-number v-model:value="record.qtyDemandM3" :disabled="disable" :min="0" @change="numChange('qtyDemandM3', record)" style="width: 100%" />
</template>
<template v-if="column.dataIndex === 'note'">
<a-input v-model:value="record.note" :disabled="record.alterSign=='D' || disable" style="width: 100%" />
<a-input v-model:value="record.note" style="width: 100%" />
</template>
</template>
</a-table>
<ContractSalesListModal @register="registerContractSales" @success="handleSuccessContractSales" selectType="radio" />
<contractDemandListModal @register="registerContract" @success="handleSuccessContract" />
<pointDelyDemandListModal @register="registerUpLoad" @success="handleSuccessUpLoad" />
</template>
<script lang="ts" setup>
import { useI18n } from '/@/hooks/web/useI18n';
import { useRouter } from 'vue-router';
import { ref, computed, onMounted, onBeforeMount, nextTick, defineAsyncComponent, reactive, defineComponent, watch} from 'vue';
import ContractSalesListModal from '/@/components/common/ContractSalesListModal.vue';
import { useModal } from '/@/components/Modal';
import contractDemandListModal from '/@/components/common/contractDemandListModal.vue';
import pointDelyDemandListModal from '/@/components/common/pointDelyDemandListModal.vue';
import { useModal } from '/@/components/Modal';
import { message } from 'ant-design-vue';
import dayjs from 'dayjs';
import { getCompDept } from '/@/api/approve/Appro';
import { useUserStore } from '/@/store/modules/user';
import { getLngPngDemandContractList, getLngPngDemandPointDely, getLngPngDemandContractQty, getLngPngDemandPurList, getLngPngDemandRate } from '/@/api/dayPlan/Demand';
const userStore = useUserStore();
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 [registerContractSales, { openModal:openModalContractSales}] = useModal();
const [registerContract, { openModal:openModalContractSales}] = useModal();
const [registerUpLoad, { openModal:openModalUpLoad}] = useModal();
const props = defineProps({
formObj: {},
list: [],
@ -107,47 +137,161 @@
});
const columns= ref([
{ title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 100},
{ title: t('上载点'), dataIndex: 'pointUpName', sorter: true, width:200},
{ title: t('供应商'), dataIndex: 'suSname', sorter: true, width: 130},
{ title: t('采购合同'), dataIndex: 'kName', sorter: true, width: 200},
{ title: t('指定量(吉焦)'), dataIndex: 'qtyDemandGj', sorter: true, width: 300},
{ title: t('指定量(方)'), dataIndex: 'qtyDemandM3', sorter: true, width: 200},
{ title: t('批复量(吉焦)'), dataIndex: 'qtySalesGj', sorter: true, width: 200},
{ title: t('批复量(方)'), dataIndex: 'qtySalesM3', sorter: true, width: 200},
{ title: t('备注'), dataIndex: 'note', sorter: true, width: 200},
{ title: t('序号'), dataIndex: 'index', key: 'index', customRender: (column) => `${column.index + 1}` ,width: 100},
{ title: t('供应商'), dataIndex: 'suName', width: 300},
{ title: t('上载点'), dataIndex: 'pointUpName', width:300},
{ title: t('指定量(吉焦)'), dataIndex: 'qtyDemandGj', width: 200},
{ title: t('指定量()'), dataIndex: 'qtyDemandM3', width: 200},
{ title: t('批复量(吉焦)'), dataIndex: 'qtySalesGj', width: 200},
{ title: t('批复量()'), dataIndex: 'qtySalesM3', width: 200},
{ title: t('备注'), dataIndex: 'note', width: 200},
]);
const formState = reactive({})
const formState = ref({
datePlan: null,
lastVerSign: 'Y',
validSign: 'N',
alterSign: 'I',
approCode: 'WTJ'
})
const dataList = ref([])
async function numChange () {
const contractList = ref([])
const pointDelyList = ref([])
onMounted(async () =>{
const res = await getCompDept(userInfo.id)
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 (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 num1 = 1;
dataList.forEach(v => {
let num1 = 0;
dataList.value.forEach(v => {
num+=(Number(v.qtyDemandM3) || 0)
num1+=(Number(v.qtyDemandGj) || 0)
})
formState.value.qtyDemandM3 = num ? num.toFixed(5) : ''
formState.value.qtyDemandGj = num1 ? num1.toFixed(5) : ''
}
const datePlanChange = async (val) => {
if (!val) {
formState.value = {}
dataList.value = []
return
}
let obj = {
cuCode:formState.value.cuCode,
datePlan: dayjs(formState.value.datePlan).format('YYYY-MM-DD')
}
let res = await getLngPngDemandContractList(obj)
contractList.value = res || []
if (contractList.value.length == 1) {
formState.value.kName = contractList.value[0].kName
formState.value.ksId = contractList.value[0].id
getPointDely()
getContractQty()
}
}
const onSearch = ()=> {
if (!formState.value.datePlan) {
message.warn('请选择计划日期')
return
}
openModalContractSales(true,{isUpdate: false, list: contractList.value})
}
const handleSuccessContract = (val) => {
formState.value.kName = val[0].kName
formState.value.ksId = val[0].id
getPointDely()
getContractQty()
}
const onSearchUpLoad = (val)=> {
if (!formState.value.kName) {
message.warn('请选择合同')
return
}
openModalUpLoad(true,{isUpdate: false, list: pointDelyList.value})
}
const handleSuccessUpLoad = (val) => {
formState.value.pointDelyName = val[0].pointDelyName
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.qtySalesGj = num
formState.qtySalesM3 = num1
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 onSearch = (val)=> {
openModalContractSales(true,{isUpdate: false})
}
const handleSuccessContractSales = (val) => {
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 today = new Date();
today.setHours(0, 0, 0, 0); // 清除时分秒,确保比较时不考虑时间部分
// 获取明天的日期
const tomorrow = new Date();
tomorrow.setDate(tomorrow.getDate() + 2);
tomorrow.setDate(tomorrow.getDate() + (pageId ? 1 : 2));
tomorrow.setHours(0, 0, 0, 0); // 清除时分秒
// 当前日期小于今天或大于明天,则禁用
return current < today || current > tomorrow;
}
function getFormValue () {
async function getFormValue () {
await formRef.value.validateFields();
let obj = {
formInfo: formState,
formInfo: formState.value,
list: dataList.value
}
return obj
@ -156,7 +300,7 @@
() => props.formObj,
(val) => {
if (val) {
Object.assign(formState, {...val})
formState.value = val
}
},
{
@ -168,6 +312,7 @@
() => props.list,
(val) => {
dataList.value = val
console.log(dataList.value, 88888888888)
},
{
immediate: true,
@ -186,8 +331,8 @@
margin-right: 10px;
display: flex;
align-items: center;
i{
padding: 5px;
.ant-input-number{
margin:0 5px;
font-style: normal;
}
span{

View File

@ -51,7 +51,7 @@ export const columns: BasicColumn[] = [
title: '版本号',
componentType: 'input',
align: 'left',
width: 100,
sorter: true,
},
@ -60,12 +60,12 @@ export const columns: BasicColumn[] = [
title: '计划日期',
componentType: 'input',
align: 'left',
width: 120,
sorter: true,
},
{
dataIndex: 'pointDelyCode',
dataIndex: 'pointDelyName',
title: '下载点',
componentType: 'input',
align: 'left',
@ -110,7 +110,7 @@ export const columns: BasicColumn[] = [
},
{
dataIndex: 'ksId',
dataIndex: 'ksName',
title: '合同',
componentType: 'input',
align: 'left',
@ -135,22 +135,12 @@ export const columns: BasicColumn[] = [
sorter: true,
},
{
dataIndex: 'id',
title: 'id',
dataIndex: 'approName',
title: '审批状态',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'orgId',
title: 'orgId',
componentType: 'input',
align: 'left',
width: 100,
sorter: true,
},
];

View File

@ -1,14 +1,27 @@
<template>
<a-spin :spinning="spinning" tip="加载中...">
<div class="page-bg-wrap formViewStyle">
<a-form ref="formRef" :model="formState" :rules="rules" v-bind="layout">
<div class="page-bg-wrap formViewStyle pdcss">
<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" >
<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 :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>
</a-form>
</div>
</a-spin>
</template>
@ -18,7 +31,7 @@
import { useRouter } from 'vue-router';
import { FromPageType, RecordType } from '/@/enums/workflowEnum';
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 { useI18n } from '/@/hooks/web/useI18n';
import { useMultipleTabStore } from '/@/store/modules/multipleTab';
@ -26,7 +39,7 @@
import type { Rule } from 'ant-design-vue/es/form';
import { getDictionary } from '/@/api/sales/Customer';
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 { getAppEnvConfig } from '/@/utils/env';
import { message } from 'ant-design-vue';
@ -64,17 +77,11 @@
const { t } = useI18n();
const hasDel = ref(false)
const formState = reactive({
datePlan: null
});
const [register, { openModal:openModal}] = useModal();
const rules= reactive({
// kNo: [{ required: true, message: "该项为必填项", trigger: 'change' }],
});
const layout = {
labelCol: { span: 9 },
wrapperCol: { span: 18 },
}
const title = ref('日计划审批')
const title = ref('管道气需求')
const dataList = ref([])
const basicFormRef = ref()
let optionSelect= reactive({
@ -92,7 +99,6 @@
}
);
onMounted(() => {
getOption()
if (pageId.value) {
getInfo(pageId.value)
}
@ -101,97 +107,88 @@
async function getInfo(id) {
spinning.value = true
try {
let data = await getLngPngAppro(id)
let data = await getLngPngDemand(id)
spinning.value = false
Object.assign(formState, {...data})
Object.assign(dataList.value, formState.lngPngApproPurList || [{}])
const startDate = dayjs(formState.datePlan);
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
});
let obj = changeData(data)
Object.assign(formState, {...obj.params})
Object.assign(dataList.value, obj.list || [{}])
} catch (error) {
console.log(error, 'error')
spinning.value = false
}
}
async function numChange () {
let num = 0;
let num1 = 1;
dataList.value.forEach(v => {
num+=(Number(v.qtySalesGj) || 0)
num1+=(Number(v.qtySalesM3) || 0)
})
formState.qtySalesGj = num
formState.qtySalesM3 = num1
}
async function getOption() {
optionSelect.approCodeList = await getDictionary('LNG_APPRO')
const changeData = (obj) => {
let arr = obj.lngPngDemandPurList || [{}]
obj.datePlan = obj.datePlan ? dayjs(obj.datePlan) : null
obj.qtyContractM3 = Number(obj.qtyContractM3)/10000
obj.qtyPlanM3 = Number(obj.qtyPlanM3)/10000
obj.qtyDemandM3 = Number(obj.qtyDemandM3)/10000
obj.qtySalesM3 = Number(obj.qtySalesM3)/10000
arr.forEach(v => {
v.qtyDemandM3 = Number(v.qtyDemandM3)/10000
v.qtySalesM3 = Number(v.qtySalesM3)/10000
}
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() {
tabStore.closeTab(currentRoute.value, router);
}
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 {
if (type == 'reject') {
if (!formState.reply) {
message.warn('请输入批复意见')
return
}
const data = await formRef.value.getFormValue();
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,
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;
notification.success({
message: 'Tip',
description: type == 'agree' ? '审批通过':'已驳回'
description: type == 'save' ? '保存成功':'已提交'
}); //提示消息
setTimeout(() => {
bus.emit(FORM_LIST_MODIFIED, {});
close();
}, 500);
}catch (errorInfo) {
spinning.value = false;
} catch (errorInfo) {
spinning.value = false;
errorInfo?.errorFields?.length && notification.warning({
message: 'Tip',
description: '请完善信息'
});
}
}
}
</script>
@ -205,6 +202,9 @@
margin-bottom: 12px;
border-bottom: 1px solid #eee;
}
.pdcss {
padding:0px 12px 6px 12px !important;
}
.dot {
margin-right: 10px;
display: flex;

View File

@ -78,9 +78,9 @@
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":"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":"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":"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 actionButtons = ref<string[]>(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord']);
const actionButtons = ref<string[]>(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord', 'update', 'back', 'compare', 'submit', 'cancel']);
const buttonConfigs = computed(()=>{
return filterButtonAuth(buttons.value);
})
@ -131,7 +131,7 @@
showResetButton: true,
},
beforeFetch: (params) => {
return { ...params, FormId: formIdComputedRef.value, PK: 'id' };
return { ...params, FormId: formIdComputedRef.value, PK: 'id',page:params.limit };
},
afterFetch: (res) => {
tableRef.value.setToolBarWidth();
@ -180,11 +180,13 @@
});
} else {
router.push({
path: '/form/Demand/' + record.id + '/viewForm',
path: '/dayPlan/Demand/createForm',
query: {
formPath: 'dayPlan/Demand',
formName: formName,
formId:currentRoute.value.meta.formId
formId:currentRoute.value.meta.formId,
id: record.Id,
type:'view'
}
});
}
@ -206,7 +208,7 @@
});
} else {
router.push({
path: '/form/Demand/0/createForm',
path: '/dayPlan/Demand/createForm',
query: {
formPath: 'dayPlan/Demand',
formName: formName,
@ -217,13 +219,13 @@
}
function handleEdit(record: Recordable) {
router.push({
path: '/form/Demand/' + record.id + '/updateForm',
path: '/dayPlan/Demand/createForm',
query: {
formPath: 'dayPlan/Demand',
formName: formName,
formId:currentRoute.value.meta.formId
formPath: 'dayPlan/Demand',
formName: formName,
formId:currentRoute.value.meta.formId,
id: record.Id
}
});
}

View File

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

View File

@ -36,7 +36,154 @@ export const searchFormSchema: FormSchema[] = [
},
},
];
export const columnsGd: BasicColumn[] = [
{
dataIndex: 'datePlan',
title: '计划日期',
componentType: 'input',
align: 'left',
width: 100,
sorter: true,
},
{
dataIndex: 'daysSign',
title: '当日/次日',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'pointName',
title: '下载点',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'qtyGjGd',
title: '待管道审批量(吉焦)',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'qtyGjXs',
title: '前审中量(吉焦)',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'qtyGjYsp',
title: '管道已审批量(吉焦)',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'staName',
title: '接收站',
componentType: 'input',
align: 'left',
sorter: true,
},
];
export const columnsJsz: BasicColumn[] = [
{
dataIndex: 'catName',
title: '品种',
componentType: 'input',
align: 'left',
width: 80,
sorter: true,
},
{
dataIndex: 'datePlan',
title: '计划日期',
componentType: 'input',
align: 'left',
width: 100,
sorter: true,
},
{
dataIndex: 'daysSign',
title: '当日/次日',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'qtyGjAll',
title: '全部上报量(吉焦)',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'qtyGjJsz',
title: '待接收站审批量(吉焦)',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'qtyGjXs',
title: '前审中量(吉焦)',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'qtyGjYsp',
title: '管道已审批量(吉焦)',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'staName',
title: '接收站',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'uomName',
title: '单位',
componentType: 'input',
align: 'left',
sorter: true,
},
];
export const columns: BasicColumn[] = [

View File

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

View File

@ -0,0 +1,460 @@
<template>
<PageWrapper dense fixedHeight contentFullHeight contentClass="flex">
<BasicTable @register="registerTable" ref="tableRef" @row-dbClick="dbClickRow">
<template #toolbar>
<template v-for="button in tableButtonConfig" :key="button.code">
<a-button v-if="button.isDefault" :type="button.type" @click="buttonClick(button.code)">
<template #icon><Icon :icon="button.icon" /></template>
{{ button.name }}
</a-button>
<a-button v-else :type="button.type">
<template #icon><Icon :icon="button.icon" /></template>
{{ button.name }}
</a-button>
</template>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'approName'">
<a @click="btnCheck(record)">{{ record.approName }}</a>
</template>
<template v-if="column.dataIndex === 'action'">
<TableAction :actions="getActions(record)" />
</template>
</template>
</BasicTable>
<PngApproModal @register="registerModal" @success="handleSuccess" />
<DataLog :logId="logId" :logPath="logPath" v-model:visible="modalVisible"/>
<approStatusModal @register="registerApproStatus" ></approStatusModal>
<rejectReplyModal @register="registerRejectReply" @success="handleRejectReply" />
</PageWrapper>
</template>
<script lang="ts" setup>
const modalVisible = ref(false);
const logId = ref('')
const logPath = ref('/dayPlan/pngAppro/datalog');
import { DataLog } from '/@/components/pcitc';
import { ref, computed, onMounted, onUnmounted, } from 'vue';
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table';
import { getLngPngApproPage, deleteLngPngAppro} from '/@/api/dayPlan/PngAppro';
import { PageWrapper } from '/@/components/Page';
import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n';
import { usePermission } from '/@/hooks/web/usePermission';
import { useFormConfig } from '/@/hooks/web/useFormConfig';
import { useRouter } from 'vue-router';
import { setIndexFlowStatus } from '/@/utils/flow/index'
import { getLngPngAppro,getLngPngApproPageGd, getLngPngApproPageJsz, approveLngPngApproSZ, approveLngPngApproGD, approveLngPngAppro
} from '/@/api/dayPlan/PngAppro';
import { useModal,BasicModal } from '/@/components/Modal';
import LookProcess from '/@/views/workflow/task/components/LookProcess.vue';
import LaunchProcess from '/@/views/workflow/task/components/LaunchProcess.vue';
import ApprovalProcess from '/@/views/workflow/task/components/ApprovalProcess.vue';
import { getDraftInfo } from '/@/api/workflow/process';
import { isValidJSON } from '/@/utils/event/design';
import PngApproModal from './components/PngApproModal.vue';
import {formConfig, searchFormSchema, columns, columnsGd, columnsJsz } from './components/config';
import Icon from '/@/components/Icon/index';
import FlowRecord from '/@/views/workflow/task/components/flow/FlowRecord.vue';
import approStatusModal from '/@/components/common/approStatusModal.vue';
import rejectReplyModal from '/@/components/common/rejectReplyModal.vue';
import useEventBus from '/@/hooks/event/useEventBus';
import { cloneDeep } from 'lodash-es';
const { bus, CREATE_FLOW, FLOW_PROCESSED, FORM_LIST_MODIFIED } = useEventBus();
const { notification } = useMessage();
const { t } = useI18n();
defineEmits(['register']);
const { filterColumnAuth, filterButtonAuth } = usePermission();
const { mergeColumns,mergeSearchFormSchema,mergeButtons } = useFormConfig();
const filterColumns = cloneDeep(filterColumnAuth(columns));
const customConfigColums =ref(filterColumns);
const customSearchFormSchema =ref(searchFormSchema);
const tableRef = ref();
//所有按钮
const buttons = ref([{"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":true},{"isUse":true,"name":"驳回","code":"reject","icon":"ant-design:stop-outlined","isDefault":true},{"isUse":true,"name":"审批通过","code":"batchapprove","icon":"ant-design:check-outlined","isDefault":true}]);
//展示在列表内的按钮
const actionButtons = ref<string[]>(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord','approve','reject']);
const buttonConfigs = computed(()=>{
return filterButtonAuth(buttons.value);
})
const tableButtonConfig = computed(() => {
return buttonConfigs.value?.filter((x) => !actionButtons.value.includes(x.code));
});
const actionButtonConfig = computed(() => {
return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code));
});
const btnEvent = {refresh : handleRefresh,view : handleView,startwork : handleStartwork,flowRecord : handleFlowRecord,approve : handleApprove,reject: handleReject,batchapprove: handleBatchApprove}
const { currentRoute } = useRouter();
const router = useRouter();
const path = currentRoute.value?.path
const formIdComputedRef = ref();
formIdComputedRef.value = currentRoute.value.meta.formId
const schemaIdComputedRef = ref();
schemaIdComputedRef.value = currentRoute.value.meta.schemaId
const visibleLookProcessRef = ref(false);
const processIdRef = ref('');
const visibleLaunchProcessRef = ref(false);
const schemaIdRef = ref('');
const formDataRef = ref();
const rowKeyData = ref();
const draftsId = ref();
const selectedKeys = ref([])
const visibleApproveProcessRef = ref(false);
const taskIdRef = ref('');
const visibleFlowRecordModal = ref(false);
const [registerModal, { openModal}] = useModal();
const [registerApproStatus, { openModal: openModalApproStatus}] = useModal();
const [registerRejectReply, { openModal: openModalRejectReply}] = useModal();
const curData = ref({})
let formName='管道气销售审批';
let curPath = 'dayPlan/PngAppro/index'
let request = ''
let requestApprove = ''
if (path.includes('dayPlan/PngAppro/index')) {
formName='管道气销售审批'
curPath = 'dayPlan/PngAppro/index'
request = getLngPngApproPage
requestApprove = approveLngPngAppro
}
if (path.includes('dayPlan/pngPipeAppro/index')) {
formName='管道气管道审批'
curPath = 'dayPlan/pngPipeAppro'
request = getLngPngApproPageGd
requestApprove = approveLngPngApproGD
}
if (path.includes('dayPlan/pngReceiveStationAppro/index')) {
formName='管道气接收站审批'
curPath = 'dayPlan/pngReceiveStationAppro'
request = getLngPngApproPageJsz
requestApprove = approveLngPngApproSZ
}
const [registerTable, { reload, clearSelectedRowKeys, setTableData }] = useTable({
title: '' || (formName + '列表'),
api: request,
rowKey: 'datePlan',
columns: curPath.includes('pngPipeAppro') ? columnsGd : columnsJsz,
formConfig: {
rowProps: {
gutter: 16,
},
schemas: [],
fieldMapToTime: [['datePlan', ['startDate', 'endDate'], 'YYYY-MM-DD HH:mm:ss ', true]],
showResetButton: false,
showSubmitButton: false,
},
beforeFetch: (params) => {
return { ...params, FormId: formIdComputedRef.value, PK: 'id',page: params.limit};
},
afterFetch: (res) => {
tableRef.value.setToolBarWidth();
},
useSearchForm: true,
showTableSetting: true,
striped: false,
actionColumn: {
width: 160,
title: '操作',
dataIndex: 'action',
slots: { customRender: 'action' },
},
rowSelection: {
type: 'checkbox',
onChange: onSelectChange
},
tableSetting: {
size: false,
setting: false,
},
});
const btnCheck = (record)=> {
openModalApproStatus(true,{isUpdate: false,id:record.demandId});
}
function onSelectChange(rowKeys: string[]) {
selectedKeys.value = rowKeys;
}
function dbClickRow(record) {
if (!actionButtonConfig?.value.some(element => element.code == 'view')) {
return;
}
const { processId, taskIds, schemaId } = record.workflowData || {};
if (taskIds && taskIds.length) {
router.push({
path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow',
query: {
taskId: taskIds[0],
formName: formName,
formId:currentRoute.value.meta.formId
}
});
} else if (schemaId && !taskIds && processId) {
router.push({
path: '/flow/' + schemaId + '/' + processId + '/approveFlow',
query: {
readonly: 1,
taskId: '',
formName: formName,
formId:currentRoute.value.meta.formId
}
});
} else {
router.push({
path: '/dayPlan/PngAppro/createForm',
query: {
formPath: curPath,
formName: formName,
formId:currentRoute.value.meta.formId,
id: record.id,
type: 'view'
}
});
// router.push({
// path: '/form/PngAppro/' + record.id + '/viewForm',
// query: {
// formPath: 'dayPlan/PngAppro',
// formName: formName,
// formId:currentRoute.value.meta.formId
// }
// });
}
}
function buttonClick(code) {
btnEvent[code]();
}
function handleDatalog (record: Recordable) {
modalVisible.value = true
logId.value = record.id
}
function handleRefresh() {
reload();
}
function handleSuccess() {
reload();
}
function handleView(record: Recordable) {
dbClickRow(record);
}
async function handleApprove(record: Recordable) {
let obj = {
"result": "C",
"remark": "",
"data": [{datePlan: record.datePlan}]
}
await requestApprove(obj)
handleSuccess();
notification.success({
message: 'Tip',
description: t('审批成功!'),
});
}
function handleReject (record: Recordable) {
curData.value = record
openModalRejectReply(true,{isUpdate: false});
}
const handleRejectReply = async (val) => {
let obj = {
"result": "R",
"remark": val.reply,
"data": [{datePlan: curData.value.datePlan}]
}
await requestApprove(obj)
handleSuccess();
notification.success({
message: 'Tip',
description: t('已驳回!'),
});
}
async function handleBatchApprove () {
if (!selectedKeys.value.length) {
notification.warning({
message: 'Tip',
description: t('请选择需要审批的数据'),
});
return;
}
let arr = selectedKeys.value.map(v=> {
return {
datePlan: v
}
})
let obj = {
"result": "C",
"remark": "",
"data": arr
}
await requestApprove(obj)
handleSuccess();
notification.success({
message: 'Tip',
description: t('审批成功!'),
});
clearSelectedRowKeys()
}
onMounted(() => {
if (schemaIdComputedRef.value) {
bus.on(FLOW_PROCESSED, handleRefresh);
bus.on(CREATE_FLOW, handleRefresh);
} else {
bus.on(FORM_LIST_MODIFIED, handleRefresh);
}
// 合并渲染覆盖配置中的列表配置,包括展示字段配置、搜索字段配置、按钮配置
mergeCustomListRenderConfig();
});
onUnmounted(() => {
if (schemaIdComputedRef.value) {
bus.off(FLOW_PROCESSED, handleRefresh);
bus.off(CREATE_FLOW, handleRefresh);
} else {
bus.off(FORM_LIST_MODIFIED, handleRefresh);
}
});
function getActions(record: Recordable):ActionItem[] {
let actionsList: ActionItem[] = [];
let editAndDelBtn: ActionItem[] = [];
let hasFlowRecord = false;
actionButtonConfig.value?.map((button) => {
if (['view', 'copyData', 'approve', 'reject'].includes(button.code)) {
actionsList.push({
icon: button?.icon,
tooltip: button?.name,
onClick: btnEvent[button.code].bind(null, record),
});
}
if (['edit', 'delete'].includes(button.code)) {
editAndDelBtn.push({
icon: button?.icon,
tooltip: button?.name,
color: button.code === 'delete' ? 'error' : undefined,
onClick: btnEvent[button.code].bind(null, record),
});
}
if (button.code === 'flowRecord') hasFlowRecord = true;
});
// 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;
}
function handleStartwork(record: Recordable) {
const { processId, schemaId } = record.workflowData;
router.push({
path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow',
query: {
readonly: 1,
taskId: '',
formName: formName
}
});
}
function handleFlowRecord(record: Recordable) {
if (record.workflowData) {
visibleFlowRecordModal.value = true;
processIdRef.value = record.workflowData?.processId;
}
}
async function handleLaunchProcess(record: Recordable) {
const schemaId=record.workflowData?.schemaId||schemaIdComputedRef.value;
if(schemaId){
if(record.workflowData?.draftId){
let res = await getDraftInfo(record.workflowData.draftId);
if (isValidJSON(res.formData)) {
localStorage.setItem('draftsJsonStr', res.formData);
router.push({
path: '/flow/' + schemaId + '/'+record.workflowData.draftId+'/createFlow'
});
return;
}
}
const result = await getLngPngAppro(record['id']);
const form={};
const key="form_"+schemaId+"_"+record['id'];
form[key]=result;
localStorage.setItem('formJsonStr', JSON.stringify(form));
router.push({
path: '/flow/' + schemaId + '/0/createFlow',
query: {
fromKey: key
}
});
}
}
function handleApproveProcess(record: Recordable) {
const { processId, taskIds, schemaId } = record.workflowData;
router.push({
path: '/flow/' + schemaId + '/' + processId + '/approveFlow',
query: {
taskId: taskIds[0],
formName: formName
}
});
}
function handleCloseLaunch() {
visibleLaunchProcessRef.value = false;
reload();
}
function handleCloseApproval() {
visibleApproveProcessRef.value = false;
reload();
}
async function mergeCustomListRenderConfig(){
if (formConfig.useCustomConfig) {
let formId=currentRoute.value.meta.formId;
//1.合并展示字段配置
let cols= await mergeColumns(customConfigColums.value,formId);
customConfigColums.value=cols;
//2.合并搜索字段配置
let sFormSchema= await mergeSearchFormSchema(customSearchFormSchema.value,formId);
customSearchFormSchema.value=sFormSchema;
//3.合并按钮配置
let btns= await mergeButtons(buttons.value,formId);
buttons.value=btns;
}
};
</script>
<style lang="less" scoped>
:deep(.ant-table-selection-col) {
width: 50px;
}
.show{
display: flex;
}
.hide{
display: none !important;
}
</style>

View File

@ -149,7 +149,7 @@ export const columns: BasicColumn[] = [
title: '客户确认时间',
componentType: 'input',
align: 'left',
width: 150,
width: 180,
sorter: true,
},

View File

@ -17,7 +17,7 @@
</div>
</div>
<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}">
<template #bodyCell="{ column, record, index }">
@ -42,7 +42,7 @@
<TableAction :actions="getActions(record)" />
</template>
</template>
</a-table>
</BasicTable>
<PngMeasureSalesPurModal @register="registerModal" @success="handleSuccess" />
<ImportModal @register="registerImportModal" importUrl="/dayPlan/pngMeasureSalesPur/import" @success="handleImportSuccess"/>
@ -167,7 +167,7 @@
page: currentPage.value,
...formState.value,
});
tableData.value = res.list;
tableData.value = res.list || [];
total.value = res.total || res.length || 0;
} catch (error) {
console.error('获取列表失败:', error);

View File

@ -389,31 +389,31 @@
}
const columnsCertificate = ref([
{ title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 100},
{ title: t('资质证书名称'), dataIndex: 'docTypeCode', sorter: true, width:200},
{ title: t('有效期开始'), dataIndex: 'dateFrom', sorter: true, width: 140},
{ title: t('有效期结束'), dataIndex: 'dateTo', sorter: true, width: 140},
{ title: t('备注'), dataIndex: 'note', sorter: true},
{ title: t('序号'), dataIndex: 'index', key: 'index', customRender: (column) => `${column.index + 1}` ,width: 100},
{ title: t('资质证书名称'), dataIndex: 'docTypeCode', width:200},
{ title: t('有效期开始'), dataIndex: 'dateFrom', width: 140},
{ title: t('有效期结束'), dataIndex: 'dateTo', width: 140},
{ title: t('备注'), dataIndex: 'note', },
{ title: t('操作'), dataIndex: 'operation', width: 220},
]);
const columnsBank = ref([
{ title: t('序号'), dataIndex: 'index', sorter: true, customRender: (column) => `${column.index + 1}`},
{ title: t('银行名称'), dataIndex: 'bankName', sorter: true},
{ title: t('联行号'), dataIndex: 'interBankCode', sorter: true},
{ title: t('账号名称'), dataIndex: 'accountName', sorter: true},
{ title: t('银行账号'), dataIndex: 'account', sorter: true},
{ title: t('默认银行'), dataIndex: 'defaultSign', sorter: true},
{ title: t('操作'), dataIndex: 'operation', sorter: true},
{ title: t('序号'), dataIndex: 'index', customRender: (column) => `${column.index + 1}`},
{ title: t('银行名称'), dataIndex: 'bankName', },
{ title: t('联行号'), dataIndex: 'interBankCode', },
{ title: t('账号名称'), dataIndex: 'accountName', },
{ title: t('银行账号'), dataIndex: 'account', },
{ title: t('默认银行'), dataIndex: 'defaultSign', },
{ title: t('操作'), dataIndex: 'operation', },
]);
const columnsContact = ref([
{ title: t('序号'), dataIndex: 'index', sorter: true, customRender: (column) => `${column.index + 1}`},
{ title: t('姓名'), dataIndex: 'contactName', sorter: true},
{ title: t('联系电话'), dataIndex: 'tel', sorter: true},
{ title: t('电子邮箱'), dataIndex: 'email', sorter: true},
{ title: t('通讯地址'), dataIndex: 'addrMail', sorter: true},
{ title: t('职位'), dataIndex: 'position', sorter: true},
{ title: t('备注'), dataIndex: 'note', sorter: true},
{ title: t('操作'), dataIndex: 'operation', sorter: true},
{ title: t('序号'), dataIndex: 'index', customRender: (column) => `${column.index + 1}`},
{ title: t('姓名'), dataIndex: 'contactName', },
{ title: t('联系电话'), dataIndex: 'tel', },
{ title: t('电子邮箱'), dataIndex: 'email', },
{ title: t('通讯地址'), dataIndex: 'addrMail', },
{ title: t('职位'), dataIndex: 'position', },
{ title: t('备注'), dataIndex: 'note', },
{ title: t('操作'), dataIndex: 'operation', },
]);
const dataCertificate= reactive([]);
const dataBank= reactive([]);

View File

@ -81,12 +81,12 @@
const columns= ref([
{ title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 100},
{ title: t('客户编码'), dataIndex: 'cuCode', sorter: true, width:100},
{ title: t('客户名称'), dataIndex: 'cuName', sorter: true},
{ title: t('国内/国际'), dataIndex: 'diName', sorter: true, width: 140},
{ title: t('客户类别'), dataIndex: 'typeName', sorter: true, width: 140},
{ title: t('客户分类'), dataIndex: 'className', sorter: true, width: 140},
{ title: t('序号'), dataIndex: 'index', key: 'index', customRender: (column) => `${column.index + 1}` ,width: 100},
{ title: t('客户编码'), dataIndex: 'cuCode', width:100},
{ title: t('客户名称'), dataIndex: 'cuName', },
{ title: t('国内/国际'), dataIndex: 'diName', width: 140},
{ title: t('客户类别'), dataIndex: 'typeName', width: 140},
{ title: t('客户分类'), dataIndex: 'className', width: 140},
{ title: t('操作'), dataIndex: 'operation', width: 120},
]);
const dataList = ref([])

View File

@ -58,10 +58,10 @@
const { t } = useI18n();
const dataList = ref([])
const columns = ref([
{ title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 100},
{ title: t('评价事项'), dataIndex: 'itemName', sorter: true, width:200},
{ title: t('评价标准'), dataIndex: 'itemDesc', sorter: true, },
{ title: t('评价部门'), dataIndex: 'eDeptName', sorter: true, width: 200},
{ title: t('序号'), dataIndex: 'index', key: 'index', customRender: (column) => `${column.index + 1}` ,width: 100},
{ title: t('评价事项'), dataIndex: 'itemName', width:200},
{ title: t('评价标准'), dataIndex: 'itemDesc', },
{ title: t('评价部门'), dataIndex: 'eDeptName', width: 200},
{ title: t('操作'), dataIndex: 'operation', width: 120},
]);
const curIdx = ref(null)

View File

@ -133,15 +133,15 @@
}
const gsIdOld = ref()
const columns = ref([
{ title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 80},
{ title: t('评价事项'), dataIndex: 'itemName', sorter: true},
{ title: t('评价标准'), dataIndex: 'itemDesc', sorter: true},
{ title: t('评价部门'), dataIndex: 'eDeptName', sorter: true},
{ title: t('评分'), dataIndex: 'score', sorter: true},
{ title: t('分数说明'), dataIndex: 'scoreDesc', sorter: true},
{ title: t('评价人'), dataIndex: 'aEmpName', sorter: true},
{ title: t('评价时间'), dataIndex: 'aTime', sorter: true},
{ title: t('实际评价部门'), dataIndex: 'aDeptName', sorter: true},
{ title: t('序号'), dataIndex: 'index', key: 'index', customRender: (column) => `${column.index + 1}` ,width: 80},
{ title: t('评价事项'), dataIndex: 'itemName', },
{ title: t('评价标准'), dataIndex: 'itemDesc', },
{ title: t('评价部门'), dataIndex: 'eDeptName', },
{ title: t('评分'), dataIndex: 'score', },
{ title: t('分数说明'), dataIndex: 'scoreDesc', },
{ title: t('评价人'), dataIndex: 'aEmpName', },
{ title: t('评价时间'), dataIndex: 'aTime', },
{ title: t('实际评价部门'), dataIndex: 'aDeptName', },
]);
const dataList= ref([]);
const dataFile = ref([]);

View File

@ -8,6 +8,5 @@ export const customFormConfig = {
'contractFactApprove',
'addContractPurPng',
'addContractSales',
'addDemand'
],
};

View File

@ -133,15 +133,15 @@
}
const gsIdOld = ref()
const columns = ref([
{ title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 80},
{ title: t('评价事项'), dataIndex: 'itemName', sorter: true},
{ title: t('评价标准'), dataIndex: 'itemDesc', sorter: true},
{ title: t('评价部门'), dataIndex: 'eDeptName', sorter: true},
{ title: t('评分'), dataIndex: 'score', sorter: true},
{ title: t('分数说明'), dataIndex: 'scoreDesc', sorter: true},
{ title: t('评价人'), dataIndex: 'aEmpName', sorter: true},
{ title: t('评价时间'), dataIndex: 'aTime', sorter: true},
{ title: t('实际评价部门'), dataIndex: 'aDeptName', sorter: true},
{ title: t('序号'), dataIndex: 'index', key: 'index' , customRender: (column) => `${column.index + 1}` ,width: 80},
{ title: t('评价事项'), dataIndex: 'itemName', },
{ title: t('评价标准'), dataIndex: 'itemDesc', },
{ title: t('评价部门'), dataIndex: 'eDeptName', },
{ title: t('评分'), dataIndex: 'score', },
{ title: t('分数说明'), dataIndex: 'scoreDesc', },
{ title: t('评价人'), dataIndex: 'aEmpName', },
{ title: t('评价时间'), dataIndex: 'aTime', },
{ title: t('实际评价部门'), dataIndex: 'aDeptName', },
]);
const dataList= ref([]);
const dataFile = ref([]);

View File

@ -299,31 +299,31 @@
}
const columnsCertificate = ref([
{ title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 100},
{ title: t('资质证书名称'), dataIndex: 'docTypeCode', sorter: true, width:200},
{ title: t('有效期开始'), dataIndex: 'dateFrom', sorter: true, width: 140},
{ title: t('有效期结束'), dataIndex: 'dateTo', sorter: true, width: 140},
{ title: t('备注'), dataIndex: 'note', sorter: true},
{ title: t('序号'), dataIndex: 'index', key: 'index', customRender: (column) => `${column.index + 1}` ,width: 100},
{ title: t('资质证书名称'), dataIndex: 'docTypeCode' , width:200},
{ title: t('有效期开始'), dataIndex: 'dateFrom', width: 140},
{ title: t('有效期结束'), dataIndex: 'dateTo', width: 140},
{ title: t('备注'), dataIndex: 'note', },
{ title: t('操作'), dataIndex: 'operation', width: 220},
]);
const columnsBank = ref([
{ title: t('序号'), dataIndex: 'index', sorter: true, customRender: (column) => `${column.index + 1}`},
{ title: t('银行名称'), dataIndex: 'bankName', sorter: true},
{ title: t('联行号'), dataIndex: 'interBankCode', sorter: true},
{ title: t('账号名称'), dataIndex: 'accountName', sorter: true},
{ title: t('银行账号'), dataIndex: 'account', sorter: true},
{ title: t('默认银行'), dataIndex: 'defaultSign', sorter: true},
{ title: t('操作'), dataIndex: 'operation', sorter: true},
{ title: t('序号'), dataIndex: 'index', customRender: (column) => `${column.index + 1}`},
{ title: t('银行名称'), dataIndex: 'bankName', },
{ title: t('联行号'), dataIndex: 'interBankCode', },
{ title: t('账号名称'), dataIndex: 'accountName', },
{ title: t('银行账号'), dataIndex: 'account', },
{ title: t('默认银行'), dataIndex: 'defaultSign', },
{ title: t('操作'), dataIndex: 'operation', },
]);
const columnsContact = ref([
{ title: t('序号'), dataIndex: 'index', sorter: true, customRender: (column) => `${column.index + 1}`},
{ title: t('姓名'), dataIndex: 'contactName', sorter: true},
{ title: t('联系电话'), dataIndex: 'tel', sorter: true},
{ title: t('电子邮箱'), dataIndex: 'email', sorter: true},
{ title: t('通讯地址'), dataIndex: 'addrMail', sorter: true},
{ title: t('职位'), dataIndex: 'position', sorter: true},
{ title: t('备注'), dataIndex: 'note', sorter: true},
{ title: t('操作'), dataIndex: 'operation', sorter: true},
{ title: t('序号'), dataIndex: 'index', customRender: (column) => `${column.index + 1}`},
{ title: t('姓名'), dataIndex: 'contactName', },
{ title: t('联系电话'), dataIndex: 'tel', },
{ title: t('电子邮箱'), dataIndex: 'email', },
{ title: t('通讯地址'), dataIndex: 'addrMail', },
{ title: t('职位'), dataIndex: 'position', },
{ title: t('备注'), dataIndex: 'note', },
{ title: t('操作'), dataIndex: 'operation', },
]);
const dataCertificate= reactive([]);
const dataBank= reactive([]);