From 93a3ea764e91bfc3734be1047b930af86d776bf2 Mon Sep 17 00:00:00 2001 From: Teo <2642673902@qq.com> Date: Fri, 8 Aug 2025 20:03:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9D=90=E6=96=99=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E5=8F=98=E6=9B=B4=E6=B8=85=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- src/api/materials/batchPlan/index.ts | 11 + src/api/materials/cailiaoshebei/index.ts | 11 + src/api/materials/cailiaoshebei/types.ts | 3 + src/api/materials/orderEquipment/index.ts | 11 + src/api/materials/orderMaterials/index.ts | 2 +- src/api/materials/repertory/index.ts | 63 ++++ src/api/materials/repertory/types.ts | 81 ++++ src/api/materials/repertoryDetails/index.ts | 63 ++++ src/api/materials/repertoryDetails/types.ts | 187 ++++++++++ src/api/materials/suppliesprice/index.ts | 11 + src/api/safety/safetyInspection/types.ts | 5 +- src/components/FileUpload/index.vue | 5 + src/views/materials/batchPlan/index.vue | 38 +- src/views/materials/batchPlan/indexEdit.vue | 114 ++---- src/views/materials/cailiaoshebei/index.vue | 23 +- .../materials/cailiaoshebei/indexEdit.vue | 85 ++--- src/views/materials/orderEquipment/index.vue | 20 +- .../materials/orderEquipment/indexEdit.vue | 346 ++++++++++++++++++ src/views/materials/orderMaterials/index.vue | 210 ++++++----- src/views/materials/repertory/index.vue | 257 +++++++++++++ .../materials/repertoryDetails/index.vue | 167 +++++++++ src/views/materials/suppliesprice/index.vue | 30 +- .../materials/suppliesprice/indexEdit.vue | 125 +++---- src/views/progress/progressCategory/index.vue | 7 +- .../progressCategorySystemTemplate/index.vue | 310 ++++++++++++++++ .../progressCategoryTemplate/index.vue | 201 ++++++---- src/views/safety/safetyInspection/index.vue | 17 +- 28 files changed, 1973 insertions(+), 432 deletions(-) create mode 100644 src/api/materials/repertory/index.ts create mode 100644 src/api/materials/repertory/types.ts create mode 100644 src/api/materials/repertoryDetails/index.ts create mode 100644 src/api/materials/repertoryDetails/types.ts create mode 100644 src/views/materials/orderEquipment/indexEdit.vue create mode 100644 src/views/materials/repertory/index.vue create mode 100644 src/views/materials/repertoryDetails/index.vue create mode 100644 src/views/progress/progressCategorySystemTemplate/index.vue diff --git a/.env.development b/.env.development index 8aa5e08..fe20df3 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.119:8898' +VITE_APP_BASE_API = 'http://192.168.110.159:8898' # 无人机接口地址 diff --git a/src/api/materials/batchPlan/index.ts b/src/api/materials/batchPlan/index.ts index 20f8970..59238fc 100644 --- a/src/api/materials/batchPlan/index.ts +++ b/src/api/materials/batchPlan/index.ts @@ -97,3 +97,14 @@ export const delBatch = (ids: string | number | Array) => { method: 'delete' }); }; + +/** + * 查询物资-材料设备批次详情 + * @param id + */ +export const getPcDetail = (id: string | number): AxiosPromise => { + return request({ + url: '/cailiaoshebei/materialbatchdemandplan/spQuery/' + id, + method: 'get' + }); +}; diff --git a/src/api/materials/cailiaoshebei/index.ts b/src/api/materials/cailiaoshebei/index.ts index 38b924b..f7cd5c6 100644 --- a/src/api/materials/cailiaoshebei/index.ts +++ b/src/api/materials/cailiaoshebei/index.ts @@ -97,3 +97,14 @@ export const delBatch = (ids: string | number | Array) => { method: 'delete' }); }; + +/** + * 查询物资-材料设备批次详情 + * @param id + */ +export const getPcDetail = (id: string | number): AxiosPromise => { + return request({ + url: '/cailiaoshebei/cailiaoshebei/spQuery/' + id, + method: 'get' + }); +}; diff --git a/src/api/materials/cailiaoshebei/types.ts b/src/api/materials/cailiaoshebei/types.ts index df7b40b..6202479 100644 --- a/src/api/materials/cailiaoshebei/types.ts +++ b/src/api/materials/cailiaoshebei/types.ts @@ -83,6 +83,9 @@ export interface CailiaoshebeiForm extends BaseEntity { projectId?: string | number; batchNumber?: string | number; approvalDesign?: string; + bo: any; + file: string; + /** * 批次ID */ diff --git a/src/api/materials/orderEquipment/index.ts b/src/api/materials/orderEquipment/index.ts index 434f40a..c007966 100644 --- a/src/api/materials/orderEquipment/index.ts +++ b/src/api/materials/orderEquipment/index.ts @@ -97,3 +97,14 @@ export const delBatch = (ids: string | number | Array) => { method: 'delete' }); }; + +/** + * 查询物资-材料设备批次详情 + * @param id + */ +export const getPcDetail = (id: string | number): AxiosPromise => { + return request({ + url: '/cailiaoshebei/materialsorder/spQuery/' + id, + method: 'get' + }); +}; diff --git a/src/api/materials/orderMaterials/index.ts b/src/api/materials/orderMaterials/index.ts index c09c953..3be16be 100644 --- a/src/api/materials/orderMaterials/index.ts +++ b/src/api/materials/orderMaterials/index.ts @@ -45,7 +45,7 @@ export const addCailiaoshebei = (data: CailiaoshebeiForm) => { */ export const updateCailiaoshebei = (data: CailiaoshebeiForm) => { return request({ - url: '/cailiaoshebei/cailiaoshebei', + url: '/cailiaoshebei/materialsorder/changeTheStatusOfTheMaterials', method: 'put', data: data }); diff --git a/src/api/materials/repertory/index.ts b/src/api/materials/repertory/index.ts new file mode 100644 index 0000000..7129d8e --- /dev/null +++ b/src/api/materials/repertory/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { RepertoryVO, RepertoryForm, RepertoryQuery } from '@/api/materials/repertory/types'; + +/** + * 查询物资-库存详情列表 + * @param query + * @returns {*} + */ + +export const listRepertory = (query?: RepertoryQuery): AxiosPromise => { + return request({ + url: '/cailiaoshebei/repertory/list', + method: 'get', + params: query + }); +}; + +/** + * 查询物资-库存详情详细 + * @param id + */ +export const getRepertory = (id: string | number): AxiosPromise => { + return request({ + url: '/cailiaoshebei/repertory/' + id, + method: 'get' + }); +}; + +/** + * 新增物资-库存详情 + * @param data + */ +export const addRepertory = (data: RepertoryForm) => { + return request({ + url: '/cailiaoshebei/repertory', + method: 'post', + data: data + }); +}; + +/** + * 修改物资-库存详情 + * @param data + */ +export const updateRepertory = (data: RepertoryForm) => { + return request({ + url: '/cailiaoshebei/repertory', + method: 'put', + data: data + }); +}; + +/** + * 删除物资-库存详情 + * @param id + */ +export const delRepertory = (id: string | number | Array) => { + return request({ + url: '/cailiaoshebei/repertory/' + id, + method: 'delete' + }); +}; diff --git a/src/api/materials/repertory/types.ts b/src/api/materials/repertory/types.ts new file mode 100644 index 0000000..a5db827 --- /dev/null +++ b/src/api/materials/repertory/types.ts @@ -0,0 +1,81 @@ +export interface RepertoryVO { + /** + * ID + */ + id: string | number; + + /** + * 项目ID + */ + projectId: string | number; + + /** + * 设备材料名称 + */ + name: string; + + /** + * 规格型号 + */ + specification: string; + + /** + * 备注 + */ + remark: string; + +} + +export interface RepertoryForm extends BaseEntity { + /** + * ID + */ + id?: string | number; + + /** + * 项目ID + */ + projectId?: string | number; + + /** + * 设备材料名称 + */ + name?: string; + + /** + * 规格型号 + */ + specification?: string; + + /** + * 备注 + */ + remark?: string; + +} + +export interface RepertoryQuery extends PageQuery { + + /** + * 项目ID + */ + projectId?: string | number; + + /** + * 设备材料名称 + */ + name?: string; + + /** + * 规格型号 + */ + specification?: string; + + /** + * 日期范围参数 + */ + params?: any; +} + + + diff --git a/src/api/materials/repertoryDetails/index.ts b/src/api/materials/repertoryDetails/index.ts new file mode 100644 index 0000000..be0ba6b --- /dev/null +++ b/src/api/materials/repertoryDetails/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { RepertoryDetailsVO, RepertoryDetailsForm, RepertoryDetailsQuery } from '@/api/materials/repertoryDetails/types'; + +/** + * 查询物资-库存列表 + * @param query + * @returns {*} + */ + +export const listRepertoryDetails = (query?: RepertoryDetailsQuery): AxiosPromise => { + return request({ + url: '/cailiaoshebei/repertoryDetails/list', + method: 'get', + params: query + }); +}; + +/** + * 查询物资-库存详细 + * @param id + */ +export const getRepertoryDetails = (id: string | number): AxiosPromise => { + return request({ + url: '/cailiaoshebei/repertoryDetails/' + id, + method: 'get' + }); +}; + +/** + * 新增物资-库存 + * @param data + */ +export const addRepertoryDetails = (data: RepertoryDetailsForm) => { + return request({ + url: '/cailiaoshebei/repertoryDetails', + method: 'post', + data: data + }); +}; + +/** + * 修改物资-库存 + * @param data + */ +export const updateRepertoryDetails = (data: RepertoryDetailsForm) => { + return request({ + url: '/cailiaoshebei/repertoryDetails', + method: 'put', + data: data + }); +}; + +/** + * 删除物资-库存 + * @param id + */ +export const delRepertoryDetails = (id: string | number | Array) => { + return request({ + url: '/cailiaoshebei/repertoryDetails/' + id, + method: 'delete' + }); +}; diff --git a/src/api/materials/repertoryDetails/types.ts b/src/api/materials/repertoryDetails/types.ts new file mode 100644 index 0000000..389de6e --- /dev/null +++ b/src/api/materials/repertoryDetails/types.ts @@ -0,0 +1,187 @@ +export interface RepertoryDetailsVO { + /** + * ID + */ + id: string | number; + + /** + * 项目ID + */ + projectId: string | number; + + /** + * 库存ID + */ + repertoryId: string | number; + + /** + * 数据来源ID + */ + materialsorderId: string | number; + + /** + * 物料编码 + */ + materialCode: string; + + /** + * 原始数量 + */ + originalQuantity: number; + + /** + * 变更原因 + */ + changeReasons: string; + + /** + * 变更数量 + */ + changeQuantity: number; + + /** + * 最终数量 + */ + finalNumber: number; + + /** + * 操作状态(字典) + */ + operationStatus: string; + + /** + * 操作人 + */ + operationName: string; + + /** + * 操作人联系电话 + */ + operationPhone: string; +} + +export interface RepertoryDetailsForm extends BaseEntity { + /** + * ID + */ + id?: string | number; + + /** + * 项目ID + */ + projectId?: string | number; + + /** + * 库存ID + */ + repertoryId?: string | number; + + /** + * 数据来源ID + */ + materialsorderId?: string | number; + + /** + * 物料编码 + */ + materialCode?: string; + + /** + * 原始数量 + */ + originalQuantity?: number; + + /** + * 变更原因 + */ + changeReasons?: string; + + /** + * 变更数量 + */ + changeQuantity?: number; + + /** + * 最终数量 + */ + finalNumber?: number; + + /** + * 操作状态(字典) + */ + operationStatus?: string; + + /** + * 操作人 + */ + operationName?: string; + + /** + * 操作人联系电话 + */ + operationPhone?: string; +} + +export interface RepertoryDetailsQuery extends PageQuery { + /** + * 项目ID + */ + projectId?: string | number; + id?: string | number; + name?: string; + + /** + * 库存ID + */ + repertoryId?: string | number; + + /** + * 数据来源ID + */ + materialsorderId?: string | number; + + /** + * 物料编码 + */ + materialCode?: string; + + /** + * 原始数量 + */ + originalQuantity?: number; + + /** + * 变更原因 + */ + changeReasons?: string; + + /** + * 变更数量 + */ + changeQuantity?: number; + + /** + * 最终数量 + */ + finalNumber?: number; + + /** + * 操作状态(字典) + */ + operationStatus?: string; + + /** + * 操作人 + */ + operationName?: string; + + /** + * 操作人联系电话 + */ + operationPhone?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/src/api/materials/suppliesprice/index.ts b/src/api/materials/suppliesprice/index.ts index 87d4264..d6d18b4 100644 --- a/src/api/materials/suppliesprice/index.ts +++ b/src/api/materials/suppliesprice/index.ts @@ -97,3 +97,14 @@ export const delBatch = (ids: string | number | Array) => { method: 'delete' }); }; + +/** + * 查询物资-材料设备批次详情 + * @param id + */ +export const getPcDetail = (id: string | number): AxiosPromise => { + return request({ + url: '/cailiaoshebei/cailiaoshebei/spQueryPlan/' + id, + method: 'get' + }); +}; diff --git a/src/api/safety/safetyInspection/types.ts b/src/api/safety/safetyInspection/types.ts index 8552f79..a3a68f0 100644 --- a/src/api/safety/safetyInspection/types.ts +++ b/src/api/safety/safetyInspection/types.ts @@ -140,7 +140,10 @@ export interface SafetyInspectionForm extends BaseEntity { * 主键ID */ id?: string | number; - + /** + * 整改单位类型 + */ + rectificationUnit?: string; /** * 父id(默认为0) */ diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index dfb788d..3faf620 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -112,6 +112,11 @@ const props = defineProps({ type: Function as PropType<(files: any[]) => void>, default: undefined }, + // 失败回调 + onUploadError: { + type: Function as PropType<(err: any, file: any, fileList: any) => void>, + default: undefined + }, params: { type: Object, default: () => ({}) diff --git a/src/views/materials/batchPlan/index.vue b/src/views/materials/batchPlan/index.vue index 9e7e7c6..579b460 100644 --- a/src/views/materials/batchPlan/index.vue +++ b/src/views/materials/batchPlan/index.vue @@ -47,6 +47,9 @@ 保存 + + 审核 + @@ -78,11 +81,6 @@ - - - @@ -205,6 +203,7 @@ const { queryParams, form, rules } = toRefs(data); /** 查询物资-材料设备列表 */ const getList = async () => { + if (!queryParams.value.batchNumber) return; loading.value = true; const res = await listCailiaoshebei(queryParams.value); cailiaoshebeiList.value = res.rows; @@ -215,15 +214,16 @@ const getList = async () => { //查询批次列表 const getBatchList = async () => { const res = await listBatch(queryParams.value); - console.log('🚀 ~ getBatchList ~ res:', res); batchOptions.value = res.rows; total.value = res.total; try { + queryParams.value.batchNumber = res.rows[0].batchNumber; batchTreeRef.value.setCurrentKey(res.rows[0].batchNumber); form.value.batchNumber = res.rows[0].batchNumber; form.value.approvalProject = res.rows[0].approvalProject; } catch (error) { form.value.batchNumber = ''; + queryParams.value.batchNumber = ''; } getList(); }; @@ -286,17 +286,6 @@ const handleAdd = () => { dialog.title = '选择物资-材料设备'; }; -/** 修改按钮操作 */ -// const handleUpdate = async (row?: CailiaoshebeiVO) => { -// reset(); -// const _id = row?.id || ids.value[0]; -// const res = await getCailiaoshebei(_id); -// Object.assign(form.value, res.data); -// selectValue.value = (form.value.supplierId as string).split(','); -// dialog.visible = true; -// dialog.title = '修改物资-材料设备'; -// }; - /** 提交按钮 */ const submitForm = async () => { buttonLoading.value = true; @@ -351,14 +340,15 @@ const handleDelete = async (row?: CailiaoshebeiVO) => { }; /** 审核按钮操作 */ -const handleAudit = async (row?: CailiaoshebeiVO) => { - const data = { - ...row, - approvalProject: form.value.approvalProject - }; +const handleAudit = async () => { + if (!form.value.approvalProject) { + proxy?.$modal.msgError('请选择批次号'); + return; + } + proxy?.$tab.closePage(proxy.$route); proxy?.$tab.openPage('/materials-management/batchPlan/indexEdit', '审核物资设备批次需求计划', { - id: row?.id, - data: JSON.stringify(data), + id: form.value.batchNumber, + approvalProject: form.value.approvalProject + '_batchRequirements', type: 'update' }); }; diff --git a/src/views/materials/batchPlan/indexEdit.vue b/src/views/materials/batchPlan/indexEdit.vue index e87fbf8..cd6c219 100644 --- a/src/views/materials/batchPlan/indexEdit.vue +++ b/src/views/materials/batchPlan/indexEdit.vue @@ -16,58 +16,29 @@
-

