From fbf942496024c5e606e97363bbb4b030cad3e729 Mon Sep 17 00:00:00 2001 From: Teo <2642673902@qq.com> Date: Sat, 2 Aug 2025 15:31:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E5=80=BC=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- src/api/out/settlementValueOwner/index.ts | 63 +++ src/api/out/settlementValueOwner/types.ts | 96 +++++ .../out/settlementValueSubcontract/index.ts | 63 +++ .../out/settlementValueSubcontract/types.ts | 201 ++++++++++ src/api/out/valueAllocation/index.ts | 63 +++ src/api/out/valueAllocation/types.ts | 155 ++++++++ src/views/materials/cailiaoshebei/index.vue | 75 ++-- src/views/out/outTable/index.vue | 16 + src/views/out/settlementValueOwner/index.vue | 292 ++++++++++++++ .../out/settlementValueSubcontract/index.vue | 366 ++++++++++++++++++ src/views/out/valueAllocation/index.vue | 272 +++++++++++++ src/views/progress/plan/index.vue | 16 +- 13 files changed, 1646 insertions(+), 34 deletions(-) create mode 100644 src/api/out/settlementValueOwner/index.ts create mode 100644 src/api/out/settlementValueOwner/types.ts create mode 100644 src/api/out/settlementValueSubcontract/index.ts create mode 100644 src/api/out/settlementValueSubcontract/types.ts create mode 100644 src/api/out/valueAllocation/index.ts create mode 100644 src/api/out/valueAllocation/types.ts create mode 100644 src/views/out/outTable/index.vue create mode 100644 src/views/out/settlementValueOwner/index.vue create mode 100644 src/views/out/settlementValueSubcontract/index.vue create mode 100644 src/views/out/valueAllocation/index.vue diff --git a/.env.development b/.env.development index a03e777..1c549fa 100644 --- a/.env.development +++ b/.env.development @@ -5,7 +5,7 @@ VITE_APP_TITLE = 新能源项目管理平台 VITE_APP_ENV = 'development' # 开发环境 -VITE_APP_BASE_API = 'http://192.168.110.159:8899' +VITE_APP_BASE_API = 'http://192.168.110.180:8899' # 无人机接口地址 diff --git a/src/api/out/settlementValueOwner/index.ts b/src/api/out/settlementValueOwner/index.ts new file mode 100644 index 0000000..45fc401 --- /dev/null +++ b/src/api/out/settlementValueOwner/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { SettlementValueOwnerVO, SettlementValueOwnerForm, SettlementValueOwnerQuery } from '@/api/out/settlementValueOwner/types'; + +/** + * 查询结算产值登记(对甲)列表 + * @param query + * @returns {*} + */ + +export const listSettlementValueOwner = (query?: SettlementValueOwnerQuery): AxiosPromise => { + return request({ + url: '/out/settlementValueOwner/list', + method: 'get', + params: query + }); +}; + +/** + * 查询结算产值登记(对甲)详细 + * @param id + */ +export const getSettlementValueOwner = (id: string | number): AxiosPromise => { + return request({ + url: '/out/settlementValueOwner/' + id, + method: 'get' + }); +}; + +/** + * 新增结算产值登记(对甲) + * @param data + */ +export const addSettlementValueOwner = (data: SettlementValueOwnerForm) => { + return request({ + url: '/out/settlementValueOwner', + method: 'post', + data: data + }); +}; + +/** + * 修改结算产值登记(对甲) + * @param data + */ +export const updateSettlementValueOwner = (data: SettlementValueOwnerForm) => { + return request({ + url: '/out/settlementValueOwner', + method: 'put', + data: data + }); +}; + +/** + * 删除结算产值登记(对甲) + * @param id + */ +export const delSettlementValueOwner = (id: string | number | Array) => { + return request({ + url: '/out/settlementValueOwner/' + id, + method: 'delete' + }); +}; diff --git a/src/api/out/settlementValueOwner/types.ts b/src/api/out/settlementValueOwner/types.ts new file mode 100644 index 0000000..f56019f --- /dev/null +++ b/src/api/out/settlementValueOwner/types.ts @@ -0,0 +1,96 @@ +export interface SettlementValueOwnerVO { + /** + * 主键ID + */ + id: string | number; + + /** + * 项目ID + */ + projectId: string | number; + + /** + * 结算产值 + */ + settlementValue: number; + + /** + * 1-设计 2-采购 3-施工 + */ + valueType: string; + + /** + * 说明 + */ + remark: string; + + /** + * 结算日期 + */ + settlementDate: string; + +} + +export interface SettlementValueOwnerForm extends BaseEntity { + /** + * 主键ID + */ + id?: string | number; + + /** + * 项目ID + */ + projectId?: string | number; + + /** + * 结算产值 + */ + settlementValue?: number; + + /** + * 1-设计 2-采购 3-施工 + */ + valueType?: string; + + /** + * 说明 + */ + remark?: string; + + /** + * 结算日期 + */ + settlementDate?: string; + +} + +export interface SettlementValueOwnerQuery extends PageQuery { + + /** + * 项目ID + */ + projectId?: string | number; + + /** + * 结算产值 + */ + settlementValue?: number; + + /** + * 1-设计 2-采购 3-施工 + */ + valueType?: string; + + /** + * 结算日期 + */ + settlementDate?: string; + + /** + * 日期范围参数 + */ + params?: any; +} + + + diff --git a/src/api/out/settlementValueSubcontract/index.ts b/src/api/out/settlementValueSubcontract/index.ts new file mode 100644 index 0000000..4daa10c --- /dev/null +++ b/src/api/out/settlementValueSubcontract/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { SettlementValueSubcontractVO, SettlementValueSubcontractForm, SettlementValueSubcontractQuery } from '@/api/out/settlementValueSubcontract/types'; + +/** + * 查询结算产值登记(对乙)列表 + * @param query + * @returns {*} + */ + +export const listSettlementValueSubcontract = (query?: SettlementValueSubcontractQuery): AxiosPromise => { + return request({ + url: '/out/settlementValueSubcontract/list', + method: 'get', + params: query + }); +}; + +/** + * 查询结算产值登记(对乙)详细 + * @param id + */ +export const getSettlementValueSubcontract = (id: string | number): AxiosPromise => { + return request({ + url: '/out/settlementValueSubcontract/' + id, + method: 'get' + }); +}; + +/** + * 新增结算产值登记(对乙) + * @param data + */ +export const addSettlementValueSubcontract = (data: SettlementValueSubcontractForm) => { + return request({ + url: '/out/settlementValueSubcontract', + method: 'post', + data: data + }); +}; + +/** + * 修改结算产值登记(对乙) + * @param data + */ +export const updateSettlementValueSubcontract = (data: SettlementValueSubcontractForm) => { + return request({ + url: '/out/settlementValueSubcontract', + method: 'put', + data: data + }); +}; + +/** + * 删除结算产值登记(对乙) + * @param id + */ +export const delSettlementValueSubcontract = (id: string | number | Array) => { + return request({ + url: '/out/settlementValueSubcontract/' + id, + method: 'delete' + }); +}; diff --git a/src/api/out/settlementValueSubcontract/types.ts b/src/api/out/settlementValueSubcontract/types.ts new file mode 100644 index 0000000..9dd6f6e --- /dev/null +++ b/src/api/out/settlementValueSubcontract/types.ts @@ -0,0 +1,201 @@ +export interface SettlementValueSubcontractVO { + /** + * 主键ID + */ + id: string | number; + + /** + * 项目ID + */ + projectId: string | number; + + /** + * 单据编码 + */ + documentCode: string; + + /** + * 结算说明 + */ + settlementDescribe: string; + + /** + * 结算周期(YYYY-MM) + */ + settlementMonth: string; + + /** + * 结算日期 + */ + settlementDate: string; + + /** + * 分包单位ID + */ + contractorId: string | number; + + /** + * 分包单位名 + */ + contractorName: string; + + /** + * 结算产值 + */ + settlementValue: number; + + /** + * 说明 + */ + remark: string; + + /** + * 合同编码 + */ + contractCode: string; + + /** + * 合同名称 + */ + contractName: string; + + /** + * 合同地址 + */ + contractUrl: string; +} + +export interface SettlementValueSubcontractForm extends BaseEntity { + /** + * 主键ID + */ + id?: string | number; + /** + * 产值类型 + */ + valueType?: string; + /** + * 项目ID + */ + projectId?: string | number; + + /** + * 单据编码 + */ + documentCode?: string; + + /** + * 结算说明 + */ + settlementDescribe?: string; + + /** + * 结算周期(YYYY-MM) + */ + settlementMonth?: string; + + /** + * 结算日期 + */ + settlementDate?: string; + + /** + * 分包单位ID + */ + contractorId?: string | number; + + /** + * 分包单位名 + */ + contractorName?: string; + + /** + * 结算产值 + */ + settlementValue?: number; + + /** + * 说明 + */ + remark?: string; + + /** + * 合同编码 + */ + contractCode?: string; + + /** + * 合同名称 + */ + contractName?: string; + + /** + * 合同地址 + */ + contractUrl?: string; +} + +export interface SettlementValueSubcontractQuery extends PageQuery { + /** + * 项目ID + */ + projectId?: string | number; + /** + * 产值类型 + */ + valueType?: string; + /** + * 单据编码 + */ + documentCode?: string; + + /** + * 结算说明 + */ + settlementDescribe?: string; + + /** + * 结算周期(YYYY-MM) + */ + settlementMonth?: string; + + /** + * 结算日期 + */ + settlementDate?: string; + + /** + * 分包单位ID + */ + contractorId?: string | number; + + /** + * 分包单位名 + */ + contractorName?: string; + + /** + * 结算产值 + */ + settlementValue?: number; + + /** + * 合同编码 + */ + contractCode?: string; + + /** + * 合同名称 + */ + contractName?: string; + + /** + * 合同地址 + */ + contractUrl?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/src/api/out/valueAllocation/index.ts b/src/api/out/valueAllocation/index.ts new file mode 100644 index 0000000..5570fee --- /dev/null +++ b/src/api/out/valueAllocation/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { ValueAllocationVO, ValueAllocationForm, ValueAllocationQuery } from '@/api/out/valueAllocation/types'; + +/** + * 查询项目总产值分配列表 + * @param query + * @returns {*} + */ + +export const listValueAllocation = (query?: ValueAllocationQuery): AxiosPromise => { + return request({ + url: '/out/valueAllocation/list', + method: 'get', + params: query + }); +}; + +/** + * 查询项目总产值分配详细 + * @param id + */ +export const getValueAllocation = (id: string | number): AxiosPromise => { + return request({ + url: '/out/valueAllocation/' + id, + method: 'get' + }); +}; + +/** + * 新增项目总产值分配 + * @param data + */ +export const addValueAllocation = (data: ValueAllocationForm) => { + return request({ + url: '/out/valueAllocation', + method: 'post', + data: data + }); +}; + +/** + * 修改项目总产值分配 + * @param data + */ +export const updateValueAllocation = (data: ValueAllocationForm) => { + return request({ + url: '/out/valueAllocation', + method: 'put', + data: data + }); +}; + +/** + * 删除项目总产值分配 + * @param id + */ +export const delValueAllocation = (id: string | number | Array) => { + return request({ + url: '/out/valueAllocation/' + id, + method: 'delete' + }); +}; diff --git a/src/api/out/valueAllocation/types.ts b/src/api/out/valueAllocation/types.ts new file mode 100644 index 0000000..efc8ef3 --- /dev/null +++ b/src/api/out/valueAllocation/types.ts @@ -0,0 +1,155 @@ +export interface ValueAllocationVO { + /** + * 主键ID + */ + id: string | number; + + /** + * 项目ID + */ + projectId: string | number; + + /** + * 对甲设计产值 + */ + ownerDesignValue: number; + + /** + * 对甲采购产值 + */ + ownerPurchaseValue: number; + + /** + * 对甲施工产值 + */ + ownerConstructionValue: number; + + /** + * 对甲总产值 + */ + ownerTotalValue: number; + + /** + * 对乙设计产值 + */ + subDesignValue: number; + + /** + * 对乙采购产值 + */ + subPurchaseValue: number; + + /** + * 对乙施工产值 + */ + subConstructionValue: number; + + /** + * 对乙总产值 + */ + subTotalValue: number; +} + +export interface ValueAllocationForm extends BaseEntity { + /** + * 主键ID + */ + id?: string | number; + valueType?: number; + /** + * 项目ID + */ + projectId?: string | number; + + /** + * 对甲设计产值 + */ + ownerDesignValue?: number; + + /** + * 对甲采购产值 + */ + ownerPurchaseValue?: number; + + /** + * 对甲施工产值 + */ + ownerConstructionValue?: number; + + /** + * 对甲总产值 + */ + ownerTotalValue?: number; + + /** + * 对乙设计产值 + */ + subDesignValue?: number; + + /** + * 对乙采购产值 + */ + subPurchaseValue?: number; + + /** + * 对乙施工产值 + */ + subConstructionValue?: number; + + /** + * 对乙总产值 + */ + subTotalValue?: number; +} + +export interface ValueAllocationQuery extends PageQuery { + /** + * 项目ID + */ + projectId?: string | number; + valueType?: number; + /** + * 对甲设计产值 + */ + ownerDesignValue?: number; + + /** + * 对甲采购产值 + */ + ownerPurchaseValue?: number; + + /** + * 对甲施工产值 + */ + ownerConstructionValue?: number; + + /** + * 对甲总产值 + */ + ownerTotalValue?: number; + + /** + * 对乙设计产值 + */ + subDesignValue?: number; + + /** + * 对乙采购产值 + */ + subPurchaseValue?: number; + + /** + * 对乙施工产值 + */ + subConstructionValue?: number; + + /** + * 对乙总产值 + */ + subTotalValue?: number; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/src/views/materials/cailiaoshebei/index.vue b/src/views/materials/cailiaoshebei/index.vue index 69de572..1e342b8 100644 --- a/src/views/materials/cailiaoshebei/index.vue +++ b/src/views/materials/cailiaoshebei/index.vue @@ -56,17 +56,21 @@ - + - - - + - + - - + + @@ -180,7 +182,7 @@ - + @@ -191,8 +193,10 @@ - - + + + + @@ -203,23 +207,23 @@ - + - + @@ -321,12 +325,6 @@ const { queryParams, form, rules } = toRefs(data); /** 查询物资-材料设备列表 */ const getList = async () => { - const batchRes = await listBatch({ - pageNum: 1, - pageSize: 1000, - projectId: currentProject.value.id - }); - loading.value = true; const res = await listCailiaoshebei(queryParams.value); cailiaoshebeiList.value = res.rows; @@ -334,13 +332,34 @@ const getList = async () => { loading.value = false; }; +//查询批次列表 +const getBatchList = async () => { + const res = await listBatch({ + pageNum: 1, + pageSize: 1000, + projectId: currentProject.value.id, + batchNumber: batchId.value + }); + batchOptions.value = res.rows; + try { + queryParams.value.batchId = res.rows[0].id; + form.value.batchId = res.rows[0].id; + } catch (error) { + queryParams.value.batchId = ''; + form.value.batchId = ''; + } + getList(); +}; + /** 节点单击事件 */ const handleNodeClick = (data: any) => { queryParams.value.batchId = data.id; + form.value.batchId = data.id; + console.log('🚀 ~ handleNodeClick ~ form.value:', form.value); if (data.id === '0') { queryParams.value.batchId = ''; } - handleQuery(); + getList(); }; /** 取消按钮 */ @@ -351,7 +370,8 @@ const cancel = () => { /** 表单重置 */ const reset = () => { - form.value = { ...initFormData }; + const preservedBatchId = form.value.batchId; // 先保存当前的 batchId + form.value = { ...initFormData, batchId: preservedBatchId }; // 重置但保留 cailiaoshebeiFormRef.value?.resetFields(); }; @@ -393,6 +413,7 @@ const handleUpdate = async (row?: CailiaoshebeiVO) => { /** 提交按钮 */ const submitForm = () => { + console.log('🚀 ~ submitForm ~ form.value:', form.value); cailiaoshebeiFormRef.value?.validate(async (valid: boolean) => { if (valid) { buttonLoading.value = true; @@ -440,6 +461,6 @@ const handleExport = () => { }; onMounted(() => { - getList(); + getBatchList(); }); diff --git a/src/views/out/outTable/index.vue b/src/views/out/outTable/index.vue new file mode 100644 index 0000000..67bddd4 --- /dev/null +++ b/src/views/out/outTable/index.vue @@ -0,0 +1,16 @@ + + + + + diff --git a/src/views/out/settlementValueOwner/index.vue b/src/views/out/settlementValueOwner/index.vue new file mode 100644 index 0000000..c672713 --- /dev/null +++ b/src/views/out/settlementValueOwner/index.vue @@ -0,0 +1,292 @@ + + + diff --git a/src/views/out/settlementValueSubcontract/index.vue b/src/views/out/settlementValueSubcontract/index.vue new file mode 100644 index 0000000..8a32ce4 --- /dev/null +++ b/src/views/out/settlementValueSubcontract/index.vue @@ -0,0 +1,366 @@ + + + diff --git a/src/views/out/valueAllocation/index.vue b/src/views/out/valueAllocation/index.vue new file mode 100644 index 0000000..c8e1493 --- /dev/null +++ b/src/views/out/valueAllocation/index.vue @@ -0,0 +1,272 @@ + + + diff --git a/src/views/progress/plan/index.vue b/src/views/progress/plan/index.vue index 8df31db..63c6711 100644 --- a/src/views/progress/plan/index.vue +++ b/src/views/progress/plan/index.vue @@ -203,7 +203,7 @@ import { ProgressCategoryVO, ProgressCategoryQuery, ProgressCategoryForm } from const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { progress_unit_type, progress_status } = toRefs(proxy?.useDict('progress_unit_type', 'progress_status')); -import { useUserStoreHook } from '@/store/modules/user'; + import CreatePlan from './component/createPlan.vue'; import CreateDaily from './component/createDaily.vue'; import CreateDailyRate from './component/createDailyRate.vue'; @@ -212,7 +212,7 @@ type ProgressCategoryOption = { name: string; children?: ProgressCategoryOption[]; }; - +import { useUserStoreHook } from '@/store/modules/user'; // 获取用户 store const userStore = useUserStoreHook(); // 从 store 中获取项目列表和当前选中的项目 @@ -273,7 +273,7 @@ const { queryParams, form, rules } = toRefs(data); const getList = async () => { if (!queryParams.value.matrixId) { const res = await getProjectSquare(currentProject.value.id); - if (res.data.length === 0) { + if (!res.data || res.data.length === 0) { proxy?.$modal.msgWarning('当前项目下没有方阵,请先创建方阵'); } else { let matrixList = res.data.map((item) => { @@ -282,9 +282,13 @@ const getList = async () => { matrixId: item.projectId }; }); - if (!matrixValue.value) matrixValue.value = matrixList[0].id; - matrixOptions.value = matrixList; - queryParams.value.matrixId = matrixList[0].children[0].matrixId; + try { + if (!matrixValue.value) matrixValue.value = matrixList[0].id; + matrixOptions.value = matrixList; + queryParams.value.matrixId = matrixList[0].children[0].matrixId; + } catch (error) { + proxy?.$modal.msgError('获取方阵失败'); + } } } loading.value = true;