施工产值

+

物资设备批次需求计划

- - - - - - - - - - - -
- {{ item }} - - - - - - - - - - - - - - - + + + + + + + + + + + + + +
@@ -117,6 +88,8 @@ import { getKnowledgeDocument } from '@/api/design/technicalStandard'; import { getConstructionValue } from '@/api/out/constructionValue'; import { workScheduleListDetail } from '@/api/progress/plan'; import { getCailiaoshebei } from '@/api/materials/suppliesprice'; +import { getPcDetail, listCailiaoshebei } from '@/api/materials/batchPlan'; +import { CailiaoshebeiVO } from '@/api/materials/batchPlan/types'; // 获取用户 store const userStore = useUserStoreHook(); // 从 store 中获取项目列表和当前选中的项目 @@ -156,25 +129,11 @@ const submitFormData = ref({ }); const taskVariables = ref>({}); const selectValue = ref([]); +const cailiaoshebeiList = ref([]); const initFormData = { id: undefined, - batchNumber: undefined, - supplierId: undefined, - supplier: undefined, - name: undefined, - supply: undefined, - specification: undefined, - signalment: undefined, - materialCode: undefined, - arrivalTime: undefined, - finishTime: undefined, - unit: undefined, - plan: undefined, - realQuantity: undefined, - projectId: currentProject.value.id, - listOfMaterialInventory: [], - remark: undefined + approvalProject: undefined }; const data = reactive({ form: { ...initFormData }, @@ -199,20 +158,19 @@ const getInfo = () => { loading.value = true; buttonLoading.value = false; nextTick(async () => { - const res = JSON.parse(routeParams.value.data); - Object.assign(form.value, res.data); - selectValue.value = (form.value.supplier as string).split(','); - if (!form.value.listOfMaterialInventory.length) { - form.value.listOfMaterialInventory = selectValue.value.map((item) => { - return { - supplierCompany: item, - estimatedCycle: '', - contractNum: '', - num: '', - unitPrice: '' - }; - }); + const id = routeParams.value.id.split('_')[0]; + const res = await listCailiaoshebei({ pageNum: 1, pageSize: 10, batchNumber: id }); + cailiaoshebeiList.value = res.rows; + if (!form.value.approvalProject) { + const res = await getPcDetail(id); + form.value.approvalProject = res.data.approvalProject; + } else { + form.value.approvalProject = routeParams.value.approvalProject; } + + console.log('🚀 ~ getInfo ~ form.value.approvalProject:', form.value.approvalProject); + form.value.id = routeParams.value.id; + loading.value = false; buttonLoading.value = false; }); diff --git a/src/views/materials/cailiaoshebei/index.vue b/src/views/materials/cailiaoshebei/index.vue index 84266c1..b786f4b 100644 --- a/src/views/materials/cailiaoshebei/index.vue +++ b/src/views/materials/cailiaoshebei/index.vue @@ -333,6 +333,8 @@ const { queryParams, form, rules } = toRefs(data); /** 查询物资-材料设备列表 */ const getList = async () => { + if (!queryParams.value.batchNumber) return; + loading.value = true; const res = await listCailiaoshebei(queryParams.value); cailiaoshebeiList.value = res.rows; @@ -347,14 +349,13 @@ const getBatchList = async () => { batchOptions.value = res.rows; total.value = res.total; try { - batchTreeRef.value.setCurrentKey(res.rows[0].batchNumber); queryParams.value.batchNumber = res.rows[0].batchNumber; + batchTreeRef.value.setCurrentKey(res.rows[0].batchNumber); form.value.batchNumber = res.rows[0].batchNumber; - form.value.batchId = res.rows[0].id; + form.value.approvalDesign = res.rows[0].approvalDesign; } catch (error) { form.value.batchNumber = ''; } - getList(); }; @@ -362,7 +363,8 @@ const getBatchList = async () => { const handleNodeClick = (data: any) => { queryParams.value.batchNumber = data.batchNumber; form.value.batchNumber = data.batchNumber; - form.value.batchId = data.id; + form.value.approvalDesign = data.approvalDesign; + if (data.batchNumber === '0') { queryParams.value.batchNumber = ''; } @@ -378,7 +380,9 @@ const cancel = () => { /** 表单重置 */ const reset = () => { const preservedBatchId = form.value.batchNumber; // 先保存当前的 batchNumber - form.value = { ...initFormData, batchNumber: preservedBatchId }; // 重置但保留 + const approvalDesigndBatchId = form.value.approvalDesign; // 先保存当前的 batchNumber + + form.value = { ...initFormData, batchNumber: preservedBatchId, approvalDesign: approvalDesigndBatchId }; // 重置但保留 cailiaoshebeiFormRef.value?.resetFields(); }; @@ -421,9 +425,14 @@ const handleUpdate = async (row?: CailiaoshebeiVO) => { /** 审核按钮操作 */ const handleAudit = async () => { + if (!form.value.batchNumber) { + proxy?.$modal.msgError('请选择批次'); + return; + } + proxy?.$tab.closePage(proxy.$route); proxy?.$tab.openPage('/materials-management/cailiaoshebei/indexEdit', '审核材料设备设计', { - id: form.value.batchId, - number: form.value.batchNumber, + id: form.value.batchNumber + '_materialDesign', + approvalDesign: form.value.approvalDesign, type: 'update' }); }; diff --git a/src/views/materials/cailiaoshebei/indexEdit.vue b/src/views/materials/cailiaoshebei/indexEdit.vue index 2c929d6..91dd128 100644 --- a/src/views/materials/cailiaoshebei/indexEdit.vue +++ b/src/views/materials/cailiaoshebei/indexEdit.vue @@ -19,55 +19,21 @@

设计材料设备

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + +
@@ -112,7 +78,8 @@ import ApprovalButton from '@/components/Process/approvalButton.vue'; import { StartProcessBo } from '@/api/workflow/workflowCommon/types'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; import { useUserStoreHook } from '@/store/modules/user'; -import { getCailiaoshebei, listCailiaoshebei } from '@/api/materials/cailiaoshebei'; +import { getCailiaoshebei, getPcDetail, listCailiaoshebei } from '@/api/materials/cailiaoshebei'; +import { CailiaoshebeiVO } from '@/api/materials/cailiaoshebei/types'; // 获取用户 store const userStore = useUserStoreHook(); // 从 store 中获取项目列表和当前选中的项目 @@ -154,8 +121,12 @@ const submitFormData = ref({ }); const taskVariables = ref>({}); const selectValue = ref([]); +const cailiaoshebeiList = ref([]); -const initFormData = []; +const initFormData = { + approvalDesign: undefined, + id: undefined +}; const data = reactive({ form: { ...initFormData }, rules: {} @@ -179,8 +150,16 @@ const getInfo = () => { loading.value = true; buttonLoading.value = false; nextTick(async () => { - const res = await listCailiaoshebei({ pageNum: 1, pageSize: 10, batchNumber: routeParams.value.batchNumber }); - form.value = res.rows; + const id = routeParams.value.id.split('_')[0]; + const res = await listCailiaoshebei({ pageNum: 1, pageSize: 10, batchNumber: id }); + cailiaoshebeiList.value = res.rows; + if (!form.value.approvalDesign) { + const res = await getPcDetail(id); + form.value.approvalDesign = res.data.approvalDesign; + } else { + form.value.approvalDesign = routeParams.value.approvalDesign; + } + form.value.id = routeParams.value.id; loading.value = false; buttonLoading.value = false; }); diff --git a/src/views/materials/orderEquipment/index.vue b/src/views/materials/orderEquipment/index.vue index 1e32896..8e6246c 100644 --- a/src/views/materials/orderEquipment/index.vue +++ b/src/views/materials/orderEquipment/index.vue @@ -35,6 +35,7 @@ --> 保存 + 审核 @@ -256,8 +257,10 @@ const getBatchList = async () => { batchOptions.value = res.rows; total.value = res.total; try { + queryParams.value.batchNumber = res.rows[0].batchNumber; batchTreeRef.value.setCurrentKey(res.rows[0].batchNumber); form.value.batchNumber = res.rows[0].batchNumber; + form.value.approvalOrder = res.rows[0].approvalOrder; } catch (error) { form.value.batchNumber = ''; } @@ -268,7 +271,7 @@ const getBatchList = async () => { const handleNodeClick = (data: any) => { queryParams.value.batchNumber = data.batchNumber; form.value.batchNumber = data.batchNumber; - console.log('🚀 ~ handleNodeClick ~ form.value:', form.value); + form.value.approvalOrder = data.approvalOrder; if (data.batchNumber === '0') { queryParams.value.batchNumber = ''; } @@ -348,6 +351,21 @@ const submitForm = async () => { dialog.visible = false; }; +/** 审核按钮操作 */ +const handleAudit = async () => { + if (!form.value.batchNumber) { + proxy?.$modal.msgError('请选择批次'); + return; + } + + proxy?.$tab.closePage(proxy.$route); + proxy?.$tab.openPage('/materials-management/orderEquipment/indexEdit', '审核物资订货', { + id: form.value.batchNumber, + approvalOrder: form.value.approvalOrder + '_equipmentOrdering', + type: 'update' + }); +}; + /** 提交穿梭框数据 */ const submitTransferForm = async () => { cailiaoshebeiList.value = cailiaoshebeiSelectedList.value.map((id) => { diff --git a/src/views/materials/orderEquipment/indexEdit.vue b/src/views/materials/orderEquipment/indexEdit.vue new file mode 100644 index 0000000..1fa1a47 --- /dev/null +++ b/src/views/materials/orderEquipment/indexEdit.vue @@ -0,0 +1,346 @@ + + + + diff --git a/src/views/materials/orderMaterials/index.vue b/src/views/materials/orderMaterials/index.vue index 411df1f..2fb321e 100644 --- a/src/views/materials/orderMaterials/index.vue +++ b/src/views/materials/orderMaterials/index.vue @@ -30,40 +30,42 @@ - - - - - - + - + - - - + + + + + + + + + + + + + + + + + + + + @@ -73,56 +75,72 @@ - - - - - - - - + + + + - - - - - - + + + - - + + - - + + - - + + - - - + + - - + + + + + + + + + + + + + + + + + + + - - + + @@ -321,6 +328,8 @@ const { queryParams, form, rules } = toRefs(data); /** 查询物资-材料设备列表 */ const getList = async () => { + if (!queryParams.value.batchNumber) return; + loading.value = true; const res = await listCailiaoshebei(queryParams.value); cailiaoshebeiList.value = res.rows; @@ -335,6 +344,7 @@ const getBatchList = async () => { batchOptions.value = res.rows; total.value = res.total; try { + queryParams.value.batchNumber = res.rows[0].batchNumber; batchTreeRef.value.setCurrentKey(res.rows[0].batchNumber); form.value.batchNumber = res.rows[0].batchNumber; form.value.approvalPlan = res.rows[0].approvalPlan; @@ -351,7 +361,6 @@ const handleNodeClick = (data: any) => { queryParams.value.batchNumber = data.batchNumber; form.value.batchNumber = data.batchNumber; form.value.approvalPlan = data.approvalPlan; - console.log('🚀 ~ handleNodeClick ~ form.value:', form.value); if (data.batchNumber === '0') { queryParams.value.batchNumber = ''; @@ -399,7 +408,6 @@ const handleUpdate = async (row?: CailiaoshebeiVO) => { const res = await getCailiaoshebei(_id); Object.assign(form.value, res.data); selectValue.value = (form.value.supplier as string).split(','); - if (!form.value.listOfMaterialInventory.length) { form.value.listOfMaterialInventory = selectValue.value.map((item) => { return { @@ -452,14 +460,16 @@ const handleDelete = async (row?: CailiaoshebeiVO) => { }; /** 审核按钮操作 */ -const handleAudit = async (row?: CailiaoshebeiVO) => { - const data = { - ...row, - approvalPlan: form.value.approvalPlan - }; +const handleAudit = async () => { + if (!form.value.batchNumber) { + proxy?.$modal.msgError('请选择批次'); + return; + } + + proxy?.$tab.closePage(proxy.$route); proxy?.$tab.openPage('/materials-management/suppliesprice/indexEdit', '审核物资供应总计划', { - id: row?.id, - data: JSON.stringify(data), + id: form.value.batchNumber, + approvalPlan: form.value.approvalPlan + '_materialsPlans', type: 'update' }); }; diff --git a/src/views/materials/suppliesprice/indexEdit.vue b/src/views/materials/suppliesprice/indexEdit.vue index ea01281..9a13997 100644 --- a/src/views/materials/suppliesprice/indexEdit.vue +++ b/src/views/materials/suppliesprice/indexEdit.vue @@ -16,58 +16,34 @@
-

施工产值

+

物资供应总计划

- - - - - - - - - - - -
- {{ item }} - - - - - - - - - - - - - - - -
-
-
-
+ + + + + + + + + + + + + + + + + + +
@@ -116,7 +92,7 @@ const { design_change_reason_type } = toRefs(proxy?.useDict('design_change_ import { getKnowledgeDocument } from '@/api/design/technicalStandard'; import { getConstructionValue } from '@/api/out/constructionValue'; import { workScheduleListDetail } from '@/api/progress/plan'; -import { getCailiaoshebei } from '@/api/materials/suppliesprice'; +import { getCailiaoshebei, getPcDetail, listCailiaoshebei } from '@/api/materials/suppliesprice'; // 获取用户 store const userStore = useUserStoreHook(); // 从 store 中获取项目列表和当前选中的项目 @@ -139,9 +115,10 @@ const approvalRecordRef = ref>(); const flowCodeOptions = [ { value: currentProject.value?.id + '_materialsPlans', - label: '批次需求计划审批' + label: '材料总计划审批' } ]; +const { supply } = toRefs(proxy?.useDict('supply')); const leaveFormRef = ref(); const dialog = reactive({ @@ -156,25 +133,11 @@ const submitFormData = ref({ }); const taskVariables = ref>({}); const selectValue = ref([]); +const cailiaoshebeiList = ref([]); const initFormData = { - id: undefined, - batchNumber: undefined, - supplierId: undefined, - supplier: undefined, - name: undefined, - supply: undefined, - specification: undefined, - signalment: undefined, - materialCode: undefined, - arrivalTime: undefined, - finishTime: undefined, - unit: undefined, - plan: undefined, - realQuantity: undefined, - projectId: currentProject.value.id, - listOfMaterialInventory: [], - remark: undefined + approvalPlan: undefined, + id: undefined }; const data = reactive({ form: { ...initFormData }, @@ -199,20 +162,18 @@ const getInfo = () => { loading.value = true; buttonLoading.value = false; nextTick(async () => { - const res = JSON.parse(routeParams.value.data); - Object.assign(form.value, res.data); - selectValue.value = (form.value.supplier as string).split(','); - if (!form.value.listOfMaterialInventory.length) { - form.value.listOfMaterialInventory = selectValue.value.map((item) => { - return { - supplierCompany: item, - estimatedCycle: '', - contractNum: '', - num: '', - unitPrice: '' - }; - }); + const id = routeParams.value.id.split('_')[0]; + const res = await listCailiaoshebei({ pageNum: 1, pageSize: 10, batchNumber: id }); + cailiaoshebeiList.value = res.rows; + if (!form.value.approvalPlan) { + const res = await getPcDetail(id); + form.value.approvalPlan = res.data.approvalPlan; + } else { + form.value.approvalPlan = routeParams.value.approvalPlan; } + console.log('🚀 ~ getInfo ~ form.value.approvalDesign:', form.value.approvalPlan); + form.value.id = routeParams.value.id; + loading.value = false; buttonLoading.value = false; }); diff --git a/src/views/progress/progressCategory/index.vue b/src/views/progress/progressCategory/index.vue index 33409d8..2b03433 100644 --- a/src/views/progress/progressCategory/index.vue +++ b/src/views/progress/progressCategory/index.vue @@ -26,6 +26,9 @@ diff --git a/src/views/safety/safetyInspection/index.vue b/src/views/safety/safetyInspection/index.vue index aa60eae..e01b3ea 100644 --- a/src/views/safety/safetyInspection/index.vue +++ b/src/views/safety/safetyInspection/index.vue @@ -122,6 +122,11 @@ + + + + + @@ -179,8 +184,14 @@ import { listProjectTeamForeman } from '@/api/project/projectTeam'; import { foremanQuery, ProjectTeamForemanResp } from '@/api/project/projectTeam/types'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; -const { safety_inspection_violation_type, review_type, safety_inspection_type, safety_inspection_check_type } = toRefs( - proxy?.useDict('safety_inspection_violation_type', 'review_type', 'safety_inspection_type', 'safety_inspection_check_type') +const { rectification_unit_type, safety_inspection_violation_type, review_type, safety_inspection_type, safety_inspection_check_type } = toRefs( + proxy?.useDict( + 'rectification_unit_type', + 'safety_inspection_violation_type', + 'review_type', + 'safety_inspection_type', + 'safety_inspection_check_type' + ) ); // 获取用户 store const userStore = useUserStoreHook(); @@ -222,6 +233,8 @@ const initFormData: SafetyInspectionForm = { reviewType: undefined, checkTime: undefined, rectificationTime: undefined, + rectificationUnit: undefined, + reviewTime: undefined, checkFile: undefined, rectificationFile: undefined,